@univerjs-pro/collaboration-history-endpoint 1.0.0 → 1.0.2
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(_0x3cf397){if(this['_service']=_0x3cf397,!_0x3cf397)throw TypeError('UniverHistoryEndpoint\x20requires\x20a\x20service');}['register'](_0x22b7e6){if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');for(let [_0x381cbb,_0x31afe2]of[['list','list'],['creators','creators'],['cs','changesets']])_0x22b7e6['get']('/universer-api/history/:unitID/'+_0x381cbb,_0x3b9628=>this['_handleHttp'](_0x3b9628,{'name':_0x31afe2,'unitID':_0x3b9628['params']['unitID']}));}async['_handleHttp'](_0x2bb220,_0x4d8730){try{if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');let _0x59b5cd=new URL(_0x2bb220['incomingMessage']['url']??'/','http://localhost');if(!_0x2bb220['userID'])throw new e['CollabError']('UNAUTHENTICATED','HTTP\x20user\x20is\x20not\x20authenticated');let _0x4a5f72={'userID':_0x2bb220['userID'],'customData':_0x2bb220['customData']};switch(_0x4d8730['name']){case'list':{let _0x57b7f1=await this['_service']['getHistoryList']({'unitID':_0x4d8730['unitID'],'length':o(_0x59b5cd['searchParams']['get']('length')),..._0x59b5cd['searchParams']['get']('lastLabel')?{'lastLabel':_0x59b5cd['searchParams']['get']('lastLabel')}:{},...c(_0x59b5cd['searchParams']['get']('origin')),'userIDs':_0x59b5cd['searchParams']['getAll']('userIds')['filter'](Boolean)},_0x4a5f72);d(_0x2bb220['response'],0xc8,{'error':r,...a(_0x57b7f1)});return;}case'creators':{let _0xe3512a=await this['_service']['listHistoryCreators']({'unitID':_0x4d8730['unitID']},_0x4a5f72);d(_0x2bb220['response'],0xc8,{'error':r,'creators':_0xe3512a['creators']['map'](({userID:_0x55a1cf,..._0x338449})=>({..._0x338449,'userId':_0x55a1cf}))});return;}case'changesets':{let _0x4b5873=s(_0x59b5cd['searchParams']['get']('startRevision'),'startRevision'),_0x5a8e4e=s(_0x59b5cd['searchParams']['get']('endRevision'),'endRevision'),_0x4cb00d=await this['_service']['getHistoryChangesets']({'unitID':_0x4d8730['unitID'],'startRevision':_0x4b5873,'endRevision':_0x5a8e4e},_0x4a5f72);d(_0x2bb220['response'],0xc8,{'error':r,..._0x4cb00d});return;}}}catch(_0x509b68){l(_0x2bb220['response'],_0x509b68);}}['dispose'](){this['_disposed']=!0x0;}};function a(_0x55dc4c){let _0x76b177=Object['fromEntries'](Object['entries'](_0x55dc4c['entities']['datas'])['map'](([_0x27453a,{userID:_0x12a617,unitID:_0x4f72ec,userIDs:_0x210bc3,..._0x23248d}])=>[_0x27453a,{..._0x23248d,'userId':_0x12a617,'unitId':_0x4f72ec,'userIds':_0x210bc3}]));return{..._0x55dc4c,'entities':{..._0x55dc4c['entities'],'datas':_0x76b177}};}function o(_0x4404e9){return _0x4404e9===null||_0x4404e9===''?0x14:s(_0x4404e9,'length');}function s(_0x506e1f,_0xc7b800){if(!_0x506e1f||!/^\d+$/['test'](_0x506e1f))throw new e['CollabError']('INVALID_REQUEST',_0xc7b800+'\x20must\x20be\x20a\x20positive\x20integer');let _0x4ab426=Number(_0x506e1f);if(!Number['isSafeInteger'](_0x4ab426)||_0x4ab426<0x1)throw new e['CollabError']('INVALID_REQUEST',_0xc7b800+'\x20must\x20be\x20a\x20positive\x20integer');return _0x4ab426;}function c(_0x510a91){if(_0x510a91===null||_0x510a91===''||_0x510a91==='0')return{};if(_0x510a91==='1'||_0x510a91==='2')return{'origin':Number(_0x510a91)};throw new e['CollabError']('INVALID_REQUEST','origin\x20must\x20be\x200,\x201\x20or\x202');}function l(_0x4b312d,_0x195f50){let _0x4c4e19=u(_0x195f50);d(_0x4b312d,_0x4c4e19['status'],{'error':_0x4c4e19['error']});}function u(_0x424471){if(_0x424471 instanceof t['NodeTransportError'])return{'status':_0x424471['code']==='REQUEST_BODY_TOO_LARGE'?0x19d:_0x424471['code']==='TRANSPORT_DISPOSED'?0x1f7:0x190,'error':{'code':_0x424471['code']==='TRANSPORT_DISPOSED'?n['ErrorCode']['INTERNAL_ERROR']:n['ErrorCode']['INVALID_ARGUMENT'],'message':_0x424471['message']}};if(!(_0x424471 instanceof e['CollabError']))return{'status':0x1f4,'error':{'code':n['ErrorCode']['INTERNAL_ERROR'],'message':'Internal\x20server\x20error'}};let _0x4bb07c={'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']}}[_0x424471['code']];return{'status':_0x4bb07c['status'],'error':{'code':_0x4bb07c['code'],'message':_0x424471['message']}};}function d(_0x33932b,_0x42379e,_0x452c23){_0x33932b['writableEnded']||_0x33932b['destroyed']||(_0x33932b['statusCode']=_0x42379e,_0x33932b['setHeader']('content-type','application/json;\x20charset=utf-8'),_0x33932b['end'](JSON['stringify'](_0x452c23)));}exports['UniverHistoryEndpoint']=i;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42954f,_0x3336c4){const _0x50273f=_0x212b,_0x150b76=_0x42954f();while(!![]){try{const _0x432ea1=parseInt(_0x50273f(0x94))/0x1*(-parseInt(_0x50273f(0x99))/0x2)+-parseInt(_0x50273f(0x93))/0x3*(parseInt(_0x50273f(0x9b))/0x4)+parseInt(_0x50273f(0x9d))/0x5+-parseInt(_0x50273f(0x96))/0x6*(parseInt(_0x50273f(0x95))/0x7)+-parseInt(_0x50273f(0x9a))/0x8*(-parseInt(_0x50273f(0x9c))/0x9)+parseInt(_0x50273f(0x97))/0xa*(-parseInt(_0x50273f(0x98))/0xb)+-parseInt(_0x50273f(0x92))/0xc;if(_0x432ea1===_0x3336c4)break;else _0x150b76['push'](_0x150b76['shift']());}catch(_0x6709f3){_0x150b76['push'](_0x150b76['shift']());}}}(_0x523f,0xe9f36));import _0x15518d from'./index.cjs';function _0x212b(_0x2eb11d,_0x5d7eb4){_0x2eb11d=_0x2eb11d-0x92;const _0x523fb8=_0x523f();let _0x212ba9=_0x523fb8[_0x2eb11d];return _0x212ba9;}const facadeExport0=_0x15518d['UniverHistoryEndpoint'];function _0x523f(){const _0x269279=['3114QjRiLJ','9279175EwUskg','1198116TJpdzy','129513DiosDK','22924XnTXuI','14eVuGna','1812138vmzGeZ','2420490JMsOkP','11AtllQa','10atLYtA','12752FBofNz','36MCXEWN'];_0x523f=function(){return _0x269279;};return _0x523f();}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.2",
|
|
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.2",
|
|
20
|
+
"@univerjs-pro/collaboration-service": "1.0.2",
|
|
21
|
+
"@univerjs-pro/collaboration-transport-node": "1.0.2",
|
|
22
|
+
"@univerjs/protocol": "1.0.2"
|
|
23
23
|
}
|
|
24
24
|
}
|