@punks/backend-core 0.0.73 → 0.0.75

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.
@@ -1,2 +1,2 @@
1
1
  import { LogLevel } from "../abstractions";
2
- export declare const getLevelValue: (level: LogLevel) => 1 | 0 | 2 | 3 | 4;
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";
@@ -0,0 +1 @@
1
+ export declare const maskVariable: (value: string | undefined, unmaskedLength?: number) => string;
@@ -22,4 +22,4 @@ export type ExcelParseOptions = {
22
22
  sheetIndex?: number;
23
23
  dateColumns?: string[];
24
24
  };
25
- export declare const excelParse: (file: string | ArrayBuffer, options?: ExcelParseOptions) => any[];
25
+ export declare const excelParse: (file: string | ArrayBuffer, options?: ExcelParseOptions) => any;
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;
@@ -235,6 +251,8 @@ declare const jsonSerialize: (obj: any, options?: {
235
251
  prettify?: boolean;
236
252
  }) => string;
237
253
 
254
+ declare const maskVariable: (value: string | undefined, unmaskedLength?: number) => string;
255
+
238
256
  declare const pluralize: (word: string) => string;
239
257
 
240
258
  declare function sleep(ms: number): Promise<unknown>;
@@ -289,6 +307,6 @@ type ExcelParseOptions = {
289
307
  sheetIndex?: number;
290
308
  dateColumns?: string[];
291
309
  };
292
- declare const excelParse: (file: string | ArrayBuffer, options?: ExcelParseOptions) => any[];
310
+ declare const excelParse: (file: string | ArrayBuffer, options?: ExcelParseOptions) => any;
293
311
 
294
- 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, multipleSplit, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/backend-core",
3
- "version": "0.0.73",
3
+ "version": "0.0.75",
4
4
  "description": "WebPunks Backend Core",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",