v2.12.0-pr1

This commit is contained in:
the-djmaze 2022-02-07 12:29:19 +01:00
parent 051e78df51
commit 67ae99fa3c
11 changed files with 3915 additions and 4068 deletions

View file

@ -289,5 +289,5 @@ dev_email = ""
dev_password = ""
[version]
current = "2.11.0"
current = "2.12.0-pr1"
saved = "Mon, 23 Aug 2021 07:55:13 +0000"

View file

@ -84,6 +84,7 @@ This fork of RainLoop has the following changes:
* Support IMAP RFC 7628 SASL OAUTHBEARER aka XOAUTH2
* Support IMAP4rev2 RFC 9051
* Support Sodium and OpenSSL for encryption
* Much better PGP support
### Supported browsers
@ -138,25 +139,25 @@ RainLoop 1.15 vs SnappyMail
|js/* |RainLoop |Snappy |
|--------------- |--------: |--------: |
|admin.js |2.158.025 | 86.116 |
|app.js |4.215.733 | 423.547 |
|admin.js |2.158.025 | 86.224 |
|app.js |4.215.733 | 481.350 |
|boot.js | 672.433 | 2.779 |
|libs.js | 647.679 | 208.745 |
|libs.js | 647.679 | 208.713 |
|polyfills.js | 325.908 | 0 |
|serviceworker.js | 0 | 285 |
|TOTAL |8.019.778 | 721.472 |
|TOTAL |8.019.778 | 779.351 |
|js/min/* |RainLoop |Snappy |RL gzip |SM gzip |RL brotli |SM brotli |
|--------------- |--------: |--------: |------: |------: |--------: |--------: |
|admin.min.js | 255.514 | 43.225 | 73.899 | 13.927 | 60.674 | 12.410 |
|app.min.js | 516.000 | 214.686 |140.430 | 65.385 |110.657 | 55.574 |
|admin.min.js | 255.514 | 43.142 | 73.899 | 13.913 | 60.674 | 12.402 |
|app.min.js | 516.000 | 233.602 |140.430 | 72.842 |110.657 | 62.011 |
|boot.min.js | 66.456 | 1.654 | 22.553 | 996 | 20.043 | 814 |
|libs.min.js | 574.626 | 99.476 |177.280 | 36.501 |151.855 | 32.699 |
|libs.min.js | 574.626 | 99.410 |177.280 | 36.496 |151.855 | 32.633 |
|polyfills.min.js | 32.608 | 0 | 11.315 | 0 | 10.072 | 0 |
|TOTAL |1.445.204 | 359.041 |425.477 |116.809 |353.301 |101.497 |
|TOTAL (no admin) |1.189.690 | 315.816 |351.061 |102.882 |292.627 | 89.087 |
|TOTAL |1.445.204 | 377.808 |425.477 |124.247 |353.301 |107.860 |
|TOTAL (no admin) |1.189.690 | 334.666 |351.061 |110.334 |292.627 | 95.458 |
For a user its around 70% smaller and faster than traditional RainLoop.
For a user its around 68% smaller and faster than traditional RainLoop.
### CSS changes
@ -182,12 +183,12 @@ For a user its around 70% smaller and faster than traditional RainLoop.
|css/* |RainLoop |Snappy |RL gzip |SM gzip |SM brotli |
|------------ |-------: |------: |------: |------: |--------: |
|app.css | 340.334 | 84.579 | 46.959 | 16.311 | 14.102 |
|app.min.css | 274.791 | 68.200 | 39.618 | 14.359 | 12.744 |
|app.css | 340.334 | 83.221 | 46.959 | 17.038 | 14.654 |
|app.min.css | 274.791 | 67.115 | 39.618 | 15.095 | 13.287 |
|boot.css | | 1.326 | | 664 | 545 |
|boot.min.css | | 1.071 | | 590 | 474 |
|admin.css | | 30.558 | | 6.894 | 5.979 |
|admin.min.css | | 24.546 | | 6.241 | 5.489 |
|admin.css | | 30.589 | | 6.914 | 6.003 |
|admin.min.css | | 24.590 | | 6.258 | 5.508 |
### PGP
RainLoop uses the old OpenPGP.js v2
@ -201,7 +202,7 @@ See https://github.com/the-djmaze/openpgpjs for development
|OpenPGP |RainLoop |Snappy |RL gzip |SM gzip |RL brotli |SM brotli |
|--------------- |--------: |--------: |------: |-------: |--------: |--------: |
|openpgp.min.js | 330.742 | 540.542 |102.388 | 167.397 | 84.241 | 137.502 |
|openpgp.min.js | 330.742 | 539.642 |102.388 | 167.112 | 84.241 | 137.447 |
|openpgp.worker | 1.499 | | 824 | | 695 | |

77
build/plugins.php Executable file
View file

@ -0,0 +1,77 @@
<?php
define('ROOT_DIR', dirname(__DIR__));
define('PLUGINS_DEST_DIR', dirname(__DIR__) . '/build/dist/releases/plugins');
$destPath = __DIR__ . 'build/dist/releases/plugins/';
is_dir(PLUGINS_DEST_DIR) || mkdir(PLUGINS_DEST_DIR, 0777, true);
$manifest = [];
require ROOT_DIR . '/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/AbstractPlugin.php';
$keys = [
'author',
'category',
'description',
'file',
'id',
'license',
'name',
'release',
'required',
'type',
'url',
'version'
];
foreach (glob(ROOT_DIR . '/plugins/*', GLOB_NOSORT | GLOB_ONLYDIR) as $dir) {
if (is_file("{$dir}/index.php")) {
require "{$dir}/index.php";
$name = basename($dir);
$class = new ReflectionClass(str_replace('-', '', $name) . 'Plugin');
$manifest_item = [];
foreach ($class->getConstants() as $key => $value) {
$key = \strtolower($key);
if (in_array($key, $keys)) {
$manifest_item[$key] = $value;
}
}
$version = $manifest_item['version'];
if (0 < floatval($version)) {
echo "+ {$name} {$version}\n";
$manifest_item['type'] = 'plugin';
$manifest_item['id'] = $name;
$manifest_item['file'] = "{$dir}-{$version}.tgz";
ksort($manifest_item);
$manifest[$name] = $manifest_item;
$tar_destination = PLUGINS_DEST_DIR . "/{$name}-{$version}.tar";
$tgz_destination = PLUGINS_DEST_DIR . "/{$name}-{$version}.tgz";
@unlink($tgz_destination);
@unlink("{$tar_destination}.gz");
$tar = new PharData($tar_destination);
$tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}", '/') . '/');
$tar->compress(Phar::GZ);
unlink($tar_destination);
rename("{$tar_destination}.gz", $tgz_destination);
if (Phar::canWrite()) {
$phar_destination = PLUGINS_DEST_DIR . "/{$name}.phar";
@unlink($phar_destination);
$tar = new Phar($phar_destination);
$tar->buildFromDirectory("./plugins/{$name}/");
$tar->compress(Phar::GZ);
unlink($phar_destination);
rename("{$phar_destination}.gz", $phar_destination);
}
} else {
echo "- {$name} {$version}\n";
}
} else {
echo "- {$name}\n";
}
}
ksort($manifest);
$manifest = json_encode(array_values($manifest));
$manifest = str_replace('{"', "\n\t{\n\t\t\"", $manifest);
$manifest = str_replace('"}', "\"\n\t}", $manifest);
$manifest = str_replace('}]', "}\n]", $manifest);
$manifest = str_replace('","', "\",\n\t\t\"", $manifest);
$manifest = str_replace('\/', '/', $manifest);
file_put_contents(PLUGINS_DEST_DIR . "/packages.json", $manifest);
exit;

View file

@ -1,4 +1,4 @@
This app packages SnappyMail <upstream>2.11.0</upstream>.
This app packages SnappyMail <upstream>2.12.0-pr1</upstream>.
SnappyMail is a simple, modern, lightweight & fast web-based email client.

View file

@ -4,7 +4,7 @@ RUN mkdir -p /app/code
WORKDIR /app/code
# If you change the extraction below, be sure to test on scaleway
VERSION=2.11.0
VERSION=2.12.0-pr1
RUN wget https://github.com/the-djmaze/snappymail/releases/download/v${VERSION}/snappymail-${VERSION}.zip -O /tmp/snappymail.zip && \
unzip /tmp/snappymail.zip -d /app/code && \
rm /tmp/snappymail.zip && \

View file

@ -1 +1 @@
2.11.0
2.12.0-pr1

View file

@ -4,7 +4,7 @@
<name>SnappyMail</name>
<summary>SnappyMail Webmail</summary>
<description>Simple, modern and fast web-based email client. After enabling in Nextcloud, go to Nextcloud admin panel, "Additionnal settings" and you will see a "SnappyMail webmail" section. There, click on the link to go to the SnappyMail admin panel. The default user/password is admin/12345. This version is based on SnappyMail 2.6.0 (2021-07).</description>
<version>2.11.0</version>
<version>2.12.0-pr1</version>
<licence>agpl</licence>
<author>SnappyMail Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli</author>
<namespace>SnappyMail</namespace>

View file

@ -20,7 +20,7 @@ return "SnappyMail Webmail is a browser-based multilingual IMAP client with an a
# script_snappymail_versions()
sub script_snappymail_versions
{
return ( "2.11.0" );
return ( "2.12.0-pr1" );
}
sub script_snappymail_version_desc

View file

@ -3,7 +3,7 @@
"title": "SnappyMail",
"description": "Simple, modern & fast web-based email client",
"private": true,
"version": "2.11.0",
"version": "2.12.0-pr1",
"homepage": "https://snappymail.eu",
"author": {
"name": "DJ Maze",

View file

@ -5,79 +5,7 @@ chdir(__DIR__);
$options = getopt('', ['aur','docker','plugins','set-version','skip-gulp','debian']);
if (isset($options['plugins'])) {
$destPath = "build/dist/releases/plugins/";
is_dir($destPath) || mkdir($destPath, 0777, true);
$manifest = [];
require 'snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/AbstractPlugin.php';
$keys = [
'author',
'category',
'description',
'file',
'id',
'license',
'name',
'release',
'required',
'type',
'url',
'version'
];
foreach (glob('plugins/*', GLOB_NOSORT | GLOB_ONLYDIR) as $dir) {
if (is_file("{$dir}/index.php")) {
require "{$dir}/index.php";
$name = basename($dir);
$class = new ReflectionClass(str_replace('-', '', $name) . 'Plugin');
$manifest_item = [];
foreach ($class->getConstants() as $key => $value) {
$key = \strtolower($key);
if (in_array($key, $keys)) {
$manifest_item[$key] = $value;
}
}
$version = $manifest_item['version'];
if (0 < floatval($version)) {
echo "+ {$name} {$version}\n";
$manifest_item['type'] = 'plugin';
$manifest_item['id'] = $name;
$manifest_item['file'] = "{$dir}-{$version}.tgz";
ksort($manifest_item);
$manifest[$name] = $manifest_item;
$tar_destination = "{$destPath}{$name}-{$version}.tar";
$tgz_destination = "{$destPath}{$name}-{$version}.tgz";
@unlink($tgz_destination);
@unlink("{$tar_destination}.gz");
$tar = new PharData($tar_destination);
$tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}", '/') . '/');
$tar->compress(Phar::GZ);
unlink($tar_destination);
rename("{$tar_destination}.gz", $tgz_destination);
if (Phar::canWrite()) {
$phar_destination = "{$destPath}{$name}.phar";
@unlink($phar_destination);
$tar = new Phar($phar_destination);
$tar->buildFromDirectory("./plugins/{$name}/");
$tar->compress(Phar::GZ);
unlink($phar_destination);
rename("{$phar_destination}.gz", $phar_destination);
}
} else {
echo "- {$name} {$version}\n";
}
} else {
echo "- {$name}\n";
}
}
ksort($manifest);
$manifest = json_encode(array_values($manifest));
$manifest = str_replace('{"', "\n\t{\n\t\t\"", $manifest);
$manifest = str_replace('"}', "\"\n\t}", $manifest);
$manifest = str_replace('}]', "}\n]", $manifest);
$manifest = str_replace('","', "\",\n\t\t\"", $manifest);
$manifest = str_replace('\/', '/', $manifest);
file_put_contents("{$destPath}packages.json", $manifest);
exit;
require(__DIR__ . '/build/plugins.php');
}
$gulp = trim(`which gulp`);

7787
yarn.lock

File diff suppressed because it is too large Load diff