@punks/backend-core 0.0.71 → 0.0.74
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/cjs/index.js +72 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/logging/utils.d.ts +1 -1
- package/dist/cjs/types/utils/connection/index.d.ts +15 -0
- package/dist/cjs/types/utils/index.d.ts +2 -0
- package/dist/cjs/types/utils/strings.d.ts +1 -0
- package/dist/cjs/types/utils/variables/index.d.ts +1 -0
- package/dist/esm/index.js +70 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/logging/utils.d.ts +1 -1
- package/dist/esm/types/utils/connection/index.d.ts +15 -0
- package/dist/esm/types/utils/index.d.ts +2 -0
- package/dist/esm/types/utils/strings.d.ts +1 -0
- package/dist/esm/types/utils/variables/index.d.ts +1 -0
- package/dist/index.d.ts +20 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LogLevel } from "../abstractions";
|
|
2
|
-
export declare const getLevelValue: (level: LogLevel) => 1 | 0 | 2 |
|
|
2
|
+
export declare const getLevelValue: (level: LogLevel) => 1 | 0 | 2 | 4 | 3;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const testInternetConnection: (options?: {
|
|
2
|
+
healthCheckUrls?: string[];
|
|
3
|
+
}) => Promise<{
|
|
4
|
+
status: string;
|
|
5
|
+
details?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
status: string;
|
|
8
|
+
details: ({
|
|
9
|
+
status: string;
|
|
10
|
+
message?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
status: string;
|
|
13
|
+
message: any;
|
|
14
|
+
})[];
|
|
15
|
+
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from "./array";
|
|
2
|
+
export { testInternetConnection } from "./connection";
|
|
2
3
|
export { addTime, subtractTime, floorDateToSecond, TimeUnit } from "./dates";
|
|
3
4
|
export { CsvColumnDefinition, CsvBuildOptions, csvBuild, csvParse } from "./csv";
|
|
4
5
|
export { getDirectoryFilePaths } from "./files";
|
|
5
6
|
export { joinPath, splitPath, ensureDirectory, getDirectoryPath, createDayPath, } from "./paths";
|
|
6
7
|
export * from "./strings";
|
|
7
8
|
export * from "./objects";
|
|
9
|
+
export { maskVariable } from "./variables";
|
|
8
10
|
export * from "./text";
|
|
9
11
|
export * from "./threading";
|
|
10
12
|
export { buildTree, TreeNodeBuilder } from "./trees";
|
|
@@ -7,3 +7,4 @@ export declare const toCamelCase: (str: string) => string;
|
|
|
7
7
|
export declare const toTitleCase: (str: string) => string;
|
|
8
8
|
export declare const ensureTailingSlash: (value: string) => string;
|
|
9
9
|
export declare const ensureStartSlash: (value: string) => string;
|
|
10
|
+
export declare const multipleSplit: (str: string, separators: string[]) => string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const maskVariable: (value: string | undefined, unmaskedLength?: number) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -176,6 +176,22 @@ declare const iterate: <T>(values: T[], action: (item: T, next?: T | undefined,
|
|
|
176
176
|
declare const groupBy: <TKey, TValue>(values: TValue[], keySelector: (value: TValue) => TKey) => Map<TKey, TValue[]>;
|
|
177
177
|
declare const subArrays: <T>(array1: T[], array2: T[], eqFn: (a: T, b: T) => boolean) => T[];
|
|
178
178
|
|
|
179
|
+
declare const testInternetConnection: (options?: {
|
|
180
|
+
healthCheckUrls?: string[];
|
|
181
|
+
}) => Promise<{
|
|
182
|
+
status: string;
|
|
183
|
+
details?: undefined;
|
|
184
|
+
} | {
|
|
185
|
+
status: string;
|
|
186
|
+
details: ({
|
|
187
|
+
status: string;
|
|
188
|
+
message?: undefined;
|
|
189
|
+
} | {
|
|
190
|
+
status: string;
|
|
191
|
+
message: any;
|
|
192
|
+
})[];
|
|
193
|
+
}>;
|
|
194
|
+
|
|
179
195
|
type TimeUnit = "years" | "months" | "days" | "hours" | "minutes" | "seconds" | "milliseconds";
|
|
180
196
|
declare const addTime: (date: Date, offset: {
|
|
181
197
|
value: number;
|
|
@@ -216,6 +232,7 @@ declare const toCamelCase: (str: string) => string;
|
|
|
216
232
|
declare const toTitleCase: (str: string) => string;
|
|
217
233
|
declare const ensureTailingSlash: (value: string) => string;
|
|
218
234
|
declare const ensureStartSlash: (value: string) => string;
|
|
235
|
+
declare const multipleSplit: (str: string, separators: string[]) => string[];
|
|
219
236
|
|
|
220
237
|
declare const removeUndefinedProps: <T extends Record<string, any>>(obj: T, options?: {
|
|
221
238
|
recursive?: boolean;
|
|
@@ -234,6 +251,8 @@ declare const jsonSerialize: (obj: any, options?: {
|
|
|
234
251
|
prettify?: boolean;
|
|
235
252
|
}) => string;
|
|
236
253
|
|
|
254
|
+
declare const maskVariable: (value: string | undefined, unmaskedLength?: number) => string;
|
|
255
|
+
|
|
237
256
|
declare const pluralize: (word: string) => string;
|
|
238
257
|
|
|
239
258
|
declare function sleep(ms: number): Promise<unknown>;
|
|
@@ -290,4 +309,4 @@ type ExcelParseOptions = {
|
|
|
290
309
|
};
|
|
291
310
|
declare const excelParse: (file: string | ArrayBuffer, options?: ExcelParseOptions) => any[];
|
|
292
311
|
|
|
293
|
-
export { AppServiceReference, ConsoleLogger, CsvBuildOptions, CsvColumnDefinition, DatadogLogger, Dict, ExcelColumnDefinition, ExcelKeyTransform, ExcelParseOptions, ExcelSheetDefinition, FileLogger, ILogger, ILoggerProvider, IResolveServiceOptions, IServiceLocator, ITree, ITreeNode, LocalizedField, Log, LogLevel, MetaSerializationType, Optional, RichText, TimeUnit, TreeNodeBuilder, addTime, buildObject, buildTree, buildUrl, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, deserializeQueryString, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, floorDateToSecond, getDirectoryFilePaths, getDirectoryPath, getQueryParameter, groupBy, indexes, isNullOrUndefined, iterate, joinPath, joinUrl, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapAsync, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, serializeQueryString, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim, trimEnd, trimStart, updateQueryParameters };
|
|
312
|
+
export { AppServiceReference, ConsoleLogger, CsvBuildOptions, CsvColumnDefinition, DatadogLogger, Dict, ExcelColumnDefinition, ExcelKeyTransform, ExcelParseOptions, ExcelSheetDefinition, FileLogger, ILogger, ILoggerProvider, IResolveServiceOptions, IServiceLocator, ITree, ITreeNode, LocalizedField, Log, LogLevel, MetaSerializationType, Optional, RichText, TimeUnit, TreeNodeBuilder, addTime, buildObject, buildTree, buildUrl, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, deserializeQueryString, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, floorDateToSecond, getDirectoryFilePaths, getDirectoryPath, getQueryParameter, groupBy, indexes, isNullOrUndefined, iterate, joinPath, joinUrl, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapAsync, mapOrThrow, maskVariable, mergeDeep, multipleSplit, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, serializeQueryString, sleep, sort, splitPath, subArrays, subtractTime, testInternetConnection, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim, trimEnd, trimStart, updateQueryParameters };
|