New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@itwin/core-bentley

Package Overview
Dependencies
Maintainers
0
Versions
1004
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itwin/core-bentley - npm Package Compare versions

Comparing version 5.0.0-dev.56 to 5.0.0-dev.57

10

lib/cjs/BeEvent.js

@@ -19,6 +19,4 @@ "use strict";

class BeEvent {
constructor() {
this._listeners = [];
this._insideRaiseEvent = false;
}
_listeners = [];
_insideRaiseEvent = false;
/** The number of listeners currently subscribed to the event. */

@@ -134,5 +132,3 @@ get numberOfListeners() { return this._listeners.length; }

class BeEventList {
constructor() {
this._events = {};
}
_events = {};
/**

@@ -139,0 +135,0 @@ * Gets the event associated with the specified name, creating the event if it does not already exist.

@@ -306,2 +306,4 @@ "use strict";

class BentleyError extends Error {
errorNumber;
_metaData;
/**

@@ -308,0 +310,0 @@ * @param errorNumber The a number that identifies of the problem.

@@ -21,2 +21,5 @@ "use strict";

class ByteStream {
_view;
_byteOffset;
_curPos = 0;
/** Construct a new ByteStream with the read position set to the beginning.

@@ -36,3 +39,2 @@ * @param buffer The underlying buffer from which data is to be extracted.

constructor(buffer, subView) {
this._curPos = 0;
if (undefined !== subView) {

@@ -39,0 +41,0 @@ this._view = new DataView(buffer, subView.byteOffset, subView.byteLength);

@@ -124,3 +124,5 @@ "use strict";

class Uint64 {
static { this._base = 0x100000000; }
lower;
upper;
static _base = 0x100000000;
static assertUint32(num) {

@@ -331,6 +333,7 @@ (0, Assert_1.assert)(num >= 0);

class MutableCompressedId64Set {
_ids;
_inserted = new OrderedId64Array();
_deleted = new OrderedId64Array();
/** Construct a new set, optionally initialized to contain the Ids represented by `ids`. */
constructor(ids) {
this._inserted = new OrderedId64Array();
this._deleted = new OrderedId64Array();
this._ids = ids ?? "";

@@ -337,0 +340,0 @@ }

@@ -13,4 +13,6 @@ "use strict";

class DictionaryIterator {
_keys;
_values;
_curIndex = -1;
constructor(keys, values) {
this._curIndex = -1;
this._keys = keys;

@@ -50,2 +52,7 @@ this._values = values;

class Dictionary {
_keys = [];
_compareKeys;
_cloneKey;
_values = [];
_cloneValue;
/**

@@ -58,4 +65,2 @@ * Construct a new Dictionary<K, V>.

constructor(compareKeys, cloneKey = SortedArray_1.shallowClone, cloneValue = SortedArray_1.shallowClone) {
this._keys = [];
this._values = [];
this._compareKeys = compareKeys;

@@ -62,0 +67,0 @@ this._cloneKey = cloneKey;

@@ -81,2 +81,3 @@ "use strict";

class FuncDisposable {
_disposeFunc;
constructor(disposeFunc) { this._disposeFunc = disposeFunc; }

@@ -89,2 +90,3 @@ dispose() { this._disposeFunc(); }

class DisposableList {
_disposables;
/** Creates a disposable list. */

@@ -91,0 +93,0 @@ constructor(disposables = []) {

@@ -423,2 +423,3 @@ "use strict";

class Uint32Set {
_map = new Map();
/** Construct a new Uint32Set.

@@ -428,3 +429,2 @@ * @param ids If supplied, all of the specified Ids will be added to the new set.

constructor(ids) {
this._map = new Map();
if (undefined !== ids)

@@ -543,5 +543,3 @@ this.addIds(ids);

class Uint32Map {
constructor() {
this._map = new Map();
}
_map = new Map();
/** Remove all entries from the map. */

@@ -597,2 +595,5 @@ clear() { this._map.clear(); }

class TransientIdSequence {
/** The starting local Id provided to the constructor. The sequence begins at `initialLocalId + 1`. */
initialLocalId;
_localId;
/** Constructor.

@@ -599,0 +600,0 @@ * @param initialLocalId The starting local Id. The local Id of the first [[Id64String]] generated by [[getNext]] will be `initialLocalId + 1`.

@@ -16,2 +16,4 @@ "use strict";

class IndexedValue {
value;
index;
constructor(value, index) {

@@ -30,2 +32,6 @@ this.value = value;

class IndexMap {
_array = [];
_compareValues;
_clone;
_maximumSize;
/**

@@ -38,3 +44,2 @@ * Construct a new IndexMap<T>.

constructor(compare, maximumSize = Number.MAX_SAFE_INTEGER, clone = SortedArray_1.shallowClone) {
this._array = [];
this._compareValues = compare;

@@ -41,0 +46,0 @@ this._clone = clone;

@@ -35,3 +35,8 @@ "use strict";

class Logger {
static { this._staticMetaData = new Map(); }
static _logError;
static _logWarning;
static _logInfo;
static _logTrace;
static _onLogLevelChanged;
static _staticMetaData = new Map();
/** An event raised whenever [[setLevel]] or [[setLevelDefault]] is called. */

@@ -45,3 +50,3 @@ static get onLogLevelChanged() {

}
static { this._categoryFilter = {}; }
static _categoryFilter = {};
/** Maps category names to the least severe level at which messages in that category should be displayed,

@@ -55,2 +60,3 @@ * or `undefined` if a minimum has not been defined.

}
static _minLevel;
/** The least severe level at which messages should be displayed by default.

@@ -65,3 +71,3 @@ * @see [[setLevelDefault]] to change this default.

/** Should the call stack be included when an exception is logged? */
static { this.logExceptionCallstacks = false; }
static logExceptionCallstacks = false;
/** Contains metadata that should be included with every logged message.

@@ -263,3 +269,6 @@ * @beta

class PerfLogger {
static { this._severity = LogLevel.Info; }
static _severity = LogLevel.Info;
_operation;
_metaData;
_startTimeStamp;
constructor(operation, metaData) {

@@ -266,0 +275,0 @@ this._operation = operation;

@@ -21,2 +21,6 @@ "use strict";

class Entry {
key;
value;
newer;
older;
constructor(key, value) {

@@ -29,2 +33,3 @@ this.key = key;

class EntryIterator {
_entry;
constructor(oldestEntry) {

@@ -43,2 +48,3 @@ this._entry = oldestEntry;

class KeyIterator {
_entry;
constructor(oldestEntry) {

@@ -56,2 +62,3 @@ this._entry = oldestEntry;

class ValueIterator {
_entry;
constructor(oldestEntry) {

@@ -89,2 +96,11 @@ this._entry = oldestEntry;

class LRUCache {
_container;
/** Current number of items */
size;
/** Maximum number of items this cache can hold */
limit;
/** Least recently-used entry. Invalidated when cache is modified. */
oldest;
/** Most recently-used entry. Invalidated when cache is modified. */
newest;
/**

@@ -91,0 +107,0 @@ * Construct a new LRUCache to hold up to `limit` entries.

@@ -16,2 +16,8 @@ "use strict";

class ObservableSet extends Set {
/** Emitted after `item` is added to this set. */
onAdded = new BeEvent_1.BeEvent();
/** Emitted after `item` is deleted from this set. */
onDeleted = new BeEvent_1.BeEvent();
/** Emitted after this set's contents are cleared. */
onCleared = new BeEvent_1.BeEvent();
/** Construct a new ObservableSet.

@@ -23,8 +29,2 @@ * @param elements Optional elements with which to populate the new set.

super(elements);
/** Emitted after `item` is added to this set. */
this.onAdded = new BeEvent_1.BeEvent();
/** Emitted after `item` is deleted from this set. */
this.onDeleted = new BeEvent_1.BeEvent();
/** Emitted after this set's contents are cleared. */
this.onCleared = new BeEvent_1.BeEvent();
this.add = (item) => {

@@ -31,0 +31,0 @@ const prevSize = this.size;

@@ -23,2 +23,7 @@ "use strict";

class PromiseWithAbandon {
_run;
_args;
/** Method to abandon the Promise created by [[init]] while it is outstanding. The promise will be rejected. */
abandon;
_resolve;
/** Create a PromiseWithAbandon. After this call you must call [[init]] to create the underlying Promise.

@@ -61,2 +66,6 @@ * @param _run The method that creates the underlying Promise.

class OneAtATimeAction {
_active;
_pending;
_run;
msg;
/** Ctor for OneAtATimePromise.

@@ -63,0 +72,0 @@ * @param run The method that performs an action that creates the Promise.

@@ -18,2 +18,3 @@ "use strict";

class ReadonlyOrderedSet {
_array;
/** Construct a new ReadonlyOrderedSet<T>.

@@ -20,0 +21,0 @@ * @param compare The function used to compare elements within the set, determining their ordering.

@@ -18,2 +18,5 @@ "use strict";

class PriorityQueue {
_array = [];
_compare;
_clone;
/**

@@ -26,3 +29,2 @@ * Constructor

constructor(compare, clone = SortedArray_1.shallowClone) {
this._array = [];
this._compare = compare;

@@ -29,0 +31,0 @@ this._clone = clone;

@@ -88,2 +88,6 @@ "use strict";

class ReadonlySortedArray {
_array = [];
_compare;
_clone;
_duplicatePolicy;
/**

@@ -96,3 +100,2 @@ * Construct a new ReadonlySortedArray<T>.

constructor(compare, duplicatePolicy = false, clone = shallowClone) {
this._array = [];
this._compare = compare;

@@ -99,0 +102,0 @@ this._clone = clone;

@@ -17,3 +17,3 @@ "use strict";

class StatusCategory {
static { this.handlers = new Set(); }
static handlers = new Set();
static for(error) {

@@ -38,6 +38,3 @@ for (const handler of this.handlers) {

class SuccessCategory extends StatusCategory {
constructor() {
super(...arguments);
this.error = false;
}
error = false;
}

@@ -50,6 +47,3 @@ exports.SuccessCategory = SuccessCategory;

class ErrorCategory extends StatusCategory {
constructor() {
super(...arguments);
this.error = true;
}
error = true;
}

@@ -60,151 +54,94 @@ exports.ErrorCategory = ErrorCategory;

class OK extends SuccessCategory {
constructor() {
super(...arguments);
this.name = "OK";
this.code = 200;
}
name = "OK";
code = 200;
}
HTTP.OK = OK;
class Accepted extends SuccessCategory {
constructor() {
super(...arguments);
this.name = "Accepted";
this.code = 202;
}
name = "Accepted";
code = 202;
}
HTTP.Accepted = Accepted;
class NoContent extends SuccessCategory {
constructor() {
super(...arguments);
this.name = "NoContent";
this.code = 204;
}
name = "NoContent";
code = 204;
}
HTTP.NoContent = NoContent;
class BadRequest extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "BadRequest";
this.code = 400;
}
name = "BadRequest";
code = 400;
}
HTTP.BadRequest = BadRequest;
class Unauthorized extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Unauthorized";
this.code = 401;
}
name = "Unauthorized";
code = 401;
}
HTTP.Unauthorized = Unauthorized;
class Forbidden extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Forbidden";
this.code = 403;
}
name = "Forbidden";
code = 403;
}
HTTP.Forbidden = Forbidden;
class NotFound extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "NotFound";
this.code = 404;
}
name = "NotFound";
code = 404;
}
HTTP.NotFound = NotFound;
class RequestTimeout extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "RequestTimeout";
this.code = 408;
}
name = "RequestTimeout";
code = 408;
}
HTTP.RequestTimeout = RequestTimeout;
class Conflict extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Conflict";
this.code = 409;
}
name = "Conflict";
code = 409;
}
HTTP.Conflict = Conflict;
class Gone extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Gone";
this.code = 410;
}
name = "Gone";
code = 410;
}
HTTP.Gone = Gone;
class PreconditionFailed extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "PreconditionFailed";
this.code = 412;
}
name = "PreconditionFailed";
code = 412;
}
HTTP.PreconditionFailed = PreconditionFailed;
class ExpectationFailed extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "ExpectationFailed";
this.code = 417;
}
name = "ExpectationFailed";
code = 417;
}
HTTP.ExpectationFailed = ExpectationFailed;
class MisdirectedRequest extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "MisdirectedRequest";
this.code = 421;
}
name = "MisdirectedRequest";
code = 421;
}
HTTP.MisdirectedRequest = MisdirectedRequest;
class UnprocessableEntity extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "UnprocessableEntity";
this.code = 422;
}
name = "UnprocessableEntity";
code = 422;
}
HTTP.UnprocessableEntity = UnprocessableEntity;
class UpgradeRequired extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "UpgradeRequired";
this.code = 426;
}
name = "UpgradeRequired";
code = 426;
}
HTTP.UpgradeRequired = UpgradeRequired;
class PreconditionRequired extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "PreconditionRequired";
this.code = 428;
}
name = "PreconditionRequired";
code = 428;
}
HTTP.PreconditionRequired = PreconditionRequired;
class TooManyRequests extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "TooManyRequests";
this.code = 429;
}
name = "TooManyRequests";
code = 429;
}
HTTP.TooManyRequests = TooManyRequests;
class InternalServerError extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "InternalServerError";
this.code = 500;
}
name = "InternalServerError";
code = 500;
}
HTTP.InternalServerError = InternalServerError;
class NotImplemented extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "NotImplemented";
this.code = 501;
}
name = "NotImplemented";
code = 501;
}

@@ -211,0 +148,0 @@ HTTP.NotImplemented = NotImplemented;

@@ -16,2 +16,3 @@ "use strict";

class BeDuration {
_milliseconds;
constructor(milliseconds = 0) { this._milliseconds = milliseconds; }

@@ -84,2 +85,3 @@ /** The duration in milliseconds */

class BeTimePoint {
_milliseconds;
/** the time in milliseconds, of this BeTimePoint (relative to January 1, 1970 00:00:00 UTC.) */

@@ -124,2 +126,5 @@ get milliseconds() { return this._milliseconds; }

class StopWatch {
description;
_start;
_stop;
/** Get the elapsed time since start() on a running timer. */

@@ -126,0 +131,0 @@ get current() { return BeDuration.fromMilliseconds(BeTimePoint.now().milliseconds - (!!this._start ? this._start.milliseconds : 0)); }

@@ -79,2 +79,4 @@ "use strict";

class Tracing {
static _tracer;
static _openTelemetry;
/**

@@ -81,0 +83,0 @@ * If OpenTelemetry tracing is enabled, creates a new span and runs the provided function in it.

@@ -32,6 +32,5 @@ "use strict";

class TupleKeyedMap {
_map = new Map();
// argument types match those of Map
constructor(entries) {
this._map = new Map();
this._size = 0;
if (entries)

@@ -96,2 +95,3 @@ for (const [k, v] of entries) {

}
_size = 0;
get size() {

@@ -98,0 +98,0 @@ return this._size;

@@ -27,2 +27,10 @@ "use strict";

class TypedArrayBuilder {
/** The constructor for the specific type of array being populated. */
_constructor;
/** The underlying typed array, to be reallocated and copied when its capacity is exceeded. */
_data;
/** The number of elements added to the array so far. */
_length;
/** Multiplier applied to required capacity by [[ensureCapacity]]. */
growthFactor;
/** Constructs a new builder from the specified options, with a [[length]] of zero. */

@@ -29,0 +37,0 @@ constructor(constructor, options) {

@@ -21,11 +21,11 @@ "use strict";

/** handler for re-throwing exceptions directly */
static { this.reThrowImmediate = (e) => { throw e; }; }
static reThrowImmediate = (e) => { throw e; };
/** handler for re-throwing exceptions from an asynchronous interval (so the current call stack is not aborted) */
static { this.reThrowDeferred = (e) => setTimeout(() => { throw e; }, 0); }
static reThrowDeferred = (e) => setTimeout(() => { throw e; }, 0);
/** handler for logging exception to console */
static { this.consoleLog = (e) => console.error(e); } // eslint-disable-line no-console
static consoleLog = (e) => console.error(e); // eslint-disable-line no-console
/** handler for logging exception with [[Logger]] */
static { this.errorLog = (e) => Logger_1.Logger.logException("unhandled", e); }
static { this._telemetry = []; }
static { this._handler = this.errorLog; } // default to error logging
static errorLog = (e) => Logger_1.Logger.logException("unhandled", e);
static _telemetry = [];
static _handler = this.errorLog; // default to error logging
constructor() { } // this is a singleton

@@ -32,0 +32,0 @@ /** Add a "telemetry tracker" for unexpected errors. Useful for tracking/reporting errors without changing handler.

@@ -23,2 +23,5 @@ "use strict";

class YieldManager {
/** Options controlling the yield behavior. */
options;
_counter = 0;
/** Constructor.

@@ -28,3 +31,2 @@ * @param options Options customizing the yield behavior. Omitted properties are assigned their default values.

constructor(options = {}) {
this._counter = 0;
this.options = { ...defaultYieldManagerOptions, ...options };

@@ -31,0 +33,0 @@ }

@@ -16,6 +16,4 @@ /*---------------------------------------------------------------------------------------------

export class BeEvent {
constructor() {
this._listeners = [];
this._insideRaiseEvent = false;
}
_listeners = [];
_insideRaiseEvent = false;
/** The number of listeners currently subscribed to the event. */

@@ -129,5 +127,3 @@ get numberOfListeners() { return this._listeners.length; }

export class BeEventList {
constructor() {
this._events = {};
}
_events = {};
/**

@@ -134,0 +130,0 @@ * Gets the event associated with the specified name, creating the event if it does not already exist.

@@ -303,2 +303,4 @@ /*---------------------------------------------------------------------------------------------

export class BentleyError extends Error {
errorNumber;
_metaData;
/**

@@ -305,0 +307,0 @@ * @param errorNumber The a number that identifies of the problem.

@@ -18,2 +18,5 @@ /*---------------------------------------------------------------------------------------------

export class ByteStream {
_view;
_byteOffset;
_curPos = 0;
/** Construct a new ByteStream with the read position set to the beginning.

@@ -33,3 +36,2 @@ * @param buffer The underlying buffer from which data is to be extracted.

constructor(buffer, subView) {
this._curPos = 0;
if (undefined !== subView) {

@@ -36,0 +38,0 @@ this._view = new DataView(buffer, subView.byteOffset, subView.byteLength);

@@ -121,3 +121,5 @@ /*---------------------------------------------------------------------------------------------

class Uint64 {
static { this._base = 0x100000000; }
lower;
upper;
static _base = 0x100000000;
static assertUint32(num) {

@@ -327,6 +329,7 @@ assert(num >= 0);

export class MutableCompressedId64Set {
_ids;
_inserted = new OrderedId64Array();
_deleted = new OrderedId64Array();
/** Construct a new set, optionally initialized to contain the Ids represented by `ids`. */
constructor(ids) {
this._inserted = new OrderedId64Array();
this._deleted = new OrderedId64Array();
this._ids = ids ?? "";

@@ -333,0 +336,0 @@ }

@@ -10,4 +10,6 @@ /*---------------------------------------------------------------------------------------------

class DictionaryIterator {
_keys;
_values;
_curIndex = -1;
constructor(keys, values) {
this._curIndex = -1;
this._keys = keys;

@@ -47,2 +49,7 @@ this._values = values;

export class Dictionary {
_keys = [];
_compareKeys;
_cloneKey;
_values = [];
_cloneValue;
/**

@@ -55,4 +62,2 @@ * Construct a new Dictionary<K, V>.

constructor(compareKeys, cloneKey = shallowClone, cloneValue = shallowClone) {
this._keys = [];
this._values = [];
this._compareKeys = compareKeys;

@@ -59,0 +64,0 @@ this._cloneKey = cloneKey;

@@ -73,2 +73,3 @@ /*---------------------------------------------------------------------------------------------

class FuncDisposable {
_disposeFunc;
constructor(disposeFunc) { this._disposeFunc = disposeFunc; }

@@ -81,2 +82,3 @@ dispose() { this._disposeFunc(); }

export class DisposableList {
_disposables;
/** Creates a disposable list. */

@@ -83,0 +85,0 @@ constructor(disposables = []) {

@@ -420,2 +420,3 @@ /*---------------------------------------------------------------------------------------------

class Uint32Set {
_map = new Map();
/** Construct a new Uint32Set.

@@ -425,3 +426,2 @@ * @param ids If supplied, all of the specified Ids will be added to the new set.

constructor(ids) {
this._map = new Map();
if (undefined !== ids)

@@ -540,5 +540,3 @@ this.addIds(ids);

class Uint32Map {
constructor() {
this._map = new Map();
}
_map = new Map();
/** Remove all entries from the map. */

@@ -594,2 +592,5 @@ clear() { this._map.clear(); }

export class TransientIdSequence {
/** The starting local Id provided to the constructor. The sequence begins at `initialLocalId + 1`. */
initialLocalId;
_localId;
/** Constructor.

@@ -596,0 +597,0 @@ * @param initialLocalId The starting local Id. The local Id of the first [[Id64String]] generated by [[getNext]] will be `initialLocalId + 1`.

@@ -13,2 +13,4 @@ /*---------------------------------------------------------------------------------------------

export class IndexedValue {
value;
index;
constructor(value, index) {

@@ -26,2 +28,6 @@ this.value = value;

export class IndexMap {
_array = [];
_compareValues;
_clone;
_maximumSize;
/**

@@ -34,3 +40,2 @@ * Construct a new IndexMap<T>.

constructor(compare, maximumSize = Number.MAX_SAFE_INTEGER, clone = shallowClone) {
this._array = [];
this._compareValues = compare;

@@ -37,0 +42,0 @@ this._clone = clone;

@@ -32,3 +32,8 @@ /*---------------------------------------------------------------------------------------------

export class Logger {
static { this._staticMetaData = new Map(); }
static _logError;
static _logWarning;
static _logInfo;
static _logTrace;
static _onLogLevelChanged;
static _staticMetaData = new Map();
/** An event raised whenever [[setLevel]] or [[setLevelDefault]] is called. */

@@ -42,3 +47,3 @@ static get onLogLevelChanged() {

}
static { this._categoryFilter = {}; }
static _categoryFilter = {};
/** Maps category names to the least severe level at which messages in that category should be displayed,

@@ -52,2 +57,3 @@ * or `undefined` if a minimum has not been defined.

}
static _minLevel;
/** The least severe level at which messages should be displayed by default.

@@ -62,3 +68,3 @@ * @see [[setLevelDefault]] to change this default.

/** Should the call stack be included when an exception is logged? */
static { this.logExceptionCallstacks = false; }
static logExceptionCallstacks = false;
/** Contains metadata that should be included with every logged message.

@@ -259,3 +265,6 @@ * @beta

export class PerfLogger {
static { this._severity = LogLevel.Info; }
static _severity = LogLevel.Info;
_operation;
_metaData;
_startTimeStamp;
constructor(operation, metaData) {

@@ -262,0 +271,0 @@ this._operation = operation;

@@ -18,2 +18,6 @@ /*---------------------------------------------------------------------------------------------

export class Entry {
key;
value;
newer;
older;
constructor(key, value) {

@@ -25,2 +29,3 @@ this.key = key;

class EntryIterator {
_entry;
constructor(oldestEntry) {

@@ -39,2 +44,3 @@ this._entry = oldestEntry;

class KeyIterator {
_entry;
constructor(oldestEntry) {

@@ -52,2 +58,3 @@ this._entry = oldestEntry;

class ValueIterator {
_entry;
constructor(oldestEntry) {

@@ -85,2 +92,11 @@ this._entry = oldestEntry;

export class LRUCache {
_container;
/** Current number of items */
size;
/** Maximum number of items this cache can hold */
limit;
/** Least recently-used entry. Invalidated when cache is modified. */
oldest;
/** Most recently-used entry. Invalidated when cache is modified. */
newest;
/**

@@ -87,0 +103,0 @@ * Construct a new LRUCache to hold up to `limit` entries.

@@ -13,2 +13,8 @@ /*---------------------------------------------------------------------------------------------

export class ObservableSet extends Set {
/** Emitted after `item` is added to this set. */
onAdded = new BeEvent();
/** Emitted after `item` is deleted from this set. */
onDeleted = new BeEvent();
/** Emitted after this set's contents are cleared. */
onCleared = new BeEvent();
/** Construct a new ObservableSet.

@@ -20,8 +26,2 @@ * @param elements Optional elements with which to populate the new set.

super(elements);
/** Emitted after `item` is added to this set. */
this.onAdded = new BeEvent();
/** Emitted after `item` is deleted from this set. */
this.onDeleted = new BeEvent();
/** Emitted after this set's contents are cleared. */
this.onCleared = new BeEvent();
this.add = (item) => {

@@ -28,0 +28,0 @@ const prevSize = this.size;

@@ -19,2 +19,7 @@ /*---------------------------------------------------------------------------------------------

class PromiseWithAbandon {
_run;
_args;
/** Method to abandon the Promise created by [[init]] while it is outstanding. The promise will be rejected. */
abandon;
_resolve;
/** Create a PromiseWithAbandon. After this call you must call [[init]] to create the underlying Promise.

@@ -57,2 +62,6 @@ * @param _run The method that creates the underlying Promise.

export class OneAtATimeAction {
_active;
_pending;
_run;
msg;
/** Ctor for OneAtATimePromise.

@@ -59,0 +68,0 @@ * @param run The method that performs an action that creates the Promise.

@@ -15,2 +15,3 @@ /*---------------------------------------------------------------------------------------------

export class ReadonlyOrderedSet {
_array;
/** Construct a new ReadonlyOrderedSet<T>.

@@ -17,0 +18,0 @@ * @param compare The function used to compare elements within the set, determining their ordering.

@@ -15,2 +15,5 @@ /*---------------------------------------------------------------------------------------------

export class PriorityQueue {
_array = [];
_compare;
_clone;
/**

@@ -23,3 +26,2 @@ * Constructor

constructor(compare, clone = shallowClone) {
this._array = [];
this._compare = compare;

@@ -26,0 +28,0 @@ this._clone = clone;

@@ -83,2 +83,6 @@ /*---------------------------------------------------------------------------------------------

export class ReadonlySortedArray {
_array = [];
_compare;
_clone;
_duplicatePolicy;
/**

@@ -91,3 +95,2 @@ * Construct a new ReadonlySortedArray<T>.

constructor(compare, duplicatePolicy = false, clone = shallowClone) {
this._array = [];
this._compare = compare;

@@ -94,0 +97,0 @@ this._clone = clone;

@@ -14,3 +14,3 @@ /*---------------------------------------------------------------------------------------------

export class StatusCategory {
static { this.handlers = new Set(); }
static handlers = new Set();
static for(error) {

@@ -34,6 +34,3 @@ for (const handler of this.handlers) {

export class SuccessCategory extends StatusCategory {
constructor() {
super(...arguments);
this.error = false;
}
error = false;
}

@@ -45,6 +42,3 @@ /**

export class ErrorCategory extends StatusCategory {
constructor() {
super(...arguments);
this.error = true;
}
error = true;
}

@@ -54,151 +48,94 @@ var HTTP;

class OK extends SuccessCategory {
constructor() {
super(...arguments);
this.name = "OK";
this.code = 200;
}
name = "OK";
code = 200;
}
HTTP.OK = OK;
class Accepted extends SuccessCategory {
constructor() {
super(...arguments);
this.name = "Accepted";
this.code = 202;
}
name = "Accepted";
code = 202;
}
HTTP.Accepted = Accepted;
class NoContent extends SuccessCategory {
constructor() {
super(...arguments);
this.name = "NoContent";
this.code = 204;
}
name = "NoContent";
code = 204;
}
HTTP.NoContent = NoContent;
class BadRequest extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "BadRequest";
this.code = 400;
}
name = "BadRequest";
code = 400;
}
HTTP.BadRequest = BadRequest;
class Unauthorized extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Unauthorized";
this.code = 401;
}
name = "Unauthorized";
code = 401;
}
HTTP.Unauthorized = Unauthorized;
class Forbidden extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Forbidden";
this.code = 403;
}
name = "Forbidden";
code = 403;
}
HTTP.Forbidden = Forbidden;
class NotFound extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "NotFound";
this.code = 404;
}
name = "NotFound";
code = 404;
}
HTTP.NotFound = NotFound;
class RequestTimeout extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "RequestTimeout";
this.code = 408;
}
name = "RequestTimeout";
code = 408;
}
HTTP.RequestTimeout = RequestTimeout;
class Conflict extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Conflict";
this.code = 409;
}
name = "Conflict";
code = 409;
}
HTTP.Conflict = Conflict;
class Gone extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "Gone";
this.code = 410;
}
name = "Gone";
code = 410;
}
HTTP.Gone = Gone;
class PreconditionFailed extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "PreconditionFailed";
this.code = 412;
}
name = "PreconditionFailed";
code = 412;
}
HTTP.PreconditionFailed = PreconditionFailed;
class ExpectationFailed extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "ExpectationFailed";
this.code = 417;
}
name = "ExpectationFailed";
code = 417;
}
HTTP.ExpectationFailed = ExpectationFailed;
class MisdirectedRequest extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "MisdirectedRequest";
this.code = 421;
}
name = "MisdirectedRequest";
code = 421;
}
HTTP.MisdirectedRequest = MisdirectedRequest;
class UnprocessableEntity extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "UnprocessableEntity";
this.code = 422;
}
name = "UnprocessableEntity";
code = 422;
}
HTTP.UnprocessableEntity = UnprocessableEntity;
class UpgradeRequired extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "UpgradeRequired";
this.code = 426;
}
name = "UpgradeRequired";
code = 426;
}
HTTP.UpgradeRequired = UpgradeRequired;
class PreconditionRequired extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "PreconditionRequired";
this.code = 428;
}
name = "PreconditionRequired";
code = 428;
}
HTTP.PreconditionRequired = PreconditionRequired;
class TooManyRequests extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "TooManyRequests";
this.code = 429;
}
name = "TooManyRequests";
code = 429;
}
HTTP.TooManyRequests = TooManyRequests;
class InternalServerError extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "InternalServerError";
this.code = 500;
}
name = "InternalServerError";
code = 500;
}
HTTP.InternalServerError = InternalServerError;
class NotImplemented extends ErrorCategory {
constructor() {
super(...arguments);
this.name = "NotImplemented";
this.code = 501;
}
name = "NotImplemented";
code = 501;
}

@@ -205,0 +142,0 @@ HTTP.NotImplemented = NotImplemented;

@@ -13,2 +13,3 @@ /*---------------------------------------------------------------------------------------------

export class BeDuration {
_milliseconds;
constructor(milliseconds = 0) { this._milliseconds = milliseconds; }

@@ -80,2 +81,3 @@ /** The duration in milliseconds */

export class BeTimePoint {
_milliseconds;
/** the time in milliseconds, of this BeTimePoint (relative to January 1, 1970 00:00:00 UTC.) */

@@ -119,2 +121,5 @@ get milliseconds() { return this._milliseconds; }

export class StopWatch {
description;
_start;
_stop;
/** Get the elapsed time since start() on a running timer. */

@@ -121,0 +126,0 @@ get current() { return BeDuration.fromMilliseconds(BeTimePoint.now().milliseconds - (!!this._start ? this._start.milliseconds : 0)); }

@@ -76,2 +76,4 @@ /*---------------------------------------------------------------------------------------------

export class Tracing {
static _tracer;
static _openTelemetry;
/**

@@ -78,0 +80,0 @@ * If OpenTelemetry tracing is enabled, creates a new span and runs the provided function in it.

@@ -29,6 +29,5 @@ /*---------------------------------------------------------------------------------------------

export class TupleKeyedMap {
_map = new Map();
// argument types match those of Map
constructor(entries) {
this._map = new Map();
this._size = 0;
if (entries)

@@ -93,2 +92,3 @@ for (const [k, v] of entries) {

}
_size = 0;
get size() {

@@ -95,0 +95,0 @@ return this._size;

@@ -24,2 +24,10 @@ /*---------------------------------------------------------------------------------------------

export class TypedArrayBuilder {
/** The constructor for the specific type of array being populated. */
_constructor;
/** The underlying typed array, to be reallocated and copied when its capacity is exceeded. */
_data;
/** The number of elements added to the array so far. */
_length;
/** Multiplier applied to required capacity by [[ensureCapacity]]. */
growthFactor;
/** Constructs a new builder from the specified options, with a [[length]] of zero. */

@@ -26,0 +34,0 @@ constructor(constructor, options) {

@@ -18,11 +18,11 @@ /*---------------------------------------------------------------------------------------------

/** handler for re-throwing exceptions directly */
static { this.reThrowImmediate = (e) => { throw e; }; }
static reThrowImmediate = (e) => { throw e; };
/** handler for re-throwing exceptions from an asynchronous interval (so the current call stack is not aborted) */
static { this.reThrowDeferred = (e) => setTimeout(() => { throw e; }, 0); }
static reThrowDeferred = (e) => setTimeout(() => { throw e; }, 0);
/** handler for logging exception to console */
static { this.consoleLog = (e) => console.error(e); } // eslint-disable-line no-console
static consoleLog = (e) => console.error(e); // eslint-disable-line no-console
/** handler for logging exception with [[Logger]] */
static { this.errorLog = (e) => Logger.logException("unhandled", e); }
static { this._telemetry = []; }
static { this._handler = this.errorLog; } // default to error logging
static errorLog = (e) => Logger.logException("unhandled", e);
static _telemetry = [];
static _handler = this.errorLog; // default to error logging
constructor() { } // this is a singleton

@@ -29,0 +29,0 @@ /** Add a "telemetry tracker" for unexpected errors. Useful for tracking/reporting errors without changing handler.

@@ -20,2 +20,5 @@ /*---------------------------------------------------------------------------------------------

export class YieldManager {
/** Options controlling the yield behavior. */
options;
_counter = 0;
/** Constructor.

@@ -25,3 +28,2 @@ * @param options Options customizing the yield behavior. Omitted properties are assigned their default values.

constructor(options = {}) {
this._counter = 0;
this.options = { ...defaultYieldManagerOptions, ...options };

@@ -28,0 +30,0 @@ }

{
"name": "@itwin/core-bentley",
"version": "5.0.0-dev.56",
"version": "5.0.0-dev.57",
"description": "Bentley JavaScript core components",

@@ -33,3 +33,3 @@ "main": "lib/cjs/core-bentley.js",

"vitest": "^2.1.0",
"@itwin/build-tools": "5.0.0-dev.56"
"@itwin/build-tools": "5.0.0-dev.57"
},

@@ -36,0 +36,0 @@ "nyc": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc