From a83063cf10ffb95319b14379fe7a94c296c45f9f Mon Sep 17 00:00:00 2001 From: CountBleck Date: Thu, 25 Aug 2022 21:31:48 -0700 Subject: [PATCH 1/6] Modify keyword/license fields to be more accurate The license field is supposed to have a short identifier representing the project's license, like "MIT". The keywords field is for npm's search, if this package is ever published. --- package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 7e96603..e23b789 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,9 @@ "scripts": { "start": "node app.js" }, - "keywords": [ - "educational", - "math", - "science" - ], + "keywords": ["proxy"], "author": "Nebula Services", - "license": "Copyright Nebula Services. All Rights Reserved.", + "license": "MIT", "dependencies": { "@tomphttp/bare-server-node": "^1.0.2-beta-readme5", "bare-server-node": "github:tomphttp/bare-server-node", From cf52907e96f77eacc2260821399d8055a03cdffb Mon Sep 17 00:00:00 2001 From: CountBleck Date: Thu, 25 Aug 2022 21:33:42 -0700 Subject: [PATCH 2/6] Remove app.js This will be replaced by app.mjs in the next commit. --- app.js | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 app.js diff --git a/app.js b/app.js deleted file mode 100644 index d65d184..0000000 --- a/app.js +++ /dev/null @@ -1,4 +0,0 @@ -(async() => { - await - import ('./app.mjs'); -})(); \ No newline at end of file From 796bdfaff5e3d428461b211be6ccf51eaf8e5816 Mon Sep 17 00:00:00 2001 From: CountBleck Date: Thu, 25 Aug 2022 21:34:23 -0700 Subject: [PATCH 3/6] Move app.mjs to app.js app.js was originally a stub that imported app.mjs, which is redundant. This change is split into two commits to preserve Git history for what is now app.js. --- app.mjs => app.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app.mjs => app.js (100%) diff --git a/app.mjs b/app.js similarity index 100% rename from app.mjs rename to app.js From 9d77455926202d9250cec16df5d29157729ae391 Mon Sep 17 00:00:00 2001 From: CountBleck Date: Thu, 25 Aug 2022 21:50:39 -0700 Subject: [PATCH 4/6] Fix a few typos in the documentation I did not modify docs/officially-supported-sites.md, however. That file should be modified and reorganized as seen fit. --- docs/docs.md | 2 +- docs/guides/PATREON.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs.md b/docs/docs.md index aa39082..5f2d66c 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -2,7 +2,7 @@ # Nebula - Documentation Hello and welcome to the Nebula Documentation! -[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/) +[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/) [![Build Passing](https://img.shields.io/badge/build-passing-brightgreen)]() [![docs status]( https://img.shields.io/badge/docs-20%25%20complete-yellow)]() diff --git a/docs/guides/PATREON.md b/docs/guides/PATREON.md index 4c9cdc7..93c57ae 100644 --- a/docs/guides/PATREON.md +++ b/docs/guides/PATREON.md @@ -1,19 +1,19 @@ -# How to access patreon links! +# How to access Patreon links! Welcome to this amazing guide :) ## Step 1 -**Become a patreon...** +**Become a patron...** -*To follow this tutorial, you must be a patreon, duh.* +*To follow this tutorial, you must be a patron, duh.* ## Step 2 -Find a supporter link in the patreon. Posts with links will have the `New links` tag, so just search for that. -Some links are expiramental and may not work as intended, but we will always tell you if it's expiramental. +Find a supporter link in Patreon. Posts with links will have the `New links` tag, so just search for that. +Some links are experimental and may not work as intended, but we will always tell you if it's experimental. ## Step 3 -Use the password from the patreon post *Same post you got the link from, duh* +Use the password from the Patreon post *Same post you got the link from, duh* ## Step 4 Enter the password and Start using Nebula @@ -30,4 +30,4 @@ If the password is incorrect: ## Appendix -This guide is 96% complete. If you are having any trouble accessing or using patreon/supporter only links, contact chloe@nebula.bio or GreenWorld#0001 on discord. +This guide is 96% complete. If you are having any trouble accessing or using Patreon/supporter only links, contact chloe@nebula.bio or GreenWorld#0001 on Discord. From 18cca9b49e33e1fcdc6769413bf6d22c5d2eab4a Mon Sep 17 00:00:00 2001 From: CountBleck Date: Thu, 25 Aug 2022 21:56:26 -0700 Subject: [PATCH 5/6] Read static files from the correct directory By default, paths in Node.js are resolved based upon the current directory. This is problematic when the server is started from the home directory or through systemd. This commit ensures static files are read relative to app.js's path, instead of the current directory. --- app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index b2d463d..e73bc69 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,7 @@ import createBareServer from '@tomphttp/bare-server-node'; import http from 'http'; +import { fileURLToPath } from 'url'; +import { dirname, join } from 'path'; import nodeStatic from 'node-static'; import * as custombare from './static/customBare.mjs'; @@ -9,7 +11,10 @@ const bareServer = createBareServer('/bare/', { localAddress: undefined }); -const serve = new nodeStatic.Server('static/'); +const serve = new nodeStatic.Server(join( + dirname(fileURLToPath(import.meta.url)), + 'static/' +)); const server = http.createServer(); From 5f38e9b636194130823c961767c344fabc36dc68 Mon Sep 17 00:00:00 2001 From: CountBleck Date: Thu, 25 Aug 2022 22:08:44 -0700 Subject: [PATCH 6/6] Bump npm's lockfile --- package-lock.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 628919b..8da8f7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "nebulaweb", "version": "7.0.4", - "license": "Copyright Nebula Services. All Rights Reserved.", + "license": "MIT", "dependencies": { "@tomphttp/bare-server-node": "^1.0.2-beta-readme5", "bare-server-node": "github:tomphttp/bare-server-node", @@ -75,11 +75,11 @@ "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, "node_modules/css-tree": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.1.0.tgz", - "integrity": "sha512-PcysZRzToBbrpoUrZ9qfblRIRf8zbEAkU0AIpQFtgkFK0vSbzOmBCvdSAx2Zg7Xx5wiYJKUKk0NMP7kxevie/A==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", "dependencies": { - "mdn-data": "2.0.27", + "mdn-data": "2.0.28", "source-map-js": "^1.0.1" }, "engines": { @@ -170,9 +170,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/mdn-data": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.27.tgz", - "integrity": "sha512-kwqO0I0jtWr25KcfLm9pia8vLZ8qoAKhWZuZMbneJq3jjBD3gl5nZs8l8Tu3ZBlBAHVQtDur9rdDGyvtfVraHQ==" + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==" }, "node_modules/mime": { "version": "1.6.0", @@ -209,9 +209,9 @@ } }, "node_modules/node-fetch": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.9.tgz", - "integrity": "sha512-/2lI+DBecVvVm9tDhjziTVjo2wmTsSxSk58saUYP0P/fRJ3xxtfMDY24+CKTkfm0Dlhyn3CSXNL0SoRiCZ8Rzg==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -354,11 +354,11 @@ "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, "css-tree": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.1.0.tgz", - "integrity": "sha512-PcysZRzToBbrpoUrZ9qfblRIRf8zbEAkU0AIpQFtgkFK0vSbzOmBCvdSAx2Zg7Xx5wiYJKUKk0NMP7kxevie/A==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", "requires": { - "mdn-data": "2.0.27", + "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, @@ -417,9 +417,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "mdn-data": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.27.tgz", - "integrity": "sha512-kwqO0I0jtWr25KcfLm9pia8vLZ8qoAKhWZuZMbneJq3jjBD3gl5nZs8l8Tu3ZBlBAHVQtDur9rdDGyvtfVraHQ==" + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==" }, "mime": { "version": "1.6.0", @@ -437,9 +437,9 @@ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" }, "node-fetch": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.9.tgz", - "integrity": "sha512-/2lI+DBecVvVm9tDhjziTVjo2wmTsSxSk58saUYP0P/fRJ3xxtfMDY24+CKTkfm0Dlhyn3CSXNL0SoRiCZ8Rzg==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", "requires": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4",