scrabble-solver 2.13.0 → 2.13.1
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/README.md +3 -3
- package/lerna.json +1 -1
- package/package.json +1 -1
- package/packages/configs/build/locales/roRo.js +17 -14
- package/packages/configs/dictionaries/build/Dictionaries.d.ts +13 -0
- package/packages/configs/dictionaries/build/Dictionaries.js +46 -0
- package/packages/configs/dictionaries/build/constants/index.d.ts +3 -0
- package/packages/configs/dictionaries/build/constants/index.js +11 -0
- package/packages/configs/dictionaries/build/index.d.ts +3 -0
- package/packages/configs/dictionaries/build/index.js +23 -0
- package/packages/configs/dictionaries/build/lib/DiskCache.d.ts +11 -0
- package/packages/configs/dictionaries/build/lib/DiskCache.js +48 -0
- package/packages/configs/dictionaries/build/lib/LayeredCache.d.ts +13 -0
- package/packages/configs/dictionaries/build/lib/LayeredCache.js +55 -0
- package/packages/configs/dictionaries/build/lib/MemoryCache.d.ts +13 -0
- package/packages/configs/dictionaries/build/lib/MemoryCache.js +32 -0
- package/packages/configs/dictionaries/build/lib/createAsyncProxy.d.ts +3 -0
- package/packages/configs/dictionaries/build/lib/createAsyncProxy.js +18 -0
- package/packages/configs/dictionaries/build/lib/createCacheTimestampComparator.d.ts +5 -0
- package/packages/configs/dictionaries/build/lib/createCacheTimestampComparator.js +19 -0
- package/packages/configs/dictionaries/build/lib/downloadDictionary.d.ts +4 -0
- package/packages/configs/dictionaries/build/lib/downloadDictionary.js +16 -0
- package/packages/configs/dictionaries/build/lib/getDictionaryFilepath.d.ts +3 -0
- package/packages/configs/dictionaries/build/lib/getDictionaryFilepath.js +11 -0
- package/packages/configs/dictionaries/build/lib/index.d.ts +7 -0
- package/packages/configs/dictionaries/build/lib/index.js +20 -0
- package/packages/configs/dictionaries/build/types/Cache.d.ts +8 -0
- package/packages/configs/dictionaries/build/types/Cache.js +2 -0
- package/packages/configs/dictionaries/build/types/index.d.ts +1 -0
- package/packages/configs/dictionaries/build/types/index.js +2 -0
- package/packages/configs/package.json +3 -3
- package/packages/configs/src/locales/roRo.ts +17 -14
- package/packages/constants/package.json +1 -1
- package/packages/dictionaries/package-lock.json +2 -2
- package/packages/dictionaries/package.json +4 -4
- package/packages/logger/package-lock.json +2 -2
- package/packages/logger/package.json +1 -1
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +3 -3
- package/packages/scrabble-solver/.next/cache/next-server.js.nft.json +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-server.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
- package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
- package/packages/scrabble-solver/.next/server/chunks/277.js +17 -14
- package/packages/scrabble-solver/.next/server/chunks/44.js +22 -27
- package/packages/scrabble-solver/.next/server/chunks/{131.js → 907.js} +924 -2
- package/packages/scrabble-solver/.next/server/chunks/911.js +17 -14
- package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
- 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.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
- 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 -1
- 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 -1
- 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 -1
- package/packages/scrabble-solver/.next/server/pages/api/verify.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.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 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/{_app-9c8edd7786319b76.js → _app-b92880dde164b954.js} +1 -1
- package/packages/scrabble-solver/.next/trace +51 -51
- package/packages/scrabble-solver/package-lock.json +2 -2
- package/packages/scrabble-solver/package.json +8 -8
- package/packages/solver/package-lock.json +2 -2
- package/packages/solver/package.json +5 -5
- package/packages/types/package.json +2 -2
- package/packages/word-definitions/package-lock.json +2 -2
- package/packages/word-definitions/package.json +2 -2
- package/packages/word-lists/build/getEsEsWordList.js +10 -6
- package/packages/word-lists/build/getFrFrWordList.js +5 -5
- package/packages/word-lists/build/getRoRoWordList.js +5 -14
- package/packages/word-lists/package-lock.json +15 -2
- package/packages/word-lists/package.json +4 -2
- package/packages/word-lists/src/getEsEsWordList.ts +7 -6
- package/packages/word-lists/src/getFrFrWordList.ts +2 -6
- package/packages/word-lists/src/getRoRoWordList.ts +6 -16
- /package/packages/scrabble-solver/.next/static/{CltG6_MGtxzoDJ0EuX7kt → RJ5_dKU0dHcryeTVO6SSX}/_buildManifest.js +0 -0
- /package/packages/scrabble-solver/.next/static/{CltG6_MGtxzoDJ0EuX7kt → RJ5_dKU0dHcryeTVO6SSX}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":null,"dataRoute":"/_next/data/
|
|
1
|
+
{"version":4,"routes":{"/":{"initialRevalidateSeconds":false,"srcRoute":null,"dataRoute":"/_next/data/RJ5_dKU0dHcryeTVO6SSX/index.json"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"ccf4f8795679d187e798dceaa4c11f7d","previewModeSigningKey":"960ad9870a2bafbe84738c67fd359ef31fd7d0020361a88a7393c44aba54c794","previewModeEncryptionKey":"2782480b0f2ccd50f451915f6d7bc3bea80c62d99eefa3359cfc2b20afe6c820"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/api/dictionary/[locale]","regex":"^/api/dictionary/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)(?:/)?$"},{"page":"/api/dictionary/[locale]/[word]","regex":"^/api/dictionary/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale","nextParamword":"nextParamword"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)/(?<nextParamword>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/
|
|
1
|
+
{"version":3,"pages404":true,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/api/dictionary/[locale]","regex":"^/api/dictionary/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)(?:/)?$"},{"page":"/api/dictionary/[locale]/[word]","regex":"^/api/dictionary/([^/]+?)/([^/]+?)(?:/)?$","routeKeys":{"nextParamlocale":"nextParamlocale","nextParamword":"nextParamword"},"namedRegex":"^/api/dictionary/(?<nextParamlocale>[^/]+?)/(?<nextParamword>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/RJ5_dKU0dHcryeTVO6SSX/index.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","contentTypeHeader":"text/x-component"},"rewrites":[]}
|
|
@@ -1060,29 +1060,32 @@ const roRo = [
|
|
|
1060
1060
|
new types_1.Config({
|
|
1061
1061
|
...games_1.scrabble,
|
|
1062
1062
|
locale: types_1.Locale.RO_RO,
|
|
1063
|
+
/**
|
|
1064
|
+
* @see https://frsc1.fortunecity.ws/reg6scr.htm#vallit
|
|
1065
|
+
*/
|
|
1063
1066
|
tiles: [
|
|
1064
|
-
{ character: 'a', count:
|
|
1065
|
-
{ character: 'b', count: 2, score:
|
|
1067
|
+
{ character: 'a', count: 11, score: 1 },
|
|
1068
|
+
{ character: 'b', count: 2, score: 9 },
|
|
1066
1069
|
{ character: 'c', count: 5, score: 1 },
|
|
1067
|
-
{ character: 'd', count: 4, score:
|
|
1070
|
+
{ character: 'd', count: 4, score: 2 },
|
|
1068
1071
|
{ character: 'e', count: 9, score: 1 },
|
|
1069
|
-
{ character: 'f', count: 2, score:
|
|
1070
|
-
{ character: 'g', count: 2, score:
|
|
1071
|
-
{ character: 'h', count: 1, score:
|
|
1072
|
-
{ character: 'i', count:
|
|
1072
|
+
{ character: 'f', count: 2, score: 8 },
|
|
1073
|
+
{ character: 'g', count: 2, score: 9 },
|
|
1074
|
+
{ character: 'h', count: 1, score: 10 },
|
|
1075
|
+
{ character: 'i', count: 10, score: 1 },
|
|
1073
1076
|
{ character: 'j', count: 1, score: 10 },
|
|
1074
|
-
{ character: 'l', count:
|
|
1077
|
+
{ character: 'l', count: 4, score: 1 },
|
|
1075
1078
|
{ character: 'm', count: 3, score: 4 },
|
|
1076
1079
|
{ character: 'n', count: 6, score: 1 },
|
|
1077
|
-
{ character: 'o', count: 5, score:
|
|
1080
|
+
{ character: 'o', count: 5, score: 1 },
|
|
1078
1081
|
{ character: 'p', count: 4, score: 2 },
|
|
1079
|
-
{ character: 'r', count:
|
|
1080
|
-
{ character: 's', count:
|
|
1082
|
+
{ character: 'r', count: 7, score: 1 },
|
|
1083
|
+
{ character: 's', count: 5, score: 1 },
|
|
1081
1084
|
{ character: 't', count: 7, score: 1 },
|
|
1082
|
-
{ character: 'u', count:
|
|
1083
|
-
{ character: 'v', count: 2, score:
|
|
1085
|
+
{ character: 'u', count: 6, score: 1 },
|
|
1086
|
+
{ character: 'v', count: 2, score: 8 },
|
|
1084
1087
|
{ character: 'x', count: 1, score: 10 },
|
|
1085
|
-
{ character: 'z', count: 1, score:
|
|
1088
|
+
{ character: 'z', count: 1, score: 10 },
|
|
1086
1089
|
],
|
|
1087
1090
|
}),
|
|
1088
1091
|
];
|
|
@@ -1368,20 +1368,24 @@ exports["default"] = getEnUsWordList;
|
|
|
1368
1368
|
/***/ }),
|
|
1369
1369
|
|
|
1370
1370
|
/***/ 87537:
|
|
1371
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
1371
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1372
1372
|
|
|
1373
1373
|
|
|
1374
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
1375
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1376
|
+
};
|
|
1374
1377
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1375
1378
|
const types_1 = __webpack_require__(46452);
|
|
1379
|
+
const latinize_1 = __importDefault(__webpack_require__(66761));
|
|
1376
1380
|
const lib_1 = __webpack_require__(60337);
|
|
1377
|
-
const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/
|
|
1381
|
+
const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/master/spanish/fise-2.txt';
|
|
1382
|
+
const N_PLACEHOLDER = '---n---';
|
|
1378
1383
|
const getEsEsWordList = async () => {
|
|
1379
1384
|
const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.ES_ES);
|
|
1380
|
-
return words
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
return word.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
1385
|
+
return words
|
|
1386
|
+
.map((word) => word.replaceAll('ñ', N_PLACEHOLDER))
|
|
1387
|
+
.map(latinize_1.default)
|
|
1388
|
+
.map((word) => word.replaceAll(N_PLACEHOLDER, 'ñ'));
|
|
1385
1389
|
};
|
|
1386
1390
|
exports["default"] = getEsEsWordList;
|
|
1387
1391
|
|
|
@@ -1405,20 +1409,20 @@ exports["default"] = getFaIrWordList;
|
|
|
1405
1409
|
/***/ }),
|
|
1406
1410
|
|
|
1407
1411
|
/***/ 27098:
|
|
1408
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
1412
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1409
1413
|
|
|
1410
1414
|
|
|
1415
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
1416
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1417
|
+
};
|
|
1411
1418
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1412
1419
|
const types_1 = __webpack_require__(46452);
|
|
1420
|
+
const latinize_1 = __importDefault(__webpack_require__(66761));
|
|
1413
1421
|
const lib_1 = __webpack_require__(60337);
|
|
1414
1422
|
const FILE_URL = 'https://raw.githubusercontent.com/Thecoolsim/French-Scrabble-ODS8/main/French%20ODS%20dictionary.txt';
|
|
1415
1423
|
const getFrFrWordList = async () => {
|
|
1416
1424
|
const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.FR_FR);
|
|
1417
|
-
return words.map(
|
|
1418
|
-
};
|
|
1419
|
-
const normalizeWord = (word) => {
|
|
1420
|
-
// normalization from https://stackoverflow.com/a/37511463
|
|
1421
|
-
return word.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
1425
|
+
return words.map(latinize_1.default);
|
|
1422
1426
|
};
|
|
1423
1427
|
exports["default"] = getFrFrWordList;
|
|
1424
1428
|
|
|
@@ -1481,22 +1485,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1481
1485
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1482
1486
|
};
|
|
1483
1487
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1484
|
-
const
|
|
1488
|
+
const types_1 = __webpack_require__(46452);
|
|
1489
|
+
const latinize_1 = __importDefault(__webpack_require__(66761));
|
|
1485
1490
|
const lib_1 = __webpack_require__(60337);
|
|
1486
|
-
const FILE_URL = 'https://
|
|
1487
|
-
const FILE_TO_EXTRACT_FROM_ZIP = 'loc-flexiuni-5.0.txt';
|
|
1491
|
+
const FILE_URL = 'https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/master/romanian/loc-5.0.txt';
|
|
1488
1492
|
const getRoRoWordList = async () => {
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1491
|
-
await (0, lib_1.unzip)(zipTempFilename, FILE_TO_EXTRACT_FROM_ZIP, tempFilepath);
|
|
1492
|
-
fs_1.default.unlinkSync(zipTempFilename);
|
|
1493
|
-
const file = fs_1.default.readFileSync(tempFilepath, 'utf-8');
|
|
1494
|
-
fs_1.default.unlinkSync(tempFilepath);
|
|
1495
|
-
const words = (0, lib_1.extractWords)(replaceDiacritics(file.toLocaleString()), 'ro-RO');
|
|
1496
|
-
return words;
|
|
1497
|
-
};
|
|
1498
|
-
const replaceDiacritics = (file) => {
|
|
1499
|
-
return file.replaceAll('ă', 'a').replaceAll('â', 'a').replaceAll('î', 'i').replaceAll('ș', 's').replaceAll('ț', 't');
|
|
1493
|
+
const words = await (0, lib_1.getTxtWordList)(FILE_URL, types_1.Locale.RO_RO);
|
|
1494
|
+
return words.map(latinize_1.default);
|
|
1500
1495
|
};
|
|
1501
1496
|
exports["default"] = getRoRoWordList;
|
|
1502
1497
|
|