mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
f4ffdb9995
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a unified CLI entry point for server operations and introduced a new CLI executable alias. - Centralized and simplified server startup, allowing selection between CLI and server modes. - Added static migration module aggregation for easier migration management. - **Bug Fixes** - Improved platform-specific native module loading for better compatibility and reliability. - **Refactor** - Streamlined server build, startup, and artifact management processes. - Reorganized and simplified workflow and configuration files for backend services. - Transitioned export styles and import mechanisms for native modules to enhance maintainability. - **Chores** - Removed unused dependencies and configuration files. - Updated test cases to reflect refined server flavor logic. - Adjusted package and build configurations for consistency and clarity. - **Revert** - Removed legacy scripts and loaders no longer needed after refactor. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
24 lines
869 B
TypeScript
24 lines
869 B
TypeScript
import serverNativeModule from '@affine/server-native';
|
|
|
|
export const mergeUpdatesInApplyWay = serverNativeModule.mergeUpdatesInApplyWay;
|
|
|
|
export const verifyChallengeResponse = async (
|
|
response: any,
|
|
bits: number,
|
|
resource: string
|
|
) => {
|
|
if (typeof response !== 'string' || !response || !resource) return false;
|
|
return serverNativeModule.verifyChallengeResponse(response, bits, resource);
|
|
};
|
|
|
|
export const mintChallengeResponse = async (resource: string, bits: number) => {
|
|
if (!resource) return null;
|
|
return serverNativeModule.mintChallengeResponse(resource, bits);
|
|
};
|
|
|
|
export const getMime = serverNativeModule.getMime;
|
|
export const parseDoc = serverNativeModule.parseDoc;
|
|
export const Tokenizer = serverNativeModule.Tokenizer;
|
|
export const fromModelName = serverNativeModule.fromModelName;
|
|
export const htmlSanitize = serverNativeModule.htmlSanitize;
|