mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Merge branch 'master' into add-snyk
This commit is contained in:
commit
29624bfa7e
@ -49,8 +49,8 @@ Sort according to a specific field.
|
||||
|
||||
Sort users by email.
|
||||
|
||||
- ASC: `GET /users?_sort=email:asc`
|
||||
- DESC: `GET /users?_sort=email:desc`
|
||||
- ASC: `GET /users?_sort=email:ASC`
|
||||
- DESC: `GET /users?_sort=email:DESC`
|
||||
|
||||
### Limit
|
||||
|
||||
|
@ -41,7 +41,7 @@ function LeftMenuLinkContainer({ layout, plugins }) {
|
||||
}, {});
|
||||
|
||||
const linkSections = Object.keys(pluginsSections).map((current, j) => {
|
||||
const contentTypesToShow = get(layout, 'layout.contentTypesToShow');
|
||||
const contentTypesToShow = get(layout, 'contentTypesToShow');
|
||||
const contentTypes = contentTypesToShow
|
||||
? pluginsSections[current].links.filter(
|
||||
obj => findIndex(contentTypesToShow, ['destination', obj.destination]) !== -1,
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"languages": ["en", "ar", "es", "fa", "fr", "de", "it", "ko", "nl", "pl", "pt", "pt-BR", "ru", "tr", "zh", "zh-Hans", "ja"]
|
||||
"languages": ["en", "ar", "es", "fr", "de", "it", "ko", "nl", "pl", "pt", "pt-BR", "ru", "tr", "zh", "zh-Hans", "ja"]
|
||||
}
|
||||
|
@ -37,8 +37,6 @@ export class LocaleToggle extends React.Component { // eslint-disable-line
|
||||
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/kr.svg';
|
||||
case 'ja':
|
||||
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/jp.svg';
|
||||
case 'fa':
|
||||
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/ir.svg';
|
||||
default:
|
||||
return `https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/${locale}.svg`;
|
||||
}
|
||||
|
@ -1,141 +0,0 @@
|
||||
{
|
||||
"Analytics": "آنالیز",
|
||||
"Content Manager": "مدیریت محتوا",
|
||||
"Content Type Builder": "سازنده ی الگوی محتوایی",
|
||||
"Email": "ایمیل",
|
||||
"Files Upload": "آپلود فایل",
|
||||
"HomePage.notification.newsLetter.success": "موفقیت در اشتراک خبر نامه",
|
||||
"New entry": "رکورد جدید",
|
||||
"Password": "رمز عبور",
|
||||
"Provider": "سرویس دهنده",
|
||||
"ResetPasswordToken": "بازنشانی رمز عبور",
|
||||
"Role": "نقش",
|
||||
"Roles & Permissions": "نقش ها و دسترسی ها",
|
||||
"Settings Manager": "مدیریت تنظیمات",
|
||||
"Username": "نام کاربری",
|
||||
"Users": "کاربران",
|
||||
"Users & Permissions": "کاربران و دسترسی ها",
|
||||
"app.components.BlockLink.code": "نمونه کد",
|
||||
"app.components.BlockLink.code.content": "با بررسی و آزمایش پروژه های واقعی توسط جامعه توسعه دهنده Strapi را یاد بگیرید.",
|
||||
"app.components.BlockLink.documentation": "خواندن مستندات",
|
||||
"app.components.BlockLink.documentation.content": "مفاهیم، راهنمای مرجع و آموزش ها را فرا بگیرید.",
|
||||
"app.components.Button.cancel": "کنسل",
|
||||
"app.components.Button.save": "ذخیره",
|
||||
"app.components.ComingSoonPage.comingSoon": "بزودی",
|
||||
"app.components.ComingSoonPage.featuresNotAvailable": "این ویژگی هنوز در حال توسعه است.",
|
||||
"app.components.DownloadInfo.download": "در حال دانلود...",
|
||||
"app.components.DownloadInfo.text": "ممکن است دقایقی طول بکشد، با تشکر از شکیبایی شما.",
|
||||
"app.components.EmptyAttributes.title": "هیچ فیلدی وجود ندارد",
|
||||
"app.components.HomePage.button.blog": "مشاهده بیشتر در بلاگ",
|
||||
"app.components.HomePage.button.quickStart": "شروع آموزش سریع",
|
||||
"app.components.HomePage.community": "جستجوی جامعه توسعه دهنده در اینترنت",
|
||||
"app.components.HomePage.community.content": "گفتگو با اعضای تیم و توسعه دهندگان در کانال های مختلف ارتباطی",
|
||||
"app.components.HomePage.create": "ساخت اولین الگوی محتوا",
|
||||
"app.components.HomePage.createBlock.content.first": "این ",
|
||||
"app.components.HomePage.createBlock.content.second": " افزونه به شما کمک میکند مدل ساختاری داده های خود را تعریف کنید،اگر شما جدیدا به اینجا مراجعه کردید، پس حتما مارا دنبال کنید ",
|
||||
"app.components.HomePage.createBlock.content.tutorial": " آموزش.",
|
||||
"app.components.HomePage.cta": "تایید",
|
||||
"app.components.HomePage.newsLetter": "برای آگاهی از آخرین اخبار Strapi مشترک خبرنامه شوید.",
|
||||
"app.components.HomePage.support": "مارا حمایت کنید",
|
||||
"app.components.HomePage.support.content": "با خرید تی شرت ما میتوانیم به توسعه Strapi ادامه داده و بهترین تجربه را برای شما فراهم کنیم!",
|
||||
"app.components.HomePage.support.link": "هم اکنون تی شرت خود را دریافت کنید",
|
||||
"app.components.HomePage.welcome": "خوش آمدید!",
|
||||
"app.components.HomePage.welcome.again": "خوش آمدید ",
|
||||
"app.components.HomePage.welcomeBlock.content": "خرسندیم که شما را به عنوان عضوی از جامعه توسعه دهنده بشناسیم، ما هر لحظه به دنبال دریافت بازخورد شما هستیم، در ارسال بازخورد تردید نکنید ",
|
||||
"app.components.HomePage.welcomeBlock.content.again": "امیدواریم در پروژه خود پیشرفت کنید... میتوانید در مورد آخرین های Strapi مطالعه کنید. بر اساس بازخورد شما ما موثر ترین اقدامات را برای بهبود محصول انجام خواهیم داد.",
|
||||
"app.components.HomePage.welcomeBlock.content.issues": "مشکلات.",
|
||||
"app.components.HomePage.welcomeBlock.content.raise": " یا ارتقاء دهید ",
|
||||
"app.components.ImgPreview.hint": "برای آپلود، فایل خود را بکشید و در این نقطه رها کنید یا {browse}",
|
||||
"app.components.ImgPreview.hint.browse": "مرور کردن",
|
||||
"app.components.InputFile.newFile": "افزودن فایل جدید",
|
||||
"app.components.InputFileDetails.open": "باز کردن در تب جدید",
|
||||
"app.components.InputFileDetails.originalName": "نام اصلی:",
|
||||
"app.components.InputFileDetails.remove": "حذف این فایل",
|
||||
"app.components.InputFileDetails.size": "حجم:",
|
||||
"app.components.InstallPluginPage.InputSearch.label": " ",
|
||||
"app.components.InstallPluginPage.InputSearch.placeholder": "جستجوی افزونه... (برای مثال: authentication)",
|
||||
"app.components.InstallPluginPage.description": "به راحتی برنامه خود را توسعه دهید.",
|
||||
"app.components.InstallPluginPage.helmet": "فروشگاه - افزونه ها",
|
||||
"app.components.InstallPluginPage.plugin.support-us.description": "با خرید تی شرت ما میتوانیم به توسعه Strapi ادامه داده و بهترین تجربه را برای شما فراهم کنیم!",
|
||||
"app.components.InstallPluginPage.title": "فروشگاه - افزونه ها",
|
||||
"app.components.InstallPluginPopup.downloads": "دانلود",
|
||||
"app.components.InstallPluginPopup.navLink.avis": "مشاهده",
|
||||
"app.components.InstallPluginPopup.navLink.changelog": "تغییرات",
|
||||
"app.components.InstallPluginPopup.navLink.description": "توضیحات",
|
||||
"app.components.InstallPluginPopup.navLink.faq": "پرسش و پاسخ",
|
||||
"app.components.InstallPluginPopup.navLink.screenshots": "تصاویر",
|
||||
"app.components.InstallPluginPopup.noDescription": "توضیحاتی وجود ندارد",
|
||||
"app.components.LeftMenuFooter.poweredBy": "قدرت گرفته از ",
|
||||
"app.components.LeftMenuLinkContainer.configuration": "پیکربندی",
|
||||
"app.components.LeftMenuLinkContainer.general": "عمومی",
|
||||
"app.components.LeftMenuLinkContainer.installNewPlugin": "فروشگاه",
|
||||
"app.components.LeftMenuLinkContainer.listPlugins": "افزونه ها",
|
||||
"app.components.LeftMenuLinkContainer.noPluginsInstalled": "هیچ افزونه ای نصب نشده است",
|
||||
"app.components.LeftMenuLinkContainer.plugins": "افزونه ها",
|
||||
"app.components.ListPluginsPage.description": "فهرست افزونه های نصب شده در پروژه.",
|
||||
"app.components.ListPluginsPage.helmet.title": "فهرست افزونه ها",
|
||||
"app.components.ListPluginsPage.title": "افزونه ها",
|
||||
"app.components.NotFoundPage.back": "بازگشت به صفحه اصلی",
|
||||
"app.components.NotFoundPage.description": "یافت نشد",
|
||||
"app.components.Official": "رسمی",
|
||||
"app.components.PluginCard.Button.label.download": "دانلود",
|
||||
"app.components.PluginCard.Button.label.install": "قبلا نصب شده است",
|
||||
"app.components.PluginCard.Button.label.support": "حمایت از ما",
|
||||
"app.components.PluginCard.compatible": "سازگار با برنامه ی شما",
|
||||
"app.components.PluginCard.compatibleCommunity": "سازگار با جامعه ی توسعه دهنده",
|
||||
"app.components.PluginCard.more-details": "اطلاعات بیشتر",
|
||||
"app.components.PluginCard.price.free": "ریگان",
|
||||
"app.components.listPlugins.button": "افزودن افزونه جدید",
|
||||
"app.components.listPlugins.title.none": "هیچ افزونه ای نصب نشده است",
|
||||
"app.components.listPlugins.title.plural": "{number} افزونه نصب شده",
|
||||
"app.components.listPlugins.title.singular": "{number} افزونه نصب شده",
|
||||
"app.components.listPluginsPage.deletePlugin.error": "خطا در هنگام حذف این افزونه",
|
||||
"app.utils.SelectOption.defaultMessage": " ",
|
||||
"app.utils.defaultMessage": " ",
|
||||
"app.utils.placeholder.defaultMessage": " ",
|
||||
"components.AutoReloadBlocker.description": "فایل را باز کرده و این ویژگی را فعال کنید.",
|
||||
"components.AutoReloadBlocker.header": "بارگذاری مجدد برای این افزونه ضروری است.",
|
||||
"components.ErrorBoundary.title": "خطایی رخ داده است...",
|
||||
"components.Input.error.attribute.key.taken": "این مقدار در حال حاضر وجود دارد",
|
||||
"components.Input.error.attribute.sameKeyAndName": "نمیتواند برابر باشد",
|
||||
"components.Input.error.attribute.taken": "نام فیلد در حال حاضر وجود دارد",
|
||||
"components.Input.error.contentTypeName.taken": "این نام هم اکنون وجود دارد",
|
||||
"components.Input.error.custom-error": "{errorMessage} ",
|
||||
"components.Input.error.validation.email": "این مقدار پست الکترونیک صحیح نیست",
|
||||
"components.Input.error.validation.json": "این مقدار با فرمت استاندارد JSON مطابقت ندارد",
|
||||
"components.Input.error.validation.max": "این مقدار زیاد است.",
|
||||
"components.Input.error.validation.maxLength": "این مقدار طولانی است.",
|
||||
"components.Input.error.validation.min": "این مقدار کوچک است.",
|
||||
"components.Input.error.validation.minLength": "طول این مقدار کم است.",
|
||||
"components.Input.error.validation.minSupMax": "نمی تواند بالاتر باشد",
|
||||
"components.Input.error.validation.regex": "این مقدار با عبارت منظم مطابقت ندارد.",
|
||||
"components.Input.error.validation.required": "این مقدار ضروری است.",
|
||||
"components.ListRow.empty": "داده ای جهت نمایش وجود ندارد.",
|
||||
"components.OverlayBlocker.description": "اقدام مورد نظر نیازمند راه اندازی مجدد سرور است. لطفا منتظر بمانید.",
|
||||
"components.OverlayBlocker.title": "در انتظار راه اندازی مجدد...",
|
||||
"components.PageFooter.select": "تعداد سطر در هر صفحه",
|
||||
"components.ProductionBlocker.description": "به جهت موارد امنیتی ما باید این افزونه را در محیط های دیگر غیرفعال کنیم.",
|
||||
"components.ProductionBlocker.header": "این افزونه فقط در حالت توسعه در دسترس است.",
|
||||
"components.Wysiwyg.ToggleMode.markdown": "تبدیل به حالت markdown",
|
||||
"components.Wysiwyg.ToggleMode.preview": "تبدیل به حالت نمایشی",
|
||||
"components.Wysiwyg.collapse": "کوچک کردن",
|
||||
"components.Wysiwyg.selectOptions.H1": "عنوان H1",
|
||||
"components.Wysiwyg.selectOptions.H2": "عنوان H2",
|
||||
"components.Wysiwyg.selectOptions.H3": "عنوان H3",
|
||||
"components.Wysiwyg.selectOptions.H4": "عنوان H4",
|
||||
"components.Wysiwyg.selectOptions.H5": "عنوان H5",
|
||||
"components.Wysiwyg.selectOptions.H6": "عنوان H6",
|
||||
"components.Wysiwyg.selectOptions.title": "افزدون عنوان",
|
||||
"components.WysiwygBottomControls.charactersIndicators": "حروف",
|
||||
"components.WysiwygBottomControls.fullscreen": "تمام صفحه",
|
||||
"components.WysiwygBottomControls.uploadFiles": "کشیدن و رها کردن فایل، خواندن از حافظه یا {browse}.",
|
||||
"components.WysiwygBottomControls.uploadFiles.browse": "انتخاب کنید",
|
||||
"components.popUpWarning.button.cancel": "کنسل",
|
||||
"components.popUpWarning.button.confirm": "تایید",
|
||||
"components.popUpWarning.message": "آیا از حذف این مقدار اطمینان دارید؟",
|
||||
"components.popUpWarning.title": "لطفا تایید کنید",
|
||||
"notification.error": "خطایی رخ داده است",
|
||||
"notification.error.layout": "خطا در بازیابی طرح",
|
||||
"request.error.model.unknown": "این مدل وجود ندارد",
|
||||
"app.utils.delete": "حذف"
|
||||
}
|
@ -38,9 +38,6 @@ module.exports = {
|
||||
'.editorconfig': {
|
||||
copy: 'editorconfig'
|
||||
},
|
||||
'.npmignore': {
|
||||
copy: 'npmignore'
|
||||
},
|
||||
'.gitignore': {
|
||||
copy: 'gitignore'
|
||||
},
|
||||
|
@ -4,22 +4,18 @@
|
||||
* Module dependencies
|
||||
*/
|
||||
|
||||
// Public node modules.
|
||||
const mongoose = require('mongoose');
|
||||
const Mongoose = mongoose.Mongoose;
|
||||
|
||||
/**
|
||||
* Convert MongoDB ID to the stringify version as GraphQL throws an error if not.
|
||||
*
|
||||
* Refer to: https://github.com/graphql/graphql-js/commit/3521e1429eec7eabeee4da65c93306b51308727b#diff-87c5e74dd1f7d923143e0eee611f598eR183
|
||||
*/
|
||||
mongoose.Types.ObjectId.prototype.valueOf = function () {
|
||||
return this.toString();
|
||||
};
|
||||
|
||||
module.exports = (mongoose = new Mongoose()) => {
|
||||
const Decimal = require('mongoose-float').loadType(mongoose, 2);
|
||||
const Float = require('mongoose-float').loadType(mongoose, 20);
|
||||
mongoose.Schema.Types.Decimal = require('mongoose-float').loadType(mongoose, 2);
|
||||
mongoose.Schema.Types.Float = require('mongoose-float').loadType(mongoose, 20);
|
||||
|
||||
/**
|
||||
* Convert MongoDB ID to the stringify version as GraphQL throws an error if not.
|
||||
*
|
||||
* Refer to: https://github.com/graphql/graphql-js/commit/3521e1429eec7eabeee4da65c93306b51308727b#diff-87c5e74dd1f7d923143e0eee611f598eR183
|
||||
*/
|
||||
mongoose.Types.ObjectId.prototype.valueOf = function () {
|
||||
return this.toString();
|
||||
};
|
||||
|
||||
return {
|
||||
convertType: mongooseType => {
|
||||
@ -36,9 +32,9 @@ module.exports = (mongoose = new Mongoose()) => {
|
||||
case 'timestamp':
|
||||
return Date;
|
||||
case 'decimal':
|
||||
return Decimal;
|
||||
return 'Decimal';
|
||||
case 'float':
|
||||
return Float;
|
||||
return 'Float';
|
||||
case 'json':
|
||||
return 'Mixed';
|
||||
case 'biginteger':
|
||||
|
@ -13,9 +13,6 @@ module.exports = {
|
||||
email: {
|
||||
className: 'col-md-6'
|
||||
},
|
||||
provider: {
|
||||
className: 'd-none'
|
||||
},
|
||||
resetPasswordToken: {
|
||||
className: 'd-none'
|
||||
},
|
||||
|
@ -12,8 +12,12 @@ const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const shell = require('shelljs');
|
||||
|
||||
// Public
|
||||
const {cyan} = require('chalk');
|
||||
const ora = require('ora');
|
||||
|
||||
// Logger.
|
||||
const { cli, logger, packageManager } = require('strapi-utils');
|
||||
const { cli, packageManager } = require('strapi-utils');
|
||||
|
||||
// Local Strapi dependencies.
|
||||
const packageJSON = require('../package.json');
|
||||
@ -30,34 +34,31 @@ module.exports = function (plugin, cliArguments) {
|
||||
const pluginID = `${pluginPrefix}${plugin}`;
|
||||
const pluginPath = `./plugins/${plugin}`;
|
||||
|
||||
let loader = ora(`Install ${cyan(plugin)} plugin`).start();
|
||||
|
||||
// Check that we're in a valid Strapi project.
|
||||
if (!cli.isStrapiApp()) {
|
||||
return logger.error('This command can only be used inside a Strapi project.');
|
||||
return loader.fail('This command can only be used inside a Strapi project.');
|
||||
}
|
||||
|
||||
// Check that the plugin is not installed yet.
|
||||
if (fs.existsSync(pluginPath)) {
|
||||
logger.error(`It looks like this plugin is already installed. Please check in \`${pluginPath}\`.`);
|
||||
loader.fail(`It looks like this plugin is already installed. Please check in \`${cyan(pluginPath)}\`.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Progress message.
|
||||
logger.debug('Installation in progress...');
|
||||
|
||||
if (cliArguments.dev) {
|
||||
try {
|
||||
fs.symlinkSync(path.resolve(__dirname, '..', '..', pluginID), path.resolve(process.cwd(), pluginPath), 'dir');
|
||||
|
||||
logger.info('The plugin has been successfully installed.');
|
||||
loader.succeed(`The ${cyan(plugin)} plugin has been successfully installed.`);
|
||||
process.exit(0);
|
||||
} catch (e) {
|
||||
logger.error('An error occurred during plugin installation.');
|
||||
console.log(e);
|
||||
loader.fail('An error occurred during plugin installation.');
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
// Debug message.
|
||||
logger.debug('Installing the plugin from npm registry.');
|
||||
|
||||
// Install the plugin from the npm registry.
|
||||
const isStrapiInstalledWithNPM = packageManager.isStrapiInstalledWithNPM();
|
||||
|
||||
@ -72,7 +73,7 @@ module.exports = function (plugin, cliArguments) {
|
||||
const cmd = isStrapiInstalledWithNPM ? `npm install ${pluginID}@${packageJSON.version} --ignore-scripts --no-save --prefix ${pluginPath}` : `yarn --cwd ${pluginPath} add ${pluginID}@${packageJSON.version} --ignore-scripts --no-save`;
|
||||
exec(cmd, (err) => {
|
||||
if (err) {
|
||||
logger.error(`An error occurred during plugin installation. \nPlease make sure this plugin is available on npm: https://www.npmjs.com/package/${pluginID}`);
|
||||
loader.fail(`An error occurred during plugin installation. \nPlease make sure this plugin is available on npm: https://www.npmjs.com/package/${pluginID}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@ -81,12 +82,7 @@ module.exports = function (plugin, cliArguments) {
|
||||
shell.rm('-r', `${pluginPath}/package.json`);
|
||||
}
|
||||
|
||||
// Debug message.
|
||||
logger.debug('Plugin successfully installed from npm registry.');
|
||||
|
||||
try {
|
||||
// Debug message.
|
||||
logger.debug(`Moving the \`node_modules/${pluginID}\` folder to the \`./plugins\` folder.`);
|
||||
// Move the plugin from the `node_modules` folder to the `./plugins` folder.
|
||||
fs.copySync(`${pluginPath}/node_modules/${pluginID}`, pluginPath, {
|
||||
overwrite: true,
|
||||
@ -107,10 +103,10 @@ module.exports = function (plugin, cliArguments) {
|
||||
}
|
||||
|
||||
// Success.
|
||||
logger.info('The plugin has been successfully installed.');
|
||||
loader.succeed(`The ${cyan(plugin)} plugin has been successfully installed.`);
|
||||
process.exit(0);
|
||||
} catch (err) {
|
||||
logger.error('An error occurred during plugin installation.');
|
||||
loader.fail('An error occurred during plugin installation.');
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
@ -32,6 +32,7 @@
|
||||
"dependencies": {
|
||||
"async": "^2.1.2",
|
||||
"boom": "^5.2.0",
|
||||
"chalk": "^2.4.1",
|
||||
"cheerio": "^1.0.0-rc.2",
|
||||
"cross-spawn": "^6.0.5",
|
||||
"delegates": "^1.0.0",
|
||||
@ -55,6 +56,7 @@
|
||||
"node-fetch": "^1.7.3",
|
||||
"node-schedule": "^1.2.0",
|
||||
"opn": "^5.3.0",
|
||||
"ora": "^3.0.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"semver": "^5.4.1",
|
||||
"stack-trace": "0.0.10",
|
||||
@ -94,4 +96,4 @@
|
||||
},
|
||||
"preferGlobal": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user