@strapi/strapi 4.12.0-beta.1 → 4.12.0-beta.4
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
|
+
};
|
package/lib/commands/index.js
CHANGED
|
@@ -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'),
|
|
@@ -283,10 +283,8 @@ const createDefaultImplementation = ({ strapi, db, eventHub, entityValidator })
|
|
|
283
283
|
|
|
284
284
|
const validData = await entityValidator.validateEntityUpdate(
|
|
285
285
|
model,
|
|
286
|
-
data,
|
|
287
|
-
{
|
|
288
|
-
isDraft,
|
|
289
|
-
},
|
|
286
|
+
_.omit(data, ['id']), // Omit the id, the cloned entity id will be generated by the database
|
|
287
|
+
{ isDraft },
|
|
290
288
|
entityToClone
|
|
291
289
|
);
|
|
292
290
|
const query = transformParamsToQuery(uid, pickSelectionParams(wrappedParams));
|
|
@@ -327,7 +325,7 @@ const createDefaultImplementation = ({ strapi, db, eventHub, entityValidator })
|
|
|
327
325
|
let entitiesToDelete = await db.query(uid).findMany(query);
|
|
328
326
|
|
|
329
327
|
if (!entitiesToDelete.length) {
|
|
330
|
-
return
|
|
328
|
+
return { count: 0 };
|
|
331
329
|
}
|
|
332
330
|
|
|
333
331
|
const componentsToDelete = await Promise.all(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.12.0-beta.
|
|
3
|
+
"version": "4.12.0-beta.4",
|
|
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.12.0-beta.
|
|
85
|
-
"@strapi/data-transfer": "4.12.0-beta.
|
|
86
|
-
"@strapi/database": "4.12.0-beta.
|
|
87
|
-
"@strapi/generate-new": "4.12.0-beta.
|
|
88
|
-
"@strapi/generators": "4.12.0-beta.
|
|
89
|
-
"@strapi/logger": "4.12.0-beta.
|
|
90
|
-
"@strapi/permissions": "4.12.0-beta.
|
|
91
|
-
"@strapi/plugin-content-manager": "4.12.0-beta.
|
|
92
|
-
"@strapi/plugin-content-type-builder": "4.12.0-beta.
|
|
93
|
-
"@strapi/plugin-email": "4.12.0-beta.
|
|
94
|
-
"@strapi/plugin-upload": "4.12.0-beta.
|
|
95
|
-
"@strapi/typescript-utils": "4.12.0-beta.
|
|
96
|
-
"@strapi/utils": "4.12.0-beta.
|
|
84
|
+
"@strapi/admin": "4.12.0-beta.4",
|
|
85
|
+
"@strapi/data-transfer": "4.12.0-beta.4",
|
|
86
|
+
"@strapi/database": "4.12.0-beta.4",
|
|
87
|
+
"@strapi/generate-new": "4.12.0-beta.4",
|
|
88
|
+
"@strapi/generators": "4.12.0-beta.4",
|
|
89
|
+
"@strapi/logger": "4.12.0-beta.4",
|
|
90
|
+
"@strapi/permissions": "4.12.0-beta.4",
|
|
91
|
+
"@strapi/plugin-content-manager": "4.12.0-beta.4",
|
|
92
|
+
"@strapi/plugin-content-type-builder": "4.12.0-beta.4",
|
|
93
|
+
"@strapi/plugin-email": "4.12.0-beta.4",
|
|
94
|
+
"@strapi/plugin-upload": "4.12.0-beta.4",
|
|
95
|
+
"@strapi/typescript-utils": "4.12.0-beta.4",
|
|
96
|
+
"@strapi/utils": "4.12.0-beta.4",
|
|
97
97
|
"bcryptjs": "2.4.3",
|
|
98
98
|
"boxen": "5.1.2",
|
|
99
99
|
"chalk": "4.1.2",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"package-json": "7.0.0",
|
|
132
132
|
"qs": "6.11.1",
|
|
133
133
|
"resolve-cwd": "3.0.0",
|
|
134
|
-
"semver": "7.5.
|
|
134
|
+
"semver": "7.5.2",
|
|
135
135
|
"statuses": "2.0.1"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"node": ">=14.19.1 <=18.x.x",
|
|
143
143
|
"npm": ">=6.0.0"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "edcf86b496a7bee5189cdbfeb16f5a5c0abccc81"
|
|
146
146
|
}
|