@strapi/strapi 4.11.4 → 4.11.6

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.
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ const CLITable = require('cli-table3');
4
+ const chalk = require('chalk');
5
+
6
+ const strapi = require('../../../../index');
7
+
8
+ module.exports = async () => {
9
+ const appContext = await strapi.compile();
10
+ const app = await strapi(appContext).register();
11
+
12
+ const list = Object.keys(app.components);
13
+
14
+ const infoTable = new CLITable({
15
+ head: [chalk.blue('Name')],
16
+ });
17
+
18
+ list.forEach((name) => infoTable.push([name]));
19
+
20
+ console.log(infoTable.toString());
21
+
22
+ await app.destroy();
23
+ };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ const { getLocalScript } = require('../../../utils/helpers');
4
+
5
+ /**
6
+ * `$ strapi components:list`
7
+ * @param {import('../../../../types/core/commands').AddCommandOptions} options
8
+ */
9
+ module.exports = ({ command }) => {
10
+ command
11
+ .command('components:list')
12
+ .description('List all the application components')
13
+ .action(getLocalScript('components/list'));
14
+ };
@@ -6,6 +6,7 @@ const strapiCommands = {
6
6
  'admin/create-user': require('./actions/admin/create-user/command'),
7
7
  'admin/reset-user-password': require('./actions/admin/reset-user-password/command'),
8
8
  build: require('./actions/build-command/command'), // in 'build-command' to avoid problems with 'build' being commonly ignored
9
+ 'components/list': require('./actions/components/list/command'),
9
10
  'configuration/dump': require('./actions/configuration/dump/command'),
10
11
  'configuration/restore': require('./actions/configuration/restore/command'),
11
12
  console: require('./actions/console/command'),
@@ -327,7 +327,7 @@ const createDefaultImplementation = ({ strapi, db, eventHub, entityValidator })
327
327
  let entitiesToDelete = await db.query(uid).findMany(query);
328
328
 
329
329
  if (!entitiesToDelete.length) {
330
- return null;
330
+ return { count: 0 };
331
331
  }
332
332
 
333
333
  const componentsToDelete = await Promise.all(
@@ -107,10 +107,6 @@ const createServer = (strapi) => {
107
107
  listRoutes() {
108
108
  const allRoutes = [...router.stack];
109
109
 
110
- Object.values(apis).forEach((api) => {
111
- allRoutes.push(...api.listRoutes());
112
- });
113
-
114
110
  return allRoutes;
115
111
  },
116
112
 
@@ -45,6 +45,11 @@ export interface Strapi {
45
45
  */
46
46
  readonly config: any;
47
47
 
48
+ /**
49
+ * Getter for the Strapi admin container
50
+ */
51
+ readonly admin: any;
52
+
48
53
  /**
49
54
  * Getter for the Strapi auth container
50
55
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/strapi",
3
- "version": "4.11.4",
3
+ "version": "4.11.6",
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.11.4",
85
- "@strapi/data-transfer": "4.11.4",
86
- "@strapi/database": "4.11.4",
87
- "@strapi/generate-new": "4.11.4",
88
- "@strapi/generators": "4.11.4",
89
- "@strapi/logger": "4.11.4",
90
- "@strapi/permissions": "4.11.4",
91
- "@strapi/plugin-content-manager": "4.11.4",
92
- "@strapi/plugin-content-type-builder": "4.11.4",
93
- "@strapi/plugin-email": "4.11.4",
94
- "@strapi/plugin-upload": "4.11.4",
95
- "@strapi/typescript-utils": "4.11.4",
96
- "@strapi/utils": "4.11.4",
84
+ "@strapi/admin": "4.11.6",
85
+ "@strapi/data-transfer": "4.11.6",
86
+ "@strapi/database": "4.11.6",
87
+ "@strapi/generate-new": "4.11.6",
88
+ "@strapi/generators": "4.11.6",
89
+ "@strapi/logger": "4.11.6",
90
+ "@strapi/permissions": "4.11.6",
91
+ "@strapi/plugin-content-manager": "4.11.6",
92
+ "@strapi/plugin-content-type-builder": "4.11.6",
93
+ "@strapi/plugin-email": "4.11.6",
94
+ "@strapi/plugin-upload": "4.11.6",
95
+ "@strapi/typescript-utils": "4.11.6",
96
+ "@strapi/utils": "4.11.6",
97
97
  "bcryptjs": "2.4.3",
98
98
  "boxen": "5.1.2",
99
99
  "chalk": "4.1.2",
@@ -142,5 +142,5 @@
142
142
  "node": ">=14.19.1 <=18.x.x",
143
143
  "npm": ">=6.0.0"
144
144
  },
145
- "gitHead": "8d325a695386ab9b578b360bf768cfa25173050f"
145
+ "gitHead": "9d78b84e38df437a7247fc5a66b872b55d59ed88"
146
146
  }