Compare commits
2 commits
12ed438053
...
f79ed4d7e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f79ed4d7e4 | ||
|
|
358fbfcc76 |
19 changed files with 35 additions and 28 deletions
|
|
@ -35,7 +35,7 @@
|
||||||
"create-ba-web-app": "node ./bin/create-project.js"
|
"create-ba-web-app": "node ./bin/create-project.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@BridgemanAccessible/ba-auth": "^1.0.10",
|
"@BridgemanAccessible/ba-auth": "^1.0.11",
|
||||||
"@BridgemanAccessible/ba-logging": "^1.0.1",
|
"@BridgemanAccessible/ba-logging": "^1.0.1",
|
||||||
"express": "^4.19.2",
|
"express": "^4.19.2",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import 'reflect-metadata';
|
import 'reflect-metadata';
|
||||||
import { Application } from 'express';
|
import type { Application } from 'express';
|
||||||
|
|
||||||
import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging';
|
import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fse from 'fs-extra';
|
import fse from 'fs-extra';
|
||||||
import { JSDOM } from 'jsdom';
|
import jsdom from 'jsdom';
|
||||||
|
import type { JSDOM as JSDocument } from 'jsdom';
|
||||||
|
|
||||||
|
const { JSDOM } = jsdom;
|
||||||
|
|
||||||
/** The inputs for setting up the meta tags */
|
/** The inputs for setting up the meta tags */
|
||||||
type SetupMetaTagInputs = {
|
type SetupMetaTagInputs = {
|
||||||
|
|
@ -33,7 +36,7 @@ export class BaseTemplateCreator {
|
||||||
private output: string;
|
private output: string;
|
||||||
|
|
||||||
/** The DOM of the template */
|
/** The DOM of the template */
|
||||||
private dom: JSDOM;
|
private dom: JSDocument;
|
||||||
|
|
||||||
/** The document of the template */
|
/** The document of the template */
|
||||||
private document: Document;
|
private document: Document;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import express, { Application, RequestHandler } from 'express';
|
import express from 'express';
|
||||||
|
import type { Application, RequestHandler } from 'express';
|
||||||
|
|
||||||
import { Router } from './Router.js';
|
import { Router } from './Router.js';
|
||||||
import { StaticFileResolver } from './StaticFileResolver.js';
|
import { StaticFileResolver } from './StaticFileResolver.js';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Application } from 'express';
|
import type { Application } from 'express';
|
||||||
import { Scopes } from '@BridgemanAccessible/ba-auth';
|
import { Scopes } from '@BridgemanAccessible/ba-auth';
|
||||||
import Client, { OnAuthCallback } from '@BridgemanAccessible/ba-auth/client';
|
import Client from '@BridgemanAccessible/ba-auth/client';
|
||||||
|
import type { OnAuthCallback } from '@BridgemanAccessible/ba-auth/client';
|
||||||
import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging';
|
import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging';
|
||||||
|
|
||||||
import { App } from './App.js';
|
import { App } from './App.js';
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import { existsSync, statSync } from 'fs';
|
import { existsSync, statSync } from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { Application } from 'express';
|
import type { Application } from 'express';
|
||||||
|
|
||||||
import { BaseTemplateInputs, BaseTemplateCreator } from './BaseTemplateCreator.js';
|
import { BaseTemplateCreator } from './BaseTemplateCreator.js';
|
||||||
|
import type { BaseTemplateInputs } from './BaseTemplateCreator.js';
|
||||||
|
|
||||||
export class Renderer {
|
export class Renderer {
|
||||||
/** The default folder name for the views */
|
/** The default folder name for the views */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { Application } from 'express';
|
import type { Application } from 'express';
|
||||||
import fse from 'fs-extra';
|
import fse from 'fs-extra';
|
||||||
|
|
||||||
import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging';
|
import { logMessage, LogLevel } from '@BridgemanAccessible/ba-logging';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { existsSync, statSync } from 'fs';
|
import { existsSync, statSync } from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import express, { Application } from 'express';
|
import express from 'express';
|
||||||
|
import type { Application } from 'express';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that wraps around Express's static file serving functionality.
|
* A class that wraps around Express's static file serving functionality.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Application } from 'express';
|
import type { Application } from 'express';
|
||||||
|
|
||||||
export abstract class BaseController {
|
export abstract class BaseController {
|
||||||
static setup(app: Application) {}
|
static setup(app: Application) {}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Request, Response, NextFunction } from 'express';
|
import type { Request, Response, NextFunction } from 'express';
|
||||||
|
|
||||||
export abstract class ErrorController {
|
export abstract class ErrorController {
|
||||||
/** A human readable string to describe the error this controller handles. */
|
/** A human readable string to describe the error this controller handles. */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Application, Request, Response, NextFunction } from 'express';
|
import type { Application, Request, Response, NextFunction } from 'express';
|
||||||
|
|
||||||
import { BaseController } from '../controllers/BaseController.js';
|
import { BaseController } from '../controllers/BaseController.js';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { NextFunction } from 'express';
|
import type { NextFunction } from 'express';
|
||||||
import { NextHandleFunction } from 'connect';
|
import type { NextHandleFunction } from 'connect';
|
||||||
|
|
||||||
export const DELETE_METADATA_KEY = 'Delete';
|
export const DELETE_METADATA_KEY = 'Delete';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Request, Response, NextFunction } from 'express';
|
import type { Request, Response, NextFunction } from 'express';
|
||||||
|
|
||||||
import { ErrorController } from '../controllers/ErrorController.js';
|
import { ErrorController } from '../controllers/ErrorController.js';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { NextFunction } from 'express';
|
import type { NextFunction } from 'express';
|
||||||
import { NextHandleFunction } from 'connect';
|
import type { NextHandleFunction } from 'connect';
|
||||||
|
|
||||||
export const POST_METADATA_KEY = 'Put';
|
export const POST_METADATA_KEY = 'Put';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { NextFunction } from 'express';
|
import type { NextFunction } from 'express';
|
||||||
import { NextHandleFunction } from 'connect';
|
import type { NextHandleFunction } from 'connect';
|
||||||
|
|
||||||
export const PUT_METADATA_KEY = 'Put';
|
export const PUT_METADATA_KEY = 'Put';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Request, Response, NextFunction } from 'express';
|
import type { Request, Response, NextFunction } from 'express';
|
||||||
|
|
||||||
// Response type guard
|
// Response type guard
|
||||||
function isResponse(obj) {
|
function isResponse(obj) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Request, Response, NextFunction, RequestHandler } from 'express';
|
import type { Request, Response, NextFunction, RequestHandler } from 'express';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that creates middleware to set global template values for all pages.
|
* Class that creates middleware to set global template values for all pages.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Request, Response, NextFunction, RequestHandler } from 'express';
|
import type { Request, Response, NextFunction, RequestHandler } from 'express';
|
||||||
|
|
||||||
export enum HealthCheckStatus {
|
export enum HealthCheckStatus {
|
||||||
OK = 'ok',
|
OK = 'ok',
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@BridgemanAccessible/ba-auth@^1.0.10":
|
"@BridgemanAccessible/ba-auth@^1.0.11":
|
||||||
version "1.0.10"
|
version "1.0.11"
|
||||||
resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth/-/ba-auth-1.0.10.tgz#423b14799c8b34d22e39ac36b46f945d31ac3690"
|
resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth/-/ba-auth-1.0.11.tgz#fd32e23bacef1985a2eac017e8aabe9a0b8a4d0d"
|
||||||
integrity sha512-pvQ79lo+9vHL9Um4FDWnRZIX+uVkFhCeZqwYhYLb6ixNZ+RTYhmuIrcMV6VfRI6S1ozSkgIK4S6htHspExoylQ==
|
integrity sha512-GctJaXhWthvn6UZCq8Ymc9IQbUy1Ew9fj4XoVdh6vGDlum4H399SdM2arBkv6t8QBHyVBe1Y+LuABb8nWOoNPw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@BridgemanAccessible/ba-logging" "^1.0.1"
|
"@BridgemanAccessible/ba-logging" "^1.0.1"
|
||||||
"@azure/identity" "^4.0.1"
|
"@azure/identity" "^4.0.1"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue