chore(repo): initialize WebDrop monorepo
Signed-off-by: JustMe <mr.toing@outlook.com>
This commit is contained in:
commit
53768a195d
39 files changed
+9063
No files matched your search
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @webdrop/core:WebDrop 的端到端加密核心。
|
||||
*
|
||||
* 前端只需要这几件事:
|
||||
* ChannelSession.create(...) 创建频道,得到会话、POST /channels 的请求体和请求头、分享链接
|
||||
* ChannelSession.open(link) 打开链接,得到会话
|
||||
* session.authHeaders(role) 所有请求要带的头
|
||||
* session.encryptText/Json/File 把内容加密成可直接 POST 的帧
|
||||
* session.createItemReader() 喂入 WebSocket / log 的记录,得到解密后的条目
|
||||
* session.decryptItemStream() 流式解密大文件
|
||||
*
|
||||
* 本包只依赖 WebCrypto,不含 UI,不发网络请求,不处理重连和队列。
|
||||
*/
|
||||
|
||||
export { ChannelSession, openLink } from './session.js';
|
||||
export type {
|
||||
AuthRole,
|
||||
ChannelSettings,
|
||||
CreateChannelBody,
|
||||
CreatedChannel,
|
||||
CreateOptions,
|
||||
FileMetaOverrides,
|
||||
OpenOptions,
|
||||
PlanItemOptions,
|
||||
} from './session.js';
|
||||
|
||||
export { collectFrames } from './item.js';
|
||||
export type { ContentSource, EncodedFrame, ItemMeta, ItemPlan, PlanOptions } from './item.js';
|
||||
|
||||
export { ItemReader, itemJson, itemText } from './reader.js';
|
||||
export type { ItemEvent, ReaderContext, ReceivedItem, ReceivedKind } from './reader.js';
|
||||
|
||||
export { decryptItemFrames, decryptItemStream, splitEnvelopes } from './stream.js';
|
||||
export type { DecryptStreamOptions, ItemDecodeResult } from './stream.js';
|
||||
|
||||
export { parseLogRecord, parseLogRecords } from './log.js';
|
||||
export type { LogRecord, RemovedReason } from './log.js';
|
||||
|
||||
export { buildLink, parseLink } from './link.js';
|
||||
export type { LinkParts, ParsedLink } from './link.js';
|
||||
|
||||
export { fromBase64Url, toBase64Url } from './bytes.js';
|
||||
|
||||
export { Flags, MAX_FRAME_DATA, PROTOCOL_VERSION } from './constants.js';
|
||||
export type { ChannelMode, ItemKind } from './constants.js';
|
||||
|
||||
export {
|
||||
CapabilityError,
|
||||
IntegrityError,
|
||||
LimitError,
|
||||
LinkError,
|
||||
ModeMismatchError,
|
||||
WebDropError,
|
||||
} from './errors.js';
|
||||
export type { IntegrityReason } from './errors.js';
|
||||
Reference in new issue
Block a user