Skip to content

Commit

Permalink
Merge pull request #247 from Zekiah-A/main
Browse files Browse the repository at this point in the history
Major server code cleanups, security enhancements + RELICENSE
  • Loading branch information
Zekiah-A authored Mar 3, 2024
2 parents 94f50f8 + de451f9 commit 98d8284
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 840 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
"no-process-exit": "off",
"no-unused-vars": "off",
"prefer-const": "warn",
"no-const-assign": "error"
"no-const-assign": "error",
"require-jsdoc": "off",
"no-explicit-any": "off"
},
"globals": {
"Bun": false
"Bun": true
}
}
}
827 changes: 159 additions & 668 deletions LICENSE

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Forks of this project should either:
- Connect to the same server, that is, wss://server.rplace.tk:443
- Or use the same app, that is, https://rplace.live

We request forks are not run commercially (That is, it must not generate more than the cost of server upkeep)
This project is licensed under the GNU LGPL v3, out of goodwill we request forks are
not run commercially (That is, they should not generate more than the cost of server upkeep).

### For example,

Expand Down
10 changes: 0 additions & 10 deletions add.js

This file was deleted.

103 changes: 54 additions & 49 deletions index.html

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{
"type": "module",
"main": "server.js",
"license": "GPL-3.0-or-later",
"license": "LGPL-3.0-or-later",
"author": "rplace.live",
"dependencies": {
"@datastructures-js/queue": "^4.2.3",
"basic-repl": "^2.2.1",
"bun-types": "^1.0.11",
"cookie": "^0.5.0",
"cookie": "^0.6.0",
"fs.promises.exists": "^1.1.3",
"imagemagick": "^0.1.3",
"ipapi-sync": "^1.0.0",
"node-fetch": "^3.2.3",
"sha256": "^0.2.0",
"skia-canvas": "^1.0.1"
"sha256": "^0.2.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.4",
Expand All @@ -26,4 +24,4 @@
"engines": {
"node": ">=12.11.0"
}
}
}
12 changes: 12 additions & 0 deletions server-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** Promise with resolve and reject exposed - Like C# TaskCompletionSource */
export class PublicPromise<T> {
promise: Promise<T>
resolve!: (value: T | PromiseLike<T>) => void
reject!: (reason?: string) => void
constructor() {
this.promise = new Promise((resolve, reject) => {
this.resolve = resolve
this.reject = reject
})
}
}
Loading

0 comments on commit 98d8284

Please sign in to comment.