File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ export interface ModuleOptions {
14
14
* Enable Studio mode
15
15
* @default : 'production'
16
16
*/
17
- enabled : 'production' | true
17
+ enabled : 'production' | true ,
18
+ gitInfo : GitInfo | null ,
18
19
}
19
20
20
21
export interface ModuleHooks { }
@@ -26,6 +27,7 @@ export default defineNuxtModule<ModuleOptions>({
26
27
} ,
27
28
defaults : {
28
29
enabled : 'production' ,
30
+ gitInfo : null ,
29
31
} ,
30
32
async setup ( options , nuxt ) {
31
33
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -80,7 +82,7 @@ export default defineNuxtModule<ModuleOptions>({
80
82
const apiURL = process . env . NUXT_PUBLIC_STUDIO_API_URL || process . env . STUDIO_API || 'https://api.nuxt.studio'
81
83
const publicToken = process . env . NUXT_PUBLIC_STUDIO_TOKENS
82
84
const iframeMessagingAllowedOrigins = process . env . IFRAME_MESSAGING_ALLOWED_ORIGINS
83
- const gitInfo = await _getLocalGitInfo ( nuxt . options . rootDir ) || _getGitEnv ( ) || { }
85
+ const gitInfo = options . gitInfo || await _getLocalGitInfo ( nuxt . options . rootDir ) || _getGitEnv ( ) || { }
84
86
nuxt . options . runtimeConfig . studio = defu ( nuxt . options . runtimeConfig . studio , {
85
87
version,
86
88
publicToken,
You can’t perform that action at this time.
0 commit comments