-
Notifications
You must be signed in to change notification settings - Fork 312
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
150 lines (138 loc) · 4.71 KB
/
nuxt.config.ts
File metadata and controls
150 lines (138 loc) · 4.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// https://nuxt.com/docs/api/configuration/nuxt-config
import { readFileSync } from 'fs';
const packageJson = readFileSync('package.json', 'utf8');
const version = JSON.parse(packageJson).version;
export default defineNuxtConfig({
compatibilityDate: '2024-11-01',
devtools: { enabled: true },
future: {
compatibilityVersion: 4
},
ssr: true,
app: {
head: {
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.svg' }
]
}
},
// when enabling ssr option you need to disable inlineStyles and maybe devLogs
features: {
inlineStyles: false,
devLogs: false,
},
build: {
transpile: ['vuetify'],
},
vite: {
ssr: {
noExternal: ['vuetify'],
},
},
css: [
'@/assets/global.css'
],
modules: ['@nuxt/fonts', 'vuetify-nuxt-module', '@nuxt/eslint', 'nuxt-auth-utils'],
vuetify: {
moduleOptions: {
// check https://nuxt.vuetifyjs.com/guide/server-side-rendering.html
ssrClientHints: {
reloadOnFirstRequest: false,
viewportSize: true,
prefersColorScheme: false,
prefersColorSchemeOptions: {
useBrowserThemeOnly: false,
},
},
// /* If customizing sass global variables ($utilities, $reset, $color-pack, $body-font-family, etc) */
// disableVuetifyStyles: true,
styles: {
configFile: 'assets/settings.scss',
},
},
},
auth: {
// @ts-expect-error - 'github' is a valid runtime option but not in ModuleOptions types
github: {
enabled: true,
clientId: '',
clientSecret: ''
}
},
nitro: {
plugins: [
'plugins/http-agent',
'plugins/db-init',
],
// Scheduled sync is handled by the dedicated sync Docker container (Dockerfile.sync).
// Do not register scheduledTasks here to avoid Nitro "task not defined" warnings.
},
runtimeConfig: {
githubToken: '',
githubApiBaseUrl: '', // NUXT_GITHUB_API_BASE_URL — override for GHE.com (e.g. https://api.SUBDOMAIN.ghe.com)
aiToken: '', // Dedicated token for GitHub Models API (NUXT_AI_TOKEN). Falls back to githubToken.
aiModel: 'gpt-4o', // Model for AI chat (NUXT_AI_MODEL)
aiMaxToolRounds: '5', // Max tool-calling iterations (NUXT_AI_MAX_TOOL_ROUNDS)
// GitHub App credentials (alternative to PAT — works with any OAuth provider)
githubAppId: '', // NUXT_GITHUB_APP_ID — numeric App ID (preferred); GitHub also accepts the Client ID (NUXT_OAUTH_GITHUB_CLIENT_ID)
githubAppPrivateKey: '', // NUXT_GITHUB_APP_PRIVATE_KEY (PEM, \n-escaped)
session: {
// set to 6h - same as the GitHub token
maxAge: 60 * 60 * 6,
password: '',
},
oauth: {
github: {
clientId: '',
clientSecret: ''
},
google: {
clientId: '',
clientSecret: ''
},
microsoft: {
clientId: '',
clientSecret: '',
tenant: ''
},
auth0: {
clientId: '',
clientSecret: '',
domain: ''
},
keycloak: {
clientId: '',
clientSecret: '',
serverUrl: '',
realm: ''
}
},
// Server-only authorization config (NUXT_AUTHORIZED_USERS, NUXT_AUTHORIZED_EMAIL_DOMAINS)
authorizedUsers: '',
authorizedEmailDomains: '',
public: {
isDataMocked: false, // can be overridden by NUXT_PUBLIC_IS_DATA_MOCKED environment variable
scope: 'organization', // can be overridden by NUXT_PUBLIC_SCOPE environment variable
githubOrg: '',
githubEnt: '',
// Deprecated: use requireAuth + authProviders instead. Kept for backwards compatibility.
usingGithubAuth: false,
// Set to true when any OAuth provider is configured (NUXT_PUBLIC_REQUIRE_AUTH)
requireAuth: false,
// Comma-separated list of active OAuth providers shown in the UI, e.g. "github,google,microsoft"
// (NUXT_PUBLIC_AUTH_PROVIDERS)
authProviders: '',
version,
isPublicApp: false,
// Deployment metadata (set via NUXT_PUBLIC_DEPLOY_INFO for preview environments)
deployInfo: '',
// New API migration flags
useLegacyApi: false, // Set true to use deprecated /copilot/metrics API (USE_LEGACY_API)
enableHistoricalMode: false, // Enable storage-backed historical queries (NUXT_PUBLIC_ENABLE_HISTORICAL_MODE)
hiddenTabs: '', // Comma-separated list of tab names to hide (NUXT_PUBLIC_HIDDEN_TABS)
enableAiChat: true, // Enable AI-powered chat for metrics Q&A (NUXT_PUBLIC_ENABLE_AI_CHAT)
entraClientId: '', // NUXT_PUBLIC_ENTRA_CLIENT_ID — app registration client ID for MSAL popup auth
entraTenantId: '', // NUXT_PUBLIC_ENTRA_TENANT_ID — tenant ID (defaults to 'common' for multi-tenant)
}
}
})