diff --git a/package.json b/package.json index daee1c7..633fe6f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "create-ba-web-app": "node ./bin/create-project.js" }, "dependencies": { - "@BridgemanAccessible/ba-auth": "^1.0.11", + "@BridgemanAccessible/ba-auth": "^1.0.10", "@BridgemanAccessible/ba-logging": "^1.0.1", "express": "^4.19.2", "fs-extra": "^11.2.0", diff --git a/src/App.ts b/src/App.ts index 2b0db1f..9af3c5f 100644 --- a/src/App.ts +++ b/src/App.ts @@ -1,5 +1,5 @@ import 'reflect-metadata'; -import type { Application } from 'express'; +import { Application } from 'express'; import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging'; diff --git a/src/BaseTemplateCreator.ts b/src/BaseTemplateCreator.ts index ab95ae2..5090a1b 100644 --- a/src/BaseTemplateCreator.ts +++ b/src/BaseTemplateCreator.ts @@ -1,9 +1,6 @@ import path from 'path'; import fse from 'fs-extra'; -import jsdom from 'jsdom'; -import type { JSDOM as JSDocument } from 'jsdom'; - -const { JSDOM } = jsdom; +import { JSDOM } from 'jsdom'; /** The inputs for setting up the meta tags */ type SetupMetaTagInputs = { @@ -36,7 +33,7 @@ export class BaseTemplateCreator { private output: string; /** The DOM of the template */ - private dom: JSDocument; + private dom: JSDOM; /** The document of the template */ private document: Document; diff --git a/src/Initializer.ts b/src/Initializer.ts index a7cb04b..3c479e3 100644 --- a/src/Initializer.ts +++ b/src/Initializer.ts @@ -1,5 +1,4 @@ -import express from 'express'; -import type { Application, RequestHandler } from 'express'; +import express, { Application, RequestHandler } from 'express'; import { Router } from './Router.js'; import { StaticFileResolver } from './StaticFileResolver.js'; diff --git a/src/OAuthApp.ts b/src/OAuthApp.ts index ca081b4..c978a24 100644 --- a/src/OAuthApp.ts +++ b/src/OAuthApp.ts @@ -1,7 +1,6 @@ -import type { Application } from 'express'; +import { Application } from 'express'; import { Scopes } from '@BridgemanAccessible/ba-auth'; -import Client from '@BridgemanAccessible/ba-auth/client'; -import type { OnAuthCallback } from '@BridgemanAccessible/ba-auth/client'; +import Client, { OnAuthCallback } from '@BridgemanAccessible/ba-auth/client'; import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging'; import { App } from './App.js'; diff --git a/src/Renderer.ts b/src/Renderer.ts index 367f6c3..665fcab 100644 --- a/src/Renderer.ts +++ b/src/Renderer.ts @@ -1,9 +1,8 @@ import { existsSync, statSync } from 'fs'; import path from 'path'; -import type { Application } from 'express'; +import { Application } from 'express'; -import { BaseTemplateCreator } from './BaseTemplateCreator.js'; -import type { BaseTemplateInputs } from './BaseTemplateCreator.js'; +import { BaseTemplateInputs, BaseTemplateCreator } from './BaseTemplateCreator.js'; export class Renderer { /** The default folder name for the views */ diff --git a/src/Router.ts b/src/Router.ts index 4ea5ad6..2335fec 100644 --- a/src/Router.ts +++ b/src/Router.ts @@ -1,5 +1,5 @@ import path from 'path'; -import type { Application } from 'express'; +import { Application } from 'express'; import fse from 'fs-extra'; import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging'; diff --git a/src/StaticFileResolver.ts b/src/StaticFileResolver.ts index 322cadf..eef2932 100644 --- a/src/StaticFileResolver.ts +++ b/src/StaticFileResolver.ts @@ -1,7 +1,6 @@ import { existsSync, statSync } from 'fs'; import path from 'path'; -import express from 'express'; -import type { Application } from 'express'; +import express, { Application } from 'express'; /** * A class that wraps around Express's static file serving functionality. diff --git a/src/controllers/BaseController.ts b/src/controllers/BaseController.ts index a716408..10831d5 100644 --- a/src/controllers/BaseController.ts +++ b/src/controllers/BaseController.ts @@ -1,4 +1,4 @@ -import type { Application } from 'express'; +import { Application } from 'express'; export abstract class BaseController { static setup(app: Application) {} diff --git a/src/controllers/ErrorController.ts b/src/controllers/ErrorController.ts index 68b778d..40f559b 100644 --- a/src/controllers/ErrorController.ts +++ b/src/controllers/ErrorController.ts @@ -1,4 +1,4 @@ -import type { Request, Response, NextFunction } from 'express'; +import { Request, Response, NextFunction } from 'express'; export abstract class ErrorController { /** A human readable string to describe the error this controller handles. */ diff --git a/src/decorators/Controller.ts b/src/decorators/Controller.ts index 12685d3..72597f7 100644 --- a/src/decorators/Controller.ts +++ b/src/decorators/Controller.ts @@ -1,4 +1,4 @@ -import type { Application, Request, Response, NextFunction } from 'express'; +import { Application, Request, Response, NextFunction } from 'express'; import { BaseController } from '../controllers/BaseController.js'; diff --git a/src/decorators/DELETE.ts b/src/decorators/DELETE.ts index d9c5a30..4e1004e 100644 --- a/src/decorators/DELETE.ts +++ b/src/decorators/DELETE.ts @@ -1,5 +1,5 @@ -import type { NextFunction } from 'express'; -import type { NextHandleFunction } from 'connect'; +import { NextFunction } from 'express'; +import { NextHandleFunction } from 'connect'; export const DELETE_METADATA_KEY = 'Delete'; diff --git a/src/decorators/ErrorHandler.ts b/src/decorators/ErrorHandler.ts index 94b13f2..e2de45d 100644 --- a/src/decorators/ErrorHandler.ts +++ b/src/decorators/ErrorHandler.ts @@ -1,4 +1,4 @@ -import type { Request, Response, NextFunction } from 'express'; +import { Request, Response, NextFunction } from 'express'; import { ErrorController } from '../controllers/ErrorController.js'; diff --git a/src/decorators/POST.ts b/src/decorators/POST.ts index fb8fa6a..ec8ab95 100644 --- a/src/decorators/POST.ts +++ b/src/decorators/POST.ts @@ -1,5 +1,5 @@ -import type { NextFunction } from 'express'; -import type { NextHandleFunction } from 'connect'; +import { NextFunction } from 'express'; +import { NextHandleFunction } from 'connect'; export const POST_METADATA_KEY = 'Put'; diff --git a/src/decorators/PUT.ts b/src/decorators/PUT.ts index 439d7cc..0cc9370 100644 --- a/src/decorators/PUT.ts +++ b/src/decorators/PUT.ts @@ -1,5 +1,5 @@ -import type { NextFunction } from 'express'; -import type { NextHandleFunction } from 'connect'; +import { NextFunction } from 'express'; +import { NextHandleFunction } from 'connect'; export const PUT_METADATA_KEY = 'Put'; diff --git a/src/decorators/Page.ts b/src/decorators/Page.ts index aed57ad..61714ac 100644 --- a/src/decorators/Page.ts +++ b/src/decorators/Page.ts @@ -1,4 +1,4 @@ -import type { Request, Response, NextFunction } from 'express'; +import { Request, Response, NextFunction } from 'express'; // Response type guard function isResponse(obj) { diff --git a/src/middlewares/GlobalTemplateValuesMiddleware.ts b/src/middlewares/GlobalTemplateValuesMiddleware.ts index e518f7a..96fff97 100644 --- a/src/middlewares/GlobalTemplateValuesMiddleware.ts +++ b/src/middlewares/GlobalTemplateValuesMiddleware.ts @@ -1,4 +1,4 @@ -import type { Request, Response, NextFunction, RequestHandler } from 'express'; +import { Request, Response, NextFunction, RequestHandler } from 'express'; /** * Class that creates middleware to set global template values for all pages. diff --git a/src/middlewares/HealthCheckMiddleware.ts b/src/middlewares/HealthCheckMiddleware.ts index 7b4134e..3e82d85 100644 --- a/src/middlewares/HealthCheckMiddleware.ts +++ b/src/middlewares/HealthCheckMiddleware.ts @@ -1,4 +1,4 @@ -import type { Request, Response, NextFunction, RequestHandler } from 'express'; +import { Request, Response, NextFunction, RequestHandler } from 'express'; export enum HealthCheckStatus { OK = 'ok', diff --git a/yarn.lock b/yarn.lock index f7fec4e..3fd8306 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@BridgemanAccessible/ba-auth@^1.0.11": - version "1.0.11" - resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth/-/ba-auth-1.0.11.tgz#fd32e23bacef1985a2eac017e8aabe9a0b8a4d0d" - integrity sha512-GctJaXhWthvn6UZCq8Ymc9IQbUy1Ew9fj4XoVdh6vGDlum4H399SdM2arBkv6t8QBHyVBe1Y+LuABb8nWOoNPw== +"@BridgemanAccessible/ba-auth@^1.0.10": + version "1.0.10" + resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth/-/ba-auth-1.0.10.tgz#423b14799c8b34d22e39ac36b46f945d31ac3690" + integrity sha512-pvQ79lo+9vHL9Um4FDWnRZIX+uVkFhCeZqwYhYLb6ixNZ+RTYhmuIrcMV6VfRI6S1ozSkgIK4S6htHspExoylQ== dependencies: "@BridgemanAccessible/ba-logging" "^1.0.1" "@azure/identity" "^4.0.1"