@strapi/strapi 4.9.0 → 4.9.1

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/bin/strapi.js CHANGED
@@ -258,6 +258,14 @@ program
258
258
  .description('Enable anonymous telemetry and metadata sending to Strapi analytics')
259
259
  .action(getLocalScript('opt-in-telemetry'));
260
260
 
261
+ program
262
+ .command('report')
263
+ .description('Get system stats for debugging and submitting issues')
264
+ .option('-u, --uuid', 'Include Project UUID')
265
+ .option('-d, --dependencies', 'Include Project Dependencies')
266
+ .option('--all', 'Include All Information')
267
+ .action(getLocalScript('report'));
268
+
261
269
  program
262
270
  .command('ts:generate-types')
263
271
  .description(`Generate TypeScript typings for your schemas`)
package/lib/Strapi.js CHANGED
@@ -468,7 +468,7 @@ class Strapi {
468
468
  await this.startWebhooks();
469
469
 
470
470
  await this.server.initMiddlewares();
471
- await this.server.initRouting();
471
+ this.server.initRouting();
472
472
 
473
473
  await this.contentAPI.permissions.registerActions();
474
474
 
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ const { EOL } = require('os');
4
+ const strapi = require('../index');
5
+
6
+ module.exports = async ({ uuid, dependencies, all }) => {
7
+ const config = {
8
+ reportUUID: Boolean(all || uuid),
9
+ reportDependencies: Boolean(all || dependencies),
10
+ };
11
+
12
+ const appContext = await strapi.compile();
13
+ const app = await strapi(appContext).register();
14
+
15
+ let debugInfo = `Launched In: ${Date.now() - app.config.launchedAt} ms
16
+ Environment: ${app.config.environment}
17
+ OS: ${process.platform}-${process.arch}
18
+ Strapi Version: ${app.config.info.strapi}
19
+ Node/Yarn Version: ${process.env.npm_config_user_agent}
20
+ Edition: ${app.EE ? 'Enterprise' : 'Community'}
21
+ Database: ${app?.config?.database?.connection?.client ?? 'unknown'}`;
22
+
23
+ if (config.reportUUID) {
24
+ debugInfo += `${EOL}UUID: ${app.config.uuid}`;
25
+ }
26
+
27
+ if (config.reportDependencies) {
28
+ debugInfo += `${EOL}Dependencies: ${JSON.stringify(app.config.info.dependencies, null, 2)}
29
+ Dev Dependencies: ${JSON.stringify(app.config.info.devDependencies, null, 2)}`;
30
+ }
31
+
32
+ console.log(debugInfo);
33
+
34
+ await app.destroy();
35
+ };
@@ -92,8 +92,8 @@ const createServer = (strapi) => {
92
92
  return this;
93
93
  },
94
94
 
95
- async initRouting() {
96
- await registerAllRoutes(strapi);
95
+ initRouting() {
96
+ registerAllRoutes(strapi);
97
97
 
98
98
  return this;
99
99
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/strapi",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
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",
@@ -74,26 +74,26 @@
74
74
  },
75
75
  "scripts": {
76
76
  "postinstall": "node lib/utils/success.js",
77
- "test:unit": "jest",
78
- "test:unit:watch": "jest --watch",
79
- "lint": "eslint ."
77
+ "test:unit": "run -T jest",
78
+ "test:unit:watch": "run -T jest --watch",
79
+ "lint": "run -T eslint ."
80
80
  },
81
81
  "dependencies": {
82
82
  "@koa/cors": "3.4.3",
83
83
  "@koa/router": "10.1.1",
84
- "@strapi/admin": "4.9.0",
85
- "@strapi/data-transfer": "4.9.0",
86
- "@strapi/database": "4.9.0",
87
- "@strapi/generate-new": "4.9.0",
88
- "@strapi/generators": "4.9.0",
89
- "@strapi/logger": "4.9.0",
90
- "@strapi/permissions": "4.9.0",
91
- "@strapi/plugin-content-manager": "4.9.0",
92
- "@strapi/plugin-content-type-builder": "4.9.0",
93
- "@strapi/plugin-email": "4.9.0",
94
- "@strapi/plugin-upload": "4.9.0",
95
- "@strapi/typescript-utils": "4.9.0",
96
- "@strapi/utils": "4.9.0",
84
+ "@strapi/admin": "4.9.1",
85
+ "@strapi/data-transfer": "4.9.1",
86
+ "@strapi/database": "4.9.1",
87
+ "@strapi/generate-new": "4.9.1",
88
+ "@strapi/generators": "4.9.1",
89
+ "@strapi/logger": "4.9.1",
90
+ "@strapi/permissions": "4.9.1",
91
+ "@strapi/plugin-content-manager": "4.9.1",
92
+ "@strapi/plugin-content-type-builder": "4.9.1",
93
+ "@strapi/plugin-email": "4.9.1",
94
+ "@strapi/plugin-upload": "4.9.1",
95
+ "@strapi/typescript-utils": "4.9.1",
96
+ "@strapi/utils": "4.9.1",
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": "ffe3f4621ccc968ce56fda9a8317ec30d4bad205"
145
+ "gitHead": "c8f2f0543b45dda8eadde21a0782b64d156fc786"
146
146
  }