@univerjs-pro/collaboration-history-endpoint 1.0.2 → 1.0.3
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 +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});let e=require('@univerjs-pro/collaboration-service'),t=require('@univerjs-pro/collaboration-transport-node'),n=require('@univerjs/protocol');var r={'code':n['ErrorCode']['OK'],'message':''},i=class{['_service'];['_disposed']=!0x1;constructor(
|
|
1
|
+
Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});let e=require('@univerjs-pro/collaboration-service'),t=require('@univerjs-pro/collaboration-transport-node'),n=require('@univerjs/protocol');var r={'code':n['ErrorCode']['OK'],'message':''},i=class{['_service'];['_disposed']=!0x1;constructor(_0x30d3e5){if(this['_service']=_0x30d3e5,!_0x30d3e5)throw TypeError('UniverHistoryEndpoint\x20requires\x20a\x20service');}['register'](_0x533ac5){if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');for(let [_0x2a308d,_0x867026]of[['list','list'],['creators','creators'],['cs','changesets']])_0x533ac5['get']('/universer-api/history/:unitID/'+_0x2a308d,_0x13417c=>this['_handleHttp'](_0x13417c,{'name':_0x867026,'unitID':_0x13417c['params']['unitID']}));}async['_handleHttp'](_0x44dd15,_0x1c1b8a){try{if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');let _0x5ab5b0=new URL(_0x44dd15['incomingMessage']['url']??'/','http://localhost');if(!_0x44dd15['userID'])throw new e['CollabError']('UNAUTHENTICATED','HTTP\x20user\x20is\x20not\x20authenticated');let _0x5ea7cf={'userID':_0x44dd15['userID'],'customData':_0x44dd15['customData']};switch(_0x1c1b8a['name']){case'list':{let _0x2a5dfd=await this['_service']['getHistoryList']({'unitID':_0x1c1b8a['unitID'],'length':o(_0x5ab5b0['searchParams']['get']('length')),..._0x5ab5b0['searchParams']['get']('lastLabel')?{'lastLabel':_0x5ab5b0['searchParams']['get']('lastLabel')}:{},...c(_0x5ab5b0['searchParams']['get']('origin')),'userIDs':_0x5ab5b0['searchParams']['getAll']('userIds')['filter'](Boolean)},_0x5ea7cf);d(_0x44dd15['response'],0xc8,{'error':r,...a(_0x2a5dfd)});return;}case'creators':{let _0x476704=await this['_service']['listHistoryCreators']({'unitID':_0x1c1b8a['unitID']},_0x5ea7cf);d(_0x44dd15['response'],0xc8,{'error':r,'creators':_0x476704['creators']['map'](({userID:_0x369951,..._0x3da507})=>({..._0x3da507,'userId':_0x369951}))});return;}case'changesets':{let _0x190ad3=s(_0x5ab5b0['searchParams']['get']('startRevision'),'startRevision'),_0x3f7c9e=s(_0x5ab5b0['searchParams']['get']('endRevision'),'endRevision'),_0x484f2b=await this['_service']['getHistoryChangesets']({'unitID':_0x1c1b8a['unitID'],'startRevision':_0x190ad3,'endRevision':_0x3f7c9e},_0x5ea7cf);d(_0x44dd15['response'],0xc8,{'error':r,..._0x484f2b});return;}}}catch(_0x3943fd){l(_0x44dd15['response'],_0x3943fd);}}['dispose'](){this['_disposed']=!0x0;}};function a(_0x34bc2f){let _0xc78007=Object['fromEntries'](Object['entries'](_0x34bc2f['entities']['datas'])['map'](([_0x140e1d,{userID:_0x46a570,unitID:_0x4d4a6d,userIDs:_0x4cb21b,..._0x4b416f}])=>[_0x140e1d,{..._0x4b416f,'userId':_0x46a570,'unitId':_0x4d4a6d,'userIds':_0x4cb21b}]));return{..._0x34bc2f,'entities':{..._0x34bc2f['entities'],'datas':_0xc78007}};}function o(_0x1858b8){return _0x1858b8===null||_0x1858b8===''?0x14:s(_0x1858b8,'length');}function s(_0x5e72eb,_0x455ee0){if(!_0x5e72eb||!/^\d+$/['test'](_0x5e72eb))throw new e['CollabError']('INVALID_REQUEST',_0x455ee0+'\x20must\x20be\x20a\x20positive\x20integer');let _0x42dcdd=Number(_0x5e72eb);if(!Number['isSafeInteger'](_0x42dcdd)||_0x42dcdd<0x1)throw new e['CollabError']('INVALID_REQUEST',_0x455ee0+'\x20must\x20be\x20a\x20positive\x20integer');return _0x42dcdd;}function c(_0x69d6bf){if(_0x69d6bf===null||_0x69d6bf===''||_0x69d6bf==='0')return{};if(_0x69d6bf==='1'||_0x69d6bf==='2')return{'origin':Number(_0x69d6bf)};throw new e['CollabError']('INVALID_REQUEST','origin\x20must\x20be\x200,\x201\x20or\x202');}function l(_0x3d9318,_0x193c82){let _0x1f3066=u(_0x193c82);d(_0x3d9318,_0x1f3066['status'],{'error':_0x1f3066['error']});}function u(_0x3cbfb7){if(_0x3cbfb7 instanceof t['NodeTransportError'])return{'status':_0x3cbfb7['code']==='REQUEST_BODY_TOO_LARGE'?0x19d:_0x3cbfb7['code']==='TRANSPORT_DISPOSED'?0x1f7:0x190,'error':{'code':_0x3cbfb7['code']==='TRANSPORT_DISPOSED'?n['ErrorCode']['INTERNAL_ERROR']:n['ErrorCode']['INVALID_ARGUMENT'],'message':_0x3cbfb7['message']}};if(!(_0x3cbfb7 instanceof e['CollabError']))return{'status':0x1f4,'error':{'code':n['ErrorCode']['INTERNAL_ERROR'],'message':'Internal\x20server\x20error'}};let _0x69ffc7={'UNAUTHENTICATED':{'status':0x191,'code':n['ErrorCode']['UNAUTHENTICATED']},'INVALID_REQUEST':{'status':0x190,'code':n['ErrorCode']['INVALID_ARGUMENT']},'UNIT_NOT_FOUND':{'status':0x194,'code':n['ErrorCode']['NOT_FOUND']},'PERMISSION_DENIED':{'status':0x193,'code':n['ErrorCode']['PERMISSION_DENIED']},'OT_CONFLICT':{'status':0x199,'code':n['ErrorCode']['APPLY_REJECT']},'REVISION_MISMATCH':{'status':0x199,'code':n['ErrorCode']['CHANGESET_REVISION_CONFILICT']},'ADAPTER_FAILURE':{'status':0x1f7,'code':n['ErrorCode']['INTERNAL_ERROR']},'INTERNAL_ERROR':{'status':0x1f4,'code':n['ErrorCode']['INTERNAL_ERROR']}}[_0x3cbfb7['code']];return{'status':_0x69ffc7['status'],'error':{'code':_0x69ffc7['code'],'message':_0x3cbfb7['message']}};}function d(_0x102efd,_0x24fbb8,_0x2c28d2){_0x102efd['writableEnded']||_0x102efd['destroyed']||(_0x102efd['statusCode']=_0x24fbb8,_0x102efd['setHeader']('content-type','application/json;\x20charset=utf-8'),_0x102efd['end'](JSON['stringify'](_0x2c28d2)));}exports['UniverHistoryEndpoint']=i;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x435c(){const _0x1bf254=['1225dRDCDJ','1883406BxluZE','498hwsJeg','203924JoKdTL','849790DBKiGQ','280128TwtyRC','UniverHistoryEndpoint','8VbDrhX','1byyKwx','45936BIBRZo','400725bXUvNd','9FrCEJP'];_0x435c=function(){return _0x1bf254;};return _0x435c();}function _0x54ec(_0x1afc2e,_0x41c783){_0x1afc2e=_0x1afc2e-0x1b1;const _0x435c49=_0x435c();let _0x54ec7e=_0x435c49[_0x1afc2e];return _0x54ec7e;}const _0x9d40f1=_0x54ec;(function(_0x3d773f,_0x258dce){const _0x346589=_0x54ec,_0x23a47d=_0x3d773f();while(!![]){try{const _0x24aa5b=-parseInt(_0x346589(0x1b5))/0x1*(-parseInt(_0x346589(0x1b2))/0x2)+-parseInt(_0x346589(0x1b7))/0x3+-parseInt(_0x346589(0x1bc))/0x4+parseInt(_0x346589(0x1b9))/0x5*(parseInt(_0x346589(0x1bb))/0x6)+-parseInt(_0x346589(0x1ba))/0x7*(-parseInt(_0x346589(0x1b4))/0x8)+parseInt(_0x346589(0x1b8))/0x9*(-parseInt(_0x346589(0x1b1))/0xa)+-parseInt(_0x346589(0x1b6))/0xb;if(_0x24aa5b===_0x258dce)break;else _0x23a47d['push'](_0x23a47d['shift']());}catch(_0x578234){_0x23a47d['push'](_0x23a47d['shift']());}}}(_0x435c,0x26062));import _0x258bd6 from'./index.cjs';const facadeExport0=_0x258bd6[_0x9d40f1(0x1b3)];export{facadeExport0 as UniverHistoryEndpoint};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/collaboration-history-endpoint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@univerjs-pro/collaboration-history-service": "1.0.
|
|
20
|
-
"@univerjs-pro/collaboration-service": "1.0.
|
|
21
|
-
"@univerjs-pro/collaboration-transport-node": "1.0.
|
|
22
|
-
"@univerjs/protocol": "1.0.
|
|
19
|
+
"@univerjs-pro/collaboration-history-service": "1.0.3",
|
|
20
|
+
"@univerjs-pro/collaboration-service": "1.0.3",
|
|
21
|
+
"@univerjs-pro/collaboration-transport-node": "1.0.3",
|
|
22
|
+
"@univerjs/protocol": "1.0.3"
|
|
23
23
|
}
|
|
24
24
|
}
|