fix: some bugs

This commit is contained in:
Tom Boullay
2026-04-14 16:57:23 +02:00
parent 3a7a5e2eea
commit 110d64ec33
8 changed files with 37 additions and 34 deletions
+4 -1
View File
@@ -26,7 +26,7 @@ export function buildCommitMessage(
const lines: string[] = [title, '']
// Model section — only show if changed or new
// Model section — show status for new, changed, or unchanged
const modelChange = fileChanges.get(modelFilename.toLowerCase())
if (modelChange === 'new') {
lines.push('📦 Model')
@@ -34,6 +34,9 @@ export function buildCommitMessage(
} else if (modelChange === 'changed') {
lines.push('📦 Model')
lines.push(` 🔄 ${modelFilename}${compressed ? ' (compressed)' : ''}`)
} else if (modelChange === 'unchanged') {
lines.push('📦 Model')
lines.push(` ↔️ ${modelFilename} (inchange)`)
}
// Textures section — only show lines that have changes
+7 -7
View File
@@ -5,17 +5,17 @@
function getConfig() {
const url = process.env.NEXTCLOUD_URL
const user = process.env.NEXTCLOUD_USER
const password = process.env.NEXTCLOUD_PASSWORD
const token = process.env.NEXTCLOUD_SHARE_TOKEN
const password = process.env.NEXTCLOUD_SHARE_PASSWORD || ''
const basePath = process.env.NEXTCLOUD_BASE_PATH || 'Models'
if (!url || !user || !password) {
throw new Error('Nextcloud non configure (NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_PASSWORD)')
if (!url || !token) {
throw new Error('Nextcloud non configure (NEXTCLOUD_URL, NEXTCLOUD_SHARE_TOKEN)')
}
// WebDAV base: https://cloud.example.com/remote.php/dav/files/{user}/
const davBase = `${url.replace(/\/+$/, '')}/remote.php/dav/files/${encodeURIComponent(user)}`
const auth = 'Basic ' + Buffer.from(`${user}:${password}`).toString('base64')
// Public share WebDAV: https://cloud.example.com/public.php/webdav/
const davBase = `${url.replace(/\/+$/, '')}/public.php/webdav`
const auth = 'Basic ' + Buffer.from(`${token}:${password}`).toString('base64')
return { davBase, auth, basePath }
}