Merge branch 'master' into fix/service-typings

This commit is contained in:
Bassel Kanso 2022-08-10 16:08:31 +03:00
commit 6f4817b2bb
54 changed files with 270 additions and 993 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "check-pr-status", "name": "check-pr-status",
"version": "4.3.2", "version": "4.3.3",
"main": "dist/index.js", "main": "dist/index.js",
"license": "MIT", "license": "MIT",
"private": true, "private": true,

View File

@ -1,7 +1,7 @@
{ {
"name": "getstarted", "name": "getstarted",
"private": true, "private": true,
"version": "4.3.2", "version": "4.3.3",
"description": "A Strapi application.", "description": "A Strapi application.",
"scripts": { "scripts": {
"develop": "strapi develop", "develop": "strapi develop",
@ -12,15 +12,15 @@
"strapi": "strapi" "strapi": "strapi"
}, },
"dependencies": { "dependencies": {
"@strapi/plugin-documentation": "4.3.2", "@strapi/plugin-documentation": "4.3.3",
"@strapi/plugin-graphql": "4.3.2", "@strapi/plugin-graphql": "4.3.3",
"@strapi/plugin-i18n": "4.3.2", "@strapi/plugin-i18n": "4.3.3",
"@strapi/plugin-sentry": "4.3.2", "@strapi/plugin-sentry": "4.3.3",
"@strapi/plugin-users-permissions": "4.3.2", "@strapi/plugin-users-permissions": "4.3.3",
"@strapi/provider-email-mailgun": "4.3.2", "@strapi/provider-email-mailgun": "4.3.3",
"@strapi/provider-upload-aws-s3": "4.3.2", "@strapi/provider-upload-aws-s3": "4.3.3",
"@strapi/provider-upload-cloudinary": "4.3.2", "@strapi/provider-upload-cloudinary": "4.3.3",
"@strapi/strapi": "4.3.2", "@strapi/strapi": "4.3.3",
"@vscode/sqlite3": "5.0.8", "@vscode/sqlite3": "5.0.8",
"better-sqlite3": "7.4.6", "better-sqlite3": "7.4.6",
"lodash": "4.17.21", "lodash": "4.17.21",

View File

@ -1,7 +1,7 @@
{ {
"name": "kitchensink-ts", "name": "kitchensink-ts",
"private": true, "private": true,
"version": "4.3.2", "version": "4.3.3",
"description": "A Strapi application", "description": "A Strapi application",
"scripts": { "scripts": {
"develop": "strapi develop", "develop": "strapi develop",
@ -10,9 +10,9 @@
"strapi": "strapi" "strapi": "strapi"
}, },
"dependencies": { "dependencies": {
"@strapi/plugin-i18n": "4.3.2", "@strapi/plugin-i18n": "4.3.3",
"@strapi/plugin-users-permissions": "4.3.2", "@strapi/plugin-users-permissions": "4.3.3",
"@strapi/strapi": "4.3.2", "@strapi/strapi": "4.3.3",
"better-sqlite3": "7.4.6" "better-sqlite3": "7.4.6"
}, },
"author": { "author": {

View File

@ -1,7 +1,7 @@
{ {
"name": "kitchensink", "name": "kitchensink",
"private": true, "private": true,
"version": "4.3.2", "version": "4.3.3",
"description": "A Strapi application.", "description": "A Strapi application.",
"scripts": { "scripts": {
"develop": "strapi develop", "develop": "strapi develop",
@ -12,10 +12,10 @@
"strapi": "strapi" "strapi": "strapi"
}, },
"dependencies": { "dependencies": {
"@strapi/provider-email-mailgun": "4.3.2", "@strapi/provider-email-mailgun": "4.3.3",
"@strapi/provider-upload-aws-s3": "4.3.2", "@strapi/provider-upload-aws-s3": "4.3.3",
"@strapi/provider-upload-cloudinary": "4.3.2", "@strapi/provider-upload-cloudinary": "4.3.3",
"@strapi/strapi": "4.3.2", "@strapi/strapi": "4.3.3",
"lodash": "4.17.21", "lodash": "4.17.21",
"mysql": "2.18.1", "mysql": "2.18.1",
"passport-google-oauth2": "0.2.0", "passport-google-oauth2": "0.2.0",

View File

@ -1,5 +1,5 @@
{ {
"version": "4.3.2", "version": "4.3.3",
"packages": [ "packages": [
"packages/*", "packages/*",
"examples/*" "examples/*"

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/admin-test-utils", "name": "@strapi/admin-test-utils",
"version": "4.3.2", "version": "4.3.3",
"private": true, "private": true,
"description": "Test utilities for the Strapi administration panel", "description": "Test utilities for the Strapi administration panel",
"license": "MIT", "license": "MIT",

View File

@ -1,6 +1,6 @@
{ {
"name": "create-strapi-app", "name": "create-strapi-app",
"version": "4.3.2", "version": "4.3.3",
"description": "Generate a new Strapi application.", "description": "Generate a new Strapi application.",
"keywords": [ "keywords": [
"create-strapi-app", "create-strapi-app",
@ -38,7 +38,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/generate-new": "4.3.2", "@strapi/generate-new": "4.3.3",
"commander": "6.1.0", "commander": "6.1.0",
"inquirer": "8.2.4" "inquirer": "8.2.4"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "create-strapi-starter", "name": "create-strapi-starter",
"version": "4.3.2", "version": "4.3.3",
"description": "Generate a new Strapi application.", "description": "Generate a new Strapi application.",
"keywords": [ "keywords": [
"create-strapi-starter", "create-strapi-starter",
@ -38,7 +38,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/generate-new": "4.3.2", "@strapi/generate-new": "4.3.3",
"chalk": "4.1.1", "chalk": "4.1.1",
"ci-info": "3.3.2", "ci-info": "3.3.2",
"commander": "7.1.0", "commander": "7.1.0",

View File

@ -125,13 +125,7 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
const Icon = link.icon; const Icon = link.icon;
return ( return (
<NavLink <NavLink as={RouterNavLink} to={link.to} key={link.to} icon={<Icon />}>
as={RouterNavLink}
to={link.to}
key={link.to}
icon={<Icon />}
badgeContent={link.badge}
>
{formatMessage(link.intlLabel)} {formatMessage(link.intlLabel)}
</NavLink> </NavLink>
); );

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/admin", "name": "@strapi/admin",
"version": "4.3.2", "version": "4.3.3",
"description": "Strapi Admin", "description": "Strapi Admin",
"repository": { "repository": {
"type": "git", "type": "git",
@ -51,12 +51,12 @@
"@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.7", "@pmmmwh/react-refresh-webpack-plugin": "0.5.7",
"@strapi/babel-plugin-switch-ee-ce": "4.3.2", "@strapi/babel-plugin-switch-ee-ce": "4.3.3",
"@strapi/design-system": "1.2.1", "@strapi/design-system": "1.2.1",
"@strapi/helper-plugin": "4.3.2", "@strapi/helper-plugin": "4.3.3",
"@strapi/icons": "1.2.1", "@strapi/icons": "1.2.1",
"@strapi/typescript-utils": "4.3.2", "@strapi/typescript-utils": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"axios": "0.24.0", "axios": "0.24.0",
"babel-loader": "8.2.5", "babel-loader": "8.2.5",
"babel-plugin-styled-components": "2.0.2", "babel-plugin-styled-components": "2.0.2",

View File

@ -72,7 +72,10 @@ module.exports = [
path: '/webhooks/:id/trigger', path: '/webhooks/:id/trigger',
handler: 'webhooks.triggerWebhook', handler: 'webhooks.triggerWebhook',
config: { config: {
policies: [], policies: [
'admin::isAuthenticatedAdmin',
{ name: 'admin::hasPermissions', config: { actions: ['admin::webhooks.update'] } },
],
}, },
}, },
]; ];

View File

@ -31,7 +31,7 @@ global.strapi = {
}, },
services: { services: {
upload: { upload: {
formatFileInfo: () => ({ formatFileInfo: async () => ({
name: 'filename.png', name: 'filename.png',
alternativeText: null, alternativeText: null,
caption: null, caption: null,

View File

@ -23,7 +23,7 @@ const parseFilesData = async files => {
const getStream = () => fs.createReadStream(file.path); const getStream = () => fs.createReadStream(file.path);
// Add formated data for the upload provider // Add formated data for the upload provider
formatedFilesData[inputName] = strapi formatedFilesData[inputName] = await strapi
.plugin('upload') .plugin('upload')
.service('upload') .service('upload')
.formatFileInfo({ .formatFileInfo({

View File

@ -0,0 +1,68 @@
'use strict';
const fs = require('fs');
const path = require('path');
const { createStrapiInstance } = require('../../../../../test/helpers/strapi');
const { createAuthRequest } = require('../../../../../test/helpers/request');
describe('Project settings', () => {
let rq;
let strapi;
beforeAll(async () => {
strapi = await createStrapiInstance();
rq = await createAuthRequest({ strapi });
});
afterAll(async () => {
await strapi.destroy();
});
describe('Menu Logo', () => {
test('Upload a new logo', async () => {
const res = await rq({
url: '/admin/project-settings',
method: 'POST',
formData: { menuLogo: fs.createReadStream(path.join(__dirname, './utils/logo.png')) },
});
expect(res.status).toBe(200);
const getRes = await rq({
url: '/admin/project-settings',
method: 'GET',
});
expect(getRes.body).toMatchObject({
menuLogo: {
ext: '.png',
height: 35,
name: 'logo.png',
size: 1.06,
url: expect.anything(),
width: 35,
},
});
});
test('Reset to Strapi logo', async () => {
const postRes = await rq({
url: '/admin/project-settings',
method: 'POST',
formData: { menuLogo: 'null' },
});
expect(postRes.status).toBe(200);
const getRes = await rq({
url: '/admin/project-settings',
method: 'GET',
});
expect(getRes.body).toMatchObject({
menuLogo: null,
});
});
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-content-manager", "name": "@strapi/plugin-content-manager",
"version": "4.3.2", "version": "4.3.3",
"description": "A powerful UI to easily manage your data.", "description": "A powerful UI to easily manage your data.",
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,7 +24,7 @@
}, },
"dependencies": { "dependencies": {
"@sindresorhus/slugify": "1.1.0", "@sindresorhus/slugify": "1.1.0",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"lodash": "4.17.21" "lodash": "4.17.21"
}, },
"engines": { "engines": {

View File

@ -61,7 +61,7 @@ const getDeepPopulate = (uid, populate) => {
} }
if (attribute.type === 'media') { if (attribute.type === 'media') {
populateAcc[attributeName] = true; populateAcc[attributeName] = { populate: 'folder' };
} }
if (attribute.type === 'dynamiczone') { if (attribute.type === 'dynamiczone') {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-content-type-builder", "name": "@strapi/plugin-content-type-builder",
"version": "4.3.2", "version": "4.3.3",
"description": "Strapi plugin to create content type", "description": "Strapi plugin to create content type",
"repository": { "repository": {
"type": "git", "type": "git",
@ -28,9 +28,9 @@
}, },
"dependencies": { "dependencies": {
"@sindresorhus/slugify": "1.1.0", "@sindresorhus/slugify": "1.1.0",
"@strapi/generators": "4.3.2", "@strapi/generators": "4.3.3",
"@strapi/helper-plugin": "4.3.2", "@strapi/helper-plugin": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"fs-extra": "10.0.0", "fs-extra": "10.0.0",
"lodash": "4.17.21", "lodash": "4.17.21",
"pluralize": "^8.0.0", "pluralize": "^8.0.0",

View File

@ -71,7 +71,7 @@ const createQueryBuilder = (uid, db) => {
return this; return this;
}, },
count(count = '*') { count(count = 'id') {
state.type = 'count'; state.type = 'count';
state.count = count; state.count = count;
@ -301,10 +301,13 @@ const createQueryBuilder = (uid, db) => {
break; break;
} }
case 'count': { case 'count': {
const dbColumnName = const dbColumnName = this.aliasColumn(helpers.toColumnName(meta, state.count));
state.count === '*' ? '*' : this.aliasColumn(helpers.toColumnName(meta, state.count));
qb.count({ count: dbColumnName }); if (this.shouldUseDistinct()) {
qb.countDistinct({ count: dbColumnName });
} else {
qb.count({ count: dbColumnName });
}
break; break;
} }
case 'max': { case 'max': {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/database", "name": "@strapi/database",
"version": "4.3.2", "version": "4.3.3",
"description": "Strapi's database layer", "description": "Strapi's database layer",
"homepage": "https://strapi.io", "homepage": "https://strapi.io",
"bugs": { "bugs": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-email", "name": "@strapi/plugin-email",
"version": "4.3.2", "version": "4.3.3",
"description": "Easily configure your Strapi application to send emails.", "description": "Easily configure your Strapi application to send emails.",
"repository": { "repository": {
"type": "git", "type": "git",
@ -26,12 +26,12 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll" "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
}, },
"dependencies": { "dependencies": {
"@strapi/provider-email-sendmail": "4.3.2", "@strapi/provider-email-sendmail": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"lodash": "4.17.21" "lodash": "4.17.21"
}, },
"devDependencies": { "devDependencies": {
"@strapi/helper-plugin": "4.3.2" "@strapi/helper-plugin": "4.3.3"
}, },
"engines": { "engines": {
"node": ">=14.19.1 <=16.x.x", "node": ">=14.19.1 <=16.x.x",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/helper-plugin", "name": "@strapi/helper-plugin",
"version": "4.3.2", "version": "4.3.3",
"description": "Helper for Strapi plugins development", "description": "Helper for Strapi plugins development",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -40,7 +40,7 @@ module.exports = config => {
const requestOrigin = ctx.accept.headers.origin; const requestOrigin = ctx.accept.headers.origin;
if (whitelist.includes('*')) { if (whitelist.includes('*')) {
return '*'; return credentials ? requestOrigin : '*';
} }
if (!whitelist.includes(requestOrigin)) { if (!whitelist.includes(requestOrigin)) {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/strapi", "name": "@strapi/strapi",
"version": "4.3.2", "version": "4.3.3",
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite", "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
"keywords": [ "keywords": [
"strapi", "strapi",
@ -80,17 +80,17 @@
"dependencies": { "dependencies": {
"@koa/cors": "3.1.0", "@koa/cors": "3.1.0",
"@koa/router": "10.1.1", "@koa/router": "10.1.1",
"@strapi/admin": "4.3.2", "@strapi/admin": "4.3.3",
"@strapi/database": "4.3.2", "@strapi/database": "4.3.3",
"@strapi/generate-new": "4.3.2", "@strapi/generate-new": "4.3.3",
"@strapi/generators": "4.3.2", "@strapi/generators": "4.3.3",
"@strapi/logger": "4.3.2", "@strapi/logger": "4.3.3",
"@strapi/plugin-content-manager": "4.3.2", "@strapi/plugin-content-manager": "4.3.3",
"@strapi/plugin-content-type-builder": "4.3.2", "@strapi/plugin-content-type-builder": "4.3.3",
"@strapi/plugin-email": "4.3.2", "@strapi/plugin-email": "4.3.3",
"@strapi/plugin-upload": "4.3.2", "@strapi/plugin-upload": "4.3.3",
"@strapi/typescript-utils": "4.3.2", "@strapi/typescript-utils": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"boxen": "5.1.2", "boxen": "5.1.2",
"chalk": "4.1.2", "chalk": "4.1.2",

View File

@ -87,6 +87,12 @@ const fixtures = {
], ],
}; };
const pagination = {
page: 1,
pageSize: 25,
pageCount: 1,
};
describe('Deep Filtering API', () => { describe('Deep Filtering API', () => {
beforeAll(async () => { beforeAll(async () => {
await builder await builder
@ -119,8 +125,11 @@ describe('Deep Filtering API', () => {
filters: { cards: { name: data.card[0].attributes.name } }, filters: { cards: { name: data.card[0].attributes.name } },
}, },
}); });
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 2,
});
expect(res.body.data.length).toBe(2); expect(res.body.data.length).toBe(2);
expect(res.body.data[0]).toMatchObject(data.collector[0]); expect(res.body.data[0]).toMatchObject(data.collector[0]);
expect(res.body.data[1]).toMatchObject(data.collector[1]); expect(res.body.data[1]).toMatchObject(data.collector[1]);
@ -135,10 +144,50 @@ describe('Deep Filtering API', () => {
}, },
}); });
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 1,
});
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(1); expect(res.body.data.length).toBe(1);
expect(res.body.data[0]).toMatchObject(data.collector[0]); expect(res.body.data[0]).toMatchObject(data.collector[0]);
}); });
test('should return 2 results when deep filtering with $or', async () => {
const res = await rq({
method: 'GET',
url: '/collectors',
qs: {
filters: {
$or: [
{
cards: {
name: data.card[0].attributes.name,
},
},
{
cards: {
name: data.card[1].attributes.name,
},
},
],
},
},
});
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 2,
});
expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(2);
expect(res.body.data).toEqual(
expect.arrayContaining([
expect.objectContaining(data.collector[0]),
expect.objectContaining(data.collector[1]),
])
);
});
}); });
describe('Filter on a self manyWay relation', () => { describe('Filter on a self manyWay relation', () => {
@ -150,7 +199,10 @@ describe('Deep Filtering API', () => {
filters: { collector_friends: { name: data.collector[0].attributes.name } }, filters: { collector_friends: { name: data.collector[0].attributes.name } },
}, },
}); });
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 2,
});
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(2); expect(res.body.data.length).toBe(2);
expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(1, 3))); expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(1, 3)));
@ -173,7 +225,10 @@ describe('Deep Filtering API', () => {
_q: '', _q: '',
}, },
}); });
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 2,
});
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(2); expect(res.body.data.length).toBe(2);
expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(0, 2))); expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(0, 2)));
@ -193,6 +248,10 @@ describe('Deep Filtering API', () => {
}, },
}); });
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 1,
});
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(1); expect(res.body.data.length).toBe(1);
expect(res.body.data[0]).toMatchObject(data.collector[0]); expect(res.body.data[0]).toMatchObject(data.collector[0]);
@ -214,6 +273,10 @@ describe('Deep Filtering API', () => {
}, },
}); });
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 2,
});
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(2); expect(res.body.data.length).toBe(2);
expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(1, 3))); expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(1, 3)));
@ -233,6 +296,10 @@ describe('Deep Filtering API', () => {
}, },
}); });
expect(res.body.meta.pagination).toMatchObject({
...pagination,
total: 1,
});
expect(Array.isArray(res.body.data)).toBe(true); expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data.length).toBe(1); expect(res.body.data.length).toBe(1);
expect(res.body.data[0]).toMatchObject(data.collector[1]); expect(res.body.data[0]).toMatchObject(data.collector[1]);

View File

@ -185,6 +185,7 @@ export const AssetDialog = ({
folder={folderToEdit} folder={folderToEdit}
onClose={() => setFolderToEdit(undefined)} onClose={() => setFolderToEdit(undefined)}
location="content-manager" location="content-manager"
parentFolderId={queryObject?.folder}
/> />
); );
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-upload", "name": "@strapi/plugin-upload",
"version": "4.3.2", "version": "4.3.3",
"description": "Makes it easy to upload images and files to your Strapi Application.", "description": "Makes it easy to upload images and files to your Strapi Application.",
"license": "SEE LICENSE IN LICENSE", "license": "SEE LICENSE IN LICENSE",
"author": { "author": {
@ -23,9 +23,9 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll" "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
}, },
"dependencies": { "dependencies": {
"@strapi/helper-plugin": "4.3.2", "@strapi/helper-plugin": "4.3.3",
"@strapi/provider-upload-local": "4.3.2", "@strapi/provider-upload-local": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"byte-size": "7.0.1", "byte-size": "7.0.1",
"cropperjs": "1.5.12", "cropperjs": "1.5.12",
"date-fns": "2.28.0", "date-fns": "2.28.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/utils", "name": "@strapi/utils",
"version": "4.3.2", "version": "4.3.3",
"description": "Shared utilities for the Strapi packages", "description": "Shared utilities for the Strapi packages",
"keywords": [ "keywords": [
"strapi", "strapi",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/generate-new", "name": "@strapi/generate-new",
"version": "4.3.2", "version": "4.3.3",
"description": "Generate a new Strapi application.", "description": "Generate a new Strapi application.",
"keywords": [ "keywords": [
"generate", "generate",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/generators", "name": "@strapi/generators",
"version": "4.3.2", "version": "4.3.3",
"description": "Interactive API generator.", "description": "Interactive API generator.",
"keywords": [ "keywords": [
"strapi", "strapi",
@ -30,8 +30,8 @@
"main": "lib/index.js", "main": "lib/index.js",
"dependencies": { "dependencies": {
"@sindresorhus/slugify": "1.1.0", "@sindresorhus/slugify": "1.1.0",
"@strapi/typescript-utils": "4.3.2", "@strapi/typescript-utils": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"chalk": "4.1.2", "chalk": "4.1.2",
"fs-extra": "10.0.0", "fs-extra": "10.0.0",
"node-plop": "0.26.3", "node-plop": "0.26.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-documentation", "name": "@strapi/plugin-documentation",
"version": "4.3.2", "version": "4.3.3",
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.", "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,8 +24,8 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/helper-plugin": "4.3.2", "@strapi/helper-plugin": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"cheerio": "^1.0.0-rc.12", "cheerio": "^1.0.0-rc.12",
"fs-extra": "10.0.0", "fs-extra": "10.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-graphql", "name": "@strapi/plugin-graphql",
"version": "4.3.2", "version": "4.3.3",
"description": "Adds GraphQL endpoint with default API methods.", "description": "Adds GraphQL endpoint with default API methods.",
"repository": { "repository": {
"type": "git", "type": "git",
@ -29,7 +29,7 @@
"dependencies": { "dependencies": {
"@graphql-tools/schema": "8.1.2", "@graphql-tools/schema": "8.1.2",
"@graphql-tools/utils": "^8.9.0", "@graphql-tools/utils": "^8.9.0",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"apollo-server-core": "3.1.2", "apollo-server-core": "3.1.2",
"apollo-server-koa": "3.10.0", "apollo-server-koa": "3.10.0",
"glob": "^7.1.7", "glob": "^7.1.7",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-i18n", "name": "@strapi/plugin-i18n",
"version": "4.3.2", "version": "4.3.3",
"description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API", "description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API",
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,7 +24,7 @@
"test:unit": "jest --verbose" "test:unit": "jest --verbose"
}, },
"dependencies": { "dependencies": {
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"lodash": "4.17.21" "lodash": "4.17.21"
}, },
"engines": { "engines": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-sentry", "name": "@strapi/plugin-sentry",
"version": "4.3.2", "version": "4.3.3",
"description": "Send Strapi error events to Sentry", "description": "Send Strapi error events to Sentry",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/plugin-users-permissions", "name": "@strapi/plugin-users-permissions",
"version": "4.3.2", "version": "4.3.3",
"description": "Protect your API with a full-authentication process based on JWT", "description": "Protect your API with a full-authentication process based on JWT",
"repository": { "repository": {
"type": "git", "type": "git",
@ -27,8 +27,8 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll" "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
}, },
"dependencies": { "dependencies": {
"@strapi/helper-plugin": "4.3.2", "@strapi/helper-plugin": "4.3.3",
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"grant-koa": "5.4.8", "grant-koa": "5.4.8",
"jsonwebtoken": "^8.1.0", "jsonwebtoken": "^8.1.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-email-amazon-ses", "name": "@strapi/provider-email-amazon-ses",
"version": "4.3.2", "version": "4.3.3",
"description": "Amazon SES provider for strapi email", "description": "Amazon SES provider for strapi email",
"keywords": [ "keywords": [
"email", "email",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"node-ses": "^3.0.3" "node-ses": "^3.0.3"
}, },
"engines": { "engines": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-email-mailgun", "name": "@strapi/provider-email-mailgun",
"version": "4.3.2", "version": "4.3.3",
"description": "Mailgun provider for strapi email plugin", "description": "Mailgun provider for strapi email plugin",
"keywords": [ "keywords": [
"email", "email",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"mailgun.js": "5.2.2" "mailgun.js": "5.2.2"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-email-nodemailer", "name": "@strapi/provider-email-nodemailer",
"version": "4.3.2", "version": "4.3.3",
"description": "Nodemailer provider for Strapi 3", "description": "Nodemailer provider for Strapi 3",
"keywords": [ "keywords": [
"strapi", "strapi",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-email-sendgrid", "name": "@strapi/provider-email-sendgrid",
"version": "4.3.2", "version": "4.3.3",
"description": "Sendgrid provider for strapi email", "description": "Sendgrid provider for strapi email",
"keywords": [ "keywords": [
"email", "email",
@ -37,7 +37,7 @@
}, },
"dependencies": { "dependencies": {
"@sendgrid/mail": "7.4.7", "@sendgrid/mail": "7.4.7",
"@strapi/utils": "4.3.2" "@strapi/utils": "4.3.3"
}, },
"engines": { "engines": {
"node": ">=14.19.1 <=16.x.x", "node": ">=14.19.1 <=16.x.x",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-email-sendmail", "name": "@strapi/provider-email-sendmail",
"version": "4.3.2", "version": "4.3.3",
"description": "Sendmail provider for strapi email", "description": "Sendmail provider for strapi email",
"keywords": [ "keywords": [
"email", "email",
@ -35,7 +35,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"sendmail": "^1.6.1" "sendmail": "^1.6.1"
}, },
"engines": { "engines": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-upload-aws-s3", "name": "@strapi/provider-upload-aws-s3",
"version": "4.3.2", "version": "4.3.3",
"description": "AWS S3 provider for strapi upload", "description": "AWS S3 provider for strapi upload",
"keywords": [ "keywords": [
"upload", "upload",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-upload-cloudinary", "name": "@strapi/provider-upload-cloudinary",
"version": "4.3.2", "version": "4.3.3",
"description": "Cloudinary provider for strapi upload", "description": "Cloudinary provider for strapi upload",
"keywords": [ "keywords": [
"upload", "upload",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"cloudinary": "^1.30.1", "cloudinary": "^1.30.1",
"into-stream": "^5.1.0" "into-stream": "^5.1.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/provider-upload-local", "name": "@strapi/provider-upload-local",
"version": "4.3.2", "version": "4.3.3",
"description": "Local provider for strapi upload", "description": "Local provider for strapi upload",
"keywords": [ "keywords": [
"upload", "upload",
@ -35,7 +35,7 @@
"test": "echo \"no tests yet\"" "test": "echo \"no tests yet\""
}, },
"dependencies": { "dependencies": {
"@strapi/utils": "4.3.2", "@strapi/utils": "4.3.3",
"fs-extra": "10.0.0" "fs-extra": "10.0.0"
}, },
"engines": { "engines": {

View File

@ -1,16 +0,0 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{package.json,*.yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false

View File

@ -1,31 +0,0 @@
# Ignore docs files
_gh_pages
_site
_build
.sass-cache
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.zip
*.gz
*.vi
*~
# OS or Editor folders
.DS_Store
._*
Thumbs.db
.cache
.project
.settings
.tmproj
.idea
*.esproj
*.sublime-project
*.sublime-workspace

View File

@ -1,100 +0,0 @@
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
############################
# Packages
############################
*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
############################
# Logs and databases
############################
.tmp
*.log
*.sql
*.sqlite
############################
# Misc.
############################
*#
ssl
.editorconfig
.gitattributes
.idea
nbproject
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
build
node_modules
.node_history
############################
# Tests
############################
test
tests
__tests__
jest.config.js

View File

@ -1,22 +0,0 @@
Copyright (c) 2015-present Strapi Solutions SAS
Portions of the Strapi software are licensed as follows:
* All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined in "ee/LICENSE".
* All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below.
MIT Expat License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,84 +0,0 @@
# @strapi/provider-upload-rackspace
## Resources
- [LICENSE](LICENSE)
## Links
- [Strapi website](https://strapi.io/)
- [Strapi documentation](https://docs.strapi.io)
- [Strapi community on Discord](https://discord.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)
## Installation
```bash
# using yarn
yarn add @strapi/provider-upload-rackspace
# using npm
npm install @strapi/provider-upload-rackspace --save
```
## Configuration
- `provider` defines the name of the provider
- `providerOptions` is passed down during the construction of the provider. (ex: `createClient(config)`). [Complete list of options](https://github.com/pkgcloud/pkgcloud/blob/master/docs/providers/rackspace/README.md). The implementation is based on the package `pkgcloud`. [Documentation](https://github.com/pkgcloud/pkgcloud#storage)
- `actionOptions` is passed directly to each method respectively allowing for custom options. You can find the complete list of [upload/ uploadStream options](https://github.com/pkgcloud/pkgcloud#upload-a-file) and [delete options](https://github.com/pkgcloud/pkgcloud/blob/master/docs/providers/rackspace/storage.md#clientremovefilecontainer-file-functionerr-result--)
See the [documentation about using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) for information on installing and using a provider. To understand how environment variables are used in Strapi, please refer to the [documentation about environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables).
### Provider Configuration
`./config/plugins.js`
```js
module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: 'rackspace',
providerOptions: {
username: env('RACKSPACE_USERNAME'),
apiKey: env('RACKSPACE_KEY'),
region: env('RACKSPACE_REGION'),
container: env('RACKSPACE_CONTAINER'),
},
actionOptions: {
upload: {},
uploadStream: {},
delete: {},
},
},
},
// ...
});
```
### Security Middleware Configuration
Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation.
`./config/middlewares.js`
```js
module.exports = [
// ...
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ["'self'", 'https:'],
'img-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'],
'media-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'],
upgradeInsecureRequests: null,
},
},
},
},
// ...
];
```

View File

@ -1,63 +0,0 @@
'use strict';
/**
* Module dependencies
*/
// Public node modules.
const pkgcloud = require('pkgcloud');
const streamifier = require('streamifier');
module.exports = {
init(config) {
const options = { container: config.container };
const client = pkgcloud.storage.createClient({
provider: 'rackspace',
...config,
});
const remoteURL = () =>
new Promise((resolve, reject) => {
return client.getContainer(config.container, (err, res) => {
if (err && !res) return reject(err);
return resolve(res);
});
});
return {
upload(file) {
const readStream = streamifier.createReadStream(file.buffer);
const writeStream = client.upload({
...options,
remote: file.hash,
contentType: file.mime,
});
return new Promise((resolve, reject) => {
readStream.pipe(writeStream);
writeStream.on('error', error => error && reject(error));
writeStream.on('success', result => {
remoteURL()
.then(data => {
resolve(
Object.assign(file, {
mime: result.contentType,
url: `${data.cdnSslUri}/${result.name}`,
})
);
})
.catch(err => console.error(err) && reject(err));
});
});
},
delete(file) {
return new Promise((resolve, reject) => {
client.removeFile(config.container, file.hash, error => {
if (error) return reject(error);
return resolve();
});
});
},
};
},
};

View File

@ -1,35 +0,0 @@
{
"name": "@strapi/provider-upload-rackspace",
"version": "4.3.2",
"description": "Rackspace provider for strapi upload",
"repository": {
"type": "git",
"url": "https://github.com/strapi/strapi.git",
"directory": "packages/providers/upload-rackspace"
},
"keywords": [],
"license": "SEE LICENSE IN LICENSE",
"author": {
"name": "Pongstr Ordillo",
"url": "https://github.com/pongstr"
},
"maintainers": [
{
"name": "Strapi Solutions SAS",
"email": "hi@strapi.io",
"url": "https://strapi.io"
}
],
"main": "./lib",
"scripts": {
"test": "echo \"no tests yet\""
},
"dependencies": {
"pkgcloud": "2.2.0",
"streamifier": "0.1.1"
},
"engines": {
"node": ">=14.19.1 <=16.x.x",
"npm": ">=6.0.0"
}
}

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/babel-plugin-switch-ee-ce", "name": "@strapi/babel-plugin-switch-ee-ce",
"version": "4.3.2", "version": "4.3.3",
"private": false, "private": false,
"description": "Babel plugin to switch from CE to EE at runtime", "description": "Babel plugin to switch from CE to EE at runtime",
"repository": "git://github.com/strapi/strapi.git", "repository": "git://github.com/strapi/strapi.git",

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/logger", "name": "@strapi/logger",
"version": "4.3.2", "version": "4.3.3",
"description": "Strapi's logger", "description": "Strapi's logger",
"homepage": "https://strapi.io", "homepage": "https://strapi.io",
"bugs": { "bugs": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@strapi/typescript-utils", "name": "@strapi/typescript-utils",
"version": "4.3.2", "version": "4.3.3",
"description": "Typescript support for Strapi", "description": "Typescript support for Strapi",
"keywords": [ "keywords": [
"strapi", "strapi",

554
yarn.lock

File diff suppressed because it is too large Load Diff