Commit 7784d2b2 authored by yPhil's avatar yPhil
Browse files

Merge branch 'dev'

parents e87e4204 0bd3233b
......@@ -7,5 +7,5 @@ job1:
stage: build
script:
- npm install
- PTL_PORT_HTTP=8000 npm start
- PTL_PORT_HTTP=8000 npm run coverage
- npm start
- npm run coverage
......@@ -25,7 +25,8 @@
"remotestorage": "rs#1.2.3",
"rs-widget": "1.3.0",
"DOMPurify": "dompurify#^2.2.6",
"responsively-lazy": "^2.0.2"
"responsively-lazy": "^2.0.2",
"idb-keyval": "^5.0.5"
},
"resolutions": {
"intro.js": "^3.3.1"
......
......@@ -9,16 +9,25 @@ const httpServer = http.createServer(petrolette);
const portHttp = pjson.HTTP_PORT || 8000;
const portHttps = pjson.HTTPS_PORT || 8001;
process.on('uncaughtException', function(err) {
console.error('### Pétrolette uncaughtException: %s', err.code);
});
httpServer.listen(portHttp, () => {
console.debug('HTTP Server running on port %s', portHttp);
});
const httpsServer = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/chain.pem'),
}, petrolette);
try {
const httpsServer = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/cert.pem'),
ca: fs.readFileSync('/etc/letsencrypt/live/petrolette.space/chain.pem'),
}, petrolette);
httpsServer.listen(portHttps, () => {
console.debug('HTTPS Server running');
});
httpsServer.listen(portHttps, () => {
console.debug('HTTPS Server running');
});
} catch (error) {
console.error('error: no HTTPS here');
}
{
"name": "petrolette",
"version": "1.2.8",
"version": "1.3.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.2.8",
"version": "1.3.0",
"hasInstallScript": true,
"license": "GPL-3.0-only",
"dependencies": {
......@@ -19,15 +19,17 @@
"feedrat": "git+https://framagit.org/yphil/feedrat.git",
"helmet": "^4.4.1",
"iconv-lite": "^0.6.2",
"idb": "^6.0.0",
"morgan": "^1.10.0",
"node-fetch": "^2.6.1",
"npm": "^7.9.0",
"npm": "^7.10.0",
"pm2": "^4.5.6",
"sanitize": "^2.1.0"
},
"devDependencies": {
"mocha": "^8.3.2",
"nyc": "^15.1.0",
"rollup": "^2.47.0",
"should": "^13.2.3"
},
"engines": {
......@@ -1817,11 +1819,6 @@
"node": ">= 10.18.1"
}
},
"node_modules/feedparser/node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"node_modules/feedparser/node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
......@@ -2320,6 +2317,11 @@
"node": ">=0.10.0"
}
},
"node_modules/idb": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/idb/-/idb-6.0.0.tgz",
"integrity": "sha512-+M367poGtpzAylX4pwcrZIa7cFQLfNkAOlMMLN2kw/2jGfJP6h+TB/unQNSVYwNtP8XqkLYrfuiVnxLQNP1tjA=="
},
"node_modules/imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
......@@ -2735,9 +2737,9 @@
}
},
"node_modules/lodash": {
"version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/lodash.assign": {
"version": "4.2.0",
......@@ -3217,9 +3219,9 @@
}
},
"node_modules/npm": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/npm/-/npm-7.9.0.tgz",
"integrity": "sha512-GW9RbueF717kJ4ZUVsTlhKBEY7AqX28OwQCsfIAkRZclfeeqQDnsoJz6WWuYTMpGBJnB2xknF8Dp364c93FDYA==",
"version": "7.11.2",
"resolved": "https://registry.npmjs.org/npm/-/npm-7.11.2.tgz",
"integrity": "sha512-NxcaNqAfdLEubG5dlPFWbXrVAG2zb45lB5y6W3PK1PK2feHaffpCN4rnXPD/BPp1kCJespCAv8Kw/QUYR85BRw==",
"bundleDependencies": [
"@npmcli/arborist",
"@npmcli/ci-detect",
......@@ -3246,6 +3248,7 @@
"leven",
"libnpmaccess",
"libnpmdiff",
"libnpmexec",
"libnpmfund",
"libnpmhook",
"libnpmorg",
......@@ -3415,6 +3418,7 @@
"path-is-absolute",
"path-parse",
"performance-now",
"proc-log",
"process-nextick-args",
"promise-all-reject-late",
"promise-call-limit",
......@@ -3463,10 +3467,10 @@
"yallist"
],
"dependencies": {
"@npmcli/arborist": "^2.3.0",
"@npmcli/arborist": "^2.4.1",
"@npmcli/ci-detect": "^1.2.0",
"@npmcli/config": "^2.1.0",
"@npmcli/run-script": "^1.8.4",
"@npmcli/config": "^2.2.0",
"@npmcli/run-script": "^1.8.5",
"abbrev": "~1.1.1",
"ansicolors": "~0.3.2",
"ansistyles": "~0.1.3",
......@@ -3482,20 +3486,21 @@
"graceful-fs": "^4.2.6",
"hosted-git-info": "^4.0.2",
"ini": "^2.0.0",
"init-package-json": "^2.0.2",
"init-package-json": "^2.0.3",
"is-cidr": "^4.0.2",
"json-parse-even-better-errors": "^2.3.1",
"leven": "^3.1.0",
"libnpmaccess": "^4.0.1",
"libnpmaccess": "^4.0.2",
"libnpmdiff": "^2.0.4",
"libnpmexec": "^1.0.1",
"libnpmfund": "^1.0.2",
"libnpmhook": "^6.0.1",
"libnpmorg": "^2.0.1",
"libnpmhook": "^6.0.2",
"libnpmorg": "^2.0.2",
"libnpmpack": "^2.0.1",
"libnpmpublish": "^4.0.0",
"libnpmsearch": "^3.1.0",
"libnpmteam": "^2.0.2",
"libnpmversion": "^1.1.0",
"libnpmpublish": "^4.0.1",
"libnpmsearch": "^3.1.1",
"libnpmteam": "^2.0.3",
"libnpmversion": "^1.2.0",
"make-fetch-happen": "^8.0.14",
"minipass": "^3.1.3",
"minipass-pipeline": "^1.2.4",
......@@ -3507,12 +3512,12 @@
"npm-audit-report": "^2.1.4",
"npm-package-arg": "^8.1.2",
"npm-pick-manifest": "^6.1.1",
"npm-profile": "^5.0.2",
"npm-registry-fetch": "^9.0.0",
"npm-profile": "^5.0.3",
"npm-registry-fetch": "^10.1.1",
"npm-user-validate": "^1.0.1",
"npmlog": "~4.1.2",
"opener": "^1.5.2",
"pacote": "^11.3.1",
"pacote": "^11.3.3",
"parse-conflict-json": "^1.1.1",
"qrcode-terminal": "^0.12.0",
"read": "~1.0.7",
......@@ -3539,7 +3544,7 @@
}
},
"node_modules/npm/node_modules/@npmcli/arborist": {
"version": "2.3.0",
"version": "2.4.1",
"inBundle": true,
"license": "ISC",
"dependencies": {
......@@ -3559,7 +3564,7 @@
"npm-install-checks": "^4.0.0",
"npm-package-arg": "^8.1.0",
"npm-pick-manifest": "^6.1.0",
"npm-registry-fetch": "^9.0.0",
"npm-registry-fetch": "^10.0.0",
"pacote": "^11.2.6",
"parse-conflict-json": "^1.1.1",
"promise-all-reject-late": "^1.0.0",
......@@ -3581,7 +3586,7 @@
"license": "ISC"
},
"node_modules/npm/node_modules/@npmcli/config": {
"version": "2.1.0",
"version": "2.2.0",
"inBundle": true,
"license": "ISC",
"dependencies": {
......@@ -3607,18 +3612,17 @@
}
},
"node_modules/npm/node_modules/@npmcli/git": {
"version": "2.0.6",
"version": "2.0.8",
"inBundle": true,
"license": "ISC",
"dependencies": {
"@npmcli/promise-spawn": "^1.1.0",
"@npmcli/promise-spawn": "^1.3.2",
"lru-cache": "^6.0.0",
"mkdirp": "^1.0.3",
"npm-pick-manifest": "^6.0.0",
"mkdirp": "^1.0.4",
"npm-pick-manifest": "^6.1.1",
"promise-inflight": "^1.0.1",
"promise-retry": "^2.0.1",
"semver": "^7.3.2",
"unique-filename": "^1.1.1",
"semver": "^7.3.5",
"which": "^2.0.2"
}
},
......@@ -3692,7 +3696,7 @@
}
},
"node_modules/npm/node_modules/@npmcli/run-script": {
"version": "1.8.4",
"version": "1.8.5",
"inBundle": true,
"license": "ISC",
"dependencies": {
......@@ -3858,7 +3862,7 @@
"license": "MIT"
},
"node_modules/npm/node_modules/balanced-match": {
"version": "1.0.0",
"version": "1.0.2",
"inBundle": true,
"license": "MIT"
},
......@@ -3949,7 +3953,7 @@
"license": "Apache-2.0"
},
"node_modules/npm/node_modules/chalk": {
"version": "4.1.0",
"version": "4.1.1",
"inBundle": true,
"license": "MIT",
"dependencies": {
......@@ -4583,16 +4587,16 @@
}
},
"node_modules/npm/node_modules/init-package-json": {
"version": "2.0.2",
"version": "2.0.3",
"inBundle": true,
"license": "ISC",
"dependencies": {
"glob": "^7.1.1",
"npm-package-arg": "^8.1.0",
"npm-package-arg": "^8.1.2",
"promzard": "^0.3.0",
"read": "~1.0.1",
"read-package-json": "^3.0.0",
"semver": "^7.3.2",
"read-package-json": "^3.0.1",
"semver": "^7.3.5",
"validate-npm-package-license": "^3.0.4",
"validate-npm-package-name": "^3.0.0"
},
......@@ -4723,7 +4727,7 @@
}
},
"node_modules/npm/node_modules/just-diff": {
"version": "3.0.2",
"version": "3.1.1",
"inBundle": true,
"license": "MIT"
},
......@@ -4741,14 +4745,14 @@
}
},
"node_modules/npm/node_modules/libnpmaccess": {
"version": "4.0.1",
"version": "4.0.2",
"inBundle": true,
"license": "ISC",
"dependencies": {
"aproba": "^2.0.0",
"minipass": "^3.1.1",
"npm-package-arg": "^8.0.0",
"npm-registry-fetch": "^9.0.0"
"npm-package-arg": "^8.1.2",
"npm-registry-fetch": "^10.0.0"
},
"engines": {
"node": ">=10"
......@@ -4772,6 +4776,26 @@
"node": ">=10"
}
},
"node_modules/npm/node_modules/libnpmexec": {
"version": "1.0.1",
"inBundle": true,
"license": "ISC",
"dependencies": {
"@npmcli/arborist": "^2.3.0",
"@npmcli/ci-detect": "^1.3.0",
"@npmcli/run-script": "^1.8.4",
"chalk": "^4.1.0",
"mkdirp-infer-owner": "^2.0.0",
"npm-package-arg": "^8.1.2",
"pacote": "^11.3.1",
"proc-log": "^1.0.0",
"read": "^1.0.7",
"read-package-json-fast": "^2.0.2"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm/node_modules/libnpmfund": {
"version": "1.0.2",
"inBundle": true,
......@@ -4781,24 +4805,24 @@
}
},
"node_modules/npm/node_modules/libnpmhook": {
"version": "6.0.1",
"version": "6.0.2",
"inBundle": true,
"license": "ISC",
"dependencies": {
"aproba": "^2.0.0",
"npm-registry-fetch": "^9.0.0"
"npm-registry-fetch": "^10.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm/node_modules/libnpmorg": {
"version": "2.0.1",
"version": "2.0.2",
"inBundle": true,
"license": "ISC",
"dependencies": {
"aproba": "^2.0.0",
"npm-registry-fetch": "^9.0.0"
"npm-registry-fetch": "^10.0.0"
},
"engines": {
"node": ">=10"
......@@ -4818,52 +4842,52 @@
}
},
"node_modules/npm/node_modules/libnpmpublish": {
"version": "4.0.0",
"version": "4.0.1",
"inBundle": true,
"license": "ISC",
"dependencies": {
"normalize-package-data": "^3.0.0",
"npm-package-arg": "^8.1.0",
"npm-registry-fetch": "^9.0.0",
"normalize-package-data": "^3.0.2",
"npm-package-arg": "^8.1.2",
"npm-registry-fetch": "^10.0.0",
"semver": "^7.1.3",
"ssri": "^8.0.0"
"ssri": "^8.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm/node_modules/libnpmsearch": {
"version": "3.1.0",
"version": "3.1.1",
"inBundle": true,
"license": "ISC",
"dependencies": {
"npm-registry-fetch": "^9.0.0"
"npm-registry-fetch": "^10.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm/node_modules/libnpmteam": {
"version": "2.0.2",
"version": "2.0.3",
"inBundle": true,
"license": "ISC",
"dependencies": {
"aproba": "^2.0.0",
"npm-registry-fetch": "^9.0.0"
"npm-registry-fetch": "^10.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm/node_modules/libnpmversion": {
"version": "1.1.0",
"version": "1.2.0",
"inBundle": true,
"license": "ISC",
"dependencies": {
"@npmcli/git": "^2.0.6",
"@npmcli/run-script": "^1.8.3",
"@npmcli/git": "^2.0.7",
"@npmcli/run-script": "^1.8.4",
"json-parse-even-better-errors": "^2.3.1",
"semver": "^7.3.4",
"semver": "^7.3.5",
"stringify-package": "^1.0.1"
}
},
......@@ -4904,7 +4928,7 @@
}
},
"node_modules/npm/node_modules/mime-db": {
"version": "1.46.0",
"version": "1.47.0",
"inBundle": true,
"license": "MIT",
"engines": {
......@@ -4912,11 +4936,11 @@
}
},
"node_modules/npm/node_modules/mime-types": {
"version": "2.1.29",
"version": "2.1.30",
"inBundle": true,
"license": "MIT",
"dependencies": {
"mime-db": "1.46.0"
"mime-db": "1.47.0"
},
"engines": {
"node": ">= 0.6"
......@@ -5122,7 +5146,7 @@
}
},
"node_modules/npm/node_modules/npm-bundled": {
"version": "1.1.1",
"version": "1.1.2",
"inBundle": true,
"license": "ISC",
"dependencies": {
......@@ -5187,22 +5211,21 @@
}
},
"node_modules/npm/node_modules/npm-profile": {
"version": "5.0.2",
"version": "5.0.3",
"inBundle": true,
"license": "ISC",
"dependencies": {
"npm-registry-fetch": "^9.0.0"
"npm-registry-fetch": "^10.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/npm/node_modules/npm-registry-fetch": {
"version": "9.0.0",
"version": "10.1.1",
"inBundle": true,
"license": "ISC",
"dependencies": {
"@npmcli/ci-detect": "^1.0.0",
"lru-cache": "^6.0.0",
"make-fetch-happen": "^8.0.9",
"minipass": "^3.1.3",
......@@ -5286,7 +5309,7 @@
}
},
"node_modules/npm/node_modules/pacote": {
"version": "11.3.1",
"version": "11.3.3",
"inBundle": true,
"license": "ISC",
"dependencies": {
......@@ -5303,7 +5326,7 @@
"npm-package-arg": "^8.0.1",
"npm-packlist": "^2.1.4",
"npm-pick-manifest": "^6.0.0",
"npm-registry-fetch": "^9.0.0",
"npm-registry-fetch": "^10.0.0",
"promise-retry": "^2.0.1",
"read-package-json-fast": "^2.0.1",
"rimraf": "^3.0.2",
......@@ -5345,6 +5368,11 @@
"inBundle": true,
"license": "MIT"
},
"node_modules/npm/node_modules/proc-log": {
"version": "1.0.0",
"inBundle": true,
"license": "ISC"
},
"node_modules/npm/node_modules/process-nextick-args": {
"version": "2.0.1",
"inBundle": true,
......@@ -5606,7 +5634,7 @@
}
},
"node_modules/npm/node_modules/socks": {
"version": "2.6.0",
"version": "2.6.1",
"inBundle": true,
"license": "MIT",
"dependencies": {
......@@ -6778,6 +6806,11 @@
"node": ">= 0.8.0"
}
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"node_modules/process-on-spawn": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz",
......@@ -7033,6 +7066,21 @@
"rimraf": "bin.js"
}
},
"node_modules/rollup": {
"version": "2.47.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.47.0.tgz",
"integrity": "sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
"node": ">=10.0.0"
},
"optionalDependencies": {
"fsevents": "~2.3.1"
}
},
"node_modules/run-series": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.9.tgz",
......@@ -9336,11 +9384,6 @@
"sax": "^1.2.4"
},
"dependencies": {
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
......@@ -9722,6 +9765,11 @@
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
},
"idb": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/idb/-/idb-6.0.0.tgz",
"integrity": "sha512-+M367poGtpzAylX4pwcrZIa7cFQLfNkAOlMMLN2kw/2jGfJP6h+TB/unQNSVYwNtP8XqkLYrfuiVnxLQNP1tjA=="
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
......@@ -10046,9 +10094,9 @@
}
},
"lodash": {
"version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash.assign": {
"version": "4.2.0",
......@@ -10418,14 +10466,14 @@
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"npm": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/npm/-/npm-7.9.0.tgz",
"integrity": "sha512-GW9RbueF717kJ4ZUVsTlhKBEY7AqX28OwQCsfIAkRZclfeeqQDnsoJz6WWuYTMpGBJnB2xknF8Dp364c93FDYA==",
"version": "7.11.2",
"resolved": "https://registry.npmjs.org/npm/-/npm-7.11.2.tgz",
"integrity": "sha512-NxcaNqAfdLEubG5dlPFWbXrVAG2zb45lB5y6W3PK1PK2feHaffpCN4rnXPD/BPp1kCJespCAv8Kw/QUYR85BRw==",