@treasuredata/tdx 0.2.5 → 0.2.7
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/llm-client.js.map +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.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/proxy/session-cache.d.ts +3 -1
- package/dist/proxy/session-cache.d.ts.map +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/proxy/session-cache.js.map +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_0x124c6a=a52_0x2254;(function(_0x1b9b32,_0x4dc049){const _0x356995=a52_0x2254,_0x6a8a12=_0x1b9b32();while(!![]){try{const _0x5348e0=parseInt(_0x356995(0x1de))/0x1+parseInt(_0x356995(0x1f3))/0x2*(parseInt(_0x356995(0x1e0))/0x3)+-parseInt(_0x356995(0x1f9))/0x4+parseInt(_0x356995(0x21f))/0x5+parseInt(_0x356995(0x21c))/0x6*(-parseInt(_0x356995(0x239))/0x7)+parseInt(_0x356995(0x1f0))/0x8*(parseInt(_0x356995(0x238))/0x9)+parseInt(_0x356995(0x1f8))/0xa*(-parseInt(_0x356995(0x1fa))/0xb);if(_0x5348e0===_0x4dc049)break;else _0x6a8a12['push'](_0x6a8a12['shift']());}catch(_0x4ee9c0){_0x6a8a12['push'](_0x6a8a12['shift']());}}}(a52_0x1a68,0xd7cb5));import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{[a52_0x124c6a(0x216)];static [a52_0x124c6a(0x1fb)]=/^\d+$/;constructor(_0x4e67ff){const _0x4fc113=a52_0x124c6a;this[_0x4fc113(0x216)]=_0x4e67ff;}async[a52_0x124c6a(0x237)](_0x3f1103){const _0x25d951=a52_0x124c6a;if(WorkflowAPI['NUMERIC_ID_PATTERN'][_0x25d951(0x1e2)](_0x3f1103))return{'id':_0x3f1103,'name':_0x3f1103};const _0x789079=await this[_0x25d951(0x216)]['listProjects']({'name_pattern':_0x3f1103}),_0x152349=_0x789079['data'][_0x25d951(0x206)](_0x497bf4=>_0x497bf4[_0x25d951(0x1f6)]===_0x3f1103);if(!_0x152349)throw new Error(_0x25d951(0x241)+_0x3f1103);return{'id':_0x152349['id'],'name':_0x152349[_0x25d951(0x1f6)]};}async[a52_0x124c6a(0x21b)](_0x1e52f2,_0xe75bb8){const _0x28ffb3=a52_0x124c6a,_0x3af044=await this[_0x28ffb3(0x216)][_0x28ffb3(0x205)]({'name_pattern':_0x1e52f2,..._0xe75bb8});return _0x3af044[_0x28ffb3(0x226)][_0x28ffb3(0x21e)](_0x5a09b0=>({..._0x5a09b0,'project_id':_0x5a09b0['id'],'project_name':_0x5a09b0[_0x28ffb3(0x1f6)]}));}async[a52_0x124c6a(0x21a)](_0x28e805,_0x5deee0){const _0x2f5b09=a52_0x124c6a,_0x31b4d5=await this[_0x2f5b09(0x216)][_0x2f5b09(0x1eb)]({'project_name':_0x28e805,..._0x5deee0});return _0x31b4d5['data'][_0x2f5b09(0x21e)](_0x167f5a=>({'project_id':_0x167f5a[_0x2f5b09(0x224)]?.['id'],'project_name':_0x167f5a[_0x2f5b09(0x224)]?.[_0x2f5b09(0x1f6)],'workflow_id':_0x167f5a['id'],'workflow_name':_0x167f5a[_0x2f5b09(0x1f6)],'revision':_0x167f5a['revision'],'timezone':_0x167f5a[_0x2f5b09(0x21d)],'config':_0x167f5a['config'],'id':_0x167f5a['id'],'name':_0x167f5a[_0x2f5b09(0x1f6)],'project':_0x167f5a['project']}));}async[a52_0x124c6a(0x232)](_0x5a1d23){const _0x216163=a52_0x124c6a;let _0x7fd90f;if(_0x5a1d23?.[_0x216163(0x204)]){let _0xea6117,_0x30e01c=![];while(!_0x30e01c){const _0x371142=await this[_0x216163(0x216)][_0x216163(0x205)]({'limit':0x64,'last_id':_0xea6117}),_0x5e35f7=_0x371142[_0x216163(0x226)]['find'](_0x4bfe6a=>_0x4bfe6a[_0x216163(0x1f6)]===_0x5a1d23[_0x216163(0x204)]);if(_0x5e35f7){_0x7fd90f=_0x5e35f7['id'],_0x30e01c=!![];break;}if(!_0x371142[_0x216163(0x20a)]||_0x371142['data']['length']===0x0)break;_0xea6117=_0x371142[_0x216163(0x20a)];}if(!_0x7fd90f)throw new Error(_0x216163(0x241)+_0x5a1d23['projectName']);}const _0x32592a=await this['client'][_0x216163(0x1ee)]({'project_id':_0x7fd90f,'project_name':_0x5a1d23?.[_0x216163(0x204)],'workflow_name':_0x5a1d23?.['workflowName'],'status':_0x5a1d23?.[_0x216163(0x219)],'from_time':_0x5a1d23?.[_0x216163(0x1e3)],'to_time':_0x5a1d23?.[_0x216163(0x20e)],'limit':_0x5a1d23?.[_0x216163(0x22d)],'last_id':_0x5a1d23?.['last_id']});return _0x32592a['data'][_0x216163(0x21e)](_0x7b4666=>({'project_id':_0x7b4666[_0x216163(0x224)]?.['id'],'project_name':_0x7b4666['project']?.[_0x216163(0x1f6)],'workflow_id':_0x7b4666['workflow']?.['id'],'workflow_name':_0x7b4666[_0x216163(0x20b)]?.[_0x216163(0x1f6)],'session_id':_0x7b4666['id'],'sessionUuid':_0x7b4666[_0x216163(0x214)],'sessionTime':_0x7b4666[_0x216163(0x207)],'lastAttempt':_0x7b4666['lastAttempt'],'id':_0x7b4666['id'],'project':_0x7b4666[_0x216163(0x224)],'workflow':_0x7b4666['workflow']}));}async[a52_0x124c6a(0x22e)](_0x21e433){const _0x4eea79=a52_0x124c6a,_0x9199d2=await this[_0x4eea79(0x216)][_0x4eea79(0x231)]({'project_name':_0x21e433?.['projectName'],'workflow_name':_0x21e433?.[_0x4eea79(0x1e9)],'include_retried':_0x21e433?.[_0x4eea79(0x209)],'limit':_0x21e433?.['limit'],'last_id':_0x21e433?.[_0x4eea79(0x225)]});return _0x9199d2['data']['map'](_0x14cacf=>({'project_id':_0x14cacf[_0x4eea79(0x224)]?.['id'],'project_name':_0x14cacf['project']?.[_0x4eea79(0x1f6)],'workflow_id':_0x14cacf['workflow']?.['id'],'workflow_name':_0x14cacf[_0x4eea79(0x20b)]?.[_0x4eea79(0x1f6)],'session_id':_0x14cacf[_0x4eea79(0x1ff)],'sessionUuid':_0x14cacf['sessionUuid'],'sessionTime':_0x14cacf[_0x4eea79(0x207)],'attempt_id':_0x14cacf['id'],'attempt_index':_0x14cacf[_0x4eea79(0x220)],'retryAttemptName':_0x14cacf[_0x4eea79(0x20c)],'done':_0x14cacf[_0x4eea79(0x1ea)],'success':_0x14cacf[_0x4eea79(0x1f7)],'cancelRequested':_0x14cacf[_0x4eea79(0x223)],'params':_0x14cacf[_0x4eea79(0x22c)],'createdAt':_0x14cacf[_0x4eea79(0x22b)],'finishedAt':_0x14cacf[_0x4eea79(0x203)],'id':_0x14cacf['id'],'index':_0x14cacf[_0x4eea79(0x220)],'project':_0x14cacf[_0x4eea79(0x224)],'workflow':_0x14cacf[_0x4eea79(0x20b)]}));}async[a52_0x124c6a(0x234)](_0x161c0b){const _0x24c46b=a52_0x124c6a,_0x112260=await this['client'][_0x24c46b(0x1e5)](_0x161c0b);return _0x112260;}async[a52_0x124c6a(0x242)](_0x4efcf7,_0x3a4dfa=![]){const _0x54be9f=a52_0x124c6a,_0x3baabe=await this[_0x54be9f(0x216)][_0x54be9f(0x23c)](_0x4efcf7,_0x3a4dfa);return _0x3baabe['map'](_0x567e47=>({'task_id':_0x567e47['id'],'task_name':_0x567e47[_0x54be9f(0x240)],'parentId':_0x567e47[_0x54be9f(0x23b)],'config':_0x567e47[_0x54be9f(0x1f1)],'upstreams':_0x567e47[_0x54be9f(0x1dd)],'state':_0x567e47[_0x54be9f(0x230)],'exportParams':_0x567e47[_0x54be9f(0x23e)],'storeParams':_0x567e47[_0x54be9f(0x20d)],'stateParams':_0x567e47[_0x54be9f(0x23d)],'updatedAt':_0x567e47[_0x54be9f(0x1ed)],'retryAt':_0x567e47[_0x54be9f(0x1fc)],'startedAt':_0x567e47[_0x54be9f(0x1fe)],'error':_0x567e47[_0x54be9f(0x215)],'isGroup':_0x567e47['isGroup'],'id':_0x567e47['id'],'fullName':_0x567e47[_0x54be9f(0x240)]}));}async[a52_0x124c6a(0x221)](_0xbc8fd9,_0x4bced5,_0x396a8d){const _0xc1632b=a52_0x124c6a;return await this['client'][_0xc1632b(0x22a)](_0xbc8fd9,_0x4bced5,_0x396a8d);}async['kill'](_0x4b9eeb,_0x55f519){const _0x4df3fa=a52_0x124c6a,_0x2a5830=await this[_0x4df3fa(0x216)][_0x4df3fa(0x20f)](_0x4b9eeb,_0x55f519);return _0x2a5830[_0x4df3fa(0x1e6)];}async[a52_0x124c6a(0x202)](_0xa849f8,_0x36a70e){const _0x49d954=a52_0x124c6a,_0xb5dbff=await this[_0x49d954(0x216)][_0x49d954(0x202)](_0xa849f8,{'from_task':_0x36a70e?.[_0x49d954(0x212)],'retry_params':_0x36a70e?.['retryParams']});return{'attemptId':_0xb5dbff['id'],'sessionId':_0xb5dbff[_0x49d954(0x1ff)]};}async['retryAttempt'](_0x5edfde,_0x3e4d3b){const _0x4274f9=a52_0x124c6a,_0xc10d2c=await this['client'][_0x4274f9(0x1f4)](_0x5edfde,{'resume_from':_0x3e4d3b?.['resumeFrom'],'retry_params':_0x3e4d3b?.[_0x4274f9(0x1e8)],'force':_0x3e4d3b?.['force']});return{'attemptId':_0xc10d2c['id'],'sessionId':_0xc10d2c['sessionId']};}async[a52_0x124c6a(0x23a)](_0x3ecd3e,_0x3e5226,_0x3fac8d){const _0x4799af=a52_0x124c6a,{promises:_0x32e5d3}=await import('fs'),_0x48f19d=await import(_0x4799af(0x235)),_0x5cec83=await import('os'),_0x33b1a2=await import(_0x4799af(0x1ec)),{id:_0xd00612,name:_0xc89210}=await this[_0x4799af(0x237)](_0x3ecd3e),_0x2767fe=_0x5cec83['tmpdir'](),_0x50fb78=_0x48f19d[_0x4799af(0x1e7)](_0x2767fe,_0x4799af(0x201)+_0xd00612+'-'+Date['now']()+'.tar.gz');try{await this[_0x4799af(0x216)][_0x4799af(0x218)](_0xd00612,_0x50fb78,_0x3fac8d?.[_0x4799af(0x243)]);const _0x1d96d0=_0x48f19d[_0x4799af(0x1e7)](_0x3e5226,_0xc89210);await _0x32e5d3['mkdir'](_0x1d96d0,{'recursive':!![]}),await _0x33b1a2[_0x4799af(0x208)]({'file':_0x50fb78,'cwd':_0x1d96d0,'gzip':!![]});const _0x245d09=async _0x3f5d9d=>{const _0xd515e1=_0x4799af;let _0x3445c6=0x0;const _0x9da883=await _0x32e5d3[_0xd515e1(0x23f)](_0x3f5d9d,{'withFileTypes':!![]});for(const _0x439571 of _0x9da883){const _0x1bb68c=_0x48f19d[_0xd515e1(0x1e7)](_0x3f5d9d,_0x439571[_0xd515e1(0x1f6)]);if(_0x439571['isFile']())_0x3445c6++;else _0x439571[_0xd515e1(0x1e1)]()&&(_0x3445c6+=await _0x245d09(_0x1bb68c));}return _0x3445c6;},_0x91bd8c=await _0x245d09(_0x1d96d0);return{'projectName':_0xc89210,'revision':_0x3fac8d?.[_0x4799af(0x243)]||_0x4799af(0x210),'filesExtracted':_0x91bd8c};}finally{try{await _0x32e5d3[_0x4799af(0x229)](_0x50fb78);}catch{}}}async['push'](_0x5cfa15,_0x30b19a){const _0xbbe05f=a52_0x124c6a,{promises:_0xef8e4d}=await import('fs'),_0x1c85ae=await import(_0xbbe05f(0x235)),_0x3c3c42=await import('tar'),_0xcef5de=_0x30b19a?.['projectName']||_0x1c85ae['basename'](_0x5cfa15),_0x324587=_0x30b19a?.[_0xbbe05f(0x243)]||new Date()[_0xbbe05f(0x222)]()['replace'](/[:.]/g,'-');try{await _0xef8e4d[_0xbbe05f(0x236)](_0x5cfa15);}catch{throw new Error(_0xbbe05f(0x1e4)+_0x5cfa15);}if(!_0x30b19a?.['skipValidation']){const _0x4ba0c2=await _0xef8e4d[_0xbbe05f(0x23f)](_0x5cfa15),_0x254b48=_0x4ba0c2['filter'](_0x68a7e3=>_0x68a7e3[_0xbbe05f(0x233)](WORKFLOW_FILE_EXTENSION));if(_0x254b48[_0xbbe05f(0x227)]===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+_0xbbe05f(0x211));for(const _0x208430 of _0x254b48){const _0x443a12=_0x1c85ae['join'](_0x5cfa15,_0x208430);try{await _0xef8e4d[_0xbbe05f(0x236)](_0x443a12);}catch{throw new Error(_0xbbe05f(0x228)+_0x208430);}}}const _0x15d389=async(_0x36e802,_0x51b573='')=>{const _0x1818d1=_0xbbe05f,_0x324e09=await _0xef8e4d['readdir'](_0x36e802,{'withFileTypes':!![]}),_0x572151=[];for(const _0x19a86b of _0x324e09){const _0x27471d=_0x1c85ae['join'](_0x51b573,_0x19a86b[_0x1818d1(0x1f6)]),_0x390cbd=_0x1c85ae[_0x1818d1(0x1e7)](_0x36e802,_0x19a86b[_0x1818d1(0x1f6)]);if(!shouldIncludeInArchive(_0x19a86b[_0x1818d1(0x1f6)]))continue;_0x19a86b[_0x1818d1(0x1e1)]()?_0x572151[_0x1818d1(0x1fd)](...await _0x15d389(_0x390cbd,_0x27471d)):_0x572151['push'](_0x27471d);}return _0x572151;},_0x13e153=await _0x15d389(_0x5cfa15),_0x20a379=await import('os'),_0x38191c=_0x20a379['tmpdir'](),_0x980b22=_0x1c85ae['join'](_0x38191c,_0xbbe05f(0x1f2)+Date[_0xbbe05f(0x1ef)]()+_0xbbe05f(0x22f));try{await _0x3c3c42[_0xbbe05f(0x217)]({'file':_0x980b22,'gzip':!![],'cwd':_0x5cfa15,'portable':!![]},_0x13e153);const _0x7198cd=await this[_0xbbe05f(0x216)]['uploadProjectArchive'](_0xcef5de,_0x324587,_0x980b22,{'scheduleFrom':_0x30b19a?.[_0xbbe05f(0x1f5)],'clearSchedule':_0x30b19a?.[_0xbbe05f(0x1df)],'clearScheduleAll':_0x30b19a?.[_0xbbe05f(0x213)]});return{'projectId':_0x7198cd['id'],'projectName':_0x7198cd[_0xbbe05f(0x1f6)],'revision':_0x7198cd[_0xbbe05f(0x243)]};}finally{try{await _0xef8e4d[_0xbbe05f(0x229)](_0x980b22);}catch{}}}async[a52_0x124c6a(0x200)](_0x4379ca){const _0x4b3668=a52_0x124c6a,{id:_0xcfd2b2}=await this[_0x4b3668(0x237)](_0x4379ca),_0x2527c9=await this[_0x4b3668(0x216)]['deleteProject'](_0xcfd2b2);return{'projectId':_0x2527c9['id'],'projectName':_0x2527c9[_0x4b3668(0x1f6)]};}}function a52_0x2254(_0x49d8da,_0x228db4){const _0x1a68d0=a52_0x1a68();return a52_0x2254=function(_0x2254f9,_0x30cfc3){_0x2254f9=_0x2254f9-0x1dd;let _0x4aae7b=_0x1a68d0[_0x2254f9];return _0x4aae7b;},a52_0x2254(_0x49d8da,_0x228db4);}function a52_0x1a68(){const _0x5f19a9=['access','resolveProjectId','27OwnmgN','53564mCufzT','download','parentId','getAttemptTasks','stateParams','exportParams','readdir','fullName','Project\x20not\x20found:\x20','tasks','revision','upstreams','1184691VHTimU','clearSchedule','108kcVoSw','isDirectory','test','fromTime','Project\x20directory\x20not\x20found:\x20','getAttempt','message','join','retryParams','workflowName','done','listWorkflows','tar','updatedAt','listSessions','now','1786696QPteQp','config','tdx-workflow-push-','8936LLHzwM','retryAttempt','scheduleFrom','name','success','145180MuUdin','3114912NNuxbJ','110pISxoZ','NUMERIC_ID_PATTERN','retryAt','push','startedAt','sessionId','delete','tdx-workflow-','retrySession','finishedAt','projectName','listProjects','find','sessionTime','extract','includeRetried','lastId','workflow','retryAttemptName','storeParams','toTime','killAttempt','latest','\x20workflow\x20files\x20found\x20in\x20project\x20directory','fromTask','clearScheduleAll','sessionUuid','error','client','create','downloadProjectArchive','status','workflows','projects','930JWFWKv','timezone','map','4891555PQGQLH','index','logs','toISOString','cancelRequested','project','last_id','data','length','Cannot\x20read\x20workflow\x20file:\x20','unlink','getTaskLogs','createdAt','params','limit','attempts','.tar.gz','state','listAttempts','sessions','endsWith','attempt','path'];a52_0x1a68=function(){return _0x5f19a9;};return a52_0x1a68();}
|
package/dist/types/endpoints.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x13927d=a55_0x2771;(function(_0x2cf41f,_0x42905e){const _0x5289f6=a55_0x2771,_0x479064=_0x2cf41f();while(!![]){try{const _0x255f8a=parseInt(_0x5289f6(0x117))/0x1*(parseInt(_0x5289f6(0x109))/0x2)+parseInt(_0x5289f6(0x108))/0x3*(parseInt(_0x5289f6(0x128))/0x4)+parseInt(_0x5289f6(0x11d))/0x5+-parseInt(_0x5289f6(0x111))/0x6+parseInt(_0x5289f6(0x106))/0x7+parseInt(_0x5289f6(0x11a))/0x8+parseInt(_0x5289f6(0xfe))/0x9*(-parseInt(_0x5289f6(0x103))/0xa);if(_0x255f8a===_0x42905e)break;else _0x479064['push'](_0x479064['shift']());}catch(_0x4b0020){_0x479064['push'](_0x479064['shift']());}}}(a55_0x4093,0x43d4a));export const TD_ENDPOINTS={'us01':'https://api.treasuredata.com','jp01':a55_0x13927d(0x113),'eu01':a55_0x13927d(0x11e),'ap02':'https://api.ap02.treasuredata.com','ap03':a55_0x13927d(0x112),'dev-us01':'https://api-development.us01.treasuredata.com','dev-eu01':a55_0x13927d(0x104),'stg-us01':'https://api-staging.us01.treasuredata.com','stg-jp01':'https://api-staging.treasuredata.co.jp','stg-ap03':a55_0x13927d(0x116)};export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a55_0x13927d(0x105),'eu01':a55_0x13927d(0x120),'ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a55_0x13927d(0x124),'dev-us01':'https://api-development-cdp.us01.treasuredata.com','dev-eu01':'https://api-development-cdp.eu01.treasuredata.com','stg-us01':a55_0x13927d(0x119),'stg-jp01':a55_0x13927d(0x114),'stg-ap03':a55_0x13927d(0x11b)};function a55_0x4093(){const _0xcf53f4=['2124UZsVFG','52862vpqxuC','https://llm-api-development.us01.treasuredata.com','https://api-presto.treasuredata.com','https://llm-api.treasuredata.co.jp','https://api-staging-workflow.treasuredata.co.jp','https://llm-api-staging.us01.treasuredata.com','https://api-workflow.ap03.treasuredata.com','https://api-presto.treasuredata.co.jp','2870406XAOAWw','https://api.ap03.treasuredata.com','https://api.treasuredata.co.jp','https://api-staging-cdp.treasuredata.co.jp','https://api-workflow.treasuredata.co.jp','https://api-staging.ap03.treasuredata.com','4aKOtDg','https://api-development-workflow.us01.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','2512304yWbhDQ','https://api-staging-cdp.ap03.treasuredata.com','https://api-development-workflow.eu01.treasuredata.com','771760DDwMNs','https://api.eu01.treasuredata.com','https://llm-api.treasuredata.com','https://api-cdp.eu01.treasuredata.com','https://api-workflow.eu01.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-workflow.treasuredata.com','https://api-cdp.ap03.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://api-presto.ap03.treasuredata.com','1952DwyDRd','53577YgUcUo','https://llm-api-staging.treasuredata.co.jp','https://api-staging-presto.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','https://api-presto.eu01.treasuredata.com','450mTbeip','https://api-development.eu01.treasuredata.com','https://api-cdp.treasuredata.co.jp','731514xiVexi','https://api-staging-presto.treasuredata.co.jp'];a55_0x4093=function(){return _0xcf53f4;};return a55_0x4093();}function a55_0x2771(_0x14ea6e,_0x1a9638){const _0x40930a=a55_0x4093();return a55_0x2771=function(_0x2771c7,_0x497bbf){_0x2771c7=_0x2771c7-0xfe;let _0x100d04=_0x40930a[_0x2771c7];return _0x100d04;},a55_0x2771(_0x14ea6e,_0x1a9638);}export const WORKFLOW_ENDPOINTS={'us01':a55_0x13927d(0x123),'jp01':a55_0x13927d(0x115),'eu01':a55_0x13927d(0x121),'ap02':'https://api-workflow.ap02.treasuredata.com','ap03':a55_0x13927d(0x10f),'dev-us01':a55_0x13927d(0x118),'dev-eu01':a55_0x13927d(0x11c),'stg-us01':'https://api-staging-workflow.us01.treasuredata.com','stg-jp01':a55_0x13927d(0x10d),'stg-ap03':'https://api-staging-workflow.ap03.treasuredata.com'};export const TRINO_ENDPOINTS={'us01':a55_0x13927d(0x10b),'jp01':a55_0x13927d(0x110),'eu01':a55_0x13927d(0x102),'ap02':'https://api-presto.ap02.treasuredata.com','ap03':a55_0x13927d(0x127),'dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':'https://api-development-presto.eu01.treasuredata.com','stg-us01':a55_0x13927d(0x100),'stg-jp01':a55_0x13927d(0x107),'stg-ap03':a55_0x13927d(0x126)};export const LLM_ENDPOINTS={'us01':a55_0x13927d(0x11f),'jp01':a55_0x13927d(0x10c),'eu01':'https://llm-api.eu01.treasuredata.com','ap02':'https://llm-api.ap02.treasuredata.com','ap03':a55_0x13927d(0x122),'dev-us01':a55_0x13927d(0x10a),'dev-eu01':a55_0x13927d(0x101),'stg-us01':a55_0x13927d(0x10e),'stg-jp01':a55_0x13927d(0xff),'stg-ap03':a55_0x13927d(0x125)};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x215340,_0x36c1df='td'){const _0x462af2=API_ENDPOINTS[_0x36c1df]?.[_0x215340];if(!_0x462af2)throw new Error('No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27'+_0x36c1df+'\x27\x20and\x20site\x20\x27'+_0x215340+'\x27');return _0x462af2;}
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a56_0x4f0c(){const _0x4d419c=['5TtJtNd','2434BTuPda','dev-us01','10786720oqYweo','stg-us01','jp01','5196244rDImrf','11964MBciBW','4711XTLDDX','474bAbhUT','366IuxINq','694947epUpcz','670HCeWKV','8517411jvyUxd'];a56_0x4f0c=function(){return _0x4d419c;};return a56_0x4f0c();}function a56_0xcdcd(_0x34405a,_0x4abdd1){const _0x4f0c2b=a56_0x4f0c();return a56_0xcdcd=function(_0xcdcd89,_0x5bc9a0){_0xcdcd89=_0xcdcd89-0x1bb;let _0x3aa0c4=_0x4f0c2b[_0xcdcd89];return _0x3aa0c4;},a56_0xcdcd(_0x34405a,_0x4abdd1);}const a56_0x2a1a24=a56_0xcdcd;(function(_0x58bd6e,_0x54c38c){const _0x3801b4=a56_0xcdcd,_0x5349a8=_0x58bd6e();while(!![]){try{const _0x5c478f=-parseInt(_0x3801b4(0x1bc))/0x1+-parseInt(_0x3801b4(0x1c4))/0x2*(-parseInt(_0x3801b4(0x1bf))/0x3)+parseInt(_0x3801b4(0x1bb))/0x4*(-parseInt(_0x3801b4(0x1c3))/0x5)+parseInt(_0x3801b4(0x1be))/0x6*(-parseInt(_0x3801b4(0x1bd))/0x7)+-parseInt(_0x3801b4(0x1c6))/0x8+-parseInt(_0x3801b4(0x1c2))/0x9+parseInt(_0x3801b4(0x1c1))/0xa*(parseInt(_0x3801b4(0x1c0))/0xb);if(_0x5c478f===_0x54c38c)break;else _0x5349a8['push'](_0x5349a8['shift']());}catch(_0x2cd563){_0x5349a8['push'](_0x5349a8['shift']());}}}(a56_0x4f0c,0xb05f6));export const SITE_ALIASES={'us':'us01','aws':'us01','jp':a56_0x2a1a24(0x1c8),'aws-tokyo':'jp01','dev':a56_0x2a1a24(0x1c5),'stg':a56_0x2a1a24(0x1c7)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3efcb9,_0x35d7ba){const _0xcdee0f=a59_0x5763,_0x3ea2d1=_0x3efcb9();while(!![]){try{const _0x201457=parseInt(_0xcdee0f(0xc7))/0x1*(-parseInt(_0xcdee0f(0xc9))/0x2)+-parseInt(_0xcdee0f(0xba))/0x3*(parseInt(_0xcdee0f(0xc1))/0x4)+parseInt(_0xcdee0f(0xca))/0x5*(-parseInt(_0xcdee0f(0xc3))/0x6)+-parseInt(_0xcdee0f(0xc0))/0x7*(parseInt(_0xcdee0f(0xc4))/0x8)+parseInt(_0xcdee0f(0xc5))/0x9*(-parseInt(_0xcdee0f(0xcc))/0xa)+parseInt(_0xcdee0f(0xbf))/0xb*(parseInt(_0xcdee0f(0xc2))/0xc)+parseInt(_0xcdee0f(0xbd))/0xd;if(_0x201457===_0x35d7ba)break;else _0x3ea2d1['push'](_0x3ea2d1['shift']());}catch(_0x12968a){_0x3ea2d1['push'](_0x3ea2d1['shift']());}}}(a59_0x7fc9,0xda268));function a59_0x7fc9(){const _0x59ac17=['132kkEnQd','2646WnAkHE','112yGXbXU','54OPUMHJ','trim','281KPTTVS','Agent\x20reference\x20cannot\x20be\x20empty','11114kraDqc','300kIjLgw','split','1342130FuvewG','18753kWPKGM','length','Agent\x20name\x20cannot\x20be\x20empty','48283066jkuOvk','Invalid\x20agent\x20reference\x20format:\x20','731896ltnaTG','282667YhERAs','380DeHEFr'];a59_0x7fc9=function(){return _0x59ac17;};return a59_0x7fc9();}function a59_0x5763(_0x346a50,_0x3e85b4){const _0x7fc902=a59_0x7fc9();return a59_0x5763=function(_0x576397,_0x4dd429){_0x576397=_0x576397-0xba;let _0x522b42=_0x7fc902[_0x576397];return _0x522b42;},a59_0x5763(_0x346a50,_0x3e85b4);}export function parseAgentRef(_0x117e5d){const _0x486a5d=a59_0x5763;if(!_0x117e5d||_0x117e5d[_0x486a5d(0xc6)]()==='')throw new Error(_0x486a5d(0xc8));const _0x477c38=_0x117e5d[_0x486a5d(0xc6)](),_0x184150=_0x477c38[_0x486a5d(0xcb)]('/');if(_0x184150[_0x486a5d(0xbb)]===0x1)return{'projectName':_0x184150[0x0],'agentName':undefined};else{if(_0x184150[_0x486a5d(0xbb)]===0x2){const [_0x5e25a3,_0x5c20b3]=_0x184150;if(!_0x5e25a3||_0x5e25a3[_0x486a5d(0xc6)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');if(!_0x5c20b3||_0x5c20b3[_0x486a5d(0xc6)]()==='')throw new Error(_0x486a5d(0xbc));return{'projectName':_0x5e25a3[_0x486a5d(0xc6)](),'agentName':_0x5c20b3[_0x486a5d(0xc6)]()};}else throw new Error(_0x486a5d(0xbe)+_0x117e5d+'.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22');}}
|
package/dist/utils/chat-cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12b8c4,_0x5f55f0){const _0x93fbe7=a60_0x351e,_0x1ee1e8=_0x12b8c4();while(!![]){try{const _0x4c2f9c=-parseInt(_0x93fbe7(0x15b))/0x1*(parseInt(_0x93fbe7(0x164))/0x2)+parseInt(_0x93fbe7(0x15a))/0x3+parseInt(_0x93fbe7(0x159))/0x4+-parseInt(_0x93fbe7(0x163))/0x5+-parseInt(_0x93fbe7(0x166))/0x6*(parseInt(_0x93fbe7(0x15d))/0x7)+parseInt(_0x93fbe7(0x165))/0x8*(parseInt(_0x93fbe7(0x15f))/0x9)+parseInt(_0x93fbe7(0x161))/0xa*(parseInt(_0x93fbe7(0x162))/0xb);if(_0x4c2f9c===_0x5f55f0)break;else _0x1ee1e8['push'](_0x1ee1e8['shift']());}catch(_0x55971f){_0x1ee1e8['push'](_0x1ee1e8['shift']());}}}(a60_0x17e3,0x9d997));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';function a60_0x17e3(){const _0x37845d=['3245920cbjFiI','2763045MHJvFR','37CwZoKM','.cache','7AtWPuZ','cwd','1584DJCMif','trim','15150140lPZlAb','11pKvPMi','4075250fctcfJ','59870LUrLOm','24680GuJMAq','7333782aDFCQV','utf-8'];a60_0x17e3=function(){return _0x37845d;};return a60_0x17e3();}import{join}from'path';function getCacheDir(){const _0x207e89=a60_0x351e;return join(process[_0x207e89(0x15e)](),_0x207e89(0x15c),'tdx');}function getLastChatIdPath(){return join(getCacheDir(),'last_chat_id');}function ensureCacheDir(){const _0x328d19=getCacheDir();!existsSync(_0x328d19)&&mkdirSync(_0x328d19,{'recursive':!![]});}function a60_0x351e(_0xcd5e95,_0x5904f7){const _0x17e3c4=a60_0x17e3();return a60_0x351e=function(_0x351eda,_0x1f27f9){_0x351eda=_0x351eda-0x159;let _0x3c9f89=_0x17e3c4[_0x351eda];return _0x3c9f89;},a60_0x351e(_0xcd5e95,_0x5904f7);}export function saveLastChatId(_0x1243e6){const _0x620a34=a60_0x351e;ensureCacheDir();const _0x5af0af=getLastChatIdPath();writeFileSync(_0x5af0af,_0x1243e6,_0x620a34(0x167));}export function loadLastChatId(){const _0x11931f=a60_0x351e,_0x49c915=getLastChatIdPath();if(!existsSync(_0x49c915))return undefined;try{const _0x45a2d7=readFileSync(_0x49c915,_0x11931f(0x167))[_0x11931f(0x160)]();return _0x45a2d7||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x6808a0=a60_0x351e,_0x125f56=getLastChatIdPath();if(existsSync(_0x125f56))try{writeFileSync(_0x125f56,'',_0x6808a0(0x167));}catch{}}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5eca20,_0x412605){const _0x343e14=a61_0x21e6,_0xc09f30=_0x5eca20();while(!![]){try{const _0x3fd331=-parseInt(_0x343e14(0xe8))/0x1+-parseInt(_0x343e14(0x100))/0x2*(parseInt(_0x343e14(0xe7))/0x3)+parseInt(_0x343e14(0xed))/0x4+parseInt(_0x343e14(0xea))/0x5*(parseInt(_0x343e14(0xf9))/0x6)+-parseInt(_0x343e14(0xeb))/0x7+parseInt(_0x343e14(0xf2))/0x8+-parseInt(_0x343e14(0xf3))/0x9;if(_0x3fd331===_0x412605)break;else _0xc09f30['push'](_0xc09f30['shift']());}catch(_0x56483a){_0xc09f30['push'](_0xc09f30['shift']());}}}(a61_0x54ce,0x6f82b));import{Chalk}from'chalk';function a61_0x54ce(){const _0x185645=['2920264UWGuqX','203265zoSZXO','boolean','noColor','length','stdout','stringify','1323492WJUbUl','blue','null','color','isArray','green','cyan','2018naZIYy','env','number','map','NO_COLOR','join','1005yTJSmo','911828xAkDbs','dim','20tAEvmk','883393eXKWNo','entries','2432052sSBXdc','object','repeat','yellow','string'];a61_0x54ce=function(){return _0x185645;};return a61_0x54ce();}export function shouldUseColor(_0x19cd9f={}){const _0x17eeaf=a61_0x21e6;if(_0x19cd9f[_0x17eeaf(0xf5)]===!![])return![];if(_0x19cd9f[_0x17eeaf(0xfc)]===!![])return!![];if(process[_0x17eeaf(0xe2)][_0x17eeaf(0xe5)]!==undefined)return![];return process[_0x17eeaf(0xf7)]['isTTY']??![];}export function getChalk(_0x215c0a={}){if(shouldUseColor(_0x215c0a))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x388f45,_0x154f7c={}){const _0x480ff9=a61_0x21e6;return getChalk(_0x154f7c)[_0x480ff9(0xe9)](_0x388f45);}export function colorHeader(_0x58f645,_0x4073f1={}){return getChalk(_0x4073f1)['cyan'](_0x58f645);}function a61_0x21e6(_0x5e9ddd,_0x4cb2d6){const _0x54ce52=a61_0x54ce();return a61_0x21e6=function(_0x21e6b6,_0xe1c637){_0x21e6b6=_0x21e6b6-0xe2;let _0x3f189c=_0x54ce52[_0x21e6b6];return _0x3f189c;},a61_0x21e6(_0x5e9ddd,_0x4cb2d6);}export function colorType(_0x4fbc2c,_0x101933={}){const _0x162ba6=a61_0x21e6;return getChalk(_0x101933)[_0x162ba6(0xe9)](_0x4fbc2c);}export function colorJSONKey(_0xbebf13,_0x573463={}){const _0x5cce97=a61_0x21e6;return getChalk(_0x573463)[_0x5cce97(0xfa)](_0xbebf13);}export function colorJSONString(_0x226713,_0x55200f={}){const _0x3a20fc=a61_0x21e6;return getChalk(_0x55200f)[_0x3a20fc(0xfe)](_0x226713);}export function colorJSONNumber(_0x4d2c7c,_0xb35d88={}){const _0x3d18c4=a61_0x21e6;return getChalk(_0xb35d88)[_0x3d18c4(0xff)](_0x4d2c7c);}export function colorJSONBoolean(_0xacbdb2,_0x577900={}){const _0x4c0b74=a61_0x21e6;return getChalk(_0x577900)[_0x4c0b74(0xf0)](_0xacbdb2);}export function colorJSONNull(_0x1e25ba,_0x14d65a={}){const _0x49ecd4=a61_0x21e6;return getChalk(_0x14d65a)[_0x49ecd4(0xe9)](_0x1e25ba);}export function colorizeJSONCompact(_0xb8759b,_0x5cb33e={}){const _0x15ac13=a61_0x21e6;if(!shouldUseColor(_0x5cb33e))return JSON[_0x15ac13(0xf8)](_0xb8759b);if(_0xb8759b===null)return colorJSONNull(_0x15ac13(0xfb),_0x5cb33e);if(typeof _0xb8759b===_0x15ac13(0xf4))return colorJSONBoolean(String(_0xb8759b),_0x5cb33e);if(typeof _0xb8759b===_0x15ac13(0xe3))return colorJSONNumber(String(_0xb8759b),_0x5cb33e);if(typeof _0xb8759b===_0x15ac13(0xf1))return colorJSONString(JSON[_0x15ac13(0xf8)](_0xb8759b),_0x5cb33e);if(Array[_0x15ac13(0xfd)](_0xb8759b)){if(_0xb8759b['length']===0x0)return'[]';const _0x3899d2=_0xb8759b[_0x15ac13(0xe4)](_0x1db64e=>colorizeJSONCompact(_0x1db64e,_0x5cb33e));return'['+_0x3899d2[_0x15ac13(0xe6)](',')+']';}if(typeof _0xb8759b==='object'){const _0x596126=Object['entries'](_0xb8759b);if(_0x596126['length']===0x0)return'{}';const _0x2de985=_0x596126[_0x15ac13(0xe4)](([_0x52aec0,_0x19a167])=>{const _0x1cb30d=_0x15ac13,_0x54c0a5=colorJSONKey(JSON[_0x1cb30d(0xf8)](_0x52aec0),_0x5cb33e),_0x587f22=colorizeJSONCompact(_0x19a167,_0x5cb33e);return _0x54c0a5+':'+_0x587f22;});return'{'+_0x2de985[_0x15ac13(0xe6)](',')+'}';}return String(_0xb8759b);}export function colorizeJSON(_0x3cf523,_0x24f2b8={},_0x3cc437=0x0){const _0x3ae661=a61_0x21e6;if(!shouldUseColor(_0x24f2b8))return JSON['stringify'](_0x3cf523,null,0x2);const _0xc629da='\x20'['repeat'](_0x3cc437),_0x24e03b=_0x3cc437+0x2;if(_0x3cf523===null)return colorJSONNull(_0x3ae661(0xfb),_0x24f2b8);if(typeof _0x3cf523===_0x3ae661(0xf4))return colorJSONBoolean(String(_0x3cf523),_0x24f2b8);if(typeof _0x3cf523===_0x3ae661(0xe3))return colorJSONNumber(String(_0x3cf523),_0x24f2b8);if(typeof _0x3cf523===_0x3ae661(0xf1))return colorJSONString(JSON[_0x3ae661(0xf8)](_0x3cf523),_0x24f2b8);if(Array[_0x3ae661(0xfd)](_0x3cf523)){if(_0x3cf523['length']===0x0)return'[]';const _0x4ee497=_0x3cf523['map'](_0x8ea54c=>{const _0x481eb6=_0x3ae661,_0x380ea0=colorizeJSON(_0x8ea54c,_0x24f2b8,_0x24e03b);return''+'\x20'[_0x481eb6(0xef)](_0x24e03b)+_0x380ea0;});return'[\x0a'+_0x4ee497['join'](',\x0a')+('\x0a'+_0xc629da+']');}if(typeof _0x3cf523===_0x3ae661(0xee)){const _0x5348e5=Object[_0x3ae661(0xec)](_0x3cf523);if(_0x5348e5[_0x3ae661(0xf6)]===0x0)return'{}';const _0x260388=_0x5348e5[_0x3ae661(0xe4)](([_0x2469a8,_0x4a07d1])=>{const _0x316134=_0x3ae661,_0x11a1f9=colorJSONKey(JSON[_0x316134(0xf8)](_0x2469a8),_0x24f2b8),_0x566ffa=colorizeJSON(_0x4a07d1,_0x24f2b8,_0x24e03b);return''+'\x20'[_0x316134(0xef)](_0x24e03b)+_0x11a1f9+':\x20'+_0x566ffa;});return'{\x0a'+_0x260388['join'](',\x0a')+('\x0a'+_0xc629da+'}');}return String(_0x3cf523);}
|
|
@@ -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(_0x358954,_0x111198){const _0xf55a31=a62_0x170f,_0x18f526=_0x358954();while(!![]){try{const _0x1d552d=-parseInt(_0xf55a31(0xf0))/0x1*(parseInt(_0xf55a31(0xe6))/0x2)+-parseInt(_0xf55a31(0xce))/0x3+-parseInt(_0xf55a31(0xe4))/0x4*(-parseInt(_0xf55a31(0xe7))/0x5)+-parseInt(_0xf55a31(0xd6))/0x6+-parseInt(_0xf55a31(0xf3))/0x7+parseInt(_0xf55a31(0xd8))/0x8+parseInt(_0xf55a31(0xc1))/0x9;if(_0x1d552d===_0x111198)break;else _0x18f526['push'](_0x18f526['shift']());}catch(_0x46d57e){_0x18f526['push'](_0x18f526['shift']());}}}(a62_0x326e,0x4f23b));function a62_0x170f(_0x1eedd6,_0x5768ee){const _0x326ea1=a62_0x326e();return a62_0x170f=function(_0x170ffc,_0x5021b1){_0x170ffc=_0x170ffc-0xba;let _0x1c536b=_0x326ea1[_0x170ffc];return _0x1c536b;},a62_0x170f(_0x1eedd6,_0x5768ee);}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';function a62_0x326e(){const _0x43bd2e=['yellow','error','boolean','bold','3216816TTjjnM','format','trim','stderr','stdout','filter','table','cyan','forEach','[query]','object','double','-FXRSn','295164joaoMd','push','isTTY','stdin','split','[error]','tsv','red','302580crgxgZ','jsonl','355904MOCCtq','number','color','end','less','─┴─','isInteger','json','noColor','output','entries','resolve','288156dDBfXc','padEnd','1990FLbOYk','25SIObWp','[Object]','─┬─','length','varchar','join','repeat','bigint','max','219uoCKSR','log','pipe','498603JTPQHc','map','limit','stringify','cmdout','write'];a62_0x326e=function(){return _0x43bd2e;};return a62_0x326e();}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a62_0x377716 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x1306eb){const _0x2f966c=a62_0x170f;return{'format':_0x1306eb[_0x2f966c(0xc2)]||_0x2f966c(0xc7),'output':_0x1306eb[_0x2f966c(0xe1)]||'','limit':_0x1306eb['limit'],'color':_0x1306eb[_0x2f966c(0xda)],'noColor':_0x1306eb[_0x2f966c(0xe0)]};}function convertSDKResultToQueryResult(_0x1d73ff){const _0x3b553e=a62_0x170f,_0x22fb31=[];if(_0x1d73ff[_0x3b553e(0xea)]>0x0){const _0x461376=_0x1d73ff[0x0];for(const [_0x55a2ae,_0xc7a87e]of Object[_0x3b553e(0xe2)](_0x461376)){let _0x512c27=_0x3b553e(0xeb);if(typeof _0xc7a87e===_0x3b553e(0xd9))_0x512c27=Number[_0x3b553e(0xde)](_0xc7a87e)?_0x3b553e(0xee):_0x3b553e(0xcc);else{if(typeof _0xc7a87e===_0x3b553e(0xbf))_0x512c27='boolean';else _0xc7a87e===null&&(_0x512c27='varchar');}_0x22fb31[_0x3b553e(0xcf)]({'name':_0x55a2ae,'type':_0x512c27});}}return{'queryId':'sdk-result','columns':_0x22fb31,'data':_0x1d73ff,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1d73ff[_0x3b553e(0xea)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x511b20,_0x2f13ba){const _0x149111=convertSDKResultToQueryResult(_0x511b20);return formatQueryOutput(_0x149111,_0x2f13ba);}export async function formatQueryOutput(_0x220ee8,_0x510fc8){const _0xadacf1=a62_0x170f,{format:_0x505ed6,limit:_0x9e2873,output:_0xfe3f00,color:_0x18581f,noColor:_0x4aa056}=_0x510fc8,_0x160823=Boolean(_0xfe3f00)&&!_0x18581f,_0x139460={'color':_0x18581f,'noColor':_0x4aa056||_0x160823};if(_0x505ed6===_0xadacf1(0xc7)){const _0x9ee3e5=shouldUseLess(_0x505ed6,_0xfe3f00);return formatAsTable(_0x220ee8,_0x9e2873,_0x9ee3e5,_0x139460);}else{if(_0x505ed6==='json')return formatAsJSON(_0x220ee8,_0x139460);else return _0x505ed6===_0xadacf1(0xd7)?formatAsJSONL(_0x220ee8,_0x139460):formatQueryResult(_0x220ee8,_0x505ed6);}}function shouldUseLess(_0x2c7c36,_0x1b32b8){const _0x10df0d=a62_0x170f;return _0x2c7c36===_0x10df0d(0xc7)&&process[_0x10df0d(0xc5)][_0x10df0d(0xd0)]&&!_0x1b32b8;}export function resolveOutputOptions(_0x4f7f65){const _0x2dcb50=a62_0x170f,_0x462058=resolveOutputFormat(_0x4f7f65[_0x2dcb50(0xc2)],_0x4f7f65[_0x2dcb50(0xe1)],_0x2dcb50(0xc7));let _0x4c2581=typeof _0x4f7f65[_0x2dcb50(0xf5)]===_0x2dcb50(0xd9)?_0x4f7f65[_0x2dcb50(0xf5)]:parseInt(_0x4f7f65[_0x2dcb50(0xf5)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x30c289=_0x4f7f65['output']||'';return shouldUseLess(_0x462058,_0x30c289)&&(_0x4c2581=Infinity),{'format':_0x462058,'output':_0x30c289,'limit':_0x4c2581,'color':_0x4f7f65[_0x2dcb50(0xda)],'noColor':_0x4f7f65[_0x2dcb50(0xe0)]};}export function writeOutput(_0xa9141,_0x4d52f5,_0x3af47d){const _0x50b5e5=a62_0x170f;return _0x4d52f5?(writeFileSync(_0x4d52f5,_0xa9141),console[_0x50b5e5(0xbe)]('Results\x20saved\x20to\x20'+_0x4d52f5),Promise[_0x50b5e5(0xe3)]()):shouldUseLess(_0x3af47d||'','')?new Promise(_0x3c4a75=>{const _0x3b4b10=_0x50b5e5,_0x1714ae=spawn(_0x3b4b10(0xdc),[_0x3b4b10(0xcd)],{'stdio':[_0x3b4b10(0xf2),'inherit','inherit']});let _0x990051=![];_0x1714ae['on'](_0x3b4b10(0xbe),()=>{!_0x990051&&(_0x990051=!![],console['log'](_0xa9141),_0x3c4a75());}),_0x1714ae['on']('close',()=>{!_0x990051&&(_0x990051=!![],_0x3c4a75());}),_0x1714ae['on']('spawn',()=>{const _0x5c777b=_0x3b4b10;!_0x990051&&_0x1714ae[_0x5c777b(0xd1)]&&(_0x1714ae[_0x5c777b(0xd1)]['on']('error',()=>{}),_0x1714ae[_0x5c777b(0xd1)][_0x5c777b(0xbc)](_0xa9141),_0x1714ae[_0x5c777b(0xd1)][_0x5c777b(0xdb)]());}),!_0x1714ae[_0x3b4b10(0xd1)]&&(!_0x990051&&(_0x990051=!![],console['log'](_0xa9141),_0x3c4a75()));}):(console[_0x50b5e5(0xf1)](_0xa9141),Promise['resolve']());}export async function handleSDKOutput(_0xbc8a5c,_0x9f6477){const _0x31bdf0=a62_0x170f,_0x35b587=resolveOutputOptions(_0x9f6477),_0x239ad5=await formatSDKOutput(_0xbc8a5c,_0x35b587);await writeOutput(_0x239ad5,_0x35b587[_0x31bdf0(0xe1)]||undefined,_0x35b587[_0x31bdf0(0xc2)]);}export async function handleQueryOutput(_0x2e0ac3,_0x486238){const _0x165dae=a62_0x170f,_0x10e03c=resolveOutputOptions(_0x486238),_0x2a1110=await formatQueryOutput(_0x2e0ac3,_0x10e03c);await writeOutput(_0x2a1110,_0x10e03c[_0x165dae(0xe1)]||undefined,_0x10e03c[_0x165dae(0xc2)]);}async function formatSingleObject(_0x48af7c,_0x1dc0cf){const _0x32fe88=a62_0x170f,{format:_0x2a624b,color:_0x4c2a2f,noColor:_0x224f2b}=_0x1dc0cf,_0x269b19={'color':_0x4c2a2f,'noColor':_0x224f2b};if(_0x2a624b===_0x32fe88(0xdf)){if(shouldUseColor(_0x269b19))return colorizeJSON(_0x48af7c,_0x269b19);return JSON[_0x32fe88(0xba)](_0x48af7c,null,0x2);}else{if(_0x2a624b===_0x32fe88(0xd7)){if(shouldUseColor(_0x269b19))return colorizeJSONCompact(_0x48af7c,_0x269b19);return JSON[_0x32fe88(0xba)](_0x48af7c);}else{if(_0x2a624b===_0x32fe88(0xd4))return Object[_0x32fe88(0xe2)](_0x48af7c)[_0x32fe88(0xf4)](([_0x17741,_0x46de00])=>_0x17741+'\x09'+_0x46de00)[_0x32fe88(0xec)]('\x0a');else{const _0x2aeec0=Object[_0x32fe88(0xe2)](_0x48af7c);if(_0x2aeec0[_0x32fe88(0xea)]===0x0)return'No\x20data';const _0x5f4b8c=_0x48af7c['debug'],_0x18977d=_0x48af7c['query'],_0x5e618b=_0x18977d?typeof _0x18977d==='string'?_0x18977d:JSON[_0x32fe88(0xba)](_0x18977d,null,0x2):undefined,_0x562ccb=_0x2aeec0[_0x32fe88(0xc6)](([_0x511921])=>_0x511921!=='debug'&&_0x511921!=='query'),_0x2784a3=Math[_0x32fe88(0xef)](..._0x562ccb[_0x32fe88(0xf4)](([_0x4c2fe6])=>_0x4c2fe6[_0x32fe88(0xea)])),_0xb10f45=Math[_0x32fe88(0xef)](..._0x562ccb['map'](([,_0x541da3])=>{const _0x46475e=_0x32fe88;try{const _0x158470=_0x541da3===null||_0x541da3===undefined?'':typeof _0x541da3===_0x46475e(0xcb)?JSON[_0x46475e(0xba)](_0x541da3):String(_0x541da3),_0x4bfc79=_0x158470['split']('\x0a');return Math['max'](..._0x4bfc79['map'](_0x4f8ded=>_0x4f8ded[_0x46475e(0xea)]),0x0);}catch{return 0x0;}}),0x14),_0x2a51c0=[];_0x2a51c0[_0x32fe88(0xcf)](colorBorder('┌─'+'─'[_0x32fe88(0xed)](_0x2784a3)+_0x32fe88(0xe9)+'─'[_0x32fe88(0xed)](_0xb10f45)+'─┐',_0x269b19)),_0x562ccb[_0x32fe88(0xc9)](([_0x1567da,_0x4e62a0])=>{const _0x4d82e9=_0x32fe88;let _0x35ac5e;try{_0x35ac5e=_0x4e62a0===null||_0x4e62a0===undefined?'':typeof _0x4e62a0==='object'?JSON['stringify'](_0x4e62a0):String(_0x4e62a0);}catch{_0x35ac5e=_0x4d82e9(0xe8);}const _0x3516f8=_0x1567da[_0x4d82e9(0xe5)](_0x2784a3),_0x487298=_0x35ac5e[_0x4d82e9(0xd2)]('\x0a');_0x487298['forEach']((_0x363cfb,_0x3dc8d9)=>{const _0x465928=_0x4d82e9,_0x463f73=colorBorder('│',_0x269b19);_0x3dc8d9===0x0?_0x2a51c0['push'](_0x463f73+'\x20'+_0x3516f8+'\x20'+_0x463f73+'\x20'+_0x363cfb[_0x465928(0xe5)](_0xb10f45)+'\x20'+_0x463f73):_0x2a51c0[_0x465928(0xcf)](_0x463f73+'\x20'+'\x20'[_0x465928(0xed)](_0x2784a3)+'\x20'+_0x463f73+'\x20'+_0x363cfb[_0x465928(0xe5)](_0xb10f45)+'\x20'+_0x463f73);});}),_0x2a51c0['push'](colorBorder('└─'+'─'[_0x32fe88(0xed)](_0x2784a3)+_0x32fe88(0xdd)+'─'[_0x32fe88(0xed)](_0xb10f45)+'─┘',_0x269b19));_0x5e618b&&(_0x2a51c0[_0x32fe88(0xcf)](''),_0x2a51c0[_0x32fe88(0xcf)](String(a62_0x377716[_0x32fe88(0xbd)][_0x32fe88(0xc0)](_0x32fe88(0xca)))),_0x2a51c0[_0x32fe88(0xcf)](_0x5e618b));if(_0x5f4b8c){if(_0x5f4b8c[_0x32fe88(0xc4)]){_0x2a51c0[_0x32fe88(0xcf)](''),_0x2a51c0[_0x32fe88(0xcf)](String(a62_0x377716[_0x32fe88(0xd5)][_0x32fe88(0xc0)](_0x32fe88(0xd3))));const _0x1f8138=_0x5f4b8c[_0x32fe88(0xc4)][_0x32fe88(0xd2)]('\x0a');_0x1f8138[_0x32fe88(0xc9)](_0x1e8945=>{const _0xc27b02=_0x32fe88;_0x1e8945[_0xc27b02(0xc3)]()&&_0x2a51c0[_0xc27b02(0xcf)](_0x1e8945);});}if(_0x5f4b8c[_0x32fe88(0xbb)]){_0x2a51c0['push'](''),_0x2a51c0[_0x32fe88(0xcf)](String(a62_0x377716[_0x32fe88(0xc8)][_0x32fe88(0xc0)]('[logs]')));const _0x3593b6=_0x5f4b8c[_0x32fe88(0xbb)][_0x32fe88(0xd2)]('\x0a');_0x3593b6['forEach'](_0x1883f1=>{const _0x4ce7c0=_0x32fe88;_0x1883f1[_0x4ce7c0(0xc3)]()&&_0x2a51c0[_0x4ce7c0(0xcf)](_0x1883f1);});}}return _0x2a51c0['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x15b9b0,_0x2b0bf7){const _0x5c7c12=a62_0x170f,_0x4b4e7e=resolveOutputOptions(_0x2b0bf7),_0x4b5ca2=await formatSingleObject(_0x15b9b0,_0x4b4e7e);await writeOutput(_0x4b5ca2,_0x4b4e7e[_0x5c7c12(0xe1)]||undefined,_0x4b4e7e[_0x5c7c12(0xc2)]);}
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28ae10,_0xb8bbae){const _0x32de9e=a63_0x520d,_0xbba833=_0x28ae10();while(!![]){try{const _0x1be206=parseInt(_0x32de9e(0x79))/0x1+parseInt(_0x32de9e(0x77))/0x2+parseInt(_0x32de9e(0x7e))/0x3+-parseInt(_0x32de9e(0x7b))/0x4+parseInt(_0x32de9e(0x7a))/0x5*(parseInt(_0x32de9e(0x78))/0x6)+-parseInt(_0x32de9e(0x7c))/0x7*(-parseInt(_0x32de9e(0x76))/0x8)+-parseInt(_0x32de9e(0x7d))/0x9*(parseInt(_0x32de9e(0x74))/0xa);if(_0x1be206===_0xb8bbae)break;else _0xbba833['push'](_0xbba833['shift']());}catch(_0x55f128){_0xbba833['push'](_0xbba833['shift']());}}}(a63_0x33c5,0xa93dc));export const DEFAULT_DISPLAY_LIMIT=0x28;function a63_0x33c5(){const _0x4582db=['2125760aVJsnC','6202584FRbITW','2650992RxlLMc','30dYWdxI','number','16mYRnGg','1382792ezPuIL','1101066RSiFFO','570368igReaJ','25orYfJu','3638412ZqMIIa'];a63_0x33c5=function(){return _0x4582db;};return a63_0x33c5();}export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;function a63_0x520d(_0x3c1d1c,_0x2be17e){const _0x33c5fe=a63_0x33c5();return a63_0x520d=function(_0x520d1b,_0x3207f8){_0x520d1b=_0x520d1b-0x74;let _0x7a049a=_0x33c5fe[_0x520d1b];return _0x7a049a;},a63_0x520d(_0x3c1d1c,_0x2be17e);}export function resolveLimit(_0x34c256,_0x5c5d5f){const _0x329464=a63_0x520d;if(_0x34c256===undefined)return _0x5c5d5f;if(typeof _0x34c256===_0x329464(0x75))return _0x34c256;return parseInt(_0x34c256,0xa);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x331290,_0x1b1425){const _0x35e7f9=a64_0x3cd5,_0x40c46d=_0x331290();while(!![]){try{const _0xca2207=parseInt(_0x35e7f9(0x1a5))/0x1*(-parseInt(_0x35e7f9(0x1a0))/0x2)+-parseInt(_0x35e7f9(0x1b0))/0x3*(-parseInt(_0x35e7f9(0x1a8))/0x4)+parseInt(_0x35e7f9(0x1ab))/0x5+parseInt(_0x35e7f9(0x1a9))/0x6+parseInt(_0x35e7f9(0x1af))/0x7+parseInt(_0x35e7f9(0x1aa))/0x8+-parseInt(_0x35e7f9(0x19e))/0x9*(parseInt(_0x35e7f9(0x1a7))/0xa);if(_0xca2207===_0x1b1425)break;else _0x40c46d['push'](_0x40c46d['shift']());}catch(_0x2d23ee){_0x40c46d['push'](_0x40c46d['shift']());}}}(a64_0x3b7f,0x6cbe2));import*as a64_0x3da3d2 from'node:fs';function a64_0x3cd5(_0xe799ed,_0xa2bd49){const _0x3b7fcd=a64_0x3b7f();return a64_0x3cd5=function(_0x3cd5ab,_0x55123d){_0x3cd5ab=_0x3cd5ab-0x19e;let _0x3c970b=_0x3b7fcd[_0x3cd5ab];return _0x3c970b;},a64_0x3cd5(_0xe799ed,_0xa2bd49);}import*as a64_0x5c6d05 from'node:path';export function setSecureFilePermissions(_0x2f260e){const _0x181668=a64_0x3cd5;try{a64_0x3da3d2[_0x181668(0x19f)](_0x2f260e,0x180);}catch{console['warn'](_0x181668(0x1a6)+_0x2f260e);}}export function setSecureDirectoryPermissions(_0x5cd62b){const _0x5ec65c=a64_0x3cd5;try{a64_0x3da3d2['chmodSync'](_0x5cd62b,0x1c0);}catch{console[_0x5ec65c(0x1ae)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x5cd62b);}}export function createSecureDirectory(_0x45411a){const _0x2d1f35=a64_0x3cd5;!a64_0x3da3d2['existsSync'](_0x45411a)&&(a64_0x3da3d2[_0x2d1f35(0x1ad)](_0x45411a,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x45411a));}function a64_0x3b7f(){const _0x27de09=['392NKNrlE','599400IOeHcV','3468656LtAmVC','1471175rzyfPz','writeFileSync','mkdirSync','warn','370769oqXdKi','16527GGxwpf','1962OELqRq','chmodSync','15172mWEhrm','Warning:\x20',').\x20','toString','statSync','113dxNCCc','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','5410QTYEsX'];a64_0x3b7f=function(){return _0x27de09;};return a64_0x3b7f();}export function validateSecureFilePermissions(_0x11805d){const _0x289221=a64_0x3cd5;try{const _0x2ed1f3=a64_0x3da3d2[_0x289221(0x1a4)](_0x11805d),_0x5a282f=_0x2ed1f3['mode']&0x1ff,_0x2cb1d7=(_0x5a282f&0x3f)!==0x0;if(_0x2cb1d7)return console[_0x289221(0x1ae)](_0x289221(0x1a1)+_0x11805d+'\x20has\x20insecure\x20permissions\x20('+_0x5a282f[_0x289221(0x1a3)](0x8)+_0x289221(0x1a2)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x55368f,_0x294645){const _0x589290=a64_0x3cd5,_0x5f07bb=a64_0x5c6d05['dirname'](_0x55368f);createSecureDirectory(_0x5f07bb),a64_0x3da3d2[_0x589290(0x1ac)](_0x55368f,_0x294645,{'mode':0x180}),setSecureFilePermissions(_0x55368f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a65_0x3847(_0x2873fb,_0x2cd701){const _0x8531b9=a65_0x8531();return a65_0x3847=function(_0x3847f4,_0xd0f1f7){_0x3847f4=_0x3847f4-0x91;let _0x13b73c=_0x8531b9[_0x3847f4];return _0x13b73c;},a65_0x3847(_0x2873fb,_0x2cd701);}(function(_0x2f5d39,_0x3a6b2d){const _0x206486=a65_0x3847,_0x24baf5=_0x2f5d39();while(!![]){try{const _0x370e79=parseInt(_0x206486(0x91))/0x1+parseInt(_0x206486(0x9b))/0x2+-parseInt(_0x206486(0x9d))/0x3+-parseInt(_0x206486(0x99))/0x4+-parseInt(_0x206486(0x97))/0x5*(-parseInt(_0x206486(0x9c))/0x6)+-parseInt(_0x206486(0x95))/0x7*(-parseInt(_0x206486(0x94))/0x8)+-parseInt(_0x206486(0x9a))/0x9;if(_0x370e79===_0x3a6b2d)break;else _0x24baf5['push'](_0x24baf5['shift']());}catch(_0x447d13){_0x24baf5['push'](_0x24baf5['shift']());}}}(a65_0x8531,0x32eb9));function a65_0x8531(){const _0x2efc70=['100DpcVIf','txt','842272AIAUcK','6232959JixPjR','795758zstdsN','81150zPnGvP','310602JpSsSB','json','pop','tab','177468FLRVEW','jsonl','split','3000zqRuhG','6895dajCpP','text'];a65_0x8531=function(){return _0x2efc70;};return a65_0x8531();}export function detectFormatFromExtension(_0x205c51){const _0x2dd0e6=a65_0x3847,_0x1ad635=_0x205c51['toLowerCase']()[_0x2dd0e6(0x93)]('.')[_0x2dd0e6(0x9f)]();switch(_0x1ad635){case _0x2dd0e6(0x9e):return _0x2dd0e6(0x9e);case _0x2dd0e6(0x92):return _0x2dd0e6(0x92);case'tsv':case _0x2dd0e6(0xa0):return'tsv';case _0x2dd0e6(0x98):case _0x2dd0e6(0x96):return'table';default:return undefined;}}export function resolveOutputFormat(_0x34b63e,_0x3c89a0,_0xb5034c){if(_0x34b63e)return _0x34b63e;if(_0x3c89a0){const _0x866c=detectFormatFromExtension(_0x3c89a0);if(_0x866c)return _0x866c;}return _0xb5034c;}
|
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(_0x4f8b78,_0x4b499b){const _0x1c9f13=a66_0x1a69,_0x1deffc=_0x4f8b78();while(!![]){try{const _0x4d8c87=-parseInt(_0x1c9f13(0xc9))/0x1+-parseInt(_0x1c9f13(0xbf))/0x2*(parseInt(_0x1c9f13(0xee))/0x3)+parseInt(_0x1c9f13(0xd9))/0x4+parseInt(_0x1c9f13(0xf4))/0x5*(parseInt(_0x1c9f13(0xe7))/0x6)+-parseInt(_0x1c9f13(0xdc))/0x7+-parseInt(_0x1c9f13(0xd4))/0x8*(-parseInt(_0x1c9f13(0xc0))/0x9)+parseInt(_0x1c9f13(0xf1))/0xa;if(_0x4d8c87===_0x4b499b)break;else _0x1deffc['push'](_0x1deffc['shift']());}catch(_0x114c31){_0x1deffc['push'](_0x1deffc['shift']());}}}(a66_0x3cf8,0x3d106));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 a66_0x3cf8(){const _0x7d75d2=['768090iDbDZv','tsv','log','timestamp','202WNKNYX','405fleBWa','repeat','columns','stringify','push','map','max','padEnd','number','359610eaaCNf','floor','long','date','array','entries','data','row','pow','double','stdout','56008rRQcCO','No\x20rows\x20returned','min','object','replace','187276uTtqXJ','string','true','1352099GBLLBS','boolean','jsonl','slice','substring','json','toLowerCase','type','\x20rows\x20(','toString','\x20row','6XPTHtN','name','bool','toFixed','0\x20B','join','false','14151kAqoat','toISOString','length','7638200zKmULB','reduce','startsWith'];a66_0x3cf8=function(){return _0x7d75d2;};return a66_0x3cf8();}function getTerminalWidth(){const _0x9df38b=a66_0x1a69;return process[_0x9df38b(0xd3)][_0x9df38b(0xc2)]||Infinity;}export function formatAsTable(_0x5e4ed7,_0x329826=DEFAULT_MAX_DISPLAY_ROWS,_0x3d71b3=![],_0x72c3a0={}){const _0x3a7e91=a66_0x1a69;if(_0x5e4ed7['data'][_0x3a7e91(0xf0)]===0x0)return _0x3a7e91(0xd5);const _0x47f170=_0x5e4ed7[_0x3a7e91(0xc2)][_0x3a7e91(0xc5)](_0x232538=>_0x232538[_0x3a7e91(0xe8)]),_0x23c351=_0x5e4ed7[_0x3a7e91(0xc2)][_0x3a7e91(0xc5)](_0x10e57e=>simplifyType(_0x10e57e[_0x3a7e91(0xe3)])),_0x1013ee=_0x5e4ed7[_0x3a7e91(0xcf)][_0x3a7e91(0xdf)](0x0,_0x329826),_0x3a0f22=_0x5e4ed7[_0x3a7e91(0xcf)][_0x3a7e91(0xf0)],_0x245ec0=_0x3a0f22>_0x329826,_0x37cc4d=[],_0x384e40=getTerminalWidth(),_0x57480b=_0x384e40!==Infinity,_0x556a20=0x32;let _0x476abb=_0x47f170[_0x3a7e91(0xc5)]((_0x2d1b91,_0x1c568c)=>{const _0x3f2597=_0x3a7e91,_0x534ded=stringWidth(_0x23c351[_0x1c568c]),_0x5c2439=Math[_0x3f2597(0xc6)](..._0x1013ee[_0x3f2597(0xc5)](_0x277f52=>{const _0x26d1a6=_0x277f52[_0x2d1b91];return stringWidth(formatValue(_0x26d1a6));})),_0x255b2a=Math[_0x3f2597(0xc6)](stringWidth(_0x2d1b91),_0x534ded,_0x5c2439);return _0x3d71b3?_0x255b2a:Math['min'](_0x255b2a,_0x556a20);});if(_0x57480b&&!_0x3d71b3&&_0x47f170[_0x3a7e91(0xf0)]>0x0){const _0x3ed682=_0xca15ac=>{let _0x5d9ff8=0x1;for(const _0x1cb2ba of _0xca15ac){_0x5d9ff8+=_0x1cb2ba+0x3;}return _0x5d9ff8+0x1;};let _0x47fe6d=_0x3ed682(_0x476abb);if(_0x47fe6d>_0x384e40){const _0x550799=0x3;for(let _0x2ce56c=_0x476abb[_0x3a7e91(0xf0)]-0x1;_0x2ce56c>=0x0;_0x2ce56c--){_0x47fe6d=_0x3ed682(_0x476abb);if(_0x47fe6d<=_0x384e40)break;const _0x225ab6=_0x476abb[_0x2ce56c],_0x24cd0a=_0x47fe6d-_0x384e40,_0x432492=_0x225ab6-_0x550799,_0x54415c=Math[_0x3a7e91(0xd6)](_0x24cd0a,_0x432492);_0x54415c>0x0&&(_0x476abb[_0x2ce56c]=_0x225ab6-_0x54415c);}}}const _0x158b76=_0x47f170,_0x54d130=_0x23c351,_0x194eeb=_0x476abb,_0x202095=_0x476abb;_0x37cc4d[_0x3a7e91(0xc4)](colorBorder('┌'+_0x202095['map'](_0x181994=>'─'[_0x3a7e91(0xc1)](_0x181994+0x2))[_0x3a7e91(0xec)]('┬')+'┐',_0x72c3a0));const _0x5667a0=_0x158b76['map']((_0x1677f1,_0x217c91)=>centerAlign(_0x1677f1,_0x194eeb[_0x217c91]));_0x37cc4d['push'](colorBorder('│',_0x72c3a0)+'\x20'+_0x5667a0[_0x3a7e91(0xec)]('\x20'+colorBorder('│',_0x72c3a0)+'\x20')+'\x20'+colorBorder('│',_0x72c3a0));const _0x93b9=_0x54d130[_0x3a7e91(0xc5)]((_0x404f19,_0x3d6030)=>colorType(centerAlign(_0x404f19,_0x194eeb[_0x3d6030]),_0x72c3a0));_0x37cc4d[_0x3a7e91(0xc4)](colorBorder('│',_0x72c3a0)+'\x20'+_0x93b9[_0x3a7e91(0xec)]('\x20'+colorBorder('│',_0x72c3a0)+'\x20')+'\x20'+colorBorder('│',_0x72c3a0)),_0x37cc4d['push'](colorBorder('├'+_0x202095[_0x3a7e91(0xc5)](_0xebd05d=>'─'[_0x3a7e91(0xc1)](_0xebd05d+0x2))[_0x3a7e91(0xec)]('┼')+'┤',_0x72c3a0));const _0x463ae4=(_0x5122ff,_0x2a5b9a)=>{const _0x270012=_0x3a7e91,_0xa4ffaa=stringWidth(_0x5122ff);if(_0xa4ffaa<=_0x2a5b9a)return _0x5122ff;let _0x3bd3e9=_0x5122ff;while(stringWidth(_0x3bd3e9+'…')>_0x2a5b9a&&_0x3bd3e9[_0x270012(0xf0)]>0x0){_0x3bd3e9=_0x3bd3e9[_0x270012(0xdf)](0x0,-0x1);}return _0x3bd3e9+'…';};_0x1013ee['forEach'](_0x3c8d8e=>{const _0x534924=_0x3a7e91,_0x5b5c33=_0x47f170[_0x534924(0xc5)]((_0x49ab78,_0x2e03cb)=>{const _0x1d112e=_0x534924,_0x920470=_0x3c8d8e[_0x49ab78],_0x2e2d58=formatValue(_0x920470),_0x1d5ea8=_0x194eeb[_0x2e03cb],_0x2572a0=_0x463ae4(_0x2e2d58,_0x1d5ea8),_0x83e81d=typeof _0x920470==='number'||typeof _0x920470===_0x1d112e(0xda)&&/^-?\d+$/['test'](_0x920470);return _0x83e81d?padStart(_0x2572a0,_0x1d5ea8):padEnd(_0x2572a0,_0x1d5ea8);});_0x37cc4d[_0x534924(0xc4)](colorBorder('│',_0x72c3a0)+'\x20'+_0x5b5c33[_0x534924(0xec)]('\x20'+colorBorder('│',_0x72c3a0)+'\x20')+'\x20'+colorBorder('│',_0x72c3a0));});const _0x4bd889=_0x202095[_0x3a7e91(0xf2)]((_0x395516,_0x407167)=>_0x395516+_0x407167+0x3,-0x1);_0x37cc4d[_0x3a7e91(0xc4)](colorBorder('├'+_0x202095[_0x3a7e91(0xc5)](_0x550d83=>'─'[_0x3a7e91(0xc1)](_0x550d83+0x2))[_0x3a7e91(0xec)]('┴')+'┤',_0x72c3a0));let _0x5d8abf;_0x245ec0?_0x5d8abf=_0x3a0f22+_0x3a7e91(0xe4)+_0x329826+'\x20shown)':_0x5d8abf=_0x3a0f22+_0x3a7e91(0xe6)+(_0x3a0f22===0x1?'':'s');const _0x332b16=_0x5d8abf[_0x3a7e91(0xc7)](_0x4bd889-0x2);return _0x37cc4d[_0x3a7e91(0xc4)](colorBorder('│',_0x72c3a0)+'\x20'+_0x332b16+'\x20'+colorBorder('│',_0x72c3a0)),_0x37cc4d[_0x3a7e91(0xc4)](colorBorder('└'+'─'[_0x3a7e91(0xc1)](_0x4bd889)+'┘',_0x72c3a0)),_0x37cc4d[_0x3a7e91(0xec)]('\x0a');}function simplifyType(_0x2edb9a){const _0x3840d3=a66_0x1a69,_0x3c372b={'varchar':_0x3840d3(0xda),'bigint':_0x3840d3(0xcb),'integer':'int','double':_0x3840d3(0xd2),'boolean':_0x3840d3(0xe9),'date':_0x3840d3(0xcc),'timestamp':_0x3840d3(0xbe),'array':_0x3840d3(0xcd),'map':_0x3840d3(0xc5),'row':_0x3840d3(0xd0)},_0x4ef7ba=_0x2edb9a[_0x3840d3(0xe2)]();for(const [_0x2840ce,_0x24ddeb]of Object[_0x3840d3(0xce)](_0x3c372b)){if(_0x4ef7ba[_0x3840d3(0xf3)](_0x2840ce))return _0x24ddeb;}return _0x2edb9a[_0x3840d3(0xf0)]>0xa?_0x2edb9a[_0x3840d3(0xe0)](0x0,0xa):_0x2edb9a;}export function formatAsJSON(_0x3f1c7b,_0x5b0f07={}){const _0x4512ba=a66_0x1a69;if(_0x3f1c7b[_0x4512ba(0xcf)][_0x4512ba(0xf0)]===0x0)return'[]';if(shouldUseColor(_0x5b0f07))return colorizeJSON(_0x3f1c7b[_0x4512ba(0xcf)],_0x5b0f07);const _0x4f9940=_0x3f1c7b['data'][_0x4512ba(0xc5)](_0x20b72c=>'\x20\x20'+JSON[_0x4512ba(0xc3)](_0x20b72c));return'[\x0a'+_0x4f9940[_0x4512ba(0xec)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0xc8f984,_0x20b019={}){const _0x44e63f=a66_0x1a69;if(_0xc8f984['data']['length']===0x0)return'';if(shouldUseColor(_0x20b019))return _0xc8f984['data']['map'](_0x2b5ddd=>colorizeJSONCompact(_0x2b5ddd,_0x20b019))['join']('\x0a');return _0xc8f984[_0x44e63f(0xcf)][_0x44e63f(0xc5)](_0x5cdd98=>JSON[_0x44e63f(0xc3)](_0x5cdd98))['join']('\x0a');}export function formatAsTSV(_0x3d0dfb){const _0x565d70=a66_0x1a69;if(_0x3d0dfb[_0x565d70(0xcf)][_0x565d70(0xf0)]===0x0)return'';const _0x72cf2e=[],_0x56acac=_0x3d0dfb[_0x565d70(0xc2)][_0x565d70(0xc5)](_0x43b370=>_0x43b370['name']);return _0x72cf2e[_0x565d70(0xc4)](_0x56acac[_0x565d70(0xec)]('\x09')),_0x3d0dfb['data']['forEach'](_0x328b53=>{const _0x21546e=_0x565d70,_0x32e54c=_0x56acac[_0x21546e(0xc5)](_0x39099f=>{const _0x3dcbc3=_0x328b53[_0x39099f];return formatValueForTSV(_0x3dcbc3);});_0x72cf2e[_0x21546e(0xc4)](_0x32e54c[_0x21546e(0xec)]('\x09'));}),_0x72cf2e[_0x565d70(0xec)]('\x0a');}function a66_0x1a69(_0xc751cd,_0x26a616){const _0x3cf8f6=a66_0x3cf8();return a66_0x1a69=function(_0x1a695b,_0x5e97d5){_0x1a695b=_0x1a695b-0xbe;let _0x30eb33=_0x3cf8f6[_0x1a695b];return _0x30eb33;},a66_0x1a69(_0xc751cd,_0x26a616);}function formatValue(_0x474bc1){const _0x1e02a3=a66_0x1a69;if(_0x474bc1===null||_0x474bc1===undefined)return'';if(typeof _0x474bc1===_0x1e02a3(0xda)){const _0x959e47=_0x474bc1[_0x1e02a3(0xd8)](/\n/g,'\x5cn')[_0x1e02a3(0xd8)](/\r/g,'\x5cr')[_0x1e02a3(0xd8)](/\t/g,'\x5ct');return _0x959e47;}if(typeof _0x474bc1===_0x1e02a3(0xc8))return String(_0x474bc1);if(typeof _0x474bc1==='boolean')return _0x474bc1?_0x1e02a3(0xdb):_0x1e02a3(0xed);if(_0x474bc1 instanceof Date)return _0x474bc1[_0x1e02a3(0xef)]();if(typeof _0x474bc1===_0x1e02a3(0xd7))return JSON[_0x1e02a3(0xc3)](_0x474bc1);return String(_0x474bc1);}function formatValueForTSV(_0x431fd3){const _0x247a44=a66_0x1a69;if(_0x431fd3===null||_0x431fd3===undefined)return'';if(typeof _0x431fd3==='string')return _0x431fd3[_0x247a44(0xd8)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x431fd3===_0x247a44(0xc8)||typeof _0x431fd3===_0x247a44(0xdd))return String(_0x431fd3);if(_0x431fd3 instanceof Date)return _0x431fd3['toISOString']();if(typeof _0x431fd3===_0x247a44(0xd7))return JSON[_0x247a44(0xc3)](_0x431fd3);return String(_0x431fd3);}export function formatQueryResult(_0x3d3683,_0xb30b55){const _0x597eeb=a66_0x1a69;switch(_0xb30b55){case'table':return formatAsTable(_0x3d3683);case _0x597eeb(0xe1):return formatAsJSON(_0x3d3683);case _0x597eeb(0xde):return formatAsJSONL(_0x3d3683);case _0x597eeb(0xf5):return formatAsTSV(_0x3d3683);default:return formatAsJSON(_0x3d3683);}}export function formatBytes(_0xecf04f){const _0x58b1a4=a66_0x1a69;if(_0xecf04f===0x0)return _0x58b1a4(0xeb);const _0x2d5bcd=['B','KB','MB','GB','TB'],_0x36c6aa=0x400,_0x35ca8d=Math['floor'](Math[_0x58b1a4(0xf6)](_0xecf04f)/Math[_0x58b1a4(0xf6)](_0x36c6aa)),_0x1027b2=_0xecf04f/Math[_0x58b1a4(0xd1)](_0x36c6aa,_0x35ca8d),_0x1fc6c6=_0x1027b2>=0xa?0x1:0x2;return _0x1027b2[_0x58b1a4(0xea)](_0x1fc6c6)+'\x20'+_0x2d5bcd[_0x35ca8d];}export function formatRows(_0x85d977){const _0x44dd08=a66_0x1a69;if(_0x85d977==null)return'-';if(_0x85d977===0x0)return'0';if(_0x85d977<0x3e8)return _0x85d977[_0x44dd08(0xe5)]();const _0x7b8fc8=['','K','M','B','T'],_0x24815a=0x3e8,_0x4196ee=Math[_0x44dd08(0xca)](Math[_0x44dd08(0xf6)](_0x85d977)/Math['log'](_0x24815a)),_0x1cc955=_0x85d977/Math[_0x44dd08(0xd1)](_0x24815a,_0x4196ee),_0x4518a5=_0x1cc955>=0xa?0x1:0x2;return''+_0x1cc955[_0x44dd08(0xea)](_0x4518a5)+_0x7b8fc8[_0x4196ee];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a67_0x3b90(){const _0x172620=['PERMISSION_DENIED','10077152BOPOoT','2222828EJHJmp','File\x20not\x20found:\x20','INVALID_ARGUMENT','EACCES','parse','1gejnKE','420882LjelqV','3zBBjBJ','Invalid\x20JSON\x20string:\x20','22978116QpfBLg','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','6479646bsPOwT','79005hIMPFf','code','\x27:\x20','2148106RJqmkl','message'];a67_0x3b90=function(){return _0x172620;};return a67_0x3b90();}(function(_0x4a7429,_0x3cce91){const _0x5c7aa4=a67_0x43d2,_0x94710a=_0x4a7429();while(!![]){try{const _0x319240=-parseInt(_0x5c7aa4(0xd6))/0x1*(parseInt(_0x5c7aa4(0xcd))/0x2)+parseInt(_0x5c7aa4(0xc5))/0x3*(-parseInt(_0x5c7aa4(0xd1))/0x4)+-parseInt(_0x5c7aa4(0xca))/0x5+parseInt(_0x5c7aa4(0xc9))/0x6+-parseInt(_0x5c7aa4(0xc4))/0x7+-parseInt(_0x5c7aa4(0xd0))/0x8+parseInt(_0x5c7aa4(0xc7))/0x9;if(_0x319240===_0x3cce91)break;else _0x94710a['push'](_0x94710a['shift']());}catch(_0x43e2bf){_0x94710a['push'](_0x94710a['shift']());}}}(a67_0x3b90,0xa3056));import{readFile}from'fs/promises';function a67_0x43d2(_0x3134ea,_0x2fb9e5){const _0x3b9020=a67_0x3b90();return a67_0x43d2=function(_0x43d286,_0x186a14){_0x43d286=_0x43d286-0xc4;let _0x43308c=_0x3b9020[_0x43d286];return _0x43308c;},a67_0x43d2(_0x3134ea,_0x2fb9e5);}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x1a36c4,_0x491bbb){const _0x20d08f=a67_0x43d2;try{if(_0x491bbb){const _0x57c0cf=await readFile(_0x1a36c4,'utf-8');try{return JSON[_0x20d08f(0xd5)](_0x57c0cf);}catch(_0x4a2a0b){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x1a36c4+_0x20d08f(0xcc)+(_0x4a2a0b instanceof Error?_0x4a2a0b['message']:String(_0x4a2a0b)));}}else try{return JSON[_0x20d08f(0xd5)](_0x1a36c4);}catch(_0x529a30){throw new SDKError(ErrorCode[_0x20d08f(0xd3)],_0x20d08f(0xc6)+(_0x529a30 instanceof Error?_0x529a30['message']:String(_0x529a30)));}}catch(_0x535749){if(_0x535749 instanceof SDKError)throw _0x535749;if(_0x535749 instanceof Error&&_0x20d08f(0xcb)in _0x535749){const _0x22319f=_0x535749;if(_0x22319f['code']==='ENOENT')throw new SDKError(ErrorCode['NOT_FOUND'],_0x20d08f(0xd2)+_0x1a36c4);else{if(_0x22319f[_0x20d08f(0xcb)]===_0x20d08f(0xd4))throw new SDKError(ErrorCode[_0x20d08f(0xcf)],'Permission\x20denied\x20reading\x20file:\x20'+_0x1a36c4);}}throw new SDKError(ErrorCode['INTERNAL'],'Failed\x20to\x20load\x20JSON:\x20'+(_0x535749 instanceof Error?_0x535749[_0x20d08f(0xce)]:String(_0x535749)));}}export async function loadJSONFromOptions(_0x5ec232,_0x615f18){const _0x4b888f=a67_0x43d2;if(_0x5ec232&&_0x615f18)throw new SDKError(ErrorCode[_0x4b888f(0xd3)],_0x4b888f(0xc8));if(_0x5ec232)return await loadJSON(_0x5ec232,![]);if(_0x615f18)return await loadJSON(_0x615f18,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0x20d444=a68_0x26fc;(function(_0x22ecd7,_0x2a6766){const _0x317329=a68_0x26fc,_0x1ddf55=_0x22ecd7();while(!![]){try{const _0x46553a=-parseInt(_0x317329(0x1d4))/0x1*(-parseInt(_0x317329(0x1d7))/0x2)+-parseInt(_0x317329(0x1d6))/0x3+-parseInt(_0x317329(0x1da))/0x4*(parseInt(_0x317329(0x1d9))/0x5)+parseInt(_0x317329(0x1d2))/0x6+-parseInt(_0x317329(0x1d1))/0x7+-parseInt(_0x317329(0x1d0))/0x8*(parseInt(_0x317329(0x1cf))/0x9)+parseInt(_0x317329(0x1d3))/0xa;if(_0x46553a===_0x2a6766)break;else _0x1ddf55['push'](_0x1ddf55['shift']());}catch(_0x469b3a){_0x1ddf55['push'](_0x1ddf55['shift']());}}}(a68_0xc2de,0x75bfb));const MODEL_ALIASES={'haiku':a68_0x20d444(0x1db),'sonnet':a68_0x20d444(0x1d8)};export function extractModelAlias(_0x337c54){const _0x100e7c=a68_0x20d444,_0x101ce0=_0x337c54[_0x100e7c(0x1d5)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x101ce0)return _0x101ce0[0x1][_0x100e7c(0x1dc)]();return _0x337c54;}export function resolveModelAlias(_0x13dfbe){const _0x33f3ea=a68_0x20d444;return MODEL_ALIASES[_0x13dfbe[_0x33f3ea(0x1dc)]()]||_0x13dfbe;}function a68_0x26fc(_0x47dd0f,_0x3251af){const _0xc2de85=a68_0xc2de();return a68_0x26fc=function(_0x26fc63,_0x2ff08b){_0x26fc63=_0x26fc63-0x1cf;let _0x37238b=_0xc2de85[_0x26fc63];return _0x37238b;},a68_0x26fc(_0x47dd0f,_0x3251af);}export function getModelAliases(){return{...MODEL_ALIASES};}function a68_0xc2de(){const _0x53685f=['2720640tbUxop','10646270MhCZqM','441001aXFCNP','match','496530CBuRAx','2oSSqDU','claude-4.5-sonnet','920aegvZR','2640LAmPqY','claude-4.5-haiku','toLowerCase','4194396DuKgcG','8roCaKC','5066425IPChIN'];a68_0xc2de=function(){return _0x53685f;};return a68_0xc2de();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a69_0x137f(_0x205377,_0x186f75){const _0x9480d4=a69_0x9480();return a69_0x137f=function(_0x137f53,_0x5da21a){_0x137f53=_0x137f53-0x1df;let _0x4a2451=_0x9480d4[_0x137f53];return _0x4a2451;},a69_0x137f(_0x205377,_0x186f75);}function a69_0x9480(){const _0x8827e0=['78WYDgYd','.\x20Must\x20be\x20a\x20positive\x20integer.','Invalid\x20limit\x20value:\x20','3424516wWPHYE','number','.\x20Must\x20be\x20a\x20positive\x20number.','2301948ZZFOwx','.\x20Must\x20be\x20a\x20number.','429185lSogON','7gmsvdd','Invalid\x20timeout\x20value:\x20','1168857xdVvpz','isInteger','240994YvloBq','892072UtHlII','130TcMBip','194778sFrOHD'];a69_0x9480=function(){return _0x8827e0;};return a69_0x9480();}(function(_0x32851c,_0x9993c6){const _0x55cab0=a69_0x137f,_0x5e0023=_0x32851c();while(!![]){try{const _0x308358=-parseInt(_0x55cab0(0x1e7))/0x1+parseInt(_0x55cab0(0x1ea))/0x2+parseInt(_0x55cab0(0x1e0))/0x3+parseInt(_0x55cab0(0x1ee))/0x4+parseInt(_0x55cab0(0x1e2))/0x5*(parseInt(_0x55cab0(0x1eb))/0x6)+-parseInt(_0x55cab0(0x1e3))/0x7*(parseInt(_0x55cab0(0x1e8))/0x8)+parseInt(_0x55cab0(0x1e5))/0x9*(-parseInt(_0x55cab0(0x1e9))/0xa);if(_0x308358===_0x9993c6)break;else _0x5e0023['push'](_0x5e0023['shift']());}catch(_0x3ade71){_0x5e0023['push'](_0x5e0023['shift']());}}}(a69_0x9480,0xc24d7));export function validateLimitOption(_0x4578cf){const _0x50c266=a69_0x137f;if(!Number[_0x50c266(0x1e6)](_0x4578cf))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x4578cf+'.\x20Must\x20be\x20an\x20integer.'};if(_0x4578cf<=0x0)return{'isValid':![],'error':_0x50c266(0x1ed)+_0x4578cf+_0x50c266(0x1ec)};return{'isValid':!![],'value':_0x4578cf};}export function validateTimeoutOption(_0x476209,_0x1554d8=0x1e){const _0x51e666=a69_0x137f;if(_0x476209===undefined)return{'isValid':!![],'value':_0x1554d8};const _0x3d8191=typeof _0x476209===_0x51e666(0x1ef)?_0x476209:parseFloat(_0x476209);if(isNaN(_0x3d8191))return{'isValid':![],'error':_0x51e666(0x1e4)+_0x476209+_0x51e666(0x1e1)};if(_0x3d8191<=0x0)return{'isValid':![],'error':_0x51e666(0x1e4)+_0x3d8191+_0x51e666(0x1df)};return{'isValid':!![],'value':_0x3d8191};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a70_0x4e86(){const _0x36d53b=['29313laKrAa','36QQlmJe','once','0.0.0.0','3464dqqOgD','error','No\x20available\x20port\x20found\x20between\x20','158978rILAVp','close','2560BggLfy','2765516GuPviA','90770SxSNgw','\x20and\x20','517YxDHvm','457388sZkXSe','3UWheqp','listen','1182ZgUliq','listening','904rJGhSY','12621OitsXm','code'];a70_0x4e86=function(){return _0x36d53b;};return a70_0x4e86();}(function(_0xd0549f,_0x587983){const _0x2d862a=a70_0x34a1,_0x2d91fb=_0xd0549f();while(!![]){try{const _0x1fe2c4=-parseInt(_0x2d862a(0xb9))/0x1+parseInt(_0x2d862a(0xaa))/0x2*(-parseInt(_0x2d862a(0xab))/0x3)+parseInt(_0x2d862a(0xb6))/0x4*(-parseInt(_0x2d862a(0xbb))/0x5)+-parseInt(_0x2d862a(0xad))/0x6*(parseInt(_0x2d862a(0xb0))/0x7)+parseInt(_0x2d862a(0xaf))/0x8*(parseInt(_0x2d862a(0xb2))/0x9)+parseInt(_0x2d862a(0xbd))/0xa*(parseInt(_0x2d862a(0xbf))/0xb)+-parseInt(_0x2d862a(0xb3))/0xc*(-parseInt(_0x2d862a(0xbc))/0xd);if(_0x1fe2c4===_0x587983)break;else _0x2d91fb['push'](_0x2d91fb['shift']());}catch(_0x1d7a4e){_0x2d91fb['push'](_0x2d91fb['shift']());}}}(a70_0x4e86,0x3c349));import{createServer}from'node:net';export async function isPortAvailable(_0x20f981){return new Promise(_0x52c358=>{const _0x517421=a70_0x34a1,_0xeda5a9=createServer();_0xeda5a9[_0x517421(0xb4)](_0x517421(0xb7),_0x3bb9e4=>{const _0x4699bb=_0x517421;_0x3bb9e4[_0x4699bb(0xb1)]==='EADDRINUSE'?_0x52c358(![]):_0x52c358(![]);}),_0xeda5a9[_0x517421(0xb4)](_0x517421(0xae),()=>{const _0x151749=_0x517421;_0xeda5a9[_0x151749(0xba)](),_0x52c358(!![]);}),_0xeda5a9[_0x517421(0xac)](_0x20f981,_0x517421(0xb5));});}function a70_0x34a1(_0x145b6d,_0xf507f7){const _0x4e8670=a70_0x4e86();return a70_0x34a1=function(_0x34a197,_0x219359){_0x34a197=_0x34a197-0xaa;let _0x422be2=_0x4e8670[_0x34a197];return _0x422be2;},a70_0x34a1(_0x145b6d,_0xf507f7);}export async function findAvailablePort(_0x4374c2=0xfa0,_0x22f406=0x64){const _0xfdc405=a70_0x34a1;for(let _0xb7c879=0x0;_0xb7c879<_0x22f406;_0xb7c879++){const _0x5f2ac2=_0x4374c2+_0xb7c879;if(await isPortAvailable(_0x5f2ac2))return _0x5f2ac2;}throw new Error(_0xfdc405(0xb8)+_0x4374c2+_0xfdc405(0xbe)+(_0x4374c2+_0x22f406-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x53d680=a71_0x37ef;(function(_0x5cb54a,_0x1db429){const _0x366b48=a71_0x37ef,_0xf17069=_0x5cb54a();while(!![]){try{const _0x1414f6=-parseInt(_0x366b48(0x161))/0x1*(parseInt(_0x366b48(0x166))/0x2)+parseInt(_0x366b48(0x16a))/0x3+-parseInt(_0x366b48(0x154))/0x4*(parseInt(_0x366b48(0x169))/0x5)+parseInt(_0x366b48(0x15e))/0x6+-parseInt(_0x366b48(0x170))/0x7*(parseInt(_0x366b48(0x157))/0x8)+-parseInt(_0x366b48(0x14f))/0x9*(-parseInt(_0x366b48(0x155))/0xa)+parseInt(_0x366b48(0x15b))/0xb;if(_0x1414f6===_0x1db429)break;else _0xf17069['push'](_0xf17069['shift']());}catch(_0x2243fe){_0xf17069['push'](_0xf17069['shift']());}}}(a71_0x3297,0x810e6));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a71_0x53d680(0x16f),'zsh','sh',a71_0x53d680(0x16d),'ksh',a71_0x53d680(0x14e),'csh',a71_0x53d680(0x14c),a71_0x53d680(0x14b),a71_0x53d680(0x165),'nu',a71_0x53d680(0x14a),a71_0x53d680(0x15f),'xonsh']);function getProcessInfoWindows(_0x47466d){const _0x7e3350=a71_0x53d680;try{const _0x2c59d2=execSync(_0x7e3350(0x171)+_0x47466d+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':'utf-8','windowsHide':!![]})[_0x7e3350(0x150)](),_0x30cbfe=_0x2c59d2['split']('\x0a')[_0x7e3350(0x172)](_0x2271e0=>_0x2271e0[_0x7e3350(0x150)]());if(_0x30cbfe['length']<0x2)return null;const _0x4bd1ff=_0x30cbfe[_0x30cbfe['length']-0x1]['split'](',');if(_0x4bd1ff[_0x7e3350(0x162)]<0x3)return null;const _0x42cba3=_0x4bd1ff[0x1]?.[_0x7e3350(0x150)]()||'',_0xbe5df9=parseInt(_0x4bd1ff[0x2]?.[_0x7e3350(0x150)]()||'0',0xa);if(isNaN(_0xbe5df9)||!_0x42cba3)return null;return{'pid':_0x47466d,'ppid':_0xbe5df9,'comm':_0x42cba3[_0x7e3350(0x163)](/\.exe$/i,'')};}catch(_0x4acc76){return process[_0x7e3350(0x168)][_0x7e3350(0x156)]&&console[_0x7e3350(0x158)](_0x7e3350(0x16b)+_0x47466d+'\x20on\x20Windows:',_0x4acc76),null;}}function a71_0x3297(){const _0x121c2c=['7HAEjFd','wmic\x20process\x20where\x20ProcessId=','filter','utf-8','\x20-o\x20ppid=,comm=','ion','pwsh','dash','kill','tcsh','5427xBAlvA','trim','comm','toLowerCase','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','2617140hwpiZh','1090szZiog','DEBUG','2750128smqiRr','error','\x20on\x20POSIX:','win32','3430889SSraiI','join','split','5085396oLiGFq','elvish','pop','695798cQXeWh','length','replace','pid','powershell','2HZrpLJ','has','env','5wjiwln','2991813zWTWYV','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','platform','fish','ppid','bash'];a71_0x3297=function(){return _0x121c2c;};return a71_0x3297();}function getProcessInfoPosix(_0xdc1df9){const _0x2317ac=a71_0x53d680;try{const _0x4b9e12=execSync('ps\x20-p\x20'+_0xdc1df9+_0x2317ac(0x149),{'encoding':_0x2317ac(0x148)})[_0x2317ac(0x150)](),[_0x3fa51d,..._0x1cda97]=_0x4b9e12[_0x2317ac(0x15d)](/\s+/),_0x1275e0=parseInt(_0x3fa51d,0xa),_0x2b85db=_0x1cda97[_0x2317ac(0x15c)]('\x20');if(isNaN(_0x1275e0))return null;return{'pid':_0xdc1df9,'ppid':_0x1275e0,'comm':_0x2b85db};}catch(_0x3df01f){return process[_0x2317ac(0x168)][_0x2317ac(0x156)]&&console[_0x2317ac(0x158)]('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0xdc1df9+_0x2317ac(0x159),_0x3df01f),null;}}function getProcessInfo(_0x20707f){const _0x17e099=a71_0x53d680;if(process[_0x17e099(0x16c)]===_0x17e099(0x15a))return getProcessInfoWindows(_0x20707f);return getProcessInfoPosix(_0x20707f);}function a71_0x37ef(_0x346a57,_0x373c12){const _0x3297c0=a71_0x3297();return a71_0x37ef=function(_0x37ef1f,_0x47ece5){_0x37ef1f=_0x37ef1f-0x148;let _0x2beace=_0x3297c0[_0x37ef1f];return _0x2beace;},a71_0x37ef(_0x346a57,_0x373c12);}function isShell(_0x366873){const _0x31506e=a71_0x53d680,_0x345220=_0x366873[_0x31506e(0x163)](/^-/,'')[_0x31506e(0x15d)]('/')[_0x31506e(0x160)]()||'';return SHELL_NAMES[_0x31506e(0x167)](_0x345220[_0x31506e(0x152)]());}let cachedShellPID;function findShellPID(){const _0x13841e=a71_0x53d680;let _0x5f200f=process[_0x13841e(0x16e)];const _0x1a8dcf=0xa;let _0x19240d=0x0;while(_0x19240d<_0x1a8dcf){const _0x433a10=getProcessInfo(_0x5f200f);if(!_0x433a10){process[_0x13841e(0x168)][_0x13841e(0x156)]&&console['error']('Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20'+_0x5f200f+',\x20using\x20fallback');break;}if(isShell(_0x433a10[_0x13841e(0x151)]))return _0x433a10[_0x13841e(0x164)];if(_0x433a10[_0x13841e(0x16e)]===0x0||_0x433a10[_0x13841e(0x16e)]===0x1){if(isShell(_0x433a10[_0x13841e(0x151)]))return _0x433a10[_0x13841e(0x164)];break;}_0x5f200f=_0x433a10[_0x13841e(0x16e)],_0x19240d++;}return process[_0x13841e(0x168)][_0x13841e(0x156)]&&console[_0x13841e(0x158)](_0x13841e(0x153)),process['ppid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x4ed3e4){const _0x4e55b8=a71_0x53d680;try{return process[_0x4e55b8(0x14d)](_0x4ed3e4,0x0),!![];}catch{return![];}}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e8318,_0xa124d8){const _0x554fe5=a72_0x4cf1,_0x12d114=_0x4e8318();while(!![]){try{const _0x2e07bd=-parseInt(_0x554fe5(0x6e))/0x1*(-parseInt(_0x554fe5(0x71))/0x2)+parseInt(_0x554fe5(0x69))/0x3+parseInt(_0x554fe5(0x6a))/0x4+parseInt(_0x554fe5(0x67))/0x5+parseInt(_0x554fe5(0x6b))/0x6+parseInt(_0x554fe5(0x70))/0x7+-parseInt(_0x554fe5(0x65))/0x8;if(_0x2e07bd===_0xa124d8)break;else _0x12d114['push'](_0x12d114['shift']());}catch(_0x56b10c){_0x12d114['push'](_0x12d114['shift']());}}}(a72_0xfe70,0x58b90));function a72_0x4cf1(_0x502649,_0xf40a77){const _0xfe70b4=a72_0xfe70();return a72_0x4cf1=function(_0x4cf122,_0x15a388){_0x4cf122=_0x4cf122-0x64;let _0x21a7bb=_0xfe70b4[_0x4cf122];return _0x21a7bb;},a72_0x4cf1(_0x502649,_0xf40a77);}import*as a72_0x4f2197 from'readline';export async function confirm(_0x1b39a3){const _0x2eb83a=a72_0x4cf1,_0x2ae6ff=a72_0x4f2197[_0x2eb83a(0x6c)]({'input':process['stdin'],'output':process[_0x2eb83a(0x64)]});return new Promise(_0x385a9f=>{const _0x261d53=_0x2eb83a;_0x2ae6ff['question'](_0x1b39a3+_0x261d53(0x66),_0x224965=>{const _0x488dfe=_0x261d53;_0x2ae6ff[_0x488dfe(0x68)](),_0x385a9f(_0x224965[_0x488dfe(0x6f)]()==='y'||_0x224965['toLowerCase']()===_0x488dfe(0x6d));});});}function a72_0xfe70(){const _0x38016b=['close','2121033ngEMvE','2726816DtAjmm','533028CGqHxK','createInterface','yes','2413GtanKC','toLowerCase','4002390yjQMfh','582guIDDZ','stdout','23300328JGPyaY','\x20(y/N):\x20','2622215zPFYNl'];a72_0xfe70=function(){return _0x38016b;};return a72_0xfe70();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x134b21,_0x735a9){const _0x1b8392=a73_0x50c9,_0x35dcac=_0x134b21();while(!![]){try{const _0x33b94d=-parseInt(_0x1b8392(0x164))/0x1*(-parseInt(_0x1b8392(0x156))/0x2)+-parseInt(_0x1b8392(0x168))/0x3+parseInt(_0x1b8392(0x165))/0x4*(parseInt(_0x1b8392(0x155))/0x5)+parseInt(_0x1b8392(0x166))/0x6*(-parseInt(_0x1b8392(0x150))/0x7)+-parseInt(_0x1b8392(0x160))/0x8+parseInt(_0x1b8392(0x14b))/0x9+parseInt(_0x1b8392(0x15b))/0xa*(parseInt(_0x1b8392(0x159))/0xb);if(_0x33b94d===_0x735a9)break;else _0x35dcac['push'](_0x35dcac['shift']());}catch(_0x36683d){_0x35dcac['push'](_0x35dcac['shift']());}}}(a73_0x38a9,0x73b51));export function parsePath(_0x521e1f){const _0x21a7b5=a73_0x50c9;if(!_0x521e1f||_0x521e1f[_0x21a7b5(0x154)]()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x11e84b=_0x521e1f[_0x21a7b5(0x154)]();if(_0x11e84b==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x521e1f};const _0x36bb77=_0x11e84b[_0x21a7b5(0x163)]('/')?_0x11e84b[_0x21a7b5(0x157)](0x1):_0x11e84b,_0x53cc6d=_0x36bb77[_0x21a7b5(0x15d)]('/')['filter'](_0x427451=>_0x427451!=='');if(_0x53cc6d[_0x21a7b5(0x161)]===0x0)throw new Error(_0x21a7b5(0x14e));const _0xd29b97=_0x11e84b['startsWith']('/')||!isRelativePathSegment(_0x53cc6d[0x0]);for(const _0x47dc7d of _0x53cc6d){validatePathSegment(_0x47dc7d);}return{'segments':_0x53cc6d,'isAbsolute':_0xd29b97,'raw':_0x521e1f};}function a73_0x38a9(){const _0x25f96e=['substring','pop','11tMBGps','Cannot\x20navigate\x20above\x20root','10385230smnvIn','slice','split','Path\x20attempts\x20to\x20navigate\x20above\x20root','isAbsolute','4141120iuAgAP','length','Cannot\x20split\x20empty\x20path','startsWith','2893aXvlSX','1717060wdqKGN','1362VouCvr','push','1320849MfqPFD','929763WMUqAQ','Relative\x20path\x20cannot\x20be\x20empty','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','join','18389TcPOXB','segments','raw','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','trim','5SFafyv','316dnQTXr'];a73_0x38a9=function(){return _0x25f96e;};return a73_0x38a9();}function isRelativePathSegment(_0x216e4a){return _0x216e4a==='.'||_0x216e4a==='..';}function validatePathSegment(_0x37d7dc){const _0x18b7c6=a73_0x50c9;if(_0x37d7dc==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x37d7dc==='.'||_0x37d7dc==='..')return;if(/[\x00-\x1F\x7F]/['test'](_0x37d7dc))throw new Error(_0x18b7c6(0x153)+_0x37d7dc);if(_0x37d7dc!==_0x37d7dc[_0x18b7c6(0x154)]()){}}function a73_0x50c9(_0x51e3b0,_0x280e57){const _0x38a911=a73_0x38a9();return a73_0x50c9=function(_0x50c968,_0x380188){_0x50c968=_0x50c968-0x14b;let _0x562f18=_0x38a911[_0x50c968];return _0x562f18;},a73_0x50c9(_0x51e3b0,_0x280e57);}export function validatePath(_0x585d16){const _0x129c48=a73_0x50c9;if(_0x585d16[_0x129c48(0x151)]['length']===0x0&&!_0x585d16['isAbsolute'])throw new Error(_0x129c48(0x14c));if(_0x585d16[_0x129c48(0x15f)]){if(_0x585d16['segments'][0x0]==='..')throw new Error(_0x129c48(0x14d));let _0x474ac9=0x0;for(const _0x2f1314 of _0x585d16[_0x129c48(0x151)]){if(_0x2f1314==='..'){if(_0x474ac9===0x0)throw new Error(_0x129c48(0x15e));_0x474ac9--;}else _0x2f1314!=='.'&&_0x474ac9++;}}}export function joinPaths(_0x4bb457,_0x40fc95){const _0x2b1018=a73_0x50c9;if(!_0x4bb457||_0x4bb457==='/')return _0x40fc95;if(!_0x40fc95||_0x40fc95==='.')return _0x4bb457;if(_0x40fc95[_0x2b1018(0x163)]('/'))return _0x40fc95;const _0x32f8de=parsePath(_0x4bb457),_0x4b28fb=parsePath(_0x40fc95),_0x28d68d=[..._0x32f8de[_0x2b1018(0x151)]];for(const _0x197b16 of _0x4b28fb[_0x2b1018(0x151)]){if(_0x197b16==='.')continue;else{if(_0x197b16==='..'){if(_0x28d68d[_0x2b1018(0x161)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x28d68d[_0x2b1018(0x158)]();}else _0x28d68d[_0x2b1018(0x167)](_0x197b16);}}const _0x7c0f31=_0x28d68d[_0x2b1018(0x14f)]('/');return _0x32f8de['raw'][_0x2b1018(0x163)]('/')?'/'+_0x7c0f31:_0x7c0f31;}export function normalizePath(_0x4f769b){const _0x4bda06=a73_0x50c9,_0x36f048=parsePath(_0x4f769b),_0x1ac08f=[];for(const _0x548911 of _0x36f048['segments']){if(_0x548911==='.')continue;else{if(_0x548911==='..'){if(_0x1ac08f[_0x4bda06(0x161)]===0x0){if(_0x36f048[_0x4bda06(0x15f)])throw new Error(_0x4bda06(0x15a));_0x1ac08f['push']('..');}else _0x1ac08f[_0x1ac08f[_0x4bda06(0x161)]-0x1]==='..'?_0x1ac08f[_0x4bda06(0x167)]('..'):_0x1ac08f[_0x4bda06(0x158)]();}else _0x1ac08f[_0x4bda06(0x167)](_0x548911);}}if(_0x1ac08f[_0x4bda06(0x161)]===0x0)return _0x36f048[_0x4bda06(0x15f)]?'/':'.';const _0x24e743=_0x1ac08f[_0x4bda06(0x14f)]('/');return _0x36f048[_0x4bda06(0x152)][_0x4bda06(0x163)]('/')?'/'+_0x24e743:_0x24e743;}export function getParentPath(_0x54e681){const _0x2894e6=a73_0x50c9,_0x28d8bc=parsePath(_0x54e681);if(_0x28d8bc[_0x2894e6(0x151)][_0x2894e6(0x161)]<=0x1)return'/';const _0x2a4067=_0x28d8bc[_0x2894e6(0x151)][_0x2894e6(0x15c)](0x0,-0x1)['join']('/');return _0x28d8bc[_0x2894e6(0x152)][_0x2894e6(0x163)]('/')?'/'+_0x2a4067:_0x2a4067;}export function getBaseName(_0x33f8ef){const _0x3d46a7=a73_0x50c9,_0x3e3e9e=parsePath(_0x33f8ef);return _0x3e3e9e[_0x3d46a7(0x151)][_0x3e3e9e[_0x3d46a7(0x151)]['length']-0x1]||'';}export function isChildPath(_0x47cdf9,_0x19578b){const _0x29412d=a73_0x50c9,_0x2220d1=parsePath(_0x47cdf9),_0x21f17b=parsePath(_0x19578b);if(_0x2220d1[_0x29412d(0x151)][_0x29412d(0x161)]<=_0x21f17b[_0x29412d(0x151)][_0x29412d(0x161)])return![];for(let _0x58b21f=0x0;_0x58b21f<_0x21f17b[_0x29412d(0x151)][_0x29412d(0x161)];_0x58b21f++){if(_0x2220d1[_0x29412d(0x151)][_0x58b21f]!==_0x21f17b[_0x29412d(0x151)][_0x58b21f])return![];}return!![];}export function splitPath(_0x2a5ebc){const _0x1c941a=a73_0x50c9,_0x3d5401=parsePath(_0x2a5ebc);if(_0x3d5401['segments'][_0x1c941a(0x161)]===0x0)throw new Error(_0x1c941a(0x162));if(_0x3d5401[_0x1c941a(0x151)]['length']===0x1)return{'parent':_0x3d5401[_0x1c941a(0x151)][0x0]};return{'parent':_0x3d5401['segments'][0x0],'child':_0x3d5401[_0x1c941a(0x151)][_0x1c941a(0x15c)](0x1)[_0x1c941a(0x14f)]('/')};}
|