@treasuredata/tdx 2026.3.34 → 2026.3.36
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-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/policy-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/work-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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.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/policy.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/types/workspace.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/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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 a227_0x5d466b=a227_0x3395;(function(_0x3c10f8,_0xbc93e7){const _0x4613e9=a227_0x3395,_0x361dba=_0x3c10f8();while(!![]){try{const _0x249934=-parseInt(_0x4613e9(0x1d8))/0x1*(parseInt(_0x4613e9(0x1f6))/0x2)+parseInt(_0x4613e9(0x1d2))/0x3+parseInt(_0x4613e9(0x201))/0x4+parseInt(_0x4613e9(0x1cf))/0x5+parseInt(_0x4613e9(0x1e1))/0x6+parseInt(_0x4613e9(0x1de))/0x7+-parseInt(_0x4613e9(0x1e5))/0x8*(parseInt(_0x4613e9(0x1e8))/0x9);if(_0x249934===_0xbc93e7)break;else _0x361dba['push'](_0x361dba['shift']());}catch(_0x17512c){_0x361dba['push'](_0x361dba['shift']());}}}(a227_0x2dc6,0x9ce77));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a227_0x5d466b(0x1ee),a227_0x5d466b(0x1d4),'sh','fish',a227_0x5d466b(0x1e9),a227_0x5d466b(0x1ea),'csh',a227_0x5d466b(0x202),a227_0x5d466b(0x1d3),a227_0x5d466b(0x1e3),'nu',a227_0x5d466b(0x1e7),'elvish','xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a227_0x5d466b(0x1cb),a227_0x5d466b(0x206),a227_0x5d466b(0x1f0),a227_0x5d466b(0x1eb),a227_0x5d466b(0x1db)]);function getProcessInfoWindows(_0x181f9a){const _0x2b71bf=a227_0x5d466b;try{if(!Number['isInteger'](_0x181f9a)||_0x181f9a<=0x0)return null;const _0x7d2956=_0x2b71bf(0x204)+_0x181f9a+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x44c9d8=execSync(_0x2b71bf(0x1ef)+_0x7d2956+'\x22',{'encoding':_0x2b71bf(0x203),'windowsHide':!![],'stdio':[_0x2b71bf(0x1d1),_0x2b71bf(0x1d1),_0x2b71bf(0x1d1)]})[_0x2b71bf(0x205)]();if(!_0x44c9d8)return null;const [_0x4c58e8,..._0x1a62e6]=_0x44c9d8['split'](','),_0x526b3b=parseInt(_0x4c58e8,0xa),_0x5235a8=_0x1a62e6[_0x2b71bf(0x1dc)](',')[_0x2b71bf(0x205)]();if(isNaN(_0x526b3b)||!_0x5235a8)return null;return{'pid':_0x181f9a,'ppid':_0x526b3b,'comm':_0x5235a8[_0x2b71bf(0x1cd)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x1ef63c){const _0x1c4bfb=a227_0x5d466b;try{const _0x443bc8=0x400000;if(!Number['isInteger'](_0x1ef63c)||_0x1ef63c<=0x0||_0x1ef63c>_0x443bc8)return null;const _0x1c2362=execSync('ps\x20-p\x20'+_0x1ef63c+'\x20-o\x20ppid=,comm=',{'encoding':_0x1c4bfb(0x203),'stdio':_0x1c4bfb(0x1d1)})[_0x1c4bfb(0x205)](),[_0x41e01a,..._0x476bb9]=_0x1c2362['split'](/\s+/),_0x40ce1e=parseInt(_0x41e01a,0xa),_0x445e62=_0x476bb9[_0x1c4bfb(0x1dc)]('\x20');if(isNaN(_0x40ce1e))return null;return{'pid':_0x1ef63c,'ppid':_0x40ce1e,'comm':_0x445e62};}catch{return null;}}function getProcessInfo(_0xdf25be){const _0x4bfa10=a227_0x5d466b;if(process['platform']===_0x4bfa10(0x1d6))return getProcessInfoWindows(_0xdf25be);return getProcessInfoPosix(_0xdf25be);}function getBasename(_0x292ca4){const _0xa5b47c=a227_0x5d466b;return _0x292ca4[_0xa5b47c(0x1cd)](/^-/,'')[_0xa5b47c(0x1f4)]('/')['pop']()?.[_0xa5b47c(0x1fd)]()||'';}function isShell(_0x3d17ab){const _0xc1d707=a227_0x5d466b;return SHELL_NAMES[_0xc1d707(0x1f7)](getBasename(_0x3d17ab));}function isEphemeralShellSpawner(_0x15a4f2){const _0xdc674a=a227_0x5d466b;return EPHEMERAL_SHELL_SPAWNERS[_0xdc674a(0x1f7)](getBasename(_0x15a4f2));}let cachedShellPID;function findShellPID(){const _0x4d7121=a227_0x5d466b;if(process[_0x4d7121(0x1ed)]===undefined)return process['pid'];let _0x36f2cb=process[_0x4d7121(0x1ed)];const _0x42ca53=0xa;let _0x3975d1=0x0;while(_0x3975d1<_0x42ca53){const _0x5262ed=getProcessInfo(_0x36f2cb);if(!_0x5262ed)break;if(isShell(_0x5262ed[_0x4d7121(0x1fe)])){const _0x42bfda=getProcessInfo(_0x5262ed[_0x4d7121(0x1ed)]);if(_0x42bfda&&isEphemeralShellSpawner(_0x42bfda[_0x4d7121(0x1fe)])){_0x36f2cb=_0x5262ed[_0x4d7121(0x1ed)],_0x3975d1++;continue;}return _0x5262ed['pid'];}if(_0x5262ed[_0x4d7121(0x1ed)]===0x0||_0x5262ed['ppid']===0x1){if(isShell(_0x5262ed['comm']))return _0x5262ed[_0x4d7121(0x1f2)];break;}_0x36f2cb=_0x5262ed[_0x4d7121(0x1ed)],_0x3975d1++;}return process[_0x4d7121(0x1ed)]!==undefined?process[_0x4d7121(0x1ed)]:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x5c6c7d){const _0x227b7a=a227_0x5d466b;if(!Number[_0x227b7a(0x1cc)](_0x5c6c7d)||_0x5c6c7d<=0x0)return![];try{return process[_0x227b7a(0x1e0)](_0x5c6c7d,0x0),!![];}catch{return![];}}export function openBrowser(_0x1350b9){const _0x1ae130=a227_0x5d466b;let _0x2fb3a7;try{_0x2fb3a7=new URL(_0x1350b9);}catch{throw new Error(_0x1ae130(0x1f9)+_0x1350b9);}if(_0x2fb3a7[_0x1ae130(0x200)]!==_0x1ae130(0x1d5)&&_0x2fb3a7[_0x1ae130(0x200)]!==_0x1ae130(0x1d9))throw new Error(_0x1ae130(0x1ec)+_0x2fb3a7[_0x1ae130(0x200)]);const _0x27b8ad=_0x2fb3a7[_0x1ae130(0x1fa)],_0x148fc6=process[_0x1ae130(0x1d0)];if(_0x148fc6===_0x1ae130(0x1d6))spawn(_0x1ae130(0x1f3),['/c',_0x1ae130(0x1d7),'',_0x27b8ad],{'detached':!![],'stdio':_0x1ae130(0x1f8)})[_0x1ae130(0x1fb)]();else{const _0x200e0d=_0x148fc6===_0x1ae130(0x1dd)?_0x1ae130(0x1df):_0x1ae130(0x1e2);spawn(_0x200e0d,[_0x27b8ad],{'detached':!![],'stdio':_0x1ae130(0x1f8)})[_0x1ae130(0x1fb)]();}}export function isWindows(){const _0x221c20=a227_0x5d466b;return process[_0x221c20(0x1d0)]==='win32';}function a227_0x2dc6(){const _0x1d5df3=['ignore','Invalid\x20URL:\x20','href','unref','stderr','toLowerCase','comm','map','protocol','1386900FneNuj','dash','utf-8','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','trim','code','claude','isInteger','replace','error','6314325upiXyd','platform','pipe','309165vytsZy','pwsh','zsh','http:','win32','start','3283iYWORj','https:','stdout','treasure\x20studio','join','darwin','8783971aFyHVJ','open','kill','1766064SLKROF','xdg-open','powershell','exit','36496sPSFSg','test','ion','3114fKsdCQ','ksh','tcsh','electron','Unsupported\x20protocol:\x20','ppid','bash','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','cursor','data','pid','cmd.exe','split','which','634ZsYcfu','has'];a227_0x2dc6=function(){return _0x1d5df3;};return a227_0x2dc6();}export function getCrossSpawnOptions(_0x5f4554){return{..._0x5f4554??{},'shell':isWindows()};}function a227_0x3395(_0x42da17,_0x3dc08e){_0x42da17=_0x42da17-0x1cb;const _0x2dc607=a227_0x2dc6();let _0x3395b2=_0x2dc607[_0x42da17];return _0x3395b2;}export function escapeWindowsArg(_0x498300){const _0x513e98=a227_0x5d466b;if(!/[ \t"&|<>^%!`\r\n]/[_0x513e98(0x1e6)](_0x498300))return _0x498300;const _0x29010d=_0x498300[_0x513e98(0x1cd)](/"/g,'\x22\x22');return'\x22'+_0x29010d+'\x22';}export function crossSpawn(_0x3d4a41,_0x550b67,_0x3afa0a){const _0x2f41af=a227_0x5d466b;if(isWindows()){const _0x7b91f7=escapeWindowsArg(_0x3d4a41),_0x208336=_0x550b67[_0x2f41af(0x1ff)](escapeWindowsArg),_0xff019d=[_0x7b91f7,..._0x208336][_0x2f41af(0x1dc)]('\x20');return spawn(_0xff019d,[],{..._0x3afa0a,'shell':!![]});}return spawn(_0x3d4a41,_0x550b67,{..._0x3afa0a,'shell':![]});}export function gracefulExit(_0x13d626=0x0){const _0x51e58e=a227_0x5d466b;isWindows()?setTimeout(()=>process['exit'](_0x13d626),0x32):process[_0x51e58e(0x1e4)](_0x13d626);}export function findExecutable(_0x12ec19,_0xe22eaa=0x1388){return new Promise(_0x1b80dd=>{const _0x2ba2d2=a227_0x3395,_0x276b48=isWindows()?'where.exe':_0x2ba2d2(0x1f5);let _0x5618c3=![];const _0x17e988=crossSpawn(_0x276b48,[_0x12ec19],{'stdio':'pipe','shell':isWindows()}),_0x36828c=setTimeout(()=>{!_0x5618c3&&(_0x5618c3=!![],_0x17e988['kill'](),_0x1b80dd(null));},_0xe22eaa);let _0x46236a='';_0x17e988[_0x2ba2d2(0x1da)]?.['on'](_0x2ba2d2(0x1f1),_0x153f35=>{_0x46236a+=_0x153f35['toString']();}),_0x17e988[_0x2ba2d2(0x1fc)]?.['on']('data',()=>{}),_0x17e988['on'](_0x2ba2d2(0x1e4),_0x4a1966=>{const _0x50c818=_0x2ba2d2;if(_0x5618c3)return;_0x5618c3=!![],clearTimeout(_0x36828c);if(_0x4a1966===0x0&&_0x46236a[_0x50c818(0x205)]()){const _0x214f46=_0x46236a[_0x50c818(0x205)]()[_0x50c818(0x1f4)](/\r?\n/)[0x0];_0x1b80dd(_0x214f46);}else _0x1b80dd(null);}),_0x17e988['on'](_0x2ba2d2(0x1ce),()=>{if(_0x5618c3)return;_0x5618c3=!![],clearTimeout(_0x36828c),_0x1b80dd(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a228_0x2f9e(_0x38d43f,_0x12e7e7){_0x38d43f=_0x38d43f-0xd4;const _0xe7b3d=a228_0xe7b3();let _0x2f9e61=_0xe7b3d[_0x38d43f];return _0x2f9e61;}(function(_0x20de6e,_0x37fd7d){const _0x1c4d38=a228_0x2f9e,_0x32f18a=_0x20de6e();while(!![]){try{const _0x4be68c=parseInt(_0x1c4d38(0xd8))/0x1+parseInt(_0x1c4d38(0xdb))/0x2*(-parseInt(_0x1c4d38(0xec))/0x3)+-parseInt(_0x1c4d38(0xe4))/0x4*(-parseInt(_0x1c4d38(0xd9))/0x5)+-parseInt(_0x1c4d38(0xe2))/0x6+parseInt(_0x1c4d38(0xe7))/0x7+-parseInt(_0x1c4d38(0xd4))/0x8+parseInt(_0x1c4d38(0xe8))/0x9*(parseInt(_0x1c4d38(0xe9))/0xa);if(_0x4be68c===_0x37fd7d)break;else _0x32f18a['push'](_0x32f18a['shift']());}catch(_0x32addc){_0x32f18a['push'](_0x32f18a['shift']());}}}(a228_0xe7b3,0xf2849));import*as a228_0x476d19 from'readline';function a228_0xe7b3(){const _0x171da8=['toLowerCase','stdin','close','1874438jafsQA','985Siscuu','utf8','3264076zMYPvD','resume','createInterface','write','stderr','yes','pause','8723136pgcaIP','\x20(y/N):\x20','12836iDrnBZ','removeListener','question','1918301FeULsq','323802zhquNJ','810VVCtfF','data','stdout','3EGKPkW','12925000twdGXM'];a228_0xe7b3=function(){return _0x171da8;};return a228_0xe7b3();}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x5636e2=a228_0x2f9e;return process[_0x5636e2(0xd6)]['isTTY']===!![];}export async function confirm(_0xa8d122){const _0x4ab979=a228_0x2f9e,_0x1a3483=a228_0x476d19[_0x4ab979(0xdd)]({'input':process[_0x4ab979(0xd6)],'output':process[_0x4ab979(0xeb)]});return new Promise(_0x362c63=>{const _0x2770e2=_0x4ab979;_0x1a3483[_0x2770e2(0xe6)](_0xa8d122+_0x2770e2(0xe3),_0x1db00d=>{const _0x37323e=_0x2770e2;_0x1a3483[_0x37323e(0xd7)](),_0x362c63(_0x1db00d[_0x37323e(0xd5)]()==='y'||_0x1db00d[_0x37323e(0xd5)]()===_0x37323e(0xe0));});});}export async function confirmKey(_0x240917){const _0x29e232=a228_0x2f9e;if(!process[_0x29e232(0xd6)]['isTTY'])return![];return process[_0x29e232(0xdf)][_0x29e232(0xde)](_0x240917+'\x20[y/N]\x20'),new Promise(_0x464e6f=>{const _0x35bbdf=_0x29e232,_0x383562=process['stdin'];_0x383562['setRawMode'](!![]),_0x383562[_0x35bbdf(0xdc)](),_0x383562['setEncoding'](_0x35bbdf(0xda));const _0x4a4f00=_0x52a585=>{const _0x1a0a87=_0x35bbdf;_0x383562['setRawMode'](![]),_0x383562[_0x1a0a87(0xe1)](),_0x383562[_0x1a0a87(0xe5)](_0x1a0a87(0xea),_0x4a4f00);if(_0x52a585==='\x1b'){process['stderr'][_0x1a0a87(0xde)]('\x0a'),_0x464e6f(![]);return;}_0x52a585==='\x03'&&(process[_0x1a0a87(0xdf)][_0x1a0a87(0xde)]('\x0a'),gracefulExit(0x82));if(_0x52a585[_0x1a0a87(0xd5)]()==='y'){process[_0x1a0a87(0xdf)][_0x1a0a87(0xde)]('y\x0a'),_0x464e6f(!![]);return;}process[_0x1a0a87(0xdf)][_0x1a0a87(0xde)]('\x0a'),_0x464e6f(![]);};_0x383562['on'](_0x35bbdf(0xea),_0x4a4f00);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a229_0x388e(){const _0x2084cd=['phase','toFixed','now','intervalFactory','1548255SnaFcE','stderr','861MkElfz','10734399KodJpe','1707416NfeLFu','trim','jobId','replace','clock','floor','cyan','1139811temDpg','22POWmPS','Processing','...','stop','50042hLWvce','text','isTTY','5358wemkoC','\x20[Job\x20ID:\x20','extra','3622432MHqNuq'];a229_0x388e=function(){return _0x2084cd;};return a229_0x388e();}(function(_0x5744b5,_0x58a299){const _0x1455d5=a229_0x4510,_0x300421=_0x5744b5();while(!![]){try{const _0x3ed025=parseInt(_0x1455d5(0x106))/0x1*(-parseInt(_0x1455d5(0x11d))/0x2)+-parseInt(_0x1455d5(0x11c))/0x3+-parseInt(_0x1455d5(0x115))/0x4+parseInt(_0x1455d5(0x111))/0x5+parseInt(_0x1455d5(0x109))/0x6*(-parseInt(_0x1455d5(0x113))/0x7)+parseInt(_0x1455d5(0x10c))/0x8+parseInt(_0x1455d5(0x114))/0x9;if(_0x3ed025===_0x58a299)break;else _0x300421['push'](_0x300421['shift']());}catch(_0x5eea39){_0x300421['push'](_0x300421['shift']());}}}(a229_0x388e,0x7728a));import a229_0x1c4fb2 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};function a229_0x4510(_0x1d40c4,_0x1edbf3){_0x1d40c4=_0x1d40c4-0x104;const _0x388ef5=a229_0x388e();let _0x451088=_0x388ef5[_0x1d40c4];return _0x451088;}export function createCommandSpinner(_0x829178,_0x36a120={}){const _0x445e96=a229_0x4510,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x36a120;return a229_0x1c4fb2({'text':_0x829178,'color':_0x445e96(0x11b),'stream':process['stderr'],'isEnabled':forceEnabled||process[_0x445e96(0x112)][_0x445e96(0x108)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x56211f,_0x5f4948,_0x1e5569={}){const _0x5594d3=a229_0x4510,_0x27cfb8=_0x1e5569[_0x5594d3(0x119)]??(()=>Date[_0x5594d3(0x10f)]()),_0x4c924d=createCommandSpinner(_0x56211f,_0x1e5569);_0x4c924d['start']();const _0x4b8af8=_0x27cfb8();try{const _0x3b8a49=await _0x5f4948(),_0x4c5bf0=_0x27cfb8()-_0x4b8af8;return _0x4c924d[_0x5594d3(0x105)](),{'data':_0x3b8a49,'elapsedMs':_0x4c5bf0};}catch(_0x5e048a){_0x4c924d[_0x5594d3(0x105)]();throw _0x5e048a;}}export async function withProgressSpinner(_0x3907c7,_0x27cae1,_0x13f3f7={}){const _0x15d7f9=a229_0x4510,_0x18aef7=_0x13f3f7[_0x15d7f9(0x119)]??(()=>Date[_0x15d7f9(0x10f)]()),_0x1a49d5=_0x13f3f7[_0x15d7f9(0x110)]??setInterval,_0x250cbd=createCommandSpinner(_0x3907c7,_0x13f3f7);_0x250cbd['start']();const _0x2c8157=_0x18aef7(),_0x41efad=_0x3907c7[_0x15d7f9(0x118)](_0x15d7f9(0x104),'')[_0x15d7f9(0x116)]()||_0x15d7f9(0x11e),_0x433216={};let _0x17497b=_0x3907c7;const _0x17598a=()=>{const _0x305912=_0x15d7f9;if(!_0x250cbd['isSpinning'])return;const _0x50249f=_0x18aef7()-_0x2c8157,_0x5d8017=formatElapsed(_0x50249f),_0x127fe6=_0x433216[_0x305912(0x10d)]?.[_0x305912(0x116)]()||_0x41efad,_0x1d162f=_0x433216[_0x305912(0x117)]?_0x305912(0x10a)+_0x433216[_0x305912(0x117)]+']':'',_0x533295=_0x433216[_0x305912(0x10b)]?'\x20'+_0x433216[_0x305912(0x10b)]:'',_0xd99283=_0x127fe6+'\x20'+_0x5d8017+_0x533295+_0x1d162f;_0xd99283!==_0x17497b&&_0xd99283['trim']()&&(_0x250cbd[_0x305912(0x107)]=_0xd99283,_0x17497b=_0xd99283);},_0x583cc4=_0x1a49d5(()=>{_0x17598a();},0x3e8),_0x1d1060={'setPhase':_0x5b2aa0=>{const _0x40cb37=_0x15d7f9;_0x433216[_0x40cb37(0x10d)]=_0x5b2aa0;const _0x2813b1=_0x5b2aa0?.[_0x40cb37(0x116)]()||_0x41efad,_0xf96dda=_0x18aef7()-_0x2c8157,_0x54520b=formatElapsed(_0xf96dda),_0x5123ab=_0x433216['jobId']?_0x40cb37(0x10a)+_0x433216[_0x40cb37(0x117)]+']':'',_0x17712a=_0x433216[_0x40cb37(0x10b)]?'\x20'+_0x433216[_0x40cb37(0x10b)]:'',_0x528a7c=_0x2813b1+'\x20'+_0x54520b+_0x17712a+_0x5123ab;_0x250cbd['isSpinning']&&_0x528a7c[_0x40cb37(0x116)]()&&(_0x250cbd[_0x40cb37(0x107)]=_0x528a7c,_0x17497b=_0x528a7c);},'setJobId':_0x50863a=>{_0x433216['jobId']=_0x50863a,_0x17598a();},'setExtra':_0x43020a=>{const _0x38e051=_0x15d7f9;_0x433216[_0x38e051(0x10b)]=_0x43020a,_0x17598a();}};_0x17598a();try{const _0x1afc0e=await _0x27cae1(_0x1d1060),_0x344cbd=_0x18aef7()-_0x2c8157;return{'data':_0x1afc0e,'elapsedMs':_0x344cbd};}finally{clearInterval(_0x583cc4),_0x250cbd[_0x15d7f9(0x105)]();}}export function formatElapsed(_0x57089f){const _0x4d2d9a=a229_0x4510,_0x2f382d=Math['floor'](_0x57089f/0x3e8);if(_0x2f382d<0x3c)return(_0x57089f/0x3e8)[_0x4d2d9a(0x10e)](0x1)+'s';const _0x240d83=Math[_0x4d2d9a(0x11a)](_0x2f382d/0x3c),_0x2f285d=_0x2f382d%0x3c;if(_0x240d83<0x3c)return _0x240d83+'m\x20'+_0x2f285d+'s';const _0x3a026b=Math['floor'](_0x240d83/0x3c),_0x12119d=_0x240d83%0x3c;return _0x3a026b+'h\x20'+_0x12119d+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d0c41,_0x49b092){const _0x2e7f67=a230_0x21cc,_0x5ab460=_0x2d0c41();while(!![]){try{const _0x15d25c=parseInt(_0x2e7f67(0xd0))/0x1+parseInt(_0x2e7f67(0xde))/0x2*(-parseInt(_0x2e7f67(0xe1))/0x3)+-parseInt(_0x2e7f67(0xd7))/0x4*(parseInt(_0x2e7f67(0xd3))/0x5)+parseInt(_0x2e7f67(0xd1))/0x6+parseInt(_0x2e7f67(0xdd))/0x7+-parseInt(_0x2e7f67(0xe0))/0x8+parseInt(_0x2e7f67(0xe4))/0x9;if(_0x15d25c===_0x49b092)break;else _0x5ab460['push'](_0x5ab460['shift']());}catch(_0x31358e){_0x5ab460['push'](_0x5ab460['shift']());}}}(a230_0x49fc,0xd3903));function a230_0x49fc(){const _0x113cad=['decode','split','slice','274786Nasqem','8123874eoreww','startsWith','45cEWhrn','[LLM\x20API\x20SSE]\x20','pop','debug','759708BURKnd','releaseLock','getReader','trim','Response\x20body\x20is\x20null','event','3750418pQFzLM','50EHMMNu','body','8808VDPBjM','188277lpkwSL','data','indexOf','17832987fyWwBd'];a230_0x49fc=function(){return _0x113cad;};return a230_0x49fc();}function a230_0x21cc(_0x49d108,_0x227ff5){_0x49d108=_0x49d108-0xcd;const _0x49fce9=a230_0x49fc();let _0x21cc67=_0x49fce9[_0x49d108];return _0x21cc67;}export async function*parseSSEStream(_0x357de4,_0x56824a){const _0x586a71=a230_0x21cc;if(!_0x357de4['body'])throw new Error(_0x586a71(0xdb));const _0x433316=_0x357de4[_0x586a71(0xdf)][_0x586a71(0xd9)](),_0x5d48e4=new TextDecoder();let _0x318398='',_0x26e294={};try{while(!![]){const {done:_0x5bac2b,value:_0x1c0002}=await _0x433316['read']();if(_0x5bac2b){if(_0x26e294[_0x586a71(0xe2)]){_0x56824a?.[_0x586a71(0xd6)](_0x586a71(0xd4)+_0x26e294[_0x586a71(0xe2)]);const _0x24ced3=parseSSEData(_0x26e294[_0x586a71(0xe2)]);yield _0x24ced3;}break;}_0x318398+=_0x5d48e4[_0x586a71(0xcd)](_0x1c0002,{'stream':!![]});const _0x27ae5f=_0x318398[_0x586a71(0xce)]('\x0a');_0x318398=_0x27ae5f[_0x586a71(0xd5)]()||'';for(const _0x4a9020 of _0x27ae5f){if(_0x4a9020[_0x586a71(0xda)]()===''){if(_0x26e294[_0x586a71(0xe2)]){_0x56824a?.[_0x586a71(0xd6)](_0x586a71(0xd4)+_0x26e294[_0x586a71(0xe2)]);const _0x9dba73=parseSSEData(_0x26e294[_0x586a71(0xe2)]);yield _0x9dba73,_0x26e294={};}continue;}if(_0x4a9020[_0x586a71(0xd2)](':'))continue;const _0x22d35b=_0x4a9020[_0x586a71(0xe3)](':');if(_0x22d35b===-0x1)continue;const _0x2e81f4=_0x4a9020[_0x586a71(0xcf)](0x0,_0x22d35b);let _0x3616c9=_0x4a9020[_0x586a71(0xcf)](_0x22d35b+0x1);_0x3616c9[_0x586a71(0xd2)]('\x20')&&(_0x3616c9=_0x3616c9[_0x586a71(0xcf)](0x1));switch(_0x2e81f4){case _0x586a71(0xdc):_0x26e294['event']=_0x3616c9;break;case _0x586a71(0xe2):_0x26e294[_0x586a71(0xe2)]=_0x26e294[_0x586a71(0xe2)]?_0x26e294['data']+'\x0a'+_0x3616c9:_0x3616c9;break;case'id':_0x26e294['id']=_0x3616c9;break;}}}}finally{_0x433316[_0x586a71(0xd8)]();}}function parseSSEData(_0x2aa259){try{return JSON['parse'](_0x2aa259);}catch(_0x2c986b){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x2aa259,{'cause':_0x2c986b});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x428b16,_0x5bcf7d){const _0x5e2226=a231_0xfb9d,_0x233ce1=_0x428b16();while(!![]){try{const _0x1863ad=-parseInt(_0x5e2226(0xa8))/0x1*(-parseInt(_0x5e2226(0xa9))/0x2)+-parseInt(_0x5e2226(0xa1))/0x3+parseInt(_0x5e2226(0xa6))/0x4+parseInt(_0x5e2226(0xa2))/0x5*(parseInt(_0x5e2226(0xa7))/0x6)+-parseInt(_0x5e2226(0xa5))/0x7+-parseInt(_0x5e2226(0xaf))/0x8+parseInt(_0x5e2226(0xa0))/0x9*(parseInt(_0x5e2226(0x9f))/0xa);if(_0x1863ad===_0x5bcf7d)break;else _0x233ce1['push'](_0x233ce1['shift']());}catch(_0x2600b0){_0x233ce1['push'](_0x233ce1['shift']());}}}(a231_0x53e4,0xdd506));import a231_0x44adad from'string-width';export function stringWidth(_0x4164dc){return a231_0x44adad(_0x4164dc);}function a231_0x53e4(){const _0x5a0c78=['\x5c$&','4970060mkvyen','18szhVWQ','4495827DYuGRf','1114745BmeofK','test','slice','11800229TNjyBh','3051932hhQOeP','42AKHmDr','12853HViVqN','214iMOTYE','toString','replace','random','repeat','floor','4816408OOzipu','toLowerCase','unknown'];a231_0x53e4=function(){return _0x5a0c78;};return a231_0x53e4();}export function padEnd(_0x46923a,_0x31675d){const _0x3fdc3f=a231_0xfb9d,_0x5516dd=stringWidth(_0x46923a);if(_0x5516dd>=_0x31675d)return _0x46923a;return _0x46923a+'\x20'[_0x3fdc3f(0xad)](_0x31675d-_0x5516dd);}export function padStart(_0x4e8c09,_0x2909d0){const _0x160f12=a231_0xfb9d,_0x425ed5=stringWidth(_0x4e8c09);if(_0x425ed5>=_0x2909d0)return _0x4e8c09;return'\x20'[_0x160f12(0xad)](_0x2909d0-_0x425ed5)+_0x4e8c09;}export function centerAlign(_0x12dae1,_0x47493a){const _0x52c696=a231_0xfb9d,_0x1f9b4c=stringWidth(_0x12dae1);if(_0x1f9b4c>_0x47493a){if(_0x47493a<=0x1)return'…'['substring'](0x0,_0x47493a);let _0x7f22b2=_0x12dae1;while(stringWidth(_0x7f22b2+'…')>_0x47493a){_0x7f22b2=_0x7f22b2[_0x52c696(0xa4)](0x0,-0x1);}return _0x7f22b2+'…';}if(_0x1f9b4c===_0x47493a)return _0x12dae1;const _0x52af64=_0x47493a-_0x1f9b4c,_0x509236=Math[_0x52c696(0xae)](_0x52af64/0x2),_0x15626=_0x52af64-_0x509236;return'\x20'[_0x52c696(0xad)](_0x509236)+_0x12dae1+'\x20'[_0x52c696(0xad)](_0x15626);}export function escapeStringLiteral(_0x947c16){const _0x59e599=a231_0xfb9d;if(!_0x947c16||_0x947c16['trim']()['length']===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x43336b=_0x947c16[_0x59e599(0xab)](/'/g,'\x27\x27');return'\x27'+_0x43336b+'\x27';}export function globToLike(_0x1fe377){const _0x4ec9b8=a231_0xfb9d;let _0x362642=_0x1fe377[_0x4ec9b8(0xab)](/\\/g,'\x5c\x5c')[_0x4ec9b8(0xab)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x362642=_0x362642[_0x4ec9b8(0xab)](/\*/g,'%')[_0x4ec9b8(0xab)](/\?/g,'_'),_0x362642;}export function buildLikePattern(_0x302fcf){const _0x4c2b51=a231_0xfb9d;if(!_0x302fcf||_0x302fcf['trim']()['length']===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x3a5085=globToLike(_0x302fcf),_0x1d1126=_0x3a5085[_0x4c2b51(0xab)](/'/g,'\x27\x27');return'\x27'+_0x1d1126+'\x27';}export function matchGlobPattern(_0x3fb8be,_0x248365){const _0x50f5eb=a231_0xfb9d,_0x3e4348=_0x248365[_0x50f5eb(0xab)](/[.+^${}()|[\]\\]/g,_0x50f5eb(0xb2))['replace'](/\*/g,'.*')[_0x50f5eb(0xab)](/\?/g,'.'),_0x46792e=new RegExp('^'+_0x3e4348+'$');return _0x46792e[_0x50f5eb(0xa3)](_0x3fb8be);}function a231_0xfb9d(_0x284e37,_0xeefd0){_0x284e37=_0x284e37-0x9f;const _0x53e40d=a231_0x53e4();let _0xfb9d1e=_0x53e40d[_0x284e37];return _0xfb9d1e;}export function getSanitizedUsername(){const _0x4dc90c=a231_0xfb9d,_0x3fc2ad=process.env.USER||process.env.USERNAME||_0x4dc90c(0xb1);return _0x3fc2ad[_0x4dc90c(0xab)](/[^a-zA-Z0-9]/g,'')[_0x4dc90c(0xb0)]();}export function generateRandomHex(){const _0x6220d2=a231_0xfb9d,_0x186f89=Math['floor'](Math[_0x6220d2(0xac)]()*0xfffff);return _0x186f89[_0x6220d2(0xaa)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x8e6fb3){const _0x576410=a231_0xfb9d;return _0x8e6fb3[_0x576410(0xb0)]()['replace'](/[/\\:*?"<>|]/g,'-')[_0x576410(0xab)](/\s+/g,'-')[_0x576410(0xab)](/-+/g,'-')['replace'](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf1b241,_0x36849a){const _0x376d67=a232_0x2e33,_0x2f6789=_0xf1b241();while(!![]){try{const _0x47e757=-parseInt(_0x376d67(0x1d1))/0x1+-parseInt(_0x376d67(0x1c9))/0x2+parseInt(_0x376d67(0x1db))/0x3*(parseInt(_0x376d67(0x1d7))/0x4)+parseInt(_0x376d67(0x1cc))/0x5+-parseInt(_0x376d67(0x1d9))/0x6+parseInt(_0x376d67(0x1d3))/0x7+parseInt(_0x376d67(0x1da))/0x8;if(_0x47e757===_0x36849a)break;else _0x2f6789['push'](_0x2f6789['shift']());}catch(_0x1db87a){_0x2f6789['push'](_0x2f6789['shift']());}}}(a232_0x2208,0x6abd6));function a232_0x2e33(_0x2ab631,_0x4b356c){_0x2ab631=_0x2ab631-0x1c8;const _0x2208d0=a232_0x2208();let _0x2e337a=_0x2208d0[_0x2ab631];return _0x2e337a;}function hasWildcard(_0x4f0563){const _0x32c26f=a232_0x2e33;return _0x4f0563[_0x32c26f(0x1df)]('*')||_0x4f0563['includes']('?');}export function parseTableReference(_0x12c07c){const _0x433eb4=a232_0x2e33;if(!_0x12c07c||_0x12c07c[_0x433eb4(0x1d5)]()[_0x433eb4(0x1cf)]===0x0)throw new Error(_0x433eb4(0x1dd));const _0x672dcb=_0x12c07c[_0x433eb4(0x1d5)](),_0x1e1002={'original':_0x672dcb},_0x1f27e4=_0x672dcb['split']('.');if(_0x1f27e4[_0x433eb4(0x1cf)]===0x1){const _0x519333=_0x1f27e4[0x0];if(!_0x519333)throw new Error(_0x433eb4(0x1d4));_0x1e1002[_0x433eb4(0x1de)]=_0x519333;}else{if(_0x1f27e4['length']===0x2){const [_0x7dac,_0x6e94fc]=_0x1f27e4;if(!_0x7dac)throw new Error(_0x433eb4(0x1cd));if(!_0x6e94fc)throw new Error(_0x433eb4(0x1d6));_0x1e1002[_0x433eb4(0x1ce)]=_0x7dac,_0x1e1002[_0x433eb4(0x1de)]=_0x6e94fc;}else{if(_0x1f27e4[_0x433eb4(0x1cf)]===0x3){const [_0xcee781,_0x428abb,_0x191c73]=_0x1f27e4;if(!_0xcee781||!_0x428abb||!_0x191c73)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x1e1002['catalog']=_0xcee781,_0x1e1002[_0x433eb4(0x1ce)]=_0x428abb,_0x1e1002[_0x433eb4(0x1de)]=_0x191c73;}else throw new Error(_0x433eb4(0x1ca));}}return _0x1e1002;}export function formatTableReference(_0xc33f1){const _0x28d82d=a232_0x2e33,_0x88344e=[];return _0xc33f1[_0x28d82d(0x1cb)]&&_0x88344e['push'](_0xc33f1['catalog']),_0xc33f1[_0x28d82d(0x1ce)]&&_0x88344e[_0x28d82d(0x1dc)](_0xc33f1[_0x28d82d(0x1ce)]),_0xc33f1[_0x28d82d(0x1de)]&&_0x88344e[_0x28d82d(0x1dc)](_0xc33f1[_0x28d82d(0x1de)]),_0x88344e[_0x28d82d(0x1d2)]('.');}export function validateTableListReference(_0x4ba0b6){return undefined;}export function validateTableDescribeReference(_0x4e3d04){const _0x4cabfa=a232_0x2e33;if(!_0x4e3d04[_0x4cabfa(0x1de)])return _0x4cabfa(0x1d0);if(_0x4e3d04['database']&&hasWildcard(_0x4e3d04[_0x4cabfa(0x1ce)]))return _0x4cabfa(0x1c8);if(hasWildcard(_0x4e3d04['table']))return _0x4cabfa(0x1d8);return undefined;}function a232_0x2208(){const _0x1afd44=['Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','catalog','3681645BTHskc','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','database','length','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','49301tBghYm','join','681352sJsKPT','Pattern\x20cannot\x20be\x20just\x20a\x20dot','trim','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','116iTTuRN','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','3574260heSPhv','7351392eArpao','12249tbfxzg','push','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','table','includes','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','1577558BYITCx'];a232_0x2208=function(){return _0x1afd44;};return a232_0x2208();}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a233_0x527734=a233_0x196d;(function(_0x57e9c1,_0x3124fe){const _0x240d43=a233_0x196d,_0x342b59=_0x57e9c1();while(!![]){try{const _0x256795=parseInt(_0x240d43(0x16e))/0x1*(parseInt(_0x240d43(0x183))/0x2)+-parseInt(_0x240d43(0x17c))/0x3+parseInt(_0x240d43(0x171))/0x4*(parseInt(_0x240d43(0x18d))/0x5)+-parseInt(_0x240d43(0x172))/0x6*(-parseInt(_0x240d43(0x176))/0x7)+-parseInt(_0x240d43(0x175))/0x8+parseInt(_0x240d43(0x18b))/0x9+parseInt(_0x240d43(0x186))/0xa*(-parseInt(_0x240d43(0x185))/0xb);if(_0x256795===_0x3124fe)break;else _0x342b59['push'](_0x342b59['shift']());}catch(_0x19afca){_0x342b59['push'](_0x342b59['shift']());}}}(a233_0x54bd,0xe06dc));import{join}from'path';function a233_0x196d(_0x47eb,_0x1f701e){_0x47eb=_0x47eb-0x16e;const _0x54bdcd=a233_0x54bd();let _0x196de1=_0x54bdcd[_0x47eb];return _0x196de1;}function a233_0x54bd(){const _0x48d1bf=['5424715HUqTcM','isInitialized','1710593XCearC','info','logger','4nTEiHu','9204cdFBFX','init','logFileName','12229192RVhZXK','3710idmPPb','consoleHandler','addHandler','logs','close','warn','2956851JmUJqm','trace','INFO','debug','getLogPath','fileOnly','error','2JDTcJV','Session\x20ended','7372189ZSYqNH','10WUaNYT','tdx.log','logDir','tdx','logLevel','4456521TaERRs','push'];a233_0x54bd=function(){return _0x48d1bf;};return a233_0x54bd();}import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{['logLevel'];[a233_0x527734(0x181)];[a233_0x527734(0x188)];['logFileName'];[a233_0x527734(0x170)];['fileHandler']=null;[a233_0x527734(0x177)]=null;constructor(_0x3c1160=LogLevel[a233_0x527734(0x17e)],_0x2c9a7a=![],_0x4fe0e8,_0x178705=a233_0x527734(0x187)){const _0x452eee=a233_0x527734;this[_0x452eee(0x18a)]=_0x3c1160,this[_0x452eee(0x181)]=_0x2c9a7a,this[_0x452eee(0x188)]=_0x4fe0e8||join(getGlobalCacheDir(),_0x452eee(0x179)),this['logFileName']=_0x178705,this[_0x452eee(0x170)]=Logger['of'](_0x452eee(0x189));}async['init'](){const _0x397b0b=a233_0x527734,_0x14cb6b=join(this['logDir'],this[_0x397b0b(0x174)]);if(Logger[_0x397b0b(0x18e)]()){!this[_0x397b0b(0x181)]&&(this[_0x397b0b(0x177)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),Logger[_0x397b0b(0x178)](this[_0x397b0b(0x177)]));return;}this['fileHandler']=new FileHandler({'filePath':_0x14cb6b});const _0x511417=[this['fileHandler']];!this['fileOnly']&&(this[_0x397b0b(0x177)]=new ConsoleHandler({'minLevel':LogLevel[_0x397b0b(0x17e)],'colors':!![]}),_0x511417[_0x397b0b(0x18c)](this[_0x397b0b(0x177)])),await Logger[_0x397b0b(0x173)]({'defaultLevel':this[_0x397b0b(0x18a)],'handlers':_0x511417,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a233_0x527734(0x17f)](..._0x1059c0){const _0xa27eb7=a233_0x527734;this[_0xa27eb7(0x170)][_0xa27eb7(0x17f)](..._0x1059c0);}['trace'](..._0x4fe7b4){const _0x2a5bf2=a233_0x527734;this[_0x2a5bf2(0x170)][_0x2a5bf2(0x17d)](..._0x4fe7b4);}[a233_0x527734(0x16f)](..._0x1c060b){const _0x5e6d63=a233_0x527734;this[_0x5e6d63(0x170)][_0x5e6d63(0x16f)](..._0x1c060b);}[a233_0x527734(0x17b)](..._0x135e42){const _0x55a4da=a233_0x527734;this[_0x55a4da(0x170)][_0x55a4da(0x17b)](..._0x135e42);}[a233_0x527734(0x182)](..._0x5418f6){const _0x520d07=a233_0x527734;this['logger'][_0x520d07(0x182)](..._0x5418f6);}async[a233_0x527734(0x17a)](){const _0x525c6=a233_0x527734;this[_0x525c6(0x170)]['info'](_0x525c6(0x184)),await Logger['shutdown']();}[a233_0x527734(0x180)](){const _0x4082cb=a233_0x527734;return join(this[_0x4082cb(0x188)],this[_0x4082cb(0x174)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a234_0x1fe473=a234_0xc96f;(function(_0x530772,_0x226afb){const _0x55f513=a234_0xc96f,_0xbe7073=_0x530772();while(!![]){try{const _0x4ae622=-parseInt(_0x55f513(0x113))/0x1+parseInt(_0x55f513(0xec))/0x2+-parseInt(_0x55f513(0x10e))/0x3*(parseInt(_0x55f513(0x10f))/0x4)+parseInt(_0x55f513(0x10a))/0x5+parseInt(_0x55f513(0x11a))/0x6*(parseInt(_0x55f513(0xf7))/0x7)+parseInt(_0x55f513(0x10b))/0x8+-parseInt(_0x55f513(0x110))/0x9*(parseInt(_0x55f513(0xf4))/0xa);if(_0x4ae622===_0x226afb)break;else _0xbe7073['push'](_0xbe7073['shift']());}catch(_0x32b861){_0xbe7073['push'](_0xbe7073['shift']());}}}(a234_0x4a18,0x22112));function a234_0x4a18(){const _0x3b2c95=['updateAvailable','read','destroy','stderr','3098930ucjVjF','version','end','7mqqWtZ','latestVersion','data','socket','channel','now','lastCheck','toISOString','Run:','\x0aRun:\x20','tdx\x20upgrade\x20--next','getTime','statusCode','cyan','parse','yellow','next','unref','Request\x20timeout','800795pmDmEb','980560EDwoOQ','currentVersion','error','160281klCNRQ','8HjsbDd','9qadpiC','https://registry.npmjs.org/@treasuredata/tdx','utils/version-check-next','203031atVhGE','HTTP\x20','last_version_check','gray','stable','utils/version-check','write','1270896blpxqN','dim','529542umHYge','Invalid\x20version\x20format','last_version_check_next','isTTY'];a234_0x4a18=function(){return _0x3b2c95;};return a234_0x4a18();}import{get}from'https';import{gt,valid}from'semver';import a234_0x1003a5 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a234_0x1fe473(0x111),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a234_0x1fe473(0x115),a234_0x1fe473(0x118)),nextVersionCache=createGlobalCache(a234_0x1fe473(0xee),a234_0x1fe473(0x112));function getCacheForChannel(_0xff0686){const _0x135049=a234_0x1fe473;return _0xff0686===_0x135049(0x107)?nextVersionCache:stableVersionCache;}function readCache(_0x19a8ee){const _0x4aa4ef=a234_0x1fe473;return getCacheForChannel(_0x19a8ee)[_0x4aa4ef(0xf1)]()??null;}function writeCache(_0x399942,_0x336ad9){const _0xb26fa6=a234_0x1fe473;try{getCacheForChannel(_0x336ad9)[_0xb26fa6(0x119)]({'lastCheck':new Date()[_0xb26fa6(0xfe)](),'latestVersion':_0x399942});}catch{}}function isCacheValid(_0xe616d1){const _0x5a8e7e=a234_0x1fe473;if(!_0xe616d1)return![];const _0x5156ad=new Date(_0xe616d1[_0x5a8e7e(0xfd)])[_0x5a8e7e(0x102)](),_0x4e52ee=Date[_0x5a8e7e(0xfc)]();return _0x4e52ee-_0x5156ad<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x534f52=a234_0x1fe473(0x117)){const _0x114293=_0x534f52==='next'?'next':'latest',_0x510d01=NPM_REGISTRY_BASE+'/'+_0x114293;return new Promise((_0x5db87e,_0x4d7547)=>{const _0xc2dbc4=a234_0xc96f,_0x285dff=get(_0x510d01,{'timeout':TIMEOUT_MS},_0x4d0f3a=>{const _0xcc2462=a234_0xc96f;if(_0x4d0f3a[_0xcc2462(0x103)]!==0xc8){clearTimeout(_0x364e98),_0x4d7547(new Error(_0xcc2462(0x114)+_0x4d0f3a[_0xcc2462(0x103)]));return;}let _0xf48951='';_0x4d0f3a['on'](_0xcc2462(0xf9),_0x5556b0=>{_0xf48951+=_0x5556b0;}),_0x4d0f3a['on'](_0xcc2462(0xf6),()=>{const _0x5cebd4=_0xcc2462;clearTimeout(_0x364e98);try{const _0x2ef71d=JSON[_0x5cebd4(0x105)](_0xf48951);if(!valid(_0x2ef71d[_0x5cebd4(0xf5)])){_0x4d7547(new Error(_0x5cebd4(0xed)));return;}_0x5db87e(_0x2ef71d[_0x5cebd4(0xf5)]);}catch(_0x138cad){_0x4d7547(_0x138cad);}});})['on'](_0xc2dbc4(0x10d),_0x5cc4d4=>{clearTimeout(_0x364e98),_0x4d7547(_0x5cc4d4);});_0x285dff['on'](_0xc2dbc4(0xfa),_0x5ec3ec=>{const _0x444cd6=_0xc2dbc4;_0x5ec3ec[_0x444cd6(0x108)]();});const _0x364e98=setTimeout(()=>{const _0x42040f=_0xc2dbc4;_0x285dff[_0x42040f(0xf2)](),_0x4d7547(new Error(_0x42040f(0x109)));},TIMEOUT_MS);_0x364e98[_0xc2dbc4(0x108)]();});}function a234_0xc96f(_0x55924b,_0x3fb8ee){_0x55924b=_0x55924b-0xec;const _0x4a18fb=a234_0x4a18();let _0xc96ff2=_0x4a18fb[_0x55924b];return _0xc96ff2;}export async function checkForUpdate(_0x2ab3e8,_0x2652d2='stable'){const _0x3046cd=a234_0x1fe473;try{const _0x510224=readCache(_0x2652d2);if(isCacheValid(_0x510224)){const _0x18ffd0=gt(_0x510224[_0x3046cd(0xf8)],_0x2ab3e8);return{'updateAvailable':_0x18ffd0,'currentVersion':_0x2ab3e8,'latestVersion':_0x510224[_0x3046cd(0xf8)],'channel':_0x2652d2};}const _0x40e46b=await fetchLatestVersion(_0x2652d2);writeCache(_0x40e46b,_0x2652d2);const _0x1f8b1=gt(_0x40e46b,_0x2ab3e8);return{'updateAvailable':_0x1f8b1,'currentVersion':_0x2ab3e8,'latestVersion':_0x40e46b,'channel':_0x2652d2};}catch{return null;}}export function displayUpdateNotification(_0x51f38b){const _0x83cdac=a234_0x1fe473;if(!_0x51f38b[_0x83cdac(0xf0)])return;const _0x3eb2c9=_0x51f38b[_0x83cdac(0xfb)]===_0x83cdac(0x107)?_0x83cdac(0x101):'tdx\x20upgrade',_0x3e7c6c=process['stderr'][_0x83cdac(0xef)]&&!process.env.NO_COLOR,_0x2edced=_0x3e7c6c?a234_0x1003a5[_0x83cdac(0x116)]('→'):'→',_0x22d7fb=_0x3e7c6c?a234_0x1003a5[_0x83cdac(0x11b)](_0x51f38b['currentVersion']):_0x51f38b[_0x83cdac(0x10c)],_0x28f32a=_0x3e7c6c?a234_0x1003a5['green'](_0x51f38b['latestVersion']):_0x51f38b['latestVersion'],_0xe9f4ad=_0x3e7c6c?a234_0x1003a5[_0x83cdac(0x104)](_0x3eb2c9):_0x3eb2c9,_0xfe58e2=_0x3e7c6c?'\x0a'+a234_0x1003a5[_0x83cdac(0x106)]('Update\x20available:')+'\x20'+_0x22d7fb+'\x20'+_0x2edced+'\x20'+_0x28f32a+'\x0a'+a234_0x1003a5[_0x83cdac(0x11b)](_0x83cdac(0xff))+'\x20'+_0xe9f4ad+'\x0a':'\x0aUpdate\x20available:\x20'+_0x22d7fb+'\x20'+_0x2edced+'\x20'+_0x28f32a+_0x83cdac(0x100)+_0xe9f4ad+'\x0a';process[_0x83cdac(0xf3)][_0x83cdac(0x119)](_0xfe58e2);}
|