@treasuredata/tdx 0.2.5 → 0.2.6
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/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/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/job-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-pwd-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/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/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.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/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/model-aliases.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/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.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/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/sdk/workflow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a52_0x28a3df=a52_0x2002;function a52_0x2002(_0x347a6e,_0x18069d){const _0x452923=a52_0x4529();return a52_0x2002=function(_0x200203,_0x55c747){_0x200203=_0x200203-0x65;let _0x2c55a4=_0x452923[_0x200203];return _0x2c55a4;},a52_0x2002(_0x347a6e,_0x18069d);}function a52_0x4529(){const _0x545682=['params','latest','client','basename','scheduleFrom','unlink','tmpdir','create','done','Cannot\x20read\x20workflow\x20file:\x20','tar','retryAttemptName','workflows','uploadProjectArchive','cancelRequested','last_id','tdx-workflow-','workflow','fromTask','3223821mHHzvH','Project\x20not\x20found:\x20','endsWith','find','test','listWorkflows','isFile','lastAttempt','listAttempts','mkdir','5199560BtVlYG','sessionId','No\x20','timezone','NUMERIC_ID_PATTERN','download','.tar.gz','parentId','name','clearScheduleAll','success','force','length','extract','clearSchedule','63774PITkWZ','status','push','filter','storeParams','retryParams','isDirectory','data','config','fullName','message','toTime','delete','killAttempt','getTaskLogs','lastId','isGroup','projects','tdx-workflow-push-','listProjects','retryAt','logs','downloadProjectArchive','workflowName','skipValidation','retryAttempt','projectName','sessions','tasks','access','toISOString','join','revision','getAttemptTasks','833vkPlSd','resumeFrom','createdAt','map','resolveProjectId','3154596ponSZI','kill','sessionUuid','378818rNWpnL','exportParams','retrySession','includeRetried','updatedAt','index','path','error','sessionTime','14245824wzmznT','now','project','limit','startedAt','658587EsIRuU','readdir'];a52_0x4529=function(){return _0x545682;};return a52_0x4529();}(function(_0x19698a,_0x3158f0){const _0x1e1d55=a52_0x2002,_0x53b4f3=_0x19698a();while(!![]){try{const _0x31b83e=-parseInt(_0x1e1d55(0xba))/0x1+parseInt(_0x1e1d55(0xac))/0x2+-parseInt(_0x1e1d55(0x69))/0x3+parseInt(_0x1e1d55(0xa9))/0x4+parseInt(_0x1e1d55(0x73))/0x5+-parseInt(_0x1e1d55(0x82))/0x6*(parseInt(_0x1e1d55(0xa4))/0x7)+parseInt(_0x1e1d55(0xb5))/0x8;if(_0x31b83e===_0x3158f0)break;else _0x53b4f3['push'](_0x53b4f3['shift']());}catch(_0x56fb1e){_0x53b4f3['push'](_0x53b4f3['shift']());}}}(a52_0x4529,0xc378d));import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{[a52_0x28a3df(0xbe)];static [a52_0x28a3df(0x77)]=/^\d+$/;constructor(_0x4643ae){const _0x4de056=a52_0x28a3df;this[_0x4de056(0xbe)]=_0x4643ae;}async[a52_0x28a3df(0xa8)](_0x27ad74){const _0x1953a7=a52_0x28a3df;if(WorkflowAPI[_0x1953a7(0x77)][_0x1953a7(0x6d)](_0x27ad74))return{'id':_0x27ad74,'name':_0x27ad74};const _0x37c0ad=await this[_0x1953a7(0xbe)][_0x1953a7(0x95)]({'name_pattern':_0x27ad74}),_0x48d18f=_0x37c0ad[_0x1953a7(0x89)][_0x1953a7(0x6c)](_0x17ec71=>_0x17ec71['name']===_0x27ad74);if(!_0x48d18f)throw new Error(_0x1953a7(0x6a)+_0x27ad74);return{'id':_0x48d18f['id'],'name':_0x48d18f['name']};}async[a52_0x28a3df(0x93)](_0xf27e14,_0x5e88ca){const _0x30ac9e=a52_0x28a3df,_0x1ed61e=await this['client']['listProjects']({'name_pattern':_0xf27e14,..._0x5e88ca});return _0x1ed61e[_0x30ac9e(0x89)]['map'](_0x21883e=>({..._0x21883e,'project_id':_0x21883e['id'],'project_name':_0x21883e[_0x30ac9e(0x7b)]}));}async[a52_0x28a3df(0xc8)](_0x5e63e0,_0x5b672b){const _0x5392c9=a52_0x28a3df,_0x181378=await this['client'][_0x5392c9(0x6e)]({'project_name':_0x5e63e0,..._0x5b672b});return _0x181378['data'][_0x5392c9(0xa7)](_0x2dc099=>({'project_id':_0x2dc099['project']?.['id'],'project_name':_0x2dc099[_0x5392c9(0xb7)]?.['name'],'workflow_id':_0x2dc099['id'],'workflow_name':_0x2dc099[_0x5392c9(0x7b)],'revision':_0x2dc099[_0x5392c9(0xa2)],'timezone':_0x2dc099[_0x5392c9(0x76)],'config':_0x2dc099[_0x5392c9(0x8a)],'id':_0x2dc099['id'],'name':_0x2dc099[_0x5392c9(0x7b)],'project':_0x2dc099['project']}));}async[a52_0x28a3df(0x9d)](_0x570af3){const _0x44e089=a52_0x28a3df;let _0x3e427e;if(_0x570af3?.[_0x44e089(0x9c)]){let _0x16ac4e,_0x290ff1=![];while(!_0x290ff1){const _0x58733e=await this[_0x44e089(0xbe)]['listProjects']({'limit':0x64,'last_id':_0x16ac4e}),_0x5ab824=_0x58733e[_0x44e089(0x89)][_0x44e089(0x6c)](_0x3f9bd8=>_0x3f9bd8[_0x44e089(0x7b)]===_0x570af3[_0x44e089(0x9c)]);if(_0x5ab824){_0x3e427e=_0x5ab824['id'],_0x290ff1=!![];break;}if(!_0x58733e['lastId']||_0x58733e[_0x44e089(0x89)][_0x44e089(0x7f)]===0x0)break;_0x16ac4e=_0x58733e[_0x44e089(0x91)];}if(!_0x3e427e)throw new Error('Project\x20not\x20found:\x20'+_0x570af3[_0x44e089(0x9c)]);}const _0x16d6c4=await this[_0x44e089(0xbe)]['listSessions']({'project_id':_0x3e427e,'project_name':_0x570af3?.['projectName'],'workflow_name':_0x570af3?.[_0x44e089(0x99)],'status':_0x570af3?.[_0x44e089(0x83)],'from_time':_0x570af3?.['fromTime'],'to_time':_0x570af3?.[_0x44e089(0x8d)],'limit':_0x570af3?.[_0x44e089(0xb8)],'last_id':_0x570af3?.['last_id']});return _0x16d6c4[_0x44e089(0x89)][_0x44e089(0xa7)](_0x204a6a=>({'project_id':_0x204a6a['project']?.['id'],'project_name':_0x204a6a[_0x44e089(0xb7)]?.['name'],'workflow_id':_0x204a6a[_0x44e089(0x67)]?.['id'],'workflow_name':_0x204a6a[_0x44e089(0x67)]?.[_0x44e089(0x7b)],'session_id':_0x204a6a['id'],'sessionUuid':_0x204a6a[_0x44e089(0xab)],'sessionTime':_0x204a6a['sessionTime'],'lastAttempt':_0x204a6a[_0x44e089(0x70)],'id':_0x204a6a['id'],'project':_0x204a6a[_0x44e089(0xb7)],'workflow':_0x204a6a[_0x44e089(0x67)]}));}async['attempts'](_0x570376){const _0x348189=a52_0x28a3df,_0x806091=await this[_0x348189(0xbe)][_0x348189(0x71)]({'project_name':_0x570376?.['projectName'],'workflow_name':_0x570376?.[_0x348189(0x99)],'include_retried':_0x570376?.[_0x348189(0xaf)],'limit':_0x570376?.['limit'],'last_id':_0x570376?.[_0x348189(0x65)]});return _0x806091['data'][_0x348189(0xa7)](_0x19ee0b=>({'project_id':_0x19ee0b[_0x348189(0xb7)]?.['id'],'project_name':_0x19ee0b[_0x348189(0xb7)]?.[_0x348189(0x7b)],'workflow_id':_0x19ee0b['workflow']?.['id'],'workflow_name':_0x19ee0b[_0x348189(0x67)]?.[_0x348189(0x7b)],'session_id':_0x19ee0b[_0x348189(0x74)],'sessionUuid':_0x19ee0b[_0x348189(0xab)],'sessionTime':_0x19ee0b[_0x348189(0xb4)],'attempt_id':_0x19ee0b['id'],'attempt_index':_0x19ee0b['index'],'retryAttemptName':_0x19ee0b[_0x348189(0xc7)],'done':_0x19ee0b[_0x348189(0xc4)],'success':_0x19ee0b[_0x348189(0x7d)],'cancelRequested':_0x19ee0b[_0x348189(0xca)],'params':_0x19ee0b[_0x348189(0xbc)],'createdAt':_0x19ee0b[_0x348189(0xa6)],'finishedAt':_0x19ee0b['finishedAt'],'id':_0x19ee0b['id'],'index':_0x19ee0b[_0x348189(0xb1)],'project':_0x19ee0b['project'],'workflow':_0x19ee0b[_0x348189(0x67)]}));}async['attempt'](_0x5bde77){const _0x570db5=a52_0x28a3df,_0x44a268=await this[_0x570db5(0xbe)]['getAttempt'](_0x5bde77);return _0x44a268;}async[a52_0x28a3df(0x9e)](_0x16c31d,_0x431f22=![]){const _0x3d4f54=a52_0x28a3df,_0x1bef86=await this['client'][_0x3d4f54(0xa3)](_0x16c31d,_0x431f22);return _0x1bef86[_0x3d4f54(0xa7)](_0x5406ac=>({'task_id':_0x5406ac['id'],'task_name':_0x5406ac[_0x3d4f54(0x8b)],'parentId':_0x5406ac[_0x3d4f54(0x7a)],'config':_0x5406ac['config'],'upstreams':_0x5406ac['upstreams'],'state':_0x5406ac['state'],'exportParams':_0x5406ac[_0x3d4f54(0xad)],'storeParams':_0x5406ac[_0x3d4f54(0x86)],'stateParams':_0x5406ac['stateParams'],'updatedAt':_0x5406ac[_0x3d4f54(0xb0)],'retryAt':_0x5406ac[_0x3d4f54(0x96)],'startedAt':_0x5406ac[_0x3d4f54(0xb9)],'error':_0x5406ac[_0x3d4f54(0xb3)],'isGroup':_0x5406ac[_0x3d4f54(0x92)],'id':_0x5406ac['id'],'fullName':_0x5406ac[_0x3d4f54(0x8b)]}));}async[a52_0x28a3df(0x97)](_0x3286e7,_0x549d2d,_0x33445c){const _0x4a21c5=a52_0x28a3df;return await this[_0x4a21c5(0xbe)][_0x4a21c5(0x90)](_0x3286e7,_0x549d2d,_0x33445c);}async[a52_0x28a3df(0xaa)](_0x5edb94,_0x4a48ae){const _0x45f64a=a52_0x28a3df,_0x103eda=await this['client'][_0x45f64a(0x8f)](_0x5edb94,_0x4a48ae);return _0x103eda[_0x45f64a(0x8c)];}async['retrySession'](_0x4f5a94,_0x5b66b6){const _0x562daa=a52_0x28a3df,_0xcd5674=await this[_0x562daa(0xbe)][_0x562daa(0xae)](_0x4f5a94,{'from_task':_0x5b66b6?.[_0x562daa(0x68)],'retry_params':_0x5b66b6?.['retryParams']});return{'attemptId':_0xcd5674['id'],'sessionId':_0xcd5674[_0x562daa(0x74)]};}async[a52_0x28a3df(0x9b)](_0x893cec,_0xab9fae){const _0x2cb7e3=a52_0x28a3df,_0x2e60ae=await this['client'][_0x2cb7e3(0x9b)](_0x893cec,{'resume_from':_0xab9fae?.[_0x2cb7e3(0xa5)],'retry_params':_0xab9fae?.[_0x2cb7e3(0x87)],'force':_0xab9fae?.[_0x2cb7e3(0x7e)]});return{'attemptId':_0x2e60ae['id'],'sessionId':_0x2e60ae[_0x2cb7e3(0x74)]};}async[a52_0x28a3df(0x78)](_0x1ecb9d,_0x2c9b57,_0x321f09){const _0x228ece=a52_0x28a3df,{promises:_0x520515}=await import('fs'),_0x57f185=await import(_0x228ece(0xb2)),_0x2bb326=await import('os'),_0x2df92a=await import('tar'),{id:_0x4c0dda,name:_0x43cef8}=await this[_0x228ece(0xa8)](_0x1ecb9d),_0x233dfb=_0x2bb326['tmpdir'](),_0x20addd=_0x57f185[_0x228ece(0xa1)](_0x233dfb,_0x228ece(0x66)+_0x4c0dda+'-'+Date[_0x228ece(0xb6)]()+'.tar.gz');try{await this[_0x228ece(0xbe)][_0x228ece(0x98)](_0x4c0dda,_0x20addd,_0x321f09?.[_0x228ece(0xa2)]);const _0xa123c0=_0x57f185[_0x228ece(0xa1)](_0x2c9b57,_0x43cef8);await _0x520515[_0x228ece(0x72)](_0xa123c0,{'recursive':!![]}),await _0x2df92a[_0x228ece(0x80)]({'file':_0x20addd,'cwd':_0xa123c0,'gzip':!![]});const _0xffca97=async _0x3c0a5d=>{const _0x3d6ce6=_0x228ece;let _0x38a7a4=0x0;const _0x422d0e=await _0x520515['readdir'](_0x3c0a5d,{'withFileTypes':!![]});for(const _0x4cdd26 of _0x422d0e){const _0x18d4a3=_0x57f185[_0x3d6ce6(0xa1)](_0x3c0a5d,_0x4cdd26[_0x3d6ce6(0x7b)]);if(_0x4cdd26[_0x3d6ce6(0x6f)]())_0x38a7a4++;else _0x4cdd26[_0x3d6ce6(0x88)]()&&(_0x38a7a4+=await _0xffca97(_0x18d4a3));}return _0x38a7a4;},_0x48b469=await _0xffca97(_0xa123c0);return{'projectName':_0x43cef8,'revision':_0x321f09?.['revision']||_0x228ece(0xbd),'filesExtracted':_0x48b469};}finally{try{await _0x520515['unlink'](_0x20addd);}catch{}}}async['push'](_0xbe242a,_0xd103f6){const _0x4528c6=a52_0x28a3df,{promises:_0xe43c95}=await import('fs'),_0x20cc5c=await import('path'),_0x175a4f=await import(_0x4528c6(0xc6)),_0x4cacb3=_0xd103f6?.['projectName']||_0x20cc5c[_0x4528c6(0xbf)](_0xbe242a),_0x217157=_0xd103f6?.[_0x4528c6(0xa2)]||new Date()[_0x4528c6(0xa0)]()['replace'](/[:.]/g,'-');try{await _0xe43c95['access'](_0xbe242a);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0xbe242a);}if(!_0xd103f6?.[_0x4528c6(0x9a)]){const _0x103dac=await _0xe43c95[_0x4528c6(0xbb)](_0xbe242a),_0x35a1ba=_0x103dac[_0x4528c6(0x85)](_0x1a44eb=>_0x1a44eb[_0x4528c6(0x6b)](WORKFLOW_FILE_EXTENSION));if(_0x35a1ba[_0x4528c6(0x7f)]===0x0)throw new Error(_0x4528c6(0x75)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20project\x20directory');for(const _0x37117d of _0x35a1ba){const _0x55dc0c=_0x20cc5c[_0x4528c6(0xa1)](_0xbe242a,_0x37117d);try{await _0xe43c95[_0x4528c6(0x9f)](_0x55dc0c);}catch{throw new Error(_0x4528c6(0xc5)+_0x37117d);}}}const _0x7a6a3c=async(_0x19cbc1,_0x1ee249='')=>{const _0x23814f=_0x4528c6,_0x546d4b=await _0xe43c95[_0x23814f(0xbb)](_0x19cbc1,{'withFileTypes':!![]}),_0x51eeb4=[];for(const _0x2ff2ed of _0x546d4b){const _0x2405df=_0x20cc5c['join'](_0x1ee249,_0x2ff2ed[_0x23814f(0x7b)]),_0x23381c=_0x20cc5c[_0x23814f(0xa1)](_0x19cbc1,_0x2ff2ed[_0x23814f(0x7b)]);if(!shouldIncludeInArchive(_0x2ff2ed[_0x23814f(0x7b)]))continue;_0x2ff2ed[_0x23814f(0x88)]()?_0x51eeb4[_0x23814f(0x84)](...await _0x7a6a3c(_0x23381c,_0x2405df)):_0x51eeb4['push'](_0x2405df);}return _0x51eeb4;},_0x24aa4b=await _0x7a6a3c(_0xbe242a),_0x277ecf=await import('os'),_0x154bb3=_0x277ecf[_0x4528c6(0xc2)](),_0x1c20a1=_0x20cc5c[_0x4528c6(0xa1)](_0x154bb3,_0x4528c6(0x94)+Date[_0x4528c6(0xb6)]()+_0x4528c6(0x79));try{await _0x175a4f[_0x4528c6(0xc3)]({'file':_0x1c20a1,'gzip':!![],'cwd':_0xbe242a,'portable':!![]},_0x24aa4b);const _0x50357a=await this[_0x4528c6(0xbe)][_0x4528c6(0xc9)](_0x4cacb3,_0x217157,_0x1c20a1,{'scheduleFrom':_0xd103f6?.[_0x4528c6(0xc0)],'clearSchedule':_0xd103f6?.[_0x4528c6(0x81)],'clearScheduleAll':_0xd103f6?.[_0x4528c6(0x7c)]});return{'projectId':_0x50357a['id'],'projectName':_0x50357a[_0x4528c6(0x7b)],'revision':_0x50357a['revision']};}finally{try{await _0xe43c95[_0x4528c6(0xc1)](_0x1c20a1);}catch{}}}async[a52_0x28a3df(0x8e)](_0x44ba3f){const _0x13c04a=a52_0x28a3df,{id:_0x26fc34}=await this[_0x13c04a(0xa8)](_0x44ba3f),_0x2f3001=await this[_0x13c04a(0xbe)]['deleteProject'](_0x26fc34);return{'projectId':_0x2f3001['id'],'projectName':_0x2f3001[_0x13c04a(0x7b)]};}}
|
|
1
|
+
const a52_0x1018ca=a52_0x5d20;(function(_0x2e6554,_0x56d9ed){const _0x17e896=a52_0x5d20,_0x31e5b8=_0x2e6554();while(!![]){try{const _0x461236=-parseInt(_0x17e896(0x145))/0x1+parseInt(_0x17e896(0x118))/0x2+-parseInt(_0x17e896(0x165))/0x3*(-parseInt(_0x17e896(0x15c))/0x4)+-parseInt(_0x17e896(0x125))/0x5+-parseInt(_0x17e896(0x11d))/0x6+parseInt(_0x17e896(0x123))/0x7*(parseInt(_0x17e896(0x153))/0x8)+parseInt(_0x17e896(0x121))/0x9;if(_0x461236===_0x56d9ed)break;else _0x31e5b8['push'](_0x31e5b8['shift']());}catch(_0x39e142){_0x31e5b8['push'](_0x31e5b8['shift']());}}}(a52_0x3ba8,0x49b65));function a52_0x5d20(_0x1d8180,_0x38ea05){const _0x3ba873=a52_0x3ba8();return a52_0x5d20=function(_0x5d20bf,_0x37865e){_0x5d20bf=_0x5d20bf-0x117;let _0x1e6a84=_0x3ba873[_0x5d20bf];return _0x1e6a84;},a52_0x5d20(_0x1d8180,_0x38ea05);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';function a52_0x3ba8(){const _0x24065b=['5532QclzrB','NUMERIC_ID_PATTERN','Project\x20not\x20found:\x20','join','download','resolveProjectId','tar','basename','isDirectory','756vkvPhV','includeRetried','path','workflowName','getAttempt','retrySession','cancelRequested','readdir','listProjects','retryAttempt','createdAt','create','done','lastId','sessionTime','807398wzuSaW','sessionId','isGroup','client','getTaskLogs','1968468tyWGCd','unlink','extract','last_id','4567860SeIdPf','push','440279GuhWGu','toISOString','499850XPZeKj','error','revision','index','latest','access','.tar.gz','workflow','config','listWorkflows','uploadProjectArchive','attempts','fromTask','isFile','params','toTime','getAttemptTasks','Project\x20directory\x20not\x20found:\x20','clearSchedule','mkdir','name','data','clearScheduleAll','downloadProjectArchive','listSessions','finishedAt','length','timezone','retryParams','tdx-workflow-push-','parentId','now','592679kAVuBZ','tmpdir','\x20workflow\x20files\x20found\x20in\x20project\x20directory','retryAttemptName','replace','projects','listAttempts','limit','map','projectName','find','sessionUuid','message','No\x20','8MTdtxd','attempt','fromTime','tasks','project','workflows','test','startedAt','lastAttempt'];a52_0x3ba8=function(){return _0x24065b;};return a52_0x3ba8();}export class WorkflowAPI{[a52_0x1018ca(0x11b)];static [a52_0x1018ca(0x15d)]=/^\d+$/;constructor(_0x40a373){const _0x11152f=a52_0x1018ca;this[_0x11152f(0x11b)]=_0x40a373;}async['resolveProjectId'](_0x419bba){const _0x56ec7c=a52_0x1018ca;if(WorkflowAPI['NUMERIC_ID_PATTERN'][_0x56ec7c(0x159)](_0x419bba))return{'id':_0x419bba,'name':_0x419bba};const _0x49f731=await this[_0x56ec7c(0x11b)][_0x56ec7c(0x16d)]({'name_pattern':_0x419bba}),_0x337c4e=_0x49f731['data']['find'](_0x1d3a86=>_0x1d3a86['name']===_0x419bba);if(!_0x337c4e)throw new Error(_0x56ec7c(0x15e)+_0x419bba);return{'id':_0x337c4e['id'],'name':_0x337c4e[_0x56ec7c(0x139)]};}async[a52_0x1018ca(0x14a)](_0x542cc0,_0x12bf9c){const _0x2c4ed0=a52_0x1018ca,_0x48343a=await this[_0x2c4ed0(0x11b)][_0x2c4ed0(0x16d)]({'name_pattern':_0x542cc0,..._0x12bf9c});return _0x48343a['data'][_0x2c4ed0(0x14d)](_0x27c5ed=>({..._0x27c5ed,'project_id':_0x27c5ed['id'],'project_name':_0x27c5ed[_0x2c4ed0(0x139)]}));}async[a52_0x1018ca(0x158)](_0x51df3c,_0x139c63){const _0x2c2c63=a52_0x1018ca,_0x4d7038=await this['client'][_0x2c2c63(0x12e)]({'project_name':_0x51df3c,..._0x139c63});return _0x4d7038[_0x2c2c63(0x13a)][_0x2c2c63(0x14d)](_0x691d1e=>({'project_id':_0x691d1e[_0x2c2c63(0x157)]?.['id'],'project_name':_0x691d1e[_0x2c2c63(0x157)]?.['name'],'workflow_id':_0x691d1e['id'],'workflow_name':_0x691d1e['name'],'revision':_0x691d1e[_0x2c2c63(0x127)],'timezone':_0x691d1e[_0x2c2c63(0x140)],'config':_0x691d1e['config'],'id':_0x691d1e['id'],'name':_0x691d1e[_0x2c2c63(0x139)],'project':_0x691d1e[_0x2c2c63(0x157)]}));}async['sessions'](_0x3ba5d1){const _0x1e210f=a52_0x1018ca;let _0x962177;if(_0x3ba5d1?.['projectName']){let _0x2ecde8,_0x571979=![];while(!_0x571979){const _0x52027b=await this[_0x1e210f(0x11b)]['listProjects']({'limit':0x64,'last_id':_0x2ecde8}),_0x30888d=_0x52027b[_0x1e210f(0x13a)][_0x1e210f(0x14f)](_0x4dddbf=>_0x4dddbf[_0x1e210f(0x139)]===_0x3ba5d1[_0x1e210f(0x14e)]);if(_0x30888d){_0x962177=_0x30888d['id'],_0x571979=!![];break;}if(!_0x52027b[_0x1e210f(0x172)]||_0x52027b[_0x1e210f(0x13a)][_0x1e210f(0x13f)]===0x0)break;_0x2ecde8=_0x52027b[_0x1e210f(0x172)];}if(!_0x962177)throw new Error('Project\x20not\x20found:\x20'+_0x3ba5d1[_0x1e210f(0x14e)]);}const _0x26c560=await this[_0x1e210f(0x11b)][_0x1e210f(0x13d)]({'project_id':_0x962177,'project_name':_0x3ba5d1?.[_0x1e210f(0x14e)],'workflow_name':_0x3ba5d1?.[_0x1e210f(0x168)],'status':_0x3ba5d1?.['status'],'from_time':_0x3ba5d1?.[_0x1e210f(0x155)],'to_time':_0x3ba5d1?.[_0x1e210f(0x134)],'limit':_0x3ba5d1?.[_0x1e210f(0x14c)],'last_id':_0x3ba5d1?.[_0x1e210f(0x120)]});return _0x26c560['data'][_0x1e210f(0x14d)](_0x251b93=>({'project_id':_0x251b93[_0x1e210f(0x157)]?.['id'],'project_name':_0x251b93['project']?.[_0x1e210f(0x139)],'workflow_id':_0x251b93[_0x1e210f(0x12c)]?.['id'],'workflow_name':_0x251b93['workflow']?.[_0x1e210f(0x139)],'session_id':_0x251b93['id'],'sessionUuid':_0x251b93[_0x1e210f(0x150)],'sessionTime':_0x251b93[_0x1e210f(0x117)],'lastAttempt':_0x251b93[_0x1e210f(0x15b)],'id':_0x251b93['id'],'project':_0x251b93['project'],'workflow':_0x251b93[_0x1e210f(0x12c)]}));}async[a52_0x1018ca(0x130)](_0xd897bd){const _0x4a0c13=a52_0x1018ca,_0x58d46f=await this[_0x4a0c13(0x11b)][_0x4a0c13(0x14b)]({'project_name':_0xd897bd?.[_0x4a0c13(0x14e)],'workflow_name':_0xd897bd?.['workflowName'],'include_retried':_0xd897bd?.[_0x4a0c13(0x166)],'limit':_0xd897bd?.[_0x4a0c13(0x14c)],'last_id':_0xd897bd?.['last_id']});return _0x58d46f[_0x4a0c13(0x13a)]['map'](_0x3fce42=>({'project_id':_0x3fce42[_0x4a0c13(0x157)]?.['id'],'project_name':_0x3fce42['project']?.[_0x4a0c13(0x139)],'workflow_id':_0x3fce42['workflow']?.['id'],'workflow_name':_0x3fce42[_0x4a0c13(0x12c)]?.['name'],'session_id':_0x3fce42['sessionId'],'sessionUuid':_0x3fce42[_0x4a0c13(0x150)],'sessionTime':_0x3fce42['sessionTime'],'attempt_id':_0x3fce42['id'],'attempt_index':_0x3fce42[_0x4a0c13(0x128)],'retryAttemptName':_0x3fce42[_0x4a0c13(0x148)],'done':_0x3fce42[_0x4a0c13(0x171)],'success':_0x3fce42['success'],'cancelRequested':_0x3fce42[_0x4a0c13(0x16b)],'params':_0x3fce42[_0x4a0c13(0x133)],'createdAt':_0x3fce42[_0x4a0c13(0x16f)],'finishedAt':_0x3fce42[_0x4a0c13(0x13e)],'id':_0x3fce42['id'],'index':_0x3fce42[_0x4a0c13(0x128)],'project':_0x3fce42[_0x4a0c13(0x157)],'workflow':_0x3fce42['workflow']}));}async[a52_0x1018ca(0x154)](_0x44cda4){const _0x1e2322=a52_0x1018ca,_0x4df66e=await this['client'][_0x1e2322(0x169)](_0x44cda4);return _0x4df66e;}async[a52_0x1018ca(0x156)](_0x59427f,_0x4927fb=![]){const _0x46ec2e=a52_0x1018ca,_0x1796d2=await this[_0x46ec2e(0x11b)][_0x46ec2e(0x135)](_0x59427f,_0x4927fb);return _0x1796d2[_0x46ec2e(0x14d)](_0x41930b=>({'task_id':_0x41930b['id'],'task_name':_0x41930b['fullName'],'parentId':_0x41930b[_0x46ec2e(0x143)],'config':_0x41930b[_0x46ec2e(0x12d)],'upstreams':_0x41930b['upstreams'],'state':_0x41930b['state'],'exportParams':_0x41930b['exportParams'],'storeParams':_0x41930b['storeParams'],'stateParams':_0x41930b['stateParams'],'updatedAt':_0x41930b['updatedAt'],'retryAt':_0x41930b['retryAt'],'startedAt':_0x41930b[_0x46ec2e(0x15a)],'error':_0x41930b[_0x46ec2e(0x126)],'isGroup':_0x41930b[_0x46ec2e(0x11a)],'id':_0x41930b['id'],'fullName':_0x41930b['fullName']}));}async['logs'](_0x2aaeaf,_0x2eafbc,_0x4fe759){const _0x10fca4=a52_0x1018ca;return await this[_0x10fca4(0x11b)][_0x10fca4(0x11c)](_0x2aaeaf,_0x2eafbc,_0x4fe759);}async['kill'](_0x26453d,_0x9c1ac7){const _0x233adc=a52_0x1018ca,_0x19037d=await this['client']['killAttempt'](_0x26453d,_0x9c1ac7);return _0x19037d[_0x233adc(0x151)];}async[a52_0x1018ca(0x16a)](_0x571baa,_0x2c3735){const _0x59917b=a52_0x1018ca,_0x21e219=await this['client'][_0x59917b(0x16a)](_0x571baa,{'from_task':_0x2c3735?.[_0x59917b(0x131)],'retry_params':_0x2c3735?.[_0x59917b(0x141)]});return{'attemptId':_0x21e219['id'],'sessionId':_0x21e219[_0x59917b(0x119)]};}async[a52_0x1018ca(0x16e)](_0x1bc72d,_0x2b9b54){const _0x30a303=a52_0x1018ca,_0x328d8c=await this[_0x30a303(0x11b)][_0x30a303(0x16e)](_0x1bc72d,{'resume_from':_0x2b9b54?.['resumeFrom'],'retry_params':_0x2b9b54?.[_0x30a303(0x141)],'force':_0x2b9b54?.['force']});return{'attemptId':_0x328d8c['id'],'sessionId':_0x328d8c[_0x30a303(0x119)]};}async[a52_0x1018ca(0x160)](_0x4bb803,_0x1f9eb4,_0x25e323){const _0x44c69f=a52_0x1018ca,{promises:_0x5dc25d}=await import('fs'),_0x3a3459=await import(_0x44c69f(0x167)),_0x456b0f=await import('os'),_0x49794a=await import(_0x44c69f(0x162)),{id:_0x557e8c,name:_0x59d3e0}=await this[_0x44c69f(0x161)](_0x4bb803),_0x4f4bd6=_0x456b0f[_0x44c69f(0x146)](),_0x4c1fbe=_0x3a3459['join'](_0x4f4bd6,'tdx-workflow-'+_0x557e8c+'-'+Date[_0x44c69f(0x144)]()+_0x44c69f(0x12b));try{await this[_0x44c69f(0x11b)][_0x44c69f(0x13c)](_0x557e8c,_0x4c1fbe,_0x25e323?.['revision']);const _0x3b65f1=_0x3a3459[_0x44c69f(0x15f)](_0x1f9eb4,_0x59d3e0);await _0x5dc25d[_0x44c69f(0x138)](_0x3b65f1,{'recursive':!![]}),await _0x49794a[_0x44c69f(0x11f)]({'file':_0x4c1fbe,'cwd':_0x3b65f1,'gzip':!![]});const _0x13b4bf=async _0xcff23=>{const _0x20d80e=_0x44c69f;let _0x57fb9c=0x0;const _0x51148c=await _0x5dc25d[_0x20d80e(0x16c)](_0xcff23,{'withFileTypes':!![]});for(const _0x1c906c of _0x51148c){const _0x2eec30=_0x3a3459[_0x20d80e(0x15f)](_0xcff23,_0x1c906c[_0x20d80e(0x139)]);if(_0x1c906c[_0x20d80e(0x132)]())_0x57fb9c++;else _0x1c906c[_0x20d80e(0x164)]()&&(_0x57fb9c+=await _0x13b4bf(_0x2eec30));}return _0x57fb9c;},_0x21c75b=await _0x13b4bf(_0x3b65f1);return{'projectName':_0x59d3e0,'revision':_0x25e323?.[_0x44c69f(0x127)]||_0x44c69f(0x129),'filesExtracted':_0x21c75b};}finally{try{await _0x5dc25d[_0x44c69f(0x11e)](_0x4c1fbe);}catch{}}}async['push'](_0x2c19ba,_0x5bdbe9){const _0xd6c3eb=a52_0x1018ca,{promises:_0xe7e0fa}=await import('fs'),_0x17c1ff=await import(_0xd6c3eb(0x167)),_0x4cbb40=await import(_0xd6c3eb(0x162)),_0xb01d3a=_0x5bdbe9?.[_0xd6c3eb(0x14e)]||_0x17c1ff[_0xd6c3eb(0x163)](_0x2c19ba),_0x1b103c=_0x5bdbe9?.[_0xd6c3eb(0x127)]||new Date()[_0xd6c3eb(0x124)]()[_0xd6c3eb(0x149)](/[:.]/g,'-');try{await _0xe7e0fa[_0xd6c3eb(0x12a)](_0x2c19ba);}catch{throw new Error(_0xd6c3eb(0x136)+_0x2c19ba);}if(!_0x5bdbe9?.['skipValidation']){const _0x50dddf=await _0xe7e0fa[_0xd6c3eb(0x16c)](_0x2c19ba),_0x18549c=_0x50dddf['filter'](_0x48b3c9=>_0x48b3c9['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x18549c['length']===0x0)throw new Error(_0xd6c3eb(0x152)+WORKFLOW_FILE_EXTENSION+_0xd6c3eb(0x147));for(const _0x4dcf66 of _0x18549c){const _0x3d2378=_0x17c1ff[_0xd6c3eb(0x15f)](_0x2c19ba,_0x4dcf66);try{await _0xe7e0fa['access'](_0x3d2378);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0x4dcf66);}}}const _0xd4790a=async(_0x13bfbe,_0x4185a9='')=>{const _0xd9bb5c=_0xd6c3eb,_0xcc7cf1=await _0xe7e0fa[_0xd9bb5c(0x16c)](_0x13bfbe,{'withFileTypes':!![]}),_0x269c73=[];for(const _0x59b511 of _0xcc7cf1){const _0x126190=_0x17c1ff[_0xd9bb5c(0x15f)](_0x4185a9,_0x59b511[_0xd9bb5c(0x139)]),_0x2615f8=_0x17c1ff[_0xd9bb5c(0x15f)](_0x13bfbe,_0x59b511['name']);if(!shouldIncludeInArchive(_0x59b511[_0xd9bb5c(0x139)]))continue;_0x59b511['isDirectory']()?_0x269c73[_0xd9bb5c(0x122)](...await _0xd4790a(_0x2615f8,_0x126190)):_0x269c73['push'](_0x126190);}return _0x269c73;},_0x2c7221=await _0xd4790a(_0x2c19ba),_0x5cc9ad=await import('os'),_0x4945ff=_0x5cc9ad[_0xd6c3eb(0x146)](),_0x1c9aee=_0x17c1ff[_0xd6c3eb(0x15f)](_0x4945ff,_0xd6c3eb(0x142)+Date[_0xd6c3eb(0x144)]()+_0xd6c3eb(0x12b));try{await _0x4cbb40[_0xd6c3eb(0x170)]({'file':_0x1c9aee,'gzip':!![],'cwd':_0x2c19ba,'portable':!![]},_0x2c7221);const _0x2efdaf=await this[_0xd6c3eb(0x11b)][_0xd6c3eb(0x12f)](_0xb01d3a,_0x1b103c,_0x1c9aee,{'scheduleFrom':_0x5bdbe9?.['scheduleFrom'],'clearSchedule':_0x5bdbe9?.[_0xd6c3eb(0x137)],'clearScheduleAll':_0x5bdbe9?.[_0xd6c3eb(0x13b)]});return{'projectId':_0x2efdaf['id'],'projectName':_0x2efdaf[_0xd6c3eb(0x139)],'revision':_0x2efdaf['revision']};}finally{try{await _0xe7e0fa[_0xd6c3eb(0x11e)](_0x1c9aee);}catch{}}}async['delete'](_0x34a843){const _0x4cedad=a52_0x1018ca,{id:_0x40dbfe}=await this['resolveProjectId'](_0x34a843),_0x256150=await this[_0x4cedad(0x11b)]['deleteProject'](_0x40dbfe);return{'projectId':_0x256150['id'],'projectName':_0x256150[_0x4cedad(0x139)]};}}
|
package/dist/types/endpoints.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a55_0x7c72(){const _0x15a30c=['https://llm-api.treasuredata.com','https://api-staging-workflow.ap03.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','https://api.treasuredata.com','3269775FMNsUf','https://llm-api-development.us01.treasuredata.com','https://api-workflow.ap03.treasuredata.com','https://api-workflow.ap02.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','https://api-development-presto.treasuredata.com','https://api-presto.ap03.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','\x27\x20and\x20site\x20\x27','https://api-staging-cdp.treasuredata.co.jp','https://llm-api-staging.us01.treasuredata.com','6pfgCyA','https://api-development.us01.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','https://api.ap02.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','https://api-cdp.ap03.treasuredata.com','https://api-staging.treasuredata.co.jp','https://api.treasuredata.co.jp','https://api-development-workflow.us01.treasuredata.com','18eniuOR','https://api-cdp.treasuredata.com','https://api-cdp.eu01.treasuredata.com','https://api-workflow.eu01.treasuredata.com','https://api-presto.ap02.treasuredata.com','https://llm-api.ap02.treasuredata.com','https://llm-api.ap03.treasuredata.com','1014772VGIsnz','https://llm-api.treasuredata.co.jp','https://api-presto.treasuredata.com','https://api-development.eu01.treasuredata.com','https://api-staging-cdp.ap03.treasuredata.com','https://api-development-cdp.us01.treasuredata.com','11623384wEMXFU','6302702ALFyfx','https://llm-api.eu01.treasuredata.com','https://api-development-cdp.eu01.treasuredata.com','49531xmKeeH','https://api.ap03.treasuredata.com','3002760wMLKZQ','https://api-staging.ap03.treasuredata.com','1488165ThaQQL','https://api-workflow.treasuredata.co.jp','https://api-presto.treasuredata.co.jp','https://api-staging-presto.ap03.treasuredata.com','https://api-presto.eu01.treasuredata.com'];a55_0x7c72=function(){return _0x15a30c;};return a55_0x7c72();}function a55_0x20b5(_0x4dfe5b,_0x243c3c){const _0x7c7243=a55_0x7c72();return a55_0x20b5=function(_0x20b511,_0x3e9564){_0x20b511=_0x20b511-0xf2;let _0x5431e7=_0x7c7243[_0x20b511];return _0x5431e7;},a55_0x20b5(_0x4dfe5b,_0x243c3c);}const a55_0x177e0d=a55_0x20b5;(function(_0x1a3d8b,_0x521146){const _0x2a924b=a55_0x20b5,_0x589e69=_0x1a3d8b();while(!![]){try{const _0x2c1d7f=parseInt(_0x2a924b(0xf6))/0x1*(parseInt(_0x2a924b(0x10e))/0x2)+parseInt(_0x2a924b(0x103))/0x3+-parseInt(_0x2a924b(0x11f))/0x4+-parseInt(_0x2a924b(0xfa))/0x5*(-parseInt(_0x2a924b(0x118))/0x6)+parseInt(_0x2a924b(0xf3))/0x7+-parseInt(_0x2a924b(0xf2))/0x8+-parseInt(_0x2a924b(0xf8))/0x9;if(_0x2c1d7f===_0x521146)break;else _0x589e69['push'](_0x589e69['shift']());}catch(_0x4ece3a){_0x589e69['push'](_0x589e69['shift']());}}}(a55_0x7c72,0xf213b));export const TD_ENDPOINTS={'us01':a55_0x177e0d(0x102),'jp01':a55_0x177e0d(0x116),'eu01':'https://api.eu01.treasuredata.com','ap02':a55_0x177e0d(0x112),'ap03':a55_0x177e0d(0xf7),'dev-us01':a55_0x177e0d(0x10f),'dev-eu01':a55_0x177e0d(0x122),'stg-us01':'https://api-staging.us01.treasuredata.com','stg-jp01':a55_0x177e0d(0x115),'stg-ap03':a55_0x177e0d(0xf9)};export const CDP_ENDPOINTS={'us01':a55_0x177e0d(0x119),'jp01':'https://api-cdp.treasuredata.co.jp','eu01':a55_0x177e0d(0x11a),'ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a55_0x177e0d(0x114),'dev-us01':a55_0x177e0d(0x124),'dev-eu01':a55_0x177e0d(0xf5),'stg-us01':a55_0x177e0d(0x110),'stg-jp01':a55_0x177e0d(0x10c),'stg-ap03':a55_0x177e0d(0x123)};export const WORKFLOW_ENDPOINTS={'us01':'https://api-workflow.treasuredata.com','jp01':a55_0x177e0d(0xfb),'eu01':a55_0x177e0d(0x11b),'ap02':a55_0x177e0d(0x106),'ap03':a55_0x177e0d(0x105),'dev-us01':a55_0x177e0d(0x117),'dev-eu01':'https://api-development-workflow.eu01.treasuredata.com','stg-us01':a55_0x177e0d(0x107),'stg-jp01':'https://api-staging-workflow.treasuredata.co.jp','stg-ap03':a55_0x177e0d(0x100)};export const TRINO_ENDPOINTS={'us01':a55_0x177e0d(0x121),'jp01':a55_0x177e0d(0xfc),'eu01':a55_0x177e0d(0xfe),'ap02':a55_0x177e0d(0x11c),'ap03':a55_0x177e0d(0x109),'dev-us01':a55_0x177e0d(0x108),'dev-eu01':a55_0x177e0d(0x101),'stg-us01':'https://api-staging-presto.treasuredata.com','stg-jp01':'https://api-staging-presto.treasuredata.co.jp','stg-ap03':a55_0x177e0d(0xfd)};export const LLM_ENDPOINTS={'us01':a55_0x177e0d(0xff),'jp01':a55_0x177e0d(0x120),'eu01':a55_0x177e0d(0xf4),'ap02':a55_0x177e0d(0x11d),'ap03':a55_0x177e0d(0x11e),'dev-us01':a55_0x177e0d(0x104),'dev-eu01':a55_0x177e0d(0x10a),'stg-us01':a55_0x177e0d(0x10d),'stg-jp01':a55_0x177e0d(0x111),'stg-ap03':a55_0x177e0d(0x113)};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x5755a9,_0x1c870a='td'){const _0x390f4a=a55_0x177e0d,_0x1b5c7a=API_ENDPOINTS[_0x1c870a]?.[_0x5755a9];if(!_0x1b5c7a)throw new Error('No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27'+_0x1c870a+_0x390f4a(0x10b)+_0x5755a9+'\x27');return _0x1b5c7a;}
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a56_0x3becd3=a56_0x3214;function a56_0x3214(_0x54aa91,_0x5297c5){const _0x594eae=a56_0x594e();return a56_0x3214=function(_0x321474,_0x57a498){_0x321474=_0x321474-0xf6;let _0x182c5e=_0x594eae[_0x321474];return _0x182c5e;},a56_0x3214(_0x54aa91,_0x5297c5);}function a56_0x594e(){const _0x54a5f2=['9093708pjuIji','8705490Gdyvbu','2234806DBszWV','4WHOFRU','stg-us01','732274itRycV','826656vLJaPS','jp01','dev-us01','9862592rPBCUi','us01','980KzHwLz','8121PMJeuh'];a56_0x594e=function(){return _0x54a5f2;};return a56_0x594e();}(function(_0x540f5b,_0x155058){const _0x1dbbe4=a56_0x3214,_0x17bde7=_0x540f5b();while(!![]){try{const _0x750f7b=-parseInt(_0x1dbbe4(0x102))/0x1*(parseInt(_0x1dbbe4(0xf7))/0x2)+-parseInt(_0x1dbbe4(0xfe))/0x3*(-parseInt(_0x1dbbe4(0xfd))/0x4)+parseInt(_0x1dbbe4(0x100))/0x5+parseInt(_0x1dbbe4(0xf8))/0x6+-parseInt(_0x1dbbe4(0x101))/0x7+parseInt(_0x1dbbe4(0xfb))/0x8+-parseInt(_0x1dbbe4(0xff))/0x9;if(_0x750f7b===_0x155058)break;else _0x17bde7['push'](_0x17bde7['shift']());}catch(_0x380056){_0x17bde7['push'](_0x17bde7['shift']());}}}(a56_0x594e,0xef6d7));export const SITE_ALIASES={'us':a56_0x3becd3(0xfc),'aws':a56_0x3becd3(0xfc),'jp':a56_0x3becd3(0xf9),'aws-tokyo':a56_0x3becd3(0xf9),'dev':a56_0x3becd3(0xfa),'stg':a56_0x3becd3(0xf6)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x256280,_0xddcf40){const _0x42ce07=a59_0x3ef3,_0x231c7e=_0x256280();while(!![]){try{const _0x5f05fb=-parseInt(_0x42ce07(0xfc))/0x1+parseInt(_0x42ce07(0xf1))/0x2+-parseInt(_0x42ce07(0xfd))/0x3+parseInt(_0x42ce07(0xfa))/0x4*(-parseInt(_0x42ce07(0xf2))/0x5)+parseInt(_0x42ce07(0xfb))/0x6+-parseInt(_0x42ce07(0xf4))/0x7+parseInt(_0x42ce07(0xf9))/0x8;if(_0x5f05fb===_0xddcf40)break;else _0x231c7e['push'](_0x231c7e['shift']());}catch(_0x4caede){_0x231c7e['push'](_0x231c7e['shift']());}}}(a59_0x55a0,0x799a4));export function parseAgentRef(_0x4cf1d0){const _0x598f27=a59_0x3ef3;if(!_0x4cf1d0||_0x4cf1d0[_0x598f27(0xf3)]()==='')throw new Error(_0x598f27(0xf6));const _0x3164f3=_0x4cf1d0[_0x598f27(0xf3)](),_0x444737=_0x3164f3['split']('/');if(_0x444737[_0x598f27(0xf5)]===0x1)return{'projectName':_0x444737[0x0],'agentName':undefined};else{if(_0x444737[_0x598f27(0xf5)]===0x2){const [_0x35d0f4,_0x487b7f]=_0x444737;if(!_0x35d0f4||_0x35d0f4['trim']()==='')throw new Error(_0x598f27(0xf8));if(!_0x487b7f||_0x487b7f[_0x598f27(0xf3)]()==='')throw new Error(_0x598f27(0xf7));return{'projectName':_0x35d0f4['trim'](),'agentName':_0x487b7f['trim']()};}else throw new Error(_0x598f27(0xfe)+_0x4cf1d0+'.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22');}}function a59_0x3ef3(_0x33408a,_0x23433c){const _0x55a0a0=a59_0x55a0();return a59_0x3ef3=function(_0x3ef343,_0x361f7a){_0x3ef343=_0x3ef343-0xf1;let _0x2f8df6=_0x55a0a0[_0x3ef343];return _0x2f8df6;},a59_0x3ef3(_0x33408a,_0x23433c);}function a59_0x55a0(){const _0x10e533=['Project\x20name\x20cannot\x20be\x20empty','14471408MZLnJE','1084808DjgEWZ','319368yXLvjX','312107NxzxmP','1345515KcbtXL','Invalid\x20agent\x20reference\x20format:\x20','964484Ttpcug','5CBUAeD','trim','5701486nvLJNV','length','Agent\x20reference\x20cannot\x20be\x20empty','Agent\x20name\x20cannot\x20be\x20empty'];a59_0x55a0=function(){return _0x10e533;};return a59_0x55a0();}
|
package/dist/utils/chat-cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x564f97,_0x2c6c79){const _0x10b921=a60_0x1559,_0x4b84c3=_0x564f97();while(!![]){try{const _0x3e86c2=-parseInt(_0x10b921(0x11f))/0x1+parseInt(_0x10b921(0x115))/0x2*(-parseInt(_0x10b921(0x112))/0x3)+parseInt(_0x10b921(0x11a))/0x4*(-parseInt(_0x10b921(0x11e))/0x5)+parseInt(_0x10b921(0x111))/0x6+-parseInt(_0x10b921(0x11d))/0x7*(parseInt(_0x10b921(0x113))/0x8)+-parseInt(_0x10b921(0x11c))/0x9+parseInt(_0x10b921(0x118))/0xa;if(_0x3e86c2===_0x2c6c79)break;else _0x4b84c3['push'](_0x4b84c3['shift']());}catch(_0x524762){_0x4b84c3['push'](_0x4b84c3['shift']());}}}(a60_0xeeb8,0xba930));function a60_0xeeb8(){const _0x27539e=['tdx','34727910vBIrJR','trim','5924dVvUEB','cwd','10207728oHRnOP','1393rToBvV','2715DJOaYi','1088849aJbEHz','6513636ylcFAM','38028icWxeG','29304aTDTOy','utf-8','6EeGnFf','last_chat_id'];a60_0xeeb8=function(){return _0x27539e;};return a60_0xeeb8();}function a60_0x1559(_0x1daa8b,_0x3f7fd1){const _0xeeb8fa=a60_0xeeb8();return a60_0x1559=function(_0x1559bb,_0x2d0166){_0x1559bb=_0x1559bb-0x111;let _0x3524d7=_0xeeb8fa[_0x1559bb];return _0x3524d7;},a60_0x1559(_0x1daa8b,_0x3f7fd1);}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0xad9e26=a60_0x1559;return join(process[_0xad9e26(0x11b)](),'.cache',_0xad9e26(0x117));}function getLastChatIdPath(){const _0x4f45b9=a60_0x1559;return join(getCacheDir(),_0x4f45b9(0x116));}function ensureCacheDir(){const _0x4db15e=getCacheDir();!existsSync(_0x4db15e)&&mkdirSync(_0x4db15e,{'recursive':!![]});}export function saveLastChatId(_0x43ff88){const _0x5f21fa=a60_0x1559;ensureCacheDir();const _0x224084=getLastChatIdPath();writeFileSync(_0x224084,_0x43ff88,_0x5f21fa(0x114));}export function loadLastChatId(){const _0x27fab2=a60_0x1559,_0x58876c=getLastChatIdPath();if(!existsSync(_0x58876c))return undefined;try{const _0x3c0b9a=readFileSync(_0x58876c,_0x27fab2(0x114))[_0x27fab2(0x119)]();return _0x3c0b9a||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x2c6091=a60_0x1559,_0x129353=getLastChatIdPath();if(existsSync(_0x129353))try{writeFileSync(_0x129353,'',_0x2c6091(0x114));}catch{}}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3299cb,_0x59ef76){const _0x422fe4=a61_0x152c,_0x4b511b=_0x3299cb();while(!![]){try{const _0x322b47=-parseInt(_0x422fe4(0xab))/0x1*(parseInt(_0x422fe4(0xa1))/0x2)+-parseInt(_0x422fe4(0x94))/0x3+parseInt(_0x422fe4(0xa8))/0x4+-parseInt(_0x422fe4(0x9f))/0x5*(parseInt(_0x422fe4(0xa6))/0x6)+parseInt(_0x422fe4(0xa4))/0x7+parseInt(_0x422fe4(0x92))/0x8+parseInt(_0x422fe4(0x93))/0x9*(parseInt(_0x422fe4(0xa2))/0xa);if(_0x322b47===_0x59ef76)break;else _0x4b511b['push'](_0x4b511b['shift']());}catch(_0xb03acf){_0x4b511b['push'](_0x4b511b['shift']());}}}(a61_0x2ee9,0xc106d));import{Chalk}from'chalk';export function shouldUseColor(_0x2cdcfc={}){const _0x13ae18=a61_0x152c;if(_0x2cdcfc[_0x13ae18(0x9c)]===!![])return![];if(_0x2cdcfc['color']===!![])return!![];if(process['env'][_0x13ae18(0xa5)]!==undefined)return![];return process[_0x13ae18(0xa3)][_0x13ae18(0x9d)]??![];}export function getChalk(_0x45ae7b={}){if(shouldUseColor(_0x45ae7b))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x3c5142,_0x1c73dc={}){return getChalk(_0x1c73dc)['dim'](_0x3c5142);}function a61_0x2ee9(){const _0x99169a=['repeat','length','number','cyan','noColor','isTTY','entries','5074635qXRuxR','isArray','316yTslcE','680MyieIm','stdout','10504039xbKwoE','NO_COLOR','6UKdrTq','map','743144LcjoSk','dim','blue','1444apKfIM','null','join','yellow','1121232jUAOYG','190395lOqDiX','3694023JPIXnr','boolean','stringify','object'];a61_0x2ee9=function(){return _0x99169a;};return a61_0x2ee9();}function a61_0x152c(_0x2f31f0,_0x497cb6){const _0x2ee90e=a61_0x2ee9();return a61_0x152c=function(_0x152c6e,_0x3babc8){_0x152c6e=_0x152c6e-0x90;let _0x51ce4c=_0x2ee90e[_0x152c6e];return _0x51ce4c;},a61_0x152c(_0x2f31f0,_0x497cb6);}export function colorHeader(_0x567696,_0x3371c8={}){const _0x53f4c1=a61_0x152c;return getChalk(_0x3371c8)[_0x53f4c1(0x9b)](_0x567696);}export function colorType(_0x1900e1,_0xe4a546={}){const _0x2d97f8=a61_0x152c;return getChalk(_0xe4a546)[_0x2d97f8(0xa9)](_0x1900e1);}export function colorJSONKey(_0xbabc32,_0x114f00={}){const _0x499c06=a61_0x152c;return getChalk(_0x114f00)[_0x499c06(0xaa)](_0xbabc32);}export function colorJSONString(_0x83d2fe,_0x43f6ec={}){return getChalk(_0x43f6ec)['green'](_0x83d2fe);}export function colorJSONNumber(_0x3ef85a,_0x196d89={}){const _0x5f2c47=a61_0x152c;return getChalk(_0x196d89)[_0x5f2c47(0x9b)](_0x3ef85a);}export function colorJSONBoolean(_0x5bfb1d,_0x45da05={}){const _0x127f52=a61_0x152c;return getChalk(_0x45da05)[_0x127f52(0x91)](_0x5bfb1d);}export function colorJSONNull(_0x4cb780,_0x1fdb91={}){return getChalk(_0x1fdb91)['dim'](_0x4cb780);}export function colorizeJSONCompact(_0x2f9ddc,_0x546191={}){const _0x59e477=a61_0x152c;if(!shouldUseColor(_0x546191))return JSON[_0x59e477(0x96)](_0x2f9ddc);if(_0x2f9ddc===null)return colorJSONNull(_0x59e477(0xac),_0x546191);if(typeof _0x2f9ddc===_0x59e477(0x95))return colorJSONBoolean(String(_0x2f9ddc),_0x546191);if(typeof _0x2f9ddc===_0x59e477(0x9a))return colorJSONNumber(String(_0x2f9ddc),_0x546191);if(typeof _0x2f9ddc==='string')return colorJSONString(JSON[_0x59e477(0x96)](_0x2f9ddc),_0x546191);if(Array[_0x59e477(0xa0)](_0x2f9ddc)){if(_0x2f9ddc[_0x59e477(0x99)]===0x0)return'[]';const _0x3c2209=_0x2f9ddc[_0x59e477(0xa7)](_0x2201e6=>colorizeJSONCompact(_0x2201e6,_0x546191));return'['+_0x3c2209[_0x59e477(0x90)](',')+']';}if(typeof _0x2f9ddc===_0x59e477(0x97)){const _0x3605d3=Object['entries'](_0x2f9ddc);if(_0x3605d3[_0x59e477(0x99)]===0x0)return'{}';const _0x27e0be=_0x3605d3[_0x59e477(0xa7)](([_0x34eb82,_0x5552d7])=>{const _0x5eb596=_0x59e477,_0xd5a42=colorJSONKey(JSON[_0x5eb596(0x96)](_0x34eb82),_0x546191),_0x296b77=colorizeJSONCompact(_0x5552d7,_0x546191);return _0xd5a42+':'+_0x296b77;});return'{'+_0x27e0be[_0x59e477(0x90)](',')+'}';}return String(_0x2f9ddc);}export function colorizeJSON(_0x39bf97,_0x38404e={},_0x15cea8=0x0){const _0x4b2095=a61_0x152c;if(!shouldUseColor(_0x38404e))return JSON[_0x4b2095(0x96)](_0x39bf97,null,0x2);const _0x498a45='\x20'[_0x4b2095(0x98)](_0x15cea8),_0x575954=_0x15cea8+0x2;if(_0x39bf97===null)return colorJSONNull(_0x4b2095(0xac),_0x38404e);if(typeof _0x39bf97==='boolean')return colorJSONBoolean(String(_0x39bf97),_0x38404e);if(typeof _0x39bf97==='number')return colorJSONNumber(String(_0x39bf97),_0x38404e);if(typeof _0x39bf97==='string')return colorJSONString(JSON[_0x4b2095(0x96)](_0x39bf97),_0x38404e);if(Array[_0x4b2095(0xa0)](_0x39bf97)){if(_0x39bf97[_0x4b2095(0x99)]===0x0)return'[]';const _0x1922a3=_0x39bf97[_0x4b2095(0xa7)](_0x35c317=>{const _0x561623=colorizeJSON(_0x35c317,_0x38404e,_0x575954);return''+'\x20'['repeat'](_0x575954)+_0x561623;});return'[\x0a'+_0x1922a3[_0x4b2095(0x90)](',\x0a')+('\x0a'+_0x498a45+']');}if(typeof _0x39bf97==='object'){const _0x14963e=Object[_0x4b2095(0x9e)](_0x39bf97);if(_0x14963e[_0x4b2095(0x99)]===0x0)return'{}';const _0x2b38bf=_0x14963e[_0x4b2095(0xa7)](([_0x2d60f,_0x30064f])=>{const _0x5a6629=_0x4b2095,_0x2d9415=colorJSONKey(JSON[_0x5a6629(0x96)](_0x2d60f),_0x38404e),_0x3d86e2=colorizeJSON(_0x30064f,_0x38404e,_0x575954);return''+'\x20'[_0x5a6629(0x98)](_0x575954)+_0x2d9415+':\x20'+_0x3d86e2;});return'{\x0a'+_0x2b38bf[_0x4b2095(0x90)](',\x0a')+('\x0a'+_0x498a45+'}');}return String(_0x39bf97);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x408224,_0x8b6881){const _0x20abae=a62_0x11d8,_0x78534a=_0x408224();while(!![]){try{const _0x151cee=-parseInt(_0x20abae(0x101))/0x1+-parseInt(_0x20abae(0xf3))/0x2+parseInt(_0x20abae(0x122))/0x3*(-parseInt(_0x20abae(0xed))/0x4)+parseInt(_0x20abae(0xe7))/0x5+parseInt(_0x20abae(0x11d))/0x6+-parseInt(_0x20abae(0x10e))/0x7*(parseInt(_0x20abae(0x10a))/0x8)+parseInt(_0x20abae(0x112))/0x9*(parseInt(_0x20abae(0x110))/0xa);if(_0x151cee===_0x8b6881)break;else _0x78534a['push'](_0x78534a['shift']());}catch(_0x3bf438){_0x78534a['push'](_0x78534a['shift']());}}}(a62_0x5c33,0xa8d6c));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a62_0x2cc0fc from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x59729e){const _0xb377cb=a62_0x11d8;return{'format':_0x59729e[_0xb377cb(0xfd)]||_0xb377cb(0x115),'output':_0x59729e[_0xb377cb(0x11a)]||'','limit':_0x59729e[_0xb377cb(0x123)],'color':_0x59729e['color'],'noColor':_0x59729e[_0xb377cb(0x108)]};}function a62_0x5c33(){const _0x496faa=['[query]','2372838ZwOyCE','json','query','split','debug','push','yellow','color','object','stdout','format','cmdout','isTTY','forEach','164445ZxhPkF','log','end','No\x20data','join','padEnd','entries','noColor','pipe','2884984tXnvIS','red','boolean','write','21cPcEuq','less','26200zaulmF','inherit','4338bNoIun','-FXRSn','[Object]','table','bigint','string','stringify','map','output','error','[logs]','5629752AZgcPI','filter','max','spawn','length','1091064jtKZKU','limit','varchar','stderr','repeat','stdin','resolve','6434265vBVWXH','bold','cyan','number','close','jsonl','4mjZnIW','isInteger','trim','[error]','FINISHED'];a62_0x5c33=function(){return _0x496faa;};return a62_0x5c33();}function convertSDKResultToQueryResult(_0x527a28){const _0x1d9bbc=a62_0x11d8,_0x2b6ba2=[];if(_0x527a28[_0x1d9bbc(0x121)]>0x0){const _0xc830fc=_0x527a28[0x0];for(const [_0x223fe0,_0x403de4]of Object[_0x1d9bbc(0x107)](_0xc830fc)){let _0x196d4a=_0x1d9bbc(0xe2);if(typeof _0x403de4==='number')_0x196d4a=Number[_0x1d9bbc(0xee)](_0x403de4)?_0x1d9bbc(0x116):'double';else{if(typeof _0x403de4===_0x1d9bbc(0x10c))_0x196d4a='boolean';else _0x403de4===null&&(_0x196d4a='varchar');}_0x2b6ba2[_0x1d9bbc(0xf8)]({'name':_0x223fe0,'type':_0x196d4a});}}return{'queryId':'sdk-result','columns':_0x2b6ba2,'data':_0x527a28,'stats':{'state':_0x1d9bbc(0xf1),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x527a28[_0x1d9bbc(0x121)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x202674,_0x17a25c){const _0xb85969=convertSDKResultToQueryResult(_0x202674);return formatQueryOutput(_0xb85969,_0x17a25c);}export async function formatQueryOutput(_0x24d67c,_0x4df56b){const _0x27e2a4=a62_0x11d8,{format:_0x78a1a5,limit:_0x463019,output:_0x10b79d,color:_0x1d4bb6,noColor:_0x7a1a25}=_0x4df56b,_0x3e8b55=Boolean(_0x10b79d)&&!_0x1d4bb6,_0x198739={'color':_0x1d4bb6,'noColor':_0x7a1a25||_0x3e8b55};if(_0x78a1a5===_0x27e2a4(0x115)){const _0xcbd389=shouldUseLess(_0x78a1a5,_0x10b79d);return formatAsTable(_0x24d67c,_0x463019,_0xcbd389,_0x198739);}else{if(_0x78a1a5===_0x27e2a4(0xf4))return formatAsJSON(_0x24d67c,_0x198739);else return _0x78a1a5===_0x27e2a4(0xec)?formatAsJSONL(_0x24d67c,_0x198739):formatQueryResult(_0x24d67c,_0x78a1a5);}}function shouldUseLess(_0x368ba7,_0x35a8df){const _0x1a8467=a62_0x11d8;return _0x368ba7===_0x1a8467(0x115)&&process[_0x1a8467(0xfc)][_0x1a8467(0xff)]&&!_0x35a8df;}export function resolveOutputOptions(_0x15cbfa){const _0x38f371=a62_0x11d8,_0x41e0cf=resolveOutputFormat(_0x15cbfa[_0x38f371(0xfd)],_0x15cbfa[_0x38f371(0x11a)],'table');let _0x2bde8e=typeof _0x15cbfa[_0x38f371(0x123)]===_0x38f371(0xea)?_0x15cbfa[_0x38f371(0x123)]:parseInt(_0x15cbfa[_0x38f371(0x123)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x2e80e5=_0x15cbfa[_0x38f371(0x11a)]||'';return shouldUseLess(_0x41e0cf,_0x2e80e5)&&(_0x2bde8e=Infinity),{'format':_0x41e0cf,'output':_0x2e80e5,'limit':_0x2bde8e,'color':_0x15cbfa[_0x38f371(0xfa)],'noColor':_0x15cbfa[_0x38f371(0x108)]};}export function writeOutput(_0x3f5bcc,_0x1bc9bc,_0x2ad581){const _0x40f4a0=a62_0x11d8;return _0x1bc9bc?(writeFileSync(_0x1bc9bc,_0x3f5bcc),console[_0x40f4a0(0x11b)]('Results\x20saved\x20to\x20'+_0x1bc9bc),Promise[_0x40f4a0(0xe6)]()):shouldUseLess(_0x2ad581||'','')?new Promise(_0xf942d5=>{const _0x57471f=_0x40f4a0,_0xd125e5=spawn(_0x57471f(0x10f),[_0x57471f(0x113)],{'stdio':[_0x57471f(0x109),_0x57471f(0x111),_0x57471f(0x111)]});let _0xecca8b=![];_0xd125e5['on'](_0x57471f(0x11b),()=>{const _0x30fabd=_0x57471f;!_0xecca8b&&(_0xecca8b=!![],console[_0x30fabd(0x102)](_0x3f5bcc),_0xf942d5());}),_0xd125e5['on'](_0x57471f(0xeb),()=>{!_0xecca8b&&(_0xecca8b=!![],_0xf942d5());}),_0xd125e5['on'](_0x57471f(0x120),()=>{const _0x38e5de=_0x57471f;!_0xecca8b&&_0xd125e5['stdin']&&(_0xd125e5[_0x38e5de(0xe5)]['on']('error',()=>{}),_0xd125e5['stdin'][_0x38e5de(0x10d)](_0x3f5bcc),_0xd125e5[_0x38e5de(0xe5)][_0x38e5de(0x103)]());}),!_0xd125e5[_0x57471f(0xe5)]&&(!_0xecca8b&&(_0xecca8b=!![],console[_0x57471f(0x102)](_0x3f5bcc),_0xf942d5()));}):(console['log'](_0x3f5bcc),Promise['resolve']());}export async function handleSDKOutput(_0xd3f97,_0x4cdb83){const _0x47227d=a62_0x11d8,_0xbca133=resolveOutputOptions(_0x4cdb83),_0x4f2b50=await formatSDKOutput(_0xd3f97,_0xbca133);await writeOutput(_0x4f2b50,_0xbca133[_0x47227d(0x11a)]||undefined,_0xbca133['format']);}function a62_0x11d8(_0x2676c6,_0x40fa8b){const _0x5c3377=a62_0x5c33();return a62_0x11d8=function(_0x11d881,_0x1207b8){_0x11d881=_0x11d881-0xe2;let _0xea0c35=_0x5c3377[_0x11d881];return _0xea0c35;},a62_0x11d8(_0x2676c6,_0x40fa8b);}export async function handleQueryOutput(_0x40dd3b,_0x4c4806){const _0x4bee29=a62_0x11d8,_0x524e1e=resolveOutputOptions(_0x4c4806),_0x56d13f=await formatQueryOutput(_0x40dd3b,_0x524e1e);await writeOutput(_0x56d13f,_0x524e1e[_0x4bee29(0x11a)]||undefined,_0x524e1e['format']);}async function formatSingleObject(_0x440068,_0xe75c09){const _0x2a63e7=a62_0x11d8,{format:_0xa96813,color:_0x5381a4,noColor:_0x4584d8}=_0xe75c09,_0x47a3eb={'color':_0x5381a4,'noColor':_0x4584d8};if(_0xa96813===_0x2a63e7(0xf4)){if(shouldUseColor(_0x47a3eb))return colorizeJSON(_0x440068,_0x47a3eb);return JSON['stringify'](_0x440068,null,0x2);}else{if(_0xa96813===_0x2a63e7(0xec)){if(shouldUseColor(_0x47a3eb))return colorizeJSONCompact(_0x440068,_0x47a3eb);return JSON[_0x2a63e7(0x118)](_0x440068);}else{if(_0xa96813==='tsv')return Object[_0x2a63e7(0x107)](_0x440068)['map'](([_0x1cad1b,_0x56df43])=>_0x1cad1b+'\x09'+_0x56df43)['join']('\x0a');else{const _0xac414f=Object[_0x2a63e7(0x107)](_0x440068);if(_0xac414f['length']===0x0)return _0x2a63e7(0x104);const _0x15bf70=_0x440068[_0x2a63e7(0xf7)],_0x4601bc=_0x440068[_0x2a63e7(0xf5)],_0x5929d5=_0x4601bc?typeof _0x4601bc===_0x2a63e7(0x117)?_0x4601bc:JSON[_0x2a63e7(0x118)](_0x4601bc,null,0x2):undefined,_0xf4d7f4=_0xac414f[_0x2a63e7(0x11e)](([_0x1d8828])=>_0x1d8828!=='debug'&&_0x1d8828!=='query'),_0x1a8743=Math['max'](..._0xf4d7f4['map'](([_0x41ab97])=>_0x41ab97[_0x2a63e7(0x121)])),_0x3ddf09=Math[_0x2a63e7(0x11f)](..._0xf4d7f4[_0x2a63e7(0x119)](([,_0x3a1a39])=>{const _0x45e7c7=_0x2a63e7;try{const _0x1cbcad=_0x3a1a39===null||_0x3a1a39===undefined?'':typeof _0x3a1a39===_0x45e7c7(0xfb)?JSON[_0x45e7c7(0x118)](_0x3a1a39):String(_0x3a1a39),_0x391a86=_0x1cbcad['split']('\x0a');return Math[_0x45e7c7(0x11f)](..._0x391a86['map'](_0x7e1aa5=>_0x7e1aa5[_0x45e7c7(0x121)]),0x0);}catch{return 0x0;}}),0x14),_0x502db7=[];_0x502db7[_0x2a63e7(0xf8)](colorBorder('┌─'+'─'[_0x2a63e7(0xe4)](_0x1a8743)+'─┬─'+'─'[_0x2a63e7(0xe4)](_0x3ddf09)+'─┐',_0x47a3eb)),_0xf4d7f4[_0x2a63e7(0x100)](([_0x3191d0,_0x30254f])=>{const _0x3a4d57=_0x2a63e7;let _0x31467a;try{_0x31467a=_0x30254f===null||_0x30254f===undefined?'':typeof _0x30254f==='object'?JSON[_0x3a4d57(0x118)](_0x30254f):String(_0x30254f);}catch{_0x31467a=_0x3a4d57(0x114);}const _0x4daab8=_0x3191d0['padEnd'](_0x1a8743),_0xe8d88d=_0x31467a[_0x3a4d57(0xf6)]('\x0a');_0xe8d88d[_0x3a4d57(0x100)]((_0x3377c0,_0xe6a180)=>{const _0x16eab2=_0x3a4d57,_0x38b59c=colorBorder('│',_0x47a3eb);_0xe6a180===0x0?_0x502db7[_0x16eab2(0xf8)](_0x38b59c+'\x20'+_0x4daab8+'\x20'+_0x38b59c+'\x20'+_0x3377c0[_0x16eab2(0x106)](_0x3ddf09)+'\x20'+_0x38b59c):_0x502db7['push'](_0x38b59c+'\x20'+'\x20'[_0x16eab2(0xe4)](_0x1a8743)+'\x20'+_0x38b59c+'\x20'+_0x3377c0['padEnd'](_0x3ddf09)+'\x20'+_0x38b59c);});}),_0x502db7[_0x2a63e7(0xf8)](colorBorder('└─'+'─'[_0x2a63e7(0xe4)](_0x1a8743)+'─┴─'+'─'[_0x2a63e7(0xe4)](_0x3ddf09)+'─┘',_0x47a3eb));_0x5929d5&&(_0x502db7[_0x2a63e7(0xf8)](''),_0x502db7[_0x2a63e7(0xf8)](String(a62_0x2cc0fc[_0x2a63e7(0xf9)][_0x2a63e7(0xe8)](_0x2a63e7(0xf2)))),_0x502db7[_0x2a63e7(0xf8)](_0x5929d5));if(_0x15bf70){if(_0x15bf70['stderr']){_0x502db7[_0x2a63e7(0xf8)](''),_0x502db7[_0x2a63e7(0xf8)](String(a62_0x2cc0fc[_0x2a63e7(0x10b)][_0x2a63e7(0xe8)](_0x2a63e7(0xf0))));const _0x4ea218=_0x15bf70[_0x2a63e7(0xe3)][_0x2a63e7(0xf6)]('\x0a');_0x4ea218[_0x2a63e7(0x100)](_0x1d6cdf=>{const _0x499034=_0x2a63e7;_0x1d6cdf[_0x499034(0xef)]()&&_0x502db7[_0x499034(0xf8)](_0x1d6cdf);});}if(_0x15bf70[_0x2a63e7(0xfe)]){_0x502db7[_0x2a63e7(0xf8)](''),_0x502db7['push'](String(a62_0x2cc0fc[_0x2a63e7(0xe9)][_0x2a63e7(0xe8)](_0x2a63e7(0x11c))));const _0x21079b=_0x15bf70[_0x2a63e7(0xfe)]['split']('\x0a');_0x21079b[_0x2a63e7(0x100)](_0x50e1ce=>{const _0x1eac42=_0x2a63e7;_0x50e1ce[_0x1eac42(0xef)]()&&_0x502db7[_0x1eac42(0xf8)](_0x50e1ce);});}}return _0x502db7[_0x2a63e7(0x105)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x6c50d,_0x21be9e){const _0x230974=a62_0x11d8,_0x35e4e5=resolveOutputOptions(_0x21be9e),_0x24dd38=await formatSingleObject(_0x6c50d,_0x35e4e5);await writeOutput(_0x24dd38,_0x35e4e5[_0x230974(0x11a)]||undefined,_0x35e4e5['format']);}
|
|
1
|
+
(function(_0x504c3c,_0x5b0487){const _0x1d8db4=a62_0x4687,_0x5d336f=_0x504c3c();while(!![]){try{const _0x2f969a=parseInt(_0x1d8db4(0x131))/0x1+-parseInt(_0x1d8db4(0x145))/0x2*(-parseInt(_0x1d8db4(0x12c))/0x3)+parseInt(_0x1d8db4(0x139))/0x4*(parseInt(_0x1d8db4(0x137))/0x5)+parseInt(_0x1d8db4(0x146))/0x6+parseInt(_0x1d8db4(0x15c))/0x7*(parseInt(_0x1d8db4(0x12f))/0x8)+parseInt(_0x1d8db4(0x15a))/0x9+-parseInt(_0x1d8db4(0x14f))/0xa;if(_0x2f969a===_0x5b0487)break;else _0x5d336f['push'](_0x5d336f['shift']());}catch(_0x319a24){_0x5d336f['push'](_0x5d336f['shift']());}}}(a62_0x3de3,0xcfc2d));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a62_0x4687(_0x339a8f,_0x36f527){const _0x3de3ee=a62_0x3de3();return a62_0x4687=function(_0x4687d6,_0x1f0391){_0x4687d6=_0x4687d6-0x11e;let _0x2d2e35=_0x3de3ee[_0x4687d6];return _0x2d2e35;},a62_0x4687(_0x339a8f,_0x36f527);}import a62_0x260ecc from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x3af49e){const _0x5f1e40=a62_0x4687;return{'format':_0x3af49e[_0x5f1e40(0x141)]||_0x5f1e40(0x124),'output':_0x3af49e[_0x5f1e40(0x12d)]||'','limit':_0x3af49e[_0x5f1e40(0x154)],'color':_0x3af49e[_0x5f1e40(0x151)],'noColor':_0x3af49e[_0x5f1e40(0x126)]};}function convertSDKResultToQueryResult(_0x7a7b13){const _0x2b30f1=a62_0x4687,_0xc3e630=[];if(_0x7a7b13[_0x2b30f1(0x120)]>0x0){const _0x4e0ace=_0x7a7b13[0x0];for(const [_0xc05396,_0x43c7f3]of Object[_0x2b30f1(0x12a)](_0x4e0ace)){let _0x4de1dc=_0x2b30f1(0x142);if(typeof _0x43c7f3==='number')_0x4de1dc=Number['isInteger'](_0x43c7f3)?'bigint':_0x2b30f1(0x128);else{if(typeof _0x43c7f3===_0x2b30f1(0x138))_0x4de1dc=_0x2b30f1(0x138);else _0x43c7f3===null&&(_0x4de1dc=_0x2b30f1(0x142));}_0xc3e630[_0x2b30f1(0x12b)]({'name':_0xc05396,'type':_0x4de1dc});}}return{'queryId':'sdk-result','columns':_0xc3e630,'data':_0x7a7b13,'stats':{'state':_0x2b30f1(0x14e),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x7a7b13[_0x2b30f1(0x120)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x47195b,_0x2424ac){const _0x4d9a15=convertSDKResultToQueryResult(_0x47195b);return formatQueryOutput(_0x4d9a15,_0x2424ac);}export async function formatQueryOutput(_0x31cee9,_0x352799){const _0x49bd24=a62_0x4687,{format:_0x35228b,limit:_0x4d8bf0,output:_0x19d13d,color:_0x1b825a,noColor:_0x54b37d}=_0x352799,_0x57e66f=Boolean(_0x19d13d)&&!_0x1b825a,_0x3eb275={'color':_0x1b825a,'noColor':_0x54b37d||_0x57e66f};if(_0x35228b===_0x49bd24(0x124)){const _0x10b465=shouldUseLess(_0x35228b,_0x19d13d);return formatAsTable(_0x31cee9,_0x4d8bf0,_0x10b465,_0x3eb275);}else{if(_0x35228b===_0x49bd24(0x125))return formatAsJSON(_0x31cee9,_0x3eb275);else return _0x35228b===_0x49bd24(0x157)?formatAsJSONL(_0x31cee9,_0x3eb275):formatQueryResult(_0x31cee9,_0x35228b);}}function shouldUseLess(_0xab4fa,_0x11d1ca){const _0x4b216a=a62_0x4687;return _0xab4fa===_0x4b216a(0x124)&&process[_0x4b216a(0x123)][_0x4b216a(0x152)]&&!_0x11d1ca;}export function resolveOutputOptions(_0x4208b0){const _0x45b425=a62_0x4687,_0x382bee=resolveOutputFormat(_0x4208b0[_0x45b425(0x141)],_0x4208b0[_0x45b425(0x12d)],_0x45b425(0x124));let _0x3c83be=typeof _0x4208b0[_0x45b425(0x154)]==='number'?_0x4208b0[_0x45b425(0x154)]:parseInt(_0x4208b0[_0x45b425(0x154)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x4e485a=_0x4208b0[_0x45b425(0x12d)]||'';return shouldUseLess(_0x382bee,_0x4e485a)&&(_0x3c83be=Infinity),{'format':_0x382bee,'output':_0x4e485a,'limit':_0x3c83be,'color':_0x4208b0['color'],'noColor':_0x4208b0['noColor']};}function a62_0x3de3(){const _0x58292e=['error','FINISHED','40899720UArCJH','cyan','color','isTTY','end','limit','trim','forEach','jsonl','tsv','inherit','11898450wemxvg','[logs]','72366UBrtKR','log','join','length','pipe','repeat','stdout','table','json','noColor','max','double','query','entries','push','246nKtamQ','output','write','1016YzDvZQ','[query]','783076ippHhY','yellow','object','─┬─','spawn','cmdout','5uMbuXK','boolean','1675100BzIhcj','split','debug','resolve','-FXRSn','stringify','padEnd','bold','format','varchar','─┴─','map','942vylPRl','6393072uqdRmi','close','stderr','[error]','less','stdin','red'];a62_0x3de3=function(){return _0x58292e;};return a62_0x3de3();}export function writeOutput(_0x53f440,_0x40a66c,_0xa3bab2){const _0x50eb10=a62_0x4687;return _0x40a66c?(writeFileSync(_0x40a66c,_0x53f440),console[_0x50eb10(0x14d)]('Results\x20saved\x20to\x20'+_0x40a66c),Promise['resolve']()):shouldUseLess(_0xa3bab2||'','')?new Promise(_0x4d8e38=>{const _0x310dc9=_0x50eb10,_0x93041b=spawn(_0x310dc9(0x14a),[_0x310dc9(0x13d)],{'stdio':[_0x310dc9(0x121),_0x310dc9(0x159),_0x310dc9(0x159)]});let _0x487c5b=![];_0x93041b['on'](_0x310dc9(0x14d),()=>{const _0x24884e=_0x310dc9;!_0x487c5b&&(_0x487c5b=!![],console[_0x24884e(0x11e)](_0x53f440),_0x4d8e38());}),_0x93041b['on'](_0x310dc9(0x147),()=>{!_0x487c5b&&(_0x487c5b=!![],_0x4d8e38());}),_0x93041b['on'](_0x310dc9(0x135),()=>{const _0x3d8c2b=_0x310dc9;!_0x487c5b&&_0x93041b[_0x3d8c2b(0x14b)]&&(_0x93041b[_0x3d8c2b(0x14b)]['on'](_0x3d8c2b(0x14d),()=>{}),_0x93041b['stdin'][_0x3d8c2b(0x12e)](_0x53f440),_0x93041b[_0x3d8c2b(0x14b)][_0x3d8c2b(0x153)]());}),!_0x93041b[_0x310dc9(0x14b)]&&(!_0x487c5b&&(_0x487c5b=!![],console[_0x310dc9(0x11e)](_0x53f440),_0x4d8e38()));}):(console[_0x50eb10(0x11e)](_0x53f440),Promise[_0x50eb10(0x13c)]());}export async function handleSDKOutput(_0x5ac1fc,_0x2c3d78){const _0x2225ca=a62_0x4687,_0x5e1417=resolveOutputOptions(_0x2c3d78),_0x51c558=await formatSDKOutput(_0x5ac1fc,_0x5e1417);await writeOutput(_0x51c558,_0x5e1417[_0x2225ca(0x12d)]||undefined,_0x5e1417[_0x2225ca(0x141)]);}export async function handleQueryOutput(_0x579b7a,_0x1aed31){const _0x206d84=a62_0x4687,_0x36266b=resolveOutputOptions(_0x1aed31),_0x3d8474=await formatQueryOutput(_0x579b7a,_0x36266b);await writeOutput(_0x3d8474,_0x36266b[_0x206d84(0x12d)]||undefined,_0x36266b[_0x206d84(0x141)]);}async function formatSingleObject(_0x26939f,_0x3071a2){const _0x347e48=a62_0x4687,{format:_0xf207d0,color:_0x32f237,noColor:_0x359140}=_0x3071a2,_0x19f38f={'color':_0x32f237,'noColor':_0x359140};if(_0xf207d0===_0x347e48(0x125)){if(shouldUseColor(_0x19f38f))return colorizeJSON(_0x26939f,_0x19f38f);return JSON['stringify'](_0x26939f,null,0x2);}else{if(_0xf207d0===_0x347e48(0x157)){if(shouldUseColor(_0x19f38f))return colorizeJSONCompact(_0x26939f,_0x19f38f);return JSON[_0x347e48(0x13e)](_0x26939f);}else{if(_0xf207d0===_0x347e48(0x158))return Object['entries'](_0x26939f)['map'](([_0x5b862e,_0x29f294])=>_0x5b862e+'\x09'+_0x29f294)[_0x347e48(0x11f)]('\x0a');else{const _0x257fdc=Object[_0x347e48(0x12a)](_0x26939f);if(_0x257fdc[_0x347e48(0x120)]===0x0)return'No\x20data';const _0x4329d8=_0x26939f['debug'],_0x1e36b5=_0x26939f[_0x347e48(0x129)],_0xf241ad=_0x1e36b5?typeof _0x1e36b5==='string'?_0x1e36b5:JSON['stringify'](_0x1e36b5,null,0x2):undefined,_0x333a7d=_0x257fdc['filter'](([_0x1712ec])=>_0x1712ec!==_0x347e48(0x13b)&&_0x1712ec!==_0x347e48(0x129)),_0x43d344=Math[_0x347e48(0x127)](..._0x333a7d[_0x347e48(0x144)](([_0x2f5a30])=>_0x2f5a30[_0x347e48(0x120)])),_0x3a8e9b=Math[_0x347e48(0x127)](..._0x333a7d[_0x347e48(0x144)](([,_0x252f37])=>{const _0x507cae=_0x347e48;try{const _0x2144c0=_0x252f37===null||_0x252f37===undefined?'':typeof _0x252f37===_0x507cae(0x133)?JSON[_0x507cae(0x13e)](_0x252f37):String(_0x252f37),_0x319e45=_0x2144c0[_0x507cae(0x13a)]('\x0a');return Math['max'](..._0x319e45[_0x507cae(0x144)](_0x435a89=>_0x435a89[_0x507cae(0x120)]),0x0);}catch{return 0x0;}}),0x14),_0x3e070a=[];_0x3e070a[_0x347e48(0x12b)](colorBorder('┌─'+'─'[_0x347e48(0x122)](_0x43d344)+_0x347e48(0x134)+'─'['repeat'](_0x3a8e9b)+'─┐',_0x19f38f)),_0x333a7d[_0x347e48(0x156)](([_0x10b739,_0x1ae48b])=>{const _0x29ef3e=_0x347e48;let _0x526dae;try{_0x526dae=_0x1ae48b===null||_0x1ae48b===undefined?'':typeof _0x1ae48b===_0x29ef3e(0x133)?JSON[_0x29ef3e(0x13e)](_0x1ae48b):String(_0x1ae48b);}catch{_0x526dae='[Object]';}const _0x2dcb20=_0x10b739[_0x29ef3e(0x13f)](_0x43d344),_0x5ec1f1=_0x526dae[_0x29ef3e(0x13a)]('\x0a');_0x5ec1f1['forEach']((_0x3bc13d,_0x2426bb)=>{const _0x557b7f=_0x29ef3e,_0x117ec7=colorBorder('│',_0x19f38f);_0x2426bb===0x0?_0x3e070a[_0x557b7f(0x12b)](_0x117ec7+'\x20'+_0x2dcb20+'\x20'+_0x117ec7+'\x20'+_0x3bc13d['padEnd'](_0x3a8e9b)+'\x20'+_0x117ec7):_0x3e070a[_0x557b7f(0x12b)](_0x117ec7+'\x20'+'\x20'['repeat'](_0x43d344)+'\x20'+_0x117ec7+'\x20'+_0x3bc13d[_0x557b7f(0x13f)](_0x3a8e9b)+'\x20'+_0x117ec7);});}),_0x3e070a[_0x347e48(0x12b)](colorBorder('└─'+'─'['repeat'](_0x43d344)+_0x347e48(0x143)+'─'['repeat'](_0x3a8e9b)+'─┘',_0x19f38f));_0xf241ad&&(_0x3e070a[_0x347e48(0x12b)](''),_0x3e070a[_0x347e48(0x12b)](String(a62_0x260ecc[_0x347e48(0x132)][_0x347e48(0x140)](_0x347e48(0x130)))),_0x3e070a[_0x347e48(0x12b)](_0xf241ad));if(_0x4329d8){if(_0x4329d8[_0x347e48(0x148)]){_0x3e070a[_0x347e48(0x12b)](''),_0x3e070a[_0x347e48(0x12b)](String(a62_0x260ecc[_0x347e48(0x14c)][_0x347e48(0x140)](_0x347e48(0x149))));const _0x3a4673=_0x4329d8[_0x347e48(0x148)]['split']('\x0a');_0x3a4673[_0x347e48(0x156)](_0x509341=>{const _0x2135ad=_0x347e48;_0x509341[_0x2135ad(0x155)]()&&_0x3e070a[_0x2135ad(0x12b)](_0x509341);});}if(_0x4329d8['cmdout']){_0x3e070a[_0x347e48(0x12b)](''),_0x3e070a[_0x347e48(0x12b)](String(a62_0x260ecc[_0x347e48(0x150)][_0x347e48(0x140)](_0x347e48(0x15b))));const _0x95207c=_0x4329d8[_0x347e48(0x136)][_0x347e48(0x13a)]('\x0a');_0x95207c['forEach'](_0x4128bb=>{const _0x65b675=_0x347e48;_0x4128bb['trim']()&&_0x3e070a[_0x65b675(0x12b)](_0x4128bb);});}}return _0x3e070a[_0x347e48(0x11f)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x5a6dce,_0x30aa9c){const _0xf6f4b1=a62_0x4687,_0x134985=resolveOutputOptions(_0x30aa9c),_0x1e38e8=await formatSingleObject(_0x5a6dce,_0x134985);await writeOutput(_0x1e38e8,_0x134985[_0xf6f4b1(0x12d)]||undefined,_0x134985[_0xf6f4b1(0x141)]);}
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a63_0x1fa4(_0x3db8c2,_0x28cf77){const _0x240963=a63_0x2409();return a63_0x1fa4=function(_0x1fa488,_0x20d0b7){_0x1fa488=_0x1fa488-0x152;let _0x421c99=_0x240963[_0x1fa488];return _0x421c99;},a63_0x1fa4(_0x3db8c2,_0x28cf77);}(function(_0xb260e5,_0x5de7f1){const _0x14b452=a63_0x1fa4,_0x5566f9=_0xb260e5();while(!![]){try{const _0x17c246=-parseInt(_0x14b452(0x15b))/0x1*(-parseInt(_0x14b452(0x159))/0x2)+-parseInt(_0x14b452(0x156))/0x3+-parseInt(_0x14b452(0x15d))/0x4*(parseInt(_0x14b452(0x152))/0x5)+parseInt(_0x14b452(0x158))/0x6+-parseInt(_0x14b452(0x154))/0x7+parseInt(_0x14b452(0x155))/0x8*(parseInt(_0x14b452(0x15c))/0x9)+parseInt(_0x14b452(0x153))/0xa*(parseInt(_0x14b452(0x15a))/0xb);if(_0x17c246===_0x5de7f1)break;else _0x5566f9['push'](_0x5566f9['shift']());}catch(_0x48c1cc){_0x5566f9['push'](_0x5566f9['shift']());}}}(a63_0x2409,0x88f1f));export const DEFAULT_DISPLAY_LIMIT=0x28;export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x321fef,_0x613203){const _0xe0e996=a63_0x1fa4;if(_0x321fef===undefined)return _0x613203;if(typeof _0x321fef===_0xe0e996(0x157))return _0x321fef;return parseInt(_0x321fef,0xa);}function a63_0x2409(){const _0x4bca68=['24MCqsvK','1661415GgoIor','number','6424686RIlRHB','16034eVbyWI','1073149QQvnoX','14eMFQTV','2372373rkTyyO','8pXioCH','2412005LJKMjX','30cgZKOI','1308671xHAgPq'];a63_0x2409=function(){return _0x4bca68;};return a63_0x2409();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d9c5d,_0x596c0d){const _0x1eacde=a64_0xcdab,_0x2136ac=_0x1d9c5d();while(!![]){try{const _0x43d8ca=-parseInt(_0x1eacde(0x1bd))/0x1+-parseInt(_0x1eacde(0x1c5))/0x2+parseInt(_0x1eacde(0x1c7))/0x3+parseInt(_0x1eacde(0x1ba))/0x4*(parseInt(_0x1eacde(0x1b8))/0x5)+-parseInt(_0x1eacde(0x1bb))/0x6*(parseInt(_0x1eacde(0x1c2))/0x7)+-parseInt(_0x1eacde(0x1bf))/0x8+parseInt(_0x1eacde(0x1c9))/0x9;if(_0x43d8ca===_0x596c0d)break;else _0x2136ac['push'](_0x2136ac['shift']());}catch(_0xe3ff35){_0x2136ac['push'](_0x2136ac['shift']());}}}(a64_0x3159,0xc5ff6));import*as a64_0x162db4 from'node:fs';import*as a64_0x598f3e from'node:path';export function setSecureFilePermissions(_0x22d0a5){const _0x3bf6fb=a64_0xcdab;try{a64_0x162db4[_0x3bf6fb(0x1c0)](_0x22d0a5,0x180);}catch{console[_0x3bf6fb(0x1c6)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x22d0a5);}}function a64_0xcdab(_0x558d15,_0x4c5fae){const _0x315997=a64_0x3159();return a64_0xcdab=function(_0xcdab5d,_0x223add){_0xcdab5d=_0xcdab5d-0x1b8;let _0x3cb5dd=_0x315997[_0xcdab5d];return _0x3cb5dd;},a64_0xcdab(_0x558d15,_0x4c5fae);}export function setSecureDirectoryPermissions(_0x2a4938){const _0x1b69e6=a64_0xcdab;try{a64_0x162db4[_0x1b69e6(0x1c0)](_0x2a4938,0x1c0);}catch{console[_0x1b69e6(0x1c6)](_0x1b69e6(0x1c1)+_0x2a4938);}}export function createSecureDirectory(_0x13e4b7){const _0x1691e2=a64_0xcdab;!a64_0x162db4[_0x1691e2(0x1c4)](_0x13e4b7)&&(a64_0x162db4['mkdirSync'](_0x13e4b7,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x13e4b7));}export function validateSecureFilePermissions(_0x3da820){const _0x236276=a64_0xcdab;try{const _0x5ee2b6=a64_0x162db4[_0x236276(0x1c3)](_0x3da820),_0x301173=_0x5ee2b6['mode']&0x1ff,_0x3dca97=(_0x301173&0x3f)!==0x0;if(_0x3dca97)return console[_0x236276(0x1c6)]('Warning:\x20'+_0x3da820+'\x20has\x20insecure\x20permissions\x20('+_0x301173[_0x236276(0x1c8)](0x8)+_0x236276(0x1b9)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x334a32,_0x6739b5){const _0x20455a=a64_0xcdab,_0x4d98aa=a64_0x598f3e[_0x20455a(0x1bc)](_0x334a32);createSecureDirectory(_0x4d98aa),a64_0x162db4[_0x20455a(0x1be)](_0x334a32,_0x6739b5,{'mode':0x180}),setSecureFilePermissions(_0x334a32);}function a64_0x3159(){const _0x3254f9=['1479862fsdpEq','warn','4206687jSQcrM','toString','25215255scxUkz','1565YFZaTv',').\x20','2312cYfGzg','91170eAODcg','dirname','1135101ENlJSC','writeFileSync','4473464uTDRyJ','chmodSync','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','525wCzjbx','statSync','existsSync'];a64_0x3159=function(){return _0x3254f9;};return a64_0x3159();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a65_0x38e3(){const _0x1f5015=['114812VsGVzz','3765944Bngkal','json','split','table','29490kyESpw','tsv','4081764oeoVNt','8461680sExgcV','9AIHwzY','582vdSzDH','12874giyTQa','pop','jsonl','3407150DagLwn','528jbfOGZ'];a65_0x38e3=function(){return _0x1f5015;};return a65_0x38e3();}(function(_0x3af535,_0x8c5772){const _0x54814c=a65_0x40d1,_0x55dc90=_0x3af535();while(!![]){try{const _0x48e585=parseInt(_0x54814c(0x199))/0x1+parseInt(_0x54814c(0x194))/0x2*(parseInt(_0x54814c(0x198))/0x3)+-parseInt(_0x54814c(0x190))/0x4+parseInt(_0x54814c(0x19e))/0x5*(parseInt(_0x54814c(0x193))/0x6)+parseInt(_0x54814c(0x19a))/0x7+-parseInt(_0x54814c(0x191))/0x8+-parseInt(_0x54814c(0x192))/0x9*(-parseInt(_0x54814c(0x197))/0xa);if(_0x48e585===_0x8c5772)break;else _0x55dc90['push'](_0x55dc90['shift']());}catch(_0x35f8ab){_0x55dc90['push'](_0x55dc90['shift']());}}}(a65_0x38e3,0x97762));function a65_0x40d1(_0x338699,_0x507bd2){const _0x38e3d1=a65_0x38e3();return a65_0x40d1=function(_0x40d132,_0x2d281d){_0x40d132=_0x40d132-0x18f;let _0x15f480=_0x38e3d1[_0x40d132];return _0x15f480;},a65_0x40d1(_0x338699,_0x507bd2);}export function detectFormatFromExtension(_0xc5432b){const _0x3d0750=a65_0x40d1,_0x428946=_0xc5432b['toLowerCase']()[_0x3d0750(0x19c)]('.')[_0x3d0750(0x195)]();switch(_0x428946){case _0x3d0750(0x19b):return'json';case _0x3d0750(0x196):return _0x3d0750(0x196);case _0x3d0750(0x18f):case'tab':return _0x3d0750(0x18f);case'txt':case'text':return _0x3d0750(0x19d);default:return undefined;}}export function resolveOutputFormat(_0x2e9f78,_0x42061a,_0x419a49){if(_0x2e9f78)return _0x2e9f78;if(_0x42061a){const _0x4d1af0=detectFormatFromExtension(_0x42061a);if(_0x4d1af0)return _0x4d1af0;}return _0x419a49;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xcfa610,_0xa4cc69){const _0x308512=a66_0x3dde,_0x8bf71=_0xcfa610();while(!![]){try{const _0x22b01d=parseInt(_0x308512(0x96))/0x1*(-parseInt(_0x308512(0xad))/0x2)+-parseInt(_0x308512(0xa7))/0x3*(-parseInt(_0x308512(0xa4))/0x4)+parseInt(_0x308512(0xa2))/0x5+-parseInt(_0x308512(0x8b))/0x6+parseInt(_0x308512(0xac))/0x7*(parseInt(_0x308512(0x8f))/0x8)+-parseInt(_0x308512(0x82))/0x9*(-parseInt(_0x308512(0xa0))/0xa)+-parseInt(_0x308512(0xb5))/0xb;if(_0x22b01d===_0xa4cc69)break;else _0x8bf71['push'](_0x8bf71['shift']());}catch(_0x567fad){_0x8bf71['push'](_0x8bf71['shift']());}}}(a66_0x3368,0xd3c83));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a66_0x3368(){const _0x4778b0=['jsonl','name','18lykcKK','log','json','array','reduce','floor','max','entries','int','8846562dgucui','pow','0\x20B','string','288136kvkDXf','toISOString','stringify','long','push','forEach','number','294794pPfkfP','slice','map','min','false','toFixed','double','join','object','startsWith','8511010fmSmIi','substring','55010Kfbbcw','columns','123896LrsOdo','repeat','length','39IrdZzV','\x20shown)','row','data','toString','329hUdAdj','2UsABpF','toLowerCase','padEnd','\x20rows\x20(','stdout','date','No\x20rows\x20returned','type','12891835sqGhKS','boolean','replace'];a66_0x3368=function(){return _0x4778b0;};return a66_0x3368();}const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x18d18c=a66_0x3dde;return process[_0x18d18c(0xb1)][_0x18d18c(0xa3)]||Infinity;}export function formatAsTable(_0x1e6ba0,_0x1e3dae=DEFAULT_MAX_DISPLAY_ROWS,_0x803ffb=![],_0x4d6642={}){const _0x526dac=a66_0x3dde;if(_0x1e6ba0[_0x526dac(0xaa)]['length']===0x0)return _0x526dac(0xb3);const _0x2b6d45=_0x1e6ba0['columns'][_0x526dac(0x98)](_0x225866=>_0x225866[_0x526dac(0x81)]),_0x270d91=_0x1e6ba0[_0x526dac(0xa3)][_0x526dac(0x98)](_0x42aa36=>simplifyType(_0x42aa36[_0x526dac(0xb4)])),_0x1385ec=_0x1e6ba0['data'][_0x526dac(0x97)](0x0,_0x1e3dae),_0x864b12=_0x1e6ba0[_0x526dac(0xaa)][_0x526dac(0xa6)],_0x1e01e5=_0x864b12>_0x1e3dae,_0x40ec19=[],_0xc6a865=getTerminalWidth(),_0x38e0f4=_0xc6a865!==Infinity,_0x1deead=0x32;let _0x201d44=_0x2b6d45[_0x526dac(0x98)]((_0x50580a,_0x2b77f6)=>{const _0x1dbe81=_0x526dac,_0x386712=stringWidth(_0x270d91[_0x2b77f6]),_0x29f420=Math[_0x1dbe81(0x88)](..._0x1385ec['map'](_0xa3bd4f=>{const _0x380949=_0xa3bd4f[_0x50580a];return stringWidth(formatValue(_0x380949));})),_0x49c6ad=Math[_0x1dbe81(0x88)](stringWidth(_0x50580a),_0x386712,_0x29f420);return _0x803ffb?_0x49c6ad:Math[_0x1dbe81(0x99)](_0x49c6ad,_0x1deead);});if(_0x38e0f4&&!_0x803ffb&&_0x2b6d45[_0x526dac(0xa6)]>0x0){const _0xff208c=_0xa893d6=>{let _0x41b834=0x1;for(const _0x149245 of _0xa893d6){_0x41b834+=_0x149245+0x3;}return _0x41b834+0x1;};let _0x59e789=_0xff208c(_0x201d44);if(_0x59e789>_0xc6a865){const _0x520516=0x3;for(let _0x3be833=_0x201d44['length']-0x1;_0x3be833>=0x0;_0x3be833--){_0x59e789=_0xff208c(_0x201d44);if(_0x59e789<=_0xc6a865)break;const _0x1d55d8=_0x201d44[_0x3be833],_0x18fe1a=_0x59e789-_0xc6a865,_0x794953=_0x1d55d8-_0x520516,_0x2287dc=Math[_0x526dac(0x99)](_0x18fe1a,_0x794953);_0x2287dc>0x0&&(_0x201d44[_0x3be833]=_0x1d55d8-_0x2287dc);}}}const _0x58031a=_0x2b6d45,_0x244636=_0x270d91,_0x112f1c=_0x201d44,_0x34ed2d=_0x201d44;_0x40ec19['push'](colorBorder('┌'+_0x34ed2d[_0x526dac(0x98)](_0x4a1b34=>'─'[_0x526dac(0xa5)](_0x4a1b34+0x2))['join']('┬')+'┐',_0x4d6642));const _0x4189da=_0x58031a[_0x526dac(0x98)]((_0x425625,_0x4259aa)=>centerAlign(_0x425625,_0x112f1c[_0x4259aa]));_0x40ec19[_0x526dac(0x93)](colorBorder('│',_0x4d6642)+'\x20'+_0x4189da[_0x526dac(0x9d)]('\x20'+colorBorder('│',_0x4d6642)+'\x20')+'\x20'+colorBorder('│',_0x4d6642));const _0x53fac5=_0x244636[_0x526dac(0x98)]((_0x402497,_0x5291d7)=>colorType(centerAlign(_0x402497,_0x112f1c[_0x5291d7]),_0x4d6642));_0x40ec19['push'](colorBorder('│',_0x4d6642)+'\x20'+_0x53fac5[_0x526dac(0x9d)]('\x20'+colorBorder('│',_0x4d6642)+'\x20')+'\x20'+colorBorder('│',_0x4d6642)),_0x40ec19['push'](colorBorder('├'+_0x34ed2d[_0x526dac(0x98)](_0x34a273=>'─'[_0x526dac(0xa5)](_0x34a273+0x2))[_0x526dac(0x9d)]('┼')+'┤',_0x4d6642));const _0x5f33ff=(_0x468949,_0x2b528)=>{const _0x4a409c=_0x526dac,_0x4078f0=stringWidth(_0x468949);if(_0x4078f0<=_0x2b528)return _0x468949;let _0x5cee4d=_0x468949;while(stringWidth(_0x5cee4d+'…')>_0x2b528&&_0x5cee4d[_0x4a409c(0xa6)]>0x0){_0x5cee4d=_0x5cee4d[_0x4a409c(0x97)](0x0,-0x1);}return _0x5cee4d+'…';};_0x1385ec['forEach'](_0x230b4c=>{const _0x28251b=_0x526dac,_0x25f0cf=_0x2b6d45[_0x28251b(0x98)]((_0x59e9f4,_0x4a3710)=>{const _0x9a0ddc=_0x28251b,_0x226ce1=_0x230b4c[_0x59e9f4],_0x49b102=formatValue(_0x226ce1),_0x274212=_0x112f1c[_0x4a3710],_0x5be0a0=_0x5f33ff(_0x49b102,_0x274212),_0x263aeb=typeof _0x226ce1===_0x9a0ddc(0x95)||typeof _0x226ce1===_0x9a0ddc(0x8e)&&/^-?\d+$/['test'](_0x226ce1);return _0x263aeb?padStart(_0x5be0a0,_0x274212):padEnd(_0x5be0a0,_0x274212);});_0x40ec19['push'](colorBorder('│',_0x4d6642)+'\x20'+_0x25f0cf['join']('\x20'+colorBorder('│',_0x4d6642)+'\x20')+'\x20'+colorBorder('│',_0x4d6642));});const _0xeb5861=_0x34ed2d[_0x526dac(0x86)]((_0x5aca31,_0x340cab)=>_0x5aca31+_0x340cab+0x3,-0x1);_0x40ec19[_0x526dac(0x93)](colorBorder('├'+_0x34ed2d[_0x526dac(0x98)](_0x38c76b=>'─'[_0x526dac(0xa5)](_0x38c76b+0x2))[_0x526dac(0x9d)]('┴')+'┤',_0x4d6642));let _0x2d0cfe;_0x1e01e5?_0x2d0cfe=_0x864b12+_0x526dac(0xb0)+_0x1e3dae+_0x526dac(0xa8):_0x2d0cfe=_0x864b12+'\x20row'+(_0x864b12===0x1?'':'s');const _0x117ecf=_0x2d0cfe[_0x526dac(0xaf)](_0xeb5861-0x2);return _0x40ec19[_0x526dac(0x93)](colorBorder('│',_0x4d6642)+'\x20'+_0x117ecf+'\x20'+colorBorder('│',_0x4d6642)),_0x40ec19[_0x526dac(0x93)](colorBorder('└'+'─'[_0x526dac(0xa5)](_0xeb5861)+'┘',_0x4d6642)),_0x40ec19[_0x526dac(0x9d)]('\x0a');}function simplifyType(_0x4fea23){const _0x14ba3d=a66_0x3dde,_0x641036={'varchar':'string','bigint':_0x14ba3d(0x92),'integer':_0x14ba3d(0x8a),'double':_0x14ba3d(0x9c),'boolean':'bool','date':_0x14ba3d(0xb2),'timestamp':'timestamp','array':_0x14ba3d(0x85),'map':_0x14ba3d(0x98),'row':_0x14ba3d(0xa9)},_0x1620d9=_0x4fea23[_0x14ba3d(0xae)]();for(const [_0x44a62b,_0x189b5e]of Object[_0x14ba3d(0x89)](_0x641036)){if(_0x1620d9[_0x14ba3d(0x9f)](_0x44a62b))return _0x189b5e;}return _0x4fea23[_0x14ba3d(0xa6)]>0xa?_0x4fea23[_0x14ba3d(0xa1)](0x0,0xa):_0x4fea23;}function a66_0x3dde(_0x54ebc6,_0x13e2e2){const _0x3368fb=a66_0x3368();return a66_0x3dde=function(_0x3ddee7,_0x1725a9){_0x3ddee7=_0x3ddee7-0x80;let _0x5210f8=_0x3368fb[_0x3ddee7];return _0x5210f8;},a66_0x3dde(_0x54ebc6,_0x13e2e2);}export function formatAsJSON(_0x35ddca,_0x803e63={}){const _0x59893d=a66_0x3dde;if(_0x35ddca[_0x59893d(0xaa)]['length']===0x0)return'[]';if(shouldUseColor(_0x803e63))return colorizeJSON(_0x35ddca[_0x59893d(0xaa)],_0x803e63);const _0x22edf3=_0x35ddca['data'][_0x59893d(0x98)](_0x1ab0f7=>'\x20\x20'+JSON[_0x59893d(0x91)](_0x1ab0f7));return'[\x0a'+_0x22edf3[_0x59893d(0x9d)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x337824,_0x11a85e={}){const _0x57b4e4=a66_0x3dde;if(_0x337824['data'][_0x57b4e4(0xa6)]===0x0)return'';if(shouldUseColor(_0x11a85e))return _0x337824[_0x57b4e4(0xaa)]['map'](_0xbb02cd=>colorizeJSONCompact(_0xbb02cd,_0x11a85e))['join']('\x0a');return _0x337824[_0x57b4e4(0xaa)][_0x57b4e4(0x98)](_0x49e5cc=>JSON[_0x57b4e4(0x91)](_0x49e5cc))['join']('\x0a');}export function formatAsTSV(_0x4e517f){const _0x1f4541=a66_0x3dde;if(_0x4e517f[_0x1f4541(0xaa)]['length']===0x0)return'';const _0x49ffd7=[],_0x2f3333=_0x4e517f[_0x1f4541(0xa3)][_0x1f4541(0x98)](_0x14c70b=>_0x14c70b[_0x1f4541(0x81)]);return _0x49ffd7[_0x1f4541(0x93)](_0x2f3333[_0x1f4541(0x9d)]('\x09')),_0x4e517f[_0x1f4541(0xaa)][_0x1f4541(0x94)](_0x35b29e=>{const _0x292582=_0x1f4541,_0x7c21c8=_0x2f3333['map'](_0x2b41b0=>{const _0x4bf4f6=_0x35b29e[_0x2b41b0];return formatValueForTSV(_0x4bf4f6);});_0x49ffd7[_0x292582(0x93)](_0x7c21c8['join']('\x09'));}),_0x49ffd7[_0x1f4541(0x9d)]('\x0a');}function formatValue(_0x55c01a){const _0x92af12=a66_0x3dde;if(_0x55c01a===null||_0x55c01a===undefined)return'';if(typeof _0x55c01a===_0x92af12(0x8e)){const _0x5747b7=_0x55c01a[_0x92af12(0xb7)](/\n/g,'\x5cn')[_0x92af12(0xb7)](/\r/g,'\x5cr')[_0x92af12(0xb7)](/\t/g,'\x5ct');return _0x5747b7;}if(typeof _0x55c01a==='number')return String(_0x55c01a);if(typeof _0x55c01a===_0x92af12(0xb6))return _0x55c01a?'true':_0x92af12(0x9a);if(_0x55c01a instanceof Date)return _0x55c01a[_0x92af12(0x90)]();if(typeof _0x55c01a===_0x92af12(0x9e))return JSON['stringify'](_0x55c01a);return String(_0x55c01a);}function formatValueForTSV(_0x595fc6){const _0xf8a8=a66_0x3dde;if(_0x595fc6===null||_0x595fc6===undefined)return'';if(typeof _0x595fc6===_0xf8a8(0x8e))return _0x595fc6['replace'](/\t/g,'\x5ct')[_0xf8a8(0xb7)](/\n/g,'\x5cn');if(typeof _0x595fc6===_0xf8a8(0x95)||typeof _0x595fc6===_0xf8a8(0xb6))return String(_0x595fc6);if(_0x595fc6 instanceof Date)return _0x595fc6[_0xf8a8(0x90)]();if(typeof _0x595fc6===_0xf8a8(0x9e))return JSON[_0xf8a8(0x91)](_0x595fc6);return String(_0x595fc6);}export function formatQueryResult(_0xcf3cec,_0x526ad9){const _0x279613=a66_0x3dde;switch(_0x526ad9){case'table':return formatAsTable(_0xcf3cec);case _0x279613(0x84):return formatAsJSON(_0xcf3cec);case _0x279613(0x80):return formatAsJSONL(_0xcf3cec);case'tsv':return formatAsTSV(_0xcf3cec);default:return formatAsJSON(_0xcf3cec);}}export function formatBytes(_0xdf62e6){const _0xa65fe=a66_0x3dde;if(_0xdf62e6===0x0)return _0xa65fe(0x8d);const _0x22626d=['B','KB','MB','GB','TB'],_0x26d6df=0x400,_0x4d8cd5=Math[_0xa65fe(0x87)](Math[_0xa65fe(0x83)](_0xdf62e6)/Math['log'](_0x26d6df)),_0x1f6e38=_0xdf62e6/Math[_0xa65fe(0x8c)](_0x26d6df,_0x4d8cd5),_0x4c9436=_0x1f6e38>=0xa?0x1:0x2;return _0x1f6e38[_0xa65fe(0x9b)](_0x4c9436)+'\x20'+_0x22626d[_0x4d8cd5];}export function formatRows(_0x5483a6){const _0x3d3e32=a66_0x3dde;if(_0x5483a6==null)return'-';if(_0x5483a6===0x0)return'0';if(_0x5483a6<0x3e8)return _0x5483a6[_0x3d3e32(0xab)]();const _0x395b19=['','K','M','B','T'],_0x5100a7=0x3e8,_0x1374bf=Math[_0x3d3e32(0x87)](Math[_0x3d3e32(0x83)](_0x5483a6)/Math[_0x3d3e32(0x83)](_0x5100a7)),_0x165a22=_0x5483a6/Math[_0x3d3e32(0x8c)](_0x5100a7,_0x1374bf),_0x5475db=_0x165a22>=0xa?0x1:0x2;return''+_0x165a22[_0x3d3e32(0x9b)](_0x5475db)+_0x395b19[_0x1374bf];}
|
|
1
|
+
(function(_0x2b8124,_0x29dd26){const _0x3230bd=a66_0x4b5c,_0x9b45db=_0x2b8124();while(!![]){try{const _0x560a2a=-parseInt(_0x3230bd(0xca))/0x1+parseInt(_0x3230bd(0xea))/0x2+parseInt(_0x3230bd(0xe8))/0x3+parseInt(_0x3230bd(0xcb))/0x4+-parseInt(_0x3230bd(0xc6))/0x5+-parseInt(_0x3230bd(0xd9))/0x6*(-parseInt(_0x3230bd(0xd1))/0x7)+-parseInt(_0x3230bd(0xf1))/0x8*(parseInt(_0x3230bd(0xed))/0x9);if(_0x560a2a===_0x29dd26)break;else _0x9b45db['push'](_0x9b45db['shift']());}catch(_0xe39fe8){_0x9b45db['push'](_0x9b45db['shift']());}}}(a66_0x402b,0x2cf87));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){return process['stdout']['columns']||Infinity;}function a66_0x4b5c(_0x5d5734,_0x61a34){const _0x402bf2=a66_0x402b();return a66_0x4b5c=function(_0x4b5c3e,_0x372700){_0x4b5c3e=_0x4b5c3e-0xbf;let _0x1b9ddc=_0x402bf2[_0x4b5c3e];return _0x1b9ddc;},a66_0x4b5c(_0x5d5734,_0x61a34);}function a66_0x402b(){const _0x59a804=['\x20row','605280NhZOtW','type','replace','join','174868oYdytV','1447404KgAPXE','map','date','table','entries','json','84259tzyvwf','jsonl','true','floor','\x20shown)','toISOString','padEnd','long','30LUQAyH','int','bool','No\x20rows\x20returned','tsv','test','log','boolean','row','min','timestamp','\x20rows\x20(','length','0\x20B','max','142008dtYSYW','repeat','418916TzYfaY','toFixed','pow','9wQErgJ','substring','reduce','data','1589656oKKNgm','string','stringify','forEach','push','array','columns','toString','double','false'];a66_0x402b=function(){return _0x59a804;};return a66_0x402b();}export function formatAsTable(_0x27ca73,_0x150483=DEFAULT_MAX_DISPLAY_ROWS,_0x23d152=![],_0x39e0f0={}){const _0x341e4b=a66_0x4b5c;if(_0x27ca73[_0x341e4b(0xf0)]['length']===0x0)return _0x341e4b(0xdc);const _0x42c948=_0x27ca73[_0x341e4b(0xc1)][_0x341e4b(0xcc)](_0xa9d6ac=>_0xa9d6ac['name']),_0x45654a=_0x27ca73[_0x341e4b(0xc1)][_0x341e4b(0xcc)](_0x2fe0bc=>simplifyType(_0x2fe0bc[_0x341e4b(0xc7)])),_0x5677d3=_0x27ca73[_0x341e4b(0xf0)]['slice'](0x0,_0x150483),_0x30765b=_0x27ca73[_0x341e4b(0xf0)][_0x341e4b(0xe5)],_0xe967bb=_0x30765b>_0x150483,_0x14145d=[],_0x11e32e=getTerminalWidth(),_0x3ea038=_0x11e32e!==Infinity,_0x3e7995=0x32;let _0x4b025c=_0x42c948[_0x341e4b(0xcc)]((_0x1774db,_0x5199f3)=>{const _0x474069=_0x341e4b,_0x31e9b3=stringWidth(_0x45654a[_0x5199f3]),_0x502fba=Math[_0x474069(0xe7)](..._0x5677d3[_0x474069(0xcc)](_0x1b4e0d=>{const _0x4b52cb=_0x1b4e0d[_0x1774db];return stringWidth(formatValue(_0x4b52cb));})),_0x42d68d=Math[_0x474069(0xe7)](stringWidth(_0x1774db),_0x31e9b3,_0x502fba);return _0x23d152?_0x42d68d:Math[_0x474069(0xe2)](_0x42d68d,_0x3e7995);});if(_0x3ea038&&!_0x23d152&&_0x42c948[_0x341e4b(0xe5)]>0x0){const _0x52546b=_0x22dcec=>{let _0x386ab4=0x1;for(const _0xddc0a6 of _0x22dcec){_0x386ab4+=_0xddc0a6+0x3;}return _0x386ab4+0x1;};let _0x1d5650=_0x52546b(_0x4b025c);if(_0x1d5650>_0x11e32e){const _0x52a7a2=0x3;for(let _0x584168=_0x4b025c[_0x341e4b(0xe5)]-0x1;_0x584168>=0x0;_0x584168--){_0x1d5650=_0x52546b(_0x4b025c);if(_0x1d5650<=_0x11e32e)break;const _0x4c89f9=_0x4b025c[_0x584168],_0x41f2be=_0x1d5650-_0x11e32e,_0x117dab=_0x4c89f9-_0x52a7a2,_0x30d631=Math[_0x341e4b(0xe2)](_0x41f2be,_0x117dab);_0x30d631>0x0&&(_0x4b025c[_0x584168]=_0x4c89f9-_0x30d631);}}}const _0xa2ad4e=_0x42c948,_0xcb8095=_0x45654a,_0x4313aa=_0x4b025c,_0xd4c888=_0x4b025c;_0x14145d[_0x341e4b(0xbf)](colorBorder('┌'+_0xd4c888[_0x341e4b(0xcc)](_0x5c8e01=>'─'[_0x341e4b(0xe9)](_0x5c8e01+0x2))['join']('┬')+'┐',_0x39e0f0));const _0x10c390=_0xa2ad4e[_0x341e4b(0xcc)]((_0x169913,_0x30d27e)=>centerAlign(_0x169913,_0x4313aa[_0x30d27e]));_0x14145d[_0x341e4b(0xbf)](colorBorder('│',_0x39e0f0)+'\x20'+_0x10c390['join']('\x20'+colorBorder('│',_0x39e0f0)+'\x20')+'\x20'+colorBorder('│',_0x39e0f0));const _0x22d8f9=_0xcb8095[_0x341e4b(0xcc)]((_0x37f581,_0x3a0129)=>colorType(centerAlign(_0x37f581,_0x4313aa[_0x3a0129]),_0x39e0f0));_0x14145d[_0x341e4b(0xbf)](colorBorder('│',_0x39e0f0)+'\x20'+_0x22d8f9[_0x341e4b(0xc9)]('\x20'+colorBorder('│',_0x39e0f0)+'\x20')+'\x20'+colorBorder('│',_0x39e0f0)),_0x14145d['push'](colorBorder('├'+_0xd4c888['map'](_0x42b07e=>'─'[_0x341e4b(0xe9)](_0x42b07e+0x2))[_0x341e4b(0xc9)]('┼')+'┤',_0x39e0f0));const _0x1954bc=(_0x304b56,_0xc590cf)=>{const _0x47ea56=_0x341e4b,_0x31b51a=stringWidth(_0x304b56);if(_0x31b51a<=_0xc590cf)return _0x304b56;let _0x329e3a=_0x304b56;while(stringWidth(_0x329e3a+'…')>_0xc590cf&&_0x329e3a[_0x47ea56(0xe5)]>0x0){_0x329e3a=_0x329e3a['slice'](0x0,-0x1);}return _0x329e3a+'…';};_0x5677d3[_0x341e4b(0xf4)](_0x50e462=>{const _0x5c35e7=_0x341e4b,_0x16a395=_0x42c948[_0x5c35e7(0xcc)]((_0x27f800,_0x269f1b)=>{const _0x4bf6c9=_0x5c35e7,_0x44c9fd=_0x50e462[_0x27f800],_0x55c406=formatValue(_0x44c9fd),_0x56b804=_0x4313aa[_0x269f1b],_0x326a3f=_0x1954bc(_0x55c406,_0x56b804),_0x1892e5=typeof _0x44c9fd==='number'||typeof _0x44c9fd===_0x4bf6c9(0xf2)&&/^-?\d+$/[_0x4bf6c9(0xde)](_0x44c9fd);return _0x1892e5?padStart(_0x326a3f,_0x56b804):padEnd(_0x326a3f,_0x56b804);});_0x14145d[_0x5c35e7(0xbf)](colorBorder('│',_0x39e0f0)+'\x20'+_0x16a395[_0x5c35e7(0xc9)]('\x20'+colorBorder('│',_0x39e0f0)+'\x20')+'\x20'+colorBorder('│',_0x39e0f0));});const _0x541d4e=_0xd4c888[_0x341e4b(0xef)]((_0x573812,_0xf866f3)=>_0x573812+_0xf866f3+0x3,-0x1);_0x14145d[_0x341e4b(0xbf)](colorBorder('├'+_0xd4c888['map'](_0x4d1c1b=>'─'['repeat'](_0x4d1c1b+0x2))[_0x341e4b(0xc9)]('┴')+'┤',_0x39e0f0));let _0x3007b6;_0xe967bb?_0x3007b6=_0x30765b+_0x341e4b(0xe4)+_0x150483+_0x341e4b(0xd5):_0x3007b6=_0x30765b+_0x341e4b(0xc5)+(_0x30765b===0x1?'':'s');const _0x43e867=_0x3007b6[_0x341e4b(0xd7)](_0x541d4e-0x2);return _0x14145d['push'](colorBorder('│',_0x39e0f0)+'\x20'+_0x43e867+'\x20'+colorBorder('│',_0x39e0f0)),_0x14145d[_0x341e4b(0xbf)](colorBorder('└'+'─'[_0x341e4b(0xe9)](_0x541d4e)+'┘',_0x39e0f0)),_0x14145d[_0x341e4b(0xc9)]('\x0a');}function simplifyType(_0xe922bd){const _0xe8f755=a66_0x4b5c,_0x584a68={'varchar':_0xe8f755(0xf2),'bigint':_0xe8f755(0xd8),'integer':_0xe8f755(0xda),'double':_0xe8f755(0xc3),'boolean':_0xe8f755(0xdb),'date':_0xe8f755(0xcd),'timestamp':_0xe8f755(0xe3),'array':_0xe8f755(0xc0),'map':_0xe8f755(0xcc),'row':_0xe8f755(0xe1)},_0x427cf1=_0xe922bd['toLowerCase']();for(const [_0x5664b4,_0x2eb36e]of Object[_0xe8f755(0xcf)](_0x584a68)){if(_0x427cf1['startsWith'](_0x5664b4))return _0x2eb36e;}return _0xe922bd['length']>0xa?_0xe922bd[_0xe8f755(0xee)](0x0,0xa):_0xe922bd;}export function formatAsJSON(_0x2b597f,_0x45e588={}){const _0xa89566=a66_0x4b5c;if(_0x2b597f[_0xa89566(0xf0)]['length']===0x0)return'[]';if(shouldUseColor(_0x45e588))return colorizeJSON(_0x2b597f[_0xa89566(0xf0)],_0x45e588);const _0x4bf933=_0x2b597f[_0xa89566(0xf0)]['map'](_0x15f55e=>'\x20\x20'+JSON['stringify'](_0x15f55e));return'[\x0a'+_0x4bf933['join'](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x397ac7,_0x2d5ed8={}){const _0x1c683d=a66_0x4b5c;if(_0x397ac7[_0x1c683d(0xf0)][_0x1c683d(0xe5)]===0x0)return'';if(shouldUseColor(_0x2d5ed8))return _0x397ac7[_0x1c683d(0xf0)][_0x1c683d(0xcc)](_0x1f2805=>colorizeJSONCompact(_0x1f2805,_0x2d5ed8))[_0x1c683d(0xc9)]('\x0a');return _0x397ac7[_0x1c683d(0xf0)][_0x1c683d(0xcc)](_0xc80125=>JSON[_0x1c683d(0xf3)](_0xc80125))['join']('\x0a');}export function formatAsTSV(_0x46f65d){const _0x5e0149=a66_0x4b5c;if(_0x46f65d[_0x5e0149(0xf0)][_0x5e0149(0xe5)]===0x0)return'';const _0x54adda=[],_0x324dc6=_0x46f65d[_0x5e0149(0xc1)]['map'](_0x5812d3=>_0x5812d3['name']);return _0x54adda[_0x5e0149(0xbf)](_0x324dc6[_0x5e0149(0xc9)]('\x09')),_0x46f65d[_0x5e0149(0xf0)][_0x5e0149(0xf4)](_0x46a7f1=>{const _0x326de9=_0x5e0149,_0xf3a9b4=_0x324dc6[_0x326de9(0xcc)](_0x3cba24=>{const _0x1ed6d7=_0x46a7f1[_0x3cba24];return formatValueForTSV(_0x1ed6d7);});_0x54adda[_0x326de9(0xbf)](_0xf3a9b4[_0x326de9(0xc9)]('\x09'));}),_0x54adda['join']('\x0a');}function formatValue(_0xe4032e){const _0x25d061=a66_0x4b5c;if(_0xe4032e===null||_0xe4032e===undefined)return'';if(typeof _0xe4032e===_0x25d061(0xf2)){const _0x28385d=_0xe4032e['replace'](/\n/g,'\x5cn')[_0x25d061(0xc8)](/\r/g,'\x5cr')[_0x25d061(0xc8)](/\t/g,'\x5ct');return _0x28385d;}if(typeof _0xe4032e==='number')return String(_0xe4032e);if(typeof _0xe4032e===_0x25d061(0xe0))return _0xe4032e?_0x25d061(0xd3):_0x25d061(0xc4);if(_0xe4032e instanceof Date)return _0xe4032e[_0x25d061(0xd6)]();if(typeof _0xe4032e==='object')return JSON[_0x25d061(0xf3)](_0xe4032e);return String(_0xe4032e);}function formatValueForTSV(_0x37627c){const _0x570ce0=a66_0x4b5c;if(_0x37627c===null||_0x37627c===undefined)return'';if(typeof _0x37627c==='string')return _0x37627c[_0x570ce0(0xc8)](/\t/g,'\x5ct')[_0x570ce0(0xc8)](/\n/g,'\x5cn');if(typeof _0x37627c==='number'||typeof _0x37627c===_0x570ce0(0xe0))return String(_0x37627c);if(_0x37627c instanceof Date)return _0x37627c[_0x570ce0(0xd6)]();if(typeof _0x37627c==='object')return JSON['stringify'](_0x37627c);return String(_0x37627c);}export function formatQueryResult(_0x5d2176,_0x45dae9){const _0x488741=a66_0x4b5c;switch(_0x45dae9){case _0x488741(0xce):return formatAsTable(_0x5d2176);case _0x488741(0xd0):return formatAsJSON(_0x5d2176);case _0x488741(0xd2):return formatAsJSONL(_0x5d2176);case _0x488741(0xdd):return formatAsTSV(_0x5d2176);default:return formatAsJSON(_0x5d2176);}}export function formatBytes(_0x40715e){const _0x627ec=a66_0x4b5c;if(_0x40715e===0x0)return _0x627ec(0xe6);const _0x3ca535=['B','KB','MB','GB','TB'],_0x13e356=0x400,_0x3989c9=Math[_0x627ec(0xd4)](Math[_0x627ec(0xdf)](_0x40715e)/Math[_0x627ec(0xdf)](_0x13e356)),_0x3ba73e=_0x40715e/Math[_0x627ec(0xec)](_0x13e356,_0x3989c9),_0x5406d0=_0x3ba73e>=0xa?0x1:0x2;return _0x3ba73e[_0x627ec(0xeb)](_0x5406d0)+'\x20'+_0x3ca535[_0x3989c9];}export function formatRows(_0x25d8cc){const _0x14610d=a66_0x4b5c;if(_0x25d8cc==null)return'-';if(_0x25d8cc===0x0)return'0';if(_0x25d8cc<0x3e8)return _0x25d8cc[_0x14610d(0xc2)]();const _0x186b32=['','K','M','B','T'],_0x337787=0x3e8,_0x254f4e=Math[_0x14610d(0xd4)](Math[_0x14610d(0xdf)](_0x25d8cc)/Math[_0x14610d(0xdf)](_0x337787)),_0x1d4ce9=_0x25d8cc/Math[_0x14610d(0xec)](_0x337787,_0x254f4e),_0x27713c=_0x1d4ce9>=0xa?0x1:0x2;return''+_0x1d4ce9[_0x14610d(0xeb)](_0x27713c)+_0x186b32[_0x254f4e];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59614b,_0x296cee){const _0x343e6e=a67_0x20ab,_0x4a5db8=_0x59614b();while(!![]){try{const _0x41871d=-parseInt(_0x343e6e(0x1c8))/0x1+parseInt(_0x343e6e(0x1d0))/0x2*(-parseInt(_0x343e6e(0x1d1))/0x3)+parseInt(_0x343e6e(0x1d7))/0x4*(-parseInt(_0x343e6e(0x1ce))/0x5)+-parseInt(_0x343e6e(0x1d3))/0x6*(parseInt(_0x343e6e(0x1c7))/0x7)+parseInt(_0x343e6e(0x1dc))/0x8+parseInt(_0x343e6e(0x1d9))/0x9*(-parseInt(_0x343e6e(0x1d2))/0xa)+-parseInt(_0x343e6e(0x1dd))/0xb*(-parseInt(_0x343e6e(0x1cd))/0xc);if(_0x41871d===_0x296cee)break;else _0x4a5db8['push'](_0x4a5db8['shift']());}catch(_0x1cfddc){_0x4a5db8['push'](_0x4a5db8['shift']());}}}(a67_0x5cd7,0xbaf6b));import{readFile}from'fs/promises';function a67_0x5cd7(){const _0xc38a96=['File\x20not\x20found:\x20','12135128NHFmkM','66ErkwwR','3114475BhDFQz','1066670tjbsFO','message','Permission\x20denied\x20reading\x20file:\x20','parse','EACCES','5097852puIzAq','9980oDUEvL','INTERNAL','138266IQDbBY','3tMrbzW','5556180SjJTUp','6kAZFwG','Invalid\x20JSON\x20string:\x20','ENOENT','\x27:\x20','2332xNpepC','code','9NYUEHr','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.'];a67_0x5cd7=function(){return _0xc38a96;};return a67_0x5cd7();}function a67_0x20ab(_0x49a51a,_0x5c298c){const _0x5cd717=a67_0x5cd7();return a67_0x20ab=function(_0x20abb1,_0x360e69){_0x20abb1=_0x20abb1-0x1c7;let _0x1ef4f1=_0x5cd717[_0x20abb1];return _0x1ef4f1;},a67_0x20ab(_0x49a51a,_0x5c298c);}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x130b83,_0x4b8e46){const _0x4419d3=a67_0x20ab;try{if(_0x4b8e46){const _0x246d49=await readFile(_0x130b83,'utf-8');try{return JSON['parse'](_0x246d49);}catch(_0x38a0fc){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x130b83+_0x4419d3(0x1d6)+(_0x38a0fc instanceof Error?_0x38a0fc[_0x4419d3(0x1c9)]:String(_0x38a0fc)));}}else try{return JSON[_0x4419d3(0x1cb)](_0x130b83);}catch(_0x159910){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4419d3(0x1d4)+(_0x159910 instanceof Error?_0x159910[_0x4419d3(0x1c9)]:String(_0x159910)));}}catch(_0x32f13b){if(_0x32f13b instanceof SDKError)throw _0x32f13b;if(_0x32f13b instanceof Error&&_0x4419d3(0x1d8)in _0x32f13b){const _0x5b6a55=_0x32f13b;if(_0x5b6a55[_0x4419d3(0x1d8)]===_0x4419d3(0x1d5))throw new SDKError(ErrorCode['NOT_FOUND'],_0x4419d3(0x1db)+_0x130b83);else{if(_0x5b6a55[_0x4419d3(0x1d8)]===_0x4419d3(0x1cc))throw new SDKError(ErrorCode['PERMISSION_DENIED'],_0x4419d3(0x1ca)+_0x130b83);}}throw new SDKError(ErrorCode[_0x4419d3(0x1cf)],'Failed\x20to\x20load\x20JSON:\x20'+(_0x32f13b instanceof Error?_0x32f13b[_0x4419d3(0x1c9)]:String(_0x32f13b)));}}export async function loadJSONFromOptions(_0x1dba99,_0x204135){const _0x3ff8d8=a67_0x20ab;if(_0x1dba99&&_0x204135)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x3ff8d8(0x1da));if(_0x1dba99)return await loadJSON(_0x1dba99,![]);if(_0x204135)return await loadJSON(_0x204135,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0x76dd68=a68_0x109d;(function(_0x1825d1,_0x5f55dd){const _0x3cdd9d=a68_0x109d,_0x4231aa=_0x1825d1();while(!![]){try{const _0x42b654=-parseInt(_0x3cdd9d(0x1bd))/0x1*(-parseInt(_0x3cdd9d(0x1c3))/0x2)+-parseInt(_0x3cdd9d(0x1bf))/0x3*(parseInt(_0x3cdd9d(0x1c0))/0x4)+parseInt(_0x3cdd9d(0x1be))/0x5+-parseInt(_0x3cdd9d(0x1bb))/0x6+parseInt(_0x3cdd9d(0x1c9))/0x7*(-parseInt(_0x3cdd9d(0x1c6))/0x8)+-parseInt(_0x3cdd9d(0x1c8))/0x9*(-parseInt(_0x3cdd9d(0x1c1))/0xa)+parseInt(_0x3cdd9d(0x1c7))/0xb;if(_0x42b654===_0x5f55dd)break;else _0x4231aa['push'](_0x4231aa['shift']());}catch(_0x1a5288){_0x4231aa['push'](_0x4231aa['shift']());}}}(a68_0x4147,0x3338d));function a68_0x109d(_0x357b6d,_0x1bbac7){const _0x414735=a68_0x4147();return a68_0x109d=function(_0x109d85,_0x45fd60){_0x109d85=_0x109d85-0x1bb;let _0x2df023=_0x414735[_0x109d85];return _0x2df023;},a68_0x109d(_0x357b6d,_0x1bbac7);}const MODEL_ALIASES={'haiku':a68_0x76dd68(0x1bc),'sonnet':a68_0x76dd68(0x1c5)};export function extractModelAlias(_0x16360){const _0x4723c1=a68_0x76dd68,_0x490dff=_0x16360[_0x4723c1(0x1c4)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x490dff)return _0x490dff[0x1][_0x4723c1(0x1c2)]();return _0x16360;}export function resolveModelAlias(_0x42cf6b){const _0x2f5651=a68_0x76dd68;return MODEL_ALIASES[_0x42cf6b[_0x2f5651(0x1c2)]()]||_0x42cf6b;}function a68_0x4147(){const _0x2309cc=['2775437xFzJkS','62418UGVAuL','claude-4.5-haiku','5806NRpWBM','1039090dBsCrR','3qGwisa','1362284OQYpId','40FgIZYQ','toLowerCase','26FYNbvs','match','claude-4.5-sonnet','8MXcMPT','3866522hlysFE','725562inVbRl'];a68_0x4147=function(){return _0x2309cc;};return a68_0x4147();}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a69_0x2679(_0x7acdce,_0x2e37a4){const _0x43210f=a69_0x4321();return a69_0x2679=function(_0x267914,_0x1e583e){_0x267914=_0x267914-0x6d;let _0x1c2d77=_0x43210f[_0x267914];return _0x1c2d77;},a69_0x2679(_0x7acdce,_0x2e37a4);}(function(_0x53ab40,_0x520389){const _0x315447=a69_0x2679,_0x1a52c3=_0x53ab40();while(!![]){try{const _0x23aeef=-parseInt(_0x315447(0x72))/0x1+parseInt(_0x315447(0x7c))/0x2*(parseInt(_0x315447(0x76))/0x3)+-parseInt(_0x315447(0x7a))/0x4+-parseInt(_0x315447(0x77))/0x5+-parseInt(_0x315447(0x79))/0x6*(-parseInt(_0x315447(0x71))/0x7)+parseInt(_0x315447(0x75))/0x8*(-parseInt(_0x315447(0x73))/0x9)+parseInt(_0x315447(0x6f))/0xa*(parseInt(_0x315447(0x6d))/0xb);if(_0x23aeef===_0x520389)break;else _0x1a52c3['push'](_0x1a52c3['shift']());}catch(_0x4dba6f){_0x1a52c3['push'](_0x1a52c3['shift']());}}}(a69_0x4321,0x89b55));export function validateLimitOption(_0x14f50b){const _0x4c389e=a69_0x2679;if(!Number['isInteger'](_0x14f50b))return{'isValid':![],'error':_0x4c389e(0x7b)+_0x14f50b+'.\x20Must\x20be\x20an\x20integer.'};if(_0x14f50b<=0x0)return{'isValid':![],'error':_0x4c389e(0x7b)+_0x14f50b+_0x4c389e(0x78)};return{'isValid':!![],'value':_0x14f50b};}function a69_0x4321(){const _0x160c2e=['.\x20Must\x20be\x20a\x20number.','8RgFrpA','253263ZneuRi','4633770OaTiUM','.\x20Must\x20be\x20a\x20positive\x20integer.','168ButpHK','3000252hyINpB','Invalid\x20limit\x20value:\x20','10xTssLM','4037IlwazM','number','53110gVfwCk','Invalid\x20timeout\x20value:\x20','215467lxIcoW','593579JaAyrz','3587949wCKAft'];a69_0x4321=function(){return _0x160c2e;};return a69_0x4321();}export function validateTimeoutOption(_0x297ffe,_0x366269=0x1e){const _0x657efc=a69_0x2679;if(_0x297ffe===undefined)return{'isValid':!![],'value':_0x366269};const _0x4c304f=typeof _0x297ffe===_0x657efc(0x6e)?_0x297ffe:parseFloat(_0x297ffe);if(isNaN(_0x4c304f))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x297ffe+_0x657efc(0x74)};if(_0x4c304f<=0x0)return{'isValid':![],'error':_0x657efc(0x70)+_0x4c304f+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x4c304f};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58878e,_0x54c951){const _0xb34335=a70_0x5102,_0x169cab=_0x58878e();while(!![]){try{const _0x58d3dd=parseInt(_0xb34335(0x90))/0x1+-parseInt(_0xb34335(0x93))/0x2*(parseInt(_0xb34335(0x94))/0x3)+-parseInt(_0xb34335(0x82))/0x4*(-parseInt(_0xb34335(0x85))/0x5)+-parseInt(_0xb34335(0x8c))/0x6*(parseInt(_0xb34335(0x86))/0x7)+parseInt(_0xb34335(0x8f))/0x8*(parseInt(_0xb34335(0x84))/0x9)+-parseInt(_0xb34335(0x92))/0xa+-parseInt(_0xb34335(0x8a))/0xb*(parseInt(_0xb34335(0x88))/0xc);if(_0x58d3dd===_0x54c951)break;else _0x169cab['push'](_0x169cab['shift']());}catch(_0x1a2f35){_0x169cab['push'](_0x169cab['shift']());}}}(a70_0x1e40,0x29eb6));import{createServer}from'node:net';export async function isPortAvailable(_0x546c86){return new Promise(_0x4cef77=>{const _0xdbccd8=a70_0x5102,_0x21ee41=createServer();_0x21ee41[_0xdbccd8(0x87)](_0xdbccd8(0x8e),_0x2fb817=>{const _0x12ccd9=_0xdbccd8;_0x2fb817[_0x12ccd9(0x8d)]==='EADDRINUSE'?_0x4cef77(![]):_0x4cef77(![]);}),_0x21ee41[_0xdbccd8(0x87)](_0xdbccd8(0x91),()=>{const _0x13b226=_0xdbccd8;_0x21ee41[_0x13b226(0x8b)](),_0x4cef77(!![]);}),_0x21ee41['listen'](_0x546c86,_0xdbccd8(0x83));});}function a70_0x5102(_0x5ea0cd,_0x469764){const _0x1e4065=a70_0x1e40();return a70_0x5102=function(_0x510257,_0x5a02bb){_0x510257=_0x510257-0x82;let _0x224c1f=_0x1e4065[_0x510257];return _0x224c1f;},a70_0x5102(_0x5ea0cd,_0x469764);}function a70_0x1e40(){const _0x3ebbec=['431130vggmlI','22YPgjvp','77619GHwqRD','124684XDZgZi','0.0.0.0','6093NyICOb','45PXqSFY','7namEFr','once','5544CCWKVN','No\x20available\x20port\x20found\x20between\x20','4114AsQxPf','close','180300EJpjwz','code','error','3832tyUaiH','97434UbmeHO','listening'];a70_0x1e40=function(){return _0x3ebbec;};return a70_0x1e40();}export async function findAvailablePort(_0x15fe1d=0xfa0,_0x539968=0x64){const _0x85303a=a70_0x5102;for(let _0x251272=0x0;_0x251272<_0x539968;_0x251272++){const _0x832e19=_0x15fe1d+_0x251272;if(await isPortAvailable(_0x832e19))return _0x832e19;}throw new Error(_0x85303a(0x89)+_0x15fe1d+'\x20and\x20'+(_0x15fe1d+_0x539968-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a71_0x1d65(_0x5d7f93,_0x1dfa0e){const _0x2f3641=a71_0x2f36();return a71_0x1d65=function(_0x1d65a1,_0x54694d){_0x1d65a1=_0x1d65a1-0x105;let _0x3d263e=_0x2f3641[_0x1d65a1];return _0x3d263e;},a71_0x1d65(_0x5d7f93,_0x1dfa0e);}const a71_0x1f283f=a71_0x1d65;(function(_0x4be267,_0x509dc3){const _0x4aae91=a71_0x1d65,_0x5071d7=_0x4be267();while(!![]){try{const _0x26b793=parseInt(_0x4aae91(0x130))/0x1+-parseInt(_0x4aae91(0x110))/0x2+-parseInt(_0x4aae91(0x111))/0x3+-parseInt(_0x4aae91(0x12b))/0x4+parseInt(_0x4aae91(0x126))/0x5*(-parseInt(_0x4aae91(0x12a))/0x6)+-parseInt(_0x4aae91(0x124))/0x7*(parseInt(_0x4aae91(0x128))/0x8)+-parseInt(_0x4aae91(0x123))/0x9*(-parseInt(_0x4aae91(0x11f))/0xa);if(_0x26b793===_0x509dc3)break;else _0x5071d7['push'](_0x5071d7['shift']());}catch(_0x37ecb7){_0x5071d7['push'](_0x5071d7['shift']());}}}(a71_0x2f36,0x466be));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a71_0x1f283f(0x116),a71_0x1f283f(0x127),'sh',a71_0x1f283f(0x10b),a71_0x1f283f(0x119),a71_0x1f283f(0x113),a71_0x1f283f(0x11b),'dash',a71_0x1f283f(0x10d),a71_0x1f283f(0x115),'nu','ion','elvish',a71_0x1f283f(0x12d)]);function getProcessInfoWindows(_0x57e34f){const _0xf5d634=a71_0x1f283f;try{const _0xe13e64=execSync(_0xf5d634(0x109)+_0x57e34f+_0xf5d634(0x118),{'encoding':_0xf5d634(0x129),'windowsHide':!![]})[_0xf5d634(0x10e)](),_0x79d87d=_0xe13e64[_0xf5d634(0x11c)]('\x0a')[_0xf5d634(0x105)](_0x2321f8=>_0x2321f8[_0xf5d634(0x10e)]());if(_0x79d87d[_0xf5d634(0x108)]<0x2)return null;const _0x511f7f=_0x79d87d[_0x79d87d['length']-0x1][_0xf5d634(0x11c)](',');if(_0x511f7f[_0xf5d634(0x108)]<0x3)return null;const _0x2e2db3=_0x511f7f[0x1]?.['trim']()||'',_0x38045a=parseInt(_0x511f7f[0x2]?.[_0xf5d634(0x10e)]()||'0',0xa);if(isNaN(_0x38045a)||!_0x2e2db3)return null;return{'pid':_0x57e34f,'ppid':_0x38045a,'comm':_0x2e2db3[_0xf5d634(0x121)](/\.exe$/i,'')};}catch(_0x536bf8){return process[_0xf5d634(0x112)][_0xf5d634(0x12c)]&&console['error'](_0xf5d634(0x131)+_0x57e34f+_0xf5d634(0x114),_0x536bf8),null;}}function getProcessInfoPosix(_0x3d197a){const _0x5239b7=a71_0x1f283f;try{const _0x422e73=execSync(_0x5239b7(0x107)+_0x3d197a+_0x5239b7(0x125),{'encoding':'utf-8'})[_0x5239b7(0x10e)](),[_0x1ece78,..._0x5e1cd7]=_0x422e73[_0x5239b7(0x11c)](/\s+/),_0x2fa734=parseInt(_0x1ece78,0xa),_0x52dae9=_0x5e1cd7[_0x5239b7(0x10a)]('\x20');if(isNaN(_0x2fa734))return null;return{'pid':_0x3d197a,'ppid':_0x2fa734,'comm':_0x52dae9};}catch(_0x20af87){return process[_0x5239b7(0x112)][_0x5239b7(0x12c)]&&console[_0x5239b7(0x106)](_0x5239b7(0x131)+_0x3d197a+_0x5239b7(0x11a),_0x20af87),null;}}function getProcessInfo(_0x81a3f0){const _0x27b138=a71_0x1f283f;if(process[_0x27b138(0x11d)]==='win32')return getProcessInfoWindows(_0x81a3f0);return getProcessInfoPosix(_0x81a3f0);}function isShell(_0xa587ca){const _0x554f8a=a71_0x1f283f,_0x363924=_0xa587ca[_0x554f8a(0x121)](/^-/,'')['split']('/')[_0x554f8a(0x10f)]()||'';return SHELL_NAMES[_0x554f8a(0x12e)](_0x363924['toLowerCase']());}let cachedShellPID;function findShellPID(){const _0x55d4b3=a71_0x1f283f;let _0x5bb8f6=process[_0x55d4b3(0x117)];const _0x2371d2=0xa;let _0x4b3bda=0x0;while(_0x4b3bda<_0x2371d2){const _0x5f3bf1=getProcessInfo(_0x5bb8f6);if(!_0x5f3bf1){process['env']['DEBUG']&&console[_0x55d4b3(0x106)](_0x55d4b3(0x11e)+_0x5bb8f6+',\x20using\x20fallback');break;}if(isShell(_0x5f3bf1['comm']))return _0x5f3bf1['pid'];if(_0x5f3bf1[_0x55d4b3(0x117)]===0x0||_0x5f3bf1[_0x55d4b3(0x117)]===0x1){if(isShell(_0x5f3bf1[_0x55d4b3(0x10c)]))return _0x5f3bf1[_0x55d4b3(0x120)];break;}_0x5bb8f6=_0x5f3bf1[_0x55d4b3(0x117)],_0x4b3bda++;}return process[_0x55d4b3(0x112)]['DEBUG']&&console[_0x55d4b3(0x106)](_0x55d4b3(0x12f)),process[_0x55d4b3(0x117)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}function a71_0x2f36(){const _0x4e4902=['kill','16045011zcghTJ','7qenleY','\x20-o\x20ppid=,comm=','95FSMiic','zsh','2001496XiCWyW','utf-8','82002rgzPxF','1836548csEoFk','DEBUG','xonsh','has','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','343177BLNaVG','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','filter','error','ps\x20-p\x20','length','wmic\x20process\x20where\x20ProcessId=','join','fish','comm','pwsh','trim','pop','782598XIfkKH','1431642ABHlIt','env','tcsh','\x20on\x20Windows:','powershell','bash','ppid','\x20get\x20ParentProcessId,Name\x20/format:csv','ksh','\x20on\x20POSIX:','csh','split','platform','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','10BdBdJV','pid','replace'];a71_0x2f36=function(){return _0x4e4902;};return a71_0x2f36();}export function isProcessRunning(_0x12d3da){const _0x5b4b01=a71_0x1f283f;try{return process[_0x5b4b01(0x122)](_0x12d3da,0x0),!![];}catch{return![];}}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x556544,_0x4cac6c){const _0x6bcc00=a72_0x5bae,_0x3a3cea=_0x556544();while(!![]){try{const _0x45bb1c=-parseInt(_0x6bcc00(0x1ca))/0x1*(parseInt(_0x6bcc00(0x1ba))/0x2)+parseInt(_0x6bcc00(0x1c9))/0x3*(-parseInt(_0x6bcc00(0x1c7))/0x4)+-parseInt(_0x6bcc00(0x1bf))/0x5*(parseInt(_0x6bcc00(0x1be))/0x6)+parseInt(_0x6bcc00(0x1c1))/0x7*(-parseInt(_0x6bcc00(0x1c6))/0x8)+parseInt(_0x6bcc00(0x1b8))/0x9*(parseInt(_0x6bcc00(0x1c3))/0xa)+parseInt(_0x6bcc00(0x1c5))/0xb+parseInt(_0x6bcc00(0x1b9))/0xc;if(_0x45bb1c===_0x4cac6c)break;else _0x3a3cea['push'](_0x3a3cea['shift']());}catch(_0x25be4e){_0x3a3cea['push'](_0x3a3cea['shift']());}}}(a72_0x274f,0x5f4d9));import*as a72_0x36af22 from'readline';function a72_0x5bae(_0x583352,_0x584204){const _0x274fee=a72_0x274f();return a72_0x5bae=function(_0x5bae22,_0x26fd84){_0x5bae22=_0x5bae22-0x1b8;let _0x3e3eff=_0x274fee[_0x5bae22];return _0x3e3eff;},a72_0x5bae(_0x583352,_0x584204);}export async function confirm(_0x4d01f8){const _0x27e067=a72_0x5bae,_0x32f6d5=a72_0x36af22[_0x27e067(0x1c0)]({'input':process['stdin'],'output':process[_0x27e067(0x1bc)]});return new Promise(_0x577458=>{const _0x281336=_0x27e067;_0x32f6d5[_0x281336(0x1bd)](_0x4d01f8+_0x281336(0x1c8),_0x559e98=>{const _0x56b66c=_0x281336;_0x32f6d5[_0x56b66c(0x1bb)](),_0x577458(_0x559e98[_0x56b66c(0x1c4)]()==='y'||_0x559e98['toLowerCase']()===_0x56b66c(0x1c2));});});}function a72_0x274f(){const _0xb0be30=['16346988yeuhMs','2LHlLJj','close','stdout','question','1353852wiXTEw','15uecciu','createInterface','1001588WBIzxD','yes','890410OZNojF','toLowerCase','6729206qODWjT','16HbYigd','399524myOuTg','\x20(y/N):\x20','3hJcMUp','698741KzNKkZ','18bWLOdQ'];a72_0x274f=function(){return _0xb0be30;};return a72_0x274f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15edde,_0x4e0352){const _0x27a583=a73_0x1052,_0x185536=_0x15edde();while(!![]){try{const _0x347cb4=parseInt(_0x27a583(0x1e7))/0x1+parseInt(_0x27a583(0x1ee))/0x2+-parseInt(_0x27a583(0x1f1))/0x3*(-parseInt(_0x27a583(0x1dc))/0x4)+-parseInt(_0x27a583(0x1df))/0x5*(-parseInt(_0x27a583(0x1d8))/0x6)+-parseInt(_0x27a583(0x1db))/0x7+-parseInt(_0x27a583(0x1da))/0x8+parseInt(_0x27a583(0x1d7))/0x9*(-parseInt(_0x27a583(0x1e2))/0xa);if(_0x347cb4===_0x4e0352)break;else _0x185536['push'](_0x185536['shift']());}catch(_0x1d5deb){_0x185536['push'](_0x185536['shift']());}}}(a73_0xd74a,0x1a6a3));export function parsePath(_0x1f347d){const _0x1744a0=a73_0x1052;if(!_0x1f347d||_0x1f347d[_0x1744a0(0x1f0)]()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x2bcf3d=_0x1f347d[_0x1744a0(0x1f0)]();if(_0x2bcf3d==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x1f347d};const _0x3ee95f=_0x2bcf3d[_0x1744a0(0x1d6)]('/')?_0x2bcf3d[_0x1744a0(0x1eb)](0x1):_0x2bcf3d,_0x5aaa24=_0x3ee95f['split']('/')[_0x1744a0(0x1e5)](_0x2a7708=>_0x2a7708!=='');if(_0x5aaa24['length']===0x0)throw new Error(_0x1744a0(0x1f2));const _0x5d9551=_0x2bcf3d['startsWith']('/')||!isRelativePathSegment(_0x5aaa24[0x0]);for(const _0x3e2334 of _0x5aaa24){validatePathSegment(_0x3e2334);}return{'segments':_0x5aaa24,'isAbsolute':_0x5d9551,'raw':_0x1f347d};}function isRelativePathSegment(_0x58b88d){return _0x58b88d==='.'||_0x58b88d==='..';}function validatePathSegment(_0x27341b){const _0x20caac=a73_0x1052;if(_0x27341b==='')throw new Error(_0x20caac(0x1e6));if(_0x27341b==='.'||_0x27341b==='..')return;if(/[\x00-\x1F\x7F]/[_0x20caac(0x1e4)](_0x27341b))throw new Error(_0x20caac(0x1e9)+_0x27341b);if(_0x27341b!==_0x27341b['trim']()){}}export function validatePath(_0x32c49e){const _0x2d878a=a73_0x1052;if(_0x32c49e[_0x2d878a(0x1ec)][_0x2d878a(0x1e3)]===0x0&&!_0x32c49e[_0x2d878a(0x1e1)])throw new Error('Relative\x20path\x20cannot\x20be\x20empty');if(_0x32c49e[_0x2d878a(0x1e1)]){if(_0x32c49e[_0x2d878a(0x1ec)][0x0]==='..')throw new Error(_0x2d878a(0x1d5));let _0x2be7a8=0x0;for(const _0x1e363b of _0x32c49e['segments']){if(_0x1e363b==='..'){if(_0x2be7a8===0x0)throw new Error(_0x2d878a(0x1de));_0x2be7a8--;}else _0x1e363b!=='.'&&_0x2be7a8++;}}}export function joinPaths(_0x5a793a,_0x28e51e){const _0x313c2d=a73_0x1052;if(!_0x5a793a||_0x5a793a==='/')return _0x28e51e;if(!_0x28e51e||_0x28e51e==='.')return _0x5a793a;if(_0x28e51e[_0x313c2d(0x1d6)]('/'))return _0x28e51e;const _0x4d89c2=parsePath(_0x5a793a),_0x33e135=parsePath(_0x28e51e),_0x26c3cd=[..._0x4d89c2[_0x313c2d(0x1ec)]];for(const _0x170765 of _0x33e135[_0x313c2d(0x1ec)]){if(_0x170765==='.')continue;else{if(_0x170765==='..'){if(_0x26c3cd['length']===0x0)throw new Error(_0x313c2d(0x1ed));_0x26c3cd['pop']();}else _0x26c3cd['push'](_0x170765);}}const _0x4ac6cb=_0x26c3cd[_0x313c2d(0x1dd)]('/');return _0x4d89c2[_0x313c2d(0x1ea)][_0x313c2d(0x1d6)]('/')?'/'+_0x4ac6cb:_0x4ac6cb;}export function normalizePath(_0x44ff62){const _0x473d0c=a73_0x1052,_0x37fa1e=parsePath(_0x44ff62),_0x1891a0=[];for(const _0x18e4bd of _0x37fa1e[_0x473d0c(0x1ec)]){if(_0x18e4bd==='.')continue;else{if(_0x18e4bd==='..'){if(_0x1891a0[_0x473d0c(0x1e3)]===0x0){if(_0x37fa1e[_0x473d0c(0x1e1)])throw new Error(_0x473d0c(0x1ed));_0x1891a0[_0x473d0c(0x1ef)]('..');}else _0x1891a0[_0x1891a0['length']-0x1]==='..'?_0x1891a0[_0x473d0c(0x1ef)]('..'):_0x1891a0[_0x473d0c(0x1e8)]();}else _0x1891a0['push'](_0x18e4bd);}}if(_0x1891a0[_0x473d0c(0x1e3)]===0x0)return _0x37fa1e[_0x473d0c(0x1e1)]?'/':'.';const _0x17af41=_0x1891a0[_0x473d0c(0x1dd)]('/');return _0x37fa1e[_0x473d0c(0x1ea)]['startsWith']('/')?'/'+_0x17af41:_0x17af41;}function a73_0x1052(_0x340864,_0x14ab0a){const _0xd74adc=a73_0xd74a();return a73_0x1052=function(_0x1052fd,_0x4aabd7){_0x1052fd=_0x1052fd-0x1d5;let _0x26b9b3=_0xd74adc[_0x1052fd];return _0x26b9b3;},a73_0x1052(_0x340864,_0x14ab0a);}export function getParentPath(_0x198f42){const _0x375797=a73_0x1052,_0x192f12=parsePath(_0x198f42);if(_0x192f12[_0x375797(0x1ec)]['length']<=0x1)return'/';const _0x1a17d3=_0x192f12[_0x375797(0x1ec)][_0x375797(0x1d9)](0x0,-0x1)[_0x375797(0x1dd)]('/');return _0x192f12[_0x375797(0x1ea)][_0x375797(0x1d6)]('/')?'/'+_0x1a17d3:_0x1a17d3;}export function getBaseName(_0x41252e){const _0x395f52=a73_0x1052,_0x55d0c0=parsePath(_0x41252e);return _0x55d0c0[_0x395f52(0x1ec)][_0x55d0c0[_0x395f52(0x1ec)][_0x395f52(0x1e3)]-0x1]||'';}export function isChildPath(_0x55d50f,_0x2ea912){const _0x1e11e8=a73_0x1052,_0x3d7d96=parsePath(_0x55d50f),_0x16ae7d=parsePath(_0x2ea912);if(_0x3d7d96['segments'][_0x1e11e8(0x1e3)]<=_0x16ae7d['segments']['length'])return![];for(let _0x4f5802=0x0;_0x4f5802<_0x16ae7d[_0x1e11e8(0x1ec)][_0x1e11e8(0x1e3)];_0x4f5802++){if(_0x3d7d96[_0x1e11e8(0x1ec)][_0x4f5802]!==_0x16ae7d['segments'][_0x4f5802])return![];}return!![];}function a73_0xd74a(){const _0xb3f55c=['Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','raw','substring','segments','Cannot\x20navigate\x20above\x20root','177474BKQiZE','push','trim','157443UEVqwW','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','startsWith','135423kfRJqT','1326NnOGqX','slice','940000loODro','1398243UzPdqa','4YMTAlH','join','Path\x20attempts\x20to\x20navigate\x20above\x20root','3185xZYVXu','Cannot\x20split\x20empty\x20path','isAbsolute','40xNpOPr','length','test','filter','Path\x20segment\x20cannot\x20be\x20empty','203637goDZEI','pop'];a73_0xd74a=function(){return _0xb3f55c;};return a73_0xd74a();}export function splitPath(_0x17a54c){const _0x45ce3c=a73_0x1052,_0x3b5670=parsePath(_0x17a54c);if(_0x3b5670['segments'][_0x45ce3c(0x1e3)]===0x0)throw new Error(_0x45ce3c(0x1e0));if(_0x3b5670[_0x45ce3c(0x1ec)][_0x45ce3c(0x1e3)]===0x1)return{'parent':_0x3b5670['segments'][0x0]};return{'parent':_0x3b5670[_0x45ce3c(0x1ec)][0x0],'child':_0x3b5670[_0x45ce3c(0x1ec)][_0x45ce3c(0x1d9)](0x1)[_0x45ce3c(0x1dd)]('/')};}
|