Skip to content

Commit

Permalink
Merge branch 'master' into eslint-update
Browse files Browse the repository at this point in the history
# Conflicts:
#	.eslintrc.js
#	package.json
#	packages/strapi-admin/admin/src/containers/HomePage/CommunityContent.js
#	packages/strapi-admin/admin/src/containers/HomePage/WelcomeContent.js
#	packages/strapi-helper-plugin/lib/src/components/InputTextWithErrors/index.js
#	packages/strapi-hook-bookshelf/lib/index.js
#	packages/strapi-hook-bookshelf/lib/utils/graphql.js
#	packages/strapi-hook-bookshelf/lib/utils/index.js
#	packages/strapi-plugin-content-manager/admin/src/components/FilterOptions/InputWithAutoFocus.js
#	packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js
#	packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js
#	packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js
#	packages/strapi-plugin-content-manager/admin/src/containers/ListPage/index.js
#	packages/strapi-plugin-content-manager/admin/src/containers/SettingPage/index.js
#	packages/strapi-plugin-content-manager/config/policies/routing.js
#	packages/strapi-plugin-content-manager/services/ContentManager.js
#	packages/strapi-plugin-content-type-builder/admin/src/components/TableListRow/index.js
#	packages/strapi-plugin-content-type-builder/admin/src/containers/AttributesPickerModal/index.js
#	packages/strapi-utils/lib/models.js
#	yarn.lock
  • Loading branch information
abdonrd committed Sep 9, 2019
2 parents 3681b20 + d65e60e commit 187a669
Show file tree
Hide file tree
Showing 892 changed files with 43,662 additions and 27,799 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/build/**
**/dist/**
testApp/**
.eslintrc.js
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ module.exports = {
'eslint:recommended',
'plugin:react/recommended',
'plugin:redux-saga/recommended',

'prettier',
],
plugins: ['react', 'redux-saga'],
plugins: ['react', 'redux-saga', 'react-hooks'],
env: {
browser: true,
commonjs: true,
Expand Down Expand Up @@ -42,6 +43,8 @@ module.exports = {
'generator-star-spacing': 0,
'no-console': 0,
'require-atomic-updates': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
settings: {
react: {
Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ We are using ProductBoard to manage our roadmap and feature requests.
Can you please submit your feature request here: https://portal.productboard.com/strapi
-->

- [ ] **I have created my request on the Product Board before I submitted this issue**
- [ ] **I have looked at all the other requests on the Product Board before I submitted this issue**


**Please describe your feature request:**
19 changes: 15 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ services:
- postgresql
- mysql

addons:
postgresql: '10'
apt:
packages:
- postgresql-10
- postgresql-client-10
env:
global:
- PGPORT=5433

sudo: required
dist: trusty

Expand Down Expand Up @@ -31,8 +41,8 @@ install_mongo: &install_mongo
- mkdir -p ./data/db/27000
- ./mongodb-linux-x86_64-3.6.6/bin/mongod --fork --dbpath ./data/db/27017 --syslog --port 27017

install:
- yarn setup
before_script:
- yarn build
- yarn global add -g wait-on

jobs:
Expand All @@ -52,9 +62,11 @@ jobs:
- <<: *e2e_tests
name: 'E2E Postgresql'
before_install:
- sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
- sudo /etc/init.d/postgresql restart
- psql -c 'create database strapi_test;' -U postgres
env:
- DB_STRING='--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=postgres --dbpassword='
- DB_STRING='--dbclient=postgres --dbhost=localhost --dbport=5433 --dbname=strapi_test --dbusername=postgres --dbpassword='

- <<: *e2e_tests
name: 'E2E Mysql'
Expand All @@ -73,7 +85,6 @@ jobs:
<<: *install_mongo
env:
- DB_STRING='--dbclient=mongo --dbhost=localhost --dbport=27017 --dbname=strapi_test --dbusername= --dbpassword='

# - name: 'Cypress tests'
# <<: *install_mongo
# install:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ The administration panel is available at http://localhost:4000/admin
You can run the test suites using different databases:

```bash
$ node test/e2e.js sqlite
$ node test/e2e.js mongo
$ node test/e2e.js postgres
$ node test/e2e.js mysql
$ node test/e2e.js --db=sqlite
$ node test/e2e.js --db=mongo
$ node test/e2e.js --db=postgres
$ node test/e2e.js --db=mysql
```

---
Expand Down
96 changes: 43 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>
<h3 align="center">API creation made simple, secure and fast.</h3>
<p align="center">The most advanced open-source Headless-CMS to build powerful APIs with no effort.</p>
<p align="center">The most advanced open-source headless CMS to build powerful APIs with no effort.</p>
<br />
<p align="center">
<a href="https://www.npmjs.org/package/strapi">
Expand All @@ -25,30 +25,54 @@

<p align="center">
<a href="https://strapi.io">
<img src="https://blog.strapi.io/content/images/2018/08/github_preview-2.png" />
<img src="https://strapi.io/assets/images/readme.png" />
</a>
</p>

<br>

Strapi is a free and open-source Headless CMS delivering your content anywhere you need.
Strapi is a free and open source headless CMS delivering your content anywhere you need.

- **Keep control over your data**. With Strapi, you know where your data is stored and you keep full control at any time.
- **Self hosted**. You can host and scale Strapi projects the way you want. You can choose any hosting platform you want: AWS, Netlify, Heroku, a VPS or a dedicated server. You can scale as you grow, 100% independently.
- **Database agnostic**. You can choose the database you prefer. Strapi works with SQL & NoSQL databases: MongoDB, PostgresQL, MySQL, MariaDB, SQLite.
- **Customisable**. You can easily build your own logic by fully customising APIs, routes or plugins to perfectly fit your needs.
- **Keep control over your data**. With Strapi, you know where your data is stored, and you keep full control at all times.
- **Self hosted**. You can host and scale Strapi projects the way you want. You can choose any hosting platform you want: AWS, Netlify, Heroku, a VPS, or a dedicated server. You can scale as you grow, 100% independent.
- **Database agnostic**. You can choose the database you prefer. Strapi works with SQL & NoSQL databases: MongoDB, PostgreSQL, MySQL, MariaDB, and SQLite.
- **Customizable**. You can quickly build your logic by fully customizing APIs, routes, or plugins to fit your needs perfectly.

## Getting Started

<a href="https://strapi.io/documentation/3.0.0-beta.x/getting-started/quick-start.html" target="_blank">Read the Getting Started tutorial</a> or follow the steps below:

#### 🖐 Requirements
### ⏳ Installation

Install Strapi with this **Quickstart** command to create a Strapi project instantly:

- (Use **yarn** to install the Strapi project (recommended). [Install yarn with these docs](https://yarnpkg.com/lang/en/docs/install/).)

```bash
yarn create strapi-app my-project --quickstart
```

**or**

- (Use npm/npx to install the Strapi project.)

```bash
npx create-strapi-app my-project --quickstart
```

This command generates a brand new project with the default features (authentication, permissions, content management, content type builder & file upload). The **Quickstart** command installs Strapi using a **SQLite** database which is used for prototyping in development.

Enjoy 🎉

### 🖐 Requirements

Complete installation requirements can be found in the documentation under <a href="https://strapi.io/documentation/3.0.0-beta.x/getting-started/install-requirements.html">Installation Requirements</a>.

**Supported operating systems**:

- Ubuntu 18.04/Debian 9.x
- CentOS/RHEL 8
- MacOS Mojave
- Mac O/S Mojave
- Windows 10
- Docker - [Docker-Repo](https://github.com/strapi/strapi-docker)

Expand All @@ -67,44 +91,19 @@ Strapi is a free and open-source Headless CMS delivering your content anywhere y
- PostgreSQL >= 10
- SQLite >= 3

#### ⏳ Installation

```bash
npm install strapi@beta -g
```

**We recommend always using the latest version of Strapi to start your new projects**.

This project is currently in **Beta**. Large breaking changes are unlikely at this stage of the project, but using the latest version of Strapi ensures you have all the latest features and updates. New releases are usually shipped every two weeks to fix/enhance the project.

#### 🏗 Create a new project

```bash
strapi new my-project
```

This command will generate a brand new project with the default features (authentication, permissions, content management, content type builder & file upload).

#### 🚀 Start your project

```bash
cd my-project
strapi develop
```

Congratulations, you made it!

Enjoy 🎉
This project is currently in **Beta**. Significant breaking changes are unlikely at this stage of the project, but using the latest version of Strapi ensures you have all the latest features and updates. New releases are usually shipped every two weeks to fix/enhance the project.

## Features

- **Modern Admin Panel:** Elegant, entirely customizable and a fully extensible admin panel.
- **Modern Admin Panel:** Elegant, entirely customizable, and a fully extensible admin panel.
- **Secure by default:** Reusable policies, CSRF, CORS, P3P, Xframe, XSS, and more.
- **Plugins Oriented:** Install auth system, content management, custom plugins, and more, in seconds.
- **Blazing Fast:** Built on top of Node.js, Strapi delivers amazing performance.
- **Front-end Agnostic:** Use any front-end framework (React, Vue, Angular, etc.), mobile apps or even IoT.
- **Plugins Oriented:** Install auth systems, content management, custom plugins, and more, in seconds.
- **Blazing Fast:** Built on top of Node.js, Strapi delivers impressive performance.
- **Front-end Agnostic:** Use any front-end framework, for example, React, Vue, Angular, mobile apps, or even IoT.
- **Powerful CLI:** Scaffold projects and APIs on the fly.
- **SQL & NoSQL databases:** Works with Mongo, Postgres, MySQL, MariaDB, SQLite.
- **SQL & NoSQL databases:** Works with MongoDB, PostgreSQL, MySQL, MariaDB, and SQLite.

**[See more on our website](https://strapi.io/overview)**.

Expand All @@ -128,19 +127,16 @@ Be aware that the Content Type Builder won't work due to the restriction of writ

Please read our [Contributing Guide](./CONTRIBUTING.md) before submitting a Pull Request to the project.

## Support

For more information on the upcoming version, please take a look to our [ROADMAP](https://github.com/strapi/strapi/projects).
## Community support

#### Community support

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 question:
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:

- [StackOverflow](http://stackoverflow.com/questions/tagged/strapi)
- [Slack](http://slack.strapi.io) (Highly recommended for faster support)
- [Spectrum](https://spectrum.chat/strapi)
- [GitHub](https://github.com/strapi/strapi) (Bug reports, contributions)
- [ProductBoard](https://portal.productboard.com/strapi/tabs/2-under-consideration) (Roadmap, Feature requests)
- [Twitter](https://twitter.com/strapijs) (Get news fast)
- [Twitter](https://twitter.com/strapijs) (Get the news fast)
- [Facebook](https://www.facebook.com/Strapi-616063331867161)
- [YouTube Channel](https://www.youtube.com/strapi) (Learn from Video Tutorials)

Expand All @@ -152,12 +148,6 @@ Follow our [migration guides](https://github.com/strapi/strapi/wiki) on the wiki

Check out our [roadmap](https://portal.productboard.com/strapi) to get informed of the latest features released and the upcoming ones. You may also give us insights and vote for a specific feature.

## Sponsors

[Become a sponsor](https://opencollective.com/strapi#sponsor) and get your logo on our README on GitHub with a link to your site.

<a href="https://opencollective.com/strapi#contributors"><img src="https://opencollective.com/strapi/tiers/sponsor.svg"/></a>

## License

[MIT License](LICENSE.md) Copyright (c) 2015-2019 [Strapi Solutions](https://strapi.io/).
7 changes: 2 additions & 5 deletions cypress/fixtures/api/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
{
"name": "description",
"params": {
"type": "text",
"appearance": {
"WYSIWYG": false
}
"type": "text"
}
},
{
Expand Down Expand Up @@ -56,4 +53,4 @@
}
}
]
}
}
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ module.exports = {
title: '💡 Guides',
children: [
'/3.0.0-beta.x/concepts/concepts',
'/3.0.0-beta.x/guides/api-endpoints',
'/3.0.0-beta.x/guides/api-documentation',
'/3.0.0-beta.x/guides/authentication',
'/3.0.0-beta.x/configurations/configurations',
Expand Down
25 changes: 13 additions & 12 deletions docs/1.x.x/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
::: intro

# Strapi

[![Build Status](https://travis-ci.org/wistityhq/strapi.svg?branch=master)](https://travis-ci.org/wistityhq/strapi)
Expand All @@ -14,7 +15,7 @@ in a matter of hours instead of weeks.
The framework sits on top of [Koa](http://koajs.com/). Its ensemble of small modules work
together to provide simplicity, maintainability, and structural conventions to Node.js applications.

**DISCLAIMER**: *This version is maintained for criticals issues only*.
**DISCLAIMER**: _This version is maintained for criticals issues only_.

## Getting started in a minute

Expand All @@ -29,9 +30,9 @@ $ npm install strapi -g
### Link to the Strapi Studio

> We advise you to use our Studio to build APIs. To do so, you need to create a Strapi account.
[Go to the Strapi Studio to signup](http://studio.strapi.io).
Studio is dedicated to developers to build applications without writing
any single line of code thanks to its powerful set of tools.
> [Go to the Strapi Studio to signup](http://studio.strapi.io).
> Studio is dedicated to developers to build applications without writing
> any single line of code thanks to its powerful set of tools.
After creating an account on the Strapi Studio, you are able to link your machine to your
Strapi Studio account to get access to all features offered by the Strapi ecosystem.
Expand Down Expand Up @@ -99,23 +100,23 @@ thanks to a powerful User Interface.
Log into the Strapi Studio with your user account ([http://studio.strapi.io](http://studio.strapi.io))
and follow the instructions to start the experience.

![Strapi Studio](http://strapi.io/assets/screenshots/studio.png "Strapi Studio")
*Simply manage your APIs and relations thanks to the Strapi Studio.*
![Strapi Studio](http://strapi.io/assets/screenshots/studio.png 'Strapi Studio')
_Simply manage your APIs and relations thanks to the Strapi Studio._

## Manage your data

Strapi comes with a simple but yet powerful dashboard.

![Strapi Dashboard](http://strapi.io/assets/screenshots/create.png "Strapi Dashboard")
*Create, read, update and delete your data.*
![Strapi Dashboard](http://strapi.io/assets/screenshots/create.png 'Strapi Dashboard')
_Create, read, update and delete your data._

![Strapi Dashboard](http://strapi.io/assets/screenshots/permissions.png "Strapi Dashboard")
*Manage user settings, login, registration, groups and permissions on the fly.*
![Strapi Dashboard](http://strapi.io/assets/screenshots/permissions.png 'Strapi Dashboard')
_Manage user settings, login, registration, groups and permissions on the fly._

## Resources

- [Contributing guide]((https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md))
- [MIT License]((https://github.com/strapi/strapi/blob/master/LICENSE.md))
- [Contributing guide](<(https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md)>)
- [MIT License](<(https://github.com/strapi/strapi/blob/master/LICENSE.md)>)

## Links

Expand Down
7 changes: 5 additions & 2 deletions docs/1.x.x/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The following properties can be specified at the top level of your model definit
the defaults for that particular model.

For example, this a basic model `Pet`:

```js
{
"identity": "pet",
Expand Down Expand Up @@ -99,8 +100,9 @@ is enabled). You should never change this property on your models.
```

For example to access to your model function:

```js
Pets.find().exec(function (error, pets) {
Pets.find().exec(function(error, pets) {
if (error) {
console.log(error);
return false;
Expand Down Expand Up @@ -173,6 +175,7 @@ Options can be used to enforce various constraints and add special enhancements
#### type

Specifies the type of data that will be stored in this attribute. One of:

- `string`
- `text`
- `integer`
Expand Down Expand Up @@ -637,8 +640,8 @@ Strapi exposes a handful of lifecycle callbacks by default.
- `beforeDestroy`: `fn(criteria, cb)`
- `afterDestroy`: `fn(deletedRecord, cb)`


For example, this could be your `./api/pet/models/Pet.js` file:

```js
module.exports = {
/**
Expand Down
Loading

0 comments on commit 187a669

Please sign in to comment.