Skip to content

Commit e2d68a7

Browse files
committed
Changes from mar-2025 to apr-2025
1 parent afbd31a commit e2d68a7

File tree

890 files changed

+50285
-37569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

890 files changed

+50285
-37569
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CARGO_WORKSPACE_DIR = { value = "", relative = true }
88
rustflags = [
99
"-Ctarget-feature=+atomics,+bulk-memory",
1010
"-Clink-args=-pthread -sPTHREAD_POOL_SIZE=8",
11-
"-Clink-args=--post-js apps/browser/wasm/js/post.js -o apps/browser/wasm/dist/gramax-wasm.js",
11+
"-Clink-args=--post-js apps/browser/crates/gramax-wasm/js/post.js -o apps/browser/crates/gramax-wasm/dist/gramax-wasm.js",
1212
"-Clink-args=-sWASM=1 -sWASMFS=1 -sUSE_ZLIB=1 -sEXPORT_ES6=1 -sMALLOC=emmalloc -sEXPORTED_RUNTIME_METHODS=FS,wasmMemory -sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=4gb -sINITIAL_MEMORY=1024mb -sSTACK_SIZE=15mb",
1313
"-Clink-args=-sASYNCIFY=1 -sASYNCIFY_IMPORTS=@.cargo/asyncify-imports",
1414
"-Clink-args=-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=$writeArrayToMemory",

.cargo/exported-functions

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ _delete_branch
1414
_diff
1515
_fetch
1616
_file_history
17+
_format_merge_message
1718
_get_content
1819
_get_parent
1920
_get_remote
@@ -58,4 +59,6 @@ _list_merge_requests
5859
_create_or_update_merge_request
5960
_get_draft_merge_request
6061
_get_all_commit_authors
62+
_gc
6163
_reset_repo
64+
_set_last_http_error

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ node_modules/
1010
**/out/
1111
target/
1212

13-
!apps/browser/wasm/dist
13+
!apps/browser/crates/gramax-wasm/dist

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
"**/dist/**/*",
3434
"apps/tauri/target",
3535
"apps/tauri/src-tauri",
36-
"apps/next/crates/next-gramax-git"
36+
"apps/next/crates/next-gramax-git",
37+
38+
"services/target/admin/client"
3739
],
3840
"plugins": ["@typescript-eslint", "react", "react-hooks", "promise"],
3941
"settings": {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Bug Report
2+
description: Report a bug
3+
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Please give the issue a good title - be less abstract and more specific.
9+
Use code blocks for markdown, stacktraces or code snippets.
10+
If there is a related issue, please reference it in the description.
11+
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Describe the bug
16+
description: A clear description of what the bug is. Screenshots or videos can be included to describe the issue more precisely
17+
placeholder: Bug description
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: logs
23+
attributes:
24+
label: Stacktrace / Markdown (Optional)
25+
description: Include an error stacktrace from the devtools console or markdown code block that reproduces the issue
26+
27+
- type: textarea
28+
id: expected-behavior
29+
attributes:
30+
label: Expected behavior (Optional)
31+
description: Describe what you expected to happen

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ junit*.xml
6464
.idea/
6565

6666

67-
!apps/browser/wasm/dist
67+
!apps/browser/crates/gramax-wasm/dist
6868
apps/next/gramaxVersion.txt

.vscode/settings.json

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
11
{
2-
// "rust-analyzer.cargo.target": "x86_64-pc-windows-msvc",
3-
// "rust-analyzer.cargo.target": "x86_64-apple-darwin",
4-
"rust-analyzer.cargo.target": "aarch64-apple-darwin",
2+
// wasm
3+
54
// "rust-analyzer.cargo.target": "wasm32-unknown-emscripten",
6-
// "rust-analyzer.cargo.target": "aarch64-linux-android",
7-
// "rust-analyzer.cargo.target": "aarch64-apple-ios",
5+
// "rust-analyzer.check.targets": ["wasm32-unknown-emscripten"],
6+
// "rust-analyzer.check.allTargets": true,
7+
// "rust-analyzer.cargo.extraEnv": {
8+
// "BUGSNAG_API_KEY": ""
9+
// },
10+
11+
// macos
812

13+
"rust-analyzer.cargo.target": "aarch64-apple-darwin",
914
"rust-analyzer.check.allTargets": true,
1015
"rust-analyzer.check.targets": ["aarch64-apple-darwin"],
11-
// "rust-analyzer.check.targets": ["wasm32-unknown-emscripten"],
12-
// "rust-analyzer.check.features": [],
13-
// "rust-analyzer.cargo.features": [],
1416
"rust-analyzer.cargo.extraEnv": {
1517
"BUGSNAG_API_KEY": ""
1618
},
1719

20+
// windows
21+
22+
// "rust-analyzer.cargo.target": "x86_64-pc-windows-msvc",
23+
// "rust-analyzer.check.allTargets": false,
24+
// "rust-analyzer.cargo.target": "x86_64-pc-windows-msvc",
25+
// "rust-analyzer.check.targets": ["x86_64-pc-windows-msvc"],
26+
// "rust-analyzer.cargo.extraEnv": {
27+
// "BUGSNAG_API_KEY": "",
28+
// "TARGET_CC": "clang"
29+
// },
30+
31+
// "rust-analyzer.server.extraEnv": {
32+
// "CFLAGS": "-I$HOME/.xwin/splat/crt/include/ -I$HOME/.xwin/splat/sdk/include/um -I$HOME/.xwin/splat/sdk/include/ucrt -I$HOME/.xwin/splat/sdk/include/shared -I$HOME/.xwin/splat/sdk/include/winrt",
33+
// "CARGO": "$HOME/.cargo/bin/cargo-xwin"
34+
// },
35+
1836
"editor.tabCompletion": "on",
1937

2038
"search.exclude": {

Cargo.toml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
[workspace]
22
resolver = "2"
3-
default-members = [
4-
"crates/git",
5-
"crates/fs",
6-
"crates/bugsnag",
7-
"crates/test-utils",
8-
]
3+
default-members = ["crates/git", "crates/fs", "crates/test-utils"]
94
members = [
105
"apps/tauri/plugins/plugin-gramax-fs",
116
"apps/tauri/plugins/plugin-gramax-git",
127
"apps/tauri/src-tauri",
8+
"crates/bugsnag",
139

14-
"apps/browser/wasm",
10+
"apps/browser/crates/em-bindgen-macro",
11+
"apps/browser/crates/gramax-wasm",
1512

1613
"apps/next/crates/next-gramax-git",
17-
18-
"rbins/warp-spa",
1914
"apps/next/crates/napi-async-macro",
15+
16+
"crates/warp-spa",
2017
]
2118

2219
[workspace.package]
@@ -26,15 +23,9 @@ description = "Gramax"
2623
edition = "2021"
2724

2825
[workspace.dependencies]
29-
tauri = { git = "https://github.com/tauri-apps/tauri", rev = "2d029a9f53117f756f9d6783fab74b06a7ab3e8e", features = [
30-
"macos-private-api",
31-
"devtools",
32-
] }
26+
tauri = { version = "^2.0.0", features = ["macos-private-api", "devtools"] }
3327
tauri-plugin = { version = "^2.0.0", features = ["build"] }
34-
tauri-build = { git = "https://github.com/tauri-apps/tauri", rev = "2d029a9f53117f756f9d6783fab74b06a7ab3e8e", features = [
35-
"tauri-codegen",
36-
"codegen",
37-
] }
28+
tauri-build = { version = "^2.0.0", features = ["tauri-codegen", "codegen"] }
3829

3930
tauri-plugin-deep-link = "^2.0.0"
4031
tauri-plugin-dialog = "^2.0.0"
@@ -65,7 +56,3 @@ codegen-units = 256
6556
opt-level = 1
6657
debug = "full"
6758
debug-assertions = false
68-
69-
[patch.crates-io]
70-
tauri = { git = "https://github.com/tauri-apps/tauri", rev = "2d029a9f53117f756f9d6783fab74b06a7ab3e8e" }
71-
tao = { git = "https://github.com/tauri-apps/tao", rev = "c97080cd0d65e0b3b32ba22007047f1f25533f12" }

app/browser/app.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import resolveModule from "@app/resolveModule/backend";
1+
import resolveModule, { initModules } from "@app/resolveModule/backend";
2+
import { initModules as initModulesFrontend } from "@app/resolveModule/frontend";
23
import { ContextFactory } from "@core/Context/ContextFactory";
34
import DiskFileProvider from "@core/FileProvider/DiskFileProvider/DiskFileProvider";
45
import MountFileProvider from "@core/FileProvider/MountFileProvider/MountFileProvider";
@@ -14,7 +15,6 @@ import VideoUrlRepository from "@core/components/video/videoUrlRepository";
1415
import YamlFileConfig from "@core/utils/YamlFileConfig";
1516
import Cache from "@ext/Cache";
1617
import { Encoder } from "@ext/Encoder/Encoder";
17-
import MailProvider from "@ext/MailProvider";
1818
import ThemeManager from "@ext/Theme/ThemeManager";
1919
import EnterpriseManager from "@ext/enterprise/EnterpriseManager";
2020
import RepositoryProvider from "@ext/git/core/Repository/RepositoryProvider";
@@ -31,18 +31,22 @@ import ClientAuthManager from "@ext/security/logic/ClientAuthManager";
3131
import { TicketManager } from "@ext/security/logic/TicketManager/TicketManager";
3232
import FuseSearcher from "@ext/serach/Fuse/FuseSearcher";
3333
import { IndexDataProvider } from "@ext/serach/IndexDataProvider";
34-
import Searcher from "@ext/serach/Searcher";
34+
import SearcherManager from "@ext/serach/SearcherManager";
3535
import { SourceDataProvider } from "@ext/storage/logic/SourceDataProvider/logic/SourceDataProvider";
3636
import WorkspaceManager from "@ext/workspace/WorkspaceManager";
3737
import setWorkerProxy from "../../apps/browser/src/logic/setWorkerProxy";
3838
import { AppConfig, getConfig, type AppGlobalConfig } from "../config/AppConfig";
3939
import Application from "../types/Application";
4040

4141
const _init = async (config: AppConfig): Promise<Application> => {
42-
const mp: MailProvider = null;
42+
await initModulesFrontend();
43+
await initModules();
44+
4345
const vur: VideoUrlRepository = null;
4446

45-
await resolveModule("initWasm")?.(config.services.gitProxy.url);
47+
const initWasm = resolveModule("initWasm");
48+
49+
await initWasm?.(config.services.gitProxy.url);
4650
await XxHash.init();
4751

4852
const fileConfig = await YamlFileConfig.readFromFile<AppGlobalConfig>(
@@ -69,7 +73,8 @@ const _init = async (config: AppConfig): Promise<Application> => {
6973
rp.addSourceDataProvider(sdp);
7074

7175
await wm.readWorkspaces();
72-
const services = wm.maybeCurrent()?.config()?.services ?? config.services;
76+
const workspaceConfig = await wm.maybeCurrent()?.config();
77+
const services = workspaceConfig?.services ?? config.services;
7378
setWorkerProxy(services.gitProxy.url);
7479

7580
const hashes = new HashItemProvider();
@@ -92,25 +97,25 @@ const _init = async (config: AppConfig): Promise<Application> => {
9297

9398
const cache = new Cache(new DiskFileProvider(config.paths.data));
9499
const indexDataProvider = new IndexDataProvider(wm, cache, parser, parserContextFactory);
95-
const searcher: Searcher = new FuseSearcher(indexDataProvider);
100+
const searcherManager = new SearcherManager(new FuseSearcher(indexDataProvider), { vector: null });
96101

97102
return {
98103
am,
99104
tm,
100-
mp,
101105
wm,
102106
em,
103107
rp,
104108
vur,
105109
logger,
106110
parser,
107111
hashes,
108-
searcher,
112+
searcherManager,
109113
formatter,
110114
htmlParser,
111115
tablesManager,
112116
ticketManager,
113117
contextFactory,
118+
indexDataProvider,
114119
sitePresenterFactory,
115120
parserContextFactory,
116121
resourceUpdaterFactory,
@@ -130,6 +135,8 @@ const _init = async (config: AppConfig): Promise<Application> => {
130135
version: config.version,
131136
buildVersion: config.buildVersion,
132137
bugsnagApiKey: config.bugsnagApiKey,
138+
139+
search: { vector: { enabled: false } },
133140
},
134141
};
135142
};

app/commands/article/features/getCustomArticle.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ResponseKind } from "@app/types/ResponseKind";
22
import CustomArticle from "@core/SitePresenter/customArticles/model/CustomArticle";
3-
import { Command } from "../../../types/Command";
3+
import { Command } from "@app/types/Command";
44

55
const getCustomArticle: Command<{ name: CustomArticle; props: any }, { title: string; content: string }> =
66
Command.create({
@@ -20,7 +20,9 @@ const getCustomArticle: Command<{ name: CustomArticle; props: any }, { title: st
2020

2121
return {
2222
title: article?.getTitle() ?? "None article",
23-
content: await article.parsedContent.read((content) => (content ? JSON.stringify(content.renderTree) : "")),
23+
content: await article.parsedContent.read((content) =>
24+
content ? JSON.stringify(content.renderTree) : "",
25+
),
2426
};
2527
},
2628

0 commit comments

Comments
 (0)