mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-05 23:01:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc79c84f65 |
No files matched your search
Generated
+1266
-260
File diff suppressed because it is too large.
Load diff
+4
-3
@@ -22,9 +22,10 @@
|
||||
"license": "ISC",
|
||||
"type": "commonjs",
|
||||
"devDependencies": {
|
||||
"@rspress/core": "^2.0.0-rc.5",
|
||||
"@rspress/plugin-client-redirects": "^2.0.0-rc.5",
|
||||
"@rspress/plugin-sitemap": "^2.0.0-rc.5",
|
||||
"@rspress/core": "^2.0.0-rc.1",
|
||||
"@rspress/plugin-client-redirects": "^2.0.0-alpha.12",
|
||||
"@rspress/plugin-preview": "^2.0.0-beta.35",
|
||||
"@rspress/plugin-sitemap": "^2.0.0-beta.23",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
+17
-18
@@ -1,4 +1,5 @@
|
||||
import { defineConfig } from '@rspress/core';
|
||||
import { pluginPreview } from '@rspress/plugin-preview';
|
||||
import { pluginSitemap } from '@rspress/plugin-sitemap';
|
||||
import { pluginClientRedirects } from '@rspress/plugin-client-redirects';
|
||||
|
||||
@@ -40,22 +41,20 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
pluginSitemap({
|
||||
siteUrl: 'https://continuwuity.org', // TODO: Set automatically in build pipeline
|
||||
}),
|
||||
pluginClientRedirects({
|
||||
redirects: [{
|
||||
from: '/configuration/examples',
|
||||
to: '/reference/config'
|
||||
}, {
|
||||
from: '/admin_reference',
|
||||
to: '/reference/admin'
|
||||
}, {
|
||||
from: '/server_reference',
|
||||
to: '/reference/server'
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
plugins: [pluginPreview(), pluginSitemap({
|
||||
siteUrl: 'https://continuwuity.org', // TODO: Set automatically in build pipeline
|
||||
}),
|
||||
pluginClientRedirects({
|
||||
redirects: [{
|
||||
from: '/configuration/examples',
|
||||
to: '/reference/config'
|
||||
}, {
|
||||
from: '/admin_reference',
|
||||
to: '/reference/admin'
|
||||
}, {
|
||||
from: '/server_reference',
|
||||
to: '/reference/server'
|
||||
}
|
||||
]
|
||||
})],
|
||||
});
|
||||
@@ -36,7 +36,7 @@ pub use self::{
|
||||
room_version::RoomVersion,
|
||||
};
|
||||
use crate::{
|
||||
debug, debug_error, err,
|
||||
debug, err, error as log_error,
|
||||
matrix::{Event, StateKey},
|
||||
state_res::room_version::StateResolutionVersion,
|
||||
trace,
|
||||
@@ -173,7 +173,8 @@ where
|
||||
initial_state,
|
||||
&event_fetch,
|
||||
)
|
||||
.await?;
|
||||
.await
|
||||
.inspect_err(|_| log_error!("failed to calculate control events"))?;
|
||||
|
||||
debug!(count = resolved_control.len(), "resolved power events");
|
||||
trace!(map = ?resolved_control, "resolved power events");
|
||||
@@ -213,7 +214,8 @@ where
|
||||
resolved_control, // The control events are added to the final resolved state
|
||||
&event_fetch,
|
||||
)
|
||||
.await?;
|
||||
.await
|
||||
.inspect_err(|_| log_error!("failed to resolve left over state"))?;
|
||||
|
||||
// Ensure unconflicting state is in the final state
|
||||
resolved_state.extend(unconflicted);
|
||||
@@ -400,13 +402,17 @@ where
|
||||
.await;
|
||||
|
||||
let fetcher = async |event_id: OwnedEventId| {
|
||||
let pl = *event_to_pl
|
||||
.get(&event_id)
|
||||
.ok_or_else(|| Error::NotFound(String::new()))?;
|
||||
let pl = *event_to_pl.get(&event_id).ok_or_else(|| {
|
||||
Error::NotFound(format!(
|
||||
"event unexpectedly missing from power level map: {event_id}",
|
||||
))
|
||||
})?;
|
||||
|
||||
let ev = fetch_event(event_id)
|
||||
.await
|
||||
.ok_or_else(|| Error::NotFound(String::new()))?;
|
||||
let ev = fetch_event(event_id.clone()).await.ok_or_else(|| {
|
||||
Error::NotFound(format!(
|
||||
"event found in power level map but not in room graph: {event_id}",
|
||||
))
|
||||
})?;
|
||||
|
||||
Ok((pl, ev.origin_server_ts()))
|
||||
};
|
||||
@@ -758,7 +764,10 @@ where
|
||||
warn!("event {} failed the authentication check", event.event_id());
|
||||
},
|
||||
| Err(e) => {
|
||||
debug_error!("event {} failed the authentication check: {e}", event.event_id());
|
||||
log_error!(
|
||||
"failed to run authentication check on event {}: {e}",
|
||||
event.event_id()
|
||||
);
|
||||
return Err(e);
|
||||
},
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,5 +1,4 @@
|
||||
import "./index.css";
|
||||
import { HomeLayout as BasicHomeLayout, DocContent } from "@rspress/core/theme-original";
|
||||
import { HomeLayout as BasicHomeLayout, DocContent } from "@rspress/core/theme";
|
||||
|
||||
import { useFrontmatter } from '@rspress/core/runtime';
|
||||
interface HomeLayoutProps {
|
||||
@@ -7,6 +6,8 @@ interface HomeLayoutProps {
|
||||
}
|
||||
|
||||
function HomeLayout(props: HomeLayoutProps) {
|
||||
console.log(props)
|
||||
|
||||
const { frontmatter } = useFrontmatter();
|
||||
|
||||
return (
|
||||
@@ -24,4 +25,5 @@ function HomeLayout(props: HomeLayoutProps) {
|
||||
);
|
||||
}
|
||||
export { HomeLayout };
|
||||
export * from "@rspress/core/theme-original";
|
||||
export * from "@rspress/core/theme";
|
||||
import "./index.css";
|
||||
Reference in new issue
Block a user