@tramvai/cli 2.98.0 → 2.100.0
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/lib/api/start-prod/providers/application.js +2 -3
- package/lib/api/start-prod/providers/application.js.map +1 -1
- package/lib/builder/webpack/tokens.d.ts +3 -0
- package/lib/commands/analyze/command.js +7 -1
- package/lib/commands/analyze/command.js.map +1 -1
- package/lib/commands/build/command.js +2 -0
- package/lib/commands/build/command.js.map +1 -1
- package/lib/commands/start/command.js +2 -0
- package/lib/commands/start/command.js.map +1 -1
- package/lib/commands/start-prod/command.js +7 -1
- package/lib/commands/start-prod/command.js.map +1 -1
- package/lib/commands/static/application.js +1 -1
- package/lib/commands/static/application.js.map +1 -1
- package/lib/config/configManager.d.ts +1 -0
- package/lib/config/configManager.js +23 -1
- package/lib/config/configManager.js.map +1 -1
- package/lib/di/tokens/config.d.ts +1 -0
- package/lib/library/webpack/application/client/common.js +2 -0
- package/lib/library/webpack/application/client/common.js.map +1 -1
- package/lib/library/webpack/application/server/common.js +2 -0
- package/lib/library/webpack/application/server/common.js.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.d.ts +4 -0
- package/lib/library/webpack/blocks/pwa/client.js +62 -0
- package/lib/library/webpack/blocks/pwa/client.js.map +1 -0
- package/lib/library/webpack/blocks/pwa/server.d.ts +4 -0
- package/lib/library/webpack/blocks/pwa/server.js +9 -0
- package/lib/library/webpack/blocks/pwa/server.js.map +1 -0
- package/lib/library/webpack/blocks/pwa/shared.d.ts +4 -0
- package/lib/library/webpack/blocks/pwa/shared.js +18 -0
- package/lib/library/webpack/blocks/pwa/shared.js.map +1 -0
- package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts +9 -0
- package/lib/library/webpack/plugins/PwaIconsPlugin.js +78 -0
- package/lib/library/webpack/plugins/PwaIconsPlugin.js.map +1 -0
- package/lib/library/webpack/plugins/WebManifestPlugin.d.ts +8 -0
- package/lib/library/webpack/plugins/WebManifestPlugin.js +28 -0
- package/lib/library/webpack/plugins/WebManifestPlugin.js.map +1 -0
- package/lib/schema/autogeneratedSchema.json +183 -0
- package/lib/typings/configEntry/application.d.ts +54 -0
- package/lib/typings/public.d.ts +1 -0
- package/lib/typings/public.js +2 -0
- package/lib/typings/public.js.map +1 -1
- package/lib/typings/pwa/index.d.ts +59 -0
- package/lib/typings/pwa/index.js +3 -0
- package/lib/typings/pwa/index.js.map +1 -0
- package/lib/validators/commands/checkPwaDependencies.d.ts +2 -0
- package/lib/validators/commands/checkPwaDependencies.js +18 -0
- package/lib/validators/commands/checkPwaDependencies.js.map +1 -0
- package/package.json +14 -10
- package/schema.json +183 -0
- package/src/api/start-prod/providers/application.ts +3 -4
- package/src/commands/analyze/command.ts +7 -1
- package/src/commands/build/command.ts +2 -0
- package/src/commands/start/command.ts +2 -0
- package/src/commands/start-prod/command.ts +7 -1
- package/src/commands/static/application.ts +1 -4
- package/src/config/configManager.ts +37 -0
- package/src/library/webpack/application/client/common.ts +2 -0
- package/src/library/webpack/application/server/common.ts +2 -0
- package/src/library/webpack/blocks/pwa/client.ts +83 -0
- package/src/library/webpack/blocks/pwa/server.ts +9 -0
- package/src/library/webpack/blocks/pwa/shared.ts +26 -0
- package/src/library/webpack/plugins/PwaIconsPlugin.ts +87 -0
- package/src/library/webpack/plugins/WebManifestPlugin.ts +32 -0
- package/src/models/config.spec.ts +54 -0
- package/src/schema/autogeneratedSchema.json +183 -0
- package/src/schema/tramvai.spec.ts +27 -0
- package/src/typings/configEntry/application.ts +55 -0
- package/src/typings/public.ts +2 -0
- package/src/typings/pwa/index.ts +64 -0
- package/src/validators/commands/checkPwaDependencies.ts +17 -0
- package/lib/utils/webpackBuild.d.ts +0 -5
- package/lib/utils/webpackBuild.js +0 -32
- package/lib/utils/webpackBuild.js.map +0 -1
- package/src/utils/webpackBuild.ts +0 -38
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebManifestPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pluginName = 'WebManifestPlugin';
|
|
6
|
+
class WebManifestPlugin {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
this.options = options;
|
|
9
|
+
this.options = options;
|
|
10
|
+
}
|
|
11
|
+
apply(compiler) {
|
|
12
|
+
const { webpack } = compiler;
|
|
13
|
+
const { Compilation } = webpack;
|
|
14
|
+
const { RawSource } = webpack.sources;
|
|
15
|
+
const _a = this.options, { dest, enabled } = _a, content = tslib_1.__rest(_a, ["dest", "enabled"]);
|
|
16
|
+
compiler.hooks.thisCompilation.tap(pluginName, (compilation) => {
|
|
17
|
+
compilation.hooks.processAssets.tap({
|
|
18
|
+
name: pluginName,
|
|
19
|
+
stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,
|
|
20
|
+
}, () => {
|
|
21
|
+
const manifestFilename = dest;
|
|
22
|
+
compilation.emitAsset(manifestFilename, new RawSource(JSON.stringify(content)));
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.WebManifestPlugin = WebManifestPlugin;
|
|
28
|
+
//# sourceMappingURL=WebManifestPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebManifestPlugin.js","sourceRoot":"","sources":["../../../../src/library/webpack/plugins/WebManifestPlugin.ts"],"names":[],"mappings":";;;;AAIA,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAEvC,MAAa,iBAAiB;IAC5B,YAAoB,OAA2B;QAA3B,YAAO,GAAP,OAAO,CAAoB;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAkB;QACtB,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;QAC7B,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;QAChC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;QACtC,MAAM,KAAgC,IAAI,CAAC,OAAO,EAA5C,EAAE,IAAI,EAAE,OAAO,OAA6B,EAAxB,OAAO,sBAA3B,mBAA6B,CAAe,CAAC;QAEnD,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE,EAAE;YAC7D,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CACjC;gBACE,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,WAAW,CAAC,8BAA8B;aAClD,EACD,GAAG,EAAE;gBACH,MAAM,gBAAgB,GAAG,IAAI,CAAC;gBAE9B,WAAW,CAAC,SAAS,CAAC,gBAAgB,EAAE,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAClF,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,8CAyBC"}
|
|
@@ -525,6 +525,189 @@
|
|
|
525
525
|
],
|
|
526
526
|
"type": "string"
|
|
527
527
|
},
|
|
528
|
+
"pwa": {
|
|
529
|
+
"title": "PWA configuration (works with `TramvaiPwaModule` from `@tramvai/module-progressive-web-app` library)",
|
|
530
|
+
"default": {},
|
|
531
|
+
"type": "object",
|
|
532
|
+
"properties": {
|
|
533
|
+
"sw": {
|
|
534
|
+
"title": "Service-Worker configuration",
|
|
535
|
+
"default": {},
|
|
536
|
+
"type": "object",
|
|
537
|
+
"properties": {
|
|
538
|
+
"src": {
|
|
539
|
+
"title": "Path to sw.ts file (relative to \"root\" directory)",
|
|
540
|
+
"default": "sw.ts",
|
|
541
|
+
"type": "string"
|
|
542
|
+
},
|
|
543
|
+
"dest": {
|
|
544
|
+
"title": "Name of generated SW file (will be placed in \"output.client\" directory)",
|
|
545
|
+
"default": "sw.js",
|
|
546
|
+
"type": "string"
|
|
547
|
+
},
|
|
548
|
+
"scope": {
|
|
549
|
+
"title": "Scope of SW (see https://developers.google.com/web/ilt/pwa/introduction-to-service-worker#registration_and_scope)",
|
|
550
|
+
"default": "/",
|
|
551
|
+
"type": "string"
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
"additionalProperties": false
|
|
555
|
+
},
|
|
556
|
+
"workbox": {
|
|
557
|
+
"title": "Workbox configuration",
|
|
558
|
+
"default": {},
|
|
559
|
+
"type": "object",
|
|
560
|
+
"properties": {
|
|
561
|
+
"enabled": {
|
|
562
|
+
"cli_overridable": "",
|
|
563
|
+
"title": "Connect `InjectManifest` from `workbox-webpack-plugin` library",
|
|
564
|
+
"default": false,
|
|
565
|
+
"anyOf": [
|
|
566
|
+
{
|
|
567
|
+
"type": "object",
|
|
568
|
+
"properties": {
|
|
569
|
+
"development": {
|
|
570
|
+
"type": "boolean"
|
|
571
|
+
},
|
|
572
|
+
"production": {
|
|
573
|
+
"type": "boolean"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"additionalProperties": false
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"type": "boolean"
|
|
580
|
+
}
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"additionalProperties": false
|
|
585
|
+
},
|
|
586
|
+
"webmanifest": {
|
|
587
|
+
"title": "WebManifest content (manifest.json or webmanifest will be generated based on this options)",
|
|
588
|
+
"default": {},
|
|
589
|
+
"type": "object",
|
|
590
|
+
"properties": {
|
|
591
|
+
"enabled": {
|
|
592
|
+
"title": "Create webmanifest file",
|
|
593
|
+
"default": false,
|
|
594
|
+
"type": "boolean"
|
|
595
|
+
},
|
|
596
|
+
"dest": {
|
|
597
|
+
"title": "Name of generated manifest file (will be placed in \"output.client\" directory). You can use `[hash]` placeholder for manifest cache busting",
|
|
598
|
+
"default": "/manifest.[hash].json",
|
|
599
|
+
"type": "string"
|
|
600
|
+
},
|
|
601
|
+
"scope": {
|
|
602
|
+
"title": "prefer to use \"pwa.sw.scope\" instead, this field will be generated automatically",
|
|
603
|
+
"type": "string"
|
|
604
|
+
},
|
|
605
|
+
"name": {
|
|
606
|
+
"type": "string"
|
|
607
|
+
},
|
|
608
|
+
"short_name": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
},
|
|
611
|
+
"description": {
|
|
612
|
+
"type": "string"
|
|
613
|
+
},
|
|
614
|
+
"start_url": {
|
|
615
|
+
"type": "string"
|
|
616
|
+
},
|
|
617
|
+
"display": {
|
|
618
|
+
"type": "string"
|
|
619
|
+
},
|
|
620
|
+
"theme_color": {
|
|
621
|
+
"title": "prefer to use \"pwa.meta.themeColor\" instead, this field will be generated automatically",
|
|
622
|
+
"type": "string"
|
|
623
|
+
},
|
|
624
|
+
"background_color": {
|
|
625
|
+
"type": "string"
|
|
626
|
+
},
|
|
627
|
+
"icons": {
|
|
628
|
+
"title": "prefer to use \"pwa.icon\" instead, this field will be generated automatically",
|
|
629
|
+
"type": "array",
|
|
630
|
+
"items": {
|
|
631
|
+
"type": "object",
|
|
632
|
+
"properties": {
|
|
633
|
+
"src": {
|
|
634
|
+
"type": "string"
|
|
635
|
+
},
|
|
636
|
+
"sizes": {
|
|
637
|
+
"type": "string"
|
|
638
|
+
},
|
|
639
|
+
"type": {
|
|
640
|
+
"type": "string"
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
"additionalProperties": false
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
"additionalProperties": false
|
|
648
|
+
},
|
|
649
|
+
"icon": {
|
|
650
|
+
"title": "PWA icons options",
|
|
651
|
+
"default": {},
|
|
652
|
+
"type": "object",
|
|
653
|
+
"properties": {
|
|
654
|
+
"src": {
|
|
655
|
+
"title": "Path to icon file (relative to \"root\" directory)",
|
|
656
|
+
"type": "string"
|
|
657
|
+
},
|
|
658
|
+
"dest": {
|
|
659
|
+
"title": "Folder for generated icons (will be placed in \"output.client\" directory)",
|
|
660
|
+
"default": "pwa-icons",
|
|
661
|
+
"type": "string"
|
|
662
|
+
},
|
|
663
|
+
"sizes": {
|
|
664
|
+
"title": "Icon sizes",
|
|
665
|
+
"default": [
|
|
666
|
+
36,
|
|
667
|
+
48,
|
|
668
|
+
72,
|
|
669
|
+
96,
|
|
670
|
+
144,
|
|
671
|
+
192,
|
|
672
|
+
512
|
|
673
|
+
],
|
|
674
|
+
"type": "array",
|
|
675
|
+
"items": {
|
|
676
|
+
"type": "number"
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
"additionalProperties": false
|
|
681
|
+
},
|
|
682
|
+
"meta": {
|
|
683
|
+
"title": "PWA meta options",
|
|
684
|
+
"default": {},
|
|
685
|
+
"type": "object",
|
|
686
|
+
"properties": {
|
|
687
|
+
"viewport": {
|
|
688
|
+
"type": "string"
|
|
689
|
+
},
|
|
690
|
+
"themeColor": {
|
|
691
|
+
"type": "string"
|
|
692
|
+
},
|
|
693
|
+
"mobileApp": {
|
|
694
|
+
"type": "string"
|
|
695
|
+
},
|
|
696
|
+
"mobileAppIOS": {
|
|
697
|
+
"type": "string"
|
|
698
|
+
},
|
|
699
|
+
"appleTitle": {
|
|
700
|
+
"type": "string"
|
|
701
|
+
},
|
|
702
|
+
"appleStatusBarStyle": {
|
|
703
|
+
"type": "string"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"additionalProperties": false
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
"additionalProperties": false
|
|
710
|
+
},
|
|
528
711
|
"webpack": {
|
|
529
712
|
"title": "experiments configuration for [webpack](https://webpack.js.org/configuration/experiments/)",
|
|
530
713
|
"default": {},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
|
|
2
|
+
import type { PwaIconOptions, PwaMetaOptions, WebManifestOptions } from '../pwa';
|
|
2
3
|
import type { CliConfigEntry, Experiments } from './cli';
|
|
3
4
|
import type { OverridableOption } from './common';
|
|
4
5
|
export interface CheckAsyncTsConfig {
|
|
@@ -19,6 +20,59 @@ export interface ApplicationExperiments extends Experiments {
|
|
|
19
20
|
* @default "process"
|
|
20
21
|
*/
|
|
21
22
|
serverRunner?: 'process' | 'thread';
|
|
23
|
+
/**
|
|
24
|
+
* @title PWA configuration (works with `TramvaiPwaModule` from `@tramvai/module-progressive-web-app` library)
|
|
25
|
+
* @default {}
|
|
26
|
+
*/
|
|
27
|
+
pwa: {
|
|
28
|
+
/**
|
|
29
|
+
* @title Service-Worker configuration
|
|
30
|
+
* @default {}
|
|
31
|
+
*/
|
|
32
|
+
sw?: {
|
|
33
|
+
/**
|
|
34
|
+
* @title Path to sw.ts file (relative to "root" directory)
|
|
35
|
+
* @default "sw.ts"
|
|
36
|
+
*/
|
|
37
|
+
src?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @title Name of generated SW file (will be placed in "output.client" directory)
|
|
40
|
+
* @default "sw.js"
|
|
41
|
+
*/
|
|
42
|
+
dest?: string;
|
|
43
|
+
/**
|
|
44
|
+
* @title Scope of SW (see https://developers.google.com/web/ilt/pwa/introduction-to-service-worker#registration_and_scope)
|
|
45
|
+
* @default "/"
|
|
46
|
+
*/
|
|
47
|
+
scope?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @title Workbox configuration
|
|
51
|
+
* @default {}
|
|
52
|
+
*/
|
|
53
|
+
workbox?: {
|
|
54
|
+
/**
|
|
55
|
+
* @title Connect `InjectManifest` from `workbox-webpack-plugin` library
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
enabled?: OverridableOption<boolean>;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @title WebManifest content (manifest.json or webmanifest will be generated based on this options)
|
|
62
|
+
* @default {}
|
|
63
|
+
*/
|
|
64
|
+
webmanifest?: WebManifestOptions;
|
|
65
|
+
/**
|
|
66
|
+
* @title PWA icons options
|
|
67
|
+
* @default {}
|
|
68
|
+
*/
|
|
69
|
+
icon?: PwaIconOptions;
|
|
70
|
+
/**
|
|
71
|
+
* @title PWA meta options
|
|
72
|
+
* @default {}
|
|
73
|
+
*/
|
|
74
|
+
meta?: PwaMetaOptions;
|
|
75
|
+
};
|
|
22
76
|
}
|
|
23
77
|
export interface ApplicationConfigEntry extends CliConfigEntry {
|
|
24
78
|
type: 'application';
|
package/lib/typings/public.d.ts
CHANGED
package/lib/typings/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/typings/public.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/typings/public.ts"],"names":[],"mappings":";;;AAUA,sDAA4B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type WebManifestOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* @title Create webmanifest file
|
|
4
|
+
* @default false
|
|
5
|
+
*/
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @title Name of generated manifest file (will be placed in "output.client" directory). You can use `[hash]` placeholder for manifest cache busting
|
|
9
|
+
* @default "/manifest.[hash].json"
|
|
10
|
+
*/
|
|
11
|
+
dest?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @title prefer to use "pwa.sw.scope" instead, this field will be generated automatically
|
|
14
|
+
*/
|
|
15
|
+
scope?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
short_name?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
start_url?: string;
|
|
20
|
+
display?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @title prefer to use "pwa.meta.themeColor" instead, this field will be generated automatically
|
|
23
|
+
*/
|
|
24
|
+
theme_color?: string;
|
|
25
|
+
background_color?: string;
|
|
26
|
+
/**
|
|
27
|
+
* @title prefer to use "pwa.icon" instead, this field will be generated automatically
|
|
28
|
+
*/
|
|
29
|
+
icons?: Array<PwaIconItem>;
|
|
30
|
+
};
|
|
31
|
+
export type PwaIconItem = {
|
|
32
|
+
src: string;
|
|
33
|
+
sizes: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
};
|
|
36
|
+
export type PwaIconOptions = {
|
|
37
|
+
/**
|
|
38
|
+
* @title Path to icon file (relative to "root" directory)
|
|
39
|
+
*/
|
|
40
|
+
src: string;
|
|
41
|
+
/**
|
|
42
|
+
* @title Folder for generated icons (will be placed in "output.client" directory)
|
|
43
|
+
* @default "pwa-icons"
|
|
44
|
+
*/
|
|
45
|
+
dest?: string;
|
|
46
|
+
/**
|
|
47
|
+
* @title Icon sizes
|
|
48
|
+
* @default [36, 48, 72, 96, 144, 192, 512]
|
|
49
|
+
*/
|
|
50
|
+
sizes?: number[];
|
|
51
|
+
};
|
|
52
|
+
export type PwaMetaOptions = {
|
|
53
|
+
viewport?: string;
|
|
54
|
+
themeColor?: string;
|
|
55
|
+
mobileApp?: string;
|
|
56
|
+
mobileAppIOS?: string;
|
|
57
|
+
appleTitle?: string;
|
|
58
|
+
appleStatusBarStyle?: string;
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/typings/pwa/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkPwaDependencies = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const checkPwaDependencies = ({ packageManager, config }, parameters) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const { target } = parameters;
|
|
8
|
+
const cfg = config.getProject(target);
|
|
9
|
+
if (((_b = (_a = cfg.experiments) === null || _a === void 0 ? void 0 : _a.pwa) === null || _b === void 0 ? void 0 : _b.icon) && packageManager.name !== 'unknown') {
|
|
10
|
+
const sharpInstalled = yield packageManager.exists({ name: 'sharp' });
|
|
11
|
+
if (!sharpInstalled) {
|
|
12
|
+
throw Error('You need to install `sharp` library for PWA icon generation in devDependencies');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return { name: 'checkPwaDependencies', status: 'ok' };
|
|
16
|
+
});
|
|
17
|
+
exports.checkPwaDependencies = checkPwaDependencies;
|
|
18
|
+
//# sourceMappingURL=checkPwaDependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkPwaDependencies.js","sourceRoot":"","sources":["../../../src/validators/commands/checkPwaDependencies.ts"],"names":[],"mappings":";;;;AAGO,MAAM,oBAAoB,GAAc,CAAO,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE;;IAC9F,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAA2B,CAAC;IAEhE,IAAI,CAAA,MAAA,MAAA,GAAG,CAAC,WAAW,0CAAE,GAAG,0CAAE,IAAI,KAAI,cAAc,CAAC,IAAI,KAAK,SAAS,EAAE;QACnE,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAEtE,IAAI,CAAC,cAAc,EAAE;YACnB,MAAM,KAAK,CAAC,gFAAgF,CAAC,CAAC;SAC/F;KACF;IAED,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACxD,CAAC,CAAA,CAAC;AAbW,QAAA,oBAAoB,wBAa/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.100.0",
|
|
4
4
|
"description": "Cli инструмент для сборки и запуска приложений",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"@tinkoff/is-modern-lib": "2.0.8",
|
|
66
66
|
"@tinkoff/logger": "0.10.63",
|
|
67
67
|
"@tinkoff/minicss-class-generator": "0.2.5",
|
|
68
|
-
"@tinkoff/package-manager-wrapper": "0.1.
|
|
68
|
+
"@tinkoff/package-manager-wrapper": "0.1.9",
|
|
69
69
|
"@tinkoff/request-core": "^0.9.2",
|
|
70
70
|
"@tinkoff/request-plugin-protocol-http": "^0.11.6",
|
|
71
71
|
"@tinkoff/utils": "^2.1.3",
|
|
72
72
|
"@tinkoff/webpack-dedupe-plugin": "1.0.5",
|
|
73
73
|
"@tramvai/build": "3.1.3",
|
|
74
|
-
"@tramvai/react": "2.
|
|
74
|
+
"@tramvai/react": "2.100.0",
|
|
75
75
|
"@tramvai/tools-check-versions": "0.4.14",
|
|
76
|
-
"@tramvai/tools-migrate": "0.6.
|
|
76
|
+
"@tramvai/tools-migrate": "0.6.18",
|
|
77
77
|
"ajv": "^6.12.6",
|
|
78
78
|
"ansi-escapes": "^4.3.2",
|
|
79
79
|
"autoprefixer": "^10.4.8",
|
|
@@ -87,24 +87,25 @@
|
|
|
87
87
|
"browserslist": "^4.21.3",
|
|
88
88
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
89
89
|
"chalk": "^4.1.2",
|
|
90
|
-
"core-js": "^3.0.0",
|
|
91
90
|
"commander": "^6.2.1",
|
|
92
91
|
"compression": "^1.7.4",
|
|
92
|
+
"core-js": "^3.0.0",
|
|
93
93
|
"css-class-generator": "^2.0.0",
|
|
94
94
|
"css-loader": "^6.7.1",
|
|
95
95
|
"css-minimizer-webpack-plugin": "^4.2.2",
|
|
96
96
|
"csso-webpack-plugin": "2.0.0-beta.3",
|
|
97
97
|
"death": "^1.1.0",
|
|
98
98
|
"detect-port": "^1.5.1",
|
|
99
|
+
"env-ci": "^5.0.2",
|
|
99
100
|
"execa": "^5.1.1",
|
|
100
101
|
"exit": "^0.1.2",
|
|
101
102
|
"express": "^4.18.1",
|
|
102
103
|
"fastify": "^4.14.1",
|
|
103
104
|
"figures": "^3.2.0",
|
|
105
|
+
"file-loader": "^6.2.0",
|
|
104
106
|
"find-cache-dir": "^3.3.2",
|
|
105
107
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
106
108
|
"fs-extra": "^9.1.0",
|
|
107
|
-
"file-loader": "^6.2.0",
|
|
108
109
|
"fs-readdir-recursive": "^1.1.0",
|
|
109
110
|
"fuzzy": "^0.1.3",
|
|
110
111
|
"glob": "^7.2.3",
|
|
@@ -114,7 +115,6 @@
|
|
|
114
115
|
"ini": "^3.0.1",
|
|
115
116
|
"inquirer": "^7.3.3",
|
|
116
117
|
"inquirer-autocomplete-prompt": "^1.4.0",
|
|
117
|
-
"env-ci": "^5.0.2",
|
|
118
118
|
"inspectpack": "^4.7.1",
|
|
119
119
|
"latest-version": "^5.0.0",
|
|
120
120
|
"less": "^3.13.1",
|
|
@@ -165,6 +165,7 @@
|
|
|
165
165
|
"webpack-hot-middleware": "^2.25.3",
|
|
166
166
|
"webpack-stats-plugin": "^1.1.1",
|
|
167
167
|
"webpackbar": "^5.0.2",
|
|
168
|
+
"workbox-webpack-plugin": "^6.5.4",
|
|
168
169
|
"wrap-ansi": "^7.0.0"
|
|
169
170
|
},
|
|
170
171
|
"devDependencies": {
|
|
@@ -174,13 +175,14 @@
|
|
|
174
175
|
"@types/express": "^4.17.13",
|
|
175
176
|
"@types/find-cache-dir": "^3.2.1",
|
|
176
177
|
"@types/fs-extra": "^9.0.13",
|
|
178
|
+
"@types/fs-readdir-recursive": "^1.1.0",
|
|
177
179
|
"@types/glob": "^7.2.0",
|
|
178
180
|
"@types/http-proxy": "^1.17.9",
|
|
179
181
|
"@types/inquirer": "^7.3.3",
|
|
180
|
-
"@types/fs-readdir-recursive": "^1.1.0",
|
|
181
182
|
"@types/resolve": "^1.20.2",
|
|
182
183
|
"@types/rimraf": "^3.0.2",
|
|
183
184
|
"@types/semver": "^7.3.12",
|
|
185
|
+
"@types/sharp": "^0.32.0",
|
|
184
186
|
"@types/stoppable": "^1.1.1",
|
|
185
187
|
"@types/svgo": "^1.3.6",
|
|
186
188
|
"@types/universal-analytics": "^0.4.5",
|
|
@@ -188,10 +190,12 @@
|
|
|
188
190
|
"@types/webpack-dev-middleware": "^5.0.2",
|
|
189
191
|
"@types/webpack-stats-plugin": "^0.3.2",
|
|
190
192
|
"babel-plugin-tester": "^10.1.0",
|
|
191
|
-
"react": "18.2.0"
|
|
193
|
+
"react": "18.2.0",
|
|
194
|
+
"sharp": "^0.32.1"
|
|
192
195
|
},
|
|
193
196
|
"hiddenDependencies": {
|
|
194
|
-
"image-webpack-loader": "^6.0.0"
|
|
197
|
+
"image-webpack-loader": "^6.0.0",
|
|
198
|
+
"sharp": "^0.32.1"
|
|
195
199
|
},
|
|
196
200
|
"license": "Apache-2.0",
|
|
197
201
|
"engines": {
|