File tree 10 files changed +68
-49
lines changed
10 files changed +68
-49
lines changed Original file line number Diff line number Diff line change 449
449
}
450
450
},
451
451
"engines" : {
452
- "node" : " >=16.20 .1" ,
452
+ "node" : " >=20.11 .1" ,
453
453
"yarn" : " >=1.22.19"
454
454
},
455
455
"prettier" : {
Original file line number Diff line number Diff line change 8
8
"url" : " https://ever.co"
9
9
},
10
10
"license" : " AGPL-3.0" ,
11
+ "repository" : {
12
+ "type" : " git" ,
13
+ "url" : " https://github.com/ever-co/ever-gauzy"
14
+ },
15
+ "bugs" : {
16
+ "url" : " https://github.com/ever-co/ever-gauzy/issues"
17
+ },
18
+ "homepage" : " https://ever.co" ,
19
+ "keywords" : [
20
+ " gauzy" ,
21
+ " angular" ,
22
+ " configuration" ,
23
+ " environment" ,
24
+ " settings" ,
25
+ " library"
26
+ ],
11
27
"private" : true ,
12
28
"main" : " dist/index.js" ,
13
29
"types" : " dist/index.d.ts" ,
23
39
},
24
40
"scripts" : {
25
41
"build" : " rimraf dist && yarn run compile" ,
26
- "build:prod" : " node replaceEnvFiles.js && yarn build" ,
27
- "compile" : " tsc -p tsconfig.build.json"
42
+ "build:prod" : " cross-env NODE_ENV=production yarn ts-node scripts/replace-env-files.ts --environment=prod && yarn build" ,
43
+ "compile" : " tsc -p tsconfig.build.json" ,
44
+ "clean" : " rimraf dist"
28
45
},
29
- "keywords" : [],
30
46
"dependencies" : {
31
47
"@nestjs/config" : " ^3.2.0" ,
32
48
"dotenv" : " ^16.0.3" ,
36
52
"@gauzy/common" : " ^0.1.0" ,
37
53
"@types/node" : " ^20.14.9" ,
38
54
"rimraf" : " ^3.0.2" ,
55
+ "cross-env" : " ^7.0.3" ,
39
56
"typescript" : " 5.1.6"
40
57
}
41
58
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import * as path from 'path' ;
2
+ import * as fs from 'fs' ;
3
+
4
+ function replaceFilesForProduction ( ) {
5
+ const env = process . env [ 'NODE_ENV' ] || 'development' ;
6
+
7
+ console . log ( `Current NODE_ENV: ${ process . env [ 'NODE_ENV' ] } ` ) ;
8
+
9
+ if ( env === 'production' ) {
10
+ const sourceFile = path . join ( path . resolve ( './src/environments' ) , 'environment.prod.ts' ) ;
11
+ const targetFile = path . join ( path . resolve ( './src/environments' ) , 'environment.ts' ) ;
12
+
13
+ fs . copyFileSync ( sourceFile , targetFile ) ;
14
+ console . log ( `Replaced environment file with ${ sourceFile } ` ) ;
15
+ } else {
16
+ console . log ( 'Development build, no file replacement necessary.' ) ;
17
+ }
18
+ }
19
+
20
+ replaceFilesForProduction ( ) ;
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ export const environment: IEnvironment = {
59
59
*/
60
60
THROTTLE_TTL : parseInt ( process . env . THROTTLE_TTL ) || 60 * 1000 ,
61
61
THROTTLE_LIMIT : parseInt ( process . env . THROTTLE_LIMIT ) || 60000 ,
62
+ THROTTLE_ENABLED : process . env . THROTTLE_ENABLED == 'true' ,
62
63
63
64
/**
64
65
* Jitsu Server Configuration
Original file line number Diff line number Diff line change 44
44
" job listings"
45
45
],
46
46
"engines" : {
47
- "node" : " >=16.20 .1" ,
47
+ "node" : " >=20.11 .1" ,
48
48
"yarn" : " >=1.22.19"
49
49
},
50
50
"sideEffects" : false
Original file line number Diff line number Diff line change 46
46
" ui"
47
47
],
48
48
"engines" : {
49
- "node" : " >=16.20 .1" ,
49
+ "node" : " >=20.11 .1" ,
50
50
"yarn" : " >=1.22.19"
51
51
},
52
52
"sideEffects" : false
Original file line number Diff line number Diff line change 8
8
"url" : " https://ever.co"
9
9
},
10
10
"license" : " AGPL-3.0" ,
11
+ "repository" : {
12
+ "type" : " git" ,
13
+ "url" : " https://github.com/ever-co/ever-gauzy"
14
+ },
15
+ "bugs" : {
16
+ "url" : " https://github.com/ever-co/ever-gauzy/issues"
17
+ },
18
+ "homepage" : " https://ever.co" ,
19
+ "keywords" : [
20
+ " gauzy" ,
21
+ " angular" ,
22
+ " configuration" ,
23
+ " environment" ,
24
+ " settings" ,
25
+ " library"
26
+ ],
11
27
"private" : true ,
12
28
"main" : " dist/fesm2022/gauzy-ui-config.mjs" ,
13
29
"module" : " dist/fesm2022/gauzy-ui-config.mjs" ,
28
44
"access" : " restricted"
29
45
},
30
46
"scripts" : {
31
- "lib:build" : " ng build ui-config --configuration development" ,
32
- "lib:build:prod" : " yarn ts-node scripts/replace-env-files.ts && ng build ui-config --configuration production" ,
47
+ "lib:build" : " rimraf dist && ng build ui-config --configuration development" ,
48
+ "lib:build:prod" : " cross-env NODE_ENV=production yarn ts-node scripts/replace-env-files.ts --environment=prod && ng build ui-config --configuration production" ,
33
49
"lib:watch" : " ng build ui-config --watch --configuration development" ,
34
50
"clean" : " rimraf dist"
35
51
},
42
58
},
43
59
"devDependencies" : {
44
60
"@types/node" : " ^20.14.9" ,
45
- "rimraf" : " ^3.0.2"
61
+ "rimraf" : " ^3.0.2" ,
62
+ "cross-env" : " ^7.0.3"
46
63
},
47
- "repository" : {
48
- "type" : " git" ,
49
- "url" : " https://github.com/ever-co/ever-gauzy"
50
- },
51
- "bugs" : {
52
- "url" : " https://github.com/ever-co/ever-gauzy/issues"
53
- },
54
- "homepage" : " https://ever.co" ,
55
- "keywords" : [
56
- " gauzy" ,
57
- " angular" ,
58
- " configuration" ,
59
- " environment" ,
60
- " settings" ,
61
- " library"
62
- ],
63
64
"engines" : {
64
- "node" : " >=16.20 .1" ,
65
+ "node" : " >=20.11 .1" ,
65
66
"yarn" : " >=1.22.19"
66
67
},
67
68
"sideEffects" : false
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import * as path from 'path';
2
2
import * as fs from 'fs' ;
3
3
4
4
function replaceFilesForProduction ( ) {
5
- const env = process . env . NODE_ENV || 'development' ;
5
+ const env = process . env [ ' NODE_ENV' ] || 'development' ;
6
6
7
- console . log ( `Current NODE_ENV: ${ process . env . NODE_ENV } ` ) ;
7
+ console . log ( `Current NODE_ENV: ${ process . env [ ' NODE_ENV' ] } ` ) ;
8
8
9
9
if ( env === 'production' ) {
10
10
const sourceFile = path . join ( path . resolve ( `./src/lib/environments` ) , 'environment.prod.ts' ) ;
Original file line number Diff line number Diff line change 117
117
" ui"
118
118
],
119
119
"engines" : {
120
- "node" : " >=16.20 .1" ,
120
+ "node" : " >=20.11 .1" ,
121
121
"yarn" : " >=1.22.19"
122
122
},
123
123
"sideEffects" : false ,
You can’t perform that action at this time.
0 commit comments