mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for a new AES key for license management, improving license encryption and decryption processes. - **Bug Fixes** - Improved error messages and handling when activating expired or invalid licenses. - **Refactor** - Updated license decryption logic to use a fixed AES key instead of deriving one from the workspace ID. - Added validation for environment variable values to prevent invalid configurations. - **Tests** - Enhanced license-related tests to cover new key usage and updated error messages. - Updated environment variable validation tests with clearer error messages. - **Chores** - Updated environment variable handling for improved consistency. - Set production environment variable explicitly in build configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
/* auto-generated by NAPI-RS */
|
|
/* eslint-disable */
|
|
export declare class Tokenizer {
|
|
count(content: string, allowedSpecial?: Array<string> | undefined | null): number
|
|
}
|
|
|
|
export const AFFINE_PRO_LICENSE_AES_KEY: string | undefined | null
|
|
|
|
export const AFFINE_PRO_PUBLIC_KEY: string | undefined | null
|
|
|
|
export declare function fromModelName(modelName: string): Tokenizer | null
|
|
|
|
export declare function getMime(input: Uint8Array): string
|
|
|
|
export declare function htmlSanitize(input: string): string
|
|
|
|
/**
|
|
* Merge updates in form like `Y.applyUpdate(doc, update)` way and return the
|
|
* result binary.
|
|
*/
|
|
export declare function mergeUpdatesInApplyWay(updates: Array<Buffer>): Buffer
|
|
|
|
export declare function mintChallengeResponse(resource: string, bits?: number | undefined | null): Promise<string>
|
|
|
|
export declare function parseDoc(filePath: string, doc: Buffer): Promise<{ name: string, chunks: Array<{index: number, content: string}> }>
|
|
|
|
export declare function verifyChallengeResponse(response: string, bits: number, resource: string): Promise<boolean>
|