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
7 changes: 6 additions & 1 deletion __tests__/mock-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

window.OC = { ...window.OC }
window.OC = {
config: {
version: '30.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 @@ jest.mock('@nextcloud/router', () => {
})
jest.mock('@nextcloud/initial-state', () => {
return {
loadState: jest.fn(() => 'https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars'),
loadState: jest.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/30/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,26 +4,26 @@ exports[`CalDavSettings interactions 1`] = `
<div>
<div
class="settings-section settings-section--limit-width"
data-v-6f6953b5=""
data-v-5e563b2b=""
>
<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/30/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 @@ -45,7 +45,7 @@ exports[`CalDavSettings interactions 1`] = `
<!---->
<p
class="settings-hint"
data-v-6f6953b5=""
data-v-5e563b2b=""
>
Also install the
<a
Expand All @@ -56,7 +56,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/30/go.php?to=user-sync-calendars"
rel="noreferrer noopener"
target="_blank"
>
Expand All @@ -66,26 +66,26 @@ exports[`CalDavSettings interactions 1`] = `
</p>

<p
data-v-6f6953b5=""
data-v-5e563b2b=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-6f6953b5=""
data-v-f275cf53=""
data-v-2c897dd5=""
data-v-5e563b2b=""
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,7 +127,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>

<em
data-v-6f6953b5=""
data-v-5e563b2b=""
>
Please make sure to properly set up
<a
Expand All @@ -140,26 +140,26 @@ exports[`CalDavSettings interactions 1`] = `
</p>

<p
data-v-6f6953b5=""
data-v-5e563b2b=""
>
<span
class="checkbox-radio-switch checkbox checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-6f6953b5=""
data-v-f275cf53=""
data-v-2c897dd5=""
data-v-5e563b2b=""
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 @@ -201,19 +201,19 @@ exports[`CalDavSettings interactions 1`] = `
</span>

<em
data-v-6f6953b5=""
data-v-5e563b2b=""
>

Birthday calendars will be generated by a background job.

</em>

<br
data-v-6f6953b5=""
data-v-5e563b2b=""
/>

<em
data-v-6f6953b5=""
data-v-5e563b2b=""
>

Hence they will not be available immediately after enabling but will show up after some time.
Expand All @@ -222,26 +222,26 @@ exports[`CalDavSettings interactions 1`] = `
</p>

<p
data-v-6f6953b5=""
data-v-5e563b2b=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-6f6953b5=""
data-v-f275cf53=""
data-v-2c897dd5=""
data-v-5e563b2b=""
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 @@ -283,7 +283,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>

<em
data-v-6f6953b5=""
data-v-5e563b2b=""
>
Please make sure to properly set up
<a
Expand All @@ -295,11 +295,11 @@ exports[`CalDavSettings interactions 1`] = `
</em>

<br
data-v-6f6953b5=""
data-v-5e563b2b=""
/>

<em
data-v-6f6953b5=""
data-v-5e563b2b=""
>

Notifications are sent via background jobs, so these must occur often enough.
Expand All @@ -309,26 +309,26 @@ exports[`CalDavSettings interactions 1`] = `

<p
class="indented"
data-v-6f6953b5=""
data-v-5e563b2b=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-6f6953b5=""
data-v-f275cf53=""
data-v-2c897dd5=""
data-v-5e563b2b=""
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 @@ -370,7 +370,7 @@ exports[`CalDavSettings interactions 1`] = `
</span>

<em
data-v-6f6953b5=""
data-v-5e563b2b=""
>

Reminders are always sent to organizers and attendees.
Expand All @@ -380,26 +380,26 @@ exports[`CalDavSettings interactions 1`] = `

<p
class="indented"
data-v-6f6953b5=""
data-v-5e563b2b=""
>
<span
class="checkbox-radio-switch checkbox-radio-switch-switch checkbox-radio-switch--checked"
data-v-6f6953b5=""
data-v-f275cf53=""
data-v-2c897dd5=""
data-v-5e563b2b=""
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: '30.0.0',
};
OC.appConfig = {
core: {}
Expand Down
4 changes: 2 additions & 2 deletions dist/1521-1521.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/1521-1521.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ SPDX-License-Identifier: (MPL-2.0 OR Apache-2.0)
SPDX-FileCopyrightText: escape-html developers
SPDX-FileCopyrightText: Tobias Koppers @sokra
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: John Molakvoæ (skjnldsv) <[email protected]>
SPDX-FileCopyrightText: Evan You
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <[email protected]> (https://cure53.de/)
SPDX-FileCopyrightText: Christoph Wurst
Expand All @@ -28,7 +27,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.0.1
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.28.0
- version: 8.29.2
- license: AGPL-3.0-or-later
- @vueuse/core
- version: 11.3.0
Expand Down
2 changes: 1 addition & 1 deletion dist/1521-1521.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/1642-1642.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ SPDX-FileCopyrightText: T. Jameson Little <[email protected]>
SPDX-FileCopyrightText: Roman Shtylman <[email protected]>
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Matt Zabriskie
SPDX-FileCopyrightText: John Molakvoæ (skjnldsv) <[email protected]>
SPDX-FileCopyrightText: Guillaume Chau <[email protected]>
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Feross Aboukhadijeh
Expand Down Expand Up @@ -51,7 +50,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.0.1
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.28.0
- version: 8.29.2
- license: AGPL-3.0-or-later
- @vueuse/core
- version: 11.3.0
Expand Down
4 changes: 2 additions & 2 deletions dist/1656-1656.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading