@univerjs-pro/collaboration-comment-database-memory 1.1.0 → 1.3.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'](_0x442bf4,_0x17641a){return this['_call'](()=>this['_enqueue'](_0x442bf4['unitID'],()=>{let _0x494dc0=this['_unit'](_0x442bf4['unitID']);if(_0x494dc0['has'](_0x442bf4['threadID']))return{'status':'duplicate'};let _0x32e73f=Date['now'](),_0x5c3383={..._0x442bf4,'replyID':_0x442bf4['threadID'],'mentions':[..._0x442bf4['mentions']],'solved':t['CommentSolvedStatus']['OpenOrReOpen'],'createdAt':_0x32e73f,'updatedAt':_0x32e73f,'generation':(0x0,e['randomUUID'])()};return _0x494dc0['set'](_0x5c3383['replyID'],_0x5c3383),{'status':'created','record':r(_0x5c3383)};}));}['createReply'](_0x417a87,_0xf4776d){return this['_call'](()=>this['_enqueue'](_0x417a87['unitID'],()=>{let _0x3e05c7=this['_unit'](_0x417a87['unitID']);if(_0x3e05c7['has'](_0x417a87['replyID']))return{'status':'duplicate'};let _0x159eff=_0x3e05c7['get'](_0x417a87['threadID']);if(!_0x159eff||_0x159eff['replyID']!==_0x159eff['threadID'])return{'status':'not-found'};if(_0x159eff['solved']!==t['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};let _0x38defe=Date['now'](),_0x38e1b0={..._0x417a87,'mentions':[..._0x417a87['mentions']],'solved':_0x159eff['solved'],'createdAt':_0x38defe,'updatedAt':_0x38defe,'generation':(0x0,e['randomUUID'])()};return _0x3e05c7['set'](_0x38e1b0['replyID'],_0x38e1b0),{'status':'created','record':r(_0x38e1b0)};}));}['getComment'](_0x4c5645,_0x36dab){return this['_call'](()=>this['_enqueue'](_0x4c5645['unitID'],()=>{let _0x497d11=this['_units']['get'](_0x4c5645['unitID'])?.['get'](_0x4c5645['replyID']);return _0x497d11?.['threadID']===_0x4c5645['threadID']?r(_0x497d11):null;}));}['listThreads'](_0x3cd32d,_0x2dd46e){return this['_call'](()=>this['_enqueue'](_0x3cd32d['unitID'],()=>{let _0x1db459=new Set(_0x3cd32d['threadIDs']);return[...this['_units']['get'](_0x3cd32d['unitID'])?.['values']()??[]]['filter'](_0x2a150b=>_0x1db459['size']===0x0||_0x1db459['has'](_0x2a150b['threadID']))['sort'](i)['map'](r);}));}['editComment'](_0x1c3d09,_0x21a465){return this['_call'](()=>this['_enqueue'](_0x1c3d09['unitID'],()=>{let _0x4b0f8b=this['_units']['get'](_0x1c3d09['unitID']),_0x41dc83=_0x4b0f8b?.['get'](_0x1c3d09['replyID']),_0x5c98b6=_0x4b0f8b?.['get'](_0x1c3d09['threadID']);if(!_0x41dc83||_0x41dc83['threadID']!==_0x1c3d09['threadID']||!_0x5c98b6)return{'status':'not-found'};if(_0x5c98b6['solved']!==t['CommentSolvedStatus']['OpenOrReOpen'])return{'status':'closed'};if(_0x41dc83['authorUserID']!==_0x1c3d09['expectedAuthorUserID'])return{'status':'author-mismatch'};if(_0x41dc83['content']===_0x1c3d09['content']&&a(_0x41dc83['mentions'],_0x1c3d09['mentions']))return{'status':'unchanged','record':r(_0x41dc83)};let _0x4f578d={..._0x41dc83,'content':_0x1c3d09['content'],'mentions':[..._0x1c3d09['mentions']],'updatedAt':Math['max'](Date['now'](),_0x41dc83['updatedAt']+0x1)};return _0x4b0f8b['set'](_0x1c3d09['replyID'],_0x4f578d),{'status':'edited','record':r(_0x4f578d)};}));}['setThreadSolved'](_0xd3ca5,_0x2e0cce){return this['_call'](()=>this['_enqueue'](_0xd3ca5['unitID'],()=>{let _0x5419fd=this['_units']['get'](_0xd3ca5['unitID']),_0x4a3855=_0x5419fd?.['get'](_0xd3ca5['threadID']);return!_0x4a3855||_0x4a3855['replyID']!==_0x4a3855['threadID']?{'status':'not-found'}:_0x4a3855['solved']===_0xd3ca5['solved']?{'status':'unchanged'}:(_0x5419fd['set'](_0xd3ca5['threadID'],{..._0x4a3855,'solved':_0xd3ca5['solved'],'updatedAt':Math['max'](Date['now'](),_0x4a3855['updatedAt']+0x1)}),{'status':'updated'});}));}['deleteComment'](_0xb9b752,_0xd11fac){return this['_call'](()=>this['_enqueue'](_0xb9b752['unitID'],()=>{let _0x511f13=this['_units']['get'](_0xb9b752['unitID']),_0x1551fe=_0xb9b752['replyID']??_0xb9b752['threadID'],_0x258bfc=_0x511f13?.['get'](_0x1551fe);if(!_0x258bfc||_0x258bfc['threadID']!==_0xb9b752['threadID'])return{'status':'not-found'};if(_0x258bfc['generation']!==_0xb9b752['expectedGeneration'])return{'status':'generation-mismatch'};if(_0xb9b752['replyID']===void 0x0){for(let [_0x28f83b,_0x11e21f]of _0x511f13)_0x11e21f['threadID']===_0xb9b752['threadID']&&_0x511f13['delete'](_0x28f83b);}else _0x511f13['delete'](_0xb9b752['replyID']);return _0x511f13['size']===0x0&&this['_units']['delete'](_0xb9b752['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'](_0x2e316){let _0x54ad70=this['_units']['get'](_0x2e316);if(_0x54ad70)return _0x54ad70;let _0x5eb55a=new Map();return this['_units']['set'](_0x2e316,_0x5eb55a),_0x5eb55a;}['_enqueue'](_0x2c9429,_0x587c31){let _0x1b48bf=(this['_queues']['get'](_0x2c9429)??Promise['resolve']())['catch'](()=>void 0x0)['then'](_0x587c31),_0x465be9=_0x1b48bf['then'](()=>void 0x0,()=>void 0x0);return this['_queues']['set'](_0x2c9429,_0x465be9),_0x465be9['finally'](()=>{this['_queues']['get'](_0x2c9429)===_0x465be9&&this['_queues']['delete'](_0x2c9429);}),_0x1b48bf;}['_call'](_0x21b4f8){if(this['_state']!=='running')return Promise['reject'](Error('Memory\x20Comment\x20Database\x20Adapter\x20is\x20'+this['_state']));let _0x269b8b=_0x21b4f8();return this['_calls']['add'](_0x269b8b),_0x269b8b['finally'](()=>this['_calls']['delete'](_0x269b8b))['catch'](()=>void 0x0),_0x269b8b;}};function r(_0x98f494){return{..._0x98f494,'mentions':[..._0x98f494['mentions']]};}function i(_0x464805,_0x20e3e7){let _0x3df832=_0x464805['threadID']['localeCompare'](_0x20e3e7['threadID']);return _0x3df832===0x0?_0x464805['replyID']===_0x464805['threadID']?-0x1:_0x20e3e7['replyID']===_0x20e3e7['threadID']?0x1:_0x464805['createdAt']-_0x20e3e7['createdAt']||_0x464805['replyID']['localeCompare'](_0x20e3e7['replyID']):_0x3df832;}function a(_0x3207d4,_0x429a13){return _0x3207d4['length']===_0x429a13['length']&&_0x3207d4['every']((_0x6d5d4f,_0x4e387e)=>_0x6d5d4f===_0x429a13[_0x4e387e]);}exports['MemoryCommentDatabaseAdapter']=n;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x346b(){const _0x30c65a=['21CrbwPc','331378CorySp','2265345zyolku','911514xBXwMS','MemoryCommentDatabaseAdapter','89080PUStKQ','308598ogYWce','807814WoTjKZ','5sEBAUE','1622396HKCwVO'];_0x346b=function(){return _0x30c65a;};return _0x346b();}const _0x208968=_0x407b;(function(_0x5c2447,_0x3ec6d9){const _0x397828=_0x407b,_0x490158=_0x5c2447();while(!![]){try{const _0xcb01b2=-parseInt(_0x397828(0x113))/0x1+-parseInt(_0x397828(0x10f))/0x2+parseInt(_0x397828(0x10b))/0x3+-parseInt(_0x397828(0x111))/0x4*(-parseInt(_0x397828(0x110))/0x5)+-parseInt(_0x397828(0x10e))/0x6+-parseInt(_0x397828(0x112))/0x7*(-parseInt(_0x397828(0x10d))/0x8)+parseInt(_0x397828(0x114))/0x9;if(_0xcb01b2===_0x3ec6d9)break;else _0x490158['push'](_0x490158['shift']());}catch(_0x16ce53){_0x490158['push'](_0x490158['shift']());}}}(_0x346b,0x32bd5));function _0x407b(_0x32f38a,_0x3db05a){_0x32f38a=_0x32f38a-0x10b;const _0x346b8d=_0x346b();let _0x407b15=_0x346b8d[_0x32f38a];return _0x407b15;}import _0xf93992 from'./index.cjs';const facadeExport0=_0xf93992[_0x208968(0x10c)];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.
|
|
4
|
+
"version": "1.3.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.
|
|
20
|
-
"@univerjs/protocol": "1.
|
|
19
|
+
"@univerjs-pro/collaboration-comment-service": "1.3.0",
|
|
20
|
+
"@univerjs/protocol": "1.3.0"
|
|
21
21
|
}
|
|
22
22
|
}
|