@fluid-experimental/property-common 2.114.0 → 2.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/datastructures/index.d.ts +4 -4
  3. package/dist/datastructures/index.d.ts.map +1 -1
  4. package/dist/datastructures/index.js +21 -21
  5. package/dist/datastructures/index.js.map +1 -1
  6. package/dist/datastructures/integer64.js +9 -9
  7. package/dist/datastructures/integer64.js.map +1 -1
  8. package/dist/datastructures/sortedCollection.d.ts +1 -1
  9. package/dist/datastructures/sortedCollection.d.ts.map +1 -1
  10. package/dist/datastructures/sortedCollection.js +2 -2
  11. package/dist/datastructures/sortedCollection.js.map +1 -1
  12. package/dist/deterministicRandomGenerator.js +5 -5
  13. package/dist/deterministicRandomGenerator.js.map +1 -1
  14. package/dist/error_objects/httpError.js +4 -4
  15. package/dist/error_objects/httpError.js.map +1 -1
  16. package/dist/error_objects/httpErrorNoStack.d.ts +1 -1
  17. package/dist/error_objects/httpErrorNoStack.d.ts.map +1 -1
  18. package/dist/error_objects/httpErrorNoStack.js +4 -4
  19. package/dist/error_objects/httpErrorNoStack.js.map +1 -1
  20. package/dist/error_objects/index.d.ts +4 -4
  21. package/dist/error_objects/index.d.ts.map +1 -1
  22. package/dist/error_objects/index.js +8 -8
  23. package/dist/error_objects/index.js.map +1 -1
  24. package/dist/error_objects/operationError.js +5 -5
  25. package/dist/error_objects/operationError.js.map +1 -1
  26. package/dist/index.d.ts +13 -11
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +45 -41
  29. package/dist/index.js.map +1 -1
  30. package/dist/package.json +4 -0
  31. package/lib/datastructures/index.d.ts +4 -4
  32. package/lib/datastructures/index.d.ts.map +1 -1
  33. package/lib/datastructures/index.js +4 -4
  34. package/lib/datastructures/index.js.map +1 -1
  35. package/lib/datastructures/integer64.js +2 -2
  36. package/lib/datastructures/integer64.js.map +1 -1
  37. package/lib/datastructures/sortedCollection.d.ts +1 -1
  38. package/lib/datastructures/sortedCollection.d.ts.map +1 -1
  39. package/lib/datastructures/sortedCollection.js +1 -1
  40. package/lib/datastructures/sortedCollection.js.map +1 -1
  41. package/lib/deterministicRandomGenerator.js +2 -2
  42. package/lib/deterministicRandomGenerator.js.map +1 -1
  43. package/lib/error_objects/httpError.js +1 -1
  44. package/lib/error_objects/httpError.js.map +1 -1
  45. package/lib/error_objects/httpErrorNoStack.d.ts +1 -1
  46. package/lib/error_objects/httpErrorNoStack.d.ts.map +1 -1
  47. package/lib/error_objects/httpErrorNoStack.js +2 -2
  48. package/lib/error_objects/httpErrorNoStack.js.map +1 -1
  49. package/lib/error_objects/index.d.ts +4 -4
  50. package/lib/error_objects/index.d.ts.map +1 -1
  51. package/lib/error_objects/index.js +4 -4
  52. package/lib/error_objects/index.js.map +1 -1
  53. package/lib/error_objects/operationError.js +1 -1
  54. package/lib/error_objects/operationError.js.map +1 -1
  55. package/lib/index.d.ts +13 -11
  56. package/lib/index.d.ts.map +1 -1
  57. package/lib/index.js +13 -11
  58. package/lib/index.js.map +1 -1
  59. package/package.json +17 -19
  60. package/src/datastructures/index.ts +4 -4
  61. package/src/datastructures/integer64.ts +2 -2
  62. package/src/datastructures/sortedCollection.ts +1 -1
  63. package/src/deterministicRandomGenerator.ts +2 -2
  64. package/src/error_objects/httpError.ts +1 -1
  65. package/src/error_objects/httpErrorNoStack.ts +2 -2
  66. package/src/error_objects/index.ts +4 -4
  67. package/src/error_objects/operationError.ts +1 -1
  68. package/src/index.ts +18 -11
  69. package/tsconfig.cjs.json +7 -0
  70. package/tsconfig.json +7 -4
  71. package/tsconfig.esnext.json +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluid-experimental/property-common
2
2
 
3
+ ## 2.115.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.114.0
4
8
 
5
9
  Dependency updates only.
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { Collection } from "./collection";
6
- export { BaseDataArray, BoolDataArray, Float32DataArray, Float64DataArray, Int16DataArray, Int32DataArray, Int8DataArray, StringDataArray, Uint16DataArray, Uint32DataArray, Uint8DataArray, UniversalDataArray, } from "./dataArray";
7
- export { Int64, Integer64, Uint64 } from "./integer64";
8
- export { SortedCollection } from "./sortedCollection";
5
+ export { Collection } from "./collection.js";
6
+ export { BaseDataArray, BoolDataArray, Float32DataArray, Float64DataArray, Int16DataArray, Int32DataArray, Int8DataArray, StringDataArray, Uint16DataArray, Uint32DataArray, Uint8DataArray, UniversalDataArray, } from "./dataArray.js";
7
+ export { Int64, Integer64, Uint64 } from "./integer64.js";
8
+ export { SortedCollection } from "./sortedCollection.js";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datastructures/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACN,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datastructures/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACN,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -5,25 +5,25 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.SortedCollection = exports.Uint64 = exports.Integer64 = exports.Int64 = exports.UniversalDataArray = exports.Uint8DataArray = exports.Uint32DataArray = exports.Uint16DataArray = exports.StringDataArray = exports.Int8DataArray = exports.Int32DataArray = exports.Int16DataArray = exports.Float64DataArray = exports.Float32DataArray = exports.BoolDataArray = exports.BaseDataArray = exports.Collection = void 0;
8
- var collection_1 = require("./collection");
9
- Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_1.Collection; } });
10
- var dataArray_1 = require("./dataArray");
11
- Object.defineProperty(exports, "BaseDataArray", { enumerable: true, get: function () { return dataArray_1.BaseDataArray; } });
12
- Object.defineProperty(exports, "BoolDataArray", { enumerable: true, get: function () { return dataArray_1.BoolDataArray; } });
13
- Object.defineProperty(exports, "Float32DataArray", { enumerable: true, get: function () { return dataArray_1.Float32DataArray; } });
14
- Object.defineProperty(exports, "Float64DataArray", { enumerable: true, get: function () { return dataArray_1.Float64DataArray; } });
15
- Object.defineProperty(exports, "Int16DataArray", { enumerable: true, get: function () { return dataArray_1.Int16DataArray; } });
16
- Object.defineProperty(exports, "Int32DataArray", { enumerable: true, get: function () { return dataArray_1.Int32DataArray; } });
17
- Object.defineProperty(exports, "Int8DataArray", { enumerable: true, get: function () { return dataArray_1.Int8DataArray; } });
18
- Object.defineProperty(exports, "StringDataArray", { enumerable: true, get: function () { return dataArray_1.StringDataArray; } });
19
- Object.defineProperty(exports, "Uint16DataArray", { enumerable: true, get: function () { return dataArray_1.Uint16DataArray; } });
20
- Object.defineProperty(exports, "Uint32DataArray", { enumerable: true, get: function () { return dataArray_1.Uint32DataArray; } });
21
- Object.defineProperty(exports, "Uint8DataArray", { enumerable: true, get: function () { return dataArray_1.Uint8DataArray; } });
22
- Object.defineProperty(exports, "UniversalDataArray", { enumerable: true, get: function () { return dataArray_1.UniversalDataArray; } });
23
- var integer64_1 = require("./integer64");
24
- Object.defineProperty(exports, "Int64", { enumerable: true, get: function () { return integer64_1.Int64; } });
25
- Object.defineProperty(exports, "Integer64", { enumerable: true, get: function () { return integer64_1.Integer64; } });
26
- Object.defineProperty(exports, "Uint64", { enumerable: true, get: function () { return integer64_1.Uint64; } });
27
- var sortedCollection_1 = require("./sortedCollection");
28
- Object.defineProperty(exports, "SortedCollection", { enumerable: true, get: function () { return sortedCollection_1.SortedCollection; } });
8
+ var collection_js_1 = require("./collection.js");
9
+ Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_js_1.Collection; } });
10
+ var dataArray_js_1 = require("./dataArray.js");
11
+ Object.defineProperty(exports, "BaseDataArray", { enumerable: true, get: function () { return dataArray_js_1.BaseDataArray; } });
12
+ Object.defineProperty(exports, "BoolDataArray", { enumerable: true, get: function () { return dataArray_js_1.BoolDataArray; } });
13
+ Object.defineProperty(exports, "Float32DataArray", { enumerable: true, get: function () { return dataArray_js_1.Float32DataArray; } });
14
+ Object.defineProperty(exports, "Float64DataArray", { enumerable: true, get: function () { return dataArray_js_1.Float64DataArray; } });
15
+ Object.defineProperty(exports, "Int16DataArray", { enumerable: true, get: function () { return dataArray_js_1.Int16DataArray; } });
16
+ Object.defineProperty(exports, "Int32DataArray", { enumerable: true, get: function () { return dataArray_js_1.Int32DataArray; } });
17
+ Object.defineProperty(exports, "Int8DataArray", { enumerable: true, get: function () { return dataArray_js_1.Int8DataArray; } });
18
+ Object.defineProperty(exports, "StringDataArray", { enumerable: true, get: function () { return dataArray_js_1.StringDataArray; } });
19
+ Object.defineProperty(exports, "Uint16DataArray", { enumerable: true, get: function () { return dataArray_js_1.Uint16DataArray; } });
20
+ Object.defineProperty(exports, "Uint32DataArray", { enumerable: true, get: function () { return dataArray_js_1.Uint32DataArray; } });
21
+ Object.defineProperty(exports, "Uint8DataArray", { enumerable: true, get: function () { return dataArray_js_1.Uint8DataArray; } });
22
+ Object.defineProperty(exports, "UniversalDataArray", { enumerable: true, get: function () { return dataArray_js_1.UniversalDataArray; } });
23
+ var integer64_js_1 = require("./integer64.js");
24
+ Object.defineProperty(exports, "Int64", { enumerable: true, get: function () { return integer64_js_1.Int64; } });
25
+ Object.defineProperty(exports, "Integer64", { enumerable: true, get: function () { return integer64_js_1.Integer64; } });
26
+ Object.defineProperty(exports, "Uint64", { enumerable: true, get: function () { return integer64_js_1.Uint64; } });
27
+ var sortedCollection_js_1 = require("./sortedCollection.js");
28
+ Object.defineProperty(exports, "SortedCollection", { enumerable: true, get: function () { return sortedCollection_js_1.SortedCollection; } });
29
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datastructures/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,yCAaqB;AAZpB,0GAAA,aAAa,OAAA;AACb,0GAAA,aAAa,OAAA;AACb,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAChB,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA;AACb,4GAAA,eAAe,OAAA;AACf,4GAAA,eAAe,OAAA;AACf,4GAAA,eAAe,OAAA;AACf,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAEnB,yCAAuD;AAA9C,kGAAA,KAAK,OAAA;AAAE,sGAAA,SAAS,OAAA;AAAE,mGAAA,MAAM,OAAA;AACjC,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { Collection } from \"./collection\";\nexport {\n\tBaseDataArray,\n\tBoolDataArray,\n\tFloat32DataArray,\n\tFloat64DataArray,\n\tInt16DataArray,\n\tInt32DataArray,\n\tInt8DataArray,\n\tStringDataArray,\n\tUint16DataArray,\n\tUint32DataArray,\n\tUint8DataArray,\n\tUniversalDataArray,\n} from \"./dataArray\";\nexport { Int64, Integer64, Uint64 } from \"./integer64\";\nexport { SortedCollection } from \"./sortedCollection\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datastructures/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,+CAawB;AAZvB,6GAAA,aAAa,OAAA;AACb,6GAAA,aAAa,OAAA;AACb,gHAAA,gBAAgB,OAAA;AAChB,gHAAA,gBAAgB,OAAA;AAChB,8GAAA,cAAc,OAAA;AACd,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,+GAAA,eAAe,OAAA;AACf,+GAAA,eAAe,OAAA;AACf,+GAAA,eAAe,OAAA;AACf,8GAAA,cAAc,OAAA;AACd,kHAAA,kBAAkB,OAAA;AAEnB,+CAA0D;AAAjD,qGAAA,KAAK,OAAA;AAAE,yGAAA,SAAS,OAAA;AAAE,sGAAA,MAAM,OAAA;AACjC,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { Collection } from \"./collection.js\";\nexport {\n\tBaseDataArray,\n\tBoolDataArray,\n\tFloat32DataArray,\n\tFloat64DataArray,\n\tInt16DataArray,\n\tInt32DataArray,\n\tInt8DataArray,\n\tStringDataArray,\n\tUint16DataArray,\n\tUint32DataArray,\n\tUint8DataArray,\n\tUniversalDataArray,\n} from \"./dataArray.js\";\nexport { Int64, Integer64, Uint64 } from \"./integer64.js\";\nexport { SortedCollection } from \"./sortedCollection.js\";\n"]}
@@ -12,10 +12,10 @@ exports.Uint64 = exports.Int64 = exports.Integer64 = void 0;
12
12
  * @fileoverview implements (U)Int64 Datastructures
13
13
  */
14
14
  const lodash_1 = __importDefault(require("lodash"));
15
- const consoleUtils_1 = require("../consoleUtils");
16
- const constants_1 = require("../constants");
15
+ const consoleUtils_js_1 = require("../consoleUtils.js");
16
+ const constants_js_1 = require("../constants.js");
17
17
  const BIT32 = 4294967296;
18
- const { MSG } = constants_1.constants;
18
+ const { MSG } = constants_js_1.constants;
19
19
  /**
20
20
  * A data representation class for 64 bit integer types.
21
21
  *
@@ -46,8 +46,8 @@ class Integer64 {
46
46
  return this.low;
47
47
  }
48
48
  _int64toString(isSigned, in_radix = 10) {
49
- consoleUtils_1.ConsoleUtils.assert(lodash_1.default.isNumber(in_radix), `${MSG.IN_RADIX_MUST_BE_NUMBER} ${in_radix}`);
50
- consoleUtils_1.ConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);
49
+ consoleUtils_js_1.ConsoleUtils.assert(lodash_1.default.isNumber(in_radix), `${MSG.IN_RADIX_MUST_BE_NUMBER} ${in_radix}`);
50
+ consoleUtils_js_1.ConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);
51
51
  let high = this.getValueHigh();
52
52
  let low = this.getValueLow();
53
53
  let result = "";
@@ -82,10 +82,10 @@ exports.Integer64 = Integer64;
82
82
  * @returns Low and high bits of `Int64`.
83
83
  */
84
84
  function _stringToInt64(in_signed, in_string, in_radix = 10) {
85
- consoleUtils_1.ConsoleUtils.assert(lodash_1.default.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);
85
+ consoleUtils_js_1.ConsoleUtils.assert(lodash_1.default.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);
86
86
  const string = in_string.trim();
87
- consoleUtils_1.ConsoleUtils.assert(lodash_1.default.isNumber(in_radix), `${MSG.IN_RADIX_BETWEEN_2_36} ${in_radix}`);
88
- consoleUtils_1.ConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);
87
+ consoleUtils_js_1.ConsoleUtils.assert(lodash_1.default.isNumber(in_radix), `${MSG.IN_RADIX_BETWEEN_2_36} ${in_radix}`);
88
+ consoleUtils_js_1.ConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);
89
89
  let position = 0;
90
90
  let negative = false;
91
91
  let high = 0;
@@ -94,7 +94,7 @@ function _stringToInt64(in_signed, in_string, in_radix = 10) {
94
94
  negative = true;
95
95
  position += 1;
96
96
  }
97
- consoleUtils_1.ConsoleUtils.assert(!negative || in_signed, MSG.CANNOT_UPDATE_TO_NEGATIVE + string);
97
+ consoleUtils_js_1.ConsoleUtils.assert(!negative || in_signed, MSG.CANNOT_UPDATE_TO_NEGATIVE + string);
98
98
  while (position < string.length) {
99
99
  const digit = parseInt(string[position++], in_radix);
100
100
  if (isNaN(digit)) {
@@ -1 +1 @@
1
- {"version":3,"file":"integer64.js","sourceRoot":"","sources":["../../src/datastructures/integer64.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;GAEG;AAEH,oDAAuB;AAEvB,kDAA+C;AAC/C,4CAAyC;AAEzC,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,EAAE,GAAG,EAAE,GAAG,qBAAS,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,MAAa,SAAS;IACrB,YACW,MAAM,CAAC,EACP,OAAO,CAAC;QADR,QAAG,GAAH,GAAG,CAAI;QACP,SAAI,GAAJ,IAAI,CAAI;IAChB,CAAC;IAEJ;;OAEG;IACH,YAAY;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,WAAW;QACV,OAAO,IAAI,CAAC,GAAG,CAAC;IACjB,CAAC;IAES,cAAc,CA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E,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK;QACJ,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,KAAK;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;CACD;AAbD,wBAaC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview implements (U)Int64 Datastructures\n */\n\nimport _ from \"lodash\";\n\nimport { ConsoleUtils } from \"../consoleUtils\";\nimport { constants } from \"../constants\";\n\nconst BIT32 = 4294967296;\nconst { MSG } = constants;\n\n/**\n * A data representation class for 64 bit integer types.\n *\n * @remarks This is necessary since js doesn't support 64bit integers natively yet.\n *\n * Please note this class is immutable.\n * There are and there won't be set functions! (see javascript String class)\n *\n * @param low - Lower 32 bit\n * @param high - Higher 32 bit\n * @internal\n */\nexport class Integer64 {\n\tconstructor(\n\t\tprotected low = 0,\n\t\tprotected high = 0,\n\t) {}\n\n\t/**\n\t * @returns The higher 32 bit integer part\n\t */\n\tgetValueHigh() {\n\t\treturn this.high;\n\t}\n\n\t/**\n\t * @returns The lower 32 bit integer part\n\t */\n\tgetValueLow() {\n\t\treturn this.low;\n\t}\n\n\tprotected _int64toString(isSigned: boolean, in_radix = 10): string {\n\t\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_MUST_BE_NUMBER} ${in_radix}`);\n\t\tConsoleUtils.assert(\n\t\t\tin_radix >= 2 && 36 >= in_radix,\n\t\t\t`${MSG.BASE_OUT_OF_RANGE} ${in_radix}`,\n\t\t);\n\n\t\tlet high = this.getValueHigh();\n\t\tlet low = this.getValueLow();\n\t\tlet result = \"\";\n\t\tconst sign = !!(isSigned && high & 0x80000000); // eslint-disable-line no-bitwise\n\t\tif (sign) {\n\t\t\thigh = ~high; // eslint-disable-line no-bitwise\n\t\t\tlow = BIT32 - low;\n\t\t}\n\t\tdo {\n\t\t\tconst mod = (high % in_radix) * BIT32 + low;\n\t\t\thigh = Math.floor(high / in_radix);\n\t\t\tlow = Math.floor(mod / in_radix);\n\t\t\tresult = (mod % in_radix).toString(in_radix) + result;\n\t\t} while (high || low);\n\n\t\treturn sign ? `-${result}` : result;\n\t}\n}\n\n/**\n * stringToInt function parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param in_signed - If the expect response should be signed or unsigned.\n * @param in_string - The value to parse. Leading whitespace in the string argument is ignored.\n * @param in_radix - An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n *\n * @throws If `in_string` is not a string.\n * @throws If `in_radix` is entered but is not a number between 2 and 36.\n * @throws If the property is a `Uint64` property and `in_string` is a negative number.\n * @throws If `in_string` contains characters other than numbers.\n *\n * @returns Low and high bits of `Int64`.\n */\nfunction _stringToInt64(in_signed: boolean, in_string: string, in_radix = 10): number[] {\n\tConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n\tconst string = in_string.trim();\n\n\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_BETWEEN_2_36} ${in_radix}`);\n\tConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);\n\n\tlet position = 0;\n\tlet negative = false;\n\tlet high = 0;\n\tlet low = 0;\n\tif (string.startsWith(\"-\")) {\n\t\tnegative = true;\n\t\tposition += 1;\n\t}\n\n\tConsoleUtils.assert(!negative || in_signed, MSG.CANNOT_UPDATE_TO_NEGATIVE + string);\n\n\twhile (position < string.length) {\n\t\tconst digit = parseInt(string[position++], in_radix);\n\t\tif (isNaN(digit)) {\n\t\t\tthrow new TypeError(MSG.CANNOT_PARSE_INVALID_CHARACTERS + string);\n\t\t}\n\t\tlow = low * in_radix + digit;\n\t\thigh = high * in_radix + Math.floor(low / BIT32);\n\t\tlow %= BIT32;\n\t}\n\n\tif (negative) {\n\t\t// eslint-disable-next-line no-bitwise\n\t\thigh = ~high;\n\t\tif (low) {\n\t\t\tlow = BIT32 - low;\n\t\t} else {\n\t\t\thigh += 1;\n\t\t}\n\t}\n\n\treturn [low, high];\n}\n\n/**\n * A data representation class for the signed 64 bit integer type\n * @internal\n */\nexport class Int64 extends Integer64 {\n\tstatic fromString = function (in_string: string, radix = 10) {\n\t\tconst [low, high] = _stringToInt64(true, in_string, radix);\n\t\treturn new Int64(low, high);\n\t};\n\n\tclone() {\n\t\treturn new Int64(this.low, this.high);\n\t}\n\n\ttoString(radix = 10) {\n\t\treturn this._int64toString(true, radix);\n\t}\n}\n\n/**\n * A data representation class for the unsigned 64 bit integer type\n * @internal\n */\nexport class Uint64 extends Integer64 {\n\tstatic fromString(in_string: string, in_radix = 10) {\n\t\tconst [low, high] = _stringToInt64.call(this, false, in_string, in_radix);\n\t\treturn new Uint64(low, high);\n\t}\n\n\tclone() {\n\t\treturn new Uint64(this.low, this.high);\n\t}\n\n\ttoString(radix) {\n\t\treturn this._int64toString(false, radix);\n\t}\n}\n"]}
1
+ {"version":3,"file":"integer64.js","sourceRoot":"","sources":["../../src/datastructures/integer64.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;GAEG;AAEH,oDAAuB;AAEvB,wDAAkD;AAClD,kDAA4C;AAE5C,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,EAAE,GAAG,EAAE,GAAG,wBAAS,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,MAAa,SAAS;IACrB,YACW,MAAM,CAAC,EACP,OAAO,CAAC;QADR,QAAG,GAAH,GAAG,CAAI;QACP,SAAI,GAAJ,IAAI,CAAI;IAChB,CAAC;IAEJ;;OAEG;IACH,YAAY;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,WAAW;QACV,OAAO,IAAI,CAAC,GAAG,C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O,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK;QACJ,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,KAAK;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;CACD;AAbD,wBAaC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview implements (U)Int64 Datastructures\n */\n\nimport _ from \"lodash\";\n\nimport { ConsoleUtils } from \"../consoleUtils.js\";\nimport { constants } from \"../constants.js\";\n\nconst BIT32 = 4294967296;\nconst { MSG } = constants;\n\n/**\n * A data representation class for 64 bit integer types.\n *\n * @remarks This is necessary since js doesn't support 64bit integers natively yet.\n *\n * Please note this class is immutable.\n * There are and there won't be set functions! (see javascript String class)\n *\n * @param low - Lower 32 bit\n * @param high - Higher 32 bit\n * @internal\n */\nexport class Integer64 {\n\tconstructor(\n\t\tprotected low = 0,\n\t\tprotected high = 0,\n\t) {}\n\n\t/**\n\t * @returns The higher 32 bit integer part\n\t */\n\tgetValueHigh() {\n\t\treturn this.high;\n\t}\n\n\t/**\n\t * @returns The lower 32 bit integer part\n\t */\n\tgetValueLow() {\n\t\treturn this.low;\n\t}\n\n\tprotected _int64toString(isSigned: boolean, in_radix = 10): string {\n\t\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_MUST_BE_NUMBER} ${in_radix}`);\n\t\tConsoleUtils.assert(\n\t\t\tin_radix >= 2 && 36 >= in_radix,\n\t\t\t`${MSG.BASE_OUT_OF_RANGE} ${in_radix}`,\n\t\t);\n\n\t\tlet high = this.getValueHigh();\n\t\tlet low = this.getValueLow();\n\t\tlet result = \"\";\n\t\tconst sign = !!(isSigned && high & 0x80000000); // eslint-disable-line no-bitwise\n\t\tif (sign) {\n\t\t\thigh = ~high; // eslint-disable-line no-bitwise\n\t\t\tlow = BIT32 - low;\n\t\t}\n\t\tdo {\n\t\t\tconst mod = (high % in_radix) * BIT32 + low;\n\t\t\thigh = Math.floor(high / in_radix);\n\t\t\tlow = Math.floor(mod / in_radix);\n\t\t\tresult = (mod % in_radix).toString(in_radix) + result;\n\t\t} while (high || low);\n\n\t\treturn sign ? `-${result}` : result;\n\t}\n}\n\n/**\n * stringToInt function parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param in_signed - If the expect response should be signed or unsigned.\n * @param in_string - The value to parse. Leading whitespace in the string argument is ignored.\n * @param in_radix - An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n *\n * @throws If `in_string` is not a string.\n * @throws If `in_radix` is entered but is not a number between 2 and 36.\n * @throws If the property is a `Uint64` property and `in_string` is a negative number.\n * @throws If `in_string` contains characters other than numbers.\n *\n * @returns Low and high bits of `Int64`.\n */\nfunction _stringToInt64(in_signed: boolean, in_string: string, in_radix = 10): number[] {\n\tConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n\tconst string = in_string.trim();\n\n\tConsoleUtils.assert(_.isNumber(in_radix), `${MSG.IN_RADIX_BETWEEN_2_36} ${in_radix}`);\n\tConsoleUtils.assert(in_radix >= 2 && 36 >= in_radix, `${MSG.BASE_OUT_OF_RANGE} ${in_radix}`);\n\n\tlet position = 0;\n\tlet negative = false;\n\tlet high = 0;\n\tlet low = 0;\n\tif (string.startsWith(\"-\")) {\n\t\tnegative = true;\n\t\tposition += 1;\n\t}\n\n\tConsoleUtils.assert(!negative || in_signed, MSG.CANNOT_UPDATE_TO_NEGATIVE + string);\n\n\twhile (position < string.length) {\n\t\tconst digit = parseInt(string[position++], in_radix);\n\t\tif (isNaN(digit)) {\n\t\t\tthrow new TypeError(MSG.CANNOT_PARSE_INVALID_CHARACTERS + string);\n\t\t}\n\t\tlow = low * in_radix + digit;\n\t\thigh = high * in_radix + Math.floor(low / BIT32);\n\t\tlow %= BIT32;\n\t}\n\n\tif (negative) {\n\t\t// eslint-disable-next-line no-bitwise\n\t\thigh = ~high;\n\t\tif (low) {\n\t\t\tlow = BIT32 - low;\n\t\t} else {\n\t\t\thigh += 1;\n\t\t}\n\t}\n\n\treturn [low, high];\n}\n\n/**\n * A data representation class for the signed 64 bit integer type\n * @internal\n */\nexport class Int64 extends Integer64 {\n\tstatic fromString = function (in_string: string, radix = 10) {\n\t\tconst [low, high] = _stringToInt64(true, in_string, radix);\n\t\treturn new Int64(low, high);\n\t};\n\n\tclone() {\n\t\treturn new Int64(this.low, this.high);\n\t}\n\n\ttoString(radix = 10) {\n\t\treturn this._int64toString(true, radix);\n\t}\n}\n\n/**\n * A data representation class for the unsigned 64 bit integer type\n * @internal\n */\nexport class Uint64 extends Integer64 {\n\tstatic fromString(in_string: string, in_radix = 10) {\n\t\tconst [low, high] = _stringToInt64.call(this, false, in_string, in_radix);\n\t\treturn new Uint64(low, high);\n\t}\n\n\tclone() {\n\t\treturn new Uint64(this.low, this.high);\n\t}\n\n\ttoString(radix) {\n\t\treturn this._int64toString(false, radix);\n\t}\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Collection } from "./collection";
5
+ import { Collection } from "./collection.js";
6
6
  /**
7
7
  * @internal
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sortedCollection.d.ts","sourceRoot":"","sources":["../../src/datastructures/sortedCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,mBAAmB,CAAC,CAA+C;IAE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;IAMrB;;;OAGG;IACH,KAAK,IAAI,gBAAgB,CAAC,CAAC,CAAC;IAO5B;;;;;;;OAOG;IACH,OAAO,CAAC,yBAAyB;IAqCjC;;;;;;OAMG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM;IAUjC;;;;;;OAMG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAS9C"}
@@ -13,11 +13,11 @@ exports.SortedCollection = void 0;
13
13
  * Declaration of the SortedCollection class
14
14
  */
15
15
  const lodash_1 = __importDefault(require("lodash"));
16
- const collection_1 = require("./collection");
16
+ const collection_js_1 = require("./collection.js");
17
17
  /**
18
18
  * @internal
19
19
  */
20
- class SortedCollection extends collection_1.Collection {
20
+ class SortedCollection extends collection_js_1.Collection {
21
21
  /**
22
22
  * A sorted collection class.
23
23
  * @param in_name - a friendly name to describe this collection. If undefined
@@ -1 +1 @@
1
- {"version":3,"file":"sortedCollection.js","sourceRoot":"","sources":["../../src/datastructures/sortedCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;;GAGG;AAEH,oDAAuB;AAEvB,6CAA0C;AAE1C;;GAEG;AACH,MAAa,gBAAoB,SAAQ,uBAAa;IAIrD;;;;;;OAMG;IACH,YAAY,OAAgB,EAAE,OAAQ;QACrC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAXjB,gBAAW,GAAa,EAAE,CAAC;QAC3B,wBAAmB,GAAsC,SAAS,CAAC;IAW3E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,KAAwC;QAC7D,OAAO,CAAC,MAAM,CAAC,gBAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,yBAAyB,CAAC,CAAC;QAC/D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,MAAuB,EAAE,QAAW;QACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,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X,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;CACD;AA5JD,4CA4JC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the SortedCollection class\n */\n\nimport _ from \"lodash\";\n\nimport { Collection } from \"./collection\";\n\n/**\n * @internal\n */\nexport class SortedCollection<T> extends Collection<T> {\n\tprivate _sortedKeys: string[] = [];\n\tprivate _comparisonFunction?: (x: string, y: string) => number = undefined;\n\n\t/**\n\t * A sorted collection class.\n\t * @param in_name - a friendly name to describe this collection. If undefined\n\t * the collection will have a default \"Untitled Collection\" assigned to its name.\n\t * @param in_type - optional parameter pointing to the constructor\n\t * of a type this Collection will host.\n\t */\n\tconstructor(in_name?: string, in_type?) {\n\t\tsuper(in_name, in_type);\n\t}\n\n\t/**\n\t * Set the comparison function. By default the keys will be sorted wrt their ASCII code.\n\t *\n\t * @param in_fn - The function to compare two entries.\n\t * The return value of this function must convey to the following cases:\n\t *\n\t * - if a \\> b, then the return value must be greater than 0.\n\t *\n\t * - if a \\< b, then the return value must be less than 0.\n\t *\n\t * - if a == b, then the return value must be 0.\n\t */\n\tsetComparisonFunction(in_fn?: (x: string, y: string) => number) {\n\t\tconsole.assert(_.isFunction(in_fn), \"Must provide a function\");\n\t\tthis._comparisonFunction = in_fn;\n\t}\n\n\t/**\n\t * Add an item to the collection. Sort the list of keys in an ascending order.\n\t *\n\t * @param in_key - Key to store the value under.\n\t * @param in_value - Value to store in the collection.\n\t *\n\t * @returns The value passed in.\n\t */\n\tadd(in_key: string | number, in_value: T) {\n\t\tconst toReturn = super.add(in_key, in_value);\n\n\t\tthis._sortedKeys.push(in_key.toString());\n\t\tthis._sortedKeys.sort(this._comparisonFunction);\n\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Remove an item from this Collection. This method returns a Boolean indicating\n\t * the success or failure of the removal. This is practical because if we were\n\t * to throw an error when the key doesn't exist, it would require additional\n\t * checks by the caller to make sure this key exists prior to removal. Which\n\t * would make the attempt of removal more verbose and also costly because the\n\t * caller would have to keep a list – somewhere else – of the things he can\n\t * and cannot remove.\n\t *\n\t * @param in_key - the key we wish to remove\n\t * @returns true if the key exists and was removed, false otherwise.\n\t */\n\tremove(in_key: string) {\n\t\tconst toReturn = super.remove(in_key);\n\t\tthis._sortedKeys = _.without(this._sortedKeys, in_key);\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @returns cloned SortedCollection\n\t */\n\tclone(): SortedCollection<T> {\n\t\tconst newCol = new SortedCollection<T>(this._name, this._type);\n\t\tnewCol.setComparisonFunction(this._comparisonFunction);\n\t\tnewCol.bulkAdd(this._items);\n\t\treturn newCol;\n\t}\n\n\t/**\n\t * Internal function use to search (binary search) for the nearest index that\n\t * the given key would be inserted.\n\t * i.e. given the array [10, 20, 30, 40, 50] the index that 35 should be inserted at is 3\n\t * @param in_array - Target array\n\t * @param in_key - Key to check against\n\t * @returns The index at which the key would be inserted in\n\t */\n\tprivate _binarySearchNearestIndex(in_array: string[], in_key: string): number {\n\t\tif (this._comparisonFunction === undefined) {\n\t\t\treturn _.sortedIndex(in_array, in_key);\n\t\t} else {\n\t\t\tconst middleIndex = Math.floor((in_array.length - 1) / 2);\n\n\t\t\tif (middleIndex < 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) > 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn this._binarySearchNearestIndex(in_array.slice(0, middleIndex), in_key);\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) < 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tmiddleIndex +\n\t\t\t\t\t1 +\n\t\t\t\t\tthis._binarySearchNearestIndex(\n\t\t\t\t\t\tin_array.slice(middleIndex + 1, in_array.length),\n\t\t\t\t\t\tin_key,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn middleIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Return the nearest next item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest next item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest next item\n\t * @returns The nearest next item\n\t */\n\tgetNearestNextItem(in_key: string) {\n\t\tconst closestNextIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestNextIndex === this.getCount()\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestNextIndex]);\n\t}\n\n\t/**\n\t * Return the nearest previous item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest previous item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest previous item\n\t * @returns The nearest previous item\n\t */\n\tgetNearestPreviousItem(in_key: string | number) {\n\t\tconst closestPreviousIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestPreviousIndex === 0\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestPreviousIndex - 1]);\n\t}\n}\n"]}
1
+ {"version":3,"file":"sortedCollection.js","sourceRoot":"","sources":["../../src/datastructures/sortedCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;;GAGG;AAEH,oDAAuB;AAEvB,mDAA6C;AAE7C;;GAEG;AACH,MAAa,gBAAoB,SAAQ,0BAAa;IAIrD;;;;;;OAMG;IACH,YAAY,OAAgB,EAAE,O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EAChB,MAAM,CAAC,QAAQ,EAAE,CACjB,CAAC;QACF,OAAO,gBAAgB,KAAK,IAAI,CAAC,QAAQ,EAAE;YAC1C,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB,CAAC,MAAuB;QAC7C,MAAM,oBAAoB,GAAG,IAAI,CAAC,yBAAyB,CAC1D,IAAI,CAAC,WAAW,EAChB,MAAM,CAAC,QAAQ,EAAE,CACjB,CAAC;QACF,OAAO,oBAAoB,KAAK,CAAC;YAChC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC;CACD;AA5JD,4CA4JC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the SortedCollection class\n */\n\nimport _ from \"lodash\";\n\nimport { Collection } from \"./collection.js\";\n\n/**\n * @internal\n */\nexport class SortedCollection<T> extends Collection<T> {\n\tprivate _sortedKeys: string[] = [];\n\tprivate _comparisonFunction?: (x: string, y: string) => number = undefined;\n\n\t/**\n\t * A sorted collection class.\n\t * @param in_name - a friendly name to describe this collection. If undefined\n\t * the collection will have a default \"Untitled Collection\" assigned to its name.\n\t * @param in_type - optional parameter pointing to the constructor\n\t * of a type this Collection will host.\n\t */\n\tconstructor(in_name?: string, in_type?) {\n\t\tsuper(in_name, in_type);\n\t}\n\n\t/**\n\t * Set the comparison function. By default the keys will be sorted wrt their ASCII code.\n\t *\n\t * @param in_fn - The function to compare two entries.\n\t * The return value of this function must convey to the following cases:\n\t *\n\t * - if a \\> b, then the return value must be greater than 0.\n\t *\n\t * - if a \\< b, then the return value must be less than 0.\n\t *\n\t * - if a == b, then the return value must be 0.\n\t */\n\tsetComparisonFunction(in_fn?: (x: string, y: string) => number) {\n\t\tconsole.assert(_.isFunction(in_fn), \"Must provide a function\");\n\t\tthis._comparisonFunction = in_fn;\n\t}\n\n\t/**\n\t * Add an item to the collection. Sort the list of keys in an ascending order.\n\t *\n\t * @param in_key - Key to store the value under.\n\t * @param in_value - Value to store in the collection.\n\t *\n\t * @returns The value passed in.\n\t */\n\tadd(in_key: string | number, in_value: T) {\n\t\tconst toReturn = super.add(in_key, in_value);\n\n\t\tthis._sortedKeys.push(in_key.toString());\n\t\tthis._sortedKeys.sort(this._comparisonFunction);\n\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Remove an item from this Collection. This method returns a Boolean indicating\n\t * the success or failure of the removal. This is practical because if we were\n\t * to throw an error when the key doesn't exist, it would require additional\n\t * checks by the caller to make sure this key exists prior to removal. Which\n\t * would make the attempt of removal more verbose and also costly because the\n\t * caller would have to keep a list – somewhere else – of the things he can\n\t * and cannot remove.\n\t *\n\t * @param in_key - the key we wish to remove\n\t * @returns true if the key exists and was removed, false otherwise.\n\t */\n\tremove(in_key: string) {\n\t\tconst toReturn = super.remove(in_key);\n\t\tthis._sortedKeys = _.without(this._sortedKeys, in_key);\n\t\treturn toReturn;\n\t}\n\n\t/**\n\t * Copy the items of in_collection to this collection.\n\t * @returns cloned SortedCollection\n\t */\n\tclone(): SortedCollection<T> {\n\t\tconst newCol = new SortedCollection<T>(this._name, this._type);\n\t\tnewCol.setComparisonFunction(this._comparisonFunction);\n\t\tnewCol.bulkAdd(this._items);\n\t\treturn newCol;\n\t}\n\n\t/**\n\t * Internal function use to search (binary search) for the nearest index that\n\t * the given key would be inserted.\n\t * i.e. given the array [10, 20, 30, 40, 50] the index that 35 should be inserted at is 3\n\t * @param in_array - Target array\n\t * @param in_key - Key to check against\n\t * @returns The index at which the key would be inserted in\n\t */\n\tprivate _binarySearchNearestIndex(in_array: string[], in_key: string): number {\n\t\tif (this._comparisonFunction === undefined) {\n\t\t\treturn _.sortedIndex(in_array, in_key);\n\t\t} else {\n\t\t\tconst middleIndex = Math.floor((in_array.length - 1) / 2);\n\n\t\t\tif (middleIndex < 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) > 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn this._binarySearchNearestIndex(in_array.slice(0, middleIndex), in_key);\n\t\t\t}\n\n\t\t\tif (this._comparisonFunction(in_array[middleIndex], in_key) < 0) {\n\t\t\t\tif (in_array.length === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tmiddleIndex +\n\t\t\t\t\t1 +\n\t\t\t\t\tthis._binarySearchNearestIndex(\n\t\t\t\t\t\tin_array.slice(middleIndex + 1, in_array.length),\n\t\t\t\t\t\tin_key,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn middleIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Return the nearest next item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest next item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest next item\n\t * @returns The nearest next item\n\t */\n\tgetNearestNextItem(in_key: string) {\n\t\tconst closestNextIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestNextIndex === this.getCount()\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestNextIndex]);\n\t}\n\n\t/**\n\t * Return the nearest previous item to the given key i.e.\n\t * For the given list of keys ['1.0.1', '2.0.0', '2.2.0', '7.0.1'] the nearest previous item to 6.0.1 is\n\t * the item mapped by '7.0.1'\n\t * @param in_key - The key to check against in order to get the nearest previous item\n\t * @returns The nearest previous item\n\t */\n\tgetNearestPreviousItem(in_key: string | number) {\n\t\tconst closestPreviousIndex = this._binarySearchNearestIndex(\n\t\t\tthis._sortedKeys,\n\t\t\tin_key.toString(),\n\t\t);\n\t\treturn closestPreviousIndex === 0\n\t\t\t? undefined\n\t\t\t: this.item(this._sortedKeys[closestPreviousIndex - 1]);\n\t}\n}\n"]}
@@ -13,8 +13,8 @@ exports.DeterministicRandomGenerator = void 0;
13
13
  */
14
14
  /* eslint-disable no-bitwise */
15
15
  const lodash_1 = __importDefault(require("lodash"));
16
- const guidUtils_1 = require("./guidUtils");
17
- const hashCalculator_1 = require("./hashCalculator");
16
+ const guidUtils_js_1 = require("./guidUtils.js");
17
+ const hashCalculator_js_1 = require("./hashCalculator.js");
18
18
  /**
19
19
  * Random number generator that creates a deterministic sequence of random numbers based on an initial seed GUID.
20
20
  *
@@ -31,8 +31,8 @@ class DeterministicRandomGenerator {
31
31
  constructor(in_seed) {
32
32
  // Initialize the internal state from the given initial guid
33
33
  this._guid1 = lodash_1.default.isString(in_seed)
34
- ? guidUtils_1.GuidUtils.guidToUint32x4(in_seed)
35
- : guidUtils_1.GuidUtils.guidToUint32x4((0, hashCalculator_1.calculateHash)(String(in_seed)));
34
+ ? guidUtils_js_1.GuidUtils.guidToUint32x4(in_seed)
35
+ : guidUtils_js_1.GuidUtils.guidToUint32x4((0, hashCalculator_js_1.calculateHash)(String(in_seed)));
36
36
  this._guid2 = new Uint32Array(4);
37
37
  this._guid2[0] = (this._guid1[0] + 1) >>> 0;
38
38
  this._guid2[1] = (this._guid1[1] + 1) >>> 0;
@@ -62,7 +62,7 @@ class DeterministicRandomGenerator {
62
62
  */
63
63
  irandom(in_max) {
64
64
  // Create a new hash
65
- guidUtils_1.GuidUtils.hashCombine4xUint32(this._guid1, this._guid2, this._result);
65
+ guidUtils_js_1.GuidUtils.hashCombine4xUint32(this._guid1, this._guid2, this._result);
66
66
  // Permute the hashes
67
67
  for (let i = 0; i < 4; i++) {
68
68
  this._guid1[i] = this._guid2[i];
@@ -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GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QACrC,OAAO,CAAC,aAAa,GAAG,UAAU,CAAC,GAAG,MAAM,CAAC;IAC9C,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,MAAe;QACtB,oBAAoB;QACpB,qBAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAEtE,qBAAqB;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACP,OAAO,MAAM,GAAG,QAAQ;gBACvB,CAAC,CAAC,qDAAqD;oBACtD,+DAA+D;oBAC/D,wEAAwE;oBACxE,8CAA8C;oBAC9C,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,MAAM;gBACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QAC5B,CAAC;IACF,CAAC;CACD;AAlED,oEAkEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Helper class to create a deterministic sequence of random numbers.\n */\n\n/* eslint-disable no-bitwise */\n\nimport _ from \"lodash\";\n\nimport { GuidUtils } from \"./guidUtils\";\nimport { calculateHash } from \"./hashCalculator\";\n\n/**\n * Random number generator that creates a deterministic sequence of random numbers based on an initial seed GUID.\n *\n * @remarks Warning: This is a very straight forward implementation based on the hashCombine4xUint32 function.\n * It probably doesn't produce very high quality random numbers (do not use this for cryptography!) and it is not very\n * efficient.\n * @internal\n */\nexport class DeterministicRandomGenerator {\n\t_guid1: Uint32Array;\n\t_guid2: Uint32Array;\n\t_result: Uint32Array;\n\n\t/**\n\t * @param in_seed - The initial seed (it can be either a GUID or a number)\n\t * which is used to initialize the random number generator.\n\t */\n\tconstructor(in_seed: string | number) {\n\t\t// Initialize the internal state from the given initial guid\n\t\tthis._guid1 = _.isString(in_seed)\n\t\t\t? GuidUtils.guidToUint32x4(in_seed)\n\t\t\t: GuidUtils.guidToUint32x4(calculateHash(String(in_seed)));\n\t\tthis._guid2 = new Uint32Array(4);\n\t\tthis._guid2[0] = (this._guid1[0] + 1) >>> 0;\n\t\tthis._guid2[1] = (this._guid1[1] + 1) >>> 0;\n\t\tthis._guid2[2] = (this._guid1[2] + 1) >>> 0;\n\t\tthis._guid2[3] = (this._guid1[3] + 1) >>> 0;\n\n\t\tthis._result = new Uint32Array(4);\n\t}\n\n\t/**\n\t * Creates a floating point random number.\n\t *\n\t * @param in_max - If supplied the returned number will be 0 \\<= number \\< `in_max`.\n\t * If none is given, `in_max` = 1 is assumed.\n\t *\n\t * @returns The random number.\n\t */\n\trandom(in_max = 1.0) {\n\t\tconst randomInteger = this.irandom();\n\t\treturn (randomInteger / 4294967296) * in_max;\n\t}\n\n\t/**\n\t * Creates an integer point random number.\n\t *\n\t * @param in_max - If supplied the returned number will be 0 \\<= number \\< `in_max`.\n\t * If none is given, `in_max` = 14294967296 (2^32) is assumed.\n\t *\n\t * @returns The random number.\n\t */\n\tirandom(in_max?: number): number {\n\t\t// Create a new hash\n\t\tGuidUtils.hashCombine4xUint32(this._guid1, this._guid2, this._result);\n\n\t\t// Permute the hashes\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tthis._guid1[i] = this._guid2[i];\n\t\t\tthis._guid2[i] = this._result[i];\n\t\t}\n\n\t\tif (in_max === undefined) {\n\t\t\treturn this._guid1[0];\n\t\t} else {\n\t\t\treturn in_max < 16777619\n\t\t\t\t? // The random generator doesn't seem to be very good.\n\t\t\t\t\t// It is quite biased (e.g. it generates too many even numbers)\n\t\t\t\t\t// this is a hack to solve at least this problem, but we probably should\n\t\t\t\t\t// instead use a different approach altogether\n\t\t\t\t\t(this._guid1[0] % 16777619) % in_max\n\t\t\t\t: this._guid1[0] % in_max;\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"deterministicRandomGenerator.js","sourceRoot":"","sources":["../src/deterministicRandomGenerator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH;;GAEG;AAEH,+BAA+B;AAE/B,oDAAuB;AAEvB,iDAA2C;AAC3C,2DAAoD;AAEpD;;;;;;;GAOG;AACH,MAAa,4BAA4B;IAKxC;;;OAGG;IACH,YAAY,OAAwB;QACnC,4DAA4D;QAC5D,IAAI,CAAC,MAAM,GAAG,gBAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;YAChC,CAAC,CAAC,wBAAS,CAAC,cAAc,CAAC,OAAO,CAAC;YACnC,CAAC,CAAC,wBAAS,CAAC,cAAc,CAAC,IAAA,iCAAa,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC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AAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QAC5B,CAAC;IACF,CAAC;CACD;AAlED,oEAkEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Helper class to create a deterministic sequence of random numbers.\n */\n\n/* eslint-disable no-bitwise */\n\nimport _ from \"lodash\";\n\nimport { GuidUtils } from \"./guidUtils.js\";\nimport { calculateHash } from \"./hashCalculator.js\";\n\n/**\n * Random number generator that creates a deterministic sequence of random numbers based on an initial seed GUID.\n *\n * @remarks Warning: This is a very straight forward implementation based on the hashCombine4xUint32 function.\n * It probably doesn't produce very high quality random numbers (do not use this for cryptography!) and it is not very\n * efficient.\n * @internal\n */\nexport class DeterministicRandomGenerator {\n\t_guid1: Uint32Array;\n\t_guid2: Uint32Array;\n\t_result: Uint32Array;\n\n\t/**\n\t * @param in_seed - The initial seed (it can be either a GUID or a number)\n\t * which is used to initialize the random number generator.\n\t */\n\tconstructor(in_seed: string | number) {\n\t\t// Initialize the internal state from the given initial guid\n\t\tthis._guid1 = _.isString(in_seed)\n\t\t\t? GuidUtils.guidToUint32x4(in_seed)\n\t\t\t: GuidUtils.guidToUint32x4(calculateHash(String(in_seed)));\n\t\tthis._guid2 = new Uint32Array(4);\n\t\tthis._guid2[0] = (this._guid1[0] + 1) >>> 0;\n\t\tthis._guid2[1] = (this._guid1[1] + 1) >>> 0;\n\t\tthis._guid2[2] = (this._guid1[2] + 1) >>> 0;\n\t\tthis._guid2[3] = (this._guid1[3] + 1) >>> 0;\n\n\t\tthis._result = new Uint32Array(4);\n\t}\n\n\t/**\n\t * Creates a floating point random number.\n\t *\n\t * @param in_max - If supplied the returned number will be 0 \\<= number \\< `in_max`.\n\t * If none is given, `in_max` = 1 is assumed.\n\t *\n\t * @returns The random number.\n\t */\n\trandom(in_max = 1.0) {\n\t\tconst randomInteger = this.irandom();\n\t\treturn (randomInteger / 4294967296) * in_max;\n\t}\n\n\t/**\n\t * Creates an integer point random number.\n\t *\n\t * @param in_max - If supplied the returned number will be 0 \\<= number \\< `in_max`.\n\t * If none is given, `in_max` = 14294967296 (2^32) is assumed.\n\t *\n\t * @returns The random number.\n\t */\n\tirandom(in_max?: number): number {\n\t\t// Create a new hash\n\t\tGuidUtils.hashCombine4xUint32(this._guid1, this._guid2, this._result);\n\n\t\t// Permute the hashes\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tthis._guid1[i] = this._guid2[i];\n\t\t\tthis._guid2[i] = this._result[i];\n\t\t}\n\n\t\tif (in_max === undefined) {\n\t\t\treturn this._guid1[0];\n\t\t} else {\n\t\t\treturn in_max < 16777619\n\t\t\t\t? // The random generator doesn't seem to be very good.\n\t\t\t\t\t// It is quite biased (e.g. it generates too many even numbers)\n\t\t\t\t\t// this is a hack to solve at least this problem, but we probably should\n\t\t\t\t\t// instead use a different approach altogether\n\t\t\t\t\t(this._guid1[0] % 16777619) % in_max\n\t\t\t\t: this._guid1[0] % in_max;\n\t\t}\n\t}\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.HTTPError = void 0;
8
- const flaggedError_1 = require("./flaggedError");
8
+ const flaggedError_js_1 = require("./flaggedError.js");
9
9
  /**
10
10
  * Class extending Error with HTTP-specific error information like statusCode and statusMessage
11
11
  * @param title - The error title
@@ -31,10 +31,10 @@ class HTTPError extends Error {
31
31
  this.stack = new Error(this.message).stack;
32
32
  }
33
33
  isQuiet() {
34
- return flaggedError_1.FlaggedError.prototype.isQuiet.call(this);
34
+ return flaggedError_js_1.FlaggedError.prototype.isQuiet.call(this);
35
35
  }
36
36
  isTransient() {
37
- return flaggedError_1.FlaggedError.prototype.isTransient.call(this);
37
+ return flaggedError_js_1.FlaggedError.prototype.isTransient.call(this);
38
38
  }
39
39
  _generateMessage(title, statusCode, statusMessage, method, url) {
40
40
  const titleStr = title === undefined ? "" : String(title);
@@ -60,5 +60,5 @@ class HTTPError extends Error {
60
60
  }
61
61
  }
62
62
  exports.HTTPError = HTTPError;
63
- HTTPError.FLAGS = flaggedError_1.FlaggedError.FLAGS;
63
+ HTTPError.FLAGS = flaggedError_js_1.FlaggedError.FLAGS;
64
64
  //# sourceMappingURL=httpError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpError.js","sourceRoot":"","sources":["../../src/error_objects/httpError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA8C;AAE9C;;;;;;;;;GASG;AACH,MAAa,SAAU,SAAQ,KAAK;IACnC,YACQ,KAAc,EACd,UAAmB,EACnB,aAAsB,EACtB,MAAe,EACf,GAAY,EACZ,QAAQ,CAAC;QAEhB,KAAK,EAAE,CAAC;QAPD,UAAK,GAAL,KAAK,CAAS;QACd,eAAU,GAAV,UAAU,CAAS;QACnB,kBAAa,GAAb,aAAa,CAAS;QACtB,WAAM,GAAN,MAAM,CAAS;QACf,QAAG,GAAH,GAAG,CAAS;QACZ,UAAK,GAAL,KAAK,CAAI;QAGhB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC;IAID,OAAO;QACN,OAAO,2BAAY,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,WAAW;QACV,OAAO,2BAAY,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAEO,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAA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CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC;IACzE,CAAC;;AAtDF,8BAuDC;AAvCO,eAAK,GAAG,2BAAY,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FlaggedError } from \"./flaggedError\";\n\n/**\n * Class extending Error with HTTP-specific error information like statusCode and statusMessage\n * @param title - The error title\n * @param statusCode - A numeric HTTP status code\n * @param statusMessage - A string message representing the response status message\n * @param method - The HTTP method used in the request\n * @param url - The URL that the request was sent to\n * @param flags - Flags that characterize the error. See {@link FlaggedError.FLAGS}.\n * @internal\n */\nexport class HTTPError extends Error {\n\tconstructor(\n\t\tpublic title?: string,\n\t\tpublic statusCode?: number,\n\t\tpublic statusMessage?: string,\n\t\tpublic method?: string,\n\t\tpublic url?: string,\n\t\tpublic flags = 0,\n\t) {\n\t\tsuper();\n\t\tObject.setPrototypeOf(this, HTTPError.prototype);\n\t\tthis.name = \"HTTPError\";\n\t\tthis.message = this._generateMessage(title, statusCode, statusMessage, method, url);\n\t\tthis.stack = new Error(this.message).stack;\n\t}\n\n\tstatic FLAGS = FlaggedError.FLAGS;\n\n\tisQuiet(): boolean {\n\t\treturn FlaggedError.prototype.isQuiet.call(this);\n\t}\n\n\tisTransient(): boolean {\n\t\treturn FlaggedError.prototype.isTransient.call(this);\n\t}\n\n\tprivate _generateMessage(title, statusCode, statusMessage, method, url) {\n\t\tconst titleStr = title === undefined ? \"\" : String(title);\n\t\tconst statusCodeStr = statusCode === undefined ? \"\" : String(statusCode);\n\t\tconst statusMessageStr = statusMessage === undefined ? \"\" : String(statusMessage);\n\t\tconst methodStr = method === undefined ? \"\" : String(method);\n\t\tconst urlStr = url === undefined ? \"\" : String(url);\n\n\t\treturn (\n\t\t\t`HTTPError: ${titleStr}, statusCode:${statusCodeStr}, ` +\n\t\t\t`statusMessage:${statusMessageStr}, method:${methodStr}, url:${urlStr}`\n\t\t);\n\t}\n\n\t/**\n\t * Returns a string representing the HTTPError object\n\t * @returns a string representing the HTTPError object\n\t */\n\ttoString(): string {\n\t\tconst stack = this.stack === undefined ? \"\" : String(this.stack);\n\n\t\tconst isFirefox =\n\t\t\ttypeof window !== \"undefined\" &&\n\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- optional chain causes a test failure\n\t\t\ttypeof window.navigator !== \"undefined\" &&\n\t\t\ttypeof window.navigator.userAgent !== \"undefined\" &&\n\t\t\twindow.navigator.userAgent.toLowerCase().includes(\"firefox\");\n\n\t\treturn isFirefox ? `${this.message}, stack:${stack}` : `stack:${stack}`;\n\t}\n}\n"]}
1
+ {"version":3,"file":"httpError.js","sourceRoot":"","sources":["../../src/error_objects/httpError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAiD;AAEjD;;;;;;;;;GASG;AACH,MAAa,SAAU,SAAQ,KAAK;IACnC,YACQ,KAAc,EACd,UAAmB,EACnB,aAAsB,EACtB,MAAe,EACf,GAAY,EACZ,QAAQ,CAAC;QAEhB,KAAK,EAAE,CAAC;QAPD,UAAK,GAAL,KAAK,CAAS;QACd,eAAU,GAAV,UAAU,CAAS;QACnB,kBAAa,GAAb,aAAa,CAAS;QACtB,WAAM,GAAN,MAAM,CAAS;QACf,QAAG,GAAH,GAAG,CAAS;QACZ,UAAK,GAAL,KAAK,CAAI;QAGhB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC;IAID,OAAO;QACN,OAAO,8BAAY,CAAC,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M,CAAC,SAAS,CAAC,SAAS,KAAK,WAAW;YACjD,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE9D,OAAO,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC;IACzE,CAAC;;AAtDF,8BAuDC;AAvCO,eAAK,GAAG,8BAAY,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FlaggedError } from \"./flaggedError.js\";\n\n/**\n * Class extending Error with HTTP-specific error information like statusCode and statusMessage\n * @param title - The error title\n * @param statusCode - A numeric HTTP status code\n * @param statusMessage - A string message representing the response status message\n * @param method - The HTTP method used in the request\n * @param url - The URL that the request was sent to\n * @param flags - Flags that characterize the error. See {@link FlaggedError.FLAGS}.\n * @internal\n */\nexport class HTTPError extends Error {\n\tconstructor(\n\t\tpublic title?: string,\n\t\tpublic statusCode?: number,\n\t\tpublic statusMessage?: string,\n\t\tpublic method?: string,\n\t\tpublic url?: string,\n\t\tpublic flags = 0,\n\t) {\n\t\tsuper();\n\t\tObject.setPrototypeOf(this, HTTPError.prototype);\n\t\tthis.name = \"HTTPError\";\n\t\tthis.message = this._generateMessage(title, statusCode, statusMessage, method, url);\n\t\tthis.stack = new Error(this.message).stack;\n\t}\n\n\tstatic FLAGS = FlaggedError.FLAGS;\n\n\tisQuiet(): boolean {\n\t\treturn FlaggedError.prototype.isQuiet.call(this);\n\t}\n\n\tisTransient(): boolean {\n\t\treturn FlaggedError.prototype.isTransient.call(this);\n\t}\n\n\tprivate _generateMessage(title, statusCode, statusMessage, method, url) {\n\t\tconst titleStr = title === undefined ? \"\" : String(title);\n\t\tconst statusCodeStr = statusCode === undefined ? \"\" : String(statusCode);\n\t\tconst statusMessageStr = statusMessage === undefined ? \"\" : String(statusMessage);\n\t\tconst methodStr = method === undefined ? \"\" : String(method);\n\t\tconst urlStr = url === undefined ? \"\" : String(url);\n\n\t\treturn (\n\t\t\t`HTTPError: ${titleStr}, statusCode:${statusCodeStr}, ` +\n\t\t\t`statusMessage:${statusMessageStr}, method:${methodStr}, url:${urlStr}`\n\t\t);\n\t}\n\n\t/**\n\t * Returns a string representing the HTTPError object\n\t * @returns a string representing the HTTPError object\n\t */\n\ttoString(): string {\n\t\tconst stack = this.stack === undefined ? \"\" : String(this.stack);\n\n\t\tconst isFirefox =\n\t\t\ttypeof window !== \"undefined\" &&\n\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- optional chain causes a test failure\n\t\t\ttypeof window.navigator !== \"undefined\" &&\n\t\t\ttypeof window.navigator.userAgent !== \"undefined\" &&\n\t\t\twindow.navigator.userAgent.toLowerCase().includes(\"firefox\");\n\n\t\treturn isFirefox ? `${this.message}, stack:${stack}` : `stack:${stack}`;\n\t}\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { HTTPError } from "./httpError";
5
+ import { HTTPError } from "./httpError.js";
6
6
  /**
7
7
  * Class extending HTTPError without storing the stack
8
8
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"httpErrorNoStack.d.ts","sourceRoot":"","sources":["../../src/error_objects/httpErrorNoStack.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IAC9C,MAAM,CAAC,KAAK;;;MAAsB;IAElC;;;;;;;OAOG;gBACS,OAAO,CAAC,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,aAAa,CAAC,KAAA,EAAE,MAAM,CAAC,KAAA,EAAE,GAAG,CAAC,KAAA,EAAE,KAAK,CAAC,KAAA;IAMxE,QAAQ,IAAI,MAAM;CAGlB"}
1
+ {"version":3,"file":"httpErrorNoStack.d.ts","sourceRoot":"","sources":["../../src/error_objects/httpErrorNoStack.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IAC9C,MAAM,CAAC,KAAK;;;MAAsB;IAElC;;;;;;;OAOG;gBACS,OAAO,CAAC,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,aAAa,CAAC,KAAA,EAAE,MAAM,CAAC,KAAA,EAAE,GAAG,CAAC,KAAA,EAAE,KAAK,CAAC,KAAA;IAMxE,QAAQ,IAAI,MAAM;CAGlB"}
@@ -5,13 +5,13 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.HTTPErrorNoStack = void 0;
8
- const flaggedError_1 = require("./flaggedError");
9
- const httpError_1 = require("./httpError");
8
+ const flaggedError_js_1 = require("./flaggedError.js");
9
+ const httpError_js_1 = require("./httpError.js");
10
10
  /**
11
11
  * Class extending HTTPError without storing the stack
12
12
  * @internal
13
13
  */
14
- class HTTPErrorNoStack extends httpError_1.HTTPError {
14
+ class HTTPErrorNoStack extends httpError_js_1.HTTPError {
15
15
  /**
16
16
  * @param message - The error message
17
17
  * @param statusCode - A numeric HTTP status code
@@ -30,5 +30,5 @@ class HTTPErrorNoStack extends httpError_1.HTTPError {
30
30
  }
31
31
  }
32
32
  exports.HTTPErrorNoStack = HTTPErrorNoStack;
33
- HTTPErrorNoStack.FLAGS = flaggedError_1.FlaggedError.FLAGS;
33
+ HTTPErrorNoStack.FLAGS = flaggedError_js_1.FlaggedError.FLAGS;
34
34
  //# sourceMappingURL=httpErrorNoStack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpErrorNoStack.js","sourceRoot":"","sources":["../../src/error_objects/httpErrorNoStack.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA8C;AAC9C,2CAAwC;AAExC;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,qBAAS;IAG9C;;;;;;;OAOG;IACH,YAAY,OAAQ,EAAE,UAAW,EAAE,aAAc,EAAE,MAAO,EAAE,GAAI,EAAE,KAAM;QACvE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;;AAnBF,4CAoBC;AAnBO,sBAAK,GAAG,2BAAY,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FlaggedError } from \"./flaggedError\";\nimport { HTTPError } from \"./httpError\";\n\n/**\n * Class extending HTTPError without storing the stack\n * @internal\n */\nexport class HTTPErrorNoStack extends HTTPError {\n\tstatic FLAGS = FlaggedError.FLAGS;\n\n\t/**\n\t * @param message - The error message\n\t * @param statusCode - A numeric HTTP status code\n\t * @param statusMessage - A string message representing the response status message\n\t * @param method - The HTTP method used in the request\n\t * @param url - The URL that the request was sent to\n\t * @param flags - Flags that characterize the error. See {@link FlaggedError.FLAGS}.\n\t */\n\tconstructor(message?, statusCode?, statusMessage?, method?, url?, flags?) {\n\t\tsuper(message, statusCode, statusMessage, method, url, flags);\n\t\tObject.setPrototypeOf(this, HTTPErrorNoStack.prototype);\n\t\tdelete this.stack;\n\t}\n\n\ttoString(): string {\n\t\treturn this.message;\n\t}\n}\n"]}
1
+ {"version":3,"file":"httpErrorNoStack.js","sourceRoot":"","sources":["../../src/error_objects/httpErrorNoStack.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAAiD;AACjD,iDAA2C;AAE3C;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,wBAAS;IAG9C;;;;;;;OAOG;IACH,YAAY,OAAQ,EAAE,UAAW,EAAE,aAAc,EAAE,MAAO,EAAE,GAAI,EAAE,KAAM;QACvE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;;AAnBF,4CAoBC;AAnBO,sBAAK,GAAG,8BAAY,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FlaggedError } from \"./flaggedError.js\";\nimport { HTTPError } from \"./httpError.js\";\n\n/**\n * Class extending HTTPError without storing the stack\n * @internal\n */\nexport class HTTPErrorNoStack extends HTTPError {\n\tstatic FLAGS = FlaggedError.FLAGS;\n\n\t/**\n\t * @param message - The error message\n\t * @param statusCode - A numeric HTTP status code\n\t * @param statusMessage - A string message representing the response status message\n\t * @param method - The HTTP method used in the request\n\t * @param url - The URL that the request was sent to\n\t * @param flags - Flags that characterize the error. See {@link FlaggedError.FLAGS}.\n\t */\n\tconstructor(message?, statusCode?, statusMessage?, method?, url?, flags?) {\n\t\tsuper(message, statusCode, statusMessage, method, url, flags);\n\t\tObject.setPrototypeOf(this, HTTPErrorNoStack.prototype);\n\t\tdelete this.stack;\n\t}\n\n\ttoString(): string {\n\t\treturn this.message;\n\t}\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { FlaggedError } from "./flaggedError";
6
- export { HTTPError } from "./httpError";
7
- export { HTTPErrorNoStack } from "./httpErrorNoStack";
8
- export { OperationError } from "./operationError";
5
+ export { FlaggedError } from "./flaggedError.js";
6
+ export { HTTPError } from "./httpError.js";
7
+ export { HTTPErrorNoStack } from "./httpErrorNoStack.js";
8
+ export { OperationError } from "./operationError.js";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error_objects/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error_objects/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -5,12 +5,12 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.OperationError = exports.HTTPErrorNoStack = exports.HTTPError = exports.FlaggedError = void 0;
8
- var flaggedError_1 = require("./flaggedError");
9
- Object.defineProperty(exports, "FlaggedError", { enumerable: true, get: function () { return flaggedError_1.FlaggedError; } });
10
- var httpError_1 = require("./httpError");
11
- Object.defineProperty(exports, "HTTPError", { enumerable: true, get: function () { return httpError_1.HTTPError; } });
12
- var httpErrorNoStack_1 = require("./httpErrorNoStack");
13
- Object.defineProperty(exports, "HTTPErrorNoStack", { enumerable: true, get: function () { return httpErrorNoStack_1.HTTPErrorNoStack; } });
14
- var operationError_1 = require("./operationError");
15
- Object.defineProperty(exports, "OperationError", { enumerable: true, get: function () { return operationError_1.OperationError; } });
8
+ var flaggedError_js_1 = require("./flaggedError.js");
9
+ Object.defineProperty(exports, "FlaggedError", { enumerable: true, get: function () { return flaggedError_js_1.FlaggedError; } });
10
+ var httpError_js_1 = require("./httpError.js");
11
+ Object.defineProperty(exports, "HTTPError", { enumerable: true, get: function () { return httpError_js_1.HTTPError; } });
12
+ var httpErrorNoStack_js_1 = require("./httpErrorNoStack.js");
13
+ Object.defineProperty(exports, "HTTPErrorNoStack", { enumerable: true, get: function () { return httpErrorNoStack_js_1.HTTPErrorNoStack; } });
14
+ var operationError_js_1 = require("./operationError.js");
15
+ Object.defineProperty(exports, "OperationError", { enumerable: true, get: function () { return operationError_js_1.OperationError; } });
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error_objects/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { FlaggedError } from \"./flaggedError\";\nexport { HTTPError } from \"./httpError\";\nexport { HTTPErrorNoStack } from \"./httpErrorNoStack\";\nexport { OperationError } from \"./operationError\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error_objects/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AACrB,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AACzB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { FlaggedError } from \"./flaggedError.js\";\nexport { HTTPError } from \"./httpError.js\";\nexport { HTTPErrorNoStack } from \"./httpErrorNoStack.js\";\nexport { OperationError } from \"./operationError.js\";\n"]}
@@ -15,7 +15,7 @@ exports.OperationError = void 0;
15
15
  * - Extensible flags. See {@link ExtendedError.FLAGS}.
16
16
  */
17
17
  const lodash_1 = __importDefault(require("lodash"));
18
- const flaggedError_1 = require("./flaggedError");
18
+ const flaggedError_js_1 = require("./flaggedError.js");
19
19
  /**
20
20
  * @internal
21
21
  */
@@ -38,17 +38,17 @@ class OperationError extends Error {
38
38
  this.stack = Error(message).stack;
39
39
  }
40
40
  isQuiet() {
41
- return flaggedError_1.FlaggedError.prototype.isQuiet.call(this);
41
+ return flaggedError_js_1.FlaggedError.prototype.isQuiet.call(this);
42
42
  }
43
43
  isTransient() {
44
- return flaggedError_1.FlaggedError.prototype.isTransient.call(this);
44
+ return flaggedError_js_1.FlaggedError.prototype.isTransient.call(this);
45
45
  }
46
46
  /**
47
47
  * @returns A string representation of the error flags.
48
48
  */
49
49
  _flagsToString() {
50
50
  const flagArray = [];
51
- lodash_1.default.mapValues(flaggedError_1.FlaggedError.FLAGS, (flagValue, flagName) => {
51
+ lodash_1.default.mapValues(flaggedError_js_1.FlaggedError.FLAGS, (flagValue, flagName) => {
52
52
  // eslint-disable-next-line no-bitwise
53
53
  if ((this.flags & flagValue) === flagValue) {
54
54
  flagArray.push(flagName);
@@ -79,5 +79,5 @@ class OperationError extends Error {
79
79
  }
80
80
  }
81
81
  exports.OperationError = OperationError;
82
- OperationError.FLAGS = flaggedError_1.FlaggedError.FLAGS;
82
+ OperationError.FLAGS = flaggedError_js_1.FlaggedError.FLAGS;
83
83
  //# sourceMappingURL=operationError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operationError.js","sourceRoot":"","sources":["../../src/error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AAC;QACzC,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAClC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACnC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;QAEpB,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,GAAG,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9C,CAAC;QAED,GAAG,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;QAE3B,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,GAAG,IAAI,YAAY,IAAI,CAAC,KAAK,EAAE,CAAC;QACjC,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;;AA1EF,wCA2EC;AA1EO,oBAAK,GAAG,2BAAY,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * An operation error maintains additional information compared to a plain {@link #Error}:\n * - The operation name\n * - A status code\n * - Extensible flags. See {@link ExtendedError.FLAGS}.\n */\nimport _ from \"lodash\";\n\nimport { FlaggedError } from \"./flaggedError\";\n\n/**\n * @internal\n */\nexport class OperationError extends Error {\n\tstatic FLAGS = FlaggedError.FLAGS;\n\tpublic stack: string | undefined;\n\tpublic readonly name: string;\n\n\t/**\n\t * Instantiates an OperationError, which mimics the Error class with added properties\n\t * meant for reporting the result of operations.\n\t * @param message - The error message.\n\t * @param operation - The operation name.\n\t * @param statusCode - The operation result as a numerical status code.\n\t * @param flags - Flags that characterize the error. See {@link FlaggedError.FLAGS}.\n\t */\n\tconstructor(\n\t\tmessage?: string,\n\t\tpublic operation?: string,\n\t\tpublic statusCode?: number,\n\t\tpublic flags: number = 0,\n\t) {\n\t\tsuper(message);\n\t\tObject.setPrototypeOf(this, OperationError.prototype);\n\t\tthis.name = \"OperationError\";\n\t\tthis.stack = Error(message).stack;\n\t}\n\n\tisQuiet() {\n\t\treturn FlaggedError.prototype.isQuiet.call(this);\n\t}\n\n\tisTransient() {\n\t\treturn FlaggedError.prototype.isTransient.call(this);\n\t}\n\n\t/**\n\t * @returns A string representation of the error flags.\n\t */\n\tprivate _flagsToString() {\n\t\tconst flagArray: string[] = [];\n\t\t_.mapValues(FlaggedError.FLAGS, (flagValue, flagName) => {\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\tif ((this.flags & flagValue) === flagValue) {\n\t\t\t\tflagArray.push(flagName);\n\t\t\t}\n\t\t});\n\t\treturn `${this.flags} [${flagArray.join(\",\")}]`;\n\t}\n\n\ttoString(): string {\n\t\tconst extendedFieldsArray: string[] = [];\n\t\tif (this.operation !== undefined) {\n\t\t\textendedFieldsArray.push(this.operation);\n\t\t}\n\n\t\tif (this.statusCode !== undefined) {\n\t\t\textendedFieldsArray.push(this.statusCode.toString());\n\t\t}\n\n\t\tif (this.flags) {\n\t\t\textendedFieldsArray.push(this._flagsToString.call(this));\n\t\t}\n\n\t\tlet msg = this.name;\n\n\t\tif (extendedFieldsArray.length > 0) {\n\t\t\tmsg += `[${extendedFieldsArray.join(\", \")}]`;\n\t\t}\n\n\t\tmsg += `: ${this.message}`;\n\n\t\tif (this.stack !== undefined) {\n\t\t\tmsg += `, stack: ${this.stack}`;\n\t\t}\n\n\t\treturn msg;\n\t}\n}\n"]}
1
+ {"version":3,"file":"operationError.js","sour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AAmB,GAAa,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAClC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACnC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;QAEpB,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,GAAG,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9C,CAAC;QAED,GAAG,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;QAE3B,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,GAAG,IAAI,YAAY,IAAI,CAAC,KAAK,EAAE,CAAC;QACjC,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;;AA1EF,wCA2EC;AA1EO,oBAAK,GAAG,8BAAY,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * An operation error maintains additional information compared to a plain {@link #Error}:\n * - The operation name\n * - A status code\n * - Extensible flags. See {@link ExtendedError.FLAGS}.\n */\nimport _ from \"lodash\";\n\nimport { FlaggedError } from \"./flaggedError.js\";\n\n/**\n * @internal\n */\nexport class OperationError extends Error {\n\tstatic FLAGS = FlaggedError.FLAGS;\n\tpublic stack: string | undefined;\n\tpublic readonly name: string;\n\n\t/**\n\t * Instantiates an OperationError, which mimics the Error class with added properties\n\t * meant for reporting the result of operations.\n\t * @param message - The error message.\n\t * @param operation - The operation name.\n\t * @param statusCode - The operation result as a numerical status code.\n\t * @param flags - Flags that characterize the error. See {@link FlaggedError.FLAGS}.\n\t */\n\tconstructor(\n\t\tmessage?: string,\n\t\tpublic operation?: string,\n\t\tpublic statusCode?: number,\n\t\tpublic flags: number = 0,\n\t) {\n\t\tsuper(message);\n\t\tObject.setPrototypeOf(this, OperationError.prototype);\n\t\tthis.name = \"OperationError\";\n\t\tthis.stack = Error(message).stack;\n\t}\n\n\tisQuiet() {\n\t\treturn FlaggedError.prototype.isQuiet.call(this);\n\t}\n\n\tisTransient() {\n\t\treturn FlaggedError.prototype.isTransient.call(this);\n\t}\n\n\t/**\n\t * @returns A string representation of the error flags.\n\t */\n\tprivate _flagsToString() {\n\t\tconst flagArray: string[] = [];\n\t\t_.mapValues(FlaggedError.FLAGS, (flagValue, flagName) => {\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\tif ((this.flags & flagValue) === flagValue) {\n\t\t\t\tflagArray.push(flagName);\n\t\t\t}\n\t\t});\n\t\treturn `${this.flags} [${flagArray.join(\",\")}]`;\n\t}\n\n\ttoString(): string {\n\t\tconst extendedFieldsArray: string[] = [];\n\t\tif (this.operation !== undefined) {\n\t\t\textendedFieldsArray.push(this.operation);\n\t\t}\n\n\t\tif (this.statusCode !== undefined) {\n\t\t\textendedFieldsArray.push(this.statusCode.toString());\n\t\t}\n\n\t\tif (this.flags) {\n\t\t\textendedFieldsArray.push(this._flagsToString.call(this));\n\t\t}\n\n\t\tlet msg = this.name;\n\n\t\tif (extendedFieldsArray.length > 0) {\n\t\t\tmsg += `[${extendedFieldsArray.join(\", \")}]`;\n\t\t}\n\n\t\tmsg += `: ${this.message}`;\n\n\t\tif (this.stack !== undefined) {\n\t\t\tmsg += `, stack: ${this.stack}`;\n\t\t}\n\n\t\treturn msg;\n\t}\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -2,15 +2,17 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { EventEmitter } from "events_pkg";
6
- export { Chronometer } from "./chronometer";
7
- export { ConsoleUtils } from "./consoleUtils";
8
- export { constants } from "./constants";
9
- export { BaseDataArray, BoolDataArray, Collection, Float32DataArray, Float64DataArray, Int16DataArray, Int32DataArray, Int64, Int8DataArray, Integer64, SortedCollection, StringDataArray, Uint16DataArray, Uint32DataArray, Uint64, Uint8DataArray, UniversalDataArray, } from "./datastructures";
10
- export { DeferredPromise } from "./deferredPromise";
11
- export { DeterministicRandomGenerator } from "./deterministicRandomGenerator";
12
- export { FlaggedError, HTTPError, HTTPErrorNoStack, OperationError } from "./error_objects";
13
- export { GuidUtils } from "./guidUtils";
14
- export { calculateHash } from "./hashCalculator";
15
- export { joinPaths } from "./joinPaths";
5
+ import events_pkg from "events_pkg";
6
+ declare const EventEmitter: typeof events_pkg.EventEmitter;
7
+ export { EventEmitter };
8
+ export { Chronometer } from "./chronometer.js";
9
+ export { ConsoleUtils } from "./consoleUtils.js";
10
+ export { constants } from "./constants.js";
11
+ export { BaseDataArray, BoolDataArray, Collection, Float32DataArray, Float64DataArray, Int16DataArray, Int32DataArray, Int64, Int8DataArray, Integer64, SortedCollection, StringDataArray, Uint16DataArray, Uint32DataArray, Uint64, Uint8DataArray, UniversalDataArray, } from "./datastructures/index.js";
12
+ export { DeferredPromise } from "./deferredPromise.js";
13
+ export { DeterministicRandomGenerator } from "./deterministicRandomGenerator.js";
14
+ export { FlaggedError, HTTPError, HTTPErrorNoStack, OperationError, } from "./error_objects/index.js";
15
+ export { GuidUtils } from "./guidUtils.js";
16
+ export { calculateHash } from "./hashCalculator.js";
17
+ export { joinPaths } from "./joinPaths.js";
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[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