@bitblit/ratchet-common 4.0.353-alpha → 4.0.355-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/lib/types.d.ts +980 -0
- package/package.json +3 -3
- 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/index.d.ts +0 -86
- package/lib/index.mjs.map +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 -20
- 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 -28
- 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/sort-ratchet.d.ts +0 -7
- package/lib/lang/sort-ratchet.spec.d.ts +0 -1
- package/lib/lang/stop-watch.d.ts +0 -28
- package/lib/lang/stop-watch.spec.d.ts +0 -1
- package/lib/lang/string-ratchet.d.ts +0 -37
- package/lib/lang/string-ratchet.spec.d.ts +0 -1
- package/lib/lang/time-zone-ratchet.d.ts +0 -20
- 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/lang/uint-8-array-ratchet.d.ts +0 -5
- package/lib/lang/uint-8-array-ratchet.spec.d.ts +0 -1
- package/lib/lang/web-stream-ratchet.d.ts +0 -6
- package/lib/lang/web-stream-ratchet.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 -6
- 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 -48
- package/lib/logger/logger-level-name.d.ts +0 -9
- 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 -6
- 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 -45
- 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/mail/archive-email-result.d.ts +0 -5
- package/lib/mail/email-attachment.d.ts +0 -5
- package/lib/mail/mail-sending-provider.d.ts +0 -5
- package/lib/mail/mailer-config.d.ts +0 -11
- package/lib/mail/mailer-like.d.ts +0 -11
- package/lib/mail/mailer-util.d.ts +0 -7
- package/lib/mail/mailer.d.ts +0 -17
- package/lib/mail/mailer.spec.d.ts +0 -1
- package/lib/mail/ready-to-send-email.d.ts +0 -13
- package/lib/mail/resolved-ready-to-send-email.d.ts +0 -5
- package/lib/mail/send-email-result.d.ts +0 -12
- package/lib/mail/test-mail-sending-provider.d.ts +0 -8
- 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/network/restful-api-http-error.d.ts +0 -41
- package/lib/network/restful-api-http-error.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/third-party/twilio/twilio-verify-ratchet.d.ts +0 -23
- 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 -6
- 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,7 +0,0 @@
|
|
|
1
|
-
import { LastSuccessProvider } from './last-success-provider.js';
|
|
2
|
-
export declare class CompositeLastSuccessProvider implements LastSuccessProvider {
|
|
3
|
-
private sources;
|
|
4
|
-
private mostRecent;
|
|
5
|
-
constructor(src: LastSuccessProvider[], mostRecentSrc?: boolean);
|
|
6
|
-
lastSuccess(): number;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class DateRatchet {
|
|
2
|
-
static COMMON_US_DATE_FORMAT: string;
|
|
3
|
-
static DEFAULT_DATE_FORMAT: string;
|
|
4
|
-
static FULL_DATE_FORMAT: string;
|
|
5
|
-
static PACIFIC_TIME_ZONE: string;
|
|
6
|
-
static UTC_TIME_ZONE: string;
|
|
7
|
-
static formatFullDate(input: Date): string;
|
|
8
|
-
static formatDefaultDateOnly(input: Date): string;
|
|
9
|
-
static parseDefaultDate(input: string): Date;
|
|
10
|
-
static parseCommonUsDate(input: string): Date;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DurationLike } from 'luxon';
|
|
2
|
-
export declare class DurationRatchet {
|
|
3
|
-
static formatMsDuration(ms: number, includeMS?: boolean): string;
|
|
4
|
-
static colonFormatMsDuration(ms: number, includeMS?: boolean): string;
|
|
5
|
-
static daysBetween(d1: Date, d2: Date): number;
|
|
6
|
-
static createSteps(startEpochMS: number, endEpochMS: number, timezone: string, outputFormat: string, stepUnit: DurationLike): string[];
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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: Record<string, any>): KeyValue<any>[];
|
|
10
|
-
static fromKeyValueList<T>(list: KeyValue<T>[]): Record<string, T>;
|
|
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,28 +0,0 @@
|
|
|
1
|
-
export declare class NumberRatchet {
|
|
2
|
-
private static MAX_LEADING_ZEROS_FORMAT_LENGTH;
|
|
3
|
-
static readonly DEFAULT_SAFE_NUMBER_OPTIONS: SafeNumberOptions;
|
|
4
|
-
static toFixedDecimalNumber(input: number | string, placesAfterPoint: number): number;
|
|
5
|
-
static leadingZeros(val: any, size: number): string;
|
|
6
|
-
static between(inTest: number, inP1: number, inP2: number): boolean;
|
|
7
|
-
static safeNumber(input: any, ifNotNumber?: number, useDefaultForNullAndUndefined?: boolean): number;
|
|
8
|
-
static safeNumberOpt(input: any, optionPart?: Partial<SafeNumberOptions>): number;
|
|
9
|
-
static numberCSVToList(inputCSV: string): number[];
|
|
10
|
-
static fitToWindow(val: number, b1: number, b2: number): number;
|
|
11
|
-
static groupNumbersIntoContiguousRanges(inputData: number[], minRangeSize?: number): SinglesAndRanges;
|
|
12
|
-
static distributeItemsEvenly(items: number, buckets: number): number[];
|
|
13
|
-
static createRange(minInclusive: number, maxExclusive: number, step?: number): number[];
|
|
14
|
-
}
|
|
15
|
-
export interface SinglesAndRanges {
|
|
16
|
-
singles: number[];
|
|
17
|
-
ranges: NumberRange[];
|
|
18
|
-
}
|
|
19
|
-
export interface NumberRange {
|
|
20
|
-
min: number;
|
|
21
|
-
max: number;
|
|
22
|
-
}
|
|
23
|
-
export interface SafeNumberOptions {
|
|
24
|
-
ifNotNumber: number;
|
|
25
|
-
returnValueForNull: number;
|
|
26
|
-
returnValueForUndefined: number;
|
|
27
|
-
preParseCharacterMapping: Record<string, string>;
|
|
28
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare class SortRatchet {
|
|
2
|
-
private constructor();
|
|
3
|
-
static sortNullToTop<T>(a: T, b: T, bothNonNullSort: (c: T, d: T) => number): number;
|
|
4
|
-
static sortNullToBottom<T>(a: T, b: T, bothNonNullSort: (c: T, d: T) => number): number;
|
|
5
|
-
static nullSafeSort<T>(a: T, b: T, nullsOnTop: boolean, bothNonNullSort: (c: T, d: T) => number): number;
|
|
6
|
-
static sortNumericStringsAsNumbers(a: string | number, b: string | number, sortNonNumbersToTop?: boolean): number;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/lang/stop-watch.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { LoggerLevelName } from '../logger/logger-level-name.js';
|
|
2
|
-
export declare class StopWatch {
|
|
3
|
-
get createTime(): number;
|
|
4
|
-
private starts;
|
|
5
|
-
private ends;
|
|
6
|
-
private _createTime;
|
|
7
|
-
private _label;
|
|
8
|
-
private _labelIncludedInOutput;
|
|
9
|
-
constructor();
|
|
10
|
-
withLabel(val: string): StopWatch;
|
|
11
|
-
withLabelIncludedInOutput(val: boolean): StopWatch;
|
|
12
|
-
get label(): string;
|
|
13
|
-
set label(value: string);
|
|
14
|
-
get labelIncludedInOutput(): boolean;
|
|
15
|
-
set labelIncludedInOutput(value: boolean);
|
|
16
|
-
start(name: string): number;
|
|
17
|
-
stop(name: string): number;
|
|
18
|
-
reset(name: string): void;
|
|
19
|
-
hasTimer(name: string): boolean;
|
|
20
|
-
log(name?: string, shortForm?: boolean, logLevel?: LoggerLevelName): void;
|
|
21
|
-
logExpected(pctComplete: number, name?: string, shortForm?: boolean, logLevel?: LoggerLevelName): void;
|
|
22
|
-
timerNames(): string[];
|
|
23
|
-
dumpAll(separator?: string, shortForm?: boolean): string;
|
|
24
|
-
dump(name?: string, shortForm?: boolean): string;
|
|
25
|
-
dumpExpected(pctComplete: number, name?: string, shortForm?: boolean): string;
|
|
26
|
-
expectedRemainingMS(pctComplete: number, name?: string): number;
|
|
27
|
-
elapsedMS(name?: string): number;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare class StringRatchet {
|
|
2
|
-
static readonly RFC_3986_RESERVED: string[];
|
|
3
|
-
static readonly DIGITS: string;
|
|
4
|
-
static readonly HEXITS: string;
|
|
5
|
-
static readonly UPPER_CASE_LATIN: string;
|
|
6
|
-
static readonly LOWER_CASE_LATIN: string;
|
|
7
|
-
static readonly CASE_INSENSITIVE_LATIN: string;
|
|
8
|
-
static stringIsInGivenAlphabet(input: string, alphabet: string): boolean;
|
|
9
|
-
static stringToUint8Array(val: string): Uint8Array;
|
|
10
|
-
static uint8ArrayToString(val: Uint8Array): string;
|
|
11
|
-
static attemptJsonParse(val: string): any;
|
|
12
|
-
static canParseAsJson(val: string): boolean;
|
|
13
|
-
static allUnique(input: string): boolean;
|
|
14
|
-
static allPermutationsOfLength(len: number, alphabet: string): string[];
|
|
15
|
-
static breakIntoBlocks(input: string, blockSize: number, separator: string): string;
|
|
16
|
-
static createShortUid(blockSize?: number, uniquesPerSecond?: number, radix?: number): string;
|
|
17
|
-
static createType4Guid(): string;
|
|
18
|
-
static createRandomHexString(len?: number): string;
|
|
19
|
-
static canonicalize(value: string): string;
|
|
20
|
-
static formatBytes(bytes: number, decimals?: number): string;
|
|
21
|
-
static safeString(input: any): string;
|
|
22
|
-
static stringContainsOnlyNumbers(input: string): boolean;
|
|
23
|
-
static stringContainsOnlyAlphanumeric(input: string): boolean;
|
|
24
|
-
static stringContainsOnlyHex(input: string): boolean;
|
|
25
|
-
static stringContainsOnly(inVal: string, validCharsIn: string): boolean;
|
|
26
|
-
static obscure(input: string, prefixLength?: number, suffixLength?: number): string;
|
|
27
|
-
static leadingZeros(inVal: any, size: number): string;
|
|
28
|
-
static trimToEmpty(input: string): string;
|
|
29
|
-
static trimToNull(input: string): string;
|
|
30
|
-
static trimAllStringPropertiesToNullInPlace<T>(input: T): T;
|
|
31
|
-
static trimAllStringPropertiesToEmptyInPlace<T>(input: T): T;
|
|
32
|
-
private static trimAllStringPropertiesInPlace;
|
|
33
|
-
static stripNonNumeric(input: string): string;
|
|
34
|
-
static csvSafe(input: any): string;
|
|
35
|
-
static stripNonAscii(value: string): string;
|
|
36
|
-
static replaceAll(value: string, src: string, dst: string): string;
|
|
37
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare class TimeZoneRatchet {
|
|
2
|
-
private timezoneIanaName;
|
|
3
|
-
static PACIFIC: TimeZoneRatchet;
|
|
4
|
-
constructor(timezoneIanaName: string);
|
|
5
|
-
get ianaName(): string;
|
|
6
|
-
currentHour(): number;
|
|
7
|
-
private toEpochSeconds;
|
|
8
|
-
startOfTodayEpochSeconds(): number;
|
|
9
|
-
startOfMatchingDayEpochSeconds(inputTS: number): number;
|
|
10
|
-
startOfMatchingDayEpochMS(inputTS: number): number;
|
|
11
|
-
startOfCurrentHourEpochSeconds(): number;
|
|
12
|
-
startOfCurrentMinuteEpochSeconds(): number;
|
|
13
|
-
startOfCurrentSecondEpochSeconds(): number;
|
|
14
|
-
startOfTodayEpochMS(): number;
|
|
15
|
-
dailySlotCount(slotWidthMs: number): number;
|
|
16
|
-
currentTimeSlotIdx(slotWidthMs: number): number;
|
|
17
|
-
matchingTimeSlotIdx(timestamp: number, slotWidthMs: number): number;
|
|
18
|
-
startOfCurrentSlotEpochMS(slotWidthMs: number): number;
|
|
19
|
-
startOfMatchingSlotEpochMS(timestamp: number, slotWidthMs: number): number;
|
|
20
|
-
}
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare class WebStreamRatchet {
|
|
2
|
-
private constructor();
|
|
3
|
-
static webReadableStreamToUint8Array(stream: ReadableStream): Promise<Uint8Array>;
|
|
4
|
-
static webReadableStreamToString(stream: ReadableStream): Promise<string>;
|
|
5
|
-
static stringToWebReadableStream(input: string): ReadableStream;
|
|
6
|
-
}
|
|
@@ -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,6 +0,0 @@
|
|
|
1
|
-
export declare const LogMessageFormatType: {
|
|
2
|
-
readonly ClassicSingleLine: "ClassicSingleLine";
|
|
3
|
-
readonly StructuredJson: "StructuredJson";
|
|
4
|
-
readonly None: "None";
|
|
5
|
-
};
|
|
6
|
-
export type LogMessageFormatType = (typeof LogMessageFormatType)[keyof typeof LogMessageFormatType];
|
|
@@ -1,48 +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 _guid;
|
|
10
|
-
private _loggerMeta;
|
|
11
|
-
private _ringBuffer;
|
|
12
|
-
private _formatter;
|
|
13
|
-
private _level;
|
|
14
|
-
private _handlerFunctionMap;
|
|
15
|
-
private _options;
|
|
16
|
-
constructor(loggerInstanceName: string, inOptions: LoggerOptions);
|
|
17
|
-
addPreProcessor(proc: LogMessageProcessor): LogMessageProcessor[];
|
|
18
|
-
get ringBuffer(): LoggerRingBuffer;
|
|
19
|
-
dumpConfigurationIntoLog(): void;
|
|
20
|
-
dumpOptionsIntoLog(): void;
|
|
21
|
-
get guid(): number;
|
|
22
|
-
changeRingBufferSize(newSize: number): void;
|
|
23
|
-
updateTracePrefix(newValue: string): void;
|
|
24
|
-
get options(): LoggerOptions;
|
|
25
|
-
set options(newOpts: LoggerOptions);
|
|
26
|
-
get level(): LoggerLevelName;
|
|
27
|
-
set level(newLevel: LoggerLevelName);
|
|
28
|
-
consoleLogPassThru(level: LoggerLevelName, ...input: any[]): void;
|
|
29
|
-
createLogMessage(level: LoggerLevelName, params: Record<string, string>, format: string, ...input: any[]): LogMessage;
|
|
30
|
-
formatMessage(msg: LogMessage): string;
|
|
31
|
-
formatMessages(msgs: LogMessage[]): string[];
|
|
32
|
-
recordMessageBuilder(msgBuild: LogMessageBuilder): string;
|
|
33
|
-
recordMessage(inMsg: LogMessage): string;
|
|
34
|
-
error(format: string, ...input: any[]): string;
|
|
35
|
-
errorP(...input: any[]): void;
|
|
36
|
-
warn(format: string, ...input: any[]): string;
|
|
37
|
-
warnP(...input: any[]): void;
|
|
38
|
-
info(format: string, ...input: any[]): string;
|
|
39
|
-
infoP(...input: any[]): void;
|
|
40
|
-
verbose(format: string, ...input: any[]): string;
|
|
41
|
-
verboseP(...input: any[]): void;
|
|
42
|
-
debug(format: string, ...input: any[]): string;
|
|
43
|
-
debugP(...input: any[]): void;
|
|
44
|
-
silly(format: string, ...input: any[]): string;
|
|
45
|
-
sillyP(...input: any[]): void;
|
|
46
|
-
logByLevel(level: LoggerLevelName, format: string, ...input: any[]): void;
|
|
47
|
-
importMessages(msgs: LogMessage[], prefixIn?: string, addTimestamp?: boolean): void;
|
|
48
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const LoggerLevelName: {
|
|
2
|
-
readonly error: "error";
|
|
3
|
-
readonly warn: "warn";
|
|
4
|
-
readonly info: "info";
|
|
5
|
-
readonly verbose: "verbose";
|
|
6
|
-
readonly debug: "debug";
|
|
7
|
-
readonly silly: "silly";
|
|
8
|
-
};
|
|
9
|
-
export type LoggerLevelName = (typeof LoggerLevelName)[keyof typeof LoggerLevelName];
|
|
@@ -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 {};
|