Skip to content

Commit 70b7b94

Browse files
authored
Merge pull request #1004 from finos/dev
Update main from dev
2 parents 0f3e393 + 3d101bf commit 70b7b94

File tree

444 files changed

+66496
-22377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+66496
-22377
lines changed

.github/workflows/publish-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21-
- uses: docker-practice/actions-setup-docker@321477a1e481dd60b05f9b489cf4b9be467aa15c
21+
- uses: docker-practice/actions-setup-docker@ccc771627519a0dc44b99c63f3ccf5fab1b1b9b8
2222
- name: Build
2323
run: docker build -f Dockerfile -t user/app:latest .
2424
working-directory: code

.github/workflows/security.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
format: 'HTML'
4242
out: '${{ matrix.module-folder }}-reports'
4343
args: >
44-
# --suppression .github/node-cve-ignore-list.xml
44+
--suppression .github/node-cve-ignore-list.xml
4545
--nodeAuditSkipDevDependencies
4646
--nodePackageSkipDevDependencies
4747
--failOnCVSS 5
@@ -57,11 +57,11 @@ jobs:
5757
runs-on: ubuntu-latest
5858
steps:
5959
- uses: actions/checkout@v3
60-
- uses: docker-practice/actions-setup-docker@321477a1e481dd60b05f9b489cf4b9be467aa15c
60+
- uses: docker-practice/actions-setup-docker@ccc771627519a0dc44b99c63f3ccf5fab1b1b9b8
6161
- name: Build
6262
run: docker build -f Dockerfile -t user/app:latest .
6363
working-directory: code
6464
- name: Scan for vulnerabilities
65-
uses: crazy-max/ghaction-container-scan@dfa7e54dc32045120f06d0bc8d7724860f5db0ad
65+
uses: crazy-max/ghaction-container-scan@f17494a3e47d86fb17c2c1f89b25049492a82d1d
6666
with:
6767
image: user/app:latest

code/.eslintrc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"rules": {
1616
"header/header": [2, "block", [
1717
"*",
18-
" * Copyright (c) 2023 Discover Financial Services",
19-
" * Licensed under Apache-2.0 License. See License.txt in the project root for license information",
18+
{"pattern": " * Copyright \\(c\\) \\d{4} Discover Financial Services| * SPDX-License-Identifier: Apache-2.0"},
19+
{"pattern": " * Licensed under Apache-2.0 License. See License.txt in the project root for license information| * Copyright \\d{4} FINOS A11y Theme Builder contributors - see NOTICE file"},
2020
" "
2121
]],
2222
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
23-
"no-unused-vars": "off",
24-
"@typescript-eslint/no-unused-vars-experimental": "error"
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"no-unused-vars": "off"
2525
},
2626
"ignorePatterns": ["dist/", "node_modules/", "build/"]
2727
}
28-
28+

code/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
build/
3+
dist/
4+
coverage/

code/.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"bracketSameLine": false,
10+
"arrowParens": "always",
11+
"endOfLine": "lf"
12+
}

code/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.19-bookworm-slim
1+
FROM node:20.16.0-bullseye-slim
22
RUN node -v
33
# Copy source
44
RUN mkdir $HOME/code

code/package-lock.json

Lines changed: 52 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"docker-stop": "docker stop a11y-theme-builder",
1717
"docker-start": "docker start a11y-theme-builder",
1818
"docker-rm": "docker rm a11y-theme-builder",
19+
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,json,md}\"",
20+
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,css,scss,json,md}\"",
1921
"lint": "npx eslint .",
2022
"lint:fix": "npx eslint . --fix"
2123
},
@@ -30,9 +32,9 @@
3032
"@types/express": "^4.17.21",
3133
"@types/express-session": "^1.18.0",
3234
"@types/jsonwebtoken": "^9.0.2",
33-
"@types/node": "^20.12.7",
34-
"@types/nodemailer": "^6.4.14",
35-
"axios": "^1.6.8",
35+
"@types/node": "^20.14.15",
36+
"@types/nodemailer": "^6.4.15",
37+
"axios": "^1.7.4",
3638
"axios-debug-log": "^1.0.0",
3739
"body-parser": "^1.20.2",
3840
"cookie-parser": "^1.4.6",
@@ -50,6 +52,7 @@
5052
"@typescript-eslint/parser": "^7.8.0",
5153
"eslint": "^8.57.0",
5254
"eslint-plugin-header": "^3.1.1",
53-
"nodemon": "^3.1.0"
55+
"nodemon": "^3.1.4",
56+
"prettier": "^3.3.2"
5457
}
5558
}

code/src/app.ts

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
/*
1+
/**
22
* Copyright (c) 2023 Discover Financial Services
33
* Licensed under Apache-2.0 License. See License.txt in the project root for license information
44
*/
5-
import express, { Request, Response, NextFunction } from "express";
6-
import bodyParser from "body-parser";
7-
import cookieParser from "cookie-parser";
8-
import * as path from "path";
9-
import { Config } from "./config";
10-
import { addAuthMiddleware } from "./auth";
11-
import { registerThemesEndpoint } from "./themesEndpoint";
5+
import express, { Request, Response, NextFunction } from 'express';
6+
import bodyParser from 'body-parser';
7+
import cookieParser from 'cookie-parser';
8+
import * as path from 'path';
9+
import { Config } from './config';
10+
import { addAuthMiddleware } from './auth';
11+
import { registerThemesEndpoint } from './themesEndpoint';
1212

1313
const cfg = new Config();
1414

@@ -19,14 +19,19 @@ function allowCrossDomain(req: Request, res: Response, next: NextFunction) {
1919
res.header('Access-Control-Allow-Headers', 'Content-Type');
2020
if (req.method == 'OPTIONS') {
2121
//console.log("OPTIONS headers=",req.headers)
22-
res.header('Access-Control-Max-Age', ""+60 * 60 * 24 * 365);
22+
res.header('Access-Control-Max-Age', '' + 60 * 60 * 24 * 365);
2323
return res.sendStatus(200);
2424
}
2525
next();
26-
};
26+
}
2727

28-
// Error handling middleware
29-
function handleError(err: any, req: Request, res: Response, next: NextFunction) {
28+
// Error handling middleware
29+
function handleError(
30+
err: any,
31+
req: Request,
32+
res: Response,
33+
next: NextFunction
34+
) {
3035
if (err) {
3136
const code = err.scode || 500;
3237
const message = err.msg || err.message;
@@ -48,7 +53,7 @@ async function createApp(cfg: Config): Promise<express.Application> {
4853
registerThemesEndpoint(app);
4954
app.use(handleError);
5055
app.use(express.static(path.join(__dirname, '../src/ui/build')));
51-
app.get('/*', function(req: Request, res: Response) {
56+
app.get('/*', function (req: Request, res: Response) {
5257
res.sendFile(path.join(__dirname, '../src/ui/build', 'index.html'));
5358
});
5459
return app;
@@ -63,4 +68,4 @@ async function main() {
6368
});
6469
}
6570

66-
main();
71+
main();

0 commit comments

Comments
 (0)