@tramvai/module-cache-warmup 1.55.5 → 1.58.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.
Files changed (2) hide show
  1. package/README.md +13 -10
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Cache warmup
2
2
 
3
- Модуль реализующий "прогрев" кэшей при старте приложения.
3
+ Module to execute warmup of the cache when app starts.
4
4
 
5
- ## Как подключить?
5
+ ## Installation
6
6
 
7
- По умолчанию модуль уже подключается в `@tramvai/module-server` и при его использовании дополнительных действий не требуется.
7
+ By default, the module is already included in `@tramvai/module-server` and no additional actions are needed.
8
8
 
9
9
  ```tsx
10
10
  import { createApp } from '@tramvai/core';
@@ -15,11 +15,16 @@ createApp({
15
15
  });
16
16
  ```
17
17
 
18
- ## Что делает?
18
+ ## Explanation
19
19
 
20
- При старте приложения с запрашивает у `bundleInfo` список урлов приложения. Затем шлет по `2` запроса на каждый из урлов, но не более `2` запросов одновременно.
20
+ > Module is executed only when `NODE_ENV === production`.
21
21
 
22
- `2` запроса нужны для того, чтобы симулировать запрос с десктопа и мобильного устройства. `User-Agent`ы, которые использует модуль:
22
+ 1. When app starts the module will request list of app urls from papi-route `bundleInfo`.
23
+ 2. For every url from the response it sends `2` requests: one for mobile and one for desktop device. But only `2` requests are running simultaneously in total.
24
+
25
+ ### User-agent
26
+
27
+ In order to emulate mobile or desktop device next user-agent strings are used:
23
28
 
24
29
  ```js
25
30
  [
@@ -30,8 +35,6 @@ createApp({
30
35
  ];
31
36
  ```
32
37
 
33
- Модуль выполняется только при `NODE_ENV === production`.
34
-
35
- ## Отладка
38
+ ## Debug
36
39
 
37
- Модуль использует логгер с идентификатором `cache-warmup`
40
+ This module logs with id `cache-warmup`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-cache-warmup",
3
- "version": "1.55.5",
3
+ "version": "1.58.1",
4
4
  "description": "tramvai cache warmup module",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -25,10 +25,10 @@
25
25
  "@tinkoff/url": "0.7.37"
26
26
  },
27
27
  "peerDependencies": {
28
- "@tramvai/core": "1.55.5",
29
- "@tramvai/module-common": "1.55.5",
30
- "@tramvai/state": "1.55.5",
31
- "@tramvai/tokens-http-client": "1.55.5",
28
+ "@tramvai/core": "1.58.1",
29
+ "@tramvai/module-common": "1.58.1",
30
+ "@tramvai/state": "1.58.1",
31
+ "@tramvai/tokens-http-client": "1.58.1",
32
32
  "tslib": "^2.0.3"
33
33
  },
34
34
  "module": "lib/server.es.js",