scrabble-solver 2.13.2 → 2.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.
- package/.github/workflows/build.yml +3 -4
- package/.github/workflows/eslint.yml +1 -1
- package/.github/workflows/test.yml +1 -2
- package/.nx/cache/file-map.json +2610 -0
- package/.nx/cache/lockfile.hash +1 -0
- package/.nx/cache/nx_files.nxt +0 -0
- package/.nx/cache/parsed-lock-file.json +32593 -0
- package/.nx/cache/project-graph.json +32416 -0
- package/README.md +7 -7
- package/lerna.json +1 -1
- package/package.json +36 -29
- package/packages/configs/package.json +4 -5
- package/packages/constants/package.json +2 -3
- package/packages/dictionaries/package-lock.json +2 -2
- package/packages/dictionaries/package.json +5 -6
- package/packages/logger/package-lock.json +15 -7
- package/packages/logger/package.json +3 -4
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +16 -16
- package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
- package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
- package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/next-minimal-server.js.nft.json +1 -0
- package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/prerender-manifest.js +1 -0
- package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
- package/packages/scrabble-solver/.next/required-server-files.json +1 -1
- package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
- package/packages/scrabble-solver/.next/server/InjectManifest.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/chunks/28.js +1 -0
- package/packages/scrabble-solver/.next/server/chunks/331.js +6 -0
- package/packages/scrabble-solver/.next/server/chunks/577.js +1 -0
- package/packages/scrabble-solver/.next/server/chunks/911.js +1 -1083
- package/packages/scrabble-solver/.next/server/chunks/977.js +1 -0
- package/packages/scrabble-solver/.next/server/functions-config-manifest.json +1 -0
- package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/next-font-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/next-font-manifest.json +1 -6
- package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/_app.js +1 -380
- package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/_document.js +1 -212
- package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/_error.js +1 -166
- package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +2 -836
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +1 -192
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1121
- package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -213
- package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/visit.js +1 -131
- package/packages/scrabble-solver/.next/server/pages/api/visit.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.js +1 -2088
- package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
- package/packages/scrabble-solver/.next/server/pages-manifest.json +1 -12
- package/packages/scrabble-solver/.next/server/webpack-api-runtime.js +1 -172
- package/packages/scrabble-solver/.next/server/webpack-runtime.js +1 -229
- package/packages/scrabble-solver/.next/static/chunks/framework-1728d40275bc359a.js +49 -0
- package/packages/scrabble-solver/.next/static/chunks/main-5fb7abbfc135de15.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/404-b6e238bb4117d451.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/_app-b95404c40a0092e6.js +17 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/_error-db043fa3544f8809.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/index-59d569ef79bc2580.js +1 -0
- package/packages/scrabble-solver/.next/static/css/8fa2fb99b90e109e.css +1 -0
- package/packages/scrabble-solver/.next/static/css/c80ebc6fd13311f1.css +2 -0
- package/packages/scrabble-solver/.next/static/jyVoCYlAT5PMzOeavr5AX/_buildManifest.js +1 -0
- package/packages/scrabble-solver/.next/trace +44 -51
- package/packages/scrabble-solver/package-lock.json +754 -524
- package/packages/scrabble-solver/package.json +30 -31
- package/packages/scrabble-solver/public/service-worker.js +2 -0
- package/packages/scrabble-solver/public/service-worker.js.map +1 -0
- package/packages/scrabble-solver/src/state/slices/boardSlice.ts +4 -4
- package/packages/scrabble-solver/src/state/store.ts +1 -1
- package/packages/solver/package-lock.json +2 -2
- package/packages/solver/package.json +6 -7
- package/packages/types/package.json +3 -4
- package/packages/word-definitions/package-lock.json +10 -10
- package/packages/word-definitions/package.json +5 -5
- package/packages/word-lists/package-lock.json +22 -22
- package/packages/word-lists/package.json +8 -9
- package/tsconfig.json +1 -1
- package/packages/configs/dictionaries/build/Dictionaries.d.ts +0 -13
- package/packages/configs/dictionaries/build/Dictionaries.js +0 -46
- package/packages/configs/dictionaries/build/constants/index.d.ts +0 -3
- package/packages/configs/dictionaries/build/constants/index.js +0 -11
- package/packages/configs/dictionaries/build/index.d.ts +0 -3
- package/packages/configs/dictionaries/build/index.js +0 -23
- package/packages/configs/dictionaries/build/lib/DiskCache.d.ts +0 -11
- package/packages/configs/dictionaries/build/lib/DiskCache.js +0 -48
- package/packages/configs/dictionaries/build/lib/LayeredCache.d.ts +0 -13
- package/packages/configs/dictionaries/build/lib/LayeredCache.js +0 -55
- package/packages/configs/dictionaries/build/lib/MemoryCache.d.ts +0 -13
- package/packages/configs/dictionaries/build/lib/MemoryCache.js +0 -32
- package/packages/configs/dictionaries/build/lib/createAsyncProxy.d.ts +0 -3
- package/packages/configs/dictionaries/build/lib/createAsyncProxy.js +0 -18
- package/packages/configs/dictionaries/build/lib/createCacheTimestampComparator.d.ts +0 -5
- package/packages/configs/dictionaries/build/lib/createCacheTimestampComparator.js +0 -19
- package/packages/configs/dictionaries/build/lib/downloadDictionary.d.ts +0 -4
- package/packages/configs/dictionaries/build/lib/downloadDictionary.js +0 -16
- package/packages/configs/dictionaries/build/lib/getDictionaryFilepath.d.ts +0 -3
- package/packages/configs/dictionaries/build/lib/getDictionaryFilepath.js +0 -11
- package/packages/configs/dictionaries/build/lib/index.d.ts +0 -7
- package/packages/configs/dictionaries/build/lib/index.js +0 -20
- package/packages/configs/dictionaries/build/types/Cache.d.ts +0 -8
- package/packages/configs/dictionaries/build/types/Cache.js +0 -2
- package/packages/configs/dictionaries/build/types/index.d.ts +0 -1
- package/packages/configs/dictionaries/build/types/index.js +0 -2
- package/packages/scrabble-solver/.next/cache/next-server.js.nft.json +0 -1
- package/packages/scrabble-solver/.next/server/chunks/210.js +0 -109
- package/packages/scrabble-solver/.next/server/chunks/277.js +0 -11942
- package/packages/scrabble-solver/.next/server/chunks/44.js +0 -1838
- package/packages/scrabble-solver/.next/server/chunks/50.js +0 -12119
- package/packages/scrabble-solver/.next/server/chunks/636.js +0 -286
- package/packages/scrabble-solver/.next/server/chunks/675.js +0 -572
- package/packages/scrabble-solver/.next/server/chunks/859.js +0 -835
- package/packages/scrabble-solver/.next/server/chunks/865.js +0 -20424
- package/packages/scrabble-solver/.next/server/chunks/907.js +0 -42530
- package/packages/scrabble-solver/.next/server/chunks/987.js +0 -91
- package/packages/scrabble-solver/.next/static/16S6EJJ0_LRmtRPwnUIw5/_buildManifest.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/framework-2c29dc3cd933590b.js +0 -49
- package/packages/scrabble-solver/.next/static/chunks/main-4dcb7f9b52833aba.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/404-b4b5ce15153d4825.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/_app-122dc8ecfa0220d5.js +0 -32
- package/packages/scrabble-solver/.next/static/chunks/pages/_error-54de1933a164a1ff.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/index-f56eaa969a831c70.js +0 -1
- package/packages/scrabble-solver/.next/static/css/4e8b47fe382a8a8f.css +0 -2
- package/packages/scrabble-solver/.next/static/css/cfae5256f1689f57.css +0 -1
- /package/packages/scrabble-solver/.next/static/{16S6EJJ0_LRmtRPwnUIw5 → jyVoCYlAT5PMzOeavr5AX}/_ssgManifest.js +0 -0
|
@@ -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,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,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 +0,0 @@
|
|
|
1
|
-
export { default as Cache } from './Cache';
|