parent
055f708304
commit
4b8b4836fd
|
|
@ -1,5 +1,4 @@
|
|||
import { configWebApp } from 'eslint-config-cityssm';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import { configWebApp, tseslint } from 'eslint-config-cityssm';
|
||||
export const config = tseslint.config(...configWebApp, {
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { configWebApp } from 'eslint-config-cityssm'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import { configWebApp, tseslint } from 'eslint-config-cityssm'
|
||||
|
||||
export const config = tseslint.config(...configWebApp, {
|
||||
languageOptions: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="cookie-parser" />
|
||||
import type { NextFunction, Request, Response } from 'express';
|
||||
export declare function handler(request: Request, response: Response, next: NextFunction): Promise<void>;
|
||||
export default handler;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ export async function handler(request, response, next) {
|
|||
response.send(pdf);
|
||||
}
|
||||
async function ejsCallbackFunction(ejsError, ejsData) {
|
||||
if (ejsError) {
|
||||
// eslint-disable-next-line unicorn/no-null
|
||||
if (ejsError != null) {
|
||||
next(ejsError);
|
||||
return;
|
||||
}
|
||||
|
|
@ -34,7 +35,7 @@ export async function handler(request, response, next) {
|
|||
printBackground: true,
|
||||
preferCSSPageSize: true
|
||||
});
|
||||
pdfCallbackFunction(pdf);
|
||||
pdfCallbackFunction(Buffer.from(pdf));
|
||||
}
|
||||
await renderEjsFile(reportPath, reportData, {}, ejsCallbackFunction);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,10 +63,11 @@ export async function handler(
|
|||
}
|
||||
|
||||
async function ejsCallbackFunction(
|
||||
ejsError: Error,
|
||||
ejsError: Error | null,
|
||||
ejsData: string
|
||||
): Promise<void> {
|
||||
if (ejsError) {
|
||||
// eslint-disable-next-line unicorn/no-null
|
||||
if (ejsError != null) {
|
||||
next(ejsError)
|
||||
return
|
||||
}
|
||||
|
|
@ -77,7 +78,7 @@ export async function handler(
|
|||
preferCSSPageSize: true
|
||||
})
|
||||
|
||||
pdfCallbackFunction(pdf)
|
||||
pdfCallbackFunction(Buffer.from(pdf))
|
||||
}
|
||||
|
||||
await renderEjsFile(reportPath, reportData, {}, ejsCallbackFunction)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
|
|
@ -37,44 +37,43 @@
|
|||
"@cityssm/bulma-webapp-js": "^1.5.0",
|
||||
"@cityssm/configurator": "^0.1.0",
|
||||
"@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/ntfy-publish": "^1.0.1",
|
||||
"@cityssm/pdf-puppeteer": "^4.2.0",
|
||||
"@cityssm/pdf-puppeteer": "^4.3.1",
|
||||
"@cityssm/utils-datetime": "^1.3.0",
|
||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||
"activedirectory2": "^2.2.0",
|
||||
"better-sqlite-pool": "^0.3.2",
|
||||
"better-sqlite3": "^11.1.2",
|
||||
"better-sqlite3": "^11.5.0",
|
||||
"bulma-calendar": "^6.1.19",
|
||||
"camelcase": "^8.0.0",
|
||||
"compression": "^1.7.4",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"cookie-parser": "^1.4.7",
|
||||
"cross-env": "^7.0.3",
|
||||
"csurf": "^1.11.0",
|
||||
"debug": "^4.3.5",
|
||||
"debug": "^4.3.7",
|
||||
"ejs": "^3.1.10",
|
||||
"eslint-config-cityssm": "^5.0.0",
|
||||
"exit-hook": "^4.0.0",
|
||||
"express": "^4.19.2",
|
||||
"express-rate-limit": "^7.3.1",
|
||||
"express-session": "^1.18.0",
|
||||
"express": "^4.21.1",
|
||||
"express-rate-limit": "^7.4.1",
|
||||
"express-session": "^1.18.1",
|
||||
"http-errors": "^2.0.0",
|
||||
"ical-generator": "^7.1.0",
|
||||
"ical-generator": "^8.0.1",
|
||||
"leaflet": "^1.9.4",
|
||||
"node-cache": "^5.1.2",
|
||||
"papaparse": "^5.4.1",
|
||||
"randomcolor": "^0.6.2",
|
||||
"session-file-store": "^1.5.0",
|
||||
"set-interval-async": "^3.0.3",
|
||||
"uuid": "^10.0.0"
|
||||
"uuid": "^11.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cityssm/bulma-a11y": "^0.4.0",
|
||||
"@cityssm/bulma-sticky-table": "^2.1.0",
|
||||
"@cityssm/bulma-webapp-css": "^0.12.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",
|
||||
"@types/activedirectory2": "^1.2.6",
|
||||
"@types/better-sqlite3": "^7.6.11",
|
||||
|
|
@ -83,32 +82,33 @@
|
|||
"@types/csurf": "^1.11.5",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/ejs": "^3.1.5",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/express-session": "^1.18.0",
|
||||
"@types/gulp": "^4.0.17",
|
||||
"@types/gulp-sass": "^5.0.4",
|
||||
"@types/http-errors": "^2.0.4",
|
||||
"@types/leaflet": "^1.9.12",
|
||||
"@types/mocha": "^10.0.7",
|
||||
"@types/leaflet": "^1.9.14",
|
||||
"@types/mocha": "^10.0.9",
|
||||
"@types/mssql": "^9.1.5",
|
||||
"@types/node-windows": "^0.1.6",
|
||||
"@types/papaparse": "^5.3.14",
|
||||
"@types/papaparse": "^5.3.15",
|
||||
"@types/randomcolor": "^0.5.9",
|
||||
"@types/session-file-store": "^1.2.5",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"axe-core": "^4.9.1",
|
||||
"axe-core": "^4.10.2",
|
||||
"bulma": "^0.9.4",
|
||||
"bulma-divider": "^0.2.0",
|
||||
"bulma-helpers": "^0.4.3",
|
||||
"bulma-steps": "^2.2.1",
|
||||
"bulma-switch": "^2.0.4",
|
||||
"bulma-tooltip": "^3.0.2",
|
||||
"cypress": "^13.13.0",
|
||||
"cypress": "^13.15.1",
|
||||
"cypress-axe": "^1.5.0",
|
||||
"eslint-config-cityssm": "^13.2.0",
|
||||
"gulp": "^5.0.0",
|
||||
"gulp-sass": "^5.1.0",
|
||||
"nodemon": "^3.1.4",
|
||||
"nodemon": "^3.1.7",
|
||||
"prettier-config-cityssm": "^1.0.0",
|
||||
"sass": "^1.77.6"
|
||||
"sass": "^1.80.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue