@univerjs-pro/collaboration-comment-database-memory 1.0.4 → 1.1.0
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'](_0x43d902,_0x5dc93a){return this['_call'](()=>this['_enqueue'](_0x43d902['unitID'],()=>{let _0x3658fc=this['_unit'](_0x43d902['unitID']);if(_0x3658fc['has'](_0x43d902['threadID']))return{'status':'duplicate'};let _0x5d85b9=Date['now'](),_0xe5324={..._0x43d902,'replyID':_0x43d902['threadID'],'mentions':[..._0x43d902['mentions']],'solved':t['CommentSolvedStatus']['OpenOrReOpen'],'createdAt':_0x5d85b9,'updatedAt':_0x5d85b9,'generation':(0x0,e['randomUUID'])()};return _0x3658fc['set'](_0xe5324['replyID'],_0xe5324),{'status':'created','record':r(_0xe5324)};}));}['createReply'](_0x231718,_0x365cc2){return this['_call'](()=>this['_enqueue'](_0x231718['unitID'],()=>{let _0x18b8f2=this['_unit'](_0x231718['unitID']);if(_0x18b8f2['has'](_0x231718['replyID']))return{'status':'duplicate'};let _0x273dd3=_0x18b8f2['get'](_0x231718['threadID']);if(!_0x273dd3||_0x273dd3['replyID']!==_0x273dd3['threadID'])return{'status':'not-found'};if(_0x273dd3['solved']!==t['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};let _0x5cd52f=Date['now'](),_0x2cb48d={..._0x231718,'mentions':[..._0x231718['mentions']],'solved':_0x273dd3['solved'],'createdAt':_0x5cd52f,'updatedAt':_0x5cd52f,'generation':(0x0,e['randomUUID'])()};return _0x18b8f2['set'](_0x2cb48d['replyID'],_0x2cb48d),{'status':'created','record':r(_0x2cb48d)};}));}['getComment'](_0x1577f0,_0x1bbf02){return this['_call'](()=>this['_enqueue'](_0x1577f0['unitID'],()=>{let _0x1aeec3=this['_units']['get'](_0x1577f0['unitID'])?.['get'](_0x1577f0['replyID']);return _0x1aeec3?.['threadID']===_0x1577f0['threadID']?r(_0x1aeec3):null;}));}['listThreads'](_0x37daaf,_0xbb24e){return this['_call'](()=>this['_enqueue'](_0x37daaf['unitID'],()=>{let _0x9e5df6=new Set(_0x37daaf['threadIDs']);return[...this['_units']['get'](_0x37daaf['unitID'])?.['values']()??[]]['filter'](_0x52c83c=>_0x9e5df6['size']===0x0||_0x9e5df6['has'](_0x52c83c['threadID']))['sort'](i)['map'](r);}));}['editComment'](_0x171bec,_0x4f966f){return this['_call'](()=>this['_enqueue'](_0x171bec['unitID'],()=>{let _0xffbb60=this['_units']['get'](_0x171bec['unitID']),_0x527cfb=_0xffbb60?.['get'](_0x171bec['replyID']),_0x1de3f7=_0xffbb60?.['get'](_0x171bec['threadID']);if(!_0x527cfb||_0x527cfb['threadID']!==_0x171bec['threadID']||!_0x1de3f7)return{'status':'not-found'};if(_0x1de3f7['solved']!==t['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};if(_0x527cfb['authorUserID']!==_0x171bec['expectedAuthorUserID'])return{'status':'author-mismatch'};if(_0x527cfb['content']===_0x171bec['content']&&a(_0x527cfb['mentions'],_0x171bec['mentions']))return{'status':'unchanged','record':r(_0x527cfb)};let _0x4c615b={..._0x527cfb,'content':_0x171bec['content'],'mentions':[..._0x171bec['mentions']],'updatedAt':Math['max'](Date['now'](),_0x527cfb['updatedAt']+0x1)};return _0xffbb60['set'](_0x171bec['replyID'],_0x4c615b),{'status':'edited','record':r(_0x4c615b)};}));}['setThreadSolved'](_0x462998,_0xb0bca8){return this['_call'](()=>this['_enqueue'](_0x462998['unitID'],()=>{let _0x2d7023=this['_units']['get'](_0x462998['unitID']),_0x543806=_0x2d7023?.['get'](_0x462998['threadID']);return!_0x543806||_0x543806['replyID']!==_0x543806['threadID']?{'status':'not-found'}:_0x543806['solved']===_0x462998['solved']?{'status':'unchanged'}:(_0x2d7023['set'](_0x462998['threadID'],{..._0x543806,'solved':_0x462998['solved'],'updatedAt':Math['max'](Date['now'](),_0x543806['updatedAt']+0x1)}),{'status':'updated'});}));}['deleteComment'](_0x5b1ee0,_0x4ac375){return this['_call'](()=>this['_enqueue'](_0x5b1ee0['unitID'],()=>{let _0x4fa89f=this['_units']['get'](_0x5b1ee0['unitID']),_0x4ec6fe=_0x5b1ee0['replyID']??_0x5b1ee0['threadID'],_0x5579ce=_0x4fa89f?.['get'](_0x4ec6fe);if(!_0x5579ce||_0x5579ce['threadID']!==_0x5b1ee0['threadID'])return{'status':'not-found'};if(_0x5579ce['generation']!==_0x5b1ee0['expectedGeneration'])return{'status':'generation-mismatch'};if(_0x5b1ee0['replyID']===void 0x0){for(let [_0x46b038,_0x1e4093]of _0x4fa89f)_0x1e4093['threadID']===_0x5b1ee0['threadID']&&_0x4fa89f['delete'](_0x46b038);}else _0x4fa89f['delete'](_0x5b1ee0['replyID']);return _0x4fa89f['size']===0x0&&this['_units']['delete'](_0x5b1ee0['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'](_0x30d015){let _0x2199fa=this['_units']['get'](_0x30d015);if(_0x2199fa)return _0x2199fa;let _0x19ed6c=new Map();return this['_units']['set'](_0x30d015,_0x19ed6c),_0x19ed6c;}['_enqueue'](_0x70c56a,_0x915273){let _0x33a08e=(this['_queues']['get'](_0x70c56a)??Promise['resolve']())['catch'](()=>void 0x0)['then'](_0x915273),_0xf74729=_0x33a08e['then'](()=>void 0x0,()=>void 0x0);return this['_queues']['set'](_0x70c56a,_0xf74729),_0xf74729['finally'](()=>{this['_queues']['get'](_0x70c56a)===_0xf74729&&this['_queues']['delete'](_0x70c56a);}),_0x33a08e;}['_call'](_0xb2f2ad){if(this['_state']!=='running')return Promise['reject'](Error('Memory\x20Comment\x20Database\x20Adapter\x20is\x20'+this['_state']));let _0x7378cc=_0xb2f2ad();return this['_calls']['add'](_0x7378cc),_0x7378cc['finally'](()=>this['_calls']['delete'](_0x7378cc))['catch'](()=>void 0x0),_0x7378cc;}};function r(_0x408d73){return{..._0x408d73,'mentions':[..._0x408d73['mentions']]};}function i(_0x14b2bd,_0x8171fc){let _0x38d567=_0x14b2bd['threadID']['localeCompare'](_0x8171fc['threadID']);return _0x38d567===0x0?_0x14b2bd['replyID']===_0x14b2bd['threadID']?-0x1:_0x8171fc['replyID']===_0x8171fc['threadID']?0x1:_0x14b2bd['createdAt']-_0x8171fc['createdAt']||_0x14b2bd['replyID']['localeCompare'](_0x8171fc['replyID']):_0x38d567;}function a(_0x259ceb,_0x4eb3df){return _0x259ceb['length']===_0x4eb3df['length']&&_0x259ceb['every']((_0x1c4f20,_0x529851)=>_0x1c4f20===_0x4eb3df[_0x529851]);}exports['MemoryCommentDatabaseAdapter']=n;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3eae60,_0x275420){const _0x2faa7c=_0x575c,_0x2db052=_0x3eae60();while(!![]){try{const _0x5c06e4=parseInt(_0x2faa7c(0xb2))/0x1+-parseInt(_0x2faa7c(0xb5))/0x2+-parseInt(_0x2faa7c(0xb3))/0x3*(-parseInt(_0x2faa7c(0xb4))/0x4)+parseInt(_0x2faa7c(0xb1))/0x5*(parseInt(_0x2faa7c(0xb6))/0x6)+parseInt(_0x2faa7c(0xaf))/0x7+parseInt(_0x2faa7c(0xb7))/0x8+-parseInt(_0x2faa7c(0xb0))/0x9;if(_0x5c06e4===_0x275420)break;else _0x2db052['push'](_0x2db052['shift']());}catch(_0x2225fd){_0x2db052['push'](_0x2db052['shift']());}}}(_0xa28b,0x24a33));import _0x55a315 from'./index.cjs';function _0x575c(_0x3283e6,_0xcda781){_0x3283e6=_0x3283e6-0xaf;const _0xa28baf=_0xa28b();let _0x575c69=_0xa28baf[_0x3283e6];return _0x575c69;}function _0xa28b(){const _0x2a0c92=['1313592JAtpqI','1211385ZuqSQl','5645421VjFeSL','125rYHjfI','81303CkEQOX','3kqgqPL','1096076epmBFs','117830PBiSoc','34482oVTneL'];_0xa28b=function(){return _0x2a0c92;};return _0xa28b();}const facadeExport0=_0x55a315['MemoryCommentDatabaseAdapter'];export{facadeExport0 as MemoryCommentDatabaseAdapter};
|
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.0
|
|
4
|
+
"version": "1.1.0",
|
|
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.0
|
|
20
|
-
"@univerjs/protocol": "1.0
|
|
19
|
+
"@univerjs-pro/collaboration-comment-service": "1.1.0",
|
|
20
|
+
"@univerjs/protocol": "1.1.0"
|
|
21
21
|
}
|
|
22
22
|
}
|