@treasuredata/tdx 2026.3.14 → 2026.3.15
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/auth-login-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.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/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/oauth-refresh.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 a206_0x5e94a5=a206_0x82d2;(function(_0x37fecd,_0x164a56){const _0x674e1e=a206_0x82d2,_0x57ffed=_0x37fecd();while(!![]){try{const _0x7f439a=parseInt(_0x674e1e(0x115))/0x1+-parseInt(_0x674e1e(0x12e))/0x2+-parseInt(_0x674e1e(0x11e))/0x3+-parseInt(_0x674e1e(0x110))/0x4+parseInt(_0x674e1e(0x112))/0x5*(-parseInt(_0x674e1e(0x123))/0x6)+-parseInt(_0x674e1e(0x10b))/0x7*(parseInt(_0x674e1e(0x135))/0x8)+-parseInt(_0x674e1e(0x10d))/0x9*(-parseInt(_0x674e1e(0x12a))/0xa);if(_0x7f439a===_0x164a56)break;else _0x57ffed['push'](_0x57ffed['shift']());}catch(_0x14cf2f){_0x57ffed['push'](_0x57ffed['shift']());}}}(a206_0x988c,0x39605));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a206_0x5e94a5(0x11b),'zsh','sh',a206_0x5e94a5(0x12f),'ksh',a206_0x5e94a5(0x108),a206_0x5e94a5(0x107),a206_0x5e94a5(0x122),'pwsh',a206_0x5e94a5(0x117),'nu',a206_0x5e94a5(0x11f),a206_0x5e94a5(0x106),a206_0x5e94a5(0x119)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a206_0x5e94a5(0x12c),a206_0x5e94a5(0x120),a206_0x5e94a5(0x127),'electron',a206_0x5e94a5(0x10e)]);function getProcessInfoWindows(_0x5e16b){const _0x3cc4ca=a206_0x5e94a5;try{if(!Number['isInteger'](_0x5e16b)||_0x5e16b<=0x0)return null;const _0x3ab7d6=_0x3cc4ca(0x118)+_0x5e16b+_0x3cc4ca(0x10c),_0x739a69=execSync(_0x3cc4ca(0x136)+_0x3ab7d6+'\x22',{'encoding':_0x3cc4ca(0x131),'windowsHide':!![],'stdio':[_0x3cc4ca(0x125),_0x3cc4ca(0x125),_0x3cc4ca(0x125)]})['trim']();if(!_0x739a69)return null;const [_0x4bffc9,..._0x97611a]=_0x739a69[_0x3cc4ca(0x121)](','),_0xe82201=parseInt(_0x4bffc9,0xa),_0x3e1005=_0x97611a[_0x3cc4ca(0x102)](',')[_0x3cc4ca(0x124)]();if(isNaN(_0xe82201)||!_0x3e1005)return null;return{'pid':_0x5e16b,'ppid':_0xe82201,'comm':_0x3e1005[_0x3cc4ca(0x10f)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x28259d){const _0x409e77=a206_0x5e94a5;try{const _0x54f51f=0x400000;if(!Number[_0x409e77(0x105)](_0x28259d)||_0x28259d<=0x0||_0x28259d>_0x54f51f)return null;const _0x15cd44=execSync(_0x409e77(0x11a)+_0x28259d+_0x409e77(0x109),{'encoding':'utf-8','stdio':'pipe'})[_0x409e77(0x124)](),[_0x3621cb,..._0x944923]=_0x15cd44['split'](/\s+/),_0x1e91d8=parseInt(_0x3621cb,0xa),_0x1789f3=_0x944923['join']('\x20');if(isNaN(_0x1e91d8))return null;return{'pid':_0x28259d,'ppid':_0x1e91d8,'comm':_0x1789f3};}catch{return null;}}function a206_0x82d2(_0x289237,_0x1313b1){_0x289237=_0x289237-0xfe;const _0x988c4f=a206_0x988c();let _0x82d20f=_0x988c4f[_0x289237];return _0x82d20f;}function getProcessInfo(_0x305da9){if(process['platform']==='win32')return getProcessInfoWindows(_0x305da9);return getProcessInfoPosix(_0x305da9);}function getBasename(_0x8b3aea){const _0xda2817=a206_0x5e94a5;return _0x8b3aea[_0xda2817(0x10f)](/^-/,'')[_0xda2817(0x121)]('/')[_0xda2817(0x111)]()?.[_0xda2817(0x130)]()||'';}function isShell(_0x146388){return SHELL_NAMES['has'](getBasename(_0x146388));}function a206_0x988c(){const _0x5c808c=['\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','18zmbwkr','treasure\x20studio','replace','133588FJReVP','pop','15VGjKzL','test','stdout','227145PeiKNL','error','powershell','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','xonsh','ps\x20-p\x20','bash','exit','map','953589bBEavw','ion','code','split','dash','241908xCCryP','trim','pipe','kill','cursor','ignore','https:','5208820sMbYDB','comm','claude','where.exe','186326HnNQbh','fish','toLowerCase','utf-8','ppid','stderr','unref','3748152TaXxqq','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','href','Invalid\x20URL:\x20','start','win32','protocol','join','data','platform','isInteger','elvish','csh','tcsh','\x20-o\x20ppid=,comm=','pid','7OJxznR'];a206_0x988c=function(){return _0x5c808c;};return a206_0x988c();}function isEphemeralShellSpawner(_0x5dfcca){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x5dfcca));}let cachedShellPID;function findShellPID(){const _0xd8ac0=a206_0x5e94a5;if(process[_0xd8ac0(0x132)]===undefined)return process['pid'];let _0x4f7615=process[_0xd8ac0(0x132)];const _0x478c05=0xa;let _0x5825ed=0x0;while(_0x5825ed<_0x478c05){const _0x24e6ac=getProcessInfo(_0x4f7615);if(!_0x24e6ac)break;if(isShell(_0x24e6ac[_0xd8ac0(0x12b)])){const _0x15bcfe=getProcessInfo(_0x24e6ac['ppid']);if(_0x15bcfe&&isEphemeralShellSpawner(_0x15bcfe['comm'])){_0x4f7615=_0x24e6ac['ppid'],_0x5825ed++;continue;}return _0x24e6ac[_0xd8ac0(0x10a)];}if(_0x24e6ac['ppid']===0x0||_0x24e6ac[_0xd8ac0(0x132)]===0x1){if(isShell(_0x24e6ac['comm']))return _0x24e6ac[_0xd8ac0(0x10a)];break;}_0x4f7615=_0x24e6ac['ppid'],_0x5825ed++;}return process[_0xd8ac0(0x132)]!==undefined?process[_0xd8ac0(0x132)]:process[_0xd8ac0(0x10a)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x29bd5a){const _0x562b1f=a206_0x5e94a5;if(!Number[_0x562b1f(0x105)](_0x29bd5a)||_0x29bd5a<=0x0)return![];try{return process['kill'](_0x29bd5a,0x0),!![];}catch{return![];}}export function openBrowser(_0x11a65f){const _0xc9ed2e=a206_0x5e94a5;let _0x58a036;try{_0x58a036=new URL(_0x11a65f);}catch{throw new Error(_0xc9ed2e(0xfe)+_0x11a65f);}if(_0x58a036[_0xc9ed2e(0x101)]!=='http:'&&_0x58a036['protocol']!==_0xc9ed2e(0x129))throw new Error('Unsupported\x20protocol:\x20'+_0x58a036['protocol']);const _0x900c4d=_0x58a036[_0xc9ed2e(0x137)],_0x2e6353=process[_0xc9ed2e(0x104)];if(_0x2e6353===_0xc9ed2e(0x100))spawn('cmd.exe',['/c',_0xc9ed2e(0xff),'',_0x900c4d],{'detached':!![],'stdio':'ignore'})['unref']();else{const _0x486ee0=_0x2e6353==='darwin'?'open':'xdg-open';spawn(_0x486ee0,[_0x900c4d],{'detached':!![],'stdio':_0xc9ed2e(0x128)})[_0xc9ed2e(0x134)]();}}export function isWindows(){const _0x392ec8=a206_0x5e94a5;return process[_0x392ec8(0x104)]===_0x392ec8(0x100);}export function getCrossSpawnOptions(_0x3d11f7){return{..._0x3d11f7??{},'shell':isWindows()};}export function escapeWindowsArg(_0x3fc68d){const _0x2b82ac=a206_0x5e94a5;if(!/[ \t"&|<>^%!`\r\n]/[_0x2b82ac(0x113)](_0x3fc68d))return _0x3fc68d;const _0x35ffb5=_0x3fc68d['replace'](/"/g,'\x22\x22');return'\x22'+_0x35ffb5+'\x22';}export function crossSpawn(_0x4812e9,_0x37de06,_0x1504b5){const _0x525897=a206_0x5e94a5;if(isWindows()){const _0x4f4b3c=escapeWindowsArg(_0x4812e9),_0x504d8a=_0x37de06[_0x525897(0x11d)](escapeWindowsArg),_0x25a78a=[_0x4f4b3c,..._0x504d8a][_0x525897(0x102)]('\x20');return spawn(_0x25a78a,[],{..._0x1504b5,'shell':!![]});}return spawn(_0x4812e9,_0x37de06,{..._0x1504b5,'shell':![]});}export function gracefulExit(_0x231d01=0x0){const _0x5bb3a9=a206_0x5e94a5;isWindows()?setTimeout(()=>process[_0x5bb3a9(0x11c)](_0x231d01),0x32):process[_0x5bb3a9(0x11c)](_0x231d01);}export function findExecutable(_0x1e6466,_0xd3c771=0x1388){return new Promise(_0x3b2365=>{const _0x3c75d6=a206_0x82d2,_0x4ad441=isWindows()?_0x3c75d6(0x12d):'which';let _0x399e35=![];const _0x44ea61=crossSpawn(_0x4ad441,[_0x1e6466],{'stdio':'pipe','shell':isWindows()}),_0x5021e4=setTimeout(()=>{const _0x24d7f5=_0x3c75d6;!_0x399e35&&(_0x399e35=!![],_0x44ea61[_0x24d7f5(0x126)](),_0x3b2365(null));},_0xd3c771);let _0x3130be='';_0x44ea61[_0x3c75d6(0x114)]?.['on'](_0x3c75d6(0x103),_0x43c190=>{_0x3130be+=_0x43c190['toString']();}),_0x44ea61[_0x3c75d6(0x133)]?.['on']('data',()=>{}),_0x44ea61['on'](_0x3c75d6(0x11c),_0x354284=>{const _0xf123fb=_0x3c75d6;if(_0x399e35)return;_0x399e35=!![],clearTimeout(_0x5021e4);if(_0x354284===0x0&&_0x3130be['trim']()){const _0x3ed5e5=_0x3130be[_0xf123fb(0x124)]()[_0xf123fb(0x121)](/\r?\n/)[0x0];_0x3b2365(_0x3ed5e5);}else _0x3b2365(null);}),_0x44ea61['on'](_0x3c75d6(0x116),()=>{if(_0x399e35)return;_0x399e35=!![],clearTimeout(_0x5021e4),_0x3b2365(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c7afa,_0x59e067){const _0x1f1ac8=a207_0x2717,_0x2b23bc=_0x5c7afa();while(!![]){try{const _0x40a349=parseInt(_0x1f1ac8(0x13d))/0x1+-parseInt(_0x1f1ac8(0x138))/0x2+parseInt(_0x1f1ac8(0x134))/0x3+-parseInt(_0x1f1ac8(0x141))/0x4*(-parseInt(_0x1f1ac8(0x13c))/0x5)+parseInt(_0x1f1ac8(0x142))/0x6*(-parseInt(_0x1f1ac8(0x13b))/0x7)+parseInt(_0x1f1ac8(0x136))/0x8+-parseInt(_0x1f1ac8(0x13e))/0x9;if(_0x40a349===_0x59e067)break;else _0x2b23bc['push'](_0x2b23bc['shift']());}catch(_0x1986fc){_0x2b23bc['push'](_0x2b23bc['shift']());}}}(a207_0x11b0,0xa2e22));import*as a207_0x50acd7 from'readline';function a207_0x11b0(){const _0x27494b=['7874728gERCUa','isTTY','1230292RdwhMp','write','question','969073ZlGKLx','445fNFiYk','1122444fQIskQ','10603251VfiXEL','data','stderr','26936voFhqA','54NVhVtp','toLowerCase','setEncoding','stdin','\x20[y/N]\x20','close','setRawMode','createInterface','pause','3000885dKnhez','stdout'];a207_0x11b0=function(){return _0x27494b;};return a207_0x11b0();}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x331beb=a207_0x2717;return process[_0x331beb(0x12e)]['isTTY']===!![];}export async function confirm(_0x138a0d){const _0x3e003c=a207_0x2717,_0x12690c=a207_0x50acd7[_0x3e003c(0x132)]({'input':process[_0x3e003c(0x12e)],'output':process[_0x3e003c(0x135)]});return new Promise(_0x3b53e0=>{const _0x2d7bcf=_0x3e003c;_0x12690c[_0x2d7bcf(0x13a)](_0x138a0d+'\x20(y/N):\x20',_0x155ba7=>{const _0x4dd675=_0x2d7bcf;_0x12690c[_0x4dd675(0x130)](),_0x3b53e0(_0x155ba7[_0x4dd675(0x12c)]()==='y'||_0x155ba7[_0x4dd675(0x12c)]()==='yes');});});}function a207_0x2717(_0x2d6419,_0xcd3880){_0x2d6419=_0x2d6419-0x12c;const _0x11b0f8=a207_0x11b0();let _0x2717e1=_0x11b0f8[_0x2d6419];return _0x2717e1;}export async function confirmKey(_0xddff62){const _0x5ea676=a207_0x2717;if(!process[_0x5ea676(0x12e)][_0x5ea676(0x137)])return![];return process[_0x5ea676(0x140)][_0x5ea676(0x139)](_0xddff62+_0x5ea676(0x12f)),new Promise(_0x75cda9=>{const _0x5b9376=_0x5ea676,_0x1cee05=process['stdin'];_0x1cee05[_0x5b9376(0x131)](!![]),_0x1cee05['resume'](),_0x1cee05[_0x5b9376(0x12d)]('utf8');const _0x5cccce=_0x1a1e50=>{const _0x451ec8=_0x5b9376;_0x1cee05[_0x451ec8(0x131)](![]),_0x1cee05[_0x451ec8(0x133)](),_0x1cee05['removeListener'](_0x451ec8(0x13f),_0x5cccce);if(_0x1a1e50==='\x1b'){process[_0x451ec8(0x140)][_0x451ec8(0x139)]('\x0a'),_0x75cda9(![]);return;}_0x1a1e50==='\x03'&&(process[_0x451ec8(0x140)][_0x451ec8(0x139)]('\x0a'),gracefulExit(0x82));if(_0x1a1e50['toLowerCase']()==='y'){process[_0x451ec8(0x140)][_0x451ec8(0x139)]('y\x0a'),_0x75cda9(!![]);return;}process[_0x451ec8(0x140)][_0x451ec8(0x139)]('\x0a'),_0x75cda9(![]);};_0x1cee05['on']('data',_0x5cccce);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b580c,_0x196bb6){const _0x1a7038=a208_0x3d32,_0x5b8a5e=_0x5b580c();while(!![]){try{const _0x29a182=parseInt(_0x1a7038(0x1d2))/0x1+parseInt(_0x1a7038(0x1de))/0x2*(-parseInt(_0x1a7038(0x1d6))/0x3)+parseInt(_0x1a7038(0x1ed))/0x4*(-parseInt(_0x1a7038(0x1df))/0x5)+parseInt(_0x1a7038(0x1e1))/0x6+parseInt(_0x1a7038(0x1e6))/0x7*(-parseInt(_0x1a7038(0x1e7))/0x8)+parseInt(_0x1a7038(0x1ee))/0x9*(parseInt(_0x1a7038(0x1e0))/0xa)+parseInt(_0x1a7038(0x1da))/0xb*(parseInt(_0x1a7038(0x1d8))/0xc);if(_0x29a182===_0x196bb6)break;else _0x5b8a5e['push'](_0x5b8a5e['shift']());}catch(_0x57a741){_0x5b8a5e['push'](_0x5b8a5e['shift']());}}}(a208_0x4500,0x6391d));import a208_0x27de4a from'ora';function a208_0x3d32(_0x3abac3,_0xe91f63){_0x3abac3=_0x3abac3-0x1d2;const _0x4500e1=a208_0x4500();let _0x3d3242=_0x4500e1[_0x3abac3];return _0x3d3242;}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x2512a5,_0x2d6110={}){const _0x2a2349=a208_0x3d32,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x2d6110;return a208_0x27de4a({'text':_0x2512a5,'color':_0x2a2349(0x1ea),'stream':process['stderr'],'isEnabled':forceEnabled||process[_0x2a2349(0x1d4)]['isTTY']&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}function a208_0x4500(){const _0x2a3ce7=['4tpITlF','41695RpmeLe','36230xIICQR','1711806oEnaAd','floor','extra','intervalFactory','replace','14rvqWyf','1014680PtjuVc','trim','Processing','cyan','start','now','332IYcLfr','198hMlkxE','isSpinning','722650jzUBPB','jobId','stderr','...','214191jYoNGo','\x20[Job\x20ID:\x20','14556gnDXyo','toFixed','3707SZbwNr','stop','clock','phase'];a208_0x4500=function(){return _0x2a3ce7;};return a208_0x4500();}export async function withSpinner(_0x4e7116,_0x183a19,_0x3ddf30={}){const _0x236b11=a208_0x3d32,_0x41d9b1=_0x3ddf30[_0x236b11(0x1dc)]??(()=>Date['now']()),_0xa89cd3=createCommandSpinner(_0x4e7116,_0x3ddf30);_0xa89cd3[_0x236b11(0x1eb)]();const _0x4ec3c9=_0x41d9b1();try{const _0xecbf9c=await _0x183a19(),_0x3229a9=_0x41d9b1()-_0x4ec3c9;return _0xa89cd3[_0x236b11(0x1db)](),{'data':_0xecbf9c,'elapsedMs':_0x3229a9};}catch(_0xf88266){_0xa89cd3[_0x236b11(0x1db)]();throw _0xf88266;}}export async function withProgressSpinner(_0x28a7d3,_0x432e8c,_0x400aa1={}){const _0x240da7=a208_0x3d32,_0x2cea5f=_0x400aa1[_0x240da7(0x1dc)]??(()=>Date[_0x240da7(0x1ec)]()),_0x55bb02=_0x400aa1[_0x240da7(0x1e4)]??setInterval,_0x4523bf=createCommandSpinner(_0x28a7d3,_0x400aa1);_0x4523bf[_0x240da7(0x1eb)]();const _0x42defd=_0x2cea5f(),_0x2d65b4=_0x28a7d3[_0x240da7(0x1e5)](_0x240da7(0x1d5),'')[_0x240da7(0x1e8)]()||_0x240da7(0x1e9),_0x3177ab={};let _0x3fbf69=_0x28a7d3;const _0x4d0881=()=>{const _0x25480e=_0x240da7;if(!_0x4523bf[_0x25480e(0x1ef)])return;const _0x4fe5d0=_0x2cea5f()-_0x42defd,_0x53e801=formatElapsed(_0x4fe5d0),_0x22dba8=_0x3177ab[_0x25480e(0x1dd)]?.[_0x25480e(0x1e8)]()||_0x2d65b4,_0x3efaf8=_0x3177ab[_0x25480e(0x1d3)]?_0x25480e(0x1d7)+_0x3177ab[_0x25480e(0x1d3)]+']':'',_0x27bb7a=_0x3177ab[_0x25480e(0x1e3)]?'\x20'+_0x3177ab[_0x25480e(0x1e3)]:'',_0x582ccd=_0x22dba8+'\x20'+_0x53e801+_0x27bb7a+_0x3efaf8;_0x582ccd!==_0x3fbf69&&_0x582ccd['trim']()&&(_0x4523bf['text']=_0x582ccd,_0x3fbf69=_0x582ccd);},_0x1094a5=_0x55bb02(()=>{_0x4d0881();},0x3e8),_0x5717c3={'setPhase':_0x50ad87=>{const _0x2df89c=_0x240da7;_0x3177ab[_0x2df89c(0x1dd)]=_0x50ad87;const _0x368ab1=_0x50ad87?.[_0x2df89c(0x1e8)]()||_0x2d65b4,_0x43be33=_0x2cea5f()-_0x42defd,_0x3e00b1=formatElapsed(_0x43be33),_0x4b2561=_0x3177ab['jobId']?'\x20[Job\x20ID:\x20'+_0x3177ab[_0x2df89c(0x1d3)]+']':'',_0xeccb52=_0x3177ab[_0x2df89c(0x1e3)]?'\x20'+_0x3177ab[_0x2df89c(0x1e3)]:'',_0x1444f2=_0x368ab1+'\x20'+_0x3e00b1+_0xeccb52+_0x4b2561;_0x4523bf[_0x2df89c(0x1ef)]&&_0x1444f2[_0x2df89c(0x1e8)]()&&(_0x4523bf['text']=_0x1444f2,_0x3fbf69=_0x1444f2);},'setJobId':_0x42b0bf=>{const _0xb39579=_0x240da7;_0x3177ab[_0xb39579(0x1d3)]=_0x42b0bf,_0x4d0881();},'setExtra':_0x1e5f32=>{const _0x4ee70d=_0x240da7;_0x3177ab[_0x4ee70d(0x1e3)]=_0x1e5f32,_0x4d0881();}};_0x4d0881();try{const _0x5842e5=await _0x432e8c(_0x5717c3),_0x3312c1=_0x2cea5f()-_0x42defd;return{'data':_0x5842e5,'elapsedMs':_0x3312c1};}finally{clearInterval(_0x1094a5),_0x4523bf[_0x240da7(0x1db)]();}}export function formatElapsed(_0x40f851){const _0x14ca2f=a208_0x3d32,_0x65229a=Math[_0x14ca2f(0x1e2)](_0x40f851/0x3e8);if(_0x65229a<0x3c)return(_0x40f851/0x3e8)[_0x14ca2f(0x1d9)](0x1)+'s';const _0x408d53=Math[_0x14ca2f(0x1e2)](_0x65229a/0x3c),_0x3ce9da=_0x65229a%0x3c;if(_0x408d53<0x3c)return _0x408d53+'m\x20'+_0x3ce9da+'s';const _0x6a1a0f=Math[_0x14ca2f(0x1e2)](_0x408d53/0x3c),_0x264a6a=_0x408d53%0x3c;return _0x6a1a0f+'h\x20'+_0x264a6a+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ae42d,_0x2841b3){const _0x1b631e=a209_0xcd4a,_0x279e12=_0x1ae42d();while(!![]){try{const _0x1bf92d=parseInt(_0x1b631e(0x1d1))/0x1+-parseInt(_0x1b631e(0x1e2))/0x2+parseInt(_0x1b631e(0x1d8))/0x3*(-parseInt(_0x1b631e(0x1d5))/0x4)+-parseInt(_0x1b631e(0x1e1))/0x5*(parseInt(_0x1b631e(0x1e5))/0x6)+-parseInt(_0x1b631e(0x1cf))/0x7+parseInt(_0x1b631e(0x1db))/0x8+parseInt(_0x1b631e(0x1d4))/0x9;if(_0x1bf92d===_0x2841b3)break;else _0x279e12['push'](_0x279e12['shift']());}catch(_0x288e0a){_0x279e12['push'](_0x279e12['shift']());}}}(a209_0x6af6,0x59d1a));function a209_0x6af6(){const _0x30308f=['2347904mCCizv','debug','indexOf','releaseLock','getReader','trim','20bDGCgt','50388VtFCuV','data','split','120786vytlRk','parse','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','slice','4624431XiXHgB','startsWith','510631jlYsGj','read','[LLM\x20API\x20SSE]\x20','6828345FAVOFO','9796NlDyFE','event','decode','525vSWFUM','Response\x20body\x20is\x20null','body'];a209_0x6af6=function(){return _0x30308f;};return a209_0x6af6();}export async function*parseSSEStream(_0x1ea5bf,_0x177c7a){const _0x2cdb4c=a209_0xcd4a;if(!_0x1ea5bf[_0x2cdb4c(0x1da)])throw new Error(_0x2cdb4c(0x1d9));const _0x2c02ba=_0x1ea5bf[_0x2cdb4c(0x1da)][_0x2cdb4c(0x1df)](),_0x7c3341=new TextDecoder();let _0xd9166f='',_0x9fbb72={};try{while(!![]){const {done:_0x1b02e6,value:_0x2a73e1}=await _0x2c02ba[_0x2cdb4c(0x1d2)]();if(_0x1b02e6){if(_0x9fbb72[_0x2cdb4c(0x1e3)]){_0x177c7a?.[_0x2cdb4c(0x1dc)](_0x2cdb4c(0x1d3)+_0x9fbb72[_0x2cdb4c(0x1e3)]);const _0x5ae679=parseSSEData(_0x9fbb72[_0x2cdb4c(0x1e3)]);yield _0x5ae679;}break;}_0xd9166f+=_0x7c3341[_0x2cdb4c(0x1d7)](_0x2a73e1,{'stream':!![]});const _0x1a0376=_0xd9166f[_0x2cdb4c(0x1e4)]('\x0a');_0xd9166f=_0x1a0376['pop']()||'';for(const _0x5bebcd of _0x1a0376){if(_0x5bebcd[_0x2cdb4c(0x1e0)]()===''){if(_0x9fbb72[_0x2cdb4c(0x1e3)]){_0x177c7a?.[_0x2cdb4c(0x1dc)](_0x2cdb4c(0x1d3)+_0x9fbb72[_0x2cdb4c(0x1e3)]);const _0x381340=parseSSEData(_0x9fbb72[_0x2cdb4c(0x1e3)]);yield _0x381340,_0x9fbb72={};}continue;}if(_0x5bebcd[_0x2cdb4c(0x1d0)](':'))continue;const _0x4bd881=_0x5bebcd[_0x2cdb4c(0x1dd)](':');if(_0x4bd881===-0x1)continue;const _0x466809=_0x5bebcd[_0x2cdb4c(0x1e8)](0x0,_0x4bd881);let _0x33915c=_0x5bebcd[_0x2cdb4c(0x1e8)](_0x4bd881+0x1);_0x33915c[_0x2cdb4c(0x1d0)]('\x20')&&(_0x33915c=_0x33915c['slice'](0x1));switch(_0x466809){case _0x2cdb4c(0x1d6):_0x9fbb72[_0x2cdb4c(0x1d6)]=_0x33915c;break;case'data':_0x9fbb72[_0x2cdb4c(0x1e3)]=_0x9fbb72[_0x2cdb4c(0x1e3)]?_0x9fbb72[_0x2cdb4c(0x1e3)]+'\x0a'+_0x33915c:_0x33915c;break;case'id':_0x9fbb72['id']=_0x33915c;break;}}}}finally{_0x2c02ba[_0x2cdb4c(0x1de)]();}}function a209_0xcd4a(_0x27b8f8,_0x158c67){_0x27b8f8=_0x27b8f8-0x1cf;const _0x6af6e1=a209_0x6af6();let _0xcd4abb=_0x6af6e1[_0x27b8f8];return _0xcd4abb;}function parseSSEData(_0x43935d){const _0x3be358=a209_0xcd4a;try{return JSON[_0x3be358(0x1e6)](_0x43935d);}catch(_0x1da8ac){throw new Error(_0x3be358(0x1e7)+_0x43935d,{'cause':_0x1da8ac});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a210_0x52bd(){const _0x3791ce=['25232sAWPVU','87PvDgKk','553910eqGGAY','slice','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','padStart','122172QPhCWI','length','replace','2299424emVwHX','toString','toLowerCase','trim','48rqBHvp','1276338YNpSxc','substring','1112299UsPAim','Cannot\x20escape\x20empty\x20string\x20literal','\x5c$&','9033615BFdpvz','random','repeat','unknown'];a210_0x52bd=function(){return _0x3791ce;};return a210_0x52bd();}(function(_0x33e27a,_0x4036e2){const _0xf05878=a210_0x50ec,_0x2805e9=_0x33e27a();while(!![]){try{const _0x387af0=parseInt(_0xf05878(0x111))/0x1+parseInt(_0xf05878(0x118))/0x2*(parseInt(_0xf05878(0x119))/0x3)+-parseInt(_0xf05878(0x10a))/0x4+-parseInt(_0xf05878(0x103))/0x5+-parseInt(_0xf05878(0x107))/0x6+-parseInt(_0xf05878(0x10f))/0x7*(-parseInt(_0xf05878(0x10e))/0x8)+-parseInt(_0xf05878(0x114))/0x9;if(_0x387af0===_0x4036e2)break;else _0x2805e9['push'](_0x2805e9['shift']());}catch(_0x4e21b8){_0x2805e9['push'](_0x2805e9['shift']());}}}(a210_0x52bd,0xd28e0));import a210_0x4cb496 from'string-width';export function stringWidth(_0x3dc91d){return a210_0x4cb496(_0x3dc91d);}export function padEnd(_0x56c9d9,_0x5548d6){const _0x44e9e0=a210_0x50ec,_0x17f6d0=stringWidth(_0x56c9d9);if(_0x17f6d0>=_0x5548d6)return _0x56c9d9;return _0x56c9d9+'\x20'[_0x44e9e0(0x116)](_0x5548d6-_0x17f6d0);}export function padStart(_0x4f6f19,_0x48b7ef){const _0x449090=a210_0x50ec,_0x5753eb=stringWidth(_0x4f6f19);if(_0x5753eb>=_0x48b7ef)return _0x4f6f19;return'\x20'[_0x449090(0x116)](_0x48b7ef-_0x5753eb)+_0x4f6f19;}export function centerAlign(_0x5a5261,_0x46bf49){const _0x2ede8f=a210_0x50ec,_0x29b316=stringWidth(_0x5a5261);if(_0x29b316>_0x46bf49){if(_0x46bf49<=0x1)return'…'[_0x2ede8f(0x110)](0x0,_0x46bf49);let _0x3fc244=_0x5a5261;while(stringWidth(_0x3fc244+'…')>_0x46bf49){_0x3fc244=_0x3fc244[_0x2ede8f(0x104)](0x0,-0x1);}return _0x3fc244+'…';}if(_0x29b316===_0x46bf49)return _0x5a5261;const _0x26f881=_0x46bf49-_0x29b316,_0x3cbfd8=Math['floor'](_0x26f881/0x2),_0x60bbba=_0x26f881-_0x3cbfd8;return'\x20'['repeat'](_0x3cbfd8)+_0x5a5261+'\x20'[_0x2ede8f(0x116)](_0x60bbba);}export function escapeStringLiteral(_0x4deccc){const _0x2887cc=a210_0x50ec;if(!_0x4deccc||_0x4deccc['trim']()['length']===0x0)throw new Error(_0x2887cc(0x112));const _0x3ac523=_0x4deccc[_0x2887cc(0x109)](/'/g,'\x27\x27');return'\x27'+_0x3ac523+'\x27';}export function globToLike(_0x313ddc){const _0x593e98=a210_0x50ec;let _0x4f3cc7=_0x313ddc[_0x593e98(0x109)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x593e98(0x109)](/_/g,'\x5c_');return _0x4f3cc7=_0x4f3cc7[_0x593e98(0x109)](/\*/g,'%')[_0x593e98(0x109)](/\?/g,'_'),_0x4f3cc7;}function a210_0x50ec(_0x43ba22,_0x2362c7){_0x43ba22=_0x43ba22-0x103;const _0x52bd06=a210_0x52bd();let _0x50ec12=_0x52bd06[_0x43ba22];return _0x50ec12;}export function buildLikePattern(_0x4c737b){const _0x784c46=a210_0x50ec;if(!_0x4c737b||_0x4c737b[_0x784c46(0x10d)]()[_0x784c46(0x108)]===0x0)throw new Error(_0x784c46(0x105));const _0x46f15b=globToLike(_0x4c737b),_0xa3f4d0=_0x46f15b[_0x784c46(0x109)](/'/g,'\x27\x27');return'\x27'+_0xa3f4d0+'\x27';}export function matchGlobPattern(_0x489b2c,_0x2d9bc3){const _0x861adf=a210_0x50ec,_0x45da22=_0x2d9bc3[_0x861adf(0x109)](/[.+^${}()|[\]\\]/g,_0x861adf(0x113))[_0x861adf(0x109)](/\*/g,'.*')[_0x861adf(0x109)](/\?/g,'.'),_0x5a12bb=new RegExp('^'+_0x45da22+'$');return _0x5a12bb['test'](_0x489b2c);}export function getSanitizedUsername(){const _0x4f1e66=a210_0x50ec,_0x171827=process.env.USER||process.env.USERNAME||_0x4f1e66(0x117);return _0x171827[_0x4f1e66(0x109)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x1db26b=a210_0x50ec,_0x114a0f=Math['floor'](Math[_0x1db26b(0x115)]()*0xfffff);return _0x114a0f[_0x1db26b(0x10b)](0x10)[_0x1db26b(0x106)](0x5,'0');}export function sanitizeFileName(_0x41482f){const _0x4a5507=a210_0x50ec;return _0x41482f[_0x4a5507(0x10c)]()[_0x4a5507(0x109)](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0x4a5507(0x109)](/-+/g,'-')[_0x4a5507(0x109)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ed958,_0x3d18a7){const _0x40820d=a211_0x4d5c,_0xd5f5c5=_0x2ed958();while(!![]){try{const _0x1befd0=-parseInt(_0x40820d(0x169))/0x1+-parseInt(_0x40820d(0x15c))/0x2*(parseInt(_0x40820d(0x163))/0x3)+parseInt(_0x40820d(0x15b))/0x4+-parseInt(_0x40820d(0x15f))/0x5+parseInt(_0x40820d(0x166))/0x6*(parseInt(_0x40820d(0x15e))/0x7)+-parseInt(_0x40820d(0x159))/0x8*(-parseInt(_0x40820d(0x165))/0x9)+parseInt(_0x40820d(0x161))/0xa*(parseInt(_0x40820d(0x155))/0xb);if(_0x1befd0===_0x3d18a7)break;else _0xd5f5c5['push'](_0xd5f5c5['shift']());}catch(_0x542b62){_0xd5f5c5['push'](_0xd5f5c5['shift']());}}}(a211_0x4581,0x3523f));function a211_0x4581(){const _0x5a133c=['1506596mZAhzL','573966SRQwYM','join','2864855CGPJxN','1911790ZREoOC','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','22480qIfAjO','trim','3kWYBZD','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','794493JpIhud','6ACMIqe','database','catalog','257552nRjdRK','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','length','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','push','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','split','891FrGSNx','includes','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','16yhZihP','table'];a211_0x4581=function(){return _0x5a133c;};return a211_0x4581();}function a211_0x4d5c(_0x51370d,_0x1eeee1){_0x51370d=_0x51370d-0x14f;const _0x458152=a211_0x4581();let _0x4d5cd3=_0x458152[_0x51370d];return _0x4d5cd3;}function hasWildcard(_0x3262c6){const _0x47aa44=a211_0x4d5c;return _0x3262c6[_0x47aa44(0x156)]('*')||_0x3262c6[_0x47aa44(0x156)]('?');}export function parseTableReference(_0x110824){const _0x2b5f6f=a211_0x4d5c;if(!_0x110824||_0x110824[_0x2b5f6f(0x162)]()['length']===0x0)throw new Error(_0x2b5f6f(0x157));const _0x2819ce=_0x110824[_0x2b5f6f(0x162)](),_0xe56e13={'original':_0x2819ce},_0x5be711=_0x2819ce[_0x2b5f6f(0x154)]('.');if(_0x5be711[_0x2b5f6f(0x150)]===0x1){const _0x1f43e3=_0x5be711[0x0];if(!_0x1f43e3)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0xe56e13[_0x2b5f6f(0x15a)]=_0x1f43e3;}else{if(_0x5be711[_0x2b5f6f(0x150)]===0x2){const [_0x3f3429,_0x529d04]=_0x5be711;if(!_0x3f3429)throw new Error(_0x2b5f6f(0x151));if(!_0x529d04)throw new Error(_0x2b5f6f(0x158));_0xe56e13[_0x2b5f6f(0x167)]=_0x3f3429,_0xe56e13[_0x2b5f6f(0x15a)]=_0x529d04;}else{if(_0x5be711[_0x2b5f6f(0x150)]===0x3){const [_0x3bc701,_0x5f2d92,_0x566369]=_0x5be711;if(!_0x3bc701||!_0x5f2d92||!_0x566369)throw new Error(_0x2b5f6f(0x160));_0xe56e13[_0x2b5f6f(0x168)]=_0x3bc701,_0xe56e13[_0x2b5f6f(0x167)]=_0x5f2d92,_0xe56e13[_0x2b5f6f(0x15a)]=_0x566369;}else throw new Error(_0x2b5f6f(0x164));}}return _0xe56e13;}export function formatTableReference(_0x144fe5){const _0x426e8e=a211_0x4d5c,_0x4c88b7=[];return _0x144fe5[_0x426e8e(0x168)]&&_0x4c88b7[_0x426e8e(0x152)](_0x144fe5[_0x426e8e(0x168)]),_0x144fe5[_0x426e8e(0x167)]&&_0x4c88b7['push'](_0x144fe5[_0x426e8e(0x167)]),_0x144fe5[_0x426e8e(0x15a)]&&_0x4c88b7[_0x426e8e(0x152)](_0x144fe5[_0x426e8e(0x15a)]),_0x4c88b7[_0x426e8e(0x15d)]('.');}export function validateTableListReference(_0x52f3bf){return undefined;}export function validateTableDescribeReference(_0x58fd25){const _0x4ce7bb=a211_0x4d5c;if(!_0x58fd25[_0x4ce7bb(0x15a)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x58fd25[_0x4ce7bb(0x167)]&&hasWildcard(_0x58fd25[_0x4ce7bb(0x167)]))return _0x4ce7bb(0x153);if(hasWildcard(_0x58fd25[_0x4ce7bb(0x15a)]))return _0x4ce7bb(0x14f);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a212_0x5390c1=a212_0x34af;(function(_0x52eb6f,_0x280cb8){const _0x50961a=a212_0x34af,_0x6b1549=_0x52eb6f();while(!![]){try{const _0x5cb599=-parseInt(_0x50961a(0x94))/0x1*(parseInt(_0x50961a(0x8e))/0x2)+-parseInt(_0x50961a(0x9d))/0x3+parseInt(_0x50961a(0x8a))/0x4+parseInt(_0x50961a(0x83))/0x5+-parseInt(_0x50961a(0x95))/0x6*(parseInt(_0x50961a(0x90))/0x7)+-parseInt(_0x50961a(0x99))/0x8*(parseInt(_0x50961a(0x92))/0x9)+parseInt(_0x50961a(0x9c))/0xa*(parseInt(_0x50961a(0x82))/0xb);if(_0x5cb599===_0x280cb8)break;else _0x6b1549['push'](_0x6b1549['shift']());}catch(_0x29acf9){_0x6b1549['push'](_0x6b1549['shift']());}}}(a212_0x4f23,0xaeb03));function a212_0x4f23(){const _0x1a6343=['logLevel','2148208rTDjcp','init','push','consoleHandler','8390bErKJB','fileHandler','126665eAiReQ','error','1450431qSDLRa','isInitialized','337bfiYjZ','258oyGfgg','shutdown','INFO','logFileName','24cduYVE','warn','debug','2135130vosStu','2185809hQwttp','addHandler','Session\x20ended','tdx','fileOnly','logs','121QdZcje','6168540tVdLVa','info','logDir','trace','close','logger'];a212_0x4f23=function(){return _0x1a6343;};return a212_0x4f23();}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 a212_0x34af(_0x546d5e,_0x36d9fc){_0x546d5e=_0x546d5e-0x7f;const _0x4f2396=a212_0x4f23();let _0x34afd7=_0x4f2396[_0x546d5e];return _0x34afd7;}export class TDXLogger{[a212_0x5390c1(0x89)];[a212_0x5390c1(0x80)];[a212_0x5390c1(0x85)];[a212_0x5390c1(0x98)];[a212_0x5390c1(0x88)];[a212_0x5390c1(0x8f)]=null;[a212_0x5390c1(0x8d)]=null;constructor(_0x8d66a9=LogLevel[a212_0x5390c1(0x97)],_0x4aeb2e=![],_0x249fd2,_0x3a842d='tdx.log'){const _0xb74d80=a212_0x5390c1;this['logLevel']=_0x8d66a9,this[_0xb74d80(0x80)]=_0x4aeb2e,this[_0xb74d80(0x85)]=_0x249fd2||join(getGlobalCacheDir(),_0xb74d80(0x81)),this[_0xb74d80(0x98)]=_0x3a842d,this['logger']=Logger['of'](_0xb74d80(0x7f));}async[a212_0x5390c1(0x8b)](){const _0x485f01=a212_0x5390c1,_0x4ba928=join(this[_0x485f01(0x85)],this['logFileName']);if(Logger[_0x485f01(0x93)]()){!this[_0x485f01(0x80)]&&(this[_0x485f01(0x8d)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),Logger[_0x485f01(0x9e)](this[_0x485f01(0x8d)]));return;}this[_0x485f01(0x8f)]=new FileHandler({'filePath':_0x4ba928});const _0x146802=[this[_0x485f01(0x8f)]];!this['fileOnly']&&(this[_0x485f01(0x8d)]=new ConsoleHandler({'minLevel':LogLevel[_0x485f01(0x97)],'colors':!![]}),_0x146802[_0x485f01(0x8c)](this['consoleHandler'])),await Logger['init']({'defaultLevel':this[_0x485f01(0x89)],'handlers':_0x146802,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a212_0x5390c1(0x9b)](..._0x7c7bf7){const _0x2a37d0=a212_0x5390c1;this[_0x2a37d0(0x88)][_0x2a37d0(0x9b)](..._0x7c7bf7);}[a212_0x5390c1(0x86)](..._0x27ee1e){const _0x596e4a=a212_0x5390c1;this[_0x596e4a(0x88)][_0x596e4a(0x86)](..._0x27ee1e);}[a212_0x5390c1(0x84)](..._0x3c4d14){const _0x2bceda=a212_0x5390c1;this[_0x2bceda(0x88)][_0x2bceda(0x84)](..._0x3c4d14);}[a212_0x5390c1(0x9a)](..._0xd665a){const _0xc7dca3=a212_0x5390c1;this[_0xc7dca3(0x88)]['warn'](..._0xd665a);}[a212_0x5390c1(0x91)](..._0x2c8e5b){const _0x4b8e3f=a212_0x5390c1;this[_0x4b8e3f(0x88)][_0x4b8e3f(0x91)](..._0x2c8e5b);}async[a212_0x5390c1(0x87)](){const _0x39a8a3=a212_0x5390c1;this[_0x39a8a3(0x88)][_0x39a8a3(0x84)](_0x39a8a3(0x9f)),await Logger[_0x39a8a3(0x96)]();}['getLogPath'](){const _0x589c11=a212_0x5390c1;return join(this['logDir'],this[_0x589c11(0x98)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a213_0xce41e0=a213_0x4c83;(function(_0x48754d,_0x372185){const _0x1490cc=a213_0x4c83,_0x49f881=_0x48754d();while(!![]){try{const _0x14af68=parseInt(_0x1490cc(0x207))/0x1+parseInt(_0x1490cc(0x1ee))/0x2*(-parseInt(_0x1490cc(0x1e1))/0x3)+-parseInt(_0x1490cc(0x1ec))/0x4+-parseInt(_0x1490cc(0x1ea))/0x5+parseInt(_0x1490cc(0x1e3))/0x6*(-parseInt(_0x1490cc(0x1fa))/0x7)+parseInt(_0x1490cc(0x201))/0x8+parseInt(_0x1490cc(0x1f8))/0x9;if(_0x14af68===_0x372185)break;else _0x49f881['push'](_0x49f881['shift']());}catch(_0x514d74){_0x49f881['push'](_0x49f881['shift']());}}}(a213_0x425e,0xc26da));import{get}from'https';import{gt,valid}from'semver';import a213_0x4a08fc from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a213_0xce41e0(0x209),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a213_0xce41e0(0x1e9),a213_0xce41e0(0x205)),nextVersionCache=createGlobalCache(a213_0xce41e0(0x1e8),a213_0xce41e0(0x1fe));function getCacheForChannel(_0x32db88){const _0xb9b890=a213_0xce41e0;return _0x32db88===_0xb9b890(0x1eb)?nextVersionCache:stableVersionCache;}function readCache(_0x2d16cd){const _0x3bd75f=a213_0xce41e0;return getCacheForChannel(_0x2d16cd)[_0x3bd75f(0x1f6)]()??null;}function writeCache(_0x3c9730,_0x5ebc34){const _0x1a0419=a213_0xce41e0;try{getCacheForChannel(_0x5ebc34)[_0x1a0419(0x1f3)]({'lastCheck':new Date()[_0x1a0419(0x1f7)](),'latestVersion':_0x3c9730});}catch{}}function isCacheValid(_0x368ea1){const _0x12aa30=a213_0xce41e0;if(!_0x368ea1)return![];const _0x314962=new Date(_0x368ea1[_0x12aa30(0x1ef)])[_0x12aa30(0x1fd)](),_0x1eed24=Date[_0x12aa30(0x1fb)]();return _0x1eed24-_0x314962<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x4184d2=a213_0xce41e0(0x206)){const _0x2fac90=a213_0xce41e0,_0xfe5b8a=_0x4184d2==='next'?_0x2fac90(0x1eb):_0x2fac90(0x1e5),_0x2fc318=NPM_REGISTRY_BASE+'/'+_0xfe5b8a;return new Promise((_0x5a4fca,_0x4c79c6)=>{const _0x35e744=_0x2fac90,_0x5dda6e=get(_0x2fc318,{'timeout':TIMEOUT_MS},_0x116f99=>{const _0x2772cb=a213_0x4c83;if(_0x116f99[_0x2772cb(0x20a)]!==0xc8){clearTimeout(_0xe04290),_0x4c79c6(new Error(_0x2772cb(0x1e7)+_0x116f99[_0x2772cb(0x20a)]));return;}let _0x8bf647='';_0x116f99['on']('data',_0x2156d1=>{_0x8bf647+=_0x2156d1;}),_0x116f99['on'](_0x2772cb(0x203),()=>{const _0x540c12=_0x2772cb;clearTimeout(_0xe04290);try{const _0x43e479=JSON[_0x540c12(0x1e6)](_0x8bf647);if(!valid(_0x43e479[_0x540c12(0x204)])){_0x4c79c6(new Error(_0x540c12(0x20b)));return;}_0x5a4fca(_0x43e479['version']);}catch(_0x288911){_0x4c79c6(_0x288911);}});})['on'](_0x35e744(0x1f2),_0x141e37=>{clearTimeout(_0xe04290),_0x4c79c6(_0x141e37);});_0x5dda6e['on'](_0x35e744(0x1e0),_0x5ef51e=>{const _0x528097=_0x35e744;_0x5ef51e[_0x528097(0x1f1)]();});const _0xe04290=setTimeout(()=>{_0x5dda6e['destroy'](),_0x4c79c6(new Error('Request\x20timeout'));},TIMEOUT_MS);_0xe04290[_0x35e744(0x1f1)]();});}function a213_0x4c83(_0x2bd5ec,_0x49344c){_0x2bd5ec=_0x2bd5ec-0x1e0;const _0x425e4b=a213_0x425e();let _0x4c8341=_0x425e4b[_0x2bd5ec];return _0x4c8341;}export async function checkForUpdate(_0x17cd90,_0xed5069='stable'){try{const _0x2dba1a=readCache(_0xed5069);if(isCacheValid(_0x2dba1a)){const _0x5c0fbb=gt(_0x2dba1a['latestVersion'],_0x17cd90);return{'updateAvailable':_0x5c0fbb,'currentVersion':_0x17cd90,'latestVersion':_0x2dba1a['latestVersion'],'channel':_0xed5069};}const _0x297dd9=await fetchLatestVersion(_0xed5069);writeCache(_0x297dd9,_0xed5069);const _0x5a2c7c=gt(_0x297dd9,_0x17cd90);return{'updateAvailable':_0x5a2c7c,'currentVersion':_0x17cd90,'latestVersion':_0x297dd9,'channel':_0xed5069};}catch{return null;}}function a213_0x425e(){const _0x45c28f=['now','Run:','getTime','utils/version-check-next','tdx\x20upgrade','channel','8120048VuiBsw','\x0aRun:\x20','end','version','utils/version-check','stable','1506050OzoneE','cyan','https://registry.npmjs.org/@treasuredata/tdx','statusCode','Invalid\x20version\x20format','socket','507rMBmjd','\x0aUpdate\x20available:\x20','2742BBhyMX','Update\x20available:','latest','parse','HTTP\x20','last_version_check_next','last_version_check','2265285ZBzrpF','next','578296RdOnjX','latestVersion','10634zMjHao','lastCheck','currentVersion','unref','error','write','stderr','green','read','toISOString','5622705OpFOiR','dim','13069RXYyAI'];a213_0x425e=function(){return _0x45c28f;};return a213_0x425e();}export function displayUpdateNotification(_0x2d925e){const _0x3798aa=a213_0xce41e0;if(!_0x2d925e['updateAvailable'])return;const _0x4626cb=_0x2d925e[_0x3798aa(0x200)]===_0x3798aa(0x1eb)?'tdx\x20upgrade\x20--next':_0x3798aa(0x1ff),_0x4cfdd5=process[_0x3798aa(0x1f4)]['isTTY']&&!process.env.NO_COLOR,_0x42d854=_0x4cfdd5?a213_0x4a08fc['gray']('→'):'→',_0x479a93=_0x4cfdd5?a213_0x4a08fc[_0x3798aa(0x1f9)](_0x2d925e[_0x3798aa(0x1f0)]):_0x2d925e[_0x3798aa(0x1f0)],_0x27c1ba=_0x4cfdd5?a213_0x4a08fc[_0x3798aa(0x1f5)](_0x2d925e[_0x3798aa(0x1ed)]):_0x2d925e[_0x3798aa(0x1ed)],_0x49baf6=_0x4cfdd5?a213_0x4a08fc[_0x3798aa(0x208)](_0x4626cb):_0x4626cb,_0x29fe2e=_0x4cfdd5?'\x0a'+a213_0x4a08fc['yellow'](_0x3798aa(0x1e4))+'\x20'+_0x479a93+'\x20'+_0x42d854+'\x20'+_0x27c1ba+'\x0a'+a213_0x4a08fc['dim'](_0x3798aa(0x1fc))+'\x20'+_0x49baf6+'\x0a':_0x3798aa(0x1e2)+_0x479a93+'\x20'+_0x42d854+'\x20'+_0x27c1ba+_0x3798aa(0x202)+_0x49baf6+'\x0a';process[_0x3798aa(0x1f4)][_0x3798aa(0x1f3)](_0x29fe2e);}
|