File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 25
25
"build-mysql-client" : " dotenv prisma generate -- --schema=./prisma/schema.mysql.prisma" ,
26
26
"build-postgresql-schema" : " dotenv prisma db pull -- --schema=./prisma/schema.postgresql.prisma" ,
27
27
"build-postgresql-client" : " dotenv prisma generate -- --schema=./prisma/schema.postgresql.prisma" ,
28
- "postbuild" : " node scripts/telemetry .js" ,
28
+ "postbuild" : " node scripts/postbuild .js" ,
29
29
"copy-db-schema" : " node scripts/copy-db-schema.js" ,
30
30
"generate-lang" : " npm-run-all extract-lang merge-lang" ,
31
31
"extract-lang" : " formatjs extract \" {pages,components}/**/*.js\" --out-file build/messages.json" ,
Original file line number Diff line number Diff line change
1
+ require ( 'dotenv' ) . config ( ) ;
2
+ const sendTelemetry = require ( './telemetry' ) ;
3
+
4
+ async function run ( ) {
5
+ if ( ! process . env . TELEMETRY_DISABLE ) {
6
+ await sendTelemetry ( ) ;
7
+ }
8
+ }
9
+
10
+ run ( ) ;
Original file line number Diff line number Diff line change 1
- require ( 'dotenv' ) . config ( ) ;
2
1
const fs = require ( 'fs-extra' ) ;
3
2
const path = require ( 'path' ) ;
4
3
const os = require ( 'os' ) ;
@@ -9,7 +8,7 @@ const pkg = require('../package.json');
9
8
const dest = path . resolve ( __dirname , '../.next/cache/umami.json' ) ;
10
9
const url = 'https://telemetry.umami.is/api/collect' ;
11
10
12
- async function run ( ) {
11
+ async function sendTelemetry ( ) {
13
12
await fs . ensureFile ( dest ) ;
14
13
15
14
let json = { } ;
@@ -52,6 +51,4 @@ async function run() {
52
51
}
53
52
}
54
53
55
- if ( ! process . env . TELEMETRY_DISABLED ) {
56
- run ( ) ;
57
- }
54
+ module . exports = sendTelemetry ;
You can’t perform that action at this time.
0 commit comments