Skip to content

Commit

Permalink
Merge branch 'develop' into v5/main
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed Jan 10, 2024
2 parents 6812c79 + 09b9d36 commit f324494
Show file tree
Hide file tree
Showing 196 changed files with 8,298 additions and 882 deletions.
2 changes: 1 addition & 1 deletion .github/actions/check-pr-status/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "check-pr-status",
"version": "4.15.5",
"version": "4.17.0",
"private": true,
"license": "MIT",
"main": "dist/index.js",
Expand Down
24 changes: 24 additions & 0 deletions docs/docs/docs/01-core/content-releases/00-intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Introduction
tags:
- content-releases
---

# Content Releases

A release contains various content entries, each capable of being assigned a specific action such as publish or unpublish. Within a release, entries may be in different locales or come from different content types. With a simple click of a button, a release can execute the designated action for each entry. Content Releases is an enterprise edition feature.

### Architecture

As opposed to other EE features built in the [EE folder](docs/docs/01-core/admin/01-ee/00-intro.md), Releases is built as a plugin. The plugin can be found in:

```
packages/core/content-releases
```

```mdx-code-block
import DocCardList from '@theme/DocCardList';
import { useCurrentSidebarCategory } from '@docusaurus/theme-common';
<DocCardList items={useCurrentSidebarCategory().items} />
```
155 changes: 155 additions & 0 deletions docs/docs/docs/01-core/content-releases/01-backend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
title: Backend Design
description: Content Releases backend
tags:
- content-releases
- tech design
---

All backend code can be found in:

```
packages/core/content-releases/server
```

## Content-types

The content-releases plugin creates two hidden content-types.

### Release

The `Release` content type stores all the information about a release and its associated Release Actions. It is saved in the database as `strapi_releases`. The schema can be found in:

```
packages/core/content-releases/server/src/content-types/release/schema.ts
```

### Release Action

Th `Release Action` content type is associated with any entry from any content-type that has draft and publish enabled. It is responsible for storing the action to perform for an associated entry. It is saved in the database as `strapi_release_actions`. The schema can be found in:

```
packages/core/content-releases/server/src/content-types/release-action/schema.ts
```

## Routes

Release and Release Action routes are only accessible on the Admin API.

### Release

Release routes can be found in:

```
packages/core/content-releases/server/src/routes/release.ts
```

**Get all releases**:

- method: `GET`
- endpoint: `/content-releases/`
- params:
```ts
{
page: number;
pageSize: number;
}
```

**Get a single release**

- method: `GET`
- endpoint: `/content-releases/:id`

**Create a release**:

- method: `POST`
- endpoint: `/content-releases/`
- body:
```ts
{
name: string;
}
```

**Update a release**:

- method: `PUT`
- endpoint: `/content-releases/:id`
- body:
```ts
{
name: string;
}
```

**Publish a release**:

- method: `POST`
- endpoint: `/content-releases/:id/publish`

### Release Action

**Create a release action**

- method: `POST`
- endpoint: `/content-releases/:releaseId/actions`
- body:

```ts
{
entry: {
id: number,
contentType: string
}
type: 'publish' | 'unpublish'
}
```

**Update a release action**

- method: `PUT`
- endpoint: `/content-releases/:releaseId/actions/:actionId`
- body:
```ts
{
type: 'publish' | 'unpublish';
}
```

**Delete a release action**

- method: `DELETE`
- endpoint: `/content-releases/:releaseId/actions/:actionId`

## Controllers

### Release

Handles requests to interact with the Release content type

```
packages/core/content-releases/server/src/controllers/release.ts
```

### Release Action

Handles requests to interact with the Release Action content type

## Services

### Release

Interacts with the database for Release and Release Action CRUD operations

```
packages/core/content-releases/server/src/services/release.ts
```

### Release Validation

Exposes validation functions to run before performing operations on a Release

```
packages/core/content-releases/server/src/services/validation.ts
```
5 changes: 5 additions & 0 deletions docs/docs/docs/01-core/content-releases/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Content Releases",
"collapsible": true,
"collapsed": true
}
32 changes: 32 additions & 0 deletions docs/docs/docs/06-future-flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Future Flags
---

In Strapi, we have incoming features that are not yet ready to be shipped to all users, but we aim to keep them updated with our codebase. Additionally, we want to offer community users the opportunity to provide early feedback on these new features or changes.

To achieve this, we utilize future flags, which provide a way to enable unstable features **at your own risk**. Please considered that these flags may be subject to change, removal and it's possible that they contain breaking changes.

Future flags can be used for unstable features that have not yet been shipped. So, if you decide to enable an unstable feature (prefixed with `unstable`), please be aware that this feature is likely to be modified or even removed. It's also highly probable that this unstable feature is not fully ready for use; some parts may still be under development or using mock data at the moment.

Additionally, future flags can be utilized for enabling coming breaking changes in upcoming versions (when prefixed by `vX`, with 'X' being the target version). In this scenario, if you decide to enable a future flag for a breaking change, please consider that you will need to migrate your application to adapt to this breaking change.

## How to enable a future flag.

To enable a future flag, you should add it to your config/features.(js|ts) file in your Strapi application. If you don't have this file, create one.

```ts
// config/features.ts

export default {
future: {
unstableFeatureName: true,
v5breakingChange: env('STRAPI_FEATURES_FUTURE_V5BREAKINGCHANGE', false),
},
};
```

## How to add and start using a future flag.

Developers are responsible for adding new future flags if they intend to introduce a new unstable feature into the Strapi codebase. Features config is part of the config object and can be easily accessed with `strapi.config.get('features')`.

We also provide an API in the strapi object that allows you to check if a future flag is enabled. You can do this using the following method: `strapi.future.isEnabled('featureName')`.
1 change: 1 addition & 0 deletions examples/getstarted/config/features.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = ({ env }) => ({});
2 changes: 1 addition & 1 deletion examples/getstarted/config/middlewares.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
const responseHandlers = require('./src/response-handlers');

module.exports = [
'strapi::logger',
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
Expand Down
24 changes: 12 additions & 12 deletions examples/getstarted/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "getstarted",
"version": "4.15.5",
"version": "4.17.0",
"private": true,
"description": "A Strapi application.",
"license": "SEE LICENSE IN LICENSE",
Expand All @@ -13,17 +13,17 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/icons": "1.13.2",
"@strapi/plugin-color-picker": "4.15.5",
"@strapi/plugin-documentation": "4.15.5",
"@strapi/plugin-graphql": "4.15.5",
"@strapi/plugin-i18n": "4.15.5",
"@strapi/plugin-sentry": "4.15.5",
"@strapi/plugin-users-permissions": "4.15.5",
"@strapi/provider-email-mailgun": "4.15.5",
"@strapi/provider-upload-aws-s3": "4.15.5",
"@strapi/provider-upload-cloudinary": "4.15.5",
"@strapi/strapi": "4.15.5",
"@strapi/icons": "1.14.1",
"@strapi/plugin-color-picker": "4.17.0",
"@strapi/plugin-documentation": "4.17.0",
"@strapi/plugin-graphql": "4.17.0",
"@strapi/plugin-i18n": "4.17.0",
"@strapi/plugin-sentry": "4.17.0",
"@strapi/plugin-users-permissions": "4.17.0",
"@strapi/provider-email-mailgun": "4.17.0",
"@strapi/provider-upload-aws-s3": "4.17.0",
"@strapi/provider-upload-cloudinary": "4.17.0",
"@strapi/strapi": "4.17.0",
"better-sqlite3": "9.0.0",
"lodash": "4.17.21",
"mysql2": "3.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"dynamiczone": {
"type": "dynamiczone",
"components": ["basic.simple", "blog.test-como"]
"components": ["basic.simple", "blog.test-como", "default.closingperiod"]
},
"one_way_tag": {
"type": "relation",
Expand Down
2 changes: 1 addition & 1 deletion examples/kitchensink-ts/config/middlewares.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default [
'strapi::logger',
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
Expand Down
8 changes: 4 additions & 4 deletions examples/kitchensink-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kitchensink-ts",
"version": "4.15.5",
"version": "4.17.0",
"private": true,
"description": "A Strapi application",
"license": "MIT",
Expand All @@ -14,9 +14,9 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-i18n": "4.15.5",
"@strapi/plugin-users-permissions": "4.15.5",
"@strapi/strapi": "4.15.5",
"@strapi/plugin-i18n": "4.17.0",
"@strapi/plugin-users-permissions": "4.17.0",
"@strapi/strapi": "4.17.0",
"better-sqlite3": "9.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/kitchensink/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kitchensink",
"version": "4.15.5",
"version": "4.17.0",
"private": true,
"description": "A Strapi application.",
"license": "SEE LICENSE IN LICENSE",
Expand All @@ -13,10 +13,10 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/provider-email-mailgun": "4.15.5",
"@strapi/provider-upload-aws-s3": "4.15.5",
"@strapi/provider-upload-cloudinary": "4.15.5",
"@strapi/strapi": "4.15.5",
"@strapi/provider-email-mailgun": "4.17.0",
"@strapi/provider-upload-aws-s3": "4.17.0",
"@strapi/provider-upload-cloudinary": "4.17.0",
"@strapi/strapi": "4.17.0",
"better-sqlite3": "9.0.0",
"lodash": "4.17.21",
"mysql2": "3.6.2",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.15.5",
"version": "4.17.0",
"packages": ["packages/*", "examples/*"],
"npmClient": "yarn",
"useWorkspaces": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"watch": "nx run-many --target=watch --nx-ignore-cycles"
},
"resolutions": {
"@strapi/design-system": "1.14.0-typescript.2",
"@strapi/design-system": "1.15.0-typescript.1",
"@types/koa": "2.13.4"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/admin-test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@strapi/admin-test-utils",
"version": "4.15.5",
"version": "4.17.0",
"private": true,
"description": "Test utilities for the Strapi administration panel",
"license": "MIT",
Expand Down Expand Up @@ -74,8 +74,8 @@
"@reduxjs/toolkit": "1.9.7",
"@strapi/pack-up": "workspace:*",
"@testing-library/jest-dom": "5.16.5",
"eslint-config-custom": "4.15.5",
"tsconfig": "4.15.5"
"eslint-config-custom": "4.17.0",
"tsconfig": "4.17.0"
},
"peerDependencies": {
"@reduxjs/toolkit": "^1.9.7",
Expand Down
Loading

0 comments on commit f324494

Please sign in to comment.