From c38ed52c810a11258848ba26a6fca593587ab1eb Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Tue, 1 Dec 2020 09:06:21 +1030 Subject: [PATCH] chore: cleanup --- app/index.ts | 2 +- app/mothership/index.ts | 1 + app/run.ts | 5 ++--- package.json | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/index.ts b/app/index.ts index 641b594e2..891bb8bc3 100644 --- a/app/index.ts +++ b/app/index.ts @@ -49,4 +49,4 @@ am(async () => { // eslint-disable-next-line unicorn/no-process-exit process.exit(1); }); -}); +}); \ No newline at end of file diff --git a/app/mothership/index.ts b/app/mothership/index.ts index e216e6515..87667b23c 100644 --- a/app/mothership/index.ts +++ b/app/mothership/index.ts @@ -186,6 +186,7 @@ class MothershipService { try { mothershipLogger.debug('Connection closed with code %s.', code); + // Stop ws heartbeat if (this.pingTimeout) { clearTimeout(this.pingTimeout); } diff --git a/app/run.ts b/app/run.ts index 951a59e57..f2595b34c 100644 --- a/app/run.ts +++ b/app/run.ts @@ -1,7 +1,6 @@ import type { CoreResult } from './core/types'; -import { pubsub, utils, coreLogger } from './core'; - -const { debugTimer } = utils; +import { pubsub, coreLogger } from './core'; +import { debugTimer } from './core/utils'; /** * Publish update to topic channel. diff --git a/package.json b/package.json index e51c773f7..6c64ea743 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,9 @@ "author": "Alexis Tyler (https://wvvw.me/)", "license": "UNLICENSED", "scripts": { - "build": "npm run bundle && npm run copy-schemas", - "bundle": "npx tsup ./app/index.ts --minify", + "build": "npm run bundle-minify && npm run copy-schemas", + "bundle": "npx tsup ./app/index.ts", + "bundle-minify": "npx tsup ./app/index.ts --minify", "bundle-dependencies": "bundle-dependencies update", "copy-schemas": "cpx app/**/*.graphql dist/types", "clean": "modclean --no-progress --run --path .",