@univerjs-pro/collaboration-history-endpoint 1.0.2 → 1.0.4
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(_0x42128f){if(this['_service']=_0x42128f,!_0x42128f)throw TypeError('UniverHistoryEndpoint\x20requires\x20a\x20service');}['register'](_0xad82d2){if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');for(let [_0x3f1f9d,_0x4b5350]of[['list','list'],['creators','creators'],['cs','changesets']])_0xad82d2['get']('/universer-api/history/:unitID/'+_0x3f1f9d,_0x167e91=>this['_handleHttp'](_0x167e91,{'name':_0x4b5350,'unitID':_0x167e91['params']['unitID']}));}async['_handleHttp'](_0x30faf2,_0x4598af){try{if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');let _0x266b84=new URL(_0x30faf2['incomingMessage']['url']??'/','http://localhost');if(!_0x30faf2['userID'])throw new e['CollabError']('UNAUTHENTICATED','HTTP\x20user\x20is\x20not\x20authenticated');let _0x27e78b={'userID':_0x30faf2['userID'],'customData':_0x30faf2['customData']};switch(_0x4598af['name']){case'list':{let _0x306e89=await this['_service']['getHistoryList']({'unitID':_0x4598af['unitID'],'length':o(_0x266b84['searchParams']['get']('length')),..._0x266b84['searchParams']['get']('lastLabel')?{'lastLabel':_0x266b84['searchParams']['get']('lastLabel')}:{},...c(_0x266b84['searchParams']['get']('origin')),'userIDs':_0x266b84['searchParams']['getAll']('userIds')['filter'](Boolean)},_0x27e78b);d(_0x30faf2['response'],0xc8,{'error':r,...a(_0x306e89)});return;}case'creators':{let _0x5b6f7c=await this['_service']['listHistoryCreators']({'unitID':_0x4598af['unitID']},_0x27e78b);d(_0x30faf2['response'],0xc8,{'error':r,'creators':_0x5b6f7c['creators']['map'](({userID:_0x1aa24c,..._0x1a1d32})=>({..._0x1a1d32,'userId':_0x1aa24c}))});return;}case'changesets':{let _0x599f24=s(_0x266b84['searchParams']['get']('startRevision'),'startRevision'),_0x29a4f3=s(_0x266b84['searchParams']['get']('endRevision'),'endRevision'),_0x13c87e=await this['_service']['getHistoryChangesets']({'unitID':_0x4598af['unitID'],'startRevision':_0x599f24,'endRevision':_0x29a4f3},_0x27e78b);d(_0x30faf2['response'],0xc8,{'error':r,..._0x13c87e});return;}}}catch(_0x42f32e){l(_0x30faf2['response'],_0x42f32e);}}['dispose'](){this['_disposed']=!0x0;}};function a(_0x3c5808){let _0xe52217=Object['fromEntries'](Object['entries'](_0x3c5808['entities']['datas'])['map'](([_0x4de552,{userID:_0x114684,unitID:_0x1e848a,userIDs:_0x2d4938,..._0x3634ea}])=>[_0x4de552,{..._0x3634ea,'userId':_0x114684,'unitId':_0x1e848a,'userIds':_0x2d4938}]));return{..._0x3c5808,'entities':{..._0x3c5808['entities'],'datas':_0xe52217}};}function o(_0x94b6f3){return _0x94b6f3===null||_0x94b6f3===''?0x14:s(_0x94b6f3,'length');}function s(_0x3e1ad4,_0x1cdc79){if(!_0x3e1ad4||!/^\d+$/['test'](_0x3e1ad4))throw new e['CollabError']('INVALID_REQUEST',_0x1cdc79+'\x20must\x20be\x20a\x20positive\x20integer');let _0x475d0e=Number(_0x3e1ad4);if(!Number['isSafeInteger'](_0x475d0e)||_0x475d0e<0x1)throw new e['CollabError']('INVALID_REQUEST',_0x1cdc79+'\x20must\x20be\x20a\x20positive\x20integer');return _0x475d0e;}function c(_0x1eb14e){if(_0x1eb14e===null||_0x1eb14e===''||_0x1eb14e==='0')return{};if(_0x1eb14e==='1'||_0x1eb14e==='2')return{'origin':Number(_0x1eb14e)};throw new e['CollabError']('INVALID_REQUEST','origin\x20must\x20be\x200,\x201\x20or\x202');}function l(_0x4f47bc,_0x1798dd){let _0x5c94c5=u(_0x1798dd);d(_0x4f47bc,_0x5c94c5['status'],{'error':_0x5c94c5['error']});}function u(_0x4c3841){if(_0x4c3841 instanceof t['NodeTransportError'])return{'status':_0x4c3841['code']==='REQUEST_BODY_TOO_LARGE'?0x19d:_0x4c3841['code']==='TRANSPORT_DISPOSED'?0x1f7:0x190,'error':{'code':_0x4c3841['code']==='TRANSPORT_DISPOSED'?n['ErrorCode']['INTERNAL_ERROR']:n['ErrorCode']['INVALID_ARGUMENT'],'message':_0x4c3841['message']}};if(!(_0x4c3841 instanceof e['CollabError']))return{'status':0x1f4,'error':{'code':n['ErrorCode']['INTERNAL_ERROR'],'message':'Internal\x20server\x20error'}};let _0x2d4601={'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']}}[_0x4c3841['code']];return{'status':_0x2d4601['status'],'error':{'code':_0x2d4601['code'],'message':_0x4c3841['message']}};}function d(_0x3acf00,_0x3d50b0,_0x56a21b){_0x3acf00['writableEnded']||_0x3acf00['destroyed']||(_0x3acf00['statusCode']=_0x3d50b0,_0x3acf00['setHeader']('content-type','application/json;\x20charset=utf-8'),_0x3acf00['end'](JSON['stringify'](_0x56a21b)));}exports['UniverHistoryEndpoint']=i;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x45041f=_0x7d67;(function(_0x525732,_0x3a62c5){const _0x48cc35=_0x7d67,_0x1e321f=_0x525732();while(!![]){try{const _0x4cda67=parseInt(_0x48cc35(0xfa))/0x1+parseInt(_0x48cc35(0xf5))/0x2*(parseInt(_0x48cc35(0xf6))/0x3)+-parseInt(_0x48cc35(0xf4))/0x4+parseInt(_0x48cc35(0xf7))/0x5+parseInt(_0x48cc35(0xf2))/0x6+-parseInt(_0x48cc35(0xf8))/0x7*(-parseInt(_0x48cc35(0xf3))/0x8)+-parseInt(_0x48cc35(0xf9))/0x9;if(_0x4cda67===_0x3a62c5)break;else _0x1e321f['push'](_0x1e321f['shift']());}catch(_0x1b5564){_0x1e321f['push'](_0x1e321f['shift']());}}}(_0x3208,0xac124));function _0x7d67(_0x4a4b54,_0x35b3fc){_0x4a4b54=_0x4a4b54-0xf1;const _0x320829=_0x3208();let _0x7d67c2=_0x320829[_0x4a4b54];return _0x7d67c2;}import _0x5f4454 from'./index.cjs';function _0x3208(){const _0x3b81e5=['5056070mhGcPd','238504HZVvPW','14607333rSfxkL','176756fROKoT','UniverHistoryEndpoint','1401894zIoUNa','160hRsWQP','2957948YAfRzA','11278iMCMOb','513dcOhgF'];_0x3208=function(){return _0x3b81e5;};return _0x3208();}const facadeExport0=_0x5f4454[_0x45041f(0xf1)];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.4",
|
|
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.4",
|
|
20
|
+
"@univerjs-pro/collaboration-service": "1.0.4",
|
|
21
|
+
"@univerjs-pro/collaboration-transport-node": "1.0.4",
|
|
22
|
+
"@univerjs/protocol": "1.0.4"
|
|
23
23
|
}
|
|
24
24
|
}
|