@treasuredata/tdx 2026.3.0 → 2026.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +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.js +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/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-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/upgrade-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.d.ts +4 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +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.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/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/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.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-validator.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-recovery.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/segment-validator.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/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.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.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.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/file-reader.js +1 -1
- package/dist/utils/github-releases.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/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 a202_0x3cfb62=a202_0x25c1;(function(_0x1af2ba,_0x5036f8){const _0x25283e=a202_0x25c1,_0x2139d5=_0x1af2ba();while(!![]){try{const _0x5ed8a5=-parseInt(_0x25283e(0xed))/0x1+-parseInt(_0x25283e(0xf3))/0x2*(-parseInt(_0x25283e(0xe1))/0x3)+-parseInt(_0x25283e(0xd2))/0x4*(-parseInt(_0x25283e(0xee))/0x5)+-parseInt(_0x25283e(0xdf))/0x6+-parseInt(_0x25283e(0xb9))/0x7+-parseInt(_0x25283e(0xf0))/0x8+-parseInt(_0x25283e(0xbf))/0x9*(-parseInt(_0x25283e(0xf4))/0xa);if(_0x5ed8a5===_0x5036f8)break;else _0x2139d5['push'](_0x2139d5['shift']());}catch(_0x46df94){_0x2139d5['push'](_0x2139d5['shift']());}}}(a202_0x391e,0x9306a));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a202_0x3cfb62(0xf1),a202_0x3cfb62(0xd9),'sh',a202_0x3cfb62(0xbe),'ksh',a202_0x3cfb62(0xe6),a202_0x3cfb62(0xcd),'dash','pwsh',a202_0x3cfb62(0xc3),'nu',a202_0x3cfb62(0xe8),a202_0x3cfb62(0xdd),a202_0x3cfb62(0xca)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a202_0x3cfb62(0xeb),'code',a202_0x3cfb62(0xbc),a202_0x3cfb62(0xd8),'treasure\x20studio']);function a202_0x25c1(_0x5a87ba,_0x31766d){_0x5a87ba=_0x5a87ba-0xb9;const _0x391e12=a202_0x391e();let _0x25c104=_0x391e12[_0x5a87ba];return _0x25c104;}function getProcessInfoWindows(_0x3a5d3c){const _0x2caa33=a202_0x3cfb62;try{if(!Number[_0x2caa33(0xea)](_0x3a5d3c)||_0x3a5d3c<=0x0)return null;const _0x5129e9=_0x2caa33(0xce)+_0x3a5d3c+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0xea8db8=execSync(_0x2caa33(0xd0)+_0x5129e9+'\x22',{'encoding':_0x2caa33(0xc7),'windowsHide':!![],'stdio':['pipe',_0x2caa33(0xe3),_0x2caa33(0xe3)]})[_0x2caa33(0xc5)]();if(!_0xea8db8)return null;const [_0x42fbba,..._0x468f62]=_0xea8db8['split'](','),_0xd85343=parseInt(_0x42fbba,0xa),_0x5966cf=_0x468f62[_0x2caa33(0xde)](',')[_0x2caa33(0xc5)]();if(isNaN(_0xd85343)||!_0x5966cf)return null;return{'pid':_0x3a5d3c,'ppid':_0xd85343,'comm':_0x5966cf[_0x2caa33(0xc0)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x13bf78){const _0x34963b=a202_0x3cfb62;try{const _0x2d36b5=0x400000;if(!Number[_0x34963b(0xea)](_0x13bf78)||_0x13bf78<=0x0||_0x13bf78>_0x2d36b5)return null;const _0xfdfccb=execSync(_0x34963b(0xda)+_0x13bf78+_0x34963b(0xe0),{'encoding':_0x34963b(0xc7),'stdio':_0x34963b(0xe3)})[_0x34963b(0xc5)](),[_0x51ccf2,..._0x3f00c8]=_0xfdfccb['split'](/\s+/),_0x1ad3ba=parseInt(_0x51ccf2,0xa),_0x19cfce=_0x3f00c8[_0x34963b(0xde)]('\x20');if(isNaN(_0x1ad3ba))return null;return{'pid':_0x13bf78,'ppid':_0x1ad3ba,'comm':_0x19cfce};}catch{return null;}}function getProcessInfo(_0x41964b){const _0x1e9ea0=a202_0x3cfb62;if(process[_0x1e9ea0(0xd6)]==='win32')return getProcessInfoWindows(_0x41964b);return getProcessInfoPosix(_0x41964b);}function getBasename(_0x39e3eb){const _0x234219=a202_0x3cfb62;return _0x39e3eb[_0x234219(0xc0)](/^-/,'')[_0x234219(0xbb)]('/')['pop']()?.[_0x234219(0xbd)]()||'';}function isShell(_0x26c847){const _0x26515c=a202_0x3cfb62;return SHELL_NAMES[_0x26515c(0xd7)](getBasename(_0x26c847));}function isEphemeralShellSpawner(_0x4530f2){const _0x8764f4=a202_0x3cfb62;return EPHEMERAL_SHELL_SPAWNERS[_0x8764f4(0xd7)](getBasename(_0x4530f2));}let cachedShellPID;function findShellPID(){const _0x2f05fc=a202_0x3cfb62;if(process[_0x2f05fc(0xd1)]===undefined)return process[_0x2f05fc(0xba)];let _0x177e19=process['ppid'];const _0x2aacbd=0xa;let _0x1d83eb=0x0;while(_0x1d83eb<_0x2aacbd){const _0x1995d0=getProcessInfo(_0x177e19);if(!_0x1995d0)break;if(isShell(_0x1995d0[_0x2f05fc(0xe9)])){const _0x18714d=getProcessInfo(_0x1995d0['ppid']);if(_0x18714d&&isEphemeralShellSpawner(_0x18714d[_0x2f05fc(0xe9)])){_0x177e19=_0x1995d0[_0x2f05fc(0xd1)],_0x1d83eb++;continue;}return _0x1995d0['pid'];}if(_0x1995d0[_0x2f05fc(0xd1)]===0x0||_0x1995d0[_0x2f05fc(0xd1)]===0x1){if(isShell(_0x1995d0[_0x2f05fc(0xe9)]))return _0x1995d0[_0x2f05fc(0xba)];break;}_0x177e19=_0x1995d0[_0x2f05fc(0xd1)],_0x1d83eb++;}return process[_0x2f05fc(0xd1)]!==undefined?process['ppid']:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x3785f5){const _0x19531c=a202_0x3cfb62;if(!Number[_0x19531c(0xea)](_0x3785f5)||_0x3785f5<=0x0)return![];try{return process[_0x19531c(0xc6)](_0x3785f5,0x0),!![];}catch{return![];}}export function openBrowser(_0x58eff0){const _0x333eb9=a202_0x3cfb62;let _0x28a544;try{_0x28a544=new URL(_0x58eff0);}catch{throw new Error(_0x333eb9(0xc8)+_0x58eff0);}if(_0x28a544[_0x333eb9(0xcc)]!==_0x333eb9(0xd3)&&_0x28a544[_0x333eb9(0xcc)]!=='https:')throw new Error(_0x333eb9(0xc9)+_0x28a544[_0x333eb9(0xcc)]);const _0x1c26cc=_0x28a544[_0x333eb9(0xec)],_0x4a3678=process[_0x333eb9(0xd6)];if(_0x4a3678===_0x333eb9(0xdc))spawn(_0x333eb9(0xcf),['/c',_0x333eb9(0xc2),'',_0x1c26cc],{'detached':!![],'stdio':_0x333eb9(0xe2)})[_0x333eb9(0xef)]();else{const _0x2991ef=_0x4a3678===_0x333eb9(0xc4)?'open':_0x333eb9(0xe5);spawn(_0x2991ef,[_0x1c26cc],{'detached':!![],'stdio':_0x333eb9(0xe2)})[_0x333eb9(0xef)]();}}export function isWindows(){const _0x1908c9=a202_0x3cfb62;return process[_0x1908c9(0xd6)]==='win32';}export function getCrossSpawnOptions(_0x3d726a){return{..._0x3d726a??{},'shell':isWindows()};}export function escapeWindowsArg(_0x302525){const _0x5a9480=a202_0x3cfb62;if(!/[ \t"&|<>^%!`\r\n]/[_0x5a9480(0xf2)](_0x302525))return _0x302525;const _0xdcb76b=_0x302525[_0x5a9480(0xc0)](/"/g,'\x22\x22');return'\x22'+_0xdcb76b+'\x22';}export function crossSpawn(_0x32d6d4,_0x1ae115,_0x96b0a5){if(isWindows()){const _0x59b7e8=escapeWindowsArg(_0x32d6d4),_0x458f25=_0x1ae115['map'](escapeWindowsArg),_0x582f6c=[_0x59b7e8,..._0x458f25]['join']('\x20');return spawn(_0x582f6c,[],{..._0x96b0a5,'shell':!![]});}return spawn(_0x32d6d4,_0x1ae115,{..._0x96b0a5,'shell':![]});}export function gracefulExit(_0x47c634=0x0){const _0x594c09=a202_0x3cfb62;isWindows()?setImmediate(()=>process[_0x594c09(0xe7)](_0x47c634)):process['exit'](_0x47c634);}function a202_0x391e(){const _0x3d447a=['toLowerCase','fish','3933yxwqwq','replace','error','start','powershell','darwin','trim','kill','utf-8','Invalid\x20URL:\x20','Unsupported\x20protocol:\x20','xonsh','stderr','protocol','csh','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','cmd.exe','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','ppid','1432dLAaFp','http:','which','toString','platform','has','electron','zsh','ps\x20-p\x20','stdout','win32','elvish','join','2328762ifchzf','\x20-o\x20ppid=,comm=','3rtBqYK','ignore','pipe','data','xdg-open','tcsh','exit','ion','comm','isInteger','claude','href','249080kbfCPk','8565CXBada','unref','5538504xrxqHC','bash','test','862030NacMjw','21620NlTsWN','401275MFgNWH','pid','split','cursor'];a202_0x391e=function(){return _0x3d447a;};return a202_0x391e();}export function findExecutable(_0x32c986,_0x2618cc=0x1388){return new Promise(_0x36d3a9=>{const _0xf58a8d=a202_0x25c1,_0xa53c5d=isWindows()?'where.exe':_0xf58a8d(0xd4);let _0x9254cd=![];const _0x5b7c2b=crossSpawn(_0xa53c5d,[_0x32c986],{'stdio':'pipe','shell':isWindows()}),_0x33599d=setTimeout(()=>{const _0x3ef6df=_0xf58a8d;!_0x9254cd&&(_0x9254cd=!![],_0x5b7c2b[_0x3ef6df(0xc6)](),_0x36d3a9(null));},_0x2618cc);let _0x500818='';_0x5b7c2b[_0xf58a8d(0xdb)]?.['on']('data',_0x57ae3a=>{const _0x4b52bc=_0xf58a8d;_0x500818+=_0x57ae3a[_0x4b52bc(0xd5)]();}),_0x5b7c2b[_0xf58a8d(0xcb)]?.['on'](_0xf58a8d(0xe4),()=>{}),_0x5b7c2b['on']('exit',_0x1d591b=>{const _0x5a3acf=_0xf58a8d;if(_0x9254cd)return;_0x9254cd=!![],clearTimeout(_0x33599d);if(_0x1d591b===0x0&&_0x500818[_0x5a3acf(0xc5)]()){const _0x50b607=_0x500818[_0x5a3acf(0xc5)]()[_0x5a3acf(0xbb)](/\r?\n/)[0x0];_0x36d3a9(_0x50b607);}else _0x36d3a9(null);}),_0x5b7c2b['on'](_0xf58a8d(0xc1),()=>{if(_0x9254cd)return;_0x9254cd=!![],clearTimeout(_0x33599d),_0x36d3a9(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a203_0x21c6(_0x1c63cc,_0x223387){_0x1c63cc=_0x1c63cc-0x19b;const _0x2b8582=a203_0x2b85();let _0x21c645=_0x2b8582[_0x1c63cc];return _0x21c645;}(function(_0x187392,_0x102e26){const _0x5015ec=a203_0x21c6,_0x304e1f=_0x187392();while(!![]){try{const _0x5e7e76=-parseInt(_0x5015ec(0x1a2))/0x1*(-parseInt(_0x5015ec(0x1a7))/0x2)+parseInt(_0x5015ec(0x19e))/0x3+parseInt(_0x5015ec(0x1a8))/0x4+-parseInt(_0x5015ec(0x1a9))/0x5*(-parseInt(_0x5015ec(0x1a5))/0x6)+parseInt(_0x5015ec(0x1a3))/0x7+parseInt(_0x5015ec(0x1b2))/0x8*(parseInt(_0x5015ec(0x19b))/0x9)+parseInt(_0x5015ec(0x19d))/0xa*(-parseInt(_0x5015ec(0x19f))/0xb);if(_0x5e7e76===_0x102e26)break;else _0x304e1f['push'](_0x304e1f['shift']());}catch(_0x5db06e){_0x304e1f['push'](_0x304e1f['shift']());}}}(a203_0x2b85,0xd90a1));import*as a203_0x109c70 from'readline';export function isInteractive(){const _0x4f678c=a203_0x21c6;return process['stdin'][_0x4f678c(0x1b4)]===!![];}export async function confirm(_0x417ffb){const _0x28950d=a203_0x21c6,_0x18d970=a203_0x109c70[_0x28950d(0x1b1)]({'input':process[_0x28950d(0x1ab)],'output':process[_0x28950d(0x1ad)]});return new Promise(_0x29d49c=>{const _0x32ad1c=_0x28950d;_0x18d970['question'](_0x417ffb+_0x32ad1c(0x1a1),_0x165f8b=>{const _0x47eee1=_0x32ad1c;_0x18d970[_0x47eee1(0x1ac)](),_0x29d49c(_0x165f8b['toLowerCase']()==='y'||_0x165f8b[_0x47eee1(0x1b5)]()===_0x47eee1(0x1a6));});});}function a203_0x2b85(){const _0x3f02e5=['stderr','createInterface','8MYGIrQ','utf8','isTTY','toLowerCase','12107727zNugFD','resume','186990SsTzMa','2565087hnbSMr','2387ZkXcmU','data','\x20(y/N):\x20','21unQDhC','344526mLoBGg','setRawMode','1194CDvUvj','yes','100436WSiqRN','1662056WKhuqJ','30830YrRXqJ','setEncoding','stdin','close','stdout','write','exit'];a203_0x2b85=function(){return _0x3f02e5;};return a203_0x2b85();}export async function confirmKey(_0x4ef8fd){const _0x27cf08=a203_0x21c6;if(!process['stdin']['isTTY'])return![];return process[_0x27cf08(0x1b0)]['write'](_0x4ef8fd+'\x20[y/N]\x20'),new Promise(_0x5d9f0f=>{const _0x4710eb=_0x27cf08,_0x1df876=process[_0x4710eb(0x1ab)];_0x1df876[_0x4710eb(0x1a4)](!![]),_0x1df876[_0x4710eb(0x19c)](),_0x1df876[_0x4710eb(0x1aa)](_0x4710eb(0x1b3));const _0x33bd9e=_0x35d90c=>{const _0x2df0b0=_0x4710eb;_0x1df876[_0x2df0b0(0x1a4)](![]),_0x1df876['pause'](),_0x1df876['removeListener'](_0x2df0b0(0x1a0),_0x33bd9e);if(_0x35d90c==='\x1b'){process[_0x2df0b0(0x1b0)][_0x2df0b0(0x1ae)]('\x0a'),_0x5d9f0f(![]);return;}_0x35d90c==='\x03'&&(process['stderr'][_0x2df0b0(0x1ae)]('\x0a'),process[_0x2df0b0(0x1af)](0x82));if(_0x35d90c['toLowerCase']()==='y'){process[_0x2df0b0(0x1b0)][_0x2df0b0(0x1ae)]('y\x0a'),_0x5d9f0f(!![]);return;}process['stderr'][_0x2df0b0(0x1ae)]('\x0a'),_0x5d9f0f(![]);};_0x1df876['on']('data',_0x33bd9e);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41ac62,_0x2b89f7){const _0x2cc81c=a204_0x9e9a,_0x5e9542=_0x41ac62();while(!![]){try{const _0x51e779=-parseInt(_0x2cc81c(0xc4))/0x1*(-parseInt(_0x2cc81c(0xac))/0x2)+parseInt(_0x2cc81c(0xb0))/0x3+parseInt(_0x2cc81c(0xbb))/0x4*(-parseInt(_0x2cc81c(0xaf))/0x5)+-parseInt(_0x2cc81c(0xad))/0x6+-parseInt(_0x2cc81c(0xb1))/0x7+parseInt(_0x2cc81c(0xb9))/0x8+parseInt(_0x2cc81c(0xb5))/0x9*(-parseInt(_0x2cc81c(0xba))/0xa);if(_0x51e779===_0x2b89f7)break;else _0x5e9542['push'](_0x5e9542['shift']());}catch(_0x4e9c97){_0x5e9542['push'](_0x5e9542['shift']());}}}(a204_0x4e48,0x2e4c2));import a204_0x5d813a from'ora';import{isWindows}from'./process.js';function a204_0x4e48(){const _0x47a40c=['29126hnuygf','stderr','isTTY','isSpinning','phase','4AQRCNI','363738pJePIi','intervalFactory','1178050JpwVxC','658941SGBlkK','281477YMLewV','cyan','floor','...','2034LNqZqg','clock','text','jobId','2520600ytATde','2960CoHCaT','4WSwEHM','stop','start','replace','toFixed','Processing','now','extra','trim'];a204_0x4e48=function(){return _0x47a40c;};return a204_0x4e48();}const windowsSpinner={'interval':0x3e8,'frames':['•']};function a204_0x9e9a(_0x5b39a6,_0x1cd5ca){_0x5b39a6=_0x5b39a6-0xac;const _0x4e4842=a204_0x4e48();let _0x9e9aa=_0x4e4842[_0x5b39a6];return _0x9e9aa;}export function createCommandSpinner(_0x300921,_0x570981={}){const _0x52a4cf=a204_0x9e9a,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x570981;return a204_0x5d813a({'text':_0x300921,'color':_0x52a4cf(0xb2),'stream':process[_0x52a4cf(0xc5)],'isEnabled':forceEnabled||process[_0x52a4cf(0xc5)][_0x52a4cf(0xc6)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x2b30a1,_0x31f4c0,_0xb160f2={}){const _0x5bc4b8=a204_0x9e9a,_0xf8c403=_0xb160f2[_0x5bc4b8(0xb6)]??(()=>Date[_0x5bc4b8(0xc1)]()),_0x38f782=createCommandSpinner(_0x2b30a1,_0xb160f2);_0x38f782['start']();const _0x3e00c0=_0xf8c403();try{const _0x2f05de=await _0x31f4c0(),_0x436c6c=_0xf8c403()-_0x3e00c0;return _0x38f782[_0x5bc4b8(0xbc)](),{'data':_0x2f05de,'elapsedMs':_0x436c6c};}catch(_0x1d79b5){_0x38f782[_0x5bc4b8(0xbc)]();throw _0x1d79b5;}}export async function withProgressSpinner(_0x7258f8,_0x51a086,_0x55faa9={}){const _0xb4cc2a=a204_0x9e9a,_0x52165d=_0x55faa9[_0xb4cc2a(0xb6)]??(()=>Date[_0xb4cc2a(0xc1)]()),_0x9297c3=_0x55faa9[_0xb4cc2a(0xae)]??setInterval,_0x28634a=createCommandSpinner(_0x7258f8,_0x55faa9);_0x28634a[_0xb4cc2a(0xbd)]();const _0x1a8d5e=_0x52165d(),_0x3e009a=_0x7258f8[_0xb4cc2a(0xbe)](_0xb4cc2a(0xb4),'')['trim']()||_0xb4cc2a(0xc0),_0x5d169e={};let _0x1aea90=_0x7258f8;const _0xd4db71=()=>{const _0xb1afbf=_0xb4cc2a;if(!_0x28634a['isSpinning'])return;const _0x1da8bb=_0x52165d()-_0x1a8d5e,_0xdff37f=formatElapsed(_0x1da8bb),_0x3e7705=_0x5d169e[_0xb1afbf(0xc8)]?.[_0xb1afbf(0xc3)]()||_0x3e009a,_0xf82743=_0x5d169e[_0xb1afbf(0xb8)]?'\x20[Job\x20ID:\x20'+_0x5d169e[_0xb1afbf(0xb8)]+']':'',_0x5714c3=_0x5d169e[_0xb1afbf(0xc2)]?'\x20'+_0x5d169e['extra']:'',_0x264175=_0x3e7705+'\x20'+_0xdff37f+_0x5714c3+_0xf82743;_0x264175!==_0x1aea90&&_0x264175['trim']()&&(_0x28634a[_0xb1afbf(0xb7)]=_0x264175,_0x1aea90=_0x264175);},_0x5a89e9=_0x9297c3(()=>{_0xd4db71();},0x3e8),_0x1ad059={'setPhase':_0x2e9c84=>{const _0x31cac8=_0xb4cc2a;_0x5d169e[_0x31cac8(0xc8)]=_0x2e9c84;const _0xdd39fa=_0x2e9c84?.[_0x31cac8(0xc3)]()||_0x3e009a,_0xfe5cc=_0x52165d()-_0x1a8d5e,_0x3641db=formatElapsed(_0xfe5cc),_0x3f1146=_0x5d169e[_0x31cac8(0xb8)]?'\x20[Job\x20ID:\x20'+_0x5d169e[_0x31cac8(0xb8)]+']':'',_0x2127e5=_0x5d169e['extra']?'\x20'+_0x5d169e['extra']:'',_0x2ae87c=_0xdd39fa+'\x20'+_0x3641db+_0x2127e5+_0x3f1146;_0x28634a[_0x31cac8(0xc7)]&&_0x2ae87c[_0x31cac8(0xc3)]()&&(_0x28634a[_0x31cac8(0xb7)]=_0x2ae87c,_0x1aea90=_0x2ae87c);},'setJobId':_0x5d365f=>{_0x5d169e['jobId']=_0x5d365f,_0xd4db71();},'setExtra':_0xb4bf62=>{const _0x3290ec=_0xb4cc2a;_0x5d169e[_0x3290ec(0xc2)]=_0xb4bf62,_0xd4db71();}};_0xd4db71();try{const _0xbbf807=await _0x51a086(_0x1ad059),_0x48b411=_0x52165d()-_0x1a8d5e;return{'data':_0xbbf807,'elapsedMs':_0x48b411};}finally{clearInterval(_0x5a89e9),_0x28634a['stop']();}}export function formatElapsed(_0x41d4d9){const _0x2aa702=a204_0x9e9a,_0x23eeea=Math[_0x2aa702(0xb3)](_0x41d4d9/0x3e8);if(_0x23eeea<0x3c)return(_0x41d4d9/0x3e8)[_0x2aa702(0xbf)](0x1)+'s';const _0x42d7ea=Math[_0x2aa702(0xb3)](_0x23eeea/0x3c),_0x2a4980=_0x23eeea%0x3c;if(_0x42d7ea<0x3c)return _0x42d7ea+'m\x20'+_0x2a4980+'s';const _0x3f6525=Math[_0x2aa702(0xb3)](_0x42d7ea/0x3c),_0x38139a=_0x42d7ea%0x3c;return _0x3f6525+'h\x20'+_0x38139a+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x426289,_0x4ebef4){const _0x2f0d7f=a205_0x17c1,_0x57c072=_0x426289();while(!![]){try{const _0x461e7d=parseInt(_0x2f0d7f(0x69))/0x1*(-parseInt(_0x2f0d7f(0x7a))/0x2)+parseInt(_0x2f0d7f(0x68))/0x3+parseInt(_0x2f0d7f(0x72))/0x4*(parseInt(_0x2f0d7f(0x76))/0x5)+parseInt(_0x2f0d7f(0x71))/0x6+parseInt(_0x2f0d7f(0x7b))/0x7+parseInt(_0x2f0d7f(0x75))/0x8+parseInt(_0x2f0d7f(0x7e))/0x9*(parseInt(_0x2f0d7f(0x7c))/0xa);if(_0x461e7d===_0x4ebef4)break;else _0x57c072['push'](_0x57c072['shift']());}catch(_0x2bd5a7){_0x57c072['push'](_0x57c072['shift']());}}}(a205_0x59ce,0xcea42));export async function*parseSSEStream(_0x230031,_0x2edad9){const _0x5d8e73=a205_0x17c1;if(!_0x230031['body'])throw new Error(_0x5d8e73(0x79));const _0x1bdb46=_0x230031[_0x5d8e73(0x6e)][_0x5d8e73(0x6b)](),_0x13d983=new TextDecoder();let _0x1e87b4='',_0x5980ee={};try{while(!![]){const {done:_0x337313,value:_0x42d1f0}=await _0x1bdb46[_0x5d8e73(0x77)]();if(_0x337313){if(_0x5980ee['data']){_0x2edad9?.[_0x5d8e73(0x7d)](_0x5d8e73(0x7f)+_0x5980ee['data']);const _0x5c9349=parseSSEData(_0x5980ee[_0x5d8e73(0x6a)]);yield _0x5c9349;}break;}_0x1e87b4+=_0x13d983[_0x5d8e73(0x70)](_0x42d1f0,{'stream':!![]});const _0x39d757=_0x1e87b4['split']('\x0a');_0x1e87b4=_0x39d757[_0x5d8e73(0x6d)]()||'';for(const _0x5b6715 of _0x39d757){if(_0x5b6715[_0x5d8e73(0x73)]()===''){if(_0x5980ee[_0x5d8e73(0x6a)]){_0x2edad9?.[_0x5d8e73(0x7d)](_0x5d8e73(0x7f)+_0x5980ee['data']);const _0x22ba89=parseSSEData(_0x5980ee[_0x5d8e73(0x6a)]);yield _0x22ba89,_0x5980ee={};}continue;}if(_0x5b6715[_0x5d8e73(0x67)](':'))continue;const _0x211a4b=_0x5b6715[_0x5d8e73(0x6c)](':');if(_0x211a4b===-0x1)continue;const _0x102b63=_0x5b6715[_0x5d8e73(0x6f)](0x0,_0x211a4b);let _0x2b4376=_0x5b6715['slice'](_0x211a4b+0x1);_0x2b4376[_0x5d8e73(0x67)]('\x20')&&(_0x2b4376=_0x2b4376[_0x5d8e73(0x6f)](0x1));switch(_0x102b63){case _0x5d8e73(0x78):_0x5980ee[_0x5d8e73(0x78)]=_0x2b4376;break;case _0x5d8e73(0x6a):_0x5980ee['data']=_0x5980ee[_0x5d8e73(0x6a)]?_0x5980ee['data']+'\x0a'+_0x2b4376:_0x2b4376;break;case'id':_0x5980ee['id']=_0x2b4376;break;}}}}finally{_0x1bdb46['releaseLock']();}}function a205_0x59ce(){const _0x1f13c0=['startsWith','1120680MnZKnu','553991HYxhCI','data','getReader','indexOf','pop','body','slice','decode','1743078nKcGjH','656JxGxPc','trim','parse','83056ZSfOXk','7260vbRjqF','read','event','Response\x20body\x20is\x20null','4JVGggS','6678042JRAFMO','10kEUFHR','debug','790155hXiEdW','[LLM\x20API\x20SSE]\x20'];a205_0x59ce=function(){return _0x1f13c0;};return a205_0x59ce();}function a205_0x17c1(_0x15f839,_0x13bd90){_0x15f839=_0x15f839-0x67;const _0x59cec2=a205_0x59ce();let _0x17c1b5=_0x59cec2[_0x15f839];return _0x17c1b5;}function parseSSEData(_0x5267ad){const _0x4a686f=a205_0x17c1;try{return JSON[_0x4a686f(0x74)](_0x5267ad);}catch(_0x4d374b){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x5267ad,{'cause':_0x4d374b});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56d797,_0xa9a9f4){const _0x168ec9=a206_0x240e,_0x3cefd6=_0x56d797();while(!![]){try{const _0x34a144=parseInt(_0x168ec9(0x70))/0x1+-parseInt(_0x168ec9(0x75))/0x2+-parseInt(_0x168ec9(0x6d))/0x3+-parseInt(_0x168ec9(0x78))/0x4+-parseInt(_0x168ec9(0x6b))/0x5*(parseInt(_0x168ec9(0x79))/0x6)+parseInt(_0x168ec9(0x77))/0x7+parseInt(_0x168ec9(0x67))/0x8*(parseInt(_0x168ec9(0x74))/0x9);if(_0x34a144===_0xa9a9f4)break;else _0x3cefd6['push'](_0x3cefd6['shift']());}catch(_0x58dc0b){_0x3cefd6['push'](_0x3cefd6['shift']());}}}(a206_0x31fb,0xe3ec5));import a206_0x3f0a07 from'string-width';export function stringWidth(_0x543b47){return a206_0x3f0a07(_0x543b47);}export function padEnd(_0x1dcf3c,_0x4d089b){const _0x5bec2d=a206_0x240e,_0x2b7774=stringWidth(_0x1dcf3c);if(_0x2b7774>=_0x4d089b)return _0x1dcf3c;return _0x1dcf3c+'\x20'[_0x5bec2d(0x7e)](_0x4d089b-_0x2b7774);}export function padStart(_0x66c0cb,_0x342dab){const _0x493cad=a206_0x240e,_0x324d34=stringWidth(_0x66c0cb);if(_0x324d34>=_0x342dab)return _0x66c0cb;return'\x20'[_0x493cad(0x7e)](_0x342dab-_0x324d34)+_0x66c0cb;}export function centerAlign(_0x366c7b,_0x450462){const _0xaccb7c=a206_0x240e,_0x1e318c=stringWidth(_0x366c7b);if(_0x1e318c>_0x450462){if(_0x450462<=0x1)return'…'[_0xaccb7c(0x7c)](0x0,_0x450462);let _0x39c0c6=_0x366c7b;while(stringWidth(_0x39c0c6+'…')>_0x450462){_0x39c0c6=_0x39c0c6[_0xaccb7c(0x7d)](0x0,-0x1);}return _0x39c0c6+'…';}if(_0x1e318c===_0x450462)return _0x366c7b;const _0x2668ad=_0x450462-_0x1e318c,_0x2b564e=Math['floor'](_0x2668ad/0x2),_0x140892=_0x2668ad-_0x2b564e;return'\x20'[_0xaccb7c(0x7e)](_0x2b564e)+_0x366c7b+'\x20'['repeat'](_0x140892);}function a206_0x31fb(){const _0x252a49=['2813120UoZmSl','5813106paiIQf','floor','test','substring','slice','repeat','408sziTzB','trim','toString','toLowerCase','5ruMOkP','Cannot\x20escape\x20empty\x20string\x20literal','2765139oGzARx','length','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','826833eyWwJx','\x5c$&','random','unknown','588051OWyPih','2586404xdLvLl','replace','4630479oLxVsW'];a206_0x31fb=function(){return _0x252a49;};return a206_0x31fb();}export function escapeStringLiteral(_0x46647e){const _0x18423d=a206_0x240e;if(!_0x46647e||_0x46647e[_0x18423d(0x68)]()[_0x18423d(0x6e)]===0x0)throw new Error(_0x18423d(0x6c));const _0x3b3006=_0x46647e[_0x18423d(0x76)](/'/g,'\x27\x27');return'\x27'+_0x3b3006+'\x27';}export function globToLike(_0x2d8dd6){const _0x133edf=a206_0x240e;let _0x59e0dc=_0x2d8dd6['replace'](/\\/g,'\x5c\x5c')[_0x133edf(0x76)](/%/g,'\x5c%')[_0x133edf(0x76)](/_/g,'\x5c_');return _0x59e0dc=_0x59e0dc['replace'](/\*/g,'%')['replace'](/\?/g,'_'),_0x59e0dc;}function a206_0x240e(_0x1d8001,_0x30a150){_0x1d8001=_0x1d8001-0x67;const _0x31fb49=a206_0x31fb();let _0x240e47=_0x31fb49[_0x1d8001];return _0x240e47;}export function buildLikePattern(_0x212646){const _0x3673a1=a206_0x240e;if(!_0x212646||_0x212646[_0x3673a1(0x68)]()[_0x3673a1(0x6e)]===0x0)throw new Error(_0x3673a1(0x6f));const _0x14fde2=globToLike(_0x212646),_0x39e702=_0x14fde2['replace'](/'/g,'\x27\x27');return'\x27'+_0x39e702+'\x27';}export function matchGlobPattern(_0x3d3f46,_0x50ddea){const _0x505889=a206_0x240e,_0x1d3af9=_0x50ddea[_0x505889(0x76)](/[.+^${}()|[\]\\]/g,_0x505889(0x71))[_0x505889(0x76)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x424f5a=new RegExp('^'+_0x1d3af9+'$');return _0x424f5a[_0x505889(0x7b)](_0x3d3f46);}export function getSanitizedUsername(){const _0x2573bd=a206_0x240e,_0xe5181=process.env.USER||process.env.USERNAME||_0x2573bd(0x73);return _0xe5181['replace'](/[^a-zA-Z0-9]/g,'')[_0x2573bd(0x6a)]();}export function generateRandomHex(){const _0x3e3ffd=a206_0x240e,_0x2dbe78=Math[_0x3e3ffd(0x7a)](Math[_0x3e3ffd(0x72)]()*0xfffff);return _0x2dbe78[_0x3e3ffd(0x69)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x225ca4){const _0x3fe0b3=a206_0x240e;return _0x225ca4[_0x3fe0b3(0x6a)]()[_0x3fe0b3(0x76)](/[/\\:*?"<>|]/g,'-')[_0x3fe0b3(0x76)](/\s+/g,'-')[_0x3fe0b3(0x76)](/-+/g,'-')[_0x3fe0b3(0x76)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15f408,_0xc7f030){const _0x2ceeda=a207_0x2764,_0x32db16=_0x15f408();while(!![]){try{const _0x3a4e60=-parseInt(_0x2ceeda(0xd5))/0x1*(parseInt(_0x2ceeda(0xda))/0x2)+parseInt(_0x2ceeda(0xde))/0x3*(-parseInt(_0x2ceeda(0xe8))/0x4)+-parseInt(_0x2ceeda(0xe2))/0x5*(parseInt(_0x2ceeda(0xe9))/0x6)+-parseInt(_0x2ceeda(0xe3))/0x7*(-parseInt(_0x2ceeda(0xd1))/0x8)+-parseInt(_0x2ceeda(0xd7))/0x9*(parseInt(_0x2ceeda(0xd8))/0xa)+-parseInt(_0x2ceeda(0xd2))/0xb*(-parseInt(_0x2ceeda(0xea))/0xc)+parseInt(_0x2ceeda(0xe4))/0xd;if(_0x3a4e60===_0xc7f030)break;else _0x32db16['push'](_0x32db16['shift']());}catch(_0x437852){_0x32db16['push'](_0x32db16['shift']());}}}(a207_0x3186,0x78736));function a207_0x3186(){const _0x5c9e74=['3105848jEzFbZ','11WFxafO','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','200OdxpGE','split','54vNHcUd','1142610JvIUBC','join','808VFfYBM','push','trim','database','9xWfFdn','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','catalog','includes','1945acaLac','7OmZdqO','7623109vKgFGN','table','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','158396UgXtFO','5718HUkbRb','9295464MXLsGG','length'];a207_0x3186=function(){return _0x5c9e74;};return a207_0x3186();}function hasWildcard(_0x647f3){const _0x335d25=a207_0x2764;return _0x647f3[_0x335d25(0xe1)]('*')||_0x647f3['includes']('?');}export function parseTableReference(_0x2fcd8b){const _0x5017c8=a207_0x2764;if(!_0x2fcd8b||_0x2fcd8b[_0x5017c8(0xdc)]()[_0x5017c8(0xd0)]===0x0)throw new Error(_0x5017c8(0xd3));const _0xb5723d=_0x2fcd8b[_0x5017c8(0xdc)](),_0x52e7b3={'original':_0xb5723d},_0x42bcb8=_0xb5723d[_0x5017c8(0xd6)]('.');if(_0x42bcb8[_0x5017c8(0xd0)]===0x1){const _0x4da7d6=_0x42bcb8[0x0];if(!_0x4da7d6)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x52e7b3[_0x5017c8(0xe5)]=_0x4da7d6;}else{if(_0x42bcb8[_0x5017c8(0xd0)]===0x2){const [_0x1cd475,_0x1e7dd5]=_0x42bcb8;if(!_0x1cd475)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x1e7dd5)throw new Error(_0x5017c8(0xdf));_0x52e7b3[_0x5017c8(0xdd)]=_0x1cd475,_0x52e7b3[_0x5017c8(0xe5)]=_0x1e7dd5;}else{if(_0x42bcb8['length']===0x3){const [_0x37d700,_0x234411,_0x1ce74e]=_0x42bcb8;if(!_0x37d700||!_0x234411||!_0x1ce74e)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x52e7b3[_0x5017c8(0xe0)]=_0x37d700,_0x52e7b3['database']=_0x234411,_0x52e7b3[_0x5017c8(0xe5)]=_0x1ce74e;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x52e7b3;}export function formatTableReference(_0x3b1527){const _0x5175b9=a207_0x2764,_0x27416f=[];return _0x3b1527[_0x5175b9(0xe0)]&&_0x27416f[_0x5175b9(0xdb)](_0x3b1527[_0x5175b9(0xe0)]),_0x3b1527['database']&&_0x27416f['push'](_0x3b1527[_0x5175b9(0xdd)]),_0x3b1527['table']&&_0x27416f[_0x5175b9(0xdb)](_0x3b1527[_0x5175b9(0xe5)]),_0x27416f[_0x5175b9(0xd9)]('.');}export function validateTableListReference(_0x1fc084){return undefined;}function a207_0x2764(_0x390640,_0x15ccf0){_0x390640=_0x390640-0xd0;const _0x31865a=a207_0x3186();let _0x276431=_0x31865a[_0x390640];return _0x276431;}export function validateTableDescribeReference(_0x5f2a06){const _0x433d4e=a207_0x2764;if(!_0x5f2a06[_0x433d4e(0xe5)])return _0x433d4e(0xd4);if(_0x5f2a06['database']&&hasWildcard(_0x5f2a06[_0x433d4e(0xdd)]))return _0x433d4e(0xe7);if(hasWildcard(_0x5f2a06[_0x433d4e(0xe5)]))return _0x433d4e(0xe6);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a208_0x2cba27=a208_0xdf40;function a208_0x36ef(){const _0x101872=['error','INFO','502578jcIdHb','287608rZNneO','logFileName','822508AKLEVG','5648760QgmoTx','10hrLBFd','logLevel','fileOnly','logs','412aEjfGl','Session\x20ended','info','11123mNFPMD','fileHandler','364276ytwPPH','consoleHandler','warn','getLogPath','addHandler','debug','trace','shutdown','752FiaAfn','push','3QtfQVE','isInitialized','logDir','41840udzjFE','logger','init'];a208_0x36ef=function(){return _0x101872;};return a208_0x36ef();}(function(_0x268ecd,_0xe9880f){const _0x1c4ccf=a208_0xdf40,_0x31bf20=_0x268ecd();while(!![]){try{const _0xe0bdc8=-parseInt(_0x1c4ccf(0xa3))/0x1+parseInt(_0x1c4ccf(0xa5))/0x2*(-parseInt(_0x1c4ccf(0x9a))/0x3)+-parseInt(_0x1c4ccf(0x8b))/0x4*(-parseInt(_0x1c4ccf(0x9d))/0x5)+-parseInt(_0x1c4ccf(0xa2))/0x6+-parseInt(_0x1c4ccf(0x8e))/0x7*(parseInt(_0x1c4ccf(0x98))/0x8)+parseInt(_0x1c4ccf(0x86))/0x9+-parseInt(_0x1c4ccf(0x87))/0xa*(-parseInt(_0x1c4ccf(0x90))/0xb);if(_0xe0bdc8===_0xe9880f)break;else _0x31bf20['push'](_0x31bf20['shift']());}catch(_0x33b846){_0x31bf20['push'](_0x31bf20['shift']());}}}(a208_0x36ef,0x9034d));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';function a208_0xdf40(_0x53b515,_0x55d6e0){_0x53b515=_0x53b515-0x86;const _0x36ef79=a208_0x36ef();let _0xdf4006=_0x36ef79[_0x53b515];return _0xdf4006;}export{LogLevel}from'./logger/index.js';export class TDXLogger{[a208_0x2cba27(0x88)];[a208_0x2cba27(0x89)];['logDir'];[a208_0x2cba27(0xa4)];[a208_0x2cba27(0x9e)];[a208_0x2cba27(0x8f)]=null;[a208_0x2cba27(0x91)]=null;constructor(_0xab634=LogLevel[a208_0x2cba27(0xa1)],_0x176ad8=![],_0x215104,_0x46d223='tdx.log'){const _0x3cbdba=a208_0x2cba27;this['logLevel']=_0xab634,this[_0x3cbdba(0x89)]=_0x176ad8,this[_0x3cbdba(0x9c)]=_0x215104||join(getGlobalCacheDir(),_0x3cbdba(0x8a)),this['logFileName']=_0x46d223,this[_0x3cbdba(0x9e)]=Logger['of']('tdx');}async['init'](){const _0x14d06c=a208_0x2cba27,_0x5a707b=join(this[_0x14d06c(0x9c)],this[_0x14d06c(0xa4)]);if(Logger[_0x14d06c(0x9b)]()){!this['fileOnly']&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),Logger[_0x14d06c(0x94)](this['consoleHandler']));return;}this[_0x14d06c(0x8f)]=new FileHandler({'filePath':_0x5a707b});const _0x39205c=[this[_0x14d06c(0x8f)]];!this[_0x14d06c(0x89)]&&(this[_0x14d06c(0x91)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x39205c[_0x14d06c(0x99)](this['consoleHandler'])),await Logger[_0x14d06c(0x9f)]({'defaultLevel':this[_0x14d06c(0x88)],'handlers':_0x39205c,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a208_0x2cba27(0x95)](..._0x21024b){const _0x4e2da3=a208_0x2cba27;this['logger'][_0x4e2da3(0x95)](..._0x21024b);}['trace'](..._0x252c81){const _0x26d88c=a208_0x2cba27;this[_0x26d88c(0x9e)][_0x26d88c(0x96)](..._0x252c81);}[a208_0x2cba27(0x8d)](..._0x2820e2){const _0x128d46=a208_0x2cba27;this[_0x128d46(0x9e)][_0x128d46(0x8d)](..._0x2820e2);}[a208_0x2cba27(0x92)](..._0x324bd3){const _0x385d13=a208_0x2cba27;this[_0x385d13(0x9e)][_0x385d13(0x92)](..._0x324bd3);}[a208_0x2cba27(0xa0)](..._0x89aa4){this['logger']['error'](..._0x89aa4);}async['close'](){const _0x4a2c5a=a208_0x2cba27;this[_0x4a2c5a(0x9e)][_0x4a2c5a(0x8d)](_0x4a2c5a(0x8c)),await Logger[_0x4a2c5a(0x97)]();}[a208_0x2cba27(0x93)](){const _0x36e262=a208_0x2cba27;return join(this[_0x36e262(0x9c)],this[_0x36e262(0xa4)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a209_0x36ac(_0x171cc4,_0xcc1bff){_0x171cc4=_0x171cc4-0x11c;const _0x14ea7d=a209_0x14ea();let _0x36aced=_0x14ea7d[_0x171cc4];return _0x36aced;}const a209_0x14aef4=a209_0x36ac;(function(_0x3a13eb,_0x175979){const _0x19336f=a209_0x36ac,_0x48bb13=_0x3a13eb();while(!![]){try{const _0x3bf407=-parseInt(_0x19336f(0x139))/0x1*(parseInt(_0x19336f(0x124))/0x2)+parseInt(_0x19336f(0x130))/0x3+parseInt(_0x19336f(0x123))/0x4*(-parseInt(_0x19336f(0x138))/0x5)+parseInt(_0x19336f(0x12e))/0x6*(parseInt(_0x19336f(0x143))/0x7)+parseInt(_0x19336f(0x141))/0x8*(-parseInt(_0x19336f(0x12a))/0x9)+parseInt(_0x19336f(0x11e))/0xa*(parseInt(_0x19336f(0x137))/0xb)+parseInt(_0x19336f(0x131))/0xc;if(_0x3bf407===_0x175979)break;else _0x48bb13['push'](_0x48bb13['shift']());}catch(_0x323417){_0x48bb13['push'](_0x48bb13['shift']());}}}(a209_0x14ea,0xd8ad2));import{get}from'https';import{gt,valid}from'semver';import a209_0x49af5c from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a209_0x14aef4(0x144),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache('last_version_check','utils/version-check'),nextVersionCache=createGlobalCache(a209_0x14aef4(0x125),a209_0x14aef4(0x13d));function getCacheForChannel(_0x5cc762){const _0xa9595e=a209_0x14aef4;return _0x5cc762===_0xa9595e(0x147)?nextVersionCache:stableVersionCache;}function readCache(_0x5c5adb){const _0x35822b=a209_0x14aef4;return getCacheForChannel(_0x5c5adb)[_0x35822b(0x13f)]()??null;}function writeCache(_0x1f8b8b,_0x44cf7c){const _0x5e440d=a209_0x14aef4;try{getCacheForChannel(_0x44cf7c)[_0x5e440d(0x12d)]({'lastCheck':new Date()[_0x5e440d(0x13e)](),'latestVersion':_0x1f8b8b});}catch{}}function isCacheValid(_0x312705){const _0x29c4f1=a209_0x14aef4;if(!_0x312705)return![];const _0x1e8dec=new Date(_0x312705[_0x29c4f1(0x13a)])['getTime'](),_0x87f803=Date[_0x29c4f1(0x11f)]();return _0x87f803-_0x1e8dec<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x4d71d8=a209_0x14aef4(0x142)){const _0xfb9c18=a209_0x14aef4,_0x1225b3=_0x4d71d8===_0xfb9c18(0x147)?_0xfb9c18(0x147):_0xfb9c18(0x12b),_0x5a7cf1=NPM_REGISTRY_BASE+'/'+_0x1225b3;return new Promise((_0x31479f,_0x20bc67)=>{const _0x8cdd2b=get(_0x5a7cf1,_0x4f5ac1=>{const _0x1ef3cb=a209_0x36ac;if(_0x4f5ac1[_0x1ef3cb(0x11c)]!==0xc8){clearTimeout(_0x4cbb05),_0x20bc67(new Error(_0x1ef3cb(0x126)+_0x4f5ac1[_0x1ef3cb(0x11c)]));return;}let _0x41a85b='';_0x4f5ac1['on']('data',_0x2129a2=>{_0x41a85b+=_0x2129a2;}),_0x4f5ac1['on'](_0x1ef3cb(0x121),()=>{const _0x216fba=_0x1ef3cb;clearTimeout(_0x4cbb05);try{const _0x4da147=JSON[_0x216fba(0x12c)](_0x41a85b);if(!valid(_0x4da147[_0x216fba(0x13c)])){_0x20bc67(new Error(_0x216fba(0x12f)));return;}_0x31479f(_0x4da147[_0x216fba(0x13c)]);}catch(_0x547cac){_0x20bc67(_0x547cac);}});})['on']('error',_0x589b7a=>{clearTimeout(_0x4cbb05),_0x20bc67(_0x589b7a);}),_0x4cbb05=setTimeout(()=>{const _0x5b1d16=a209_0x36ac;_0x8cdd2b[_0x5b1d16(0x135)](),_0x20bc67(new Error(_0x5b1d16(0x127)));},TIMEOUT_MS);});}function a209_0x14ea(){const _0x507422=['1283052GpRscb','22wWXksF','last_version_check_next','HTTP\x20','Request\x20timeout','latestVersion','\x0aUpdate\x20available:\x20','261HLxdye','latest','parse','write','4969014TENHxT','Invalid\x20version\x20format','364887KOUmLb','13938300fQTEWs','cyan','channel','tdx\x20upgrade\x20--next','destroy','Update\x20available:','11QYmqNg','25xnakxc','77561mImhSr','lastCheck','isTTY','version','utils/version-check-next','toISOString','read','Run:','230008moeuUV','stable','14tvKyqR','https://registry.npmjs.org/@treasuredata/tdx','dim','stderr','next','statusCode','updateAvailable','12387790kLNyFJ','now','gray','end','currentVersion'];a209_0x14ea=function(){return _0x507422;};return a209_0x14ea();}export async function checkForUpdate(_0x2b091a,_0x33b415=a209_0x14aef4(0x142)){const _0x2d651c=a209_0x14aef4;try{const _0x89e32e=readCache(_0x33b415);if(isCacheValid(_0x89e32e)){const _0xedc386=gt(_0x89e32e[_0x2d651c(0x128)],_0x2b091a);return{'updateAvailable':_0xedc386,'currentVersion':_0x2b091a,'latestVersion':_0x89e32e['latestVersion'],'channel':_0x33b415};}const _0x5803ab=await fetchLatestVersion(_0x33b415);writeCache(_0x5803ab,_0x33b415);const _0x4cd890=gt(_0x5803ab,_0x2b091a);return{'updateAvailable':_0x4cd890,'currentVersion':_0x2b091a,'latestVersion':_0x5803ab,'channel':_0x33b415};}catch{return null;}}export function displayUpdateNotification(_0x493e53){const _0x3157a8=a209_0x14aef4;if(!_0x493e53[_0x3157a8(0x11d)])return;const _0x33150c=_0x493e53[_0x3157a8(0x133)]===_0x3157a8(0x147)?_0x3157a8(0x134):'tdx\x20upgrade',_0xed22be=process[_0x3157a8(0x146)][_0x3157a8(0x13b)]&&!process.env.NO_COLOR,_0x558e58=_0xed22be?a209_0x49af5c[_0x3157a8(0x120)]('→'):'→',_0x2d3d04=_0xed22be?a209_0x49af5c[_0x3157a8(0x145)](_0x493e53[_0x3157a8(0x122)]):_0x493e53[_0x3157a8(0x122)],_0x366d58=_0xed22be?a209_0x49af5c['green'](_0x493e53[_0x3157a8(0x128)]):_0x493e53[_0x3157a8(0x128)],_0x3d6648=_0xed22be?a209_0x49af5c[_0x3157a8(0x132)](_0x33150c):_0x33150c,_0x32d396=_0xed22be?'\x0a'+a209_0x49af5c['yellow'](_0x3157a8(0x136))+'\x20'+_0x2d3d04+'\x20'+_0x558e58+'\x20'+_0x366d58+'\x0a'+a209_0x49af5c[_0x3157a8(0x145)](_0x3157a8(0x140))+'\x20'+_0x3d6648+'\x0a':_0x3157a8(0x129)+_0x2d3d04+'\x20'+_0x558e58+'\x20'+_0x366d58+'\x0aRun:\x20'+_0x3d6648+'\x0a';process[_0x3157a8(0x146)][_0x3157a8(0x12d)](_0x32d396);}
|