mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
Merge branch 'alpha.5' of github.com:strapi/strapi into plugin/settings-manager
This commit is contained in:
commit
19c3b11889
1
.gitignore
vendored
1
.gitignore
vendored
@ -93,6 +93,7 @@ build
|
||||
node_modules
|
||||
.node_history
|
||||
package-lock.json
|
||||
**/package-lock.json
|
||||
|
||||
|
||||
############################
|
||||
|
||||
25
ROADMAP.md
25
ROADMAP.md
@ -52,23 +52,22 @@ _Reorganize the mono-repository. The rule to follow is to only have hooks withou
|
||||
- ~~Prototype the CLI to create, install and uninstall plugins.~~
|
||||
- ~~Ensure that we are compatible with Node 8.~~
|
||||
|
||||
`strapi@alpha.5` *(expected release date: 10/08/2017)*:
|
||||
- [Plugin] Settings Manager.
|
||||
- Update `strapi-helper-plugin` and `strapi-admin` dependencies to the latest version.
|
||||
- Update layout design.
|
||||
- Create a draft of the guidelines to follow of how to create a plugin.
|
||||
- Finalize the plugins queries process to be able to use different ORMs.
|
||||
- Initialize the `strapi-docs` package.
|
||||
- Use [lerna](http://lernajs.io) to run tests.
|
||||
- Synchronize the ORM adapters to set the same properties in the AST.
|
||||
- Rewrite the Strapi core to improve performances and startup time.
|
||||
`strapi@alpha.5` *(expected release date: 30/08/2017)*:
|
||||
- ~~[Plugin] Settings Manager~~.
|
||||
- ~~Update layout design~~.
|
||||
- ~~Create a draft of the guidelines to follow of how to create a plugin~~.
|
||||
- ~~Initialize the `strapi-docs` package~~.
|
||||
- ~~Synchronize the ORM adapters to set the same properties in the AST~~.
|
||||
- ~~Rewrite the Strapi core to improve performances and startup time~~.
|
||||
- ~~Freeze (make immutable) the AST~~.
|
||||
- ~~Remove global variable `strapi` and use the module pattern instead~~.
|
||||
|
||||
`strapi@alpha.6` *(expected release date: 21/09/2017)*:
|
||||
- [Plugin] Content Manager.
|
||||
- [Plugin] Content Type Builder.
|
||||
- Freeze (make immutable) the AST.
|
||||
- Remove global variable `strapi` and use the module pattern instead.
|
||||
- Write better tests.
|
||||
- Finalize the plugins queries process to be able to use different ORMs.
|
||||
- Update `strapi-helper-plugin` and `strapi-admin` dependencies to the latest version.
|
||||
- Use [lerna](http://lernajs.io) to run tests.
|
||||
|
||||
`strapi@alpha.7` *(expected release date: 31/10/2017)*:
|
||||
- [Plugin] Users & groups (with full authentication process).
|
||||
|
||||
@ -20,7 +20,7 @@ const requireTranslations = language => {
|
||||
try {
|
||||
return require(`./translations/${language}.json`); // eslint-disable-line global-require
|
||||
} catch (error) {
|
||||
console.error(`Unable to load "${language}" translation. Please make sure "${language}.json" file exists in "admin/public/app/translations" folder.`);
|
||||
console.error(`Unable to load "${language}" translation. Please make sure "${language}.json" file exists in "admin/public/app/translations" folder.`); // eslint-disable-line no-console
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@ -37,7 +37,7 @@ const addLanguageLocaleData = language => {
|
||||
addLocaleData(localeData);
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error(`It looks like the language "${language}" is not supported by "react-intl" module.`);
|
||||
console.error(`It looks like the language "${language}" is not supported by "react-intl" module.`); // eslint-disable-line no-console
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
56
packages/strapi-admin/files/public/package-lock.json
generated
56
packages/strapi-admin/files/public/package-lock.json
generated
@ -4,6 +4,16 @@
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"JSONStream": {
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz",
|
||||
"integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jsonparse": "0.0.5",
|
||||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"abab": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz",
|
||||
@ -6155,15 +6165,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
|
||||
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.0.1"
|
||||
}
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
@ -6175,6 +6176,15 @@
|
||||
"strip-ansi": "3.0.1"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
|
||||
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.0.1"
|
||||
}
|
||||
},
|
||||
"stringstream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
||||
@ -8613,16 +8623,6 @@
|
||||
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
|
||||
"dev": true
|
||||
},
|
||||
"JSONStream": {
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz",
|
||||
"integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jsonparse": "0.0.5",
|
||||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"jsprim": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
|
||||
@ -13696,15 +13696,6 @@
|
||||
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
||||
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
||||
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.1.1"
|
||||
}
|
||||
},
|
||||
"string-template": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz",
|
||||
@ -13722,6 +13713,15 @@
|
||||
"strip-ansi": "3.0.1"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
||||
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.1.1"
|
||||
}
|
||||
},
|
||||
"stringify-object": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-2.4.0.tgz",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* An asynchronous bootstrap function that runs before
|
||||
* your application gets lifted.
|
||||
* your application gets started.
|
||||
*
|
||||
* This gives you an opportunity to set up your data model,
|
||||
* run jobs, or perform some special logic.
|
||||
|
||||
@ -153,9 +153,10 @@
|
||||
<p>You'll probably also want to learn how to customize your application, set up security and configure your data sources.</p>
|
||||
<p>For more help getting started, check out:
|
||||
<ul>
|
||||
<li><a href="http://strapi.io/documentation/introduction" target="blank">Strapi documentation</a></li>
|
||||
<li><a href="https://github.com/strapi/strapi" target="blank">Strapi repository on GitHub</a></li>
|
||||
<li><a href="https://twitter.com/strapijs" target="blank">Strapi news on Twitter</a></li>
|
||||
<li><a href="http://strapi.io/documentation/introduction" target="blank">Documentation</a></li>
|
||||
<li><a href="https://github.com/strapi/strapi" target="blank">Repository on GitHub</a></li>
|
||||
<li><a href="https://twitter.com/strapijs" target="blank">news on Twitter</a></li>
|
||||
<li><a href="http://slack.strapi.io" target="blank">Real-time support on Slack</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -31,17 +31,26 @@ module.exports = (scope, cb) => {
|
||||
// Copy the default files.
|
||||
fs.copySync(path.resolve(__dirname, '..', 'files'), path.resolve(scope.rootPath));
|
||||
|
||||
const availableDependencies = [];
|
||||
const missingDependencies = [];
|
||||
|
||||
// Verify if the dependencies are available into the global
|
||||
_.forEach(_.merge(_.get(packageJSON, 'dependencies'), _.get(packageJSON, 'devDependencies')), (value, key) => {
|
||||
try {
|
||||
fs.accessSync(path.resolve(strapiRootPath, key), fs.constants.R_OK | fs.constants.W_OK);
|
||||
fs.symlinkSync(path.resolve(strapiRootPath, key), path.resolve(scope.rootPath, 'node_modules', key), 'dir');
|
||||
availableDependencies.push({
|
||||
key,
|
||||
global: true
|
||||
});
|
||||
// fs.symlinkSync(path.resolve(strapiRootPath, key), path.resolve(scope.rootPath, 'node_modules', key), 'dir');
|
||||
} catch (e1) {
|
||||
try {
|
||||
fs.accessSync(path.resolve(scope.strapiRoot, 'node_modules', key), fs.constants.R_OK | fs.constants.W_OK);
|
||||
fs.symlinkSync(path.resolve(scope.strapiRoot, 'node_modules', key), path.resolve(scope.rootPath, 'node_modules', key), 'dir');
|
||||
availableDependencies.push({
|
||||
key,
|
||||
global: false
|
||||
});
|
||||
// fs.symlinkSync(path.resolve(scope.strapiRoot, 'node_modules', key), path.resolve(scope.rootPath, 'node_modules', key), 'dir');
|
||||
} catch (e2) {
|
||||
missingDependencies.push(key);
|
||||
}
|
||||
@ -67,6 +76,14 @@ module.exports = (scope, cb) => {
|
||||
return cb();
|
||||
}
|
||||
|
||||
availableDependencies.forEach(dependency => {
|
||||
if (dependency.global) {
|
||||
fs.symlinkSync(path.resolve(strapiRootPath, dependency.key), path.resolve(scope.rootPath, 'node_modules', dependency.key), 'dir');
|
||||
} else {
|
||||
fs.symlinkSync(path.resolve(scope.strapiRoot, 'node_modules', dependency.key), path.resolve(scope.rootPath, 'node_modules', dependency.key), 'dir');
|
||||
}
|
||||
})
|
||||
|
||||
logger.info('Your new application `' + scope.name + '` is ready at `' + scope.rootPath + '`.');
|
||||
|
||||
cb();
|
||||
|
||||
@ -17,9 +17,6 @@ const reportback = require('reportback')();
|
||||
const pathRegexp = require('./util').pathRegexp;
|
||||
const generateTarget = require('./target');
|
||||
|
||||
// Logger.
|
||||
const { logger } = require('strapi-utils');
|
||||
|
||||
/**
|
||||
* Run a generator given an existing scope
|
||||
*
|
||||
@ -50,9 +47,6 @@ function generate(generator, scope, cb) {
|
||||
invalid: sb.invalid,
|
||||
success: () => {
|
||||
|
||||
// Emit output.
|
||||
logger.info('Generating ' + util.inspect(generator) + ' at `' + scope.rootPath + '`...');
|
||||
|
||||
// Process all of the generator's targets concurrently.
|
||||
async.each(Object.keys(generator.targets), (keyPath, asyncEachCb) => {
|
||||
const asyncEachSb = reportback.extend(asyncEachCb);
|
||||
|
||||
@ -13,7 +13,7 @@ const mongooseUtils = require('mongoose/lib/utils');
|
||||
const utils = require('./utils/');
|
||||
|
||||
// Strapi helpers for models.
|
||||
const utilsModels = require('strapi-utils').models;
|
||||
const { models: utilsModels, logger } = require('strapi-utils');
|
||||
|
||||
/**
|
||||
* Bookshelf hook
|
||||
@ -63,6 +63,10 @@ module.exports = function (strapi) {
|
||||
|
||||
// Handle error
|
||||
db.on('error', error => {
|
||||
if (error.message.indexOf(`:${port}`)) {
|
||||
return cb('Make sure your MongoDB database is running...');
|
||||
}
|
||||
|
||||
cb(error);
|
||||
});
|
||||
|
||||
|
||||
@ -56,10 +56,12 @@ module.exports = strapi => {
|
||||
// Note: This route could be override by the user.
|
||||
strapi.router.route({
|
||||
method: 'GET',
|
||||
path: '/*.*',
|
||||
path: '/*(.*)?',
|
||||
handler: [
|
||||
async (ctx, next) => {
|
||||
ctx.url = path.basename(ctx.url);
|
||||
const parse = path.parse(ctx.url);
|
||||
|
||||
ctx.url = path.join(parse.dir, parse.base);
|
||||
|
||||
await next();
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user