@design-edito/tools 0.3.1 → 0.3.3

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.
Files changed (114) hide show
  1. package/agnostic/css/bem/index.js +3 -3
  2. package/agnostic/html/hyper-json/cast/index.js +6 -6
  3. package/agnostic/html/hyper-json/index.js +6 -6
  4. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +6 -6
  5. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +6 -6
  6. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +6 -6
  7. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +6 -6
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +6 -6
  9. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +6 -6
  10. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +6 -6
  11. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +6 -6
  12. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +6 -6
  13. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +6 -6
  14. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +6 -6
  15. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +6 -6
  16. package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.js +6 -6
  17. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.js +6 -6
  18. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +6 -6
  19. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +6 -6
  20. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +6 -6
  21. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +6 -6
  22. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +6 -6
  23. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +6 -6
  24. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +6 -6
  25. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +6 -6
  26. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +6 -6
  27. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +6 -6
  28. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +6 -6
  29. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +6 -6
  30. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +6 -6
  31. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +6 -6
  32. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +6 -6
  33. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +6 -6
  34. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +6 -6
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +6 -6
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +6 -6
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +6 -6
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +6 -6
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +6 -6
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +6 -6
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +6 -6
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +6 -6
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +6 -6
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +6 -6
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +6 -6
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +6 -6
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +6 -6
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +6 -6
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +6 -6
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +6 -6
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +6 -6
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +6 -6
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +6 -6
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +6 -6
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +6 -6
  56. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +6 -6
  57. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +6 -6
  58. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +6 -6
  59. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +6 -6
  60. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +6 -6
  61. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +6 -6
  62. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +6 -6
  63. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +6 -6
  64. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +6 -6
  65. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +6 -6
  66. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +6 -6
  67. package/agnostic/html/hyper-json/tree/index.js +6 -6
  68. package/agnostic/html/hyper-json/utils/index.js +6 -6
  69. package/agnostic/misc/cast/index.js +49 -10
  70. package/agnostic/misc/crawler/index.d.ts +52 -26
  71. package/agnostic/misc/crawler/index.js +14 -4
  72. package/agnostic/objects/deep-get-property/index.test.d.ts +1 -0
  73. package/agnostic/objects/enums/is-in-enum/index.test.d.ts +1 -0
  74. package/agnostic/objects/flatten-getters/index.d.ts +2 -2
  75. package/agnostic/objects/flatten-getters/index.js +8 -17
  76. package/agnostic/objects/flatten-getters/index.test.d.ts +1 -0
  77. package/agnostic/objects/is-object/index.test.d.ts +1 -0
  78. package/agnostic/objects/is-record/index.test.d.ts +1 -0
  79. package/agnostic/objects/record-format/index.d.ts +25 -26
  80. package/agnostic/objects/record-format/index.js +1 -5
  81. package/agnostic/objects/record-format/index.test.d.ts +1 -0
  82. package/agnostic/objects/record-map/index.d.ts +5 -5
  83. package/agnostic/objects/record-map/index.test.d.ts +1 -0
  84. package/agnostic/objects/validation/index.test.d.ts +1 -0
  85. package/agnostic/optim/memoize/index.test.d.ts +1 -0
  86. package/agnostic/optim/throttle-debounce/index.js +1 -1
  87. package/agnostic/optim/throttle-debounce/index.test.d.ts +1 -0
  88. package/agnostic/random/hex-char/index.test.d.ts +1 -0
  89. package/agnostic/random/random/index.test.d.ts +1 -0
  90. package/agnostic/random/uuid/index.test.d.ts +1 -0
  91. package/agnostic/regexps/index.d.ts +5 -2
  92. package/agnostic/regexps/index.js +15 -3
  93. package/agnostic/regexps/index.test.d.ts +1 -0
  94. package/agnostic/sanitization/file-name/index.test.d.ts +1 -0
  95. package/agnostic/sanitization/path/index.test.d.ts +1 -0
  96. package/agnostic/sanitization/user-input/index.d.ts +2 -2
  97. package/agnostic/sanitization/user-input/index.js +13 -8
  98. package/agnostic/sanitization/user-input/index.test.d.ts +1 -0
  99. package/agnostic/typescript/types.d.ts +4 -0
  100. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +4 -4
  101. package/node/cloud-storage/operations/copy-dir/index.js +6 -6
  102. package/node/cloud-storage/operations/copy-file/index.js +3 -3
  103. package/node/cloud-storage/operations/download-file/index.js +3 -3
  104. package/node/cloud-storage/operations/exists-file/index.js +3 -3
  105. package/node/cloud-storage/operations/list-dir/index.js +3 -3
  106. package/node/cloud-storage/operations/move-dir/index.js +3 -3
  107. package/node/cloud-storage/operations/move-file/index.js +3 -3
  108. package/node/cloud-storage/operations/remove-dir/index.js +3 -3
  109. package/node/cloud-storage/operations/remove-file/index.js +3 -3
  110. package/node/cloud-storage/operations/stat-file/index.js +3 -3
  111. package/node/images/transform/index.js +26 -26
  112. package/package.json +1 -1
  113. package/chunks/chunk-YWSXCFYY.js +0 -61
  114. package/chunks/{chunk-7NIIWL3S.js → chunk-TAURL7GX.js} +16 -16
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Returns a shallow copy of an object including values from its getter properties.
3
3
  *
4
- * @param {unknown} obj - The object to flatten.
4
+ * @param {object} obj - The object to flatten.
5
5
  * @returns {Record<string, unknown>} A new object containing all own properties and evaluated getter values.
6
6
  */
7
- export declare function flattenGetters(obj: unknown): Record<string, unknown>;
7
+ export declare function flattenGetters(obj: object): Record<string, unknown>;
@@ -1,24 +1,15 @@
1
- import {
2
- toRecord
3
- } from "../../../chunks/chunk-YWSXCFYY.js";
4
- import "../../../chunks/chunk-QXAJXTXV.js";
5
- import "../../../chunks/chunk-HC6ZOHCS.js";
6
1
  import "../../../chunks/chunk-XCBH6NLF.js";
7
2
 
8
3
  // src/agnostic/objects/flatten-getters/index.ts
9
4
  function flattenGetters(obj) {
10
- try {
11
- const { entries, getOwnPropertyDescriptors } = Object;
12
- const properties = toRecord(obj);
13
- const getters = entries(getOwnPropertyDescriptors(obj)).filter(([_, desc]) => typeof desc.get === "function").map(([key]) => key);
14
- const returned = { ...properties };
15
- getters.forEach((getter) => {
16
- returned[getter] = obj[getter];
17
- });
18
- return returned;
19
- } catch (err) {
20
- return {};
21
- }
5
+ const getters = Object.entries(
6
+ Object.getOwnPropertyDescriptors(obj)
7
+ ).filter(([_, desc]) => typeof desc.get === "function").map(([key]) => key);
8
+ const returned = { ...obj };
9
+ getters.forEach((getter) => {
10
+ returned[getter] = obj[getter];
11
+ });
12
+ return returned;
22
13
  }
23
14
  export {
24
15
  flattenGetters
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,38 +1,37 @@
1
+ import type { UnwrapPromise } from '../../typescript/types.js';
1
2
  /**
2
- * A key of the input object or a string.
3
- */
4
- export type FormatKey<Input extends {} = any> = keyof Input | string;
5
- /**
6
- * The value type of a given key in the input object, or `undefined` if the key does not exist.
7
- */
8
- export type InputValue<Input extends {}, Key extends FormatKey<Input>> = Input extends Record<Key, infer V> ? V : undefined;
9
- /**
10
- * A function that transforms a value of type I into type O, can return a Promise.
3
+ * A function that transforms a value of a specific type into another type, can return a Promise.
4
+ *
5
+ * @template InputType - The type of the input value the formatter receives.
6
+ * @template OutputType - The type of the value the formatter returns (or resolves to if Promise).
7
+ * @param {InputType} val - The input value to transform.
8
+ * @returns {OutputType | Promise<OutputType>} The transformed value or a Promise resolving to it.
11
9
  */
12
- export type FormatterFunc<I, O> = (val: I) => O | Promise<O>;
10
+ export type FormatterFunc<InputType, OutputType> = (val: InputType) => OutputType | Promise<OutputType>;
13
11
  /**
14
- * An object mapping keys to formatter functions.
12
+ * An object mapping keys of an input object to formatter functions.
13
+ * Each formatter receives the value corresponding to its key from the input object.
14
+ *
15
+ * @template InputObject - The type of the input object being formatted.
15
16
  */
16
- export type Format<Input extends {} = any> = {
17
- [Key in FormatKey<Input>]: FormatterFunc<InputValue<Input, Key>, any>;
17
+ export type Format<InputObject extends Record<PropertyKey, any>> = {
18
+ [Key in keyof InputObject]?: FormatterFunc<InputObject[Key], any>;
18
19
  };
19
20
  /**
20
- * Utility type that extracts the resolved type of a Promise, or returns the type itself if not a Promise.
21
- */
22
- export type UnwrapPromise<PromiseOrNot> = PromiseOrNot extends Promise<infer Resolved> ? Resolved : PromiseOrNot;
23
- /**
24
- * The object type resulting from applying all formatters and unwrapping any Promises.
21
+ * The resulting object after applying all formatters and unwrapping any returned Promises.
22
+ *
23
+ * @template FormatObject - The type of the format object mapping keys to formatter functions.
25
24
  */
26
- export type Formatted<F extends Format<{}>> = {
27
- [Key in keyof F]: UnwrapPromise<ReturnType<F[Key]>>;
25
+ export type Formatted<FormatObject> = {
26
+ [Key in keyof FormatObject]: FormatObject[Key] extends FormatterFunc<any, any> ? UnwrapPromise<ReturnType<FormatObject[Key]>> : never;
28
27
  };
29
28
  /**
30
29
  * Applies a set of formatter functions to the corresponding properties of an input object.
31
30
  *
32
- * @template I - Input object type.
33
- * @template F - Format object type mapping keys to formatter functions.
34
- * @param {I} input - The object to format.
35
- * @param {F} format - An object of formatter functions for each key.
36
- * @returns {Promise<Formatted<F>>} A Promise resolving to the formatted object with all promises unwrapped.
31
+ * @template InputObject - The type of the input object.
32
+ * @template FormatObject - The type of the format object mapping keys to formatter functions.
33
+ * @param {InputObject} input - The object whose properties are to be formatted.
34
+ * @param {FormatObject} format - An object containing formatter functions for each key.
35
+ * @returns {Promise<Formatted<FormatObject>>} A Promise resolving to the formatted object with all promises unwrapped.
37
36
  */
38
- export declare function recordFormat<I extends {}, F extends Format<I>>(input: I, format: F): Promise<Formatted<F>>;
37
+ export declare function recordFormat<InputObject extends Record<PropertyKey, any>, FormatObject extends Format<InputObject>>(input: InputObject, format: FormatObject): Promise<Formatted<FormatObject>>;
@@ -5,11 +5,7 @@ async function recordFormat(input, format) {
5
5
  const result = {};
6
6
  for (const key in format) {
7
7
  const formatter = format[key];
8
- if (typeof formatter === "function") {
9
- result[key] = await formatter(input[key]);
10
- } else {
11
- result[key] = formatter;
12
- }
8
+ result[key] = await formatter(input[key]);
13
9
  }
14
10
  return result;
15
11
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,11 +2,11 @@
2
2
  * Maps the values of a record using a provided mapper function, returning a new record with the same keys.
3
3
  *
4
4
  * @template Input - The type of the input record.
5
- * @template Mapped - The type of the mapped values.
5
+ * @template MappedValue - The type of the mapped values.
6
6
  * @param {Input} record - The record whose values will be mapped.
7
- * @param {(value: Input[keyof Input], key: keyof Input) => Mapped} mapper - Function to transform each value.
8
- * @returns {{ [K in keyof Input]: Mapped }} A new record with the same keys and mapped values.
7
+ * @param {(value: Input[keyof Input], key: keyof Input) => MappedValue} mapper - Function to transform each value.
8
+ * @returns {{ [K in keyof Input]: MappedValue }} A new record with the same keys and mapped values.
9
9
  */
10
- export declare function recordMap<Input extends Record<string, any>, Mapped>(record: Input, mapper: (value: Input[keyof Input], key: keyof Input) => Mapped): {
11
- [K in keyof Input]: Mapped;
10
+ export declare function recordMap<Input extends Record<string, any>, MappedValue>(record: Input, mapper: (value: Input[keyof Input], key: keyof Input) => MappedValue): {
11
+ [K in keyof Input]: MappedValue;
12
12
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -61,7 +61,7 @@ function debounce(toDebounceFunc, delayMs) {
61
61
  let lastReturnValue = void 0;
62
62
  let nextExecutionTimeout = null;
63
63
  function scheduleNextCall() {
64
- if (typeof nextExecutionTimeout === "number") {
64
+ if (nextExecutionTimeout !== null) {
65
65
  clearTimeout(nextExecutionTimeout);
66
66
  nextExecutionTimeout = null;
67
67
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -42,7 +42,7 @@ export declare function fromStartToEnd(regexp: RegExp, flags?: string): RegExp;
42
42
  *
43
43
  * @param string - The string to test.
44
44
  * @param regexp - The regular expression pattern.
45
- * @param [returnMatches=true] - If true, returns matches; otherwise, returns boolean.
45
+ * @param [returnMatches=false] - If true, returns matches; otherwise, returns boolean.
46
46
  * @param [flags='g'] - Optional flags.
47
47
  * @returns {boolean | RegExpMatchArray | null} Boolean or match array based on `returnMatches`.
48
48
  */
@@ -56,7 +56,7 @@ export declare function stringStartsWith(string: string, regexp: RegExp, returnM
56
56
  *
57
57
  * @param string - The string to test.
58
58
  * @param regexp - The regular expression pattern.
59
- * @param [returnMatches=true] - If true, returns matches; otherwise, returns boolean.
59
+ * @param [returnMatches=false] - If true, returns matches; otherwise, returns boolean.
60
60
  * @param [flags='g'] - Optional flags.
61
61
  * @returns {boolean | RegExpMatchArray | null} Boolean or match array based on `returnMatches`.
62
62
  */
@@ -88,6 +88,9 @@ export declare function stringIs(string: string, regexp: RegExp, returnMatches:
88
88
  export declare function fromStrings(strings: string[]): RegExp;
89
89
  /**
90
90
  * Escapes special RegExp characters in a string.
91
+ * - Newlines are turned into `\\n`
92
+ * - Other whitespace characters are normalized to `\\s`
93
+ * - RegExp special characters (including backslash) are escaped
91
94
  *
92
95
  * @param {string} string - String to escape.
93
96
  * @returns {string} Escaped string.
@@ -24,11 +24,11 @@ function fromStartToEnd(regexp, flags = "g") {
24
24
  const mergedFlags = mergeFlags(regexp.flags, flags);
25
25
  return fromStart(toEnd(regexp, mergedFlags), mergedFlags);
26
26
  }
27
- function stringStartsWith(string, regexp, returnMatches = true, flags = "g") {
27
+ function stringStartsWith(string, regexp, returnMatches = false, flags = "g") {
28
28
  const actualRegexp = fromStart(regexp, flags);
29
29
  return returnMatches ? string.match(actualRegexp) : actualRegexp.test(string);
30
30
  }
31
- function stringEndsWith(string, regexp, returnMatches = true, flags = "g") {
31
+ function stringEndsWith(string, regexp, returnMatches = false, flags = "g") {
32
32
  const actualRegexp = toEnd(regexp, flags);
33
33
  return returnMatches ? string.match(actualRegexp) : actualRegexp.test(string);
34
34
  }
@@ -43,7 +43,19 @@ function fromStrings(strings) {
43
43
  return regexp;
44
44
  }
45
45
  function escape(string) {
46
- return string.replace(/\s/igm, "\\s").replace(/\n/igm, "\\n").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
46
+ let result = "";
47
+ for (const ch of string) {
48
+ if (ch === "\n") {
49
+ result += "\\n";
50
+ } else if (/\s/.test(ch)) {
51
+ result += "\\s";
52
+ } else if (/[.*+?^${}()|[\]\\]/.test(ch)) {
53
+ result += "\\" + ch;
54
+ } else {
55
+ result += ch;
56
+ }
57
+ }
58
+ return result;
47
59
  }
48
60
  function stringsToRootsMap(strings, rootsMap = /* @__PURE__ */ new Map()) {
49
61
  const lengthSorted = strings.sort((strA, strB) => strA.length - strB.length);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * - Strings are sanitized using `xss`.
5
5
  * - Arrays and objects are sanitized recursively.
6
- * - Circular references are safely handled via a `WeakSet`.
6
+ * - Circular references are safely handled via a `WeakMap`.
7
7
  *
8
8
  * @template T
9
9
  * @param input - Input value to sanitize (string, object, or array).
10
10
  * @param [seen] - Internal set to track circular references.
11
11
  * @returns Sanitized input with the same structure as the original.
12
12
  */
13
- export declare const sanitizeUserInput: <T>(input: T, seen?: WeakSet<WeakKey>) => T;
13
+ export declare const sanitizeUserInput: <T>(input: T, seen?: WeakMap<WeakKey, any>) => T;
@@ -2,19 +2,24 @@ import "../../../chunks/chunk-XCBH6NLF.js";
2
2
 
3
3
  // src/agnostic/sanitization/user-input/index.ts
4
4
  import xss from "xss";
5
- var sanitizeUserInput = (input, seen = /* @__PURE__ */ new WeakSet()) => {
5
+ var sanitizeUserInput = (input, seen = /* @__PURE__ */ new WeakMap()) => {
6
6
  if (typeof input === "string") return xss(input);
7
7
  if (Array.isArray(input)) {
8
- if (seen.has(input)) return input;
9
- seen.add(input);
10
- return input.map((item) => sanitizeUserInput(item, seen));
8
+ if (seen.has(input)) return seen.get(input);
9
+ const sanitized = [];
10
+ seen.set(input, sanitized);
11
+ sanitized.push(...input.map((item) => sanitizeUserInput(item, seen)));
12
+ return sanitized;
11
13
  }
12
14
  if (input !== null && typeof input === "object") {
13
- if (seen.has(input)) return input;
14
- seen.add(input);
15
+ if (seen.has(input)) return seen.get(input);
16
+ const sanitized = {};
17
+ seen.set(input, sanitized);
15
18
  const entries = Object.entries(input);
16
- const sanitizedEntries = entries.map(([key, value]) => [xss(key), sanitizeUserInput(value, seen)]);
17
- return Object.fromEntries(sanitizedEntries);
19
+ for (const [key, value] of entries) {
20
+ sanitized[xss(key)] = sanitizeUserInput(value, seen);
21
+ }
22
+ return sanitized;
18
23
  }
19
24
  return input;
20
25
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -35,3 +35,7 @@ export type NullIfUndefined<T> = T extends undefined ? null : T;
35
35
  * ```
36
36
  */
37
37
  export type RequireKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
38
+ /**
39
+ * Utility type that extracts the resolved type of a Promise, or returns the type itself if not a Promise.
40
+ */
41
+ export type UnwrapPromise<PromiseOrNot> = PromiseOrNot extends Promise<infer Resolved> ? Resolved : PromiseOrNot;
@@ -1,12 +1,12 @@
1
1
  import {
2
- remove
3
- } from "../../../../../chunks/chunk-66BURDRK.js";
2
+ download
3
+ } from "../../../../../chunks/chunk-O66PEU62.js";
4
4
  import {
5
5
  upload
6
6
  } from "../../../../../chunks/chunk-UZ4SWSOZ.js";
7
7
  import {
8
- download
9
- } from "../../../../../chunks/chunk-O66PEU62.js";
8
+ remove
9
+ } from "../../../../../chunks/chunk-66BURDRK.js";
10
10
  import {
11
11
  makeSuccess
12
12
  } from "../../../../../chunks/chunk-QEKI6WGQ.js";
@@ -1,21 +1,21 @@
1
- import {
2
- copyDir as copyDir3
3
- } from "../../../../chunks/chunk-VU6JYR3W.js";
4
1
  import {
5
2
  copyDir as copyDir4
6
3
  } from "../../../../chunks/chunk-IBQQCUYV.js";
4
+ import {
5
+ copyDir as copyDir3
6
+ } from "../../../../chunks/chunk-VU6JYR3W.js";
7
7
  import {
8
8
  copyDir as copyDir2
9
9
  } from "../../../../chunks/chunk-OF2W4ZRG.js";
10
+ import {
11
+ copyDir
12
+ } from "../../../../chunks/chunk-RGQNRTBI.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- copyDir
18
- } from "../../../../chunks/chunk-RGQNRTBI.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  copy as copy2
9
9
  } from "../../../../chunks/chunk-O7UCJNVF.js";
10
+ import {
11
+ copy
12
+ } from "../../../../chunks/chunk-7B2E2NGH.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- copy
18
- } from "../../../../chunks/chunk-7B2E2NGH.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  download as download2
9
9
  } from "../../../../chunks/chunk-ULYGDEW2.js";
10
+ import {
11
+ download
12
+ } from "../../../../chunks/chunk-54KPQCVI.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- download
18
- } from "../../../../chunks/chunk-54KPQCVI.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  exists as exists2
9
9
  } from "../../../../chunks/chunk-JU23NBY2.js";
10
+ import {
11
+ exists
12
+ } from "../../../../chunks/chunk-J5D4OQ5U.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- exists
18
- } from "../../../../chunks/chunk-J5D4OQ5U.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  list as list2
9
9
  } from "../../../../chunks/chunk-EBQRPRRC.js";
10
+ import {
11
+ list
12
+ } from "../../../../chunks/chunk-DBNCEHTT.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- list
18
- } from "../../../../chunks/chunk-DBNCEHTT.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  moveDir as moveDir2
9
9
  } from "../../../../chunks/chunk-JN2UETL4.js";
10
+ import {
11
+ moveDir
12
+ } from "../../../../chunks/chunk-PTN2V757.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- moveDir
18
- } from "../../../../chunks/chunk-PTN2V757.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  move as move2
9
9
  } from "../../../../chunks/chunk-VYDUHDXW.js";
10
+ import {
11
+ move
12
+ } from "../../../../chunks/chunk-DBZAJJUF.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- move
18
- } from "../../../../chunks/chunk-DBZAJJUF.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  removeDir as removeDir2
9
9
  } from "../../../../chunks/chunk-6YVXSCRH.js";
10
+ import {
11
+ removeDir
12
+ } from "../../../../chunks/chunk-W5VY535B.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- removeDir
18
- } from "../../../../chunks/chunk-W5VY535B.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  remove as remove2
9
9
  } from "../../../../chunks/chunk-BHGRXDTS.js";
10
+ import {
11
+ remove
12
+ } from "../../../../chunks/chunk-S2I77NEE.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- remove
18
- } from "../../../../chunks/chunk-S2I77NEE.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -7,15 +7,15 @@ import {
7
7
  import {
8
8
  stat as stat2
9
9
  } from "../../../../chunks/chunk-EEPLTO3E.js";
10
+ import {
11
+ stat
12
+ } from "../../../../chunks/chunk-BQABPH3I.js";
10
13
  import {
11
14
  isFtpClient,
12
15
  isGcsBucket,
13
16
  isS3ClientWithBucket,
14
17
  isSftpClient
15
18
  } from "../../../../chunks/chunk-ISJONMNA.js";
16
- import {
17
- stat
18
- } from "../../../../chunks/chunk-BQABPH3I.js";
19
19
  import {
20
20
  makeFailure
21
21
  } from "../../../../chunks/chunk-QEKI6WGQ.js";
@@ -1,19 +1,26 @@
1
1
  import {
2
- isOverlayOperationParams,
3
- overlay
4
- } from "../../../chunks/chunk-MZYCKOLN.js";
5
- import {
6
- isRotateOperationParams,
7
- rotate
8
- } from "../../../chunks/chunk-QFBVETGF.js";
2
+ isNormalizeOperationParams,
3
+ normalize
4
+ } from "../../../chunks/chunk-MHNUCHPP.js";
9
5
  import {
10
6
  isResizeOperationParams,
11
7
  resize
12
8
  } from "../../../chunks/chunk-FXISVWGE.js";
9
+ import {
10
+ isRotateOperationParams,
11
+ rotate
12
+ } from "../../../chunks/chunk-QFBVETGF.js";
13
13
  import {
14
14
  isSaturateOperationParams,
15
15
  saturate
16
16
  } from "../../../chunks/chunk-AYGAQQXD.js";
17
+ import {
18
+ flip
19
+ } from "../../../chunks/chunk-WNDMYNDU.js";
20
+ import {
21
+ flatten,
22
+ isFlattenOperationParams
23
+ } from "../../../chunks/chunk-HMPY32F7.js";
17
24
  import {
18
25
  extract,
19
26
  isExtractOperationParams
@@ -22,28 +29,21 @@ import {
22
29
  flop
23
30
  } from "../../../chunks/chunk-YA2YCZUF.js";
24
31
  import {
25
- hue,
26
- isHueOperationParams
27
- } from "../../../chunks/chunk-ASWI3EO6.js";
28
- import {
29
- flip
30
- } from "../../../chunks/chunk-WNDMYNDU.js";
31
- import {
32
- isLightenOperationParams,
33
- lighten
34
- } from "../../../chunks/chunk-65BFQP3T.js";
32
+ isOverlayOperationParams,
33
+ overlay
34
+ } from "../../../chunks/chunk-MZYCKOLN.js";
35
35
  import {
36
36
  isLevelOperationParams,
37
37
  level
38
38
  } from "../../../chunks/chunk-IK2S6ZYP.js";
39
39
  import {
40
- flatten,
41
- isFlattenOperationParams
42
- } from "../../../chunks/chunk-HMPY32F7.js";
40
+ isLightenOperationParams,
41
+ lighten
42
+ } from "../../../chunks/chunk-65BFQP3T.js";
43
43
  import {
44
- isNormalizeOperationParams,
45
- normalize
46
- } from "../../../chunks/chunk-MHNUCHPP.js";
44
+ hue,
45
+ isHueOperationParams
46
+ } from "../../../chunks/chunk-ASWI3EO6.js";
47
47
  import {
48
48
  blur,
49
49
  isBlurOperationParams
@@ -65,6 +65,9 @@ import {
65
65
  makeFailure,
66
66
  makeSuccess
67
67
  } from "../../../chunks/chunk-QEKI6WGQ.js";
68
+ import {
69
+ unknownToString
70
+ } from "../../../chunks/chunk-FENXVJYO.js";
68
71
  import "../../../chunks/chunk-RNXRHCHQ.js";
69
72
  import "../../../chunks/chunk-DNIOWD7K.js";
70
73
  import "../../../chunks/chunk-OSAXBA7G.js";
@@ -73,9 +76,6 @@ import {
73
76
  isNonNullObject
74
77
  } from "../../../chunks/chunk-HQLRJ7XW.js";
75
78
  import "../../../chunks/chunk-KRYJVBO5.js";
76
- import {
77
- unknownToString
78
- } from "../../../chunks/chunk-FENXVJYO.js";
79
79
  import "../../../chunks/chunk-XCBH6NLF.js";
80
80
 
81
81
  // src/node/images/transform/index.ts