@strapi/strapi 4.13.6 → 4.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,23 +1,15 @@
1
1
  <p align="center">
2
- <a href="https://strapi.io">
3
- <picture>
4
- <source
5
- srcset="https://strapi.io/assets/strapi-logo-dark.svg"
6
- media="(prefers-color-scheme: dark)"
7
- width="318px"
8
- />
9
- <img
10
- src="https://strapi.io/assets/strapi-logo-light.svg"
11
- alt="Strapi logo"
12
- width="318px"
13
- />
14
- </picture>
2
+ <a href="https://strapi.io/#gh-light-mode-only">
3
+ <img src="https://strapi.io/assets/strapi-logo-dark.svg" width="318px" alt="Strapi logo" />
4
+ </a>
5
+ <a href="https://strapi.io/#gh-dark-mode-only">
6
+ <img src="https://strapi.io/assets/strapi-logo-light.svg" width="318px" alt="Strapi logo" />
15
7
  </a>
16
8
  </p>
17
9
 
18
- <h3 align="center">API creation made simple, secure and fast.</h3>
19
- <p align="center">The most advanced open-source headless CMS to build powerful APIs with no effort.</p>
20
- <p align="center"><a href="https://strapi.io/demo">Try live demo</a></p>
10
+ <h3 align="center">Open-source headless CMS, self-hosted or Cloud you’re in control.</h3>
11
+ <p align="center">The leading open-source headless CMS, 100% JavaScript/TypeScript, flexible and fully customizable.</p>
12
+ <p align="center"><a href="https://cloud.strapi.io/signups?source=github1">Cloud</a> · <a href="https://strapi.io/demo">Try live demo</a></p>
21
13
  <br />
22
14
 
23
15
  <p align="center">
@@ -39,18 +31,22 @@
39
31
 
40
32
  <p align="center">
41
33
  <a href="https://strapi.io">
42
- <img src="https://raw.githubusercontent.com/strapi/strapi/0bcebf77b37182fe021cb59cc19be8f5db4a18ac/public/assets/administration_panel.png" alt="Administration panel" />
34
+ <img src="https://raw.githubusercontent.com/strapi/strapi/main/public/assets/admin-demo.gif" alt="Administration panel" />
43
35
  </a>
44
36
  </p>
45
37
 
46
38
  <br>
47
39
 
48
- Strapi is a free and open-source headless CMS delivering your content anywhere you need.
40
+ Strapi Community Edition is a free and open-source headless CMS enabling you to manage any content, anywhere.
49
41
 
50
- - **Keep control over your data**. With Strapi, you know where your data is stored, and you keep full control at all times.
51
- - **Self-hosted**. You can host and scale Strapi projects the way you want. You can choose any hosting platform you want: AWS, Render, Netlify, Heroku, a VPS, or a dedicated server. You can scale as you grow, 100% independent.
52
- - **Database agnostic**. Strapi works with SQL databases. You can choose the database you prefer: PostgreSQL, MySQL, MariaDB, and SQLite.
53
- - **Customizable**. You can quickly build your logic by fully customizing APIs, routes, or plugins to fit your needs perfectly.
42
+ - **Self-hosted or Cloud**: You can host and scale Strapi projects the way you want. You can save time by deploying to [Strapi Cloud](https://cloud.strapi.io/signups?source=github1) or deploy to the hosting platform you want**: AWS, Azure, Google Cloud, DigitalOcean.
43
+ - **Modern Admin Pane**: Elegant, entirely customizable and a fully extensible admin panel.
44
+ - **Multi-database support**: You can choose the database you prefer: PostgreSQL, MySQL, MariaDB, and SQLite.
45
+ - **Customizable**: You can quickly build your logic by fully customizing APIs, routes, or plugins to fit your needs perfectly.
46
+ - **Blazing Fast and Robust**: Built on top of Node.js and TypeScript, Strapi delivers reliable and solid performance.
47
+ - **Front-end Agnostic**: Use any front-end framework (React, Next.js, Vue, Angular, etc.), mobile apps or even IoT.
48
+ - **Secure by default**: Reusable policies, CORS, CSP, P3P, Xframe, XSS, and more.
49
+ - **Powerful CLI**: Scaffold projects and APIs on the fly.
54
50
 
55
51
  ## Getting Started
56
52
 
@@ -115,13 +111,13 @@ Strapi only supports maintenance and LTS versions of Node.js. Please refer to th
115
111
 
116
112
  ## Features
117
113
 
118
- - **Modern Admin Panel:** Elegant, entirely customizable and a fully extensible admin panel.
119
- - **Secure by default:** Reusable policies, CORS, CSP, P3P, Xframe, XSS, and more.
120
- - **Plugins Oriented:** Install the auth system, content management, custom plugins, and more, in seconds.
121
- - **Blazing Fast:** Built on top of Node.js, Strapi delivers amazing performance.
122
- - **Front-end Agnostic:** Use any front-end framework (React, Vue, Angular, etc.), mobile apps or even IoT.
123
- - **Powerful CLI:** Scaffold projects and APIs on the fly.
124
- - **SQL databases:** Works with PostgreSQL, MySQL, MariaDB, and SQLite.
114
+ - **Content Types Builder**: Build the most flexible publishing experience for your content managers, by giving them the freedom to create any page on the go with [fields](https://docs.strapi.io/user-docs/content-manager/writing-content#filling-up-fields), components and [Dynamic Zones](https://docs.strapi.io/user-docs/content-manager/writing-content#dynamic-zones).
115
+ - **Media Library**: Upload your images, videos, audio or documents to the media library. Easily find the right asset, edit and reuse it.
116
+ - **Internationalization**: The Internationalization (i18n) plugin allows Strapi users to create, manage and distribute localized content in different languages, called "locales
117
+ - **Role Based Access Control**: Create an unlimited number of custom roles and permissions for admin and end users.
118
+ - **GraphQL or REST**: Consume the API using REST or GraphQL
119
+
120
+ You can unlock additional features such as SSO, Audit Logs, Review Workflows in [Strapi Cloud](https://cloud.strapi.io/login?source=github1) or [Strapi Enterprise](https://strapi.io/enterprise?source=github1).
125
121
 
126
122
  **[See more on our website](https://strapi.io/overview)**.
127
123
 
@@ -48,7 +48,7 @@ module.exports = async ({ build, watchAdmin, polling, browser }) => {
48
48
 
49
49
  const primaryProcess = async ({ distDir, appDir, build, isTSProject, watchAdmin, browser }) => {
50
50
  if (isTSProject) {
51
- await buildTypeScript({ srcDir: appDir, distDir, watch: false });
51
+ await buildTypeScript({ srcDir: appDir, distDir, ignoreDiagnostics: true });
52
52
  }
53
53
 
54
54
  const config = loadConfiguration({ appDir, distDir });
@@ -84,7 +84,7 @@ const primaryProcess = async ({ distDir, appDir, build, isTSProject, watchAdmin,
84
84
  switch (message) {
85
85
  case 'reload':
86
86
  if (isTSProject) {
87
- await buildTypeScript({ srcDir: appDir, distDir, watch: false });
87
+ await buildTypeScript({ srcDir: appDir, distDir, ignoreDiagnostics: true });
88
88
  }
89
89
 
90
90
  console.info('The server is restarting\n');
@@ -113,21 +113,16 @@ const workerProcess = async ({ appDir, distDir, watchAdmin, polling, isTSProject
113
113
  serveAdminPanel: !watchAdmin,
114
114
  }).load();
115
115
 
116
- /**
117
- * TypeScript automatic type generation upon dev server restart
118
- * Its implementation, configuration and behavior can change in future releases
119
- * @experimental
120
- */
121
- const shouldGenerateTypeScriptTypes = strapiInstance.config.get('typescript.autogenerate', false);
122
-
123
- if (shouldGenerateTypeScriptTypes) {
124
- await tsUtils.generators.generate({
125
- strapi: strapiInstance,
126
- pwd: appDir,
127
- rootDir: undefined,
128
- logger: { silent: true, debug: false },
129
- artifacts: { contentTypes: true, components: true },
130
- });
116
+ await tsUtils.generators.generate({
117
+ strapi: strapiInstance,
118
+ pwd: appDir,
119
+ rootDir: undefined,
120
+ logger: { silent: true, debug: false },
121
+ artifacts: { contentTypes: true, components: true },
122
+ });
123
+
124
+ if (isTSProject) {
125
+ await buildTypeScript({ srcDir: appDir, distDir, ignoreDiagnostics: false });
131
126
  }
132
127
 
133
128
  const adminWatchIgnoreFiles = strapiInstance.config.get('admin.watchIgnoreFiles', []);
@@ -10,7 +10,7 @@ module.exports = async ({ debug, silent, verbose, outDir }) => {
10
10
  process.exit(1);
11
11
  }
12
12
 
13
- const appContext = await strapi.compile();
13
+ const appContext = await strapi.compile({ ignoreDiagnostics: true });
14
14
  const app = await strapi(appContext).register();
15
15
 
16
16
  await tsUtils.generators.generate({
@@ -25,5 +25,5 @@ module.exports = async ({ debug, silent, verbose, outDir }) => {
25
25
  artifacts: { contentTypes: true, components: true },
26
26
  });
27
27
 
28
- app.destroy();
28
+ await app.destroy();
29
29
  };
@@ -19,7 +19,7 @@ const cleanupDistDirectory = async (distDir) => {
19
19
  }
20
20
  };
21
21
 
22
- module.exports = async ({ srcDir, distDir, watch = false }) => {
22
+ module.exports = async ({ srcDir, distDir, ignoreDiagnostics = false }) => {
23
23
  const isTSProject = await tsUtils.isUsingTypeScript(srcDir);
24
24
 
25
25
  if (!isTSProject) {
@@ -28,5 +28,5 @@ module.exports = async ({ srcDir, distDir, watch = false }) => {
28
28
 
29
29
  await cleanupDistDirectory(distDir);
30
30
 
31
- return tsUtils.compile(srcDir, { watch });
31
+ return tsUtils.compile(srcDir, { configOptions: { ignoreDiagnostics } });
32
32
  };
@@ -0,0 +1,13 @@
1
+ interface CompileResult {
2
+ appDir: string;
3
+ distDir: string;
4
+ }
5
+
6
+ interface CompileOptions {
7
+ appDir?: string;
8
+ ignoreDiagnostics?: boolean;
9
+ }
10
+
11
+ type CompileFunction = (options?: CompileOptions) => Promise<CompileResult>;
12
+
13
+ export default CompileFunction;
package/lib/compile.js CHANGED
@@ -2,15 +2,19 @@
2
2
 
3
3
  const tsUtils = require('@strapi/typescript-utils');
4
4
 
5
- module.exports = async (dir) => {
6
- const appDir = dir || process.cwd();
5
+ /**
6
+ * @param {object} [options]
7
+ * @param {string} [options.appDir]
8
+ * @param {boolean} [options.ignoreDiagnostics]
9
+ */
10
+ module.exports = async (options = {}) => {
11
+ const { appDir = process.cwd(), ignoreDiagnostics = false } = options;
7
12
  const isTSProject = await tsUtils.isUsingTypeScript(appDir);
8
13
  const outDir = await tsUtils.resolveOutDir(appDir);
9
14
 
10
15
  if (isTSProject) {
11
16
  await tsUtils.compile(appDir, {
12
- watch: false,
13
- configOptions: { options: { incremental: true } },
17
+ configOptions: { options: { incremental: true }, ignoreDiagnostics },
14
18
  });
15
19
  }
16
20
 
package/lib/index.d.ts CHANGED
@@ -2,5 +2,6 @@ import './global';
2
2
 
3
3
  export * from './types';
4
4
  export * as factories from './factories';
5
+ export * as compile from './compile';
5
6
 
6
7
  export default function (opts): Strapi.Strapi;
@@ -10,6 +10,7 @@ export type DynamicValue =
10
10
  | '$eq'
11
11
  | '$eqi'
12
12
  | '$ne'
13
+ | '$nei'
13
14
  | '$gt'
14
15
  | '$gte'
15
16
  | '$lt'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/strapi",
3
- "version": "4.13.6",
3
+ "version": "4.13.7",
4
4
  "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
5
5
  "keywords": [
6
6
  "strapi",
@@ -81,19 +81,19 @@
81
81
  "dependencies": {
82
82
  "@koa/cors": "3.4.3",
83
83
  "@koa/router": "10.1.1",
84
- "@strapi/admin": "4.13.6",
85
- "@strapi/data-transfer": "4.13.6",
86
- "@strapi/database": "4.13.6",
87
- "@strapi/generate-new": "4.13.6",
88
- "@strapi/generators": "4.13.6",
89
- "@strapi/logger": "4.13.6",
90
- "@strapi/permissions": "4.13.6",
91
- "@strapi/plugin-content-manager": "4.13.6",
92
- "@strapi/plugin-content-type-builder": "4.13.6",
93
- "@strapi/plugin-email": "4.13.6",
94
- "@strapi/plugin-upload": "4.13.6",
95
- "@strapi/typescript-utils": "4.13.6",
96
- "@strapi/utils": "4.13.6",
84
+ "@strapi/admin": "4.13.7",
85
+ "@strapi/data-transfer": "4.13.7",
86
+ "@strapi/database": "4.13.7",
87
+ "@strapi/generate-new": "4.13.7",
88
+ "@strapi/generators": "4.13.7",
89
+ "@strapi/logger": "4.13.7",
90
+ "@strapi/permissions": "4.13.7",
91
+ "@strapi/plugin-content-manager": "4.13.7",
92
+ "@strapi/plugin-content-type-builder": "4.13.7",
93
+ "@strapi/plugin-email": "4.13.7",
94
+ "@strapi/plugin-upload": "4.13.7",
95
+ "@strapi/typescript-utils": "4.13.7",
96
+ "@strapi/utils": "4.13.7",
97
97
  "@vitejs/plugin-react": "4.0.4",
98
98
  "bcryptjs": "2.4.3",
99
99
  "boxen": "5.1.2",
@@ -148,5 +148,5 @@
148
148
  "node": ">=16.0.0 <=20.x.x",
149
149
  "npm": ">=6.0.0"
150
150
  },
151
- "gitHead": "d44586fa075f638f1953bda9623a985c7060e2ad"
151
+ "gitHead": "c11abe88239142c58d6fa4aebea8c30637237424"
152
152
  }