@univerjs-pro/collaboration-comment-database-memory 1.3.0 → 1.3.1
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/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});let e=require('node:crypto'),t=require('@univerjs/protocol');var n=class{['_units']=new Map();['_queues']=new Map();['_calls']=new Set();['_state']='running';['_disposePromise'];['createRoot'](
|
|
1
|
+
Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});let e=require('node:crypto'),t=require('@univerjs/protocol');var n=class{['_units']=new Map();['_queues']=new Map();['_calls']=new Set();['_state']='running';['_disposePromise'];['createRoot'](_0x3baf5a,_0x8d9156){return this['_call'](()=>this['_enqueue'](_0x3baf5a['unitID'],()=>{let _0x12d707=this['_unit'](_0x3baf5a['unitID']);if(_0x12d707['has'](_0x3baf5a['threadID']))return{'status':'duplicate'};let _0x276f50=Date['now'](),_0xad1061={..._0x3baf5a,'replyID':_0x3baf5a['threadID'],'mentions':[..._0x3baf5a['mentions']],'solved':t['CommentSolvedStatus']['OpenOrReOpen'],'createdAt':_0x276f50,'updatedAt':_0x276f50,'generation':(0x0,e['randomUUID'])()};return _0x12d707['set'](_0xad1061['replyID'],_0xad1061),{'status':'created','record':r(_0xad1061)};}));}['createReply'](_0x4508ca,_0x4c0b2e){return this['_call'](()=>this['_enqueue'](_0x4508ca['unitID'],()=>{let _0x4fec7f=this['_unit'](_0x4508ca['unitID']);if(_0x4fec7f['has'](_0x4508ca['replyID']))return{'status':'duplicate'};let _0x4b3cf4=_0x4fec7f['get'](_0x4508ca['threadID']);if(!_0x4b3cf4||_0x4b3cf4['replyID']!==_0x4b3cf4['threadID'])return{'status':'not-found'};if(_0x4b3cf4['solved']!==t['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};let _0x2aa3ad=Date['now'](),_0x38d06b={..._0x4508ca,'mentions':[..._0x4508ca['mentions']],'solved':_0x4b3cf4['solved'],'createdAt':_0x2aa3ad,'updatedAt':_0x2aa3ad,'generation':(0x0,e['randomUUID'])()};return _0x4fec7f['set'](_0x38d06b['replyID'],_0x38d06b),{'status':'created','record':r(_0x38d06b)};}));}['getComment'](_0x53f1cc,_0x205606){return this['_call'](()=>this['_enqueue'](_0x53f1cc['unitID'],()=>{let _0x55f10b=this['_units']['get'](_0x53f1cc['unitID'])?.['get'](_0x53f1cc['replyID']);return _0x55f10b?.['threadID']===_0x53f1cc['threadID']?r(_0x55f10b):null;}));}['listThreads'](_0x4f02b7,_0x7ba688){return this['_call'](()=>this['_enqueue'](_0x4f02b7['unitID'],()=>{let _0x11d8bb=new Set(_0x4f02b7['threadIDs']);return[...this['_units']['get'](_0x4f02b7['unitID'])?.['values']()??[]]['filter'](_0x3cd93b=>_0x11d8bb['size']===0x0||_0x11d8bb['has'](_0x3cd93b['threadID']))['sort'](i)['map'](r);}));}['editComment'](_0x3f7ae5,_0x56d896){return this['_call'](()=>this['_enqueue'](_0x3f7ae5['unitID'],()=>{let _0x45271c=this['_units']['get'](_0x3f7ae5['unitID']),_0x4dc4f8=_0x45271c?.['get'](_0x3f7ae5['replyID']),_0x32c833=_0x45271c?.['get'](_0x3f7ae5['threadID']);if(!_0x4dc4f8||_0x4dc4f8['threadID']!==_0x3f7ae5['threadID']||!_0x32c833)return{'status':'not-found'};if(_0x32c833['solved']!==t['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};if(_0x4dc4f8['authorUserID']!==_0x3f7ae5['expectedAuthorUserID'])return{'status':'author-mismatch'};if(_0x4dc4f8['content']===_0x3f7ae5['content']&&a(_0x4dc4f8['mentions'],_0x3f7ae5['mentions']))return{'status':'unchanged','record':r(_0x4dc4f8)};let _0x411d03={..._0x4dc4f8,'content':_0x3f7ae5['content'],'mentions':[..._0x3f7ae5['mentions']],'updatedAt':Math['max'](Date['now'](),_0x4dc4f8['updatedAt']+0x1)};return _0x45271c['set'](_0x3f7ae5['replyID'],_0x411d03),{'status':'edited','record':r(_0x411d03)};}));}['setThreadSolved'](_0x1f077d,_0x26ecf9){return this['_call'](()=>this['_enqueue'](_0x1f077d['unitID'],()=>{let _0x2e281a=this['_units']['get'](_0x1f077d['unitID']),_0x26d267=_0x2e281a?.['get'](_0x1f077d['threadID']);return!_0x26d267||_0x26d267['replyID']!==_0x26d267['threadID']?{'status':'not-found'}:_0x26d267['solved']===_0x1f077d['solved']?{'status':'unchanged'}:(_0x2e281a['set'](_0x1f077d['threadID'],{..._0x26d267,'solved':_0x1f077d['solved'],'updatedAt':Math['max'](Date['now'](),_0x26d267['updatedAt']+0x1)}),{'status':'updated'});}));}['deleteComment'](_0x492754,_0x591657){return this['_call'](()=>this['_enqueue'](_0x492754['unitID'],()=>{let _0x1dd132=this['_units']['get'](_0x492754['unitID']),_0x4e4fd0=_0x492754['replyID']??_0x492754['threadID'],_0x5308ae=_0x1dd132?.['get'](_0x4e4fd0);if(!_0x5308ae||_0x5308ae['threadID']!==_0x492754['threadID'])return{'status':'not-found'};if(_0x5308ae['generation']!==_0x492754['expectedGeneration'])return{'status':'generation-mismatch'};if(_0x492754['replyID']===void 0x0){for(let [_0x483797,_0xbc0aa1]of _0x1dd132)_0xbc0aa1['threadID']===_0x492754['threadID']&&_0x1dd132['delete'](_0x483797);}else _0x1dd132['delete'](_0x492754['replyID']);return _0x1dd132['size']===0x0&&this['_units']['delete'](_0x492754['unitID']),{'status':'deleted'};}));}['dispose'](){return this['_disposePromise']?this['_disposePromise']:(this['_state']='disposing',this['_disposePromise']=((async()=>{await Promise['allSettled']([...this['_calls']]),this['_queues']['clear'](),this['_state']='disposed';})()),this['_disposePromise']);}['_unit'](_0x1f033f){let _0x533dee=this['_units']['get'](_0x1f033f);if(_0x533dee)return _0x533dee;let _0x4154d=new Map();return this['_units']['set'](_0x1f033f,_0x4154d),_0x4154d;}['_enqueue'](_0x2f043a,_0x5b3dd7){let _0x3ec101=(this['_queues']['get'](_0x2f043a)??Promise['resolve']())['catch'](()=>void 0x0)['then'](_0x5b3dd7),_0x173025=_0x3ec101['then'](()=>void 0x0,()=>void 0x0);return this['_queues']['set'](_0x2f043a,_0x173025),_0x173025['finally'](()=>{this['_queues']['get'](_0x2f043a)===_0x173025&&this['_queues']['delete'](_0x2f043a);}),_0x3ec101;}['_call'](_0x5ba7ae){if(this['_state']!=='running')return Promise['reject'](Error('Memory\x20Comment\x20Database\x20Adapter\x20is\x20'+this['_state']));let _0x593b27=_0x5ba7ae();return this['_calls']['add'](_0x593b27),_0x593b27['finally'](()=>this['_calls']['delete'](_0x593b27))['catch'](()=>void 0x0),_0x593b27;}};function r(_0x1fd697){return{..._0x1fd697,'mentions':[..._0x1fd697['mentions']]};}function i(_0x212349,_0x472bb9){let _0x4d50ba=_0x212349['threadID']['localeCompare'](_0x472bb9['threadID']);return _0x4d50ba===0x0?_0x212349['replyID']===_0x212349['threadID']?-0x1:_0x472bb9['replyID']===_0x472bb9['threadID']?0x1:_0x212349['createdAt']-_0x472bb9['createdAt']||_0x212349['replyID']['localeCompare'](_0x472bb9['replyID']):_0x4d50ba;}function a(_0x1ea1e5,_0x410570){return _0x1ea1e5['length']===_0x410570['length']&&_0x1ea1e5['every']((_0x3dc860,_0x2baa32)=>_0x3dc860===_0x410570[_0x2baa32]);}exports['MemoryCommentDatabaseAdapter']=n;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x354093=_0x532b;(function(_0x43ca1d,_0x5f4a25){const _0x3934aa=_0x532b,_0x4f619e=_0x43ca1d();while(!![]){try{const _0x65da35=parseInt(_0x3934aa(0x7d))/0x1+parseInt(_0x3934aa(0x86))/0x2*(-parseInt(_0x3934aa(0x85))/0x3)+-parseInt(_0x3934aa(0x82))/0x4*(parseInt(_0x3934aa(0x7c))/0x5)+parseInt(_0x3934aa(0x83))/0x6+parseInt(_0x3934aa(0x84))/0x7+parseInt(_0x3934aa(0x7f))/0x8*(parseInt(_0x3934aa(0x87))/0x9)+parseInt(_0x3934aa(0x7e))/0xa*(-parseInt(_0x3934aa(0x81))/0xb);if(_0x65da35===_0x5f4a25)break;else _0x4f619e['push'](_0x4f619e['shift']());}catch(_0x2b423c){_0x4f619e['push'](_0x4f619e['shift']());}}}(_0x20c8,0x69205));import _0x458002 from'./index.cjs';function _0x532b(_0x236101,_0x1db9df){_0x236101=_0x236101-0x7c;const _0x20c858=_0x20c8();let _0x532b14=_0x20c858[_0x236101];return _0x532b14;}const facadeExport0=_0x458002[_0x354093(0x80)];export{facadeExport0 as MemoryCommentDatabaseAdapter};function _0x20c8(){const _0x29dbfd=['4194904MzJImf','30uvosBm','26904UbXPSo','20583HHtttY','5wQtyDJ','316636LUnObM','170jHTSwj','1968gVsMOl','MemoryCommentDatabaseAdapter','91619mlyjvC','3287260mnBKTy','300090gYYaoW'];_0x20c8=function(){return _0x29dbfd;};return _0x20c8();}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/collaboration-comment-database-memory",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@univerjs-pro/collaboration-comment-service": "1.3.
|
|
20
|
-
"@univerjs/protocol": "1.3.
|
|
19
|
+
"@univerjs-pro/collaboration-comment-service": "1.3.1",
|
|
20
|
+
"@univerjs/protocol": "1.3.1"
|
|
21
21
|
}
|
|
22
22
|
}
|