scrabble-solver 2.13.1 → 2.13.3

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 (155) hide show
  1. package/.github/workflows/build.yml +3 -4
  2. package/.github/workflows/eslint.yml +1 -1
  3. package/.github/workflows/test.yml +1 -2
  4. package/.nx/cache/file-map.json +2610 -0
  5. package/.nx/cache/lockfile.hash +1 -0
  6. package/.nx/cache/nx_files.nxt +0 -0
  7. package/.nx/cache/parsed-lock-file.json +32593 -0
  8. package/.nx/cache/project-graph.json +32416 -0
  9. package/README.md +8 -8
  10. package/lerna.json +1 -1
  11. package/package.json +36 -29
  12. package/packages/configs/package.json +4 -5
  13. package/packages/constants/package.json +2 -3
  14. package/packages/dictionaries/package-lock.json +2 -2
  15. package/packages/dictionaries/package.json +5 -6
  16. package/packages/logger/package-lock.json +15 -7
  17. package/packages/logger/package.json +3 -4
  18. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  19. package/packages/scrabble-solver/.next/build-manifest.json +16 -16
  20. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  21. package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
  22. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  23. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  24. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
  25. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  26. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  27. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  28. package/packages/scrabble-solver/.next/next-minimal-server.js.nft.json +1 -0
  29. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  30. package/packages/scrabble-solver/.next/prerender-manifest.js +1 -0
  31. package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
  32. package/packages/scrabble-solver/.next/required-server-files.json +1 -1
  33. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  34. package/packages/scrabble-solver/.next/server/InjectManifest.js.nft.json +1 -1
  35. package/packages/scrabble-solver/.next/server/chunks/28.js +1 -0
  36. package/packages/scrabble-solver/.next/server/chunks/331.js +6 -0
  37. package/packages/scrabble-solver/.next/server/chunks/577.js +1 -0
  38. package/packages/scrabble-solver/.next/server/chunks/911.js +1 -1083
  39. package/packages/scrabble-solver/.next/server/chunks/977.js +1 -0
  40. package/packages/scrabble-solver/.next/server/functions-config-manifest.json +1 -0
  41. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  42. package/packages/scrabble-solver/.next/server/middleware-react-loadable-manifest.js +1 -1
  43. package/packages/scrabble-solver/.next/server/next-font-manifest.js +1 -1
  44. package/packages/scrabble-solver/.next/server/next-font-manifest.json +1 -6
  45. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  46. package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
  47. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  48. package/packages/scrabble-solver/.next/server/pages/_app.js +1 -380
  49. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  50. package/packages/scrabble-solver/.next/server/pages/_document.js +1 -212
  51. package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
  52. package/packages/scrabble-solver/.next/server/pages/_error.js +1 -166
  53. package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
  54. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +2 -836
  55. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  56. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +1 -192
  57. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  58. package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1121
  59. package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
  60. package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -213
  61. package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
  62. package/packages/scrabble-solver/.next/server/pages/api/visit.js +1 -131
  63. package/packages/scrabble-solver/.next/server/pages/api/visit.js.nft.json +1 -1
  64. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  65. package/packages/scrabble-solver/.next/server/pages/index.js +1 -2088
  66. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  67. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  68. package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -12
  69. package/packages/scrabble-solver/.next/server/webpack-api-runtime.js +1 -172
  70. package/packages/scrabble-solver/.next/server/webpack-runtime.js +1 -229
  71. package/packages/scrabble-solver/.next/static/chunks/framework-1728d40275bc359a.js +49 -0
  72. package/packages/scrabble-solver/.next/static/chunks/main-5fb7abbfc135de15.js +1 -0
  73. package/packages/scrabble-solver/.next/static/chunks/pages/404-b6e238bb4117d451.js +1 -0
  74. package/packages/scrabble-solver/.next/static/chunks/pages/_app-b95404c40a0092e6.js +17 -0
  75. package/packages/scrabble-solver/.next/static/chunks/pages/_error-db043fa3544f8809.js +1 -0
  76. package/packages/scrabble-solver/.next/static/chunks/pages/index-59d569ef79bc2580.js +1 -0
  77. package/packages/scrabble-solver/.next/static/css/8fa2fb99b90e109e.css +1 -0
  78. package/packages/scrabble-solver/.next/static/css/c80ebc6fd13311f1.css +2 -0
  79. package/packages/scrabble-solver/.next/static/r00VHxlMI-jbGWpg3nm2M/_buildManifest.js +1 -0
  80. package/packages/scrabble-solver/.next/trace +44 -51
  81. package/packages/scrabble-solver/package-lock.json +755 -524
  82. package/packages/scrabble-solver/package.json +30 -31
  83. package/packages/scrabble-solver/public/service-worker.js +2 -0
  84. package/packages/scrabble-solver/public/service-worker.js.map +1 -0
  85. package/packages/scrabble-solver/src/i18n/ro.json +5 -5
  86. package/packages/scrabble-solver/src/state/slices/boardSlice.ts +4 -4
  87. package/packages/scrabble-solver/src/state/store.ts +1 -1
  88. package/packages/solver/package-lock.json +2 -2
  89. package/packages/solver/package.json +6 -7
  90. package/packages/types/package.json +3 -4
  91. package/packages/word-definitions/package-lock.json +10 -10
  92. package/packages/word-definitions/package.json +5 -5
  93. package/packages/word-lists/build/getFrFrWordList.js +1 -5
  94. package/packages/word-lists/build/getRoRoWordList.js +1 -5
  95. package/packages/word-lists/build/lib/index.d.ts +2 -0
  96. package/packages/word-lists/build/lib/index.js +5 -1
  97. package/packages/word-lists/build/lib/latinizeDiacritics.d.ts +2 -0
  98. package/packages/word-lists/build/lib/latinizeDiacritics.js +11 -0
  99. package/packages/word-lists/build/lib/unique.d.ts +2 -0
  100. package/packages/word-lists/build/lib/unique.js +4 -0
  101. package/packages/word-lists/package-lock.json +22 -22
  102. package/packages/word-lists/package.json +8 -9
  103. package/packages/word-lists/src/getFrFrWordList.ts +2 -3
  104. package/packages/word-lists/src/getRoRoWordList.ts +2 -3
  105. package/packages/word-lists/src/lib/index.ts +2 -0
  106. package/packages/word-lists/src/lib/latinizeDiacritics.ts +9 -0
  107. package/packages/word-lists/src/lib/unique.ts +3 -0
  108. package/tsconfig.json +1 -1
  109. package/packages/configs/dictionaries/build/Dictionaries.d.ts +0 -13
  110. package/packages/configs/dictionaries/build/Dictionaries.js +0 -46
  111. package/packages/configs/dictionaries/build/constants/index.d.ts +0 -3
  112. package/packages/configs/dictionaries/build/constants/index.js +0 -11
  113. package/packages/configs/dictionaries/build/index.d.ts +0 -3
  114. package/packages/configs/dictionaries/build/index.js +0 -23
  115. package/packages/configs/dictionaries/build/lib/DiskCache.d.ts +0 -11
  116. package/packages/configs/dictionaries/build/lib/DiskCache.js +0 -48
  117. package/packages/configs/dictionaries/build/lib/LayeredCache.d.ts +0 -13
  118. package/packages/configs/dictionaries/build/lib/LayeredCache.js +0 -55
  119. package/packages/configs/dictionaries/build/lib/MemoryCache.d.ts +0 -13
  120. package/packages/configs/dictionaries/build/lib/MemoryCache.js +0 -32
  121. package/packages/configs/dictionaries/build/lib/createAsyncProxy.d.ts +0 -3
  122. package/packages/configs/dictionaries/build/lib/createAsyncProxy.js +0 -18
  123. package/packages/configs/dictionaries/build/lib/createCacheTimestampComparator.d.ts +0 -5
  124. package/packages/configs/dictionaries/build/lib/createCacheTimestampComparator.js +0 -19
  125. package/packages/configs/dictionaries/build/lib/downloadDictionary.d.ts +0 -4
  126. package/packages/configs/dictionaries/build/lib/downloadDictionary.js +0 -16
  127. package/packages/configs/dictionaries/build/lib/getDictionaryFilepath.d.ts +0 -3
  128. package/packages/configs/dictionaries/build/lib/getDictionaryFilepath.js +0 -11
  129. package/packages/configs/dictionaries/build/lib/index.d.ts +0 -7
  130. package/packages/configs/dictionaries/build/lib/index.js +0 -20
  131. package/packages/configs/dictionaries/build/types/Cache.d.ts +0 -8
  132. package/packages/configs/dictionaries/build/types/Cache.js +0 -2
  133. package/packages/configs/dictionaries/build/types/index.d.ts +0 -1
  134. package/packages/configs/dictionaries/build/types/index.js +0 -2
  135. package/packages/scrabble-solver/.next/cache/next-server.js.nft.json +0 -1
  136. package/packages/scrabble-solver/.next/server/chunks/210.js +0 -109
  137. package/packages/scrabble-solver/.next/server/chunks/277.js +0 -11942
  138. package/packages/scrabble-solver/.next/server/chunks/44.js +0 -1813
  139. package/packages/scrabble-solver/.next/server/chunks/50.js +0 -12119
  140. package/packages/scrabble-solver/.next/server/chunks/636.js +0 -286
  141. package/packages/scrabble-solver/.next/server/chunks/675.js +0 -572
  142. package/packages/scrabble-solver/.next/server/chunks/859.js +0 -835
  143. package/packages/scrabble-solver/.next/server/chunks/865.js +0 -20424
  144. package/packages/scrabble-solver/.next/server/chunks/907.js +0 -42530
  145. package/packages/scrabble-solver/.next/server/chunks/987.js +0 -91
  146. package/packages/scrabble-solver/.next/static/RJ5_dKU0dHcryeTVO6SSX/_buildManifest.js +0 -1
  147. package/packages/scrabble-solver/.next/static/chunks/framework-2c29dc3cd933590b.js +0 -49
  148. package/packages/scrabble-solver/.next/static/chunks/main-4dcb7f9b52833aba.js +0 -1
  149. package/packages/scrabble-solver/.next/static/chunks/pages/404-b4b5ce15153d4825.js +0 -1
  150. package/packages/scrabble-solver/.next/static/chunks/pages/_app-b92880dde164b954.js +0 -32
  151. package/packages/scrabble-solver/.next/static/chunks/pages/_error-54de1933a164a1ff.js +0 -1
  152. package/packages/scrabble-solver/.next/static/chunks/pages/index-f56eaa969a831c70.js +0 -1
  153. package/packages/scrabble-solver/.next/static/css/4e8b47fe382a8a8f.css +0 -2
  154. package/packages/scrabble-solver/.next/static/css/cfae5256f1689f57.css +0 -1
  155. /package/packages/scrabble-solver/.next/static/{RJ5_dKU0dHcryeTVO6SSX → r00VHxlMI-jbGWpg3nm2M}/_ssgManifest.js +0 -0
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const trie_1 = require("@kamilmielnik/trie");
7
- const fs_1 = __importDefault(require("fs"));
8
- const constants_1 = require("../constants");
9
- const getDictionaryFilepath_1 = __importDefault(require("./getDictionaryFilepath"));
10
- class DiskCache {
11
- async get(locale) {
12
- if (!this.has(locale)) {
13
- return undefined;
14
- }
15
- const filepath = (0, getDictionaryFilepath_1.default)(locale);
16
- const serialized = await fs_1.default.promises.readFile(filepath, 'utf-8');
17
- const trie = trie_1.Trie.deserialize(serialized);
18
- return trie;
19
- }
20
- getLastModifiedTimestamp(locale) {
21
- const filepath = (0, getDictionaryFilepath_1.default)(locale);
22
- if (!fs_1.default.existsSync(filepath)) {
23
- return undefined;
24
- }
25
- const stats = fs_1.default.statSync(filepath);
26
- return stats.mtimeMs;
27
- }
28
- has(locale) {
29
- const filepath = (0, getDictionaryFilepath_1.default)(locale);
30
- return fs_1.default.existsSync(filepath);
31
- }
32
- isStale(locale) {
33
- if (!this.has(locale)) {
34
- return undefined;
35
- }
36
- const lastModifiedTimestamp = this.getLastModifiedTimestamp(locale);
37
- if (typeof lastModifiedTimestamp === 'undefined') {
38
- return undefined;
39
- }
40
- const timeSinceModification = Math.abs(lastModifiedTimestamp - Date.now());
41
- return timeSinceModification > constants_1.CACHE_STALE_THRESHOLD;
42
- }
43
- async set(locale, trie) {
44
- const filepath = (0, getDictionaryFilepath_1.default)(locale);
45
- await fs_1.default.promises.writeFile(filepath, trie.serialize());
46
- }
47
- }
48
- exports.default = DiskCache;
@@ -1,13 +0,0 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
4
- declare class LayeredCache implements Cache<Locale, Trie> {
5
- private readonly layers;
6
- get(locale: Locale): Promise<Trie | undefined>;
7
- getLastModifiedTimestamp(locale: Locale): number | undefined;
8
- has(locale: Locale): boolean;
9
- isStale(locale: Locale): boolean | undefined;
10
- set(locale: Locale, trie: Trie): Promise<void>;
11
- private getLastModifiedLayer;
12
- }
13
- export default LayeredCache;
@@ -1,55 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const createCacheTimestampComparator_1 = __importDefault(require("./createCacheTimestampComparator"));
7
- const DiskCache_1 = __importDefault(require("./DiskCache"));
8
- const MemoryCache_1 = __importDefault(require("./MemoryCache"));
9
- class LayeredCache {
10
- constructor() {
11
- this.layers = [new MemoryCache_1.default(), new DiskCache_1.default()];
12
- }
13
- async get(locale) {
14
- const cache = this.getLastModifiedLayer(locale);
15
- if (!cache) {
16
- return Promise.resolve(undefined);
17
- }
18
- const [memoryCache, diskCache] = this.layers;
19
- const value = await cache.get(locale);
20
- if (cache === diskCache && typeof value !== 'undefined') {
21
- await memoryCache.set(locale, value);
22
- }
23
- return value;
24
- }
25
- getLastModifiedTimestamp(locale) {
26
- const cache = this.getLastModifiedLayer(locale);
27
- if (!cache) {
28
- return undefined;
29
- }
30
- return cache.getLastModifiedTimestamp(locale);
31
- }
32
- has(locale) {
33
- return this.layers.some((cache) => cache.has(locale));
34
- }
35
- isStale(locale) {
36
- if (this.layers.some((cache) => cache.isStale(locale))) {
37
- return true;
38
- }
39
- if (this.layers.every((cache) => typeof cache.isStale(locale) === 'undefined')) {
40
- return undefined;
41
- }
42
- return false;
43
- }
44
- async set(locale, trie) {
45
- const [memoryCache, diskCache] = this.layers;
46
- await diskCache.set(locale, trie);
47
- await memoryCache.set(locale, trie);
48
- }
49
- getLastModifiedLayer(locale) {
50
- const layers = this.layers.filter((cache) => cache.has(locale));
51
- const [cached] = [...layers].sort((0, createCacheTimestampComparator_1.default)(locale));
52
- return cached;
53
- }
54
- }
55
- exports.default = LayeredCache;
@@ -1,13 +0,0 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
4
- declare class MemoryCache implements Cache<Locale, Trie> {
5
- private readonly cache;
6
- private readonly cacheTimestamps;
7
- get(locale: Locale): Promise<Trie | undefined>;
8
- getLastModifiedTimestamp(locale: Locale): number | undefined;
9
- has(locale: Locale): boolean;
10
- isStale(locale: Locale): boolean | undefined;
11
- set(locale: Locale, trie: Trie): Promise<void>;
12
- }
13
- export default MemoryCache;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const constants_1 = require("../constants");
4
- class MemoryCache {
5
- constructor() {
6
- this.cache = {};
7
- this.cacheTimestamps = {};
8
- }
9
- get(locale) {
10
- return Promise.resolve(this.cache[locale]);
11
- }
12
- getLastModifiedTimestamp(locale) {
13
- return this.cacheTimestamps[locale];
14
- }
15
- has(locale) {
16
- return typeof this.cache[locale] !== 'undefined';
17
- }
18
- isStale(locale) {
19
- const timestamp = this.getLastModifiedTimestamp(locale);
20
- if (!this.has(locale) || typeof timestamp === 'undefined') {
21
- return undefined;
22
- }
23
- const timeSinceModification = Math.abs(timestamp - Date.now());
24
- return timeSinceModification > constants_1.CACHE_STALE_THRESHOLD;
25
- }
26
- set(locale, trie) {
27
- this.cacheTimestamps[locale] = Date.now();
28
- this.cache[locale] = trie;
29
- return Promise.resolve();
30
- }
31
- }
32
- exports.default = MemoryCache;
@@ -1,3 +0,0 @@
1
- type AsyncCallback<T> = () => Promise<T>;
2
- declare const createAsyncProxy: <T>(asyncCallback: AsyncCallback<T>) => AsyncCallback<T>;
3
- export default createAsyncProxy;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const createAsyncProxy = (asyncCallback) => {
4
- let promise = null;
5
- return async () => {
6
- if (promise) {
7
- return promise;
8
- }
9
- try {
10
- promise = asyncCallback();
11
- return await promise;
12
- }
13
- finally {
14
- promise = null;
15
- }
16
- };
17
- };
18
- exports.default = createAsyncProxy;
@@ -1,5 +0,0 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
4
- declare const createCacheTimestampComparator: (locale: Locale) => (a: Cache<Locale, Trie>, b: Cache<Locale, Trie>) => number;
5
- export default createCacheTimestampComparator;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const createCacheTimestampComparator = (locale) => {
4
- return (a, b) => {
5
- const aTimestamp = a.getLastModifiedTimestamp(locale);
6
- const bTimestamp = b.getLastModifiedTimestamp(locale);
7
- if (aTimestamp === bTimestamp) {
8
- return 0;
9
- }
10
- if (typeof aTimestamp === 'undefined') {
11
- return 1;
12
- }
13
- if (typeof bTimestamp === 'undefined') {
14
- return -1;
15
- }
16
- return bTimestamp - aTimestamp;
17
- };
18
- };
19
- exports.default = createCacheTimestampComparator;
@@ -1,4 +0,0 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- declare const downloadDictionary: (locale: Locale) => Promise<Trie>;
4
- export default downloadDictionary;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const trie_1 = require("@kamilmielnik/trie");
7
- const logger_1 = __importDefault(require("@scrabble-solver/logger"));
8
- const word_lists_1 = require("@scrabble-solver/word-lists");
9
- const downloadDictionary = async (locale) => {
10
- logger_1.default.info('downloadDictionary', { locale });
11
- const words = await (0, word_lists_1.getWordList)(locale);
12
- logger_1.default.info('downloadDictionary - success', { locale });
13
- const trie = trie_1.Trie.fromArray(words);
14
- return trie;
15
- };
16
- exports.default = downloadDictionary;
@@ -1,3 +0,0 @@
1
- import { Locale } from '@scrabble-solver/types';
2
- declare const getDictionaryFilepath: (locale: Locale) => string;
3
- export default getDictionaryFilepath;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const constants_1 = require("../constants");
8
- const getDictionaryFilepath = (locale) => {
9
- return path_1.default.resolve(constants_1.OUTPUT_DIRECTORY, `${locale}.txt`);
10
- };
11
- exports.default = getDictionaryFilepath;
@@ -1,7 +0,0 @@
1
- export { default as createAsyncProxy } from './createAsyncProxy';
2
- export { default as createCacheTimestampComparator } from './createCacheTimestampComparator';
3
- export { default as DiskCache } from './DiskCache';
4
- export { default as downloadDictionary } from './downloadDictionary';
5
- export { default as getDictionaryFilepath } from './getDictionaryFilepath';
6
- export { default as LayeredCache } from './LayeredCache';
7
- export { default as MemoryCache } from './MemoryCache';
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MemoryCache = exports.LayeredCache = exports.getDictionaryFilepath = exports.downloadDictionary = exports.DiskCache = exports.createCacheTimestampComparator = exports.createAsyncProxy = void 0;
7
- var createAsyncProxy_1 = require("./createAsyncProxy");
8
- Object.defineProperty(exports, "createAsyncProxy", { enumerable: true, get: function () { return __importDefault(createAsyncProxy_1).default; } });
9
- var createCacheTimestampComparator_1 = require("./createCacheTimestampComparator");
10
- Object.defineProperty(exports, "createCacheTimestampComparator", { enumerable: true, get: function () { return __importDefault(createCacheTimestampComparator_1).default; } });
11
- var DiskCache_1 = require("./DiskCache");
12
- Object.defineProperty(exports, "DiskCache", { enumerable: true, get: function () { return __importDefault(DiskCache_1).default; } });
13
- var downloadDictionary_1 = require("./downloadDictionary");
14
- Object.defineProperty(exports, "downloadDictionary", { enumerable: true, get: function () { return __importDefault(downloadDictionary_1).default; } });
15
- var getDictionaryFilepath_1 = require("./getDictionaryFilepath");
16
- Object.defineProperty(exports, "getDictionaryFilepath", { enumerable: true, get: function () { return __importDefault(getDictionaryFilepath_1).default; } });
17
- var LayeredCache_1 = require("./LayeredCache");
18
- Object.defineProperty(exports, "LayeredCache", { enumerable: true, get: function () { return __importDefault(LayeredCache_1).default; } });
19
- var MemoryCache_1 = require("./MemoryCache");
20
- Object.defineProperty(exports, "MemoryCache", { enumerable: true, get: function () { return __importDefault(MemoryCache_1).default; } });
@@ -1,8 +0,0 @@
1
- interface Cache<Key extends string, Value> {
2
- get(key: Key): Promise<Value | undefined>;
3
- getLastModifiedTimestamp(key: Key): number | undefined;
4
- has(key: Key): boolean;
5
- isStale(key: Key): boolean | undefined;
6
- set(key: Key, value: Value): Promise<void>;
7
- }
8
- export default Cache;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export { default as Cache } from './Cache';
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });