-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into WIP-2276-releases
- Loading branch information
Showing
200 changed files
with
20,850 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# Ignore everything except for explicitly allowed stuff. | ||
* | ||
|
||
!dist/docker/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
'env': | ||
'GO_VERSION': '1.14' | ||
'NODE_VERSION': '13' | ||
'NODE_VERSION': '14' | ||
|
||
'on': | ||
'push': | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
scripts | ||
node_modules | ||
postcss.config.js | ||
src/lib/entities | ||
src/lib/apis | ||
openApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": [ | ||
"./scripts/lint/dev.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
declare module '*.pcss' { | ||
const content: {[className: string]: string}; | ||
export default content; | ||
} | ||
declare module '*.css' { | ||
const content: {[className: string]: string}; | ||
export default content; | ||
} | ||
declare module '*.png' | ||
declare module '*.jpg' | ||
declare let AUTH_TOKEN: string; | ||
declare let MAIN_TOKEN: string | undefined; | ||
declare let NO_CAPTCHA: boolean | undefined; | ||
declare module 'dygraphs'; | ||
declare module '@novnc/novnc/core/rfb'; | ||
// cp - CloudPayments script | ||
declare let cp: any; | ||
declare const DEV: any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"author": "Performix", | ||
"private": true, | ||
"name": "adguard-home", | ||
"version": "0.1.0", | ||
"scripts": { | ||
"build": "rm -rf ../build2 && yarn install && webpack --config ./scripts/webpack/webpack.config.prod.js", | ||
"start": "webpack serve --config ./scripts/webpack/webpack.config.dev.js", | ||
"generate": "rm -rf ./src/lib/entities ./src/lib/apis && ts-node --compiler-options '{ \"module\": \"CommonJS\" }' ./scripts/generator/index.ts", | ||
"translations:check": "ts-node --compiler-options '{ \"module\": \"CommonJS\" }' ./scripts/plugins/checkTranslations.ts", | ||
"lint": "eslint -c ./scripts/lint/prod.js --ext .tsx --ext .ts ./", | ||
"go:build": "cd .. && make REBUILD_CLIENT=0 build", | ||
"go:run": "sudo ../AdguardHome" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "yarn lint" | ||
} | ||
}, | ||
"license": "ISC", | ||
"dependencies": { | ||
"@sentry/react": "^5.27.0", | ||
"antd": "^4.7.2", | ||
"classnames": "^2.2.6", | ||
"dayjs": "^1.9.3", | ||
"formik": "^2.2.0", | ||
"mobx": "^6.0.1", | ||
"mobx-react-lite": "^3.0.1", | ||
"qs": "^6.9.4", | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0", | ||
"react-router-dom": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/classnames": "^2.2.10", | ||
"@types/qs": "^6.9.5", | ||
"@types/react": "^16.9.53", | ||
"@types/react-dom": "^16.9.8", | ||
"@types/react-redux": "^7.1.9", | ||
"@types/react-router-dom": "^5.1.6", | ||
"@typescript-eslint/eslint-plugin": "^4.5.0", | ||
"@typescript-eslint/parser": "^4.5.0", | ||
"antd-dayjs-webpack-plugin": "^1.0.1", | ||
"autoprefixer": "^10.0.1", | ||
"connect-history-api-fallback": "^1.6.0", | ||
"copy-webpack-plugin": "^6.2.1", | ||
"css-loader": "^5.0.0", | ||
"eslint": "^7.11.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-config-airbnb-typescript": "^12.0.0", | ||
"eslint-import-resolver-typescript": "^2.3.0", | ||
"eslint-loader": "^4.0.2", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"file-loader": "^6.1.1", | ||
"html-webpack-plugin": "^4.5.0", | ||
"http-proxy-middleware": "^1.0.6", | ||
"husky": "^4.3.0", | ||
"less": "^3.12.2", | ||
"less-loader": "^5.0.0", | ||
"mini-css-extract-plugin": "^1.1.1", | ||
"optimize-css-assets-webpack-plugin": "^5.0.4", | ||
"postcss": "^8.1.2", | ||
"postcss-calc": "^7.0.5", | ||
"postcss-css-variables": "^0.17.0", | ||
"postcss-custom-media": "^7.0.8", | ||
"postcss-import": "^13.0.0", | ||
"postcss-inline-svg": "^4.1.0", | ||
"postcss-loader": "^4.0.4", | ||
"postcss-mixins": "^7.0.1", | ||
"postcss-modules": "^3.2.2", | ||
"postcss-nested": "^5.0.1", | ||
"postcss-preset-env": "^6.7.0", | ||
"postcss-reporter": "^7.0.1", | ||
"postcss-variables": "^1.1.1", | ||
"style-loader": "^2.0.0", | ||
"stylelint": "^13.7.2", | ||
"stylelint-webpack-plugin": "^2.1.1", | ||
"terser-webpack-plugin": "^5.0.0", | ||
"ts-loader": "^8.0.6", | ||
"ts-morph": "^8.1.2", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.3", | ||
"url-loader": "^4.1.1", | ||
"webpack": "^5.10.0", | ||
"webpack-cli": "^4.2.0", | ||
"webpack-dev-server": "^3.11.0", | ||
"webpack-merge": "^5.2.0", | ||
"yaml": "^1.10.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
plugins: [ | ||
['postcss-import', {}], | ||
['postcss-nested', {}], | ||
['postcss-custom-media', {}], | ||
['postcss-variables', {}], | ||
['postcss-calc', {}], | ||
['postcss-mixins', {}], | ||
['postcss-preset-env', { stage: 3, features: { 'nesting-rules': true } }], | ||
['postcss-reporter', { clearMessages: true }], | ||
['postcss-inline-svg', { | ||
paths: ['frontend/icons', 'vendor/adguard/utils-bundle/src/Resources/frontend/icons'], | ||
svgo: { plugins: [{ cleanupAttrs: true }] } | ||
}], | ||
['autoprefixer'], | ||
] | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, shrink-to-fit=no"> | ||
<meta name="theme-color" content="#000000"> | ||
<meta name="google" content="notranslate"> | ||
<meta http-equiv="x-dns-prefetch-control" content="off"> | ||
<meta name="mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="default"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon-180x180.png" /> | ||
<link rel="mask-icon" href="assets/safari-pinned-tab.svg" color="#67B279"> | ||
<link rel="icon" type="image/png" href="assets/favicon.png" sizes="48x48"> | ||
<title>AdGuard Home</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, shrink-to-fit=no"> | ||
<meta name="theme-color" content="#000000"> | ||
<meta name="google" content="notranslate"> | ||
<meta name="mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="default"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon-180x180.png" /> | ||
<link rel="mask-icon" href="assets/safari-pinned-tab.svg" color="#67B279"> | ||
<link rel="icon" type="image/png" href="assets/favicon.png" sizes="48x48"> | ||
<title>Setup AdGuard Home</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, shrink-to-fit=no"> | ||
<meta name="theme-color" content="#000000"> | ||
<meta name="google" content="notranslate"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon-180x180.png" /> | ||
<meta name="mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="default"> | ||
<link rel="mask-icon" href="assets/safari-pinned-tab.svg" color="#67B279"> | ||
<link rel="icon" type="image/png" href="assets/favicon.png" sizes="48x48"> | ||
<title>Login</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const OPEN_API_PATH = '../openapi/openapi.yaml'; | ||
export const ENT_DIR = './src/lib/entities'; | ||
export const API_DIR = './src/lib/apis'; | ||
export const LOCALE_FOLDER_PATH = './src/lib/intl/__locales'; | ||
export const TRANSLATOR_CLASS_NAME = 'Translator'; | ||
export const USE_INTL_NAME = 'useIntl'; | ||
|
||
export const trimQuotes = (str: string) => { | ||
return str.replace(/\'|\"/g, ''); | ||
}; | ||
|
||
export const GENERATOR_ENTITY_ALLIAS = 'Entities/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as fs from 'fs'; | ||
import * as YAML from 'yaml'; | ||
import { OPEN_API_PATH } from '../consts'; | ||
|
||
import EntitiesGenerator from './src/generateEntities'; | ||
import ApisGenerator from './src/generateApis'; | ||
|
||
|
||
const generateApi = (openApi: Record<string, any>) => { | ||
const ent = new EntitiesGenerator(openApi); | ||
ent.save(); | ||
|
||
const api = new ApisGenerator(openApi); | ||
api.save(); | ||
} | ||
|
||
const openApiFile = fs.readFileSync(OPEN_API_PATH, 'utf8'); | ||
generateApi(YAML.parse(openApiFile)); |
Oops, something went wrong.