@treasuredata/tdx 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-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/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.d.ts +11 -19
- package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/anthropic-adapter.js.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/conversation-utils.js.map +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.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/user.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/async.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/diff.js +1 -1
- package/dist/utils/fields-display.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/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.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-config.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
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10d3c8,_0x4a380e){const _0x1fc492=a92_0x196f,_0x59e2fd=_0x10d3c8();while(!![]){try{const _0x4840ad=-parseInt(_0x1fc492(0x1ce))/0x1*(parseInt(_0x1fc492(0x1b9))/0x2)+-parseInt(_0x1fc492(0x1b1))/0x3*(parseInt(_0x1fc492(0x1b7))/0x4)+-parseInt(_0x1fc492(0x1cb))/0x5+parseInt(_0x1fc492(0x1a9))/0x6+-parseInt(_0x1fc492(0x1c9))/0x7*(parseInt(_0x1fc492(0x1a3))/0x8)+-parseInt(_0x1fc492(0x1d2))/0x9*(-parseInt(_0x1fc492(0x1a4))/0xa)+parseInt(_0x1fc492(0x1b5))/0xb;if(_0x4840ad===_0x4a380e)break;else _0x59e2fd['push'](_0x59e2fd['shift']());}catch(_0xa8c7fc){_0x59e2fd['push'](_0x59e2fd['shift']());}}}(a92_0x12dd,0x52569));import a92_0x6b8838 from'chalk';function a92_0x196f(_0x1235a2,_0x1c0e01){_0x1235a2=_0x1235a2-0x1a2;const _0x12dd72=a92_0x12dd();let _0x196f21=_0x12dd72[_0x1235a2];return _0x196f21;}import{withQuerySpinner}from'./spinner.js';function a92_0x12dd(){const _0x472311=['replace','Attributes','query','data','6bRFeHF','localeCompare','startsWith','length','7914148bqiXqW','information_schema','930724MUOSHq','key','516746wHwQIh','filter','type','tableName','behavior','displayName','set','fields','Behaviors','Fetching\x20schema...','parentColumn','extra','error','trim','dim','setJobId','8771BzTOUC','null','1975535cyeuHl','Unknown','Schema\x20query:\x0a','1HvoPKz','\x20\x20\x20\x20','parentTableName','default','3177nbFCeE','column_type','source','get','varchar','push','sort','3312JuaHYn','18070iTYLNt','entries','bold','verbose','size','3705012wcmSJM','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','name','cyan'];a92_0x12dd=function(){return _0x472311;};return a92_0x12dd();}export function buildSchemaResult(_0x5c6b96){const _0x266d26=a92_0x196f,_0x5ab564=_0x5c6b96['columns']['map'](_0x1f7988=>({'column_name':_0x1f7988[_0x266d26(0x1ab)],'column_type':_0x1f7988[_0x266d26(0x1bb)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x5c6b96,'columns':[{'name':'column_name','type':'varchar'},{'name':_0x266d26(0x1d3),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1ca),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1b8),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1d1),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1c4),'type':_0x266d26(0x1d6)}],'data':_0x5ab564};}export async function executeSchemaQuery(_0x51f3f2,_0x5dca5e,_0x26a83b){const _0xfaf208=a92_0x196f,_0x279812=_0x51f3f2[_0xfaf208(0x1c6)]()[_0xfaf208(0x1ad)](/;+$/,''),_0x22df29='SELECT\x20*\x20FROM\x20(\x0a'+_0x279812+_0xfaf208(0x1aa);_0x26a83b['verbose']&&console[_0xfaf208(0x1c5)](_0xfaf208(0x1cd)+_0x22df29);const _0x8e0114=await withQuerySpinner(_0xfaf208(0x1c2),async _0x41b73c=>{const _0x4c3a48=_0xfaf208,_0x1c68b6=await _0x5dca5e[_0x4c3a48(0x1af)]['execute'](_0x22df29,{'catalog':'td','schema':_0x4c3a48(0x1b6),'onJobId':_0x3d5469=>{const _0x2b4ecd=_0x4c3a48;_0x41b73c[_0x2b4ecd(0x1c8)](_0x3d5469);}});return _0x1c68b6;},{'verbose':_0x26a83b[_0xfaf208(0x1a7)]});return buildSchemaResult(_0x8e0114[_0xfaf208(0x1b0)]);}export function displayFieldsHumanReadable(_0x2d9660,_0x52c5fd){const _0x1f4ec8=a92_0x196f,_0x40a553=_0x2d9660[_0x1f4ec8(0x1ba)](_0x3248a3=>_0x3248a3[_0x1f4ec8(0x1d4)]==='attribute'),_0x528bce=_0x2d9660['filter'](_0x1f3ab3=>_0x1f3ab3[_0x1f4ec8(0x1d4)]===_0x1f4ec8(0x1bd)),_0x280eaa=new Map();for(const _0x3d11d6 of _0x40a553){const _0x20c42c=_0x3d11d6['groupingName']||_0x3d11d6['parentTableName']||_0x1f4ec8(0x1cc),_0x2903a2=_0x280eaa[_0x1f4ec8(0x1d5)](_0x20c42c);_0x2903a2?_0x2903a2['fields'][_0x1f4ec8(0x1d7)](_0x3d11d6):_0x280eaa[_0x1f4ec8(0x1bf)](_0x20c42c,{'displayName':_0x20c42c,'tableName':_0x3d11d6[_0x1f4ec8(0x1d0)],'fields':[_0x3d11d6]});}const _0xa8339e=new Map();for(const _0x48e570 of _0x528bce){const _0x5da66a=_0x48e570['behaviorName']||_0x1f4ec8(0x1cc),_0x5aa58c=_0xa8339e[_0x1f4ec8(0x1d5)](_0x5da66a)||[];_0x5aa58c['push'](_0x48e570),_0xa8339e[_0x1f4ec8(0x1bf)](_0x5da66a,_0x5aa58c);}console['error']('\x0a'+a92_0x6b8838[_0x1f4ec8(0x1a6)](_0x52c5fd));if(_0x280eaa[_0x1f4ec8(0x1a8)]>0x0){console[_0x1f4ec8(0x1c5)]('\x0a'+a92_0x6b8838[_0x1f4ec8(0x1c7)](_0x1f4ec8(0x1ae)));const _0x8c50ed=[..._0x280eaa[_0x1f4ec8(0x1a5)]()]['sort']((_0x572001,_0x3217c5)=>_0x572001[0x0][_0x1f4ec8(0x1b2)](_0x3217c5[0x0]));for(const [,_0x7a6ee4]of _0x8c50ed){const _0x34707e=_0x7a6ee4[_0x1f4ec8(0x1bc)]&&_0x7a6ee4[_0x1f4ec8(0x1bc)]!==_0x7a6ee4[_0x1f4ec8(0x1be)]?'\x20'+a92_0x6b8838[_0x1f4ec8(0x1c7)]('('+_0x7a6ee4[_0x1f4ec8(0x1bc)]+')'):'';console[_0x1f4ec8(0x1c5)]('\x20\x20'+a92_0x6b8838[_0x1f4ec8(0x1a6)](_0x7a6ee4['displayName'])+_0x34707e);const _0x1e5ecb=[..._0x7a6ee4[_0x1f4ec8(0x1c0)]]['sort']((_0x403d89,_0x23ee33)=>_0x403d89[_0x1f4ec8(0x1ab)][_0x1f4ec8(0x1b2)](_0x23ee33['name']));for(const _0x2337e9 of _0x1e5ecb){const _0x2165e5=_0x2337e9[_0x1f4ec8(0x1c3)]&&_0x2337e9[_0x1f4ec8(0x1c3)]!==_0x2337e9[_0x1f4ec8(0x1ab)]?'\x20'+a92_0x6b8838[_0x1f4ec8(0x1c7)]('('+_0x2337e9[_0x1f4ec8(0x1c3)]+')'):'';console[_0x1f4ec8(0x1c5)](_0x1f4ec8(0x1cf)+_0x2337e9[_0x1f4ec8(0x1ab)]+_0x2165e5+':\x20'+a92_0x6b8838[_0x1f4ec8(0x1ac)](_0x2337e9[_0x1f4ec8(0x1bb)]));}}}if(_0xa8339e['size']>0x0){console[_0x1f4ec8(0x1c5)]('\x0a'+a92_0x6b8838['dim'](_0x1f4ec8(0x1c1)));const _0x563c4f=[..._0xa8339e[_0x1f4ec8(0x1a5)]()][_0x1f4ec8(0x1a2)]((_0x124f44,_0x3e3a50)=>_0x124f44[0x0][_0x1f4ec8(0x1b2)](_0x3e3a50[0x0]));for(const [_0x8c1e3,_0x5376d3]of _0x563c4f){const _0xb4a725=_0x5376d3[0x0],_0x3e4765=_0xb4a725?.['parentTableName']||'';console[_0x1f4ec8(0x1c5)]('\x20\x20'+a92_0x6b8838[_0x1f4ec8(0x1a6)](_0x8c1e3)+(_0x3e4765?'\x20'+a92_0x6b8838[_0x1f4ec8(0x1c7)]('('+_0x3e4765+')'):''));const _0x398962=[..._0x5376d3][_0x1f4ec8(0x1a2)]((_0x4afcac,_0x5acfe5)=>_0x4afcac[_0x1f4ec8(0x1ab)]['localeCompare'](_0x5acfe5[_0x1f4ec8(0x1ab)]));for(const _0x309d79 of _0x398962){const _0x19d68e=_0x309d79[_0x1f4ec8(0x1ab)][_0x1f4ec8(0x1b3)](_0x8c1e3+'.')?_0x309d79[_0x1f4ec8(0x1ab)]['slice'](_0x8c1e3[_0x1f4ec8(0x1b4)]+0x1):_0x309d79[_0x1f4ec8(0x1ab)],_0x1bd64f=_0x309d79[_0x1f4ec8(0x1c3)]&&_0x309d79[_0x1f4ec8(0x1c3)]!==_0x19d68e?'\x20'+a92_0x6b8838['dim']('('+_0x309d79[_0x1f4ec8(0x1c3)]+')'):'';console[_0x1f4ec8(0x1c5)](_0x1f4ec8(0x1cf)+_0x19d68e+_0x1bd64f+':\x20'+a92_0x6b8838[_0x1f4ec8(0x1ac)](_0x309d79[_0x1f4ec8(0x1bb)]));}}}console[_0x1f4ec8(0x1c5)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2dc01b,_0x4c071e){const _0x383b95=a93_0x46f4,_0x2a8bd7=_0x2dc01b();while(!![]){try{const _0x1195d7=-parseInt(_0x383b95(0xa6))/0x1+-parseInt(_0x383b95(0x99))/0x2*(parseInt(_0x383b95(0xa0))/0x3)+parseInt(_0x383b95(0x97))/0x4+-parseInt(_0x383b95(0xa2))/0x5+parseInt(_0x383b95(0xa4))/0x6+-parseInt(_0x383b95(0x95))/0x7*(parseInt(_0x383b95(0xa3))/0x8)+parseInt(_0x383b95(0x9f))/0x9;if(_0x1195d7===_0x4c071e)break;else _0x2a8bd7['push'](_0x2a8bd7['shift']());}catch(_0x17d3f1){_0x2a8bd7['push'](_0x2a8bd7['shift']());}}}(a93_0x124d,0xa3fb4));import*as a93_0xb93eab from'node:fs';import*as a93_0x192a58 from'node:path';export function setSecureFilePermissions(_0x3d98fa){const _0x437202=a93_0x46f4;try{a93_0xb93eab[_0x437202(0xa5)](_0x3d98fa,0x180);}catch{console[_0x437202(0x94)](_0x437202(0x98)+_0x3d98fa);}}function a93_0x124d(){const _0x291137=['44yxssIa','mkdirSync','Warning:\x20','dirname','existsSync','Should\x20be\x200600\x20or\x20more\x20restrictive.','20994993FUcjPG','42243mRGgez','statSync','6017135xDmidm','24ppOkUJ','6050376togcQQ','chmodSync','408933dGCQsp',').\x20','warn','2758238kFRmzO','\x20has\x20insecure\x20permissions\x20(','1738956WwnmKq','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'];a93_0x124d=function(){return _0x291137;};return a93_0x124d();}export function setSecureDirectoryPermissions(_0x95c9a4){const _0x5ee717=a93_0x46f4;try{a93_0xb93eab['chmodSync'](_0x95c9a4,0x1c0);}catch{console[_0x5ee717(0x94)](_0x5ee717(0x98)+_0x95c9a4);}}function a93_0x46f4(_0x1e071f,_0x3ad84b){_0x1e071f=_0x1e071f-0x94;const _0x124d21=a93_0x124d();let _0x46f48a=_0x124d21[_0x1e071f];return _0x46f48a;}export function createSecureDirectory(_0x2d9e65){const _0x2f8239=a93_0x46f4;!a93_0xb93eab[_0x2f8239(0x9d)](_0x2d9e65)&&(a93_0xb93eab[_0x2f8239(0x9a)](_0x2d9e65,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x2d9e65));}export function validateSecureFilePermissions(_0x4dbc45){const _0x14d064=a93_0x46f4;try{const _0x1d5682=a93_0xb93eab[_0x14d064(0xa1)](_0x4dbc45),_0x50f610=_0x1d5682['mode']&0x1ff,_0x3bcf09=(_0x50f610&0x3f)!==0x0;if(_0x3bcf09)return console[_0x14d064(0x94)](_0x14d064(0x9b)+_0x4dbc45+_0x14d064(0x96)+_0x50f610['toString'](0x8)+_0x14d064(0xa7)+_0x14d064(0x9e)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x59c73f,_0x582e71){const _0x33d4f6=a93_0x46f4,_0x582488=a93_0x192a58[_0x33d4f6(0x9c)](_0x59c73f);createSecureDirectory(_0x582488),a93_0xb93eab['writeFileSync'](_0x59c73f,_0x582e71,{'mode':0x180}),setSecureFilePermissions(_0x59c73f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a94_0x4ca1(_0x744d4c,_0x31d6aa){_0x744d4c=_0x744d4c-0x7f;const _0x30d559=a94_0x30d5();let _0x4ca15c=_0x30d559[_0x744d4c];return _0x4ca15c;}function a94_0x30d5(){const _0x4d5303=['8jbgQnX','4739913aSPvVi','split','52498FBrgJY','6cWjVZM','1499892hzDYkg','pop','tsv','table','16138450auyCsR','4159253DWYbuV','15oYWqUm','json','jsonl','toLowerCase','416600LzLjoY','633871lYGjHn','text'];a94_0x30d5=function(){return _0x4d5303;};return a94_0x30d5();}(function(_0x1030be,_0x515567){const _0x38b549=a94_0x4ca1,_0x20cb1f=_0x1030be();while(!![]){try{const _0x15f406=-parseInt(_0x38b549(0x87))/0x1+parseInt(_0x38b549(0x8c))/0x2*(-parseInt(_0x38b549(0x82))/0x3)+-parseInt(_0x38b549(0x8e))/0x4+-parseInt(_0x38b549(0x86))/0x5+parseInt(_0x38b549(0x8d))/0x6*(-parseInt(_0x38b549(0x81))/0x7)+parseInt(_0x38b549(0x89))/0x8*(parseInt(_0x38b549(0x8a))/0x9)+parseInt(_0x38b549(0x80))/0xa;if(_0x15f406===_0x515567)break;else _0x20cb1f['push'](_0x20cb1f['shift']());}catch(_0x15961a){_0x20cb1f['push'](_0x20cb1f['shift']());}}}(a94_0x30d5,0x4ed62));export function detectFormatFromExtension(_0x1cddde){const _0x31e2ff=a94_0x4ca1,_0x4dffca=_0x1cddde[_0x31e2ff(0x85)]()[_0x31e2ff(0x8b)]('.')[_0x31e2ff(0x8f)]();switch(_0x4dffca){case _0x31e2ff(0x83):return _0x31e2ff(0x83);case _0x31e2ff(0x84):return _0x31e2ff(0x84);case _0x31e2ff(0x90):case'tab':return'tsv';case'txt':case _0x31e2ff(0x88):return _0x31e2ff(0x7f);default:return undefined;}}export function resolveOutputFormat(_0x24de94,_0xd507b2,_0x3dbf63){if(_0x24de94)return _0x24de94;if(_0xd507b2){const _0x1875b3=detectFormatFromExtension(_0xd507b2);if(_0x1875b3)return _0x1875b3;}return _0x3dbf63;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x45f593,_0x5d9b0e){const _0x3dfdb8=a95_0x57a5,_0x353026=_0x45f593();while(!![]){try{const _0xe52263=parseInt(_0x3dfdb8(0x1ea))/0x1+parseInt(_0x3dfdb8(0x1fd))/0x2+-parseInt(_0x3dfdb8(0x201))/0x3+-parseInt(_0x3dfdb8(0x1fb))/0x4*(-parseInt(_0x3dfdb8(0x1ed))/0x5)+-parseInt(_0x3dfdb8(0x20d))/0x6+-parseInt(_0x3dfdb8(0x1f8))/0x7+parseInt(_0x3dfdb8(0x1f9))/0x8*(parseInt(_0x3dfdb8(0x1f7))/0x9);if(_0xe52263===_0x5d9b0e)break;else _0x353026['push'](_0x353026['shift']());}catch(_0xeeb99b){_0x353026['push'](_0x353026['shift']());}}}(a95_0x1f07,0xd1b64));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x5214fb=a95_0x57a5;return process[_0x5214fb(0x208)][_0x5214fb(0x211)]||Infinity;}export function formatAsTable(_0x3f4131,_0x159bbf=DEFAULT_MAX_DISPLAY_ROWS,_0x2c28a6=![],_0xc907b6={}){const _0x4b1d8f=a95_0x57a5;if(_0x3f4131[_0x4b1d8f(0x1ef)]['length']===0x0)return _0x4b1d8f(0x200);const _0x1eee47=_0x3f4131[_0x4b1d8f(0x211)]['map'](_0x2451be=>_0x2451be[_0x4b1d8f(0x1f2)]),_0x518a7d=_0x3f4131[_0x4b1d8f(0x211)]['map'](_0x535ab8=>simplifyType(_0x535ab8[_0x4b1d8f(0x1e3)])),_0x580fa5=_0x3f4131['data'][_0x4b1d8f(0x1fc)](0x0,_0x159bbf),_0x2d1d95=_0x3f4131['data'][_0x4b1d8f(0x1ee)],_0x9e97c5=_0x2d1d95>_0x159bbf,_0x291b96=[],_0x1611f3=getTerminalWidth(),_0x5b5a07=_0x1611f3!==Infinity,_0xf99dce=0x32;let _0x13bec5=_0x1eee47[_0x4b1d8f(0x1de)]((_0x57a709,_0x13d7d7)=>{const _0x4e26c6=_0x4b1d8f,_0x203372=stringWidth(_0x518a7d[_0x13d7d7]),_0x30c231=Math[_0x4e26c6(0x1f1)](..._0x580fa5[_0x4e26c6(0x1de)](_0x197af6=>{const _0x2f0234=_0x197af6[_0x57a709];return stringWidth(formatValue(_0x2f0234));})),_0x11b07a=Math['max'](stringWidth(_0x57a709),_0x203372,_0x30c231);return _0x2c28a6?_0x11b07a:Math[_0x4e26c6(0x206)](_0x11b07a,_0xf99dce);});if(_0x5b5a07&&!_0x2c28a6&&_0x1eee47['length']>0x0){const _0x4e4f48=_0x4cc603=>{let _0x19ef2e=0x1;for(const _0x425927 of _0x4cc603){_0x19ef2e+=_0x425927+0x3;}return _0x19ef2e+0x1;};let _0xa7c5c4=_0x4e4f48(_0x13bec5);if(_0xa7c5c4>_0x1611f3){const _0x1e87c5=0x3;for(let _0x5a3fd8=_0x13bec5[_0x4b1d8f(0x1ee)]-0x1;_0x5a3fd8>=0x0;_0x5a3fd8--){_0xa7c5c4=_0x4e4f48(_0x13bec5);if(_0xa7c5c4<=_0x1611f3)break;const _0x88a49c=_0x13bec5[_0x5a3fd8],_0x4ce5a2=_0xa7c5c4-_0x1611f3,_0x2f2776=_0x88a49c-_0x1e87c5,_0x5c6bbd=Math[_0x4b1d8f(0x206)](_0x4ce5a2,_0x2f2776);_0x5c6bbd>0x0&&(_0x13bec5[_0x5a3fd8]=_0x88a49c-_0x5c6bbd);}}}const _0x4846ad=_0x1eee47,_0x1609a1=_0x518a7d,_0x419570=_0x13bec5,_0x33f5b4=_0x13bec5;_0x291b96[_0x4b1d8f(0x209)](colorBorder('┌'+_0x33f5b4[_0x4b1d8f(0x1de)](_0x55cb7e=>'─'[_0x4b1d8f(0x20b)](_0x55cb7e+0x2))[_0x4b1d8f(0x1e5)]('┬')+'┐',_0xc907b6));const _0x3746b2=_0x4846ad[_0x4b1d8f(0x1de)]((_0x8cb66f,_0x3bd55e)=>centerAlign(_0x8cb66f,_0x419570[_0x3bd55e]));_0x291b96[_0x4b1d8f(0x209)](colorBorder('│',_0xc907b6)+'\x20'+_0x3746b2['join']('\x20'+colorBorder('│',_0xc907b6)+'\x20')+'\x20'+colorBorder('│',_0xc907b6));const _0x5ecde4=_0x1609a1[_0x4b1d8f(0x1de)]((_0x22ed58,_0x2a123d)=>colorType(centerAlign(_0x22ed58,_0x419570[_0x2a123d]),_0xc907b6));_0x291b96[_0x4b1d8f(0x209)](colorBorder('│',_0xc907b6)+'\x20'+_0x5ecde4[_0x4b1d8f(0x1e5)]('\x20'+colorBorder('│',_0xc907b6)+'\x20')+'\x20'+colorBorder('│',_0xc907b6)),_0x291b96[_0x4b1d8f(0x209)](colorBorder('├'+_0x33f5b4[_0x4b1d8f(0x1de)](_0x5f4e03=>'─'[_0x4b1d8f(0x20b)](_0x5f4e03+0x2))[_0x4b1d8f(0x1e5)]('┼')+'┤',_0xc907b6));const _0xea3d42=(_0x2adf5b,_0x3bd978)=>{const _0x1a4c34=_0x4b1d8f,_0x4c5389=stringWidth(_0x2adf5b);if(_0x4c5389<=_0x3bd978)return _0x2adf5b;let _0x2feef6=_0x2adf5b;while(stringWidth(_0x2feef6+'…')>_0x3bd978&&_0x2feef6[_0x1a4c34(0x1ee)]>0x0){_0x2feef6=_0x2feef6['slice'](0x0,-0x1);}return _0x2feef6+'…';};_0x580fa5[_0x4b1d8f(0x203)](_0x3b19c8=>{const _0x2afeeb=_0x4b1d8f,_0x2b2c26=_0x1eee47[_0x2afeeb(0x1de)]((_0x1a45cb,_0x380bbf)=>{const _0x4ce84c=_0x2afeeb,_0x2942c9=_0x3b19c8[_0x1a45cb],_0x465b6b=formatValue(_0x2942c9),_0x2671c9=_0x419570[_0x380bbf],_0x490aa7=_0xea3d42(_0x465b6b,_0x2671c9),_0x3becdd=typeof _0x2942c9==='number'||typeof _0x2942c9===_0x4ce84c(0x1f6)&&/^-?\d+$/[_0x4ce84c(0x1d9)](_0x2942c9);return _0x3becdd?padStart(_0x490aa7,_0x2671c9):padEnd(_0x490aa7,_0x2671c9);});_0x291b96['push'](colorBorder('│',_0xc907b6)+'\x20'+_0x2b2c26[_0x2afeeb(0x1e5)]('\x20'+colorBorder('│',_0xc907b6)+'\x20')+'\x20'+colorBorder('│',_0xc907b6));});const _0x302fea=_0x33f5b4[_0x4b1d8f(0x1dd)]((_0x5df0bb,_0x39bc9a)=>_0x5df0bb+_0x39bc9a+0x3,-0x1);_0x291b96[_0x4b1d8f(0x209)](colorBorder('├'+_0x33f5b4['map'](_0x355539=>'─'[_0x4b1d8f(0x20b)](_0x355539+0x2))[_0x4b1d8f(0x1e5)]('┴')+'┤',_0xc907b6));let _0x1dc0ab;_0x9e97c5?_0x1dc0ab=_0x2d1d95+_0x4b1d8f(0x1f3)+_0x159bbf+_0x4b1d8f(0x1f0):_0x1dc0ab=_0x2d1d95+_0x4b1d8f(0x1e8)+(_0x2d1d95===0x1?'':'s');const _0x3245ad=_0x1dc0ab[_0x4b1d8f(0x1f4)](_0x302fea-0x2);return _0x291b96['push'](colorBorder('│',_0xc907b6)+'\x20'+_0x3245ad+'\x20'+colorBorder('│',_0xc907b6)),_0x291b96[_0x4b1d8f(0x209)](colorBorder('└'+'─'[_0x4b1d8f(0x20b)](_0x302fea)+'┘',_0xc907b6)),_0x291b96['join']('\x0a');}function simplifyType(_0x2b9b49){const _0x12ee7d=a95_0x57a5,_0x559068={'varchar':_0x12ee7d(0x1f6),'bigint':_0x12ee7d(0x1e0),'integer':_0x12ee7d(0x207),'double':_0x12ee7d(0x20c),'boolean':_0x12ee7d(0x1e1),'date':_0x12ee7d(0x1e2),'timestamp':_0x12ee7d(0x205),'array':'array','map':_0x12ee7d(0x1de),'row':_0x12ee7d(0x1e7)},_0x7dfde9=_0x2b9b49[_0x12ee7d(0x1f5)]();for(const [_0x1664c3,_0x3a01fe]of Object[_0x12ee7d(0x204)](_0x559068)){if(_0x7dfde9[_0x12ee7d(0x20e)](_0x1664c3))return _0x3a01fe;}return _0x2b9b49[_0x12ee7d(0x1ee)]>0xa?_0x2b9b49[_0x12ee7d(0x1e4)](0x0,0xa):_0x2b9b49;}export function formatAsJSON(_0xb34da0,_0x5a2acb={}){const _0x40c997=a95_0x57a5;if(_0xb34da0[_0x40c997(0x1ef)][_0x40c997(0x1ee)]===0x0)return'[]';if(shouldUseColor(_0x5a2acb))return colorizeJSON(_0xb34da0[_0x40c997(0x1ef)],_0x5a2acb);const _0x41e4c2=_0xb34da0[_0x40c997(0x1ef)][_0x40c997(0x1de)](_0xa54174=>'\x20\x20'+JSON[_0x40c997(0x202)](_0xa54174));return'[\x0a'+_0x41e4c2[_0x40c997(0x1e5)](',\x0a')+'\x0a]';}function a95_0x57a5(_0x1ec234,_0x2e7f6b){_0x1ec234=_0x1ec234-0x1d8;const _0x1f07ba=a95_0x1f07();let _0x57a526=_0x1f07ba[_0x1ec234];return _0x57a526;}export function formatAsJSONL(_0x283ce4,_0x411a10={}){const _0x58a060=a95_0x57a5;if(_0x283ce4['data'][_0x58a060(0x1ee)]===0x0)return'';if(shouldUseColor(_0x411a10))return _0x283ce4[_0x58a060(0x1ef)][_0x58a060(0x1de)](_0x4a2b87=>colorizeJSONCompact(_0x4a2b87,_0x411a10))[_0x58a060(0x1e5)]('\x0a');return _0x283ce4[_0x58a060(0x1ef)][_0x58a060(0x1de)](_0x428692=>JSON[_0x58a060(0x202)](_0x428692))[_0x58a060(0x1e5)]('\x0a');}export function formatAsTSV(_0x522d71){const _0x551722=a95_0x57a5;if(_0x522d71[_0x551722(0x1ef)][_0x551722(0x1ee)]===0x0)return'';const _0x3b71fc=[],_0x38573d=_0x522d71[_0x551722(0x211)][_0x551722(0x1de)](_0x4d58c7=>_0x4d58c7['name']);return _0x3b71fc[_0x551722(0x209)](_0x38573d[_0x551722(0x1e5)]('\x09')),_0x522d71[_0x551722(0x1ef)][_0x551722(0x203)](_0x565547=>{const _0x348e70=_0x551722,_0x4dea34=_0x38573d[_0x348e70(0x1de)](_0xb16da8=>{const _0x24bb61=_0x565547[_0xb16da8];return formatValueForTSV(_0x24bb61);});_0x3b71fc[_0x348e70(0x209)](_0x4dea34[_0x348e70(0x1e5)]('\x09'));}),_0x3b71fc['join']('\x0a');}function formatValue(_0x111e63){const _0x19bc85=a95_0x57a5;if(_0x111e63===null||_0x111e63===undefined)return'';if(typeof _0x111e63==='string'){const _0x39db10=_0x111e63[_0x19bc85(0x1da)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x19bc85(0x1da)](/\t/g,'\x5ct');return _0x39db10;}if(typeof _0x111e63===_0x19bc85(0x1ff))return String(_0x111e63);if(typeof _0x111e63===_0x19bc85(0x1fe))return _0x111e63?'true':_0x19bc85(0x20f);if(_0x111e63 instanceof Date)return _0x111e63[_0x19bc85(0x1e9)]();if(typeof _0x111e63==='object')return JSON[_0x19bc85(0x202)](_0x111e63);return String(_0x111e63);}function formatValueForTSV(_0x547a69){const _0x3f48e6=a95_0x57a5;if(_0x547a69===null||_0x547a69===undefined)return'';if(typeof _0x547a69===_0x3f48e6(0x1f6))return _0x547a69['replace'](/\t/g,'\x5ct')[_0x3f48e6(0x1da)](/\n/g,'\x5cn');if(typeof _0x547a69===_0x3f48e6(0x1ff)||typeof _0x547a69==='boolean')return String(_0x547a69);if(_0x547a69 instanceof Date)return _0x547a69['toISOString']();if(typeof _0x547a69===_0x3f48e6(0x1df))return JSON[_0x3f48e6(0x202)](_0x547a69);return String(_0x547a69);}export function formatQueryResult(_0x128dfa,_0x50dca5){const _0x25de9c=a95_0x57a5;switch(_0x50dca5){case _0x25de9c(0x1eb):return formatAsTable(_0x128dfa);case _0x25de9c(0x1db):return formatAsJSON(_0x128dfa);case _0x25de9c(0x1ec):return formatAsJSONL(_0x128dfa);case _0x25de9c(0x210):return formatAsTSV(_0x128dfa);default:return formatAsJSON(_0x128dfa);}}export function formatBytes(_0x5a0e7e){const _0x2cedb7=a95_0x57a5;if(_0x5a0e7e===0x0)return'0\x20B';const _0x40d100=['B','KB','MB','GB','TB'],_0xceb716=0x400,_0x668d51=Math['floor'](Math[_0x2cedb7(0x1e6)](_0x5a0e7e)/Math['log'](_0xceb716)),_0x59ec9e=_0x5a0e7e/Math[_0x2cedb7(0x20a)](_0xceb716,_0x668d51),_0xb77ef8=_0x59ec9e>=0xa?0x1:0x2;return _0x59ec9e[_0x2cedb7(0x1fa)](_0xb77ef8)+'\x20'+_0x40d100[_0x668d51];}function a95_0x1f07(){const _0x2affcf=['length','data','\x20shown)','max','name','\x20rows\x20(','padEnd','toLowerCase','string','9WmOMMM','4053266MXwOdF','998024OSoHeu','toFixed','6052144ZwLIOd','slice','1448400IyEDja','boolean','number','No\x20rows\x20returned','4540080tDJTye','stringify','forEach','entries','timestamp','min','int','stdout','push','pow','repeat','double','5202630NhNLYU','startsWith','false','tsv','columns','toString','test','replace','json','floor','reduce','map','object','long','bool','date','type','substring','join','log','row','\x20row','toISOString','1456494WyymaD','table','jsonl','5OIZDKT'];a95_0x1f07=function(){return _0x2affcf;};return a95_0x1f07();}export function formatRows(_0x456ed0){const _0x29ad71=a95_0x57a5;if(_0x456ed0==null)return'-';if(_0x456ed0===0x0)return'0';if(_0x456ed0<0x3e8)return _0x456ed0[_0x29ad71(0x1d8)]();const _0x1eb6f6=['','K','M','B','T'],_0x4bcd19=0x3e8,_0x1f5b33=Math[_0x29ad71(0x1dc)](Math[_0x29ad71(0x1e6)](_0x456ed0)/Math[_0x29ad71(0x1e6)](_0x4bcd19)),_0x582884=_0x456ed0/Math[_0x29ad71(0x20a)](_0x4bcd19,_0x1f5b33),_0x52cbbf=_0x582884>=0xa?0x1:0x2;return''+_0x582884['toFixed'](_0x52cbbf)+_0x1eb6f6[_0x1f5b33];}
|
|
1
|
+
(function(_0x36114e,_0x5e11bd){const _0x5c9002=a95_0x3d64,_0x4912b5=_0x36114e();while(!![]){try{const _0x2148b9=-parseInt(_0x5c9002(0xa4))/0x1*(parseInt(_0x5c9002(0x99))/0x2)+-parseInt(_0x5c9002(0xa2))/0x3*(-parseInt(_0x5c9002(0x82))/0x4)+parseInt(_0x5c9002(0x91))/0x5+parseInt(_0x5c9002(0x93))/0x6*(-parseInt(_0x5c9002(0xac))/0x7)+-parseInt(_0x5c9002(0xa5))/0x8*(parseInt(_0x5c9002(0xa9))/0x9)+parseInt(_0x5c9002(0xad))/0xa+parseInt(_0x5c9002(0x96))/0xb*(parseInt(_0x5c9002(0xa1))/0xc);if(_0x2148b9===_0x5e11bd)break;else _0x4912b5['push'](_0x4912b5['shift']());}catch(_0x493319){_0x4912b5['push'](_0x4912b5['shift']());}}}(a95_0x4f9c,0x83979));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a95_0x4f9c(){const _0x42e4eb=['true','toISOString','toLowerCase','0\x20B','false','jsonl','forEach','reduce','max','2449110bLhCrM','repeat','5334510ACIdWz','toString','long','512809UuVpfW','slice','stringify','2sLHwDE','boolean','name','replace','\x20rows\x20(','min','int','map','180ZFWkUf','98205kzspxc','tsv','264371lJXCKg','16SuVlhG','padEnd','join','test','3879054GkEnEk','row','substring','7wQPsxw','6779270FAKZGw','toFixed','floor','startsWith','length','json','type','push','string','log','No\x20rows\x20returned','84CUuGbp','columns','pow','data','number','\x20row'];a95_0x4f9c=function(){return _0x42e4eb;};return a95_0x4f9c();}const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){return process['stdout']['columns']||Infinity;}export function formatAsTable(_0x3ade96,_0x467952=DEFAULT_MAX_DISPLAY_ROWS,_0x3fa397=![],_0x11854a={}){const _0x949401=a95_0x3d64;if(_0x3ade96[_0x949401(0x85)][_0x949401(0xb1)]===0x0)return _0x949401(0x81);const _0x862489=_0x3ade96['columns'][_0x949401(0xa0)](_0x5f0c28=>_0x5f0c28[_0x949401(0x9b)]),_0x34a16c=_0x3ade96[_0x949401(0x83)][_0x949401(0xa0)](_0x29187a=>simplifyType(_0x29187a[_0x949401(0x7d)])),_0x5eff40=_0x3ade96['data'][_0x949401(0x97)](0x0,_0x467952),_0x1c6b37=_0x3ade96['data']['length'],_0x413234=_0x1c6b37>_0x467952,_0x86a2aa=[],_0x165198=getTerminalWidth(),_0x47c631=_0x165198!==Infinity,_0x31cf21=0x32;let _0x4483e8=_0x862489[_0x949401(0xa0)]((_0x648ade,_0x35b1fc)=>{const _0x4d5374=_0x949401,_0x283db9=stringWidth(_0x34a16c[_0x35b1fc]),_0x1dac1f=Math[_0x4d5374(0x90)](..._0x5eff40[_0x4d5374(0xa0)](_0x354ac6=>{const _0x2135dd=_0x354ac6[_0x648ade];return stringWidth(formatValue(_0x2135dd));})),_0x5c1f37=Math[_0x4d5374(0x90)](stringWidth(_0x648ade),_0x283db9,_0x1dac1f);return _0x3fa397?_0x5c1f37:Math[_0x4d5374(0x9e)](_0x5c1f37,_0x31cf21);});if(_0x47c631&&!_0x3fa397&&_0x862489[_0x949401(0xb1)]>0x0){const _0x434463=_0x47ba0b=>{let _0x94ea=0x1;for(const _0x19dda7 of _0x47ba0b){_0x94ea+=_0x19dda7+0x3;}return _0x94ea+0x1;};let _0x46c571=_0x434463(_0x4483e8);if(_0x46c571>_0x165198){const _0x18a1e3=0x3;for(let _0x3c0903=_0x4483e8[_0x949401(0xb1)]-0x1;_0x3c0903>=0x0;_0x3c0903--){_0x46c571=_0x434463(_0x4483e8);if(_0x46c571<=_0x165198)break;const _0x4c53e8=_0x4483e8[_0x3c0903],_0x42abeb=_0x46c571-_0x165198,_0x410ca3=_0x4c53e8-_0x18a1e3,_0x1c92d1=Math['min'](_0x42abeb,_0x410ca3);_0x1c92d1>0x0&&(_0x4483e8[_0x3c0903]=_0x4c53e8-_0x1c92d1);}}}const _0x1b9652=_0x862489,_0x551081=_0x34a16c,_0x2adbe1=_0x4483e8,_0x39670a=_0x4483e8;_0x86a2aa[_0x949401(0x7e)](colorBorder('┌'+_0x39670a[_0x949401(0xa0)](_0x1a3894=>'─'[_0x949401(0x92)](_0x1a3894+0x2))[_0x949401(0xa7)]('┬')+'┐',_0x11854a));const _0x3d161a=_0x1b9652[_0x949401(0xa0)]((_0x3d6220,_0x5231af)=>centerAlign(_0x3d6220,_0x2adbe1[_0x5231af]));_0x86a2aa[_0x949401(0x7e)](colorBorder('│',_0x11854a)+'\x20'+_0x3d161a[_0x949401(0xa7)]('\x20'+colorBorder('│',_0x11854a)+'\x20')+'\x20'+colorBorder('│',_0x11854a));const _0x48110c=_0x551081[_0x949401(0xa0)]((_0xa18ca8,_0x411350)=>colorType(centerAlign(_0xa18ca8,_0x2adbe1[_0x411350]),_0x11854a));_0x86a2aa['push'](colorBorder('│',_0x11854a)+'\x20'+_0x48110c[_0x949401(0xa7)]('\x20'+colorBorder('│',_0x11854a)+'\x20')+'\x20'+colorBorder('│',_0x11854a)),_0x86a2aa[_0x949401(0x7e)](colorBorder('├'+_0x39670a[_0x949401(0xa0)](_0x485187=>'─'['repeat'](_0x485187+0x2))[_0x949401(0xa7)]('┼')+'┤',_0x11854a));const _0x52aa65=(_0x3da5f2,_0x4a6267)=>{const _0x2a0822=_0x949401,_0xcbc989=stringWidth(_0x3da5f2);if(_0xcbc989<=_0x4a6267)return _0x3da5f2;let _0x2d16ee=_0x3da5f2;while(stringWidth(_0x2d16ee+'…')>_0x4a6267&&_0x2d16ee[_0x2a0822(0xb1)]>0x0){_0x2d16ee=_0x2d16ee[_0x2a0822(0x97)](0x0,-0x1);}return _0x2d16ee+'…';};_0x5eff40[_0x949401(0x8e)](_0x5bcf89=>{const _0x9a5b48=_0x949401,_0x3ad329=_0x862489[_0x9a5b48(0xa0)]((_0x4e1bef,_0x325472)=>{const _0x345791=_0x9a5b48,_0x110638=_0x5bcf89[_0x4e1bef],_0x23bff4=formatValue(_0x110638),_0x257d23=_0x2adbe1[_0x325472],_0xbcd2da=_0x52aa65(_0x23bff4,_0x257d23),_0x35faf1=typeof _0x110638==='number'||typeof _0x110638===_0x345791(0x7f)&&/^-?\d+$/[_0x345791(0xa8)](_0x110638);return _0x35faf1?padStart(_0xbcd2da,_0x257d23):padEnd(_0xbcd2da,_0x257d23);});_0x86a2aa[_0x9a5b48(0x7e)](colorBorder('│',_0x11854a)+'\x20'+_0x3ad329['join']('\x20'+colorBorder('│',_0x11854a)+'\x20')+'\x20'+colorBorder('│',_0x11854a));});const _0x20cd7e=_0x39670a[_0x949401(0x8f)]((_0x3623e9,_0xecf7e1)=>_0x3623e9+_0xecf7e1+0x3,-0x1);_0x86a2aa[_0x949401(0x7e)](colorBorder('├'+_0x39670a['map'](_0x28d351=>'─'[_0x949401(0x92)](_0x28d351+0x2))[_0x949401(0xa7)]('┴')+'┤',_0x11854a));let _0x4dca9e;_0x413234?_0x4dca9e=_0x1c6b37+_0x949401(0x9d)+_0x467952+'\x20shown)':_0x4dca9e=_0x1c6b37+_0x949401(0x87)+(_0x1c6b37===0x1?'':'s');const _0xb96001=_0x4dca9e[_0x949401(0xa6)](_0x20cd7e-0x2);return _0x86a2aa[_0x949401(0x7e)](colorBorder('│',_0x11854a)+'\x20'+_0xb96001+'\x20'+colorBorder('│',_0x11854a)),_0x86a2aa['push'](colorBorder('└'+'─'[_0x949401(0x92)](_0x20cd7e)+'┘',_0x11854a)),_0x86a2aa[_0x949401(0xa7)]('\x0a');}function a95_0x3d64(_0x153998,_0x56df53){_0x153998=_0x153998-0x7d;const _0x4f9c27=a95_0x4f9c();let _0x3d6483=_0x4f9c27[_0x153998];return _0x3d6483;}function simplifyType(_0x4ab8e3){const _0x1c855b=a95_0x3d64,_0x5f39c4={'varchar':_0x1c855b(0x7f),'bigint':_0x1c855b(0x95),'integer':_0x1c855b(0x9f),'double':'double','boolean':'bool','date':'date','timestamp':'timestamp','array':'array','map':'map','row':_0x1c855b(0xaa)},_0x1e9f42=_0x4ab8e3[_0x1c855b(0x8a)]();for(const [_0x173427,_0x4988f8]of Object['entries'](_0x5f39c4)){if(_0x1e9f42[_0x1c855b(0xb0)](_0x173427))return _0x4988f8;}return _0x4ab8e3['length']>0xa?_0x4ab8e3[_0x1c855b(0xab)](0x0,0xa):_0x4ab8e3;}export function formatAsJSON(_0x47daa8,_0x347c4b={}){const _0x2a95f1=a95_0x3d64;if(_0x47daa8[_0x2a95f1(0x85)]['length']===0x0)return'[]';if(shouldUseColor(_0x347c4b))return colorizeJSON(_0x47daa8[_0x2a95f1(0x85)],_0x347c4b);const _0x251781=_0x47daa8[_0x2a95f1(0x85)][_0x2a95f1(0xa0)](_0x1e9519=>'\x20\x20'+JSON[_0x2a95f1(0x98)](_0x1e9519));return'[\x0a'+_0x251781[_0x2a95f1(0xa7)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x417c84,_0x12b249={}){const _0x5d3555=a95_0x3d64;if(_0x417c84[_0x5d3555(0x85)][_0x5d3555(0xb1)]===0x0)return'';if(shouldUseColor(_0x12b249))return _0x417c84[_0x5d3555(0x85)][_0x5d3555(0xa0)](_0x468998=>colorizeJSONCompact(_0x468998,_0x12b249))['join']('\x0a');return _0x417c84[_0x5d3555(0x85)]['map'](_0x14a24b=>JSON['stringify'](_0x14a24b))['join']('\x0a');}export function formatAsTSV(_0x4edf99){const _0x37850b=a95_0x3d64;if(_0x4edf99[_0x37850b(0x85)]['length']===0x0)return'';const _0xe71ba2=[],_0x72a934=_0x4edf99[_0x37850b(0x83)][_0x37850b(0xa0)](_0x531108=>_0x531108['name']);return _0xe71ba2[_0x37850b(0x7e)](_0x72a934[_0x37850b(0xa7)]('\x09')),_0x4edf99[_0x37850b(0x85)][_0x37850b(0x8e)](_0x341c4e=>{const _0x170812=_0x37850b,_0x36abac=_0x72a934['map'](_0x295c43=>{const _0x1515c0=_0x341c4e[_0x295c43];return formatValueForTSV(_0x1515c0);});_0xe71ba2[_0x170812(0x7e)](_0x36abac[_0x170812(0xa7)]('\x09'));}),_0xe71ba2['join']('\x0a');}function formatValue(_0x211c77){const _0x2b1b67=a95_0x3d64;if(_0x211c77===null||_0x211c77===undefined)return'';if(typeof _0x211c77===_0x2b1b67(0x7f)){const _0x318611=_0x211c77['replace'](/\n/g,'\x5cn')[_0x2b1b67(0x9c)](/\r/g,'\x5cr')[_0x2b1b67(0x9c)](/\t/g,'\x5ct');return _0x318611;}if(typeof _0x211c77===_0x2b1b67(0x86))return String(_0x211c77);if(typeof _0x211c77===_0x2b1b67(0x9a))return _0x211c77?_0x2b1b67(0x88):_0x2b1b67(0x8c);if(_0x211c77 instanceof Date)return _0x211c77[_0x2b1b67(0x89)]();if(typeof _0x211c77==='object')return JSON[_0x2b1b67(0x98)](_0x211c77);return String(_0x211c77);}function formatValueForTSV(_0x4cf121){const _0x4dfc28=a95_0x3d64;if(_0x4cf121===null||_0x4cf121===undefined)return'';if(typeof _0x4cf121===_0x4dfc28(0x7f))return _0x4cf121[_0x4dfc28(0x9c)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x4cf121===_0x4dfc28(0x86)||typeof _0x4cf121===_0x4dfc28(0x9a))return String(_0x4cf121);if(_0x4cf121 instanceof Date)return _0x4cf121['toISOString']();if(typeof _0x4cf121==='object')return JSON['stringify'](_0x4cf121);return String(_0x4cf121);}export function formatQueryResult(_0xb244ea,_0x7d5790){const _0x996346=a95_0x3d64;switch(_0x7d5790){case'table':return formatAsTable(_0xb244ea);case _0x996346(0xb2):return formatAsJSON(_0xb244ea);case _0x996346(0x8d):return formatAsJSONL(_0xb244ea);case _0x996346(0xa3):return formatAsTSV(_0xb244ea);default:return formatAsJSON(_0xb244ea);}}export function formatBytes(_0x504c12){const _0x57a260=a95_0x3d64;if(_0x504c12===0x0)return _0x57a260(0x8b);const _0x488656=['B','KB','MB','GB','TB'],_0x55f8d2=0x400,_0x15aa17=Math[_0x57a260(0xaf)](Math[_0x57a260(0x80)](_0x504c12)/Math[_0x57a260(0x80)](_0x55f8d2)),_0x47d3ab=_0x504c12/Math['pow'](_0x55f8d2,_0x15aa17),_0x564a79=_0x47d3ab>=0xa?0x1:0x2;return _0x47d3ab[_0x57a260(0xae)](_0x564a79)+'\x20'+_0x488656[_0x15aa17];}export function formatRows(_0x425feb){const _0x37f739=a95_0x3d64;if(_0x425feb==null)return'-';if(_0x425feb===0x0)return'0';if(_0x425feb<0x3e8)return _0x425feb[_0x37f739(0x94)]();const _0x4e4539=['','K','M','B','T'],_0x553503=0x3e8,_0x1b852f=Math['floor'](Math[_0x37f739(0x80)](_0x425feb)/Math[_0x37f739(0x80)](_0x553503)),_0x513491=_0x425feb/Math[_0x37f739(0x84)](_0x553503,_0x1b852f),_0x143bf8=_0x513491>=0xa?0x1:0x2;return''+_0x513491[_0x37f739(0xae)](_0x143bf8)+_0x4e4539[_0x1b852f];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a96_0x5b46(){const _0x119c2d=['1302VTmfhE','parse','Permission\x20denied\x20reading\x20file:\x20','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','Invalid\x20JSON\x20string:\x20','ENOENT','message','1183115sURsHR','File\x20not\x20found:\x20','EACCES','3873312TocyPl','8279103vrfuiR','\x27:\x20','1434476kDKTep','PERMISSION_DENIED','Failed\x20to\x20load\x20JSON:\x20','code','9828232zBCmts','NOT_FOUND','433350OvvyYb','INVALID_ARGUMENT','124kcUcEO'];a96_0x5b46=function(){return _0x119c2d;};return a96_0x5b46();}(function(_0x47dff3,_0x319723){const _0x43bc99=a96_0xca58,_0x63ea67=_0x47dff3();while(!![]){try{const _0x4dd37e=parseInt(_0x43bc99(0xd1))/0x1+parseInt(_0x43bc99(0xd7))/0x2+-parseInt(_0x43bc99(0xda))/0x3*(-parseInt(_0x43bc99(0xd9))/0x4)+-parseInt(_0x43bc99(0xe1))/0x5+-parseInt(_0x43bc99(0xe4))/0x6+parseInt(_0x43bc99(0xe5))/0x7+-parseInt(_0x43bc99(0xd5))/0x8;if(_0x4dd37e===_0x319723)break;else _0x63ea67['push'](_0x63ea67['shift']());}catch(_0x43c435){_0x63ea67['push'](_0x63ea67['shift']());}}}(a96_0x5b46,0xb3d76));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x197c38,_0x500e6c){const _0x160ec8=a96_0xca58;try{if(_0x500e6c){const _0x3beb5f=await readFile(_0x197c38,'utf-8');try{return JSON[_0x160ec8(0xdb)](_0x3beb5f);}catch(_0x799900){throw new SDKError(ErrorCode[_0x160ec8(0xd8)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x197c38+_0x160ec8(0xe6)+(_0x799900 instanceof Error?_0x799900[_0x160ec8(0xe0)]:String(_0x799900)));}}else try{return JSON['parse'](_0x197c38);}catch(_0x628f16){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x160ec8(0xde)+(_0x628f16 instanceof Error?_0x628f16[_0x160ec8(0xe0)]:String(_0x628f16)));}}catch(_0x1cf0b5){if(_0x1cf0b5 instanceof SDKError)throw _0x1cf0b5;if(_0x1cf0b5 instanceof Error&&_0x160ec8(0xd4)in _0x1cf0b5){const _0x5ed5b2=_0x1cf0b5;if(_0x5ed5b2['code']===_0x160ec8(0xdf))throw new SDKError(ErrorCode[_0x160ec8(0xd6)],_0x160ec8(0xe2)+_0x197c38);else{if(_0x5ed5b2['code']===_0x160ec8(0xe3))throw new SDKError(ErrorCode[_0x160ec8(0xd2)],_0x160ec8(0xdc)+_0x197c38);}}throw new SDKError(ErrorCode['INTERNAL'],_0x160ec8(0xd3)+(_0x1cf0b5 instanceof Error?_0x1cf0b5[_0x160ec8(0xe0)]:String(_0x1cf0b5)));}}function a96_0xca58(_0x51ea8a,_0x434631){_0x51ea8a=_0x51ea8a-0xd1;const _0x5b4663=a96_0x5b46();let _0xca58b3=_0x5b4663[_0x51ea8a];return _0xca58b3;}export async function loadJSONFromOptions(_0x2ecb9c,_0x1179dd){const _0x2bb76d=a96_0xca58;if(_0x2ecb9c&&_0x1179dd)throw new SDKError(ErrorCode[_0x2bb76d(0xd8)],_0x2bb76d(0xdd));if(_0x2ecb9c)return await loadJSON(_0x2ecb9c,![]);if(_0x1179dd)return await loadJSON(_0x1179dd,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1139f6,_0x329c09){const _0x498892=a97_0xcdc5,_0xffd834=_0x1139f6();while(!![]){try{const _0x3f1e8c=parseInt(_0x498892(0xd1))/0x1*(parseInt(_0x498892(0xdd))/0x2)+-parseInt(_0x498892(0xe0))/0x3*(-parseInt(_0x498892(0xd8))/0x4)+-parseInt(_0x498892(0xd4))/0x5+parseInt(_0x498892(0xd3))/0x6+-parseInt(_0x498892(0xe1))/0x7+parseInt(_0x498892(0xdf))/0x8+-parseInt(_0x498892(0xdb))/0x9;if(_0x3f1e8c===_0x329c09)break;else _0xffd834['push'](_0xffd834['shift']());}catch(_0x238827){_0xffd834['push'](_0xffd834['shift']());}}}(a97_0x51df,0x1ec25));export function canCreateAgent(_0x454da6,_0x2641c3){const _0x2fd9e6=a97_0xcdc5;for(const _0x16e1c1 of _0x454da6[_0x2fd9e6(0xde)][_0x2fd9e6(0xd6)]){if(_0x16e1c1[_0x2fd9e6(0xd7)]&&!_0x2641c3[_0x2fd9e6(0xd5)](_0x16e1c1[_0x2fd9e6(0xd7)]))return![];}return!![];}export function remapToolIds(_0x10910a,_0x3481be,_0x46884c){const _0x2e54e0=a97_0xcdc5;return _0x10910a[_0x2e54e0(0xdc)](_0x7d9422=>({..._0x7d9422,'targetKnowledgeBaseId':_0x7d9422[_0x2e54e0(0xda)]?_0x3481be[_0x2e54e0(0xd9)](_0x7d9422[_0x2e54e0(0xda)])||_0x7d9422['targetKnowledgeBaseId']:undefined,'targetAgentId':_0x7d9422[_0x2e54e0(0xd7)]?_0x46884c[_0x2e54e0(0xd9)](_0x7d9422[_0x2e54e0(0xd7)])||_0x7d9422[_0x2e54e0(0xd7)]:undefined}));}export function remapVariableIds(_0x1c6b84,_0x411fe7){const _0x3d6b72=a97_0xcdc5;return _0x1c6b84[_0x3d6b72(0xdc)](_0x18dae8=>({..._0x18dae8,'targetKnowledgeBaseId':_0x411fe7[_0x3d6b72(0xd9)](_0x18dae8[_0x3d6b72(0xda)])||_0x18dae8['targetKnowledgeBaseId']}));}function a97_0x51df(){const _0xd80c1f=['3404FrefSq','get','targetKnowledgeBaseId','2328993dyKDEZ','map','554vQjmpn','attributes','1031984rwDKXe','237NYbzqb','213248IWyDYx','623XyORPy','1.0','1267542zXtSZN','824125AOfhOA','has','tools','targetAgentId'];a97_0x51df=function(){return _0xd80c1f;};return a97_0x51df();}function a97_0xcdc5(_0x7af165,_0x562c2f){_0x7af165=_0x7af165-0xd1;const _0x51df68=a97_0x51df();let _0xcdc5b6=_0x51df68[_0x7af165];return _0xcdc5b6;}export function isSupportedBackupVersion(_0x26225d){const _0x24773d=a97_0xcdc5;return _0x26225d===_0x24773d(0xd2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0x26c229=a98_0xd306;(function(_0x136c45,_0x1464c4){const _0x1c814e=a98_0xd306,_0x1e9ace=_0x136c45();while(!![]){try{const _0x1dd2d3=parseInt(_0x1c814e(0xdc))/0x1*(-parseInt(_0x1c814e(0xd5))/0x2)+-parseInt(_0x1c814e(0xdd))/0x3+-parseInt(_0x1c814e(0xd8))/0x4*(-parseInt(_0x1c814e(0xd6))/0x5)+-parseInt(_0x1c814e(0xd4))/0x6+-parseInt(_0x1c814e(0xda))/0x7+-parseInt(_0x1c814e(0xdb))/0x8*(-parseInt(_0x1c814e(0xd1))/0x9)+-parseInt(_0x1c814e(0xd9))/0xa*(-parseInt(_0x1c814e(0xd3))/0xb);if(_0x1dd2d3===_0x1464c4)break;else _0x1e9ace['push'](_0x1e9ace['shift']());}catch(_0x493abb){_0x1e9ace['push'](_0x1e9ace['shift']());}}}(a98_0x1c67,0x61c1c));function a98_0xd306(_0x277e6d,_0x4b1097){_0x277e6d=_0x277e6d-0xd1;const _0x1c67ac=a98_0x1c67();let _0xd306fd=_0x1c67ac[_0x277e6d];return _0xd306fd;}const MODEL_ALIASES={'haiku':a98_0x26c229(0xd2),'sonnet':'claude-4.5-sonnet'};export function extractModelAlias(_0x3f8fad){const _0x27fa86=a98_0x26c229,_0x1a55c4=_0x3f8fad[_0x27fa86(0xde)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x1a55c4)return _0x1a55c4[0x1][_0x27fa86(0xd7)]();return _0x3f8fad;}export function resolveModelAlias(_0x42df7c){return MODEL_ALIASES[_0x42df7c['toLowerCase']()]||_0x42df7c;}function a98_0x1c67(){const _0x40505d=['claude-4.5-haiku','2285404NnNbrX','2986980tIVrLU','126252MZZBmZ','229210feruas','toLowerCase','8TkQcNR','70JFebUi','1232448LvGhDc','72CnVkDR','10tYlTES','1492209CNTEPG','match','656937pKayFX'];a98_0x1c67=function(){return _0x40505d;};return a98_0x1c67();}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x771674,_0x5bb1b2){const _0x166448=a99_0x5176,_0x5a6443=_0x771674();while(!![]){try{const _0x4051fb=parseInt(_0x166448(0x19c))/0x1+-parseInt(_0x166448(0x195))/0x2*(parseInt(_0x166448(0x193))/0x3)+-parseInt(_0x166448(0x190))/0x4+-parseInt(_0x166448(0x19b))/0x5+-parseInt(_0x166448(0x1a0))/0x6*(-parseInt(_0x166448(0x194))/0x7)+parseInt(_0x166448(0x19f))/0x8+-parseInt(_0x166448(0x1a6))/0x9*(parseInt(_0x166448(0x19e))/0xa);if(_0x4051fb===_0x5bb1b2)break;else _0x5a6443['push'](_0x5a6443['shift']());}catch(_0x5c138b){_0x5a6443['push'](_0x5a6443['shift']());}}}(a99_0x4c53,0x57059));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x33f4a4){const _0x4b0478=a99_0x5176,_0x2f857d=_0x33f4a4[_0x4b0478(0x18c)]();if(MODEL_FACTORS[_0x2f857d])return MODEL_FACTORS[_0x2f857d];if(_0x2f857d[_0x4b0478(0x198)](_0x4b0478(0x19a)))return MODEL_FACTORS[_0x4b0478(0x19a)];if(_0x2f857d[_0x4b0478(0x198)](_0x4b0478(0x199)))return MODEL_FACTORS[_0x4b0478(0x199)];if(_0x2f857d['includes'](_0x4b0478(0x196)))return MODEL_FACTORS['opus'];return MODEL_FACTORS[_0x4b0478(0x19a)];}export function getContextLimit(_0x13d234){const _0x1b8314=a99_0x5176,_0x5beb8f=_0x13d234[_0x1b8314(0x18c)]();if(_0x5beb8f[_0x1b8314(0x198)](_0x1b8314(0x19a)))return CONTEXT_LIMITS[_0x1b8314(0x19a)];if(_0x5beb8f[_0x1b8314(0x198)]('haiku'))return CONTEXT_LIMITS[_0x1b8314(0x199)];if(_0x5beb8f[_0x1b8314(0x198)](_0x1b8314(0x196)))return CONTEXT_LIMITS[_0x1b8314(0x196)];return CONTEXT_LIMITS['default'];}export function calculateChatUnit(_0x35f337,_0x2730b2,_0x4652db){return(_0x35f337+_0x2730b2)/0x1388*_0x4652db;}function a99_0x5176(_0x219cf0,_0x58c89f){_0x219cf0=_0x219cf0-0x18c;const _0x4c534f=a99_0x4c53();let _0x517688=_0x4c534f[_0x219cf0];return _0x517688;}export function calculateCredits(_0x3111a8){return _0x3111a8/0x2904;}function a99_0x4c53(){const _0x267f23=['opus','Opus\x204.5','includes','haiku','sonnet','1916395tLqxKm','651860UbGzQp','4-5','3098470tWpPFj','3751472PINfNe','923664YBchmO','Sonnet\x204.5','Opus\x204','en-US','round','Sonnet\x204','9QqNNJO','toLowerCase','4.5','Haiku\x204.5','toLocaleString','94340QmSHQU','Claude','Haiku\x204','66ZeqthV','7dmQbuo','18326XEYCXv'];a99_0x4c53=function(){return _0x267f23;};return a99_0x4c53();}export function getModelDisplayName(_0x4ac771){const _0x1d634c=a99_0x5176,_0x81c45a=_0x4ac771[_0x1d634c(0x18c)]();if(_0x81c45a[_0x1d634c(0x198)]('sonnet')){if(_0x81c45a[_0x1d634c(0x198)]('4-5')||_0x81c45a['includes'](_0x1d634c(0x18d)))return _0x1d634c(0x1a1);return _0x1d634c(0x1a5);}if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x199))){if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x19d))||_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x18d)))return _0x1d634c(0x18e);return _0x1d634c(0x192);}if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x196))){if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x19d))||_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x18d)))return _0x1d634c(0x197);return _0x1d634c(0x1a2);}return _0x1d634c(0x191);}export function formatTokenCount(_0x5eba78){const _0x3c0c68=a99_0x5176;return _0x5eba78[_0x3c0c68(0x18f)](_0x3c0c68(0x1a3));}export function calculateContextPercentage(_0x5348ce,_0x5470b8){const _0x1aec75=a99_0x5176,_0x2719de=getContextLimit(_0x5470b8);return Math[_0x1aec75(0x1a4)](_0x5348ce/_0x2719de*0x64);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a100_0x1eec(_0x5ee1d1,_0x5cc316){_0x5ee1d1=_0x5ee1d1-0x192;const _0x3bca3a=a100_0x3bca();let _0x1eec02=_0x3bca3a[_0x5ee1d1];return _0x1eec02;}(function(_0x19c876,_0x217575){const _0x171503=a100_0x1eec,_0x41c3d8=_0x19c876();while(!![]){try{const _0x56fc27=-parseInt(_0x171503(0x1a2))/0x1*(-parseInt(_0x171503(0x194))/0x2)+parseInt(_0x171503(0x19c))/0x3+parseInt(_0x171503(0x1a3))/0x4*(-parseInt(_0x171503(0x19d))/0x5)+parseInt(_0x171503(0x193))/0x6*(-parseInt(_0x171503(0x19b))/0x7)+-parseInt(_0x171503(0x195))/0x8*(-parseInt(_0x171503(0x19a))/0x9)+parseInt(_0x171503(0x1a1))/0xa*(-parseInt(_0x171503(0x199))/0xb)+parseInt(_0x171503(0x198))/0xc*(parseInt(_0x171503(0x196))/0xd);if(_0x56fc27===_0x217575)break;else _0x41c3d8['push'](_0x41c3d8['shift']());}catch(_0x709456){_0x41c3d8['push'](_0x41c3d8['shift']());}}}(a100_0x3bca,0x23d74));export function validateLimitOption(_0x3ee19a){const _0x54ca80=a100_0x1eec;if(!Number['isInteger'](_0x3ee19a))return{'isValid':![],'error':_0x54ca80(0x19e)+_0x3ee19a+_0x54ca80(0x192)};if(_0x3ee19a<=0x0)return{'isValid':![],'error':_0x54ca80(0x19e)+_0x3ee19a+_0x54ca80(0x1a0)};return{'isValid':!![],'value':_0x3ee19a};}export function validateTimeoutOption(_0x16a0de,_0x19dfe4=0x1e){const _0x19de96=a100_0x1eec;if(_0x16a0de===undefined)return{'isValid':!![],'value':_0x19dfe4};const _0x136938=typeof _0x16a0de===_0x19de96(0x19f)?_0x16a0de:parseFloat(_0x16a0de);if(isNaN(_0x136938))return{'isValid':![],'error':_0x19de96(0x1a4)+_0x16a0de+_0x19de96(0x197)};if(_0x136938<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x136938+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x136938};}function a100_0x3bca(){const _0x17368e=['11112HwmyXC','2750PONvdU','16UUtOBo','5616aoRsKc','.\x20Must\x20be\x20a\x20number.','4476abRoFY','773102VpZkAS','963639JvdUGQ','469LenPlk','377511YroWCk','1280uogOIA','Invalid\x20limit\x20value:\x20','number','.\x20Must\x20be\x20a\x20positive\x20integer.','10ZMVbXq','41hGAWFM','3380mPtCJt','Invalid\x20timeout\x20value:\x20','.\x20Must\x20be\x20an\x20integer.'];a100_0x3bca=function(){return _0x17368e;};return a100_0x3bca();}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x528eb7,_0x31120a){const _0x5b7268=a101_0x1364,_0x2836c1=_0x528eb7();while(!![]){try{const _0x30394a=parseInt(_0x5b7268(0x7e))/0x1*(parseInt(_0x5b7268(0x7a))/0x2)+parseInt(_0x5b7268(0x81))/0x3+-parseInt(_0x5b7268(0x82))/0x4*(parseInt(_0x5b7268(0x7b))/0x5)+-parseInt(_0x5b7268(0x77))/0x6*(-parseInt(_0x5b7268(0x73))/0x7)+parseInt(_0x5b7268(0x75))/0x8+-parseInt(_0x5b7268(0x74))/0x9*(parseInt(_0x5b7268(0x7f))/0xa)+-parseInt(_0x5b7268(0x80))/0xb;if(_0x30394a===_0x31120a)break;else _0x2836c1['push'](_0x2836c1['shift']());}catch(_0x32f0df){_0x2836c1['push'](_0x2836c1['shift']());}}}(a101_0x1897,0xdd6b2));import{createServer}from'node:net';export async function isPortAvailable(_0x4fe4e7){return new Promise(_0x113109=>{const _0x569871=a101_0x1364,_0x5471d6=createServer();_0x5471d6[_0x569871(0x7c)](_0x569871(0x7d),_0xca1214=>{const _0x5d5fb6=_0x569871;_0xca1214[_0x5d5fb6(0x79)]===_0x5d5fb6(0x78)?_0x113109(![]):_0x113109(![]);}),_0x5471d6[_0x569871(0x7c)]('listening',()=>{_0x5471d6['close'](),_0x113109(!![]);}),_0x5471d6[_0x569871(0x83)](_0x4fe4e7,_0x569871(0x76));});}function a101_0x1364(_0x32084c,_0x591785){_0x32084c=_0x32084c-0x72;const _0x18977e=a101_0x1897();let _0x13644c=_0x18977e[_0x32084c];return _0x13644c;}function a101_0x1897(){const _0x48a907=['7939295wtlaAT','7236819VlIhks','416608RBIpxZ','0.0.0.0','6pqoHVd','EADDRINUSE','code','469774PNCSQX','581190VmQIDw','once','error','5BcbTNb','10CzdawB','6009575thMdHs','2828376qleZCq','36JEPLzi','listen','No\x20available\x20port\x20found\x20between\x20'];a101_0x1897=function(){return _0x48a907;};return a101_0x1897();}export async function findAvailablePort(_0x5205f8=0xfa0,_0x4109c5=0x64){const _0x2d8c43=a101_0x1364;for(let _0x2930af=0x0;_0x2930af<_0x4109c5;_0x2930af++){const _0x59cdd4=_0x5205f8+_0x2930af;if(await isPortAvailable(_0x59cdd4))return _0x59cdd4;}throw new Error(_0x2d8c43(0x72)+_0x5205f8+'\x20and\x20'+(_0x5205f8+_0x4109c5-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x5aeca1=a102_0xf741;(function(_0x37be19,_0x14b87c){const _0xffa7f5=a102_0xf741,_0xe828c9=_0x37be19();while(!![]){try{const _0x3bd3f6=parseInt(_0xffa7f5(0x1e4))/0x1*(-parseInt(_0xffa7f5(0x1eb))/0x2)+-parseInt(_0xffa7f5(0x1d1))/0x3*(parseInt(_0xffa7f5(0x1d7))/0x4)+-parseInt(_0xffa7f5(0x1dc))/0x5*(parseInt(_0xffa7f5(0x1de))/0x6)+-parseInt(_0xffa7f5(0x1e6))/0x7+-parseInt(_0xffa7f5(0x1c5))/0x8+parseInt(_0xffa7f5(0x1db))/0x9+parseInt(_0xffa7f5(0x1c9))/0xa;if(_0x3bd3f6===_0x14b87c)break;else _0xe828c9['push'](_0xe828c9['shift']());}catch(_0x7f2305){_0xe828c9['push'](_0xe828c9['shift']());}}}(a102_0x4197,0xad9ce));import{execSync}from'node:child_process';const SHELL_NAMES=new Set(['bash',a102_0x5aeca1(0x1dd),'sh',a102_0x5aeca1(0x1e7),a102_0x5aeca1(0x1c6),'tcsh',a102_0x5aeca1(0x1d2),a102_0x5aeca1(0x1e5),'pwsh',a102_0x5aeca1(0x1d8),'nu',a102_0x5aeca1(0x1e0),'elvish',a102_0x5aeca1(0x1cb)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a102_0x5aeca1(0x1cd),a102_0x5aeca1(0x1e2),a102_0x5aeca1(0x1e8)]);function getProcessInfoWindows(_0x339c60){const _0x1bb0e1=a102_0x5aeca1;try{const _0x176565=execSync(_0x1bb0e1(0x1d4)+_0x339c60+_0x1bb0e1(0x1df),{'encoding':_0x1bb0e1(0x1d9),'windowsHide':!![]})[_0x1bb0e1(0x1ee)](),_0x2d83cd=_0x176565[_0x1bb0e1(0x1c3)]('\x0a')['filter'](_0x10e7fb=>_0x10e7fb['trim']());if(_0x2d83cd[_0x1bb0e1(0x1ce)]<0x2)return null;const _0x119859=_0x2d83cd[_0x2d83cd[_0x1bb0e1(0x1ce)]-0x1]['split'](',');if(_0x119859[_0x1bb0e1(0x1ce)]<0x3)return null;const _0x39f4d1=_0x119859[0x1]?.[_0x1bb0e1(0x1ee)]()||'',_0x1a222a=parseInt(_0x119859[0x2]?.[_0x1bb0e1(0x1ee)]()||'0',0xa);if(isNaN(_0x1a222a)||!_0x39f4d1)return null;return{'pid':_0x339c60,'ppid':_0x1a222a,'comm':_0x39f4d1['replace'](/\.exe$/i,'')};}catch(_0x40e65d){return process[_0x1bb0e1(0x1e9)]['DEBUG']&&console[_0x1bb0e1(0x1cc)]('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0x339c60+_0x1bb0e1(0x1ec),_0x40e65d),null;}}function a102_0xf741(_0x10997e,_0x47f6a9){_0x10997e=_0x10997e-0x1c1;const _0x419733=a102_0x4197();let _0xf741b3=_0x419733[_0x10997e];return _0xf741b3;}function getProcessInfoPosix(_0xaf3f1d){const _0x37965d=a102_0x5aeca1;try{const _0x55466d=execSync(_0x37965d(0x1ef)+_0xaf3f1d+_0x37965d(0x1c1),{'encoding':_0x37965d(0x1d9)})['trim'](),[_0x3a4938,..._0x2bbc47]=_0x55466d[_0x37965d(0x1c3)](/\s+/),_0x5e1f6d=parseInt(_0x3a4938,0xa),_0x54a660=_0x2bbc47[_0x37965d(0x1c7)]('\x20');if(isNaN(_0x5e1f6d))return null;return{'pid':_0xaf3f1d,'ppid':_0x5e1f6d,'comm':_0x54a660};}catch(_0x3e235c){return process[_0x37965d(0x1e9)][_0x37965d(0x1e1)]&&console['error'](_0x37965d(0x1d5)+_0xaf3f1d+_0x37965d(0x1f0),_0x3e235c),null;}}function getProcessInfo(_0xcdc554){const _0x55ab35=a102_0x5aeca1;if(process[_0x55ab35(0x1c8)]==='win32')return getProcessInfoWindows(_0xcdc554);return getProcessInfoPosix(_0xcdc554);}function getBasename(_0x39e784){const _0x5513bd=a102_0x5aeca1;return _0x39e784[_0x5513bd(0x1c2)](/^-/,'')['split']('/')[_0x5513bd(0x1d6)]()?.[_0x5513bd(0x1cf)]()||'';}function isShell(_0x5916e8){const _0x213d62=a102_0x5aeca1;return SHELL_NAMES[_0x213d62(0x1ea)](getBasename(_0x5916e8));}function isEphemeralShellSpawner(_0x46d53e){const _0x47ff44=a102_0x5aeca1;return EPHEMERAL_SHELL_SPAWNERS[_0x47ff44(0x1ea)](getBasename(_0x46d53e));}let cachedShellPID;function findShellPID(){const _0x47a96e=a102_0x5aeca1;let _0x26f585=process['ppid'];const _0x2bd007=0xa;let _0x55cdb9=0x0;while(_0x55cdb9<_0x2bd007){const _0x245a5f=getProcessInfo(_0x26f585);if(!_0x245a5f){process[_0x47a96e(0x1e9)]['DEBUG']&&console[_0x47a96e(0x1cc)](_0x47a96e(0x1c4)+_0x26f585+_0x47a96e(0x1e3));break;}if(isShell(_0x245a5f[_0x47a96e(0x1ca)])){const _0x3a9ff3=getProcessInfo(_0x245a5f[_0x47a96e(0x1d3)]);if(_0x3a9ff3&&isEphemeralShellSpawner(_0x3a9ff3['comm'])){process[_0x47a96e(0x1e9)][_0x47a96e(0x1e1)]&&console[_0x47a96e(0x1cc)]('Found\x20ephemeral\x20shell\x20'+_0x245a5f[_0x47a96e(0x1d0)]+'\x20('+_0x245a5f[_0x47a96e(0x1ca)]+_0x47a96e(0x1da)+_0x3a9ff3[_0x47a96e(0x1ca)]+',\x20continuing\x20up');_0x26f585=_0x245a5f[_0x47a96e(0x1d3)],_0x55cdb9++;continue;}return _0x245a5f['pid'];}if(_0x245a5f[_0x47a96e(0x1d3)]===0x0||_0x245a5f[_0x47a96e(0x1d3)]===0x1){if(isShell(_0x245a5f['comm']))return _0x245a5f['pid'];break;}_0x26f585=_0x245a5f[_0x47a96e(0x1d3)],_0x55cdb9++;}return process[_0x47a96e(0x1e9)][_0x47a96e(0x1e1)]&&console[_0x47a96e(0x1cc)]('No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid'),process[_0x47a96e(0x1d3)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x1a8b5d){const _0x46c011=a102_0x5aeca1;try{return process[_0x46c011(0x1ed)](_0x1a8b5d,0x0),!![];}catch{return![];}}function a102_0x4197(){const _0x2c8777=['env','has','1129006UgdCzg','\x20on\x20Windows:','kill','trim','ps\x20-p\x20','\x20on\x20POSIX:','\x20-o\x20ppid=,comm=','replace','split','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','2939488TzdcTV','ksh','join','platform','26060830xJnxHp','comm','xonsh','error','claude','length','toLowerCase','pid','6kLjzVN','csh','ppid','wmic\x20process\x20where\x20ProcessId=','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','pop','2063328qpFEZX','powershell','utf-8',')\x20spawned\x20by\x20','12182796OnsZIl','22840YYIJdw','zsh','36PUfiRO','\x20get\x20ParentProcessId,Name\x20/format:csv','ion','DEBUG','code',',\x20using\x20fallback','2jtSmen','dash','4851665gNQLXZ','fish','cursor'];a102_0x4197=function(){return _0x2c8777;};return a102_0x4197();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1dc048,_0x2503e3){const _0x1db0c0=a103_0x537a,_0xd9237e=_0x1dc048();while(!![]){try{const _0x4e9041=-parseInt(_0x1db0c0(0x102))/0x1*(-parseInt(_0x1db0c0(0xfc))/0x2)+-parseInt(_0x1db0c0(0x110))/0x3+parseInt(_0x1db0c0(0x10e))/0x4*(parseInt(_0x1db0c0(0x101))/0x5)+-parseInt(_0x1db0c0(0x112))/0x6+-parseInt(_0x1db0c0(0x113))/0x7*(-parseInt(_0x1db0c0(0x103))/0x8)+parseInt(_0x1db0c0(0xff))/0x9*(-parseInt(_0x1db0c0(0x107))/0xa)+parseInt(_0x1db0c0(0xfe))/0xb;if(_0x4e9041===_0x2503e3)break;else _0xd9237e['push'](_0xd9237e['shift']());}catch(_0x66a59a){_0xd9237e['push'](_0xd9237e['shift']());}}}(a103_0x613f,0xe50fa));function a103_0x537a(_0x20dcb7,_0x305b3e){_0x20dcb7=_0x20dcb7-0xfc;const _0x613f45=a103_0x613f();let _0x537a1f=_0x613f45[_0x20dcb7];return _0x537a1f;}function a103_0x613f(){const _0x1364c6=['7545762qjqtTq','resume','21394KmCmJM','stdout','643423MoZqdU','2747367XWUPxK','question','10SpCbfx','93hQRaue','8vmUELe','\x20[y/N]\x20','setEncoding','close','10XCbUpl','stdin','\x20(y/N):\x20','setRawMode','toLowerCase','write','stderr','1010604qpOZvm','pause','2810109FHAazR','yes','2738292LSFQdL'];a103_0x613f=function(){return _0x1364c6;};return a103_0x613f();}import*as a103_0x3a38eb from'readline';export async function confirm(_0x28ba7e){const _0x3dfcd4=a103_0x537a,_0xcd4248=a103_0x3a38eb['createInterface']({'input':process[_0x3dfcd4(0x108)],'output':process[_0x3dfcd4(0xfd)]});return new Promise(_0x463b9d=>{const _0x1c01ef=_0x3dfcd4;_0xcd4248[_0x1c01ef(0x100)](_0x28ba7e+_0x1c01ef(0x109),_0x3c09c0=>{const _0x4ffc76=_0x1c01ef;_0xcd4248[_0x4ffc76(0x106)](),_0x463b9d(_0x3c09c0['toLowerCase']()==='y'||_0x3c09c0[_0x4ffc76(0x10b)]()===_0x4ffc76(0x111));});});}export async function confirmKey(_0x1f5e3e){const _0x4c1140=a103_0x537a;if(!process[_0x4c1140(0x108)]['isTTY'])return![];return process['stderr'][_0x4c1140(0x10c)](_0x1f5e3e+_0x4c1140(0x104)),new Promise(_0x6d3997=>{const _0xbc4630=_0x4c1140,_0x26dd1b=process[_0xbc4630(0x108)];_0x26dd1b[_0xbc4630(0x10a)](!![]),_0x26dd1b[_0xbc4630(0x114)](),_0x26dd1b[_0xbc4630(0x105)]('utf8');const _0x2266ba=_0x210686=>{const _0x502832=_0xbc4630;_0x26dd1b[_0x502832(0x10a)](![]),_0x26dd1b[_0x502832(0x10f)](),_0x26dd1b['removeListener']('data',_0x2266ba);if(_0x210686==='\x1b'){process[_0x502832(0x10d)][_0x502832(0x10c)]('\x0a'),_0x6d3997(![]);return;}_0x210686==='\x03'&&(process[_0x502832(0x10d)][_0x502832(0x10c)]('\x0a'),process['exit'](0x82));if(_0x210686[_0x502832(0x10b)]()==='y'){process[_0x502832(0x10d)][_0x502832(0x10c)]('y\x0a'),_0x6d3997(!![]);return;}process[_0x502832(0x10d)][_0x502832(0x10c)]('\x0a'),_0x6d3997(![]);};_0x26dd1b['on']('data',_0x2266ba);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4752c9,_0x241246){const _0x4bf1b8=a104_0x39a6,_0x436624=_0x4752c9();while(!![]){try{const _0x52bcaf=-parseInt(_0x4bf1b8(0x126))/0x1*(-parseInt(_0x4bf1b8(0x13e))/0x2)+-parseInt(_0x4bf1b8(0x14a))/0x3*(-parseInt(_0x4bf1b8(0x140))/0x4)+parseInt(_0x4bf1b8(0x150))/0x5*(-parseInt(_0x4bf1b8(0x146))/0x6)+parseInt(_0x4bf1b8(0x129))/0x7+-parseInt(_0x4bf1b8(0x151))/0x8+parseInt(_0x4bf1b8(0x14c))/0x9*(-parseInt(_0x4bf1b8(0x136))/0xa)+-parseInt(_0x4bf1b8(0x12c))/0xb;if(_0x52bcaf===_0x241246)break;else _0x436624['push'](_0x436624['shift']());}catch(_0x825839){_0x436624['push'](_0x436624['shift']());}}}(a104_0x111a,0x73898));import{existsSync,readFileSync}from'fs';import a104_0xe0a4b0 from'path';import{parse as a104_0x6ceca6}from'yaml';export function parsePath(_0x327807){const _0x2b54df=a104_0x39a6;if(!_0x327807||_0x327807['trim']()==='')throw new Error(_0x2b54df(0x142));const _0x19c9bc=_0x327807[_0x2b54df(0x14f)]();if(_0x19c9bc==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x327807};const _0x54f564=_0x19c9bc[_0x2b54df(0x13c)]('/')?_0x19c9bc[_0x2b54df(0x13b)](0x1):_0x19c9bc,_0x601a36=_0x54f564[_0x2b54df(0x147)]('/')['filter'](_0x218591=>_0x218591!=='');if(_0x601a36['length']===0x0)throw new Error(_0x2b54df(0x128));const _0x180938=_0x19c9bc[_0x2b54df(0x13c)]('/')||!isRelativePathSegment(_0x601a36[0x0]);for(const _0x2c7d0a of _0x601a36){validatePathSegment(_0x2c7d0a);}return{'segments':_0x601a36,'isAbsolute':_0x180938,'raw':_0x327807};}function isRelativePathSegment(_0x586574){return _0x586574==='.'||_0x586574==='..';}function validatePathSegment(_0x187bbc){const _0x2db78c=a104_0x39a6;if(_0x187bbc==='')throw new Error(_0x2db78c(0x14e));if(_0x187bbc==='.'||_0x187bbc==='..')return;if(/[\x00-\x1F\x7F]/[_0x2db78c(0x138)](_0x187bbc))throw new Error(_0x2db78c(0x125)+_0x187bbc);if(_0x187bbc!==_0x187bbc[_0x2db78c(0x14f)]()){}}export function validatePath(_0x5f1e12){const _0x580b0a=a104_0x39a6;if(_0x5f1e12['segments'][_0x580b0a(0x12f)]===0x0&&!_0x5f1e12[_0x580b0a(0x132)])throw new Error(_0x580b0a(0x130));if(_0x5f1e12['isAbsolute']){if(_0x5f1e12[_0x580b0a(0x14d)][0x0]==='..')throw new Error(_0x580b0a(0x135));let _0x2c5a06=0x0;for(const _0x2d8067 of _0x5f1e12[_0x580b0a(0x14d)]){if(_0x2d8067==='..'){if(_0x2c5a06===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x2c5a06--;}else _0x2d8067!=='.'&&_0x2c5a06++;}}}export function joinPaths(_0x2a1925,_0x5c0da3){const _0x419865=a104_0x39a6;if(!_0x2a1925||_0x2a1925==='/')return _0x5c0da3;if(!_0x5c0da3||_0x5c0da3==='.')return _0x2a1925;if(_0x5c0da3['startsWith']('/'))return _0x5c0da3;const _0x47be4d=parsePath(_0x2a1925),_0x243f59=parsePath(_0x5c0da3),_0x30f5b8=[..._0x47be4d[_0x419865(0x14d)]];for(const _0x26ff5d of _0x243f59[_0x419865(0x14d)]){if(_0x26ff5d==='.')continue;else{if(_0x26ff5d==='..'){if(_0x30f5b8['length']===0x0)throw new Error(_0x419865(0x131));_0x30f5b8[_0x419865(0x145)]();}else _0x30f5b8[_0x419865(0x149)](_0x26ff5d);}}const _0x420e39=_0x30f5b8['join']('/');return _0x47be4d['raw']['startsWith']('/')?'/'+_0x420e39:_0x420e39;}export function normalizePath(_0x2590ce){const _0x497643=a104_0x39a6,_0x27c8de=parsePath(_0x2590ce),_0x17d167=[];for(const _0x48259a of _0x27c8de[_0x497643(0x14d)]){if(_0x48259a==='.')continue;else{if(_0x48259a==='..'){if(_0x17d167['length']===0x0){if(_0x27c8de[_0x497643(0x132)])throw new Error(_0x497643(0x131));_0x17d167[_0x497643(0x149)]('..');}else _0x17d167[_0x17d167[_0x497643(0x12f)]-0x1]==='..'?_0x17d167[_0x497643(0x149)]('..'):_0x17d167[_0x497643(0x145)]();}else _0x17d167[_0x497643(0x149)](_0x48259a);}}if(_0x17d167[_0x497643(0x12f)]===0x0)return _0x27c8de['isAbsolute']?'/':'.';const _0x587186=_0x17d167[_0x497643(0x13d)]('/');return _0x27c8de[_0x497643(0x141)][_0x497643(0x13c)]('/')?'/'+_0x587186:_0x587186;}export function getParentPath(_0x2c84ee){const _0x40bb62=a104_0x39a6,_0x2d33a3=parsePath(_0x2c84ee);if(_0x2d33a3['segments'][_0x40bb62(0x12f)]<=0x1)return'/';const _0x514ffd=_0x2d33a3[_0x40bb62(0x14d)][_0x40bb62(0x134)](0x0,-0x1)[_0x40bb62(0x13d)]('/');return _0x2d33a3[_0x40bb62(0x141)][_0x40bb62(0x13c)]('/')?'/'+_0x514ffd:_0x514ffd;}function a104_0x111a(){const _0x1adea5=['Relative\x20path\x20cannot\x20be\x20empty','Cannot\x20navigate\x20above\x20root','isAbsolute','endsWith','slice','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','10HIYezS','tdx.json','test','File\x20not\x20found:\x20','parent_segment','substring','startsWith','join','4HKqAOy','name','4kfCtiR','raw','Path\x20cannot\x20be\x20empty','utf-8','.yaml','pop','6ocPyry','split','dirname','push','2529225tNoOXi','.yml','6585399IZEfuz','segments','Path\x20segment\x20cannot\x20be\x20empty','trim','2826475MNVDeb','3473952Flwgnn','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','450758CORBdm','relative','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','5350338QaVBPs','No\x20tdx.json\x20found\x20for\x20file:\x20','resolve','3348785fUNjRH','parse','Invalid\x20segment\x20YAML:\x20missing\x20name\x20field\x20in\x20','length'];a104_0x111a=function(){return _0x1adea5;};return a104_0x111a();}export function getBaseName(_0x5d6ff2){const _0x2328cb=a104_0x39a6,_0x3210aa=parsePath(_0x5d6ff2);return _0x3210aa[_0x2328cb(0x14d)][_0x3210aa[_0x2328cb(0x14d)][_0x2328cb(0x12f)]-0x1]||'';}export function isChildPath(_0x718b02,_0x50001f){const _0x137eff=a104_0x39a6,_0x303632=parsePath(_0x718b02),_0x4bbe44=parsePath(_0x50001f);if(_0x303632[_0x137eff(0x14d)][_0x137eff(0x12f)]<=_0x4bbe44[_0x137eff(0x14d)][_0x137eff(0x12f)])return![];for(let _0x5da466=0x0;_0x5da466<_0x4bbe44[_0x137eff(0x14d)][_0x137eff(0x12f)];_0x5da466++){if(_0x303632[_0x137eff(0x14d)][_0x5da466]!==_0x4bbe44[_0x137eff(0x14d)][_0x5da466])return![];}return!![];}export function splitPath(_0x1f37fa){const _0x8c49ea=a104_0x39a6,_0x409782=parsePath(_0x1f37fa);if(_0x409782[_0x8c49ea(0x14d)]['length']===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x409782[_0x8c49ea(0x14d)][_0x8c49ea(0x12f)]===0x1)return{'parent':_0x409782[_0x8c49ea(0x14d)][0x0]};return{'parent':_0x409782[_0x8c49ea(0x14d)][0x0],'child':_0x409782['segments']['slice'](0x1)[_0x8c49ea(0x13d)]('/')};}function a104_0x39a6(_0x385889,_0x5a3e09){_0x385889=_0x385889-0x125;const _0x111a4a=a104_0x111a();let _0x39a613=_0x111a4a[_0x385889];return _0x39a613;}export function isYamlFilePath(_0x3db515){const _0x5cb9f0=a104_0x39a6;return _0x3db515[_0x5cb9f0(0x133)](_0x5cb9f0(0x14b))||_0x3db515[_0x5cb9f0(0x133)](_0x5cb9f0(0x144));}export function resolveYamlFilePath(_0x1f0dc6){const _0x30bee7=a104_0x39a6,_0x267598=a104_0xe0a4b0[_0x30bee7(0x12b)](_0x1f0dc6);if(!existsSync(_0x267598))throw new Error(_0x30bee7(0x139)+_0x1f0dc6);let _0x4fd911=a104_0xe0a4b0['dirname'](_0x267598),_0x11b045=null,_0x2d5ee1=null;const _0x569f8f=a104_0xe0a4b0[_0x30bee7(0x12d)](_0x4fd911)['root'];while(_0x4fd911!==_0x569f8f){const _0x112dd6=a104_0xe0a4b0['join'](_0x4fd911,_0x30bee7(0x137));if(existsSync(_0x112dd6)){_0x11b045=_0x112dd6,_0x2d5ee1=_0x4fd911;break;}_0x4fd911=a104_0xe0a4b0[_0x30bee7(0x148)](_0x4fd911);}if(!_0x11b045||!_0x2d5ee1)throw new Error(_0x30bee7(0x12a)+_0x1f0dc6);const _0x397802=readFileSync(_0x11b045,'utf-8'),_0x53f1c7=JSON[_0x30bee7(0x12d)](_0x397802),_0x2216b9=_0x53f1c7[_0x30bee7(0x13a)];if(!_0x2216b9)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x4fe7fd=readFileSync(_0x267598,_0x30bee7(0x143)),_0x224913=a104_0x6ceca6(_0x4fe7fd),_0x33021a=_0x224913[_0x30bee7(0x13f)];if(!_0x33021a)throw new Error(_0x30bee7(0x12e)+_0x1f0dc6);const _0x5ba5be=a104_0xe0a4b0[_0x30bee7(0x127)](_0x2d5ee1,_0x267598),_0x5bfa15=a104_0xe0a4b0[_0x30bee7(0x148)](_0x5ba5be),_0x4b7202=_0x5bfa15==='.'?'':_0x5bfa15['replace'](/\\/g,'/'),_0x2be705=_0x4b7202?_0x2216b9+'/'+_0x4b7202+'/'+_0x33021a:_0x2216b9+'/'+_0x33021a;return{'parentSegment':_0x2216b9,'segmentName':_0x33021a,'folderPath':_0x4b7202,'fullPath':_0x2be705};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a105_0x5b2b(){const _0x8ee962=['248484MJZLpq','1360209ToJjeP','indexOf','1980eiCHGH','11511BvEAcv','4765584SjuUga','794312ivlhXs','8cvPpoK','substring','3983315JipLCJ','Invalid\x20segment\x20reference\x20format:\x20','14hbPRXX','4063zoVowI','.\x20Parent\x20name\x20cannot\x20be\x20empty'];a105_0x5b2b=function(){return _0x8ee962;};return a105_0x5b2b();}function a105_0x14ac(_0x5652e2,_0x55486f){_0x5652e2=_0x5652e2-0x82;const _0x5b2bd3=a105_0x5b2b();let _0x14ace2=_0x5b2bd3[_0x5652e2];return _0x14ace2;}(function(_0x49d61a,_0x616f91){const _0x3eda99=a105_0x14ac,_0x7be120=_0x49d61a();while(!![]){try{const _0x217cc3=parseInt(_0x3eda99(0x89))/0x1*(-parseInt(_0x3eda99(0x84))/0x2)+parseInt(_0x3eda99(0x8c))/0x3+parseInt(_0x3eda99(0x8b))/0x4+parseInt(_0x3eda99(0x86))/0x5+-parseInt(_0x3eda99(0x82))/0x6+parseInt(_0x3eda99(0x88))/0x7*(-parseInt(_0x3eda99(0x83))/0x8)+parseInt(_0x3eda99(0x8f))/0x9*(parseInt(_0x3eda99(0x8e))/0xa);if(_0x217cc3===_0x616f91)break;else _0x7be120['push'](_0x7be120['shift']());}catch(_0x1f8794){_0x7be120['push'](_0x7be120['shift']());}}}(a105_0x5b2b,0x87d2f));export function parseSegmentRef(_0x42139e){const _0x10fb16=a105_0x14ac,_0x161d4e=_0x42139e[_0x10fb16(0x8d)]('/');if(_0x161d4e===-0x1)return{'parentId':_0x42139e};if(_0x161d4e===0x0)throw new Error(_0x10fb16(0x87)+_0x42139e+_0x10fb16(0x8a));const _0x8bd6bc=_0x42139e[_0x10fb16(0x85)](0x0,_0x161d4e),_0xf3fa3a=_0x42139e['substring'](_0x161d4e+0x1);if(_0xf3fa3a==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x42139e+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x8bd6bc,'childId':_0xf3fa3a};}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a106_0x15e9(_0x5c1c31,_0x435e91){_0x5c1c31=_0x5c1c31-0x1e7;const _0x4fcaf4=a106_0x4fca();let _0x15e9ee=_0x4fcaf4[_0x5c1c31];return _0x15e9ee;}(function(_0x4854d8,_0x484fd9){const _0x1927d4=a106_0x15e9,_0x5b5bae=_0x4854d8();while(!![]){try{const _0x4ca30e=-parseInt(_0x1927d4(0x200))/0x1*(parseInt(_0x1927d4(0x1fb))/0x2)+parseInt(_0x1927d4(0x1e8))/0x3+-parseInt(_0x1927d4(0x1fc))/0x4*(-parseInt(_0x1927d4(0x1f5))/0x5)+parseInt(_0x1927d4(0x1f4))/0x6*(parseInt(_0x1927d4(0x1ec))/0x7)+-parseInt(_0x1927d4(0x1ea))/0x8*(-parseInt(_0x1927d4(0x1ff))/0x9)+parseInt(_0x1927d4(0x1ef))/0xa+parseInt(_0x1927d4(0x1ed))/0xb*(-parseInt(_0x1927d4(0x201))/0xc);if(_0x4ca30e===_0x484fd9)break;else _0x5b5bae['push'](_0x5b5bae['shift']());}catch(_0x34933f){_0x5b5bae['push'](_0x5b5bae['shift']());}}}(a106_0x4fca,0x83172));import a106_0x5a3789 from'ora';export function createCommandSpinner(_0x1e7f71,_0x58decd={}){const _0xf51480=a106_0x15e9,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x58decd;return a106_0x5a3789({'text':_0x1e7f71,'color':_0xf51480(0x1fa),'isEnabled':forceEnabled||process['stdout'][_0xf51480(0x1f1)]&&!verbose});}export async function withSpinner(_0x4042c2,_0x2ced50,_0x4b0355={}){const _0x4770ef=a106_0x15e9,_0x2fdd65=_0x4b0355[_0x4770ef(0x1fd)]??(()=>Date[_0x4770ef(0x1f2)]()),_0xb7e047=createCommandSpinner(_0x4042c2,_0x4b0355);_0xb7e047['start']();const _0x4b22a5=_0x2fdd65();try{const _0x21bc00=await _0x2ced50(),_0x505271=_0x2fdd65()-_0x4b22a5;return _0xb7e047[_0x4770ef(0x1e9)](),{'data':_0x21bc00,'elapsedMs':_0x505271};}catch(_0x178ac3){_0xb7e047[_0x4770ef(0x1e9)]();throw _0x178ac3;}}export async function withQuerySpinner(_0x4eff4d,_0x316e53,_0x9faac5={}){const _0x24f5b8=a106_0x15e9,_0x19b010=_0x9faac5['clock']??(()=>Date[_0x24f5b8(0x1f2)]()),_0x21f4cb=_0x9faac5[_0x24f5b8(0x1e7)]??setInterval,_0x267f61=createCommandSpinner(_0x4eff4d,_0x9faac5);_0x267f61[_0x24f5b8(0x1f6)]();const _0x19e4a5=_0x19b010(),_0x214a1b=_0x4eff4d[_0x24f5b8(0x202)](_0x24f5b8(0x1eb),''),_0x43e31c={},_0x5ec4aa=()=>{const _0x29fb92=_0x24f5b8;if(!_0x267f61['isSpinning'])return;const _0x4c3bc9=_0x19b010()-_0x19e4a5,_0x10b5cb=formatElapsed(_0x4c3bc9),_0x517850=_0x43e31c[_0x29fb92(0x1fe)]??_0x214a1b,_0x2ec6a6=_0x43e31c[_0x29fb92(0x1f8)]?_0x29fb92(0x1f0)+_0x43e31c[_0x29fb92(0x1f8)]+']':'',_0x193772=_0x43e31c[_0x29fb92(0x1f9)]?'\x20'+_0x43e31c[_0x29fb92(0x1f9)]:'';_0x267f61[_0x29fb92(0x1f7)]=_0x517850+'\x20'+_0x10b5cb+_0x193772+_0x2ec6a6;},_0x3f371f=_0x21f4cb(()=>{_0x5ec4aa();},0x3e8),_0x51f938={'setPhase':_0x3e0041=>{_0x43e31c['phase']=_0x3e0041,_0x5ec4aa();},'setJobId':_0x1962a9=>{const _0x1dda44=_0x24f5b8;_0x43e31c[_0x1dda44(0x1f8)]=_0x1962a9,_0x5ec4aa();},'setExtra':_0x46c4d7=>{const _0x4784ab=_0x24f5b8;_0x43e31c[_0x4784ab(0x1f9)]=_0x46c4d7,_0x5ec4aa();}};_0x5ec4aa();try{const _0x4cf8b8=await _0x316e53(_0x51f938),_0x7028f5=_0x19b010()-_0x19e4a5;return{'data':_0x4cf8b8,'elapsedMs':_0x7028f5};}finally{clearInterval(_0x3f371f),_0x267f61[_0x24f5b8(0x1e9)]();}}export function formatElapsed(_0x18b584){const _0x1c0ec9=a106_0x15e9,_0x416a63=Math[_0x1c0ec9(0x1f3)](_0x18b584/0x3e8);if(_0x416a63<0x3c)return(_0x18b584/0x3e8)[_0x1c0ec9(0x1ee)](0x1)+'s';const _0x2b22a3=Math['floor'](_0x416a63/0x3c),_0x4491e8=_0x416a63%0x3c;if(_0x2b22a3<0x3c)return _0x2b22a3+'m\x20'+_0x4491e8+'s';const _0xe43a05=Math[_0x1c0ec9(0x1f3)](_0x2b22a3/0x3c),_0x5bf6ff=_0x2b22a3%0x3c;return _0xe43a05+'h\x20'+_0x5bf6ff+'m';}function a106_0x4fca(){const _0x9f8434=['start','text','jobId','extra','cyan','706aULyXM','9612SGWAtl','clock','phase','149193fZrgIE','511kEzQQO','1626972onRWtK','replace','intervalFactory','1547196WApFfJ','stop','112xKFYka','...','1999802iyxPqF','55baHIea','toFixed','1262440UjAQhR','\x20[Job\x20ID:\x20','isTTY','now','floor','6jtWddV','490MfCQpI'];a106_0x4fca=function(){return _0x9f8434;};return a106_0x4fca();}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30164b,_0xf77e35){const _0x570b40=a107_0xa4ee,_0x296459=_0x30164b();while(!![]){try{const _0x3f3e4f=-parseInt(_0x570b40(0x105))/0x1*(parseInt(_0x570b40(0x100))/0x2)+parseInt(_0x570b40(0xf5))/0x3+parseInt(_0x570b40(0xfa))/0x4*(-parseInt(_0x570b40(0xff))/0x5)+-parseInt(_0x570b40(0x10e))/0x6*(-parseInt(_0x570b40(0x10b))/0x7)+parseInt(_0x570b40(0xf9))/0x8*(parseInt(_0x570b40(0xfb))/0x9)+parseInt(_0x570b40(0x108))/0xa*(parseInt(_0x570b40(0x102))/0xb)+parseInt(_0x570b40(0x107))/0xc*(-parseInt(_0x570b40(0xfd))/0xd);if(_0x3f3e4f===_0xf77e35)break;else _0x296459['push'](_0x296459['shift']());}catch(_0x2bcee0){_0x296459['push'](_0x296459['shift']());}}}(a107_0x1a90,0x970be));import{readFileSync}from'fs';export function stripSqlComments(_0xfabc1b){const _0x27bdb0=a107_0xa4ee;let _0x5d835b=_0xfabc1b[_0x27bdb0(0x10d)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x5d835b=_0x5d835b['replace'](/--.*$/gm,''),_0x5d835b[_0x27bdb0(0xf4)]();}function isEscaped(_0x107a57,_0x39855f){let _0x495783=0x0;for(let _0x3b9a0c=_0x39855f-0x1;_0x3b9a0c>=0x0&&_0x107a57[_0x3b9a0c]==='\x5c';_0x3b9a0c--){_0x495783++;}return _0x495783%0x2===0x1;}export function splitSqlStatements(_0xa9d2db){const _0x1e0a80=a107_0xa4ee,_0x565323=stripSqlComments(_0xa9d2db);if(!_0x565323)throw new Error(_0x1e0a80(0x10f));const _0x1111eb=[];let _0x33f702='',_0x13b517=![],_0x529d17=![],_0x372b43=![];for(let _0x5c33d9=0x0;_0x5c33d9<_0xa9d2db[_0x1e0a80(0x101)];_0x5c33d9++){const _0x5ed21a=_0xa9d2db[_0x5c33d9];if(_0x5ed21a==='\x27'&&!isEscaped(_0xa9d2db,_0x5c33d9)&&!_0x529d17&&!_0x372b43)_0x13b517=!_0x13b517;else{if(_0x5ed21a==='\x22'&&!isEscaped(_0xa9d2db,_0x5c33d9)&&!_0x13b517&&!_0x372b43)_0x529d17=!_0x529d17;else _0x5ed21a==='`'&&!isEscaped(_0xa9d2db,_0x5c33d9)&&!_0x13b517&&!_0x529d17&&(_0x372b43=!_0x372b43);}if(_0x5ed21a===';'&&!_0x13b517&&!_0x529d17&&!_0x372b43){const _0x2c0157=_0x33f702['trim']();_0x2c0157&&_0x1111eb[_0x1e0a80(0xf7)](_0x2c0157),_0x33f702='';}else _0x33f702+=_0x5ed21a;}const _0x1d5ba1=_0x33f702[_0x1e0a80(0xf4)]();_0x1d5ba1&&_0x1111eb[_0x1e0a80(0xf7)](_0x1d5ba1);const _0xd9ba75=_0x1111eb[_0x1e0a80(0xfe)](_0x35753f=>_0x35753f['trim']())['filter'](_0x5f0a65=>{const _0x403cad=_0x1e0a80,_0x440848=stripSqlComments(_0x5f0a65);return _0x440848[_0x403cad(0x101)]>0x0;});if(_0xd9ba75['length']===0x0)throw new Error(_0x1e0a80(0x10f));return _0xd9ba75;}export function readFileContent(_0x20cc91){const _0x3e832b=a107_0xa4ee;try{return readFileSync(_0x20cc91,_0x3e832b(0x106));}catch(_0x31518d){const _0x30d695=_0x31518d[_0x3e832b(0xf8)];if(_0x30d695===_0x3e832b(0x103))throw new Error(_0x3e832b(0x110)+_0x20cc91+_0x3e832b(0xfc));else{if(_0x30d695===_0x3e832b(0x111))throw new Error(_0x3e832b(0x109)+_0x20cc91+'\x27');else throw new Error(_0x3e832b(0x10c)+_0x20cc91+_0x3e832b(0xf6)+_0x31518d[_0x3e832b(0x104)]);}}}export function readSqlStatementsFromFile(_0x26faa1){const _0x25caa5=a107_0xa4ee,_0x4926ba=readFileContent(_0x26faa1);try{return splitSqlStatements(_0x4926ba);}catch(_0x30df22){throw new Error('File\x20\x27'+_0x26faa1+'\x27\x20'+_0x30df22[_0x25caa5(0x104)][_0x25caa5(0x10a)]());}}function a107_0xa4ee(_0x5498f1,_0xc1b499){_0x5498f1=_0x5498f1-0xf4;const _0x1a9042=a107_0x1a90();let _0xa4eeca=_0x1a9042[_0x5498f1];return _0xa4eeca;}function a107_0x1a90(){const _0x24b90f=['1832bgvhRT','15924XKrftD','18999dsBbOT','\x27\x20not\x20found','6463938lsaaPa','map','1115ntwrfW','3252UKOJjy','length','11rJBNfp','ENOENT','message','453RIflXS','utf-8','12RSysBU','5079420boLFSn','Permission\x20denied\x20reading\x20file\x20\x27','toLowerCase','77txaKAQ','Error\x20reading\x20file\x20\x27','replace','338166nRNUls','Content\x20contains\x20no\x20SQL\x20statements','File\x20\x27','EACCES','trim','3386763MhkSKq','\x27:\x20','push','code'];a107_0x1a90=function(){return _0x24b90f;};return a107_0x1a90();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a108_0x1fc1(_0x5f5c84,_0x411bf8){_0x5f5c84=_0x5f5c84-0xd4;const _0x2f0553=a108_0x2f05();let _0x1fc118=_0x2f0553[_0x5f5c84];return _0x1fc118;}(function(_0x2b458d,_0x4d5a0d){const _0x45db00=a108_0x1fc1,_0x2cf82d=_0x2b458d();while(!![]){try{const _0x5771be=parseInt(_0x45db00(0xe5))/0x1*(parseInt(_0x45db00(0xdd))/0x2)+parseInt(_0x45db00(0xd7))/0x3+-parseInt(_0x45db00(0xdb))/0x4+parseInt(_0x45db00(0xe7))/0x5+parseInt(_0x45db00(0xe6))/0x6*(-parseInt(_0x45db00(0xe0))/0x7)+parseInt(_0x45db00(0xd5))/0x8*(parseInt(_0x45db00(0xdf))/0x9)+-parseInt(_0x45db00(0xe9))/0xa;if(_0x5771be===_0x4d5a0d)break;else _0x2cf82d['push'](_0x2cf82d['shift']());}catch(_0x1bfba3){_0x2cf82d['push'](_0x2cf82d['shift']());}}}(a108_0x2f05,0xe522b));export async function*parseSSEStream(_0x51afe5,_0x1792ad){const _0x54237c=a108_0x1fc1;if(!_0x51afe5[_0x54237c(0xe3)])throw new Error('Response\x20body\x20is\x20null');const _0x4151a4=_0x51afe5['body']['getReader'](),_0x26d81e=new TextDecoder();let _0x1a7e16='',_0x35ef70={};try{while(!![]){const {done:_0x29be15,value:_0x43ac7d}=await _0x4151a4[_0x54237c(0xe2)]();if(_0x29be15){if(_0x35ef70[_0x54237c(0xd9)]){_0x1792ad?.[_0x54237c(0xe4)](_0x54237c(0xdc)+_0x35ef70[_0x54237c(0xd9)]);const _0x11b987=parseSSEData(_0x35ef70[_0x54237c(0xd9)]);yield _0x11b987;}break;}_0x1a7e16+=_0x26d81e['decode'](_0x43ac7d,{'stream':!![]});const _0x159ffa=_0x1a7e16[_0x54237c(0xd6)]('\x0a');_0x1a7e16=_0x159ffa['pop']()||'';for(const _0x144f96 of _0x159ffa){if(_0x144f96[_0x54237c(0xe8)]()===''){if(_0x35ef70['data']){_0x1792ad?.[_0x54237c(0xe4)]('[LLM\x20API\x20SSE]\x20'+_0x35ef70[_0x54237c(0xd9)]);const _0x3fe852=parseSSEData(_0x35ef70[_0x54237c(0xd9)]);yield _0x3fe852,_0x35ef70={};}continue;}if(_0x144f96[_0x54237c(0xe1)](':'))continue;const _0x4c4018=_0x144f96[_0x54237c(0xda)](':');if(_0x4c4018===-0x1)continue;const _0x19d59c=_0x144f96[_0x54237c(0xd8)](0x0,_0x4c4018);let _0x27e534=_0x144f96['slice'](_0x4c4018+0x1);_0x27e534[_0x54237c(0xe1)]('\x20')&&(_0x27e534=_0x27e534[_0x54237c(0xd8)](0x1));switch(_0x19d59c){case _0x54237c(0xd4):_0x35ef70[_0x54237c(0xd4)]=_0x27e534;break;case _0x54237c(0xd9):_0x35ef70[_0x54237c(0xd9)]=_0x35ef70[_0x54237c(0xd9)]?_0x35ef70['data']+'\x0a'+_0x27e534:_0x27e534;break;case'id':_0x35ef70['id']=_0x27e534;break;}}}}finally{_0x4151a4[_0x54237c(0xde)]();}}function a108_0x2f05(){const _0x3d1a69=['3042800zGAubf','trim','22197970owzbsx','event','17176PSYypU','split','4753296IrPrft','slice','data','indexOf','2929312ScsbTs','[LLM\x20API\x20SSE]\x20','4SPdAGQ','releaseLock','7281WoRZGm','53557jFPkMv','startsWith','read','body','debug','328495kzIJDM','546gtBhGa'];a108_0x2f05=function(){return _0x3d1a69;};return a108_0x2f05();}function parseSSEData(_0x37061b){try{return JSON['parse'](_0x37061b);}catch(_0x3ae75b){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x37061b,{'cause':_0x3ae75b});}}
|