@blitzjs/config
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -11,2 +11,20 @@ 'use strict'; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
@@ -54,3 +72,3 @@ if (!o) return; | ||
var configFiles = ["next.config.js"]; | ||
var configFiles = ["blitz.config.js", "next.config.js"]; | ||
/** | ||
@@ -84,3 +102,3 @@ * @param {boolean | undefined} reload - reimport config files to reset global cache | ||
blitzConfig = contents; | ||
blitzConfig = _extends({}, blitzConfig, contents); | ||
} | ||
@@ -87,0 +105,0 @@ } |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=(e=require("pkg-dir"))&&"object"==typeof e&&"default"in e?e.default:e,t=require("path"),n=require("fs");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var i=["next.config.js"];exports.getConfig=function(e){if(global.blitzConfig&&Object.keys(global.blitzConfig).length>0&&!e)return global.blitzConfig;for(var a,l={},u=r.sync()||process.cwd(),f=function(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return o(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,void 0):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(i);!(a=f()).done;){var c=a.value;if(n.existsSync(t.join(u,c))){var s=t.join(u,c),b=require(s);l="function"==typeof b?b():b}}return global.blitzConfig=l,l}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r,t=(r=require("pkg-dir"))&&"object"==typeof r&&"default"in r?r.default:r,e=require("path"),n=require("fs");function o(){return(o=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r}).apply(this,arguments)}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var a=["blitz.config.js","next.config.js"];exports.getConfig=function(r){if(global.blitzConfig&&Object.keys(global.blitzConfig).length>0&&!r)return global.blitzConfig;for(var l,u={},f=t.sync()||process.cwd(),c=function(r,t){var e;if("undefined"==typeof Symbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(e=function(r,t){if(r){if("string"==typeof r)return i(r,void 0);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(r,void 0):void 0}}(r))){e&&(r=e);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=r[Symbol.iterator]()).next.bind(e)}(a);!(l=c()).done;){var s=l.value;if(n.existsSync(e.join(f,s))){var b=e.join(f,s),y=require(b);u=o({},u,"function"==typeof y?y():y)}}return global.blitzConfig=u,u}; | ||
//# sourceMappingURL=config.cjs.production.min.js.map |
@@ -5,2 +5,20 @@ import pkgDir from 'pkg-dir'; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
@@ -48,3 +66,3 @@ if (!o) return; | ||
var configFiles = ["next.config.js"]; | ||
var configFiles = ["blitz.config.js", "next.config.js"]; | ||
/** | ||
@@ -78,3 +96,3 @@ * @param {boolean | undefined} reload - reimport config files to reset global cache | ||
blitzConfig = contents; | ||
blitzConfig = _extends({}, blitzConfig, contents); | ||
} | ||
@@ -81,0 +99,0 @@ } |
@@ -10,3 +10,3 @@ { | ||
"author": "Fran Zekan <zekan.fran369@gmail.com>", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"license": "MIT", | ||
@@ -35,3 +35,3 @@ "scripts": { | ||
}, | ||
"gitHead": "843dbc2c66bd9cc61e883ef7ca874a0ca370679a" | ||
"gitHead": "93f476853551899d9b151d837b03578151aa99a2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
16009
180