@fluidframework/common-utils
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -20,3 +20,3 @@ ## API Report File for "@fluidframework/common-utils" | ||
// @public | ||
// @public @deprecated | ||
export function assert(condition: boolean, message: string | number): asserts condition; | ||
@@ -29,3 +29,3 @@ | ||
// @public | ||
// @public @deprecated | ||
export class Buffer extends Uint8Array { | ||
@@ -40,6 +40,6 @@ // (undocumented) | ||
// @public | ||
// @public @deprecated | ||
export const bufferToString: (blob: ArrayBufferLike, encoding: string) => string; | ||
// @public | ||
// @public @deprecated | ||
export class Deferred<T> { | ||
@@ -53,9 +53,9 @@ constructor(); | ||
// @public | ||
// @public @deprecated | ||
export const delay: (timeMs: number) => Promise<void>; | ||
// @public | ||
// @public @deprecated | ||
export function doIfNotDisposed<T>(disposable: IDisposable, f: (...args: any[]) => T): (...args: any[]) => T; | ||
// @public | ||
// @public @deprecated | ||
export type EventEmitterEventType = EventEmitter extends { | ||
@@ -65,3 +65,3 @@ on(event: infer E, listener: any): any; | ||
// @public | ||
// @public @deprecated | ||
export class EventForwarder<TEvent = IEvent> extends TypedEventEmitter<TEvent> implements IDisposable { | ||
@@ -81,15 +81,15 @@ constructor(source?: EventEmitter | IEventProvider<TEvent & IEvent>); | ||
// @public | ||
// @public @deprecated | ||
export const fromBase64ToUtf8: (input: string) => string; | ||
// @public | ||
// @public @deprecated | ||
export const fromUtf8ToBase64: (input: string) => string; | ||
// @public | ||
// @public @deprecated | ||
export function gitHashFile(file: IsoBuffer): Promise<string>; | ||
// @public | ||
// @public @deprecated | ||
export function hashFile(file: IsoBuffer, algorithm?: "SHA-1" | "SHA-256", hashEncoding?: "hex" | "base64"): Promise<string>; | ||
// @public | ||
// @public @deprecated | ||
export class Heap<T> { | ||
@@ -107,3 +107,3 @@ constructor(comp: IComparer<T>); | ||
// @public | ||
// @public @deprecated | ||
export interface IComparer<T> { | ||
@@ -114,3 +114,3 @@ compare(a: T, b: T): number; | ||
// @public | ||
// @public @deprecated | ||
export interface IHeapNode<T> { | ||
@@ -123,3 +123,3 @@ // (undocumented) | ||
// @public | ||
// @public @deprecated | ||
export interface IPromiseTimer extends ITimer { | ||
@@ -129,3 +129,3 @@ start(): Promise<IPromiseTimerResult>; | ||
// @public (undocumented) | ||
// @public @deprecated (undocumented) | ||
export interface IPromiseTimerResult { | ||
@@ -136,3 +136,3 @@ // (undocumented) | ||
// @public | ||
// @public @deprecated | ||
export interface IRange { | ||
@@ -147,3 +147,3 @@ // (undocumented) | ||
// @public | ||
// @public @deprecated | ||
export interface IRangeTrackerSnapshot { | ||
@@ -158,12 +158,12 @@ // (undocumented) | ||
// @public (undocumented) | ||
// @public @deprecated (undocumented) | ||
export const IsoBuffer: typeof Buffer; | ||
// @public (undocumented) | ||
// @public @deprecated (undocumented) | ||
export type IsoBuffer = Buffer; | ||
// @public | ||
// @public @deprecated | ||
export type IsomorphicPerformance = Partial<Performance> & Pick<Performance, "clearMarks" | "mark" | "measure" | "now">; | ||
// @public (undocumented) | ||
// @public @deprecated (undocumented) | ||
export interface ITimer { | ||
@@ -175,3 +175,3 @@ clear(): void; | ||
// @public | ||
// @public @deprecated | ||
export interface ITraceEvent { | ||
@@ -183,3 +183,3 @@ readonly duration: number; | ||
// @public | ||
// @public @deprecated | ||
export class Lazy<T> { | ||
@@ -191,3 +191,3 @@ constructor(valueGenerator: () => T); | ||
// @public | ||
// @public @deprecated | ||
export class LazyPromise<T> implements Promise<T> { | ||
@@ -205,10 +205,10 @@ // (undocumented) | ||
// @public | ||
// @public @deprecated | ||
export const NumberComparer: IComparer<number>; | ||
// @public (undocumented) | ||
// @public @deprecated (undocumented) | ||
const performance_2: IsomorphicPerformance; | ||
export { performance_2 as performance } | ||
// @public | ||
// @public @deprecated | ||
export class PromiseCache<TKey, TResult> { | ||
@@ -225,3 +225,3 @@ constructor({ expiry, removeOnError, }?: PromiseCacheOptions); | ||
// @public | ||
// @public @deprecated | ||
export type PromiseCacheExpiry = { | ||
@@ -234,3 +234,3 @@ policy: "indefinite"; | ||
// @public | ||
// @public @deprecated | ||
export interface PromiseCacheOptions { | ||
@@ -241,3 +241,3 @@ expiry?: PromiseCacheExpiry; | ||
// @public | ||
// @public @deprecated | ||
export class PromiseTimer implements IPromiseTimer { | ||
@@ -253,3 +253,3 @@ constructor(defaultTimeout: number, defaultHandler: () => void); | ||
// @public | ||
// @public @deprecated | ||
export class RangeTracker { | ||
@@ -268,3 +268,3 @@ constructor(primary: IRangeTrackerSnapshot); | ||
// @public | ||
// @public @deprecated | ||
export class RateLimiter { | ||
@@ -275,9 +275,9 @@ constructor(windowMSec: number); | ||
// @public | ||
// @public @deprecated | ||
export function safelyParseJSON(json: string): any | undefined; | ||
// @public | ||
// @public @deprecated | ||
export function setLongTimeout(timeoutFn: () => void, timeoutMs: number, setTimeoutIdFn?: (timeoutId: ReturnType<typeof setTimeout>) => void): ReturnType<typeof setTimeout>; | ||
// @public | ||
// @public @deprecated | ||
export function stringToBuffer(input: string, encoding: string): ArrayBufferLike; | ||
@@ -297,3 +297,3 @@ | ||
// @public | ||
// @public @deprecated | ||
export class Timer implements ITimer { | ||
@@ -307,6 +307,6 @@ constructor(defaultTimeout: number, defaultHandler: () => void, getCurrentTick?: () => number); | ||
// @public | ||
// @public @deprecated | ||
export const toUtf8: (input: string, encoding: string) => string; | ||
// @public | ||
// @public @deprecated | ||
export class Trace { | ||
@@ -324,3 +324,3 @@ protected constructor(startTick: number); | ||
// @public | ||
// @public @deprecated | ||
export class TypedEventEmitter<TEvent> extends EventEmitter implements IEventProvider<TEvent & IEvent> { | ||
@@ -344,14 +344,14 @@ constructor(); | ||
// @public (undocumented) | ||
// @public @deprecated (undocumented) | ||
export type TypedEventTransform<TThis, TEvent> = TransformedEvent<TThis, "newListener" | "removeListener", Parameters<(event: string, listener: (...args: any[]) => void) => void>> & IEventTransformer<TThis, TEvent & IEvent> & TransformedEvent<TThis, EventEmitterEventType, any[]>; | ||
// @public | ||
// @public @deprecated | ||
export function Uint8ArrayToArrayBuffer(array: Uint8Array): ArrayBuffer; | ||
// @public | ||
// @public @deprecated | ||
export function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string; | ||
// @public | ||
// @public @deprecated | ||
export function unreachableCase(_: never, message?: string): never; | ||
``` |
@@ -1,4 +0,4 @@ | ||
{"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"1":{"start":{"line":18,"column":1},"end":{"line":30,"column":null}},"2":{"start":{"line":20,"column":3},"end":{"line":20,"column":38}},"3":{"start":{"line":25,"column":3},"end":{"line":25,"column":40}},"4":{"start":{"line":28,"column":3},"end":{"line":28,"column":51}},"5":{"start":{"line":17,"column":0},"end":{"line":17,"column":16}},"6":{"start":{"line":39,"column":30},"end":{"line":40,"column":39}},"7":{"start":{"line":40,"column":1},"end":{"line":40,"column":39}},"8":{"start":{"line":39,"column":13},"end":{"line":39,"column":30}},"9":{"start":{"line":49,"column":30},"end":{"line":50,"column":40}},"10":{"start":{"line":50,"column":1},"end":{"line":50,"column":40}},"11":{"start":{"line":49,"column":13},"end":{"line":49,"column":30}},"12":{"start":{"line":65,"column":15},"end":{"line":65,"column":78}},"13":{"start":{"line":66,"column":1},"end":{"line":74,"column":3}},"14":{"start":{"line":64,"column":0},"end":{"line":64,"column":16}},"15":{"start":{"line":89,"column":2},"end":{"line":89,"column":44}},"16":{"start":{"line":98,"column":2},"end":{"line":110,"column":null}},"17":{"start":{"line":99,"column":3},"end":{"line":99,"column":78}},"18":{"start":{"line":101,"column":9},"end":{"line":110,"column":null}},"19":{"start":{"line":105,"column":3},"end":{"line":105,"column":86}},"20":{"start":{"line":106,"column":9},"end":{"line":110,"column":null}},"21":{"start":{"line":107,"column":3},"end":{"line":107,"column":91}},"22":{"start":{"line":109,"column":3},"end":{"line":109,"column":25}},"23":{"start":{"line":118,"column":17},"end":{"line":118,"column":32}},"24":{"start":{"line":119,"column":22},"end":{"line":119,"column":67}},"25":{"start":{"line":120,"column":2},"end":{"line":127,"column":null}},"26":{"start":{"line":126,"column":3},"end":{"line":126,"column":26}},"27":{"start":{"line":129,"column":2},"end":{"line":129,"column":57}},"28":{"start":{"line":133,"column":2},"end":{"line":148,"column":null}},"29":{"start":{"line":135,"column":28},"end":{"line":135,"column":52}},"30":{"start":{"line":136,"column":20},"end":{"line":136,"column":57}},"31":{"start":{"line":137,"column":4},"end":{"line":137,"column":41}},"32":{"start":{"line":142,"column":20},"end":{"line":142,"column":49}},"33":{"start":{"line":143,"column":4},"end":{"line":143,"column":41}},"34":{"start":{"line":146,"column":4},"end":{"line":146,"column":52}},"35":{"start":{"line":152,"column":2},"end":{"line":152,"column":35}},"36":{"start":{"line":161,"column":21},"end":{"line":161,"column":24}},"37":{"start":{"line":164,"column":2},"end":{"line":164,"column":44}},"38":{"start":{"line":168,"column":2},"end":{"line":168,"column":55}},"39":{"start":{"line":172,"column":2},"end":{"line":175,"column":null}},"40":{"start":{"line":173,"column":24},"end":{"line":173,"column":46}},"41":{"start":{"line":174,"column":3},"end":{"line":174,"column":57}},"42":{"start":{"line":176,"column":2},"end":{"line":176,"column":22}},"43":{"start":{"line":80,"column":0},"end":{"line":80,"column":13}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":17,"column":16},"end":{"line":17,"column":34}},"loc":{"start":{"line":17,"column":69},"end":{"line":31,"column":1}}},"1":{"name":"(anonymous_7)","decl":{"start":{"line":39,"column":30},"end":{"line":39,"column":31}},"loc":{"start":{"line":40,"column":1},"end":{"line":40,"column":39}}},"2":{"name":"(anonymous_8)","decl":{"start":{"line":49,"column":30},"end":{"line":49,"column":31}},"loc":{"start":{"line":50,"column":1},"end":{"line":50,"column":40}}},"3":{"name":"isArrayBuffer","decl":{"start":{"line":64,"column":16},"end":{"line":64,"column":29}},"loc":{"start":{"line":64,"column":38},"end":{"line":75,"column":1}}},"4":{"name":"(anonymous_10)","decl":{"start":{"line":88,"column":8},"end":{"line":88,"column":16}},"loc":{"start":{"line":88,"column":34},"end":{"line":90,"column":2}}},"5":{"name":"(anonymous_11)","decl":{"start":{"line":97,"column":1},"end":{"line":97,"column":7}},"loc":{"start":{"line":97,"column":46},"end":{"line":111,"column":2}}},"6":{"name":"(anonymous_12)","decl":{"start":{"line":113,"column":1},"end":{"line":113,"column":7}},"loc":{"start":{"line":116,"column":21},"end":{"line":130,"column":2}}},"7":{"name":"(anonymous_13)","decl":{"start":{"line":132,"column":1},"end":{"line":132,"column":7}},"loc":{"start":{"line":132,"column":49},"end":{"line":149,"column":2}}},"8":{"name":"(anonymous_14)","decl":{"start":{"line":151,"column":1},"end":{"line":151,"column":7}},"loc":{"start":{"line":151,"column":25},"end":{"line":153,"column":2}}},"9":{"name":"(anonymous_15)","decl":{"start":{"line":160,"column":9},"end":{"line":160,"column":15}},"loc":{"start":{"line":160,"column":42},"end":{"line":177,"column":2}}}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":2},"end":{"line":21,"column":null}},"type":"switch","locations":[{"start":{"line":19,"column":2},"end":{"line":21,"column":null}},{"start":{"line":22,"column":2},"end":{"line":22,"column":14}},{"start":{"line":23,"column":2},"end":{"line":23,"column":15}},{"start":{"line":24,"column":2},"end":{"line":26,"column":null}},{"start":{"line":27,"column":2},"end":{"line":29,"column":null}}]},"1":{"loc":{"start":{"line":67,"column":2},"end":{"line":67,"column":28}},"type":"binary-expr","locations":[{"start":{"line":67,"column":2},"end":{"line":67,"column":28}},{"start":{"line":68,"column":3},"end":{"line":68,"column":28}},{"start":{"line":69,"column":3},"end":{"line":69,"column":17}},{"start":{"line":70,"column":3},"end":{"line":70,"column":39}},{"start":{"line":71,"column":3},"end":{"line":71,"column":36}},{"start":{"line":72,"column":3},"end":{"line":72,"column":33}},{"start":{"line":73,"column":3},"end":{"line":73,"column":29}}]},"2":{"loc":{"start":{"line":98,"column":2},"end":{"line":110,"column":null}},"type":"if","locations":[{"start":{"line":98,"column":2},"end":{"line":110,"column":null}},{"start":{"line":98,"column":2},"end":{"line":110,"column":null}}]},"3":{"loc":{"start":{"line":101,"column":9},"end":{"line":110,"column":null}},"type":"if","locations":[{"start":{"line":101,"column":9},"end":{"line":110,"column":null}},{"start":{"line":101,"column":9},"end":{"line":110,"column":null}}]},"4":{"loc":{"start":{"line":101,"column":13},"end":{"line":101,"column":27}},"type":"binary-expr","locations":[{"start":{"line":101,"column":13},"end":{"line":101,"column":27}},{"start":{"line":101,"column":31},"end":{"line":101,"column":56}},{"start":{"line":101,"column":60},"end":{"line":101,"column":87}}]},"5":{"loc":{"start":{"line":106,"column":9},"end":{"line":110,"column":null}},"type":"if","locations":[{"start":{"line":106,"column":9},"end":{"line":110,"column":null}},{"start":{"line":106,"column":9},"end":{"line":110,"column":null}}]},"6":{"loc":{"start":{"line":118,"column":17},"end":{"line":118,"column":27}},"type":"cond-expr","locations":[{"start":{"line":118,"column":17},"end":{"line":118,"column":27}},{"start":{"line":118,"column":31},"end":{"line":118,"column":32}}]},"7":{"loc":{"start":{"line":118,"column":17},"end":{"line":118,"column":31}},"type":"binary-expr","locations":[{"start":{"line":118,"column":17},"end":{"line":118,"column":31}},{"start":{"line":118,"column":17},"end":{"line":118,"column":31}}]},"8":{"loc":{"start":{"line":119,"column":22},"end":{"line":119,"column":32}},"type":"cond-expr","locations":[{"start":{"line":119,"column":22},"end":{"line":119,"column":32}},{"start":{"line":119,"column":36},"end":{"line":119,"column":67}}]},"9":{"loc":{"start":{"line":119,"column":22},"end":{"line":119,"column":36}},"type":"binary-expr","locations":[{"start":{"line":119,"column":22},"end":{"line":119,"column":36}},{"start":{"line":119,"column":22},"end":{"line":119,"column":36}}]},"10":{"loc":{"start":{"line":120,"column":2},"end":{"line":127,"column":null}},"type":"if","locations":[{"start":{"line":120,"column":2},"end":{"line":127,"column":null}},{"start":{"line":120,"column":2},"end":{"line":127,"column":null}}]},"11":{"loc":{"start":{"line":121,"column":3},"end":{"line":121,"column":13}},"type":"binary-expr","locations":[{"start":{"line":121,"column":3},"end":{"line":121,"column":13}},{"start":{"line":122,"column":3},"end":{"line":122,"column":34}},{"start":{"line":123,"column":3},"end":{"line":123,"column":18}},{"start":{"line":124,"column":3},"end":{"line":124,"column":48}}]},"12":{"loc":{"start":{"line":134,"column":3},"end":{"line":138,"column":null}},"type":"switch","locations":[{"start":{"line":134,"column":3},"end":{"line":138,"column":null}},{"start":{"line":139,"column":3},"end":{"line":139,"column":15}},{"start":{"line":140,"column":3},"end":{"line":140,"column":16}},{"start":{"line":141,"column":3},"end":{"line":144,"column":null}},{"start":{"line":145,"column":3},"end":{"line":147,"column":null}}]},"13":{"loc":{"start":{"line":172,"column":2},"end":{"line":175,"column":null}},"type":"if","locations":[{"start":{"line":172,"column":2},"end":{"line":175,"column":null}},{"start":{"line":172,"column":2},"end":{"line":175,"column":null}}]}},"s":{"0":1,"1":74,"2":33,"3":41,"4":0,"5":1,"6":1,"7":4,"8":1,"9":1,"10":22,"11":1,"12":42,"13":42,"14":1,"15":72,"16":66,"17":32,"18":34,"19":26,"20":8,"21":8,"22":0,"23":34,"24":34,"25":34,"26":0,"27":34,"28":32,"29":17,"30":17,"31":17,"32":15,"33":15,"34":0,"35":0,"36":17,"37":17,"38":17,"39":17,"40":9,"41":9,"42":17,"43":1},"f":{"0":74,"1":4,"2":22,"3":42,"4":72,"5":66,"6":34,"7":32,"8":0,"9":17},"b":{"0":[33,16,18,41,0],"1":[42,8,0,0,0,0,0],"2":[32,34],"3":[26,8],"4":[34,34,34],"5":[8,0],"6":[26,8],"7":[34,34],"8":[26,8],"9":[34,34],"10":[0,34],"11":[34,34,34,34],"12":[17,2,2,15,0],"13":[9,8]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts","statementMap":{"0":{"start":{"line":21,"column":13},"end":{"line":21,"column":32}},"1":{"start":{"line":34,"column":1},"end":{"line":34,"column":92}},"2":{"start":{"line":32,"column":0},"end":{"line":32,"column":16}},"3":{"start":{"line":42,"column":13},"end":{"line":42,"column":44}},"4":{"start":{"line":46,"column":1},"end":{"line":48,"column":70}},"5":{"start":{"line":41,"column":0},"end":{"line":41,"column":16}},"6":{"start":{"line":58,"column":30},"end":{"line":59,"column":40}},"7":{"start":{"line":59,"column":1},"end":{"line":59,"column":40}},"8":{"start":{"line":58,"column":13},"end":{"line":58,"column":30}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":32,"column":16},"end":{"line":32,"column":34}},"loc":{"start":{"line":32,"column":69},"end":{"line":35,"column":1}}},"1":{"name":"stringToBuffer","decl":{"start":{"line":41,"column":16},"end":{"line":41,"column":30}},"loc":{"start":{"line":41,"column":62},"end":{"line":49,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":58,"column":30},"end":{"line":58,"column":31}},"loc":{"start":{"line":59,"column":1},"end":{"line":59,"column":40}}}},"branchMap":{"0":{"loc":{"start":{"line":34,"column":31},"end":{"line":34,"column":53}},"type":"cond-expr","locations":[{"start":{"line":34,"column":31},"end":{"line":34,"column":53}},{"start":{"line":34,"column":56},"end":{"line":34,"column":91}}]},"1":{"loc":{"start":{"line":47,"column":4},"end":{"line":47,"column":14}},"type":"cond-expr","locations":[{"start":{"line":47,"column":4},"end":{"line":47,"column":14}},{"start":{"line":48,"column":4},"end":{"line":48,"column":69}}]}},"s":{"0":1,"1":2,"2":1,"3":4,"4":4,"5":1,"6":1,"7":22,"8":1},"f":{"0":2,"1":4,"2":22},"b":{"0":[0,2],"1":[0,4]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/hashFileNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/hashFileNode.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":31}},"1":{"start":{"line":9,"column":0},"end":{"line":9,"column":35}},"2":{"start":{"line":30,"column":1},"end":{"line":39,"column":null}},"3":{"start":{"line":32,"column":3},"end":{"line":32,"column":23}},"4":{"start":{"line":33,"column":3},"end":{"line":33,"column":9}},"5":{"start":{"line":36,"column":3},"end":{"line":36,"column":25}},"6":{"start":{"line":37,"column":3},"end":{"line":37,"column":9}},"7":{"start":{"line":40,"column":1},"end":{"line":40,"column":59}},"8":{"start":{"line":23,"column":0},"end":{"line":23,"column":7}},"9":{"start":{"line":51,"column":14},"end":{"line":51,"column":29}},"10":{"start":{"line":52,"column":20},"end":{"line":52,"column":70}},"11":{"start":{"line":53,"column":16},"end":{"line":53,"column":26}},"12":{"start":{"line":54,"column":1},"end":{"line":54,"column":71}},"13":{"start":{"line":50,"column":0},"end":{"line":50,"column":7}}},"fnMap":{"0":{"name":"hashFile","decl":{"start":{"line":23,"column":22},"end":{"line":23,"column":30}},"loc":{"start":{"line":26,"column":39},"end":{"line":41,"column":1}}},"1":{"name":"gitHashFile","decl":{"start":{"line":50,"column":22},"end":{"line":50,"column":33}},"loc":{"start":{"line":50,"column":49},"end":{"line":55,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":25,"column":34},"end":{"line":25,"column":41}},"type":"default-arg","locations":[{"start":{"line":25,"column":34},"end":{"line":25,"column":41}}]},"1":{"loc":{"start":{"line":26,"column":34},"end":{"line":26,"column":39}},"type":"default-arg","locations":[{"start":{"line":26,"column":34},"end":{"line":26,"column":39}}]},"2":{"loc":{"start":{"line":31,"column":2},"end":{"line":34,"column":null}},"type":"switch","locations":[{"start":{"line":31,"column":2},"end":{"line":34,"column":null}},{"start":{"line":35,"column":2},"end":{"line":38,"column":null}}]}},"s":{"0":1,"1":1,"2":3,"3":1,"4":1,"5":2,"6":2,"7":3,"8":1,"9":6,"10":6,"11":6,"12":6,"13":1},"f":{"0":3,"1":6},"b":{"0":[0],"1":[1],"2":[1,2]}} | ||
{"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferBrowser.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"1":{"start":{"line":20,"column":1},"end":{"line":32,"column":null}},"2":{"start":{"line":22,"column":3},"end":{"line":22,"column":38}},"3":{"start":{"line":27,"column":3},"end":{"line":27,"column":40}},"4":{"start":{"line":30,"column":3},"end":{"line":30,"column":51}},"5":{"start":{"line":19,"column":0},"end":{"line":19,"column":16}},"6":{"start":{"line":43,"column":30},"end":{"line":44,"column":39}},"7":{"start":{"line":44,"column":1},"end":{"line":44,"column":39}},"8":{"start":{"line":43,"column":13},"end":{"line":43,"column":30}},"9":{"start":{"line":55,"column":30},"end":{"line":56,"column":40}},"10":{"start":{"line":56,"column":1},"end":{"line":56,"column":40}},"11":{"start":{"line":55,"column":13},"end":{"line":55,"column":30}},"12":{"start":{"line":73,"column":15},"end":{"line":73,"column":78}},"13":{"start":{"line":74,"column":1},"end":{"line":82,"column":3}},"14":{"start":{"line":72,"column":0},"end":{"line":72,"column":16}},"15":{"start":{"line":99,"column":2},"end":{"line":99,"column":44}},"16":{"start":{"line":108,"column":2},"end":{"line":120,"column":null}},"17":{"start":{"line":109,"column":3},"end":{"line":109,"column":78}},"18":{"start":{"line":111,"column":9},"end":{"line":120,"column":null}},"19":{"start":{"line":115,"column":3},"end":{"line":115,"column":86}},"20":{"start":{"line":116,"column":9},"end":{"line":120,"column":null}},"21":{"start":{"line":117,"column":3},"end":{"line":117,"column":91}},"22":{"start":{"line":119,"column":3},"end":{"line":119,"column":25}},"23":{"start":{"line":128,"column":17},"end":{"line":128,"column":32}},"24":{"start":{"line":129,"column":22},"end":{"line":129,"column":67}},"25":{"start":{"line":130,"column":2},"end":{"line":137,"column":null}},"26":{"start":{"line":136,"column":3},"end":{"line":136,"column":26}},"27":{"start":{"line":139,"column":2},"end":{"line":139,"column":57}},"28":{"start":{"line":143,"column":2},"end":{"line":158,"column":null}},"29":{"start":{"line":145,"column":28},"end":{"line":145,"column":52}},"30":{"start":{"line":146,"column":20},"end":{"line":146,"column":57}},"31":{"start":{"line":147,"column":4},"end":{"line":147,"column":41}},"32":{"start":{"line":152,"column":20},"end":{"line":152,"column":49}},"33":{"start":{"line":153,"column":4},"end":{"line":153,"column":41}},"34":{"start":{"line":156,"column":4},"end":{"line":156,"column":52}},"35":{"start":{"line":162,"column":2},"end":{"line":162,"column":35}},"36":{"start":{"line":171,"column":21},"end":{"line":171,"column":24}},"37":{"start":{"line":174,"column":2},"end":{"line":174,"column":44}},"38":{"start":{"line":178,"column":2},"end":{"line":178,"column":55}},"39":{"start":{"line":182,"column":2},"end":{"line":185,"column":null}},"40":{"start":{"line":183,"column":24},"end":{"line":183,"column":46}},"41":{"start":{"line":184,"column":3},"end":{"line":184,"column":57}},"42":{"start":{"line":186,"column":2},"end":{"line":186,"column":22}},"43":{"start":{"line":90,"column":0},"end":{"line":90,"column":13}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":19,"column":16},"end":{"line":19,"column":34}},"loc":{"start":{"line":19,"column":69},"end":{"line":33,"column":1}}},"1":{"name":"(anonymous_7)","decl":{"start":{"line":43,"column":30},"end":{"line":43,"column":31}},"loc":{"start":{"line":44,"column":1},"end":{"line":44,"column":39}}},"2":{"name":"(anonymous_8)","decl":{"start":{"line":55,"column":30},"end":{"line":55,"column":31}},"loc":{"start":{"line":56,"column":1},"end":{"line":56,"column":40}}},"3":{"name":"isArrayBuffer","decl":{"start":{"line":72,"column":16},"end":{"line":72,"column":29}},"loc":{"start":{"line":72,"column":38},"end":{"line":83,"column":1}}},"4":{"name":"(anonymous_10)","decl":{"start":{"line":98,"column":8},"end":{"line":98,"column":16}},"loc":{"start":{"line":98,"column":34},"end":{"line":100,"column":2}}},"5":{"name":"(anonymous_11)","decl":{"start":{"line":107,"column":1},"end":{"line":107,"column":7}},"loc":{"start":{"line":107,"column":46},"end":{"line":121,"column":2}}},"6":{"name":"(anonymous_12)","decl":{"start":{"line":123,"column":1},"end":{"line":123,"column":7}},"loc":{"start":{"line":126,"column":21},"end":{"line":140,"column":2}}},"7":{"name":"(anonymous_13)","decl":{"start":{"line":142,"column":1},"end":{"line":142,"column":7}},"loc":{"start":{"line":142,"column":49},"end":{"line":159,"column":2}}},"8":{"name":"(anonymous_14)","decl":{"start":{"line":161,"column":1},"end":{"line":161,"column":7}},"loc":{"start":{"line":161,"column":25},"end":{"line":163,"column":2}}},"9":{"name":"(anonymous_15)","decl":{"start":{"line":170,"column":9},"end":{"line":170,"column":15}},"loc":{"start":{"line":170,"column":42},"end":{"line":187,"column":2}}}},"branchMap":{"0":{"loc":{"start":{"line":20,"column":1},"end":{"line":32,"column":null}},"type":"switch","locations":[{"start":{"line":21,"column":2},"end":{"line":23,"column":null}},{"start":{"line":24,"column":2},"end":{"line":24,"column":14}},{"start":{"line":25,"column":2},"end":{"line":25,"column":15}},{"start":{"line":26,"column":2},"end":{"line":28,"column":null}},{"start":{"line":29,"column":2},"end":{"line":31,"column":null}}]},"1":{"loc":{"start":{"line":75,"column":2},"end":{"line":81,"column":30}},"type":"binary-expr","locations":[{"start":{"line":75,"column":2},"end":{"line":75,"column":28}},{"start":{"line":76,"column":3},"end":{"line":76,"column":28}},{"start":{"line":77,"column":3},"end":{"line":77,"column":17}},{"start":{"line":78,"column":3},"end":{"line":78,"column":39}},{"start":{"line":79,"column":3},"end":{"line":79,"column":36}},{"start":{"line":80,"column":3},"end":{"line":80,"column":33}},{"start":{"line":81,"column":3},"end":{"line":81,"column":29}}]},"2":{"loc":{"start":{"line":108,"column":2},"end":{"line":120,"column":null}},"type":"if","locations":[{"start":{"line":108,"column":2},"end":{"line":120,"column":null}},{"start":{"line":111,"column":9},"end":{"line":120,"column":null}}]},"3":{"loc":{"start":{"line":111,"column":9},"end":{"line":120,"column":null}},"type":"if","locations":[{"start":{"line":111,"column":9},"end":{"line":120,"column":null}},{"start":{"line":116,"column":9},"end":{"line":120,"column":null}}]},"4":{"loc":{"start":{"line":111,"column":13},"end":{"line":111,"column":87}},"type":"binary-expr","locations":[{"start":{"line":111,"column":13},"end":{"line":111,"column":27}},{"start":{"line":111,"column":31},"end":{"line":111,"column":56}},{"start":{"line":111,"column":60},"end":{"line":111,"column":87}}]},"5":{"loc":{"start":{"line":116,"column":9},"end":{"line":120,"column":null}},"type":"if","locations":[{"start":{"line":116,"column":9},"end":{"line":120,"column":null}},{"start":{"line":118,"column":9},"end":{"line":120,"column":null}}]},"6":{"loc":{"start":{"line":128,"column":17},"end":{"line":128,"column":32}},"type":"binary-expr","locations":[{"start":{"line":128,"column":17},"end":{"line":128,"column":27}},{"start":{"line":128,"column":31},"end":{"line":128,"column":32}}]},"7":{"loc":{"start":{"line":129,"column":22},"end":{"line":129,"column":67}},"type":"binary-expr","locations":[{"start":{"line":129,"column":22},"end":{"line":129,"column":32}},{"start":{"line":129,"column":36},"end":{"line":129,"column":67}}]},"8":{"loc":{"start":{"line":130,"column":2},"end":{"line":137,"column":null}},"type":"if","locations":[{"start":{"line":130,"column":2},"end":{"line":137,"column":null}}]},"9":{"loc":{"start":{"line":131,"column":3},"end":{"line":134,"column":48}},"type":"binary-expr","locations":[{"start":{"line":131,"column":3},"end":{"line":131,"column":13}},{"start":{"line":132,"column":3},"end":{"line":132,"column":34}},{"start":{"line":133,"column":3},"end":{"line":133,"column":18}},{"start":{"line":134,"column":3},"end":{"line":134,"column":48}}]},"10":{"loc":{"start":{"line":143,"column":2},"end":{"line":158,"column":null}},"type":"switch","locations":[{"start":{"line":144,"column":3},"end":{"line":148,"column":null}},{"start":{"line":149,"column":3},"end":{"line":149,"column":15}},{"start":{"line":150,"column":3},"end":{"line":150,"column":16}},{"start":{"line":151,"column":3},"end":{"line":154,"column":null}},{"start":{"line":155,"column":3},"end":{"line":157,"column":null}}]},"11":{"loc":{"start":{"line":182,"column":2},"end":{"line":185,"column":null}},"type":"if","locations":[{"start":{"line":182,"column":2},"end":{"line":185,"column":null}}]}},"s":{"0":1,"1":74,"2":33,"3":41,"4":0,"5":1,"6":1,"7":4,"8":1,"9":1,"10":22,"11":1,"12":42,"13":42,"14":1,"15":72,"16":66,"17":32,"18":34,"19":26,"20":8,"21":8,"22":0,"23":34,"24":34,"25":34,"26":0,"27":34,"28":32,"29":17,"30":17,"31":17,"32":15,"33":15,"34":0,"35":0,"36":17,"37":17,"38":17,"39":17,"40":9,"41":9,"42":17,"43":1},"f":{"0":74,"1":4,"2":22,"3":42,"4":72,"5":66,"6":34,"7":32,"8":0,"9":17},"b":{"0":[33,16,18,41,0],"1":[42,8,0,0,0,0,0],"2":[32,34],"3":[26,8],"4":[34,34,34],"5":[8,0],"6":[34,8],"7":[34,8],"8":[0],"9":[34,34,34,34],"10":[17,2,2,15,0],"11":[9]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/bufferNode.ts","statementMap":{"0":{"start":{"line":27,"column":13},"end":{"line":27,"column":32}},"1":{"start":{"line":46,"column":1},"end":{"line":46,"column":92}},"2":{"start":{"line":44,"column":0},"end":{"line":44,"column":16}},"3":{"start":{"line":56,"column":13},"end":{"line":56,"column":44}},"4":{"start":{"line":60,"column":1},"end":{"line":62,"column":70}},"5":{"start":{"line":55,"column":0},"end":{"line":55,"column":16}},"6":{"start":{"line":74,"column":30},"end":{"line":75,"column":40}},"7":{"start":{"line":75,"column":1},"end":{"line":75,"column":40}},"8":{"start":{"line":74,"column":13},"end":{"line":74,"column":30}}},"fnMap":{"0":{"name":"Uint8ArrayToString","decl":{"start":{"line":44,"column":16},"end":{"line":44,"column":34}},"loc":{"start":{"line":44,"column":69},"end":{"line":47,"column":1}}},"1":{"name":"stringToBuffer","decl":{"start":{"line":55,"column":16},"end":{"line":55,"column":30}},"loc":{"start":{"line":55,"column":62},"end":{"line":63,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":74,"column":30},"end":{"line":74,"column":31}},"loc":{"start":{"line":75,"column":1},"end":{"line":75,"column":40}}}},"branchMap":{"0":{"loc":{"start":{"line":46,"column":8},"end":{"line":46,"column":91}},"type":"cond-expr","locations":[{"start":{"line":46,"column":31},"end":{"line":46,"column":53}},{"start":{"line":46,"column":56},"end":{"line":46,"column":91}}]},"1":{"loc":{"start":{"line":60,"column":8},"end":{"line":62,"column":69}},"type":"cond-expr","locations":[{"start":{"line":61,"column":4},"end":{"line":61,"column":14}},{"start":{"line":62,"column":4},"end":{"line":62,"column":69}}]}},"s":{"0":1,"1":2,"2":1,"3":4,"4":4,"5":1,"6":1,"7":22,"8":1},"f":{"0":2,"1":4,"2":22},"b":{"0":[0,2],"1":[0,4]}} | ||
,"/mnt/vss/_work/1/s/common/lib/common-utils/src/hashFileNode.ts": {"path":"/mnt/vss/_work/1/s/common/lib/common-utils/src/hashFileNode.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":31}},"1":{"start":{"line":9,"column":0},"end":{"line":9,"column":35}},"2":{"start":{"line":32,"column":1},"end":{"line":41,"column":null}},"3":{"start":{"line":34,"column":3},"end":{"line":34,"column":23}},"4":{"start":{"line":35,"column":3},"end":{"line":35,"column":9}},"5":{"start":{"line":38,"column":3},"end":{"line":38,"column":25}},"6":{"start":{"line":39,"column":3},"end":{"line":39,"column":9}},"7":{"start":{"line":42,"column":1},"end":{"line":42,"column":59}},"8":{"start":{"line":25,"column":0},"end":{"line":25,"column":7}},"9":{"start":{"line":55,"column":14},"end":{"line":55,"column":29}},"10":{"start":{"line":56,"column":20},"end":{"line":56,"column":70}},"11":{"start":{"line":57,"column":16},"end":{"line":57,"column":26}},"12":{"start":{"line":58,"column":1},"end":{"line":58,"column":71}},"13":{"start":{"line":54,"column":0},"end":{"line":54,"column":7}}},"fnMap":{"0":{"name":"hashFile","decl":{"start":{"line":25,"column":22},"end":{"line":25,"column":30}},"loc":{"start":{"line":28,"column":39},"end":{"line":43,"column":1}}},"1":{"name":"gitHashFile","decl":{"start":{"line":54,"column":22},"end":{"line":54,"column":33}},"loc":{"start":{"line":54,"column":49},"end":{"line":59,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":27,"column":1},"end":{"line":27,"column":41}},"type":"default-arg","locations":[{"start":{"line":27,"column":34},"end":{"line":27,"column":41}}]},"1":{"loc":{"start":{"line":28,"column":1},"end":{"line":28,"column":39}},"type":"default-arg","locations":[{"start":{"line":28,"column":34},"end":{"line":28,"column":39}}]},"2":{"loc":{"start":{"line":32,"column":1},"end":{"line":41,"column":null}},"type":"switch","locations":[{"start":{"line":33,"column":2},"end":{"line":36,"column":null}},{"start":{"line":37,"column":2},"end":{"line":40,"column":null}}]}},"s":{"0":1,"1":1,"2":3,"3":1,"4":1,"5":2,"6":2,"7":3,"8":1,"9":6,"10":6,"11":6,"12":6,"13":1},"f":{"0":3,"1":6},"b":{"0":[0],"1":[1],"2":[1,2]}} | ||
} |
@@ -66,2 +66,10 @@ /* eslint-disable */ | ||
return function jump(event) { | ||
if ( | ||
document.getElementById('fileSearch') === document.activeElement && | ||
document.activeElement != null | ||
) { | ||
// if we're currently focused on the search input, we don't want to navigate | ||
return; | ||
} | ||
switch (event.which) { | ||
@@ -68,0 +76,0 @@ case 78: // n |
@@ -27,2 +27,27 @@ /* eslint-disable */ | ||
function onFilterInput() { | ||
const searchValue = document.getElementById('fileSearch').value; | ||
const rows = document.getElementsByTagName('tbody')[0].children; | ||
for (let i = 0; i < rows.length; i++) { | ||
const row = rows[i]; | ||
if ( | ||
row.textContent | ||
.toLowerCase() | ||
.includes(searchValue.toLowerCase()) | ||
) { | ||
row.style.display = ''; | ||
} else { | ||
row.style.display = 'none'; | ||
} | ||
} | ||
} | ||
// loads the search box | ||
function addSearchBox() { | ||
var template = document.getElementById('filterTemplate'); | ||
var templateClone = template.content.cloneNode(true); | ||
templateClone.getElementById('fileSearch').oninput = onFilterInput; | ||
template.parentElement.appendChild(templateClone); | ||
} | ||
// loads all columns | ||
@@ -166,2 +191,3 @@ function loadColumns() { | ||
loadData(); | ||
addSearchBox(); | ||
addSortIndicators(); | ||
@@ -168,0 +194,0 @@ enableUI(); |
@@ -6,11 +6,14 @@ /*! | ||
/** | ||
* A browser friendly version of the node assert library. Use this instead of the 'assert' package, which has a big | ||
* impact on bundle sizes. | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually: use a string. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
//# sourceMappingURL=assert.d.ts.map |
@@ -9,9 +9,12 @@ "use strict"; | ||
/** | ||
* A browser friendly version of the node assert library. Use this instead of the 'assert' package, which has a big | ||
* impact on bundle sizes. | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually: use a string. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -18,0 +21,0 @@ function assert(condition, message) { |
@@ -8,2 +8,4 @@ /*! | ||
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -14,2 +16,4 @@ export declare const fromBase64ToUtf8: (input: string) => string; | ||
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -22,4 +26,6 @@ export declare const fromUtf8ToBase64: (input: string) => string; | ||
* @param encoding - The source string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const toUtf8: (input: string, encoding: string) => string; | ||
//# sourceMappingURL=base64Encoding.d.ts.map |
@@ -12,2 +12,4 @@ "use strict"; | ||
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -19,2 +21,4 @@ const fromBase64ToUtf8 = (input) => indexNode_1.IsoBuffer.from(input, "base64").toString("utf-8"); | ||
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -28,2 +32,4 @@ const fromUtf8ToBase64 = (input) => indexNode_1.IsoBuffer.from(input, "utf8").toString("base64"); | ||
* @param encoding - The source string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -30,0 +36,0 @@ const toUtf8 = (input, encoding) => { |
@@ -13,2 +13,4 @@ /*! | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -21,2 +23,4 @@ export declare function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string; | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -30,2 +34,4 @@ export declare const stringToBuffer: (input: string, encoding: string) => ArrayBufferLike; | ||
* @returns the blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -44,2 +50,4 @@ export declare const bufferToString: (blob: ArrayBufferLike, encoding: string) => string; | ||
* @param obj - The object to determine if it is an ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -49,2 +57,4 @@ export declare function isArrayBuffer(obj: any): obj is ArrayBuffer; | ||
* Minimal implementation of Buffer for our usages in the browser environment. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -51,0 +61,0 @@ export declare class IsoBuffer extends Uint8Array { |
@@ -36,2 +36,4 @@ "use strict"; | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -59,2 +61,4 @@ function Uint8ArrayToString(arr, encoding) { | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -69,2 +73,4 @@ const stringToBuffer = (input, encoding) => IsoBuffer.from(input, encoding).buffer; | ||
* @returns the blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -84,2 +90,4 @@ const bufferToString = (blob, encoding) => IsoBuffer.from(blob).toString(encoding); | ||
* @param obj - The object to determine if it is an ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -99,2 +107,4 @@ function isArrayBuffer(obj) { | ||
* Minimal implementation of Buffer for our usages in the browser environment. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -136,4 +146,4 @@ class IsoBuffer extends Uint8Array { | ||
static fromArrayBuffer(arrayBuffer, byteOffset, byteLength) { | ||
const offset = byteOffset !== null && byteOffset !== void 0 ? byteOffset : 0; | ||
const validLength = byteLength !== null && byteLength !== void 0 ? byteLength : arrayBuffer.byteLength - offset; | ||
const offset = byteOffset ?? 0; | ||
const validLength = byteLength ?? arrayBuffer.byteLength - offset; | ||
if (offset < 0 || | ||
@@ -140,0 +150,0 @@ offset > arrayBuffer.byteLength || |
@@ -9,2 +9,4 @@ /*! | ||
* of the browser implementation, so any changes made in one should be made in both. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -21,3 +23,9 @@ export declare class Buffer extends Uint8Array { | ||
} | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const IsoBuffer: typeof Buffer; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare type IsoBuffer = Buffer; | ||
@@ -31,2 +39,4 @@ /** | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -37,2 +47,4 @@ export declare function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string; | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -46,4 +58,6 @@ export declare function stringToBuffer(input: string, encoding: string): ArrayBufferLike; | ||
* @returns The blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const bufferToString: (blob: ArrayBufferLike, encoding: string) => string; | ||
//# sourceMappingURL=bufferNode.d.ts.map |
@@ -8,2 +8,5 @@ "use strict"; | ||
exports.bufferToString = exports.stringToBuffer = exports.Uint8ArrayToString = exports.IsoBuffer = void 0; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
exports.IsoBuffer = Buffer; | ||
@@ -17,2 +20,4 @@ /** | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -27,2 +32,4 @@ function Uint8ArrayToString(arr, encoding) { | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -45,2 +52,4 @@ function stringToBuffer(input, encoding) { | ||
* @returns The blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -47,0 +56,0 @@ const bufferToString = (blob, encoding) => exports.IsoBuffer.from(blob).toString(encoding); |
@@ -8,4 +8,6 @@ /*! | ||
* @param array - Array to convert to ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare function Uint8ArrayToArrayBuffer(array: Uint8Array): ArrayBuffer; | ||
//# sourceMappingURL=bufferShared.d.ts.map |
@@ -11,2 +11,4 @@ "use strict"; | ||
* @param array - Array to convert to ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -13,0 +15,0 @@ function Uint8ArrayToArrayBuffer(array) { |
@@ -8,4 +8,6 @@ /*! | ||
* @param timeMs - Time in milliseconds to wait. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare const delay: (timeMs: number) => Promise<void>; | ||
//# sourceMappingURL=delay.d.ts.map |
@@ -11,2 +11,4 @@ "use strict"; | ||
* @param timeMs - Time in milliseconds to wait. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -13,0 +15,0 @@ const delay = async (timeMs) => new Promise((resolve) => setTimeout(() => resolve(), timeMs)); |
@@ -11,4 +11,10 @@ /*! | ||
* @throws Will throw an error if the item has already been disposed. | ||
* | ||
* @deprecated This function has no replacement. | ||
* | ||
* @privateremarks | ||
* This function is used in the container-loader package, so the implementation was moved there but it is no longer | ||
* exported. | ||
*/ | ||
export declare function doIfNotDisposed<T>(disposable: IDisposable, f: (...args: any[]) => T): (...args: any[]) => T; | ||
//# sourceMappingURL=disposal.d.ts.map |
@@ -13,2 +13,8 @@ "use strict"; | ||
* @throws Will throw an error if the item has already been disposed. | ||
* | ||
* @deprecated This function has no replacement. | ||
* | ||
* @privateremarks | ||
* This function is used in the container-loader package, so the implementation was moved there but it is no longer | ||
* exported. | ||
*/ | ||
@@ -15,0 +21,0 @@ function doIfNotDisposed(disposable, f) { |
@@ -12,2 +12,4 @@ /*! | ||
* but the primary source needs to stay intact. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -14,0 +16,0 @@ export declare class EventForwarder<TEvent = IEvent> extends TypedEventEmitter<TEvent> implements IDisposable { |
@@ -13,2 +13,4 @@ "use strict"; | ||
* but the primary source needs to stay intact. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -50,3 +52,3 @@ class EventForwarder extends typedEventEmitter_1.TypedEventEmitter { | ||
} | ||
catch (_a) { | ||
catch { | ||
// Should be fine because of removeAllListeners below | ||
@@ -81,3 +83,3 @@ } | ||
const sources = this.forwardingEvents.get(event); | ||
if ((sources === null || sources === void 0 ? void 0 : sources.has(source)) === true && this.listenerCount(event) === 0) { | ||
if (sources?.has(source) === true && this.listenerCount(event) === 0) { | ||
const listenerRemover = sources.get(source); | ||
@@ -84,0 +86,0 @@ if (listenerRemover !== undefined) { |
@@ -16,2 +16,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -25,4 +27,6 @@ export declare function hashFile(file: IsoBuffer, algorithm?: "SHA-1" | "SHA-256", hashEncoding?: "hex" | "base64"): Promise<string>; | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare function gitHashFile(file: IsoBuffer): Promise<string>; | ||
//# sourceMappingURL=hashFileBrowser.d.ts.map |
@@ -59,2 +59,4 @@ "use strict"; | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -83,2 +85,4 @@ async function hashFile(file, algorithm = "SHA-1", hashEncoding = "hex") { | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -85,0 +89,0 @@ async function gitHashFile(file) { |
@@ -16,2 +16,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -25,4 +27,6 @@ export declare function hashFile(file: IsoBuffer, algorithm?: "SHA-1" | "SHA-256", hashEncoding?: "hex" | "base64"): Promise<string>; | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare function gitHashFile(file: IsoBuffer): Promise<string>; | ||
//# sourceMappingURL=hashFileNode.d.ts.map |
@@ -25,2 +25,4 @@ "use strict"; | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -49,2 +51,4 @@ async function hashFile(file, algorithm = "SHA-1", hashEncoding = "hex") { | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -51,0 +55,0 @@ async function gitHashFile(file) { |
@@ -7,2 +7,4 @@ /*! | ||
* Interface for a comparer. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -23,2 +25,4 @@ export interface IComparer<T> { | ||
* A comparer for numbers. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -28,2 +32,4 @@ export declare const NumberComparer: IComparer<number>; | ||
* Interface to a node in {@link Heap}. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -36,2 +42,4 @@ export interface IHeapNode<T> { | ||
* Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -38,0 +46,0 @@ export declare class Heap<T> { |
@@ -10,2 +10,4 @@ "use strict"; | ||
* A comparer for numbers. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -25,2 +27,4 @@ exports.NumberComparer = { | ||
* Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -27,0 +31,0 @@ class Heap { |
@@ -11,4 +11,6 @@ /*! | ||
* @returns A promise pertaining to the callback that was passed in. | ||
* | ||
* @deprecated Not used outside this package. | ||
*/ | ||
export declare function scheduleIdleTask<T>(callback: () => T, timeout: number): Promise<T>; | ||
//# sourceMappingURL=idleTaskScheduler.d.ts.map |
@@ -14,2 +14,4 @@ "use strict"; | ||
* @returns A promise pertaining to the callback that was passed in. | ||
* | ||
* @deprecated Not used outside this package. | ||
*/ | ||
@@ -16,0 +18,0 @@ async function scheduleIdleTask(callback, timeout) { |
@@ -7,2 +7,4 @@ /*! | ||
* Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare class Lazy<T> { |
@@ -10,2 +10,4 @@ "use strict"; | ||
* Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -12,0 +14,0 @@ class Lazy { |
@@ -6,3 +6,6 @@ /*! | ||
import { IsomorphicPerformance } from "./performanceIsomorphic"; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const performance: IsomorphicPerformance; | ||
//# sourceMappingURL=performanceBrowser.d.ts.map |
@@ -8,3 +8,6 @@ "use strict"; | ||
exports.performance = void 0; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
exports.performance = globalThis.performance; | ||
//# sourceMappingURL=performanceBrowser.js.map |
@@ -8,4 +8,6 @@ /*! | ||
* of the intersecting properties of node and browser performance as required. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare type IsomorphicPerformance = Partial<Performance> & Pick<Performance, "clearMarks" | "mark" | "measure" | "now">; | ||
//# sourceMappingURL=performanceIsomorphic.d.ts.map |
@@ -6,3 +6,6 @@ /*! | ||
import { IsomorphicPerformance } from "./performanceIsomorphic"; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const performance: IsomorphicPerformance; | ||
//# sourceMappingURL=performanceNode.d.ts.map |
@@ -10,3 +10,6 @@ "use strict"; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
exports.performance = perf_hooks_1.performance; | ||
//# sourceMappingURL=performanceNode.js.map |
@@ -10,2 +10,4 @@ /*! | ||
* - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock) | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -20,2 +22,4 @@ export declare type PromiseCacheExpiry = { | ||
* Options for configuring the {@link PromiseCache} | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -31,2 +35,4 @@ export interface PromiseCacheOptions { | ||
* without fear of running it multiple times or losing track of errors. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -33,0 +39,0 @@ export declare class PromiseCache<TKey, TResult> { |
@@ -11,2 +11,4 @@ "use strict"; | ||
* Not exported. | ||
* | ||
* @deprecated Only used internally by the {@link PromiseCache} class. | ||
*/ | ||
@@ -54,2 +56,4 @@ class GarbageCollector { | ||
* without fear of running it multiple times or losing track of errors. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -56,0 +60,0 @@ class PromiseCache { |
@@ -7,2 +7,4 @@ /*! | ||
* A deferred creates a promise and the ability to resolve or reject it | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -43,2 +45,4 @@ export declare class Deferred<T> { | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -45,0 +49,0 @@ export declare class LazyPromise<T> implements Promise<T> { |
@@ -10,2 +10,4 @@ "use strict"; | ||
* A deferred creates a promise and the ability to resolve or reject it | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -63,2 +65,4 @@ class Deferred { | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -65,0 +69,0 @@ class LazyPromise { |
@@ -7,2 +7,4 @@ /*! | ||
* A range in the {@link RangeTracker} | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -16,2 +18,4 @@ export interface IRange { | ||
* A serialized version of the {@link RangeTracker} | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -29,2 +33,4 @@ export interface IRangeTrackerSnapshot { | ||
* Used by deli to keep track of the branch map | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -31,0 +37,0 @@ export declare class RangeTracker { |
@@ -20,2 +20,4 @@ "use strict"; | ||
* Used by deli to keep track of the branch map | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -22,0 +24,0 @@ class RangeTracker { |
@@ -7,2 +7,8 @@ /*! | ||
* A rate limiter to make sure that a client can only request help for one task within a time window. | ||
* | ||
* @deprecated This class has no replacement. | ||
* | ||
* @privateremarks | ||
* This class is not used anywhere in the repo. driver-utils already has a similar class that is used by the odsp and | ||
* routerlicious drivers. | ||
*/ | ||
@@ -9,0 +15,0 @@ export declare class RateLimiter { |
@@ -10,2 +10,8 @@ "use strict"; | ||
* A rate limiter to make sure that a client can only request help for one task within a time window. | ||
* | ||
* @deprecated This class has no replacement. | ||
* | ||
* @privateremarks | ||
* This class is not used anywhere in the repo. driver-utils already has a similar class that is used by the odsp and | ||
* routerlicious drivers. | ||
*/ | ||
@@ -12,0 +18,0 @@ class RateLimiter { |
@@ -12,4 +12,6 @@ /*! | ||
* @returns The result from `JSON.parse` if successful, otherwise `undefined`. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare function safelyParseJSON(json: string): any | undefined; | ||
//# sourceMappingURL=safeParser.d.ts.map |
@@ -15,2 +15,4 @@ "use strict"; | ||
* @returns The result from `JSON.parse` if successful, otherwise `undefined`. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -17,0 +19,0 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any |
@@ -5,2 +5,5 @@ /*! | ||
*/ | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export interface ITimer { | ||
@@ -29,2 +32,4 @@ /** | ||
* @returns The initial timeout | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -37,2 +42,4 @@ export declare function setLongTimeout(timeoutFn: () => void, timeoutMs: number, setTimeoutIdFn?: (timeoutId: ReturnType<typeof setTimeout>) => void): ReturnType<typeof setTimeout>; | ||
* or timeouts exceeding (2^31)-1 ms or approximately 24.8 days. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -73,2 +80,5 @@ export declare class Timer implements ITimer { | ||
} | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export interface IPromiseTimerResult { | ||
@@ -80,2 +90,4 @@ timerResult: "timeout" | "cancel"; | ||
* completes. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -94,2 +106,4 @@ export interface IPromiseTimer extends ITimer { | ||
* resolves when it times out. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -96,0 +110,0 @@ export declare class PromiseTimer implements IPromiseTimer { |
@@ -20,2 +20,4 @@ "use strict"; | ||
* @returns The initial timeout | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -32,3 +34,3 @@ function setLongTimeout(timeoutFn, timeoutMs, setTimeoutIdFn) { | ||
} | ||
setTimeoutIdFn === null || setTimeoutIdFn === void 0 ? void 0 : setTimeoutIdFn(timeoutId); | ||
setTimeoutIdFn?.(timeoutId); | ||
return timeoutId; | ||
@@ -42,2 +44,4 @@ } | ||
* or timeouts exceeding (2^31)-1 ms or approximately 24.8 days. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -84,3 +88,2 @@ class Timer { | ||
restart(ms, handler) { | ||
var _a, _b; | ||
if (!this.runningState) { | ||
@@ -91,4 +94,4 @@ // If restart is called first, it behaves as a call to start | ||
else { | ||
const duration = ms !== null && ms !== void 0 ? ms : this.runningState.intendedDuration; | ||
const handlerToUse = (_b = handler !== null && handler !== void 0 ? handler : (_a = this.runningState.restart) === null || _a === void 0 ? void 0 : _a.handler) !== null && _b !== void 0 ? _b : this.runningState.handler; | ||
const duration = ms ?? this.runningState.intendedDuration; | ||
const handlerToUse = handler ?? this.runningState.restart?.handler ?? this.runningState.handler; | ||
const remainingTime = this.calculateRemainingTime(this.runningState); | ||
@@ -157,2 +160,4 @@ if (duration < remainingTime) { | ||
* resolves when it times out. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -159,0 +164,0 @@ class PromiseTimer { |
@@ -8,2 +8,4 @@ /*! | ||
* Time measurements are in milliseconds as a floating point with a decimal | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -19,2 +21,4 @@ export declare class Trace { | ||
* Event in a performance trace including time elapsed. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -21,0 +25,0 @@ export interface ITraceEvent { |
@@ -12,2 +12,4 @@ "use strict"; | ||
* Time measurements are in milliseconds as a floating point with a decimal | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -14,0 +16,0 @@ class Trace { |
@@ -12,2 +12,4 @@ /*! | ||
* This type allow us to correctly handle either type | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -17,5 +19,10 @@ export declare type EventEmitterEventType = EventEmitter extends { | ||
} ? E : never; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare type TypedEventTransform<TThis, TEvent> = TransformedEvent<TThis, "newListener" | "removeListener", Parameters<(event: string, listener: (...args: any[]) => void) => void>> & IEventTransformer<TThis, TEvent & IEvent> & TransformedEvent<TThis, EventEmitterEventType, any[]>; | ||
/** | ||
* Event Emitter helper class the supports emitting typed events | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -22,0 +29,0 @@ export declare class TypedEventEmitter<TEvent> extends EventEmitter implements IEventProvider<TEvent & IEvent> { |
@@ -11,2 +11,4 @@ "use strict"; | ||
* Event Emitter helper class the supports emitting typed events | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -13,0 +15,0 @@ class TypedEventEmitter extends events_1.EventEmitter { |
@@ -9,4 +9,16 @@ /*! | ||
* to ensure that all cases are explicitly handled. | ||
* | ||
* Example: | ||
* ```typescript | ||
* const bool: true | false = ...; | ||
* switch(bool) { | ||
* case true: {...} | ||
* case false: {...} | ||
* default: unreachableCase(bool); | ||
* } | ||
* ``` | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare function unreachableCase(_: never, message?: string): never; | ||
//# sourceMappingURL=unreachable.d.ts.map |
@@ -12,2 +12,14 @@ "use strict"; | ||
* to ensure that all cases are explicitly handled. | ||
* | ||
* Example: | ||
* ```typescript | ||
* const bool: true | false = ...; | ||
* switch(bool) { | ||
* case true: {...} | ||
* case false: {...} | ||
* default: unreachableCase(bool); | ||
* } | ||
* ``` | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -14,0 +26,0 @@ function unreachableCase(_, message = "Unreachable Case") { |
@@ -6,11 +6,14 @@ /*! | ||
/** | ||
* A browser friendly version of the node assert library. Use this instead of the 'assert' package, which has a big | ||
* impact on bundle sizes. | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually: use a string. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare function assert(condition: boolean, message: string | number): asserts condition; | ||
//# sourceMappingURL=assert.d.ts.map |
@@ -6,9 +6,12 @@ /*! | ||
/** | ||
* A browser friendly version of the node assert library. Use this instead of the 'assert' package, which has a big | ||
* impact on bundle sizes. | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually: use a string. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -15,0 +18,0 @@ export function assert(condition, message) { |
@@ -8,2 +8,4 @@ /*! | ||
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -14,2 +16,4 @@ export declare const fromBase64ToUtf8: (input: string) => string; | ||
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -22,4 +26,6 @@ export declare const fromUtf8ToBase64: (input: string) => string; | ||
* @param encoding - The source string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const toUtf8: (input: string, encoding: string) => string; | ||
//# sourceMappingURL=base64Encoding.d.ts.map |
@@ -9,2 +9,4 @@ /*! | ||
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -15,2 +17,4 @@ export const fromBase64ToUtf8 = (input) => IsoBuffer.from(input, "base64").toString("utf-8"); | ||
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -23,2 +27,4 @@ export const fromUtf8ToBase64 = (input) => IsoBuffer.from(input, "utf8").toString("base64"); | ||
* @param encoding - The source string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -25,0 +31,0 @@ export const toUtf8 = (input, encoding) => { |
@@ -13,2 +13,4 @@ /*! | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -21,2 +23,4 @@ export declare function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string; | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -30,2 +34,4 @@ export declare const stringToBuffer: (input: string, encoding: string) => ArrayBufferLike; | ||
* @returns the blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -44,2 +50,4 @@ export declare const bufferToString: (blob: ArrayBufferLike, encoding: string) => string; | ||
* @param obj - The object to determine if it is an ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -49,2 +57,4 @@ export declare function isArrayBuffer(obj: any): obj is ArrayBuffer; | ||
* Minimal implementation of Buffer for our usages in the browser environment. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -51,0 +61,0 @@ export declare class IsoBuffer extends Uint8Array { |
@@ -14,2 +14,4 @@ /*! | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -36,2 +38,4 @@ export function Uint8ArrayToString(arr, encoding) { | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -45,2 +49,4 @@ export const stringToBuffer = (input, encoding) => IsoBuffer.from(input, encoding).buffer; | ||
* @returns the blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -59,2 +65,4 @@ export const bufferToString = (blob, encoding) => IsoBuffer.from(blob).toString(encoding); | ||
* @param obj - The object to determine if it is an ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -73,2 +81,4 @@ export function isArrayBuffer(obj) { | ||
* Minimal implementation of Buffer for our usages in the browser environment. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -110,4 +120,4 @@ export class IsoBuffer extends Uint8Array { | ||
static fromArrayBuffer(arrayBuffer, byteOffset, byteLength) { | ||
const offset = byteOffset !== null && byteOffset !== void 0 ? byteOffset : 0; | ||
const validLength = byteLength !== null && byteLength !== void 0 ? byteLength : arrayBuffer.byteLength - offset; | ||
const offset = byteOffset ?? 0; | ||
const validLength = byteLength ?? arrayBuffer.byteLength - offset; | ||
if (offset < 0 || | ||
@@ -114,0 +124,0 @@ offset > arrayBuffer.byteLength || |
@@ -9,2 +9,4 @@ /*! | ||
* of the browser implementation, so any changes made in one should be made in both. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -21,3 +23,9 @@ export declare class Buffer extends Uint8Array { | ||
} | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const IsoBuffer: typeof Buffer; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare type IsoBuffer = Buffer; | ||
@@ -31,2 +39,4 @@ /** | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -37,2 +47,4 @@ export declare function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string; | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -46,4 +58,6 @@ export declare function stringToBuffer(input: string, encoding: string): ArrayBufferLike; | ||
* @returns The blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const bufferToString: (blob: ArrayBufferLike, encoding: string) => string; | ||
//# sourceMappingURL=bufferNode.d.ts.map |
@@ -5,2 +5,5 @@ /*! | ||
*/ | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const IsoBuffer = Buffer; | ||
@@ -14,2 +17,4 @@ /** | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -23,2 +28,4 @@ export function Uint8ArrayToString(arr, encoding) { | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -40,4 +47,6 @@ export function stringToBuffer(input, encoding) { | ||
* @returns The blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const bufferToString = (blob, encoding) => IsoBuffer.from(blob).toString(encoding); | ||
//# sourceMappingURL=bufferNode.js.map |
@@ -8,4 +8,6 @@ /*! | ||
* @param array - Array to convert to ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare function Uint8ArrayToArrayBuffer(array: Uint8Array): ArrayBuffer; | ||
//# sourceMappingURL=bufferShared.d.ts.map |
@@ -8,2 +8,4 @@ /*! | ||
* @param array - Array to convert to ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -10,0 +12,0 @@ export function Uint8ArrayToArrayBuffer(array) { |
@@ -8,4 +8,6 @@ /*! | ||
* @param timeMs - Time in milliseconds to wait. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare const delay: (timeMs: number) => Promise<void>; | ||
//# sourceMappingURL=delay.d.ts.map |
@@ -8,4 +8,6 @@ /*! | ||
* @param timeMs - Time in milliseconds to wait. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export const delay = async (timeMs) => new Promise((resolve) => setTimeout(() => resolve(), timeMs)); | ||
//# sourceMappingURL=delay.js.map |
@@ -11,4 +11,10 @@ /*! | ||
* @throws Will throw an error if the item has already been disposed. | ||
* | ||
* @deprecated This function has no replacement. | ||
* | ||
* @privateremarks | ||
* This function is used in the container-loader package, so the implementation was moved there but it is no longer | ||
* exported. | ||
*/ | ||
export declare function doIfNotDisposed<T>(disposable: IDisposable, f: (...args: any[]) => T): (...args: any[]) => T; | ||
//# sourceMappingURL=disposal.d.ts.map |
@@ -10,2 +10,8 @@ /*! | ||
* @throws Will throw an error if the item has already been disposed. | ||
* | ||
* @deprecated This function has no replacement. | ||
* | ||
* @privateremarks | ||
* This function is used in the container-loader package, so the implementation was moved there but it is no longer | ||
* exported. | ||
*/ | ||
@@ -12,0 +18,0 @@ export function doIfNotDisposed(disposable, f) { |
@@ -12,2 +12,4 @@ /*! | ||
* but the primary source needs to stay intact. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -14,0 +16,0 @@ export declare class EventForwarder<TEvent = IEvent> extends TypedEventEmitter<TEvent> implements IDisposable { |
@@ -10,2 +10,4 @@ /*! | ||
* but the primary source needs to stay intact. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -47,3 +49,3 @@ export class EventForwarder extends TypedEventEmitter { | ||
} | ||
catch (_a) { | ||
catch { | ||
// Should be fine because of removeAllListeners below | ||
@@ -78,3 +80,3 @@ } | ||
const sources = this.forwardingEvents.get(event); | ||
if ((sources === null || sources === void 0 ? void 0 : sources.has(source)) === true && this.listenerCount(event) === 0) { | ||
if (sources?.has(source) === true && this.listenerCount(event) === 0) { | ||
const listenerRemover = sources.get(source); | ||
@@ -81,0 +83,0 @@ if (listenerRemover !== undefined) { |
@@ -16,2 +16,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -25,4 +27,6 @@ export declare function hashFile(file: IsoBuffer, algorithm?: "SHA-1" | "SHA-256", hashEncoding?: "hex" | "base64"): Promise<string>; | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare function gitHashFile(file: IsoBuffer): Promise<string>; | ||
//# sourceMappingURL=hashFileBrowser.d.ts.map |
@@ -37,2 +37,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -60,2 +62,4 @@ export async function hashFile(file, algorithm = "SHA-1", hashEncoding = "hex") { | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -62,0 +66,0 @@ export async function gitHashFile(file) { |
@@ -16,2 +16,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -25,4 +27,6 @@ export declare function hashFile(file: IsoBuffer, algorithm?: "SHA-1" | "SHA-256", hashEncoding?: "hex" | "base64"): Promise<string>; | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare function gitHashFile(file: IsoBuffer): Promise<string>; | ||
//# sourceMappingURL=hashFileNode.d.ts.map |
@@ -19,2 +19,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -42,2 +44,4 @@ export async function hashFile(file, algorithm = "SHA-1", hashEncoding = "hex") { | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -44,0 +48,0 @@ export async function gitHashFile(file) { |
@@ -7,2 +7,4 @@ /*! | ||
* Interface for a comparer. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -23,2 +25,4 @@ export interface IComparer<T> { | ||
* A comparer for numbers. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -28,2 +32,4 @@ export declare const NumberComparer: IComparer<number>; | ||
* Interface to a node in {@link Heap}. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -36,2 +42,4 @@ export interface IHeapNode<T> { | ||
* Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -38,0 +46,0 @@ export declare class Heap<T> { |
@@ -7,2 +7,4 @@ /*! | ||
* A comparer for numbers. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -22,2 +24,4 @@ export const NumberComparer = { | ||
* Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -24,0 +28,0 @@ export class Heap { |
@@ -11,4 +11,6 @@ /*! | ||
* @returns A promise pertaining to the callback that was passed in. | ||
* | ||
* @deprecated Not used outside this package. | ||
*/ | ||
export declare function scheduleIdleTask<T>(callback: () => T, timeout: number): Promise<T>; | ||
//# sourceMappingURL=idleTaskScheduler.d.ts.map |
@@ -11,2 +11,4 @@ /*! | ||
* @returns A promise pertaining to the callback that was passed in. | ||
* | ||
* @deprecated Not used outside this package. | ||
*/ | ||
@@ -13,0 +15,0 @@ export async function scheduleIdleTask(callback, timeout) { |
@@ -7,2 +7,4 @@ /*! | ||
* Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare class Lazy<T> { |
@@ -7,2 +7,4 @@ /*! | ||
* Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -9,0 +11,0 @@ export class Lazy { |
@@ -6,3 +6,6 @@ /*! | ||
import { IsomorphicPerformance } from "./performanceIsomorphic"; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const performance: IsomorphicPerformance; | ||
//# sourceMappingURL=performanceBrowser.d.ts.map |
@@ -5,3 +5,6 @@ /*! | ||
*/ | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const performance = globalThis.performance; | ||
//# sourceMappingURL=performanceBrowser.js.map |
@@ -8,4 +8,6 @@ /*! | ||
* of the intersecting properties of node and browser performance as required. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare type IsomorphicPerformance = Partial<Performance> & Pick<Performance, "clearMarks" | "mark" | "measure" | "now">; | ||
//# sourceMappingURL=performanceIsomorphic.d.ts.map |
@@ -6,3 +6,6 @@ /*! | ||
import { IsomorphicPerformance } from "./performanceIsomorphic"; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare const performance: IsomorphicPerformance; | ||
//# sourceMappingURL=performanceNode.d.ts.map |
@@ -7,3 +7,6 @@ /*! | ||
import { performance as nodePerformance } from "perf_hooks"; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const performance = nodePerformance; | ||
//# sourceMappingURL=performanceNode.js.map |
@@ -10,2 +10,4 @@ /*! | ||
* - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock) | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -20,2 +22,4 @@ export declare type PromiseCacheExpiry = { | ||
* Options for configuring the {@link PromiseCache} | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -31,2 +35,4 @@ export interface PromiseCacheOptions { | ||
* without fear of running it multiple times or losing track of errors. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -33,0 +39,0 @@ export declare class PromiseCache<TKey, TResult> { |
@@ -8,2 +8,4 @@ /*! | ||
* Not exported. | ||
* | ||
* @deprecated Only used internally by the {@link PromiseCache} class. | ||
*/ | ||
@@ -51,2 +53,4 @@ class GarbageCollector { | ||
* without fear of running it multiple times or losing track of errors. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -53,0 +57,0 @@ export class PromiseCache { |
@@ -7,2 +7,4 @@ /*! | ||
* A deferred creates a promise and the ability to resolve or reject it | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -43,2 +45,4 @@ export declare class Deferred<T> { | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -45,0 +49,0 @@ export declare class LazyPromise<T> implements Promise<T> { |
@@ -7,2 +7,4 @@ /*! | ||
* A deferred creates a promise and the ability to resolve or reject it | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -59,2 +61,4 @@ export class Deferred { | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -61,0 +65,0 @@ export class LazyPromise { |
@@ -7,2 +7,4 @@ /*! | ||
* A range in the {@link RangeTracker} | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -16,2 +18,4 @@ export interface IRange { | ||
* A serialized version of the {@link RangeTracker} | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -29,2 +33,4 @@ export interface IRangeTrackerSnapshot { | ||
* Used by deli to keep track of the branch map | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -31,0 +37,0 @@ export declare class RangeTracker { |
@@ -14,2 +14,4 @@ /*! | ||
* Used by deli to keep track of the branch map | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -16,0 +18,0 @@ export class RangeTracker { |
@@ -7,2 +7,8 @@ /*! | ||
* A rate limiter to make sure that a client can only request help for one task within a time window. | ||
* | ||
* @deprecated This class has no replacement. | ||
* | ||
* @privateremarks | ||
* This class is not used anywhere in the repo. driver-utils already has a similar class that is used by the odsp and | ||
* routerlicious drivers. | ||
*/ | ||
@@ -9,0 +15,0 @@ export declare class RateLimiter { |
@@ -7,2 +7,8 @@ /*! | ||
* A rate limiter to make sure that a client can only request help for one task within a time window. | ||
* | ||
* @deprecated This class has no replacement. | ||
* | ||
* @privateremarks | ||
* This class is not used anywhere in the repo. driver-utils already has a similar class that is used by the odsp and | ||
* routerlicious drivers. | ||
*/ | ||
@@ -9,0 +15,0 @@ export class RateLimiter { |
@@ -12,4 +12,6 @@ /*! | ||
* @returns The result from `JSON.parse` if successful, otherwise `undefined`. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare function safelyParseJSON(json: string): any | undefined; | ||
//# sourceMappingURL=safeParser.d.ts.map |
@@ -12,2 +12,4 @@ /*! | ||
* @returns The result from `JSON.parse` if successful, otherwise `undefined`. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -14,0 +16,0 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any |
@@ -5,2 +5,5 @@ /*! | ||
*/ | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export interface ITimer { | ||
@@ -29,2 +32,4 @@ /** | ||
* @returns The initial timeout | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -37,2 +42,4 @@ export declare function setLongTimeout(timeoutFn: () => void, timeoutMs: number, setTimeoutIdFn?: (timeoutId: ReturnType<typeof setTimeout>) => void): ReturnType<typeof setTimeout>; | ||
* or timeouts exceeding (2^31)-1 ms or approximately 24.8 days. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -73,2 +80,5 @@ export declare class Timer implements ITimer { | ||
} | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export interface IPromiseTimerResult { | ||
@@ -80,2 +90,4 @@ timerResult: "timeout" | "cancel"; | ||
* completes. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -94,2 +106,4 @@ export interface IPromiseTimer extends ITimer { | ||
* resolves when it times out. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -96,0 +110,0 @@ export declare class PromiseTimer implements IPromiseTimer { |
@@ -17,2 +17,4 @@ /*! | ||
* @returns The initial timeout | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -29,3 +31,3 @@ export function setLongTimeout(timeoutFn, timeoutMs, setTimeoutIdFn) { | ||
} | ||
setTimeoutIdFn === null || setTimeoutIdFn === void 0 ? void 0 : setTimeoutIdFn(timeoutId); | ||
setTimeoutIdFn?.(timeoutId); | ||
return timeoutId; | ||
@@ -38,2 +40,4 @@ } | ||
* or timeouts exceeding (2^31)-1 ms or approximately 24.8 days. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -80,3 +84,2 @@ export class Timer { | ||
restart(ms, handler) { | ||
var _a, _b; | ||
if (!this.runningState) { | ||
@@ -87,4 +90,4 @@ // If restart is called first, it behaves as a call to start | ||
else { | ||
const duration = ms !== null && ms !== void 0 ? ms : this.runningState.intendedDuration; | ||
const handlerToUse = (_b = handler !== null && handler !== void 0 ? handler : (_a = this.runningState.restart) === null || _a === void 0 ? void 0 : _a.handler) !== null && _b !== void 0 ? _b : this.runningState.handler; | ||
const duration = ms ?? this.runningState.intendedDuration; | ||
const handlerToUse = handler ?? this.runningState.restart?.handler ?? this.runningState.handler; | ||
const remainingTime = this.calculateRemainingTime(this.runningState); | ||
@@ -152,2 +155,4 @@ if (duration < remainingTime) { | ||
* resolves when it times out. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -154,0 +159,0 @@ export class PromiseTimer { |
@@ -8,2 +8,4 @@ /*! | ||
* Time measurements are in milliseconds as a floating point with a decimal | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -19,2 +21,4 @@ export declare class Trace { | ||
* Event in a performance trace including time elapsed. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -21,0 +25,0 @@ export interface ITraceEvent { |
@@ -9,2 +9,4 @@ /*! | ||
* Time measurements are in milliseconds as a floating point with a decimal | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -11,0 +13,0 @@ export class Trace { |
@@ -12,2 +12,4 @@ /*! | ||
* This type allow us to correctly handle either type | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -17,5 +19,10 @@ export declare type EventEmitterEventType = EventEmitter extends { | ||
} ? E : never; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export declare type TypedEventTransform<TThis, TEvent> = TransformedEvent<TThis, "newListener" | "removeListener", Parameters<(event: string, listener: (...args: any[]) => void) => void>> & IEventTransformer<TThis, TEvent & IEvent> & TransformedEvent<TThis, EventEmitterEventType, any[]>; | ||
/** | ||
* Event Emitter helper class the supports emitting typed events | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -22,0 +29,0 @@ export declare class TypedEventEmitter<TEvent> extends EventEmitter implements IEventProvider<TEvent & IEvent> { |
@@ -8,2 +8,4 @@ /*! | ||
* Event Emitter helper class the supports emitting typed events | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -10,0 +12,0 @@ export class TypedEventEmitter extends EventEmitter { |
@@ -9,4 +9,16 @@ /*! | ||
* to ensure that all cases are explicitly handled. | ||
* | ||
* Example: | ||
* ```typescript | ||
* const bool: true | false = ...; | ||
* switch(bool) { | ||
* case true: {...} | ||
* case false: {...} | ||
* default: unreachableCase(bool); | ||
* } | ||
* ``` | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export declare function unreachableCase(_: never, message?: string): never; | ||
//# sourceMappingURL=unreachable.d.ts.map |
@@ -9,2 +9,14 @@ /*! | ||
* to ensure that all cases are explicitly handled. | ||
* | ||
* Example: | ||
* ```typescript | ||
* const bool: true | false = ...; | ||
* switch(bool) { | ||
* case true: {...} | ||
* case false: {...} | ||
* default: unreachableCase(bool); | ||
* } | ||
* ``` | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -11,0 +23,0 @@ export function unreachableCase(_, message = "Unreachable Case") { |
292
package.json
{ | ||
"name": "@fluidframework/common-utils", | ||
"version": "1.1.1", | ||
"description": "Collection of utility functions for Fluid", | ||
"homepage": "https://fluidframework.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/microsoft/FluidFramework.git", | ||
"directory": "common/lib/common-utils" | ||
}, | ||
"license": "MIT", | ||
"author": "Microsoft and contributors", | ||
"sideEffects": false, | ||
"main": "dist/index.js", | ||
"module": "lib/index.js", | ||
"browser": { | ||
"./dist/indexNode.js": "./dist/indexBrowser.js", | ||
"./lib/indexNode.js": "./lib/indexBrowser.js" | ||
}, | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"bench": "ts-node bench/src/index.ts", | ||
"build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs", | ||
"build:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test", | ||
"build:compile": "concurrently npm:build:commonjs npm:build:esnext", | ||
"build:docs": "api-extractor run --local --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", | ||
"build:esnext": "tsc --project ./tsconfig.esnext.json", | ||
"build:full": "npm run build", | ||
"build:full:compile": "npm run build:compile", | ||
"build:genver": "gen-version", | ||
"build:test": "concurrently npm:build:test:mocha npm:build:test:jest npm:build:test:types", | ||
"build:test:jest": "tsc --project ./src/test/jest/tsconfig.json", | ||
"build:test:mocha": "tsc --project ./src/test/mocha/tsconfig.json", | ||
"build:test:types": "tsc --project ./src/test/types/tsconfig.json", | ||
"bump-version": "npm version minor --no-push --no-git-tag-version && npm run build:gen:bump", | ||
"ci:build": "npm run build:genver && npm run build:compile", | ||
"ci:build:docs": "api-extractor run --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", | ||
"ci:test": "npm run test:report", | ||
"ci:test:coverage": "npm run test:coverage", | ||
"clean": "rimraf _api-extractor-temp dist lib *.tsbuildinfo *.build.log", | ||
"eslint": "eslint --format stylish src", | ||
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout", | ||
"format": "npm run prettier:fix", | ||
"lint": "npm run prettier && npm run eslint", | ||
"lint:fix": "npm run prettier:fix && npm run eslint:fix", | ||
"prettier": "prettier --check . --ignore-path ../../../.prettierignore", | ||
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore", | ||
"test": "npm run test:mocha && npm run test:jest", | ||
"test:coverage": "npm run test:report", | ||
"test:jest": "jest", | ||
"test:jest:report": "npm run test:jest -- --ci --coverage --reporters=default --reporters=jest-junit", | ||
"test:mocha": "mocha --unhandled-rejections=strict --recursive dist/test/mocha/**/*.spec.js --exit --project test/tsconfig.json", | ||
"test:mocha:report": "npm run test:mocha -- -- --reporter xunit --reporter-option output=nyc/mocha-junit-report.xml", | ||
"test:report": "nyc npm run test:mocha:report && npm run test:jest:report", | ||
"tsc": "tsc", | ||
"typetests:gen": "flub generate typetests --generate --dir .", | ||
"typetests:prepare": "flub generate typetests --prepare --dir . --pin" | ||
}, | ||
"nyc": { | ||
"all": true, | ||
"cache-dir": "nyc/.cache", | ||
"exclude": [ | ||
"src/test/**/*.ts", | ||
"dist/test/**/*.js" | ||
], | ||
"exclude-after-remap": false, | ||
"include": [ | ||
"src/**/*.ts", | ||
"dist/**/*.js" | ||
], | ||
"report-dir": "nyc/report", | ||
"reporter": [ | ||
"cobertura", | ||
"html", | ||
"text" | ||
], | ||
"temp-directory": "nyc/.nyc_output" | ||
}, | ||
"dependencies": { | ||
"@fluidframework/common-definitions": "^0.20.1", | ||
"@types/events": "^3.0.0", | ||
"base64-js": "^1.5.1", | ||
"buffer": "^6.0.3", | ||
"events": "^3.1.0", | ||
"lodash": "^4.17.21", | ||
"sha.js": "^2.4.11" | ||
}, | ||
"devDependencies": { | ||
"@fluid-tools/build-cli": "^0.8.0", | ||
"@fluidframework/build-common": "^1.1.0", | ||
"@fluidframework/build-tools": "^0.8.0", | ||
"@fluidframework/common-utils-previous": "npm:@fluidframework/common-utils@1.0.0", | ||
"@fluidframework/eslint-config-fluid": "^2.0.0", | ||
"@microsoft/api-extractor": "^7.22.2", | ||
"@rushstack/eslint-config": "^2.5.1", | ||
"@types/base64-js": "^1.3.0", | ||
"@types/benchmark": "^2.1.0", | ||
"@types/jest": "22.2.3", | ||
"@types/jest-environment-puppeteer": "2.2.0", | ||
"@types/mocha": "^9.1.1", | ||
"@types/puppeteer": "1.3.0", | ||
"@types/sinon": "^7.0.13", | ||
"benchmark": "^2.1.4", | ||
"concurrently": "^6.2.0", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "~8.6.0", | ||
"eslint-config-prettier": "~8.5.0", | ||
"jest": "^26.6.3", | ||
"jest-junit": "^10.0.0", | ||
"jest-puppeteer": "^4.4.0", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "~2.6.2", | ||
"puppeteer": "^2.1.0", | ||
"rewire": "^5.0.0", | ||
"rimraf": "^2.6.2", | ||
"sinon": "^7.4.2", | ||
"ts-jest": "^26.4.4", | ||
"ts-node": "^7.0.1", | ||
"typescript": "~4.5.5" | ||
}, | ||
"fluidBuild": { | ||
"branchReleaseTypes": { | ||
"main": "minor", | ||
"release/**": "patch" | ||
} | ||
}, | ||
"jest-junit": { | ||
"outputDirectory": "nyc", | ||
"outputName": "jest-junit-report.xml" | ||
}, | ||
"typeValidation": { | ||
"version": "1.1.0", | ||
"baselineRange": "~1.0.0", | ||
"baselineVersion": "1.0.0", | ||
"broken": {} | ||
} | ||
} | ||
"name": "@fluidframework/common-utils", | ||
"version": "2.0.0", | ||
"description": "Collection of utility functions for Fluid", | ||
"homepage": "https://fluidframework.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/microsoft/FluidFramework.git", | ||
"directory": "common/lib/common-utils" | ||
}, | ||
"license": "MIT", | ||
"author": "Microsoft and contributors", | ||
"sideEffects": false, | ||
"main": "dist/index.js", | ||
"module": "lib/index.js", | ||
"browser": { | ||
"./dist/indexNode.js": "./dist/indexBrowser.js", | ||
"./lib/indexNode.js": "./lib/indexBrowser.js" | ||
}, | ||
"types": "dist/index.d.ts", | ||
"nyc": { | ||
"all": true, | ||
"cache-dir": "nyc/.cache", | ||
"exclude": [ | ||
"src/test/**/*.ts", | ||
"dist/test/**/*.js" | ||
], | ||
"exclude-after-remap": false, | ||
"include": [ | ||
"src/**/*.ts", | ||
"dist/**/*.js" | ||
], | ||
"report-dir": "nyc/report", | ||
"reporter": [ | ||
"cobertura", | ||
"html", | ||
"text" | ||
], | ||
"temp-directory": "nyc/.nyc_output" | ||
}, | ||
"dependencies": { | ||
"@fluidframework/common-definitions": "^0.20.1", | ||
"@types/events": "^3.0.0", | ||
"base64-js": "^1.5.1", | ||
"buffer": "^6.0.3", | ||
"events": "^3.1.0", | ||
"lodash": "^4.17.21", | ||
"sha.js": "^2.4.11" | ||
}, | ||
"devDependencies": { | ||
"@fluid-tools/build-cli": "^0.22.0", | ||
"@fluidframework/build-common": "^2.0.0", | ||
"@fluidframework/build-tools": "^0.22.0", | ||
"@fluidframework/common-utils-previous": "npm:@fluidframework/common-utils@1.0.0", | ||
"@fluidframework/eslint-config-fluid": "^2.0.0", | ||
"@microsoft/api-extractor": "^7.22.2", | ||
"@rushstack/eslint-config": "^2.5.1", | ||
"@types/base64-js": "^1.3.0", | ||
"@types/benchmark": "^2.1.0", | ||
"@types/jest": "22.2.3", | ||
"@types/jest-environment-puppeteer": "2.2.0", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^16.18.38", | ||
"@types/puppeteer": "1.3.0", | ||
"@types/sinon": "^7.0.13", | ||
"benchmark": "^2.1.4", | ||
"concurrently": "^6.2.0", | ||
"copyfiles": "^2.4.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "~8.6.0", | ||
"eslint-config-prettier": "~8.5.0", | ||
"jest": "^26.6.3", | ||
"jest-junit": "^10.0.0", | ||
"jest-puppeteer": "^4.4.0", | ||
"mocha": "^10.0.0", | ||
"mocha-json-output-reporter": "^2.0.1", | ||
"mocha-multi-reporters": "^1.5.1", | ||
"moment": "^2.21.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "~2.6.2", | ||
"puppeteer": "^2.1.0", | ||
"rewire": "^5.0.0", | ||
"rimraf": "^2.6.2", | ||
"sinon": "^7.4.2", | ||
"ts-jest": "^26.4.4", | ||
"ts-node": "^10.9.1", | ||
"typescript": "~4.5.5" | ||
}, | ||
"packageManager": "pnpm@7.32.3+sha512.c28d73f0d82a6c4712a40b91aa43d7397e119b16f35e5e75fe9b7e8fd4f2fc6dfbb68bb3ffac3473a958bbafa7888b79ec384ad122537378089a3a2a19b9900e", | ||
"fluidBuild": { | ||
"branchReleaseTypes": { | ||
"main": "minor", | ||
"release/**": "patch" | ||
}, | ||
"tasks": { | ||
"eslint": [ | ||
"tsc", | ||
"build:test:mocha", | ||
"build:test:jest", | ||
"build:test:types" | ||
], | ||
"build:test:jest": [ | ||
"tsc" | ||
], | ||
"build:test:mocha": [ | ||
"tsc" | ||
], | ||
"build:test:types": [ | ||
"tsc" | ||
] | ||
} | ||
}, | ||
"jest-junit": { | ||
"outputDirectory": "nyc", | ||
"outputName": "jest-junit-report.xml" | ||
}, | ||
"typeValidation": { | ||
"broken": {} | ||
}, | ||
"scripts": { | ||
"bench": "ts-node bench/src/index.ts", | ||
"build": "concurrently npm:build:compile npm:lint && npm run build:docs", | ||
"build:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test", | ||
"build:compile": "concurrently npm:build:commonjs npm:build:esnext", | ||
"build:docs": "api-extractor run --local --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", | ||
"build:esnext": "tsc --project ./tsconfig.esnext.json", | ||
"build:test": "concurrently npm:build:test:mocha npm:build:test:jest npm:build:test:types", | ||
"build:test:jest": "tsc --project ./src/test/jest/tsconfig.json", | ||
"build:test:mocha": "tsc --project ./src/test/mocha/tsconfig.json", | ||
"build:test:types": "tsc --project ./src/test/types/tsconfig.json", | ||
"bump-version": "npm version minor --no-push --no-git-tag-version && npm run build:gen:bump", | ||
"ci:build": "npm run build:compile", | ||
"ci:build:docs": "api-extractor run --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", | ||
"ci:test": "npm run test:report", | ||
"ci:test:coverage": "npm run test:coverage", | ||
"clean": "rimraf --glob _api-extractor-temp dist lib *.tsbuildinfo *.build.log", | ||
"eslint": "eslint --format stylish src", | ||
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout", | ||
"format": "npm run prettier:fix", | ||
"lint": "npm run prettier && npm run eslint", | ||
"lint:fix": "npm run prettier:fix && npm run eslint:fix", | ||
"prettier": "prettier --check . --ignore-path ../../../.prettierignore", | ||
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore", | ||
"test": "npm run test:mocha && npm run test:jest", | ||
"test:coverage": "npm run test:report", | ||
"test:jest": "jest", | ||
"test:jest:report": "npm run test:jest -- --ci --coverage --reporters=default --reporters=jest-junit", | ||
"test:mocha": "mocha --unhandled-rejections=strict --recursive dist/test/mocha/**/*.spec.js --exit --project test/tsconfig.json", | ||
"test:mocha:multireport": "cross-env FLUID_TEST_MULTIREPORT=1 npm run test:mocha", | ||
"test:mocha:report": "npm run test:mocha -- -- --reporter xunit --reporter-option output=nyc/mocha-junit-report.xml", | ||
"test:report": "nyc npm run test:mocha:report && npm run test:jest:report", | ||
"tsc": "tsc", | ||
"typetests:gen": "fluid-type-test-generator", | ||
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize" | ||
} | ||
} |
@@ -7,9 +7,12 @@ /*! | ||
/** | ||
* A browser friendly version of the node assert library. Use this instead of the 'assert' package, which has a big | ||
* impact on bundle sizes. | ||
* A browser friendly assert library. | ||
* Use this instead of the 'assert' package, which has a big impact on bundle sizes. | ||
* @param condition - The condition that should be true, if the condition is false an error will be thrown. | ||
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed. | ||
* @param message - The message to include in the error when the condition does not hold. | ||
* A number should not be specificed manually: use a string. | ||
* A number should not be specified manually: use a string. | ||
* Before a release, policy-check should be run, which will convert any asserts still using strings to | ||
* use numbered error codes instead. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -16,0 +19,0 @@ export function assert(condition: boolean, message: string | number): asserts condition { |
@@ -11,2 +11,4 @@ /*! | ||
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -19,2 +21,4 @@ export const fromBase64ToUtf8 = (input: string): string => | ||
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -29,2 +33,4 @@ export const fromUtf8ToBase64 = (input: string): string => | ||
* @param encoding - The source string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -31,0 +37,0 @@ export const toUtf8 = (input: string, encoding: string): string => { |
@@ -16,2 +16,4 @@ /*! | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -39,2 +41,4 @@ export function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string { | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -50,2 +54,4 @@ export const stringToBuffer = (input: string, encoding: string): ArrayBufferLike => | ||
* @returns the blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -66,2 +72,4 @@ export const bufferToString = (blob: ArrayBufferLike, encoding: string): string => | ||
* @param obj - The object to determine if it is an ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -83,2 +91,4 @@ export function isArrayBuffer(obj: any): obj is ArrayBuffer { | ||
* Minimal implementation of Buffer for our usages in the browser environment. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -85,0 +95,0 @@ export class IsoBuffer extends Uint8Array { |
@@ -10,2 +10,4 @@ /*! | ||
* of the browser implementation, so any changes made in one should be made in both. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -22,3 +24,11 @@ export declare class Buffer extends Uint8Array { | ||
} | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const IsoBuffer = Buffer; | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export type IsoBuffer = Buffer; | ||
@@ -33,2 +43,4 @@ | ||
* @returns The converted string. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -43,2 +55,4 @@ export function Uint8ArrayToString(arr: Uint8Array, encoding?: string): string { | ||
* @param encoding - The input string's encoding. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -61,4 +75,6 @@ export function stringToBuffer(input: string, encoding: string): ArrayBufferLike { | ||
* @returns The blob in string format | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const bufferToString = (blob: ArrayBufferLike, encoding: string): string => | ||
IsoBuffer.from(blob).toString(encoding); |
@@ -9,2 +9,4 @@ /*! | ||
* @param array - Array to convert to ArrayBuffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -11,0 +13,0 @@ export function Uint8ArrayToArrayBuffer(array: Uint8Array): ArrayBuffer { |
@@ -9,4 +9,6 @@ /*! | ||
* @param timeMs - Time in milliseconds to wait. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export const delay = async (timeMs: number): Promise<void> => | ||
new Promise((resolve) => setTimeout(() => resolve(), timeMs)); |
@@ -13,2 +13,8 @@ /*! | ||
* @throws Will throw an error if the item has already been disposed. | ||
* | ||
* @deprecated This function has no replacement. | ||
* | ||
* @privateremarks | ||
* This function is used in the container-loader package, so the implementation was moved there but it is no longer | ||
* exported. | ||
*/ | ||
@@ -15,0 +21,0 @@ export function doIfNotDisposed<T>( |
@@ -14,2 +14,4 @@ /*! | ||
* but the primary source needs to stay intact. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -16,0 +18,0 @@ export class EventForwarder<TEvent = IEvent> |
@@ -41,2 +41,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -71,2 +73,4 @@ export async function hashFile( | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -73,0 +77,0 @@ export async function gitHashFile(file: IsoBuffer): Promise<string> { |
@@ -22,2 +22,4 @@ /*! | ||
* @returns The hash of the content of the buffer. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -50,2 +52,4 @@ export async function hashFile( | ||
* @returns The sha1 hash of the content of the buffer with the `blob` prefix and size | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -52,0 +56,0 @@ export async function gitHashFile(file: IsoBuffer): Promise<string> { |
@@ -8,2 +8,4 @@ /*! | ||
* Interface for a comparer. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -26,2 +28,4 @@ export interface IComparer<T> { | ||
* A comparer for numbers. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -43,2 +47,4 @@ export const NumberComparer: IComparer<number> = { | ||
* Interface to a node in {@link Heap}. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -52,2 +58,4 @@ export interface IHeapNode<T> { | ||
* Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -54,0 +62,0 @@ export class Heap<T> { |
@@ -12,2 +12,4 @@ /*! | ||
* @returns A promise pertaining to the callback that was passed in. | ||
* | ||
* @deprecated Not used outside this package. | ||
*/ | ||
@@ -14,0 +16,0 @@ export async function scheduleIdleTask<T>(callback: () => T, timeout: number): Promise<T> { |
@@ -8,2 +8,4 @@ /*! | ||
* Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -10,0 +12,0 @@ export class Lazy<T> { |
@@ -8,2 +8,5 @@ /*! | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const performance: IsomorphicPerformance = globalThis.performance; |
@@ -9,4 +9,6 @@ /*! | ||
* of the intersecting properties of node and browser performance as required. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export type IsomorphicPerformance = Partial<Performance> & | ||
Pick<Performance, "clearMarks" | "mark" | "measure" | "now">; |
@@ -10,2 +10,5 @@ /*! | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export const performance: IsomorphicPerformance = nodePerformance; |
@@ -11,2 +11,4 @@ /*! | ||
* - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock) | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -24,2 +26,4 @@ export type PromiseCacheExpiry = | ||
* Options for configuring the {@link PromiseCache} | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -36,2 +40,4 @@ export interface PromiseCacheOptions { | ||
* Not exported. | ||
* | ||
* @deprecated Only used internally by the {@link PromiseCache} class. | ||
*/ | ||
@@ -87,2 +93,4 @@ class GarbageCollector<TKey> { | ||
* without fear of running it multiple times or losing track of errors. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -89,0 +97,0 @@ export class PromiseCache<TKey, TResult> { |
@@ -8,2 +8,4 @@ /*! | ||
* A deferred creates a promise and the ability to resolve or reject it | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -68,2 +70,4 @@ export class Deferred<T> { | ||
* All calls are then proxied to the promise returned by the execute method. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -70,0 +74,0 @@ export class LazyPromise<T> implements Promise<T> { |
@@ -12,2 +12,4 @@ /*! | ||
* A range in the {@link RangeTracker} | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -22,2 +24,4 @@ export interface IRange { | ||
* A serialized version of the {@link RangeTracker} | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -36,2 +40,4 @@ export interface IRangeTrackerSnapshot { | ||
* Used by deli to keep track of the branch map | ||
* | ||
* @deprecated No replacement. | ||
*/ | ||
@@ -38,0 +44,0 @@ export class RangeTracker { |
@@ -8,2 +8,8 @@ /*! | ||
* A rate limiter to make sure that a client can only request help for one task within a time window. | ||
* | ||
* @deprecated This class has no replacement. | ||
* | ||
* @privateremarks | ||
* This class is not used anywhere in the repo. driver-utils already has a similar class that is used by the odsp and | ||
* routerlicious drivers. | ||
*/ | ||
@@ -10,0 +16,0 @@ export class RateLimiter { |
@@ -13,2 +13,4 @@ /*! | ||
* @returns The result from `JSON.parse` if successful, otherwise `undefined`. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -15,0 +17,0 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any |
@@ -9,2 +9,5 @@ /*! | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export interface ITimer { | ||
@@ -27,2 +30,5 @@ /** | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
interface ITimeout { | ||
@@ -45,2 +51,5 @@ /** | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
interface IRunningTimerState extends ITimeout { | ||
@@ -74,2 +83,4 @@ /** | ||
* @returns The initial timeout | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -102,2 +113,4 @@ export function setLongTimeout( | ||
* or timeouts exceeding (2^31)-1 ms or approximately 24.8 days. | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -223,2 +236,5 @@ export class Timer implements ITimer { | ||
/** | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
export interface IPromiseTimerResult { | ||
@@ -231,2 +247,4 @@ timerResult: "timeout" | "cancel"; | ||
* completes. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -246,2 +264,4 @@ export interface IPromiseTimer extends ITimer { | ||
* resolves when it times out. | ||
* | ||
* @deprecated Moved to the `@fluid-private/client-utils` package. | ||
*/ | ||
@@ -248,0 +268,0 @@ export class PromiseTimer implements IPromiseTimer { |
@@ -11,2 +11,4 @@ /*! | ||
* Time measurements are in milliseconds as a floating point with a decimal | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -38,2 +40,4 @@ export class Trace { | ||
* Event in a performance trace including time elapsed. | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -40,0 +44,0 @@ export interface ITraceEvent { |
@@ -19,2 +19,4 @@ /*! | ||
* This type allow us to correctly handle either type | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -25,2 +27,5 @@ export type EventEmitterEventType = EventEmitter extends { on(event: infer E, listener: any) } | ||
/** | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
export type TypedEventTransform<TThis, TEvent> = | ||
@@ -43,2 +48,4 @@ // Event emitter supports some special events for the emitter itself to use | ||
* Event Emitter helper class the supports emitting typed events | ||
* | ||
* @deprecated Moved to the `@fluidframework-internal/client-utils` package. | ||
*/ | ||
@@ -45,0 +52,0 @@ export class TypedEventEmitter<TEvent> |
@@ -10,2 +10,14 @@ /*! | ||
* to ensure that all cases are explicitly handled. | ||
* | ||
* Example: | ||
* ```typescript | ||
* const bool: true | false = ...; | ||
* switch(bool) { | ||
* case true: {...} | ||
* case false: {...} | ||
* default: unreachableCase(bool); | ||
* } | ||
* ``` | ||
* | ||
* @deprecated Moved to the `@fluidframework/core-utils` package. | ||
*/ | ||
@@ -12,0 +24,0 @@ export function unreachableCase(_: never, message = "Unreachable Case"): never { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
654645
8087
37
289