afront 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.babelrc +13 -13
  2. package/.env +1 -1
  3. package/LICENSE +21 -21
  4. package/README.md +94 -94
  5. package/build-prod/index.html +1 -1
  6. package/build-prod/manifest.json +25 -25
  7. package/build-prod/offline.html +1023 -1023
  8. package/build-prod/robots.txt +3 -3
  9. package/build-prod-static/index.html +1 -1
  10. package/build-prod-static/manifest.json +25 -25
  11. package/build-prod-static/offline.html +1023 -1023
  12. package/build-prod-static/robots.txt +3 -3
  13. package/install.js +415 -415
  14. package/package.json +102 -96
  15. package/server.js +40 -40
  16. package/src/ARoutes/AFRoutes.js +28 -28
  17. package/src/Api/api.config.js +266 -266
  18. package/src/Api/login.service.js +44 -44
  19. package/src/App.js +28 -28
  20. package/src/Components/Background/MeshGradient.js +18 -18
  21. package/src/Components/Footer/Footer.js +108 -108
  22. package/src/Components/Header/Header.js +149 -149
  23. package/src/Components/Loading/LoadingIndicator.js +12 -12
  24. package/src/Components/Loading/LoadingIndicator.module.css +34 -34
  25. package/src/Components/Loading/LoadingSpinner.js +27 -27
  26. package/src/Components/Loading/LoadingSpinner.module.css +100 -100
  27. package/src/Components/RequireAuth.js +29 -29
  28. package/src/LoadingFallback.js +13 -13
  29. package/src/PageNotFound.js +19 -19
  30. package/src/Pages/Home.js +50 -50
  31. package/src/Pages/Signup.js +230 -230
  32. package/src/Pages/Support.js +68 -68
  33. package/src/Routes/ARoutes.js +66 -66
  34. package/src/Routes/ARoutesStatic.js +83 -83
  35. package/src/Static/appStatic.js +16 -16
  36. package/src/Static/indexStatic.js +13 -13
  37. package/src/Style/App.module.css +11 -11
  38. package/src/Style/MeshGradient.module.css +130 -130
  39. package/src/Style/PageNotFound.module.css +37 -37
  40. package/src/Style/Style.module.css +686 -686
  41. package/src/Style/Support.module.css +185 -185
  42. package/src/Utils/LoadingContext.js +5 -5
  43. package/src/index.js +25 -25
  44. package/webpack.build-prod.js +141 -140
  45. package/webpack.dev.js +127 -127
  46. package/webpack.prod.js +148 -147
  47. package/webpack.ssr.prod.js +97 -97
  48. package/npm-shrinkwrap.json +0 -9641
package/webpack.prod.js CHANGED
@@ -1,148 +1,149 @@
1
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
2
- const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
3
- const TerserWebpackPlugin = require("terser-webpack-plugin");
4
- const CopyWebpackPlugin = require("copy-webpack-plugin");
5
- const HtmlWebpackPlugin = require("html-webpack-plugin");
6
- const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
7
- const path = require("path");
8
- const crypto = require("crypto");
9
-
10
- module.exports = {
11
- mode: "production",
12
- entry: "./src/index.js",
13
- output: {
14
- filename: "static/js/[name]-[contenthash].js",
15
- path: path.resolve(__dirname, "build-prod"),
16
- publicPath: "/",
17
- clean: true,
18
- },
19
- module: {
20
- rules: [
21
- {
22
- test: /\.js$/,
23
- exclude: /node_modules/,
24
- use: {
25
- loader: "babel-loader",
26
- options: {
27
- configFile: path.resolve(__dirname, "./.babelrc"),
28
- },
29
- },
30
- },
31
- {
32
- test: /\.module\.css$/,
33
- use: [
34
- MiniCssExtractPlugin.loader,
35
- {
36
- loader: "css-loader",
37
- options: {
38
- modules: {
39
- localIdentName: "asggen-[hash:base64:7]",
40
- },
41
- },
42
- },
43
- ],
44
- },
45
- {
46
- test: /\.css$/,
47
- exclude: /\.module\.css$/,
48
- use: [MiniCssExtractPlugin.loader, "css-loader"],
49
- },
50
- {
51
- test: /\.(png|jpe?g|gif|svg)$/,
52
- type: "asset/resource",
53
- generator: {
54
- filename: "static/media/[contenthash][ext]",
55
- },
56
- },
57
- {
58
- test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
59
- type: "asset/resource",
60
- generator: {
61
- filename: "static/media/[name][ext]",
62
- },
63
- },
64
- {
65
- test: /\.(woff|woff2|eot|ttf|otf)$/,
66
- type: "asset/resource",
67
- generator: {
68
- filename: "static/fonts/[name][ext]",
69
- },
70
- },
71
- ],
72
- },
73
- optimization: {
74
- minimizer: [
75
- new TerserWebpackPlugin({
76
- terserOptions: {
77
- compress: {
78
- drop_console: false,
79
- },
80
- format: {
81
- comments: false,
82
- },
83
- },
84
- extractComments: false,
85
- }),
86
- new CssMinimizerPlugin(),
87
- ],
88
- splitChunks: {
89
- chunks: "all", // Automatically split vendor and app code
90
- },
91
- },
92
- plugins: [
93
- new HtmlWebpackPlugin({
94
- title: "AFront",
95
- template: "./dev/index.html",
96
- buildTag: `prod-[contenthash]`,
97
- hash: true,
98
- minify: {
99
- removeComments: true,
100
- collapseWhitespace: true,
101
- minifyCSS: true,
102
- minifyJS: true,
103
- },
104
- templateParameters: (compilation) => {
105
- const hash = crypto.createHash("sha256");
106
- hash.update(compilation.hash);
107
- const sha256Hash = hash.digest("hex");
108
- return {
109
- htmlWebpackPlugin: {
110
- options: {
111
- title: "AFront",
112
- buildTag: `prod-${sha256Hash}`,
113
- },
114
- },
115
- };
116
- },
117
- }),
118
- new CspHtmlWebpackPlugin({
119
- "default-src": ["'self'"],
120
- "script-src": ["'self'"],
121
- "style-src": ["'self'", "https://fonts.googleapis.com", "'unsafe-hashes'"],
122
- "style-src-elem": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
123
- "font-src": ["'self'", "https://fonts.gstatic.com"]
124
- }, {
125
- hashingMethod: 'sha256',
126
- hashEnabled: { 'script-src': true, 'style-src': true }
127
- }),
128
- new MiniCssExtractPlugin({
129
- filename: "static/css/[name]-[contenthash].css",
130
- }),
131
- new CopyWebpackPlugin({
132
- patterns: [
133
- { from: "dev/favicon.ico", to: "favicon.ico" },
134
- { from: "dev/logo192.png", to: "logo192.png" },
135
- { from: "dev/logo512.png", to: "logo512.png" },
136
- { from: "dev/manifest.json", to: "manifest.json" },
137
- { from: "dev/style.css", to: "style.css" },
138
- { from: "dev/inline.js", to: "inline.js" },
139
- { from: "dev/robots.txt", to: "robots.txt" },
140
- { from: "dev/service-worker.js", to: "service-worker.js" },
141
- { from: "dev/offline.html", to: "offline.html" },
142
- ],
143
- }),
144
- ],
145
- performance: {
146
- hints: "warning",
147
- },
1
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
2
+ const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
3
+ const TerserWebpackPlugin = require("terser-webpack-plugin");
4
+ const CopyWebpackPlugin = require("copy-webpack-plugin");
5
+ const HtmlWebpackPlugin = require("html-webpack-plugin");
6
+ const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
7
+ const path = require("path");
8
+ const crypto = require("crypto");
9
+
10
+ module.exports = {
11
+ mode: "production",
12
+ entry: "./src/index.js",
13
+ output: {
14
+ filename: "static/js/[name]-[contenthash].js",
15
+ path: path.resolve(__dirname, "build-prod"),
16
+ publicPath: "/",
17
+ clean: true,
18
+ },
19
+ module: {
20
+ rules: [
21
+ {
22
+ test: /\.js$/,
23
+ exclude: /node_modules/,
24
+ use: {
25
+ loader: "babel-loader",
26
+ options: {
27
+ configFile: path.resolve(__dirname, "./.babelrc"),
28
+ },
29
+ },
30
+ },
31
+ {
32
+ test: /\.module\.css$/,
33
+ use: [
34
+ MiniCssExtractPlugin.loader,
35
+ {
36
+ loader: "css-loader",
37
+ options: {
38
+ modules: {
39
+ localIdentName: "asggen-[hash:base64:7]",
40
+ },
41
+ },
42
+ },
43
+ ],
44
+ },
45
+ {
46
+ test: /\.css$/,
47
+ exclude: /\.module\.css$/,
48
+ use: [MiniCssExtractPlugin.loader, "css-loader"],
49
+ },
50
+ {
51
+ test: /\.(png|jpe?g|gif|svg)$/,
52
+ type: "asset/resource",
53
+ generator: {
54
+ filename: "static/media/[contenthash][ext]",
55
+ },
56
+ },
57
+ {
58
+ test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
59
+ type: "asset/resource",
60
+ generator: {
61
+ filename: "static/media/[name][ext]",
62
+ },
63
+ },
64
+ {
65
+ test: /\.(woff|woff2|eot|ttf|otf)$/,
66
+ type: "asset/resource",
67
+ generator: {
68
+ filename: "static/fonts/[name][ext]",
69
+ },
70
+ },
71
+ ],
72
+ },
73
+ optimization: {
74
+ minimizer: [
75
+ new TerserWebpackPlugin({
76
+ terserOptions: {
77
+ compress: {
78
+ drop_console: false,
79
+ },
80
+ format: {
81
+ comments: false,
82
+ },
83
+ },
84
+ extractComments: false,
85
+ }),
86
+ new CssMinimizerPlugin(),
87
+ ],
88
+ splitChunks: {
89
+ chunks: "all", // Automatically split vendor and app code
90
+ },
91
+ },
92
+ plugins: [
93
+ new HtmlWebpackPlugin({
94
+ title: "AFront",
95
+ template: "./dev/index.html",
96
+ buildTag: `prod-[contenthash]`,
97
+ hash: true,
98
+ minify: {
99
+ removeComments: true,
100
+ collapseWhitespace: true,
101
+ minifyCSS: true,
102
+ minifyJS: true,
103
+ },
104
+ templateParameters: (compilation) => {
105
+ const hash = crypto.createHash("sha256");
106
+ hash.update(compilation.hash);
107
+ const sha256Hash = hash.digest("hex");
108
+ return {
109
+ htmlWebpackPlugin: {
110
+ options: {
111
+ title: "AFront",
112
+ buildTag: `prod-${sha256Hash}`,
113
+ },
114
+ },
115
+ };
116
+ },
117
+ }),
118
+ new CspHtmlWebpackPlugin({
119
+ "default-src": ["'self'"],
120
+ "connect-src": ["'self'", "wss:"],
121
+ "script-src": ["'self'"],
122
+ "style-src": ["'self'", "https://fonts.googleapis.com", "'unsafe-hashes'"],
123
+ "style-src-elem": ["'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
124
+ "font-src": ["'self'", "https://fonts.gstatic.com"]
125
+ }, {
126
+ hashingMethod: 'sha256',
127
+ hashEnabled: { 'script-src': true, 'style-src': true }
128
+ }),
129
+ new MiniCssExtractPlugin({
130
+ filename: "static/css/[name]-[contenthash].css",
131
+ }),
132
+ new CopyWebpackPlugin({
133
+ patterns: [
134
+ { from: "dev/favicon.ico", to: "favicon.ico" },
135
+ { from: "dev/logo192.png", to: "logo192.png" },
136
+ { from: "dev/logo512.png", to: "logo512.png" },
137
+ { from: "dev/manifest.json", to: "manifest.json" },
138
+ { from: "dev/style.css", to: "style.css" },
139
+ { from: "dev/inline.js", to: "inline.js" },
140
+ { from: "dev/robots.txt", to: "robots.txt" },
141
+ { from: "dev/service-worker.js", to: "service-worker.js" },
142
+ { from: "dev/offline.html", to: "offline.html" },
143
+ ],
144
+ }),
145
+ ],
146
+ performance: {
147
+ hints: "warning",
148
+ },
148
149
  };
@@ -1,97 +1,97 @@
1
- const path = require("path");
2
- const nodeExternals = require("webpack-node-externals");
3
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4
- const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
5
- const TerserWebpackPlugin = require("terser-webpack-plugin");
6
-
7
- module.exports = {
8
- mode: "production",
9
- entry: "./Asggen SSR/index.js",
10
- output: {
11
- path: path.resolve(__dirname, "build-prod-ssr"),
12
- filename: "ssr.prod.js",
13
- publicPath: "/",
14
- clean: true,
15
- libraryTarget: "commonjs2",
16
- },
17
- target: "node",
18
- module: {
19
- rules: [
20
- {
21
- test: /\.js$/,
22
- exclude: /node_modules/,
23
- use: {
24
- loader: "babel-loader",
25
- options: {
26
- presets: ["@babel/preset-env", "@babel/preset-react"],
27
- },
28
- },
29
- },
30
- {
31
- test: /\.module\.css$/,
32
- use: [
33
- MiniCssExtractPlugin.loader,
34
- {
35
- loader: "css-loader",
36
- options: {
37
- modules: {
38
- localIdentName: "asggen-[hash:base64:7]",
39
- },
40
- },
41
- },
42
- ],
43
- },
44
- {
45
- test: /\.css$/,
46
- exclude: /\.module\.css$/,
47
- use: [MiniCssExtractPlugin.loader, "css-loader"],
48
- },
49
- {
50
- test: /\.(png|jpe?g|gif|svg)$/,
51
- type: "asset/resource",
52
- generator: {
53
- filename: "static/media/[contenthash][ext]",
54
- },
55
- },
56
- {
57
- test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
58
- type: "asset/resource",
59
- generator: {
60
- filename: "static/media/[name][ext]",
61
- },
62
- },
63
- {
64
- test: /\.(woff|woff2|eot|ttf|otf)$/,
65
- type: "asset/resource",
66
- generator: {
67
- filename: "static/fonts/[name][ext]",
68
- },
69
- },
70
- ],
71
- },
72
- optimization: {
73
- minimizer: [
74
- new TerserWebpackPlugin({
75
- terserOptions: {
76
- compress: {
77
- drop_console: false,
78
- },
79
- format: {
80
- comments: false,
81
- },
82
- },
83
- extractComments: false,
84
- }),
85
- new CssMinimizerPlugin(),
86
- ],
87
- },
88
- plugins: [
89
- new MiniCssExtractPlugin({
90
- filename: "static/css/[name]-[contenthash].css",
91
- }),
92
- ],
93
- resolve: {
94
- extensions: [".js", ".jsx", ".ts", ".tsx"],
95
- },
96
- externals: [nodeExternals()],
97
- };
1
+ const path = require("path");
2
+ const nodeExternals = require("webpack-node-externals");
3
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4
+ const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
5
+ const TerserWebpackPlugin = require("terser-webpack-plugin");
6
+
7
+ module.exports = {
8
+ mode: "production",
9
+ entry: "./Asggen SSR/index.js",
10
+ output: {
11
+ path: path.resolve(__dirname, "build-prod-ssr"),
12
+ filename: "ssr.prod.js",
13
+ publicPath: "/",
14
+ clean: true,
15
+ libraryTarget: "commonjs2",
16
+ },
17
+ target: "node",
18
+ module: {
19
+ rules: [
20
+ {
21
+ test: /\.js$/,
22
+ exclude: /node_modules/,
23
+ use: {
24
+ loader: "babel-loader",
25
+ options: {
26
+ presets: ["@babel/preset-env", "@babel/preset-react"],
27
+ },
28
+ },
29
+ },
30
+ {
31
+ test: /\.module\.css$/,
32
+ use: [
33
+ MiniCssExtractPlugin.loader,
34
+ {
35
+ loader: "css-loader",
36
+ options: {
37
+ modules: {
38
+ localIdentName: "asggen-[hash:base64:7]",
39
+ },
40
+ },
41
+ },
42
+ ],
43
+ },
44
+ {
45
+ test: /\.css$/,
46
+ exclude: /\.module\.css$/,
47
+ use: [MiniCssExtractPlugin.loader, "css-loader"],
48
+ },
49
+ {
50
+ test: /\.(png|jpe?g|gif|svg)$/,
51
+ type: "asset/resource",
52
+ generator: {
53
+ filename: "static/media/[contenthash][ext]",
54
+ },
55
+ },
56
+ {
57
+ test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
58
+ type: "asset/resource",
59
+ generator: {
60
+ filename: "static/media/[name][ext]",
61
+ },
62
+ },
63
+ {
64
+ test: /\.(woff|woff2|eot|ttf|otf)$/,
65
+ type: "asset/resource",
66
+ generator: {
67
+ filename: "static/fonts/[name][ext]",
68
+ },
69
+ },
70
+ ],
71
+ },
72
+ optimization: {
73
+ minimizer: [
74
+ new TerserWebpackPlugin({
75
+ terserOptions: {
76
+ compress: {
77
+ drop_console: false,
78
+ },
79
+ format: {
80
+ comments: false,
81
+ },
82
+ },
83
+ extractComments: false,
84
+ }),
85
+ new CssMinimizerPlugin(),
86
+ ],
87
+ },
88
+ plugins: [
89
+ new MiniCssExtractPlugin({
90
+ filename: "static/css/[name]-[contenthash].css",
91
+ }),
92
+ ],
93
+ resolve: {
94
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
95
+ },
96
+ externals: [nodeExternals()],
97
+ };