mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 08:04:51 +00:00
Send the useTypescript event in the telemetry usage
This commit is contained in:
parent
973cf6796b
commit
47ae55ed7a
@ -6,6 +6,7 @@ const { isFunction } = require('lodash/fp');
|
||||
const { createLogger } = require('@strapi/logger');
|
||||
const { Database } = require('@strapi/database');
|
||||
const { createAsyncParallelHook } = require('@strapi/utils').hooks;
|
||||
const { isTypeScriptProjectSync } = require('@strapi/typescript-utils');
|
||||
|
||||
const loadConfiguration = require('./core/app-configuration');
|
||||
|
||||
@ -77,6 +78,7 @@ class Strapi {
|
||||
|
||||
// Load the app configuration from the dist directory
|
||||
const appConfig = loadConfiguration(this.dirs.dist.root, opts);
|
||||
appConfig.server.useTypescript = isTypeScriptProjectSync(this.dirs.app.root);
|
||||
|
||||
// Instanciate the Strapi container
|
||||
this.container = createContainer(this);
|
||||
|
||||
@ -47,6 +47,7 @@ module.exports = strapi => {
|
||||
version: strapi.config.get('info.strapi'),
|
||||
strapiVersion: strapi.config.get('info.strapi'),
|
||||
projectType: isEE ? 'Enterprise' : 'Community',
|
||||
useTypescript: strapi.config.server.useTypescript,
|
||||
};
|
||||
|
||||
addPackageJsonStrapiMetadata(anonymous_metadata, strapi);
|
||||
|
||||
@ -82,6 +82,7 @@ function trackError({ scope, error }) {
|
||||
nodeVersion: process.version,
|
||||
docker: scope.docker,
|
||||
useYarn: scope.useYarn,
|
||||
useTypescript: scope.useTypescript,
|
||||
};
|
||||
|
||||
try {
|
||||
@ -108,6 +109,7 @@ function trackUsage({ event, scope, error }) {
|
||||
version: scope.strapiVersion,
|
||||
docker: scope.docker,
|
||||
useYarn: scope.useYarn.toString(),
|
||||
useTypescript: scope.useTypescript.toString(),
|
||||
noRun: (scope.runQuickstartApp !== true).toString(),
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user