mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 03:43:34 +00:00 
			
		
		
		
	Merge branch 'master' into fix/service-typings
This commit is contained in:
		
						commit
						6f4817b2bb
					
				
							
								
								
									
										2
									
								
								.github/actions/check-pr-status/package.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/actions/check-pr-status/package.json
									
									
									
									
										vendored
									
									
								
							@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "check-pr-status",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "main": "dist/index.js",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "private": true,
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "getstarted",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "A Strapi application.",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "develop": "strapi develop",
 | 
			
		||||
@ -12,15 +12,15 @@
 | 
			
		||||
    "strapi": "strapi"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/plugin-documentation": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-graphql": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-i18n": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-sentry": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-users-permissions": "4.3.2",
 | 
			
		||||
    "@strapi/provider-email-mailgun": "4.3.2",
 | 
			
		||||
    "@strapi/provider-upload-aws-s3": "4.3.2",
 | 
			
		||||
    "@strapi/provider-upload-cloudinary": "4.3.2",
 | 
			
		||||
    "@strapi/strapi": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-documentation": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-graphql": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-i18n": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-sentry": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-users-permissions": "4.3.3",
 | 
			
		||||
    "@strapi/provider-email-mailgun": "4.3.3",
 | 
			
		||||
    "@strapi/provider-upload-aws-s3": "4.3.3",
 | 
			
		||||
    "@strapi/provider-upload-cloudinary": "4.3.3",
 | 
			
		||||
    "@strapi/strapi": "4.3.3",
 | 
			
		||||
    "@vscode/sqlite3": "5.0.8",
 | 
			
		||||
    "better-sqlite3": "7.4.6",
 | 
			
		||||
    "lodash": "4.17.21",
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "kitchensink-ts",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "A Strapi application",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "develop": "strapi develop",
 | 
			
		||||
@ -10,9 +10,9 @@
 | 
			
		||||
    "strapi": "strapi"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/plugin-i18n": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-users-permissions": "4.3.2",
 | 
			
		||||
    "@strapi/strapi": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-i18n": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-users-permissions": "4.3.3",
 | 
			
		||||
    "@strapi/strapi": "4.3.3",
 | 
			
		||||
    "better-sqlite3": "7.4.6"
 | 
			
		||||
  },
 | 
			
		||||
  "author": {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "kitchensink",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "A Strapi application.",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "develop": "strapi develop",
 | 
			
		||||
@ -12,10 +12,10 @@
 | 
			
		||||
    "strapi": "strapi"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/provider-email-mailgun": "4.3.2",
 | 
			
		||||
    "@strapi/provider-upload-aws-s3": "4.3.2",
 | 
			
		||||
    "@strapi/provider-upload-cloudinary": "4.3.2",
 | 
			
		||||
    "@strapi/strapi": "4.3.2",
 | 
			
		||||
    "@strapi/provider-email-mailgun": "4.3.3",
 | 
			
		||||
    "@strapi/provider-upload-aws-s3": "4.3.3",
 | 
			
		||||
    "@strapi/provider-upload-cloudinary": "4.3.3",
 | 
			
		||||
    "@strapi/strapi": "4.3.3",
 | 
			
		||||
    "lodash": "4.17.21",
 | 
			
		||||
    "mysql": "2.18.1",
 | 
			
		||||
    "passport-google-oauth2": "0.2.0",
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
{
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "packages": [
 | 
			
		||||
    "packages/*",
 | 
			
		||||
    "examples/*"
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/admin-test-utils",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "description": "Test utilities for the Strapi administration panel",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "create-strapi-app",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Generate a new Strapi application.",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "create-strapi-app",
 | 
			
		||||
@ -38,7 +38,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/generate-new": "4.3.2",
 | 
			
		||||
    "@strapi/generate-new": "4.3.3",
 | 
			
		||||
    "commander": "6.1.0",
 | 
			
		||||
    "inquirer": "8.2.4"
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "create-strapi-starter",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Generate a new Strapi application.",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "create-strapi-starter",
 | 
			
		||||
@ -38,7 +38,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/generate-new": "4.3.2",
 | 
			
		||||
    "@strapi/generate-new": "4.3.3",
 | 
			
		||||
    "chalk": "4.1.1",
 | 
			
		||||
    "ci-info": "3.3.2",
 | 
			
		||||
    "commander": "7.1.0",
 | 
			
		||||
 | 
			
		||||
@ -125,13 +125,7 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
 | 
			
		||||
              const Icon = link.icon;
 | 
			
		||||
 | 
			
		||||
              return (
 | 
			
		||||
                <NavLink
 | 
			
		||||
                  as={RouterNavLink}
 | 
			
		||||
                  to={link.to}
 | 
			
		||||
                  key={link.to}
 | 
			
		||||
                  icon={<Icon />}
 | 
			
		||||
                  badgeContent={link.badge}
 | 
			
		||||
                >
 | 
			
		||||
                <NavLink as={RouterNavLink} to={link.to} key={link.to} icon={<Icon />}>
 | 
			
		||||
                  {formatMessage(link.intlLabel)}
 | 
			
		||||
                </NavLink>
 | 
			
		||||
              );
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/admin",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Strapi Admin",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -51,12 +51,12 @@
 | 
			
		||||
    "@fortawesome/free-solid-svg-icons": "^5.15.3",
 | 
			
		||||
    "@fortawesome/react-fontawesome": "^0.2.0",
 | 
			
		||||
    "@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/helper-plugin": "4.3.2",
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.3",
 | 
			
		||||
    "@strapi/icons": "1.2.1",
 | 
			
		||||
    "@strapi/typescript-utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/typescript-utils": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "axios": "0.24.0",
 | 
			
		||||
    "babel-loader": "8.2.5",
 | 
			
		||||
    "babel-plugin-styled-components": "2.0.2",
 | 
			
		||||
 | 
			
		||||
@ -72,7 +72,10 @@ module.exports = [
 | 
			
		||||
    path: '/webhooks/:id/trigger',
 | 
			
		||||
    handler: 'webhooks.triggerWebhook',
 | 
			
		||||
    config: {
 | 
			
		||||
      policies: [],
 | 
			
		||||
      policies: [
 | 
			
		||||
        'admin::isAuthenticatedAdmin',
 | 
			
		||||
        { name: 'admin::hasPermissions', config: { actions: ['admin::webhooks.update'] } },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,7 @@ global.strapi = {
 | 
			
		||||
      },
 | 
			
		||||
      services: {
 | 
			
		||||
        upload: {
 | 
			
		||||
          formatFileInfo: () => ({
 | 
			
		||||
          formatFileInfo: async () => ({
 | 
			
		||||
            name: 'filename.png',
 | 
			
		||||
            alternativeText: null,
 | 
			
		||||
            caption: null,
 | 
			
		||||
 | 
			
		||||
@ -23,7 +23,7 @@ const parseFilesData = async files => {
 | 
			
		||||
      const getStream = () => fs.createReadStream(file.path);
 | 
			
		||||
 | 
			
		||||
      // Add formated data for the upload provider
 | 
			
		||||
      formatedFilesData[inputName] = strapi
 | 
			
		||||
      formatedFilesData[inputName] = await strapi
 | 
			
		||||
        .plugin('upload')
 | 
			
		||||
        .service('upload')
 | 
			
		||||
        .formatFileInfo({
 | 
			
		||||
 | 
			
		||||
@ -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,
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								packages/core/admin/server/tests/utils/logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								packages/core/admin/server/tests/utils/logo.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.0 KiB  | 
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/plugin-content-manager",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "A powerful UI to easily manage your data.",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -24,7 +24,7 @@
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@sindresorhus/slugify": "1.1.0",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "lodash": "4.17.21"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
 | 
			
		||||
@ -61,7 +61,7 @@ const getDeepPopulate = (uid, populate) => {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (attribute.type === 'media') {
 | 
			
		||||
      populateAcc[attributeName] = true;
 | 
			
		||||
      populateAcc[attributeName] = { populate: 'folder' };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (attribute.type === 'dynamiczone') {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/plugin-content-type-builder",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Strapi plugin to create content type",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -28,9 +28,9 @@
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@sindresorhus/slugify": "1.1.0",
 | 
			
		||||
    "@strapi/generators": "4.3.2",
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/generators": "4.3.3",
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "fs-extra": "10.0.0",
 | 
			
		||||
    "lodash": "4.17.21",
 | 
			
		||||
    "pluralize": "^8.0.0",
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,7 @@ const createQueryBuilder = (uid, db) => {
 | 
			
		||||
      return this;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    count(count = '*') {
 | 
			
		||||
    count(count = 'id') {
 | 
			
		||||
      state.type = 'count';
 | 
			
		||||
      state.count = count;
 | 
			
		||||
 | 
			
		||||
@ -301,10 +301,13 @@ const createQueryBuilder = (uid, db) => {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case 'count': {
 | 
			
		||||
          const dbColumnName =
 | 
			
		||||
            state.count === '*' ? '*' : this.aliasColumn(helpers.toColumnName(meta, state.count));
 | 
			
		||||
          const dbColumnName = this.aliasColumn(helpers.toColumnName(meta, state.count));
 | 
			
		||||
 | 
			
		||||
          qb.count({ count: dbColumnName });
 | 
			
		||||
          if (this.shouldUseDistinct()) {
 | 
			
		||||
            qb.countDistinct({ count: dbColumnName });
 | 
			
		||||
          } else {
 | 
			
		||||
            qb.count({ count: dbColumnName });
 | 
			
		||||
          }
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case 'max': {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/database",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Strapi's database layer",
 | 
			
		||||
  "homepage": "https://strapi.io",
 | 
			
		||||
  "bugs": {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/plugin-email",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Easily configure your Strapi application to send emails.",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -26,12 +26,12 @@
 | 
			
		||||
    "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/provider-email-sendmail": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/provider-email-sendmail": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "lodash": "4.17.21"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.2"
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.3"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=14.19.1 <=16.x.x",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/helper-plugin",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Helper for Strapi plugins development",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
 | 
			
		||||
@ -40,7 +40,7 @@ module.exports = config => {
 | 
			
		||||
 | 
			
		||||
      const requestOrigin = ctx.accept.headers.origin;
 | 
			
		||||
      if (whitelist.includes('*')) {
 | 
			
		||||
        return '*';
 | 
			
		||||
        return credentials ? requestOrigin : '*';
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (!whitelist.includes(requestOrigin)) {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "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",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "strapi",
 | 
			
		||||
@ -80,17 +80,17 @@
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@koa/cors": "3.1.0",
 | 
			
		||||
    "@koa/router": "10.1.1",
 | 
			
		||||
    "@strapi/admin": "4.3.2",
 | 
			
		||||
    "@strapi/database": "4.3.2",
 | 
			
		||||
    "@strapi/generate-new": "4.3.2",
 | 
			
		||||
    "@strapi/generators": "4.3.2",
 | 
			
		||||
    "@strapi/logger": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-content-manager": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-content-type-builder": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-email": "4.3.2",
 | 
			
		||||
    "@strapi/plugin-upload": "4.3.2",
 | 
			
		||||
    "@strapi/typescript-utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/admin": "4.3.3",
 | 
			
		||||
    "@strapi/database": "4.3.3",
 | 
			
		||||
    "@strapi/generate-new": "4.3.3",
 | 
			
		||||
    "@strapi/generators": "4.3.3",
 | 
			
		||||
    "@strapi/logger": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-content-manager": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-content-type-builder": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-email": "4.3.3",
 | 
			
		||||
    "@strapi/plugin-upload": "4.3.3",
 | 
			
		||||
    "@strapi/typescript-utils": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "bcryptjs": "2.4.3",
 | 
			
		||||
    "boxen": "5.1.2",
 | 
			
		||||
    "chalk": "4.1.2",
 | 
			
		||||
 | 
			
		||||
@ -87,6 +87,12 @@ const fixtures = {
 | 
			
		||||
  ],
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const pagination = {
 | 
			
		||||
  page: 1,
 | 
			
		||||
  pageSize: 25,
 | 
			
		||||
  pageCount: 1,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
describe('Deep Filtering API', () => {
 | 
			
		||||
  beforeAll(async () => {
 | 
			
		||||
    await builder
 | 
			
		||||
@ -119,8 +125,11 @@ describe('Deep Filtering API', () => {
 | 
			
		||||
            filters: { cards: { name: data.card[0].attributes.name } },
 | 
			
		||||
          },
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        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[0]).toMatchObject(data.collector[0]);
 | 
			
		||||
        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(res.body.data.length).toBe(1);
 | 
			
		||||
        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', () => {
 | 
			
		||||
@ -150,7 +199,10 @@ describe('Deep Filtering API', () => {
 | 
			
		||||
            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(res.body.data.length).toBe(2);
 | 
			
		||||
        expect(res.body.data).toEqual(expect.arrayContaining(data.collector.slice(1, 3)));
 | 
			
		||||
@ -173,7 +225,10 @@ describe('Deep Filtering API', () => {
 | 
			
		||||
            _q: '',
 | 
			
		||||
          },
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        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(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(res.body.data.length).toBe(1);
 | 
			
		||||
        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(res.body.data.length).toBe(2);
 | 
			
		||||
        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(res.body.data.length).toBe(1);
 | 
			
		||||
        expect(res.body.data[0]).toMatchObject(data.collector[1]);
 | 
			
		||||
 | 
			
		||||
@ -185,6 +185,7 @@ export const AssetDialog = ({
 | 
			
		||||
        folder={folderToEdit}
 | 
			
		||||
        onClose={() => setFolderToEdit(undefined)}
 | 
			
		||||
        location="content-manager"
 | 
			
		||||
        parentFolderId={queryObject?.folder}
 | 
			
		||||
      />
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "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.",
 | 
			
		||||
  "license": "SEE LICENSE IN LICENSE",
 | 
			
		||||
  "author": {
 | 
			
		||||
@ -23,9 +23,9 @@
 | 
			
		||||
    "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.2",
 | 
			
		||||
    "@strapi/provider-upload-local": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.3",
 | 
			
		||||
    "@strapi/provider-upload-local": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "byte-size": "7.0.1",
 | 
			
		||||
    "cropperjs": "1.5.12",
 | 
			
		||||
    "date-fns": "2.28.0",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/utils",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Shared utilities for the Strapi packages",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "strapi",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/generate-new",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Generate a new Strapi application.",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "generate",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/generators",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Interactive API generator.",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "strapi",
 | 
			
		||||
@ -30,8 +30,8 @@
 | 
			
		||||
  "main": "lib/index.js",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@sindresorhus/slugify": "1.1.0",
 | 
			
		||||
    "@strapi/typescript-utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/typescript-utils": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "chalk": "4.1.2",
 | 
			
		||||
    "fs-extra": "10.0.0",
 | 
			
		||||
    "node-plop": "0.26.3",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/plugin-documentation",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -24,8 +24,8 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "bcryptjs": "2.4.3",
 | 
			
		||||
    "cheerio": "^1.0.0-rc.12",
 | 
			
		||||
    "fs-extra": "10.0.0",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/plugin-graphql",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Adds GraphQL endpoint with default API methods.",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -29,7 +29,7 @@
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@graphql-tools/schema": "8.1.2",
 | 
			
		||||
    "@graphql-tools/utils": "^8.9.0",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "apollo-server-core": "3.1.2",
 | 
			
		||||
    "apollo-server-koa": "3.10.0",
 | 
			
		||||
    "glob": "^7.1.7",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "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",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -24,7 +24,7 @@
 | 
			
		||||
    "test:unit": "jest --verbose"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "lodash": "4.17.21"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/plugin-sentry",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Send Strapi error events to Sentry",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "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",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
@ -27,8 +27,8 @@
 | 
			
		||||
    "test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/helper-plugin": "4.3.3",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "bcryptjs": "2.4.3",
 | 
			
		||||
    "grant-koa": "5.4.8",
 | 
			
		||||
    "jsonwebtoken": "^8.1.0",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-email-amazon-ses",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Amazon SES provider for strapi email",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "email",
 | 
			
		||||
@ -36,7 +36,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "node-ses": "^3.0.3"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-email-mailgun",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Mailgun provider for strapi email plugin",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "email",
 | 
			
		||||
@ -36,7 +36,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "form-data": "^4.0.0",
 | 
			
		||||
    "mailgun.js": "5.2.2"
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-email-nodemailer",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Nodemailer provider for Strapi 3",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "strapi",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-email-sendgrid",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Sendgrid provider for strapi email",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "email",
 | 
			
		||||
@ -37,7 +37,7 @@
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@sendgrid/mail": "7.4.7",
 | 
			
		||||
    "@strapi/utils": "4.3.2"
 | 
			
		||||
    "@strapi/utils": "4.3.3"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=14.19.1 <=16.x.x",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-email-sendmail",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Sendmail provider for strapi email",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "email",
 | 
			
		||||
@ -35,7 +35,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "sendmail": "^1.6.1"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-upload-aws-s3",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "AWS S3 provider for strapi upload",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "upload",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-upload-cloudinary",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Cloudinary provider for strapi upload",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "upload",
 | 
			
		||||
@ -36,7 +36,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "cloudinary": "^1.30.1",
 | 
			
		||||
    "into-stream": "^5.1.0"
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/provider-upload-local",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Local provider for strapi upload",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "upload",
 | 
			
		||||
@ -35,7 +35,7 @@
 | 
			
		||||
    "test": "echo \"no tests yet\""
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@strapi/utils": "4.3.2",
 | 
			
		||||
    "@strapi/utils": "4.3.3",
 | 
			
		||||
    "fs-extra": "10.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
							
								
								
									
										31
									
								
								packages/providers/upload-rackspace/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								packages/providers/upload-rackspace/.gitignore
									
									
									
									
										vendored
									
									
								
							@ -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
 | 
			
		||||
@ -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
 | 
			
		||||
@ -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.
 | 
			
		||||
@ -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,
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  // ...
 | 
			
		||||
];
 | 
			
		||||
```
 | 
			
		||||
@ -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();
 | 
			
		||||
          });
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
@ -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"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/babel-plugin-switch-ee-ce",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "private": false,
 | 
			
		||||
  "description": "Babel plugin to switch from CE to EE at runtime",
 | 
			
		||||
  "repository": "git://github.com/strapi/strapi.git",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/logger",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Strapi's logger",
 | 
			
		||||
  "homepage": "https://strapi.io",
 | 
			
		||||
  "bugs": {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "@strapi/typescript-utils",
 | 
			
		||||
  "version": "4.3.2",
 | 
			
		||||
  "version": "4.3.3",
 | 
			
		||||
  "description": "Typescript support for Strapi",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "strapi",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user