@candlerip/shared 0.0.83 → 0.0.85
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/cache/common/cache-key/cache-key/configs.js +4 -0
- package/cache/common/cache-key/cache-key/domains.d.ts +4 -0
- package/cache/common/cache-key/cache-key/index.d.ts +3 -0
- package/cache/common/cache-key/cache-key/index.js +3 -0
- package/cache/common/cache-key/{type-guards.d.ts → cache-key/type-guards.d.ts} +1 -1
- package/cache/common/cache-key/{type-guards.js → cache-key/type-guards.js} +1 -1
- package/cache/common/cache-key/{configs/country-dictionary-cache-keys.d.ts → country-dictionary-cache-key/configs.d.ts} +1 -1
- package/cache/common/cache-key/country-dictionary-cache-key/index.d.ts +2 -0
- package/cache/common/cache-key/country-dictionary-cache-key/index.js +2 -0
- package/cache/common/cache-key/index.d.ts +4 -3
- package/cache/common/cache-key/index.js +4 -3
- package/cache/common/cache-key/page-dictionary-cache-key/index.d.ts +2 -0
- package/cache/common/cache-key/page-dictionary-cache-key/index.js +2 -0
- package/cache/common/cache-key/page-server-data-cache-key/domains.d.ts +3 -0
- package/cache/common/cache-key/page-server-data-cache-key/index.d.ts +3 -0
- package/cache/common/cache-key/page-server-data-cache-key/index.js +3 -0
- package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/configs.d.ts +1 -0
- package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/configs.js +3 -0
- package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/domains.d.ts +2 -0
- package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/domains.js +1 -0
- package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/index.d.ts +2 -0
- package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/index.js +2 -0
- package/cache/redis/domains.d.ts +8 -7
- package/database/aggregate/translation/utils/compose-get-translations-as-dictionary-aggregates/index.js +4 -2
- package/package.json +1 -1
- package/cache/common/cache-key/configs/cache-keys.js +0 -4
- package/cache/common/cache-key/configs/index.d.ts +0 -4
- package/cache/common/cache-key/configs/index.js +0 -4
- package/cache/common/cache-key/domains/cache-key.d.ts +0 -4
- package/cache/common/cache-key/domains/index.d.ts +0 -4
- package/cache/common/cache-key/domains/index.js +0 -4
- package/cache/common/cache-key/domains/page-server-data-cache-key.d.ts +0 -2
- /package/cache/common/cache-key/{configs/cache-keys.d.ts → cache-key/configs.d.ts} +0 -0
- /package/cache/common/cache-key/{domains/cache-key.js → cache-key/domains.js} +0 -0
- /package/cache/common/cache-key/{configs/country-dictionary-cache-keys.js → country-dictionary-cache-key/configs.js} +0 -0
- /package/cache/common/cache-key/{domains/country-dictionary-cache-key.d.ts → country-dictionary-cache-key/domains.d.ts} +0 -0
- /package/cache/common/cache-key/{domains/country-dictionary-cache-key.js → country-dictionary-cache-key/domains.js} +0 -0
- /package/cache/common/cache-key/{configs/page-dictionary-cache-keys.d.ts → page-dictionary-cache-key/configs.d.ts} +0 -0
- /package/cache/common/cache-key/{configs/page-dictionary-cache-keys.js → page-dictionary-cache-key/configs.js} +0 -0
- /package/cache/common/cache-key/{domains/page-dictionary-cache-key.d.ts → page-dictionary-cache-key/domains.d.ts} +0 -0
- /package/cache/common/cache-key/{domains/page-dictionary-cache-key.js → page-dictionary-cache-key/domains.js} +0 -0
- /package/cache/common/cache-key/{configs/page-server-data-cache-keys.d.ts → page-server-data-cache-key/configs.d.ts} +0 -0
- /package/cache/common/cache-key/{configs/page-server-data-cache-keys.js → page-server-data-cache-key/configs.js} +0 -0
- /package/cache/common/cache-key/{domains/page-server-data-cache-key.js → page-server-data-cache-key/domains.js} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { COUNTRY_DICTIONARY_CACHE_KEYS } from '../country-dictionary-cache-key/configs.js';
|
|
2
|
+
import { PAGE_DICTIONARY_CACHE_KEYS } from '../page-dictionary-cache-key/configs.js';
|
|
3
|
+
import { PAGE_SERVER_DATA_CACHE_KEYS } from '../page-server-data-cache-key/configs.js';
|
|
4
|
+
export const CACHE_KEYS = [...COUNTRY_DICTIONARY_CACHE_KEYS, ...PAGE_DICTIONARY_CACHE_KEYS, ...PAGE_SERVER_DATA_CACHE_KEYS];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CountryDictionaryCacheKey } from '../country-dictionary-cache-key/domains.js';
|
|
2
|
+
import { PageDictionaryCacheKey } from '../page-dictionary-cache-key/domains.js';
|
|
3
|
+
import { PageServerDataCacheKey } from '../page-server-data-cache-key/domains.js';
|
|
4
|
+
export type CacheKey = CountryDictionaryCacheKey | PageDictionaryCacheKey | PageServerDataCacheKey;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CacheKey } from './domains
|
|
1
|
+
import { CacheKey } from './domains.js';
|
|
2
2
|
export declare const isCacheKey: (data?: unknown) => data is CacheKey;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CACHE_KEYS } from './configs
|
|
1
|
+
import { CACHE_KEYS } from './configs.js';
|
|
2
2
|
export const isCacheKey = (data) => CACHE_KEYS.some((it) => data === it);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CountryDictionaryCacheKey } from '
|
|
1
|
+
import { CountryDictionaryCacheKey } from './domains.js';
|
|
2
2
|
export declare const COUNTRY_DICTIONARY_CACHE_KEYS: CountryDictionaryCacheKey[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './cache-key/index.js';
|
|
2
|
+
export * from './country-dictionary-cache-key/index.js';
|
|
3
|
+
export * from './page-dictionary-cache-key/index.js';
|
|
4
|
+
export * from './page-server-data-cache-key/index.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './cache-key/index.js';
|
|
2
|
+
export * from './country-dictionary-cache-key/index.js';
|
|
3
|
+
export * from './page-dictionary-cache-key/index.js';
|
|
4
|
+
export * from './page-server-data-cache-key/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PAGE_SERVER_DATA_CACHE_KEY_PAGES: readonly ["candles-page", "home-page", "persons-page", "persons-map-page"];
|
package/cache/common/cache-key/page-server-data-cache-key/page-server-data-cache-key-page/domains.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/cache/redis/domains.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { CandlesPageServerData, CountryDictionary, Dictionary, HomePageServerData, Language, PersonsMapPageServerData, PersonsPageServerData } from '../../common/index.js';
|
|
2
2
|
import { CountryDictionaryCacheKey, PageDictionaryCacheKey } from '../common/index.js';
|
|
3
|
+
type PageServerDataMap = {
|
|
4
|
+
'candles-page': CandlesPageServerData;
|
|
5
|
+
'home-page': HomePageServerData;
|
|
6
|
+
'persons-page': PersonsPageServerData;
|
|
7
|
+
'persons-map-page': PersonsMapPageServerData;
|
|
8
|
+
};
|
|
3
9
|
export type Cache = {
|
|
4
10
|
[key in PageDictionaryCacheKey]: Dictionary;
|
|
5
11
|
} & {
|
|
6
12
|
[key in CountryDictionaryCacheKey]: CountryDictionary;
|
|
7
13
|
} & {
|
|
8
|
-
[key in
|
|
9
|
-
} & {
|
|
10
|
-
[key in `home-page-server-data-${Language}`]: HomePageServerData;
|
|
11
|
-
} & {
|
|
12
|
-
[key in `persons-page-server-data-${Language}`]: PersonsPageServerData;
|
|
13
|
-
} & {
|
|
14
|
-
[key in `persons-map-page-server-data-${Language}`]: PersonsMapPageServerData;
|
|
14
|
+
[key in keyof PageServerDataMap as `${key}-server-data-${Language}`]: PageServerDataMap[key];
|
|
15
15
|
};
|
|
16
|
+
export {};
|
|
@@ -13,7 +13,9 @@ export const composeGetTranslationsAsDictionaryAggregates = ({ codes, language }
|
|
|
13
13
|
{
|
|
14
14
|
$project: {
|
|
15
15
|
code: 1,
|
|
16
|
-
|
|
16
|
+
translation: {
|
|
17
|
+
[language]: 1,
|
|
18
|
+
},
|
|
17
19
|
},
|
|
18
20
|
},
|
|
19
21
|
{
|
|
@@ -22,7 +24,7 @@ export const composeGetTranslationsAsDictionaryAggregates = ({ codes, language }
|
|
|
22
24
|
root: {
|
|
23
25
|
$push: {
|
|
24
26
|
k: '$code',
|
|
25
|
-
v:
|
|
27
|
+
v: `$translation.${language}`,
|
|
26
28
|
},
|
|
27
29
|
},
|
|
28
30
|
},
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { COUNTRY_DICTIONARY_CACHE_KEYS } from './country-dictionary-cache-keys.js';
|
|
2
|
-
import { PAGE_DICTIONARY_CACHE_KEYS } from './page-dictionary-cache-keys.js';
|
|
3
|
-
import { PAGE_SERVER_DATA_CACHE_KEYS } from './page-server-data-cache-keys.js';
|
|
4
|
-
export const CACHE_KEYS = [...COUNTRY_DICTIONARY_CACHE_KEYS, ...PAGE_DICTIONARY_CACHE_KEYS, ...PAGE_SERVER_DATA_CACHE_KEYS];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CountryDictionaryCacheKey } from './country-dictionary-cache-key.js';
|
|
2
|
-
import { PageDictionaryCacheKey } from './page-dictionary-cache-key.js';
|
|
3
|
-
import { PageServerDataCacheKey } from './page-server-data-cache-key.js';
|
|
4
|
-
export type CacheKey = CountryDictionaryCacheKey | PageDictionaryCacheKey | PageServerDataCacheKey;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|