1.4.0 Release (#45)

* customizations for chooser, coll-index and appmain to support usage in archiveweb.page
- chooser: support panel/message view
- move apiPrefix to misc
- make coll-index extensible, overridable styles, filtering

* api changes: make configurable in coll-index, now using '/w/' instead of '/wabac/', '/c/' prefix for coll apis

* lint pass!

* bulma: update to 0.9.2, fix delete spinner with latest bulma

* ui fixes:
- show 'Loading Archives...' on initial load until first api response succeeds
- fix typo in oncontrollerchange not actually resolving the promise!

* embed sandbox: add other allow options, except top-nav
- first api load: keep loading message until first successful api load
- don't reset hash on purge to keep current page
- sw config: fix typo with latest wabac.js
- embed: add 'noSandbox' option to avoid adding sandbox to iframe, needed to show PDFs, add more allow rules (all except top-navigation)

* ui improvements:
- refresh: ensure location refresh from hitting enter in location bar always resets url
- pageentry doubleclick: ensure double-clicking on page in sidebar always triggers reload, even if current page
- pageentry typo fix: fix missing var causing selection error (fixes webrecorder/archivewebpage#25)
- lint: don't include 'event' as global
- use latest wabac.js 2.7.0-beta.1

* add CHANGES for 1.4.0, add 'noSandbox' to embedding options
- electron app: fix path to 'w/'
- bump electron to 11.4.3

* docs: autoload current version from package.json
- chooser: support .json files for multiwacz (experimental)
- update CHANGES.md
- add missing .eslintrc.js file

* bump version to 1.4.0
This commit is contained in:
Ilya Kreymer
2021-04-25 16:45:40 -07:00
committed by GitHub
parent 36ae1aefda
commit 0ef8f955db
29 changed files with 832 additions and 663 deletions
+48 -45
View File
@@ -1,7 +1,9 @@
const path = require('path');
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CopyPlugin = require('copy-webpack-plugin');
/*eslint-env node */
const path = require("path");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require("copy-webpack-plugin");
// fake url used in app to serve files
// can not use custom scheme due to service worker issues
@@ -19,15 +21,15 @@ const GDRIVE_CLIENT_ID = "160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.goo
const BANNER_TEXT = "'[name].js is part of ReplayWeb.page (https://replayweb.page) Copyright (C) 2020-2021, Webrecorder Software. Licensed under the Affero General Public License v3.'";
// IPFS ipfs-core lib url
const IPFS_CORE_URL = "https://cdn.jsdelivr.net/npm/ipfs-core@0.4.2/dist/index.min.js";
const IPFS_CORE_URL = "https://cdn.jsdelivr.net/npm/ipfs-core@0.5.4/dist/index.min.js";
const electronMainConfig = (env, argv) => {
const electronMainConfig = (/*env, argv*/) => {
return {
target: 'electron-main',
mode: 'production',
target: "electron-main",
mode: "production",
entry: {
'electron': './src/electron-main.js',
"electron": "./src/electron-main.js",
},
resolve: {
alias: {
@@ -37,8 +39,8 @@ const electronMainConfig = (env, argv) => {
}
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
path: path.join(__dirname, "dist"),
filename: "[name].js",
},
node: {
__dirname: false,
@@ -53,8 +55,8 @@ const electronMainConfig = (env, argv) => {
new webpack.BannerPlugin(BANNER_TEXT),
new CopyPlugin({
patterns: [
{ from: 'node_modules/bcrypto/build/Release/bcrypto.node', to: 'build' },
{ from: 'node_modules/leveldown/prebuilds/', to: 'prebuilds' },
{ from: "node_modules/bcrypto/build/Release/bcrypto.node", to: "build" },
{ from: "node_modules/leveldown/prebuilds/", to: "prebuilds" },
],
}),
],
@@ -62,16 +64,16 @@ const electronMainConfig = (env, argv) => {
"bufferutil": "bufferutil",
"utf-8-validate": "utf-8-validate",
}
}
};
};
const electronPreloadConfig = (env, argv) => {
const electronPreloadConfig = (/*env, argv*/) => {
return {
target: 'electron-preload',
mode: 'production',
target: "electron-preload",
mode: "production",
entry: {
'preload': './src/electron-preload.js',
"preload": "./src/electron-preload.js",
},
plugins: [
new webpack.BannerPlugin(BANNER_TEXT),
@@ -82,30 +84,30 @@ const electronPreloadConfig = (env, argv) => {
__IPFS_CORE_URL__: JSON.stringify("")
}),
]
}
};
};
const browserConfig = (env, argv) => {
const browserConfig = (/*env, argv*/) => {
return {
target: 'web',
mode: 'production',
target: "web",
mode: "production",
entry: {
'ui': './src/ui.js',
'sw': './src/sw.js'
"ui": "./src/ui.js",
"sw": "./src/sw.js"
},
output: {
path: path.join(__dirname),
filename: '[name].js',
libraryTarget: 'self',
globalObject: 'self',
publicPath: '/'
filename: "[name].js",
libraryTarget: "self",
globalObject: "self",
publicPath: "/"
},
externals: {
electron: 'electron',
electron: "electron",
},
devServer: {
@@ -113,7 +115,7 @@ const browserConfig = (env, argv) => {
port: 9990,
open: false,
contentBase: path.join(__dirname),
publicPath: '/'
publicPath: "/"
},
plugins: [
@@ -122,7 +124,7 @@ const browserConfig = (env, argv) => {
}),
new MiniCssExtractPlugin(),
new webpack.DefinePlugin({
__SW_NAME__: JSON.stringify('sw.js'),
__SW_NAME__: JSON.stringify("sw.js"),
__APP_FILE_SERVE_PREFIX__ : JSON.stringify(APP_FILE_SERVE_PREFIX),
__HELPER_PROXY__ : JSON.stringify(HELPER_PROXY),
__GDRIVE_CLIENT_ID__ : JSON.stringify(GDRIVE_CLIENT_ID),
@@ -132,28 +134,29 @@ const browserConfig = (env, argv) => {
new webpack.BannerPlugin(BANNER_TEXT),
new CopyPlugin({
patterns: [
{ from: 'node_modules/ipfs-core/dist/index.min.js', to: 'ipfs-core.min.js' },
{ from: "node_modules/ipfs-core/dist/index.min.js", to: "ipfs-core.min.js" },
{ from: "package.json", to: "_data/package.json" }
]
}),
],
module: {
rules: [
{
test: /\.svg$/,
use: ['svg-inline-loader'],
},
{
test: /main.scss$/,
use: ['css-loader', 'sass-loader']
},
{
test: /wombat.js|wombatWorkers.js|index.html$/i,
use: ['raw-loader'],
}
{
test: /\.svg$/,
use: ["svg-inline-loader"],
},
{
test: /main.scss$/,
use: ["css-loader", "sass-loader"]
},
{
test: /wombat.js|wombatWorkers.js|index.html$/i,
use: ["raw-loader"],
}
]
},
}
};
};
module.exports = [ browserConfig, electronMainConfig, electronPreloadConfig ];