mirror of
https://github.com/strapi/strapi.git
synced 2025-12-05 03:21:22 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
0a283dd7ce
@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
[homepage]: https://contributor-covenant.org
|
||||
[version]: https://contributor-covenant.org/version/1/4/
|
||||
|
||||
@ -152,7 +152,7 @@ $ node test/e2e.js --db=mysql
|
||||
|
||||
### Repository Organization
|
||||
|
||||
We chose to to use a monorepo design that exploits [Yarn Workspaces](https://yarnpkg.com/en/docs/workspaces) in the way [React](https://github.com/facebook/react/tree/master/packages) or [Babel](https://github.com/babel/babel/tree/master/packages) does. This allows the community to easily maintain the whole ecosystem, keep it up-to-date and consistent.
|
||||
We chose to use a monorepo design that exploits [Yarn Workspaces](https://yarnpkg.com/en/docs/workspaces) in the way [React](https://github.com/facebook/react/tree/master/packages) or [Babel](https://github.com/babel/babel/tree/master/packages) does. This allows the community to easily maintain the whole ecosystem, keep it up-to-date and consistent.
|
||||
|
||||
We do our best to keep the master branch as clean as possible, with tests passing at all times. However, it may happen that the master branch moves faster than the release cycle. Therefore check the [releases on npm](https://www.npmjs.com/package/strapi) so that you're always up-to-date with the latest stable version.
|
||||
|
||||
@ -163,7 +163,7 @@ Before submitting an issue you need to make sure:
|
||||
- You are experiencing a concrete technical issue with Strapi.
|
||||
- You have already searched for related [issues](https://github.com/strapi/strapi/issues), and found none open (if you found a related _closed_ issue, please link to it from your post).
|
||||
- You are not asking a question about how to use Strapi or about whether or not Strapi has a certain feature. For general help using Strapi, you may:
|
||||
- Refer to [the official Strapi documentation](http://strapi.io).
|
||||
- Refer to [the official Strapi documentation](https://strapi.io).
|
||||
- Ask a member of the community in the [Strapi Slack Community](https://slack.strapi.io/).
|
||||
- Ask a question on [our community forum](https://forum.strapi.io).
|
||||
- Your issue title is concise, on-topic and polite.
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<a href="https://travis-ci.org/strapi/strapi">
|
||||
<img src="https://travis-ci.org/strapi/strapi.svg?branch=master" alt="Travis Build Status" />
|
||||
</a>
|
||||
<a href="http://slack.strapi.io">
|
||||
<a href="https://slack.strapi.io">
|
||||
<img src="https://slack.strapi.io/badge.svg" alt="Strapi on Slack" />
|
||||
</a>
|
||||
</p>
|
||||
@ -136,7 +136,7 @@ Please read our [Contributing Guide](./CONTRIBUTING.md) before submitting a Pull
|
||||
|
||||
For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/). For additional help, you can use one of these channels to ask a question:
|
||||
|
||||
- [Slack](http://slack.strapi.io) (For live discussion with the Community and Strapi team)
|
||||
- [Slack](https://slack.strapi.io) (For live discussion with the Community and Strapi team)
|
||||
- [GitHub](https://github.com/strapi/strapi) (Bug reports, Contributions)
|
||||
- [Community Forum](https://forum.strapi.io) (Questions and Discussions)
|
||||
- [Academy](https://academy.strapi.io) (Learn the fundamentals of Strapi)
|
||||
|
||||
@ -58,6 +58,7 @@ module.exports = {
|
||||
'<rootDir>/examples/getstarted/',
|
||||
'<rootDir>/packages/strapi-helper-plugin/dist/',
|
||||
'/OLD/',
|
||||
'__tests__',
|
||||
],
|
||||
setupFilesAfterEnv: [
|
||||
'<rootDir>/test/config/front/enzyme-setup.js',
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
"eslint-config-airbnb-base": "^14.0.0",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-plugin-import": "^2.19.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-react": "^7.22.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
@ -82,13 +82,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi Solutions",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi Solutions",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"version": "3.4.5",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"create-strapi-app",
|
||||
"create",
|
||||
@ -29,7 +29,7 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@ -92,6 +92,7 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
############################
|
||||
@ -99,6 +100,9 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
webpack.config.dev.js
|
||||
webpack.config.dev.js
|
||||
|
||||
12
packages/strapi-admin/admin/.gitignore
vendored
12
packages/strapi-admin/admin/.gitignore
vendored
@ -1,12 +0,0 @@
|
||||
# Don't check auto-generated stuff into git
|
||||
coverage
|
||||
node_modules
|
||||
manifest.json
|
||||
plugins.json
|
||||
stats.json
|
||||
package-lock.json
|
||||
|
||||
# Cruft
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
.idea
|
||||
@ -1,101 +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
|
||||
############################
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
test
|
||||
testApp
|
||||
coverage
|
||||
@ -280,7 +280,7 @@ exports[`Admin | components | HeadersInput should render properly should match t
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="css-6q0nyr-Svg"
|
||||
class="css-tj5bde-Svg"
|
||||
focusable="false"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
@ -300,7 +300,7 @@ exports[`Admin | components | HeadersInput should render properly should match t
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="css-6q0nyr-Svg"
|
||||
class="css-tj5bde-Svg"
|
||||
focusable="false"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
|
||||
@ -871,7 +871,7 @@ exports[`<Inputs /> should match the snapshot if type is headers 1`] = `
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="css-6q0nyr-Svg"
|
||||
className="css-tj5bde-Svg"
|
||||
focusable="false"
|
||||
height={20}
|
||||
viewBox="0 0 20 20"
|
||||
@ -893,7 +893,7 @@ exports[`<Inputs /> should match the snapshot if type is headers 1`] = `
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="css-6q0nyr-Svg"
|
||||
className="css-tj5bde-Svg"
|
||||
focusable="false"
|
||||
height={20}
|
||||
viewBox="0 0 20 20"
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
"@fortawesome/fontawesome-free": "^5.11.2",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.15.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.14.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.2",
|
||||
"@fortawesome/react-fontawesome": "^0.1.12",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"axios": "^0.21.1",
|
||||
@ -85,7 +85,7 @@
|
||||
"react-redux": "7.2.0",
|
||||
"react-router": "^5.0.0",
|
||||
"react-router-dom": "^5.0.0",
|
||||
"react-select": "^3.2.0",
|
||||
"react-select": "^4.0.2",
|
||||
"react-transition-group": "4.4.1",
|
||||
"react-virtualized": "^9.21.2",
|
||||
"reactstrap": "8.4.1",
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
############################
|
||||
|
||||
*#
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,3 +102,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-connector-bookshelf)
|
||||
[](https://david-dm.org/strapi/strapi-connector-bookshelf)
|
||||
[](https://travis-ci.org/strapi/strapi-connector-bookshelf)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This built-in connector allows you to use the [Bookshelf ORM](http://bookshelfjs.org/) using the `strapi-connector-knex` connector.
|
||||
|
||||
@ -18,6 +18,6 @@ It is designed to work well with SQLite3, PostgreSQL, MySQL, MariaDB, Microsoft
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-connector-bookshelf",
|
||||
"version": "3.4.5",
|
||||
"description": "Bookshelf hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"bookshelf",
|
||||
"hook",
|
||||
@ -39,13 +39,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
############################
|
||||
|
||||
*#
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,3 +102,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-connector-mongoose)
|
||||
[](https://david-dm.org/strapi/strapi-connector-mongoose)
|
||||
[](https://travis-ci.org/strapi/strapi-connector-mongoose)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This built-in connector allows you to use the [Mongoose ORM](http://mongoosejs.com/).
|
||||
|
||||
@ -16,6 +16,6 @@ This built-in connector allows you to use the [Mongoose ORM](http://mongoosejs.c
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-connector-mongoose",
|
||||
"version": "3.4.5",
|
||||
"description": "Mongoose hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"mongoose",
|
||||
"hook",
|
||||
@ -26,13 +26,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -67,6 +67,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
|
||||
############################
|
||||
@ -75,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -88,8 +90,11 @@ lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -97,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-database)
|
||||
[](https://david-dm.org/strapi/strapi-database)
|
||||
[](https://travis-ci.org/strapi/strapi-database)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This package is strapi's database handling layer. It is responsible for orchestrating database connectors and implementing the logic of strapi's data structures.
|
||||
|
||||
@ -16,7 +16,7 @@ This package is not meant to be used as a standalone module.
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi documentation](http://strapi.io/documentation)
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi documentation](https://strapi.io/documentation)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-database",
|
||||
"version": "3.4.5",
|
||||
"description": "Strapi's database layer",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"main": "./lib/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"no tests yet\""
|
||||
@ -13,7 +13,7 @@
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-api)
|
||||
[](https://david-dm.org/strapi/strapi-generate-api)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-api)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains all the default files for a new API.
|
||||
|
||||
@ -20,6 +20,6 @@ $ strapi generate:api apiName
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-api",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate an API for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -23,13 +23,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-controller)
|
||||
[](https://david-dm.org/strapi/strapi-generate-controller)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-controller)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains the default files for a controller.
|
||||
|
||||
@ -26,6 +26,6 @@ $ strapi generate:controller group user
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-controller",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate a controller for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"controller",
|
||||
"generate",
|
||||
@ -23,13 +23,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-model)
|
||||
[](https://david-dm.org/strapi/strapi-generate-model)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-model)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains the default files for a model.
|
||||
|
||||
@ -26,6 +26,6 @@ $ strapi generate:model group user
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-model",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate a model for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -24,13 +24,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -75,6 +75,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -91,6 +92,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -98,5 +101,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-new)
|
||||
[](https://david-dm.org/strapi/strapi-generate-new)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-new)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains all the default files for a new Strapi application.
|
||||
|
||||
@ -20,6 +20,6 @@ $ strapi new <myAppName>
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-new",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -13,7 +13,7 @@
|
||||
"lib": "./lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/node": "^5.27.3",
|
||||
"@sentry/node": "^6.0.3",
|
||||
"chalk": "^2.4.2",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
@ -32,13 +32,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-plugin)
|
||||
[](https://david-dm.org/strapi/strapi-generate-plugin)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-plugin)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains all the default files for a new plugin.
|
||||
|
||||
@ -20,6 +20,6 @@ $ strapi generate:plugin pluginName
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-plugin",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate an plugin for a Strapi application.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -23,13 +23,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-policy)
|
||||
[](https://david-dm.org/strapi/strapi-generate-policy)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-policy)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains the default files for a policy.
|
||||
|
||||
@ -26,6 +26,6 @@ $ strapi generate:policy isAuthenticated user
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-policy",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate a policy for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -23,13 +23,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate-service)
|
||||
[](https://david-dm.org/strapi/strapi-generate-service)
|
||||
[](https://travis-ci.org/strapi/strapi-generate-service)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This Strapi generator contains the default files for a service.
|
||||
|
||||
@ -26,6 +26,6 @@ $ strapi generate:service sendEmail email
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate-service",
|
||||
"version": "3.4.5",
|
||||
"description": "Generate a service for a Strapi API.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -23,13 +23,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
|
||||
*#
|
||||
ssl
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +102,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-generate)
|
||||
[](https://david-dm.org/strapi/strapi-generate)
|
||||
[](https://travis-ci.org/strapi/strapi-generate)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
Master of ceremonies for generators in the Strapi CLI.
|
||||
|
||||
@ -20,6 +20,6 @@ $ strapi generate:something
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-generate",
|
||||
"version": "3.4.5",
|
||||
"description": "Master of ceremonies for the Strapi generators.",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"generate",
|
||||
"generator",
|
||||
@ -25,13 +25,13 @@
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -69,7 +69,7 @@ const renderButton = () => (
|
||||
<ButtonWrapper>
|
||||
<a
|
||||
className={cn('primary', 'btn')}
|
||||
href="http://strapi.io"
|
||||
href="https://strapi.io"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"main": "dist/strapi-helper-plugin.cjs.min.js",
|
||||
"module": "dist/strapi-helper-plugin.esm.min.js",
|
||||
@ -20,7 +20,7 @@
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
############################
|
||||
|
||||
*#
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,3 +102,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-ejs)
|
||||
[](https://david-dm.org/strapi/strapi-ejs)
|
||||
[](https://travis-ci.org/strapi/strapi)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This built-in hook allows you to use the EJS template engine with custom options.
|
||||
|
||||
@ -50,6 +50,6 @@ This will render the `views/home.ejs` file and you will have access to `<%= titl
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-hook-ejs",
|
||||
"version": "3.4.5",
|
||||
"description": "EJS hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"ejs",
|
||||
"hook",
|
||||
@ -22,13 +22,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
############################
|
||||
|
||||
*#
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,3 +102,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-redis)
|
||||
[](https://david-dm.org/strapi/strapi-redis)
|
||||
[](https://travis-ci.org/strapi/strapi-redis)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
This built-in hook allows you to use [Redis](https://redis.io/) as a databases connection. Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.
|
||||
|
||||
@ -18,6 +18,6 @@ We developed this hook to use Redis as cache database for our Strapi apps.
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-hook-redis",
|
||||
"version": "3.4.5",
|
||||
"description": "Redis hook for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"redis",
|
||||
"hook",
|
||||
@ -24,13 +24,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -76,6 +76,7 @@ $RECYCLE.BIN/
|
||||
############################
|
||||
|
||||
*#
|
||||
.editorconfig
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
@ -92,6 +93,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,3 +102,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[](https://www.npmjs.org/package/strapi-middleware-views)
|
||||
[](https://david-dm.org/strapi/strapi-middleware-views)
|
||||
[](https://travis-ci.org/strapi/strapi-middleware-views)
|
||||
[](http://slack.strapi.io)
|
||||
[](https://slack.strapi.io)
|
||||
|
||||
Views middleware to enable server-side rendering for the Strapi framework. It will let you use [koa-views](https://www.npmjs.com/package/koa-views) and [consolidate](https://github.com/tj/consolidate.js/).
|
||||
|
||||
@ -14,6 +14,6 @@ Views middleware to enable server-side rendering for the Strapi framework. It wi
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-middleware-views",
|
||||
"version": "3.4.5",
|
||||
"description": "Views middleware to enable server-side rendering for the Strapi framework",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"redis",
|
||||
"hook",
|
||||
@ -22,13 +22,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -92,6 +92,8 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +101,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -1,101 +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
|
||||
############################
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
test
|
||||
testApp
|
||||
coverage
|
||||
@ -1,7 +1,7 @@
|
||||
import styled from 'styled-components';
|
||||
|
||||
const Container = styled.div`
|
||||
padding: 18px 30px 18px 30px;
|
||||
padding: 18px 30px 66px 30px;
|
||||
`;
|
||||
|
||||
export default Container;
|
||||
|
||||
@ -42,6 +42,7 @@ const InputUID = ({
|
||||
contentTypeUID,
|
||||
description,
|
||||
error: inputError,
|
||||
label: inputLabel,
|
||||
name,
|
||||
onChange,
|
||||
validations,
|
||||
@ -217,7 +218,7 @@ const InputUID = ({
|
||||
|
||||
return (
|
||||
<Wrapper ref={wrapperRef}>
|
||||
<Name htmlFor={name}>{name}</Name>
|
||||
<Name htmlFor={name}>{inputLabel}</Name>
|
||||
<InputContainer>
|
||||
<Input
|
||||
{...inputProps}
|
||||
@ -291,6 +292,7 @@ InputUID.propTypes = {
|
||||
description: PropTypes.string,
|
||||
editable: PropTypes.bool,
|
||||
error: PropTypes.string,
|
||||
label: PropTypes.string.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
validations: PropTypes.object,
|
||||
|
||||
@ -212,13 +212,6 @@ const createYupSchema = (
|
||||
const createYupSchemaAttribute = (type, validations, options) => {
|
||||
let schema = yup.mixed();
|
||||
|
||||
let regex = get(validations, 'regex', null);
|
||||
delete validations.regex;
|
||||
|
||||
if (regex) {
|
||||
validations.regex = new RegExp(regex);
|
||||
}
|
||||
|
||||
if (['string', 'uid', 'text', 'richtext', 'email', 'password', 'enumeration'].includes(type)) {
|
||||
schema = yup.string();
|
||||
}
|
||||
@ -341,7 +334,7 @@ const createYupSchemaAttribute = (type, validations, options) => {
|
||||
break;
|
||||
}
|
||||
case 'regex':
|
||||
schema = schema.matches(validationValue, errorsTrads.regex);
|
||||
schema = schema.matches(new RegExp(validationValue), errorsTrads.regex);
|
||||
break;
|
||||
case 'lowercase':
|
||||
if (['text', 'textarea', 'email', 'string'].includes(type)) {
|
||||
|
||||
@ -53,13 +53,13 @@
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -92,12 +92,16 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -1,101 +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
|
||||
############################
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
test
|
||||
testApp
|
||||
coverage
|
||||
@ -38,13 +38,13 @@
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -36,18 +36,18 @@
|
||||
"redux-immutable": "^4.0.0",
|
||||
"reselect": "^4.0.0",
|
||||
"strapi-helper-plugin": "3.4.5",
|
||||
"swagger-ui-dist": "3.39.0"
|
||||
"swagger-ui-dist": "3.41.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "soupette",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
{
|
||||
"name": "soupette",
|
||||
|
||||
@ -92,6 +92,8 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +101,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -23,13 +23,13 @@
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -92,6 +92,8 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +101,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
"apollo-server-koa": "2.19.1",
|
||||
"dataloader": "^1.4.0",
|
||||
"glob": "^7.1.6",
|
||||
"graphql": "15.4.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-depth-limit": "^1.1.0",
|
||||
"graphql-iso-date": "^3.6.1",
|
||||
"graphql-playground-middleware-koa": "^1.6.21",
|
||||
|
||||
@ -92,6 +92,8 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +101,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -1,18 +1,36 @@
|
||||
import React, { useEffect, useReducer, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import styled from 'styled-components';
|
||||
import { FormattedMessage, useIntl } from 'react-intl';
|
||||
import Duration from '../Duration';
|
||||
import LoadingIndicator from '../LoadingIndicator';
|
||||
import PlayIcon from '../PlayIcon';
|
||||
import Wrapper from './Wrapper';
|
||||
import CanvasWrapper from './CanvasWrapper';
|
||||
import Thumbnail from './Thumbnail';
|
||||
|
||||
import reducer, { initialState } from './reducer';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
|
||||
const EmptyPreview = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: ${({ theme }) => theme.main.sizes.fonts.xs};
|
||||
color: ${({ theme }) => theme.main.colors.grey};
|
||||
`;
|
||||
|
||||
const VideoPreview = ({ hasIcon, previewUrl, src }) => {
|
||||
const { formatMessage } = useIntl();
|
||||
const [reducerState, dispatch] = useReducer(reducer, initialState);
|
||||
const { duration, dataLoaded, isHover, metadataLoaded, snapshot, seeked } = reducerState.toJS();
|
||||
const {
|
||||
duration,
|
||||
dataLoaded,
|
||||
isHover,
|
||||
metadataLoaded,
|
||||
snapshot,
|
||||
seeked,
|
||||
isError,
|
||||
} = reducerState.toJS();
|
||||
|
||||
// Adapted from https://github.com/brothatru/react-video-thumbnail/blob/master/src/components/VideoThumbnail.js
|
||||
// And from https://github.com/soupette/poc-video-preview
|
||||
@ -51,6 +69,14 @@ const VideoPreview = ({ hasIcon, previewUrl, src }) => {
|
||||
}
|
||||
}, [dataLoaded, metadataLoaded, seeked, snapshot]);
|
||||
|
||||
if (isError) {
|
||||
return (
|
||||
<EmptyPreview>
|
||||
<FormattedMessage id={getTrad('list.assets.not-supported-content')} />
|
||||
</EmptyPreview>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Wrapper
|
||||
// Specify isHover to prevent bad behavior when compo is under the cursor on modal open
|
||||
@ -67,17 +93,35 @@ const VideoPreview = ({ hasIcon, previewUrl, src }) => {
|
||||
});
|
||||
}}
|
||||
>
|
||||
{!snapshot && <LoadingIndicator />}
|
||||
{!snapshot && (
|
||||
<LoadingIndicator
|
||||
aria-label={formatMessage(
|
||||
{
|
||||
id: getTrad('list.assets.loading-asset'),
|
||||
},
|
||||
{ path: src }
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<CanvasWrapper>
|
||||
{previewUrl ? (
|
||||
<Thumbnail src={previewUrl} />
|
||||
<Thumbnail
|
||||
src={previewUrl}
|
||||
alt={formatMessage(
|
||||
{
|
||||
id: getTrad('list.assets.preview-asset'),
|
||||
},
|
||||
{ path: src }
|
||||
)}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<video
|
||||
muted
|
||||
ref={videoRef}
|
||||
src={src}
|
||||
crossOrigin="anonymous"
|
||||
onError={() => dispatch({ type: 'SET_ERROR', isError: true })}
|
||||
onLoadedMetadata={() => {
|
||||
dispatch({
|
||||
type: 'METADATA_LOADED',
|
||||
@ -99,6 +143,7 @@ const VideoPreview = ({ hasIcon, previewUrl, src }) => {
|
||||
</>
|
||||
)}
|
||||
<Duration duration={duration} />
|
||||
|
||||
{(hasIcon || isHover) && <PlayIcon small />}
|
||||
</CanvasWrapper>
|
||||
</Wrapper>
|
||||
|
||||
@ -7,6 +7,7 @@ const initialState = fromJS({
|
||||
metadataLoaded: false,
|
||||
seeked: false,
|
||||
snapshot: false,
|
||||
isError: false,
|
||||
});
|
||||
|
||||
const videoReducer = (state, action) => {
|
||||
@ -21,6 +22,8 @@ const videoReducer = (state, action) => {
|
||||
return state.update('isHover', () => action.isHover);
|
||||
case 'SET_SNAPSHOT':
|
||||
return state.update('snapshot', () => action.snapshot);
|
||||
case 'SET_ERROR':
|
||||
return state.update('isError', () => action.isError);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
import React from 'react';
|
||||
import { screen, render, fireEvent } from '@testing-library/react';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
import VideoPreview from '..';
|
||||
import themes from '../../../../../../strapi-admin/admin/src/themes';
|
||||
|
||||
jest.mock('react-intl', () => ({
|
||||
// eslint-disable-next-line react/prop-types
|
||||
FormattedMessage: ({ id }) => <div>{id}</div>,
|
||||
useIntl: () => ({
|
||||
formatMessage: ({ id }) => id,
|
||||
}),
|
||||
}));
|
||||
|
||||
describe('VideoPreview', () => {
|
||||
it('shows its initial state with no props', () => {
|
||||
const { container } = render(
|
||||
<ThemeProvider theme={themes}>
|
||||
<VideoPreview />
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('shows a loading state when resolving the asset', () => {
|
||||
render(
|
||||
<ThemeProvider theme={themes}>
|
||||
<VideoPreview
|
||||
hasIcon
|
||||
previewUrl="https://some-preview-url/img.jpg"
|
||||
src="https://something-good/video.mp4"
|
||||
/>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
expect(screen.getByLabelText('upload.list.assets.loading-asset')).toBeVisible();
|
||||
});
|
||||
|
||||
it('shows the thumbnail but not the video when previewURL is passed', () => {
|
||||
const { container } = render(
|
||||
<ThemeProvider theme={themes}>
|
||||
<VideoPreview
|
||||
hasIcon
|
||||
previewUrl="https://some-preview-url/img.jpg"
|
||||
src="https://something-good/video.mp4"
|
||||
/>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
expect(screen.getByAltText('upload.list.assets.preview-asset')).toBeVisible();
|
||||
|
||||
expect(container.querySelector('video')).toBeFalsy();
|
||||
});
|
||||
|
||||
it('shows the video when the previewURL is not passed', () => {
|
||||
const { container } = render(
|
||||
<ThemeProvider theme={themes}>
|
||||
<VideoPreview hasIcon src="https://something-good/video.mp4" />
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
expect(container.querySelector('video')).toBeVisible();
|
||||
});
|
||||
|
||||
it('shows a fallback message when the video is in error', () => {
|
||||
const { container } = render(
|
||||
<ThemeProvider theme={themes}>
|
||||
<VideoPreview hasIcon src="https://something-good/video.wvf" />
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
fireEvent(container.querySelector('video'), new Event('error'));
|
||||
|
||||
expect(screen.getByText('upload.list.assets.not-supported-content')).toBeVisible();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,118 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`VideoPreview shows its initial state with no props 1`] = `
|
||||
.c3 {
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
color: #ffffff;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.c4 {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
padding: 3px 5px;
|
||||
border-radius: 2px;
|
||||
background-color: #333740;
|
||||
}
|
||||
|
||||
.c1 {
|
||||
position: relative;
|
||||
width: 44%;
|
||||
height: 4px;
|
||||
overflow: hidden;
|
||||
background-color: #515764;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.c1:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100px;
|
||||
width: 100px;
|
||||
height: 4px;
|
||||
background-color: #b3b5b9;
|
||||
-webkit-animation: gPeyzP 2s linear infinite;
|
||||
animation: gPeyzP 2s linear infinite;
|
||||
}
|
||||
|
||||
.c0 {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.c0 video {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.c2 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.c2 canvas {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="c0"
|
||||
>
|
||||
<div
|
||||
aria-label="upload.list.assets.loading-asset"
|
||||
class="c1"
|
||||
/>
|
||||
<div
|
||||
class="c2"
|
||||
>
|
||||
<video />
|
||||
<canvas />
|
||||
<p
|
||||
class="c3 c4"
|
||||
color="white"
|
||||
font-size="md"
|
||||
font-weight="semiBold"
|
||||
>
|
||||
00:00
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@ -79,4 +79,17 @@ describe('Upload | components | VideoPreview | reducer', () => {
|
||||
|
||||
expect(reducer(state, action)).toEqual(expectedState);
|
||||
});
|
||||
|
||||
it('should set isError to true when the payload is true', () => {
|
||||
const state = initialState;
|
||||
|
||||
const action = {
|
||||
type: 'SET_ERROR',
|
||||
isError: true,
|
||||
};
|
||||
|
||||
const expectedState = state.set('isError', true);
|
||||
|
||||
expect(reducer(state, action)).toEqual(expectedState);
|
||||
});
|
||||
});
|
||||
|
||||
@ -35,6 +35,9 @@
|
||||
"list.assets.selected.plural": "{number} assets selected",
|
||||
"list.assets.selected.singular": "{number} asset selected",
|
||||
"list.assets.type-not-allowed": "This type of file is not allowed.",
|
||||
"list.assets.not-supported-content": "No preview available",
|
||||
"list.assets.loading-asset": "Loading the preview for the media: {path}",
|
||||
"list.assets.preview-asset": "Preview for the video at path {path}",
|
||||
"modal.file-details.date": "Date",
|
||||
"modal.file-details.dimensions": "Dimensions",
|
||||
"modal.file-details.extension": "Extension",
|
||||
|
||||
@ -35,6 +35,9 @@
|
||||
"list.assets.selected.plural": "{number} médias sélectionnés",
|
||||
"list.assets.selected.singular": "{number} média sélectionné",
|
||||
"list.assets.type-not-allowed": "Ce type de fichier n'est pas autorisé.",
|
||||
"list.assets.not-supported-content": "Preview non disponible",
|
||||
"list.assets.loading-asset": "Chargement du contenu pour le media {path}",
|
||||
"list.assets.preview-asset": "Preview de la vidéo {path}",
|
||||
"modal.file-details.date": "Date",
|
||||
"modal.file-details.dimensions": "Dimensions",
|
||||
"modal.file-details.extension": "Extension",
|
||||
|
||||
@ -3,5 +3,6 @@
|
||||
"provider": "local",
|
||||
"providerOptions": {
|
||||
"sizeLimit": 1000000
|
||||
}
|
||||
},
|
||||
"actionOptions": {}
|
||||
}
|
||||
|
||||
@ -36,14 +36,18 @@ const wrapFunctionForErrors = fn => async (...args) => {
|
||||
}
|
||||
};
|
||||
|
||||
const createProvider = ({ provider, providerOptions }) => {
|
||||
const createProvider = ({ provider, providerOptions, actionOptions = {} }) => {
|
||||
try {
|
||||
const providerInstance = require(`strapi-provider-upload-${provider}`).init(providerOptions);
|
||||
|
||||
return Object.assign(Object.create(baseProvider), {
|
||||
...providerInstance,
|
||||
upload: wrapFunctionForErrors(providerInstance.upload.bind(providerInstance)),
|
||||
delete: wrapFunctionForErrors(providerInstance.delete.bind(providerInstance)),
|
||||
upload: wrapFunctionForErrors((file, options = actionOptions.upload) => {
|
||||
return providerInstance.upload(file, options);
|
||||
}),
|
||||
delete: wrapFunctionForErrors((file, options = actionOptions.delete) => {
|
||||
return providerInstance.delete(file, options);
|
||||
}),
|
||||
});
|
||||
} catch (err) {
|
||||
strapi.log.error(err);
|
||||
|
||||
@ -87,12 +87,14 @@ const optimize = async buffer => {
|
||||
.catch(() => ({ buffer }));
|
||||
};
|
||||
|
||||
const BREAKPOINTS = {
|
||||
const DEFAULT_BREAKPOINTS = {
|
||||
large: 1000,
|
||||
medium: 750,
|
||||
small: 500,
|
||||
};
|
||||
|
||||
const getBreakpoints = () => strapi.config.get('plugins.upload.breakpoints', DEFAULT_BREAKPOINTS);
|
||||
|
||||
const generateResponsiveFormats = async file => {
|
||||
const {
|
||||
responsiveDimensions = false,
|
||||
@ -106,9 +108,10 @@ const generateResponsiveFormats = async file => {
|
||||
|
||||
const originalDimensions = await getDimensions(file.buffer);
|
||||
|
||||
const breakpoints = getBreakpoints();
|
||||
return Promise.all(
|
||||
Object.keys(BREAKPOINTS).map(key => {
|
||||
const breakpoint = BREAKPOINTS[key];
|
||||
Object.keys(breakpoints).map(key => {
|
||||
const breakpoint = breakpoints[key];
|
||||
|
||||
if (breakpointSmallerThan(breakpoint, originalDimensions)) {
|
||||
return generateBreakpoint(key, { file, breakpoint, originalDimensions });
|
||||
|
||||
@ -92,6 +92,8 @@ logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -99,5 +101,8 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
testApp
|
||||
coverage
|
||||
|
||||
@ -1,101 +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
|
||||
############################
|
||||
|
||||
*.log
|
||||
*.sql
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
test
|
||||
testApp
|
||||
coverage
|
||||
@ -45,13 +45,13 @@
|
||||
"author": {
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -95,6 +95,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -102,3 +104,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-provider-email-amazon-ses",
|
||||
"version": "3.4.5",
|
||||
"description": "Amazon SES provider for strapi email",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"email",
|
||||
"strapi",
|
||||
@ -25,7 +25,7 @@
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -95,6 +95,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -102,3 +104,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-provider-email-mailgun",
|
||||
"version": "3.4.5",
|
||||
"description": "Mailgun provider for strapi email plugin",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"email",
|
||||
"strapi",
|
||||
@ -22,13 +22,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-provider-email-nodemailer",
|
||||
"version": "3.4.5",
|
||||
"description": "Nodemailer provider for Strapi 3",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"strapi",
|
||||
"email",
|
||||
@ -48,7 +48,7 @@
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
||||
@ -95,6 +95,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -102,3 +104,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-provider-email-sendgrid",
|
||||
"version": "3.4.5",
|
||||
"description": "Sendgrid provider for strapi email",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"email",
|
||||
"strapi",
|
||||
@ -22,13 +22,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -95,6 +95,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -102,3 +104,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "strapi-provider-email-sendmail",
|
||||
"version": "3.4.5",
|
||||
"description": "Sendmail provider for strapi email",
|
||||
"homepage": "http://strapi.io",
|
||||
"homepage": "https://strapi.io",
|
||||
"keywords": [
|
||||
"email",
|
||||
"strapi"
|
||||
@ -21,13 +21,13 @@
|
||||
"author": {
|
||||
"email": "hi@strapi.io",
|
||||
"name": "Strapi team",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Strapi team",
|
||||
"email": "hi@strapi.io",
|
||||
"url": "http://strapi.io"
|
||||
"url": "https://strapi.io"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
||||
@ -95,6 +95,8 @@ results
|
||||
build
|
||||
node_modules
|
||||
.node_history
|
||||
.snyk
|
||||
|
||||
|
||||
|
||||
############################
|
||||
@ -102,3 +104,6 @@ node_modules
|
||||
############################
|
||||
|
||||
test
|
||||
tests
|
||||
__tests__
|
||||
jest.config.js
|
||||
|
||||
@ -34,6 +34,6 @@ module.exports = ({ env }) => ({
|
||||
|
||||
## Links
|
||||
|
||||
- [Strapi website](http://strapi.io/)
|
||||
- [Strapi community on Slack](http://slack.strapi.io)
|
||||
- [Strapi website](https://strapi.io/)
|
||||
- [Strapi community on Slack](https://slack.strapi.io)
|
||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user