Browse Source

Update dependencies

master
Eduard Kuzmenko 3 years ago
parent
commit
fe312d7493
  1. 1
      .gitignore
  2. 12662
      package-lock.json
  3. 57
      package.json
  4. 2
      src/components/chat/markupTooltip.ts
  5. 4
      src/lib/mtproto/apiManager.ts
  6. 5
      src/lib/mtproto/networker.ts
  7. 17
      webpack.common.js
  8. 13
      webpack.prod.js

1
.gitignore vendored

@ -9,7 +9,6 @@ src/rlottie.github.io @@ -9,7 +9,6 @@ src/rlottie.github.io
public2
public3
.vscode
package-lock.json
session_name.session
tasks.txt
yarn.lock

12662
package-lock.json generated

File diff suppressed because it is too large Load Diff

57
package.json

@ -18,67 +18,58 @@ @@ -18,67 +18,58 @@
"author": "",
"license": "GPL-3.0-only",
"dependencies": {
"jsbn": "^1.1.0",
"webpack-dev-server": "^3.11.2"
},
"devDependencies": {
"@babel/cli": "^7.12.13",
"@babel/core": "^7.12.13",
"@babel/plugin-proposal-class-properties": "^7.12.13",
"@babel/plugin-transform-typescript": "^7.12.13",
"@babel/cli": "^7.13.16",
"@babel/core": "^7.14.2",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-transform-typescript": "^7.13.0",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.12.13",
"@babel/preset-env": "^7.14.2",
"@babel/preset-es2015": "^7.0.0-beta.53",
"@babel/preset-typescript": "^7.12.13",
"@babel/preset-typescript": "^7.13.0",
"@cryptography/aes": "^0.1.1",
"@cryptography/sha1": "^0.1.0",
"@cryptography/sha1": "^0.2.0",
"@cryptography/sha256": "^0.2.0",
"@peculiar/webcrypto": "^1.1.6",
"@types/aes-js": "^3.1.1",
"@types/chrome": "0.0.91",
"@types/jest": "^24.9.1",
"@types/serviceworker-webpack-plugin": "^1.0.1",
"aes-js": "^3.1.2",
"@peculiar/webcrypto": "^1.1.7",
"@types/chrome": "0.0.139",
"@types/jest": "^26.0.23",
"@types/serviceworker-webpack-plugin": "^1.0.2",
"autoprefixer": "^9.8.6",
"babel-jest": "^24.9.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-preset-es2015": "^6.24.1",
"compression": "^1.7.4",
"compression-webpack-plugin": "^3.1.0",
"core-js": "^3.8.3",
"css-loader": "^3.6.0",
"express": "^4.17.1",
"fast-png": "^5.0.3",
"handlebars": "^4.7.6",
"fast-png": "^5.0.4",
"handlebars": "^4.7.7",
"handlebars-loader": "^1.7.1",
"html-webpack-plugin": "^3.2.0",
"ifdef-loader": "^2.1.5",
"install": "^0.13.0",
"jest": "^24.9.0",
"html-webpack-plugin": "^4.5.2",
"ifdef-loader": "^2.3.0",
"jest": "^26.6.3",
"media-query-plugin": "^1.4.0",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.14.1",
"npm": "^6.14.11",
"npm": "^7.12.1",
"on-build-webpack": "^0.1.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"pako": "^1.0.11",
"pako": "^2.0.3",
"postcss": "^8.2.10",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.7.0",
"qr-code-styling": "^1.3.4",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.13",
"sass-loader": "^8.0.2",
"serviceworker-webpack-plugin": "^1.0.1",
"style-loader": "^1.3.0",
"terser-webpack-plugin": "^3.1.0",
"text-encoding": "^0.7.0",
"ts-jest": "^24.3.0",
"ts-loader": "^6.2.2",
"typescript": "^3.9.7",
"url-loader": "^2.3.0",
"ts-jest": "^26.5.6",
"ts-loader": "^8.2.0",
"typescript": "^4.2.4",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-merge": "^4.2.2",
"worker-loader": "^2.0.0"
"worker-loader": "^3.0.8"
}
}

2
src/components/chat/markupTooltip.ts

@ -345,7 +345,7 @@ export default class MarkupTooltip { @@ -345,7 +345,7 @@ export default class MarkupTooltip {
this.show();
//!isTouchSupported && document.addEventListener('mouseup', this.onMouseUp);
/* !isTouchSupported && document.addEventListener('mouseup', this.onMouseUp); */
};
public setMouseUpEvent() {

4
src/lib/mtproto/apiManager.ts

@ -194,7 +194,9 @@ export class ApiManager { @@ -194,7 +194,9 @@ export class ApiManager {
}
const networkers = cache[dcId];
if(networkers.length >= /* 1 */(connectionType === 'client' || transportType === 'https' ? 1 : (connectionType === 'download' ? 3 : 3))) {
// @ts-ignore
const maxNetworkers = connectionType === 'client' || transportType === 'https' ? 1 : (connectionType === 'download' ? 3 : 3);
if(networkers.length >= maxNetworkers) {
let i = networkers.length - 1, found = false;
for(; i >= 0; --i) {
if(networkers[i].isOnline) {

5
src/lib/mtproto/networker.ts

@ -94,11 +94,12 @@ export default class MTPNetworker { @@ -94,11 +94,12 @@ export default class MTPNetworker {
private pendingResends: Array<string> = [];
private connectionInited = false;
private nextReqTimeout: number;
private nextReq: number = 0;
/// #if MTPROTO_HTTP || MTPROTO_HTTP_UPLOAD
//private longPollInt: number;
private longPollPending = 0;
private nextReqTimeout: number;
private nextReq: number = 0;
private checkConnectionTimeout: number;
private checkConnectionPeriod = 0;
private sleepAfter = 0;

17
webpack.common.js

@ -9,7 +9,7 @@ const fs = require('fs'); @@ -9,7 +9,7 @@ const fs = require('fs');
const allowedIPs = ['127.0.0.1'];
const devMode = process.env.NODE_ENV !== 'production';
const useLocal = true;
const useLocalNotLocal = true;
const useLocalNotLocal = false;
if(devMode) {
console.log('DEVMODE IS ON!');
@ -22,8 +22,9 @@ const opts = { @@ -22,8 +22,9 @@ const opts = {
MTPROTO_HTTP_UPLOAD: false,
DEBUG: devMode,
version: 3,
"ifdef-verbose": devMode, // add this for verbose output
"ifdef-triple-slash": true // add this to use double slash comment instead of default triple slash
'ifdef-verbose': devMode, // add this for verbose output
'ifdef-triple-slash': true, // add this to use double slash comment instead of default triple slash
'ifdef-fill-with-blanks': true // add this to remove code with blank spaces instead of "//" comments
};
const domain = 'yourdomain.com';
@ -66,7 +67,7 @@ module.exports = { @@ -66,7 +67,7 @@ module.exports = {
use: [
//{ loader: 'babel-loader', options: require('./babel.config') },
'ts-loader',
{ loader: "ifdef-loader", options: opts }
{ loader: 'ifdef-loader', options: opts }
],
exclude: /node_modules/,
},
@ -91,10 +92,10 @@ module.exports = { @@ -91,10 +92,10 @@ module.exports = {
//devtool: 'inline-source-map',
output: {
globalObject: "this",
globalObject: 'this',
path: path.resolve(__dirname, 'public'),
filename: "[name].[chunkhash].bundle.js",
chunkFilename: "[name].[chunkhash].chunk.js"
filename: '[name].[chunkhash].bundle.js',
chunkFilename: '[name].[chunkhash].chunk.js'
},
devServer: {
@ -162,7 +163,7 @@ module.exports = { @@ -162,7 +163,7 @@ module.exports = {
minifyCSS: true,
minifyURLs: true
},
chunks: "all",
chunks: 'all',
excludeChunks: []
}),

13
webpack.prod.js

@ -4,10 +4,10 @@ const path = require('path'); @@ -4,10 +4,10 @@ const path = require('path');
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const CompressionPlugin = require("compression-webpack-plugin");
//const CompressionPlugin = require("compression-webpack-plugin");
const WebpackOnBuildPlugin = require('on-build-webpack');
const TerserJSPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
//const TerserJSPlugin = require('terser-webpack-plugin');
//const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const fs = require('fs');
const buildDir = __dirname + '/public/';
@ -41,13 +41,13 @@ module.exports = merge(common, { @@ -41,13 +41,13 @@ module.exports = merge(common, {
},
plugins: [
new CompressionPlugin({
/* new CompressionPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test: /\.(js|css|html|svg)$/,
threshold: 10240,
minRatio: 0.8,
}),
}), */
/* new CompressionPlugin({
filename: '[path].br[query]',
algorithm: 'brotliCompress',
@ -70,13 +70,12 @@ module.exports = merge(common, { @@ -70,13 +70,12 @@ module.exports = merge(common, {
|| file.includes('.webmanifest')
|| file.includes('.wasm')
|| file.includes('rlottie')
|| file.includes('pako')
|| file.includes('Worker.min.js')
|| file.includes('recorder.min.js')
|| file.includes('.hbs')) return;
let p = path.resolve(buildDir + file);
if(!newlyCreatedAssets[file] && ['.gz', '.js'].find(ext => file.endsWith(ext)) !== undefined) {
if(!newlyCreatedAssets[file] && ['.gz', '.js', '.ts', '.map', '.css', '.txt'].find(ext => file.endsWith(ext)) !== undefined) {
//console.log('to unlink 2:', file);

Loading…
Cancel
Save