@tramvai/module-progressive-web-app 5.10.0 → 5.14.9
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.
|
@@ -12,11 +12,10 @@ const TramvaiPwaManifestModule = declareModule({
|
|
|
12
12
|
provide: PROXY_CONFIG_TOKEN,
|
|
13
13
|
scope: Scope.SINGLETON,
|
|
14
14
|
useFactory: ({ manifestUrl, swScope, assetsPrefixFactory }) => {
|
|
15
|
-
var _a, _b;
|
|
16
15
|
return {
|
|
17
16
|
context: [manifestUrl],
|
|
18
17
|
// appConfig.assetsPrefix available in 'development' mode
|
|
19
|
-
target:
|
|
18
|
+
target: appConfig.assetsPrefix ?? assetsPrefixFactory() ?? '',
|
|
20
19
|
pathRewrite: (path) => {
|
|
21
20
|
return path.replace(swScope, '/');
|
|
22
21
|
},
|
package/lib/manifest/server.js
CHANGED
|
@@ -16,11 +16,10 @@ const TramvaiPwaManifestModule = core.declareModule({
|
|
|
16
16
|
provide: tokensServer.PROXY_CONFIG_TOKEN,
|
|
17
17
|
scope: core.Scope.SINGLETON,
|
|
18
18
|
useFactory: ({ manifestUrl, swScope, assetsPrefixFactory }) => {
|
|
19
|
-
var _a, _b;
|
|
20
19
|
return {
|
|
21
20
|
context: [manifestUrl],
|
|
22
21
|
// appConfig.assetsPrefix available in 'development' mode
|
|
23
|
-
target:
|
|
22
|
+
target: config.appConfig.assetsPrefix ?? assetsPrefixFactory() ?? '',
|
|
24
23
|
pathRewrite: (path) => {
|
|
25
24
|
return path.replace(swScope, '/');
|
|
26
25
|
},
|
package/lib/meta/server.es.js
CHANGED
|
@@ -29,7 +29,7 @@ const TramvaiPwaMetaModule = declareModule({
|
|
|
29
29
|
provide({
|
|
30
30
|
provide: RENDER_SLOTS,
|
|
31
31
|
useFactory: ({ meta }) => {
|
|
32
|
-
const finalMeta = meta
|
|
32
|
+
const finalMeta = meta ?? {};
|
|
33
33
|
const keys = Object.keys(finalMeta);
|
|
34
34
|
return keys.map((key) => {
|
|
35
35
|
const metaName = metaMap[key];
|
package/lib/meta/server.js
CHANGED
|
@@ -33,7 +33,7 @@ const TramvaiPwaMetaModule = core.declareModule({
|
|
|
33
33
|
core.provide({
|
|
34
34
|
provide: tokensRender.RENDER_SLOTS,
|
|
35
35
|
useFactory: ({ meta }) => {
|
|
36
|
-
const finalMeta = meta
|
|
36
|
+
const finalMeta = meta ?? {};
|
|
37
37
|
const keys = Object.keys(finalMeta);
|
|
38
38
|
return keys.map((key) => {
|
|
39
39
|
const metaName = metaMap[key];
|
package/lib/workbox/server.es.js
CHANGED
|
@@ -40,11 +40,10 @@ const TramvaiPwaWorkboxModule = declareModule({
|
|
|
40
40
|
provide: PROXY_CONFIG_TOKEN,
|
|
41
41
|
scope: Scope.SINGLETON,
|
|
42
42
|
useFactory: ({ swUrl, swScope, assetsPrefixFactory }) => {
|
|
43
|
-
var _a, _b;
|
|
44
43
|
return {
|
|
45
44
|
context: [swUrl, swUrl.replace(/\.js$/, '.modern.js')],
|
|
46
45
|
// appConfig.assetsPrefix available in 'development' mode
|
|
47
|
-
target:
|
|
46
|
+
target: appConfig.assetsPrefix ?? assetsPrefixFactory() ?? '',
|
|
48
47
|
pathRewrite: (path) => {
|
|
49
48
|
return path.replace(swScope, '/');
|
|
50
49
|
},
|
package/lib/workbox/server.js
CHANGED
|
@@ -44,11 +44,10 @@ const TramvaiPwaWorkboxModule = core.declareModule({
|
|
|
44
44
|
provide: tokensServer.PROXY_CONFIG_TOKEN,
|
|
45
45
|
scope: core.Scope.SINGLETON,
|
|
46
46
|
useFactory: ({ swUrl, swScope, assetsPrefixFactory }) => {
|
|
47
|
-
var _a, _b;
|
|
48
47
|
return {
|
|
49
48
|
context: [swUrl, swUrl.replace(/\.js$/, '.modern.js')],
|
|
50
49
|
// appConfig.assetsPrefix available in 'development' mode
|
|
51
|
-
target:
|
|
50
|
+
target: config.appConfig.assetsPrefix ?? assetsPrefixFactory() ?? '',
|
|
52
51
|
pathRewrite: (path) => {
|
|
53
52
|
return path.replace(swScope, '/');
|
|
54
53
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-progressive-web-app",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.14.9",
|
|
4
4
|
"description": "Pwa integration - SW, manifest, icons and meta",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"registry": "https://registry.npmjs.org/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tramvai/tokens-common": "5.
|
|
27
|
-
"@tramvai/tokens-render": "5.
|
|
28
|
-
"@tramvai/tokens-server": "5.
|
|
26
|
+
"@tramvai/tokens-common": "5.14.9",
|
|
27
|
+
"@tramvai/tokens-render": "5.14.9",
|
|
28
|
+
"@tramvai/tokens-server": "5.14.9",
|
|
29
29
|
"workbox-window": "^6.6.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@tramvai/cli": "5.
|
|
34
|
-
"@tramvai/core": "5.
|
|
33
|
+
"@tramvai/cli": "5.14.9",
|
|
34
|
+
"@tramvai/core": "5.14.9",
|
|
35
35
|
"@tinkoff/dippy": "0.11.3",
|
|
36
36
|
"tslib": "^2.4.0"
|
|
37
37
|
}
|