@univerjs-pro/collaboration-history-endpoint 1.6.1 → 1.7.0-alpha.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(_0x43b1f8){if(this['_service']=_0x43b1f8,!_0x43b1f8)throw TypeError('UniverHistoryEndpoint\x20requires\x20a\x20service');}['register'](_0x59117d){if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');for(let [_0x3a4c95,_0x1f8253]of[['list','list'],['creators','creators'],['cs','changesets']])_0x59117d['get']('/universer-api/history/:unitID/'+_0x3a4c95,_0x2fe546=>this['_handleHttp'](_0x2fe546,{'name':_0x1f8253,'unitID':_0x2fe546['params']['unitID']}));}async['_handleHttp'](_0x41c6c9,_0x3491ac){try{if(this['_disposed'])throw new e['CollabError']('INTERNAL_ERROR','History\x20Endpoint\x20is\x20disposed');let _0xbd4b66=new URL(_0x41c6c9['incomingMessage']['url']??'/','http://localhost');if(!_0x41c6c9['userID'])throw new e['CollabError']('UNAUTHENTICATED','HTTP\x20user\x20is\x20not\x20authenticated');let _0x425f4b={'userID':_0x41c6c9['userID'],'customData':_0x41c6c9['customData']};switch(_0x3491ac['name']){case'list':{let _0xb548db=await this['_service']['getHistoryList']({'unitID':_0x3491ac['unitID'],'length':s(_0xbd4b66['searchParams']['get']('length')),..._0xbd4b66['searchParams']['get']('lastLabel')?{'lastLabel':_0xbd4b66['searchParams']['get']('lastLabel')}:{},...l(_0xbd4b66['searchParams']['get']('origin')),'userIDs':_0xbd4b66['searchParams']['getAll']('userIds')['filter'](Boolean)},_0x425f4b);f(_0x41c6c9['response'],0xc8,{'error':r,...o(_0xb548db)});return;}case'creators':{let _0x314769=await this['_service']['listHistoryCreators']({'unitID':_0x3491ac['unitID']},_0x425f4b);f(_0x41c6c9['response'],0xc8,{'error':r,'creators':_0x314769['creators']['map'](({userID:_0xed3a31,..._0x4f0037})=>({..._0x4f0037,'userId':_0xed3a31}))});return;}case'changesets':{let _0x28e845=c(_0xbd4b66['searchParams']['get']('startRevision'),'startRevision'),_0x58cd9f=c(_0xbd4b66['searchParams']['get']('endRevision'),'endRevision'),_0x5a3821=await this['_service']['getHistoryChangesets']({'unitID':_0x3491ac['unitID'],'startRevision':_0x28e845,'endRevision':_0x58cd9f},_0x425f4b);f(_0x41c6c9['response'],0xc8,{'error':r,..._0x5a3821,'changesets':_0x5a3821['changesets']['map'](a)});return;}}}catch(_0x61a637){u(_0x41c6c9['response'],_0x61a637);}}['dispose'](){this['_disposed']=!0x0;}};function a(_0x453ca6){let _0x37a2e3={..._0x453ca6};return delete _0x37a2e3['metadata'],_0x37a2e3;}function o(_0x3d06ca){let _0x223811=Object['fromEntries'](Object['entries'](_0x3d06ca['entities']['datas'])['map'](([_0x1efd51,{userID:_0x1dfa6a,unitID:_0x4f4fbb,userIDs:_0x1c3cef,..._0x342d8e}])=>[_0x1efd51,{..._0x342d8e,'userId':_0x1dfa6a,'unitId':_0x4f4fbb,'userIds':_0x1c3cef}]));return{..._0x3d06ca,'entities':{..._0x3d06ca['entities'],'datas':_0x223811}};}function s(_0x285ff6){return _0x285ff6===null||_0x285ff6===''?0x14:c(_0x285ff6,'length');}function c(_0x524380,_0x43c2d2){if(!_0x524380||!/^\d+$/['test'](_0x524380))throw new e['CollabError']('INVALID_REQUEST',_0x43c2d2+'\x20must\x20be\x20a\x20positive\x20integer');let _0xc1b632=Number(_0x524380);if(!Number['isSafeInteger'](_0xc1b632)||_0xc1b632<0x1)throw new e['CollabError']('INVALID_REQUEST',_0x43c2d2+'\x20must\x20be\x20a\x20positive\x20integer');return _0xc1b632;}function l(_0x29317a){if(_0x29317a===null||_0x29317a===''||_0x29317a==='0')return{};if(_0x29317a==='1'||_0x29317a==='2')return{'origin':Number(_0x29317a)};throw new e['CollabError']('INVALID_REQUEST','origin\x20must\x20be\x200,\x201\x20or\x202');}function u(_0x464f02,_0x534f0a){let _0xdea9a4=d(_0x534f0a);f(_0x464f02,_0xdea9a4['status'],{'error':_0xdea9a4['error']});}function d(_0x6f3bac){if(_0x6f3bac instanceof t['NodeTransportError'])return{'status':_0x6f3bac['code']==='REQUEST_BODY_TOO_LARGE'?0x19d:_0x6f3bac['code']==='TRANSPORT_DISPOSED'?0x1f7:0x190,'error':{'code':_0x6f3bac['code']==='TRANSPORT_DISPOSED'?n['ErrorCode']['INTERNAL_ERROR']:n['ErrorCode']['INVALID_ARGUMENT'],'message':_0x6f3bac['message']}};if(!(_0x6f3bac instanceof e['CollabError']))return{'status':0x1f4,'error':{'code':n['ErrorCode']['INTERNAL_ERROR'],'message':'Internal\x20server\x20error'}};let _0x5f18ac={'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']}}[_0x6f3bac['code']];return{'status':_0x5f18ac['status'],'error':{'code':_0x5f18ac['code'],'message':_0x6f3bac['message']}};}function f(_0x211a24,_0x3c73db,_0xff955a){_0x211a24['writableEnded']||_0x211a24['destroyed']||(_0x211a24['statusCode']=_0x3c73db,_0x211a24['setHeader']('content-type','application/json;\x20charset=utf-8'),_0x211a24['end'](JSON['stringify'](_0xff955a)));}exports['UniverHistoryEndpoint']=i;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x14ff(_0x1cfe65,_0x30dca9){_0x1cfe65=_0x1cfe65-0x1b2;const _0x1c7f5a=_0x1c7f();let _0x14ff0a=_0x1c7f5a[_0x1cfe65];return _0x14ff0a;}const _0x242dd0=_0x14ff;(function(_0x52f858,_0x194c9a){const _0x3e5662=_0x14ff,_0x6b0600=_0x52f858();while(!![]){try{const _0x46206a=parseInt(_0x3e5662(0x1b7))/0x1+parseInt(_0x3e5662(0x1bc))/0x2+parseInt(_0x3e5662(0x1b3))/0x3+parseInt(_0x3e5662(0x1bd))/0x4*(parseInt(_0x3e5662(0x1b9))/0x5)+-parseInt(_0x3e5662(0x1b4))/0x6*(parseInt(_0x3e5662(0x1b8))/0x7)+parseInt(_0x3e5662(0x1ba))/0x8*(parseInt(_0x3e5662(0x1b6))/0x9)+parseInt(_0x3e5662(0x1b5))/0xa*(-parseInt(_0x3e5662(0x1bb))/0xb);if(_0x46206a===_0x194c9a)break;else _0x6b0600['push'](_0x6b0600['shift']());}catch(_0x138e17){_0x6b0600['push'](_0x6b0600['shift']());}}}(_0x1c7f,0x97566));import _0x3abcc8 from'./index.cjs';const facadeExport0=_0x3abcc8[_0x242dd0(0x1b2)];export{facadeExport0 as UniverHistoryEndpoint};function _0x1c7f(){const _0x4e1d42=['UniverHistoryEndpoint','1286412QVfIXB','6ludyZS','40XaUYki','1140417XNHOgH','630755jfAyky','2587879QvnevW','5vviccL','48lmOmmq','3773330cFJJPF','839130zBSoEs','489172WWkXQe'];_0x1c7f=function(){return _0x4e1d42;};return _0x1c7f();}
|
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.
|
|
4
|
+
"version": "1.7.0-alpha.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.
|
|
20
|
-
"@univerjs-pro/collaboration-service": "1.
|
|
21
|
-
"@univerjs-pro/collaboration-transport-node": "1.
|
|
22
|
-
"@univerjs/protocol": "1.
|
|
19
|
+
"@univerjs-pro/collaboration-history-service": "1.7.0-alpha.0",
|
|
20
|
+
"@univerjs-pro/collaboration-service": "1.7.0-alpha.0",
|
|
21
|
+
"@univerjs-pro/collaboration-transport-node": "1.7.0-alpha.0",
|
|
22
|
+
"@univerjs/protocol": "1.7.0-alpha.0"
|
|
23
23
|
}
|
|
24
24
|
}
|