From 0efeb8d1df956db775d4c343da615ca2ee005276 Mon Sep 17 00:00:00 2001
From: mntmn
Date: Wed, 15 May 2019 21:25:53 +0200
Subject: [PATCH 01/72] remove electron, docker
---
Dockerfile | 29 -----------------------------
app.js | 33 ---------------------------------
electron-windows.md | 17 -----------------
package.json | 6 +++---
4 files changed, 3 insertions(+), 82 deletions(-)
delete mode 100644 Dockerfile
delete mode 100644 app.js
delete mode 100644 electron-windows.md
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index a614e97..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-FROM spacedeck/docker-baseimage:latest
-ENV NODE_ENV production
-
-RUN mkdir -p /usr/src/app
-WORKDIR /usr/src/app
-
-COPY package.json /usr/src/app/
-RUN npm install
-RUN npm install gulp-rev-replace gulp-clean gulp-fingerprint gulp-rev gulp-rev-all gulp-rev-replace
-RUN npm install -g --save-dev gulp
-
-COPY app.js Dockerfile Gulpfile.js LICENSE /usr/src/app/
-COPY config /usr/src/app/config
-COPY helpers /usr/src/app/helpers
-COPY locales /usr/src/app/locales
-COPY middlewares /usr/src/app/middlewares
-COPY models /usr/src/app/models
-COPY public /usr/src/app/public
-COPY routes /usr/src/app/routes
-COPY styles /usr/src/app/styles
-COPY views /usr/src/app/views
-
-RUN gulp all
-RUN npm cache clean
-
-CMD [ "node", "app.js" ]
-
-EXPOSE 9666
-
diff --git a/app.js b/app.js
deleted file mode 100644
index 73d7fd5..0000000
--- a/app.js
+++ /dev/null
@@ -1,33 +0,0 @@
-const spacedeck = require('./spacedeck')
-
-const electron = require('electron')
-const electronApp = electron.app
-const BrowserWindow = electron.BrowserWindow
-let mainWindow
-
-function createWindow () {
- mainWindow = new BrowserWindow({width: 1200, height: 700})
- mainWindow.loadURL("http://localhost:9666")
- mainWindow.on('closed', function () {
- mainWindow = null
- })
-}
-
-electronApp.on('ready', createWindow)
-
-// Quit when all windows are closed.
-electronApp.on('window-all-closed', function () {
- // On OS X it is common for applications and their menu bar
- // to stay active until the user quits explicitly with Cmd + Q
- if (process.platform !== 'darwin') {
- electronApp.quit()
- }
-})
-
-electronApp.on('activate', function () {
- // On OS X it's common to re-create a window in the app when the
- // dock icon is clicked and there are no other windows open.
- if (mainWindow === null) {
- createWindow()
- }
-})
diff --git a/electron-windows.md b/electron-windows.md
deleted file mode 100644
index de6a870..0000000
--- a/electron-windows.md
+++ /dev/null
@@ -1,17 +0,0 @@
-
-# Windows Electron Build
-
-sqlite3 needs to be manually built for the iojs version that electron ships. The following code assumes electron v1.8.4.
-
-````
-npm -g install windows-build-tools
-
-cd node_modules\sqlite3
-
-node-gyp configure --module_name=node_sqlite3 --module_path=../lib/binding/electron-v1.8-win32-x64
-
-node-gyp rebuild --target=1.8.4 --target_platform=win32 --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/electron-v1.8-win32-x64 --msvs_version=2015
-
-cd ..\..
-````
-
diff --git a/package.json b/package.json
index 34bbd9f..56007bb 100644
--- a/package.json
+++ b/package.json
@@ -3,10 +3,10 @@
"version": "1.0.0",
"private": true,
"scripts": {
- "start": "electron ."
+ "start": "node spacedeck.js"
},
"engines": {
- "node": ">=7.8.0"
+ "node": ">=10.0.0"
},
"dependencies": {
"archiver": "1.3.0",
@@ -17,12 +17,12 @@
"cheerio": "0.22.0",
"config": "1.25.1",
"cookie-parser": "~1.4.3",
- "electron": "^1.8.4",
"execSync": "latest",
"express": "~4.13.0",
"file-type": "^7.6.0",
"glob": "7.1.1",
"gm": "1.23.0",
+ "gulp": "^4.0.2",
"helmet": "^3.5.0",
"i18n-2": "0.6.3",
"log-timestamp": "latest",
--
GitLab
From db849bcb202dc1364fd044248360f466813685cf Mon Sep 17 00:00:00 2001
From: mntmn
Date: Wed, 15 May 2019 21:29:34 +0200
Subject: [PATCH 02/72] fix most vulns via npm audit fix
---
package.json | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/package.json b/package.json
index 56007bb..1ce6692 100644
--- a/package.json
+++ b/package.json
@@ -13,32 +13,32 @@
"async": "2.3.0",
"basic-auth": "1.1.0",
"bcryptjs": "2.4.3",
- "body-parser": "~1.17.1",
+ "body-parser": "^1.19.0",
"cheerio": "0.22.0",
"config": "1.25.1",
"cookie-parser": "~1.4.3",
"execSync": "latest",
- "express": "~4.13.0",
+ "express": "^4.16.4",
"file-type": "^7.6.0",
"glob": "7.1.1",
- "gm": "1.23.0",
+ "gm": "^1.23.1",
"gulp": "^4.0.2",
"helmet": "^3.5.0",
"i18n-2": "0.6.3",
"log-timestamp": "latest",
"mock-aws-s3": "^2.6.0",
"moment": "^2.19.3",
- "morgan": "1.8.1",
+ "morgan": "^1.9.1",
"node-phantom-simple": "2.2.4",
"nodemailer": "^4.6.7",
- "phantomjs-prebuilt": "2.1.14",
+ "phantomjs-prebuilt": "^2.1.16",
"read-chunk": "^2.1.0",
- "request": "2.81.0",
+ "request": "^2.88.0",
"sanitize-html": "^1.11.1",
"sequelize": "^4.37.6",
"serve-favicon": "~2.4.2",
"serve-static": "^1.13.1",
- "slug": "0.9.1",
+ "slug": "^1.1.0",
"sqlite3": "^4.0.0",
"swig": "1.4.2",
"umzug": "^2.1.0",
--
GitLab
From 58aa3fc41fa4c8a68c65fb3991bce6d6af03f7fc Mon Sep 17 00:00:00 2001
From: mntmn
Date: Wed, 15 May 2019 21:35:29 +0200
Subject: [PATCH 03/72] fix gulpfile to signal completion, clean up a bit
---
Gulpfile.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Gulpfile.js b/Gulpfile.js
index ee34f4d..f20bf7e 100644
--- a/Gulpfile.js
+++ b/Gulpfile.js
@@ -1,13 +1,13 @@
-var gulp = require('gulp');
-var sass = require('gulp-sass');
-var concat = require('gulp-concat');
+const gulp = require('gulp')
+const sass = require('gulp-sass')
+const concat = require('gulp-concat')
-gulp.task('styles', function() {
+gulp.task('styles', function(done) {
gulp.src('styles/**/*.scss')
.pipe(sass({
errLogToConsole: true
}))
.pipe(gulp.dest('./public/stylesheets/'))
- .pipe(concat('style.css'));
-});
-
+ .pipe(concat('style.css'))
+ done()
+})
--
GitLab
From 8ba37a11d6f301068c75c2b902089492324a0c8a Mon Sep 17 00:00:00 2001
From: mntmn
Date: Wed, 15 May 2019 22:36:53 +0200
Subject: [PATCH 04/72] purge IE
---
views/spacedeck.html | 5 -----
1 file changed, 5 deletions(-)
diff --git a/views/spacedeck.html b/views/spacedeck.html
index bfaee5b..daf54d5 100644
--- a/views/spacedeck.html
+++ b/views/spacedeck.html
@@ -74,10 +74,6 @@
-
-
{% include "./partials/login.html" %}
{% include "./partials/space.html" %}
{% include "./partials/folders.html" %}
@@ -91,7 +87,6 @@
{% include "./partials/modal/support.html" %}
{% include "./partials/modal/login.html" %}
{% include "./partials/modal/pdfoptions.html" %}
-
@@ -53,7 +50,7 @@
diff --git a/views/partials/folders.html b/views/partials/folders.html
index 79eaceb..2106a8e 100644
--- a/views/partials/folders.html
+++ b/views/partials/folders.html
@@ -5,11 +5,19 @@
-
-
+
-
-
-
-
+