Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion __tests__/mock-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
window.OC = { ...window.OC }
window.OC = {
config: {
version: '31.0.0',
},
...window.OC,
}

window.OCA = { ...window.OCA }
window.OCP = { ...window.OCP }

Expand Down
10 changes: 9 additions & 1 deletion apps/dav/src/views/CalDavSettings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ vi.mock('@nextcloud/router', () => {
})
vi.mock('@nextcloud/initial-state', () => {
return {
loadState: vi.fn(() => 'https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars'),
loadState: vi.fn((app, key, fallback) => {
if (app === 'core' && key === 'config') {
return globalThis.OC.config
} else if (app === 'dav' && key === 'userSyncCalendarsDocUrl') {
return 'https://docs.nextcloud.com/server/31/go.php?to=user-sync-calendars'
} else {
return fallback
}
}),
}
})

Expand Down
80 changes: 40 additions & 40 deletions apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ exports[`CalDavSettings > interactions 1`] = `
<div>
<div
class="settings-section settings-section--limit-width"
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
<h2
class="settings-section__name"
data-v-6f6953b5=""
data-v-5e563b2b=""
>
Calendar server
<a
aria-label="External documentation for Calendar server"
class="settings-section__info"
data-v-6f6953b5=""
href="https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars"
data-v-5e563b2b=""
href="https://docs.nextcloud.com/server/31/go.php?to=user-sync-calendars"
rel="noreferrer nofollow"
target="_blank"
title="External documentation for Calendar server"
>
<span
aria-hidden="true"
class="material-design-icon help-circle-icon"
data-v-6f6953b5=""
data-v-5e563b2b=""
role="img"
>
<svg
Expand All @@ -46,8 +46,8 @@ exports[`CalDavSettings > interactions 1`] = `
<!---->
<p
class="settings-hint"
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Also install the
<a
Expand All @@ -58,7 +58,7 @@ exports[`CalDavSettings > interactions 1`] = `
</a>
, or
<a
href="https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars"
href="https://docs.nextcloud.com/server/31/go.php?to=user-sync-calendars"
rel="noreferrer noopener"
target="_blank"
>
Expand All @@ -67,28 +67,28 @@ exports[`CalDavSettings > interactions 1`] = `
.
</p>
<p
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-2c897dd5=""
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
data-v-f275cf53=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendInvitations-label"
class="checkbox-radio-switch__input"
data-v-f275cf53=""
data-v-2c897dd5=""
id="caldavSendInvitations"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-2c897dd5=""
data-v-3714b019=""
data-v-f275cf53=""
id="caldavSendInvitations-label"
>
<span
Expand Down Expand Up @@ -127,8 +127,8 @@ exports[`CalDavSettings > interactions 1`] = `
</span>
</span>
<em
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Please make sure to properly set up
<a
Expand All @@ -140,28 +140,28 @@ exports[`CalDavSettings > interactions 1`] = `
</em>
</p>
<p
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-2c897dd5=""
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
data-v-f275cf53=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavGenerateBirthdayCalendar-label"
class="checkbox-radio-switch__input"
data-v-f275cf53=""
data-v-2c897dd5=""
id="caldavGenerateBirthdayCalendar"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-2c897dd5=""
data-v-3714b019=""
data-v-f275cf53=""
id="caldavGenerateBirthdayCalendar-label"
>
<span
Expand Down Expand Up @@ -200,45 +200,45 @@ exports[`CalDavSettings > interactions 1`] = `
</span>
</span>
<em
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Birthday calendars will be generated by a background job.
</em>
<br
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
/>
<em
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Hence they will not be available immediately after enabling but will show up after some time.
</em>
</p>
<p
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-2c897dd5=""
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
data-v-f275cf53=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendEventReminders-label"
class="checkbox-radio-switch__input"
data-v-f275cf53=""
data-v-2c897dd5=""
id="caldavSendEventReminders"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-2c897dd5=""
data-v-3714b019=""
data-v-f275cf53=""
id="caldavSendEventReminders-label"
>
<span
Expand Down Expand Up @@ -277,8 +277,8 @@ exports[`CalDavSettings > interactions 1`] = `
</span>
</span>
<em
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Please make sure to properly set up
<a
Expand All @@ -289,40 +289,40 @@ exports[`CalDavSettings > interactions 1`] = `
.
</em>
<br
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
/>
<em
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Notifications are sent via background jobs, so these must occur often enough.
</em>
</p>
<p
class="indented"
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-2c897dd5=""
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
data-v-f275cf53=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendEventRemindersToSharedGroupMembers-label"
class="checkbox-radio-switch__input"
data-v-f275cf53=""
data-v-2c897dd5=""
id="caldavSendEventRemindersToSharedGroupMembers"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-2c897dd5=""
data-v-3714b019=""
data-v-f275cf53=""
id="caldavSendEventRemindersToSharedGroupMembers-label"
>
<span
Expand Down Expand Up @@ -361,36 +361,36 @@ exports[`CalDavSettings > interactions 1`] = `
</span>
</span>
<em
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
Reminders are always sent to organizers and attendees.
</em>
</p>
<p
class="indented"
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-2c897dd5=""
data-v-5e563b2b=""
data-v-6b8d4c30=""
data-v-6f6953b5=""
data-v-f275cf53=""
style="--icon-size: 36px; --icon-height: 16px;"
>
<input
aria-labelledby="caldavSendEventRemindersPush-label"
class="checkbox-radio-switch__input"
data-v-f275cf53=""
data-v-2c897dd5=""
id="caldavSendEventRemindersPush"
type="checkbox"
value=""
/>
<span
class="checkbox-content checkbox-radio-switch__content checkbox-content-switch checkbox-content--has-text"
data-v-2c897dd5=""
data-v-3714b019=""
data-v-f275cf53=""
id="caldavSendEventRemindersPush-label"
>
<span
Expand Down
32 changes: 25 additions & 7 deletions build/WebpackSPDXPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,8 @@ class WebpackSPDXPlugin {
.filter((s) => !!s)
.map((s) => s.split('?', 2)[0])

// Skip assets without modules, these are emitted by webpack plugins
if (sources.length === 0) {
logger.warn(`Skipping ${asset} because it does not contain any source information`)
continue
}

/** packages used by the current asset
/**
* packages used by the current asset
* @type {Set<string>}
*/
const packages = new Set()
Expand Down Expand Up @@ -198,6 +193,29 @@ class WebpackSPDXPlugin {
output += `- ${pkg.name}\n\t- version: ${pkg.version}\n\t- license: ${license}\n`
}
output = `\n\n${output}`

if (sources.length === 0) {
logger.info(`Checking content of asset ${asset}`)
const sources = [...modules].map((module) => module.identifier())
for (const source of sources) {
const match = source.match(/asset\/inline\|data:image\/svg\+xml,(.+)/)
if (match) {
const content = decodeURI(match[1])
const [, license] = content.match(/SPDX-License-Identifier:\s*([^\s]+)/) ?? []
const [, author] = content.match(/SPDX-FileCopyrightText:\s*([^-]+)/) ?? []
if (author && license) {
authors.add(author)
licenses.add(license)
}
}
}
if (authors.size === 0) {
logger.warn(`Asset ${asset} does not contain any source information`)
continue
}
output = ''
}

for (const author of [...authors].sort()) {
output = `SPDX-FileCopyrightText: ${author}\n${output}`
}
Expand Down
1 change: 1 addition & 0 deletions core/js/tests/specHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ OC.config = {
session_lifetime: 600 * 1000,
session_keepalive: false,
blacklist_files_regex: '\.(part|filepart)$',
version: '31.0.0',
};
OC.appConfig = {
core: {}
Expand Down
4 changes: 2 additions & 2 deletions dist/1252-1252.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/1252-1252.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Matt Zabriskie
SPDX-FileCopyrightText: Joyent
SPDX-FileCopyrightText: Jonas Schade <[email protected]>
SPDX-FileCopyrightText: John Molakvoæ (skjnldsv) <[email protected]>
SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
SPDX-FileCopyrightText: Guillaume Chau <[email protected]>
SPDX-FileCopyrightText: GitHub Inc.
Expand Down Expand Up @@ -81,7 +80,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.2.4
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.28.0
- version: 8.29.2
- license: AGPL-3.0-or-later
- @vueuse/components
- version: 11.3.0
Expand Down
2 changes: 1 addition & 1 deletion dist/1252-1252.js.map

Large diffs are not rendered by default.

Loading
Loading