Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable26] Fix npm audit #766

Merged
merged 6 commits into from
Jul 12, 2023
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
4 changes: 2 additions & 2 deletions js/files_pdfviewer-main.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion js/files_pdfviewer-main.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
2 changes: 1 addition & 1 deletion js/files_pdfviewer-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files_pdfviewer-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-public.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
2 changes: 1 addition & 1 deletion js/files_pdfviewer-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files_pdfviewer-workersrc.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-workersrc.js.map

Large diffs are not rendered by default.

7,621 changes: 4,536 additions & 3,085 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand All @@ -20,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import PDFView from './views/PDFView'
import PDFView from './views/PDFView.vue'

OCA.Viewer.registerHandler({
id: 'pdf',
Expand Down
12 changes: 6 additions & 6 deletions src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand All @@ -21,11 +21,11 @@
*/
import { generateUrl } from '@nextcloud/router'

import logger from './services/logger'
import canDownload from './utils/canDownload'
import isPublicPage from './utils/isPublicPage'
import isPdf from './utils/isPdf'
import isSecureViewerAvailable from './utils/isSecureViewerAvailable'
import logger from './services/logger.js'
import canDownload from './utils/canDownload.js'
import isPublicPage from './utils/isPublicPage.js'
import isPdf from './utils/isPdf.js'
import isSecureViewerAvailable from './utils/isSecureViewerAvailable.js'

window.addEventListener('DOMContentLoaded', function() {
logger.debug('Initializing for public page', {
Expand Down
2 changes: 1 addition & 1 deletion src/services/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
3 changes: 1 addition & 2 deletions src/utils/canDownload.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
3 changes: 1 addition & 2 deletions src/utils/isPdf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
3 changes: 1 addition & 2 deletions src/utils/isPublicPage.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
5 changes: 2 additions & 3 deletions src/utils/isSecureViewerAvailable.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand All @@ -21,6 +20,6 @@
*
*/

import canDownload from './canDownload'
import canDownload from './canDownload.js'

export default () => !canDownload() && typeof OCA.RichDocuments !== 'undefined'
2 changes: 1 addition & 1 deletion src/utils/redirectIfNotIframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down
4 changes: 2 additions & 2 deletions src/views/PDFView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- @author John Molakvoæ <skjnldsv@protonmail.com>
- @author Charismatic Claire <charismatic.claire@noservice.noreply>
-
- @license GNU AGPL version 3 or any later version
- @license AGPL-3.0-or-later
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
Expand All @@ -26,7 +26,7 @@

<script>
import { generateUrl } from '@nextcloud/router'
import canDownload from '../utils/canDownload'
import canDownload from '../utils/canDownload.js'
export default {
name: 'PDFView',
Expand Down
14 changes: 3 additions & 11 deletions src/workersrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

/**
* @copyright Copyright (c) 2020 Daniel Calviño Sánchez <danxuliu@gmail.com>
*
* @author Daniel Calviño Sánchez <danxuliu@gmail.com>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand All @@ -22,8 +21,8 @@
*
*/

import logger from './services/logger'
import redirectIfNotIframe from './utils/redirectIfNotIframe'
import logger from './services/logger.js'
import redirectIfNotIframe from './utils/redirectIfNotIframe.js'

// Checks if the page is displayed in an iframe. If not redirect to /.
redirectIfNotIframe()
Expand All @@ -34,14 +33,7 @@
const urlParams = new URLSearchParams(queryString)
const canDownload = urlParams.get('canDownload')

// When "PDFViewerApplication.webViewerInitialized" is executed (once
// "PDFViewerApplication.initialize" is done) it opens the PDF file via URL,
// which requires the PDFViewerApplication to be properly configured, so the
// custom initialization has to be executed before that. This can be done by
// listening to the "webviewerloaded" event, which is emitted after
// "PDFViewerApplication" and "PDFViewerApplicationOptions" are globally set and
// before "PDFViewerApplication.initialize" is executed.
function initializeCustomPDFViewerApplication() {

Check warning on line 36 in src/workersrc.js

View workflow job for this annotation

GitHub Actions / eslint

Missing JSDoc comment
const head = document.getElementsByTagName('head')[0]

// Preferences override options, so they must be disabled for
Expand Down
Loading