Skip to content

Commit 00bc7ea

Browse files
authored
Merge pull request #335 from finos/reconcile
Reconcile Git Proxy with most up-to-date improvements
2 parents 30271d1 + 248e5f8 commit 00bc7ea

File tree

186 files changed

+6889
-4739
lines changed

Some content is hidden

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

186 files changed

+6889
-4739
lines changed

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VITE_API_URI=http://localhost:8080
2+
VITE_SERVER_URI=http://localhost:8000

.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_URI=

.eslintrc.cjs

Lines changed: 0 additions & 40 deletions
This file was deleted.

.eslintrc.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"parser": "@babel/eslint-parser",
3+
"env": {
4+
"node": true,
5+
"browser": true,
6+
"commonjs": true,
7+
"es2021": true,
8+
"mocha": true
9+
},
10+
"extends": [
11+
"eslint:recommended",
12+
"plugin:react/recommended",
13+
"google",
14+
"prettier",
15+
"plugin:json/recommended"
16+
],
17+
"overrides": [],
18+
"parserOptions": {
19+
"requireConfigFile": false,
20+
"ecmaVersion": 12,
21+
"sourceType": "module",
22+
"ecmaFeatures": {
23+
"jsx": true,
24+
"modules": true
25+
},
26+
"babelOptions": {
27+
"presets": ["@babel/preset-react"]
28+
}
29+
},
30+
"plugins": ["react", "prettier"],
31+
"rules": {
32+
"react/prop-types": "off",
33+
"require-jsdoc": "off",
34+
"no-async-promise-executor": "off"
35+
},
36+
"settings": {
37+
"react": {
38+
"version": "detect"
39+
}
40+
}
41+
}

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 100,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"jsxSingleQuote": true,
8+
"bracketSpacing": true,
9+
"arrowParens": "always"
10+
}

.vscode/settings.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
2-
"javascript.suggestionActions.enabled": false,
3-
"editor.tabSize": 2,
4-
"files.eol": "\n",
5-
"terminal.integrated.disableLineWrapping": true,
6-
"debug.console.wordWrap": false,
7-
"editor.wordWrap": "off",
8-
"editor.codeActionsOnSave": {
9-
"source.fixAll": true
10-
},
11-
"eslint.validate": [
12-
"javascript",
13-
"javascriptreact",
14-
]
15-
}
2+
"javascript.suggestionActions.enabled": false,
3+
"editor.tabSize": 2,
4+
"files.eol": "\n",
5+
"debug.console.wordWrap": false,
6+
"editor.wordWrap": "off",
7+
"editor.codeActionsOnSave": {
8+
"source.fixAll.eslint": "explicit"
9+
},
10+
"editor.defaultFormatter": "esbenp.prettier-vscode",
11+
"editor.formatOnSave": true
12+
}

config.schema.json

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,37 @@
55
"description": "Configuration for customizing git-proxy",
66
"type": "object",
77
"properties": {
8+
"proxyUrl": { "type": "string" },
9+
"cookieSecret": { "type": "string" },
10+
"sessionMaxAgeHours": { "type": "number" },
11+
"api": {
12+
"description": "Third party APIs",
13+
"type": "object"
14+
},
15+
"commitConfig": {
16+
"description": "Enforce rules and patterns on commits including e-mail and message",
17+
"type": "object"
18+
},
19+
"attestationConfig": {
20+
"description": "Customisable questions to add to attestation form",
21+
"type": "object"
22+
},
23+
"privateOrganizations": {
24+
"description": "Pattern searches for listed private organizations are disabled",
25+
"type": "array"
26+
},
27+
"urlShortener": {
28+
"description": "Customisable URL shortener to share in proxy responses and warnings",
29+
"type": "string"
30+
},
31+
"contactEmail": {
32+
"description": "Customisable e-mail address to share in proxy responses and warnings",
33+
"type": "string"
34+
},
35+
"csrfProtection": {
36+
"description": "Flag to enable CSRF protections for UI",
37+
"type": "boolean"
38+
},
839
"authorisedList": {
940
"description": "List of repositories that are authorised to be pushed to through the proxy.",
1041
"type": "array",
@@ -46,7 +77,7 @@
4677
"name": { "type": "string" },
4778
"url": { "type": "string" }
4879
},
49-
"required": [ "project", "name", "url" ]
80+
"required": ["project", "name", "url"]
5081
},
5182
"database": {
5283
"type": "object",
@@ -57,7 +88,7 @@
5788
"options": { "type": "object" },
5889
"params": { "type": "object" }
5990
},
60-
"required": [ "type", "enabled" ]
91+
"required": ["type", "enabled"]
6192
},
6293
"authentication": {
6394
"type": "object",
@@ -66,8 +97,8 @@
6697
"enabled": { "type": "boolean" },
6798
"options": { "type": "object" }
6899
},
69-
"required": [ "type", "enabled" ]
100+
"required": ["type", "enabled"]
70101
}
71102
},
72103
"additionalProperties": false
73-
}
104+
}

index.html

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,48 @@
1818
*/
1919
2020
-->
21-
<!DOCTYPE html>
21+
<!doctype html>
2222
<html lang="en">
2323
<head>
2424
<meta charset="utf-8" />
25-
<meta
26-
name="viewport"
27-
content="width=device-width, initial-scale=1, shrink-to-fit=no"
28-
/>
25+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
2926
<meta name="theme-color" content="#000000" />
3027
<!--
3128
manifest.json provides metadata used when your web app is added to the
3229
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
3330
-->
3431
<link rel="manifest" href="/manifest.json" />
3532
<link rel="shortcut icon" href="/favicon.ico" />
36-
<link
37-
rel="apple-touch-icon"
38-
sizes="76x76"
39-
href="/apple-icon.png"
40-
/>
41-
<link
42-
rel="stylesheet"
43-
href="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css"
44-
/>
33+
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon.png" />
34+
<link rel="stylesheet" href="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css" />
4535

46-
<script src="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
36+
<script
37+
src="https://cdn.jsdelivr.net/chartist.js/0.11.0/chartist.min.js"
38+
integrity="sha384-BnJvHBnDyKVZFn8I5i6LHXOscPlizGS+cgZi1crgdHmjU9lVKXwtNsqXQ521P++Z"
39+
crossorigin="anonymous"
40+
></script>
4741
<link
4842
rel="stylesheet"
4943
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons"
5044
/>
45+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
5146
<link
52-
href="https://fonts.googleapis.com/icon?family=Material+Icons"
5347
rel="stylesheet"
48+
href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
5449
/>
50+
5551
<link
5652
rel="stylesheet"
57-
href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
53+
type="text/css"
54+
href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css"
5855
/>
5956

60-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css" />
61-
6257
<!--
63-
Notice the use of %PUBLIC_URL% in the tags above.
58+
Notice the use of / in the tags above.
6459
It will be replaced with the URL of the `public` folder during the build.
6560
Only files inside the `public` folder can be referenced from the HTML.
6661
67-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
62+
Unlike "/favicon.ico" or "favicon.ico", "//favicon.ico" will
6863
work correctly both with client-side routing and a non-root public URL.
6964
Learn how to configure a non-root public URL by running `npm run build`.
7065
-->
@@ -73,7 +68,6 @@
7368
<body>
7469
<noscript> You need to enable JavaScript to run this app. </noscript>
7570
<div id="root"></div>
76-
<script type="module" src="/src/index.jsx"></script>
7771
<!--
7872
This HTML file is a template.
7973
If you open it directly in the browser, you will see an empty page.
@@ -85,4 +79,5 @@
8579
To create a production bundle, use `npm run build` or `yarn build`.
8680
-->
8781
</body>
88-
</html>
82+
<script type="module" src="/src/index.jsx"></script>
83+
</html>

0 commit comments

Comments
 (0)