@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
package/dist/base64.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export declare class Base64 {
2
- static encode(str: string): string;
3
- static encodeBytes(bytes: Uint8Array): string;
4
- static decode(str: string): string;
5
- static decodeBytes(str: string): Uint8Array;
6
- }
1
+ export declare class Base64 {
2
+ static encode(str: string): string;
3
+ static encodeBytes(bytes: Uint8Array): string;
4
+ static decode(str: string): string;
5
+ static decodeBytes(str: string): Uint8Array;
6
+ }
7
7
  //# sourceMappingURL=base64.d.ts.map
package/dist/base64.js CHANGED
@@ -1,53 +1,53 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Base64 = void 0;
4
- const BASE64_KEY = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
5
- class Base64 {
6
- static encode(str) {
7
- return this.encodeBytes(new TextEncoder().encode(str));
8
- }
9
- static encodeBytes(bytes) {
10
- let output = '';
11
- let inputPad = bytes.length % 3 === 0 ? 0 : 3 - bytes.length % 3;
12
- let buffer = new Uint8Array(bytes.length + inputPad);
13
- buffer.set(bytes, 0);
14
- for (let i = 0, max = buffer.length; i < max; i += 3) {
15
- let value = buffer[i + 0] << 16
16
- | buffer[i + 1] << 8
17
- | buffer[i + 2];
18
- let char1 = (value >> 18) & 0x3f;
19
- let char2 = (value >> 12) & 0x3f;
20
- let char3 = (value >> 6) & 0x3f;
21
- let char4 = (value >> 0) & 0x3f;
22
- output += BASE64_KEY[char1];
23
- output += BASE64_KEY[char2];
24
- output += BASE64_KEY[char3];
25
- output += BASE64_KEY[char4];
26
- }
27
- let outputPad = Math.floor(inputPad * 8 / 6);
28
- if (outputPad !== 0)
29
- output = output.slice(0, -outputPad) + Array(outputPad + 1).join('=');
30
- return output;
31
- }
32
- static decode(str) {
33
- return new TextDecoder().decode(this.decodeBytes(str));
34
- }
35
- static decodeBytes(str) {
36
- str = str.replace(/=+$/g, '');
37
- let paddingRequired = str.length % 4 === 0 ? 0 : 4 - str.length % 4;
38
- str += Array(paddingRequired + 1).join('=');
39
- let decoded = new Uint8Array(str.length * 6 / 8);
40
- for (let i = 0, max = str.length; i < max; i += 4) {
41
- let value = BASE64_KEY.indexOf(str[i + 0]) << 18
42
- | BASE64_KEY.indexOf(str[i + 1]) << 12
43
- | BASE64_KEY.indexOf(str[i + 2]) << 6
44
- | BASE64_KEY.indexOf(str[i + 3]) << 0;
45
- decoded[i / 4 * 3 + 0] = value >> 16 & 0xFF;
46
- decoded[i / 4 * 3 + 1] = value >> 8 & 0xFF;
47
- decoded[i / 4 * 3 + 2] = value >> 0 & 0xFF;
48
- }
49
- return decoded.subarray(0, decoded.length - paddingRequired);
50
- }
51
- }
52
- exports.Base64 = Base64;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Base64 = void 0;
4
+ const BASE64_KEY = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
5
+ class Base64 {
6
+ static encode(str) {
7
+ return this.encodeBytes(new TextEncoder().encode(str));
8
+ }
9
+ static encodeBytes(bytes) {
10
+ let output = '';
11
+ let inputPad = bytes.length % 3 === 0 ? 0 : 3 - bytes.length % 3;
12
+ let buffer = new Uint8Array(bytes.length + inputPad);
13
+ buffer.set(bytes, 0);
14
+ for (let i = 0, max = buffer.length; i < max; i += 3) {
15
+ let value = buffer[i + 0] << 16
16
+ | buffer[i + 1] << 8
17
+ | buffer[i + 2];
18
+ let char1 = (value >> 18) & 0x3f;
19
+ let char2 = (value >> 12) & 0x3f;
20
+ let char3 = (value >> 6) & 0x3f;
21
+ let char4 = (value >> 0) & 0x3f;
22
+ output += BASE64_KEY[char1];
23
+ output += BASE64_KEY[char2];
24
+ output += BASE64_KEY[char3];
25
+ output += BASE64_KEY[char4];
26
+ }
27
+ let outputPad = Math.floor(inputPad * 8 / 6);
28
+ if (outputPad !== 0)
29
+ output = output.slice(0, -outputPad) + Array(outputPad + 1).join('=');
30
+ return output;
31
+ }
32
+ static decode(str) {
33
+ return new TextDecoder().decode(this.decodeBytes(str));
34
+ }
35
+ static decodeBytes(str) {
36
+ str = str.replace(/=+$/g, '');
37
+ let paddingRequired = str.length % 4 === 0 ? 0 : 4 - str.length % 4;
38
+ str += Array(paddingRequired + 1).join('=');
39
+ let decoded = new Uint8Array(str.length * 6 / 8);
40
+ for (let i = 0, max = str.length; i < max; i += 4) {
41
+ let value = BASE64_KEY.indexOf(str[i + 0]) << 18
42
+ | BASE64_KEY.indexOf(str[i + 1]) << 12
43
+ | BASE64_KEY.indexOf(str[i + 2]) << 6
44
+ | BASE64_KEY.indexOf(str[i + 3]) << 0;
45
+ decoded[i / 4 * 3 + 0] = value >> 16 & 0xFF;
46
+ decoded[i / 4 * 3 + 1] = value >> 8 & 0xFF;
47
+ decoded[i / 4 * 3 + 2] = value >> 0 & 0xFF;
48
+ }
49
+ return decoded.subarray(0, decoded.length - paddingRequired);
50
+ }
51
+ }
52
+ exports.Base64 = Base64;
53
53
  //# sourceMappingURL=base64.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base64.js","sourceRoot":"","sources":["../src/base64.ts"],"names":[],"mappings":";;;AAAA,MAAM,UAAU,GAAG,mEAAmE,CAAC;AAEvF,MAAa,MAAM;IACf,MAAM,CAAC,MAAM,CAAC,GAAW;QACrB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,KAAiB;QAChC,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,QAAQ,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACjE,IAAI,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAErB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;YAClD,IAAI,KAAK,GACL,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;kBACjB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;kBAClB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CACd;YACL,IAAI,KAAK,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,IA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G,CAAC,CAAC,CAAC,IAAI,EAAE;kBACpC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;kBACnC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CACpC;YAEL,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC;YAC5C,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;YAC3C,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/C,CAAC;QAED,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC;IACjE,CAAC;CACJ;AA3DD,wBA2DC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=base64.test.d.ts.map
package/dist/cache.d.ts CHANGED
@@ -1,85 +1,85 @@
1
- interface CacheEntry<T> {
2
- key: string;
3
- time: number;
4
- expiresAt: number;
5
- lastFetched: number;
6
- value: T;
7
- }
8
- interface CacheFetcher<T> {
9
- (): Promise<T>;
10
- }
11
- interface FetchOptions {
12
- /**
13
- * The time to live to set for a fulfilled item
14
- */
15
- timeToLive?: number;
16
- /**
17
- * What kind of cache miss strategy should be used here.
18
- * - "fulfill" [default]:
19
- * If the cache misses for any reason, wait until the new value is fetched and return it.
20
- * - "stale-revalidate":
21
- * If the cache misses due to an expired value, return the expired (stale) value
22
- * and call the fetcher to update the value in the background.
23
- */
24
- missStrategy?: "fulfill" | "stale-revalidate";
25
- }
26
- /**
27
- * Provides a generic caching mechanism useful for a number of cases
28
- */
29
- export declare class Cache<T> {
30
- private timeToLive;
31
- private maxItems;
32
- /**
33
- *
34
- * @param timeToLive Time a cached item should live before expiring, in milliseconds
35
- * @param maxItems Amount of items that can be held in the cache maximum.
36
- */
37
- constructor(timeToLive: number, maxItems: number);
38
- private entries;
39
- /**
40
- * Cache cleanup routine run whenever a value is stored in the cache
41
- */
42
- private sliceCleanup;
43
- getOldestEntry(): CacheEntry<T>;
44
- /**
45
- * Insert the specified item into the cache under the given key,
46
- * optionally specifying a custom time-to-live. If no time-to-live
47
- * is specified, the class-wide default is used.
48
- *
49
- * @param key The key for the cache entry
50
- * @param value The value to cache
51
- * @param timeToLive How long the value should remain valid for before revalidation
52
- */
53
- insertItem(key: string, value: T, timeToLive?: number): void;
54
- private outstandingFetches;
55
- /**
56
- * Get the value present in the cache for the given key regardless
57
- * of the cache entry's expiration status.
58
- *
59
- * @param key The key to get
60
- */
61
- get(key: string): T;
62
- /**
63
- * Get the cache entry for the given key.
64
- * @param key The key to get
65
- */
66
- getEntry(key: string): CacheEntry<T>;
67
- /**
68
- * Fetch a value from the cache, calling the given function to
69
- * generate the value if it is not present or it is expired.
70
- * The result of the function is then cached for future calls.
71
- *
72
- * Use `options.missStrategy` to control the revalidation behavior. The default value ("fulfill") will
73
- * wait until the fetch operation completes to return a value in the case where a cache miss occurs,
74
- * even if an expired cache value is present. The "stale-revalidate" option will instead return the
75
- * value found in the cache even when expired, executing the fetch operation if the value is expired
76
- * and saving the resulting value back into the cache for future calls.
77
- *
78
- * @param key The key to fetch
79
- * @param fetcher A function to define the value of the key if a cache miss occurs
80
- * @param options Options for doing the caching.
81
- */
82
- fetch(key: string, fetcher?: CacheFetcher<T>, options?: FetchOptions): Promise<T>;
83
- }
84
- export {};
1
+ interface CacheEntry<T> {
2
+ key: string;
3
+ time: number;
4
+ expiresAt: number;
5
+ lastFetched: number;
6
+ value: T;
7
+ }
8
+ interface CacheFetcher<T> {
9
+ (): Promise<T>;
10
+ }
11
+ interface FetchOptions {
12
+ /**
13
+ * The time to live to set for a fulfilled item
14
+ */
15
+ timeToLive?: number;
16
+ /**
17
+ * What kind of cache miss strategy should be used here.
18
+ * - "fulfill" [default]:
19
+ * If the cache misses for any reason, wait until the new value is fetched and return it.
20
+ * - "stale-revalidate":
21
+ * If the cache misses due to an expired value, return the expired (stale) value
22
+ * and call the fetcher to update the value in the background.
23
+ */
24
+ missStrategy?: "fulfill" | "stale-revalidate";
25
+ }
26
+ /**
27
+ * Provides a generic caching mechanism useful for a number of cases
28
+ */
29
+ export declare class Cache<T> {
30
+ private timeToLive;
31
+ private maxItems;
32
+ /**
33
+ *
34
+ * @param timeToLive Time a cached item should live before expiring, in milliseconds
35
+ * @param maxItems Amount of items that can be held in the cache maximum.
36
+ */
37
+ constructor(timeToLive: number, maxItems: number);
38
+ private entries;
39
+ /**
40
+ * Cache cleanup routine run whenever a value is stored in the cache
41
+ */
42
+ private sliceCleanup;
43
+ getOldestEntry(): CacheEntry<T>;
44
+ /**
45
+ * Insert the specified item into the cache under the given key,
46
+ * optionally specifying a custom time-to-live. If no time-to-live
47
+ * is specified, the class-wide default is used.
48
+ *
49
+ * @param key The key for the cache entry
50
+ * @param value The value to cache
51
+ * @param timeToLive How long the value should remain valid for before revalidation
52
+ */
53
+ insertItem(key: string, value: T, timeToLive?: number): void;
54
+ private outstandingFetches;
55
+ /**
56
+ * Get the value present in the cache for the given key regardless
57
+ * of the cache entry's expiration status.
58
+ *
59
+ * @param key The key to get
60
+ */
61
+ get(key: string): T;
62
+ /**
63
+ * Get the cache entry for the given key.
64
+ * @param key The key to get
65
+ */
66
+ getEntry(key: string): CacheEntry<T>;
67
+ /**
68
+ * Fetch a value from the cache, calling the given function to
69
+ * generate the value if it is not present or it is expired.
70
+ * The result of the function is then cached for future calls.
71
+ *
72
+ * Use `options.missStrategy` to control the revalidation behavior. The default value ("fulfill") will
73
+ * wait until the fetch operation completes to return a value in the case where a cache miss occurs,
74
+ * even if an expired cache value is present. The "stale-revalidate" option will instead return the
75
+ * value found in the cache even when expired, executing the fetch operation if the value is expired
76
+ * and saving the resulting value back into the cache for future calls.
77
+ *
78
+ * @param key The key to fetch
79
+ * @param fetcher A function to define the value of the key if a cache miss occurs
80
+ * @param options Options for doing the caching.
81
+ */
82
+ fetch(key: string, fetcher?: CacheFetcher<T>, options?: FetchOptions): Promise<T>;
83
+ }
84
+ export {};
85
85
  //# sourceMappingURL=cache.d.ts.map
package/dist/cache.js CHANGED
@@ -1,149 +1,149 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Cache = void 0;
4
- const tslib_1 = require("tslib");
5
- const clone_1 = require("./clone");
6
- /**
7
- * Provides a generic caching mechanism useful for a number of cases
8
- */
9
- class Cache {
10
- /**
11
- *
12
- * @param timeToLive Time a cached item should live before expiring, in milliseconds
13
- * @param maxItems Amount of items that can be held in the cache maximum.
14
- */
15
- constructor(timeToLive, maxItems) {
16
- this.timeToLive = timeToLive;
17
- this.maxItems = maxItems;
18
- this.entries = {};
19
- this.outstandingFetches = new Map();
20
- }
21
- /**
22
- * Cache cleanup routine run whenever a value is stored in the cache
23
- */
24
- sliceCleanup() {
25
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
26
- let keys = Object.keys(this.entries);
27
- if (keys.length < this.maxItems)
28
- return;
29
- setTimeout(() => {
30
- // Refresh the current count, and trim the
31
- // cache to the right size, evicting last-fetched item
32
- // first.
33
- keys = Object.keys(this.entries);
34
- let itemCount = keys.length;
35
- while (itemCount > this.maxItems) {
36
- let entry = this.getOldestEntry();
37
- delete this.entries[entry.key];
38
- --itemCount;
39
- }
40
- }, 100);
41
- });
42
- }
43
- getOldestEntry() {
44
- let selectedEntry = null;
45
- for (let key in this.entries) {
46
- let entry = this.entries[key];
47
- if (!selectedEntry || selectedEntry.time > entry.time)
48
- selectedEntry = entry;
49
- }
50
- return selectedEntry;
51
- }
52
- /**
53
- * Insert the specified item into the cache under the given key,
54
- * optionally specifying a custom time-to-live. If no time-to-live
55
- * is specified, the class-wide default is used.
56
- *
57
- * @param key The key for the cache entry
58
- * @param value The value to cache
59
- * @param timeToLive How long the value should remain valid for before revalidation
60
- */
61
- insertItem(key, value, timeToLive) {
62
- if (timeToLive === undefined)
63
- timeToLive = this.timeToLive;
64
- // Compute the value
65
- let now = new Date().getTime();
66
- let entry = this.entries[key] = {
67
- key,
68
- time: now,
69
- expiresAt: now + timeToLive,
70
- lastFetched: now,
71
- value: (0, clone_1.deepClone)(value)
72
- };
73
- this.sliceCleanup();
74
- }
75
- /**
76
- * Get the value present in the cache for the given key regardless
77
- * of the cache entry's expiration status.
78
- *
79
- * @param key The key to get
80
- */
81
- get(key) {
82
- let entry = this.entries[key];
83
- return entry ? (0, clone_1.deepClone)(entry.value) : undefined;
84
- }
85
- /**
86
- * Get the cache entry for the given key.
87
- * @param key The key to get
88
- */
89
- getEntry(key) {
90
- return this.entries[key];
91
- }
92
- /**
93
- * Fetch a value from the cache, calling the given function to
94
- * generate the value if it is not present or it is expired.
95
- * The result of the function is then cached for future calls.
96
- *
97
- * Use `options.missStrategy` to control the revalidation behavior. The default value ("fulfill") will
98
- * wait until the fetch operation completes to return a value in the case where a cache miss occurs,
99
- * even if an expired cache value is present. The "stale-revalidate" option will instead return the
100
- * value found in the cache even when expired, executing the fetch operation if the value is expired
101
- * and saving the resulting value back into the cache for future calls.
102
- *
103
- * @param key The key to fetch
104
- * @param fetcher A function to define the value of the key if a cache miss occurs
105
- * @param options Options for doing the caching.
106
- */
107
- fetch(key, fetcher, options = {}) {
108
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
109
- let existingFetch = this.outstandingFetches.get(key);
110
- if (existingFetch)
111
- return yield existingFetch;
112
- let entry;
113
- let now = Date.now();
114
- let stale = true;
115
- if (key in this.entries) {
116
- entry = this.entries[key];
117
- stale = entry.expiresAt < now;
118
- }
119
- if (!options.missStrategy)
120
- options.missStrategy = 'fulfill';
121
- if (options.missStrategy === 'fulfill')
122
- entry = stale ? undefined : entry;
123
- let fetchOperation;
124
- if (stale && fetcher) {
125
- fetchOperation = new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
126
- // Fetch!
127
- let value;
128
- try {
129
- value = yield fetcher();
130
- if (value !== undefined)
131
- this.insertItem(key, value, options.timeToLive);
132
- resolve(value);
133
- }
134
- catch (e) {
135
- console.error(`Failed to fetch item ${key}:`);
136
- console.error(e);
137
- debugger;
138
- resolve(entry ? (0, clone_1.deepClone)(entry.value) : undefined);
139
- }
140
- }));
141
- fetchOperation.finally(() => this.outstandingFetches.delete(key));
142
- this.outstandingFetches.set(key, fetchOperation);
143
- }
144
- return entry ? (0, clone_1.deepClone)(entry.value) : yield fetchOperation;
145
- });
146
- }
147
- }
148
- exports.Cache = Cache;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Cache = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const clone_1 = require("./clone");
6
+ /**
7
+ * Provides a generic caching mechanism useful for a number of cases
8
+ */
9
+ class Cache {
10
+ /**
11
+ *
12
+ * @param timeToLive Time a cached item should live before expiring, in milliseconds
13
+ * @param maxItems Amount of items that can be held in the cache maximum.
14
+ */
15
+ constructor(timeToLive, maxItems) {
16
+ this.timeToLive = timeToLive;
17
+ this.maxItems = maxItems;
18
+ this.entries = {};
19
+ this.outstandingFetches = new Map();
20
+ }
21
+ /**
22
+ * Cache cleanup routine run whenever a value is stored in the cache
23
+ */
24
+ sliceCleanup() {
25
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
26
+ let keys = Object.keys(this.entries);
27
+ if (keys.length < this.maxItems)
28
+ return;
29
+ setTimeout(() => {
30
+ // Refresh the current count, and trim the
31
+ // cache to the right size, evicting last-fetched item
32
+ // first.
33
+ keys = Object.keys(this.entries);
34
+ let itemCount = keys.length;
35
+ while (itemCount > this.maxItems) {
36
+ let entry = this.getOldestEntry();
37
+ delete this.entries[entry.key];
38
+ --itemCount;
39
+ }
40
+ }, 100);
41
+ });
42
+ }
43
+ getOldestEntry() {
44
+ let selectedEntry = null;
45
+ for (let key in this.entries) {
46
+ let entry = this.entries[key];
47
+ if (!selectedEntry || selectedEntry.time > entry.time)
48
+ selectedEntry = entry;
49
+ }
50
+ return selectedEntry;
51
+ }
52
+ /**
53
+ * Insert the specified item into the cache under the given key,
54
+ * optionally specifying a custom time-to-live. If no time-to-live
55
+ * is specified, the class-wide default is used.
56
+ *
57
+ * @param key The key for the cache entry
58
+ * @param value The value to cache
59
+ * @param timeToLive How long the value should remain valid for before revalidation
60
+ */
61
+ insertItem(key, value, timeToLive) {
62
+ if (timeToLive === undefined)
63
+ timeToLive = this.timeToLive;
64
+ // Compute the value
65
+ let now = new Date().getTime();
66
+ let entry = this.entries[key] = {
67
+ key,
68
+ time: now,
69
+ expiresAt: now + timeToLive,
70
+ lastFetched: now,
71
+ value: (0, clone_1.deepClone)(value)
72
+ };
73
+ this.sliceCleanup();
74
+ }
75
+ /**
76
+ * Get the value present in the cache for the given key regardless
77
+ * of the cache entry's expiration status.
78
+ *
79
+ * @param key The key to get
80
+ */
81
+ get(key) {
82
+ let entry = this.entries[key];
83
+ return entry ? (0, clone_1.deepClone)(entry.value) : undefined;
84
+ }
85
+ /**
86
+ * Get the cache entry for the given key.
87
+ * @param key The key to get
88
+ */
89
+ getEntry(key) {
90
+ return this.entries[key];
91
+ }
92
+ /**
93
+ * Fetch a value from the cache, calling the given function to
94
+ * generate the value if it is not present or it is expired.
95
+ * The result of the function is then cached for future calls.
96
+ *
97
+ * Use `options.missStrategy` to control the revalidation behavior. The default value ("fulfill") will
98
+ * wait until the fetch operation completes to return a value in the case where a cache miss occurs,
99
+ * even if an expired cache value is present. The "stale-revalidate" option will instead return the
100
+ * value found in the cache even when expired, executing the fetch operation if the value is expired
101
+ * and saving the resulting value back into the cache for future calls.
102
+ *
103
+ * @param key The key to fetch
104
+ * @param fetcher A function to define the value of the key if a cache miss occurs
105
+ * @param options Options for doing the caching.
106
+ */
107
+ fetch(key_1, fetcher_1) {
108
+ return tslib_1.__awaiter(this, arguments, void 0, function* (key, fetcher, options = {}) {
109
+ let existingFetch = this.outstandingFetches.get(key);
110
+ if (existingFetch)
111
+ return yield existingFetch;
112
+ let entry;
113
+ let now = Date.now();
114
+ let stale = true;
115
+ if (key in this.entries) {
116
+ entry = this.entries[key];
117
+ stale = entry.expiresAt < now;
118
+ }
119
+ if (!options.missStrategy)
120
+ options.missStrategy = 'fulfill';
121
+ if (options.missStrategy === 'fulfill')
122
+ entry = stale ? undefined : entry;
123
+ let fetchOperation;
124
+ if (stale && fetcher) {
125
+ fetchOperation = new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
126
+ // Fetch!
127
+ let value;
128
+ try {
129
+ value = yield fetcher();
130
+ if (value !== undefined)
131
+ this.insertItem(key, value, options.timeToLive);
132
+ resolve(value);
133
+ }
134
+ catch (e) {
135
+ console.error(`Failed to fetch item ${key}:`);
136
+ console.error(e);
137
+ debugger;
138
+ resolve(entry ? (0, clone_1.deepClone)(entry.value) : undefined);
139
+ }
140
+ }));
141
+ fetchOperation.finally(() => this.outstandingFetches.delete(key));
142
+ this.outstandingFetches.set(key, fetchOperation);
143
+ }
144
+ return entry ? (0, clone_1.deepClone)(entry.value) : yield fetchOperation;
145
+ });
146
+ }
147
+ }
148
+ exports.Cache = Cache;
149
149
  //# sourceMappingURL=cache.js.map
package/dist/cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":";;;;AAAA,mCAAoC;AAmCpC;;GAEG;AACH,MAAa,KAAK;IACd;;;;OAIG;IACH,YAA2B,UAAmB,EAAU,QAAiB;QAA9C,eAAU,GAAV,UAAU,CAAS;QAAU,aAAQ,GAAR,QAAQ,CAAS;QAGjE,YAAO,GAAiB,EAAE,CAAC;QAkE3B,uBAAkB,GAAG,IAAI,GAAG,EAAwB,CAAC;IApE7D,CAAC;IAID;;OAEG;IACW,YAAY;;YAEtB,IAAI,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jE,CAAC;KAAA;CACJ;AA/JD,sBA+JC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=cache.test.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare function disallowNativeAsync(func: Function): void;
1
+ export declare function disallowNativeAsync(func: Function): void;
2
2
  //# sourceMappingURL=check-native-async.d.ts.map