@tramvai/cli 4.41.100 → 4.41.107

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 (36) hide show
  1. package/lib/builder/webpack/tokens.d.ts +3 -0
  2. package/lib/builder/webpack/tokens.d.ts.map +1 -1
  3. package/lib/config/configManager.js +2 -2
  4. package/lib/config/configManager.js.map +1 -1
  5. package/lib/di/tokens/config.d.ts +1 -0
  6. package/lib/di/tokens/config.d.ts.map +1 -1
  7. package/lib/library/babel/index.d.ts +0 -4
  8. package/lib/library/babel/index.d.ts.map +1 -1
  9. package/lib/library/babel/index.js +0 -6
  10. package/lib/library/babel/index.js.map +1 -1
  11. package/lib/library/typescript/index.d.ts +0 -2
  12. package/lib/library/typescript/index.d.ts.map +1 -1
  13. package/lib/library/webpack/application/client/common.d.ts.map +1 -1
  14. package/lib/library/webpack/application/client/common.js +27 -2
  15. package/lib/library/webpack/application/client/common.js.map +1 -1
  16. package/lib/library/webpack/constants/stats.d.ts.map +1 -1
  17. package/lib/library/webpack/constants/stats.js +2 -0
  18. package/lib/library/webpack/constants/stats.js.map +1 -1
  19. package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.d.ts +8 -0
  20. package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.d.ts.map +1 -0
  21. package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.js +30 -0
  22. package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.js.map +1 -0
  23. package/lib/schema/autogeneratedSchema.json +135 -15
  24. package/lib/typings/configEntry/cli.d.ts +13 -0
  25. package/lib/typings/configEntry/cli.d.ts.map +1 -1
  26. package/package.json +7 -7
  27. package/schema.json +135 -15
  28. package/src/config/configManager.ts +2 -2
  29. package/src/library/babel/index.ts +0 -6
  30. package/src/library/webpack/application/client/common.ts +33 -2
  31. package/src/library/webpack/constants/stats.ts +2 -0
  32. package/src/library/webpack/plugins/AssetsIntegritiesPlugin.ts +36 -0
  33. package/src/models/config.spec.ts +4 -0
  34. package/src/schema/autogeneratedSchema.json +135 -15
  35. package/src/schema/tramvai.spec.ts +2 -0
  36. package/src/typings/configEntry/cli.ts +14 -0
@@ -976,6 +976,46 @@
976
976
  }
977
977
  ]
978
978
  },
979
+ "integrity": {
980
+ "title": "Integrity generation options",
981
+ "default": false,
982
+ "anyOf": [
983
+ {
984
+ "type": "object",
985
+ "properties": {
986
+ "enabled": {
987
+ "enum": [
988
+ "auto",
989
+ false,
990
+ true
991
+ ]
992
+ },
993
+ "hashFuncNames": {
994
+ "type": "array",
995
+ "items": {
996
+ "enum": [
997
+ "sha256",
998
+ "sha384",
999
+ "sha512"
1000
+ ],
1001
+ "type": "string"
1002
+ }
1003
+ },
1004
+ "hashLoading": {
1005
+ "enum": [
1006
+ "eager",
1007
+ "lazy"
1008
+ ],
1009
+ "type": "string"
1010
+ }
1011
+ },
1012
+ "additionalProperties": false
1013
+ },
1014
+ {
1015
+ "type": "boolean"
1016
+ }
1017
+ ]
1018
+ },
979
1019
  "excludesPresetEnv": {
980
1020
  "title": "List of modules to exclude from `@babel/preset-env`",
981
1021
  "description": "Option doesn't affect build with swc loader",
@@ -1198,23 +1238,23 @@
1198
1238
  "dotAll": {
1199
1239
  "type": "boolean"
1200
1240
  },
1201
- "__@match@7848": {
1241
+ "__@match@7882": {
1202
1242
  "type": "object",
1203
1243
  "additionalProperties": false
1204
1244
  },
1205
- "__@replace@7850": {
1245
+ "__@replace@7884": {
1206
1246
  "type": "object",
1207
1247
  "additionalProperties": false
1208
1248
  },
1209
- "__@search@7853": {
1249
+ "__@search@7887": {
1210
1250
  "type": "object",
1211
1251
  "additionalProperties": false
1212
1252
  },
1213
- "__@split@7855": {
1253
+ "__@split@7889": {
1214
1254
  "type": "object",
1215
1255
  "additionalProperties": false
1216
1256
  },
1217
- "__@matchAll@7857": {
1257
+ "__@matchAll@7891": {
1218
1258
  "type": "object",
1219
1259
  "additionalProperties": false
1220
1260
  }
@@ -1561,6 +1601,46 @@
1561
1601
  }
1562
1602
  ]
1563
1603
  },
1604
+ "integrity": {
1605
+ "title": "Integrity generation options",
1606
+ "default": false,
1607
+ "anyOf": [
1608
+ {
1609
+ "type": "object",
1610
+ "properties": {
1611
+ "enabled": {
1612
+ "enum": [
1613
+ "auto",
1614
+ false,
1615
+ true
1616
+ ]
1617
+ },
1618
+ "hashFuncNames": {
1619
+ "type": "array",
1620
+ "items": {
1621
+ "enum": [
1622
+ "sha256",
1623
+ "sha384",
1624
+ "sha512"
1625
+ ],
1626
+ "type": "string"
1627
+ }
1628
+ },
1629
+ "hashLoading": {
1630
+ "enum": [
1631
+ "eager",
1632
+ "lazy"
1633
+ ],
1634
+ "type": "string"
1635
+ }
1636
+ },
1637
+ "additionalProperties": false
1638
+ },
1639
+ {
1640
+ "type": "boolean"
1641
+ }
1642
+ ]
1643
+ },
1564
1644
  "experiments": {
1565
1645
  "title": "Change different experimental cli settings",
1566
1646
  "default": {},
@@ -1911,23 +1991,23 @@
1911
1991
  "dotAll": {
1912
1992
  "type": "boolean"
1913
1993
  },
1914
- "__@match@7848": {
1994
+ "__@match@7882": {
1915
1995
  "type": "object",
1916
1996
  "additionalProperties": false
1917
1997
  },
1918
- "__@replace@7850": {
1998
+ "__@replace@7884": {
1919
1999
  "type": "object",
1920
2000
  "additionalProperties": false
1921
2001
  },
1922
- "__@search@7853": {
2002
+ "__@search@7887": {
1923
2003
  "type": "object",
1924
2004
  "additionalProperties": false
1925
2005
  },
1926
- "__@split@7855": {
2006
+ "__@split@7889": {
1927
2007
  "type": "object",
1928
2008
  "additionalProperties": false
1929
2009
  },
1930
- "__@matchAll@7857": {
2010
+ "__@matchAll@7891": {
1931
2011
  "type": "object",
1932
2012
  "additionalProperties": false
1933
2013
  }
@@ -2274,6 +2354,46 @@
2274
2354
  }
2275
2355
  ]
2276
2356
  },
2357
+ "integrity": {
2358
+ "title": "Integrity generation options",
2359
+ "default": false,
2360
+ "anyOf": [
2361
+ {
2362
+ "type": "object",
2363
+ "properties": {
2364
+ "enabled": {
2365
+ "enum": [
2366
+ "auto",
2367
+ false,
2368
+ true
2369
+ ]
2370
+ },
2371
+ "hashFuncNames": {
2372
+ "type": "array",
2373
+ "items": {
2374
+ "enum": [
2375
+ "sha256",
2376
+ "sha384",
2377
+ "sha512"
2378
+ ],
2379
+ "type": "string"
2380
+ }
2381
+ },
2382
+ "hashLoading": {
2383
+ "enum": [
2384
+ "eager",
2385
+ "lazy"
2386
+ ],
2387
+ "type": "string"
2388
+ }
2389
+ },
2390
+ "additionalProperties": false
2391
+ },
2392
+ {
2393
+ "type": "boolean"
2394
+ }
2395
+ ]
2396
+ },
2277
2397
  "experiments": {
2278
2398
  "title": "Change different experimental cli settings",
2279
2399
  "default": {},
@@ -2624,23 +2744,23 @@
2624
2744
  "dotAll": {
2625
2745
  "type": "boolean"
2626
2746
  },
2627
- "__@match@7848": {
2747
+ "__@match@7882": {
2628
2748
  "type": "object",
2629
2749
  "additionalProperties": false
2630
2750
  },
2631
- "__@replace@7850": {
2751
+ "__@replace@7884": {
2632
2752
  "type": "object",
2633
2753
  "additionalProperties": false
2634
2754
  },
2635
- "__@search@7853": {
2755
+ "__@search@7887": {
2636
2756
  "type": "object",
2637
2757
  "additionalProperties": false
2638
2758
  },
2639
- "__@split@7855": {
2759
+ "__@split@7889": {
2640
2760
  "type": "object",
2641
2761
  "additionalProperties": false
2642
2762
  },
2643
- "__@matchAll@7857": {
2763
+ "__@matchAll@7891": {
2644
2764
  "type": "object",
2645
2765
  "additionalProperties": false
2646
2766
  }
@@ -125,6 +125,7 @@ describe('JSON schema для tramvai.json', () => {
125
125
  "overlay": false,
126
126
  },
127
127
  },
128
+ "integrity": false,
128
129
  "modern": true,
129
130
  "name": "test-app",
130
131
  "notifications": {},
@@ -192,6 +193,7 @@ describe('JSON schema для tramvai.json', () => {
192
193
  "overlay": false,
193
194
  },
194
195
  },
196
+ "integrity": false,
195
197
  "name": "test-module",
196
198
  "notifications": {},
197
199
  "output": "dist/modules",
@@ -87,6 +87,15 @@ export interface Experiments {
87
87
  enableFillDeclareActionNamePlugin: boolean;
88
88
  }
89
89
 
90
+ /**
91
+ * @see https://github.com/waysact/webpack-subresource-integrity/tree/main/webpack-subresource-integrity#options
92
+ */
93
+ export interface IntegrityOptions {
94
+ enabled: boolean | 'auto';
95
+ hashFuncNames: ('sha256' | 'sha384' | 'sha512')[];
96
+ hashLoading: 'eager' | 'lazy';
97
+ }
98
+
90
99
  /**
91
100
  * @default {}
92
101
  * @additionalProperties true
@@ -113,6 +122,11 @@ export interface CliConfigEntry extends ConfigEntry {
113
122
  * @default false
114
123
  */
115
124
  sourceMap: OverridableOption<boolean>;
125
+ /**
126
+ * @title Integrity generation options
127
+ * @default false
128
+ */
129
+ integrity: boolean | IntegrityOptions;
116
130
  /**
117
131
  * @title Change different experimental cli settings
118
132
  * @default {}