@univerjs-pro/collaboration-history-endpoint 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 +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(_0x46c8e5){if(this['_service']=_0x46c8e5,!_0x46c8e5)throw TypeError('UniverHistoryEndpoint\x20requires\x20a\x20service');}['register'](_0x1ccb7a){if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');for(let [_0x5cdf3b,_0x359ce1]of[['list','list'],['creators','creators'],['cs','changesets']])_0x1ccb7a['get']('/universer-api/history/:unitID/'+_0x5cdf3b,_0x32fd3e=>this['_handleHttp'](_0x32fd3e,{'name':_0x359ce1,'unitID':_0x32fd3e['params']['unitID']}));}async['_handleHttp'](_0x5d4861,_0x5260ef){try{if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');let _0x5f2556=new URL(_0x5d4861['incomingMessage']['url']??'/','http://localhost');if(!_0x5d4861['userID'])throw new e['CollabError']('UNAUTHENTICATED','HTTP\x20user\x20is\x20not\x20authenticated');let _0x2b6a59={'userID':_0x5d4861['userID'],'customData':_0x5d4861['customData']};switch(_0x5260ef['name']){case'list':{let _0x5a53d2=await this['_service']['getHistoryList']({'unitID':_0x5260ef['unitID'],'length':o(_0x5f2556['searchParams']['get']('length')),..._0x5f2556['searchParams']['get']('lastLabel')?{'lastLabel':_0x5f2556['searchParams']['get']('lastLabel')}:{},...c(_0x5f2556['searchParams']['get']('origin')),'userIDs':_0x5f2556['searchParams']['getAll']('userIds')['filter'](Boolean)},_0x2b6a59);d(_0x5d4861['response'],0xc8,{'error':r,...a(_0x5a53d2)});return;}case'creators':{let _0x1b0237=await this['_service']['listHistoryCreators']({'unitID':_0x5260ef['unitID']},_0x2b6a59);d(_0x5d4861['response'],0xc8,{'error':r,'creators':_0x1b0237['creators']['map'](({userID:_0x10d9c9,..._0x282110})=>({..._0x282110,'userId':_0x10d9c9}))});return;}case'changesets':{let _0x41bd68=s(_0x5f2556['searchParams']['get']('startRevision'),'startRevision'),_0x4cd402=s(_0x5f2556['searchParams']['get']('endRevision'),'endRevision'),_0x48ce93=await this['_service']['getHistoryChangesets']({'unitID':_0x5260ef['unitID'],'startRevision':_0x41bd68,'endRevision':_0x4cd402},_0x2b6a59);d(_0x5d4861['response'],0xc8,{'error':r,..._0x48ce93});return;}}}catch(_0x28ea9f){l(_0x5d4861['response'],_0x28ea9f);}}['dispose'](){this['_disposed']=!0x0;}};function a(_0x39bfe9){let _0x4fa71d=Object['fromEntries'](Object['entries'](_0x39bfe9['entities']['datas'])['map'](([_0x506fb6,{userID:_0x77abb0,unitID:_0x51fc3e,userIDs:_0x178968,..._0x1d9aa0}])=>[_0x506fb6,{..._0x1d9aa0,'userId':_0x77abb0,'unitId':_0x51fc3e,'userIds':_0x178968}]));return{..._0x39bfe9,'entities':{..._0x39bfe9['entities'],'datas':_0x4fa71d}};}function o(_0x295311){return _0x295311===null||_0x295311===''?0x14:s(_0x295311,'length');}function s(_0x2206f5,_0x49fd03){if(!_0x2206f5||!/^\d+$/['test'](_0x2206f5))throw new e['CollabError']('INVALID_REQUEST',_0x49fd03+'\x20must\x20be\x20a\x20positive\x20integer');let _0x57acf7=Number(_0x2206f5);if(!Number['isSafeInteger'](_0x57acf7)||_0x57acf7<0x1)throw new e['CollabError']('INVALID_REQUEST',_0x49fd03+'\x20must\x20be\x20a\x20positive\x20integer');return _0x57acf7;}function c(_0x15cbf0){if(_0x15cbf0===null||_0x15cbf0===''||_0x15cbf0==='0')return{};if(_0x15cbf0==='1'||_0x15cbf0==='2')return{'origin':Number(_0x15cbf0)};throw new e['CollabError']('INVALID_REQUEST','origin\x20must\x20be\x200,\x201\x20or\x202');}function l(_0x5ec3c7,_0x401dad){let _0x3a4de3=u(_0x401dad);d(_0x5ec3c7,_0x3a4de3['status'],{'error':_0x3a4de3['error']});}function u(_0xd59b99){if(_0xd59b99 instanceof t['NodeTransportError'])return{'status':_0xd59b99['code']==='REQUEST_BODY_TOO_LARGE'?0x19d:_0xd59b99['code']==='TRANSPORT_DISPOSED'?0x1f7:0x190,'error':{'code':_0xd59b99['code']==='TRANSPORT_DISPOSED'?n['ErrorCode']['INTERNAL_ERROR']:n['ErrorCode']['INVALID_ARGUMENT'],'message':_0xd59b99['message']}};if(!(_0xd59b99 instanceof e['CollabError']))return{'status':0x1f4,'error':{'code':n['ErrorCode']['INTERNAL_ERROR'],'message':'Internal\x20server\x20error'}};let _0x27661f={'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']}}[_0xd59b99['code']];return{'status':_0x27661f['status'],'error':{'code':_0x27661f['code'],'message':_0xd59b99['message']}};}function d(_0x1f47a9,_0x35dff4,_0x59d887){_0x1f47a9['writableEnded']||_0x1f47a9['destroyed']||(_0x1f47a9['statusCode']=_0x35dff4,_0x1f47a9['setHeader']('content-type','application/json;\x20charset=utf-8'),_0x1f47a9['end'](JSON['stringify'](_0x59d887)));}exports['UniverHistoryEndpoint']=i;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f614a,_0x379423){const _0x24a794=_0x5c63,_0xedf621=_0x3f614a();while(!![]){try{const _0x31272d=-parseInt(_0x24a794(0x17a))/0x1+-parseInt(_0x24a794(0x17d))/0x2+parseInt(_0x24a794(0x17b))/0x3+-parseInt(_0x24a794(0x17c))/0x4*(parseInt(_0x24a794(0x17e))/0x5)+parseInt(_0x24a794(0x178))/0x6*(-parseInt(_0x24a794(0x177))/0x7)+parseInt(_0x24a794(0x180))/0x8*(-parseInt(_0x24a794(0x181))/0x9)+-parseInt(_0x24a794(0x179))/0xa*(-parseInt(_0x24a794(0x17f))/0xb);if(_0x31272d===_0x379423)break;else _0xedf621['push'](_0xedf621['shift']());}catch(_0x2c4a46){_0xedf621['push'](_0xedf621['shift']());}}}(_0xd615,0x46946));function _0x5c63(_0x811de0,_0x4e38b2){_0x811de0=_0x811de0-0x177;const _0xd6153a=_0xd615();let _0x5c63c9=_0xd6153a[_0x811de0];return _0x5c63c9;}function _0xd615(){const _0x2c65fa=['662376OgWURB','84476duWlQt','793454lJdNWk','10NAsypB','1397cqpgsN','120vlkfLZ','327258aFZJQT','203whrjRC','81534raoxzh','141340zlgGZl','348240ucnNYB'];_0xd615=function(){return _0x2c65fa;};return _0xd615();}import _0x57de60 from'./index.cjs';const facadeExport0=_0x57de60['UniverHistoryEndpoint'];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.1.0",
|
|
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.1.0",
|
|
20
|
+
"@univerjs-pro/collaboration-service": "1.1.0",
|
|
21
|
+
"@univerjs-pro/collaboration-transport-node": "1.1.0",
|
|
22
|
+
"@univerjs/protocol": "1.1.0"
|
|
23
23
|
}
|
|
24
24
|
}
|