@alterior/common 3.9.1 → 3.13.4

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 (162) hide show
  1. package/dist/base64.d.ts +6 -6
  2. package/dist/base64.js +52 -52
  3. package/dist/base64.js.map +1 -1
  4. package/dist/base64.test.d.ts +1 -1
  5. package/dist/cache.d.ts +84 -84
  6. package/dist/cache.js +148 -148
  7. package/dist/cache.js.map +1 -1
  8. package/dist/cache.test.d.ts +1 -1
  9. package/dist/check-native-async.d.ts +1 -1
  10. package/dist/check-native-async.js +27 -28
  11. package/dist/check-native-async.js.map +1 -1
  12. package/dist/clone.d.ts +23 -23
  13. package/dist/clone.js +59 -60
  14. package/dist/clone.js.map +1 -1
  15. package/dist/clone.test.d.ts +1 -1
  16. package/dist/coalesce.d.ts +5 -5
  17. package/dist/coalesce.js +15 -16
  18. package/dist/coalesce.js.map +1 -1
  19. package/dist/coalesce.test.d.ts +1 -1
  20. package/dist/colors.d.ts +62 -62
  21. package/dist/colors.js +66 -66
  22. package/dist/console.d.ts +31 -31
  23. package/dist/console.d.ts.map +1 -1
  24. package/dist/console.js +65 -86
  25. package/dist/console.js.map +1 -1
  26. package/dist/constructor.d.ts +6 -6
  27. package/dist/constructor.js +2 -2
  28. package/dist/decorators.d.ts +1 -1
  29. package/dist/decorators.d.ts.map +1 -1
  30. package/dist/decorators.js +6 -7
  31. package/dist/decorators.js.map +1 -1
  32. package/dist/environment.d.ts +11 -11
  33. package/dist/environment.d.ts.map +1 -1
  34. package/dist/environment.js +27 -27
  35. package/dist/environment.js.map +1 -1
  36. package/dist/errors.d.ts +66 -66
  37. package/dist/errors.js +133 -133
  38. package/dist/errors.test.d.ts +1 -1
  39. package/dist/get-param-names.d.ts +5 -5
  40. package/dist/get-param-names.js +48 -49
  41. package/dist/get-param-names.js.map +1 -1
  42. package/dist/index.d.ts +20 -20
  43. package/dist/index.js +23 -23
  44. package/dist/is-constructor.d.ts +12 -12
  45. package/dist/is-constructor.js +28 -29
  46. package/dist/is-constructor.js.map +1 -1
  47. package/dist/is-constructor.test.d.ts +1 -1
  48. package/dist/lazy-promise.d.ts +14 -14
  49. package/dist/lazy-promise.js +32 -32
  50. package/dist/lazy-promise.js.map +1 -1
  51. package/dist/lazy-subject.d.ts +22 -22
  52. package/dist/lazy-subject.js +22 -23
  53. package/dist/lazy-subject.js.map +1 -1
  54. package/dist/locks.d.ts +23 -23
  55. package/dist/locks.js +76 -76
  56. package/dist/locks.js.map +1 -1
  57. package/dist/locks.test.d.ts +1 -1
  58. package/dist/locks.test.js.map +1 -1
  59. package/dist/padding.d.ts +22 -22
  60. package/dist/padding.js +42 -43
  61. package/dist/padding.js.map +1 -1
  62. package/dist/presentation.d.ts +49 -49
  63. package/dist/presentation.d.ts.map +1 -1
  64. package/dist/presentation.js +132 -132
  65. package/dist/presentation.js.map +1 -1
  66. package/dist/presentation.test.d.ts +1 -1
  67. package/dist/presentation.test.js.map +1 -1
  68. package/dist/serializer.d.ts +8 -8
  69. package/dist/serializer.js +23 -24
  70. package/dist/serializer.js.map +1 -1
  71. package/dist/test.d.ts +2 -2
  72. package/dist/time.d.ts +9 -9
  73. package/dist/time.js +22 -22
  74. package/dist/time.js.map +1 -1
  75. package/dist/timeout.d.ts +13 -13
  76. package/dist/timeout.js +27 -28
  77. package/dist/timeout.js.map +1 -1
  78. package/dist/zones.d.ts +46 -46
  79. package/dist/zones.js +139 -139
  80. package/dist/zones.js.map +1 -1
  81. package/dist.esm/base64.d.ts +6 -6
  82. package/dist.esm/base64.js +48 -48
  83. package/dist.esm/base64.js.map +1 -1
  84. package/dist.esm/base64.test.d.ts +1 -1
  85. package/dist.esm/cache.d.ts +84 -84
  86. package/dist.esm/cache.js +144 -144
  87. package/dist.esm/cache.js.map +1 -1
  88. package/dist.esm/cache.test.d.ts +1 -1
  89. package/dist.esm/check-native-async.d.ts +1 -1
  90. package/dist.esm/check-native-async.js +24 -24
  91. package/dist.esm/check-native-async.js.map +1 -1
  92. package/dist.esm/clone.d.ts +23 -23
  93. package/dist.esm/clone.js +53 -53
  94. package/dist.esm/clone.js.map +1 -1
  95. package/dist.esm/clone.test.d.ts +1 -1
  96. package/dist.esm/coalesce.d.ts +5 -5
  97. package/dist.esm/coalesce.js +12 -12
  98. package/dist.esm/coalesce.js.map +1 -1
  99. package/dist.esm/coalesce.test.d.ts +1 -1
  100. package/dist.esm/colors.d.ts +62 -62
  101. package/dist.esm/colors.js +63 -63
  102. package/dist.esm/console.d.ts +31 -31
  103. package/dist.esm/console.d.ts.map +1 -1
  104. package/dist.esm/console.js +60 -80
  105. package/dist.esm/console.js.map +1 -1
  106. package/dist.esm/constructor.d.ts +6 -6
  107. package/dist.esm/constructor.js +1 -1
  108. package/dist.esm/decorators.d.ts +1 -1
  109. package/dist.esm/decorators.d.ts.map +1 -1
  110. package/dist.esm/decorators.js +3 -3
  111. package/dist.esm/environment.d.ts +11 -11
  112. package/dist.esm/environment.d.ts.map +1 -1
  113. package/dist.esm/environment.js +24 -24
  114. package/dist.esm/environment.js.map +1 -1
  115. package/dist.esm/errors.d.ts +66 -66
  116. package/dist.esm/errors.js +115 -115
  117. package/dist.esm/errors.test.d.ts +1 -1
  118. package/dist.esm/get-param-names.d.ts +5 -5
  119. package/dist.esm/get-param-names.js +45 -45
  120. package/dist.esm/get-param-names.js.map +1 -1
  121. package/dist.esm/index.d.ts +20 -20
  122. package/dist.esm/index.js +20 -20
  123. package/dist.esm/is-constructor.d.ts +12 -12
  124. package/dist.esm/is-constructor.js +24 -24
  125. package/dist.esm/is-constructor.js.map +1 -1
  126. package/dist.esm/is-constructor.test.d.ts +1 -1
  127. package/dist.esm/lazy-promise.d.ts +14 -14
  128. package/dist.esm/lazy-promise.js +28 -28
  129. package/dist.esm/lazy-promise.js.map +1 -1
  130. package/dist.esm/lazy-subject.d.ts +22 -22
  131. package/dist.esm/lazy-subject.js +19 -19
  132. package/dist.esm/locks.d.ts +23 -23
  133. package/dist.esm/locks.js +71 -71
  134. package/dist.esm/locks.js.map +1 -1
  135. package/dist.esm/locks.test.d.ts +1 -1
  136. package/dist.esm/locks.test.js.map +1 -1
  137. package/dist.esm/padding.d.ts +22 -22
  138. package/dist.esm/padding.js +37 -37
  139. package/dist.esm/presentation.d.ts +49 -49
  140. package/dist.esm/presentation.d.ts.map +1 -1
  141. package/dist.esm/presentation.js +126 -126
  142. package/dist.esm/presentation.js.map +1 -1
  143. package/dist.esm/presentation.test.d.ts +1 -1
  144. package/dist.esm/presentation.test.js.map +1 -1
  145. package/dist.esm/serializer.d.ts +8 -8
  146. package/dist.esm/serializer.js +20 -20
  147. package/dist.esm/test.d.ts +2 -2
  148. package/dist.esm/time.d.ts +9 -9
  149. package/dist.esm/time.js +19 -19
  150. package/dist.esm/time.js.map +1 -1
  151. package/dist.esm/timeout.d.ts +13 -13
  152. package/dist.esm/timeout.js +23 -23
  153. package/dist.esm/tsconfig.esm.tsbuildinfo +1 -0
  154. package/dist.esm/zones.d.ts +46 -46
  155. package/dist.esm/zones.js +135 -135
  156. package/dist.esm/zones.js.map +1 -1
  157. package/package.json +11 -8
  158. package/src/console.ts +2 -22
  159. package/src/environment.ts +2 -0
  160. package/tsconfig.esm.json +0 -3
  161. package/tsconfig.json +0 -2
  162. package/tsconfig.tsbuildinfo +1 -3791
@@ -1,29 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.disallowNativeAsync = void 0;
4
- function disallowNativeAsync(func) {
5
- if (typeof func !== 'function')
6
- return;
7
- if (func.constructor.name === 'AsyncFunction') {
8
- console.error();
9
- console.error(`----------------------------------------------------------------------------------------------------`);
10
- console.error(`Detected usage of a native async function in a context where it is not allowed.`);
11
- console.error(`Unfortunately, native async/await is not supported by Alterior, as it breaks Zone tracking.`);
12
- console.error(`Please ensure compilerOptions.target is set to ES2016 or lower, and keep in mind that `);
13
- console.error(`dependencies compiled with native async/await support may cause problems for some Alterior features.`);
14
- console.error(`For more information see https://github.com/angular/angular/issues/31730`);
15
- console.error();
16
- console.error(`**Please support the AsyncContext proposal which will help solve this problem**`);
17
- console.error(` https://github.com/tc39/proposal-async-context`);
18
- console.error();
19
- console.error(`Context:`);
20
- console.error(` - Function name: ${func.name}`);
21
- console.error(` - Function implementation:`);
22
- console.error(` ${String(func).replace(/\n/g, "\n ")}`);
23
- console.error(`----------------------------------------------------------------------------------------------------`);
24
- console.error();
25
- throw new Error(`Native async/await is not supported [${func.name}()].`);
26
- }
27
- }
28
- exports.disallowNativeAsync = disallowNativeAsync;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.disallowNativeAsync = disallowNativeAsync;
4
+ function disallowNativeAsync(func) {
5
+ if (typeof func !== 'function')
6
+ return;
7
+ if (func.constructor.name === 'AsyncFunction') {
8
+ console.error();
9
+ console.error(`----------------------------------------------------------------------------------------------------`);
10
+ console.error(`Detected usage of a native async function in a context where it is not allowed.`);
11
+ console.error(`Unfortunately, native async/await is not supported by Alterior, as it breaks Zone tracking.`);
12
+ console.error(`Please ensure compilerOptions.target is set to ES2016 or lower, and keep in mind that `);
13
+ console.error(`dependencies compiled with native async/await support may cause problems for some Alterior features.`);
14
+ console.error(`For more information see https://github.com/angular/angular/issues/31730`);
15
+ console.error();
16
+ console.error(`**Please support the AsyncContext proposal which will help solve this problem**`);
17
+ console.error(` https://github.com/tc39/proposal-async-context`);
18
+ console.error();
19
+ console.error(`Context:`);
20
+ console.error(` - Function name: ${func.name}`);
21
+ console.error(` - Function implementation:`);
22
+ console.error(` ${String(func).replace(/\n/g, "\n ")}`);
23
+ console.error(`----------------------------------------------------------------------------------------------------`);
24
+ console.error();
25
+ throw new Error(`Native async/await is not supported [${func.name}()].`);
26
+ }
27
+ }
29
28
  //# sourceMappingURL=check-native-async.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-native-async.js","sourceRoot":"","sources":["../src/check-native-async.ts"],"names":[],"mappings":";;;AACA,SAAgB,mBAAmB,CAAC,IAAc;IAC9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AAc;IAC9C,IAAI,OAAO,IAAI,KAAK,UAAU;QAC1B,OAAO;IAEX,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QAC5C,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,sGAAsG,CAAC,CAAC;QACtH,OAAO,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAC;QACjG,OAAO,CAAC,KAAK,CAAC,6FAA6F,CAAC,CAAC;QAC7G,OAAO,CAAC,KAAK,CAAC,wFAAwF,CAAC,CAAC;QACxG,OAAO,CAAC,KAAK,CAAC,sGAAsG,CAAC,CAAC;QACtH,OAAO,CAAC,KAAK,CAAC,0EAA0E,CAAC,CAAC;QAC1F,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAC;QACjG,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACnE,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1B,OAAO,CAAC,KAAK,CAAC,qBAAqB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,KAAK,CAAC,sGAAsG,CAAC,CAAC;QACtH,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC;IAC7E,CAAC;AACL,CAAC"}
package/dist/clone.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- /**
2
- * Perform a shallow clone of the object, producing one that has the
3
- * same constructor chain and prototype as the passed object.
4
- * @param obj
5
- */
6
- export declare function shallowClone(obj: Object): any;
7
- /**
8
- * Perform a standard clone using serialization (see cloneBySerialization)
9
- * @param obj
10
- */
11
- export declare function clone<T = any>(obj: T): T;
12
- /**
13
- * Deeply clone the given value. If the value is an object, all subobjects
14
- * are deeply cloned as well.
15
- *
16
- * @param o
17
- */
18
- export declare function deepClone(o: any): any;
19
- /**
20
- * Clone the value by serializing it to JSON and back.
21
- * @param obj
22
- */
23
- export declare function cloneBySerialization(obj: any): any;
1
+ /**
2
+ * Perform a shallow clone of the object, producing one that has the
3
+ * same constructor chain and prototype as the passed object.
4
+ * @param obj
5
+ */
6
+ export declare function shallowClone(obj: Object): any;
7
+ /**
8
+ * Perform a standard clone using serialization (see cloneBySerialization)
9
+ * @param obj
10
+ */
11
+ export declare function clone<T = any>(obj: T): T;
12
+ /**
13
+ * Deeply clone the given value. If the value is an object, all subobjects
14
+ * are deeply cloned as well.
15
+ *
16
+ * @param o
17
+ */
18
+ export declare function deepClone(o: any): any;
19
+ /**
20
+ * Clone the value by serializing it to JSON and back.
21
+ * @param obj
22
+ */
23
+ export declare function cloneBySerialization(obj: any): any;
24
24
  //# sourceMappingURL=clone.d.ts.map
package/dist/clone.js CHANGED
@@ -1,61 +1,60 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cloneBySerialization = exports.deepClone = exports.clone = exports.shallowClone = void 0;
4
- /**
5
- * Perform a shallow clone of the object, producing one that has the
6
- * same constructor chain and prototype as the passed object.
7
- * @param obj
8
- */
9
- function shallowClone(obj) {
10
- if (typeof obj !== 'object')
11
- return obj;
12
- let clone = Object.create(obj.constructor.prototype);
13
- Object.assign(clone, obj);
14
- return clone;
15
- }
16
- exports.shallowClone = shallowClone;
17
- /**
18
- * Perform a standard clone using serialization (see cloneBySerialization)
19
- * @param obj
20
- */
21
- function clone(obj) {
22
- return cloneBySerialization(obj);
23
- }
24
- exports.clone = clone;
25
- /**
26
- * Deeply clone the given value. If the value is an object, all subobjects
27
- * are deeply cloned as well.
28
- *
29
- * @param o
30
- */
31
- function deepClone(o) {
32
- return deepCloneWithMemoization(o, new WeakMap());
33
- }
34
- exports.deepClone = deepClone;
35
- function deepCloneWithMemoization(o, memo) {
36
- if (o === null)
37
- return null;
38
- if (!Array.isArray(o) && typeof o !== 'object')
39
- return o;
40
- if (memo.has(o))
41
- return memo.get(o);
42
- let output, v, key;
43
- output = Array.isArray(o) ? [] : {};
44
- memo.set(o, output);
45
- for (key in o) {
46
- v = o[key];
47
- output[key] = (typeof v === 'object') ? deepCloneWithMemoization(v, memo) : v;
48
- }
49
- return output;
50
- }
51
- /**
52
- * Clone the value by serializing it to JSON and back.
53
- * @param obj
54
- */
55
- function cloneBySerialization(obj) {
56
- if (obj === undefined || obj === null || typeof obj !== 'object')
57
- return obj;
58
- return JSON.parse(JSON.stringify(obj));
59
- }
60
- exports.cloneBySerialization = cloneBySerialization;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shallowClone = shallowClone;
4
+ exports.clone = clone;
5
+ exports.deepClone = deepClone;
6
+ exports.cloneBySerialization = cloneBySerialization;
7
+ /**
8
+ * Perform a shallow clone of the object, producing one that has the
9
+ * same constructor chain and prototype as the passed object.
10
+ * @param obj
11
+ */
12
+ function shallowClone(obj) {
13
+ if (typeof obj !== 'object')
14
+ return obj;
15
+ let clone = Object.create(obj.constructor.prototype);
16
+ Object.assign(clone, obj);
17
+ return clone;
18
+ }
19
+ /**
20
+ * Perform a standard clone using serialization (see cloneBySerialization)
21
+ * @param obj
22
+ */
23
+ function clone(obj) {
24
+ return cloneBySerialization(obj);
25
+ }
26
+ /**
27
+ * Deeply clone the given value. If the value is an object, all subobjects
28
+ * are deeply cloned as well.
29
+ *
30
+ * @param o
31
+ */
32
+ function deepClone(o) {
33
+ return deepCloneWithMemoization(o, new WeakMap());
34
+ }
35
+ function deepCloneWithMemoization(o, memo) {
36
+ if (o === null)
37
+ return null;
38
+ if (!Array.isArray(o) && typeof o !== 'object')
39
+ return o;
40
+ if (memo.has(o))
41
+ return memo.get(o);
42
+ let output, v, key;
43
+ output = Array.isArray(o) ? [] : {};
44
+ memo.set(o, output);
45
+ for (key in o) {
46
+ v = o[key];
47
+ output[key] = (typeof v === 'object') ? deepCloneWithMemoization(v, memo) : v;
48
+ }
49
+ return output;
50
+ }
51
+ /**
52
+ * Clone the value by serializing it to JSON and back.
53
+ * @param obj
54
+ */
55
+ function cloneBySerialization(obj) {
56
+ if (obj === undefined || obj === null || typeof obj !== 'object')
57
+ return obj;
58
+ return JSON.parse(JSON.stringify(obj));
59
+ }
61
60
  //# sourceMappingURL=clone.js.map
package/dist/clone.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"clone.js","sourceRoot":"","sources":["../src/clone.ts"],"names":[],"mappings":";;;AACA;;;;GAIG;AACH,SAAgB,YAAY,CAAC,GAAY;IACxC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAC1B,OAAO,GAAG,CAAC;IAEZ,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC1B,OAAO,KAAK,CAAC;AACd,CAAC;AAPD,oCAOC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAU,GAAO;IACrC,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAFD,sBAEC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,CAAC;IAC1B,OAAO,wBAAwB,CAAC,CAAC,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;AACnD,CAAC;AAFD,8BAEC;AAED,SAAS,wBAAwB,CAAC,CAAC,EAAE,IAAwB;IAC5D,IAAI,CAAC,KAAK,IAAI;QACb,OAAO,IAAI,CAAC;IACb,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CA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GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;QAC/D,OAAO,GAAG,CAAC;IAEZ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACxC,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=clone.test.d.ts.map
@@ -1,6 +1,6 @@
1
- /**
2
- * Return the first value that is not undefined of the passed parameters.
3
- * @param values
4
- */
5
- export declare function coalesce(...values: any[]): any;
1
+ /**
2
+ * Return the first value that is not undefined of the passed parameters.
3
+ * @param values
4
+ */
5
+ export declare function coalesce(...values: any[]): any;
6
6
  //# sourceMappingURL=coalesce.d.ts.map
package/dist/coalesce.js CHANGED
@@ -1,17 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.coalesce = void 0;
4
- /**
5
- * Return the first value that is not undefined of the passed parameters.
6
- * @param values
7
- */
8
- function coalesce(...values) {
9
- for (let value of values) {
10
- if (value === undefined)
11
- continue;
12
- return value;
13
- }
14
- return undefined;
15
- }
16
- exports.coalesce = coalesce;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.coalesce = coalesce;
4
+ /**
5
+ * Return the first value that is not undefined of the passed parameters.
6
+ * @param values
7
+ */
8
+ function coalesce(...values) {
9
+ for (let value of values) {
10
+ if (value === undefined)
11
+ continue;
12
+ return value;
13
+ }
14
+ return undefined;
15
+ }
17
16
  //# sourceMappingURL=coalesce.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coalesce.js","sourceRoot":"","sources":["../src/coalesce.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,QAAQ,CAAC,GAAG,MAAa;IACrC,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;QACtB,IAAI,KAAK,KAAK,SAAS;YACnB,SAAS;QACb,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AARD,4BAQC"}
1
+ {"version":3,"file":"coalesce.js","sourceRoot":"","sources":["../src/coalesce.ts"],"names":[],"mappings":";;AAIA,4BAQC;AAZD;;;GAGG;AACH,SAAgB,QAAQ,CAAC,GAAG,MAAa;IACrC,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,KAAK,KAAK,SAAS;YACnB,SAAS;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=coalesce.test.d.ts.map
package/dist/colors.d.ts CHANGED
@@ -1,63 +1,63 @@
1
- export declare const CONSOLE_COLORS: {
2
- reset: number[];
3
- bold: number[];
4
- dim: number[];
5
- italic: number[];
6
- underline: number[];
7
- inverse: number[];
8
- hidden: number[];
9
- strikethrough: number[];
10
- black: number[];
11
- red: number[];
12
- green: number[];
13
- yellow: number[];
14
- blue: number[];
15
- magenta: number[];
16
- cyan: number[];
17
- white: number[];
18
- gray: number[];
19
- grey: number[];
20
- bgBlack: number[];
21
- bgRed: number[];
22
- bgGreen: number[];
23
- bgYellow: number[];
24
- bgBlue: number[];
25
- bgMagenta: number[];
26
- bgCyan: number[];
27
- bgWhite: number[];
28
- };
29
- export type ColorLibrary<T> = {
30
- [K in keyof T]: (message: string) => string;
31
- };
32
- /**
33
- * Provides methods for colorizing strings
34
- */
35
- export declare const ConsoleColors: ColorLibrary<{
36
- reset: number[];
37
- bold: number[];
38
- dim: number[];
39
- italic: number[];
40
- underline: number[];
41
- inverse: number[];
42
- hidden: number[];
43
- strikethrough: number[];
44
- black: number[];
45
- red: number[];
46
- green: number[];
47
- yellow: number[];
48
- blue: number[];
49
- magenta: number[];
50
- cyan: number[];
51
- white: number[];
52
- gray: number[];
53
- grey: number[];
54
- bgBlack: number[];
55
- bgRed: number[];
56
- bgGreen: number[];
57
- bgYellow: number[];
58
- bgBlue: number[];
59
- bgMagenta: number[];
60
- bgCyan: number[];
61
- bgWhite: number[];
62
- }>;
1
+ export declare const CONSOLE_COLORS: {
2
+ reset: number[];
3
+ bold: number[];
4
+ dim: number[];
5
+ italic: number[];
6
+ underline: number[];
7
+ inverse: number[];
8
+ hidden: number[];
9
+ strikethrough: number[];
10
+ black: number[];
11
+ red: number[];
12
+ green: number[];
13
+ yellow: number[];
14
+ blue: number[];
15
+ magenta: number[];
16
+ cyan: number[];
17
+ white: number[];
18
+ gray: number[];
19
+ grey: number[];
20
+ bgBlack: number[];
21
+ bgRed: number[];
22
+ bgGreen: number[];
23
+ bgYellow: number[];
24
+ bgBlue: number[];
25
+ bgMagenta: number[];
26
+ bgCyan: number[];
27
+ bgWhite: number[];
28
+ };
29
+ export type ColorLibrary<T> = {
30
+ [K in keyof T]: (message: string) => string;
31
+ };
32
+ /**
33
+ * Provides methods for colorizing strings
34
+ */
35
+ export declare const ConsoleColors: ColorLibrary<{
36
+ reset: number[];
37
+ bold: number[];
38
+ dim: number[];
39
+ italic: number[];
40
+ underline: number[];
41
+ inverse: number[];
42
+ hidden: number[];
43
+ strikethrough: number[];
44
+ black: number[];
45
+ red: number[];
46
+ green: number[];
47
+ yellow: number[];
48
+ blue: number[];
49
+ magenta: number[];
50
+ cyan: number[];
51
+ white: number[];
52
+ gray: number[];
53
+ grey: number[];
54
+ bgBlack: number[];
55
+ bgRed: number[];
56
+ bgGreen: number[];
57
+ bgYellow: number[];
58
+ bgBlue: number[];
59
+ bgMagenta: number[];
60
+ bgCyan: number[];
61
+ bgWhite: number[];
62
+ }>;
63
63
  //# sourceMappingURL=colors.d.ts.map
package/dist/colors.js CHANGED
@@ -1,67 +1,67 @@
1
- "use strict";
2
- /*
3
- * The MIT License (MIT)
4
- *
5
- * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- * The above copyright notice and this permission notice shall be included in
14
- * all copies or substantial portions of the Software.
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- * THE SOFTWARE.
22
- */
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ConsoleColors = exports.CONSOLE_COLORS = void 0;
25
- exports.CONSOLE_COLORS = {
26
- reset: [0, 0],
27
- bold: [1, 22],
28
- dim: [2, 22],
29
- italic: [3, 23],
30
- underline: [4, 24],
31
- inverse: [7, 27],
32
- hidden: [8, 28],
33
- strikethrough: [9, 29],
34
- black: [30, 39],
35
- red: [31, 39],
36
- green: [32, 39],
37
- yellow: [33, 39],
38
- blue: [34, 39],
39
- magenta: [35, 39],
40
- cyan: [36, 39],
41
- white: [37, 39],
42
- gray: [90, 39],
43
- grey: [90, 39],
44
- bgBlack: [40, 49],
45
- bgRed: [41, 49],
46
- bgGreen: [42, 49],
47
- bgYellow: [43, 49],
48
- bgBlue: [44, 49],
49
- bgMagenta: [45, 49],
50
- bgCyan: [46, 49],
51
- bgWhite: [47, 49],
52
- };
53
- function objectLibrary(codes) {
54
- let library = {};
55
- Object.keys(codes).forEach(function (key) {
56
- let val = codes[key];
57
- let open = '\u001b[' + val[0] + 'm';
58
- let close = '\u001b[' + val[1] + 'm';
59
- library[key] = (message) => `${open}${message}${close}`;
60
- });
61
- return library;
62
- }
63
- /**
64
- * Provides methods for colorizing strings
65
- */
66
- exports.ConsoleColors = objectLibrary(exports.CONSOLE_COLORS);
1
+ "use strict";
2
+ /*
3
+ * The MIT License (MIT)
4
+ *
5
+ * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ * THE SOFTWARE.
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.ConsoleColors = exports.CONSOLE_COLORS = void 0;
25
+ exports.CONSOLE_COLORS = {
26
+ reset: [0, 0],
27
+ bold: [1, 22],
28
+ dim: [2, 22],
29
+ italic: [3, 23],
30
+ underline: [4, 24],
31
+ inverse: [7, 27],
32
+ hidden: [8, 28],
33
+ strikethrough: [9, 29],
34
+ black: [30, 39],
35
+ red: [31, 39],
36
+ green: [32, 39],
37
+ yellow: [33, 39],
38
+ blue: [34, 39],
39
+ magenta: [35, 39],
40
+ cyan: [36, 39],
41
+ white: [37, 39],
42
+ gray: [90, 39],
43
+ grey: [90, 39],
44
+ bgBlack: [40, 49],
45
+ bgRed: [41, 49],
46
+ bgGreen: [42, 49],
47
+ bgYellow: [43, 49],
48
+ bgBlue: [44, 49],
49
+ bgMagenta: [45, 49],
50
+ bgCyan: [46, 49],
51
+ bgWhite: [47, 49],
52
+ };
53
+ function objectLibrary(codes) {
54
+ let library = {};
55
+ Object.keys(codes).forEach(function (key) {
56
+ let val = codes[key];
57
+ let open = '\u001b[' + val[0] + 'm';
58
+ let close = '\u001b[' + val[1] + 'm';
59
+ library[key] = (message) => `${open}${message}${close}`;
60
+ });
61
+ return library;
62
+ }
63
+ /**
64
+ * Provides methods for colorizing strings
65
+ */
66
+ exports.ConsoleColors = objectLibrary(exports.CONSOLE_COLORS);
67
67
  //# sourceMappingURL=colors.js.map
package/dist/console.d.ts CHANGED
@@ -1,32 +1,32 @@
1
- export interface Console {
2
- log(...args: any[]): any;
3
- info(...args: any[]): any;
4
- warn(...args: any[]): any;
5
- error(...args: any[]): any;
6
- debug(...args: any[]): any;
7
- dir(...args: any[]): any;
8
- }
9
- /**
10
- * Intercept console messages emitted within the given function, allowing you to programmatically call the underlying raw console implementation (or not).
11
- *
12
- * @param handler
13
- * @param callback
14
- */
15
- export declare function interceptConsole(handler: (method: string, originalImpl: Function, console: Console, args: any[]) => void, callback: Function): void;
16
- /**
17
- * Intercept all console messages emitted within the given function and indent them with
18
- * the given number of spaces before printing them out.
19
- *
20
- * @param spaces
21
- * @param callback
22
- */
23
- export declare function indentConsole(spaces: number, callback: Function): void;
24
- /**
25
- * Intercept all console messages emitted within the given function and format them using the given formatter before
26
- * printing them.
27
- *
28
- * @param formatter
29
- * @param callback
30
- */
31
- export declare function formatConsole(formatter: (message: string) => string, callback: Function): void;
1
+ export interface Console {
2
+ log(...args: any[]): any;
3
+ info(...args: any[]): any;
4
+ warn(...args: any[]): any;
5
+ error(...args: any[]): any;
6
+ debug(...args: any[]): any;
7
+ dir(...args: any[]): any;
8
+ }
9
+ /**
10
+ * Intercept console messages emitted within the given function, allowing you to programmatically call the underlying raw console implementation (or not).
11
+ *
12
+ * @param handler
13
+ * @param callback
14
+ */
15
+ export declare function interceptConsole(handler: (method: string, originalImpl: Function, console: Console, args: any[]) => void, callback: Function): void;
16
+ /**
17
+ * Intercept all console messages emitted within the given function and indent them with
18
+ * the given number of spaces before printing them out.
19
+ *
20
+ * @param spaces
21
+ * @param callback
22
+ */
23
+ export declare function indentConsole(spaces: number, callback: Function): void;
24
+ /**
25
+ * Intercept all console messages emitted within the given function and format them using the given formatter before
26
+ * printing them.
27
+ *
28
+ * @param formatter
29
+ * @param callback
30
+ */
31
+ export declare function formatConsole(formatter: (message: string) => string, callback: Function): void;
32
32
  //# sourceMappingURL=console.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACpB,GAAG,CAAC,GAAG,IAAI,EAAG,GAAG,EAAE,OAAE;IACrB,IAAI,CAAC,GAAG,IAAI,EAAG,GAAG,EAAE,OAAE;IACtB,IAAI,CAAC,GAAG,IAAI,EAAG,GAAG,EAAE,OAAE;IACtB,KAAK,CAAC,GAAG,IAAI,EAAG,GAAG,EAAE,OAAE;IACvB,KAAK,CAAC,GAAG,IAAI,EAAG,GAAG,EAAE,OAAE;IACvB,GAAG,CAAC,GAAG,IAAI,EAAG,GAAG,EAAE,OAAE;CACxB;AAaD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAG,CAAC,MAAM,EAAG,MAAM,EAAE,YAAY,EAAG,QAAQ,EAAE,OAAO,EAAG,OAAO,EAAE,IAAI,EAAG,GAAG,EAAE,KAAK,IAAI,EAAE,QAAQ,EAAG,QAAQ,QAoBlJ;AAED;;;;;;GAMG;AACH,wBAAg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