dependencies

- fix pdf output
- fix eslint imports
deepsource-autofix-76c6eb20
Dan Gowans 2024-10-28 09:30:13 -04:00
parent 055f708304
commit 4b8b4836fd
7 changed files with 7195 additions and 1234 deletions

View File

@ -1,5 +1,4 @@
import { configWebApp } from 'eslint-config-cityssm'; import { configWebApp, tseslint } from 'eslint-config-cityssm';
import tseslint from 'typescript-eslint';
export const config = tseslint.config(...configWebApp, { export const config = tseslint.config(...configWebApp, {
languageOptions: { languageOptions: {
parserOptions: { parserOptions: {

View File

@ -1,5 +1,4 @@
import { configWebApp } from 'eslint-config-cityssm' import { configWebApp, tseslint } from 'eslint-config-cityssm'
import tseslint from 'typescript-eslint'
export const config = tseslint.config(...configWebApp, { export const config = tseslint.config(...configWebApp, {
languageOptions: { languageOptions: {

View File

@ -1,4 +1,3 @@
/// <reference types="cookie-parser" />
import type { NextFunction, Request, Response } from 'express'; import type { NextFunction, Request, Response } from 'express';
export declare function handler(request: Request, response: Response, next: NextFunction): Promise<void>; export declare function handler(request: Request, response: Response, next: NextFunction): Promise<void>;
export default handler; export default handler;

View File

@ -25,7 +25,8 @@ export async function handler(request, response, next) {
response.send(pdf); response.send(pdf);
} }
async function ejsCallbackFunction(ejsError, ejsData) { async function ejsCallbackFunction(ejsError, ejsData) {
if (ejsError) { // eslint-disable-next-line unicorn/no-null
if (ejsError != null) {
next(ejsError); next(ejsError);
return; return;
} }
@ -34,7 +35,7 @@ export async function handler(request, response, next) {
printBackground: true, printBackground: true,
preferCSSPageSize: true preferCSSPageSize: true
}); });
pdfCallbackFunction(pdf); pdfCallbackFunction(Buffer.from(pdf));
} }
await renderEjsFile(reportPath, reportData, {}, ejsCallbackFunction); await renderEjsFile(reportPath, reportData, {}, ejsCallbackFunction);
} }

View File

@ -63,10 +63,11 @@ export async function handler(
} }
async function ejsCallbackFunction( async function ejsCallbackFunction(
ejsError: Error, ejsError: Error | null,
ejsData: string ejsData: string
): Promise<void> { ): Promise<void> {
if (ejsError) { // eslint-disable-next-line unicorn/no-null
if (ejsError != null) {
next(ejsError) next(ejsError)
return return
} }
@ -77,7 +78,7 @@ export async function handler(
preferCSSPageSize: true preferCSSPageSize: true
}) })
pdfCallbackFunction(pdf) pdfCallbackFunction(Buffer.from(pdf))
} }
await renderEjsFile(reportPath, reportData, {}, ejsCallbackFunction) await renderEjsFile(reportPath, reportData, {}, ejsCallbackFunction)

8370
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -37,44 +37,43 @@
"@cityssm/bulma-webapp-js": "^1.5.0", "@cityssm/bulma-webapp-js": "^1.5.0",
"@cityssm/configurator": "^0.1.0", "@cityssm/configurator": "^0.1.0",
"@cityssm/date-diff": "^2.2.3", "@cityssm/date-diff": "^2.2.3",
"@cityssm/dynamics-gp": "^1.0.3", "@cityssm/dynamics-gp": "^1.0.4",
"@cityssm/font-awesome-v5-iconclasses": "^0.1.0", "@cityssm/font-awesome-v5-iconclasses": "^0.1.0",
"@cityssm/ntfy-publish": "^1.0.1", "@cityssm/ntfy-publish": "^1.0.1",
"@cityssm/pdf-puppeteer": "^4.2.0", "@cityssm/pdf-puppeteer": "^4.3.1",
"@cityssm/utils-datetime": "^1.3.0", "@cityssm/utils-datetime": "^1.3.0",
"@fortawesome/fontawesome-free": "^5.15.4", "@fortawesome/fontawesome-free": "^5.15.4",
"activedirectory2": "^2.2.0", "activedirectory2": "^2.2.0",
"better-sqlite-pool": "^0.3.2", "better-sqlite-pool": "^0.3.2",
"better-sqlite3": "^11.1.2", "better-sqlite3": "^11.5.0",
"bulma-calendar": "^6.1.19", "bulma-calendar": "^6.1.19",
"camelcase": "^8.0.0", "camelcase": "^8.0.0",
"compression": "^1.7.4", "compression": "^1.7.4",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.7",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"csurf": "^1.11.0", "csurf": "^1.11.0",
"debug": "^4.3.5", "debug": "^4.3.7",
"ejs": "^3.1.10", "ejs": "^3.1.10",
"eslint-config-cityssm": "^5.0.0",
"exit-hook": "^4.0.0", "exit-hook": "^4.0.0",
"express": "^4.19.2", "express": "^4.21.1",
"express-rate-limit": "^7.3.1", "express-rate-limit": "^7.4.1",
"express-session": "^1.18.0", "express-session": "^1.18.1",
"http-errors": "^2.0.0", "http-errors": "^2.0.0",
"ical-generator": "^7.1.0", "ical-generator": "^8.0.1",
"leaflet": "^1.9.4", "leaflet": "^1.9.4",
"node-cache": "^5.1.2", "node-cache": "^5.1.2",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"randomcolor": "^0.6.2", "randomcolor": "^0.6.2",
"session-file-store": "^1.5.0", "session-file-store": "^1.5.0",
"set-interval-async": "^3.0.3", "set-interval-async": "^3.0.3",
"uuid": "^10.0.0" "uuid": "^11.0.1"
}, },
"devDependencies": { "devDependencies": {
"@cityssm/bulma-a11y": "^0.4.0", "@cityssm/bulma-a11y": "^0.4.0",
"@cityssm/bulma-sticky-table": "^2.1.0", "@cityssm/bulma-sticky-table": "^2.1.0",
"@cityssm/bulma-webapp-css": "^0.12.0", "@cityssm/bulma-webapp-css": "^0.12.0",
"@cityssm/fa-glow": "^0.1.0", "@cityssm/fa-glow": "^0.1.0",
"@cityssm/mssql-multi-pool": "^3.1.5", "@cityssm/mssql-multi-pool": "^4.0.0",
"@cityssm/simple-fa5-checkbox": "^0.2.1", "@cityssm/simple-fa5-checkbox": "^0.2.1",
"@types/activedirectory2": "^1.2.6", "@types/activedirectory2": "^1.2.6",
"@types/better-sqlite3": "^7.6.11", "@types/better-sqlite3": "^7.6.11",
@ -83,32 +82,33 @@
"@types/csurf": "^1.11.5", "@types/csurf": "^1.11.5",
"@types/debug": "^4.1.12", "@types/debug": "^4.1.12",
"@types/ejs": "^3.1.5", "@types/ejs": "^3.1.5",
"@types/express": "^4.17.21", "@types/express": "^5.0.0",
"@types/express-session": "^1.18.0", "@types/express-session": "^1.18.0",
"@types/gulp": "^4.0.17", "@types/gulp": "^4.0.17",
"@types/gulp-sass": "^5.0.4", "@types/gulp-sass": "^5.0.4",
"@types/http-errors": "^2.0.4", "@types/http-errors": "^2.0.4",
"@types/leaflet": "^1.9.12", "@types/leaflet": "^1.9.14",
"@types/mocha": "^10.0.7", "@types/mocha": "^10.0.9",
"@types/mssql": "^9.1.5", "@types/mssql": "^9.1.5",
"@types/node-windows": "^0.1.6", "@types/node-windows": "^0.1.6",
"@types/papaparse": "^5.3.14", "@types/papaparse": "^5.3.15",
"@types/randomcolor": "^0.5.9", "@types/randomcolor": "^0.5.9",
"@types/session-file-store": "^1.2.5", "@types/session-file-store": "^1.2.5",
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"axe-core": "^4.9.1", "axe-core": "^4.10.2",
"bulma": "^0.9.4", "bulma": "^0.9.4",
"bulma-divider": "^0.2.0", "bulma-divider": "^0.2.0",
"bulma-helpers": "^0.4.3", "bulma-helpers": "^0.4.3",
"bulma-steps": "^2.2.1", "bulma-steps": "^2.2.1",
"bulma-switch": "^2.0.4", "bulma-switch": "^2.0.4",
"bulma-tooltip": "^3.0.2", "bulma-tooltip": "^3.0.2",
"cypress": "^13.13.0", "cypress": "^13.15.1",
"cypress-axe": "^1.5.0", "cypress-axe": "^1.5.0",
"eslint-config-cityssm": "^13.2.0",
"gulp": "^5.0.0", "gulp": "^5.0.0",
"gulp-sass": "^5.1.0", "gulp-sass": "^5.1.0",
"nodemon": "^3.1.4", "nodemon": "^3.1.7",
"prettier-config-cityssm": "^1.0.0", "prettier-config-cityssm": "^1.0.0",
"sass": "^1.77.6" "sass": "^1.80.4"
} }
} }