proteum 1.0.0-1 → 1.0.0-2

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.
@@ -45,13 +45,13 @@ export const run = () => new Promise<void>(async () => {
45
45
  // https://webpack.js.org/configuration/watch/#watchoptions
46
46
  // Watching may not work with NFS and machines in VirtualBox
47
47
  // Uncomment next line if it is your case (use true or interval in milliseconds)
48
- poll: 1000,
48
+ //poll: 1000,
49
49
 
50
50
  // Decrease CPU or memory usage in some file systems
51
51
  // Ignore updated from:
52
52
  // - Node modules except 5HTP core (framework dev mode)
53
53
  // - Generated files during runtime (cause infinite loop. Ex: models.d.ts)
54
- ignored: /(node_modules\/(?!proteum\/))|(\.generated\/)/
54
+ ignored: /(node_modules\/(?!proteum\/))|(\.generated\/)|(\.cache\/)/
55
55
 
56
56
  //aggregateTimeout: 1000,
57
57
  }, async (error, stats) => {
@@ -106,4 +106,4 @@ function stopApp( reason: string ) {
106
106
  cp.kill();
107
107
  }
108
108
 
109
- }
109
+ }
@@ -153,9 +153,9 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
153
153
 
154
154
  ...(commonConfig.plugins || []),
155
155
 
156
- new MiniCssExtractPlugin({
157
-
158
- }),
156
+ ...((dev && false) ? [] : [
157
+ new MiniCssExtractPlugin({})
158
+ ]),
159
159
 
160
160
  // Emit a file with assets cli.paths
161
161
  // https://github.com/webdeveric/webpack-assets-manifest#options
@@ -229,7 +229,7 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
229
229
  ],
230
230
 
231
231
  // https://webpack.js.org/configuration/devtool/#devtool
232
- devtool: 'source-map',
232
+ devtool: dev ? 'eval-cheap-module-source-map' : 'source-map',
233
233
  /*devServer: {
234
234
  hot: true,
235
235
  },*/
@@ -64,7 +64,7 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
64
64
  // https://github.com/babel/babel-loader#options
65
65
 
66
66
  // ATTENTION: Ne prend pas toujours compte des màj des plugins babel
67
- cacheDirectory: cli.args.cache === true,
67
+ cacheDirectory: dev || cli.args.cache === true,
68
68
  // Désactive car ralenti compilation
69
69
  cacheCompression: false,
70
70
 
@@ -167,4 +167,4 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
167
167
  ]
168
168
  }
169
169
  }]
170
- }
170
+ }
@@ -15,7 +15,8 @@ module.exports = (app: App, dev: boolean, client: boolean): webpack.RuleSetRule[
15
15
  }
16
16
  }
17
17
 
18
- }, {
18
+ },
19
+ ...(dev ? [] : [{
19
20
  test: /\.(jpg|jpeg|png)$/i,
20
21
  type: "javascript/auto",
21
22
  use: [{
@@ -25,10 +26,15 @@ module.exports = (app: App, dev: boolean, client: boolean): webpack.RuleSetRule[
25
26
  placeholder: true,
26
27
  placeholderSize: 20,
27
28
  quality: 100,
28
- publicPath: '/public'
29
+ publicPath: '/public',
30
+
31
+ // Triggers error
32
+ // cacheDirectory: true,
29
33
  }
30
34
  }]
31
- }, {
35
+ }]),
36
+
37
+ {
32
38
  test: /\.(webm|mp4|avi|mpk|mov|mkv)$/,
33
39
  type: 'asset/resource',
34
40
  },]
@@ -5,6 +5,7 @@
5
5
  // npm
6
6
  import webpack from 'webpack';
7
7
  import dayjs from 'dayjs';
8
+ import path from 'path';
8
9
 
9
10
  // Plugins
10
11
  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
@@ -123,13 +124,18 @@ export default function createCommonConfig(
123
124
  // Don't attempt to continue if there are any errors.
124
125
  bail: !dev,
125
126
 
126
- // When true, Can cause troubles on re-compiling the client side
127
- // "webpack" The "path" argument must be of type string. Received undefined
128
- // https://github.com/webpack/webpack/issues/12616
129
- // Update: Hum it's fixed, just had to update webpack deps
130
- cache: dev,
127
+ // Persistent cache speeds up cold starts and incremental rebuilds.
128
+ cache: (dev || cli.args.cache === true) ? {
129
+ type: 'filesystem',
130
+ cacheDirectory: path.join(app.paths.cache, 'webpack', side),
131
+ compression: false,
132
+ buildDependencies: {
133
+ config: [__filename],
134
+ },
135
+ } : false,
131
136
 
132
- profile: true,
137
+ // Increase compilation performance
138
+ profile: false,
133
139
 
134
140
  // Pour bundle-stats
135
141
  // https://github.com/relative-ci/bundle-stats/tree/master/packages/cli#webpack-configuration
@@ -151,4 +157,4 @@ export default function createCommonConfig(
151
157
 
152
158
  return config;
153
159
 
154
- }
160
+ }
@@ -8,7 +8,7 @@ import webpack from 'webpack';
8
8
  import fs from 'fs-extra';
9
9
  import serialize from 'serialize-javascript';
10
10
 
11
- import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
11
+ import SpeedMeasurePlugin from "speed-measure-webpack-v5-plugin";
12
12
  const smp = new SpeedMeasurePlugin({ disable: true });
13
13
 
14
14
  // Core
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "proteum",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "1.0.0-1",
4
+ "version": "1.0.0-2",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/proteum.git",
7
7
  "license": "MIT",
@@ -16,136 +16,107 @@
16
16
  "proteum": "cli/bin.js"
17
17
  },
18
18
  "dependencies": {
19
- "@lexical/file": "^0.19.0",
20
- "@lexical/headless": "^0.18.0",
21
- "@lexical/html": "^0.18.0",
19
+ "@babel/cli": "^7.15.4",
20
+ "@babel/plugin-proposal-class-properties": "^7.14.5",
21
+ "@babel/plugin-proposal-decorators": "^7.25.9",
22
+ "@babel/plugin-proposal-private-methods": "^7.14.5",
23
+ "@babel/plugin-proposal-private-property-in-object": "^7.15.4",
24
+ "@babel/plugin-transform-react-constant-elements": "^7.14.5",
25
+ "@babel/preset-env": "^7.15.6",
26
+ "@babel/preset-react": "^7.14.5",
27
+ "@babel/preset-typescript": "^7.15.0",
22
28
  "@lexical/react": "^0.18.0",
29
+ "@prefresh/webpack": "^3.3.2",
23
30
  "@prisma/client": "^6.5.0",
31
+ "@tailwindcss/postcss": "^4.1.17",
24
32
  "accepts": "^1.3.7",
25
- "activity-detector": "^3.0.0",
26
33
  "ansi-to-html": "^0.7.1",
27
- "array-move": "^3.0.1",
34
+ "autoprefixer": "^10.4.21",
28
35
  "aws-sdk": "^2.1415.0",
36
+ "babel-loader": "^10.0.0",
37
+ "babel-plugin-glob-import": "^0.0.9-1",
38
+ "babel-plugin-transform-imports": "^2.0.0",
39
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
40
+ "babel-plugin-transform-remove-console": "^6.9.4",
29
41
  "bowser": "^2.11.0",
30
- "chart.js": "^3.6.2",
42
+ "brotli-webpack-plugin": "^1.1.0",
43
+ "browser-sync": "^2.27.5",
31
44
  "cli-highlight": "^2.1.11",
32
45
  "compression": "^1.7.4",
46
+ "compression-webpack-plugin": "^8.0.1",
33
47
  "cookie-parser": "^1.4.5",
34
48
  "core-js": "^3.18.1",
35
49
  "cors": "^2.8.5",
36
50
  "cron-parser": "^4.0.0",
51
+ "css-loader": "^6.2.0",
52
+ "css-minimizer-webpack-plugin": "^7.0.4",
37
53
  "dayjs": "^1.11.5",
38
- "deep-extend": "^0.6.0",
39
54
  "dottie": "^2.0.2",
40
55
  "escape-regexp": "^0.0.1",
41
56
  "express": "^4.17.1",
42
57
  "express-csp-header": "^5.0.0",
43
58
  "express-fileupload": "^1.2.1",
44
59
  "fast-safe-stringify": "^2.1.1",
45
- "file-type": "^16.5.3",
46
- "formattor": "^0.0.2",
60
+ "favicons": "^7.2.0",
47
61
  "fs-extra": "^10.1.0",
48
62
  "got": "^11.8.3",
49
- "handlebars": "^4.7.7",
50
63
  "helmet": "^4.6.0",
51
64
  "history": "^5.0.1",
52
65
  "hpp": "^0.2.3",
53
66
  "human-interval": "^2.0.1",
67
+ "image-minimizer-webpack-plugin": "^4.1.4",
68
+ "imagemin": "^9.0.1",
69
+ "imagemin-svgo": "^10.0.0",
70
+ "imagemin-webp": "^6.0.0",
54
71
  "intl": "^1.2.5",
55
72
  "iso-639-1": "^2.1.9",
56
- "js-cookie": "^3.0.1",
57
- "jsdom": "^25.0.1",
73
+ "json5": "^2.2.0",
58
74
  "jsonwebtoken": "^8.5.1",
75
+ "less-loader": "^10.0.1",
59
76
  "lexical": "^0.18.0",
60
77
  "load-script": "^2.0.0",
61
78
  "locale": "^0.1.0",
62
79
  "markdown-it": "^13.0.1",
63
80
  "md5": "^2.3.0",
64
81
  "mime-types": "^2.1.35",
82
+ "mini-css-extract-plugin": "^2.2.2",
65
83
  "module-alias": "^2.2.2",
66
84
  "mysql2": "^2.3.0",
85
+ "node-cmd": "^5.0.0",
86
+ "null-loader": "^4.0.1",
67
87
  "object-sizeof": "^1.6.3",
68
88
  "path-to-regexp": "^6.2.0",
69
- "picomatch": "^2.3.1",
89
+ "postcss-loader": "^8.2.0",
70
90
  "preact": "^10.27.1",
71
91
  "preact-render-to-string": "^6.6.1",
72
92
  "prettier": "^3.3.3",
73
- "react-scrollbars-custom": "^4.0.27",
74
- "react-textarea-autosize": "^8.5.9",
93
+ "prompts": "^2.4.2",
94
+ "react-dev-utils": "^11.0.4",
75
95
  "regenerator-runtime": "^0.13.9",
96
+ "replace-once": "^1.0.0",
76
97
  "request": "^2.88.2",
98
+ "responsive-loader": "^3.1.2",
99
+ "serialize-javascript": "^6.0.2",
100
+ "sharp": "^0.34.3",
77
101
  "slugify": "^1.6.6",
78
102
  "source-map-support": "^0.5.21",
79
- "sql-formatter": "^4.0.2",
80
103
  "stopword": "^3.1.1",
104
+ "tailwindcss": "^4.1.17",
105
+ "terser-webpack-plugin": "^5.2.4",
106
+ "ts-alias": "^0.0.7",
107
+ "ts-node": "^10.9.1",
81
108
  "tslog": "^4.9.1",
82
109
  "uuid": "^8.3.2",
83
- "uuid-by-string": "^3.0.4",
84
110
  "validator": "^13.7.0",
111
+ "webpack": "^5.104.1",
112
+ "webpack-assets-manifest": "^5.0.6",
113
+ "webpack-bundle-analyzer": "^4.4.2",
85
114
  "ws": "^8.2.2",
86
115
  "yaml": "^1.10.2",
87
116
  "yargs-parser": "^21.1.1",
88
117
  "youch": "^3.3.3",
89
118
  "youch-terminal": "^2.2.3",
90
- "zod": "^4.1.5",
91
- "@babel/cli": "^7.15.4",
92
- "@babel/plugin-proposal-class-properties": "^7.14.5",
93
- "@babel/plugin-proposal-decorators": "^7.25.9",
94
- "@babel/plugin-proposal-private-methods": "^7.14.5",
95
- "@babel/plugin-proposal-private-property-in-object": "^7.15.4",
96
- "@babel/plugin-transform-react-constant-elements": "^7.14.5",
97
- "@babel/preset-env": "^7.15.6",
98
- "@babel/preset-react": "^7.14.5",
99
- "@babel/preset-typescript": "^7.15.0",
100
- "@prefresh/webpack": "^3.3.2",
101
- "@squoosh/lib": "^0.4.0",
102
- "@tailwindcss/postcss": "^4.1.17",
103
- "autoprefixer": "^10.4.21",
104
- "babel-loader": "^10.0.0",
105
- "babel-plugin-glob-import": "^0.0.9-1",
106
- "babel-plugin-transform-imports": "^2.0.0",
107
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
108
- "babel-plugin-transform-remove-console": "^6.9.4",
109
- "brotli-webpack-plugin": "^1.1.0",
110
- "browser-sync": "^2.27.5",
111
- "compression-webpack-plugin": "^8.0.1",
112
- "console-table-printer": "^2.10.0",
113
- "css-loader": "^6.2.0",
114
- "css-minimizer-webpack-plugin": "^7.0.4",
115
- "favicons": "^7.2.0",
116
- "filesize": "^8.0.3",
117
- "image-minimizer-webpack-plugin": "^4.1.4",
118
- "imagemin": "^9.0.1",
119
- "imagemin-svgo": "^10.0.0",
120
- "imagemin-webp": "^6.0.0",
121
- "json5": "^2.2.0",
122
- "less-loader": "^10.0.1",
123
- "less-vars-to-js": "^1.3.0",
124
- "mini-css-extract-plugin": "^2.2.2",
125
- "minimatch": "^3.0.4",
126
- "node-cmd": "^5.0.0",
127
- "node-notifier": "^10.0.0",
128
- "null-loader": "^4.0.1",
129
- "postcss-loader": "^8.2.0",
130
- "prompts": "^2.4.2",
131
- "react-dev-utils": "^11.0.4",
132
- "replace-once": "^1.0.0",
133
- "responsive-loader": "^3.1.2",
134
- "serialize-javascript": "^6.0.2",
135
- "sharp": "^0.34.3",
136
- "speed-measure-webpack-plugin": "^1.5.0",
137
- "tailwindcss": "^4.1.17",
138
- "terser-webpack-plugin": "^5.2.4",
139
- "ts-alias": "^0.0.7",
140
- "ts-node": "^10.9.1",
141
- "webfont": "^11.2.26",
142
- "webpack": "^5.98.0",
143
- "webpack-assets-manifest": "^5.0.6",
144
- "webpack-bundle-analyzer": "^4.4.2",
145
- "webpack-dev-middleware": "^5.1.0",
146
- "webpack-hot-middleware": "^2.25.0",
147
- "webpack-node-externals": "^3.0.0",
148
- "webpack-virtual-modules": "^0.4.3"
119
+ "zod": "^4.1.5"
149
120
  },
150
121
  "devDependencies": {
151
122
  "@types/babel__core": "^7.1.16",
@@ -166,6 +137,7 @@
166
137
  "@types/webpack-env": "^1.16.2",
167
138
  "@types/ws": "^7.4.7",
168
139
  "@types/yargs-parser": "^21.0.0",
169
- "schema-dts": "^1.1.2"
140
+ "schema-dts": "^1.1.2",
141
+ "speed-measure-webpack-v5-plugin": "^1.5.2"
170
142
  }
171
143
  }
@@ -1,32 +0,0 @@
1
- /*----------------------------------
2
- - DEPENDANCES
3
- ----------------------------------*/
4
-
5
- // Libs métier
6
- import buildValidators, { champ } from '@common/data/input/validators/build';
7
- import { validateurFichier, TOptsValidateurFichier } from '@common/data/input/validators/basic';
8
-
9
- /*----------------------------------
10
- - VALIDATEURS
11
- ----------------------------------*/
12
-
13
- export default buildValidators({
14
-
15
- file: ({ ...opts }: TOptsValidateurFichier & {}) => champ<object>('fichier', {
16
- ...opts,
17
- valider: async (val: any, donneesSaisie: TObjetDonnees, donneesRetour: TObjetDonnees) => {
18
-
19
- console.log('VALIDER FICHIER COTÉ CLIENT', val);
20
-
21
- // Chaine = url ancien fichier = conservation = sera ignoré coté serveur
22
- if (typeof val === 'string')
23
- return val;
24
-
25
- // Validation universelle
26
- val = await validateurFichier(opts, val, donneesSaisie, donneesRetour);
27
-
28
- return opts.valider ? await opts.valider(val, donneesSaisie, donneesRetour) : val;
29
- }
30
- })
31
-
32
- });
@@ -1,60 +0,0 @@
1
- /*----------------------------------
2
- - DEPENDANCES
3
- ----------------------------------*/
4
- // Npm
5
- import React from 'react';
6
-
7
- // Core components
8
- import { Button, Input } from '@client/components';
9
- import Card, { Props as CardProps } from '@client/components/Dialog/card';
10
-
11
- // Core libs
12
- import useContext from '@/client/context';
13
-
14
- /*----------------------------------
15
- - TYPES
16
- ----------------------------------*/
17
-
18
- export default ({ ...self }: {} & CardProps) => {
19
-
20
- const { api, modal, clientBug } = useContext();
21
-
22
- const [observation, setObservation] = React.useState("");
23
- const [before, setBefore] = React.useState("");
24
-
25
- const send = () => clientBug({ observation, before }).then(() =>
26
- modal.success("Thanks You !", `Your bug report will be review in the next 12 hours.`).then(() =>
27
- self.close(true)
28
- )
29
- );
30
-
31
- const close = () => modal.confirm("Cancel your report ?", "All your changes will not be saved.").then(close =>
32
- close && self.close(true)
33
- );
34
-
35
- self.onClose = close
36
-
37
- return (
38
- <Card {...self} title="Report a problem" footer={<>
39
-
40
- <Button onClick={() => close()}>
41
- Cancel
42
- </Button>
43
-
44
- <Button type="primary" onClick={send}>
45
- Send Report
46
- </Button>
47
-
48
- </>}>
49
-
50
- <p>What's the problem ?</p>
51
-
52
- <Input type="longtext" title="Description of the problem" value={observation} onChange={setObservation} />
53
-
54
- <p>What did you do just before the problem occurs ?</p>
55
-
56
- <Input type="longtext" title="How the problem occured ?" value={before} onChange={setBefore} />
57
-
58
- </Card>
59
- )
60
- }