Bump frontend libraries

This commit is contained in:
koalasat
2025-07-18 14:12:58 +02:00
parent da583cb78e
commit f8640bfb40
4 changed files with 145 additions and 91 deletions

View File

@ -74,6 +74,7 @@
"@typescript-eslint/eslint-plugin": "^8.33.0",
"@typescript-eslint/parser": "^8.36.0",
"babel-loader": "^10.0.0",
"copy-webpack-plugin": "^13.0.0",
"css-loader": "^7.1.2",
"eslint": "^9.30.1",
"eslint-config-love": "^120.0.0",
@ -6900,6 +6901,87 @@
"node": ">=18"
}
},
"node_modules/copy-webpack-plugin": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-13.0.0.tgz",
"integrity": "sha512-FgR/h5a6hzJqATDGd9YG41SeDViH+0bkHn6WNXCi5zKAZkeESeSxLySSsFLHqLEVCh0E+rITmCf0dusXWYukeQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"glob-parent": "^6.0.1",
"normalize-path": "^3.0.0",
"schema-utils": "^4.2.0",
"serialize-javascript": "^6.0.2",
"tinyglobby": "^0.2.12"
},
"engines": {
"node": ">= 18.12.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"webpack": "^5.1.0"
}
},
"node_modules/copy-webpack-plugin/node_modules/ajv": {
"version": "8.17.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/copy-webpack-plugin/node_modules/ajv-keywords": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
"integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3"
},
"peerDependencies": {
"ajv": "^8.8.2"
}
},
"node_modules/copy-webpack-plugin/node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true,
"license": "MIT"
},
"node_modules/copy-webpack-plugin/node_modules/schema-utils": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/json-schema": "^7.0.9",
"ajv": "^8.9.0",
"ajv-formats": "^2.1.1",
"ajv-keywords": "^5.1.0"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
}
},
"node_modules/core-js-compat": {
"version": "3.42.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.42.0.tgz",

View File

@ -33,6 +33,7 @@
"@typescript-eslint/eslint-plugin": "^8.33.0",
"@typescript-eslint/parser": "^8.36.0",
"babel-loader": "^10.0.0",
"copy-webpack-plugin": "^13.0.0",
"css-loader": "^7.1.2",
"eslint": "^9.30.1",
"eslint-config-love": "^120.0.0",

View File

@ -13,7 +13,10 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
"jsx": "react-jsx",
"types": ["node", "react", "react-dom", "jest", "@babel/core", "webpack", "url"],
"typeRoots": ["./node_modules/@types"],
"allowImportingTsExtensions": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]

View File

@ -1,9 +1,14 @@
import path from 'path';
import { fileURLToPath } from 'url';
import { Configuration } from 'webpack';
import FileManagerPlugin from 'filemanager-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import { version } from './package.json';
// Setup __dirname equivalent for TypeScript
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const config: Configuration = {
entry: './src/index.js',
module: {
@ -81,17 +86,13 @@ const configNode: Configuration = {
robosatsSettings: 'selfhosted-pro',
basePath: '/',
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, 'static'),
destination: path.resolve(__dirname, '../nodeapp/static'),
},
],
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static'),
to: path.resolve(__dirname, '../nodeapp/static'),
},
},
],
}),
// Desktop App
new HtmlWebpackPlugin({
@ -104,17 +105,13 @@ const configNode: Configuration = {
robosatsSettings: 'desktop-basic',
basePath: '/',
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, 'static'),
destination: path.resolve(__dirname, '../desktopApp/static'),
},
],
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static'),
to: path.resolve(__dirname, '../desktopApp/static'),
},
},
],
}),
// Web App
new HtmlWebpackPlugin({
@ -137,17 +134,13 @@ const configNode: Configuration = {
robosatsSettings: 'web-pro',
basePath: '/',
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, 'static'),
destination: path.resolve(__dirname, '../web/static'),
},
],
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static'),
to: path.resolve(__dirname, '../web/static'),
},
},
],
}),
],
};
@ -216,25 +209,21 @@ const configNative: Configuration = {
robosatsSettings: 'mobile-basic',
basePath: './',
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, 'static/css'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/static/css'),
},
{
source: path.resolve(__dirname, 'static/assets/sounds'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/sounds'),
},
{
source: path.resolve(__dirname, 'static/federation'),
destination: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/federation'),
},
],
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static/css'),
to: path.resolve(__dirname, '../mobile/html/Web.bundle/static/css'),
},
},
{
from: path.resolve(__dirname, 'static/assets/sounds'),
to: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/sounds'),
},
{
from: path.resolve(__dirname, 'static/federation'),
to: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/federation'),
},
],
}),
],
};
@ -303,49 +292,28 @@ const configAndroid: Configuration = {
robosatsSettings: 'mobile-basic',
basePath: 'file:///android_asset/Web.bundle/',
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, 'static/css'),
destination: path.resolve(
__dirname,
'../mobile_new/app/src/main/assets/Web.bundle/static/css',
),
},
{
source: path.resolve(__dirname, 'static/assets/sounds'),
destination: path.resolve(
__dirname,
'../mobile_new/app/src/main/assets/Web.bundle/assets/sounds',
),
},
{
source: path.resolve(__dirname, 'static/federation'),
destination: path.resolve(
__dirname,
'../mobile_new/app/src/main/assets/Web.bundle/assets/federation',
),
},
],
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'static/css'),
to: path.resolve(__dirname, '../mobile_new/app/src/main/assets/Web.bundle/static/css'),
},
},
}),
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{
source: path.resolve(__dirname, '../mobile/html/Web.bundle/static/frontend'),
destination: path.resolve(
__dirname,
'../mobile_new/app/src/main/assets/static/frontend',
),
},
],
{
from: path.resolve(__dirname, 'static/assets/sounds'),
to: path.resolve(__dirname, '../mobile_new/app/src/main/assets/Web.bundle/assets/sounds'),
},
},
{
from: path.resolve(__dirname, 'static/federation'),
to: path.resolve(
__dirname,
'../mobile_new/app/src/main/assets/Web.bundle/assets/federation',
),
},
{
from: path.resolve(__dirname, '../mobile/html/Web.bundle/static/frontend'),
to: path.resolve(__dirname, '../mobile_new/app/src/main/assets/static/frontend'),
},
],
}),
],
};