webpack 5.58.2 → 5.61.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.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

@@ -678,6 +678,7 @@
678
678
  "Experiments": {
679
679
  "description": "Enables/Disables experiments (experimental features with relax SemVer compatibility).",
680
680
  "type": "object",
681
+ "implements": ["#/definitions/ExperimentsCommon"],
681
682
  "additionalProperties": false,
682
683
  "properties": {
683
684
  "asset": {
@@ -692,7 +693,7 @@
692
693
  "description": "Build http(s): urls using a lockfile and resource content cache.",
693
694
  "anyOf": [
694
695
  {
695
- "type": "boolean"
696
+ "$ref": "#/definitions/HttpUriAllowedUris"
696
697
  },
697
698
  {
698
699
  "$ref": "#/definitions/HttpUriOptions"
@@ -718,43 +719,102 @@
718
719
  "type": "boolean"
719
720
  },
720
721
  {
721
- "type": "object",
722
- "additionalProperties": false,
723
- "properties": {
724
- "backend": {
725
- "description": "A custom backend.",
726
- "instanceof": "Function",
727
- "tsType": "(((compiler: import('../lib/Compiler'), client: string, callback: (err?: Error, api?: any) => void) => void) | ((compiler: import('../lib/Compiler'), client: string) => Promise<any>))"
728
- },
729
- "client": {
730
- "description": "A custom client.",
731
- "type": "string"
732
- },
733
- "entries": {
734
- "description": "Enable/disable lazy compilation for entries.",
735
- "type": "boolean"
736
- },
737
- "imports": {
738
- "description": "Enable/disable lazy compilation for import() modules.",
739
- "type": "boolean"
740
- },
741
- "test": {
742
- "description": "Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.",
743
- "anyOf": [
744
- {
745
- "instanceof": "RegExp",
746
- "tsType": "RegExp"
747
- },
748
- {
749
- "type": "string"
750
- },
751
- {
752
- "instanceof": "Function",
753
- "tsType": "((module: import('../lib/Module')) => boolean)"
754
- }
755
- ]
756
- }
757
- }
722
+ "$ref": "#/definitions/LazyCompilationOptions"
723
+ }
724
+ ]
725
+ },
726
+ "outputModule": {
727
+ "description": "Allow output javascript files as module source type.",
728
+ "type": "boolean"
729
+ },
730
+ "syncWebAssembly": {
731
+ "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
732
+ "type": "boolean"
733
+ },
734
+ "topLevelAwait": {
735
+ "description": "Allow using top-level-await in EcmaScript Modules.",
736
+ "type": "boolean"
737
+ }
738
+ }
739
+ },
740
+ "ExperimentsCommon": {
741
+ "description": "Enables/Disables experiments (experimental features with relax SemVer compatibility).",
742
+ "type": "object",
743
+ "additionalProperties": false,
744
+ "properties": {
745
+ "asset": {
746
+ "description": "Allow module type 'asset' to generate assets.",
747
+ "type": "boolean"
748
+ },
749
+ "asyncWebAssembly": {
750
+ "description": "Support WebAssembly as asynchronous EcmaScript Module.",
751
+ "type": "boolean"
752
+ },
753
+ "cacheUnaffected": {
754
+ "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
755
+ "type": "boolean"
756
+ },
757
+ "futureDefaults": {
758
+ "description": "Apply defaults of next major version.",
759
+ "type": "boolean"
760
+ },
761
+ "layers": {
762
+ "description": "Enable module and chunk layers.",
763
+ "type": "boolean"
764
+ },
765
+ "outputModule": {
766
+ "description": "Allow output javascript files as module source type.",
767
+ "type": "boolean"
768
+ },
769
+ "syncWebAssembly": {
770
+ "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
771
+ "type": "boolean"
772
+ },
773
+ "topLevelAwait": {
774
+ "description": "Allow using top-level-await in EcmaScript Modules.",
775
+ "type": "boolean"
776
+ }
777
+ }
778
+ },
779
+ "ExperimentsNormalized": {
780
+ "description": "Enables/Disables experiments (experimental features with relax SemVer compatibility).",
781
+ "type": "object",
782
+ "implements": ["#/definitions/ExperimentsCommon"],
783
+ "additionalProperties": false,
784
+ "properties": {
785
+ "asset": {
786
+ "description": "Allow module type 'asset' to generate assets.",
787
+ "type": "boolean"
788
+ },
789
+ "asyncWebAssembly": {
790
+ "description": "Support WebAssembly as asynchronous EcmaScript Module.",
791
+ "type": "boolean"
792
+ },
793
+ "buildHttp": {
794
+ "description": "Build http(s): urls using a lockfile and resource content cache.",
795
+ "oneOf": [
796
+ {
797
+ "$ref": "#/definitions/HttpUriOptions"
798
+ }
799
+ ]
800
+ },
801
+ "cacheUnaffected": {
802
+ "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
803
+ "type": "boolean"
804
+ },
805
+ "futureDefaults": {
806
+ "description": "Apply defaults of next major version.",
807
+ "type": "boolean"
808
+ },
809
+ "layers": {
810
+ "description": "Enable module and chunk layers.",
811
+ "type": "boolean"
812
+ },
813
+ "lazyCompilation": {
814
+ "description": "Compile entrypoints and import()s only when they are accessed.",
815
+ "oneOf": [
816
+ {
817
+ "$ref": "#/definitions/LazyCompilationOptions"
758
818
  }
759
819
  ]
760
820
  },
@@ -1005,20 +1065,40 @@
1005
1065
  "description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
1006
1066
  "type": "array",
1007
1067
  "items": {
1008
- "description": "A path to a immutable directory (usually a package manager cache directory).",
1009
- "type": "string",
1010
- "absolutePath": true,
1011
- "minLength": 1
1068
+ "description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
1069
+ "anyOf": [
1070
+ {
1071
+ "description": "A RegExp matching a immutable directory (usually a package manager cache directory, including the tailing slash)",
1072
+ "instanceof": "RegExp",
1073
+ "tsType": "RegExp"
1074
+ },
1075
+ {
1076
+ "description": "A path to a immutable directory (usually a package manager cache directory).",
1077
+ "type": "string",
1078
+ "absolutePath": true,
1079
+ "minLength": 1
1080
+ }
1081
+ ]
1012
1082
  }
1013
1083
  },
1014
1084
  "managedPaths": {
1015
1085
  "description": "List of paths that are managed by a package manager and can be trusted to not be modified otherwise.",
1016
1086
  "type": "array",
1017
1087
  "items": {
1018
- "description": "A path to a managed directory (usually a node_modules directory).",
1019
- "type": "string",
1020
- "absolutePath": true,
1021
- "minLength": 1
1088
+ "description": "List of paths that are managed by a package manager and can be trusted to not be modified otherwise.",
1089
+ "anyOf": [
1090
+ {
1091
+ "description": "A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)",
1092
+ "instanceof": "RegExp",
1093
+ "tsType": "RegExp"
1094
+ },
1095
+ {
1096
+ "description": "A path to a managed directory (usually a node_modules directory).",
1097
+ "type": "string",
1098
+ "absolutePath": true,
1099
+ "minLength": 1
1100
+ }
1101
+ ]
1022
1102
  }
1023
1103
  },
1024
1104
  "maxAge": {
@@ -1203,11 +1283,25 @@
1203
1283
  "type": "string",
1204
1284
  "absolutePath": false
1205
1285
  },
1286
+ "HttpUriAllowedUris": {
1287
+ "description": "List of allowed URIs for building http resources.",
1288
+ "cli": {
1289
+ "exclude": true
1290
+ },
1291
+ "oneOf": [
1292
+ {
1293
+ "$ref": "#/definitions/HttpUriOptionsAllowedUris"
1294
+ }
1295
+ ]
1296
+ },
1206
1297
  "HttpUriOptions": {
1207
1298
  "description": "Options for building http resources.",
1208
1299
  "type": "object",
1209
1300
  "additionalProperties": false,
1210
1301
  "properties": {
1302
+ "allowedUris": {
1303
+ "$ref": "#/definitions/HttpUriOptionsAllowedUris"
1304
+ },
1211
1305
  "cacheLocation": {
1212
1306
  "description": "Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.",
1213
1307
  "anyOf": [
@@ -1233,6 +1327,31 @@
1233
1327
  "description": "When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.",
1234
1328
  "type": "boolean"
1235
1329
  }
1330
+ },
1331
+ "required": ["allowedUris"]
1332
+ },
1333
+ "HttpUriOptionsAllowedUris": {
1334
+ "description": "List of allowed URIs (resp. the beginning of them).",
1335
+ "type": "array",
1336
+ "items": {
1337
+ "description": "List of allowed URIs (resp. the beginning of them).",
1338
+ "anyOf": [
1339
+ {
1340
+ "description": "Allowed URI pattern.",
1341
+ "instanceof": "RegExp",
1342
+ "tsType": "RegExp"
1343
+ },
1344
+ {
1345
+ "description": "Allowed URI (resp. the beginning of it).",
1346
+ "type": "string",
1347
+ "pattern": "^https?://"
1348
+ },
1349
+ {
1350
+ "description": "Allowed URI filter function.",
1351
+ "instanceof": "Function",
1352
+ "tsType": "((uri: string) => boolean)"
1353
+ }
1354
+ ]
1236
1355
  }
1237
1356
  },
1238
1357
  "IgnoreWarnings": {
@@ -1496,6 +1615,112 @@
1496
1615
  }
1497
1616
  ]
1498
1617
  },
1618
+ "LazyCompilationDefaultBackendOptions": {
1619
+ "description": "Options for the default backend.",
1620
+ "type": "object",
1621
+ "additionalProperties": false,
1622
+ "properties": {
1623
+ "client": {
1624
+ "description": "A custom client.",
1625
+ "type": "string"
1626
+ },
1627
+ "listen": {
1628
+ "description": "Specifies where to listen to from the server.",
1629
+ "anyOf": [
1630
+ {
1631
+ "description": "A port.",
1632
+ "type": "number"
1633
+ },
1634
+ {
1635
+ "description": "Listen options.",
1636
+ "type": "object",
1637
+ "additionalProperties": true,
1638
+ "properties": {
1639
+ "host": {
1640
+ "description": "A host.",
1641
+ "type": "number"
1642
+ },
1643
+ "port": {
1644
+ "description": "A port.",
1645
+ "type": "number"
1646
+ }
1647
+ },
1648
+ "tsType": "import(\"net\").ListenOptions"
1649
+ },
1650
+ {
1651
+ "description": "A custom listen function.",
1652
+ "instanceof": "Function",
1653
+ "tsType": "((server: import(\"net\").Server) => void)"
1654
+ }
1655
+ ]
1656
+ },
1657
+ "protocol": {
1658
+ "description": "Specifies the protocol the client should use to connect to the server.",
1659
+ "enum": ["http", "https"]
1660
+ },
1661
+ "server": {
1662
+ "description": "Specifies how to create the server handling the EventSource requests.",
1663
+ "anyOf": [
1664
+ {
1665
+ "description": "ServerOptions for the http or https createServer call.",
1666
+ "type": "object",
1667
+ "additionalProperties": true,
1668
+ "properties": {},
1669
+ "tsType": "(import(\"https\").ServerOptions | import(\"http\").ServerOptions)"
1670
+ },
1671
+ {
1672
+ "description": "A custom create server function.",
1673
+ "instanceof": "Function",
1674
+ "tsType": "(() => import(\"net\").Server)"
1675
+ }
1676
+ ]
1677
+ }
1678
+ }
1679
+ },
1680
+ "LazyCompilationOptions": {
1681
+ "description": "Options for compiling entrypoints and import()s only when they are accessed.",
1682
+ "type": "object",
1683
+ "additionalProperties": false,
1684
+ "properties": {
1685
+ "backend": {
1686
+ "description": "Specifies the backend that should be used for handling client keep alive.",
1687
+ "anyOf": [
1688
+ {
1689
+ "description": "A custom backend.",
1690
+ "instanceof": "Function",
1691
+ "tsType": "(((compiler: import('../lib/Compiler'), callback: (err?: Error, api?: import(\"../lib/hmr/LazyCompilationPlugin\").BackendApi) => void) => void) | ((compiler: import('../lib/Compiler')) => Promise<import(\"../lib/hmr/LazyCompilationPlugin\").BackendApi>))"
1692
+ },
1693
+ {
1694
+ "$ref": "#/definitions/LazyCompilationDefaultBackendOptions"
1695
+ }
1696
+ ]
1697
+ },
1698
+ "entries": {
1699
+ "description": "Enable/disable lazy compilation for entries.",
1700
+ "type": "boolean"
1701
+ },
1702
+ "imports": {
1703
+ "description": "Enable/disable lazy compilation for import() modules.",
1704
+ "type": "boolean"
1705
+ },
1706
+ "test": {
1707
+ "description": "Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.",
1708
+ "anyOf": [
1709
+ {
1710
+ "instanceof": "RegExp",
1711
+ "tsType": "RegExp"
1712
+ },
1713
+ {
1714
+ "type": "string"
1715
+ },
1716
+ {
1717
+ "instanceof": "Function",
1718
+ "tsType": "((module: import('../lib/Module')) => boolean)"
1719
+ }
1720
+ ]
1721
+ }
1722
+ }
1723
+ },
1499
1724
  "Library": {
1500
1725
  "description": "Make the output files a library, exporting the exports of the entry point.",
1501
1726
  "anyOf": [
@@ -2299,6 +2524,14 @@
2299
2524
  }
2300
2525
  ]
2301
2526
  },
2527
+ "minSizeReduction": {
2528
+ "description": "Minimum size reduction due to the created chunk.",
2529
+ "oneOf": [
2530
+ {
2531
+ "$ref": "#/definitions/OptimizationSplitChunksSizes"
2532
+ }
2533
+ ]
2534
+ },
2302
2535
  "name": {
2303
2536
  "description": "Give chunks for this cache group a name (chunks with equal name are merged).",
2304
2537
  "anyOf": [
@@ -2495,6 +2728,14 @@
2495
2728
  "$ref": "#/definitions/OptimizationSplitChunksSizes"
2496
2729
  }
2497
2730
  ]
2731
+ },
2732
+ "minSizeReduction": {
2733
+ "description": "Minimum size reduction due to the created chunk.",
2734
+ "oneOf": [
2735
+ {
2736
+ "$ref": "#/definitions/OptimizationSplitChunksSizes"
2737
+ }
2738
+ ]
2498
2739
  }
2499
2740
  }
2500
2741
  },
@@ -2571,6 +2812,14 @@
2571
2812
  }
2572
2813
  ]
2573
2814
  },
2815
+ "minSizeReduction": {
2816
+ "description": "Minimum size reduction due to the created chunk.",
2817
+ "oneOf": [
2818
+ {
2819
+ "$ref": "#/definitions/OptimizationSplitChunksSizes"
2820
+ }
2821
+ ]
2822
+ },
2574
2823
  "name": {
2575
2824
  "description": "Give chunks created a name (chunks with equal name are merged).",
2576
2825
  "anyOf": [
@@ -3952,20 +4201,40 @@
3952
4201
  "description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
3953
4202
  "type": "array",
3954
4203
  "items": {
3955
- "description": "A path to a immutable directory (usually a package manager cache directory).",
3956
- "type": "string",
3957
- "absolutePath": true,
3958
- "minLength": 1
4204
+ "description": "List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.",
4205
+ "anyOf": [
4206
+ {
4207
+ "description": "A RegExp matching a immutable directory (usually a package manager cache directory, including the tailing slash)",
4208
+ "instanceof": "RegExp",
4209
+ "tsType": "RegExp"
4210
+ },
4211
+ {
4212
+ "description": "A path to a immutable directory (usually a package manager cache directory).",
4213
+ "type": "string",
4214
+ "absolutePath": true,
4215
+ "minLength": 1
4216
+ }
4217
+ ]
3959
4218
  }
3960
4219
  },
3961
4220
  "managedPaths": {
3962
4221
  "description": "List of paths that are managed by a package manager and can be trusted to not be modified otherwise.",
3963
4222
  "type": "array",
3964
4223
  "items": {
3965
- "description": "A path to a managed directory (usually a node_modules directory).",
3966
- "type": "string",
3967
- "absolutePath": true,
3968
- "minLength": 1
4224
+ "description": "List of paths that are managed by a package manager and can be trusted to not be modified otherwise.",
4225
+ "anyOf": [
4226
+ {
4227
+ "description": "A RegExp matching a managed directory (usually a node_modules directory, including the tailing slash)",
4228
+ "instanceof": "RegExp",
4229
+ "tsType": "RegExp"
4230
+ },
4231
+ {
4232
+ "description": "A path to a managed directory (usually a node_modules directory).",
4233
+ "type": "string",
4234
+ "absolutePath": true,
4235
+ "minLength": 1
4236
+ }
4237
+ ]
3969
4238
  }
3970
4239
  },
3971
4240
  "module": {
@@ -4663,7 +4932,7 @@
4663
4932
  "$ref": "#/definitions/EntryNormalized"
4664
4933
  },
4665
4934
  "experiments": {
4666
- "$ref": "#/definitions/Experiments"
4935
+ "$ref": "#/definitions/ExperimentsNormalized"
4667
4936
  },
4668
4937
  "externals": {
4669
4938
  "$ref": "#/definitions/Externals"
@@ -3,4 +3,4 @@
3
3
  * DO NOT MODIFY BY HAND.
4
4
  * Run `yarn special-lint-fix` to update
5
5
  */
6
- const o=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function t(e,{instancePath:n="",parentData:s,parentDataProperty:l,rootData:a=e}={}){let i=null,r=0;const c=r;let p=!1,u=null;const f=r;if(r==r)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=r;for(const o in e)if("cacheLocation"!==o&&"frozen"!==o&&"lockfileLocation"!==o&&"upgrade"!==o){const t={params:{additionalProperty:o}};null===i?i=[t]:i.push(t),r++;break}if(t===r){if(void 0!==e.cacheLocation){let t=e.cacheLocation;const n=r,s=r;let l=!1;const a=r;if(!1!==t){const o={params:{}};null===i?i=[o]:i.push(o),r++}var h=a===r;if(l=l||h,!l){const e=r;if(r===e)if("string"==typeof t){if(t.includes("!")||!0!==o.test(t)){const o={params:{}};null===i?i=[o]:i.push(o),r++}}else{const o={params:{type:"string"}};null===i?i=[o]:i.push(o),r++}h=e===r,l=l||h}if(l)r=s,null!==i&&(s?i.length=s:i=null);else{const o={params:{}};null===i?i=[o]:i.push(o),r++}var d=n===r}else d=!0;if(d){if(void 0!==e.frozen){const o=r;if("boolean"!=typeof e.frozen){const o={params:{type:"boolean"}};null===i?i=[o]:i.push(o),r++}d=o===r}else d=!0;if(d){if(void 0!==e.lockfileLocation){let t=e.lockfileLocation;const n=r;if(r===n)if("string"==typeof t){if(t.includes("!")||!0!==o.test(t)){const o={params:{}};null===i?i=[o]:i.push(o),r++}}else{const o={params:{type:"string"}};null===i?i=[o]:i.push(o),r++}d=n===r}else d=!0;if(d)if(void 0!==e.upgrade){const o=r;if("boolean"!=typeof e.upgrade){const o={params:{type:"boolean"}};null===i?i=[o]:i.push(o),r++}d=o===r}else d=!0}}}}else{const o={params:{type:"object"}};null===i?i=[o]:i.push(o),r++}if(f===r&&(p=!0,u=0),!p){const o={params:{passingSchemas:u}};return null===i?i=[o]:i.push(o),r++,t.errors=i,!1}return r=c,null!==i&&(c?i.length=c:i=null),t.errors=i,0===r}module.exports=t,module.exports.default=t;
6
+ const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=n,module.exports.default=n;const t=new RegExp("^https?://","u");function e(n,{instancePath:o="",parentData:s,parentDataProperty:a,rootData:l=n}={}){let i=null,p=0;if(0===p){if(!n||"object"!=typeof n||Array.isArray(n))return e.errors=[{params:{type:"object"}}],!1;{let o;if(void 0===n.allowedUris&&(o="allowedUris"))return e.errors=[{params:{missingProperty:o}}],!1;{const o=p;for(const r in n)if("allowedUris"!==r&&"cacheLocation"!==r&&"frozen"!==r&&"lockfileLocation"!==r&&"upgrade"!==r)return e.errors=[{params:{additionalProperty:r}}],!1;if(o===p){if(void 0!==n.allowedUris){let r=n.allowedUris;const o=p;if(p==p){if(!Array.isArray(r))return e.errors=[{params:{type:"array"}}],!1;{const n=r.length;for(let o=0;o<n;o++){let n=r[o];const s=p,a=p;let l=!1;const f=p;if(!(n instanceof RegExp)){const r={params:{}};null===i?i=[r]:i.push(r),p++}var c=f===p;if(l=l||c,!l){const r=p;if(p===r)if("string"==typeof n){if(!t.test(n)){const r={params:{pattern:"^https?://"}};null===i?i=[r]:i.push(r),p++}}else{const r={params:{type:"string"}};null===i?i=[r]:i.push(r),p++}if(c=r===p,l=l||c,!l){const r=p;if(!(n instanceof Function)){const r={params:{}};null===i?i=[r]:i.push(r),p++}c=r===p,l=l||c}}if(!l){const r={params:{}};return null===i?i=[r]:i.push(r),p++,e.errors=i,!1}if(p=a,null!==i&&(a?i.length=a:i=null),s!==p)break}}}var f=o===p}else f=!0;if(f){if(void 0!==n.cacheLocation){let t=n.cacheLocation;const o=p,s=p;let a=!1;const l=p;if(!1!==t){const r={params:{}};null===i?i=[r]:i.push(r),p++}var u=l===p;if(a=a||u,!a){const e=p;if(p===e)if("string"==typeof t){if(t.includes("!")||!0!==r.test(t)){const r={params:{}};null===i?i=[r]:i.push(r),p++}}else{const r={params:{type:"string"}};null===i?i=[r]:i.push(r),p++}u=e===p,a=a||u}if(!a){const r={params:{}};return null===i?i=[r]:i.push(r),p++,e.errors=i,!1}p=s,null!==i&&(s?i.length=s:i=null),f=o===p}else f=!0;if(f){if(void 0!==n.frozen){const r=p;if("boolean"!=typeof n.frozen)return e.errors=[{params:{type:"boolean"}}],!1;f=r===p}else f=!0;if(f){if(void 0!==n.lockfileLocation){let t=n.lockfileLocation;const o=p;if(p===o){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.includes("!")||!0!==r.test(t))return e.errors=[{params:{}}],!1}f=o===p}else f=!0;if(f)if(void 0!==n.upgrade){const r=p;if("boolean"!=typeof n.upgrade)return e.errors=[{params:{type:"boolean"}}],!1;f=r===p}else f=!0}}}}}}}return e.errors=i,0===p}function n(r,{instancePath:t="",parentData:o,parentDataProperty:s,rootData:a=r}={}){let l=null,i=0;const p=i;let c=!1,f=null;const u=i;if(e(r,{instancePath:t,parentData:o,parentDataProperty:s,rootData:a})||(l=null===l?e.errors:l.concat(e.errors),i=l.length),u===i&&(c=!0,f=0),!c){const r={params:{passingSchemas:f}};return null===l?l=[r]:l.push(r),i++,n.errors=l,!1}return i=p,null!==l&&(p?l.length=p:l=null),n.errors=l,0===i}
@@ -5,6 +5,9 @@
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
7
  "properties": {
8
+ "allowedUris": {
9
+ "$ref": "#/definitions/HttpUriOptionsAllowedUris"
10
+ },
8
11
  "cacheLocation": {
9
12
  "description": "Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.",
10
13
  "anyOf": [
@@ -30,6 +33,31 @@
30
33
  "description": "When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.",
31
34
  "type": "boolean"
32
35
  }
36
+ },
37
+ "required": ["allowedUris"]
38
+ },
39
+ "HttpUriOptionsAllowedUris": {
40
+ "description": "List of allowed URIs (resp. the beginning of them).",
41
+ "type": "array",
42
+ "items": {
43
+ "description": "List of allowed URIs (resp. the beginning of them).",
44
+ "anyOf": [
45
+ {
46
+ "description": "Allowed URI pattern.",
47
+ "instanceof": "RegExp",
48
+ "tsType": "RegExp"
49
+ },
50
+ {
51
+ "description": "Allowed URI (resp. the beginning of it).",
52
+ "type": "string",
53
+ "pattern": "^https?://"
54
+ },
55
+ {
56
+ "description": "Allowed URI filter function.",
57
+ "instanceof": "Function",
58
+ "tsType": "((uri: string) => boolean)"
59
+ }
60
+ ]
33
61
  }
34
62
  }
35
63
  },