aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json68
-rw-r--r--package.json2
-rw-r--r--src/server/DashSession/DashSessionAgent.ts24
-rw-r--r--src/typings/index.d.ts2
4 files changed, 19 insertions, 77 deletions
diff --git a/package-lock.json b/package-lock.json
index a724a8598..1c409725a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2417,21 +2417,6 @@
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
- "boolify-string": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/boolify-string/-/boolify-string-2.0.2.tgz",
- "integrity": "sha1-n4m9l9YKFEijlAF8SjuaPSQNRY4=",
- "requires": {
- "type-detect": "^1.0.0"
- },
- "dependencies": {
- "type-detect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
- "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI="
- }
- }
- },
"bootstrap": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz",
@@ -2672,7 +2657,8 @@
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+ "dev": true
},
"buffer-indexof": {
"version": "1.1.1",
@@ -4315,14 +4301,6 @@
"minimalistic-crypto-utils": "^1.0.0"
}
},
- "emit-logger": {
- "version": "github:chocolateboy/emit-logger#b9d25a2d939e42f29c940861e9648bd0fb810070",
- "from": "github:chocolateboy/emit-logger#better-emitter-name",
- "requires": {
- "chalk": "^1.1.1",
- "moment": "^2.10.6"
- }
- },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -5930,11 +5908,6 @@
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
- "get-them-args": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/get-them-args/-/get-them-args-1.3.2.tgz",
- "integrity": "sha1-dKILqKSr7OWuGZrQPyvMaP38m6U="
- },
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
@@ -7064,20 +7037,6 @@
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
},
- "ipc-event-emitter": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/ipc-event-emitter/-/ipc-event-emitter-2.0.2.tgz",
- "integrity": "sha512-hJsN8zCg8MZwl5nbTutqINDO4pJPbKwmCfrTJaRLNE+5H15mJx7Mxo3pXIAi8zlh+N5xpf+PdMOQ0pbtZQvRKA==",
- "requires": {
- "babel-runtime": "^6.22.0",
- "bluebird": "^3.4.7",
- "boolify-string": "^2.0.2",
- "emit-logger": "github:chocolateboy/emit-logger#better-emitter-name",
- "lodash": "^4.17.4",
- "semver": "^5.0.3",
- "source-map-support": "^0.5.9"
- }
- },
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
@@ -7840,15 +7799,6 @@
"resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.3.tgz",
"integrity": "sha512-/PpesirAIfaklxUzp4Yb7xBper9MwP6hNRA6BGGUFCgbJ+BM5CKBtsoxinNXkLHAr+GXS1/lSlF2rP7cv5Fl+g=="
},
- "kill-port": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/kill-port/-/kill-port-1.6.0.tgz",
- "integrity": "sha512-gwHRBZ3OLBcupsOJZlIt2Xvf6QqFH3lfdpGnmonXJnJrqq819UXtItGEU1rCMXHK6sXFlxdpkw8ka56rtWw/eQ==",
- "requires": {
- "get-them-args": "^1.3.1",
- "shell-exec": "^1.0.2"
- }
- },
"killable": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
@@ -8553,11 +8503,6 @@
}
}
},
- "moment": {
- "version": "2.24.0",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
- "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
- },
"mongodb": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.7.tgz",
@@ -15195,11 +15140,6 @@
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
- "shell-exec": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/shell-exec/-/shell-exec-1.0.2.tgz",
- "integrity": "sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg=="
- },
"shelljs": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
@@ -15557,6 +15497,7 @@
"version": "0.5.12",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
+ "dev": true,
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
@@ -15565,7 +15506,8 @@
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
}
}
},
diff --git a/package.json b/package.json
index 95992b12a..963098512 100644
--- a/package.json
+++ b/package.json
@@ -157,13 +157,11 @@
"image-data-uri": "^2.0.0",
"image-size": "^0.7.4",
"imagesloaded": "^4.1.4",
- "ipc-event-emitter": "^2.0.2",
"jquery-awesome-cursor": "^0.3.1",
"js-datepicker": "^4.6.6",
"jsonschema": "^1.2.5",
"jsonwebtoken": "^8.5.0",
"jsx-to-string": "^1.4.0",
- "kill-port": "^1.6.0",
"lodash": "^4.17.15",
"mobile-detect": "^1.4.3",
"mobx": "^5.15.0",
diff --git a/src/server/DashSession/DashSessionAgent.ts b/src/server/DashSession/DashSessionAgent.ts
index 86cddcea1..eab624d32 100644
--- a/src/server/DashSession/DashSessionAgent.ts
+++ b/src/server/DashSession/DashSessionAgent.ts
@@ -25,14 +25,14 @@ export class DashSessionAgent extends AppliedSessionAgent {
* The core method invoked when the single master thread is initialized.
* Installs event hooks, repl commands and additional IPC listeners.
*/
- protected async initializeMonitor(monitor: Monitor, sessionKey: string) {
+ protected async initializeMonitor(monitor: Monitor, sessionKey: string): Promise<void> {
await this.dispatchSessionPassword(sessionKey);
monitor.addReplCommand("pull", [], () => monitor.exec("git pull"));
monitor.addReplCommand("solr", [/start|stop|index/], this.executeSolrCommand);
monitor.addReplCommand("backup", [], this.backup);
monitor.addReplCommand("debug", [/active|passive/, /\S+\@\S+/], async ([mode, recipient]) => this.dispatchZippedDebugBackup(mode, recipient));
monitor.on("backup", this.backup);
- monitor.on("debug", ({ mode, recipient }) => this.dispatchZippedDebugBackup(mode, recipient));
+ monitor.on("debug", async ({ mode, recipient }) => this.dispatchZippedDebugBackup(mode, recipient));
monitor.coreHooks.onCrashDetected(this.dispatchCrashReport);
}
@@ -40,7 +40,7 @@ export class DashSessionAgent extends AppliedSessionAgent {
* The core method invoked when a server worker thread is initialized.
* Installs logic to be executed when the server worker dies.
*/
- protected async initializeServerWorker() {
+ protected async initializeServerWorker(): Promise<ServerWorker> {
const worker = ServerWorker.Create(launchServer); // server initialization delegated to worker
worker.addExitHandler(this.notifyClient);
return worker;
@@ -50,7 +50,7 @@ export class DashSessionAgent extends AppliedSessionAgent {
* Prepares the body of the email with instructions on restoring the transmitted remote database backup locally.
*/
private _remoteDebugInstructions: string | undefined;
- private generateDebugInstructions = (zipName: string, target: string) => {
+ private generateDebugInstructions = (zipName: string, target: string): string => {
if (!this._remoteDebugInstructions) {
this._remoteDebugInstructions = readFileSync(resolve(__dirname, "./templates/remote_debug_instructions.txt"), { encoding: "utf8" });
}
@@ -64,7 +64,7 @@ export class DashSessionAgent extends AppliedSessionAgent {
* Prepares the body of the email with information regarding a crash event.
*/
private _crashInstructions: string | undefined;
- private generateCrashInstructions({ name, message, stack }: Error) {
+ private generateCrashInstructions({ name, message, stack }: Error): string {
if (!this._crashInstructions) {
this._crashInstructions = readFileSync(resolve(__dirname, "./templates/crash_instructions.txt"), { encoding: "utf8" });
}
@@ -79,14 +79,18 @@ export class DashSessionAgent extends AppliedSessionAgent {
* This sends a pseudorandomly generated guid to the configuration's recipients, allowing them alone
* to kill the server via the /kill/:key route.
*/
- private dispatchSessionPassword = async (sessionKey: string) => {
+ private dispatchSessionPassword = async (sessionKey: string): Promise<void> => {
const { mainLog } = this.sessionMonitor;
const { notificationRecipient } = DashSessionAgent;
mainLog(green("dispatching session key..."));
const error = await Email.dispatch({
to: notificationRecipient,
subject: "Dash Release Session Admin Authentication Key",
- content: `Here's the key for this session (started @ ${new Date().toUTCString()}):\n\n${sessionKey}\n\n${this.signature}`
+ content: [
+ `Here's the key for this session (started @ ${new Date().toUTCString()}):`,
+ sessionKey,
+ this.signature
+ ].join("\n\n")
});
if (error) {
this.sessionMonitor.mainLog(red(`dispatch failure @ ${notificationRecipient} (${yellow(error.message)})`));
@@ -119,7 +123,7 @@ export class DashSessionAgent extends AppliedSessionAgent {
* Logic for interfacing with Solr. Either starts it,
* stops it, or rebuilds its indicies.
*/
- private executeSolrCommand = async (args: string[]) => {
+ private executeSolrCommand = async (args: string[]): Promise<void> => {
const { exec, mainLog } = this.sessionMonitor;
const action = args[0];
if (action === "index") {
@@ -152,7 +156,7 @@ export class DashSessionAgent extends AppliedSessionAgent {
* Performs a backup of the database, saved to the desktop subdirectory.
* This should work as is only on our specific release server.
*/
- private backup = async () => this.sessionMonitor.exec("backup.bat", { cwd: this.releaseDesktop });
+ private backup = async (): Promise<void> => this.sessionMonitor.exec("backup.bat", { cwd: this.releaseDesktop });
/**
* Compress either a brand new backup or the most recent backup and send it
@@ -160,7 +164,7 @@ export class DashSessionAgent extends AppliedSessionAgent {
* @param mode specifies whether or not to make a new backup before exporting
* @param to the recipient of the email
*/
- private async dispatchZippedDebugBackup(mode: string, to: string) {
+ private async dispatchZippedDebugBackup(mode: string, to: string): Promise<void> {
const { mainLog } = this.sessionMonitor;
try {
// if desired, complete an immediate backup to send
diff --git a/src/typings/index.d.ts b/src/typings/index.d.ts
index cc68e8a4d..281bb3217 100644
--- a/src/typings/index.d.ts
+++ b/src/typings/index.d.ts
@@ -2,8 +2,6 @@
declare module 'googlephotos';
declare module 'react-image-lightbox-with-rotate';
-declare module 'kill-port';
-declare module 'ipc-event-emitter';
declare module 'cors';
declare module '@react-pdf/renderer' {