@ocap/util 1.27.16 → 1.28.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.
Files changed (54) hide show
  1. package/esm/bn.d.ts +8 -6
  2. package/esm/bn.js +11 -7
  3. package/esm/constant.d.ts +4 -1
  4. package/esm/constant.js +5 -1
  5. package/esm/create-sorted-list.d.ts +4 -1
  6. package/esm/create-sorted-list.js +8 -3
  7. package/esm/curve.d.ts +85 -55
  8. package/esm/curve.js +132 -127
  9. package/esm/error.d.ts +12 -9
  10. package/esm/error.js +24 -17
  11. package/esm/get-list-field.d.ts +4 -1
  12. package/esm/get-list-field.js +7 -2
  13. package/esm/get-related-addr.d.ts +4 -1
  14. package/esm/get-related-addr.js +5 -1
  15. package/esm/index.d.ts +47 -44
  16. package/esm/index.js +364 -469
  17. package/esm/lodash.d.ts +12 -0
  18. package/esm/md5.d.ts +4 -1
  19. package/esm/md5.js +7 -3
  20. package/esm/ready.d.ts +13 -9
  21. package/esm/ready.js +33 -36
  22. package/esm/retry.d.ts +16 -9
  23. package/esm/retry.js +26 -27
  24. package/esm/tsfixme.d.ts +3 -0
  25. package/esm/url.d.ts +16 -12
  26. package/esm/url.js +67 -92
  27. package/lib/_virtual/rolldown_runtime.js +29 -0
  28. package/lib/bn.d.ts +8 -6
  29. package/lib/bn.js +12 -12
  30. package/lib/constant.d.ts +4 -1
  31. package/lib/constant.js +6 -4
  32. package/lib/create-sorted-list.d.ts +4 -1
  33. package/lib/create-sorted-list.js +11 -10
  34. package/lib/curve.d.ts +84 -55
  35. package/lib/curve.js +139 -137
  36. package/lib/error.d.ts +12 -9
  37. package/lib/error.js +25 -21
  38. package/lib/get-list-field.d.ts +4 -1
  39. package/lib/get-list-field.js +9 -9
  40. package/lib/get-related-addr.d.ts +4 -1
  41. package/lib/get-related-addr.js +5 -4
  42. package/lib/index.d.ts +47 -44
  43. package/lib/index.js +386 -506
  44. package/lib/lodash.d.ts +12 -0
  45. package/lib/md5.d.ts +4 -1
  46. package/lib/md5.js +9 -10
  47. package/lib/ready.d.ts +13 -9
  48. package/lib/ready.js +34 -42
  49. package/lib/retry.d.ts +16 -9
  50. package/lib/retry.js +27 -30
  51. package/lib/tsfixme.d.ts +3 -0
  52. package/lib/url.d.ts +16 -12
  53. package/lib/url.js +69 -118
  54. package/package.json +20 -9
@@ -0,0 +1,12 @@
1
+ declare module 'lodash/camelCase';
2
+ declare module 'lodash/flatten';
3
+ declare module 'lodash/get';
4
+ declare module 'lodash/isBoolean';
5
+ declare module 'lodash/isNull';
6
+ declare module 'lodash/isNumber';
7
+ declare module 'lodash/isObject';
8
+ declare module 'lodash/isString';
9
+ declare module 'lodash/padEnd';
10
+ declare module 'lodash/padStart';
11
+ declare module 'lodash/uniq';
12
+ declare module 'lodash/upperFirst';
package/esm/md5.d.ts CHANGED
@@ -1 +1,4 @@
1
- export declare const md5: (x: $TSFixMe) => string;
1
+ //#region src/md5.d.ts
2
+ declare const md5: (x: $TSFixMe) => string;
3
+ //#endregion
4
+ export { md5 };
package/esm/md5.js CHANGED
@@ -1,3 +1,7 @@
1
- import crypto from 'crypto';
2
- // eslint-disable-next-line import/prefer-default-export
3
- export const md5 = (x) => crypto.createHash('md5').update(x).digest('hex');
1
+ import crypto from "crypto";
2
+
3
+ //#region src/md5.ts
4
+ const md5 = (x) => crypto.createHash("md5").update(x).digest("hex");
5
+
6
+ //#endregion
7
+ export { md5 };
package/esm/ready.d.ts CHANGED
@@ -1,10 +1,14 @@
1
- import EventEmitter from 'events';
2
- export declare class Ready extends EventEmitter {
3
- emit: $TSFixMe;
4
- ready: $TSFixMe;
5
- readyCallbacks: $TSFixMe;
6
- readyMarks: $TSFixMe;
7
- constructor();
8
- markReady(mark?: $TSFixMe): void;
9
- onReady(cb: $TSFixMe): void;
1
+ import EventEmitter from "events";
2
+
3
+ //#region src/ready.d.ts
4
+ declare class Ready extends EventEmitter {
5
+ emit: $TSFixMe;
6
+ ready: $TSFixMe;
7
+ readyCallbacks: $TSFixMe;
8
+ readyMarks: $TSFixMe;
9
+ constructor();
10
+ markReady(mark?: $TSFixMe): void;
11
+ onReady(cb: $TSFixMe): void;
10
12
  }
13
+ //#endregion
14
+ export { Ready };
package/esm/ready.js CHANGED
@@ -1,36 +1,33 @@
1
- import EventEmitter from 'events';
2
- export class Ready extends EventEmitter {
3
- constructor() {
4
- super();
5
- this.ready = false;
6
- this.readyCallbacks = [];
7
- this.readyMarks = {};
8
- }
9
- markReady(mark) {
10
- if (this.ready) {
11
- return;
12
- }
13
- if (mark === undefined) {
14
- this.ready = true;
15
- this.readyCallbacks.forEach((x) => x());
16
- this.emit('ready');
17
- }
18
- else {
19
- // console.log('Ready.markReady', this.name, mark);
20
- this.readyMarks[mark] = true;
21
- this.ready = Object.values(this.readyMarks).every((x) => !!x);
22
- if (this.ready) {
23
- this.readyCallbacks.forEach((cb) => cb());
24
- this.emit('ready');
25
- }
26
- }
27
- }
28
- onReady(cb) {
29
- if (this.ready) {
30
- cb();
31
- }
32
- else {
33
- this.readyCallbacks.push(cb);
34
- }
35
- }
36
- }
1
+ import EventEmitter from "events";
2
+
3
+ //#region src/ready.ts
4
+ var Ready = class extends EventEmitter {
5
+ constructor() {
6
+ super();
7
+ this.ready = false;
8
+ this.readyCallbacks = [];
9
+ this.readyMarks = {};
10
+ }
11
+ markReady(mark) {
12
+ if (this.ready) return;
13
+ if (mark === void 0) {
14
+ this.ready = true;
15
+ this.readyCallbacks.forEach((x) => x());
16
+ this.emit("ready");
17
+ } else {
18
+ this.readyMarks[mark] = true;
19
+ this.ready = Object.values(this.readyMarks).every((x) => !!x);
20
+ if (this.ready) {
21
+ this.readyCallbacks.forEach((cb) => cb());
22
+ this.emit("ready");
23
+ }
24
+ }
25
+ }
26
+ onReady(cb) {
27
+ if (this.ready) cb();
28
+ else this.readyCallbacks.push(cb);
29
+ }
30
+ };
31
+
32
+ //#endregion
33
+ export { Ready };
package/esm/retry.d.ts CHANGED
@@ -1,11 +1,18 @@
1
+ //#region src/retry.d.ts
1
2
  interface RetryOptions {
2
- retryLimit?: number;
3
- backoff?: {
4
- baseDelay: number;
5
- maxDelay: number;
6
- };
7
- shouldRetry?: (error: unknown) => boolean;
8
- onError?: (error: unknown, attempt: number) => Promise<void> | void;
3
+ retryLimit?: number;
4
+ backoff?: {
5
+ baseDelay: number;
6
+ maxDelay: number;
7
+ };
8
+ shouldRetry?: (error: unknown) => boolean;
9
+ onError?: (error: unknown, attempt: number) => Promise<void> | void;
9
10
  }
10
- export declare function withRetry<T>(handle: () => Promise<T>, { retryLimit, backoff, shouldRetry, onError, }?: RetryOptions): Promise<T>;
11
- export {};
11
+ declare function withRetry<T>(handle: () => Promise<T>, {
12
+ retryLimit,
13
+ backoff,
14
+ shouldRetry,
15
+ onError
16
+ }?: RetryOptions): Promise<T>;
17
+ //#endregion
18
+ export { withRetry };
package/esm/retry.js CHANGED
@@ -1,30 +1,29 @@
1
- /* eslint-disable no-await-in-loop */
1
+ //#region src/retry.ts
2
2
  function wait(ms) {
3
- return new Promise((resolve) => {
4
- setTimeout(resolve, ms);
5
- });
3
+ return new Promise((resolve) => {
4
+ setTimeout(resolve, ms);
5
+ });
6
6
  }
7
- // eslint-disable-next-line consistent-return
8
- export async function withRetry(handle, { retryLimit = 30, backoff = { baseDelay: 20, maxDelay: 1000 }, shouldRetry = () => true, onError = () => { }, } = {}) {
9
- let attempt = 0;
10
- let lastError;
11
- while (attempt <= retryLimit) {
12
- attempt++;
13
- try {
14
- const result = await handle();
15
- return result;
16
- }
17
- catch (error) {
18
- if (!shouldRetry(error) || attempt > retryLimit) {
19
- throw error;
20
- }
21
- lastError = error;
22
- if (onError) {
23
- await onError(lastError, attempt);
24
- }
25
- const { baseDelay, maxDelay } = backoff;
26
- const delay = Math.min(maxDelay, baseDelay * 2 ** attempt);
27
- await wait(Math.random() * delay);
28
- }
29
- }
7
+ async function withRetry(handle, { retryLimit = 30, backoff = {
8
+ baseDelay: 20,
9
+ maxDelay: 1e3
10
+ }, shouldRetry = () => true, onError = () => {} } = {}) {
11
+ let attempt = 0;
12
+ let lastError;
13
+ while (attempt <= retryLimit) {
14
+ attempt++;
15
+ try {
16
+ return await handle();
17
+ } catch (error) {
18
+ if (!shouldRetry(error) || attempt > retryLimit) throw error;
19
+ lastError = error;
20
+ if (onError) await onError(lastError, attempt);
21
+ const { baseDelay, maxDelay } = backoff;
22
+ const delay = Math.min(maxDelay, baseDelay * 2 ** attempt);
23
+ await wait(Math.random() * delay);
24
+ }
25
+ }
30
26
  }
27
+
28
+ //#endregion
29
+ export { withRetry };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ type $TSFixMe = any;
3
+ type $TSFixMeFunction = (...args: any[]) => any;
package/esm/url.d.ts CHANGED
@@ -1,13 +1,17 @@
1
- import * as ipaddr from 'ipaddr.js';
2
- export declare function parseIp(host: string): ipaddr.IPv4 | ipaddr.IPv6 | null;
3
- export declare function isUnicastAddress(host: string): boolean;
4
- export declare function resolveHostAddresses(host: string): Promise<string[]>;
5
- export interface VerifyUrlOptions {
6
- allowIp?: boolean;
7
- maxLength?: number;
8
- protocols?: string[];
9
- blockedHosts?: string[];
10
- blockedSuffixes?: string[];
11
- checkDns?: boolean;
1
+ import * as ipaddr from "ipaddr.js";
2
+
3
+ //#region src/url.d.ts
4
+ declare function parseIp(host: string): ipaddr.IPv4 | ipaddr.IPv6 | null;
5
+ declare function isUnicastAddress(host: string): boolean;
6
+ declare function resolveHostAddresses(host: string): Promise<string[]>;
7
+ interface VerifyUrlOptions {
8
+ allowIp?: boolean;
9
+ maxLength?: number;
10
+ protocols?: string[];
11
+ blockedHosts?: string[];
12
+ blockedSuffixes?: string[];
13
+ checkDns?: boolean;
12
14
  }
13
- export declare function verifyUrl(url: string, options?: VerifyUrlOptions): Promise<boolean>;
15
+ declare function verifyUrl(url: string, options?: VerifyUrlOptions): Promise<boolean>;
16
+ //#endregion
17
+ export { VerifyUrlOptions, isUnicastAddress, parseIp, resolveHostAddresses, verifyUrl };
package/esm/url.js CHANGED
@@ -1,101 +1,76 @@
1
- import { URL } from 'url';
2
- import * as ipaddr from 'ipaddr.js';
3
- import { Resolver } from 'dns/promises';
1
+ import { URL } from "url";
2
+ import * as ipaddr from "ipaddr.js";
3
+ import { Resolver } from "dns/promises.js";
4
+
5
+ //#region src/url.ts
4
6
  const MAX_URL_LENGTH = 256;
5
- export function parseIp(host) {
6
- if (!ipaddr.isValid(host))
7
- return null;
8
- try {
9
- return ipaddr.parse(host);
10
- }
11
- catch {
12
- return null;
13
- }
7
+ function parseIp(host) {
8
+ if (!ipaddr.isValid(host)) return null;
9
+ try {
10
+ return ipaddr.parse(host);
11
+ } catch {
12
+ return null;
13
+ }
14
14
  }
15
15
  function stripTrailingDots(host) {
16
- return host.replace(/\.+$/, '');
16
+ return host.replace(/\.+$/, "");
17
17
  }
18
18
  function isBlockedHostname(host, blockedHosts, blockedSuffixes) {
19
- const normalized = host.toLowerCase();
20
- if (blockedHosts.includes(normalized))
21
- return true;
22
- if (blockedSuffixes.some((suffix) => normalized.endsWith(suffix)))
23
- return true;
24
- return false;
19
+ const normalized = host.toLowerCase();
20
+ if (blockedHosts.includes(normalized)) return true;
21
+ if (blockedSuffixes.some((suffix) => normalized.endsWith(suffix))) return true;
22
+ return false;
25
23
  }
26
- export function isUnicastAddress(host) {
27
- const parsed = parseIp(host);
28
- if (!parsed)
29
- return false;
30
- const range = parsed.range();
31
- if (range === 'ipv4Mapped' && parsed.kind() === 'ipv6') {
32
- const mapped = parsed.toIPv4Address();
33
- return mapped.range() === 'unicast';
34
- }
35
- return range === 'unicast';
24
+ function isUnicastAddress(host) {
25
+ const parsed = parseIp(host);
26
+ if (!parsed) return false;
27
+ const range = parsed.range();
28
+ if (range === "ipv4Mapped" && parsed.kind() === "ipv6") return parsed.toIPv4Address().range() === "unicast";
29
+ return range === "unicast";
36
30
  }
37
- export async function resolveHostAddresses(host) {
38
- try {
39
- const resolver = new Resolver();
40
- resolver.setServers(['8.8.8.8', '1.1.1.1']);
41
- const addresses = [];
42
- // resolve ipv4
43
- try {
44
- const ipv4Addresses = await resolver.resolve4(host);
45
- addresses.push(...ipv4Addresses);
46
- }
47
- catch (error) {
48
- console.warn(`IPv4 resolution failed for ${host}:`, error?.message);
49
- }
50
- // resolve ipv6
51
- if (!addresses.length) {
52
- try {
53
- const ipv6Addresses = await resolver.resolve6(host);
54
- addresses.push(...ipv6Addresses);
55
- }
56
- catch (error) {
57
- console.warn(`IPv6 resolution failed for ${host}:`, error?.message);
58
- }
59
- }
60
- return addresses.filter(Boolean);
61
- }
62
- catch (error) {
63
- console.warn(`DNS resolution failed for host: ${host}, error: ${error?.message}`);
64
- return [];
65
- }
31
+ async function resolveHostAddresses(host) {
32
+ try {
33
+ const resolver = new Resolver();
34
+ resolver.setServers(["8.8.8.8", "1.1.1.1"]);
35
+ const addresses = [];
36
+ try {
37
+ const ipv4Addresses = await resolver.resolve4(host);
38
+ addresses.push(...ipv4Addresses);
39
+ } catch (error) {
40
+ console.warn(`IPv4 resolution failed for ${host}:`, error?.message);
41
+ }
42
+ if (!addresses.length) try {
43
+ const ipv6Addresses = await resolver.resolve6(host);
44
+ addresses.push(...ipv6Addresses);
45
+ } catch (error) {
46
+ console.warn(`IPv6 resolution failed for ${host}:`, error?.message);
47
+ }
48
+ return addresses.filter(Boolean);
49
+ } catch (error) {
50
+ console.warn(`DNS resolution failed for host: ${host}, error: ${error?.message}`);
51
+ return [];
52
+ }
66
53
  }
67
- export async function verifyUrl(url, options = {}) {
68
- if (!url)
69
- throw new Error('URL is required');
70
- const { maxLength = MAX_URL_LENGTH, protocols = ['https:'], blockedHosts = ['localhost'], blockedSuffixes = [], allowIp = false, checkDns = false, } = options;
71
- if (url.length > maxLength) {
72
- throw new Error(`URL exceeds maximum length of ${maxLength} characters: ${url.length}`);
73
- }
74
- const { hostname, protocol } = new URL(url);
75
- if (!protocols.includes(protocol)) {
76
- throw new Error(`Protocol '${protocol}' is not allowed. Allowed protocols: ${protocols.join(', ')}`);
77
- }
78
- const normalizedHost = stripTrailingDots(hostname);
79
- if (isBlockedHostname(normalizedHost, blockedHosts, blockedSuffixes)) {
80
- throw new Error(`Hostname '${normalizedHost}' is blocked`);
81
- }
82
- const isIP = Boolean(parseIp(normalizedHost));
83
- if (isIP) {
84
- if (!allowIp) {
85
- throw new Error(`IP addresses are not allowed: ${normalizedHost}`);
86
- }
87
- if (!isUnicastAddress(normalizedHost)) {
88
- throw new Error(`IP address is not unicast: ${normalizedHost}`);
89
- }
90
- }
91
- if (checkDns && !isIP) {
92
- const resolved = await resolveHostAddresses(normalizedHost);
93
- if (resolved.length === 0) {
94
- throw new Error(`DNS resolution failed: no addresses found for ${normalizedHost}`);
95
- }
96
- if (!resolved.every((address) => isUnicastAddress(address))) {
97
- throw new Error(`DNS resolved to non-unicast addresses for ${normalizedHost}`);
98
- }
99
- }
100
- return true;
54
+ async function verifyUrl(url, options = {}) {
55
+ if (!url) throw new Error("URL is required");
56
+ const { maxLength = MAX_URL_LENGTH, protocols = ["https:"], blockedHosts = ["localhost"], blockedSuffixes = [], allowIp = false, checkDns = false } = options;
57
+ if (url.length > maxLength) throw new Error(`URL exceeds maximum length of ${maxLength} characters: ${url.length}`);
58
+ const { hostname, protocol } = new URL(url);
59
+ if (!protocols.includes(protocol)) throw new Error(`Protocol '${protocol}' is not allowed. Allowed protocols: ${protocols.join(", ")}`);
60
+ const normalizedHost = stripTrailingDots(hostname);
61
+ if (isBlockedHostname(normalizedHost, blockedHosts, blockedSuffixes)) throw new Error(`Hostname '${normalizedHost}' is blocked`);
62
+ const isIP = Boolean(parseIp(normalizedHost));
63
+ if (isIP) {
64
+ if (!allowIp) throw new Error(`IP addresses are not allowed: ${normalizedHost}`);
65
+ if (!isUnicastAddress(normalizedHost)) throw new Error(`IP address is not unicast: ${normalizedHost}`);
66
+ }
67
+ if (checkDns && !isIP) {
68
+ const resolved = await resolveHostAddresses(normalizedHost);
69
+ if (resolved.length === 0) throw new Error(`DNS resolution failed: no addresses found for ${normalizedHost}`);
70
+ if (!resolved.every((address) => isUnicastAddress(address))) throw new Error(`DNS resolved to non-unicast addresses for ${normalizedHost}`);
71
+ }
72
+ return true;
101
73
  }
74
+
75
+ //#endregion
76
+ export { isUnicastAddress, parseIp, resolveHostAddresses, verifyUrl };
@@ -0,0 +1,29 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
package/lib/bn.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- import BaseBN from 'bn.js';
2
- export interface BN extends BaseBN {
1
+ import BaseBN from "bn.js";
2
+
3
+ //#region src/bn.d.ts
4
+ interface BN extends BaseBN {}
5
+ declare class BN extends BaseBN {
6
+ constructor(value: number | string | number[] | Uint8Array | Buffer | BaseBN | null | undefined, base?: number | 'hex', endian?: BaseBN.Endianness);
3
7
  }
4
- export declare class BN extends BaseBN {
5
- constructor(value: number | string | number[] | Uint8Array | Buffer | BaseBN | null | undefined, base?: number | 'hex', endian?: BaseBN.Endianness);
6
- }
7
- export { BaseBN };
8
+ //#endregion
9
+ export { BN, BaseBN };
package/lib/bn.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.js');
2
+ let bn_js = require("bn.js");
3
+ bn_js = require_rolldown_runtime.__toESM(bn_js);
4
+
5
+ //#region src/bn.ts
6
+ var BN = class extends bn_js.default {
7
+ constructor(value, base, endian) {
8
+ super(value === null ? "0" : value, base, endian);
9
+ }
4
10
  };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.BaseBN = exports.BN = void 0;
7
- const bn_js_1 = __importDefault(require("bn.js"));
8
- exports.BaseBN = bn_js_1.default;
9
- class BN extends bn_js_1.default {
10
- constructor(value, base, endian) {
11
- super(value === null ? '0' : value, base, endian);
12
- }
13
- }
11
+
12
+ //#endregion
14
13
  exports.BN = BN;
14
+ exports.BaseBN = bn_js.default;
package/lib/constant.d.ts CHANGED
@@ -1 +1,4 @@
1
- export declare const DEFAULT_TOKEN_DECIMAL = 18;
1
+ //#region src/constant.d.ts
2
+ declare const DEFAULT_TOKEN_DECIMAL = 18;
3
+ //#endregion
4
+ export { DEFAULT_TOKEN_DECIMAL };
package/lib/constant.js CHANGED
@@ -1,4 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_TOKEN_DECIMAL = void 0;
4
- exports.DEFAULT_TOKEN_DECIMAL = 18;
1
+
2
+ //#region src/constant.ts
3
+ const DEFAULT_TOKEN_DECIMAL = 18;
4
+
5
+ //#endregion
6
+ exports.DEFAULT_TOKEN_DECIMAL = DEFAULT_TOKEN_DECIMAL;
@@ -1 +1,4 @@
1
- export declare const createSortedList: (list: $TSFixMe) => any;
1
+ //#region src/create-sorted-list.d.ts
2
+ declare const createSortedList: (list: $TSFixMe) => unknown[];
3
+ //#endregion
4
+ export { createSortedList };
@@ -1,10 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createSortedList = void 0;
7
- const uniq_1 = __importDefault(require("lodash/uniq"));
8
- const flatten_1 = __importDefault(require("lodash/flatten"));
9
- const createSortedList = (list) => (0, uniq_1.default)((0, flatten_1.default)(list)).filter(Boolean).sort();
10
- exports.createSortedList = createSortedList;
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.js');
2
+ let lodash_uniq = require("lodash/uniq");
3
+ lodash_uniq = require_rolldown_runtime.__toESM(lodash_uniq);
4
+ let lodash_flatten = require("lodash/flatten");
5
+ lodash_flatten = require_rolldown_runtime.__toESM(lodash_flatten);
6
+
7
+ //#region src/create-sorted-list.ts
8
+ const createSortedList = (list) => (0, lodash_uniq.default)((0, lodash_flatten.default)(list)).filter(Boolean).sort();
9
+
10
+ //#endregion
11
+ exports.createSortedList = createSortedList;