@postxl/utils 1.0.1 → 1.2.0
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/index.browser.d.ts +2 -0
- package/dist/index.browser.js +3 -0
- package/dist/index.d.ts +22 -25
- package/dist/index.js +36 -41
- package/dist/index.js.map +1 -1
- package/dist/zod-excel.decoders-CiKlp4ZC.js +1375 -0
- package/dist/zod-excel.decoders-CiKlp4ZC.js.map +1 -0
- package/dist/zod-excel.decoders-CtmUu_Yj.d.ts +775 -0
- package/package.json +25 -16
- package/dist/DefaultMap.d.ts +0 -12
- package/dist/DefaultMap.d.ts.map +0 -1
- package/dist/DefaultMap.js +0 -26
- package/dist/DefaultMap.js.map +0 -1
- package/dist/NestedMap.d.ts +0 -17
- package/dist/NestedMap.d.ts.map +0 -1
- package/dist/NestedMap.js +0 -72
- package/dist/NestedMap.js.map +0 -1
- package/dist/TypedMapping.d.ts +0 -27
- package/dist/TypedMapping.d.ts.map +0 -1
- package/dist/TypedMapping.js +0 -33
- package/dist/TypedMapping.js.map +0 -1
- package/dist/array.d.ts +0 -7
- package/dist/array.d.ts.map +0 -1
- package/dist/array.js +0 -21
- package/dist/array.js.map +0 -1
- package/dist/async.d.ts +0 -4
- package/dist/async.d.ts.map +0 -1
- package/dist/async.js +0 -41
- package/dist/async.js.map +0 -1
- package/dist/buffer.d.ts +0 -5
- package/dist/buffer.d.ts.map +0 -1
- package/dist/buffer.js +0 -16
- package/dist/buffer.js.map +0 -1
- package/dist/check-port.d.ts +0 -10
- package/dist/check-port.d.ts.map +0 -1
- package/dist/check-port.js +0 -40
- package/dist/check-port.js.map +0 -1
- package/dist/datetime.d.ts +0 -23
- package/dist/datetime.d.ts.map +0 -1
- package/dist/datetime.js +0 -37
- package/dist/datetime.js.map +0 -1
- package/dist/dictionary.d.ts +0 -9
- package/dist/dictionary.d.ts.map +0 -1
- package/dist/dictionary.js +0 -45
- package/dist/dictionary.js.map +0 -1
- package/dist/format.d.ts +0 -2
- package/dist/format.d.ts.map +0 -1
- package/dist/format.js +0 -7
- package/dist/format.js.map +0 -1
- package/dist/group-by.d.ts +0 -9
- package/dist/group-by.d.ts.map +0 -1
- package/dist/group-by.js +0 -66
- package/dist/group-by.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/is-object.d.ts +0 -13
- package/dist/is-object.d.ts.map +0 -1
- package/dist/is-object.js +0 -25
- package/dist/is-object.js.map +0 -1
- package/dist/map.d.ts +0 -23
- package/dist/map.d.ts.map +0 -1
- package/dist/map.js +0 -76
- package/dist/map.js.map +0 -1
- package/dist/omit.d.ts +0 -5
- package/dist/omit.d.ts.map +0 -1
- package/dist/omit.js +0 -11
- package/dist/omit.js.map +0 -1
- package/dist/pagination.d.ts +0 -7
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js +0 -14
- package/dist/pagination.js.map +0 -1
- package/dist/random.d.ts +0 -11
- package/dist/random.d.ts.map +0 -1
- package/dist/random.js +0 -56
- package/dist/random.js.map +0 -1
- package/dist/remove-secrets.d.ts +0 -12
- package/dist/remove-secrets.d.ts.map +0 -1
- package/dist/remove-secrets.js +0 -62
- package/dist/remove-secrets.js.map +0 -1
- package/dist/remove-undefined.d.ts +0 -10
- package/dist/remove-undefined.d.ts.map +0 -1
- package/dist/remove-undefined.js +0 -22
- package/dist/remove-undefined.js.map +0 -1
- package/dist/result.d.ts +0 -35
- package/dist/result.d.ts.map +0 -1
- package/dist/result.js +0 -120
- package/dist/result.js.map +0 -1
- package/dist/sort.d.ts +0 -18
- package/dist/sort.d.ts.map +0 -1
- package/dist/sort.js +0 -64
- package/dist/sort.js.map +0 -1
- package/dist/string-colors.d.ts +0 -45
- package/dist/string-colors.d.ts.map +0 -1
- package/dist/string-colors.js +0 -73
- package/dist/string-colors.js.map +0 -1
- package/dist/string.d.ts +0 -162
- package/dist/string.d.ts.map +0 -1
- package/dist/string.js +0 -434
- package/dist/string.js.map +0 -1
- package/dist/types.d.ts +0 -98
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -57
- package/dist/types.js.map +0 -1
- package/dist/uniq.d.ts +0 -2
- package/dist/uniq.d.ts.map +0 -1
- package/dist/uniq.js +0 -16
- package/dist/uniq.js.map +0 -1
- package/dist/zod-excel.decoders.d.ts +0 -162
- package/dist/zod-excel.decoders.d.ts.map +0 -1
- package/dist/zod-excel.decoders.js +0 -361
- package/dist/zod-excel.decoders.js.map +0 -1
- package/dist/zod.d.ts +0 -30
- package/dist/zod.d.ts.map +0 -1
- package/dist/zod.js +0 -56
- package/dist/zod.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CapitalizedKeys, ColorFn, CompareFn, Conjugated, Debrand, DeepPartial, DefaultMap$1 as DefaultMap, Dictionary, Direction, Exact, ExhaustiveSwitchCheck$1 as ExhaustiveSwitchCheck, Getter, NestedMap$1 as NestedMap, NonEmptyArray, Optional, Page, Prettify, Result$1 as Result, SerializedResult, Transformer, TypedError, TypedMapping$1 as TypedMapping, UncapitalizeObjectKeys, UncapitalizedKeys, UnionOmit, UnionPick, XOR, addAndSort$1 as addAndSort, assertArray$1 as assertArray, assertType$1 as assertType, blue$1 as blue, bold$1 as bold, booleanCode$1 as booleanCode, capitalize$1 as capitalize, capitalizeKeys$1 as capitalizeKeys, commentLines$1 as commentLines, compare$1 as compare, compareBooleans$1 as compareBooleans, compareDates$1 as compareDates, compareFields$1 as compareFields, compareNumbers$1 as compareNumbers, compareStrings$1 as compareStrings, compareValues$1 as compareValues, conjugateNames$1 as conjugateNames, cyan$1 as cyan, dictGetAndAssert$1 as dictGetAndAssert, ensureUnique$1 as ensureUnique, equals$1 as equals, err$1 as err, excelBigIntDecoder$1 as excelBigIntDecoder, excelBigIntNullableDecoder$1 as excelBigIntNullableDecoder, excelBigIntStrictDecoder$1 as excelBigIntStrictDecoder, excelBooleanDecoder$1 as excelBooleanDecoder, excelBooleanNullableDecoder$1 as excelBooleanNullableDecoder, excelBooleanStrictDecoder$1 as excelBooleanStrictDecoder, excelDateDecoder$1 as excelDateDecoder, excelDateNullableDecoder$1 as excelDateNullableDecoder, excelIntDecoder$1 as excelIntDecoder, excelIntNullableDecoder$1 as excelIntNullableDecoder, excelIntStrictDecoder$1 as excelIntStrictDecoder, excelNumberDecoder$1 as excelNumberDecoder, excelNumberNullableDecoder$1 as excelNumberNullableDecoder, excelNumberStrictDecoder$1 as excelNumberStrictDecoder, excelStringDecoder$1 as excelStringDecoder, excelStringNullableDecoder$1 as excelStringNullableDecoder, excelStringStrictDecoder$1 as excelStringStrictDecoder, filterDict$1 as filterDict, filterMap$1 as filterMap, format$1 as format, generateRandomAlphanumericString$1 as generateRandomAlphanumericString, gray$1 as gray, green$1 as green, groupBy$1 as groupBy, groupByCurried$1 as groupByCurried, groupByToDict$1 as groupByToDict, groupByToMap$1 as groupByToMap, idToDict$1 as idToDict, inverse$1 as inverse, isCamelCase$1 as isCamelCase, isDate$1 as isDate, isKebabCase$1 as isKebabCase, isPascalCase$1 as isPascalCase, isPlural$1 as isPlural, isSlug$1 as isSlug, isSnakeCase$1 as isSnakeCase, italic$1 as italic, keyGetter$1 as keyGetter, lowerFirst$1 as lowerFirst, mapDict$1 as mapDict, mapGetAndAssert$1 as mapGetAndAssert, mapLimit$1 as mapLimit, mapMap$1 as mapMap, mapMapKeyValues$1 as mapMapKeyValues, mapMapKeys$1 as mapMapKeys, mapMapValues$1 as mapMapValues, mapToDict$1 as mapToDict, ok$1 as ok, omit$1 as omit, pipeZodTransformers$1 as pipeZodTransformers, pluralize$1 as pluralize, randomInt$1 as randomInt, red$1 as red, removeSecrets$1 as removeSecrets, removeUndefinedProperties$1 as removeUndefinedProperties, setDirection$1 as setDirection, slice$1 as slice, slugify$1 as slugify, sort$1 as sort, timeStamp$1 as timeStamp, toCamelCase$1 as toCamelCase, toDict$1 as toDict, toExcelColumnName$1 as toExcelColumnName, toExcelTableName$1 as toExcelTableName, toHumanReadable$1 as toHumanReadable, toKebabCase$1 as toKebabCase, toPascalCase$1 as toPascalCase, toSnakeCase$1 as toSnakeCase, uncapitalize$1 as uncapitalize, uncapitalizeKeys$1 as uncapitalizeKeys, underline$1 as underline, unionErrorMessage$1 as unionErrorMessage, uniq$1 as uniq, upperFirst$1 as upperFirst, yellow$1 as yellow } from "./zod-excel.decoders-CtmUu_Yj.js";
|
|
2
|
+
export { CapitalizedKeys, ColorFn, CompareFn, Conjugated, Debrand, DeepPartial, DefaultMap, Dictionary, Direction, Exact, ExhaustiveSwitchCheck, Getter, NestedMap, NonEmptyArray, Optional, Page, Prettify, Result, SerializedResult, Transformer, TypedError, TypedMapping, UncapitalizeObjectKeys, UncapitalizedKeys, UnionOmit, UnionPick, XOR, addAndSort, assertArray, assertType, blue, bold, booleanCode, capitalize, capitalizeKeys, commentLines, compare, compareBooleans, compareDates, compareFields, compareNumbers, compareStrings, compareValues, conjugateNames, cyan, dictGetAndAssert, ensureUnique, equals, err, excelBigIntDecoder, excelBigIntNullableDecoder, excelBigIntStrictDecoder, excelBooleanDecoder, excelBooleanNullableDecoder, excelBooleanStrictDecoder, excelDateDecoder, excelDateNullableDecoder, excelIntDecoder, excelIntNullableDecoder, excelIntStrictDecoder, excelNumberDecoder, excelNumberNullableDecoder, excelNumberStrictDecoder, excelStringDecoder, excelStringNullableDecoder, excelStringStrictDecoder, filterDict, filterMap, format, generateRandomAlphanumericString, gray, green, groupBy, groupByCurried, groupByToDict, groupByToMap, idToDict, inverse, isCamelCase, isDate, isKebabCase, isPascalCase, isPlural, isSlug, isSnakeCase, italic, keyGetter, lowerFirst, mapDict, mapGetAndAssert, mapLimit, mapMap, mapMapKeyValues, mapMapKeys, mapMapValues, mapToDict, ok, omit, pipeZodTransformers, pluralize, randomInt, red, removeSecrets, removeUndefinedProperties, setDirection, slice, slugify, sort, timeStamp, toCamelCase, toDict, toExcelColumnName, toExcelTableName, toHumanReadable, toKebabCase, toPascalCase, toSnakeCase, uncapitalize, uncapitalizeKeys, underline, unionErrorMessage, uniq, upperFirst, yellow };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefaultMap, ExhaustiveSwitchCheck, NestedMap, Result, TypedMapping, addAndSort, assertArray, assertType, blue, bold, booleanCode, capitalize, capitalizeKeys, commentLines, compare, compareBooleans, compareDates, compareFields, compareNumbers, compareStrings, compareValues, conjugateNames, cyan, dictGetAndAssert, ensureUnique, equals, err, excelBigIntDecoder, excelBigIntNullableDecoder, excelBigIntStrictDecoder, excelBooleanDecoder, excelBooleanNullableDecoder, excelBooleanStrictDecoder, excelDateDecoder, excelDateNullableDecoder, excelIntDecoder, excelIntNullableDecoder, excelIntStrictDecoder, excelNumberDecoder, excelNumberNullableDecoder, excelNumberStrictDecoder, excelStringDecoder, excelStringNullableDecoder, excelStringStrictDecoder, filterDict, filterMap, format, generateRandomAlphanumericString, gray, green, groupBy, groupByCurried, groupByToDict, groupByToMap, idToDict, inverse, isCamelCase, isDate, isKebabCase, isPascalCase, isPlural, isSlug, isSnakeCase, italic, keyGetter, lowerFirst, mapDict, mapGetAndAssert, mapLimit, mapMap, mapMapKeyValues, mapMapKeys, mapMapValues, mapToDict, ok, omit, pipeZodTransformers, pluralize, randomInt, red, removeSecrets, removeUndefinedProperties, setDirection, slice, slugify, sort, timeStamp, toCamelCase, toDict, toExcelColumnName, toExcelTableName, toHumanReadable, toKebabCase, toPascalCase, toSnakeCase, uncapitalize, uncapitalizeKeys, underline, unionErrorMessage, uniq, upperFirst, yellow } from "./zod-excel.decoders-CiKlp4ZC.js";
|
|
2
|
+
|
|
3
|
+
export { DefaultMap, ExhaustiveSwitchCheck, NestedMap, Result, TypedMapping, addAndSort, assertArray, assertType, blue, bold, booleanCode, capitalize, capitalizeKeys, commentLines, compare, compareBooleans, compareDates, compareFields, compareNumbers, compareStrings, compareValues, conjugateNames, cyan, dictGetAndAssert, ensureUnique, equals, err, excelBigIntDecoder, excelBigIntNullableDecoder, excelBigIntStrictDecoder, excelBooleanDecoder, excelBooleanNullableDecoder, excelBooleanStrictDecoder, excelDateDecoder, excelDateNullableDecoder, excelIntDecoder, excelIntNullableDecoder, excelIntStrictDecoder, excelNumberDecoder, excelNumberNullableDecoder, excelNumberStrictDecoder, excelStringDecoder, excelStringNullableDecoder, excelStringStrictDecoder, filterDict, filterMap, format, generateRandomAlphanumericString, gray, green, groupBy, groupByCurried, groupByToDict, groupByToMap, idToDict, inverse, isCamelCase, isDate, isKebabCase, isPascalCase, isPlural, isSlug, isSnakeCase, italic, keyGetter, lowerFirst, mapDict, mapGetAndAssert, mapLimit, mapMap, mapMapKeyValues, mapMapKeys, mapMapValues, mapToDict, ok, omit, pipeZodTransformers, pluralize, randomInt, red, removeSecrets, removeUndefinedProperties, setDirection, slice, slugify, sort, timeStamp, toCamelCase, toDict, toExcelColumnName, toExcelTableName, toHumanReadable, toKebabCase, toPascalCase, toSnakeCase, uncapitalize, uncapitalizeKeys, underline, unionErrorMessage, uniq, upperFirst, yellow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
-
export * from './uniq';
|
|
24
|
-
export * from './zod';
|
|
25
|
-
export * from './zod-excel.decoders';
|
|
1
|
+
import { CapitalizedKeys, ColorFn, CompareFn, Conjugated, Debrand, DeepPartial, DefaultMap$1 as DefaultMap, Dictionary, Direction, Exact, ExhaustiveSwitchCheck$1 as ExhaustiveSwitchCheck, Getter, NestedMap$1 as NestedMap, NonEmptyArray, Optional, Page, Prettify, Result$1 as Result, SerializedResult, Transformer, TypedError, TypedMapping$1 as TypedMapping, UncapitalizeObjectKeys, UncapitalizedKeys, UnionOmit, UnionPick, XOR, addAndSort$1 as addAndSort, assertArray$1 as assertArray, assertType$1 as assertType, blue$1 as blue, bold$1 as bold, booleanCode$1 as booleanCode, capitalize$1 as capitalize, capitalizeKeys$1 as capitalizeKeys, commentLines$1 as commentLines, compare$1 as compare, compareBooleans$1 as compareBooleans, compareDates$1 as compareDates, compareFields$1 as compareFields, compareNumbers$1 as compareNumbers, compareStrings$1 as compareStrings, compareValues$1 as compareValues, conjugateNames$1 as conjugateNames, cyan$1 as cyan, dictGetAndAssert$1 as dictGetAndAssert, ensureUnique$1 as ensureUnique, equals$1 as equals, err$1 as err, excelBigIntDecoder$1 as excelBigIntDecoder, excelBigIntNullableDecoder$1 as excelBigIntNullableDecoder, excelBigIntStrictDecoder$1 as excelBigIntStrictDecoder, excelBooleanDecoder$1 as excelBooleanDecoder, excelBooleanNullableDecoder$1 as excelBooleanNullableDecoder, excelBooleanStrictDecoder$1 as excelBooleanStrictDecoder, excelDateDecoder$1 as excelDateDecoder, excelDateNullableDecoder$1 as excelDateNullableDecoder, excelIntDecoder$1 as excelIntDecoder, excelIntNullableDecoder$1 as excelIntNullableDecoder, excelIntStrictDecoder$1 as excelIntStrictDecoder, excelNumberDecoder$1 as excelNumberDecoder, excelNumberNullableDecoder$1 as excelNumberNullableDecoder, excelNumberStrictDecoder$1 as excelNumberStrictDecoder, excelStringDecoder$1 as excelStringDecoder, excelStringNullableDecoder$1 as excelStringNullableDecoder, excelStringStrictDecoder$1 as excelStringStrictDecoder, filterDict$1 as filterDict, filterMap$1 as filterMap, format$1 as format, generateRandomAlphanumericString$1 as generateRandomAlphanumericString, gray$1 as gray, green$1 as green, groupBy$1 as groupBy, groupByCurried$1 as groupByCurried, groupByToDict$1 as groupByToDict, groupByToMap$1 as groupByToMap, idToDict$1 as idToDict, inverse$1 as inverse, isCamelCase$1 as isCamelCase, isDate$1 as isDate, isKebabCase$1 as isKebabCase, isPascalCase$1 as isPascalCase, isPlural$1 as isPlural, isSlug$1 as isSlug, isSnakeCase$1 as isSnakeCase, italic$1 as italic, keyGetter$1 as keyGetter, lowerFirst$1 as lowerFirst, mapDict$1 as mapDict, mapGetAndAssert$1 as mapGetAndAssert, mapLimit$1 as mapLimit, mapMap$1 as mapMap, mapMapKeyValues$1 as mapMapKeyValues, mapMapKeys$1 as mapMapKeys, mapMapValues$1 as mapMapValues, mapToDict$1 as mapToDict, ok$1 as ok, omit$1 as omit, pipeZodTransformers$1 as pipeZodTransformers, pluralize$1 as pluralize, randomInt$1 as randomInt, red$1 as red, removeSecrets$1 as removeSecrets, removeUndefinedProperties$1 as removeUndefinedProperties, setDirection$1 as setDirection, slice$1 as slice, slugify$1 as slugify, sort$1 as sort, timeStamp$1 as timeStamp, toCamelCase$1 as toCamelCase, toDict$1 as toDict, toExcelColumnName$1 as toExcelColumnName, toExcelTableName$1 as toExcelTableName, toHumanReadable$1 as toHumanReadable, toKebabCase$1 as toKebabCase, toPascalCase$1 as toPascalCase, toSnakeCase$1 as toSnakeCase, uncapitalize$1 as uncapitalize, uncapitalizeKeys$1 as uncapitalizeKeys, underline$1 as underline, unionErrorMessage$1 as unionErrorMessage, uniq$1 as uniq, upperFirst$1 as upperFirst, yellow$1 as yellow } from "./zod-excel.decoders-CtmUu_Yj.js";
|
|
2
|
+
|
|
3
|
+
//#region src/check-port.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if a port is available.
|
|
6
|
+
*
|
|
7
|
+
* The `net` module from Node.js is imported dynamically so that bundlers used in
|
|
8
|
+
* browser environments (like Next.js) don't attempt to include it during
|
|
9
|
+
* static analysis.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Checks if a port is available.
|
|
13
|
+
*
|
|
14
|
+
* The `net` module from Node.js is imported dynamically so that bundlers used in
|
|
15
|
+
* browser environments (like Next.js) don't attempt to include it during
|
|
16
|
+
* static analysis.
|
|
17
|
+
*/
|
|
18
|
+
declare function checkPortAvailability(port: number, host?: string): Promise<boolean>;
|
|
19
|
+
declare const checkPort: typeof checkPortAvailability;
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { CapitalizedKeys, ColorFn, CompareFn, Conjugated, Debrand, DeepPartial, DefaultMap, Dictionary, Direction, Exact, ExhaustiveSwitchCheck, Getter, NestedMap, NonEmptyArray, Optional, Page, Prettify, Result, SerializedResult, Transformer, TypedError, TypedMapping, UncapitalizeObjectKeys, UncapitalizedKeys, UnionOmit, UnionPick, XOR, addAndSort, assertArray, assertType, blue, bold, booleanCode, capitalize, capitalizeKeys, checkPort, checkPortAvailability, commentLines, compare, compareBooleans, compareDates, compareFields, compareNumbers, compareStrings, compareValues, conjugateNames, cyan, dictGetAndAssert, ensureUnique, equals, err, excelBigIntDecoder, excelBigIntNullableDecoder, excelBigIntStrictDecoder, excelBooleanDecoder, excelBooleanNullableDecoder, excelBooleanStrictDecoder, excelDateDecoder, excelDateNullableDecoder, excelIntDecoder, excelIntNullableDecoder, excelIntStrictDecoder, excelNumberDecoder, excelNumberNullableDecoder, excelNumberStrictDecoder, excelStringDecoder, excelStringNullableDecoder, excelStringStrictDecoder, filterDict, filterMap, format, generateRandomAlphanumericString, gray, green, groupBy, groupByCurried, groupByToDict, groupByToMap, idToDict, inverse, isCamelCase, isDate, isKebabCase, isPascalCase, isPlural, isSlug, isSnakeCase, italic, keyGetter, lowerFirst, mapDict, mapGetAndAssert, mapLimit, mapMap, mapMapKeyValues, mapMapKeys, mapMapValues, mapToDict, ok, omit, pipeZodTransformers, pluralize, randomInt, red, removeSecrets, removeUndefinedProperties, setDirection, slice, slugify, sort, timeStamp, toCamelCase, toDict, toExcelColumnName, toExcelTableName, toHumanReadable, toKebabCase, toPascalCase, toSnakeCase, uncapitalize, uncapitalizeKeys, underline, unionErrorMessage, uniq, upperFirst, yellow };
|
|
26
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__exportStar(require("./string"), exports);
|
|
38
|
-
__exportStar(require("./types"), exports);
|
|
39
|
-
__exportStar(require("./uniq"), exports);
|
|
40
|
-
__exportStar(require("./zod"), exports);
|
|
41
|
-
__exportStar(require("./zod-excel.decoders"), exports);
|
|
1
|
+
import { DefaultMap, ExhaustiveSwitchCheck, NestedMap, Result, TypedMapping, addAndSort, assertArray, assertType, blue, bold, booleanCode, capitalize, capitalizeKeys, commentLines, compare, compareBooleans, compareDates, compareFields, compareNumbers, compareStrings, compareValues, conjugateNames, cyan, dictGetAndAssert, ensureUnique, equals, err, excelBigIntDecoder, excelBigIntNullableDecoder, excelBigIntStrictDecoder, excelBooleanDecoder, excelBooleanNullableDecoder, excelBooleanStrictDecoder, excelDateDecoder, excelDateNullableDecoder, excelIntDecoder, excelIntNullableDecoder, excelIntStrictDecoder, excelNumberDecoder, excelNumberNullableDecoder, excelNumberStrictDecoder, excelStringDecoder, excelStringNullableDecoder, excelStringStrictDecoder, filterDict, filterMap, format, generateRandomAlphanumericString, gray, green, groupBy, groupByCurried, groupByToDict, groupByToMap, idToDict, inverse, isCamelCase, isDate, isKebabCase, isPascalCase, isPlural, isSlug, isSnakeCase, italic, keyGetter, lowerFirst, mapDict, mapGetAndAssert, mapLimit, mapMap, mapMapKeyValues, mapMapKeys, mapMapValues, mapToDict, ok, omit, pipeZodTransformers, pluralize, randomInt, red, removeSecrets, removeUndefinedProperties, setDirection, slice, slugify, sort, timeStamp, toCamelCase, toDict, toExcelColumnName, toExcelTableName, toHumanReadable, toKebabCase, toPascalCase, toSnakeCase, uncapitalize, uncapitalizeKeys, underline, unionErrorMessage, uniq, upperFirst, yellow } from "./zod-excel.decoders-CiKlp4ZC.js";
|
|
2
|
+
|
|
3
|
+
//#region src/check-port.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if a port is available.
|
|
6
|
+
*
|
|
7
|
+
* The `net` module from Node.js is imported dynamically so that bundlers used in
|
|
8
|
+
* browser environments (like Next.js) don't attempt to include it during
|
|
9
|
+
* static analysis.
|
|
10
|
+
*/
|
|
11
|
+
async function checkPortAvailability(port, host = "127.0.0.1") {
|
|
12
|
+
try {
|
|
13
|
+
const net = await import("net");
|
|
14
|
+
return new Promise((resolve) => {
|
|
15
|
+
const tester = net.createConnection({
|
|
16
|
+
port,
|
|
17
|
+
host
|
|
18
|
+
}, () => {
|
|
19
|
+
tester.destroy();
|
|
20
|
+
resolve(false);
|
|
21
|
+
});
|
|
22
|
+
tester.on("error", () => {
|
|
23
|
+
resolve(true);
|
|
24
|
+
});
|
|
25
|
+
tester.on("close", () => {
|
|
26
|
+
resolve(false);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
} catch {
|
|
30
|
+
throw new Error("checkPortAvailability is only available in a Node.js environment");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const checkPort = checkPortAvailability;
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { DefaultMap, ExhaustiveSwitchCheck, NestedMap, Result, TypedMapping, addAndSort, assertArray, assertType, blue, bold, booleanCode, capitalize, capitalizeKeys, checkPort, checkPortAvailability, commentLines, compare, compareBooleans, compareDates, compareFields, compareNumbers, compareStrings, compareValues, conjugateNames, cyan, dictGetAndAssert, ensureUnique, equals, err, excelBigIntDecoder, excelBigIntNullableDecoder, excelBigIntStrictDecoder, excelBooleanDecoder, excelBooleanNullableDecoder, excelBooleanStrictDecoder, excelDateDecoder, excelDateNullableDecoder, excelIntDecoder, excelIntNullableDecoder, excelIntStrictDecoder, excelNumberDecoder, excelNumberNullableDecoder, excelNumberStrictDecoder, excelStringDecoder, excelStringNullableDecoder, excelStringStrictDecoder, filterDict, filterMap, format, generateRandomAlphanumericString, gray, green, groupBy, groupByCurried, groupByToDict, groupByToMap, idToDict, inverse, isCamelCase, isDate, isKebabCase, isPascalCase, isPlural, isSlug, isSnakeCase, italic, keyGetter, lowerFirst, mapDict, mapGetAndAssert, mapLimit, mapMap, mapMapKeyValues, mapMapKeys, mapMapValues, mapToDict, ok, omit, pipeZodTransformers, pluralize, randomInt, red, removeSecrets, removeUndefinedProperties, setDirection, slice, slugify, sort, timeStamp, toCamelCase, toDict, toExcelColumnName, toExcelTableName, toHumanReadable, toKebabCase, toPascalCase, toSnakeCase, uncapitalize, uncapitalizeKeys, underline, unionErrorMessage, uniq, upperFirst, yellow };
|
|
42
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["port: number"],"sources":["../src/check-port.ts"],"sourcesContent":["/**\n * Checks if a port is available.\n *\n * The `net` module from Node.js is imported dynamically so that bundlers used in\n * browser environments (like Next.js) don't attempt to include it during\n * static analysis.\n */\nexport async function checkPortAvailability(port: number, host = '127.0.0.1'): Promise<boolean> {\n // Dynamically import `net` only when this function is executed in a Node.js\n // environment. This prevents tools like Next.js from trying to bundle the\n // `net` module when other utilities from this package are imported in the\n // browser.\n try {\n const net = await import('net')\n\n return new Promise((resolve) => {\n const tester = net.createConnection({ port, host }, () => {\n // Port can be connected to, so something is listening on it\n tester.destroy()\n resolve(false)\n })\n // Port cannot be connected to, so it is available\n tester.on('error', () => {\n resolve(true)\n })\n // Port is available\n tester.on('close', () => {\n resolve(false)\n })\n })\n } catch {\n throw new Error('checkPortAvailability is only available in a Node.js environment')\n }\n}\n\n// Backwards compatibility alias\nexport const checkPort = checkPortAvailability\n"],"mappings":";;;;;;;;;;AAOA,eAAsB,sBAAsBA,MAAc,OAAO,aAA+B;AAK9F,KAAI;EACF,MAAM,MAAM,MAAM,OAAO;AAEzB,SAAO,IAAI,QAAQ,CAAC,YAAY;GAC9B,MAAM,SAAS,IAAI,iBAAiB;IAAE;IAAM;GAAM,GAAE,MAAM;AAExD,WAAO,SAAS;AAChB,YAAQ,MAAM;GACf,EAAC;AAEF,UAAO,GAAG,SAAS,MAAM;AACvB,YAAQ,KAAK;GACd,EAAC;AAEF,UAAO,GAAG,SAAS,MAAM;AACvB,YAAQ,MAAM;GACf,EAAC;EACH;CACF,QAAO;AACN,QAAM,IAAI,MAAM;CACjB;AACF;AAGD,MAAa,YAAY"}
|