@treasuredata/tdx 2026.3.41 → 2026.3.42
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_0x3a3afa=a227_0x4889;(function(_0x5eacc7,_0x448e31){const _0x24e168=a227_0x4889,_0x2f6204=_0x5eacc7();while(!![]){try{const _0x36d883=-parseInt(_0x24e168(0xc0))/0x1*(-parseInt(_0x24e168(0xcb))/0x2)+-parseInt(_0x24e168(0xe2))/0x3+-parseInt(_0x24e168(0xce))/0x4+-parseInt(_0x24e168(0xc9))/0x5*(parseInt(_0x24e168(0xec))/0x6)+-parseInt(_0x24e168(0xbc))/0x7*(parseInt(_0x24e168(0xc7))/0x8)+parseInt(_0x24e168(0xe9))/0x9*(parseInt(_0x24e168(0xdc))/0xa)+parseInt(_0x24e168(0xd5))/0xb*(parseInt(_0x24e168(0xcc))/0xc);if(_0x36d883===_0x448e31)break;else _0x2f6204['push'](_0x2f6204['shift']());}catch(_0x44452a){_0x2f6204['push'](_0x2f6204['shift']());}}}(a227_0xf9bd,0x97511));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a227_0x3a3afa(0xef),a227_0x3a3afa(0xe8),'sh',a227_0x3a3afa(0xe3),'ksh',a227_0x3a3afa(0xdf),'csh','dash','pwsh','powershell','nu',a227_0x3a3afa(0xd0),a227_0x3a3afa(0xea),'xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a227_0x3a3afa(0xf0),a227_0x3a3afa(0xdb),a227_0x3a3afa(0xdd),'electron','treasure\x20studio']);function getProcessInfoWindows(_0x41e3cc){const _0x67cce9=a227_0x3a3afa;try{if(!Number[_0x67cce9(0xd1)](_0x41e3cc)||_0x41e3cc<=0x0)return null;const _0x383d62=_0x67cce9(0xe7)+_0x41e3cc+_0x67cce9(0xbe),_0x485570=execSync('powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22'+_0x383d62+'\x22',{'encoding':_0x67cce9(0xd9),'windowsHide':!![],'stdio':[_0x67cce9(0xc8),_0x67cce9(0xc8),_0x67cce9(0xc8)]})['trim']();if(!_0x485570)return null;const [_0x17f69c,..._0x515cb5]=_0x485570[_0x67cce9(0xcf)](','),_0x41cf80=parseInt(_0x17f69c,0xa),_0x396c63=_0x515cb5[_0x67cce9(0xe0)](',')[_0x67cce9(0xd6)]();if(isNaN(_0x41cf80)||!_0x396c63)return null;return{'pid':_0x41e3cc,'ppid':_0x41cf80,'comm':_0x396c63[_0x67cce9(0xeb)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x4b0931){const _0x5a537c=a227_0x3a3afa;try{const _0x2740d3=0x400000;if(!Number['isInteger'](_0x4b0931)||_0x4b0931<=0x0||_0x4b0931>_0x2740d3)return null;const _0x305f70=execSync('ps\x20-p\x20'+_0x4b0931+'\x20-o\x20ppid=,comm=',{'encoding':_0x5a537c(0xd9),'stdio':_0x5a537c(0xc8)})[_0x5a537c(0xd6)](),[_0x13b00d,..._0x22c647]=_0x305f70[_0x5a537c(0xcf)](/\s+/),_0x320eb0=parseInt(_0x13b00d,0xa),_0x5660c8=_0x22c647[_0x5a537c(0xe0)]('\x20');if(isNaN(_0x320eb0))return null;return{'pid':_0x4b0931,'ppid':_0x320eb0,'comm':_0x5660c8};}catch{return null;}}function getProcessInfo(_0x3b89f3){const _0x406a0c=a227_0x3a3afa;if(process['platform']===_0x406a0c(0xd8))return getProcessInfoWindows(_0x3b89f3);return getProcessInfoPosix(_0x3b89f3);}function getBasename(_0x55b6e2){const _0x262c85=a227_0x3a3afa;return _0x55b6e2['replace'](/^-/,'')[_0x262c85(0xcf)]('/')[_0x262c85(0xe4)]()?.[_0x262c85(0xe6)]()||'';}function a227_0x4889(_0x5a8a09,_0x5c2d12){_0x5a8a09=_0x5a8a09-0xbc;const _0xf9bd20=a227_0xf9bd();let _0x4889fd=_0xf9bd20[_0x5a8a09];return _0x4889fd;}function isShell(_0x1e1a49){const _0x3124bd=a227_0x3a3afa;return SHELL_NAMES[_0x3124bd(0xe5)](getBasename(_0x1e1a49));}function isEphemeralShellSpawner(_0x24ec52){const _0x2bd308=a227_0x3a3afa;return EPHEMERAL_SHELL_SPAWNERS[_0x2bd308(0xe5)](getBasename(_0x24ec52));}let cachedShellPID;function findShellPID(){const _0x381487=a227_0x3a3afa;if(process['ppid']===undefined)return process['pid'];let _0x5c40db=process[_0x381487(0xe1)];const _0x1a3043=0xa;let _0x3b1916=0x0;while(_0x3b1916<_0x1a3043){const _0xc21e91=getProcessInfo(_0x5c40db);if(!_0xc21e91)break;if(isShell(_0xc21e91[_0x381487(0xc2)])){const _0x57a43b=getProcessInfo(_0xc21e91[_0x381487(0xe1)]);if(_0x57a43b&&isEphemeralShellSpawner(_0x57a43b[_0x381487(0xc2)])){_0x5c40db=_0xc21e91['ppid'],_0x3b1916++;continue;}return _0xc21e91[_0x381487(0xcd)];}if(_0xc21e91[_0x381487(0xe1)]===0x0||_0xc21e91[_0x381487(0xe1)]===0x1){if(isShell(_0xc21e91[_0x381487(0xc2)]))return _0xc21e91[_0x381487(0xcd)];break;}_0x5c40db=_0xc21e91[_0x381487(0xe1)],_0x3b1916++;}return process[_0x381487(0xe1)]!==undefined?process[_0x381487(0xe1)]:process[_0x381487(0xcd)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x38c635){const _0x4dfa9a=a227_0x3a3afa;if(!Number[_0x4dfa9a(0xd1)](_0x38c635)||_0x38c635<=0x0)return![];try{return process[_0x4dfa9a(0xbf)](_0x38c635,0x0),!![];}catch{return![];}}export function openBrowser(_0x1d357e){const _0x309e70=a227_0x3a3afa;let _0x31bc19;try{_0x31bc19=new URL(_0x1d357e);}catch{throw new Error(_0x309e70(0xf2)+_0x1d357e);}if(_0x31bc19['protocol']!==_0x309e70(0xd2)&&_0x31bc19[_0x309e70(0xd7)]!==_0x309e70(0xd3))throw new Error('Unsupported\x20protocol:\x20'+_0x31bc19[_0x309e70(0xd7)]);const _0x32c605=_0x31bc19[_0x309e70(0xc6)],_0x4b75fa=process[_0x309e70(0xc5)];if(_0x4b75fa===_0x309e70(0xd8))spawn('cmd.exe',['/c','start','',_0x32c605],{'detached':!![],'stdio':'ignore'})[_0x309e70(0xde)]();else{const _0x5877ae=_0x4b75fa===_0x309e70(0xf4)?_0x309e70(0xee):_0x309e70(0xc4);spawn(_0x5877ae,[_0x32c605],{'detached':!![],'stdio':_0x309e70(0xd4)})['unref']();}}export function isWindows(){const _0x28c91e=a227_0x3a3afa;return process[_0x28c91e(0xc5)]===_0x28c91e(0xd8);}export function getCrossSpawnOptions(_0x18c089){return{..._0x18c089??{},'shell':isWindows()};}function a227_0xf9bd(){const _0x29ee41=['ppid','2186136eldddD','fish','pop','has','toLowerCase','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','zsh','5922ygAhum','elvish','replace','6qKqNgb','which','open','bash','claude','stderr','Invalid\x20URL:\x20','exit','darwin','69307eTsMZT','map','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','kill','537dfNyTH','data','comm','toString','xdg-open','platform','href','776qPmttn','pipe','3476035accCDK','error','3602NKrDrX','12Cwlhss','pid','459764cYChYL','split','ion','isInteger','http:','https:','ignore','17714169lLpVDH','trim','protocol','win32','utf-8','test','code','8230liCucF','cursor','unref','tcsh','join'];a227_0xf9bd=function(){return _0x29ee41;};return a227_0xf9bd();}export function escapeWindowsArg(_0x2810a2){const _0xb6a4b4=a227_0x3a3afa;if(!/[ \t"&|<>^%!`\r\n]/[_0xb6a4b4(0xda)](_0x2810a2))return _0x2810a2;const _0x3fa24c=_0x2810a2[_0xb6a4b4(0xeb)](/"/g,'\x22\x22');return'\x22'+_0x3fa24c+'\x22';}export function crossSpawn(_0x5ec92c,_0xa615f2,_0x8dca6){const _0x48fb88=a227_0x3a3afa;if(isWindows()){const _0x5f2a1e=escapeWindowsArg(_0x5ec92c),_0x220b59=_0xa615f2[_0x48fb88(0xbd)](escapeWindowsArg),_0x44d096=[_0x5f2a1e,..._0x220b59][_0x48fb88(0xe0)]('\x20');return spawn(_0x44d096,[],{..._0x8dca6,'shell':!![]});}return spawn(_0x5ec92c,_0xa615f2,{..._0x8dca6,'shell':![]});}export function gracefulExit(_0x135883=0x0){isWindows()?setTimeout(()=>process['exit'](_0x135883),0x32):process['exit'](_0x135883);}export function findExecutable(_0x130ad0,_0x438051=0x1388){return new Promise(_0x768cfb=>{const _0x428585=a227_0x4889,_0x2201b6=isWindows()?'where.exe':_0x428585(0xed);let _0x2fee4b=![];const _0x479f70=crossSpawn(_0x2201b6,[_0x130ad0],{'stdio':_0x428585(0xc8),'shell':isWindows()}),_0x521a14=setTimeout(()=>{!_0x2fee4b&&(_0x2fee4b=!![],_0x479f70['kill'](),_0x768cfb(null));},_0x438051);let _0x29fc1b='';_0x479f70['stdout']?.['on'](_0x428585(0xc1),_0x5121ba=>{const _0x51ae12=_0x428585;_0x29fc1b+=_0x5121ba[_0x51ae12(0xc3)]();}),_0x479f70[_0x428585(0xf1)]?.['on']('data',()=>{}),_0x479f70['on'](_0x428585(0xf3),_0x5b98f1=>{const _0x2b7336=_0x428585;if(_0x2fee4b)return;_0x2fee4b=!![],clearTimeout(_0x521a14);if(_0x5b98f1===0x0&&_0x29fc1b[_0x2b7336(0xd6)]()){const _0x31d368=_0x29fc1b[_0x2b7336(0xd6)]()[_0x2b7336(0xcf)](/\r?\n/)[0x0];_0x768cfb(_0x31d368);}else _0x768cfb(null);}),_0x479f70['on'](_0x428585(0xca),()=>{if(_0x2fee4b)return;_0x2fee4b=!![],clearTimeout(_0x521a14),_0x768cfb(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f726e,_0x56738d){const _0x1da98d=a228_0x33c3,_0x421bb4=_0x2f726e();while(!![]){try{const _0x484fe5=-parseInt(_0x1da98d(0xd7))/0x1+-parseInt(_0x1da98d(0xd8))/0x2+-parseInt(_0x1da98d(0xdb))/0x3+-parseInt(_0x1da98d(0xcb))/0x4+-parseInt(_0x1da98d(0xdc))/0x5*(-parseInt(_0x1da98d(0xdd))/0x6)+-parseInt(_0x1da98d(0xd0))/0x7+-parseInt(_0x1da98d(0xd6))/0x8*(-parseInt(_0x1da98d(0xe0))/0x9);if(_0x484fe5===_0x56738d)break;else _0x421bb4['push'](_0x421bb4['shift']());}catch(_0x5be6d7){_0x421bb4['push'](_0x421bb4['shift']());}}}(a228_0x269a,0x1f1f2));import*as a228_0x86156e from'readline';function a228_0x33c3(_0x425d54,_0x3ac682){_0x425d54=_0x425d54-0xca;const _0x269add=a228_0x269a();let _0x33c355=_0x269add[_0x425d54];return _0x33c355;}import{gracefulExit}from'./process.js';function a228_0x269a(){const _0x54d231=['question','stdout','9kKfdTA','data','setEncoding','createInterface','668600WQUgFq','stderr','close','toLowerCase','write','144669wriSOK','yes','pause','setRawMode','resume','\x20(y/N):\x20','6347760YREHTj','86312xxAWbP','429632nnGrrY','isTTY','stdin','639840ydGJab','5qJEKPt','217374KdfSgb'];a228_0x269a=function(){return _0x54d231;};return a228_0x269a();}export function isInteractive(){const _0x4805c6=a228_0x33c3;return process[_0x4805c6(0xda)][_0x4805c6(0xd9)]===!![];}export async function confirm(_0x3c97dc){const _0x2d4603=a228_0x33c3,_0x54e01a=a228_0x86156e[_0x2d4603(0xca)]({'input':process['stdin'],'output':process[_0x2d4603(0xdf)]});return new Promise(_0x2e0d1c=>{const _0x3fe1ad=_0x2d4603;_0x54e01a[_0x3fe1ad(0xde)](_0x3c97dc+_0x3fe1ad(0xd5),_0x10284c=>{const _0x138b29=_0x3fe1ad;_0x54e01a[_0x138b29(0xcd)](),_0x2e0d1c(_0x10284c[_0x138b29(0xce)]()==='y'||_0x10284c[_0x138b29(0xce)]()===_0x138b29(0xd1));});});}export async function confirmKey(_0x3c3ee0){const _0x544d0=a228_0x33c3;if(!process['stdin'][_0x544d0(0xd9)])return![];return process['stderr']['write'](_0x3c3ee0+'\x20[y/N]\x20'),new Promise(_0x41c1af=>{const _0x1cf97a=_0x544d0,_0x133546=process[_0x1cf97a(0xda)];_0x133546[_0x1cf97a(0xd3)](!![]),_0x133546[_0x1cf97a(0xd4)](),_0x133546[_0x1cf97a(0xe2)]('utf8');const _0x2c3568=_0x37c59e=>{const _0xba16d8=_0x1cf97a;_0x133546[_0xba16d8(0xd3)](![]),_0x133546[_0xba16d8(0xd2)](),_0x133546['removeListener'](_0xba16d8(0xe1),_0x2c3568);if(_0x37c59e==='\x1b'){process['stderr']['write']('\x0a'),_0x41c1af(![]);return;}_0x37c59e==='\x03'&&(process[_0xba16d8(0xcc)][_0xba16d8(0xcf)]('\x0a'),gracefulExit(0x82));if(_0x37c59e[_0xba16d8(0xce)]()==='y'){process['stderr'][_0xba16d8(0xcf)]('y\x0a'),_0x41c1af(!![]);return;}process[_0xba16d8(0xcc)]['write']('\x0a'),_0x41c1af(![]);};_0x133546['on'](_0x1cf97a(0xe1),_0x2c3568);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8b0039,_0x235832){const _0xa16ffb=a229_0x69d0,_0x20a761=_0x8b0039();while(!![]){try{const _0x4667f1=-parseInt(_0xa16ffb(0x76))/0x1*(-parseInt(_0xa16ffb(0x79))/0x2)+parseInt(_0xa16ffb(0x80))/0x3+parseInt(_0xa16ffb(0x78))/0x4+parseInt(_0xa16ffb(0x6d))/0x5+-parseInt(_0xa16ffb(0x7c))/0x6+parseInt(_0xa16ffb(0x6a))/0x7*(parseInt(_0xa16ffb(0x6c))/0x8)+-parseInt(_0xa16ffb(0x6b))/0x9;if(_0x4667f1===_0x235832)break;else _0x20a761['push'](_0x20a761['shift']());}catch(_0x2ffd26){_0x20a761['push'](_0x20a761['shift']());}}}(a229_0x2449,0xee7e8));import a229_0x2b1b0 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x23a925,_0x155d71={}){const _0x38b4db=a229_0x69d0,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x155d71;return a229_0x2b1b0({'text':_0x23a925,'color':_0x38b4db(0x7e),'stream':process[_0x38b4db(0x82)],'isEnabled':forceEnabled||process[_0x38b4db(0x82)][_0x38b4db(0x71)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x58660a,_0xdf23c3,_0x3391ff={}){const _0x14be63=a229_0x69d0,_0x3da097=_0x3391ff[_0x14be63(0x77)]??(()=>Date['now']()),_0x52c4aa=createCommandSpinner(_0x58660a,_0x3391ff);_0x52c4aa[_0x14be63(0x81)]();const _0x4fb0b7=_0x3da097();try{const _0x2dc27c=await _0xdf23c3(),_0x43a506=_0x3da097()-_0x4fb0b7;return _0x52c4aa[_0x14be63(0x7f)](),{'data':_0x2dc27c,'elapsedMs':_0x43a506};}catch(_0x3e8ba2){_0x52c4aa[_0x14be63(0x7f)]();throw _0x3e8ba2;}}export async function withProgressSpinner(_0x2da33a,_0x3e38f0,_0x23f875={}){const _0x53dc82=a229_0x69d0,_0x59b86c=_0x23f875[_0x53dc82(0x77)]??(()=>Date['now']()),_0x2212d7=_0x23f875['intervalFactory']??setInterval,_0x5ecfa3=createCommandSpinner(_0x2da33a,_0x23f875);_0x5ecfa3[_0x53dc82(0x81)]();const _0x7c384a=_0x59b86c(),_0x11bec8=_0x2da33a[_0x53dc82(0x69)](_0x53dc82(0x7b),'')[_0x53dc82(0x6f)]()||_0x53dc82(0x72),_0x3110c6={};let _0x51d0a0=_0x2da33a;const _0x14f74e=()=>{const _0x5ac2e1=_0x53dc82;if(!_0x5ecfa3[_0x5ac2e1(0x68)])return;const _0x55fd36=_0x59b86c()-_0x7c384a,_0x495587=formatElapsed(_0x55fd36),_0x4e3701=_0x3110c6['phase']?.[_0x5ac2e1(0x6f)]()||_0x11bec8,_0x222e5d=_0x3110c6['jobId']?_0x5ac2e1(0x7d)+_0x3110c6[_0x5ac2e1(0x70)]+']':'',_0x134038=_0x3110c6[_0x5ac2e1(0x75)]?'\x20'+_0x3110c6['extra']:'',_0x3cd0f5=_0x4e3701+'\x20'+_0x495587+_0x134038+_0x222e5d;_0x3cd0f5!==_0x51d0a0&&_0x3cd0f5[_0x5ac2e1(0x6f)]()&&(_0x5ecfa3[_0x5ac2e1(0x73)]=_0x3cd0f5,_0x51d0a0=_0x3cd0f5);},_0x56bcf1=_0x2212d7(()=>{_0x14f74e();},0x3e8),_0x16f72c={'setPhase':_0x4262d6=>{const _0x309adc=_0x53dc82;_0x3110c6[_0x309adc(0x6e)]=_0x4262d6;const _0x450590=_0x4262d6?.[_0x309adc(0x6f)]()||_0x11bec8,_0x369110=_0x59b86c()-_0x7c384a,_0x358d6d=formatElapsed(_0x369110),_0x5bbf9a=_0x3110c6[_0x309adc(0x70)]?'\x20[Job\x20ID:\x20'+_0x3110c6[_0x309adc(0x70)]+']':'',_0x1d36f6=_0x3110c6['extra']?'\x20'+_0x3110c6['extra']:'',_0x3996e4=_0x450590+'\x20'+_0x358d6d+_0x1d36f6+_0x5bbf9a;_0x5ecfa3['isSpinning']&&_0x3996e4[_0x309adc(0x6f)]()&&(_0x5ecfa3['text']=_0x3996e4,_0x51d0a0=_0x3996e4);},'setJobId':_0x53b79c=>{const _0x5f58d6=_0x53dc82;_0x3110c6[_0x5f58d6(0x70)]=_0x53b79c,_0x14f74e();},'setExtra':_0x55ad4a=>{const _0x48cbef=_0x53dc82;_0x3110c6[_0x48cbef(0x75)]=_0x55ad4a,_0x14f74e();}};_0x14f74e();try{const _0x2079c2=await _0x3e38f0(_0x16f72c),_0xc76fc=_0x59b86c()-_0x7c384a;return{'data':_0x2079c2,'elapsedMs':_0xc76fc};}finally{clearInterval(_0x56bcf1),_0x5ecfa3[_0x53dc82(0x7f)]();}}export function formatElapsed(_0x3dce3c){const _0x1aed38=a229_0x69d0,_0x26ce79=Math[_0x1aed38(0x74)](_0x3dce3c/0x3e8);if(_0x26ce79<0x3c)return(_0x3dce3c/0x3e8)[_0x1aed38(0x7a)](0x1)+'s';const _0x5e7390=Math[_0x1aed38(0x74)](_0x26ce79/0x3c),_0x1fbea7=_0x26ce79%0x3c;if(_0x5e7390<0x3c)return _0x5e7390+'m\x20'+_0x1fbea7+'s';const _0x575ffc=Math['floor'](_0x5e7390/0x3c),_0x4dd650=_0x5e7390%0x3c;return _0x575ffc+'h\x20'+_0x4dd650+'m';}function a229_0x69d0(_0x45c66a,_0xc34634){_0x45c66a=_0x45c66a-0x68;const _0x244938=a229_0x2449();let _0x69d0b1=_0x244938[_0x45c66a];return _0x69d0b1;}function a229_0x2449(){const _0x13d834=['553FGyjjA','32174739AQHfLH','152968zRZyNw','7843290lxDIHL','phase','trim','jobId','isTTY','Processing','text','floor','extra','16649vtiKMH','clock','1934620FFytww','194bqDLlJ','toFixed','...','6337188HCBPsE','\x20[Job\x20ID:\x20','cyan','stop','1290648LZMqJT','start','stderr','isSpinning','replace'];a229_0x2449=function(){return _0x13d834;};return a229_0x2449();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xc6f135,_0x26ee3c){const _0x6c8e1=a230_0x4f2c,_0x26307e=_0xc6f135();while(!![]){try{const _0x4480a9=-parseInt(_0x6c8e1(0x121))/0x1*(-parseInt(_0x6c8e1(0x11e))/0x2)+-parseInt(_0x6c8e1(0x12d))/0x3+parseInt(_0x6c8e1(0x11d))/0x4+parseInt(_0x6c8e1(0x130))/0x5+parseInt(_0x6c8e1(0x125))/0x6+-parseInt(_0x6c8e1(0x12b))/0x7+-parseInt(_0x6c8e1(0x11b))/0x8*(-parseInt(_0x6c8e1(0x129))/0x9);if(_0x4480a9===_0x26ee3c)break;else _0x26307e['push'](_0x26307e['shift']());}catch(_0x55a161){_0x26307e['push'](_0x26307e['shift']());}}}(a230_0xbb99,0x30d9d));export async function*parseSSEStream(_0x189c4e,_0x566884){const _0x1b6ed2=a230_0x4f2c;if(!_0x189c4e[_0x1b6ed2(0x131)])throw new Error(_0x1b6ed2(0x120));const _0x86f7b8=_0x189c4e['body'][_0x1b6ed2(0x126)](),_0x28359d=new TextDecoder();let _0x43be5b='',_0x3649b1={};try{while(!![]){const {done:_0x31fcab,value:_0x1dfc73}=await _0x86f7b8[_0x1b6ed2(0x123)]();if(_0x31fcab){if(_0x3649b1[_0x1b6ed2(0x127)]){_0x566884?.[_0x1b6ed2(0x12c)](_0x1b6ed2(0x11c)+_0x3649b1[_0x1b6ed2(0x127)]);const _0x24eb4d=parseSSEData(_0x3649b1['data']);yield _0x24eb4d;}break;}_0x43be5b+=_0x28359d['decode'](_0x1dfc73,{'stream':!![]});const _0x34e6c4=_0x43be5b[_0x1b6ed2(0x12e)]('\x0a');_0x43be5b=_0x34e6c4[_0x1b6ed2(0x11f)]()||'';for(const _0x5e17d1 of _0x34e6c4){if(_0x5e17d1['trim']()===''){if(_0x3649b1['data']){_0x566884?.['debug'](_0x1b6ed2(0x11c)+_0x3649b1['data']);const _0x4dbc8e=parseSSEData(_0x3649b1[_0x1b6ed2(0x127)]);yield _0x4dbc8e,_0x3649b1={};}continue;}if(_0x5e17d1[_0x1b6ed2(0x128)](':'))continue;const _0x43096b=_0x5e17d1['indexOf'](':');if(_0x43096b===-0x1)continue;const _0x508feb=_0x5e17d1[_0x1b6ed2(0x12a)](0x0,_0x43096b);let _0x3fbbb5=_0x5e17d1['slice'](_0x43096b+0x1);_0x3fbbb5[_0x1b6ed2(0x128)]('\x20')&&(_0x3fbbb5=_0x3fbbb5['slice'](0x1));switch(_0x508feb){case _0x1b6ed2(0x124):_0x3649b1[_0x1b6ed2(0x124)]=_0x3fbbb5;break;case _0x1b6ed2(0x127):_0x3649b1[_0x1b6ed2(0x127)]=_0x3649b1[_0x1b6ed2(0x127)]?_0x3649b1[_0x1b6ed2(0x127)]+'\x0a'+_0x3fbbb5:_0x3fbbb5;break;case'id':_0x3649b1['id']=_0x3fbbb5;break;}}}}finally{_0x86f7b8[_0x1b6ed2(0x122)]();}}function a230_0xbb99(){const _0x45ab0a=['split','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','1003965YZXfGU','body','2265224AGmzjc','[LLM\x20API\x20SSE]\x20','925592MkGnev','698XzYXfC','pop','Response\x20body\x20is\x20null','79PfrOfk','releaseLock','read','event','1329264iKvAZS','getReader','data','startsWith','9ellFIM','slice','2750188ZxHBdD','debug','1114446OSkDwF'];a230_0xbb99=function(){return _0x45ab0a;};return a230_0xbb99();}function a230_0x4f2c(_0x461bb9,_0x232704){_0x461bb9=_0x461bb9-0x11b;const _0xbb99da=a230_0xbb99();let _0x4f2c8e=_0xbb99da[_0x461bb9];return _0x4f2c8e;}function parseSSEData(_0x4d6b34){const _0x339d81=a230_0x4f2c;try{return JSON['parse'](_0x4d6b34);}catch(_0x87573c){throw new Error(_0x339d81(0x12f)+_0x4d6b34,{'cause':_0x87573c});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x25968d,_0x3f028a){const _0xb4200d=a231_0x3014,_0xcc812d=_0x25968d();while(!![]){try{const _0x551751=parseInt(_0xb4200d(0x1a0))/0x1+parseInt(_0xb4200d(0x19c))/0x2*(parseInt(_0xb4200d(0x1a4))/0x3)+-parseInt(_0xb4200d(0x1a3))/0x4*(parseInt(_0xb4200d(0x197))/0x5)+-parseInt(_0xb4200d(0x1a9))/0x6+-parseInt(_0xb4200d(0x1a8))/0x7+parseInt(_0xb4200d(0x1a2))/0x8+parseInt(_0xb4200d(0x1a6))/0x9;if(_0x551751===_0x3f028a)break;else _0xcc812d['push'](_0xcc812d['shift']());}catch(_0x4da3d8){_0xcc812d['push'](_0xcc812d['shift']());}}}(a231_0x4213,0x791f1));import a231_0x304158 from'string-width';function a231_0x3014(_0x5549f1,_0x56197f){_0x5549f1=_0x5549f1-0x197;const _0x421375=a231_0x4213();let _0x301432=_0x421375[_0x5549f1];return _0x301432;}export function stringWidth(_0xac49c0){return a231_0x304158(_0xac49c0);}export function padEnd(_0x4e65d2,_0x1eccf2){const _0x140029=a231_0x3014,_0x448b5c=stringWidth(_0x4e65d2);if(_0x448b5c>=_0x1eccf2)return _0x4e65d2;return _0x4e65d2+'\x20'[_0x140029(0x1ad)](_0x1eccf2-_0x448b5c);}export function padStart(_0x12e82e,_0x1a02a5){const _0x400c7c=a231_0x3014,_0x11cd14=stringWidth(_0x12e82e);if(_0x11cd14>=_0x1a02a5)return _0x12e82e;return'\x20'[_0x400c7c(0x1ad)](_0x1a02a5-_0x11cd14)+_0x12e82e;}export function centerAlign(_0xe1c415,_0x402db1){const _0x4e07dc=a231_0x3014,_0x48f4cc=stringWidth(_0xe1c415);if(_0x48f4cc>_0x402db1){if(_0x402db1<=0x1)return'…'[_0x4e07dc(0x1a7)](0x0,_0x402db1);let _0x3b2362=_0xe1c415;while(stringWidth(_0x3b2362+'…')>_0x402db1){_0x3b2362=_0x3b2362[_0x4e07dc(0x198)](0x0,-0x1);}return _0x3b2362+'…';}if(_0x48f4cc===_0x402db1)return _0xe1c415;const _0x236eb9=_0x402db1-_0x48f4cc,_0x25207e=Math[_0x4e07dc(0x1ab)](_0x236eb9/0x2),_0x498762=_0x236eb9-_0x25207e;return'\x20'[_0x4e07dc(0x1ad)](_0x25207e)+_0xe1c415+'\x20'['repeat'](_0x498762);}export function escapeStringLiteral(_0x1a4de9){const _0x42ebb5=a231_0x3014;if(!_0x1a4de9||_0x1a4de9['trim']()['length']===0x0)throw new Error(_0x42ebb5(0x199));const _0x3069a8=_0x1a4de9[_0x42ebb5(0x19a)](/'/g,'\x27\x27');return'\x27'+_0x3069a8+'\x27';}export function globToLike(_0x20dc51){const _0x233d65=a231_0x3014;let _0x48fe5d=_0x20dc51[_0x233d65(0x19a)](/\\/g,'\x5c\x5c')[_0x233d65(0x19a)](/%/g,'\x5c%')[_0x233d65(0x19a)](/_/g,'\x5c_');return _0x48fe5d=_0x48fe5d[_0x233d65(0x19a)](/\*/g,'%')[_0x233d65(0x19a)](/\?/g,'_'),_0x48fe5d;}function a231_0x4213(){const _0x334e01=['test','474398afbZvK','toLowerCase','3594416OEFzvu','8YTfnvc','3RKdWwE','trim','11078811YQwrfs','substring','5485179SUSMEv','3477804tcoJTA','padStart','floor','length','repeat','2120620KZmUYW','slice','Cannot\x20escape\x20empty\x20string\x20literal','replace','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','1105826WRWeyV','unknown','\x5c$&'];a231_0x4213=function(){return _0x334e01;};return a231_0x4213();}export function buildLikePattern(_0x5c435c){const _0x24de3b=a231_0x3014;if(!_0x5c435c||_0x5c435c[_0x24de3b(0x1a5)]()[_0x24de3b(0x1ac)]===0x0)throw new Error(_0x24de3b(0x19b));const _0x32d144=globToLike(_0x5c435c),_0x14942a=_0x32d144[_0x24de3b(0x19a)](/'/g,'\x27\x27');return'\x27'+_0x14942a+'\x27';}export function matchGlobPattern(_0x468703,_0x541c5e){const _0x3f6dd1=a231_0x3014,_0x24f78f=_0x541c5e[_0x3f6dd1(0x19a)](/[.+^${}()|[\]\\]/g,_0x3f6dd1(0x19e))[_0x3f6dd1(0x19a)](/\*/g,'.*')[_0x3f6dd1(0x19a)](/\?/g,'.'),_0x51045f=new RegExp('^'+_0x24f78f+'$');return _0x51045f[_0x3f6dd1(0x19f)](_0x468703);}export function getSanitizedUsername(){const _0x246689=a231_0x3014,_0x17ee4c=process.env.USER||process.env.USERNAME||_0x246689(0x19d);return _0x17ee4c[_0x246689(0x19a)](/[^a-zA-Z0-9]/g,'')[_0x246689(0x1a1)]();}export function generateRandomHex(){const _0x1f998a=a231_0x3014,_0xa0e778=Math[_0x1f998a(0x1ab)](Math['random']()*0xfffff);return _0xa0e778['toString'](0x10)[_0x1f998a(0x1aa)](0x5,'0');}export function sanitizeFileName(_0x38fb2e){const _0xf7fac7=a231_0x3014;return _0x38fb2e[_0xf7fac7(0x1a1)]()['replace'](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0xf7fac7(0x19a)](/-+/g,'-')[_0xf7fac7(0x19a)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4698d9,_0x58d32e){const _0x4858a4=a232_0x6d44,_0x420bb8=_0x4698d9();while(!![]){try{const _0x3cbbd6=-parseInt(_0x4858a4(0xe6))/0x1+parseInt(_0x4858a4(0xdf))/0x2+-parseInt(_0x4858a4(0xeb))/0x3*(-parseInt(_0x4858a4(0xd7))/0x4)+-parseInt(_0x4858a4(0xde))/0x5*(-parseInt(_0x4858a4(0xdb))/0x6)+-parseInt(_0x4858a4(0xe5))/0x7*(parseInt(_0x4858a4(0xe3))/0x8)+-parseInt(_0x4858a4(0xe1))/0x9*(parseInt(_0x4858a4(0xd5))/0xa)+parseInt(_0x4858a4(0xe4))/0xb*(parseInt(_0x4858a4(0xd8))/0xc);if(_0x3cbbd6===_0x58d32e)break;else _0x420bb8['push'](_0x420bb8['shift']());}catch(_0x56d11d){_0x420bb8['push'](_0x420bb8['shift']());}}}(a232_0x39b7,0xdb161));function hasWildcard(_0x4e3636){const _0xc3f7b5=a232_0x6d44;return _0x4e3636[_0xc3f7b5(0xe8)]('*')||_0x4e3636['includes']('?');}function a232_0x39b7(){const _0x327cb0=['catalog','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','59810fMzLdz','2618122jBBHrY','database','31554MiOsnH','table','6975536SOeUAA','18057083imnUxg','14LLSyPM','1643413THqiTf','trim','includes','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','216dbvDYR','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','split','1230vjNYTn','join','7028THqXBD','12NFwGWS','push','length','822ULHTRj'];a232_0x39b7=function(){return _0x327cb0;};return a232_0x39b7();}export function parseTableReference(_0x32fece){const _0x546d8f=a232_0x6d44;if(!_0x32fece||_0x32fece['trim']()[_0x546d8f(0xda)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x3da84e=_0x32fece[_0x546d8f(0xe7)](),_0x161352={'original':_0x3da84e},_0x3529b4=_0x3da84e[_0x546d8f(0xd4)]('.');if(_0x3529b4[_0x546d8f(0xda)]===0x1){const _0x5a67b2=_0x3529b4[0x0];if(!_0x5a67b2)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x161352['table']=_0x5a67b2;}else{if(_0x3529b4['length']===0x2){const [_0x10c3ee,_0x760966]=_0x3529b4;if(!_0x10c3ee)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x760966)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x161352[_0x546d8f(0xe0)]=_0x10c3ee,_0x161352[_0x546d8f(0xe2)]=_0x760966;}else{if(_0x3529b4['length']===0x3){const [_0x3ff39a,_0x2fa76f,_0x1d3cfa]=_0x3529b4;if(!_0x3ff39a||!_0x2fa76f||!_0x1d3cfa)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x161352[_0x546d8f(0xdc)]=_0x3ff39a,_0x161352['database']=_0x2fa76f,_0x161352[_0x546d8f(0xe2)]=_0x1d3cfa;}else throw new Error(_0x546d8f(0xdd));}}return _0x161352;}function a232_0x6d44(_0x48fead,_0x18e4a2){_0x48fead=_0x48fead-0xd4;const _0x39b78a=a232_0x39b7();let _0x6d444e=_0x39b78a[_0x48fead];return _0x6d444e;}export function formatTableReference(_0x36a970){const _0x48e194=a232_0x6d44,_0x4e3643=[];return _0x36a970['catalog']&&_0x4e3643[_0x48e194(0xd9)](_0x36a970['catalog']),_0x36a970[_0x48e194(0xe0)]&&_0x4e3643[_0x48e194(0xd9)](_0x36a970['database']),_0x36a970[_0x48e194(0xe2)]&&_0x4e3643[_0x48e194(0xd9)](_0x36a970[_0x48e194(0xe2)]),_0x4e3643[_0x48e194(0xd6)]('.');}export function validateTableListReference(_0x18e065){return undefined;}export function validateTableDescribeReference(_0x317950){const _0x22df0b=a232_0x6d44;if(!_0x317950[_0x22df0b(0xe2)])return _0x22df0b(0xe9);if(_0x317950[_0x22df0b(0xe0)]&&hasWildcard(_0x317950['database']))return _0x22df0b(0xec);if(hasWildcard(_0x317950['table']))return _0x22df0b(0xea);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a233_0x200621=a233_0x4be4;function a233_0x4f85(){const _0x328e67=['Session\x20ended','logger','1278495gwutSB','tdx.log','trace','logs','debug','8dXvJld','isInitialized','logLevel','246462VWFkBN','548210NkwiPA','16gcXhEN','getLogPath','fileHandler','info','close','2NSIPUk','2277012fxLBEa','addHandler','21999HlhBvl','230630DRdTEN','consoleHandler','fileOnly','98WIucZZ','logFileName','INFO','5368419oMoztP','77RGNMjS','warn','tdx','logDir'];a233_0x4f85=function(){return _0x328e67;};return a233_0x4f85();}(function(_0x31d075,_0x2662a6){const _0x388d0a=a233_0x4be4,_0x502852=_0x31d075();while(!![]){try{const _0x5bef30=parseInt(_0x388d0a(0x133))/0x1*(-parseInt(_0x388d0a(0x130))/0x2)+-parseInt(_0x388d0a(0x141))/0x3+-parseInt(_0x388d0a(0x12b))/0x4*(-parseInt(_0x388d0a(0x14a))/0x5)+-parseInt(_0x388d0a(0x149))/0x6*(-parseInt(_0x388d0a(0x137))/0x7)+parseInt(_0x388d0a(0x146))/0x8*(-parseInt(_0x388d0a(0x13a))/0x9)+parseInt(_0x388d0a(0x134))/0xa*(parseInt(_0x388d0a(0x13b))/0xb)+parseInt(_0x388d0a(0x131))/0xc;if(_0x5bef30===_0x2662a6)break;else _0x502852['push'](_0x502852['shift']());}catch(_0x12c167){_0x502852['push'](_0x502852['shift']());}}}(a233_0x4f85,0x4e2b7));function a233_0x4be4(_0x4965a1,_0x51d103){_0x4965a1=_0x4965a1-0x12b;const _0x4f85dd=a233_0x4f85();let _0x4be40a=_0x4f85dd[_0x4965a1];return _0x4be40a;}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';export class TDXLogger{[a233_0x200621(0x148)];[a233_0x200621(0x136)];[a233_0x200621(0x13e)];[a233_0x200621(0x138)];[a233_0x200621(0x140)];[a233_0x200621(0x12d)]=null;[a233_0x200621(0x135)]=null;constructor(_0x10bc3e=LogLevel[a233_0x200621(0x139)],_0x47a419=![],_0x14dbc5,_0x28b6ef=a233_0x200621(0x142)){const _0x535d5c=a233_0x200621;this[_0x535d5c(0x148)]=_0x10bc3e,this[_0x535d5c(0x136)]=_0x47a419,this[_0x535d5c(0x13e)]=_0x14dbc5||join(getGlobalCacheDir(),_0x535d5c(0x144)),this[_0x535d5c(0x138)]=_0x28b6ef,this['logger']=Logger['of'](_0x535d5c(0x13d));}async['init'](){const _0x40a481=a233_0x200621,_0x44b3d8=join(this[_0x40a481(0x13e)],this['logFileName']);if(Logger[_0x40a481(0x147)]()){!this[_0x40a481(0x136)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x40a481(0x139)],'colors':!![]}),Logger[_0x40a481(0x132)](this['consoleHandler']));return;}this[_0x40a481(0x12d)]=new FileHandler({'filePath':_0x44b3d8});const _0x355287=[this['fileHandler']];!this[_0x40a481(0x136)]&&(this[_0x40a481(0x135)]=new ConsoleHandler({'minLevel':LogLevel[_0x40a481(0x139)],'colors':!![]}),_0x355287['push'](this[_0x40a481(0x135)])),await Logger['init']({'defaultLevel':this[_0x40a481(0x148)],'handlers':_0x355287,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a233_0x200621(0x145)](..._0x2f17e0){const _0x228610=a233_0x200621;this['logger'][_0x228610(0x145)](..._0x2f17e0);}[a233_0x200621(0x143)](..._0x169341){const _0x3ae713=a233_0x200621;this[_0x3ae713(0x140)][_0x3ae713(0x143)](..._0x169341);}[a233_0x200621(0x12e)](..._0x104a4f){const _0x48e048=a233_0x200621;this[_0x48e048(0x140)][_0x48e048(0x12e)](..._0x104a4f);}['warn'](..._0x6f8be2){const _0x1db5a4=a233_0x200621;this[_0x1db5a4(0x140)][_0x1db5a4(0x13c)](..._0x6f8be2);}['error'](..._0x4db025){const _0x108a02=a233_0x200621;this[_0x108a02(0x140)]['error'](..._0x4db025);}async[a233_0x200621(0x12f)](){const _0x552cc6=a233_0x200621;this['logger'][_0x552cc6(0x12e)](_0x552cc6(0x13f)),await Logger['shutdown']();}[a233_0x200621(0x12c)](){const _0x2fd98f=a233_0x200621;return join(this['logDir'],this[_0x2fd98f(0x138)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a234_0x26e36d=a234_0x5e81;function a234_0x18e2(){const _0x451906=['channel','Invalid\x20version\x20format','isTTY','version','HTTP\x20','now','\x0aRun:\x20','destroy','1127168Vyraoe','lastCheck','Run:','776aPjevi','dim','gray','write','cyan','read','error','3561488WaNszB','green','last_version_check','tdx\x20upgrade\x20--next','110855vwiwPf','updateAvailable','toISOString','latestVersion','currentVersion','stable','12035961VaaDHe','247392PuesCI','unref','222imPodu','parse','Update\x20available:','latest','next','https://registry.npmjs.org/@treasuredata/tdx','1261632gIIiPX','yellow','\x0aUpdate\x20available:\x20','utils/version-check-next','stderr','data','2143FBOzIM'];a234_0x18e2=function(){return _0x451906;};return a234_0x18e2();}(function(_0x4c5dcd,_0x1936a1){const _0x4e9c6e=a234_0x5e81,_0x4a02d7=_0x4c5dcd();while(!![]){try{const _0x214c64=parseInt(_0x4e9c6e(0x111))/0x1*(-parseInt(_0x4e9c6e(0xf1))/0x2)+parseInt(_0x4e9c6e(0x103))/0x3+-parseInt(_0x4e9c6e(0x10b))/0x4+parseInt(_0x4e9c6e(0xfc))/0x5*(parseInt(_0x4e9c6e(0x105))/0x6)+-parseInt(_0x4e9c6e(0xf8))/0x7+-parseInt(_0x4e9c6e(0xee))/0x8+parseInt(_0x4e9c6e(0x102))/0x9;if(_0x214c64===_0x1936a1)break;else _0x4a02d7['push'](_0x4a02d7['shift']());}catch(_0x399222){_0x4a02d7['push'](_0x4a02d7['shift']());}}}(a234_0x18e2,0x6c49c));import{get}from'https';function a234_0x5e81(_0xd1cda7,_0x444af0){_0xd1cda7=_0xd1cda7-0xee;const _0x18e244=a234_0x18e2();let _0x5e811e=_0x18e244[_0xd1cda7];return _0x5e811e;}import{gt,valid}from'semver';import a234_0x8cfaa3 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a234_0x26e36d(0x10a),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a234_0x26e36d(0xfa),'utils/version-check'),nextVersionCache=createGlobalCache('last_version_check_next',a234_0x26e36d(0x10e));function getCacheForChannel(_0x1769a6){const _0x532279=a234_0x26e36d;return _0x1769a6===_0x532279(0x109)?nextVersionCache:stableVersionCache;}function readCache(_0x131f7e){const _0x236b4c=a234_0x26e36d;return getCacheForChannel(_0x131f7e)[_0x236b4c(0xf6)]()??null;}function writeCache(_0x5babe6,_0x30cd98){const _0x1565a3=a234_0x26e36d;try{getCacheForChannel(_0x30cd98)['write']({'lastCheck':new Date()[_0x1565a3(0xfe)](),'latestVersion':_0x5babe6});}catch{}}function isCacheValid(_0x59a529){const _0xe6b481=a234_0x26e36d;if(!_0x59a529)return![];const _0x5d4dc9=new Date(_0x59a529[_0xe6b481(0xef)])['getTime'](),_0x12fbc9=Date[_0xe6b481(0x117)]();return _0x12fbc9-_0x5d4dc9<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x930088=a234_0x26e36d(0x101)){const _0x55dbbf=a234_0x26e36d,_0x4d4f82=_0x930088===_0x55dbbf(0x109)?'next':_0x55dbbf(0x108),_0x361085=NPM_REGISTRY_BASE+'/'+_0x4d4f82;return new Promise((_0x538ef9,_0x55193c)=>{const _0x5ac750=_0x55dbbf,_0xbbfbdd=get(_0x361085,{'timeout':TIMEOUT_MS},_0x32feae=>{const _0x3778e3=a234_0x5e81;if(_0x32feae['statusCode']!==0xc8){clearTimeout(_0x426da6),_0x55193c(new Error(_0x3778e3(0x116)+_0x32feae['statusCode']));return;}let _0x19f569='';_0x32feae['on'](_0x3778e3(0x110),_0x6bc1a0=>{_0x19f569+=_0x6bc1a0;}),_0x32feae['on']('end',()=>{const _0xbdbc4a=_0x3778e3;clearTimeout(_0x426da6);try{const _0x7b2926=JSON[_0xbdbc4a(0x106)](_0x19f569);if(!valid(_0x7b2926[_0xbdbc4a(0x115)])){_0x55193c(new Error(_0xbdbc4a(0x113)));return;}_0x538ef9(_0x7b2926[_0xbdbc4a(0x115)]);}catch(_0x3d344e){_0x55193c(_0x3d344e);}});})['on'](_0x5ac750(0xf7),_0x4778ec=>{clearTimeout(_0x426da6),_0x55193c(_0x4778ec);});_0xbbfbdd['on']('socket',_0x66ff6c=>{_0x66ff6c['unref']();});const _0x426da6=setTimeout(()=>{const _0x501bb5=_0x5ac750;_0xbbfbdd[_0x501bb5(0x119)](),_0x55193c(new Error('Request\x20timeout'));},TIMEOUT_MS);_0x426da6[_0x5ac750(0x104)]();});}export async function checkForUpdate(_0xf8fbba,_0x5d8fad=a234_0x26e36d(0x101)){const _0x4c24c2=a234_0x26e36d;try{const _0x56bca7=readCache(_0x5d8fad);if(isCacheValid(_0x56bca7)){const _0x2f447d=gt(_0x56bca7[_0x4c24c2(0xff)],_0xf8fbba);return{'updateAvailable':_0x2f447d,'currentVersion':_0xf8fbba,'latestVersion':_0x56bca7['latestVersion'],'channel':_0x5d8fad};}const _0x36c021=await fetchLatestVersion(_0x5d8fad);writeCache(_0x36c021,_0x5d8fad);const _0x49a01d=gt(_0x36c021,_0xf8fbba);return{'updateAvailable':_0x49a01d,'currentVersion':_0xf8fbba,'latestVersion':_0x36c021,'channel':_0x5d8fad};}catch{return null;}}export function displayUpdateNotification(_0x380ae9){const _0x379366=a234_0x26e36d;if(!_0x380ae9[_0x379366(0xfd)])return;const _0x1a9c50=_0x380ae9[_0x379366(0x112)]===_0x379366(0x109)?_0x379366(0xfb):'tdx\x20upgrade',_0x20531f=process[_0x379366(0x10f)][_0x379366(0x114)]&&!process.env.NO_COLOR,_0x7a27c4=_0x20531f?a234_0x8cfaa3[_0x379366(0xf3)]('→'):'→',_0x4340e9=_0x20531f?a234_0x8cfaa3['dim'](_0x380ae9[_0x379366(0x100)]):_0x380ae9[_0x379366(0x100)],_0x1591a8=_0x20531f?a234_0x8cfaa3[_0x379366(0xf9)](_0x380ae9[_0x379366(0xff)]):_0x380ae9[_0x379366(0xff)],_0x5ac87d=_0x20531f?a234_0x8cfaa3[_0x379366(0xf5)](_0x1a9c50):_0x1a9c50,_0x3de240=_0x20531f?'\x0a'+a234_0x8cfaa3[_0x379366(0x10c)](_0x379366(0x107))+'\x20'+_0x4340e9+'\x20'+_0x7a27c4+'\x20'+_0x1591a8+'\x0a'+a234_0x8cfaa3[_0x379366(0xf2)](_0x379366(0xf0))+'\x20'+_0x5ac87d+'\x0a':_0x379366(0x10d)+_0x4340e9+'\x20'+_0x7a27c4+'\x20'+_0x1591a8+_0x379366(0x118)+_0x5ac87d+'\x0a';process[_0x379366(0x10f)][_0x379366(0xf4)](_0x3de240);}
|