@hot-updater/firebase 0.32.0 → 0.33.1
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/dist/firebase/functions/index.cjs +652 -115
- package/dist/iac/index.cjs +312 -24
- package/dist/iac/index.mjs +312 -24
- package/package.json +14 -12
package/dist/iac/index.cjs
CHANGED
|
@@ -47,14 +47,48 @@ let node_stream = require("node:stream");
|
|
|
47
47
|
let node_buffer = require("node:buffer");
|
|
48
48
|
let node_fs_promises = require("node:fs/promises");
|
|
49
49
|
node_fs_promises = __toESM(node_fs_promises);
|
|
50
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
50
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
|
|
51
51
|
function compareValues(a, b, order) {
|
|
52
52
|
if (a < b) return order === "asc" ? -1 : 1;
|
|
53
53
|
if (a > b) return order === "asc" ? 1 : -1;
|
|
54
54
|
return 0;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
57
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/array/orderBy.mjs
|
|
58
|
+
/**
|
|
59
|
+
* Sorts an array of objects based on the given `criteria` and their corresponding order directions.
|
|
60
|
+
*
|
|
61
|
+
* - If you provide keys, it sorts the objects by the values of those keys.
|
|
62
|
+
* - If you provide functions, it sorts based on the values returned by those functions.
|
|
63
|
+
*
|
|
64
|
+
* The function returns the array of objects sorted in corresponding order directions.
|
|
65
|
+
* If two objects have the same value for the current criterion, it uses the next criterion to determine their order.
|
|
66
|
+
* If the number of orders is less than the number of criteria, it uses the last order for the rest of the criteria.
|
|
67
|
+
*
|
|
68
|
+
* @template T - The type of elements in the array.
|
|
69
|
+
* @param {T[]} arr - The array of objects to be sorted.
|
|
70
|
+
* @param {Array<((item: T) => unknown) | keyof T>} criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting.
|
|
71
|
+
* @param {Array<'asc' | 'desc'>} orders - An array of order directions ('asc' for ascending or 'desc' for descending).
|
|
72
|
+
* @returns {T[]} - The sorted array.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Sort an array of objects by 'user' in ascending order and 'age' in descending order.
|
|
76
|
+
* const users = [
|
|
77
|
+
* { user: 'fred', age: 48 },
|
|
78
|
+
* { user: 'barney', age: 34 },
|
|
79
|
+
* { user: 'fred', age: 40 },
|
|
80
|
+
* { user: 'barney', age: 36 },
|
|
81
|
+
* ];
|
|
82
|
+
*
|
|
83
|
+
* const result = orderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']);
|
|
84
|
+
* // result will be:
|
|
85
|
+
* // [
|
|
86
|
+
* // { user: 'barney', age: 36 },
|
|
87
|
+
* // { user: 'barney', age: 34 },
|
|
88
|
+
* // { user: 'fred', age: 48 },
|
|
89
|
+
* // { user: 'fred', age: 40 },
|
|
90
|
+
* // ]
|
|
91
|
+
*/
|
|
58
92
|
function orderBy(arr, criteria, orders) {
|
|
59
93
|
return arr.slice().sort((a, b) => {
|
|
60
94
|
const ordersLength = orders.length;
|
|
@@ -69,12 +103,59 @@ function orderBy(arr, criteria, orders) {
|
|
|
69
103
|
});
|
|
70
104
|
}
|
|
71
105
|
//#endregion
|
|
72
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
106
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/array/sortBy.mjs
|
|
107
|
+
/**
|
|
108
|
+
* Sorts an array of objects based on the given `criteria`.
|
|
109
|
+
*
|
|
110
|
+
* - If you provide keys, it sorts the objects by the values of those keys.
|
|
111
|
+
* - If you provide functions, it sorts based on the values returned by those functions.
|
|
112
|
+
*
|
|
113
|
+
* The function returns the array of objects sorted in ascending order.
|
|
114
|
+
* If two objects have the same value for the current criterion, it uses the next criterion to determine their order.
|
|
115
|
+
*
|
|
116
|
+
* @template T - The type of the objects in the array.
|
|
117
|
+
* @param {T[]} arr - The array of objects to be sorted.
|
|
118
|
+
* @param {Array<((item: T) => unknown) | keyof T>} criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting.
|
|
119
|
+
* @returns {T[]} - The sorted array.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* const users = [
|
|
123
|
+
* { user: 'foo', age: 24 },
|
|
124
|
+
* { user: 'bar', age: 7 },
|
|
125
|
+
* { user: 'foo', age: 8 },
|
|
126
|
+
* { user: 'bar', age: 29 },
|
|
127
|
+
* ];
|
|
128
|
+
*
|
|
129
|
+
* sortBy(users, ['user', 'age']);
|
|
130
|
+
* sortBy(users, [obj => obj.user, 'age']);
|
|
131
|
+
* // results will be:
|
|
132
|
+
* // [
|
|
133
|
+
* // { user : 'bar', age: 7 },
|
|
134
|
+
* // { user : 'bar', age: 29 },
|
|
135
|
+
* // { user : 'foo', age: 8 },
|
|
136
|
+
* // { user : 'foo', age: 24 },
|
|
137
|
+
* // ]
|
|
138
|
+
*/
|
|
73
139
|
function sortBy(arr, criteria) {
|
|
74
140
|
return orderBy(arr, criteria, ["asc"]);
|
|
75
141
|
}
|
|
76
142
|
//#endregion
|
|
77
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
143
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/array/uniqWith.mjs
|
|
144
|
+
/**
|
|
145
|
+
* Returns a new array containing only the unique elements from the original array,
|
|
146
|
+
* based on the values returned by the comparator function.
|
|
147
|
+
*
|
|
148
|
+
* @template T - The type of elements in the array.
|
|
149
|
+
* @param {T[]} arr - The array to process.
|
|
150
|
+
* @param {(item1: T, item2: T) => boolean} areItemsEqual - The function used to compare the array elements.
|
|
151
|
+
* @returns {T[]} A new array containing only the unique elements from the original array, based on the values returned by the comparator function.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1);
|
|
156
|
+
* // [1.2, 3.2, 5.7, 7.19]
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
78
159
|
function uniqWith(arr, areItemsEqual) {
|
|
79
160
|
const result = [];
|
|
80
161
|
for (let i = 0; i < arr.length; i++) {
|
|
@@ -84,21 +165,65 @@ function uniqWith(arr, areItemsEqual) {
|
|
|
84
165
|
return result;
|
|
85
166
|
}
|
|
86
167
|
//#endregion
|
|
87
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
168
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/_internal/globalThis.mjs
|
|
169
|
+
const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
|
|
170
|
+
return this;
|
|
171
|
+
})() || Function("return this")();
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/function/noop.mjs
|
|
174
|
+
/**
|
|
175
|
+
* A no-operation function that does nothing.
|
|
176
|
+
* This can be used as a placeholder or default function.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* noop(); // Does nothing
|
|
180
|
+
*
|
|
181
|
+
* @returns {void} This function does not return anything.
|
|
182
|
+
*/
|
|
88
183
|
function noop$2() {}
|
|
89
184
|
//#endregion
|
|
90
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
185
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
|
|
186
|
+
/**
|
|
187
|
+
* Checks if the given value is a Buffer instance.
|
|
188
|
+
*
|
|
189
|
+
* This function tests whether the provided value is an instance of Buffer.
|
|
190
|
+
* It returns `true` if the value is a Buffer, and `false` otherwise.
|
|
191
|
+
*
|
|
192
|
+
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.
|
|
193
|
+
*
|
|
194
|
+
* @param {unknown} x - The value to check if it is a Buffer.
|
|
195
|
+
* @returns {boolean} Returns `true` if `x` is a Buffer, else `false`.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* const buffer = Buffer.from("test");
|
|
199
|
+
* console.log(isBuffer(buffer)); // true
|
|
200
|
+
*
|
|
201
|
+
* const notBuffer = "not a buffer";
|
|
202
|
+
* console.log(isBuffer(notBuffer)); // false
|
|
203
|
+
*/
|
|
204
|
+
function isBuffer(x) {
|
|
205
|
+
return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x);
|
|
206
|
+
}
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
91
209
|
function getSymbols(object) {
|
|
92
210
|
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
93
211
|
}
|
|
94
212
|
//#endregion
|
|
95
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
213
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
214
|
+
/**
|
|
215
|
+
* Gets the `toStringTag` of `value`.
|
|
216
|
+
*
|
|
217
|
+
* @private
|
|
218
|
+
* @param {T} value The value to query.
|
|
219
|
+
* @returns {string} Returns the `Object.prototype.toString.call` result.
|
|
220
|
+
*/
|
|
96
221
|
function getTag(value) {
|
|
97
222
|
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
98
223
|
return Object.prototype.toString.call(value);
|
|
99
224
|
}
|
|
100
225
|
//#endregion
|
|
101
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
226
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
102
227
|
const regexpTag = "[object RegExp]";
|
|
103
228
|
const stringTag = "[object String]";
|
|
104
229
|
const numberTag = "[object Number]";
|
|
@@ -125,7 +250,49 @@ const bigInt64ArrayTag = "[object BigInt64Array]";
|
|
|
125
250
|
const float32ArrayTag = "[object Float32Array]";
|
|
126
251
|
const float64ArrayTag = "[object Float64Array]";
|
|
127
252
|
//#endregion
|
|
128
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
253
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
254
|
+
/**
|
|
255
|
+
* Checks if a given value is a plain object.
|
|
256
|
+
*
|
|
257
|
+
* @param {object} value - The value to check.
|
|
258
|
+
* @returns {value is Record<PropertyKey, any>} - True if the value is a plain object, otherwise false.
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* // ✅👇 True
|
|
263
|
+
*
|
|
264
|
+
* isPlainObject({ }); // ✅
|
|
265
|
+
* isPlainObject({ key: 'value' }); // ✅
|
|
266
|
+
* isPlainObject({ key: new Date() }); // ✅
|
|
267
|
+
* isPlainObject(new Object()); // ✅
|
|
268
|
+
* isPlainObject(Object.create(null)); // ✅
|
|
269
|
+
* isPlainObject({ nested: { key: true} }); // ✅
|
|
270
|
+
* isPlainObject(new Proxy({}, {})); // ✅
|
|
271
|
+
* isPlainObject({ [Symbol('tag')]: 'A' }); // ✅
|
|
272
|
+
*
|
|
273
|
+
* // ✅👇 (cross-realms, node context, workers, ...)
|
|
274
|
+
* const runInNewContext = await import('node:vm').then(
|
|
275
|
+
* (mod) => mod.runInNewContext
|
|
276
|
+
* );
|
|
277
|
+
* isPlainObject(runInNewContext('({})')); // ✅
|
|
278
|
+
*
|
|
279
|
+
* // ❌👇 False
|
|
280
|
+
*
|
|
281
|
+
* class Test { };
|
|
282
|
+
* isPlainObject(new Test()) // ❌
|
|
283
|
+
* isPlainObject(10); // ❌
|
|
284
|
+
* isPlainObject(null); // ❌
|
|
285
|
+
* isPlainObject('hello'); // ❌
|
|
286
|
+
* isPlainObject([]); // ❌
|
|
287
|
+
* isPlainObject(new Date()); // ❌
|
|
288
|
+
* isPlainObject(new Uint8Array([1])); // ❌
|
|
289
|
+
* isPlainObject(Buffer.from('ABC')); // ❌
|
|
290
|
+
* isPlainObject(Promise.resolve({})); // ❌
|
|
291
|
+
* isPlainObject(Object.create({})); // ❌
|
|
292
|
+
* isPlainObject(new (class Cls {})); // ❌
|
|
293
|
+
* isPlainObject(globalThis); // ❌,
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
129
296
|
function isPlainObject$1(value) {
|
|
130
297
|
if (!value || typeof value !== "object") return false;
|
|
131
298
|
const proto = Object.getPrototypeOf(value);
|
|
@@ -133,28 +300,134 @@ function isPlainObject$1(value) {
|
|
|
133
300
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
134
301
|
}
|
|
135
302
|
//#endregion
|
|
136
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
303
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
304
|
+
/**
|
|
305
|
+
* Checks if a property key is unsafe to modify directly.
|
|
306
|
+
*
|
|
307
|
+
* This function is used in functions like `merge` to prevent prototype pollution attacks
|
|
308
|
+
* by identifying property keys that could modify the object's prototype chain or constructor.
|
|
309
|
+
*
|
|
310
|
+
* @param key - The property key to check
|
|
311
|
+
* @returns `true` if the property is unsafe to modify directly, `false` otherwise
|
|
312
|
+
* @internal
|
|
313
|
+
*/
|
|
314
|
+
function isUnsafeProperty(key) {
|
|
315
|
+
return key === "__proto__";
|
|
316
|
+
}
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/object/merge.mjs
|
|
319
|
+
/**
|
|
320
|
+
* Merges the properties of the source object into the target object.
|
|
321
|
+
*
|
|
322
|
+
* This function performs a deep merge, meaning nested objects and arrays are merged recursively.
|
|
323
|
+
* If a property in the source object is an array or an object and the corresponding property in the target object is also an array or object, they will be merged.
|
|
324
|
+
* If a property in the source object is undefined, it will not overwrite a defined property in the target object.
|
|
325
|
+
*
|
|
326
|
+
* Note that this function mutates the target object.
|
|
327
|
+
*
|
|
328
|
+
* @param {T} target - The target object into which the source object properties will be merged. This object is modified in place.
|
|
329
|
+
* @param {S} source - The source object whose properties will be merged into the target object.
|
|
330
|
+
* @returns {T & S} The updated target object with properties from the source object merged in.
|
|
331
|
+
*
|
|
332
|
+
* @template T - Type of the target object.
|
|
333
|
+
* @template S - Type of the source object.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* const target = { a: 1, b: { x: 1, y: 2 } };
|
|
337
|
+
* const source = { b: { y: 3, z: 4 }, c: 5 };
|
|
338
|
+
*
|
|
339
|
+
* const result = merge(target, source);
|
|
340
|
+
* console.log(result);
|
|
341
|
+
* // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }
|
|
342
|
+
*
|
|
343
|
+
* @example
|
|
344
|
+
* const target = { a: [1, 2], b: { x: 1 } };
|
|
345
|
+
* const source = { a: [3], b: { y: 2 } };
|
|
346
|
+
*
|
|
347
|
+
* const result = merge(target, source);
|
|
348
|
+
* console.log(result);
|
|
349
|
+
* // Output: { a: [3, 2], b: { x: 1, y: 2 } }
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* const target = { a: null };
|
|
353
|
+
* const source = { a: [1, 2, 3] };
|
|
354
|
+
*
|
|
355
|
+
* const result = merge(target, source);
|
|
356
|
+
* console.log(result);
|
|
357
|
+
* // Output: { a: [1, 2, 3] }
|
|
358
|
+
*/
|
|
137
359
|
function merge(target, source) {
|
|
138
360
|
const sourceKeys = Object.keys(source);
|
|
139
361
|
for (let i = 0; i < sourceKeys.length; i++) {
|
|
140
362
|
const key = sourceKeys[i];
|
|
363
|
+
if (isUnsafeProperty(key)) continue;
|
|
141
364
|
const sourceValue = source[key];
|
|
142
365
|
const targetValue = target[key];
|
|
143
|
-
if (
|
|
144
|
-
else target[key] = merge([], sourceValue);
|
|
145
|
-
else if (isPlainObject$1(sourceValue))
|
|
146
|
-
else target[key] = merge({}, sourceValue);
|
|
366
|
+
if (isMergeableValue(sourceValue) && isMergeableValue(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
367
|
+
else if (Array.isArray(sourceValue)) target[key] = merge([], sourceValue);
|
|
368
|
+
else if (isPlainObject$1(sourceValue)) target[key] = merge({}, sourceValue);
|
|
147
369
|
else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
|
|
148
370
|
}
|
|
149
371
|
return target;
|
|
150
372
|
}
|
|
373
|
+
function isMergeableValue(value) {
|
|
374
|
+
return isPlainObject$1(value) || Array.isArray(value);
|
|
375
|
+
}
|
|
151
376
|
//#endregion
|
|
152
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
153
|
-
|
|
377
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
|
|
378
|
+
/**
|
|
379
|
+
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
|
|
380
|
+
*
|
|
381
|
+
* @param {any} value - The value to compare.
|
|
382
|
+
* @param {any} other - The other value to compare.
|
|
383
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* eq(1, 1); // true
|
|
387
|
+
* eq(0, -0); // true
|
|
388
|
+
* eq(NaN, NaN); // true
|
|
389
|
+
* eq('a', Object('a')); // false
|
|
390
|
+
*/
|
|
391
|
+
function isEqualsSameValueZero(value, other) {
|
|
154
392
|
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
155
393
|
}
|
|
156
394
|
//#endregion
|
|
157
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
395
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
396
|
+
/**
|
|
397
|
+
* Compares two values for equality using a custom comparison function.
|
|
398
|
+
*
|
|
399
|
+
* The custom function allows for fine-tuned control over the comparison process. If it returns a boolean, that result determines the equality. If it returns undefined, the function falls back to the default equality comparison.
|
|
400
|
+
*
|
|
401
|
+
* This function also uses the custom equality function to compare values inside objects,
|
|
402
|
+
* arrays, maps, sets, and other complex structures, ensuring a deep comparison.
|
|
403
|
+
*
|
|
404
|
+
* This approach provides flexibility in handling complex comparisons while maintaining efficient default behavior for simpler cases.
|
|
405
|
+
*
|
|
406
|
+
* The custom comparison function can take up to six parameters:
|
|
407
|
+
* - `x`: The value from the first object `a`.
|
|
408
|
+
* - `y`: The value from the second object `b`.
|
|
409
|
+
* - `property`: The property key used to get `x` and `y`.
|
|
410
|
+
* - `xParent`: The parent of the first value `x`.
|
|
411
|
+
* - `yParent`: The parent of the second value `y`.
|
|
412
|
+
* - `stack`: An internal stack (Map) to handle circular references.
|
|
413
|
+
*
|
|
414
|
+
* @param {unknown} a - The first value to compare.
|
|
415
|
+
* @param {unknown} b - The second value to compare.
|
|
416
|
+
* @param {(x: any, y: any, property?: PropertyKey, xParent?: any, yParent?: any, stack?: Map<any, any>) => boolean | void} areValuesEqual - A function to customize the comparison.
|
|
417
|
+
* If it returns a boolean, that result will be used. If it returns undefined,
|
|
418
|
+
* the default equality comparison will be used.
|
|
419
|
+
* @returns {boolean} `true` if the values are equal according to the customizer, otherwise `false`.
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* const customizer = (a, b) => {
|
|
423
|
+
* if (typeof a === 'string' && typeof b === 'string') {
|
|
424
|
+
* return a.toLowerCase() === b.toLowerCase();
|
|
425
|
+
* }
|
|
426
|
+
* };
|
|
427
|
+
* isEqualWith('Hello', 'hello', customizer); // true
|
|
428
|
+
* isEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true
|
|
429
|
+
* isEqualWith([1, 2, 3], [1, 2, 3], customizer); // true
|
|
430
|
+
*/
|
|
158
431
|
function isEqualWith(a, b, areValuesEqual) {
|
|
159
432
|
return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
|
|
160
433
|
}
|
|
@@ -182,7 +455,7 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
|
182
455
|
if (aTag !== bTag) return false;
|
|
183
456
|
switch (aTag) {
|
|
184
457
|
case stringTag: return a.toString() === b.toString();
|
|
185
|
-
case numberTag: return
|
|
458
|
+
case numberTag: return isEqualsSameValueZero(a.valueOf(), b.valueOf());
|
|
186
459
|
case booleanTag:
|
|
187
460
|
case dateTag:
|
|
188
461
|
case symbolTag: return Object.is(a.valueOf(), b.valueOf());
|
|
@@ -227,7 +500,7 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
|
227
500
|
case bigInt64ArrayTag:
|
|
228
501
|
case float32ArrayTag:
|
|
229
502
|
case float64ArrayTag:
|
|
230
|
-
if (
|
|
503
|
+
if (isBuffer(a) !== isBuffer(b)) return false;
|
|
231
504
|
if (a.length !== b.length) return false;
|
|
232
505
|
for (let i = 0; i < a.length; i++) if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) return false;
|
|
233
506
|
return true;
|
|
@@ -260,7 +533,21 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
|
260
533
|
}
|
|
261
534
|
}
|
|
262
535
|
//#endregion
|
|
263
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.
|
|
536
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
537
|
+
/**
|
|
538
|
+
* Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison.
|
|
539
|
+
*
|
|
540
|
+
* @param {unknown} a - The first value to compare.
|
|
541
|
+
* @param {unknown} b - The second value to compare.
|
|
542
|
+
* @returns {boolean} `true` if the values are equal, otherwise `false`.
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* isEqual(1, 1); // true
|
|
546
|
+
* isEqual({ a: 1 }, { a: 1 }); // true
|
|
547
|
+
* isEqual(/abc/g, /abc/g); // true
|
|
548
|
+
* isEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true
|
|
549
|
+
* isEqual([1, 2, 3], [1, 2, 3]); // true
|
|
550
|
+
*/
|
|
264
551
|
function isEqual(a, b) {
|
|
265
552
|
return isEqualWith(a, b, noop$2);
|
|
266
553
|
}
|
|
@@ -838,7 +1125,7 @@ const fallbackSymbols = {
|
|
|
838
1125
|
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
839
1126
|
Object.entries(specialMainSymbols);
|
|
840
1127
|
//#endregion
|
|
841
|
-
//#region ../../node_modules/.pnpm/yoctocolors@2.1.
|
|
1128
|
+
//#region ../../node_modules/.pnpm/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
|
|
842
1129
|
const hasColors = node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
843
1130
|
const format = (open, close) => {
|
|
844
1131
|
if (!hasColors) return (input) => input;
|
|
@@ -850,8 +1137,9 @@ const format = (open, close) => {
|
|
|
850
1137
|
if (index === -1) return openCode + string + closeCode;
|
|
851
1138
|
let result = openCode;
|
|
852
1139
|
let lastIndex = 0;
|
|
1140
|
+
const replaceCode = (close === 22 ? closeCode : "") + openCode;
|
|
853
1141
|
while (index !== -1) {
|
|
854
|
-
result += string.slice(lastIndex, index) +
|
|
1142
|
+
result += string.slice(lastIndex, index) + replaceCode;
|
|
855
1143
|
lastIndex = index + closeCode.length;
|
|
856
1144
|
index = string.indexOf(closeCode, lastIndex);
|
|
857
1145
|
}
|
|
@@ -3251,7 +3539,7 @@ function parseMilliseconds(milliseconds) {
|
|
|
3251
3539
|
throw new TypeError("Expected a finite number or bigint");
|
|
3252
3540
|
}
|
|
3253
3541
|
//#endregion
|
|
3254
|
-
//#region ../../node_modules/.pnpm/pretty-ms@9.
|
|
3542
|
+
//#region ../../node_modules/.pnpm/pretty-ms@9.3.0/node_modules/pretty-ms/index.js
|
|
3255
3543
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3256
3544
|
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3257
3545
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
@@ -3300,7 +3588,7 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3300
3588
|
add(Number(parsed.hours), "hour", "h");
|
|
3301
3589
|
}
|
|
3302
3590
|
add(Number(parsed.minutes), "minute", "m");
|
|
3303
|
-
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3591
|
+
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
|
|
3304
3592
|
const seconds = Number(parsed.seconds);
|
|
3305
3593
|
const milliseconds = Number(parsed.milliseconds);
|
|
3306
3594
|
const microseconds = Number(parsed.microseconds);
|