mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
Fix conflict package.json
This commit is contained in:
commit
775dc20597
@ -44,4 +44,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
"default": {
|
||||
"connector": "strapi-mongoose",
|
||||
"settings": {
|
||||
"client": "mongo",
|
||||
"host": "localhost",
|
||||
"port": 27017,
|
||||
"database": "development",
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
"default": {
|
||||
"connector": "strapi-mongoose",
|
||||
"settings": {
|
||||
"client": "mongo",
|
||||
"host": "localhost",
|
||||
"port": 27017,
|
||||
"database": "strapi-${strapi.config.name}",
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
"default": {
|
||||
"connector": "strapi-mongoose",
|
||||
"settings": {
|
||||
"client": "mongo",
|
||||
"host": "localhost",
|
||||
"port": 27017,
|
||||
"database": "strapi-${strapi.config.name}",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"defaultLocale": "en_US",
|
||||
"defaultLocale": "en_us",
|
||||
"modes": [
|
||||
"query",
|
||||
"subdomain",
|
||||
@ -9,6 +9,5 @@
|
||||
"url",
|
||||
"tld"
|
||||
],
|
||||
"locales": ["en_US", "fr_FR"],
|
||||
"cookieName": "locale"
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ module.exports = {
|
||||
|
||||
databaseModel: async ctx => {
|
||||
const Service = strapi.plugins['settings-manager'].services.settingsmanager;
|
||||
const { env } = ctx.params;
|
||||
const env = strapi.config.environment;
|
||||
|
||||
const model = Service.databases('${name}', env);
|
||||
|
||||
@ -101,7 +101,7 @@ module.exports = {
|
||||
const languages = Service.getLanguages();
|
||||
const availableLanguages = strapi.plugins['settings-manager'].services.languages;
|
||||
|
||||
if (_.find(languages, { name })) return ctx.badRequest(null, [{ messages: [{ id: 'request.error.languages.exist' }] }]);
|
||||
if (_.find(languages, { name: _.lowerCase(name).replace(' ', '_') })) return ctx.badRequest(null, [{ messages: [{ id: 'request.error.languages.exist' }] }]);
|
||||
if (!_.find(availableLanguages, { value: name })) return ctx.badRequest(null, [{ messages: [{ id: 'request.error.languages.incorrect' }] }]);
|
||||
|
||||
const filePath = path.join(strapi.config.appPath, 'config', 'locales', `${name}.json`);
|
||||
|
||||
17465
packages/strapi-plugin-settings-manager/package-lock.json
generated
Normal file
17465
packages/strapi-plugin-settings-manager/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -547,7 +547,7 @@ module.exports = {
|
||||
{
|
||||
name: 'form.database.item.password',
|
||||
target: `database.connections.${name}.settings.password`,
|
||||
type: 'string',
|
||||
type: 'password',
|
||||
value: _.get(strapi.config, `environments.${env}.database.connections.${name}.settings.password`, null),
|
||||
validations: {}
|
||||
},
|
||||
@ -702,7 +702,7 @@ module.exports = {
|
||||
};
|
||||
|
||||
const checkType = (input, { type, target, items }) => {
|
||||
if ((type === 'string' || type === 'text') && !_.isString(input)) return errors.push({
|
||||
if ((type === 'string' || type === 'text' || type === 'password') && !_.isString(input)) return errors.push({
|
||||
target: target,
|
||||
message: 'request.error.type.string'
|
||||
});
|
||||
|
||||
@ -76,6 +76,10 @@ module.exports.app = async function() {
|
||||
// Set current connections.
|
||||
this.config.connections = get(this.config.currentEnvironment, `database.connections`, {});
|
||||
|
||||
if (this.config.language.enabled) {
|
||||
this.config.language.locales = Object.keys(strapi.config.locales);
|
||||
}
|
||||
|
||||
// Template literal string.
|
||||
this.config = templateConfigurations(this.config);
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@ module.exports = strapi => {
|
||||
defaults: {
|
||||
language: {
|
||||
enabled: false,
|
||||
defaultLocale: 'en_US',
|
||||
locales: ['en_US'],
|
||||
defaultLocale: 'en_us',
|
||||
locales: ['en_us'],
|
||||
modes: ['query', 'subdomain', 'cookie', 'header', 'url', 'tld'],
|
||||
cookieName: 'locale'
|
||||
}
|
||||
@ -42,7 +42,7 @@ module.exports = strapi => {
|
||||
strapi.config.paths.config,
|
||||
'locales'
|
||||
),
|
||||
locales: strapi.config.middleware.settings.language.locales,
|
||||
locales: Object.keys(strapi.config.locales),
|
||||
defaultLocale: strapi.config.middleware.settings.language.defaultLocale,
|
||||
modes: strapi.config.middleware.settings.language.modes,
|
||||
cookieName: strapi.config.middleware.settings.language.cookieName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user