chore: upgrade deps

This commit is contained in:
linonetwo 2024-03-20 19:45:42 +08:00
parent c79143fd32
commit 3837b16d38
11 changed files with 2342 additions and 1857 deletions

View file

@ -34,118 +34,111 @@
"@llama-node/core": "^0.1.6",
"@llama-node/llama-cpp": "^0.1.6",
"@llama-node/rwkv-cpp": "^0.1.6",
"@tiddlygit/tiddlywiki": "5.3.4-prerelease-2024-02-04",
"@tiddlygit/tiddlywiki": "5.3.4-prerelease-2024-03-20",
"ansi-to-html": "^0.7.2",
"app-path": "^4.0.0",
"best-effort-json-parser": "1.0.1",
"better-sqlite3": "^9.2.2",
"bluebird": "3.7.2",
"default-gateway": "6.0.3",
"dugite": "2.5.2",
"electron-dl": "^3.5.1",
"dugite": "2.6.1",
"electron-dl": "^3.5.2",
"electron-ipc-cat": "2.0.1",
"electron-settings": "5.0.0",
"electron-squirrel-startup": "1.0.0",
"electron-unhandled": "4.0.1",
"electron-util": "0.17.2",
"electron-window-state": "5.0.3",
"espree": "^9.6.1",
"espree": "^10.0.1",
"exponential-backoff": "^3.1.1",
"fs-extra": "11.2.0",
"git-sync-js": "^2.0.5",
"i18next": "23.7.12",
"i18next": "23.10.1",
"i18next-electron-fs-backend": "3.0.1",
"i18next-fs-backend": "2.3.1",
"intercept-stdout": "0.1.2",
"inversify": "6.0.2",
"inversify-inject-decorators": "3.1.0",
"ipaddr.js": "2.1.0",
"jimp": "0.22.10",
"jimp": "0.22.12",
"llama-node": "^0.1.6",
"lodash": "4.17.21",
"menubar": "9.4.0",
"nanoid": "^5.0.4",
"nanoid": "^5.0.6",
"node-fetch": "3.3.2",
"reflect-metadata": "0.2.1",
"rotating-file-stream": "^3.2.1",
"rxjs": "7.8.1",
"semver": "7.5.4",
"semver": "7.6.0",
"source-map-support": "0.5.21",
"sqlite-vss": "0.1.2",
"strip-ansi": "^7.1.0",
"threads": "1.7.0",
"type-fest": "4.9.0",
"typeorm": "^0.3.17",
"type-fest": "4.13.1",
"typescript-styled-is": "^2.1.0",
"v8-compile-cache-lib": "^3.0.1",
"winston": "3.11.0",
"winston-daily-rotate-file": "4.7.1",
"winston-transport": "4.6.0",
"wouter": "^2.12.1",
"winston": "3.12.0",
"winston-daily-rotate-file": "5.0.0",
"winston-transport": "4.7.0",
"wouter": "^3.1.0",
"zx": "7.2.3"
},
"optionalDependencies": {
"@electron-forge/maker-deb": "7.2.0",
"@electron-forge/maker-flatpak": "7.2.0",
"@electron-forge/maker-rpm": "7.2.0",
"@electron-forge/maker-snap": "7.2.0",
"@electron-forge/maker-squirrel": "7.2.0",
"@electron-forge/maker-wix": "7.2.0",
"@electron-forge/maker-zip": "7.2.0",
"registry-js": "1.15.1",
"sqlite-vss-darwin-arm64": "0.1.2",
"sqlite-vss-darwin-x64": "0.1.2",
"sqlite-vss-linux-x64": "0.1.2"
"@electron-forge/maker-deb": "7.3.0",
"@electron-forge/maker-flatpak": "7.3.0",
"@electron-forge/maker-rpm": "7.3.0",
"@electron-forge/maker-snap": "7.3.0",
"@electron-forge/maker-squirrel": "7.3.0",
"@electron-forge/maker-wix": "7.3.0",
"@electron-forge/maker-zip": "7.3.0",
"registry-js": "1.16.0"
},
"devDependencies": {
"@cucumber/cucumber": "10.1.0",
"@cucumber/cucumber": "10.3.1",
"@dnd-kit/core": "4.0.0",
"@dnd-kit/modifiers": "4.0.0",
"@dnd-kit/sortable": "5.0.0",
"@dnd-kit/utilities": "3.0.0",
"@electron-forge/cli": "7.2.0",
"@electron-forge/plugin-auto-unpack-natives": "7.2.0",
"@electron-forge/plugin-webpack": "7.2.0",
"@electron/rebuild": "^3.4.1",
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.15.2",
"@mui/lab": "5.0.0-alpha.158",
"@mui/material": "^5.15.2",
"@mui/styled-engine-sc": "^5.14.12",
"@mui/styles": "^5.15.2",
"@mui/x-date-pickers": "^6.18.6",
"@reforged/maker-appimage": "^3.3.2",
"@types/better-sqlite3": "^7.6.8",
"@electron-forge/cli": "7.3.0",
"@electron-forge/plugin-auto-unpack-natives": "7.3.0",
"@electron-forge/plugin-webpack": "7.3.0",
"@electron/rebuild": "^3.6.0",
"@fontsource/roboto": "^5.0.12",
"@mui/icons-material": "^5.15.14",
"@mui/lab": "5.0.0-alpha.169",
"@mui/material": "^5.15.14",
"@mui/styled-engine-sc": "6.0.0-alpha.18",
"@mui/styles": "^5.15.14",
"@mui/x-date-pickers": "^6.19.7",
"@reforged/maker-appimage": "^4.0.2",
"@types/bluebird": "3.5.42",
"@types/chai": "4.3.11",
"@types/chai": "4.3.13",
"@types/circular-dependency-plugin": "5.0.8",
"@types/fs-extra": "11.0.4",
"@types/i18next-fs-backend": "1.1.5",
"@types/intercept-stdout": "0.1.3",
"@types/lodash": "4.14.202",
"@types/node": "20.10.5",
"@types/react": "18.2.46",
"@types/react-dom": "18.2.18",
"@types/lodash": "4.17.0",
"@types/node": "20.11.30",
"@types/react": "18.2.67",
"@types/react-dom": "18.2.22",
"@types/react-helmet": "6.1.11",
"@types/semver": "7.5.6",
"@types/semver": "7.5.8",
"@types/source-map-support": "0.5.10",
"@types/styled-components": "5.1.34",
"@types/webpack-bundle-analyzer": "4.6.3",
"@types/webpack-bundle-analyzer": "4.7.0",
"@types/webpack-node-externals": "3.0.4",
"@vercel/webpack-asset-relocator-loader": "1.7.3",
"beautiful-react-hooks": "5.0.1",
"chai": "5.0.0",
"chai": "5.1.0",
"circular-dependency-plugin": "5.2.2",
"copy-webpack-plugin": "11.0.0",
"copy-webpack-plugin": "12.0.2",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"date-fns": "2.30.0",
"css-loader": "6.10.0",
"date-fns": "3.6.0",
"dprint": "^0.45.0",
"electron": "28.1.0",
"electron-wix-msi": "^5.0.0",
"esbuild": "^0.19.10",
"esbuild-loader": "^4.0.2",
"eslint-config-tidgi": "1.1.5",
"electron": "29.1.4",
"electron-wix-msi": "^5.1.3",
"esbuild": "^0.19.12",
"esbuild-loader": "^4.1.0",
"eslint-config-tidgi": "1.2.2",
"fork-ts-checker-webpack-plugin": "9.0.2",
"glob": "^10.3.10",
"graphql-hooks": "6.3.2",
@ -154,24 +147,24 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-helmet": "6.1.0",
"react-i18next": "14.0.0",
"react-i18next": "14.1.0",
"rimraf": "^5.0.5",
"simplebar": "6.2.5",
"simplebar-react": "3.2.4",
"style-loader": "3.3.3",
"styled-components": "6.1.6",
"style-loader": "3.3.4",
"styled-components": "6.1.8",
"threads-plugin": "1.4.0",
"ts-import-plugin": "3.0.0",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"tw5-typed": "^0.4.3",
"typescript": "5.3.3",
"tw5-typed": "^0.4.9",
"typescript": "5.4.2",
"typescript-plugin-styled-components": "3.0.0",
"typesync": "0.12.0",
"typesync": "0.12.1",
"webpack-bundle-analyzer": "4.10.1",
"webpack-node-externals": "3.0.0",
"webpack5-externals-plugin": "1.0.4",
"webpackbar": "6.0.0"
"webpackbar": "6.0.1"
},
"pnpm": {
"overrides": {

4030
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
export const levels = {
emerg: 0,
alert: 1,
crit: 2,
error: 3,
warning: 4,
warn: 5,
notice: 6,
info: 7,
debug: 8,
};

View file

@ -1,14 +0,0 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-confusing-void-expression */
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
import { BaseLocationHook, navigate, useLocationProperty } from 'wouter/use-location';
const hashLocation = () => window.location.hash.replace(/^#/, '') || '/';
const hashNavigate = (path: string, ...arguments_: any[]) => navigate('#' + path, ...arguments_);
export const useHashLocation: BaseLocationHook = () => {
const location = useLocationProperty(hashLocation);
return [location, hashNavigate];
};

View file

@ -9,7 +9,7 @@ import { Router } from 'wouter';
import CssBaseline from '@mui/material/CssBaseline';
import StyledEngineProvider from '@mui/material/StyledEngineProvider';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
@ -21,8 +21,8 @@ import { darkTheme, lightTheme } from '@services/theme/defaultTheme';
import { useThemeObservable } from '@services/theme/hooks';
import { initI18N } from './i18n';
import 'electron-ipc-cat/fixContextIsolation';
import { useHashLocation } from 'wouter/use-hash-location';
import { RootStyle } from './components/RootStyle';
import { useHashLocation } from './helpers/router';
import { Pages } from './pages';
function App(): JSX.Element {

View file

@ -2,19 +2,14 @@ import { LOG_FOLDER } from '@/constants/appPaths';
import winston, { format } from 'winston';
import RendererTransport from './rendererTransport';
import 'winston-daily-rotate-file';
import { levels } from '@/constants/logger';
export * from './wikiOutput';
export type ILogLevels = keyof typeof levels;
const logger = (
process.env.NODE_ENV === 'test'
? Object.assign(console, {
emerg: console.error.bind(console),
alert: console.error.bind(console),
crit: console.error.bind(console),
warning: console.warn.bind(console),
notice: console.log.bind(console),
debug: console.log.bind(console),
close: () => {},
})

View file

@ -1,7 +1,6 @@
import { LOG_FOLDER } from '@/constants/appPaths';
import winston, { format } from 'winston';
import 'winston-daily-rotate-file';
import { levels } from '@/constants/logger';
function getWikiLogFileName(workspaceID: string, wikiName: string): string {
const logFileName = wikiName.replaceAll(/["*/:<>?\\|]/g, '_');
@ -33,7 +32,6 @@ export function startWikiLogger(workspaceID: string, wikiName: string) {
close: () => {},
})
: winston.createLogger({
levels,
transports: [
new winston.transports.Console(),
new winston.transports.DailyRotateFile({

View file

@ -10,7 +10,7 @@ import { NativeChannel } from '@/constants/channels';
import { ZX_FOLDER } from '@/constants/paths';
import { githubDesktopUrl } from '@/constants/urls';
import { lazyInject } from '@services/container';
import { ILogLevels, logger } from '@services/libs/log';
import { logger } from '@services/libs/log';
import { getLocalHostUrlWithActualIP, getUrlWithCorrectProtocol, replaceUrlPortWithSettingPort } from '@services/libs/url';
import serviceIdentifier from '@services/serviceIdentifier';
import { IWikiService, ZxWorkerControlActions } from '@services/wiki/interface';
@ -217,7 +217,7 @@ ${message.message}
app.quit();
}
public async log(level: ILogLevels, message: string, meta?: Record<string, unknown>): Promise<void> {
public async log(level: string, message: string, meta?: Record<string, unknown>): Promise<void> {
logger.log(level, message, meta);
}

View file

@ -332,7 +332,7 @@ export class Wiki implements IWikiService {
public async stopWiki(id: string): Promise<void> {
const worker = this.getWorker(id);
if (worker === undefined) {
logger.warning(`No wiki for ${id}. No running worker, means maybe tiddlywiki server in this workspace failed to start`, {
logger.warn(`No wiki for ${id}. No running worker, means maybe tiddlywiki server in this workspace failed to start`, {
function: 'stopWiki',
stack: new Error('stack').stack?.replace('Error:', '') ?? 'no stack',
});
@ -371,7 +371,7 @@ export class Wiki implements IWikiService {
* @param message will show in the UI
*/
private readonly logProgress = (message: string): void => {
logger.notice(message, { handler: WikiChannel.createProgress });
logger.info(message, { handler: WikiChannel.createProgress });
};
private readonly folderToContainSymlinks = 'subwiki';

View file

@ -106,7 +106,7 @@ export class WikiGitWorkspace implements IWikiGitWorkspaceService {
} catch (error) {
// prepare to rollback changes
const errorMessage = `initWikiGitTransaction failed, ${(error as Error).message} ${(error as Error).stack ?? ''}`;
logger.crit(errorMessage);
logger.error(errorMessage);
await this.workspaceService.remove(workspaceID);
try {
if (!isSubWiki) {

@ -1 +1 @@
Subproject commit f0bb9c891ce2ff99d82c454884e7b760a51550f6
Subproject commit a1c4a308b87f090f155a439167000832faedc5cd