Skip to content

Commit

Permalink
Merge pull request #766 from nextcloud/automated/noid/stable26-fix-np…
Browse files Browse the repository at this point in the history
…m-audit

[stable26] Fix npm audit
  • Loading branch information
danxuliu authored Jul 12, 2023
2 parents f209e9f + 75e3b79 commit cdc7dc8
Show file tree
Hide file tree
Showing 19 changed files with 4,569 additions and 3,129 deletions.
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,13 +33,6 @@ const queryString = window.location.search
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() {
const head = document.getElementsByTagName('head')[0]

Expand Down

0 comments on commit cdc7dc8

Please sign in to comment.