Update dependencies

This commit is contained in:
RainLoop Team 2019-03-28 01:01:26 +03:00
parent 80ad4fdbcc
commit 13065dd926
7 changed files with 709 additions and 418 deletions

View file

@ -1,4 +1,4 @@
FROM php:7.1-fpm FROM php:7.3-fpm
RUN apt-get update RUN apt-get update
@ -10,9 +10,12 @@ RUN apt-get install -y \
libpng-dev libjpeg62-turbo-dev \ libpng-dev libjpeg62-turbo-dev \
libfontconfig1 libfontconfig1-dev libzip-dev libfontconfig1 libfontconfig1-dev libzip-dev
RUN pecl install mcrypt-1.0.2 && \
docker-php-ext-enable mcrypt
RUN docker-php-ext-configure intl && \ RUN docker-php-ext-configure intl && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install opcache pdo_mysql mcrypt zip intl gd docker-php-ext-install opcache pdo_mysql zip intl gd
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

View file

@ -85,11 +85,12 @@ function includeLayout()
{ {
const app = window.document.getElementById('rl-app'); const app = window.document.getElementById('rl-app');
require('style-loader!Styles/@Boot.css'); require('Styles/@Boot.css');
if (app) if (app)
{ {
app.innerHTML = require('Html/Layout.html').replace(/[\r\n\t]+/g, ''); const layout = require('Html/Layout.html');
app.innerHTML = ((layout && layout.default ? layout.default : layout) || '').replace(/[\r\n\t]+/g, '');
return true; return true;
} }

View file

@ -5,7 +5,7 @@ import _ from '_';
import ko from 'ko'; import ko from 'ko';
import {$body} from 'Common/Globals'; import {$body} from 'Common/Globals';
import {EventKeyCode, Magics} from 'Common/Enums'; import {EventKeyCode, Magics} from 'Common/Enums';
import {trim, inArray, changeTheme} from 'Common/Utils'; import {trim, deModule, inArray, changeTheme} from 'Common/Utils';
import {reload as translatorReload} from 'Common/Translator'; import {reload as translatorReload} from 'Common/Translator';
import * as Settings from 'Storage/Settings'; import * as Settings from 'Storage/Settings';
@ -22,7 +22,7 @@ let
* @returns {string} * @returns {string}
*/ */
function cmdError(cmd) { function cmdError(cmd) {
return require('Html/Cmds/Error.html').replace('{{ cmd }}', cmd); return deModule(require('Html/Cmds/Error.html')).replace('{{ cmd }}', cmd);
} }
/** /**
@ -37,7 +37,7 @@ function cmdClear(dom) {
* @returns {string} * @returns {string}
*/ */
function cmdHelp(cmds) { function cmdHelp(cmds) {
return require('Html/Cmds/Help.html').replace('{{ commands }}', cmds.join(' ')); return deModule(require('Html/Cmds/Help.html')).replace('{{ commands }}', cmds.join(' '));
} }
/** /**
@ -49,7 +49,7 @@ function cmdTheme(param, themes) {
changeTheme(param); changeTheme(param);
return ''; return '';
} }
return require('Html/Cmds/ThemeEmpty.html').replace('{{ themes }}', themes.join(', ')); return deModule(require('Html/Cmds/ThemeEmpty.html')).replace('{{ themes }}', themes.join(', '));
} }
/** /**
@ -61,14 +61,14 @@ function cmdLang(param, isAdmin, langs) {
translatorReload(isAdmin, param); translatorReload(isAdmin, param);
return ''; return '';
} }
return require('Html/Cmds/LangEmpty.html').replace('{{ langs }}', langs.join(', ')); return deModule(require('Html/Cmds/LangEmpty.html')).replace('{{ langs }}', langs.join(', '));
} }
/** /**
* @returns {string} * @returns {string}
*/ */
function cmdVersion() { function cmdVersion() {
return require('Html/Cmds/Version.html').replace('{{ version }}', return deModule(require('Html/Cmds/Version.html')).replace('{{ version }}',
Settings.appSettingsGet('version') + ' (' + Settings.appSettingsGet('appVersionType') + ')'); Settings.appSettingsGet('version') + ' (' + Settings.appSettingsGet('appVersionType') + ')');
} }
@ -231,7 +231,7 @@ class CmdContoller
if (h && h[0]) if (h && h[0])
{ {
h.append($('<div></div>').html(require('Html/Cmds/Main.html').replace('{{ cmd }}', cmdLine))); h.append($('<div></div>').html(deModule(require('Html/Cmds/Main.html')).replace('{{ cmd }}', cmdLine)));
if (result) if (result)
{ {
h.append($('<div></div>').html(result)); h.append($('<div></div>').html(result));

View file

@ -254,6 +254,14 @@ const timeOutActionSecond = (function() {
export {timeOutAction, timeOutActionSecond}; export {timeOutAction, timeOutActionSecond};
/**
* @param {any} m
* @returns {any}
*/
export function deModule(m) {
return (m && m.default ? m.default : m) || '';
}
/** /**
* @returns {boolean} * @returns {boolean}
*/ */
@ -629,7 +637,7 @@ export function previewMessage({title, subject, date, fromCreds, toCreds, toLabe
const html = bodyClone ? bodyClone.html() : ''; const html = bodyClone ? bodyClone.html() : '';
doc.write(require('Html/PreviewMessage.html') doc.write(deModule(require('Html/PreviewMessage.html'))
.replace('{{title}}', encodeHtml(title)) .replace('{{title}}', encodeHtml(title))
.replace('{{subject}}', encodeHtml(subject)) .replace('{{subject}}', encodeHtml(subject))
.replace('{{date}}', encodeHtml(date)) .replace('{{date}}', encodeHtml(date))

View file

@ -52,22 +52,23 @@
"firefox esr" "firefox esr"
], ],
"devDependencies": { "devDependencies": {
"@babel/core": "7.2.2", "@babel/core": "7.4.0",
"@babel/plugin-proposal-class-properties": "7.3.0", "@babel/plugin-proposal-class-properties": "7.4.0",
"@babel/plugin-proposal-decorators": "7.3.0", "@babel/plugin-proposal-decorators": "7.4.0",
"@babel/plugin-transform-runtime": "7.2.0", "@babel/plugin-transform-runtime": "7.4.0",
"@babel/preset-env": "7.3.1", "@babel/preset-env": "7.4.2",
"@babel/runtime-corejs2": "7.3.1", "@babel/runtime-corejs2": "7.4.2",
"autolinker": "1.7.1", "autolinker": "3.0.5",
"babel-eslint": "10.0.1", "babel-eslint": "10.0.1",
"babel-loader": "8.0.5", "babel-loader": "8.0.5",
"classnames": "2.2.6", "classnames": "2.2.6",
"copy-webpack-plugin": "4.6.0", "copy-webpack-plugin": "5.0.2",
"css-loader": "2.1.1",
"element-dataset": "2.2.6", "element-dataset": "2.2.6",
"emailjs-addressparser": "2.0.2", "emailjs-addressparser": "2.0.2",
"es6-object-assign": "1.1.0", "es6-object-assign": "1.1.0",
"es6-promise-polyfill": "1.2.0", "es6-promise-polyfill": "1.2.0",
"eslint": "5.12.1", "eslint": "5.15.3",
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-autoprefixer": "6.0.0", "gulp-autoprefixer": "6.0.0",
"gulp-cached": "1.1.1", "gulp-cached": "1.1.1",
@ -90,7 +91,7 @@
"gulp-size": "3.0.0", "gulp-size": "3.0.0",
"gulp-stripbom": "1.0.4", "gulp-stripbom": "1.0.4",
"gulp-through": "0.4.0", "gulp-through": "0.4.0",
"gulp-uglify": "3.0.1", "gulp-uglify": "3.0.2",
"gulp-util": "3.0.8", "gulp-util": "3.0.8",
"gulp-zip": "4.2.0", "gulp-zip": "4.2.0",
"ifvisible.js": "1.0.6", "ifvisible.js": "1.0.6",
@ -104,25 +105,25 @@
"json-loader": "0.5.7", "json-loader": "0.5.7",
"json3": "3.3.2", "json3": "3.3.2",
"knockout": "3.4.2", "knockout": "3.4.2",
"knockout-sortable": "1.1.0", "knockout-sortable": "1.1.1",
"knockout-transformations": "2.1.0", "knockout-transformations": "2.1.0",
"lozad": "1.8.0", "lozad": "1.9.0",
"matchmedia-polyfill": "0.3.1", "matchmedia-polyfill": "0.3.1",
"moment": "2.24.0", "moment": "2.24.0",
"node-fs": "0.1.7", "node-fs": "0.1.7",
"node-notifier": "5.3.0", "node-notifier": "5.4.0",
"normalize.css": "8.0.1", "normalize.css": "8.0.1",
"openpgp": "2.6.2", "openpgp": "2.6.2",
"opentip": "2.4.3", "opentip": "2.4.3",
"pikaday": "1.8.0", "pikaday": "1.8.0",
"raw-loader": "1.0.0", "raw-loader": "2.0.0",
"rimraf": "2.6.3", "rimraf": "2.6.3",
"run-sequence": "2.2.1", "run-sequence": "2.2.1",
"simplestatemanager": "4.1.1", "simplestatemanager": "4.1.1",
"style-loader": "0.23.1", "style-loader": "0.23.1",
"underscore": "1.9.1", "underscore": "1.9.1",
"webpack": "4.29.0", "webpack": "4.29.6",
"webpack-cli": "3.2.1", "webpack-cli": "3.3.0",
"webpack-notifier": "1.7.0" "webpack-notifier": "1.7.0"
} }
} }

View file

@ -83,10 +83,15 @@ module.exports = function(publicPath, pro) {
options: babelLoaderOptions() options: babelLoaderOptions()
}, },
{ {
test: /\.(html|css)$/, test: /\.html$/,
loader: 'raw-loader', loader: 'raw-loader',
include: [devPath] include: [devPath]
}, },
{
test: /\.css/,
loaders: ['style-loader', 'css-loader'],
include: [devPath]
},
{ {
test: /\.json$/, test: /\.json$/,
loader: 'json-loader', loader: 'json-loader',

1051
yarn.lock

File diff suppressed because it is too large Load diff