@treasuredata/tdx 0.25.4 → 0.25.5
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 +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.d.ts.map +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-command.js.map +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.d.ts +10 -0
- package/dist/sdk/agent/agent-config.d.ts.map +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-config.js.map +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.d.ts +83 -4
- package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/agent-yaml.js.map +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/types/agent-def.d.ts +54 -1
- package/dist/sdk/agent/types/agent-def.d.ts.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.d.ts +89 -1
- package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.d.ts.map +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/index.js.map +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.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/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/llm.d.ts +176 -2
- package/dist/sdk/types/llm.d.ts.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x55c96e=a170_0x1655;(function(_0x3fd111,_0x5dfa88){const _0x3ab4de=a170_0x1655,_0x411450=_0x3fd111();while(!![]){try{const _0x338a99=parseInt(_0x3ab4de(0x215))/0x1+parseInt(_0x3ab4de(0x1ee))/0x2*(-parseInt(_0x3ab4de(0x21a))/0x3)+parseInt(_0x3ab4de(0x200))/0x4+-parseInt(_0x3ab4de(0x20f))/0x5*(-parseInt(_0x3ab4de(0x222))/0x6)+-parseInt(_0x3ab4de(0x21e))/0x7+parseInt(_0x3ab4de(0x202))/0x8*(-parseInt(_0x3ab4de(0x205))/0x9)+parseInt(_0x3ab4de(0x221))/0xa*(parseInt(_0x3ab4de(0x228))/0xb);if(_0x338a99===_0x5dfa88)break;else _0x411450['push'](_0x411450['shift']());}catch(_0x4a44cc){_0x411450['push'](_0x411450['shift']());}}}(a170_0x4ca2,0x93606));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a170_0x55c96e(0x1ea),'zsh','sh','fish',a170_0x55c96e(0x1ec),a170_0x55c96e(0x1f5),a170_0x55c96e(0x213),a170_0x55c96e(0x204),'pwsh',a170_0x55c96e(0x217),'nu','ion',a170_0x55c96e(0x1f7),a170_0x55c96e(0x212)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a170_0x55c96e(0x1f6),a170_0x55c96e(0x1f8),a170_0x55c96e(0x206),a170_0x55c96e(0x1f9),'treasure\x20studio']);function getProcessInfoWindows(_0x4a7c1d){const _0x3b26dd=a170_0x55c96e;try{if(!Number[_0x3b26dd(0x1ed)](_0x4a7c1d)||_0x4a7c1d<=0x0)return null;const _0x327cb9=_0x3b26dd(0x214)+_0x4a7c1d+_0x3b26dd(0x223),_0x555d69=execSync(_0x3b26dd(0x1fa)+_0x327cb9+'\x22',{'encoding':_0x3b26dd(0x1fe),'windowsHide':!![],'stdio':[_0x3b26dd(0x225),_0x3b26dd(0x225),'pipe']})[_0x3b26dd(0x1f4)]();if(!_0x555d69)return null;const [_0x8f8199,..._0x4b0939]=_0x555d69[_0x3b26dd(0x1ff)](','),_0x2c69a3=parseInt(_0x8f8199,0xa),_0x336353=_0x4b0939[_0x3b26dd(0x1f1)](',')[_0x3b26dd(0x1f4)]();if(isNaN(_0x2c69a3)||!_0x336353)return null;return{'pid':_0x4a7c1d,'ppid':_0x2c69a3,'comm':_0x336353['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x5f20c2){const _0x51b702=a170_0x55c96e;try{const _0x4d83c2=0x400000;if(!Number['isInteger'](_0x5f20c2)||_0x5f20c2<=0x0||_0x5f20c2>_0x4d83c2)return null;const _0x13711a=execSync(_0x51b702(0x21b)+_0x5f20c2+_0x51b702(0x210),{'encoding':_0x51b702(0x1fe),'stdio':'pipe'})[_0x51b702(0x1f4)](),[_0x2b3953,..._0xbb626e]=_0x13711a[_0x51b702(0x1ff)](/\s+/),_0x1dbf7c=parseInt(_0x2b3953,0xa),_0x425042=_0xbb626e[_0x51b702(0x1f1)]('\x20');if(isNaN(_0x1dbf7c))return null;return{'pid':_0x5f20c2,'ppid':_0x1dbf7c,'comm':_0x425042};}catch{return null;}}function getProcessInfo(_0x35dade){const _0xbd8759=a170_0x55c96e;if(process['platform']===_0xbd8759(0x211))return getProcessInfoWindows(_0x35dade);return getProcessInfoPosix(_0x35dade);}function getBasename(_0xb507c3){const _0xc92487=a170_0x55c96e;return _0xb507c3[_0xc92487(0x219)](/^-/,'')['split']('/')[_0xc92487(0x20c)]()?.[_0xc92487(0x209)]()||'';}function isShell(_0x43d2c4){const _0xbe7e8=a170_0x55c96e;return SHELL_NAMES[_0xbe7e8(0x207)](getBasename(_0x43d2c4));}function isEphemeralShellSpawner(_0x3ed7b7){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x3ed7b7));}let cachedShellPID;function findShellPID(){const _0x35cc83=a170_0x55c96e;if(process[_0x35cc83(0x208)]===undefined)return process['pid'];let _0x3fd619=process[_0x35cc83(0x208)];const _0x21d785=0xa;let _0x42bf15=0x0;while(_0x42bf15<_0x21d785){const _0x331ff5=getProcessInfo(_0x3fd619);if(!_0x331ff5)break;if(isShell(_0x331ff5['comm'])){const _0x480086=getProcessInfo(_0x331ff5[_0x35cc83(0x208)]);if(_0x480086&&isEphemeralShellSpawner(_0x480086[_0x35cc83(0x1fd)])){_0x3fd619=_0x331ff5['ppid'],_0x42bf15++;continue;}return _0x331ff5['pid'];}if(_0x331ff5[_0x35cc83(0x208)]===0x0||_0x331ff5['ppid']===0x1){if(isShell(_0x331ff5['comm']))return _0x331ff5[_0x35cc83(0x1eb)];break;}_0x3fd619=_0x331ff5['ppid'],_0x42bf15++;}return process[_0x35cc83(0x208)]!==undefined?process[_0x35cc83(0x208)]:process[_0x35cc83(0x1eb)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x158a20){const _0x3e6b26=a170_0x55c96e;if(!Number[_0x3e6b26(0x1ed)](_0x158a20)||_0x158a20<=0x0)return![];try{return process[_0x3e6b26(0x1f0)](_0x158a20,0x0),!![];}catch{return![];}}export function openBrowser(_0x2d709f){const _0x170db1=a170_0x55c96e;let _0x57beb2;try{_0x57beb2=new URL(_0x2d709f);}catch{throw new Error(_0x170db1(0x1f3)+_0x2d709f);}if(_0x57beb2[_0x170db1(0x20b)]!==_0x170db1(0x20a)&&_0x57beb2[_0x170db1(0x20b)]!==_0x170db1(0x21d))throw new Error(_0x170db1(0x201)+_0x57beb2[_0x170db1(0x20b)]);const _0x43b85a=_0x57beb2[_0x170db1(0x226)],_0x47701f=process['platform'];if(_0x47701f===_0x170db1(0x211))spawn(_0x170db1(0x21c),['/c',_0x170db1(0x220),'',_0x43b85a],{'detached':!![],'stdio':_0x170db1(0x20e)})[_0x170db1(0x224)]();else{const _0x338cfb=_0x47701f===_0x170db1(0x218)?'open':_0x170db1(0x216);spawn(_0x338cfb,[_0x43b85a],{'detached':!![],'stdio':_0x170db1(0x20e)})['unref']();}}export function isWindows(){const _0x5c7d82=a170_0x55c96e;return process[_0x5c7d82(0x1f2)]===_0x5c7d82(0x211);}export function getCrossSpawnOptions(_0x4fbf25){return{..._0x4fbf25??{},'shell':isWindows()};}export function escapeWindowsArg(_0x159922){const _0x30728e=a170_0x55c96e;if(!/[ \t"&|<>^%!`\r\n]/[_0x30728e(0x1fc)](_0x159922))return _0x159922;const _0x5d6d7f=_0x159922[_0x30728e(0x219)](/"/g,'\x22\x22');return'\x22'+_0x5d6d7f+'\x22';}export function crossSpawn(_0x8a090e,_0x1b3168,_0xb68abd){const _0x27cd66=a170_0x55c96e;if(isWindows()){const _0x3e0129=escapeWindowsArg(_0x8a090e),_0x54e222=_0x1b3168[_0x27cd66(0x20d)](escapeWindowsArg),_0x547bcd=[_0x3e0129,..._0x54e222][_0x27cd66(0x1f1)]('\x20');return spawn(_0x547bcd,[],{..._0xb68abd,'shell':!![]});}return spawn(_0x8a090e,_0x1b3168,{..._0xb68abd,'shell':![]});}function a170_0x1655(_0x5c57c5,_0x4647d6){_0x5c57c5=_0x5c57c5-0x1ea;const _0x4ca29b=a170_0x4ca2();let _0x165518=_0x4ca29b[_0x5c57c5];return _0x165518;}export function gracefulExit(_0x54a4e5=0x0){const _0x299f95=a170_0x55c96e;isWindows()?setImmediate(()=>process[_0x299f95(0x21f)](_0x54a4e5)):process[_0x299f95(0x21f)](_0x54a4e5);}export function findExecutable(_0x539ad9,_0x2b59b5=0x1388){return new Promise(_0x2699de=>{const _0x42c7f6=a170_0x1655,_0x773b98=isWindows()?_0x42c7f6(0x1fb):'which';let _0x3d1429=![];const _0x3bb886=crossSpawn(_0x773b98,[_0x539ad9],{'stdio':'pipe','shell':isWindows()}),_0x4348d=setTimeout(()=>{const _0x3dc3ef=_0x42c7f6;!_0x3d1429&&(_0x3d1429=!![],_0x3bb886[_0x3dc3ef(0x1f0)](),_0x2699de(null));},_0x2b59b5);let _0x3ae744='';_0x3bb886['stdout']?.['on']('data',_0x2b9b04=>{const _0x2d07af=_0x42c7f6;_0x3ae744+=_0x2b9b04[_0x2d07af(0x203)]();}),_0x3bb886[_0x42c7f6(0x227)]?.['on']('data',()=>{}),_0x3bb886['on']('exit',_0x5b80dc=>{const _0x154228=_0x42c7f6;if(_0x3d1429)return;_0x3d1429=!![],clearTimeout(_0x4348d);if(_0x5b80dc===0x0&&_0x3ae744['trim']()){const _0x1a4599=_0x3ae744['trim']()[_0x154228(0x1ff)](/\r?\n/)[0x0];_0x2699de(_0x1a4599);}else _0x2699de(null);}),_0x3bb886['on'](_0x42c7f6(0x1ef),()=>{if(_0x3d1429)return;_0x3d1429=!![],clearTimeout(_0x4348d),_0x2699de(null);});});}function a170_0x4ca2(){const _0x5093ca=['257879KyUiLi','xdg-open','powershell','darwin','replace','171pOVzIQ','ps\x20-p\x20','cmd.exe','https:','8398999IIJPsj','exit','start','25958410EtTKvH','2514cQxHqo','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','unref','pipe','href','stderr','11sVfpKZ','bash','pid','ksh','isInteger','6074ORwquF','error','kill','join','platform','Invalid\x20URL:\x20','trim','tcsh','claude','elvish','code','electron','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','where.exe','test','comm','utf-8','split','372480JAEDlL','Unsupported\x20protocol:\x20','8ormbBa','toString','dash','9376821NkBGuE','cursor','has','ppid','toLowerCase','http:','protocol','pop','map','ignore','855yFoILX','\x20-o\x20ppid=,comm=','win32','xonsh','csh','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId='];a170_0x4ca2=function(){return _0x5093ca;};return a170_0x4ca2();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a171_0x59fc(_0x194c1c,_0x47fc41){_0x194c1c=_0x194c1c-0x132;const _0x5bdcfa=a171_0x5bdc();let _0x59fc95=_0x5bdcfa[_0x194c1c];return _0x59fc95;}(function(_0x4a66b6,_0x1066bb){const _0x55973c=a171_0x59fc,_0x2f7e2e=_0x4a66b6();while(!![]){try{const _0x333fda=-parseInt(_0x55973c(0x13b))/0x1*(parseInt(_0x55973c(0x13d))/0x2)+parseInt(_0x55973c(0x135))/0x3+-parseInt(_0x55973c(0x14a))/0x4+parseInt(_0x55973c(0x13a))/0x5+parseInt(_0x55973c(0x143))/0x6*(parseInt(_0x55973c(0x13c))/0x7)+-parseInt(_0x55973c(0x140))/0x8+-parseInt(_0x55973c(0x14b))/0x9;if(_0x333fda===_0x1066bb)break;else _0x2f7e2e['push'](_0x2f7e2e['shift']());}catch(_0x553e2b){_0x2f7e2e['push'](_0x2f7e2e['shift']());}}}(a171_0x5bdc,0x590d5));import*as a171_0x5b322f from'readline';export function isInteractive(){const _0xbd04b2=a171_0x59fc;return process[_0xbd04b2(0x133)][_0xbd04b2(0x132)]===!![];}export async function confirm(_0x420d24){const _0x2a2594=a171_0x59fc,_0x4ce2fd=a171_0x5b322f['createInterface']({'input':process[_0x2a2594(0x133)],'output':process[_0x2a2594(0x13f)]});return new Promise(_0xc7b022=>{const _0x31cee1=_0x2a2594;_0x4ce2fd[_0x31cee1(0x149)](_0x420d24+_0x31cee1(0x148),_0x5508e8=>{const _0x5d5a1f=_0x31cee1;_0x4ce2fd[_0x5d5a1f(0x142)](),_0xc7b022(_0x5508e8[_0x5d5a1f(0x13e)]()==='y'||_0x5508e8[_0x5d5a1f(0x13e)]()===_0x5d5a1f(0x144));});});}export async function confirmKey(_0x40f0f1){const _0x2d8179=a171_0x59fc;if(!process[_0x2d8179(0x133)][_0x2d8179(0x132)])return![];return process[_0x2d8179(0x139)][_0x2d8179(0x146)](_0x40f0f1+'\x20[y/N]\x20'),new Promise(_0x3b28ea=>{const _0x11b94b=_0x2d8179,_0x30dc80=process['stdin'];_0x30dc80[_0x11b94b(0x137)](!![]),_0x30dc80['resume'](),_0x30dc80[_0x11b94b(0x141)](_0x11b94b(0x136));const _0x72e498=_0x367967=>{const _0x13c70c=_0x11b94b;_0x30dc80[_0x13c70c(0x137)](![]),_0x30dc80[_0x13c70c(0x134)](),_0x30dc80[_0x13c70c(0x138)]('data',_0x72e498);if(_0x367967==='\x1b'){process[_0x13c70c(0x139)][_0x13c70c(0x146)]('\x0a'),_0x3b28ea(![]);return;}_0x367967==='\x03'&&(process[_0x13c70c(0x139)][_0x13c70c(0x146)]('\x0a'),process[_0x13c70c(0x147)](0x82));if(_0x367967[_0x13c70c(0x13e)]()==='y'){process[_0x13c70c(0x139)][_0x13c70c(0x146)]('y\x0a'),_0x3b28ea(!![]);return;}process['stderr'][_0x13c70c(0x146)]('\x0a'),_0x3b28ea(![]);};_0x30dc80['on'](_0x11b94b(0x145),_0x72e498);});}function a171_0x5bdc(){const _0x53119b=['yes','data','write','exit','\x20(y/N):\x20','question','817224VmcFTT','2551383pRzVac','isTTY','stdin','pause','1500675bYFytz','utf8','setRawMode','removeListener','stderr','2329605saNtcK','1WohlAj','4370226emXsNS','466260WsXLYW','toLowerCase','stdout','4038272RvTAVG','setEncoding','close','6HmCJif'];a171_0x5bdc=function(){return _0x53119b;};return a171_0x5bdc();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfd6295,_0x24a911){const _0x5335d0=a172_0x51a1,_0x15dab9=_0xfd6295();while(!![]){try{const _0xeba978=-parseInt(_0x5335d0(0x13e))/0x1+-parseInt(_0x5335d0(0x130))/0x2+-parseInt(_0x5335d0(0x12f))/0x3*(-parseInt(_0x5335d0(0x145))/0x4)+-parseInt(_0x5335d0(0x136))/0x5*(-parseInt(_0x5335d0(0x13b))/0x6)+-parseInt(_0x5335d0(0x139))/0x7*(parseInt(_0x5335d0(0x141))/0x8)+-parseInt(_0x5335d0(0x12c))/0x9*(-parseInt(_0x5335d0(0x146))/0xa)+parseInt(_0x5335d0(0x135))/0xb;if(_0xeba978===_0x24a911)break;else _0x15dab9['push'](_0x15dab9['shift']());}catch(_0x23913a){_0x15dab9['push'](_0x15dab9['shift']());}}}(a172_0x53b5,0x7057a));import a172_0x29fa21 from'ora';function a172_0x51a1(_0x54a04b,_0x47c459){_0x54a04b=_0x54a04b-0x12c;const _0x53b5e3=a172_0x53b5();let _0x51a115=_0x53b5e3[_0x54a04b];return _0x51a115;}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x2a39a1,_0x3bee47={}){const _0x45f323=a172_0x51a1,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x3bee47;return a172_0x29fa21({'text':_0x2a39a1,'color':'cyan','stream':process[_0x45f323(0x143)],'isEnabled':forceEnabled||process[_0x45f323(0x143)][_0x45f323(0x137)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x250bd7,_0x492f33,_0x2af714={}){const _0x54000c=a172_0x51a1,_0xc73143=_0x2af714[_0x54000c(0x13f)]??(()=>Date[_0x54000c(0x12d)]()),_0x582f19=createCommandSpinner(_0x250bd7,_0x2af714);_0x582f19[_0x54000c(0x134)]();const _0x1d209c=_0xc73143();try{const _0x624c3=await _0x492f33(),_0x18d4ce=_0xc73143()-_0x1d209c;return _0x582f19[_0x54000c(0x132)](),{'data':_0x624c3,'elapsedMs':_0x18d4ce};}catch(_0x5c864f){_0x582f19[_0x54000c(0x132)]();throw _0x5c864f;}}export async function withProgressSpinner(_0xc13151,_0x1dbe39,_0x2a72fd={}){const _0x4b523a=a172_0x51a1,_0x2825d0=_0x2a72fd[_0x4b523a(0x13f)]??(()=>Date[_0x4b523a(0x12d)]()),_0x7b3f87=_0x2a72fd[_0x4b523a(0x131)]??setInterval,_0x588dfd=createCommandSpinner(_0xc13151,_0x2a72fd);_0x588dfd[_0x4b523a(0x134)]();const _0x12eb72=_0x2825d0(),_0x1a1cc2=_0xc13151['replace'](_0x4b523a(0x140),'')['trim']()||_0x4b523a(0x13c),_0x20f1f5={};let _0x32cab6=_0xc13151;const _0x249f00=()=>{const _0x3bff95=_0x4b523a;if(!_0x588dfd[_0x3bff95(0x142)])return;const _0x1ea61c=_0x2825d0()-_0x12eb72,_0x110de3=formatElapsed(_0x1ea61c),_0x2513fd=_0x20f1f5[_0x3bff95(0x12e)]?.[_0x3bff95(0x148)]()||_0x1a1cc2,_0x9c9eef=_0x20f1f5['jobId']?_0x3bff95(0x13a)+_0x20f1f5[_0x3bff95(0x144)]+']':'',_0x16550=_0x20f1f5[_0x3bff95(0x138)]?'\x20'+_0x20f1f5['extra']:'',_0x38650f=_0x2513fd+'\x20'+_0x110de3+_0x16550+_0x9c9eef;_0x38650f!==_0x32cab6&&_0x38650f[_0x3bff95(0x148)]()&&(_0x588dfd[_0x3bff95(0x147)]=_0x38650f,_0x32cab6=_0x38650f);},_0x5c5c10=_0x7b3f87(()=>{_0x249f00();},0x3e8),_0x3fa165={'setPhase':_0x117ab9=>{const _0x54e361=_0x4b523a;_0x20f1f5[_0x54e361(0x12e)]=_0x117ab9;const _0x350243=_0x117ab9?.[_0x54e361(0x148)]()||_0x1a1cc2,_0x2eb50b=_0x2825d0()-_0x12eb72,_0x2afb14=formatElapsed(_0x2eb50b),_0x1701af=_0x20f1f5[_0x54e361(0x144)]?_0x54e361(0x13a)+_0x20f1f5[_0x54e361(0x144)]+']':'',_0x2b99ca=_0x20f1f5[_0x54e361(0x138)]?'\x20'+_0x20f1f5[_0x54e361(0x138)]:'',_0x205f44=_0x350243+'\x20'+_0x2afb14+_0x2b99ca+_0x1701af;_0x588dfd[_0x54e361(0x142)]&&_0x205f44[_0x54e361(0x148)]()&&(_0x588dfd[_0x54e361(0x147)]=_0x205f44,_0x32cab6=_0x205f44);},'setJobId':_0x31c7c2=>{const _0x5ad434=_0x4b523a;_0x20f1f5[_0x5ad434(0x144)]=_0x31c7c2,_0x249f00();},'setExtra':_0x20a44c=>{const _0x5e9a19=_0x4b523a;_0x20f1f5[_0x5e9a19(0x138)]=_0x20a44c,_0x249f00();}};_0x249f00();try{const _0x4ac05c=await _0x1dbe39(_0x3fa165),_0x1090ac=_0x2825d0()-_0x12eb72;return{'data':_0x4ac05c,'elapsedMs':_0x1090ac};}finally{clearInterval(_0x5c5c10),_0x588dfd[_0x4b523a(0x132)]();}}export function formatElapsed(_0x1f06ad){const _0x51eb6a=a172_0x51a1,_0x2e50a6=Math[_0x51eb6a(0x133)](_0x1f06ad/0x3e8);if(_0x2e50a6<0x3c)return(_0x1f06ad/0x3e8)[_0x51eb6a(0x13d)](0x1)+'s';const _0x42b1cc=Math[_0x51eb6a(0x133)](_0x2e50a6/0x3c),_0x4810ef=_0x2e50a6%0x3c;if(_0x42b1cc<0x3c)return _0x42b1cc+'m\x20'+_0x4810ef+'s';const _0x533684=Math['floor'](_0x42b1cc/0x3c),_0x74a580=_0x42b1cc%0x3c;return _0x533684+'h\x20'+_0x74a580+'m';}function a172_0x53b5(){const _0x2ccff4=['floor','start','13894771icMEys','503575uuYrOi','isTTY','extra','1112909ReiHJy','\x20[Job\x20ID:\x20','6AXJcmB','Processing','toFixed','567929JUbWNb','clock','...','24BZVihx','isSpinning','stderr','jobId','8012KdGatP','4134310cTGVyC','text','trim','9rQLejD','now','phase','939fbZOiG','1798404eivUoO','intervalFactory','stop'];a172_0x53b5=function(){return _0x2ccff4;};return a172_0x53b5();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a173_0x2772(_0x2f041e,_0x635d8d){_0x2f041e=_0x2f041e-0x83;const _0x2d2766=a173_0x2d27();let _0x277281=_0x2d2766[_0x2f041e];return _0x277281;}function a173_0x2d27(){const _0x3409ce=['21826550dLKhYD','7dPUGYk','2911741vgjxuV','event','[LLM\x20API\x20SSE]\x20','4735030QFerUu','320805WeawhL','Response\x20body\x20is\x20null','getReader','read','20WOtnNY','debug','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','split','indexOf','139420bDvmVF','6wQmJmK','pop','releaseLock','slice','3289400bzcHoI','trim','data','941535LtHyLT','decode','parse','startsWith'];a173_0x2d27=function(){return _0x3409ce;};return a173_0x2d27();}(function(_0x39973c,_0x2e2d14){const _0x502639=a173_0x2772,_0x331775=_0x39973c();while(!![]){try{const _0x56b70c=-parseInt(_0x502639(0x94))/0x1*(-parseInt(_0x502639(0x87))/0x2)+parseInt(_0x502639(0x99))/0x3*(parseInt(_0x502639(0x9d))/0x4)+-parseInt(_0x502639(0x98))/0x5*(-parseInt(_0x502639(0x88))/0x6)+parseInt(_0x502639(0x95))/0x7+parseInt(_0x502639(0x8c))/0x8+-parseInt(_0x502639(0x8f))/0x9+-parseInt(_0x502639(0x93))/0xa;if(_0x56b70c===_0x2e2d14)break;else _0x331775['push'](_0x331775['shift']());}catch(_0x39fd42){_0x331775['push'](_0x331775['shift']());}}}(a173_0x2d27,0x7c64f));export async function*parseSSEStream(_0x20d8f1,_0x1a3766){const _0x28eb17=a173_0x2772;if(!_0x20d8f1['body'])throw new Error(_0x28eb17(0x9a));const _0x182772=_0x20d8f1['body'][_0x28eb17(0x9b)](),_0x593f0a=new TextDecoder();let _0x3c2c02='',_0x434457={};try{while(!![]){const {done:_0x1d4991,value:_0x40adb2}=await _0x182772[_0x28eb17(0x9c)]();if(_0x1d4991){if(_0x434457['data']){_0x1a3766?.[_0x28eb17(0x83)](_0x28eb17(0x97)+_0x434457[_0x28eb17(0x8e)]);const _0x33ca18=parseSSEData(_0x434457['data']);yield _0x33ca18;}break;}_0x3c2c02+=_0x593f0a[_0x28eb17(0x90)](_0x40adb2,{'stream':!![]});const _0x555bce=_0x3c2c02[_0x28eb17(0x85)]('\x0a');_0x3c2c02=_0x555bce[_0x28eb17(0x89)]()||'';for(const _0x5d701e of _0x555bce){if(_0x5d701e[_0x28eb17(0x8d)]()===''){if(_0x434457[_0x28eb17(0x8e)]){_0x1a3766?.['debug'](_0x28eb17(0x97)+_0x434457['data']);const _0x27538c=parseSSEData(_0x434457[_0x28eb17(0x8e)]);yield _0x27538c,_0x434457={};}continue;}if(_0x5d701e['startsWith'](':'))continue;const _0x3980e0=_0x5d701e[_0x28eb17(0x86)](':');if(_0x3980e0===-0x1)continue;const _0x37cd1=_0x5d701e[_0x28eb17(0x8b)](0x0,_0x3980e0);let _0x2d6dcb=_0x5d701e[_0x28eb17(0x8b)](_0x3980e0+0x1);_0x2d6dcb[_0x28eb17(0x92)]('\x20')&&(_0x2d6dcb=_0x2d6dcb[_0x28eb17(0x8b)](0x1));switch(_0x37cd1){case _0x28eb17(0x96):_0x434457[_0x28eb17(0x96)]=_0x2d6dcb;break;case _0x28eb17(0x8e):_0x434457[_0x28eb17(0x8e)]=_0x434457[_0x28eb17(0x8e)]?_0x434457[_0x28eb17(0x8e)]+'\x0a'+_0x2d6dcb:_0x2d6dcb;break;case'id':_0x434457['id']=_0x2d6dcb;break;}}}}finally{_0x182772[_0x28eb17(0x8a)]();}}function parseSSEData(_0x15aa26){const _0x46767e=a173_0x2772;try{return JSON[_0x46767e(0x91)](_0x15aa26);}catch(_0x1775fe){throw new Error(_0x46767e(0x84)+_0x15aa26,{'cause':_0x1775fe});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f2eec,_0x361d85){const _0x500627=a174_0x437f,_0x151e2d=_0x5f2eec();while(!![]){try{const _0x16537e=parseInt(_0x500627(0x1e1))/0x1*(-parseInt(_0x500627(0x1f9))/0x2)+parseInt(_0x500627(0x1e2))/0x3*(parseInt(_0x500627(0x1e5))/0x4)+parseInt(_0x500627(0x1eb))/0x5*(parseInt(_0x500627(0x1e4))/0x6)+parseInt(_0x500627(0x1f8))/0x7*(parseInt(_0x500627(0x1e7))/0x8)+-parseInt(_0x500627(0x1ec))/0x9+parseInt(_0x500627(0x1ed))/0xa+parseInt(_0x500627(0x1f4))/0xb*(-parseInt(_0x500627(0x1f6))/0xc);if(_0x16537e===_0x361d85)break;else _0x151e2d['push'](_0x151e2d['shift']());}catch(_0x576d0c){_0x151e2d['push'](_0x151e2d['shift']());}}}(a174_0x3676,0xb6357));function a174_0x437f(_0x154f33,_0x17f0f9){_0x154f33=_0x154f33-0x1e0;const _0x3676ce=a174_0x3676();let _0x437f19=_0x3676ce[_0x154f33];return _0x437f19;}import a174_0x2c0ffa from'string-width';export function stringWidth(_0x1e76a1){return a174_0x2c0ffa(_0x1e76a1);}export function padEnd(_0x2e8acf,_0x37b758){const _0x2c0677=a174_0x437f,_0x5f41b2=stringWidth(_0x2e8acf);if(_0x5f41b2>=_0x37b758)return _0x2e8acf;return _0x2e8acf+'\x20'[_0x2c0677(0x1f0)](_0x37b758-_0x5f41b2);}export function padStart(_0x207dbe,_0x370099){const _0x5a25df=a174_0x437f,_0x17d0d8=stringWidth(_0x207dbe);if(_0x17d0d8>=_0x370099)return _0x207dbe;return'\x20'[_0x5a25df(0x1f0)](_0x370099-_0x17d0d8)+_0x207dbe;}export function centerAlign(_0x480944,_0x16fe34){const _0x1f768c=a174_0x437f,_0x26e506=stringWidth(_0x480944);if(_0x26e506>_0x16fe34){if(_0x16fe34<=0x1)return'…'[_0x1f768c(0x1f3)](0x0,_0x16fe34);let _0x243ad8=_0x480944;while(stringWidth(_0x243ad8+'…')>_0x16fe34){_0x243ad8=_0x243ad8[_0x1f768c(0x1e8)](0x0,-0x1);}return _0x243ad8+'…';}if(_0x26e506===_0x16fe34)return _0x480944;const _0x3f30ec=_0x16fe34-_0x26e506,_0x47f17c=Math[_0x1f768c(0x1f5)](_0x3f30ec/0x2),_0x382959=_0x3f30ec-_0x47f17c;return'\x20'['repeat'](_0x47f17c)+_0x480944+'\x20'[_0x1f768c(0x1f0)](_0x382959);}export function escapeStringLiteral(_0x6a189f){const _0x533564=a174_0x437f;if(!_0x6a189f||_0x6a189f[_0x533564(0x1e9)]()[_0x533564(0x1f7)]===0x0)throw new Error(_0x533564(0x1ea));const _0x360e94=_0x6a189f[_0x533564(0x1f1)](/'/g,'\x27\x27');return'\x27'+_0x360e94+'\x27';}export function globToLike(_0x3d39ec){const _0x192283=a174_0x437f;let _0x307a52=_0x3d39ec[_0x192283(0x1f1)](/\\/g,'\x5c\x5c')[_0x192283(0x1f1)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x307a52=_0x307a52['replace'](/\*/g,'%')[_0x192283(0x1f1)](/\?/g,'_'),_0x307a52;}export function buildLikePattern(_0x317776){const _0x2e92b1=a174_0x437f;if(!_0x317776||_0x317776[_0x2e92b1(0x1e9)]()[_0x2e92b1(0x1f7)]===0x0)throw new Error(_0x2e92b1(0x1ee));const _0x4940c9=globToLike(_0x317776),_0xca5b81=_0x4940c9[_0x2e92b1(0x1f1)](/'/g,'\x27\x27');return'\x27'+_0xca5b81+'\x27';}export function matchGlobPattern(_0x1862e1,_0xb334ed){const _0x2a95dc=a174_0x437f,_0x49d21=_0xb334ed['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x2a95dc(0x1f1)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x376a2a=new RegExp('^'+_0x49d21+'$');return _0x376a2a[_0x2a95dc(0x1f2)](_0x1862e1);}export function getSanitizedUsername(){const _0x2fc850=a174_0x437f,_0xbd71bf=process.env.USER||process.env.USERNAME||'unknown';return _0xbd71bf[_0x2fc850(0x1f1)](/[^a-zA-Z0-9]/g,'')[_0x2fc850(0x1e6)]();}function a174_0x3676(){const _0x175f65=['44HpnvkH','padStart','38707zPcOOW','9nOEtHM','random','2309838XCppPB','1826512Okuotg','toLowerCase','2367752ogkogt','slice','trim','Cannot\x20escape\x20empty\x20string\x20literal','15drcPkj','11697129uqriSd','13112950fyaEfn','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','toString','repeat','replace','test','substring','44PFLzmc','floor','6367236Uznafr','length','28cFECSW'];a174_0x3676=function(){return _0x175f65;};return a174_0x3676();}export function generateRandomHex(){const _0x36b9be=a174_0x437f,_0x56becb=Math[_0x36b9be(0x1f5)](Math[_0x36b9be(0x1e3)]()*0xfffff);return _0x56becb[_0x36b9be(0x1ef)](0x10)[_0x36b9be(0x1e0)](0x5,'0');}export function sanitizeFileName(_0x52204a){const _0x5e821e=a174_0x437f;return _0x52204a[_0x5e821e(0x1e6)]()['replace'](/[/\\:*?"<>|]/g,'-')[_0x5e821e(0x1f1)](/\s+/g,'-')[_0x5e821e(0x1f1)](/-+/g,'-')[_0x5e821e(0x1f1)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a175_0x38b8(){const _0x3eccd4=['Table\x20name\x20is\x20required\x20for\x20describe\x20operation','17242XpNfpq','4389300aFnnJs','length','table','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','trim','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','join','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','push','93EAAMKJ','8793696GlPjQb','16809039zwGQlz','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','2523132OPoNtv','includes','645976bBDzdX','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Pattern\x20cannot\x20be\x20just\x20a\x20dot','catalog','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','14RbrQuC','1283328qcOnqq','database'];a175_0x38b8=function(){return _0x3eccd4;};return a175_0x38b8();}(function(_0x3c08d7,_0x4869d6){const _0xa81316=a175_0x1ea2,_0x5f113a=_0x3c08d7();while(!![]){try{const _0x1bda77=parseInt(_0xa81316(0x11f))/0x1+-parseInt(_0xa81316(0x128))/0x2*(parseInt(_0xa81316(0x132))/0x3)+parseInt(_0xa81316(0x136))/0x4+parseInt(_0xa81316(0x129))/0x5+parseInt(_0xa81316(0x125))/0x6*(-parseInt(_0xa81316(0x124))/0x7)+parseInt(_0xa81316(0x133))/0x8+-parseInt(_0xa81316(0x134))/0x9;if(_0x1bda77===_0x4869d6)break;else _0x5f113a['push'](_0x5f113a['shift']());}catch(_0x5bc465){_0x5f113a['push'](_0x5f113a['shift']());}}}(a175_0x38b8,0xa8bbd));function hasWildcard(_0x5d30fe){const _0x5141d5=a175_0x1ea2;return _0x5d30fe[_0x5141d5(0x11e)]('*')||_0x5d30fe[_0x5141d5(0x11e)]('?');}function a175_0x1ea2(_0x1cace1,_0x2bb18a){_0x1cace1=_0x1cace1-0x11e;const _0x38b81d=a175_0x38b8();let _0x1ea2b5=_0x38b81d[_0x1cace1];return _0x1ea2b5;}export function parseTableReference(_0x2fe0fd){const _0xeca68e=a175_0x1ea2;if(!_0x2fe0fd||_0x2fe0fd[_0xeca68e(0x12d)]()['length']===0x0)throw new Error(_0xeca68e(0x135));const _0x2cca93=_0x2fe0fd[_0xeca68e(0x12d)](),_0x34f7af={'original':_0x2cca93},_0x1d071f=_0x2cca93['split']('.');if(_0x1d071f[_0xeca68e(0x12a)]===0x1){const _0x56a22f=_0x1d071f[0x0];if(!_0x56a22f)throw new Error(_0xeca68e(0x121));_0x34f7af[_0xeca68e(0x12b)]=_0x56a22f;}else{if(_0x1d071f[_0xeca68e(0x12a)]===0x2){const [_0x79a3d5,_0xfa5d61]=_0x1d071f;if(!_0x79a3d5)throw new Error(_0xeca68e(0x123));if(!_0xfa5d61)throw new Error(_0xeca68e(0x130));_0x34f7af[_0xeca68e(0x126)]=_0x79a3d5,_0x34f7af['table']=_0xfa5d61;}else{if(_0x1d071f[_0xeca68e(0x12a)]===0x3){const [_0x23c03c,_0x410602,_0x4e2eac]=_0x1d071f;if(!_0x23c03c||!_0x410602||!_0x4e2eac)throw new Error(_0xeca68e(0x120));_0x34f7af[_0xeca68e(0x122)]=_0x23c03c,_0x34f7af[_0xeca68e(0x126)]=_0x410602,_0x34f7af['table']=_0x4e2eac;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x34f7af;}export function formatTableReference(_0x167aba){const _0x3fe318=a175_0x1ea2,_0x2c0721=[];return _0x167aba[_0x3fe318(0x122)]&&_0x2c0721[_0x3fe318(0x131)](_0x167aba[_0x3fe318(0x122)]),_0x167aba[_0x3fe318(0x126)]&&_0x2c0721['push'](_0x167aba[_0x3fe318(0x126)]),_0x167aba[_0x3fe318(0x12b)]&&_0x2c0721[_0x3fe318(0x131)](_0x167aba[_0x3fe318(0x12b)]),_0x2c0721[_0x3fe318(0x12f)]('.');}export function validateTableListReference(_0x37c5c8){return undefined;}export function validateTableDescribeReference(_0x3ee253){const _0x1dd55a=a175_0x1ea2;if(!_0x3ee253[_0x1dd55a(0x12b)])return _0x1dd55a(0x127);if(_0x3ee253[_0x1dd55a(0x126)]&&hasWildcard(_0x3ee253[_0x1dd55a(0x126)]))return _0x1dd55a(0x12c);if(hasWildcard(_0x3ee253['table']))return _0x1dd55a(0x12e);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a176_0x4a96(_0x5b1ccf,_0x3d8452){_0x5b1ccf=_0x5b1ccf-0xf6;const _0x200485=a176_0x2004();let _0x4a96fb=_0x200485[_0x5b1ccf];return _0x4a96fb;}const a176_0x16cad8=a176_0x4a96;(function(_0x45e74e,_0x5d3074){const _0x4b71dd=a176_0x4a96,_0x548516=_0x45e74e();while(!![]){try{const _0x446271=-parseInt(_0x4b71dd(0x103))/0x1+parseInt(_0x4b71dd(0xf7))/0x2+parseInt(_0x4b71dd(0x109))/0x3*(parseInt(_0x4b71dd(0x10f))/0x4)+-parseInt(_0x4b71dd(0xfb))/0x5+-parseInt(_0x4b71dd(0x106))/0x6*(parseInt(_0x4b71dd(0x107))/0x7)+parseInt(_0x4b71dd(0x114))/0x8*(-parseInt(_0x4b71dd(0xfe))/0x9)+parseInt(_0x4b71dd(0x100))/0xa;if(_0x446271===_0x5d3074)break;else _0x548516['push'](_0x548516['shift']());}catch(_0xec7c10){_0x548516['push'](_0x548516['shift']());}}}(a176_0x2004,0xeaed5));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';function a176_0x2004(){const _0x17aa0e=['isInitialized','INFO','trace','1761010SNgRsm','info','error','9gHfNgH','tdx.log','24973790KmYZPM','logs','init','771811DKzgbr','getLogPath','logger','1237548vMcXxD','21xWAkqS','debug','4208271DdldfH','Session\x20ended','consoleHandler','logFileName','fileHandler','warn','4dSJfNR','fileOnly','logDir','logLevel','tdx','13662008uUymqg','close','1025326OYxYHP'];a176_0x2004=function(){return _0x17aa0e;};return a176_0x2004();}export class TDXLogger{[a176_0x16cad8(0x112)];[a176_0x16cad8(0x110)];[a176_0x16cad8(0x111)];[a176_0x16cad8(0x10c)];['logger'];['fileHandler']=null;[a176_0x16cad8(0x10b)]=null;constructor(_0x258991=LogLevel[a176_0x16cad8(0xf9)],_0x574436=![],_0x693b5a,_0xb1ccff=a176_0x16cad8(0xff)){const _0x25b187=a176_0x16cad8;this['logLevel']=_0x258991,this[_0x25b187(0x110)]=_0x574436,this[_0x25b187(0x111)]=_0x693b5a||join(getGlobalCacheDir(),_0x25b187(0x101)),this[_0x25b187(0x10c)]=_0xb1ccff,this[_0x25b187(0x105)]=Logger['of'](_0x25b187(0x113));}async['init'](){const _0x39ae66=a176_0x16cad8,_0x1bccc1=join(this['logDir'],this['logFileName']);if(Logger[_0x39ae66(0xf8)]()){!this[_0x39ae66(0x110)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x39ae66(0xf9)],'colors':!![]}),Logger['addHandler'](this['consoleHandler']));return;}this[_0x39ae66(0x10d)]=new FileHandler({'filePath':_0x1bccc1});const _0x3de269=[this['fileHandler']];!this[_0x39ae66(0x110)]&&(this[_0x39ae66(0x10b)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x3de269['push'](this[_0x39ae66(0x10b)])),await Logger[_0x39ae66(0x102)]({'defaultLevel':this[_0x39ae66(0x112)],'handlers':_0x3de269,'formatter':new DefaultLogFormatter({'colors':!![]})});}['debug'](..._0x290570){const _0x4085ca=a176_0x16cad8;this[_0x4085ca(0x105)][_0x4085ca(0x108)](..._0x290570);}[a176_0x16cad8(0xfa)](..._0x3184d5){const _0x271d7a=a176_0x16cad8;this['logger'][_0x271d7a(0xfa)](..._0x3184d5);}[a176_0x16cad8(0xfc)](..._0x274815){const _0x43c0f0=a176_0x16cad8;this[_0x43c0f0(0x105)][_0x43c0f0(0xfc)](..._0x274815);}['warn'](..._0x1b0632){const _0x273cf7=a176_0x16cad8;this['logger'][_0x273cf7(0x10e)](..._0x1b0632);}[a176_0x16cad8(0xfd)](..._0x359b34){this['logger']['error'](..._0x359b34);}async[a176_0x16cad8(0xf6)](){const _0x2e34b1=a176_0x16cad8;this[_0x2e34b1(0x105)][_0x2e34b1(0xfc)](_0x2e34b1(0x10a)),await Logger['shutdown']();}[a176_0x16cad8(0x104)](){const _0x1ce6ee=a176_0x16cad8;return join(this[_0x1ce6ee(0x111)],this[_0x1ce6ee(0x10c)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x4a9c7f=a177_0x5d3c;(function(_0x372401,_0x1bb2c6){const _0x1b0f0f=a177_0x5d3c,_0x4c4c75=_0x372401();while(!![]){try{const _0x50e64a=-parseInt(_0x1b0f0f(0x12c))/0x1+-parseInt(_0x1b0f0f(0x131))/0x2+-parseInt(_0x1b0f0f(0x12f))/0x3*(parseInt(_0x1b0f0f(0x125))/0x4)+parseInt(_0x1b0f0f(0x135))/0x5*(parseInt(_0x1b0f0f(0x123))/0x6)+parseInt(_0x1b0f0f(0x130))/0x7*(parseInt(_0x1b0f0f(0x121))/0x8)+-parseInt(_0x1b0f0f(0x132))/0x9*(parseInt(_0x1b0f0f(0x12e))/0xa)+parseInt(_0x1b0f0f(0x141))/0xb;if(_0x50e64a===_0x1bb2c6)break;else _0x4c4c75['push'](_0x4c4c75['shift']());}catch(_0xb4e98f){_0x4c4c75['push'](_0x4c4c75['shift']());}}}(a177_0x2c71,0x20252));import{get}from'https';function a177_0x2c71(){const _0x2b8c74=['9384sRBikN','last_version_check','282MqPDok','gray','92uwRUJQ','statusCode','utils/version-check','Run:','data','\x0aRun:\x20','channel','35105pCnzCU','error','2320mzgIkV','1041CtVVpo','210TMKlrl','332674ePVWpu','99YbaeKa','last_version_check_next','latestVersion','19520UxcFTo','version','stderr','parse','write','stable','cyan','yellow','currentVersion','dim','next','https://registry.npmjs.org/@treasuredata/tdx','1374593FVqQmj','toISOString','lastCheck','Request\x20timeout','updateAvailable','Invalid\x20version\x20format','Update\x20available:','now','npm\x20install\x20-g\x20@treasuredata/tdx@'];a177_0x2c71=function(){return _0x2b8c74;};return a177_0x2c71();}import{gt,valid}from'semver';import a177_0x2317b4 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a177_0x4a9c7f(0x140),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a177_0x4a9c7f(0x122),a177_0x4a9c7f(0x127)),nextVersionCache=createGlobalCache(a177_0x4a9c7f(0x133),'utils/version-check-next');function getCacheForChannel(_0x141937){const _0x58aa18=a177_0x4a9c7f;return _0x141937===_0x58aa18(0x13f)?nextVersionCache:stableVersionCache;}function readCache(_0x5d3d7e){return getCacheForChannel(_0x5d3d7e)['read']()??null;}function writeCache(_0x18e997,_0x25cc41){const _0x49e7f5=a177_0x4a9c7f;try{getCacheForChannel(_0x25cc41)[_0x49e7f5(0x139)]({'lastCheck':new Date()[_0x49e7f5(0x142)](),'latestVersion':_0x18e997});}catch{}}function isCacheValid(_0x1cdcb8){const _0x21cc2d=a177_0x4a9c7f;if(!_0x1cdcb8)return![];const _0x3fb3c5=new Date(_0x1cdcb8[_0x21cc2d(0x143)])['getTime'](),_0x3f2429=Date[_0x21cc2d(0x11f)]();return _0x3f2429-_0x3fb3c5<CACHE_DURATION_MS;}function fetchLatestVersion(_0x20a387=a177_0x4a9c7f(0x13a)){const _0x571391=a177_0x4a9c7f,_0x4580e7=_0x20a387===_0x571391(0x13f)?_0x571391(0x13f):'latest',_0x516aa1=NPM_REGISTRY_BASE+'/'+_0x4580e7;return new Promise((_0x33dc0b,_0x37cce1)=>{const _0x402e52=_0x571391,_0x179c50=get(_0x516aa1,_0x265fa2=>{const _0x31ac56=a177_0x5d3c;if(_0x265fa2[_0x31ac56(0x126)]!==0xc8){clearTimeout(_0x3eaeb3),_0x37cce1(new Error('HTTP\x20'+_0x265fa2[_0x31ac56(0x126)]));return;}let _0x32a8fc='';_0x265fa2['on'](_0x31ac56(0x129),_0x10122b=>{_0x32a8fc+=_0x10122b;}),_0x265fa2['on']('end',()=>{const _0x1a2345=_0x31ac56;clearTimeout(_0x3eaeb3);try{const _0x4446af=JSON[_0x1a2345(0x138)](_0x32a8fc);if(!valid(_0x4446af[_0x1a2345(0x136)])){_0x37cce1(new Error(_0x1a2345(0x146)));return;}_0x33dc0b(_0x4446af[_0x1a2345(0x136)]);}catch(_0x3a10c6){_0x37cce1(_0x3a10c6);}});})['on'](_0x402e52(0x12d),_0x18e425=>{clearTimeout(_0x3eaeb3),_0x37cce1(_0x18e425);}),_0x3eaeb3=setTimeout(()=>{const _0x4c1748=_0x402e52;_0x179c50['destroy'](),_0x37cce1(new Error(_0x4c1748(0x144)));},TIMEOUT_MS);});}function a177_0x5d3c(_0xec69d7,_0x43fbc7){_0xec69d7=_0xec69d7-0x11f;const _0x2c717b=a177_0x2c71();let _0x5d3c59=_0x2c717b[_0xec69d7];return _0x5d3c59;}export async function checkForUpdate(_0x4ca443,_0x500ac2=a177_0x4a9c7f(0x13a)){const _0x36e77b=a177_0x4a9c7f;try{const _0x71180=readCache(_0x500ac2);if(isCacheValid(_0x71180)){const _0x3f831c=gt(_0x71180['latestVersion'],_0x4ca443);return{'updateAvailable':_0x3f831c,'currentVersion':_0x4ca443,'latestVersion':_0x71180[_0x36e77b(0x134)],'channel':_0x500ac2};}const _0x7da736=await fetchLatestVersion(_0x500ac2);writeCache(_0x7da736,_0x500ac2);const _0x2637ae=gt(_0x7da736,_0x4ca443);return{'updateAvailable':_0x2637ae,'currentVersion':_0x4ca443,'latestVersion':_0x7da736,'channel':_0x500ac2};}catch{return null;}}export function displayUpdateNotification(_0x23ec90){const _0x348a26=a177_0x4a9c7f;if(!_0x23ec90[_0x348a26(0x145)])return;const _0x1e7540=_0x23ec90[_0x348a26(0x12b)]===_0x348a26(0x13f)?_0x348a26(0x13f):'latest',_0x2122d0=process[_0x348a26(0x137)]['isTTY']&&!process.env.NO_COLOR,_0xdf3335=_0x2122d0?a177_0x2317b4[_0x348a26(0x124)]('→'):'→',_0x148f25=_0x2122d0?a177_0x2317b4[_0x348a26(0x13e)](_0x23ec90[_0x348a26(0x13d)]):_0x23ec90[_0x348a26(0x13d)],_0x1cda92=_0x2122d0?a177_0x2317b4['green'](_0x23ec90[_0x348a26(0x134)]):_0x23ec90[_0x348a26(0x134)],_0x590d77=_0x2122d0?a177_0x2317b4[_0x348a26(0x13b)](_0x348a26(0x120)+_0x1e7540):_0x348a26(0x120)+_0x1e7540,_0x5ae9c2=_0x2122d0?'\x0a'+a177_0x2317b4[_0x348a26(0x13c)](_0x348a26(0x147))+'\x20'+_0x148f25+'\x20'+_0xdf3335+'\x20'+_0x1cda92+'\x0a'+a177_0x2317b4[_0x348a26(0x13e)](_0x348a26(0x128))+'\x20'+_0x590d77+'\x0a':'\x0aUpdate\x20available:\x20'+_0x148f25+'\x20'+_0xdf3335+'\x20'+_0x1cda92+_0x348a26(0x12a)+_0x590d77+'\x0a';process['stderr'][_0x348a26(0x139)](_0x5ae9c2);}
|