balm-core 3.26.0 → 3.26.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.
@@ -68,7 +68,7 @@ function getSplitChunks() {
68
68
  cacheGroups = {
69
69
  vendors: {
70
70
  name: 'vendors',
71
- chunks: 'all',
71
+ chunks: 'initial',
72
72
  test: /[\\/](node_modules|bower_components)[\\/]/,
73
73
  filename: BalmJS.file.assetsPath("".concat(jsFolder, "/").concat(jsFilename)) // Output: `js/vendor.js`
74
74
 
@@ -13,12 +13,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
13
13
 
14
14
  var _constants = require("../../config/constants");
15
15
 
16
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
17
-
18
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
-
20
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21
-
22
16
  var FILENAME_REGEX = new RegExp('[^/]+$', 'i');
23
17
  var HOT_CLIENT = 'webpack-hot-middleware/client';
24
18
 
@@ -79,20 +73,11 @@ function getEntry(input, scripts) {
79
73
  }
80
74
  }
81
75
  } else if (BalmJS.utils.isArray(input) && input.length) {
82
- var _iterator = _createForOfIteratorHelper(input),
83
- _step;
84
-
85
- try {
86
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
87
- var _value = _step.value;
88
- var matchResult = FILENAME_REGEX.exec(_value)[0];
89
- var _key = matchResult.split('.')[0];
90
- webpackEntries[_key] = useHMR ? [_value, HMR] : _value;
91
- }
92
- } catch (err) {
93
- _iterator.e(err);
94
- } finally {
95
- _iterator.f();
76
+ for (var _i3 = 0, _arr = input; _i3 < _arr.length; _i3++) {
77
+ var _value = _arr[_i3];
78
+ var matchResult = FILENAME_REGEX.exec(_value)[0];
79
+ var _key = matchResult.split('.')[0];
80
+ webpackEntries[_key] = useHMR ? [_value, HMR] : _value;
96
81
  }
97
82
  } else if (BalmJS.utils.isString(input) && input.trim().length) {
98
83
  webpackEntries = useHMR ? [input, HMR] : input;
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
9
-
10
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
-
12
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
13
-
14
8
  function handleProxyConfigError() {
15
9
  var configuration = '{ context: string | array, options: object }';
16
10
  BalmJS.logger.error('proxy middleware', "Proxy config must be an object (".concat(configuration, ") or array ([").concat(configuration, "])"));
@@ -35,23 +29,14 @@ function httpProxyMiddleware() {
35
29
  }
36
30
  } else if (BalmJS.utils.isArray(proxyConfig)) {
37
31
  // Multiple proxies
38
- var _iterator = _createForOfIteratorHelper(proxyConfig),
39
- _step;
40
-
41
- try {
42
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
43
- var _config = _step.value;
32
+ for (var _i = 0, _arr = proxyConfig; _i < _arr.length; _i++) {
33
+ var _config = _arr[_i];
44
34
 
45
- if (_config.context && _config.options) {
46
- middleware.push(httpProxy.createProxyMiddleware(_config.context, _config.options));
47
- } else {
48
- handleProxyConfigError();
49
- }
35
+ if (_config.context && _config.options) {
36
+ middleware.push(httpProxy.createProxyMiddleware(_config.context, _config.options));
37
+ } else {
38
+ handleProxyConfigError();
50
39
  }
51
- } catch (err) {
52
- _iterator.e(err);
53
- } finally {
54
- _iterator.f();
55
40
  }
56
41
  } else {
57
42
  handleProxyConfigError();
@@ -23,12 +23,6 @@ var _classPrivateFieldGet2 = _interopRequireDefault(require("@babel/runtime/help
23
23
 
24
24
  var _mergeStream = _interopRequireDefault(require("../../utilities/merge-stream"));
25
25
 
26
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
27
-
28
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
29
-
30
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
31
-
32
26
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
33
27
 
34
28
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -126,22 +120,13 @@ var SpriteTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
126
120
  var spriteOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
127
121
  var spriteList = [];
128
122
 
129
- var _iterator = _createForOfIteratorHelper(this.input),
130
- _step;
131
-
132
- try {
133
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
134
- var spriteName = _step.value;
135
- spriteList.push({
136
- src: "".concat(BalmJS.config.src.img, "/").concat(spriteName, "/*.png"),
137
- retinaSrc: "".concat(BalmJS.config.src.img, "/").concat(spriteName, "/*@2x.png"),
138
- folderName: spriteName
139
- });
140
- }
141
- } catch (err) {
142
- _iterator.e(err);
143
- } finally {
144
- _iterator.f();
123
+ for (var _i = 0, _arr = this.input; _i < _arr.length; _i++) {
124
+ var spriteName = _arr[_i];
125
+ spriteList.push({
126
+ src: "".concat(BalmJS.config.src.img, "/").concat(spriteName, "/*.png"),
127
+ retinaSrc: "".concat(BalmJS.config.src.img, "/").concat(spriteName, "/*@2x.png"),
128
+ folderName: spriteName
129
+ });
145
130
  }
146
131
 
147
132
  var _loop = function _loop(key, len) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balm-core",
3
- "version": "3.26.0",
3
+ "version": "3.26.1",
4
4
  "description": "BalmJS compiler core",
5
5
  "keywords": [
6
6
  "balm",
@@ -48,8 +48,8 @@
48
48
  "connect-history-api-fallback": "^2.0.0",
49
49
  "css-loader": "5",
50
50
  "cssnano": "4",
51
- "del": "^6.1.1",
52
- "esbuild": "^0.14",
51
+ "del": "6",
52
+ "esbuild": "^0.14.0",
53
53
  "fancy-log": "^2.0.0",
54
54
  "file-loader": "^6.2.0",
55
55
  "gulp-eslint": "^6.0.0",
@@ -89,7 +89,7 @@
89
89
  "ssh2": "0.8.9",
90
90
  "strip-ansi": "6",
91
91
  "style-loader": "2",
92
- "terser": "^5.14.1",
92
+ "terser": "^5.14.2",
93
93
  "terser-webpack-plugin": "4",
94
94
  "through2": "^4.0.2",
95
95
  "through2-concurrent": "^2.0.0",
@@ -104,8 +104,8 @@
104
104
  "workbox-build": "^6.5.3"
105
105
  },
106
106
  "devDependencies": {
107
- "@types/express": "^4",
108
- "@types/node": "^17",
107
+ "@types/express": "4",
108
+ "@types/node": "18",
109
109
  "@types/webpack": "4"
110
110
  },
111
111
  "optionalDependencies": {
@@ -117,5 +117,5 @@
117
117
  "engines": {
118
118
  "node": ">=10.13.0"
119
119
  },
120
- "gitHead": "7d8da6c112529513101ce9c357b183334c485c44"
120
+ "gitHead": "c453d890ffdab105fc23e86db4fc1aafe501721c"
121
121
  }
@@ -43,7 +43,7 @@ function getSplitChunks() {
43
43
  cacheGroups = {
44
44
  vendors: {
45
45
  name: 'vendors',
46
- chunks: 'all',
46
+ chunks: 'initial',
47
47
  test: /[\\/](node_modules|bower_components)[\\/]/,
48
48
  filename: BalmJS.file.assetsPath(`${jsFolder}/${jsFilename}`)
49
49
  }