/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
tests/e2e/constants.ts
74 строки
2 KB
Jamie Howard
future(upload): implement drag-and-drop functionality for asset manag… (#26705)
30 июн 2026, 12:49
Не верифицирован
30 июн 2026, 12:49
a5ed7fc
Код
Авторство
О чём код?
import { existsSync, readdirSync } from 'fs'; import { join } from 'path'; export const { CUSTOM_TRANSFER_TOKEN_ACCESS_KEY } = require('../app-template/src/constants'); const APP_TEMPLATE_API_DIR = join(__dirname, '../app-template/src/api'); const getAppTemplateContentTypes = () => { if (!existsSync(APP_TEMPLATE_API_DIR)) { return []; } return readdirSync(APP_TEMPLATE_API_DIR, { withFileTypes: true }) .filter((api) => api.isDirectory()) .sort((a, b) => a.name.localeCompare(b.name)) .flatMap((api) => { const contentTypesDir = join(APP_TEMPLATE_API_DIR, api.name, 'content-types'); if (!existsSync(contentTypesDir)) { return []; } return readdirSync(contentTypesDir, { withFileTypes: true }) .filter((contentType) => contentType.isDirectory()) .sort((a, b) => a.name.localeCompare(b.name)) .map((contentType) => `api::${api.name}.${contentType.name}`); }); }; const APP_TEMPLATE_CONTENT_TYPES = getAppTemplateContentTypes(); export const ALLOWED_CONTENT_TYPES = [ 'admin::user', 'admin::role', 'admin::permission', 'admin::api-token', 'admin::transfer-token', ...APP_TEMPLATE_CONTENT_TYPES, 'plugin::content-manager.history-version', /** * I18N */ 'plugin::i18n.locale', /** * CONTENT RELEASES */ 'plugin::content-releases.release', 'plugin::content-releases.release-action', /** * REVIEW WORKFLOWS */ 'plugin::review-workflows.workflow-stage', 'plugin::review-workflows.workflow', /** * UPLOADS */ 'plugin::upload.file', 'plugin::upload.folder', ]; export const TITLE_LOGIN = 'Strapi Admin'; export const TITLE_HOME = 'Homepage | Strapi'; // TODO: we should start using @strapi.io addresses to have the chance one day to // actually receive and check the emails; also: it is not nice to spam other peoples // websites export const ADMIN_EMAIL_ADDRESS = 'test@testing.com'; export const ADMIN_PASSWORD = 'Testing123!'; export const EDITOR_EMAIL_ADDRESS = 'editor@testing.com'; export const EDITOR_PASSWORD = 'Testing123!'; export const AUTHOR_EMAIL_ADDRESS = 'author@testing.com'; export const AUTHOR_PASSWORD = 'Testing123!';