Merge branch 'main' of github.com:webrecorder/replayweb.page
This commit is contained in:
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
+12
-2
@@ -7,8 +7,18 @@
|
|||||||
"homepage": "https://replayweb.page/",
|
"homepage": "https://replayweb.page/",
|
||||||
"author": "Webrecorder Software",
|
"author": "Webrecorder Software",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"main": "ui.js",
|
"exports": {
|
||||||
"types": "dist/types/index.d.ts",
|
".": {
|
||||||
|
"types": "./dist/types/index.d.ts",
|
||||||
|
"default": "./ui.js"
|
||||||
|
},
|
||||||
|
"./misc": {
|
||||||
|
"types": "./dist/types/misc.d.ts",
|
||||||
|
"default": "./dist/misc.js"
|
||||||
|
},
|
||||||
|
"./src/electron-*": "./src/electron-*.ts",
|
||||||
|
"./index.html": "./index.html"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"@shoelace-style/shoelace": "~2.15.1",
|
"@shoelace-style/shoelace": "~2.15.1",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import faX from "@fortawesome/fontawesome-free/svgs/solid/times.svg";
|
|||||||
|
|
||||||
import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js";
|
import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js";
|
||||||
|
|
||||||
import systemLibrary from "@shoelace-style/shoelace/dist/components/icon/library.system";
|
import systemLibrary from "@shoelace-style/shoelace/dist/components/icon/library.system.js";
|
||||||
|
|
||||||
// disable system library to prevent loading of unused data: URLs
|
// disable system library to prevent loading of unused data: URLs
|
||||||
// allow only "x-lg" as it is needed for sl-dialog
|
// allow only "x-lg" as it is needed for sl-dialog
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class URLResources extends LitElement {
|
|||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
//this.doLoadResources();
|
//this.doLoadResources();
|
||||||
if (this.urlSearchType === "") {
|
if (this.urlSearchType === "") {
|
||||||
this.urlSearchType = "prefix";
|
this.urlSearchType = "contains";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,14 +163,9 @@ class URLResources extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let url = this.urlSearchType !== "contains" ? this.query : "";
|
const url = this.urlSearchType !== "contains" ? this.query : "";
|
||||||
const prefix = url && this.urlSearchType === "prefix" ? 1 : 0;
|
const prefix = url && this.urlSearchType === "prefix" ? 1 : 0;
|
||||||
|
|
||||||
// optimization: if not starting with http, likely won't have a match here, so just add https://
|
|
||||||
if (url && !url.startsWith("http")) {
|
|
||||||
url = "https://" + url;
|
|
||||||
}
|
|
||||||
|
|
||||||
const mime = this.currMime;
|
const mime = this.currMime;
|
||||||
|
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"outDir": "./dist/",
|
"outDir": "./dist/",
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "Bundler",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
|||||||
+88
-1
@@ -188,4 +188,91 @@ const browserConfig = (/*env, argv*/) => {
|
|||||||
return merge(tsConfig, config);
|
return merge(tsConfig, config);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [browserConfig, electronMainConfig, electronPreloadConfig];
|
const miscConfig = (/*env, argv*/) => {
|
||||||
|
const isDevServer = process.env.WEBPACK_SERVE;
|
||||||
|
|
||||||
|
/** @type {import('webpack').Configuration['entry']} */
|
||||||
|
const entry = {
|
||||||
|
misc: "./src/misc.ts",
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @type {import('webpack').Configuration} */
|
||||||
|
const config = {
|
||||||
|
target: "web",
|
||||||
|
mode: "production",
|
||||||
|
cache: {
|
||||||
|
type: isDevServer ? "memory" : "filesystem",
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
fallback: { crypto: false },
|
||||||
|
},
|
||||||
|
entry,
|
||||||
|
optimization,
|
||||||
|
|
||||||
|
output: {
|
||||||
|
path: path.join(__dirname, "dist"),
|
||||||
|
filename: "[name].js",
|
||||||
|
libraryTarget: "self",
|
||||||
|
globalObject: "self",
|
||||||
|
publicPath: "/",
|
||||||
|
},
|
||||||
|
|
||||||
|
devServer: {
|
||||||
|
compress: true,
|
||||||
|
port: 9990,
|
||||||
|
open: false,
|
||||||
|
static: __dirname,
|
||||||
|
//publicPath: "/"
|
||||||
|
},
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
new webpack.NormalModuleReplacementPlugin(/^node:*/, (resource) => {
|
||||||
|
switch (resource.request) {
|
||||||
|
case "node:stream":
|
||||||
|
resource.request = "stream-browserify";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
new webpack.optimize.LimitChunkCountPlugin({
|
||||||
|
maxChunks: 1,
|
||||||
|
}),
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
process: "process/browser",
|
||||||
|
}),
|
||||||
|
new MiniCssExtractPlugin(),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
__SW_NAME__: JSON.stringify("sw.js"),
|
||||||
|
__HELPER_PROXY__: JSON.stringify(HELPER_PROXY),
|
||||||
|
__GDRIVE_CLIENT_ID__: JSON.stringify(GDRIVE_CLIENT_ID),
|
||||||
|
__VERSION__: JSON.stringify(package_json.version),
|
||||||
|
}),
|
||||||
|
new webpack.BannerPlugin(BANNER_TEXT),
|
||||||
|
],
|
||||||
|
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.svg$/,
|
||||||
|
use: ["raw-loader"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /main.scss$/,
|
||||||
|
use: ["css-loader", "sass-loader"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /wombat.js|wombatWorkers.js|index.html$/i,
|
||||||
|
use: ["raw-loader"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return merge(tsConfig, config);
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
browserConfig,
|
||||||
|
miscConfig,
|
||||||
|
electronMainConfig,
|
||||||
|
electronPreloadConfig,
|
||||||
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user