@univerjs-pro/collaboration-history-endpoint 1.6.2 → 1.6.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(_0x2754fb){if(this['_service']=_0x2754fb,!_0x2754fb)throw TypeError('UniverHistoryEndpoint\x20requires\x20a\x20service');}['register'](_0x4447fe){if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');for(let [_0x124933,_0x4aa8c8]of[['list','list'],['creators','creators'],['cs','changesets']])_0x4447fe['get']('/universer-api/history/:unitID/'+_0x124933,_0x7a805f=>this['_handleHttp'](_0x7a805f,{'name':_0x4aa8c8,'unitID':_0x7a805f['params']['unitID']}));}async['_handleHttp'](_0x1b37d5,_0x296d4c){try{if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');let _0x19acba=new URL(_0x1b37d5['incomingMessage']['url']??'/','http://localhost');if(!_0x1b37d5['userID'])throw new e['CollabError']('UNAUTHENTICATED','HTTP\x20user\x20is\x20not\x20authenticated');let _0x66b34f={'userID':_0x1b37d5['userID'],'customData':_0x1b37d5['customData']};switch(_0x296d4c['name']){case'list':{let _0x1c57f7=await this['_service']['getHistoryList']({'unitID':_0x296d4c['unitID'],'length':s(_0x19acba['searchParams']['get']('length')),..._0x19acba['searchParams']['get']('lastLabel')?{'lastLabel':_0x19acba['searchParams']['get']('lastLabel')}:{},...l(_0x19acba['searchParams']['get']('origin')),'userIDs':_0x19acba['searchParams']['getAll']('userIds')['filter'](Boolean)},_0x66b34f);f(_0x1b37d5['response'],0xc8,{'error':r,...o(_0x1c57f7)});return;}case'creators':{let _0x354c62=await this['_service']['listHistoryCreators']({'unitID':_0x296d4c['unitID']},_0x66b34f);f(_0x1b37d5['response'],0xc8,{'error':r,'creators':_0x354c62['creators']['map'](({userID:_0x3430a8,..._0xf4bc75})=>({..._0xf4bc75,'userId':_0x3430a8}))});return;}case'changesets':{let _0x5a4626=c(_0x19acba['searchParams']['get']('startRevision'),'startRevision'),_0x5f3e13=c(_0x19acba['searchParams']['get']('endRevision'),'endRevision'),_0x1669d1=await this['_service']['getHistoryChangesets']({'unitID':_0x296d4c['unitID'],'startRevision':_0x5a4626,'endRevision':_0x5f3e13},_0x66b34f);f(_0x1b37d5['response'],0xc8,{'error':r,..._0x1669d1,'changesets':_0x1669d1['changesets']['map'](a)});return;}}}catch(_0x41927d){u(_0x1b37d5['response'],_0x41927d);}}['dispose'](){this['_disposed']=!0x0;}};function a(_0x3af6ff){let _0xd297ce={..._0x3af6ff};return delete _0xd297ce['metadata'],_0xd297ce;}function o(_0x1f2cf1){let _0x224463=Object['fromEntries'](Object['entries'](_0x1f2cf1['entities']['datas'])['map'](([_0x28e709,{userID:_0x3c7da9,unitID:_0x49ce2a,userIDs:_0x4a3525,..._0x4f3636}])=>[_0x28e709,{..._0x4f3636,'userId':_0x3c7da9,'unitId':_0x49ce2a,'userIds':_0x4a3525}]));return{..._0x1f2cf1,'entities':{..._0x1f2cf1['entities'],'datas':_0x224463}};}function s(_0x3aa20d){return _0x3aa20d===null||_0x3aa20d===''?0x14:c(_0x3aa20d,'length');}function c(_0x3407b5,_0x119a97){if(!_0x3407b5||!/^\d+$/['test'](_0x3407b5))throw new e['CollabError']('INVALID_REQUEST',_0x119a97+'\x20must\x20be\x20a\x20positive\x20integer');let _0x27ed11=Number(_0x3407b5);if(!Number['isSafeInteger'](_0x27ed11)||_0x27ed11<0x1)throw new e['CollabError']('INVALID_REQUEST',_0x119a97+'\x20must\x20be\x20a\x20positive\x20integer');return _0x27ed11;}function l(_0x2ff7ce){if(_0x2ff7ce===null||_0x2ff7ce===''||_0x2ff7ce==='0')return{};if(_0x2ff7ce==='1'||_0x2ff7ce==='2')return{'origin':Number(_0x2ff7ce)};throw new e['CollabError']('INVALID_REQUEST','origin\x20must\x20be\x200,\x201\x20or\x202');}function u(_0x178f81,_0x31f70f){let _0x2b1bd8=d(_0x31f70f);f(_0x178f81,_0x2b1bd8['status'],{'error':_0x2b1bd8['error']});}function d(_0x487d3c){if(_0x487d3c instanceof t['NodeTransportError'])return{'status':_0x487d3c['code']==='REQUEST_BODY_TOO_LARGE'?0x19d:_0x487d3c['code']==='TRANSPORT_DISPOSED'?0x1f7:0x190,'error':{'code':_0x487d3c['code']==='TRANSPORT_DISPOSED'?n['ErrorCode']['INTERNAL_ERROR']:n['ErrorCode']['INVALID_ARGUMENT'],'message':_0x487d3c['message']}};if(!(_0x487d3c instanceof e['CollabError']))return{'status':0x1f4,'error':{'code':n['ErrorCode']['INTERNAL_ERROR'],'message':'Internal\x20server\x20error'}};let _0x54dcda={'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']},'LICENSE_INVALID':{'status':0x1f4,'code':n['ErrorCode']['LICENSE_INVALID']},'LICENSE_POLICY_INVALID':{'status':0x1f4,'code':n['ErrorCode']['LICENSE_POLICY_INVALID']},'LICENSE_VERSION_NOT_ALLOWED':{'status':0x1f4,'code':n['ErrorCode']['LICENSE_VERSION_NOT_ALLOWED']},'LICENSE_UNIT_TYPE_REJECTED':{'status':0x193,'code':n['ErrorCode']['LICENSE_UNIT_TYPE_REJECTED']},'LICENSE_DOMAIN_REJECTED':{'status':0x193,'code':n['ErrorCode']['LICENSE_DOMAIN_REJECTED']}}[_0x487d3c['code']];return{'status':_0x54dcda['status'],'error':{'code':_0x54dcda['code'],'message':_0x487d3c['message']}};}function f(_0x2b8f24,_0x35d4c7,_0x3285d6){_0x2b8f24['writableEnded']||_0x2b8f24['destroyed']||(_0x2b8f24['statusCode']=_0x35d4c7,_0x2b8f24['setHeader']('content-type','application/json;\x20charset=utf-8'),_0x2b8f24['end'](JSON['stringify'](_0x3285d6)));}exports['UniverHistoryEndpoint']=i;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x52d6(_0x2ecb7a,_0x45f45e){_0x2ecb7a=_0x2ecb7a-0x117;const _0x2a1396=_0x2a13();let _0x52d655=_0x2a1396[_0x2ecb7a];return _0x52d655;}const _0xc16dd7=_0x52d6;(function(_0x3c4f6d,_0x549c26){const _0x406432=_0x52d6,_0x3d63d7=_0x3c4f6d();while(!![]){try{const _0x1404fa=-parseInt(_0x406432(0x11a))/0x1+parseInt(_0x406432(0x11b))/0x2+parseInt(_0x406432(0x11d))/0x3+-parseInt(_0x406432(0x11e))/0x4+-parseInt(_0x406432(0x117))/0x5*(parseInt(_0x406432(0x118))/0x6)+parseInt(_0x406432(0x119))/0x7+parseInt(_0x406432(0x11c))/0x8*(parseInt(_0x406432(0x120))/0x9);if(_0x1404fa===_0x549c26)break;else _0x3d63d7['push'](_0x3d63d7['shift']());}catch(_0x27f4f3){_0x3d63d7['push'](_0x3d63d7['shift']());}}}(_0x2a13,0x4ebc6));import _0x1d7fbd from'./index.cjs';const facadeExport0=_0x1d7fbd[_0xc16dd7(0x11f)];export{facadeExport0 as UniverHistoryEndpoint};function _0x2a13(){const _0x2b1c9d=['427400CYqBsi','24ijyTvZ','3483011nPTRvs','480325vfwvnQ','585876viXbkl','845752apwfQm','53376aiINfP','2037232NrHKnT','UniverHistoryEndpoint','72PbbbAF'];_0x2a13=function(){return _0x2b1c9d;};return _0x2a13();}
|
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.6.
|
|
4
|
+
"version": "1.6.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.6.
|
|
20
|
-
"@univerjs-pro/collaboration-service": "1.6.
|
|
21
|
-
"@univerjs-pro/collaboration-transport-node": "1.6.
|
|
22
|
-
"@univerjs/protocol": "1.6.
|
|
19
|
+
"@univerjs-pro/collaboration-history-service": "1.6.3",
|
|
20
|
+
"@univerjs-pro/collaboration-service": "1.6.3",
|
|
21
|
+
"@univerjs-pro/collaboration-transport-node": "1.6.3",
|
|
22
|
+
"@univerjs/protocol": "1.6.3"
|
|
23
23
|
}
|
|
24
24
|
}
|