@@ -48,10 +48,18 @@ export default class Config {
48
48
}
49
49
50
50
/**
51
- * the file system driver: 'local ', 'gridfs'
51
+ * the file system driver: 'localfs ', 'gridfs'
52
52
*/
53
- static get FILE_SYSTEM_DRIVER ( ) : string {
54
- return process . env [ 'FILE_SYSTEM_DRIVER' ] ?? 'gridfs'
53
+ static get FILE_SYSTEM_DRIVER ( ) : 'gridfs' | 'localfs' {
54
+ return process . env [ 'FILE_SYSTEM_DRIVER' ] as any ?? 'gridfs'
55
+ }
56
+
57
+ /**
58
+ * if enable the unauthorized upload operation in `public` bucket: 'on' | 'off'.
59
+ * default is 'on'
60
+ */
61
+ static get FILE_SYSTEM_ENABLE_UNAUTHORIZED_UPLOAD ( ) : 'on' | 'off' {
62
+ return process . env [ 'FILE_SYSTEM_ENABLE_UNAUTHORIZED_UPLOAD' ] as any ?? 'on'
55
63
}
56
64
57
65
/**
@@ -72,8 +80,8 @@ export default class Config {
72
80
/**
73
81
* the logger level : 'fatal', 'error', 'warning', 'info', 'debug', 'trace'
74
82
*/
75
- static get LOG_LEVEL ( ) : string {
76
- return process . env [ 'LOG_LEVEL' ] ?? ( this . isProd ? 'info' : 'debug' )
83
+ static get LOG_LEVEL ( ) : 'fatal' | 'error' | 'warning' | 'info' | 'debug' | 'trace' {
84
+ return process . env [ 'LOG_LEVEL' ] as any ?? ( this . isProd ? 'info' : 'debug' )
77
85
}
78
86
79
87
/**
@@ -89,8 +97,8 @@ export default class Config {
89
97
* - `debug` means that only logging for debug invokes
90
98
* - `never` no logging any case
91
99
*/
92
- static get ENABLE_CLOUD_FUNCTION_LOG ( ) : string {
93
- return ( process . env . ENABLE_CLOUD_FUNCTION_LOG ?? 'always' )
100
+ static get ENABLE_CLOUD_FUNCTION_LOG ( ) : 'always' | 'debug' | 'never' {
101
+ return ( process . env . ENABLE_CLOUD_FUNCTION_LOG as any ?? 'always' )
94
102
}
95
103
96
104
/**
0 commit comments