@univerjs-pro/collaboration-comment-database-sqlite 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @univerjs-pro/collaboration-comment-database-sqlite
2
+
3
+ English | [简体中文](./README.zh-CN.md)
4
+
5
+ A persistent SQLite `ICommentDatabaseAdapter` for `@univerjs-pro/collaboration-comment-service`. It uses the stable synchronous `libsql` API, supports Node.js 22 and later, and can share a database file with the core, History, and Worktree SQLite Adapters.
6
+
7
+ ## Installation and usage
8
+
9
+ ```bash
10
+ pnpm add \
11
+ @univerjs-pro/collaboration-comment-service \
12
+ @univerjs-pro/collaboration-comment-database-sqlite
13
+ ```
14
+
15
+ ```ts
16
+ const commentDatabase = new SQLiteCommentDatabaseAdapter({
17
+ filename: './data/collaboration.sqlite',
18
+ busyTimeoutMs: 5_000,
19
+ });
20
+ const commentService = new UniverCommentService({
21
+ database: commentDatabase,
22
+ });
23
+
24
+ await commentService.dispose();
25
+ await commentDatabase.dispose();
26
+ ```
27
+
28
+ The caller must create the database parent directory in advance and dispose the Adapter after stopping the Service.
29
+
30
+ ## Storage contract
31
+
32
+ - Comment data is stored in `collaboration_comments`.
33
+ - Schema version `('comment', 1)` is stored in shared `collaboration_schema_versions`; `PRAGMA user_version` is not used.
34
+ - Compound checks and writes use SQLite transactions. Deletes use a non-reusable concurrency version to avoid overwriting newer data.
35
+ - An empty Comment schema is initialized automatically. Incomplete or unsupported schemas are rejected without migration or legacy fallback.
36
+
37
+ Comment tables are independent of core snapshots and changesets. A core hard delete does not automatically clean up Comments; the application must coordinate cross-module cleanup when required.
@@ -0,0 +1,42 @@
1
+ # @univerjs-pro/collaboration-comment-database-sqlite
2
+
3
+ [English](./README.md) | [简体中文](./README.zh-CN.md)
4
+
5
+ 面向 `@univerjs-pro/collaboration-comment-service` 的持久化 SQLite
6
+ `ICommentDatabaseAdapter`。它使用稳定的 `libsql` 同步接口,支持 Node.js 22 及以上,
7
+ 并可与 core、History 和 Worktree SQLite Adapter 共用数据库文件。
8
+
9
+ ## 安装与使用
10
+
11
+ ```bash
12
+ pnpm add \
13
+ @univerjs-pro/collaboration-comment-service \
14
+ @univerjs-pro/collaboration-comment-database-sqlite
15
+ ```
16
+
17
+ ```ts
18
+ const commentDatabase = new SQLiteCommentDatabaseAdapter({
19
+ filename: './data/collaboration.sqlite',
20
+ busyTimeoutMs: 5_000,
21
+ });
22
+ const commentService = new UniverCommentService({
23
+ database: commentDatabase,
24
+ });
25
+
26
+ await commentService.dispose();
27
+ await commentDatabase.dispose();
28
+ ```
29
+
30
+ 调用方必须预先创建数据库父目录,并在 Service 停止后释放 Adapter。
31
+
32
+ ## 存储契约
33
+
34
+ - Comment 数据保存在 `collaboration_comments`。
35
+ - schema 版本 `('comment', 1)` 记录在共享的
36
+ `collaboration_schema_versions`,不占用 `PRAGMA user_version`。
37
+ - 复合检查与写入使用 SQLite transaction;删除时使用不可复用的并发版本防止覆盖新数据。
38
+ - 空 Comment schema 自动初始化;不完整或不支持的 schema 会被拒绝,不执行 migration
39
+ 或 legacy fallback。
40
+
41
+ Comment 表独立于 core snapshot/changeset。core hard delete 不会自动清理 Comment;需要
42
+ 跨模块清理时由应用统一协调。
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});var e=Object['create'],t=Object['defineProperty'],n=Object['getOwnPropertyDescriptor'],r=Object['getOwnPropertyNames'],i=Object['getPrototypeOf'],a=Object['prototype']['hasOwnProperty'],o=(_0x2adbea,_0x2003f5,_0x501e7b,_0x50f867)=>{if(_0x2003f5&&typeof _0x2003f5=='object'||typeof _0x2003f5=='function'){for(var _0x2e35bb=r(_0x2003f5),_0x212c06=0x0,_0x1103fa=_0x2e35bb['length'],_0x52a853;_0x212c06<_0x1103fa;_0x212c06++)_0x52a853=_0x2e35bb[_0x212c06],!a['call'](_0x2adbea,_0x52a853)&&_0x52a853!==_0x501e7b&&t(_0x2adbea,_0x52a853,{'get':(_0x4d2129=>_0x2003f5[_0x4d2129])['bind'](null,_0x52a853),'enumerable':!(_0x50f867=n(_0x2003f5,_0x52a853))||_0x50f867['enumerable']});}return _0x2adbea;},s=(_0x54d553,_0x43afe8,_0x3d7986)=>(_0x3d7986=_0x54d553==null?{}:e(i(_0x54d553)),o(_0x43afe8||!_0x54d553||!_0x54d553['__esModule']?t(_0x3d7986,'default',{'value':_0x54d553,'enumerable':!0x0}):_0x3d7986,_0x54d553));let c=require('node:crypto'),l=require('libsql');l=s(l,0x1);let u=require('@univerjs/protocol');var d=0x1388,f='comment',p=0x1,m=['collaboration_comments'],h=class{['_database'];['_disposed']=!0x1;constructor(_0x2376e8){b(_0x2376e8),this['_database']=new l['default'](_0x2376e8['filename'],{'timeout':_0x2376e8['busyTimeoutMs']??d});try{this['_database']['exec']('PRAGMA\x20busy_timeout\x20=\x20'+(_0x2376e8['busyTimeoutMs']??d)+';'),this['_initializeSchema']();}catch(_0x48748b){throw this['_database']['close'](),_0x48748b;}}async['createRoot'](_0x2c69cc,_0x5da705){return this['_assertOpen'](),this['_transaction'](()=>{if(this['_getByReply'](_0x2c69cc['unitID'],_0x2c69cc['threadID']))return{'status':'duplicate'};let _0xd0c7e9=Date['now']();return this['_insert']({..._0x2c69cc,'replyID':_0x2c69cc['threadID'],'solved':u['CommentSolvedStatus']['OpenOrReOpen'],'createdAt':_0xd0c7e9,'updatedAt':_0xd0c7e9,'generation':(0x0,c['randomUUID'])()}),{'status':'created','record':this['_require'](_0x2c69cc['unitID'],_0x2c69cc['threadID'])};});}async['createReply'](_0x2879e3,_0x830e7c){return this['_assertOpen'](),this['_transaction'](()=>{if(this['_getByReply'](_0x2879e3['unitID'],_0x2879e3['replyID']))return{'status':'duplicate'};let _0x4c59f1=this['_getByReply'](_0x2879e3['unitID'],_0x2879e3['threadID']);if(!_0x4c59f1||_0x4c59f1['threadID']!==_0x4c59f1['replyID'])return{'status':'not-found'};if(_0x4c59f1['solved']!==u['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};let _0x489839=Date['now']();return this['_insert']({..._0x2879e3,'solved':_0x4c59f1['solved'],'createdAt':_0x489839,'updatedAt':_0x489839,'generation':(0x0,c['randomUUID'])()}),{'status':'created','record':this['_require'](_0x2879e3['unitID'],_0x2879e3['replyID'])};});}async['getComment'](_0x55b8dd,_0x46ecb4){this['_assertOpen']();let _0x39d8ad=this['_getByReply'](_0x55b8dd['unitID'],_0x55b8dd['replyID']);return _0x39d8ad?.['threadID']===_0x55b8dd['threadID']?_0x39d8ad:null;}async['listThreads'](_0x37a4cd,_0x7c22f8){this['_assertOpen']();let _0x34dc9d=[...new Set(_0x37a4cd['threadIDs'])];return(_0x34dc9d['length']===0x0?this['_database']['prepare'](g+'\x20WHERE\x20unit_id\x20=\x20?')['all'](_0x37a4cd['unitID']):this['_database']['prepare'](g+'\x20WHERE\x20unit_id\x20=\x20?\x20AND\x20thread_id\x20IN\x20('+_0x34dc9d['map'](()=>'?')['join'](',')+')')['all'](_0x37a4cd['unitID'],..._0x34dc9d))['map'](_)['sort'](v);}async['editComment'](_0x105225,_0x1521b4){return this['_assertOpen'](),this['_transaction'](()=>{let _0x404d9e=this['_getByReply'](_0x105225['unitID'],_0x105225['replyID']),_0x266d42=this['_getByReply'](_0x105225['unitID'],_0x105225['threadID']);return!_0x404d9e||_0x404d9e['threadID']!==_0x105225['threadID']||!_0x266d42?{'status':'not-found'}:_0x266d42['solved']===u['CommentSolvedStatus']['OpenOrReOpen']?_0x404d9e['authorUserID']===_0x105225['expectedAuthorUserID']?_0x404d9e['content']===_0x105225['content']&&y(_0x404d9e['mentions'],_0x105225['mentions'])?{'status':'unchanged','record':_0x404d9e}:(this['_database']['prepare']('UPDATE\x20collaboration_comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20content\x20=\x20?,\x20mentions_json\x20=\x20?,\x20updated_at\x20=\x20?\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20unit_id\x20=\x20?\x20AND\x20thread_id\x20=\x20?\x20AND\x20reply_id\x20=\x20?')['run'](_0x105225['content'],JSON['stringify'](_0x105225['mentions']),Math['max'](Date['now'](),_0x404d9e['updatedAt']+0x1),_0x105225['unitID'],_0x105225['threadID'],_0x105225['replyID']),{'status':'edited','record':this['_require'](_0x105225['unitID'],_0x105225['replyID'])}):{'status':'author-mismatch'}:{'status':'closed'};});}async['setThreadSolved'](_0x17490f,_0x21a9de){return this['_assertOpen'](),this['_transaction'](()=>{let _0x592713=this['_getByReply'](_0x17490f['unitID'],_0x17490f['threadID']);return!_0x592713||_0x592713['threadID']!==_0x592713['replyID']?{'status':'not-found'}:_0x592713['solved']===_0x17490f['solved']?{'status':'unchanged'}:(this['_database']['prepare']('UPDATE\x20collaboration_comments\x20SET\x20solved\x20=\x20?,\x20updated_at\x20=\x20?\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20unit_id\x20=\x20?\x20AND\x20reply_id\x20=\x20?')['run'](_0x17490f['solved'],Math['max'](Date['now'](),_0x592713['updatedAt']+0x1),_0x17490f['unitID'],_0x17490f['threadID']),{'status':'updated'});});}async['deleteComment'](_0x51557f,_0x3a235f){return this['_assertOpen'](),this['_transaction'](()=>{let _0x261e28=_0x51557f['replyID']??_0x51557f['threadID'],_0x55b1a1=this['_getByReply'](_0x51557f['unitID'],_0x261e28);return!_0x55b1a1||_0x55b1a1['threadID']!==_0x51557f['threadID']?{'status':'not-found'}:_0x55b1a1['generation']===_0x51557f['expectedGeneration']?(_0x51557f['replyID']===void 0x0?this['_database']['prepare']('DELETE\x20FROM\x20collaboration_comments\x20WHERE\x20unit_id\x20=\x20?\x20AND\x20thread_id\x20=\x20?')['run'](_0x51557f['unitID'],_0x51557f['threadID']):this['_database']['prepare']('DELETE\x20FROM\x20collaboration_comments\x20WHERE\x20unit_id\x20=\x20?\x20AND\x20thread_id\x20=\x20?\x20AND\x20reply_id\x20=\x20?\x20AND\x20generation\x20=\x20?')['run'](_0x51557f['unitID'],_0x51557f['threadID'],_0x51557f['replyID'],_0x51557f['expectedGeneration']),{'status':'deleted'}):{'status':'generation-mismatch'};});}async['dispose'](){this['_disposed']||(this['_disposed']=!0x0,this['_database']['close']());}['_initializeSchema'](){this['_transaction'](()=>{if(!this['_hasTable']('collaboration_schema_versions')){if(this['_hasAnyOwnedTable']())throw x('SQLite\x20Comment\x20tables\x20exist\x20without\x20a\x20schema\x20version');this['_database']['exec']('\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20CREATE\x20TABLE\x20collaboration_schema_versions\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20component\x20TEXT\x20PRIMARY\x20KEY,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20version\x20INTEGER\x20NOT\x20NULL\x20CHECK\x20(version\x20>=\x201)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20);\x0a\x20\x20\x20\x20\x20\x20\x20\x20');}let _0x3cc822=this['_database']['prepare']('SELECT\x20version\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20collaboration_schema_versions\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20component\x20=\x20?')['get'](f);if(_0x3cc822){if(_0x3cc822['version']!==p)throw x('SQLite\x20Comment\x20schema\x20version\x20'+_0x3cc822['version']+'\x20is\x20not\x20supported');let _0x22b9d7=m['filter'](_0x1b69c9=>!this['_hasTable'](_0x1b69c9));if(_0x22b9d7['length']>0x0)throw x('SQLite\x20Comment\x20schema\x20v1\x20is\x20incomplete:\x20missing\x20'+_0x22b9d7['join'](',\x20'));return;}if(this['_hasAnyOwnedTable']())throw x('SQLite\x20Comment\x20tables\x20exist\x20without\x20a\x20schema\x20version');this['_database']['exec']('\x0a\x20\x20\x20\x20\x20\x20\x20\x20CREATE\x20TABLE\x20collaboration_comments\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20unit_id\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20thread_id\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20reply_id\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20author_user_id\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20content\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20mentions_json\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20solved\x20INTEGER\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20created_at\x20INTEGER\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20updated_at\x20INTEGER\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20generation\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20PRIMARY\x20KEY\x20(unit_id,\x20reply_id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20CREATE\x20INDEX\x20collaboration_comments_thread_lookup\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20collaboration_comments(unit_id,\x20thread_id,\x20created_at,\x20reply_id);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20collaboration_schema_versions\x20(component,\x20version)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20(\x27comment\x27,\x201);\x0a\x20\x20\x20\x20\x20\x20');});}['_hasTable'](_0x1ce116){return!!this['_database']['prepare']('SELECT\x201\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20sqlite_schema\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20type\x20=\x20\x27table\x27\x20AND\x20name\x20=\x20?')['get'](_0x1ce116);}['_hasAnyOwnedTable'](){return m['some'](_0x1cf2a2=>this['_hasTable'](_0x1cf2a2));}['_insert'](_0x22b9f5){this['_database']['prepare']('INSERT\x20INTO\x20collaboration_comments\x0a\x20\x20\x20\x20\x20\x20\x20(unit_id,\x20thread_id,\x20reply_id,\x20author_user_id,\x20content,\x20mentions_json,\x0a\x20\x20\x20\x20\x20\x20\x20\x20solved,\x20created_at,\x20updated_at,\x20generation)\x0a\x20\x20\x20\x20\x20\x20\x20VALUES\x20(?,\x20?,\x20?,\x20?,\x20?,\x20?,\x20?,\x20?,\x20?,\x20?)')['run'](_0x22b9f5['unitID'],_0x22b9f5['threadID'],_0x22b9f5['replyID'],_0x22b9f5['authorUserID'],_0x22b9f5['content'],JSON['stringify'](_0x22b9f5['mentions']),_0x22b9f5['solved'],_0x22b9f5['createdAt'],_0x22b9f5['updatedAt'],_0x22b9f5['generation']);}['_getByReply'](_0x499f05,_0x45354b){let _0x6e3c72=this['_database']['prepare'](g+'\x20WHERE\x20unit_id\x20=\x20?\x20AND\x20reply_id\x20=\x20?')['get'](_0x499f05,_0x45354b);return _0x6e3c72?_(_0x6e3c72):null;}['_require'](_0x817ec8,_0x411335){let _0x3afd8d=this['_getByReply'](_0x817ec8,_0x411335);if(!_0x3afd8d)throw Error('SQLite\x20Comment\x20write\x20did\x20not\x20persist\x20its\x20record');return _0x3afd8d;}['_transaction'](_0x102708){this['_database']['exec']('BEGIN\x20IMMEDIATE;');try{let _0x3f2e19=_0x102708();return this['_database']['exec']('COMMIT;'),_0x3f2e19;}catch(_0x2006c7){try{this['_database']['exec']('ROLLBACK;');}catch{}throw _0x2006c7;}}['_assertOpen'](){if(this['_disposed'])throw Error('SQLite\x20Comment\x20Database\x20Adapter\x20is\x20disposed');}},g='SELECT\x20unit_id,\x20thread_id,\x20reply_id,\x20author_user_id,\x0a\x20\x20content,\x20mentions_json,\x20solved,\x20created_at,\x20updated_at,\x20generation\x0a\x20\x20FROM\x20collaboration_comments';function _(_0x48cb9e){let _0x1f9f2b=JSON['parse'](_0x48cb9e['mentions_json']);if(!Array['isArray'](_0x1f9f2b)||_0x1f9f2b['some'](_0x610715=>typeof _0x610715!='string'))throw Error('SQLite\x20Comment\x20contains\x20invalid\x20mentions');if(_0x48cb9e['solved']!==u['CommentSolvedStatus']['OpenOrReOpen']&&_0x48cb9e['solved']!==u['CommentSolvedStatus']['Solved'])throw Error('SQLite\x20Comment\x20contains\x20invalid\x20solved\x20status');return{'unitID':_0x48cb9e['unit_id'],'threadID':_0x48cb9e['thread_id'],'replyID':_0x48cb9e['reply_id'],'authorUserID':_0x48cb9e['author_user_id'],'content':_0x48cb9e['content'],'mentions':_0x1f9f2b,'solved':_0x48cb9e['solved'],'createdAt':_0x48cb9e['created_at'],'updatedAt':_0x48cb9e['updated_at'],'generation':_0x48cb9e['generation']};}function v(_0x1a56e6,_0x2804c6){let _0xb277a3=_0x1a56e6['threadID']['localeCompare'](_0x2804c6['threadID']);return _0xb277a3===0x0?_0x1a56e6['replyID']===_0x1a56e6['threadID']?-0x1:_0x2804c6['replyID']===_0x2804c6['threadID']?0x1:_0x1a56e6['createdAt']-_0x2804c6['createdAt']||_0x1a56e6['replyID']['localeCompare'](_0x2804c6['replyID']):_0xb277a3;}function y(_0x3aa5a2,_0x159a64){return _0x3aa5a2['length']===_0x159a64['length']&&_0x3aa5a2['every']((_0x3deb1b,_0xc0511a)=>_0x3deb1b===_0x159a64[_0xc0511a]);}function b(_0x42d460){if(!_0x42d460?.['filename'])throw TypeError('SQLiteCommentDatabaseAdapter\x20requires\x20a\x20filename');if(_0x42d460['busyTimeoutMs']!==void 0x0&&(!Number['isSafeInteger'](_0x42d460['busyTimeoutMs'])||_0x42d460['busyTimeoutMs']<0x0))throw TypeError('busyTimeoutMs\x20must\x20be\x20a\x20non-negative\x20safe\x20integer');}function x(_0x537c8a){return Error(_0x537c8a);}exports['SQLiteCommentDatabaseAdapter']=h;
@@ -0,0 +1,30 @@
1
+ import { CommentDatabaseContext, CommentRecord, CreateCommentDatabaseResult, CreateReplyDatabaseInput, CreateReplyDatabaseResult, CreateRootDatabaseInput, DeleteCommentDatabaseInput, DeleteCommentDatabaseResult, EditCommentDatabaseInput, EditCommentDatabaseResult, GetCommentDatabaseInput, ICommentDatabaseAdapter, ListThreadsDatabaseInput, SetThreadSolvedDatabaseInput, SetThreadSolvedDatabaseResult } from "@univerjs-pro/collaboration-comment-service";
2
+
3
+ //#region src/sqlite-comment-database-adapter.d.ts
4
+ interface SQLiteCommentDatabaseAdapterOptions {
5
+ readonly filename: string;
6
+ readonly busyTimeoutMs?: number;
7
+ }
8
+ declare class SQLiteCommentDatabaseAdapter implements ICommentDatabaseAdapter {
9
+ private readonly _database;
10
+ private _disposed;
11
+ constructor(options: SQLiteCommentDatabaseAdapterOptions);
12
+ createRoot(input: CreateRootDatabaseInput, _context: CommentDatabaseContext): Promise<CreateCommentDatabaseResult>;
13
+ createReply(input: CreateReplyDatabaseInput, _context: CommentDatabaseContext): Promise<CreateReplyDatabaseResult>;
14
+ getComment(input: GetCommentDatabaseInput, _context: CommentDatabaseContext): Promise<CommentRecord | null>;
15
+ listThreads(input: ListThreadsDatabaseInput, _context: CommentDatabaseContext): Promise<readonly CommentRecord[]>;
16
+ editComment(input: EditCommentDatabaseInput, _context: CommentDatabaseContext): Promise<EditCommentDatabaseResult>;
17
+ setThreadSolved(input: SetThreadSolvedDatabaseInput, _context: CommentDatabaseContext): Promise<SetThreadSolvedDatabaseResult>;
18
+ deleteComment(input: DeleteCommentDatabaseInput, _context: CommentDatabaseContext): Promise<DeleteCommentDatabaseResult>;
19
+ dispose(): Promise<void>;
20
+ private _initializeSchema;
21
+ private _hasTable;
22
+ private _hasAnyOwnedTable;
23
+ private _insert;
24
+ private _getByReply;
25
+ private _require;
26
+ private _transaction;
27
+ private _assertOpen;
28
+ }
29
+ //#endregion
30
+ export { SQLiteCommentDatabaseAdapter, type SQLiteCommentDatabaseAdapterOptions };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ function _0x31d3(){const _0x3f870f=['468oUQtqL','86916NPtElx','30GiEmuY','117243oZUCIH','151752QbsMPq','560814pTvxNN','7Ogecoy','12666gAvchZ','SQLiteCommentDatabaseAdapter','4BjPGKd','737DsWyoN','13165oHFyTR','1084446EwZZVS'];_0x31d3=function(){return _0x3f870f;};return _0x31d3();}const _0xdcd632=_0x46d8;(function(_0x280c35,_0x12be29){const _0x7d4fc8=_0x46d8,_0x1755fe=_0x280c35();while(!![]){try{const _0x2233c1=-parseInt(_0x7d4fc8(0xfd))/0x1+-parseInt(_0x7d4fc8(0xf6))/0x2*(-parseInt(_0x7d4fc8(0xf4))/0x3)+parseInt(_0x7d4fc8(0xfa))/0x4*(parseInt(_0x7d4fc8(0xf8))/0x5)+parseInt(_0x7d4fc8(0xff))/0x6+parseInt(_0x7d4fc8(0xf3))/0x7*(parseInt(_0x7d4fc8(0xfe))/0x8)+parseInt(_0x7d4fc8(0xf9))/0x9*(parseInt(_0x7d4fc8(0xfc))/0xa)+parseInt(_0x7d4fc8(0xf7))/0xb*(-parseInt(_0x7d4fc8(0xfb))/0xc);if(_0x2233c1===_0x12be29)break;else _0x1755fe['push'](_0x1755fe['shift']());}catch(_0x294017){_0x1755fe['push'](_0x1755fe['shift']());}}}(_0x31d3,0x2ddfd));import _0x4a708b from'./index.cjs';function _0x46d8(_0x475ee1,_0x27a714){_0x475ee1=_0x475ee1-0xf3;const _0x31d37c=_0x31d3();let _0x46d85e=_0x31d37c[_0x475ee1];return _0x46d85e;}const facadeExport0=_0x4a708b[_0xdcd632(0xf5)];export{facadeExport0 as SQLiteCommentDatabaseAdapter};
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@univerjs-pro/collaboration-comment-database-sqlite",
3
+ "type": "module",
4
+ "engines": {
5
+ "node": ">=22"
6
+ },
7
+ "version": "1.0.0-beta.2",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.cjs"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "dependencies": {
22
+ "@univerjs-pro/collaboration-comment-service": "1.0.0-beta.2",
23
+ "@univerjs/protocol": "1.0.0-beta.2",
24
+ "libsql": "^0.5.29"
25
+ }
26
+ }