@bitblit/ratchet-common 4.0.165-alpha → 4.0.183-alpha
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/lib/index.mjs +1 -1
- package/package.json +2 -16
- package/lib/2d/line-2d.d.ts +0 -5
- package/lib/2d/plane-2d.d.ts +0 -6
- package/lib/2d/point-2d.d.ts +0 -4
- package/lib/2d/poly-line-2d.d.ts +0 -4
- package/lib/2d/ratchet-2d.d.ts +0 -37
- package/lib/2d/ratchet-2d.spec.d.ts +0 -1
- package/lib/build/build-information.d.ts +0 -8
- package/lib/build/ratchet-common-info.d.ts +0 -5
- package/lib/histogram/histogram-entry.d.ts +0 -4
- package/lib/histogram/histogram.d.ts +0 -12
- package/lib/histogram/histogram.spec.d.ts +0 -1
- package/lib/jwt/common-jwt-token.d.ts +0 -6
- package/lib/jwt/expired-jwt-handling.d.ts +0 -5
- package/lib/jwt/jwt-ratchet-like.d.ts +0 -15
- package/lib/jwt/jwt-ratchet.d.ts +0 -30
- package/lib/jwt/jwt-ratchet.spec.d.ts +0 -1
- package/lib/jwt/jwt-token-base.d.ts +0 -9
- package/lib/lang/array-ratchet.d.ts +0 -14
- package/lib/lang/array-ratchet.spec.d.ts +0 -1
- package/lib/lang/base64-ratchet.d.ts +0 -10
- package/lib/lang/base64-ratchet.spec.d.ts +0 -1
- package/lib/lang/boolean-ratchet.d.ts +0 -7
- package/lib/lang/boolean-ratchet.spec.d.ts +0 -1
- package/lib/lang/composite-last-success-provider.d.ts +0 -7
- package/lib/lang/composite-last-success-provider.spec.d.ts +0 -1
- package/lib/lang/date-ratchet.d.ts +0 -11
- package/lib/lang/date-ratchet.spec.d.ts +0 -1
- package/lib/lang/duration-ratchet.d.ts +0 -7
- package/lib/lang/duration-ratchet.spec.d.ts +0 -1
- package/lib/lang/enum-ratchet.d.ts +0 -5
- package/lib/lang/enum-ratchet.spec.d.ts +0 -5
- package/lib/lang/error-ratchet.d.ts +0 -6
- package/lib/lang/error-ratchet.spec.d.ts +0 -1
- package/lib/lang/esm-ratchet.d.ts +0 -4
- package/lib/lang/expiring-object.d.ts +0 -20
- package/lib/lang/expiring-object.spec.d.ts +0 -1
- package/lib/lang/geolocation-ratchet.d.ts +0 -40
- package/lib/lang/geolocation-ratchet.spec.d.ts +0 -1
- package/lib/lang/global-ratchet.d.ts +0 -6
- package/lib/lang/global-ratchet.spec.d.ts +0 -1
- package/lib/lang/key-value.d.ts +0 -4
- package/lib/lang/last-success-provider.d.ts +0 -3
- package/lib/lang/map-ratchet.d.ts +0 -15
- package/lib/lang/map-ratchet.spec.d.ts +0 -1
- package/lib/lang/no.d.ts +0 -3
- package/lib/lang/no.spec.d.ts +0 -1
- package/lib/lang/number-ratchet.d.ts +0 -20
- package/lib/lang/number-ratchet.spec.d.ts +0 -1
- package/lib/lang/parsed-url.d.ts +0 -10
- package/lib/lang/promise-ratchet.d.ts +0 -18
- package/lib/lang/promise-ratchet.spec.d.ts +0 -1
- package/lib/lang/require-ratchet.d.ts +0 -11
- package/lib/lang/require-ratchet.spec.d.ts +0 -3
- package/lib/lang/stop-watch.d.ts +0 -17
- package/lib/lang/string-ratchet.d.ts +0 -28
- package/lib/lang/string-ratchet.spec.d.ts +0 -1
- package/lib/lang/time-zone-ratchet.d.ts +0 -19
- package/lib/lang/time-zone-ratchet.spec.d.ts +0 -1
- package/lib/lang/timeout-token.d.ts +0 -9
- package/lib/lang/timeout-token.spec.d.ts +0 -1
- package/lib/logger/classic-single-line-log-message-formatter.d.ts +0 -6
- package/lib/logger/log-message-builder.d.ts +0 -14
- package/lib/logger/log-message-format-type.d.ts +0 -5
- package/lib/logger/log-message-formatter.d.ts +0 -5
- package/lib/logger/log-message-processor.d.ts +0 -5
- package/lib/logger/log-message.d.ts +0 -8
- package/lib/logger/log-snapshot.d.ts +0 -5
- package/lib/logger/logger-instance.d.ts +0 -46
- package/lib/logger/logger-level-name.d.ts +0 -8
- package/lib/logger/logger-meta.d.ts +0 -6
- package/lib/logger/logger-options.d.ts +0 -13
- package/lib/logger/logger-output-function.d.ts +0 -5
- package/lib/logger/logger-ring-buffer.d.ts +0 -18
- package/lib/logger/logger-util.d.ts +0 -8
- package/lib/logger/logger-util.spec.d.ts +0 -1
- package/lib/logger/logger.d.ts +0 -43
- package/lib/logger/logger.spec.d.ts +0 -1
- package/lib/logger/none-log-message-formatter.d.ts +0 -6
- package/lib/logger/structured-json-log-message-formatter.d.ts +0 -6
- package/lib/network/browser-local-ip-provider.d.ts +0 -7
- package/lib/network/browser-local-ip-provider.spec.d.ts +0 -1
- package/lib/network/fixed-local-ip-provider.d.ts +0 -6
- package/lib/network/local-ip-provider.d.ts +0 -3
- package/lib/network/network-ratchet.d.ts +0 -9
- package/lib/network/network-ratchet.spec.d.ts +0 -1
- package/lib/stream/buffer-writable.d.ts +0 -9
- package/lib/stream/multi-stream.d.ts +0 -7
- package/lib/stream/stream-ratchet.d.ts +0 -12
- package/lib/stream/stream-ratchet.spec.d.ts +0 -1
- package/lib/stream/string-writable.d.ts +0 -8
- package/lib/stream/string-writable.spec.d.ts +0 -1
- package/lib/template/ratchet-template-renderer.d.ts +0 -4
- package/lib/third-party/google/google-recaptcha-ratchet.d.ts +0 -4
- package/lib/third-party/google/google-recaptcha-ratchet.spec.d.ts +0 -1
- package/lib/third-party/twilio/twilio-ratchet.d.ts +0 -11
- package/lib/transform/built-in-transforms.d.ts +0 -18
- package/lib/transform/transform-ratchet.d.ts +0 -7
- package/lib/transform/transform-ratchet.spec.d.ts +0 -1
- package/lib/transform/transform-rule.d.ts +0 -3
- package/lib/tx/transaction-configuration.d.ts +0 -7
- package/lib/tx/transaction-final-state.d.ts +0 -5
- package/lib/tx/transaction-ratchet.d.ts +0 -6
- package/lib/tx/transaction-ratchet.spec.d.ts +0 -1
- package/lib/tx/transaction-result.d.ts +0 -9
- package/lib/tx/transaction-step.d.ts +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LoggerLevelName } from '../logger/logger-level-name.js';
|
|
2
|
-
export declare class ExpiringObject<T> {
|
|
3
|
-
private _config;
|
|
4
|
-
private _cacheObject;
|
|
5
|
-
private _lastUpdatedEpochMS;
|
|
6
|
-
private _timeRemainingMS;
|
|
7
|
-
constructor(inputConfig?: ExpiringObjectConfig<T>);
|
|
8
|
-
private defaultConfig;
|
|
9
|
-
private defaultTimeRemainingMS;
|
|
10
|
-
update(newValue: T, doNotUpdateClock?: boolean): void;
|
|
11
|
-
fetchCacheObjectTimeRemainingMS(): Promise<number>;
|
|
12
|
-
fetch(): Promise<T>;
|
|
13
|
-
}
|
|
14
|
-
export declare class ExpiringObjectConfig<T> {
|
|
15
|
-
timeToLiveMS?: number;
|
|
16
|
-
generator?: () => Promise<T>;
|
|
17
|
-
initialValue?: T;
|
|
18
|
-
logLevel?: LoggerLevelName;
|
|
19
|
-
overrideTimeRemainingMS?: (lastUpdatedEpochMS: number) => Promise<number>;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare class GeolocationRatchet {
|
|
2
|
-
private constructor();
|
|
3
|
-
static distanceBetweenLocations(lat1: number, lon1: number, lat2: number, lon2: number, unit?: string): number;
|
|
4
|
-
static distanceBetweenRatchetGeoLocations(loc1: RatchetGeoLocation, loc2: RatchetGeoLocation, unit?: string): number;
|
|
5
|
-
static degreeOfLatLngInMiles(latitudeInDecimalDegress?: number): number;
|
|
6
|
-
static milesInDegLatLng(miles: number, latitudeInDecimalDegress?: number): number;
|
|
7
|
-
static centerOfBounds(bounds: RatchetLocationBounds): RatchetGeoLocation;
|
|
8
|
-
private static calculateSplits;
|
|
9
|
-
static clusterGeoBounds(inputVal: RatchetLocationBounds[], latSlices?: number, lngSlices?: number): RatchetLocationBounds[];
|
|
10
|
-
static canonicalizeBounds(inp: RatchetLocationBounds, allowCrossover?: boolean): RatchetLocationBounds;
|
|
11
|
-
static combineBounds(inp: RatchetLocationBounds[]): RatchetLocationBounds;
|
|
12
|
-
static roundLocation(r: RatchetGeoLocation, roundDigits: number): RatchetGeoLocation;
|
|
13
|
-
static locationToBounds(loc: RatchetGeoLocation, radiusMiles: number): RatchetLocationBounds;
|
|
14
|
-
static sameLocation(loc1: RatchetGeoLocation, loc2: RatchetGeoLocation): boolean;
|
|
15
|
-
static pointInBounds(pt: RatchetGeoLocation, bound: RatchetLocationBounds): boolean;
|
|
16
|
-
static pointInAnyBound(pt: RatchetGeoLocation, inBounds: RatchetLocationBounds[], minPointsBeforeMapping?: number): boolean;
|
|
17
|
-
static pointInRatchetLocationBoundsMap(pt: RatchetGeoLocation, mp: RatchetLocationBoundsMap): boolean;
|
|
18
|
-
static findRatchetLocationBoundsMapEntry(pt: RatchetGeoLocation, mp: RatchetLocationBoundsMap): RatchetLocationBoundsMapEntry;
|
|
19
|
-
static buildRatchetLocationBoundsMap(inBounds: RatchetLocationBounds[]): RatchetLocationBoundsMap;
|
|
20
|
-
}
|
|
21
|
-
export interface RatchetGeoLocation {
|
|
22
|
-
lat: number;
|
|
23
|
-
lng: number;
|
|
24
|
-
}
|
|
25
|
-
export interface RatchetLocationBounds {
|
|
26
|
-
origin: RatchetGeoLocation;
|
|
27
|
-
extent: RatchetGeoLocation;
|
|
28
|
-
}
|
|
29
|
-
export interface RatchetLocationBoundsMap {
|
|
30
|
-
latOffset: number;
|
|
31
|
-
lngOffset: number;
|
|
32
|
-
maxLat: number;
|
|
33
|
-
maxLng: number;
|
|
34
|
-
mapping: RatchetLocationBoundsMapEntry[][];
|
|
35
|
-
}
|
|
36
|
-
export interface RatchetLocationBoundsMapEntry {
|
|
37
|
-
lat: number;
|
|
38
|
-
lng: number;
|
|
39
|
-
bounds: RatchetLocationBounds[];
|
|
40
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/lang/key-value.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { KeyValue } from './key-value.js';
|
|
2
|
-
export declare class MapRatchet {
|
|
3
|
-
static expandNestedKeysToObjects<T>(src: any, separator?: string): T;
|
|
4
|
-
static mapByUniqueProperty<T, R>(input: T[], propName: string): Map<R, T>;
|
|
5
|
-
static groupByProperty<T, R>(input: T[], propName: string): Map<R, T[]>;
|
|
6
|
-
static findValue(toSearch: any, path: string[]): any;
|
|
7
|
-
static findValueDotPath(toSearch: any, dotPath: string): any;
|
|
8
|
-
static simpleDeepCompare(object1: any, object2: any): boolean;
|
|
9
|
-
static toKeyValueList(value: any): KeyValue[];
|
|
10
|
-
static fromKeyValueList(list: KeyValue[]): any;
|
|
11
|
-
static cleanup<T>(obj: T, stripZero?: boolean, stripNull?: boolean, stripUndefined?: boolean, stripEmptyString?: boolean): T;
|
|
12
|
-
static extractValueFromMapIgnoreCase(src: any, key: string): any;
|
|
13
|
-
static safeCallFunction(ob: any, fnName: string): boolean;
|
|
14
|
-
static caseInsensitiveAccess<T>(ob: any, keyName: string): T;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/lang/no.d.ts
DELETED
package/lib/lang/no.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare class NumberRatchet {
|
|
2
|
-
private static MAX_LEADING_ZEROS_FORMAT_LENGTH;
|
|
3
|
-
static toFixedDecimalNumber(input: number | string, placesAfterPoint: number): number;
|
|
4
|
-
static leadingZeros(val: any, size: number): string;
|
|
5
|
-
static between(inTest: number, inP1: number, inP2: number): boolean;
|
|
6
|
-
static safeNumber(input: any, ifNotNumber?: number, useDefaultForNullAndUndefined?: boolean): number;
|
|
7
|
-
static numberCSVToList(inputCSV: string): number[];
|
|
8
|
-
static fitToWindow(val: number, b1: number, b2: number): number;
|
|
9
|
-
static groupNumbersIntoContiguousRanges(inputData: number[], minRangeSize?: number): SinglesAndRanges;
|
|
10
|
-
static distributeItemsEvenly(items: number, buckets: number): number[];
|
|
11
|
-
static createRange(minInclusive: number, maxExclusive: number, step?: number): number[];
|
|
12
|
-
}
|
|
13
|
-
export interface SinglesAndRanges {
|
|
14
|
-
singles: number[];
|
|
15
|
-
ranges: NumberRange[];
|
|
16
|
-
}
|
|
17
|
-
export interface NumberRange {
|
|
18
|
-
min: number;
|
|
19
|
-
max: number;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/lang/parsed-url.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TimeoutToken } from './timeout-token.js';
|
|
2
|
-
import { LoggerLevelName } from '../logger/logger-level-name.js';
|
|
3
|
-
export declare class PromiseRatchet {
|
|
4
|
-
static resolveOnEvent<T>(evtSrc: any, okEvtNames: string[], errEvtNames?: string[], rval?: T): Promise<T>;
|
|
5
|
-
static timeout<T>(srcPromise: Promise<T>, title: string, timeoutMS: number): Promise<T | TimeoutToken>;
|
|
6
|
-
static createTimeoutPromise(title: string, timeoutMS: number): Promise<TimeoutToken>;
|
|
7
|
-
static wait(time: number): Promise<void>;
|
|
8
|
-
static dumpResult(result: any, autoDebug?: boolean): void;
|
|
9
|
-
static dumpError(err: any, autoDebug?: boolean): void;
|
|
10
|
-
static logErrorAndReturnNull(err: any, autoDebug?: boolean): void;
|
|
11
|
-
static runPromiseAndDump<T>(promise: Promise<T>): void;
|
|
12
|
-
static waitFor(testFunction: (n: number) => any, expectedValue: any, intervalMS: number, maxCycles: number, label?: string, count?: number): Promise<boolean>;
|
|
13
|
-
static runBoundedParallel<T>(promiseFn: Function, params: any[][], context: any, maxConcurrent?: number, logLevel?: LoggerLevelName): Promise<T[]>;
|
|
14
|
-
static runBoundedParallelSingleParam<T>(promiseFn: Function, params: any[], context: any, maxConcurrent?: number, logLevel?: LoggerLevelName): Promise<T[]>;
|
|
15
|
-
static asyncForEachSerial(array: any[], callback: Function): Promise<void>;
|
|
16
|
-
static asyncForEachParallel(array: any[], callback: Function): Promise<void>;
|
|
17
|
-
private constructor();
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class RequireRatchet {
|
|
2
|
-
static isNullOrUndefined(ob: any): boolean;
|
|
3
|
-
static notNullOrUndefined(ob: any, name?: string): void;
|
|
4
|
-
static notNullUndefinedOrOnlyWhitespaceString(ob: string, name?: string): void;
|
|
5
|
-
static notNullUndefinedOrEmptyArray(ob: any[], name?: string): void;
|
|
6
|
-
static equal(ob1: any, ob2: any, message?: string): void;
|
|
7
|
-
static true(ob: boolean, message?: string): void;
|
|
8
|
-
static noNullOrUndefinedValuesInArray(arr: any[], expectedLength?: number, customMsg?: string): void;
|
|
9
|
-
static noNullOrUndefinedValuesInRestArgs(expectedLength: number, ...restArgs: any[]): void;
|
|
10
|
-
static constructorArgumentsMatchLengthAndAreNonNull(): void;
|
|
11
|
-
}
|
package/lib/lang/stop-watch.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LoggerLevelName } from '../logger/logger-level-name.js';
|
|
2
|
-
export declare class StopWatch {
|
|
3
|
-
private label;
|
|
4
|
-
private starts;
|
|
5
|
-
private ends;
|
|
6
|
-
private createTime;
|
|
7
|
-
constructor(label?: string);
|
|
8
|
-
start(name: string): number;
|
|
9
|
-
stop(name: string): number;
|
|
10
|
-
reset(name: string): void;
|
|
11
|
-
hasTimer(name: string): boolean;
|
|
12
|
-
log(name?: string, shortForm?: boolean, logLevel?: LoggerLevelName): void;
|
|
13
|
-
logExpected(pctComplete: number, name?: string, shortForm?: boolean, logLevel?: LoggerLevelName): void;
|
|
14
|
-
dump(name?: string, shortForm?: boolean): string;
|
|
15
|
-
dumpExpected(pctComplete: number, name?: string, shortForm?: boolean): string;
|
|
16
|
-
elapsedMS(name?: string): number;
|
|
17
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare class StringRatchet {
|
|
2
|
-
static RFC_3986_RESERVED: string[];
|
|
3
|
-
static stringToUint8Array(val: string): Uint8Array;
|
|
4
|
-
static uint8ArrayToString(val: Uint8Array): string;
|
|
5
|
-
static attemptJsonParse(val: string): any;
|
|
6
|
-
static canParseAsJson(val: string): boolean;
|
|
7
|
-
static allUnique(input: string): boolean;
|
|
8
|
-
static allPermutationsOfLength(len: number, alphabet: string): string[];
|
|
9
|
-
static createType4Guid(): string;
|
|
10
|
-
static createRandomHexString(len?: number): string;
|
|
11
|
-
static canonicalize(value: string): string;
|
|
12
|
-
static formatBytes(bytes: number, decimals?: number): string;
|
|
13
|
-
static safeString(input: any): string;
|
|
14
|
-
static stringContainsOnlyNumbers(input: string): boolean;
|
|
15
|
-
static stringContainsOnlyAlphanumeric(input: string): boolean;
|
|
16
|
-
static stringContainsOnlyHex(input: string): boolean;
|
|
17
|
-
static stringContainsOnly(inVal: string, validCharsIn: string): boolean;
|
|
18
|
-
static obscure(input: string, prefixLength?: number, suffixLength?: number): string;
|
|
19
|
-
static leadingZeros(inVal: any, size: number): string;
|
|
20
|
-
static trimToEmpty(input: string): string;
|
|
21
|
-
static trimToNull(input: string): string;
|
|
22
|
-
static trimAllStringPropertiesToNullInPlace<T>(input: T): T;
|
|
23
|
-
static trimAllStringPropertiesToEmptyInPlace<T>(input: T): T;
|
|
24
|
-
private static trimAllStringPropertiesInPlace;
|
|
25
|
-
static stripNonNumeric(input: string): string;
|
|
26
|
-
static csvSafe(input: any): string;
|
|
27
|
-
static stripNonAscii(value: string): string;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class TimeZoneRatchet {
|
|
2
|
-
static PACIFIC: TimeZoneRatchet;
|
|
3
|
-
private timezone;
|
|
4
|
-
constructor(timezone: string);
|
|
5
|
-
currentHour(): number;
|
|
6
|
-
private toEpochSeconds;
|
|
7
|
-
startOfTodayEpochSeconds(): number;
|
|
8
|
-
startOfMatchingDayEpochSeconds(inputTS: number): number;
|
|
9
|
-
startOfMatchingDayEpochMS(inputTS: number): number;
|
|
10
|
-
startOfCurrentHourEpochSeconds(): number;
|
|
11
|
-
startOfCurrentMinuteEpochSeconds(): number;
|
|
12
|
-
startOfCurrentSecondEpochSeconds(): number;
|
|
13
|
-
startOfTodayEpochMS(): number;
|
|
14
|
-
dailySlotCount(slotWidthMs: number): number;
|
|
15
|
-
currentTimeSlotIdx(slotWidthMs: number): number;
|
|
16
|
-
matchingTimeSlotIdx(timestamp: number, slotWidthMs: number): number;
|
|
17
|
-
startOfCurrentSlotEpochMS(slotWidthMs: number): number;
|
|
18
|
-
startOfMatchingSlotEpochMS(timestamp: number, slotWidthMs: number): number;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LoggerLevelName } from '../logger/logger-level-name.js';
|
|
2
|
-
export declare class TimeoutToken {
|
|
3
|
-
private title;
|
|
4
|
-
private timeoutMS;
|
|
5
|
-
private __timeoutTokenFlagField;
|
|
6
|
-
constructor(title: string, timeoutMS: number);
|
|
7
|
-
writeToLog(logLevel?: LoggerLevelName): void;
|
|
8
|
-
static isTimeoutToken(value: any): boolean;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LogMessage } from './log-message.js';
|
|
2
|
-
import { LogMessageFormatter } from './log-message-formatter.js';
|
|
3
|
-
import { LoggerMeta } from './logger-meta.js';
|
|
4
|
-
export declare class ClassicSingleLineLogMessageFormatter implements LogMessageFormatter {
|
|
5
|
-
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
6
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LoggerLevelName } from './logger-level-name.js';
|
|
2
|
-
import { LogMessage } from './log-message.js';
|
|
3
|
-
export declare class LogMessageBuilder {
|
|
4
|
-
private wrapped;
|
|
5
|
-
constructor(lvl: LoggerLevelName, messageSource?: string);
|
|
6
|
-
clone(): LogMessageBuilder;
|
|
7
|
-
level(lvl: LoggerLevelName): LogMessageBuilder;
|
|
8
|
-
timestamp(val: number): LogMessageBuilder;
|
|
9
|
-
messageSource(val: string): LogMessageBuilder;
|
|
10
|
-
subVars(val: any[]): LogMessageBuilder;
|
|
11
|
-
params(val: Record<string, string | number | boolean>): LogMessageBuilder;
|
|
12
|
-
p(name: string, value: string | number | boolean): LogMessageBuilder;
|
|
13
|
-
toMessage(): LogMessage;
|
|
14
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { LogMessage } from './log-message.js';
|
|
2
|
-
import { LoggerOptions } from './logger-options.js';
|
|
3
|
-
import { LoggerRingBuffer } from './logger-ring-buffer.js';
|
|
4
|
-
import { LoggerLevelName } from './logger-level-name.js';
|
|
5
|
-
import { LogMessageBuilder } from './log-message-builder.js';
|
|
6
|
-
import { LogMessageProcessor } from './log-message-processor.js';
|
|
7
|
-
export declare class LoggerInstance {
|
|
8
|
-
private loggerInstanceName;
|
|
9
|
-
private _loggerMeta;
|
|
10
|
-
private _ringBuffer;
|
|
11
|
-
private _formatter;
|
|
12
|
-
private _level;
|
|
13
|
-
private _handlerFunctionMap;
|
|
14
|
-
private _options;
|
|
15
|
-
constructor(loggerInstanceName: string, inOptions: LoggerOptions);
|
|
16
|
-
addPreProcessor(proc: LogMessageProcessor): LogMessageProcessor[];
|
|
17
|
-
get ringBuffer(): LoggerRingBuffer;
|
|
18
|
-
dumpConfigurationIntoLog(): void;
|
|
19
|
-
dumpOptionsIntoLog(): void;
|
|
20
|
-
changeRingBufferSize(newSize: number): void;
|
|
21
|
-
updateTracePrefix(newValue: string): void;
|
|
22
|
-
get options(): LoggerOptions;
|
|
23
|
-
set options(newOpts: LoggerOptions);
|
|
24
|
-
get level(): LoggerLevelName;
|
|
25
|
-
set level(newLevel: LoggerLevelName);
|
|
26
|
-
consoleLogPassThru(level: LoggerLevelName, ...input: any[]): void;
|
|
27
|
-
createLogMessage(level: LoggerLevelName, params: Record<string, string>, format: string, ...input: any[]): LogMessage;
|
|
28
|
-
formatMessage(msg: LogMessage): string;
|
|
29
|
-
formatMessages(msgs: LogMessage[]): string[];
|
|
30
|
-
recordMessageBuilder(msgBuild: LogMessageBuilder): string;
|
|
31
|
-
recordMessage(inMsg: LogMessage): string;
|
|
32
|
-
error(format: string, ...input: any[]): string;
|
|
33
|
-
errorP(...input: any[]): void;
|
|
34
|
-
warn(format: string, ...input: any[]): string;
|
|
35
|
-
warnP(...input: any[]): void;
|
|
36
|
-
info(format: string, ...input: any[]): string;
|
|
37
|
-
infoP(...input: any[]): void;
|
|
38
|
-
verbose(format: string, ...input: any[]): string;
|
|
39
|
-
verboseP(...input: any[]): void;
|
|
40
|
-
debug(format: string, ...input: any[]): string;
|
|
41
|
-
debugP(...input: any[]): void;
|
|
42
|
-
silly(format: string, ...input: any[]): string;
|
|
43
|
-
sillyP(...input: any[]): void;
|
|
44
|
-
logByLevel(level: LoggerLevelName, format: string, ...input: any[]): void;
|
|
45
|
-
importMessages(msgs: LogMessage[], prefixIn?: string, addTimestamp?: boolean): void;
|
|
46
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LogMessageFormatType } from './log-message-format-type.js';
|
|
2
|
-
import { LoggerLevelName } from './logger-level-name.js';
|
|
3
|
-
import { LogMessageProcessor } from './log-message-processor.js';
|
|
4
|
-
import { LoggerOutputFunction } from './logger-output-function.js';
|
|
5
|
-
export interface LoggerOptions {
|
|
6
|
-
initialLevel?: LoggerLevelName;
|
|
7
|
-
formatType?: LogMessageFormatType;
|
|
8
|
-
trace?: string;
|
|
9
|
-
globalVars?: Record<string, string | number | boolean>;
|
|
10
|
-
outputFunction?: LoggerOutputFunction;
|
|
11
|
-
ringBufferSize?: number;
|
|
12
|
-
preProcessors?: LogMessageProcessor[];
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LogMessage } from './log-message.js';
|
|
2
|
-
import { LogSnapshot } from './log-snapshot.js';
|
|
3
|
-
export declare class LoggerRingBuffer {
|
|
4
|
-
private _lastLogMessage;
|
|
5
|
-
private _buffer;
|
|
6
|
-
private _bufferIdx;
|
|
7
|
-
private _lastSnapshotIdx;
|
|
8
|
-
private _bufferSize;
|
|
9
|
-
constructor(size: number);
|
|
10
|
-
get currentIndex(): number;
|
|
11
|
-
get lastSnapshotIdx(): number;
|
|
12
|
-
set bufferSize(newSize: number);
|
|
13
|
-
getMessages(inStartFrom?: number, clear?: boolean, reverseSort?: boolean): LogMessage[];
|
|
14
|
-
takeSnapshot(): LogSnapshot;
|
|
15
|
-
getLastLogMessage(): LogMessage;
|
|
16
|
-
private clearRingBuffer;
|
|
17
|
-
addToRingBuffer(newMsg: LogMessage): void;
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LoggerLevelName } from './logger-level-name.js';
|
|
2
|
-
import { LoggerOutputFunction } from './logger-output-function.js';
|
|
3
|
-
export declare class LoggerUtil {
|
|
4
|
-
private static LOG_LEVELS_IN_ORDER;
|
|
5
|
-
static handlerFunctionMap(outputFn?: LoggerOutputFunction): Map<LoggerLevelName, (...any: any[]) => void>;
|
|
6
|
-
static defaultHandlerFunction(): (...any: any[]) => void;
|
|
7
|
-
static levelIsEnabled(targetLevel: LoggerLevelName, currentEnabled: LoggerLevelName): boolean;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/logger/logger.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { LogMessage } from './log-message.js';
|
|
2
|
-
import { LogSnapshot } from './log-snapshot.js';
|
|
3
|
-
import { LoggerOptions } from './logger-options.js';
|
|
4
|
-
import { LoggerInstance } from './logger-instance.js';
|
|
5
|
-
import { LoggerLevelName } from './logger-level-name.js';
|
|
6
|
-
import { LoggerRingBuffer } from './logger-ring-buffer.js';
|
|
7
|
-
import { LogMessageBuilder } from './log-message-builder.js';
|
|
8
|
-
export declare class Logger {
|
|
9
|
-
private static LOGGER_INSTANCES;
|
|
10
|
-
private static DEFAULT_OPTIONS;
|
|
11
|
-
static applyDefaultsToOptions(input?: LoggerOptions): LoggerOptions;
|
|
12
|
-
static changeDefaultOptions(input: LoggerOptions, retroactive?: boolean): void;
|
|
13
|
-
static getLogger(loggerName?: string, inOptions?: LoggerOptions): LoggerInstance;
|
|
14
|
-
static recordMessageBuilder(msgBuild: LogMessageBuilder): string;
|
|
15
|
-
static recordMessage(msg: LogMessage): string;
|
|
16
|
-
static formatMessages(msgs: LogMessage[]): string[];
|
|
17
|
-
static updateTracePrefix(newValue: string): void;
|
|
18
|
-
static changeRingBufferSize(newValue: number): void;
|
|
19
|
-
static getRingBuffer(): LoggerRingBuffer;
|
|
20
|
-
static dumpConfigurationIntoLog(): void;
|
|
21
|
-
static dumpOptionsIntoLog(): void;
|
|
22
|
-
static getLevel(): LoggerLevelName;
|
|
23
|
-
static setLevel(newLevel: LoggerLevelName): void;
|
|
24
|
-
static getOptions(): LoggerOptions;
|
|
25
|
-
static getMessages(inStartFrom?: number, clear?: boolean, reverseSort?: boolean): LogMessage[];
|
|
26
|
-
static consoleLogPassThru(level: LoggerLevelName, ...input: any[]): void;
|
|
27
|
-
static error(format: string, ...input: any[]): string;
|
|
28
|
-
static errorP(...input: any[]): void;
|
|
29
|
-
static warn(format: string, ...input: any[]): string;
|
|
30
|
-
static warnP(...input: any[]): void;
|
|
31
|
-
static info(format: string, ...input: any[]): string;
|
|
32
|
-
static infoP(...input: any[]): void;
|
|
33
|
-
static verbose(format: string, ...input: any[]): string;
|
|
34
|
-
static verboseP(...input: any[]): void;
|
|
35
|
-
static debug(format: string, ...input: any[]): string;
|
|
36
|
-
static debugP(...input: any[]): void;
|
|
37
|
-
static silly(format: string, ...input: any[]): string;
|
|
38
|
-
static sillyP(...input: any[]): void;
|
|
39
|
-
static takeSnapshot(): LogSnapshot;
|
|
40
|
-
static logByLevel(level: LoggerLevelName, format: string, ...input: any[]): void;
|
|
41
|
-
static importMessages(msgs: LogMessage[], prefixIn?: string, addTimestamp?: boolean): void;
|
|
42
|
-
static getLastLogMessage(): LogMessage;
|
|
43
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LogMessage } from './log-message.js';
|
|
2
|
-
import { LogMessageFormatter } from './log-message-formatter.js';
|
|
3
|
-
import { LoggerMeta } from './logger-meta.js';
|
|
4
|
-
export declare class NoneLogMessageFormatter implements LogMessageFormatter {
|
|
5
|
-
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LogMessage } from './log-message.js';
|
|
2
|
-
import { LogMessageFormatter } from './log-message-formatter.js';
|
|
3
|
-
import { LoggerMeta } from './logger-meta.js';
|
|
4
|
-
export declare class StructuredJsonLogMessageFormatter implements LogMessageFormatter {
|
|
5
|
-
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ParsedUrl } from '../lang/parsed-url.js';
|
|
2
|
-
export declare class NetworkRatchet {
|
|
3
|
-
private static LOCAL_IP;
|
|
4
|
-
static findLocalIp(useCache?: boolean): Promise<string>;
|
|
5
|
-
static parseUrl(href: string): ParsedUrl;
|
|
6
|
-
private static updateLocalIP;
|
|
7
|
-
private static grepSDP;
|
|
8
|
-
private static updateAddressList;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { Writable } from 'stream';
|
|
4
|
-
export declare class BufferWritable extends Writable {
|
|
5
|
-
private _val;
|
|
6
|
-
constructor();
|
|
7
|
-
_write(chunk: any, encoding: string, callback: any): void;
|
|
8
|
-
get value(): Buffer;
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { Readable } from 'stream';
|
|
4
|
-
export declare class StreamRatchet {
|
|
5
|
-
private constructor();
|
|
6
|
-
static readableToBufferSync(stream: Readable): Buffer;
|
|
7
|
-
static webReadableStreamToBuffer(stream: ReadableStream): Promise<Buffer>;
|
|
8
|
-
static webReadableStreamToString(stream: ReadableStream): Promise<string>;
|
|
9
|
-
static stringToReadable(input: string): Readable;
|
|
10
|
-
static stringToWebReadableStream(input: string): ReadableStream;
|
|
11
|
-
static anyToStringReadable(input: any): Readable;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|