@treasuredata/tdx 0.10.0 → 0.10.1
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/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +5 -2
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x86c030,_0x3a7571){var _0x36de12=a125_0x6ee8,_0x5eeea2=_0x86c030();while(!![]){try{var _0xaec343=-parseInt(_0x36de12(0x15c))/0x1*(parseInt(_0x36de12(0x156))/0x2)+-parseInt(_0x36de12(0x15b))/0x3+parseInt(_0x36de12(0x158))/0x4+parseInt(_0x36de12(0x155))/0x5*(-parseInt(_0x36de12(0x159))/0x6)+parseInt(_0x36de12(0x15d))/0x7+parseInt(_0x36de12(0x157))/0x8*(-parseInt(_0x36de12(0x154))/0x9)+parseInt(_0x36de12(0x15a))/0xa*(parseInt(_0x36de12(0x15e))/0xb);if(_0xaec343===_0x3a7571)break;else _0x5eeea2['push'](_0x5eeea2['shift']());}catch(_0x1530d0){_0x5eeea2['push'](_0x5eeea2['shift']());}}}(a125_0x15d8,0xa7dbc));function a125_0x6ee8(_0x3e3d1a,_0x4d42f7){_0x3e3d1a=_0x3e3d1a-0x154;var _0x15d89e=a125_0x15d8();var _0x6ee8ac=_0x15d89e[_0x3e3d1a];return _0x6ee8ac;}export*from'./formatters.js';export*from'./format-detector.js';function a125_0x15d8(){var _0x23b53c=['1SJzpSm','1099105jtCIHQ','353914dYEyVu','9xdlUay','42115JkxgIP','2536822kDjJhL','3187336hTWNsc','2739564RjwizI','156PqFzSz','630ojGFBe','886482rbIyRx'];a125_0x15d8=function(){return _0x23b53c;};return a125_0x15d8();}export*from'./tree-formatter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a126_0x441b(_0x54ec01,_0x4caf2a){_0x54ec01=_0x54ec01-0x102;const _0x2b321a=a126_0x2b32();let _0x441bca=_0x2b321a[_0x54ec01];return _0x441bca;}(function(_0x4d8504,_0x19ed51){const _0xac8a57=a126_0x441b,_0xec2176=_0x4d8504();while(!![]){try{const _0x56237e=parseInt(_0xac8a57(0x107))/0x1*(-parseInt(_0xac8a57(0x102))/0x2)+parseInt(_0xac8a57(0x125))/0x3*(-parseInt(_0xac8a57(0x11d))/0x4)+-parseInt(_0xac8a57(0x129))/0x5*(-parseInt(_0xac8a57(0x121))/0x6)+-parseInt(_0xac8a57(0x110))/0x7+parseInt(_0xac8a57(0x122))/0x8+parseInt(_0xac8a57(0x12a))/0x9*(parseInt(_0xac8a57(0x114))/0xa)+parseInt(_0xac8a57(0x116))/0xb;if(_0x56237e===_0x19ed51)break;else _0xec2176['push'](_0xec2176['shift']());}catch(_0x15f2a6){_0xec2176['push'](_0xec2176['shift']());}}}(a126_0x2b32,0xab582));import{formatRows}from'./formatters.js';import a126_0x1334a1 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','showUrl':![],'getSegmentUrl':undefined};export function formatTree(_0x4223a9,_0x5872e2={},_0x10f937=0x0,_0x456ae0=''){const _0x2f0c3c=a126_0x441b,_0x5a1342={...DEFAULT_OPTIONS,..._0x5872e2},_0x587fb8=[],_0x561258=[..._0x4223a9][_0x2f0c3c(0x12b)]((_0x291f29,_0x1e9324)=>_0x291f29[_0x2f0c3c(0x10d)][_0x2f0c3c(0x11e)](_0x1e9324[_0x2f0c3c(0x10d)]));for(let _0x143884=0x0;_0x143884<_0x561258[_0x2f0c3c(0x108)];_0x143884++){const _0x17b6f7=_0x561258[_0x143884],_0x2d4e07=_0x143884===_0x561258[_0x2f0c3c(0x108)]-0x1;let _0x1744a0='';_0x10f937>0x0&&(_0x1744a0+=_0x456ae0);_0x5a1342[_0x2f0c3c(0x11c)]&&_0x10f937>0x0&&(_0x1744a0+=a126_0x1334a1[_0x2f0c3c(0x119)](_0x2d4e07?_0x2f0c3c(0x120):_0x2f0c3c(0x10a)));_0x5a1342[_0x2f0c3c(0x12f)]&&(_0x1744a0+=_0x17b6f7['type']===_0x2f0c3c(0x12e)?_0x2f0c3c(0x10b):_0x2f0c3c(0x11f));_0x1744a0+=_0x17b6f7[_0x2f0c3c(0x10d)];if(_0x5a1342[_0x2f0c3c(0x118)]){if(_0x17b6f7[_0x2f0c3c(0x109)]===_0x2f0c3c(0x12e)){const _0x31b8ab=[];_0x17b6f7[_0x2f0c3c(0x12c)][_0x2f0c3c(0x117)]&&_0x31b8ab[_0x2f0c3c(0x124)](_0x17b6f7[_0x2f0c3c(0x12c)][_0x2f0c3c(0x117)]+_0x2f0c3c(0x11b)+(_0x17b6f7['metadata'][_0x2f0c3c(0x117)]!==0x1?'s':'')),_0x17b6f7[_0x2f0c3c(0x12c)][_0x2f0c3c(0x126)]&&_0x31b8ab[_0x2f0c3c(0x124)](_0x17b6f7[_0x2f0c3c(0x12c)]['folderCount']+_0x2f0c3c(0x10c)+(_0x17b6f7[_0x2f0c3c(0x12c)]['folderCount']!==0x1?'s':'')),_0x31b8ab[_0x2f0c3c(0x108)]>0x0&&(_0x1744a0+=a126_0x1334a1[_0x2f0c3c(0x119)]('\x20('+_0x31b8ab['join'](',\x20')+')'));}else _0x17b6f7['type']===_0x2f0c3c(0x131)&&_0x17b6f7[_0x2f0c3c(0x11a)]!==undefined&&(_0x1744a0+=a126_0x1334a1[_0x2f0c3c(0x119)]('\x20('+formatRows(_0x17b6f7[_0x2f0c3c(0x11a)])+')'));}_0x5a1342['showUrl']&&_0x5a1342[_0x2f0c3c(0x104)]&&_0x17b6f7[_0x2f0c3c(0x109)]==='segment'&&(_0x1744a0+='\x20'+a126_0x1334a1[_0x2f0c3c(0x130)](_0x5a1342['getSegmentUrl'](_0x17b6f7['id'])));_0x587fb8[_0x2f0c3c(0x124)](_0x1744a0);if(_0x17b6f7[_0x2f0c3c(0x112)]&&_0x17b6f7[_0x2f0c3c(0x112)]['length']>0x0){let _0x487a8d;if(_0x10f937===0x0)_0x487a8d='';else _0x5a1342[_0x2f0c3c(0x11c)]?_0x487a8d=_0x456ae0+(_0x2d4e07?'\x20\x20\x20\x20':a126_0x1334a1[_0x2f0c3c(0x119)]('│')+_0x2f0c3c(0x134)):_0x487a8d=_0x456ae0+_0x5a1342[_0x2f0c3c(0x123)];const _0x304dc6=formatTree(_0x17b6f7['children'],_0x5a1342,_0x10f937+0x1,_0x487a8d);_0x587fb8[_0x2f0c3c(0x124)](_0x304dc6);}}return _0x587fb8[_0x2f0c3c(0x103)]('\x0a');}export function formatFlatList(_0x3753c7,_0x5b3856,_0x2e0963={},_0x2e604f=[]){const _0xe5c7c6=a126_0x441b,_0x42f50f={...DEFAULT_OPTIONS,..._0x2e0963},_0x4c9a6b=[];for(const _0x25bf5b of _0x3753c7){_0x4c9a6b[_0xe5c7c6(0x124)]({'name':_0x25bf5b[_0xe5c7c6(0x10d)],'icon':_0x42f50f['showIcons']?'📁':'','metadata':undefined});}for(const _0x20fca2 of _0x5b3856){const _0x21997a=_0x42f50f[_0xe5c7c6(0x118)]&&_0x20fca2[_0xe5c7c6(0x11a)]!==undefined?a126_0x1334a1[_0xe5c7c6(0x119)]('\x20('+formatRows(_0x20fca2['population'])+')'):'',_0x3219f0=_0x42f50f[_0xe5c7c6(0x10e)]&&_0x42f50f[_0xe5c7c6(0x104)]?_0x42f50f['getSegmentUrl'](_0x20fca2['id']):undefined;_0x4c9a6b[_0xe5c7c6(0x124)]({'name':_0x20fca2[_0xe5c7c6(0x10d)],'icon':_0x42f50f[_0xe5c7c6(0x12f)]?'🎯':'','metadata':_0x21997a,'url':_0x3219f0});}for(const _0x26c624 of _0x2e604f){const _0x3688b1=getJourneyStateIndicator(_0x26c624[_0xe5c7c6(0x132)]),_0xda4ad8=_0x42f50f['showMetadata']?a126_0x1334a1[_0xe5c7c6(0x119)]('\x20'+_0x3688b1):'',_0x4dbb70=_0x42f50f[_0xe5c7c6(0x10e)]&&_0x42f50f[_0xe5c7c6(0x106)]?_0x42f50f[_0xe5c7c6(0x106)](_0x26c624['id']):undefined;_0x4c9a6b[_0xe5c7c6(0x124)]({'name':_0x26c624[_0xe5c7c6(0x128)],'icon':_0x42f50f['showIcons']?_0xe5c7c6(0x127):'','metadata':_0xda4ad8,'url':_0x4dbb70});}_0x4c9a6b[_0xe5c7c6(0x12b)]((_0x32d813,_0x41a4ed)=>_0x32d813['name'][_0xe5c7c6(0x11e)](_0x41a4ed['name']));if(_0x4c9a6b['length']===0x0)return'(empty)';const _0xd787b9=_0x4c9a6b['map'](_0x581826=>{const _0x8d1077=_0xe5c7c6,_0x4357ef=_0x581826['icon']?_0x581826[_0x8d1077(0x10f)]+'\x20':'',_0x2faecc=_0x581826[_0x8d1077(0x12c)]||'',_0x405cc3=_0x581826[_0x8d1077(0x111)]?'\x20'+a126_0x1334a1['cyan'](_0x581826[_0x8d1077(0x111)]):'';return''+_0x4357ef+_0x581826[_0x8d1077(0x10d)]+_0x2faecc+_0x405cc3;});return _0xd787b9['join']('\x0a');}function a126_0x2b32(){const _0x43eb6a=['823077SupncS','sort','metadata','(paused)','folder','showIcons','cyan','segment','state','paused','\x20\x20\x20','62OpGKpG','join','getSegmentUrl','(running)','getJourneyUrl','32614wKfifd','length','type','├──\x20','📁\x20','\x20folder','name','showUrl','icon','4301955OSJBOK','url','children','completed','130hujbkf','(completed)','14993363XZLXbu','segmentCount','showMetadata','dim','population','\x20segment','showTreeLines','4FCxifW','localeCompare','🎯\x20','└──\x20','138VrNvct','4924648pPfSVw','indent','push','4153947krMxtJ','folderCount','🗺️','journeyBundleName','118385HYqONP'];a126_0x2b32=function(){return _0x43eb6a;};return a126_0x2b32();}function getJourneyStateIndicator(_0x49c67f){const _0x406ca9=a126_0x441b;switch(_0x49c67f){case'draft':return'(draft)';case'launched':return _0x406ca9(0x105);case _0x406ca9(0x133):return _0x406ca9(0x12d);case _0x406ca9(0x113):return _0x406ca9(0x115);default:return'('+_0x49c67f+')';}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a127_0x1d10(){const _0x2e879e=['substring','Project\x20directory\x20not\x20found:\x20','now','retryParams','sessionTime','retrySession','Failed\x20to\x20download\x20log\x20file:\x20','attempt','retryAt','unlink','.tar.gz','clearScheduleAll','endsWith','length','listSessions','startedAt','includeRetried','projectName','killAttempt','util','14546hfSoDe','getAttemptTasks','message','readdir','basename','direct','490756RTaItG','toString','workflowName','downloadProjectArchive','exportParams','zlib','timezone','logs','path','tdx-workflow-','project','last_id','join','workflows','uploadProjectArchive','isGroup','success','tar','index','tasks','utf-8','687925qmTxWf','toISOString','resumeFrom','resolveProjectId','push','sessionId','stateParams','config','327SHstqJ','317863qCjXVL','tdx-workflow-push-','listProjects','Cannot\x20read\x20workflow\x20file:\x20','lastAttempt','updatedAt','createdAt','limit','Kill\x20request\x20accepted','startAttempt','logger','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','download','fromTime','gunzip','Invalid\x20workflow\x20format:\x20','lastId','data','parentId','from','find','sessions','\x20workflow\x20files\x20found\x20in\x20project\x20directory','access','projects','mkdir','logFiles','Project\x20not\x20found:\x20','fullName','No\x20','status','isDirectory','test','42pMRIrl','isFile','delete','extract','revision','toTime','listWorkflows','workflow','client','retryAttempt','kill','NUMERIC_ID_PATTERN','clearSchedule','done','retryAttemptName','listAttempts','tmpdir','upstreams','5937864yUvgVf','map','params','replace','1499281TIONIl','finishedAt','7900398CTBtgT','force','skipValidation','create','sessionUuid','listLogFiles','name'];a127_0x1d10=function(){return _0x2e879e;};return a127_0x1d10();}const a127_0x274654=a127_0xe9e0;function a127_0xe9e0(_0xeadb25,_0x330262){_0xeadb25=_0xeadb25-0xbb;const _0x1d10ab=a127_0x1d10();let _0xe9e0e1=_0x1d10ab[_0xeadb25];return _0xe9e0e1;}(function(_0x448907,_0x2bccc8){const _0x18e12a=a127_0xe9e0,_0x4e952d=_0x448907();while(!![]){try{const _0x132f79=parseInt(_0x18e12a(0xdd))/0x1+parseInt(_0x18e12a(0x131))/0x2*(-parseInt(_0x18e12a(0xdc))/0x3)+parseInt(_0x18e12a(0xbf))/0x4+-parseInt(_0x18e12a(0xd4))/0x5*(parseInt(_0x18e12a(0xfe))/0x6)+parseInt(_0x18e12a(0x114))/0x7+parseInt(_0x18e12a(0x110))/0x8+parseInt(_0x18e12a(0x116))/0x9;if(_0x132f79===_0x2bccc8)break;else _0x4e952d['push'](_0x4e952d['shift']());}catch(_0x4476cf){_0x4e952d['push'](_0x4e952d['shift']());}}}(a127_0x1d10,0x7eb1a));import{WorkflowApiClient}from'../client/workflow-client.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export class WorkflowSDK{static [a127_0x274654(0x109)]=/^\d+$/;[a127_0x274654(0x106)];constructor(_0x56e001){const _0xb24015=a127_0x274654;this[_0xb24015(0x106)]=new WorkflowApiClient(_0x56e001,_0x56e001[_0xb24015(0xe7)]);}async[a127_0x274654(0xd7)](_0x926412){const _0x578ebe=a127_0x274654;if(WorkflowSDK[_0x578ebe(0x109)][_0x578ebe(0xfd)](_0x926412))return{'id':_0x926412,'name':_0x926412};const _0x349beb=await this['client'][_0x578ebe(0xdf)]({'name_pattern':_0x926412}),_0x5c79e8=_0x349beb[_0x578ebe(0xee)][_0x578ebe(0xf1)](_0x4b90e4=>_0x4b90e4[_0x578ebe(0x11c)]===_0x926412);if(!_0x5c79e8)throw new Error(_0x578ebe(0xf8)+_0x926412);return{'id':_0x5c79e8['id'],'name':_0x5c79e8['name']};}async[a127_0x274654(0xf5)](_0x580f6e,_0xb4d17e){const _0x3ae788=a127_0x274654,_0x1c984b=await this['client'][_0x3ae788(0xdf)]({'name_pattern':_0x580f6e,..._0xb4d17e});return _0x1c984b[_0x3ae788(0xee)][_0x3ae788(0x111)](_0x2556be=>({..._0x2556be,'project_id':_0x2556be['id'],'project_name':_0x2556be[_0x3ae788(0x11c)]}));}async[a127_0x274654(0xcc)](_0x1a9962,_0x57436a){const _0x5bd0bf=a127_0x274654,_0x402baf=await this['client'][_0x5bd0bf(0x104)]({'project_name':_0x1a9962,..._0x57436a});return _0x402baf[_0x5bd0bf(0xee)]['map'](_0x35dacf=>({'project_id':_0x35dacf[_0x5bd0bf(0xc9)]?.['id'],'project_name':_0x35dacf[_0x5bd0bf(0xc9)]?.['name'],'workflow_id':_0x35dacf['id'],'workflow_name':_0x35dacf[_0x5bd0bf(0x11c)],'revision':_0x35dacf[_0x5bd0bf(0x102)],'timezone':_0x35dacf[_0x5bd0bf(0xc5)],'config':_0x35dacf[_0x5bd0bf(0xdb)],'id':_0x35dacf['id'],'name':_0x35dacf['name'],'project':_0x35dacf[_0x5bd0bf(0xc9)]}));}async[a127_0x274654(0xf2)](_0x23f6cb){const _0x32e992=a127_0x274654;let _0x5a5afa;if(_0x23f6cb?.['projectName']){let _0x160f5c,_0x3c5147=![];while(!_0x3c5147){const _0x512cfd=await this[_0x32e992(0x106)][_0x32e992(0xdf)]({'limit':0x64,'last_id':_0x160f5c}),_0x891a40=_0x512cfd[_0x32e992(0xee)][_0x32e992(0xf1)](_0x1f1803=>_0x1f1803[_0x32e992(0x11c)]===_0x23f6cb[_0x32e992(0x12e)]);if(_0x891a40){_0x5a5afa=_0x891a40['id'],_0x3c5147=!![];break;}if(!_0x512cfd[_0x32e992(0xed)]||_0x512cfd[_0x32e992(0xee)][_0x32e992(0x12a)]===0x0)break;_0x160f5c=_0x512cfd[_0x32e992(0xed)];}if(!_0x5a5afa)throw new Error('Project\x20not\x20found:\x20'+_0x23f6cb['projectName']);}const _0x386310=await this[_0x32e992(0x106)][_0x32e992(0x12b)]({'project_id':_0x5a5afa,'project_name':_0x23f6cb?.[_0x32e992(0x12e)],'workflow_name':_0x23f6cb?.[_0x32e992(0xc1)],'status':_0x23f6cb?.[_0x32e992(0xfb)],'from_time':_0x23f6cb?.[_0x32e992(0xea)],'to_time':_0x23f6cb?.[_0x32e992(0x103)],'limit':_0x23f6cb?.[_0x32e992(0xe4)],'last_id':_0x23f6cb?.[_0x32e992(0xca)]});return _0x386310[_0x32e992(0xee)][_0x32e992(0x111)](_0x3d6fb7=>({'project_id':_0x3d6fb7[_0x32e992(0xc9)]?.['id'],'project_name':_0x3d6fb7['project']?.[_0x32e992(0x11c)],'workflow_id':_0x3d6fb7[_0x32e992(0x105)]?.['id'],'workflow_name':_0x3d6fb7[_0x32e992(0x105)]?.[_0x32e992(0x11c)],'session_id':_0x3d6fb7['id'],'sessionUuid':_0x3d6fb7[_0x32e992(0x11a)],'sessionTime':_0x3d6fb7[_0x32e992(0x121)],'lastAttempt':_0x3d6fb7[_0x32e992(0xe1)],'id':_0x3d6fb7['id'],'project':_0x3d6fb7[_0x32e992(0xc9)],'workflow':_0x3d6fb7[_0x32e992(0x105)]}));}async['attempts'](_0x3de37c){const _0x417668=a127_0x274654,_0x5de5fd=await this[_0x417668(0x106)][_0x417668(0x10d)]({'project_name':_0x3de37c?.[_0x417668(0x12e)],'workflow_name':_0x3de37c?.['workflowName'],'include_retried':_0x3de37c?.[_0x417668(0x12d)],'limit':_0x3de37c?.[_0x417668(0xe4)],'last_id':_0x3de37c?.['last_id']});return _0x5de5fd[_0x417668(0xee)][_0x417668(0x111)](_0x401b63=>({'project_id':_0x401b63[_0x417668(0xc9)]?.['id'],'project_name':_0x401b63[_0x417668(0xc9)]?.['name'],'workflow_id':_0x401b63['workflow']?.['id'],'workflow_name':_0x401b63['workflow']?.[_0x417668(0x11c)],'session_id':_0x401b63[_0x417668(0xd9)],'sessionUuid':_0x401b63[_0x417668(0x11a)],'sessionTime':_0x401b63[_0x417668(0x121)],'attempt_id':_0x401b63['id'],'attempt_index':_0x401b63['index'],'retryAttemptName':_0x401b63[_0x417668(0x10c)],'done':_0x401b63[_0x417668(0x10b)],'success':_0x401b63[_0x417668(0xcf)],'cancelRequested':_0x401b63['cancelRequested'],'params':_0x401b63[_0x417668(0x112)],'createdAt':_0x401b63[_0x417668(0xe3)],'finishedAt':_0x401b63[_0x417668(0x115)],'id':_0x401b63['id'],'index':_0x401b63[_0x417668(0xd1)],'project':_0x401b63[_0x417668(0xc9)],'workflow':_0x401b63[_0x417668(0x105)]}));}async[a127_0x274654(0x124)](_0x51849b){const _0xfef54c=a127_0x274654,_0x1d1cf0=await this[_0xfef54c(0x106)]['getAttempt'](_0x51849b);return _0x1d1cf0;}async[a127_0x274654(0xd2)](_0x111263,_0x10c4ac=![]){const _0x44dff6=a127_0x274654,_0x5acf7f=await this[_0x44dff6(0x106)][_0x44dff6(0x132)](_0x111263,_0x10c4ac);return _0x5acf7f[_0x44dff6(0x111)](_0x4c0bd8=>({'task_id':_0x4c0bd8['id'],'task_name':_0x4c0bd8[_0x44dff6(0xf9)],'parentId':_0x4c0bd8[_0x44dff6(0xef)],'config':_0x4c0bd8[_0x44dff6(0xdb)],'upstreams':_0x4c0bd8[_0x44dff6(0x10f)],'state':_0x4c0bd8['state'],'exportParams':_0x4c0bd8[_0x44dff6(0xc3)],'storeParams':_0x4c0bd8['storeParams'],'stateParams':_0x4c0bd8[_0x44dff6(0xda)],'updatedAt':_0x4c0bd8[_0x44dff6(0xe2)],'retryAt':_0x4c0bd8[_0x44dff6(0x125)],'startedAt':_0x4c0bd8[_0x44dff6(0x12c)],'error':_0x4c0bd8['error'],'isGroup':_0x4c0bd8[_0x44dff6(0xce)],'id':_0x4c0bd8['id'],'fullName':_0x4c0bd8[_0x44dff6(0xf9)]}));}async[a127_0x274654(0xf7)](_0x295c30,_0x48afc9){return await this['client']['listLogFiles'](_0x295c30,_0x48afc9);}async[a127_0x274654(0xc6)](_0x268e3c,_0x7403cc){const _0x40cb5b=a127_0x274654,_0x3991fd=await import(_0x40cb5b(0xc4)),{promisify:_0x4defa3}=await import(_0x40cb5b(0x130)),_0x13f919=_0x4defa3(_0x3991fd[_0x40cb5b(0xeb)]),_0x364547=await this[_0x40cb5b(0x106)][_0x40cb5b(0x11b)](_0x268e3c,_0x7403cc);if(_0x364547[_0x40cb5b(0x12a)]===0x0)return'';const _0x1b9f3c=[];for(const _0x57331a of _0x364547){if(!_0x57331a[_0x40cb5b(0xbe)])continue;const _0x4570df=await fetch(_0x57331a[_0x40cb5b(0xbe)]);if(!_0x4570df['ok'])throw new Error(_0x40cb5b(0x123)+_0x4570df['status']);const _0x12467b=Buffer[_0x40cb5b(0xf0)](await _0x4570df['arrayBuffer']()),_0xfa4d30=await _0x13f919(_0x12467b);_0x1b9f3c[_0x40cb5b(0xd8)](_0xfa4d30[_0x40cb5b(0xc0)](_0x40cb5b(0xd3)));}return _0x1b9f3c[_0x40cb5b(0xcb)]('\x0a');}async[a127_0x274654(0x108)](_0x270c16,_0x402acd){const _0x3924cb=a127_0x274654,_0x430710=await this['client'][_0x3924cb(0x12f)](_0x270c16,_0x402acd);return _0x430710?.[_0x3924cb(0xbb)]??_0x3924cb(0xe5);}async[a127_0x274654(0x122)](_0x438318,_0x4e6639){const _0x5ca6b0=a127_0x274654,_0x40851a=await this['client']['retrySession'](_0x438318,{'from_task':_0x4e6639?.['fromTask'],'retry_params':_0x4e6639?.[_0x5ca6b0(0x120)]});return{'attemptId':_0x40851a['id'],'sessionId':_0x40851a[_0x5ca6b0(0xd9)]};}async[a127_0x274654(0x107)](_0x574d20,_0xd9e2e){const _0x338e10=a127_0x274654,_0x44481e=await this['client'][_0x338e10(0x107)](_0x574d20,{'resume_from':_0xd9e2e?.[_0x338e10(0xd6)],'retry_params':_0xd9e2e?.[_0x338e10(0x120)],'force':_0xd9e2e?.[_0x338e10(0x117)]});return{'attemptId':_0x44481e['id'],'sessionId':_0x44481e[_0x338e10(0xd9)]};}async['run'](_0x185e2c,_0x189a93={},_0x4280e2){const _0x2b2026=a127_0x274654,_0x2d49a3=_0x185e2c['indexOf']('.');let _0x5637fb,_0x54eb55;if(_0x2d49a3===-0x1)throw new Error(_0x2b2026(0xe8));_0x5637fb=_0x185e2c[_0x2b2026(0x11d)](0x0,_0x2d49a3),_0x54eb55=_0x185e2c[_0x2b2026(0x11d)](_0x2d49a3+0x1);if(!_0x5637fb||!_0x54eb55)throw new Error(_0x2b2026(0xec)+_0x185e2c+'.\x20Expected\x20\x22project.workflow\x22');const _0x4aceda=_0x4280e2?.[_0x2b2026(0x121)]||new Date()[_0x2b2026(0xd5)]();return await this[_0x2b2026(0x106)][_0x2b2026(0xe6)]({'projectName':_0x5637fb,'workflowName':_0x54eb55,'sessionTime':_0x4aceda,'params':_0x189a93});}async[a127_0x274654(0xe9)](_0x27d29e,_0xefefd5,_0x87cd17){const _0x25ed7e=a127_0x274654,{promises:_0x2cd25f}=await import('fs'),_0x16780a=await import('path'),_0x1ba3bf=await import('os'),_0x455bbb=await import(_0x25ed7e(0xd0)),{id:_0x16ec2f,name:_0x187f83}=await this[_0x25ed7e(0xd7)](_0x27d29e),_0x5f0e8a=_0x1ba3bf[_0x25ed7e(0x10e)](),_0x26c41c=_0x16780a[_0x25ed7e(0xcb)](_0x5f0e8a,_0x25ed7e(0xc8)+_0x16ec2f+'-'+Date[_0x25ed7e(0x11f)]()+_0x25ed7e(0x127));try{await this[_0x25ed7e(0x106)][_0x25ed7e(0xc2)](_0x16ec2f,_0x26c41c,_0x87cd17?.[_0x25ed7e(0x102)]);const _0x1664fb=_0x16780a['join'](_0xefefd5,_0x187f83);await _0x2cd25f[_0x25ed7e(0xf6)](_0x1664fb,{'recursive':!![]}),await _0x455bbb[_0x25ed7e(0x101)]({'file':_0x26c41c,'cwd':_0x1664fb,'gzip':!![]});const _0x3a57a7=async _0x54c7f8=>{const _0x3833b1=_0x25ed7e;let _0x5cd8cb=0x0;const _0x3560bb=await _0x2cd25f[_0x3833b1(0xbc)](_0x54c7f8,{'withFileTypes':!![]});for(const _0xb2a41a of _0x3560bb){const _0x392a0a=_0x16780a[_0x3833b1(0xcb)](_0x54c7f8,_0xb2a41a[_0x3833b1(0x11c)]);if(_0xb2a41a[_0x3833b1(0xff)]())_0x5cd8cb++;else _0xb2a41a[_0x3833b1(0xfc)]()&&(_0x5cd8cb+=await _0x3a57a7(_0x392a0a));}return _0x5cd8cb;},_0x41816e=await _0x3a57a7(_0x1664fb);return{'projectName':_0x187f83,'revision':_0x87cd17?.[_0x25ed7e(0x102)]||'latest','filesExtracted':_0x41816e};}finally{try{await _0x2cd25f[_0x25ed7e(0x126)](_0x26c41c);}catch{}}}async['push'](_0x36fe92,_0x2b9f9b){const _0x5a3d79=a127_0x274654,{promises:_0x5e01f0}=await import('fs'),_0xde2820=await import(_0x5a3d79(0xc7)),_0x3e8578=await import(_0x5a3d79(0xd0)),_0x429b28=_0x2b9f9b?.[_0x5a3d79(0x12e)]||_0xde2820[_0x5a3d79(0xbd)](_0x36fe92),_0x2b3118=_0x2b9f9b?.['revision']||new Date()['toISOString']()[_0x5a3d79(0x113)](/[:.]/g,'-');try{await _0x5e01f0[_0x5a3d79(0xf4)](_0x36fe92);}catch{throw new Error(_0x5a3d79(0x11e)+_0x36fe92);}if(!_0x2b9f9b?.[_0x5a3d79(0x118)]){const _0x61c331=await _0x5e01f0['readdir'](_0x36fe92),_0x26a9ad=_0x61c331['filter'](_0x224f7e=>_0x224f7e[_0x5a3d79(0x129)](WORKFLOW_FILE_EXTENSION));if(_0x26a9ad[_0x5a3d79(0x12a)]===0x0)throw new Error(_0x5a3d79(0xfa)+WORKFLOW_FILE_EXTENSION+_0x5a3d79(0xf3));for(const _0x106400 of _0x26a9ad){const _0x5dfb15=_0xde2820[_0x5a3d79(0xcb)](_0x36fe92,_0x106400);try{await _0x5e01f0[_0x5a3d79(0xf4)](_0x5dfb15);}catch{throw new Error(_0x5a3d79(0xe0)+_0x106400);}}}const _0x13125f=async(_0x292d3f,_0x108304='')=>{const _0x5c0fb4=_0x5a3d79,_0x239b30=await _0x5e01f0[_0x5c0fb4(0xbc)](_0x292d3f,{'withFileTypes':!![]}),_0x8da190=[];for(const _0x739d91 of _0x239b30){const _0x5291c8=_0xde2820[_0x5c0fb4(0xcb)](_0x108304,_0x739d91[_0x5c0fb4(0x11c)]),_0x20200f=_0xde2820[_0x5c0fb4(0xcb)](_0x292d3f,_0x739d91[_0x5c0fb4(0x11c)]);if(!shouldIncludeInArchive(_0x739d91[_0x5c0fb4(0x11c)]))continue;_0x739d91[_0x5c0fb4(0xfc)]()?_0x8da190[_0x5c0fb4(0xd8)](...await _0x13125f(_0x20200f,_0x5291c8)):_0x8da190[_0x5c0fb4(0xd8)](_0x5291c8);}return _0x8da190;},_0x3aa933=await _0x13125f(_0x36fe92),_0x264c26=await import('os'),_0x1287b2=_0x264c26[_0x5a3d79(0x10e)](),_0x2732d8=_0xde2820['join'](_0x1287b2,_0x5a3d79(0xde)+Date['now']()+'.tar.gz');try{await _0x3e8578[_0x5a3d79(0x119)]({'file':_0x2732d8,'gzip':!![],'cwd':_0x36fe92,'portable':!![]},_0x3aa933);const _0x4c5d7c=await this[_0x5a3d79(0x106)][_0x5a3d79(0xcd)](_0x429b28,_0x2b3118,_0x2732d8,{'scheduleFrom':_0x2b9f9b?.['scheduleFrom'],'clearSchedule':_0x2b9f9b?.[_0x5a3d79(0x10a)],'clearScheduleAll':_0x2b9f9b?.[_0x5a3d79(0x128)]});return{'projectId':_0x4c5d7c['id'],'projectName':_0x4c5d7c[_0x5a3d79(0x11c)],'revision':_0x4c5d7c[_0x5a3d79(0x102)]};}finally{try{await _0x5e01f0[_0x5a3d79(0x126)](_0x2732d8);}catch{}}}async[a127_0x274654(0x100)](_0x23941a){const _0x4e8476=a127_0x274654,{id:_0x162762}=await this[_0x4e8476(0xd7)](_0x23941a),_0x4b9e03=await this['client']['deleteProject'](_0x162762);return{'projectId':_0x4b9e03['id'],'projectName':_0x4b9e03[_0x4e8476(0x11c)]};}}
|
|
1
|
+
const a127_0x5596e5=a127_0x3bea;function a127_0x3bea(_0x1f9a4b,_0x2fe7c9){_0x1f9a4b=_0x1f9a4b-0x131;const _0x60355d=a127_0x6035();let _0x3beaf8=_0x60355d[_0x1f9a4b];return _0x3beaf8;}(function(_0x28ac6d,_0x192b28){const _0x2867c4=a127_0x3bea,_0x1442a1=_0x28ac6d();while(!![]){try{const _0x202db1=-parseInt(_0x2867c4(0x15d))/0x1+parseInt(_0x2867c4(0x145))/0x2*(-parseInt(_0x2867c4(0x160))/0x3)+-parseInt(_0x2867c4(0x13c))/0x4*(-parseInt(_0x2867c4(0x180))/0x5)+parseInt(_0x2867c4(0x186))/0x6*(parseInt(_0x2867c4(0x170))/0x7)+parseInt(_0x2867c4(0x154))/0x8+-parseInt(_0x2867c4(0x133))/0x9*(parseInt(_0x2867c4(0x187))/0xa)+parseInt(_0x2867c4(0x18a))/0xb;if(_0x202db1===_0x192b28)break;else _0x1442a1['push'](_0x1442a1['shift']());}catch(_0x51b948){_0x1442a1['push'](_0x1442a1['shift']());}}}(a127_0x6035,0x71ef7));import{WorkflowApiClient}from'../client/workflow-client.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export class WorkflowSDK{static [a127_0x5596e5(0x185)]=/^\d+$/;[a127_0x5596e5(0x139)];constructor(_0x3e4199){const _0x1bd47d=a127_0x5596e5;this[_0x1bd47d(0x139)]=new WorkflowApiClient(_0x3e4199,_0x3e4199[_0x1bd47d(0x162)]);}async[a127_0x5596e5(0x191)](_0x14f730){const _0x10f5ef=a127_0x5596e5;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x10f5ef(0x166)](_0x14f730))return{'id':_0x14f730,'name':_0x14f730};const _0x3c6f80=await this[_0x10f5ef(0x139)][_0x10f5ef(0x17d)]({'name_pattern':_0x14f730}),_0x20b782=_0x3c6f80[_0x10f5ef(0x161)]['find'](_0x213cbf=>_0x213cbf[_0x10f5ef(0x18b)]===_0x14f730);if(!_0x20b782)throw new Error(_0x10f5ef(0x156)+_0x14f730);return{'id':_0x20b782['id'],'name':_0x20b782[_0x10f5ef(0x18b)]};}async['projects'](_0x8b6849,_0x368b45){const _0x46b073=a127_0x5596e5,_0x61fdd4=await this[_0x46b073(0x139)]['listProjects']({'name_pattern':_0x8b6849,..._0x368b45});return _0x61fdd4[_0x46b073(0x161)][_0x46b073(0x14d)](_0x24598e=>({..._0x24598e,'project_id':_0x24598e['id'],'project_name':_0x24598e['name']}));}async[a127_0x5596e5(0x14e)](_0x2de945,_0x2cb2e4){const _0x510c89=a127_0x5596e5,_0x4d36e9=await this[_0x510c89(0x139)][_0x510c89(0x199)]({'project_name':_0x2de945,..._0x2cb2e4});return _0x4d36e9[_0x510c89(0x161)][_0x510c89(0x14d)](_0xa7449f=>({'project_id':_0xa7449f[_0x510c89(0x19a)]?.['id'],'project_name':_0xa7449f['project']?.[_0x510c89(0x18b)],'workflow_id':_0xa7449f['id'],'workflow_name':_0xa7449f[_0x510c89(0x18b)],'revision':_0xa7449f[_0x510c89(0x150)],'timezone':_0xa7449f['timezone'],'config':_0xa7449f[_0x510c89(0x13e)],'id':_0xa7449f['id'],'name':_0xa7449f[_0x510c89(0x18b)],'project':_0xa7449f['project']}));}async[a127_0x5596e5(0x184)](_0x292ca9){const _0x2f721c=a127_0x5596e5;let _0x3d247e;if(_0x292ca9?.['projectName']){let _0x2c59d4,_0x52edaf=![];while(!_0x52edaf){const _0x4ab0fd=await this[_0x2f721c(0x139)]['listProjects']({'limit':0x64,'last_id':_0x2c59d4}),_0x40c4bf=_0x4ab0fd['data'][_0x2f721c(0x17c)](_0x3dd871=>_0x3dd871['name']===_0x292ca9[_0x2f721c(0x13d)]);if(_0x40c4bf){_0x3d247e=_0x40c4bf['id'],_0x52edaf=!![];break;}if(!_0x4ab0fd['lastId']||_0x4ab0fd[_0x2f721c(0x161)][_0x2f721c(0x181)]===0x0)break;_0x2c59d4=_0x4ab0fd[_0x2f721c(0x18e)];}if(!_0x3d247e)throw new Error(_0x2f721c(0x156)+_0x292ca9[_0x2f721c(0x13d)]);}const _0x36e3ed=await this[_0x2f721c(0x139)]['listSessions']({'project_id':_0x3d247e,'project_name':_0x292ca9?.[_0x2f721c(0x13d)],'workflow_name':_0x292ca9?.['workflowName'],'status':_0x292ca9?.[_0x2f721c(0x17a)],'from_time':_0x292ca9?.[_0x2f721c(0x153)],'to_time':_0x292ca9?.[_0x2f721c(0x176)],'limit':_0x292ca9?.[_0x2f721c(0x137)],'last_id':_0x292ca9?.[_0x2f721c(0x135)]});return _0x36e3ed['data'][_0x2f721c(0x14d)](_0x8b3225=>({'project_id':_0x8b3225[_0x2f721c(0x19a)]?.['id'],'project_name':_0x8b3225['project']?.['name'],'workflow_id':_0x8b3225[_0x2f721c(0x164)]?.['id'],'workflow_name':_0x8b3225['workflow']?.[_0x2f721c(0x18b)],'session_id':_0x8b3225['id'],'sessionUuid':_0x8b3225['sessionUuid'],'sessionTime':_0x8b3225[_0x2f721c(0x190)],'lastAttempt':_0x8b3225[_0x2f721c(0x193)],'id':_0x8b3225['id'],'project':_0x8b3225['project'],'workflow':_0x8b3225[_0x2f721c(0x164)]}));}async[a127_0x5596e5(0x16f)](_0x5e92cc){const _0x27b6f1=a127_0x5596e5,_0x4640c7=await this[_0x27b6f1(0x139)][_0x27b6f1(0x13a)]({'project_name':_0x5e92cc?.[_0x27b6f1(0x13d)],'workflow_name':_0x5e92cc?.[_0x27b6f1(0x194)],'include_retried':_0x5e92cc?.['includeRetried'],'limit':_0x5e92cc?.['limit'],'last_id':_0x5e92cc?.[_0x27b6f1(0x135)]});return _0x4640c7[_0x27b6f1(0x161)][_0x27b6f1(0x14d)](_0x3dd7c0=>({'project_id':_0x3dd7c0[_0x27b6f1(0x19a)]?.['id'],'project_name':_0x3dd7c0[_0x27b6f1(0x19a)]?.['name'],'workflow_id':_0x3dd7c0[_0x27b6f1(0x164)]?.['id'],'workflow_name':_0x3dd7c0['workflow']?.[_0x27b6f1(0x18b)],'session_id':_0x3dd7c0[_0x27b6f1(0x16b)],'sessionUuid':_0x3dd7c0[_0x27b6f1(0x174)],'sessionTime':_0x3dd7c0[_0x27b6f1(0x190)],'attempt_id':_0x3dd7c0['id'],'attempt_index':_0x3dd7c0[_0x27b6f1(0x19c)],'retryAttemptName':_0x3dd7c0[_0x27b6f1(0x192)],'done':_0x3dd7c0['done'],'success':_0x3dd7c0[_0x27b6f1(0x16d)],'cancelRequested':_0x3dd7c0['cancelRequested'],'params':_0x3dd7c0[_0x27b6f1(0x13b)],'createdAt':_0x3dd7c0[_0x27b6f1(0x157)],'finishedAt':_0x3dd7c0[_0x27b6f1(0x142)],'id':_0x3dd7c0['id'],'index':_0x3dd7c0[_0x27b6f1(0x19c)],'project':_0x3dd7c0[_0x27b6f1(0x19a)],'workflow':_0x3dd7c0[_0x27b6f1(0x164)]}));}async[a127_0x5596e5(0x152)](_0x51c185){const _0x76c676=a127_0x5596e5,_0x52a408=await this[_0x76c676(0x139)]['getAttempt'](_0x51c185);return _0x52a408;}async['tasks'](_0x4ba767,_0x27c2ce=![]){const _0x36c97a=a127_0x5596e5,_0x47ac23=await this[_0x36c97a(0x139)]['getAttemptTasks'](_0x4ba767,_0x27c2ce);return _0x47ac23[_0x36c97a(0x14d)](_0x58dabb=>({'task_id':_0x58dabb['id'],'task_name':_0x58dabb[_0x36c97a(0x195)],'parentId':_0x58dabb[_0x36c97a(0x163)],'config':_0x58dabb['config'],'upstreams':_0x58dabb['upstreams'],'state':_0x58dabb[_0x36c97a(0x15c)],'exportParams':_0x58dabb['exportParams'],'storeParams':_0x58dabb[_0x36c97a(0x198)],'stateParams':_0x58dabb[_0x36c97a(0x14c)],'updatedAt':_0x58dabb[_0x36c97a(0x182)],'retryAt':_0x58dabb['retryAt'],'startedAt':_0x58dabb[_0x36c97a(0x188)],'error':_0x58dabb['error'],'isGroup':_0x58dabb[_0x36c97a(0x158)],'id':_0x58dabb['id'],'fullName':_0x58dabb[_0x36c97a(0x195)]}));}async['logFiles'](_0x4bfafe,_0x434cb5){const _0x4ff813=a127_0x5596e5;return await this[_0x4ff813(0x139)][_0x4ff813(0x171)](_0x4bfafe,_0x434cb5);}async['logs'](_0xc1da89,_0x197dd7){const _0x52320c=a127_0x5596e5,_0x1d48f3=await import('zlib'),{promisify:_0x334ad0}=await import(_0x52320c(0x13f)),_0x5ccf79=_0x334ad0(_0x1d48f3[_0x52320c(0x148)]),_0x162fdc=await this[_0x52320c(0x139)][_0x52320c(0x171)](_0xc1da89,_0x197dd7);if(_0x162fdc['length']===0x0)return'';const _0x4bd9d5=[];for(const _0x5e8a96 of _0x162fdc){if(!_0x5e8a96[_0x52320c(0x159)])continue;const _0x52d245=await fetch(_0x5e8a96[_0x52320c(0x159)]);if(!_0x52d245['ok'])throw new Error(_0x52320c(0x15b)+_0x52d245[_0x52320c(0x17a)]);const _0x387c53=Buffer['from'](await _0x52d245[_0x52320c(0x136)]()),_0x12c501=await _0x5ccf79(_0x387c53);_0x4bd9d5['push'](_0x12c501[_0x52320c(0x179)](_0x52320c(0x16a)));}return _0x4bd9d5[_0x52320c(0x177)]('\x0a');}async[a127_0x5596e5(0x178)](_0x2f128c,_0x539a91){const _0x47b6fa=a127_0x5596e5,_0x13a126=await this[_0x47b6fa(0x139)][_0x47b6fa(0x169)](_0x2f128c,_0x539a91);return _0x13a126?.['message']??_0x47b6fa(0x151);}async[a127_0x5596e5(0x14b)](_0x272440,_0x1cd98b){const _0x5aa403=a127_0x5596e5,_0xf52120=await this[_0x5aa403(0x139)][_0x5aa403(0x14b)](_0x272440,{'from_task':_0x1cd98b?.[_0x5aa403(0x155)],'retry_params':_0x1cd98b?.[_0x5aa403(0x16c)]});return{'attemptId':_0xf52120['id'],'sessionId':_0xf52120[_0x5aa403(0x16b)]};}async[a127_0x5596e5(0x149)](_0x2350f2,_0x3fcb53){const _0x1a9a94=a127_0x5596e5,_0x38f426=await this[_0x1a9a94(0x139)]['retryAttempt'](_0x2350f2,{'resume_from':_0x3fcb53?.[_0x1a9a94(0x165)],'retry_params':_0x3fcb53?.[_0x1a9a94(0x16c)],'force':_0x3fcb53?.[_0x1a9a94(0x131)]});return{'attemptId':_0x38f426['id'],'sessionId':_0x38f426[_0x1a9a94(0x16b)]};}async[a127_0x5596e5(0x196)](_0x3de5a0,_0x53f695={},_0x515d66){const _0xec6711=a127_0x5596e5,_0x45f67a=_0x3de5a0[_0xec6711(0x189)]('.');let _0x1f56e6,_0x3efcd0;if(_0x45f67a===-0x1)throw new Error('Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format');_0x1f56e6=_0x3de5a0[_0xec6711(0x14a)](0x0,_0x45f67a),_0x3efcd0=_0x3de5a0['substring'](_0x45f67a+0x1);if(!_0x1f56e6||!_0x3efcd0)throw new Error('Invalid\x20workflow\x20format:\x20'+_0x3de5a0+'.\x20Expected\x20\x22project.workflow\x22');const _0x4bda49=_0x515d66?.['sessionTime']||new Date()['toISOString']();return await this[_0xec6711(0x139)]['startAttempt']({'projectName':_0x1f56e6,'workflowName':_0x3efcd0,'sessionTime':_0x4bda49,'params':_0x53f695});}async['download'](_0x581400,_0x1568ab,_0x2e8da0){const _0x4e69b2=a127_0x5596e5,{promises:_0x4202b0}=await import('fs'),_0x30b0f2=await import(_0x4e69b2(0x14f)),_0x5844d5=await import('os'),_0x3c266b=await import(_0x4e69b2(0x134)),{id:_0x433f80,name:_0x11af81}=await this[_0x4e69b2(0x191)](_0x581400),_0x12feeb=_0x5844d5[_0x4e69b2(0x144)](),_0x306dc7=_0x30b0f2[_0x4e69b2(0x177)](_0x12feeb,'tdx-workflow-'+_0x433f80+'-'+Date['now']()+_0x4e69b2(0x141));try{await this[_0x4e69b2(0x139)]['downloadProjectArchive'](_0x433f80,_0x306dc7,_0x2e8da0?.[_0x4e69b2(0x150)]);const _0x4280e6=_0x30b0f2['join'](_0x1568ab,_0x11af81);await _0x4202b0[_0x4e69b2(0x18d)](_0x4280e6,{'recursive':!![]}),await _0x3c266b[_0x4e69b2(0x15f)]({'file':_0x306dc7,'cwd':_0x4280e6,'gzip':!![]});const _0x16d21e=async _0x1fbb0c=>{const _0x5a8c74=_0x4e69b2;let _0x229bac=0x0;const _0x30c46e=await _0x4202b0['readdir'](_0x1fbb0c,{'withFileTypes':!![]});for(const _0x3cf964 of _0x30c46e){const _0x1f22d1=_0x30b0f2[_0x5a8c74(0x177)](_0x1fbb0c,_0x3cf964[_0x5a8c74(0x18b)]);if(_0x3cf964[_0x5a8c74(0x197)]())_0x229bac++;else _0x3cf964['isDirectory']()&&(_0x229bac+=await _0x16d21e(_0x1f22d1));}return _0x229bac;},_0x34af3a=await _0x16d21e(_0x4280e6);return{'projectName':_0x11af81,'revision':_0x2e8da0?.[_0x4e69b2(0x150)]||_0x4e69b2(0x143),'filesExtracted':_0x34af3a};}finally{try{await _0x4202b0[_0x4e69b2(0x15a)](_0x306dc7);}catch{}}}async[a127_0x5596e5(0x140)](_0x3a977e,_0x4f1144){const _0x304720=a127_0x5596e5,{promises:_0x32e65a}=await import('fs'),_0x3575b6=await import(_0x304720(0x14f)),_0x99321f=await import('tar'),_0x2a1808=_0x4f1144?.[_0x304720(0x13d)]||_0x3575b6[_0x304720(0x18c)](_0x3a977e),_0x471447=_0x4f1144?.[_0x304720(0x150)]||new Date()[_0x304720(0x16e)]()[_0x304720(0x172)](/[:.]/g,'-');try{await _0x32e65a[_0x304720(0x146)](_0x3a977e);}catch{throw new Error(_0x304720(0x147)+_0x3a977e);}if(!_0x4f1144?.['skipValidation']){const _0xcb5252=await _0x32e65a['readdir'](_0x3a977e),_0x35bd7a=_0xcb5252[_0x304720(0x167)](_0x24bbe5=>_0x24bbe5[_0x304720(0x17b)](WORKFLOW_FILE_EXTENSION));if(_0x35bd7a[_0x304720(0x181)]===0x0)throw new Error(_0x304720(0x173)+WORKFLOW_FILE_EXTENSION+_0x304720(0x175));for(const _0x2eee77 of _0x35bd7a){const _0x2aeb27=_0x3575b6['join'](_0x3a977e,_0x2eee77);try{await _0x32e65a[_0x304720(0x146)](_0x2aeb27);}catch{throw new Error(_0x304720(0x17e)+_0x2eee77);}}}const _0x44e30a=async(_0x46a939,_0x1b273a='')=>{const _0x460cf4=_0x304720,_0x4e6e7e=await _0x32e65a[_0x460cf4(0x183)](_0x46a939,{'withFileTypes':!![]}),_0x23fd4d=[];for(const _0x19c692 of _0x4e6e7e){const _0x5e9102=_0x3575b6[_0x460cf4(0x177)](_0x1b273a,_0x19c692[_0x460cf4(0x18b)]),_0x196f6e=_0x3575b6[_0x460cf4(0x177)](_0x46a939,_0x19c692['name']);if(!shouldIncludeInArchive(_0x19c692[_0x460cf4(0x18b)]))continue;_0x19c692[_0x460cf4(0x18f)]()?_0x23fd4d[_0x460cf4(0x140)](...await _0x44e30a(_0x196f6e,_0x5e9102)):_0x23fd4d[_0x460cf4(0x140)](_0x5e9102);}return _0x23fd4d;},_0x3efee0=await _0x44e30a(_0x3a977e),_0x39d28c=await import('os'),_0xebcc20=_0x39d28c[_0x304720(0x144)](),_0x49d921=_0x3575b6[_0x304720(0x177)](_0xebcc20,_0x304720(0x15e)+Date[_0x304720(0x17f)]()+_0x304720(0x141));try{await _0x99321f['create']({'file':_0x49d921,'gzip':!![],'cwd':_0x3a977e,'portable':!![]},_0x3efee0);const _0x51235b=await this[_0x304720(0x139)][_0x304720(0x168)](_0x2a1808,_0x471447,_0x49d921,{'scheduleFrom':_0x4f1144?.['scheduleFrom'],'clearSchedule':_0x4f1144?.[_0x304720(0x19b)],'clearScheduleAll':_0x4f1144?.[_0x304720(0x132)]});return{'projectId':_0x51235b['id'],'projectName':_0x51235b[_0x304720(0x18b)],'revision':_0x51235b['revision']};}finally{try{await _0x32e65a[_0x304720(0x15a)](_0x49d921);}catch{}}}async[a127_0x5596e5(0x138)](_0x16cbf3){const _0x1758e8=a127_0x5596e5,{id:_0x10572e}=await this[_0x1758e8(0x191)](_0x16cbf3),_0x44bc81=await this[_0x1758e8(0x139)]['deleteProject'](_0x10572e);return{'projectId':_0x44bc81['id'],'projectName':_0x44bc81[_0x1758e8(0x18b)]};}}function a127_0x6035(){const _0x4c66e1=['5623064PRVFHS','fromTask','Project\x20not\x20found:\x20','createdAt','isGroup','direct','unlink','Failed\x20to\x20download\x20log\x20file:\x20','state','838635WFvahB','tdx-workflow-push-','extract','3pQcoPb','data','logger','parentId','workflow','resumeFrom','test','filter','uploadProjectArchive','killAttempt','utf-8','sessionId','retryParams','success','toISOString','attempts','430045IxDDbZ','listLogFiles','replace','No\x20','sessionUuid','\x20workflow\x20files\x20found\x20in\x20project\x20directory','toTime','join','kill','toString','status','endsWith','find','listProjects','Cannot\x20read\x20workflow\x20file:\x20','now','50455UYDOCV','length','updatedAt','readdir','sessions','NUMERIC_ID_PATTERN','12hXerTP','1302910ZptmuN','startedAt','indexOf','8456569DYRSDR','name','basename','mkdir','lastId','isDirectory','sessionTime','resolveProjectId','retryAttemptName','lastAttempt','workflowName','fullName','run','isFile','storeParams','listWorkflows','project','clearSchedule','index','force','clearScheduleAll','9gyNiZk','tar','last_id','arrayBuffer','limit','delete','client','listAttempts','params','56ktkZDB','projectName','config','util','push','.tar.gz','finishedAt','latest','tmpdir','600402HaVkUd','access','Project\x20directory\x20not\x20found:\x20','gunzip','retryAttempt','substring','retrySession','stateParams','map','workflows','path','revision','Kill\x20request\x20accepted','attempt','fromTime'];a127_0x6035=function(){return _0x4c66e1;};return a127_0x6035();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a128_0x1a2a(){const _0x5afaab=['6QFRfrH','409659MvIiHH','.dig','6911466lqjytq','startsWith','5643358MXpGal','5eRVCWy','4595904bTuDor','181418sYJjEI','4931267HHpoVd','24FFmYqJ','30eoZyrG','3458358qzdCGF','.digdag'];a128_0x1a2a=function(){return _0x5afaab;};return a128_0x1a2a();}const a128_0x404bd5=a128_0x1eed;(function(_0x2637c7,_0x530652){const _0x42b8f6=a128_0x1eed,_0x274b21=_0x2637c7();while(!![]){try{const _0x25b640=parseInt(_0x42b8f6(0xf2))/0x1*(-parseInt(_0x42b8f6(0xfa))/0x2)+parseInt(_0x42b8f6(0xf3))/0x3+-parseInt(_0x42b8f6(0xf9))/0x4+parseInt(_0x42b8f6(0xf8))/0x5*(parseInt(_0x42b8f6(0xf5))/0x6)+parseInt(_0x42b8f6(0xf7))/0x7+-parseInt(_0x42b8f6(0xfc))/0x8*(parseInt(_0x42b8f6(0xf0))/0x9)+-parseInt(_0x42b8f6(0xfd))/0xa*(-parseInt(_0x42b8f6(0xfb))/0xb);if(_0x25b640===_0x530652)break;else _0x274b21['push'](_0x274b21['shift']());}catch(_0x535826){_0x274b21['push'](_0x274b21['shift']());}}}(a128_0x1a2a,0x90e7d));export const WORKFLOW_FILE_EXTENSION=a128_0x404bd5(0xf4);function a128_0x1eed(_0x490e6c,_0x4f0d1d){_0x490e6c=_0x490e6c-0xf0;const _0x1a2af2=a128_0x1a2a();let _0x1eedf6=_0x1a2af2[_0x490e6c];return _0x1eedf6;}export function shouldIncludeInArchive(_0x524ede){const _0x4a889f=a128_0x404bd5;if(_0x524ede===_0x4a889f(0xf1))return!![];if(_0x524ede[_0x4a889f(0xf6)]('.'))return![];return!![];}
|
package/dist/utils/async.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e4f19,_0x2c065c){const _0x238224=a129_0x29b7,_0x2f70de=_0x1e4f19();while(!![]){try{const _0x35d889=parseInt(_0x238224(0x106))/0x1*(parseInt(_0x238224(0x10c))/0x2)+parseInt(_0x238224(0x100))/0x3+parseInt(_0x238224(0x101))/0x4*(parseInt(_0x238224(0x103))/0x5)+-parseInt(_0x238224(0x108))/0x6+-parseInt(_0x238224(0x10a))/0x7*(-parseInt(_0x238224(0x109))/0x8)+-parseInt(_0x238224(0x104))/0x9*(parseInt(_0x238224(0x107))/0xa)+-parseInt(_0x238224(0xff))/0xb;if(_0x35d889===_0x2c065c)break;else _0x2f70de['push'](_0x2f70de['shift']());}catch(_0x12f362){_0x2f70de['push'](_0x2f70de['shift']());}}}(a129_0x5813,0xd5f33));export async function batchAsync(_0x40a3c0,_0xf250d7,_0x224f03=0xa){const _0x3db558=a129_0x29b7,_0x5b876b=[];for(let _0x15a7c0=0x0;_0x15a7c0<_0x40a3c0['length'];_0x15a7c0+=_0x224f03){const _0x1db111=_0x40a3c0[_0x3db558(0x105)](_0x15a7c0,_0x15a7c0+_0x224f03),_0x428ffb=await Promise[_0x3db558(0x10b)](_0x1db111[_0x3db558(0x102)](_0xf250d7));_0x5b876b['push'](..._0x428ffb);}return _0x5b876b;}function a129_0x29b7(_0x4a317d,_0x439a0e){_0x4a317d=_0x4a317d-0xff;const _0x581333=a129_0x5813();let _0x29b791=_0x581333[_0x4a317d];return _0x29b791;}function a129_0x5813(){const _0x100a5e=['slice','207053uJSwWS','620QtoCIn','10307382PtEBIj','8npyvSb','2139641CSuslh','all','12mIXKRV','4193695sqQQmM','5143788HLRQbi','212bgwlVo','map','79070FCPLmz','163341bmgUQj'];a129_0x5813=function(){return _0x100a5e;};return a129_0x5813();}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1cf420,_0x20dbff){const _0x438e2e=a130_0x5e87,_0x39ac0a=_0x1cf420();while(!![]){try{const _0x4d2caa=-parseInt(_0x438e2e(0xeb))/0x1+-parseInt(_0x438e2e(0xe7))/0x2+parseInt(_0x438e2e(0xe1))/0x3*(parseInt(_0x438e2e(0xf1))/0x4)+-parseInt(_0x438e2e(0xd4))/0x5+-parseInt(_0x438e2e(0xda))/0x6*(-parseInt(_0x438e2e(0xdf))/0x7)+-parseInt(_0x438e2e(0xdd))/0x8*(parseInt(_0x438e2e(0xe8))/0x9)+-parseInt(_0x438e2e(0xe5))/0xa*(-parseInt(_0x438e2e(0xd6))/0xb);if(_0x4d2caa===_0x20dbff)break;else _0x39ac0a['push'](_0x39ac0a['shift']());}catch(_0x19dfc0){_0x39ac0a['push'](_0x39ac0a['shift']());}}}(a130_0x376c,0x52b8d));import{Chalk}from'chalk';export function shouldUseColor(_0x49a856={}){const _0xe508e6=a130_0x5e87;if(_0x49a856[_0xe508e6(0xed)]===!![])return![];if(_0x49a856[_0xe508e6(0xf0)]===!![])return!![];if(process[_0xe508e6(0xd5)][_0xe508e6(0xec)]!==undefined)return![];return process[_0xe508e6(0xe3)]['isTTY']??![];}export function getChalk(_0x5b53b6={}){if(shouldUseColor(_0x5b53b6))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x5e31b7,_0x2dcc65={}){return getChalk(_0x2dcc65)['dim'](_0x5e31b7);}export function colorHeader(_0x36a0ca,_0x11b574={}){const _0x3228bb=a130_0x5e87;return getChalk(_0x11b574)[_0x3228bb(0xd3)](_0x36a0ca);}export function colorType(_0x5c6d69,_0x4064d6={}){const _0x155879=a130_0x5e87;return getChalk(_0x4064d6)[_0x155879(0xef)](_0x5c6d69);}export function colorJSONKey(_0xf25758,_0x17476a={}){const _0x1e376=a130_0x5e87;return getChalk(_0x17476a)[_0x1e376(0xe9)](_0xf25758);}export function colorJSONString(_0x45e034,_0x51490c={}){const _0x4b917a=a130_0x5e87;return getChalk(_0x51490c)[_0x4b917a(0xe0)](_0x45e034);}export function colorJSONNumber(_0x2f1a15,_0x3e0f82={}){const _0x48eef3=a130_0x5e87;return getChalk(_0x3e0f82)[_0x48eef3(0xd3)](_0x2f1a15);}export function colorJSONBoolean(_0x546721,_0x5f5527={}){const _0x14951e=a130_0x5e87;return getChalk(_0x5f5527)[_0x14951e(0xd7)](_0x546721);}export function colorJSONNull(_0x1ce8e4,_0x50fa53={}){const _0x568650=a130_0x5e87;return getChalk(_0x50fa53)[_0x568650(0xef)](_0x1ce8e4);}export function colorizeJSONCompact(_0x585766,_0x5668c1={}){const _0x58741e=a130_0x5e87;if(!shouldUseColor(_0x5668c1))return JSON[_0x58741e(0xd2)](_0x585766);if(_0x585766===null)return colorJSONNull('null',_0x5668c1);if(typeof _0x585766===_0x58741e(0xe2))return colorJSONBoolean(String(_0x585766),_0x5668c1);if(typeof _0x585766==='number')return colorJSONNumber(String(_0x585766),_0x5668c1);if(typeof _0x585766===_0x58741e(0xdc))return colorJSONString(JSON['stringify'](_0x585766),_0x5668c1);if(Array[_0x58741e(0xe6)](_0x585766)){if(_0x585766['length']===0x0)return'[]';const _0x1036e4=_0x585766[_0x58741e(0xee)](_0x26afaf=>colorizeJSONCompact(_0x26afaf,_0x5668c1));return'['+_0x1036e4[_0x58741e(0xd9)](',')+']';}if(typeof _0x585766==='object'){const _0x119647=Object[_0x58741e(0xdb)](_0x585766);if(_0x119647[_0x58741e(0xe4)]===0x0)return'{}';const _0x1e4b7d=_0x119647[_0x58741e(0xee)](([_0x195142,_0xd1d674])=>{const _0x105547=_0x58741e,_0x4b060a=colorJSONKey(JSON[_0x105547(0xd2)](_0x195142),_0x5668c1),_0x239438=colorizeJSONCompact(_0xd1d674,_0x5668c1);return _0x4b060a+':'+_0x239438;});return'{'+_0x1e4b7d[_0x58741e(0xd9)](',')+'}';}return String(_0x585766);}function a130_0x5e87(_0x228a2d,_0x228de5){_0x228a2d=_0x228a2d-0xd2;const _0x376c73=a130_0x376c();let _0x5e87d1=_0x376c73[_0x228a2d];return _0x5e87d1;}function a130_0x376c(){const _0xc781f7=['repeat','633647BCwBFm','NO_COLOR','noColor','map','dim','color','2168qpAApr','stringify','cyan','2245mkEcqW','env','55EljZxb','yellow','object','join','354498csayCO','entries','string','6376eydvUc','null','7EqqUkv','green','345SYxcdn','boolean','stdout','length','1873940uNGjZi','isArray','65712CEsjOh','594SXUZfh','blue'];a130_0x376c=function(){return _0xc781f7;};return a130_0x376c();}export function colorizeJSON(_0x3c87d9,_0x1b69ec={},_0x36bc62=0x0){const _0x5896ff=a130_0x5e87;if(!shouldUseColor(_0x1b69ec))return JSON[_0x5896ff(0xd2)](_0x3c87d9,null,0x2);const _0x5ec64c='\x20'[_0x5896ff(0xea)](_0x36bc62),_0x2f7106=_0x36bc62+0x2;if(_0x3c87d9===null)return colorJSONNull(_0x5896ff(0xde),_0x1b69ec);if(typeof _0x3c87d9==='boolean')return colorJSONBoolean(String(_0x3c87d9),_0x1b69ec);if(typeof _0x3c87d9==='number')return colorJSONNumber(String(_0x3c87d9),_0x1b69ec);if(typeof _0x3c87d9==='string')return colorJSONString(JSON['stringify'](_0x3c87d9),_0x1b69ec);if(Array['isArray'](_0x3c87d9)){if(_0x3c87d9[_0x5896ff(0xe4)]===0x0)return'[]';const _0x1cec64=_0x3c87d9[_0x5896ff(0xee)](_0x3744f5=>{const _0x3f2149=_0x5896ff,_0x2ba44a=colorizeJSON(_0x3744f5,_0x1b69ec,_0x2f7106);return''+'\x20'[_0x3f2149(0xea)](_0x2f7106)+_0x2ba44a;});return'[\x0a'+_0x1cec64['join'](',\x0a')+('\x0a'+_0x5ec64c+']');}if(typeof _0x3c87d9===_0x5896ff(0xd8)){const _0x27bb97=Object[_0x5896ff(0xdb)](_0x3c87d9);if(_0x27bb97[_0x5896ff(0xe4)]===0x0)return'{}';const _0x37d21e=_0x27bb97[_0x5896ff(0xee)](([_0x30582a,_0x4a1b85])=>{const _0x4382e7=_0x5896ff,_0x24cf22=colorJSONKey(JSON['stringify'](_0x30582a),_0x1b69ec),_0x554e59=colorizeJSON(_0x4a1b85,_0x1b69ec,_0x2f7106);return''+'\x20'[_0x4382e7(0xea)](_0x2f7106)+_0x24cf22+':\x20'+_0x554e59;});return'{\x0a'+_0x37d21e[_0x5896ff(0xd9)](',\x0a')+('\x0a'+_0x5ec64c+'}');}return String(_0x3c87d9);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1eb5f5,_0x150360){const _0x40cd73=a131_0x5e21,_0x472a6e=_0x1eb5f5();while(!![]){try{const _0x396034=-parseInt(_0x40cd73(0x1dc))/0x1*(parseInt(_0x40cd73(0x1df))/0x2)+-parseInt(_0x40cd73(0x1ea))/0x3+parseInt(_0x40cd73(0x1d6))/0x4+-parseInt(_0x40cd73(0x1f6))/0x5+-parseInt(_0x40cd73(0x1f0))/0x6*(-parseInt(_0x40cd73(0x1e8))/0x7)+parseInt(_0x40cd73(0x1f7))/0x8+-parseInt(_0x40cd73(0x1d4))/0x9*(parseInt(_0x40cd73(0x1ec))/0xa);if(_0x396034===_0x150360)break;else _0x472a6e['push'](_0x472a6e['shift']());}catch(_0x40e56a){_0x472a6e['push'](_0x472a6e['shift']());}}}(a131_0x3927,0xba407));function a131_0x5e21(_0x3b1fda,_0x801bad){_0x3b1fda=_0x3b1fda-0x1d3;const _0x39270d=a131_0x3927();let _0x5e213=_0x39270d[_0x3b1fda];return _0x5e213;}import a131_0x47c6a7 from'chalk';export function generateDiff(_0x30c744,_0x57c96f){const _0x5cb9fa=a131_0x5e21,_0x3fa162=_0x30c744[_0x5cb9fa(0x1ee)]('\x0a'),_0x4b9848=_0x57c96f[_0x5cb9fa(0x1ee)]('\x0a'),_0x2da3e2=[],_0xb99e63=computeLCS(_0x3fa162,_0x4b9848);let _0x5b825f=0x0,_0x361283=0x0,_0x5f37e9=0x0;while(_0x5b825f<_0x3fa162[_0x5cb9fa(0x1dd)]||_0x361283<_0x4b9848[_0x5cb9fa(0x1dd)]){if(_0x5f37e9<_0xb99e63[_0x5cb9fa(0x1dd)]&&_0x5b825f<_0x3fa162[_0x5cb9fa(0x1dd)]&&_0x3fa162[_0x5b825f]===_0xb99e63[_0x5f37e9])_0x361283<_0x4b9848['length']&&_0x4b9848[_0x361283]===_0xb99e63[_0x5f37e9]?(_0x2da3e2['push']({'type':'unchanged','content':_0x3fa162[_0x5b825f]}),_0x5b825f++,_0x361283++,_0x5f37e9++):(_0x2da3e2['push']({'type':_0x5cb9fa(0x1e2),'content':_0x4b9848[_0x361283]}),_0x361283++);else{if(_0x5f37e9<_0xb99e63[_0x5cb9fa(0x1dd)]&&_0x361283<_0x4b9848['length']&&_0x4b9848[_0x361283]===_0xb99e63[_0x5f37e9])_0x2da3e2[_0x5cb9fa(0x1da)]({'type':_0x5cb9fa(0x1e6),'content':_0x3fa162[_0x5b825f]}),_0x5b825f++;else{if(_0x5b825f<_0x3fa162[_0x5cb9fa(0x1dd)]&&(_0x5f37e9>=_0xb99e63[_0x5cb9fa(0x1dd)]||_0x3fa162[_0x5b825f]!==_0xb99e63[_0x5f37e9]))_0x2da3e2['push']({'type':_0x5cb9fa(0x1e6),'content':_0x3fa162[_0x5b825f]}),_0x5b825f++;else _0x361283<_0x4b9848[_0x5cb9fa(0x1dd)]&&(_0x2da3e2[_0x5cb9fa(0x1da)]({'type':_0x5cb9fa(0x1e2),'content':_0x4b9848[_0x361283]}),_0x361283++);}}}return _0x2da3e2;}function computeLCS(_0x38e822,_0xb90292){const _0x26faf5=a131_0x5e21,_0x26a83c=_0x38e822[_0x26faf5(0x1dd)],_0x5e92ac=_0xb90292[_0x26faf5(0x1dd)],_0x1e670d=Array(_0x26a83c+0x1)[_0x26faf5(0x1d5)](null)[_0x26faf5(0x1de)](()=>Array(_0x5e92ac+0x1)['fill'](0x0));for(let _0x3971d4=0x1;_0x3971d4<=_0x26a83c;_0x3971d4++){for(let _0x4b10f0=0x1;_0x4b10f0<=_0x5e92ac;_0x4b10f0++){_0x38e822[_0x3971d4-0x1]===_0xb90292[_0x4b10f0-0x1]?_0x1e670d[_0x3971d4][_0x4b10f0]=_0x1e670d[_0x3971d4-0x1][_0x4b10f0-0x1]+0x1:_0x1e670d[_0x3971d4][_0x4b10f0]=Math['max'](_0x1e670d[_0x3971d4-0x1][_0x4b10f0],_0x1e670d[_0x3971d4][_0x4b10f0-0x1]);}}const _0x3ce8d9=[];let _0xc19a45=_0x26a83c,_0x2b7d1a=_0x5e92ac;while(_0xc19a45>0x0&&_0x2b7d1a>0x0){if(_0x38e822[_0xc19a45-0x1]===_0xb90292[_0x2b7d1a-0x1])_0x3ce8d9[_0x26faf5(0x1d8)](_0x38e822[_0xc19a45-0x1]),_0xc19a45--,_0x2b7d1a--;else _0x1e670d[_0xc19a45-0x1][_0x2b7d1a]>_0x1e670d[_0xc19a45][_0x2b7d1a-0x1]?_0xc19a45--:_0x2b7d1a--;}return _0x3ce8d9;}export function formatDiffWithColors(_0x2168e4,_0x302b5b=0x3){const _0x476a98=a131_0x5e21,_0x1d333d=new Set();_0x2168e4['forEach']((_0x5c24be,_0x4e2448)=>{const _0x152cf6=a131_0x5e21;_0x5c24be[_0x152cf6(0x1e5)]!==_0x152cf6(0x1d9)&&_0x1d333d[_0x152cf6(0x1e9)](_0x4e2448);});if(_0x1d333d[_0x476a98(0x1ed)]===0x0)return'';const _0x1e4eaf=new Set();for(const _0x230d62 of _0x1d333d){for(let _0xb076ad=Math['max'](0x0,_0x230d62-_0x302b5b);_0xb076ad<=Math[_0x476a98(0x1f5)](_0x2168e4['length']-0x1,_0x230d62+_0x302b5b);_0xb076ad++){_0x1e4eaf[_0x476a98(0x1e9)](_0xb076ad);}}const _0x20bbb2=[];let _0x15adf3=-0x1;const _0x22545f=_0x2168e4['length'],_0xa56831=Math[_0x476a98(0x1db)](0x3,String(_0x22545f)['length']),_0x4c8df5=[];let _0x46f0d5=0x0,_0x10c2f7=0x0;for(const _0xff6246 of _0x2168e4){if(_0xff6246[_0x476a98(0x1e5)]===_0x476a98(0x1e6))_0x46f0d5++,_0x4c8df5[_0x476a98(0x1da)]({'old':_0x46f0d5,'new':0x0});else _0xff6246[_0x476a98(0x1e5)]===_0x476a98(0x1e2)?(_0x10c2f7++,_0x4c8df5[_0x476a98(0x1da)]({'old':0x0,'new':_0x10c2f7})):(_0x46f0d5++,_0x10c2f7++,_0x4c8df5[_0x476a98(0x1da)]({'old':_0x46f0d5,'new':_0x10c2f7}));}for(let _0x1bb40c=0x0;_0x1bb40c<_0x2168e4[_0x476a98(0x1dd)];_0x1bb40c++){if(!_0x1e4eaf[_0x476a98(0x1e3)](_0x1bb40c))continue;_0x15adf3!==-0x1&&_0x1bb40c>_0x15adf3+0x1&&_0x20bbb2['push'](a131_0x47c6a7[_0x476a98(0x1f8)](_0x476a98(0x1f3)));_0x15adf3=_0x1bb40c;const _0x39353b=_0x2168e4[_0x1bb40c],_0x38ce1b=_0x4c8df5[_0x1bb40c],_0x2209f0=_0x38ce1b['old']>0x0?String(_0x38ce1b[_0x476a98(0x1f1)])[_0x476a98(0x1d3)](_0xa56831):'\x20'['repeat'](_0xa56831),_0xcbeb9e=_0x38ce1b[_0x476a98(0x1e7)]>0x0?String(_0x38ce1b[_0x476a98(0x1e7)])['padStart'](_0xa56831):'\x20'['repeat'](_0xa56831);switch(_0x39353b['type']){case _0x476a98(0x1e6):_0x20bbb2[_0x476a98(0x1da)](a131_0x47c6a7['red'](_0x2209f0+'\x20'+_0xcbeb9e+_0x476a98(0x1eb)+_0x39353b[_0x476a98(0x1ef)]));break;case _0x476a98(0x1e2):_0x20bbb2[_0x476a98(0x1da)](a131_0x47c6a7[_0x476a98(0x1f2)](_0x2209f0+'\x20'+_0xcbeb9e+_0x476a98(0x1f4)+_0x39353b[_0x476a98(0x1ef)]));break;default:_0x20bbb2[_0x476a98(0x1da)](a131_0x47c6a7[_0x476a98(0x1e0)](_0x2209f0+'\x20'+_0xcbeb9e+_0x476a98(0x1e4)+_0x39353b['content']));break;}}return _0x20bbb2[_0x476a98(0x1d7)]('\x0a');}function a131_0x3927(){const _0xb9da31=['dim','some','added','has','\x20\x20\x20','type','removed','new','1673euFque','add','2181918PbaZUh','\x20-\x20','30nUtldm','size','split','content','19032ikfZrt','old','green','\x20\x20...','\x20+\x20','min','747265etpLhP','11417552ttHopb','cyan','padStart','3465423sfzkwN','fill','4192780Bksnmz','join','unshift','unchanged','push','max','19Xeybru','length','map','46180jnHeIU'];a131_0x3927=function(){return _0xb9da31;};return a131_0x3927();}export function hasChanges(_0xba4c2e){const _0x3fe722=a131_0x5e21;return _0xba4c2e[_0x3fe722(0x1e1)](_0x4820d7=>_0x4820d7[_0x3fe722(0x1e5)]!==_0x3fe722(0x1d9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a132_0x4d38(){const _0x458e07=['6912909UGHFXQ','1876122BkDktc','statSync','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','23224ewuvbT','949485raOUAQ','9pFaYRW','\x20has\x20insecure\x20permissions\x20(',').\x20','warn','6050338xgdhIu','dirname','2811879qaCSnM','toString','writeFileSync','16cOfIXB','8gqBQmi','mkdirSync','13143110SyJoTe','Should\x20be\x200600\x20or\x20more\x20restrictive.','mode','chmodSync'];a132_0x4d38=function(){return _0x458e07;};return a132_0x4d38();}(function(_0x594772,_0x60c861){const _0x56f39a=a132_0x3491,_0x1ac04a=_0x594772();while(!![]){try{const _0xf458a1=parseInt(_0x56f39a(0x133))/0x1*(-parseInt(_0x56f39a(0x131))/0x2)+parseInt(_0x56f39a(0x123))/0x3+-parseInt(_0x56f39a(0x126))/0x4*(-parseInt(_0x56f39a(0x132))/0x5)+parseInt(_0x56f39a(0x12e))/0x6+parseInt(_0x56f39a(0x121))/0x7+parseInt(_0x56f39a(0x127))/0x8*(-parseInt(_0x56f39a(0x12d))/0x9)+-parseInt(_0x56f39a(0x129))/0xa;if(_0xf458a1===_0x60c861)break;else _0x1ac04a['push'](_0x1ac04a['shift']());}catch(_0x48f427){_0x1ac04a['push'](_0x1ac04a['shift']());}}}(a132_0x4d38,0xa7b86));import*as a132_0x3e27a1 from'node:fs';import*as a132_0x30cc36 from'node:path';function a132_0x3491(_0x2907c0,_0x3d0d2d){_0x2907c0=_0x2907c0-0x11f;const _0x4d389c=a132_0x4d38();let _0x349114=_0x4d389c[_0x2907c0];return _0x349114;}export function setSecureFilePermissions(_0x3f68c4){const _0x57f8f9=a132_0x3491;try{a132_0x3e27a1[_0x57f8f9(0x12c)](_0x3f68c4,0x180);}catch{console[_0x57f8f9(0x120)](_0x57f8f9(0x130)+_0x3f68c4);}}export function setSecureDirectoryPermissions(_0x2c9056){const _0x403f10=a132_0x3491;try{a132_0x3e27a1['chmodSync'](_0x2c9056,0x1c0);}catch{console['warn'](_0x403f10(0x130)+_0x2c9056);}}export function createSecureDirectory(_0x2d8999){const _0x200473=a132_0x3491;!a132_0x3e27a1['existsSync'](_0x2d8999)&&(a132_0x3e27a1[_0x200473(0x128)](_0x2d8999,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x2d8999));}export function validateSecureFilePermissions(_0x4d9b55){const _0x200ab3=a132_0x3491;try{const _0x4f8128=a132_0x3e27a1[_0x200ab3(0x12f)](_0x4d9b55),_0x30b1c3=_0x4f8128[_0x200ab3(0x12b)]&0x1ff,_0x407d58=(_0x30b1c3&0x3f)!==0x0;if(_0x407d58)return console[_0x200ab3(0x120)]('Warning:\x20'+_0x4d9b55+_0x200ab3(0x134)+_0x30b1c3[_0x200ab3(0x124)](0x8)+_0x200ab3(0x11f)+_0x200ab3(0x12a)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x3d9d51,_0x4c84b8){const _0x209972=a132_0x3491,_0x76fc0c=a132_0x30cc36[_0x209972(0x122)](_0x3d9d51);createSecureDirectory(_0x76fc0c),a132_0x3e27a1[_0x209972(0x125)](_0x3d9d51,_0x4c84b8,{'mode':0x180}),setSecureFilePermissions(_0x3d9d51);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c25ec,_0x1552ae){const _0x1fb3ba=a133_0x35e4,_0x4c0395=_0x3c25ec();while(!![]){try{const _0xa2d813=-parseInt(_0x1fb3ba(0x18a))/0x1+-parseInt(_0x1fb3ba(0x18c))/0x2+-parseInt(_0x1fb3ba(0x187))/0x3*(-parseInt(_0x1fb3ba(0x188))/0x4)+parseInt(_0x1fb3ba(0x18d))/0x5+-parseInt(_0x1fb3ba(0x17b))/0x6+parseInt(_0x1fb3ba(0x181))/0x7+-parseInt(_0x1fb3ba(0x17e))/0x8*(-parseInt(_0x1fb3ba(0x185))/0x9);if(_0xa2d813===_0x1552ae)break;else _0x4c0395['push'](_0x4c0395['shift']());}catch(_0x354493){_0x4c0395['push'](_0x4c0395['shift']());}}}(a133_0x325e,0xacf42));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x315e07,_0x1b3c1b){const _0x5d2c23=a133_0x35e4;try{if(_0x1b3c1b){const _0x14f52a=await readFile(_0x315e07,_0x5d2c23(0x180));try{return JSON[_0x5d2c23(0x178)](_0x14f52a);}catch(_0x224b7f){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5d2c23(0x17f)+_0x315e07+_0x5d2c23(0x183)+(_0x224b7f instanceof Error?_0x224b7f[_0x5d2c23(0x182)]:String(_0x224b7f)));}}else try{return JSON[_0x5d2c23(0x178)](_0x315e07);}catch(_0x38c8af){throw new SDKError(ErrorCode[_0x5d2c23(0x17d)],_0x5d2c23(0x18b)+(_0x38c8af instanceof Error?_0x38c8af['message']:String(_0x38c8af)));}}catch(_0xdd1344){if(_0xdd1344 instanceof SDKError)throw _0xdd1344;if(_0xdd1344 instanceof Error&&_0x5d2c23(0x17a)in _0xdd1344){const _0x23a760=_0xdd1344;if(_0x23a760[_0x5d2c23(0x17a)]===_0x5d2c23(0x184))throw new SDKError(ErrorCode['NOT_FOUND'],'File\x20not\x20found:\x20'+_0x315e07);else{if(_0x23a760['code']==='EACCES')throw new SDKError(ErrorCode['PERMISSION_DENIED'],_0x5d2c23(0x17c)+_0x315e07);}}throw new SDKError(ErrorCode[_0x5d2c23(0x179)],_0x5d2c23(0x189)+(_0xdd1344 instanceof Error?_0xdd1344['message']:String(_0xdd1344)));}}function a133_0x35e4(_0x354e60,_0x29bcc0){_0x354e60=_0x354e60-0x178;const _0x325e8f=a133_0x325e();let _0x35e423=_0x325e8f[_0x354e60];return _0x35e423;}export async function loadJSONFromOptions(_0x4e10d3,_0x1899ee){const _0x2d4702=a133_0x35e4;if(_0x4e10d3&&_0x1899ee)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2d4702(0x186));if(_0x4e10d3)return await loadJSON(_0x4e10d3,![]);if(_0x1899ee)return await loadJSON(_0x1899ee,!![]);return undefined;}function a133_0x325e(){const _0x537058=['Permission\x20denied\x20reading\x20file:\x20','INVALID_ARGUMENT','21448520xCVIfh','Invalid\x20JSON\x20in\x20file\x20\x27','utf-8','703619iSzzlA','message','\x27:\x20','ENOENT','9lNscMT','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','6fNlirj','141320hlTUQq','Failed\x20to\x20load\x20JSON:\x20','842486SnjqkY','Invalid\x20JSON\x20string:\x20','1303664dOOqQB','198440GsMXCY','parse','INTERNAL','code','4135164coEfpc'];a133_0x325e=function(){return _0x537058;};return a133_0x325e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a134_0x298b(_0x72e9c0,_0x4c4d34){_0x72e9c0=_0x72e9c0-0x113;const _0x5edb76=a134_0x5edb();let _0x298bc2=_0x5edb76[_0x72e9c0];return _0x298bc2;}(function(_0x27c976,_0x5d926e){const _0x54660d=a134_0x298b,_0x30c2b6=_0x27c976();while(!![]){try{const _0x4c769f=-parseInt(_0x54660d(0x124))/0x1*(parseInt(_0x54660d(0x122))/0x2)+-parseInt(_0x54660d(0x11c))/0x3*(-parseInt(_0x54660d(0x11b))/0x4)+-parseInt(_0x54660d(0x114))/0x5+parseInt(_0x54660d(0x11a))/0x6+-parseInt(_0x54660d(0x119))/0x7*(parseInt(_0x54660d(0x121))/0x8)+-parseInt(_0x54660d(0x11f))/0x9*(parseInt(_0x54660d(0x116))/0xa)+parseInt(_0x54660d(0x120))/0xb*(parseInt(_0x54660d(0x11e))/0xc);if(_0x4c769f===_0x5d926e)break;else _0x30c2b6['push'](_0x30c2b6['shift']());}catch(_0x1a9c36){_0x30c2b6['push'](_0x30c2b6['shift']());}}}(a134_0x5edb,0xcb48a));export function validateLimitOption(_0x203324){const _0x43a20f=a134_0x298b;if(!Number[_0x43a20f(0x113)](_0x203324))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x203324+_0x43a20f(0x115)};if(_0x203324<=0x0)return{'isValid':![],'error':_0x43a20f(0x117)+_0x203324+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x203324};}function a134_0x5edb(){const _0x247aa4=['6721536GZjpjM','60wGcBJC','124653IDaQFh','Invalid\x20timeout\x20value:\x20','12gRDyJw','12231NfyEIM','5396193nyVbqS','15944VHdxAr','2NNalXT','number','80909BIDDNC','isInteger','570075JbtMPi','.\x20Must\x20be\x20an\x20integer.','8130TguiJn','Invalid\x20limit\x20value:\x20','.\x20Must\x20be\x20a\x20positive\x20number.','357FyCYea'];a134_0x5edb=function(){return _0x247aa4;};return a134_0x5edb();}export function validateTimeoutOption(_0x595fd0,_0x2b62c1=0x1e){const _0x13ea33=a134_0x298b;if(_0x595fd0===undefined)return{'isValid':!![],'value':_0x2b62c1};const _0xd3db7e=typeof _0x595fd0===_0x13ea33(0x123)?_0x595fd0:parseFloat(_0x595fd0);if(isNaN(_0xd3db7e))return{'isValid':![],'error':_0x13ea33(0x11d)+_0x595fd0+'.\x20Must\x20be\x20a\x20number.'};if(_0xd3db7e<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0xd3db7e+_0x13ea33(0x118)};return{'isValid':!![],'value':_0xd3db7e};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a135_0x57df(_0x198253,_0x3c1efb){_0x198253=_0x198253-0x1d0;const _0x1fb9e8=a135_0x1fb9();let _0x57dfd3=_0x1fb9e8[_0x198253];return _0x57dfd3;}(function(_0x77743f,_0x239df4){const _0x184e71=a135_0x57df,_0x2ec794=_0x77743f();while(!![]){try{const _0x2155b3=parseInt(_0x184e71(0x1d2))/0x1*(-parseInt(_0x184e71(0x1db))/0x2)+parseInt(_0x184e71(0x1d7))/0x3+-parseInt(_0x184e71(0x1dd))/0x4+parseInt(_0x184e71(0x1d0))/0x5*(parseInt(_0x184e71(0x1da))/0x6)+parseInt(_0x184e71(0x1d8))/0x7*(parseInt(_0x184e71(0x1df))/0x8)+-parseInt(_0x184e71(0x1d1))/0x9*(parseInt(_0x184e71(0x1d6))/0xa)+parseInt(_0x184e71(0x1d3))/0xb*(parseInt(_0x184e71(0x1d9))/0xc);if(_0x2155b3===_0x239df4)break;else _0x2ec794['push'](_0x2ec794['shift']());}catch(_0x232c60){_0x2ec794['push'](_0x2ec794['shift']());}}}(a135_0x1fb9,0x99f24));import{createServer}from'node:net';export async function isPortAvailable(_0x3d24c4){return new Promise(_0x3110e9=>{const _0x4c29ca=a135_0x57df,_0x4a013c=createServer();_0x4a013c[_0x4c29ca(0x1de)](_0x4c29ca(0x1d4),_0x41fdcd=>{const _0x2aa636=_0x4c29ca;_0x41fdcd['code']===_0x2aa636(0x1dc)?_0x3110e9(![]):_0x3110e9(![]);}),_0x4a013c['once'](_0x4c29ca(0x1d5),()=>{_0x4a013c['close'](),_0x3110e9(!![]);}),_0x4a013c['listen'](_0x3d24c4,'0.0.0.0');});}export async function findAvailablePort(_0x399a24=0xfa0,_0x338218=0x64){const _0x1404d3=a135_0x57df;for(let _0x187a37=0x0;_0x187a37<_0x338218;_0x187a37++){const _0x3bd64a=_0x399a24+_0x187a37;if(await isPortAvailable(_0x3bd64a))return _0x3bd64a;}throw new Error(_0x1404d3(0x1e0)+_0x399a24+_0x1404d3(0x1e1)+(_0x399a24+_0x338218-0x1));}function a135_0x1fb9(){const _0x15dc60=['95gkRgOP','801621CYDxEp','2252GquTXp','8195143tcpRyP','error','listening','90iiLtws','2576325kMYmIE','7pagubp','12ycMlcR','131658IjaDqX','556cWzOSC','EADDRINUSE','1037340fPbuCp','once','2374968ijmPKd','No\x20available\x20port\x20found\x20between\x20','\x20and\x20'];a135_0x1fb9=function(){return _0x15dc60;};return a135_0x1fb9();}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a136_0x410fd7=a136_0x141d;function a136_0x141d(_0x19ceee,_0x2093e8){_0x19ceee=_0x19ceee-0x1ef;const _0xeabc35=a136_0xeabc();let _0x141dde=_0xeabc35[_0x19ceee];return _0x141dde;}(function(_0x3a8ac4,_0x4c4b83){const _0x37980c=a136_0x141d,_0x21e072=_0x3a8ac4();while(!![]){try{const _0x5c69cc=parseInt(_0x37980c(0x1fe))/0x1*(-parseInt(_0x37980c(0x202))/0x2)+-parseInt(_0x37980c(0x1f6))/0x3*(parseInt(_0x37980c(0x20d))/0x4)+-parseInt(_0x37980c(0x205))/0x5*(-parseInt(_0x37980c(0x215))/0x6)+-parseInt(_0x37980c(0x1ff))/0x7+parseInt(_0x37980c(0x200))/0x8+parseInt(_0x37980c(0x1f5))/0x9+-parseInt(_0x37980c(0x1fc))/0xa;if(_0x5c69cc===_0x4c4b83)break;else _0x21e072['push'](_0x21e072['shift']());}catch(_0x367556){_0x21e072['push'](_0x21e072['shift']());}}}(a136_0xeabc,0x9eb36));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a136_0x410fd7(0x1f0),a136_0x410fd7(0x1fd),'sh','fish',a136_0x410fd7(0x201),a136_0x410fd7(0x1fb),'csh','dash',a136_0x410fd7(0x20b),'powershell','nu','ion',a136_0x410fd7(0x21c),a136_0x410fd7(0x21a)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a136_0x410fd7(0x209),a136_0x410fd7(0x216),a136_0x410fd7(0x206)]);function getProcessInfoWindows(_0x5ef167){const _0x13beb1=a136_0x410fd7;try{if(!Number['isInteger'](_0x5ef167)||_0x5ef167<=0x0)return null;const _0x5022fc=execSync(_0x13beb1(0x1f3)+_0x5ef167+_0x13beb1(0x219),{'encoding':_0x13beb1(0x1f2),'windowsHide':!![]})['trim'](),_0x4cf893=_0x5022fc[_0x13beb1(0x20c)]('\x0a')['filter'](_0x1d2354=>_0x1d2354[_0x13beb1(0x1f4)]());if(_0x4cf893[_0x13beb1(0x212)]<0x2)return null;const _0x11c296=_0x4cf893[_0x4cf893[_0x13beb1(0x212)]-0x1][_0x13beb1(0x20c)](',');if(_0x11c296['length']<0x3)return null;const _0x393ace=_0x11c296[0x1]?.['trim']()||'',_0x2265b4=parseInt(_0x11c296[0x2]?.[_0x13beb1(0x1f4)]()||'0',0xa);if(isNaN(_0x2265b4)||!_0x393ace)return null;return{'pid':_0x5ef167,'ppid':_0x2265b4,'comm':_0x393ace['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x157af4){const _0x43964e=a136_0x410fd7;try{const _0x207dce=0x400000;if(!Number[_0x43964e(0x20f)](_0x157af4)||_0x157af4<=0x0||_0x157af4>_0x207dce)return null;const _0x5da01f=execSync('ps\x20-p\x20'+_0x157af4+_0x43964e(0x1ef),{'encoding':'utf-8','stdio':_0x43964e(0x20e)})['trim'](),[_0x4f807c,..._0x114b86]=_0x5da01f[_0x43964e(0x20c)](/\s+/),_0x4fc9e1=parseInt(_0x4f807c,0xa),_0x105f0a=_0x114b86[_0x43964e(0x21b)]('\x20');if(isNaN(_0x4fc9e1))return null;return{'pid':_0x157af4,'ppid':_0x4fc9e1,'comm':_0x105f0a};}catch{return null;}}function getProcessInfo(_0x5ee0ae){const _0xdb3c68=a136_0x410fd7;if(process[_0xdb3c68(0x203)]===_0xdb3c68(0x204))return getProcessInfoWindows(_0x5ee0ae);return getProcessInfoPosix(_0x5ee0ae);}function getBasename(_0x272f2e){const _0x54839d=a136_0x410fd7;return _0x272f2e[_0x54839d(0x218)](/^-/,'')[_0x54839d(0x20c)]('/')[_0x54839d(0x1f7)]()?.[_0x54839d(0x20a)]()||'';}function isShell(_0x51dddf){const _0x156a1f=a136_0x410fd7;return SHELL_NAMES[_0x156a1f(0x217)](getBasename(_0x51dddf));}function isEphemeralShellSpawner(_0x390238){const _0x2dfbe1=a136_0x410fd7;return EPHEMERAL_SHELL_SPAWNERS[_0x2dfbe1(0x217)](getBasename(_0x390238));}let cachedShellPID;function findShellPID(){const _0x2b7e6f=a136_0x410fd7;if(process[_0x2b7e6f(0x207)]===undefined)return process[_0x2b7e6f(0x1f9)];let _0x2a66b2=process[_0x2b7e6f(0x207)];const _0x3b3be2=0xa;let _0x401f43=0x0;while(_0x401f43<_0x3b3be2){const _0x132e86=getProcessInfo(_0x2a66b2);if(!_0x132e86)break;if(isShell(_0x132e86[_0x2b7e6f(0x214)])){const _0x4922ee=getProcessInfo(_0x132e86[_0x2b7e6f(0x207)]);if(_0x4922ee&&isEphemeralShellSpawner(_0x4922ee[_0x2b7e6f(0x214)])){_0x2a66b2=_0x132e86[_0x2b7e6f(0x207)],_0x401f43++;continue;}return _0x132e86[_0x2b7e6f(0x1f9)];}if(_0x132e86[_0x2b7e6f(0x207)]===0x0||_0x132e86['ppid']===0x1){if(isShell(_0x132e86[_0x2b7e6f(0x214)]))return _0x132e86[_0x2b7e6f(0x1f9)];break;}_0x2a66b2=_0x132e86[_0x2b7e6f(0x207)],_0x401f43++;}return process[_0x2b7e6f(0x207)]!==undefined?process[_0x2b7e6f(0x207)]:process[_0x2b7e6f(0x1f9)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}function a136_0xeabc(){const _0x4c1b27=['start','tcsh','6283230dUHdlv','zsh','8937bDJIrG','312249dFTeeL','8898352jhPKer','ksh','84PaTbqv','platform','win32','30xDvCeR','cursor','ppid','xdg-open','claude','toLowerCase','pwsh','split','3487828QTAJPb','pipe','isInteger','ignore','unref','length','open','comm','1085334uoubBd','code','has','replace','\x20get\x20ParentProcessId,Name\x20/format:csv','xonsh','join','elvish','\x20-o\x20ppid=,comm=','bash','kill','utf-8','wmic\x20process\x20where\x20ProcessId=','trim','3353859CdlQJI','3MTSbmh','pop','darwin','pid'];a136_0xeabc=function(){return _0x4c1b27;};return a136_0xeabc();}export function isProcessRunning(_0x44c5de){const _0x4ad864=a136_0x410fd7;if(!Number[_0x4ad864(0x20f)](_0x44c5de)||_0x44c5de<=0x0)return![];try{return process[_0x4ad864(0x1f1)](_0x44c5de,0x0),!![];}catch{return![];}}export function openBrowser(_0x13d3b8){const _0x248828=a136_0x410fd7,_0x272f81=process['platform'],_0x490874=_0x272f81===_0x248828(0x1f8)?_0x248828(0x213):_0x272f81===_0x248828(0x204)?_0x248828(0x1fa):_0x248828(0x208);spawn(_0x490874,[_0x13d3b8],{'detached':!![],'stdio':_0x248828(0x210)})[_0x248828(0x211)]();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a137_0x471f(){const _0x808aa6=['\x20[y/N]\x20','stdout','7610fitlzc','yes','18328OHrEba','resume','stdin','close','createInterface','5067VqqSXL','160kMkpxs','54416AoyObS','1722fesSLd','setEncoding','7412496HjfbZG','1613JINVya','data','question','toLowerCase','write','133RLWVHk','16408887wNAZjV','1839933jixewA','exit','setRawMode','stderr','utf8'];a137_0x471f=function(){return _0x808aa6;};return a137_0x471f();}(function(_0x126c40,_0x4571e9){const _0xfb88b1=a137_0x162d,_0x2099fa=_0x126c40();while(!![]){try{const _0x463ba6=-parseInt(_0xfb88b1(0x89))/0x1*(-parseInt(_0xfb88b1(0x86))/0x2)+-parseInt(_0xfb88b1(0x90))/0x3+-parseInt(_0xfb88b1(0x85))/0x4*(-parseInt(_0xfb88b1(0x84))/0x5)+-parseInt(_0xfb88b1(0x88))/0x6+-parseInt(_0xfb88b1(0x8e))/0x7*(parseInt(_0xfb88b1(0x99))/0x8)+-parseInt(_0xfb88b1(0x83))/0x9*(parseInt(_0xfb88b1(0x97))/0xa)+parseInt(_0xfb88b1(0x8f))/0xb;if(_0x463ba6===_0x4571e9)break;else _0x2099fa['push'](_0x2099fa['shift']());}catch(_0x897f87){_0x2099fa['push'](_0x2099fa['shift']());}}}(a137_0x471f,0xf2f43));import*as a137_0x5c588b from'readline';export async function confirm(_0x5563d2){const _0x38cce3=a137_0x162d,_0x38813d=a137_0x5c588b[_0x38cce3(0x82)]({'input':process[_0x38cce3(0x80)],'output':process[_0x38cce3(0x96)]});return new Promise(_0x15eb86=>{const _0x15087a=_0x38cce3;_0x38813d[_0x15087a(0x8b)](_0x5563d2+'\x20(y/N):\x20',_0x26876b=>{const _0x5d80f7=_0x15087a;_0x38813d[_0x5d80f7(0x81)](),_0x15eb86(_0x26876b[_0x5d80f7(0x8c)]()==='y'||_0x26876b['toLowerCase']()===_0x5d80f7(0x98));});});}function a137_0x162d(_0x5b9de4,_0x5b6b0b){_0x5b9de4=_0x5b9de4-0x80;const _0x471f81=a137_0x471f();let _0x162df9=_0x471f81[_0x5b9de4];return _0x162df9;}export async function confirmKey(_0x186a9e){const _0x4fc2c8=a137_0x162d;if(!process[_0x4fc2c8(0x80)]['isTTY'])return![];return process[_0x4fc2c8(0x93)][_0x4fc2c8(0x8d)](_0x186a9e+_0x4fc2c8(0x95)),new Promise(_0x38cb17=>{const _0x3cd23b=_0x4fc2c8,_0x1fc719=process['stdin'];_0x1fc719[_0x3cd23b(0x92)](!![]),_0x1fc719[_0x3cd23b(0x9a)](),_0x1fc719[_0x3cd23b(0x87)](_0x3cd23b(0x94));const _0x545284=_0x3557a4=>{const _0x2d388d=_0x3cd23b;_0x1fc719['setRawMode'](![]),_0x1fc719['pause'](),_0x1fc719['removeListener'](_0x2d388d(0x8a),_0x545284);if(_0x3557a4==='\x1b'){process[_0x2d388d(0x93)]['write']('\x0a'),_0x38cb17(![]);return;}_0x3557a4==='\x03'&&(process[_0x2d388d(0x93)][_0x2d388d(0x8d)]('\x0a'),process[_0x2d388d(0x91)](0x82));if(_0x3557a4[_0x2d388d(0x8c)]()==='y'){process[_0x2d388d(0x93)]['write']('y\x0a'),_0x38cb17(!![]);return;}process['stderr'][_0x2d388d(0x8d)]('\x0a'),_0x38cb17(![]);};_0x1fc719['on']('data',_0x545284);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a138_0x4e5a(_0x1d48c7,_0x1a2b54){_0x1d48c7=_0x1d48c7-0x1e2;const _0x488464=a138_0x4884();let _0x4e5a0c=_0x488464[_0x1d48c7];return _0x4e5a0c;}(function(_0x2ebf82,_0x518229){const _0x53b0a6=a138_0x4e5a,_0x16c508=_0x2ebf82();while(!![]){try{const _0x407c95=-parseInt(_0x53b0a6(0x1f3))/0x1*(-parseInt(_0x53b0a6(0x1f2))/0x2)+-parseInt(_0x53b0a6(0x1eb))/0x3+parseInt(_0x53b0a6(0x1e3))/0x4+parseInt(_0x53b0a6(0x1fa))/0x5+-parseInt(_0x53b0a6(0x1f9))/0x6+-parseInt(_0x53b0a6(0x1ef))/0x7*(-parseInt(_0x53b0a6(0x1e4))/0x8)+parseInt(_0x53b0a6(0x1f0))/0x9;if(_0x407c95===_0x518229)break;else _0x16c508['push'](_0x16c508['shift']());}catch(_0x48532b){_0x16c508['push'](_0x16c508['shift']());}}}(a138_0x4884,0xa70dc));import a138_0x16a497 from'ora';export function createCommandSpinner(_0x2714c2,_0x12850d={}){const _0x50246b=a138_0x4e5a,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x12850d;return a138_0x16a497({'text':_0x2714c2,'color':_0x50246b(0x1ea),'stream':process['stderr'],'isEnabled':forceEnabled||process['stderr']['isTTY']&&!verbose});}export async function withSpinner(_0x3e3925,_0x110522,_0x33cd49={}){const _0x3a4eda=a138_0x4e5a,_0x46c922=_0x33cd49['clock']??(()=>Date[_0x3a4eda(0x1ee)]()),_0x360bd8=createCommandSpinner(_0x3e3925,_0x33cd49);_0x360bd8[_0x3a4eda(0x1e2)]();const _0x38ab6f=_0x46c922();try{const _0xfe83ce=await _0x110522(),_0x4d214e=_0x46c922()-_0x38ab6f;return _0x360bd8[_0x3a4eda(0x1f7)](),{'data':_0xfe83ce,'elapsedMs':_0x4d214e};}catch(_0x50b466){_0x360bd8['stop']();throw _0x50b466;}}function a138_0x4884(){const _0xe49c73=['1274664mCuVKT','phase','intervalFactory','now','7irwuEU','6101181dnSwds','isSpinning','102Flalmx','15497TIOgtD','clock','Processing','\x20[Job\x20ID:\x20','stop','...','7531788akSzpz','4107450fxTYVu','text','start','150852jtemdT','295832RteeXS','extra','floor','replace','trim','jobId','cyan'];a138_0x4884=function(){return _0xe49c73;};return a138_0x4884();}export async function withProgressSpinner(_0x4b1a0e,_0x3af8ad,_0x35dd60={}){const _0x4c3fa8=a138_0x4e5a,_0x44c05f=_0x35dd60[_0x4c3fa8(0x1f4)]??(()=>Date[_0x4c3fa8(0x1ee)]()),_0x42de84=_0x35dd60[_0x4c3fa8(0x1ed)]??setInterval,_0x435f3e=createCommandSpinner(_0x4b1a0e,_0x35dd60);_0x435f3e[_0x4c3fa8(0x1e2)]();const _0x1182da=_0x44c05f(),_0x2d46dc=_0x4b1a0e[_0x4c3fa8(0x1e7)](_0x4c3fa8(0x1f8),'')['trim']()||_0x4c3fa8(0x1f5),_0x152880={};let _0x29fce2=_0x4b1a0e;const _0x3d85a1=()=>{const _0x2108f1=_0x4c3fa8;if(!_0x435f3e[_0x2108f1(0x1f1)])return;const _0x302fc4=_0x44c05f()-_0x1182da,_0x3bb2d8=formatElapsed(_0x302fc4),_0x571d9e=_0x152880[_0x2108f1(0x1ec)]?.['trim']()||_0x2d46dc,_0x31df81=_0x152880[_0x2108f1(0x1e9)]?_0x2108f1(0x1f6)+_0x152880[_0x2108f1(0x1e9)]+']':'',_0x39c714=_0x152880[_0x2108f1(0x1e5)]?'\x20'+_0x152880[_0x2108f1(0x1e5)]:'',_0x4a18d3=_0x571d9e+'\x20'+_0x3bb2d8+_0x39c714+_0x31df81;_0x4a18d3!==_0x29fce2&&_0x4a18d3['trim']()&&(_0x435f3e['text']=_0x4a18d3,_0x29fce2=_0x4a18d3);},_0x3fac76=_0x42de84(()=>{_0x3d85a1();},0x3e8),_0x404bde={'setPhase':_0x8a27f5=>{const _0x3efda0=_0x4c3fa8;_0x152880['phase']=_0x8a27f5;const _0xe21408=_0x8a27f5?.[_0x3efda0(0x1e8)]()||_0x2d46dc,_0x3c312a=_0x44c05f()-_0x1182da,_0x4940d0=formatElapsed(_0x3c312a),_0x24bb9a=_0x152880['jobId']?_0x3efda0(0x1f6)+_0x152880[_0x3efda0(0x1e9)]+']':'',_0x2443fa=_0x152880[_0x3efda0(0x1e5)]?'\x20'+_0x152880[_0x3efda0(0x1e5)]:'',_0x2bbcf0=_0xe21408+'\x20'+_0x4940d0+_0x2443fa+_0x24bb9a;_0x435f3e[_0x3efda0(0x1f1)]&&_0x2bbcf0[_0x3efda0(0x1e8)]()&&(_0x435f3e[_0x3efda0(0x1fb)]=_0x2bbcf0,_0x29fce2=_0x2bbcf0);},'setJobId':_0x3b3d74=>{_0x152880['jobId']=_0x3b3d74,_0x3d85a1();},'setExtra':_0x5ba03c=>{_0x152880['extra']=_0x5ba03c,_0x3d85a1();}};_0x3d85a1();try{const _0x1c3761=await _0x3af8ad(_0x404bde),_0x3945ff=_0x44c05f()-_0x1182da;return{'data':_0x1c3761,'elapsedMs':_0x3945ff};}finally{clearInterval(_0x3fac76),_0x435f3e[_0x4c3fa8(0x1f7)]();}}export function formatElapsed(_0x51f4df){const _0x28b6b8=a138_0x4e5a,_0x30d17e=Math[_0x28b6b8(0x1e6)](_0x51f4df/0x3e8);if(_0x30d17e<0x3c)return(_0x51f4df/0x3e8)['toFixed'](0x1)+'s';const _0x5f0370=Math[_0x28b6b8(0x1e6)](_0x30d17e/0x3c),_0x3dea9f=_0x30d17e%0x3c;if(_0x5f0370<0x3c)return _0x5f0370+'m\x20'+_0x3dea9f+'s';const _0x1fd3c1=Math['floor'](_0x5f0370/0x3c),_0x30a393=_0x5f0370%0x3c;return _0x1fd3c1+'h\x20'+_0x30a393+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f019f,_0x177299){const _0x18ecb5=a139_0x4960,_0x446c1a=_0x3f019f();while(!![]){try{const _0x3f4758=parseInt(_0x18ecb5(0x12f))/0x1*(parseInt(_0x18ecb5(0x13b))/0x2)+-parseInt(_0x18ecb5(0x140))/0x3*(parseInt(_0x18ecb5(0x13f))/0x4)+parseInt(_0x18ecb5(0x126))/0x5*(-parseInt(_0x18ecb5(0x130))/0x6)+-parseInt(_0x18ecb5(0x137))/0x7*(-parseInt(_0x18ecb5(0x129))/0x8)+-parseInt(_0x18ecb5(0x12a))/0x9+-parseInt(_0x18ecb5(0x12e))/0xa+parseInt(_0x18ecb5(0x13e))/0xb*(parseInt(_0x18ecb5(0x134))/0xc);if(_0x3f4758===_0x177299)break;else _0x446c1a['push'](_0x446c1a['shift']());}catch(_0x13f1f8){_0x446c1a['push'](_0x446c1a['shift']());}}}(a139_0x414f,0xb8615));function a139_0x4960(_0xddb8c1,_0xccb32){_0xddb8c1=_0xddb8c1-0x126;const _0x414fad=a139_0x414f();let _0x496017=_0x414fad[_0xddb8c1];return _0x496017;}export async function*parseSSEStream(_0x29240e,_0x8761dc){const _0x1f797f=a139_0x4960;if(!_0x29240e[_0x1f797f(0x13c)])throw new Error(_0x1f797f(0x138));const _0x5ba6e6=_0x29240e[_0x1f797f(0x13c)][_0x1f797f(0x141)](),_0x106aba=new TextDecoder();let _0x3d8440='',_0x23c4eb={};try{while(!![]){const {done:_0x3d629d,value:_0x394641}=await _0x5ba6e6[_0x1f797f(0x128)]();if(_0x3d629d){if(_0x23c4eb['data']){_0x8761dc?.[_0x1f797f(0x12b)]('[LLM\x20API\x20SSE]\x20'+_0x23c4eb[_0x1f797f(0x139)]);const _0x2d23b4=parseSSEData(_0x23c4eb[_0x1f797f(0x139)]);yield _0x2d23b4;}break;}_0x3d8440+=_0x106aba[_0x1f797f(0x127)](_0x394641,{'stream':!![]});const _0x3f3821=_0x3d8440[_0x1f797f(0x133)]('\x0a');_0x3d8440=_0x3f3821[_0x1f797f(0x131)]()||'';for(const _0x5aea5a of _0x3f3821){if(_0x5aea5a[_0x1f797f(0x135)]()===''){if(_0x23c4eb['data']){_0x8761dc?.[_0x1f797f(0x12b)](_0x1f797f(0x13d)+_0x23c4eb['data']);const _0x2d0732=parseSSEData(_0x23c4eb['data']);yield _0x2d0732,_0x23c4eb={};}continue;}if(_0x5aea5a[_0x1f797f(0x136)](':'))continue;const _0x2dc254=_0x5aea5a[_0x1f797f(0x142)](':');if(_0x2dc254===-0x1)continue;const _0x32a28f=_0x5aea5a[_0x1f797f(0x13a)](0x0,_0x2dc254);let _0x4d21b4=_0x5aea5a[_0x1f797f(0x13a)](_0x2dc254+0x1);_0x4d21b4[_0x1f797f(0x136)]('\x20')&&(_0x4d21b4=_0x4d21b4[_0x1f797f(0x13a)](0x1));switch(_0x32a28f){case _0x1f797f(0x12d):_0x23c4eb[_0x1f797f(0x12d)]=_0x4d21b4;break;case _0x1f797f(0x139):_0x23c4eb[_0x1f797f(0x139)]=_0x23c4eb[_0x1f797f(0x139)]?_0x23c4eb['data']+'\x0a'+_0x4d21b4:_0x4d21b4;break;case'id':_0x23c4eb['id']=_0x4d21b4;break;}}}}finally{_0x5ba6e6[_0x1f797f(0x132)]();}}function a139_0x414f(){const _0x5dd32e=['debug','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','event','13733640vqFWOf','1580bElefT','13788xNiZGA','pop','releaseLock','split','5748cbljmF','trim','startsWith','7VgVLJX','Response\x20body\x20is\x20null','data','slice','1206JaVWKj','body','[LLM\x20API\x20SSE]\x20','74811ILjtBS','4NxOuPb','1867362XYTjDL','getReader','indexOf','85ihDWRb','decode','read','37704VaphXT','12825243GIouUw'];a139_0x414f=function(){return _0x5dd32e;};return a139_0x414f();}function parseSSEData(_0x26cdde){const _0x81b260=a139_0x4960;try{return JSON['parse'](_0x26cdde);}catch(_0x2367ba){throw new Error(_0x81b260(0x12c)+_0x26cdde,{'cause':_0x2367ba});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f15c6,_0x1101dc){const _0x1877a8=a140_0x1f76,_0x557ea9=_0x4f15c6();while(!![]){try{const _0x5255e7=-parseInt(_0x1877a8(0xd4))/0x1+-parseInt(_0x1877a8(0xe7))/0x2*(parseInt(_0x1877a8(0xe3))/0x3)+-parseInt(_0x1877a8(0xea))/0x4+parseInt(_0x1877a8(0xec))/0x5*(-parseInt(_0x1877a8(0xdb))/0x6)+parseInt(_0x1877a8(0xd5))/0x7+parseInt(_0x1877a8(0xd8))/0x8*(-parseInt(_0x1877a8(0xdf))/0x9)+parseInt(_0x1877a8(0xd9))/0xa*(parseInt(_0x1877a8(0xd3))/0xb);if(_0x5255e7===_0x1101dc)break;else _0x557ea9['push'](_0x557ea9['shift']());}catch(_0x10a9f9){_0x557ea9['push'](_0x557ea9['shift']());}}}(a140_0xe8b9,0x62b77));import a140_0xa8be67 from'string-width';export function stringWidth(_0x96e002){return a140_0xa8be67(_0x96e002);}export function padEnd(_0xab58ce,_0x23a000){const _0x39cff0=a140_0x1f76,_0x5c035b=stringWidth(_0xab58ce);if(_0x5c035b>=_0x23a000)return _0xab58ce;return _0xab58ce+'\x20'[_0x39cff0(0xeb)](_0x23a000-_0x5c035b);}export function padStart(_0xae184a,_0x237511){const _0x34a43d=a140_0x1f76,_0x205fe9=stringWidth(_0xae184a);if(_0x205fe9>=_0x237511)return _0xae184a;return'\x20'[_0x34a43d(0xeb)](_0x237511-_0x205fe9)+_0xae184a;}function a140_0xe8b9(){const _0x59cee2=['735vwyIYV','11bDofqr','695696wwNhmv','5538344hacfQJ','toString','unknown','3741896UriZrO','18548030cBnsGe','length','2778ZZtIVb','replace','trim','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','9xhsCRV','env','Cannot\x20escape\x20empty\x20string\x20literal','toLowerCase','2337468hxOYJk','USER','padStart','floor','2TVzjvd','substring','slice','924008vviyQs','repeat'];a140_0xe8b9=function(){return _0x59cee2;};return a140_0xe8b9();}export function centerAlign(_0x47073f,_0x157118){const _0x5c42f9=a140_0x1f76,_0x2b5921=stringWidth(_0x47073f);if(_0x2b5921>_0x157118){if(_0x157118<=0x1)return'…'[_0x5c42f9(0xe8)](0x0,_0x157118);let _0xcb2485=_0x47073f;while(stringWidth(_0xcb2485+'…')>_0x157118){_0xcb2485=_0xcb2485[_0x5c42f9(0xe9)](0x0,-0x1);}return _0xcb2485+'…';}if(_0x2b5921===_0x157118)return _0x47073f;const _0x296138=_0x157118-_0x2b5921,_0x2bbf36=Math[_0x5c42f9(0xe6)](_0x296138/0x2),_0x2d0866=_0x296138-_0x2bbf36;return'\x20'[_0x5c42f9(0xeb)](_0x2bbf36)+_0x47073f+'\x20'[_0x5c42f9(0xeb)](_0x2d0866);}export function escapeStringLiteral(_0x3800a2){const _0x2f176f=a140_0x1f76;if(!_0x3800a2||_0x3800a2[_0x2f176f(0xdd)]()[_0x2f176f(0xda)]===0x0)throw new Error(_0x2f176f(0xe1));const _0x5bb68e=_0x3800a2[_0x2f176f(0xdc)](/'/g,'\x27\x27');return'\x27'+_0x5bb68e+'\x27';}export function globToLike(_0x24096e){const _0x107efb=a140_0x1f76;let _0x5118b2=_0x24096e[_0x107efb(0xdc)](/\\/g,'\x5c\x5c')[_0x107efb(0xdc)](/%/g,'\x5c%')[_0x107efb(0xdc)](/_/g,'\x5c_');return _0x5118b2=_0x5118b2['replace'](/\*/g,'%')[_0x107efb(0xdc)](/\?/g,'_'),_0x5118b2;}export function buildLikePattern(_0x1ff095){const _0xbd6f32=a140_0x1f76;if(!_0x1ff095||_0x1ff095[_0xbd6f32(0xdd)]()[_0xbd6f32(0xda)]===0x0)throw new Error(_0xbd6f32(0xde));const _0x792aff=globToLike(_0x1ff095),_0x93d87e=_0x792aff[_0xbd6f32(0xdc)](/'/g,'\x27\x27');return'\x27'+_0x93d87e+'\x27';}export function matchGlobPattern(_0x33ea01,_0x1c61f3){const _0x4efb88=a140_0x1f76,_0x4bea09=_0x1c61f3[_0x4efb88(0xdc)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x4efb88(0xdc)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x58de3d=new RegExp('^'+_0x4bea09+'$');return _0x58de3d['test'](_0x33ea01);}function a140_0x1f76(_0x2d7998,_0x2b86eb){_0x2d7998=_0x2d7998-0xd3;const _0xe8b9e3=a140_0xe8b9();let _0x1f76b2=_0xe8b9e3[_0x2d7998];return _0x1f76b2;}export function getSanitizedUsername(){const _0x11904b=a140_0x1f76,_0xdf2498=process['env'][_0x11904b(0xe4)]||process[_0x11904b(0xe0)]['USERNAME']||_0x11904b(0xd7);return _0xdf2498[_0x11904b(0xdc)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x4337c5=a140_0x1f76,_0x190ef7=Math[_0x4337c5(0xe6)](Math['random']()*0xfffff);return _0x190ef7[_0x4337c5(0xd6)](0x10)[_0x4337c5(0xe5)](0x5,'0');}export function sanitizeFileName(_0x252c45){const _0x2fb5c8=a140_0x1f76;return _0x252c45[_0x2fb5c8(0xe2)]()[_0x2fb5c8(0xdc)](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0x2fb5c8(0xdc)](/-+/g,'-')[_0x2fb5c8(0xdc)](/^-|-$/g,'');}
|