@treasuredata/tdx 0.16.16 → 0.16.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.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/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.d.ts.map +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-run.js.map +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.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/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.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/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-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.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/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5efb63,_0x3bc0c5){const _0x258010=a172_0x2c5f,_0xad07af=_0x5efb63();while(!![]){try{const _0x3bb691=-parseInt(_0x258010(0x1c0))/0x1+parseInt(_0x258010(0x1be))/0x2*(parseInt(_0x258010(0x1c2))/0x3)+parseInt(_0x258010(0x1b8))/0x4*(parseInt(_0x258010(0x1bc))/0x5)+-parseInt(_0x258010(0x1bf))/0x6+-parseInt(_0x258010(0x1b5))/0x7+parseInt(_0x258010(0x1b4))/0x8+-parseInt(_0x258010(0x1b9))/0x9*(-parseInt(_0x258010(0x1c1))/0xa);if(_0x3bb691===_0x3bc0c5)break;else _0xad07af['push'](_0xad07af['shift']());}catch(_0x499de2){_0xad07af['push'](_0xad07af['shift']());}}}(a172_0x2179,0xdceb9));function a172_0x2179(){const _0x1d3535=['1173913DayBSz','10EaqWXS','2086110MbFPDh','12365368uMnTrN','7173068YGOoVM','Invalid\x20limit\x20value:\x20','.\x20Must\x20be\x20an\x20integer.','1936492TmDQor','14693391PIppuU','.\x20Must\x20be\x20a\x20positive\x20integer.','.\x20Must\x20be\x20a\x20number.','5WVgdQk','Invalid\x20timeout\x20value:\x20','2qTQDpm','7525422OEQXtE'];a172_0x2179=function(){return _0x1d3535;};return a172_0x2179();}function a172_0x2c5f(_0x2b61cd,_0x8dca){_0x2b61cd=_0x2b61cd-0x1b4;const _0x21792d=a172_0x2179();let _0x2c5f69=_0x21792d[_0x2b61cd];return _0x2c5f69;}export function validateLimitOption(_0x34262b){const _0x1dab0c=a172_0x2c5f;if(!Number['isInteger'](_0x34262b))return{'isValid':![],'error':_0x1dab0c(0x1b6)+_0x34262b+_0x1dab0c(0x1b7)};if(_0x34262b<=0x0)return{'isValid':![],'error':_0x1dab0c(0x1b6)+_0x34262b+_0x1dab0c(0x1ba)};return{'isValid':!![],'value':_0x34262b};}export function validateTimeoutOption(_0xdb0995,_0x300951=0x1e){const _0x547147=a172_0x2c5f;if(_0xdb0995===undefined)return{'isValid':!![],'value':_0x300951};const _0x4ac317=typeof _0xdb0995==='number'?_0xdb0995:parseFloat(_0xdb0995);if(isNaN(_0x4ac317))return{'isValid':![],'error':_0x547147(0x1bd)+_0xdb0995+_0x547147(0x1bb)};if(_0x4ac317<=0x0)return{'isValid':![],'error':_0x547147(0x1bd)+_0x4ac317+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x4ac317};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a173_0x5c9e(_0x2e9b6f,_0x120756){_0x2e9b6f=_0x2e9b6f-0x147;const _0x6764b5=a173_0x6764();let _0x5c9eaf=_0x6764b5[_0x2e9b6f];return _0x5c9eaf;}(function(_0x22b194,_0x4d9022){const _0x5401d2=a173_0x5c9e,_0x52bfb6=_0x22b194();while(!![]){try{const _0x3efc31=-parseInt(_0x5401d2(0x153))/0x1+-parseInt(_0x5401d2(0x150))/0x2+-parseInt(_0x5401d2(0x149))/0x3*(parseInt(_0x5401d2(0x159))/0x4)+-parseInt(_0x5401d2(0x147))/0x5*(parseInt(_0x5401d2(0x14b))/0x6)+parseInt(_0x5401d2(0x158))/0x7*(parseInt(_0x5401d2(0x157))/0x8)+parseInt(_0x5401d2(0x151))/0x9*(parseInt(_0x5401d2(0x14f))/0xa)+parseInt(_0x5401d2(0x14a))/0xb;if(_0x3efc31===_0x4d9022)break;else _0x52bfb6['push'](_0x52bfb6['shift']());}catch(_0x50d8f5){_0x52bfb6['push'](_0x52bfb6['shift']());}}}(a173_0x6764,0x91b2d));import{createServer}from'node:net';export async function isPortAvailable(_0x28ee9f){return new Promise(_0x142dad=>{const _0x32356c=a173_0x5c9e,_0x5a8a61=createServer();_0x5a8a61[_0x32356c(0x154)](_0x32356c(0x155),_0x8984=>{const _0x491475=_0x32356c;_0x8984[_0x491475(0x148)]===_0x491475(0x14c)?_0x142dad(![]):_0x142dad(![]);}),_0x5a8a61[_0x32356c(0x154)](_0x32356c(0x152),()=>{const _0x5a0f8b=_0x32356c;_0x5a8a61[_0x5a0f8b(0x156)](),_0x142dad(!![]);}),_0x5a8a61['listen'](_0x28ee9f,_0x32356c(0x14d));});}function a173_0x6764(){const _0x38bb16=['close','72xMTfkr','687589ScnHoI','488zRubxS','\x20and\x20','130tMIKwe','code','7071rxpuIP','18164575AsczHD','245004bciEAN','EADDRINUSE','0.0.0.0','No\x20available\x20port\x20found\x20between\x20','1515790dkmtLG','968358BqLlcR','63MhhqNw','listening','1166223aYMEqe','once','error'];a173_0x6764=function(){return _0x38bb16;};return a173_0x6764();}export async function findAvailablePort(_0x35176f=0xfa0,_0x5365c6=0x64){const _0x2bceb4=a173_0x5c9e;for(let _0x2bb9bb=0x0;_0x2bb9bb<_0x5365c6;_0x2bb9bb++){const _0x1b9789=_0x35176f+_0x2bb9bb;if(await isPortAvailable(_0x1b9789))return _0x1b9789;}throw new Error(_0x2bceb4(0x14e)+_0x35176f+_0x2bceb4(0x15a)+(_0x35176f+_0x5365c6-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a174_0x3a985a=a174_0x1a06;(function(_0x5bc946,_0x4f7703){const _0x16d42a=a174_0x1a06,_0x4e8349=_0x5bc946();while(!![]){try{const _0x588498=-parseInt(_0x16d42a(0x19b))/0x1*(parseInt(_0x16d42a(0x17e))/0x2)+-parseInt(_0x16d42a(0x16d))/0x3+parseInt(_0x16d42a(0x169))/0x4*(-parseInt(_0x16d42a(0x19a))/0x5)+-parseInt(_0x16d42a(0x19e))/0x6+-parseInt(_0x16d42a(0x181))/0x7+-parseInt(_0x16d42a(0x179))/0x8+parseInt(_0x16d42a(0x190))/0x9;if(_0x588498===_0x4f7703)break;else _0x4e8349['push'](_0x4e8349['shift']());}catch(_0x4dc448){_0x4e8349['push'](_0x4e8349['shift']());}}}(a174_0xefae,0x24b54));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a174_0x3a985a(0x182),a174_0x3a985a(0x18a),'sh',a174_0x3a985a(0x176),'ksh','tcsh',a174_0x3a985a(0x197),a174_0x3a985a(0x17d),a174_0x3a985a(0x18d),a174_0x3a985a(0x187),'nu',a174_0x3a985a(0x199),'elvish',a174_0x3a985a(0x178)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude','code',a174_0x3a985a(0x174)]);function getProcessInfoWindows(_0x44d7dc){const _0x3a0e4b=a174_0x3a985a;try{if(!Number[_0x3a0e4b(0x17c)](_0x44d7dc)||_0x44d7dc<=0x0)return null;const _0x595743=_0x3a0e4b(0x17a)+_0x44d7dc+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x1e5274=execSync(_0x3a0e4b(0x17b)+_0x595743+'\x22',{'encoding':_0x3a0e4b(0x172),'windowsHide':!![],'stdio':[_0x3a0e4b(0x18c),'pipe','pipe']})[_0x3a0e4b(0x168)]();if(!_0x1e5274)return null;const [_0x3fda75,..._0x5c26f6]=_0x1e5274['split'](','),_0x2df48c=parseInt(_0x3fda75,0xa),_0x1c203f=_0x5c26f6[_0x3a0e4b(0x18e)](',')[_0x3a0e4b(0x168)]();if(isNaN(_0x2df48c)||!_0x1c203f)return null;return{'pid':_0x44d7dc,'ppid':_0x2df48c,'comm':_0x1c203f[_0x3a0e4b(0x16a)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x371b98){const _0x31d1df=a174_0x3a985a;try{const _0x1fc16e=0x400000;if(!Number[_0x31d1df(0x17c)](_0x371b98)||_0x371b98<=0x0||_0x371b98>_0x1fc16e)return null;const _0x3f6bc5=execSync(_0x31d1df(0x173)+_0x371b98+_0x31d1df(0x177),{'encoding':'utf-8','stdio':_0x31d1df(0x18c)})[_0x31d1df(0x168)](),[_0x53ccaa,..._0x5e3873]=_0x3f6bc5['split'](/\s+/),_0x40d80f=parseInt(_0x53ccaa,0xa),_0x521186=_0x5e3873[_0x31d1df(0x18e)]('\x20');if(isNaN(_0x40d80f))return null;return{'pid':_0x371b98,'ppid':_0x40d80f,'comm':_0x521186};}catch{return null;}}function getProcessInfo(_0xb67d28){const _0x264408=a174_0x3a985a;if(process[_0x264408(0x17f)]===_0x264408(0x193))return getProcessInfoWindows(_0xb67d28);return getProcessInfoPosix(_0xb67d28);}function getBasename(_0x1d873d){const _0x48b35a=a174_0x3a985a;return _0x1d873d['replace'](/^-/,'')['split']('/')[_0x48b35a(0x180)]()?.[_0x48b35a(0x19c)]()||'';}function isShell(_0x544262){return SHELL_NAMES['has'](getBasename(_0x544262));}function isEphemeralShellSpawner(_0x4bc591){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x4bc591));}let cachedShellPID;function findShellPID(){const _0x77c06b=a174_0x3a985a;if(process[_0x77c06b(0x183)]===undefined)return process[_0x77c06b(0x175)];let _0x2d51a4=process['ppid'];const _0x4aefd7=0xa;let _0x3968e8=0x0;while(_0x3968e8<_0x4aefd7){const _0x20b43f=getProcessInfo(_0x2d51a4);if(!_0x20b43f)break;if(isShell(_0x20b43f[_0x77c06b(0x184)])){const _0x371d1a=getProcessInfo(_0x20b43f[_0x77c06b(0x183)]);if(_0x371d1a&&isEphemeralShellSpawner(_0x371d1a['comm'])){_0x2d51a4=_0x20b43f['ppid'],_0x3968e8++;continue;}return _0x20b43f['pid'];}if(_0x20b43f[_0x77c06b(0x183)]===0x0||_0x20b43f['ppid']===0x1){if(isShell(_0x20b43f[_0x77c06b(0x184)]))return _0x20b43f[_0x77c06b(0x175)];break;}_0x2d51a4=_0x20b43f[_0x77c06b(0x183)],_0x3968e8++;}return process[_0x77c06b(0x183)]!==undefined?process[_0x77c06b(0x183)]:process[_0x77c06b(0x175)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x12c4d9){if(!Number['isInteger'](_0x12c4d9)||_0x12c4d9<=0x0)return![];try{return process['kill'](_0x12c4d9,0x0),!![];}catch{return![];}}export function openBrowser(_0xa3fc4d){const _0x489ffc=a174_0x3a985a;let _0x5a5b17;try{_0x5a5b17=new URL(_0xa3fc4d);}catch{throw new Error(_0x489ffc(0x188)+_0xa3fc4d);}if(_0x5a5b17[_0x489ffc(0x16c)]!==_0x489ffc(0x192)&&_0x5a5b17[_0x489ffc(0x16c)]!==_0x489ffc(0x186))throw new Error(_0x489ffc(0x196)+_0x5a5b17[_0x489ffc(0x16c)]);const _0x4ee428=_0x5a5b17[_0x489ffc(0x19d)],_0x41fd5b=process[_0x489ffc(0x17f)];if(_0x41fd5b===_0x489ffc(0x193))spawn(_0x489ffc(0x167),['/c','start','',_0x4ee428],{'detached':!![],'stdio':_0x489ffc(0x191)})['unref']();else{const _0x330d9a=_0x41fd5b===_0x489ffc(0x16f)?_0x489ffc(0x16b):'xdg-open';spawn(_0x330d9a,[_0x4ee428],{'detached':!![],'stdio':'ignore'})['unref']();}}function a174_0xefae(){const _0x3492f2=['exit','stdout','Unsupported\x20protocol:\x20','csh','where.exe','ion','284680SRIuas','70327Qhkskg','toLowerCase','href','1153650bpNbKA','cmd.exe','trim','16MCLHeV','replace','open','protocol','532530dXztqX','kill','darwin','toString','stderr','utf-8','ps\x20-p\x20','cursor','pid','fish','\x20-o\x20ppid=,comm=','xonsh','1418128ZiiYWz','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','isInteger','dash','6ebMwPa','platform','pop','1897966xBdmdb','bash','ppid','comm','error','https:','powershell','Invalid\x20URL:\x20','data','zsh','test','pipe','pwsh','join','map','12665430uMRjEW','ignore','http:','win32'];a174_0xefae=function(){return _0x3492f2;};return a174_0xefae();}export function isWindows(){const _0x261130=a174_0x3a985a;return process[_0x261130(0x17f)]===_0x261130(0x193);}function a174_0x1a06(_0x1b923c,_0x566502){_0x1b923c=_0x1b923c-0x167;const _0xefaebe=a174_0xefae();let _0x1a06e9=_0xefaebe[_0x1b923c];return _0x1a06e9;}export function getCrossSpawnOptions(_0x572e4e){return{..._0x572e4e??{},'shell':isWindows()};}export function escapeWindowsArg(_0x1cd16c){const _0x49975b=a174_0x3a985a;if(!/[ \t"&|<>^%!`\r\n]/[_0x49975b(0x18b)](_0x1cd16c))return _0x1cd16c;const _0x1bb337=_0x1cd16c[_0x49975b(0x16a)](/"/g,'\x22\x22');return'\x22'+_0x1bb337+'\x22';}export function crossSpawn(_0x33c5de,_0x15d2b9,_0x1a00e4){const _0x4c948a=a174_0x3a985a;if(isWindows()){const _0x4d71f5=escapeWindowsArg(_0x33c5de),_0x5f255a=_0x15d2b9[_0x4c948a(0x18f)](escapeWindowsArg),_0x5f2928=[_0x4d71f5,..._0x5f255a][_0x4c948a(0x18e)]('\x20');return spawn(_0x5f2928,[],{..._0x1a00e4,'shell':!![]});}return spawn(_0x33c5de,_0x15d2b9,{..._0x1a00e4,'shell':![]});}export function gracefulExit(_0x274fbe=0x0){const _0x4f8df1=a174_0x3a985a;isWindows()?setImmediate(()=>process['exit'](_0x274fbe)):process[_0x4f8df1(0x194)](_0x274fbe);}export function findExecutable(_0x322bf7,_0x3b57d0=0x1388){return new Promise(_0x5c28f9=>{const _0x28a4fb=a174_0x1a06,_0x4f7227=isWindows()?_0x28a4fb(0x198):'which';let _0x582e43=![];const _0x580d38=crossSpawn(_0x4f7227,[_0x322bf7],{'stdio':_0x28a4fb(0x18c)}),_0x5f594d=setTimeout(()=>{const _0x122376=_0x28a4fb;!_0x582e43&&(_0x582e43=!![],_0x580d38[_0x122376(0x16e)](),_0x5c28f9(null));},_0x3b57d0);let _0x703259='';_0x580d38[_0x28a4fb(0x195)]?.['on']('data',_0x29746b=>{const _0x1a388b=_0x28a4fb;_0x703259+=_0x29746b[_0x1a388b(0x170)]();}),_0x580d38[_0x28a4fb(0x171)]?.['on'](_0x28a4fb(0x189),()=>{}),_0x580d38['on'](_0x28a4fb(0x194),_0x1511c7=>{const _0x23ab2d=_0x28a4fb;if(_0x582e43)return;_0x582e43=!![],clearTimeout(_0x5f594d);if(_0x1511c7===0x0&&_0x703259['trim']()){const _0x3381da=_0x703259[_0x23ab2d(0x168)]()['split'](/\r?\n/)[0x0];_0x5c28f9(_0x3381da);}else _0x5c28f9(null);}),_0x580d38['on'](_0x28a4fb(0x185),()=>{if(_0x582e43)return;_0x582e43=!![],clearTimeout(_0x5f594d),_0x5c28f9(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a175_0x4e91(_0x5ce8af,_0x147ebc){_0x5ce8af=_0x5ce8af-0xe0;const _0x3c61e1=a175_0x3c61();let _0x4e91b4=_0x3c61e1[_0x5ce8af];return _0x4e91b4;}(function(_0x2a8e69,_0x20cf3d){const _0x1f39d3=a175_0x4e91,_0x49624f=_0x2a8e69();while(!![]){try{const _0x293dab=parseInt(_0x1f39d3(0xec))/0x1+-parseInt(_0x1f39d3(0xeb))/0x2*(parseInt(_0x1f39d3(0xe6))/0x3)+-parseInt(_0x1f39d3(0xf4))/0x4*(-parseInt(_0x1f39d3(0xf9))/0x5)+-parseInt(_0x1f39d3(0xe2))/0x6+parseInt(_0x1f39d3(0xf7))/0x7+-parseInt(_0x1f39d3(0xf1))/0x8+-parseInt(_0x1f39d3(0xee))/0x9*(-parseInt(_0x1f39d3(0xe3))/0xa);if(_0x293dab===_0x20cf3d)break;else _0x49624f['push'](_0x49624f['shift']());}catch(_0x3de8c9){_0x49624f['push'](_0x49624f['shift']());}}}(a175_0x3c61,0x85e52));import*as a175_0x14b64c from'readline';function a175_0x3c61(){const _0x218b40=['3145000LSBhWn','\x20(y/N):\x20','stdout','1132796BaypZI','question','close','3020626lyDBuF','stdin','15bcUaXG','\x20[y/N]\x20','stderr','2051022IjbtRS','10IZuPmr','resume','utf8','1059kykzWY','pause','write','toLowerCase','setRawMode','3118GrYHoW','308251YZkVdR','yes','2199213UTchfc','setEncoding','data'];a175_0x3c61=function(){return _0x218b40;};return a175_0x3c61();}export async function confirm(_0x50dcd8){const _0x53ffa8=a175_0x4e91,_0x4907e1=a175_0x14b64c['createInterface']({'input':process[_0x53ffa8(0xf8)],'output':process[_0x53ffa8(0xf3)]});return new Promise(_0x264045=>{const _0x38e7a9=_0x53ffa8;_0x4907e1[_0x38e7a9(0xf5)](_0x50dcd8+_0x38e7a9(0xf2),_0x440730=>{const _0xd0e097=_0x38e7a9;_0x4907e1[_0xd0e097(0xf6)](),_0x264045(_0x440730[_0xd0e097(0xe9)]()==='y'||_0x440730[_0xd0e097(0xe9)]()===_0xd0e097(0xed));});});}export async function confirmKey(_0x31584f){const _0x4bc16a=a175_0x4e91;if(!process['stdin']['isTTY'])return![];return process[_0x4bc16a(0xe1)]['write'](_0x31584f+_0x4bc16a(0xe0)),new Promise(_0x5ca1bd=>{const _0x5f0011=_0x4bc16a,_0x5347cd=process[_0x5f0011(0xf8)];_0x5347cd[_0x5f0011(0xea)](!![]),_0x5347cd[_0x5f0011(0xe4)](),_0x5347cd[_0x5f0011(0xef)](_0x5f0011(0xe5));const _0x353e1c=_0x35461a=>{const _0x10d527=_0x5f0011;_0x5347cd[_0x10d527(0xea)](![]),_0x5347cd[_0x10d527(0xe7)](),_0x5347cd['removeListener']('data',_0x353e1c);if(_0x35461a==='\x1b'){process[_0x10d527(0xe1)][_0x10d527(0xe8)]('\x0a'),_0x5ca1bd(![]);return;}_0x35461a==='\x03'&&(process[_0x10d527(0xe1)][_0x10d527(0xe8)]('\x0a'),process['exit'](0x82));if(_0x35461a['toLowerCase']()==='y'){process[_0x10d527(0xe1)][_0x10d527(0xe8)]('y\x0a'),_0x5ca1bd(!![]);return;}process[_0x10d527(0xe1)][_0x10d527(0xe8)]('\x0a'),_0x5ca1bd(![]);};_0x5347cd['on'](_0x5f0011(0xf0),_0x353e1c);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9b719b,_0x6233ba){const _0x17e923=a176_0x1229,_0x3564ee=_0x9b719b();while(!![]){try{const _0x36f339=parseInt(_0x17e923(0x8d))/0x1+parseInt(_0x17e923(0x8c))/0x2*(parseInt(_0x17e923(0x82))/0x3)+-parseInt(_0x17e923(0x8a))/0x4+parseInt(_0x17e923(0x90))/0x5*(-parseInt(_0x17e923(0x8b))/0x6)+-parseInt(_0x17e923(0x91))/0x7*(-parseInt(_0x17e923(0x93))/0x8)+parseInt(_0x17e923(0x89))/0x9+-parseInt(_0x17e923(0x87))/0xa;if(_0x36f339===_0x6233ba)break;else _0x3564ee['push'](_0x3564ee['shift']());}catch(_0x5168e6){_0x3564ee['push'](_0x3564ee['shift']());}}}(a176_0x831f,0x9343a));import a176_0x5dcfae from'ora';import{isWindows}from'./process.js';function a176_0x1229(_0x5b0890,_0x1e3efd){_0x5b0890=_0x5b0890-0x77;const _0x831fae=a176_0x831f();let _0x1229d0=_0x831fae[_0x5b0890];return _0x1229d0;}const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x514dda,_0x22c954={}){const _0x5d9b08=a176_0x1229,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x22c954;return a176_0x5dcfae({'text':_0x514dda,'color':_0x5d9b08(0x84),'stream':process['stderr'],'isEnabled':forceEnabled||process[_0x5d9b08(0x7f)][_0x5d9b08(0x8f)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x211f0b,_0x5cfaf4,_0x43d642={}){const _0x3d49c2=a176_0x1229,_0x2eaad5=_0x43d642[_0x3d49c2(0x8e)]??(()=>Date[_0x3d49c2(0x7d)]()),_0x42d303=createCommandSpinner(_0x211f0b,_0x43d642);_0x42d303['start']();const _0x56d89f=_0x2eaad5();try{const _0x18f358=await _0x5cfaf4(),_0x2a1355=_0x2eaad5()-_0x56d89f;return _0x42d303[_0x3d49c2(0x77)](),{'data':_0x18f358,'elapsedMs':_0x2a1355};}catch(_0x509ec3){_0x42d303[_0x3d49c2(0x77)]();throw _0x509ec3;}}export async function withProgressSpinner(_0x209705,_0x47008d,_0x2fc5b5={}){const _0x38ca80=a176_0x1229,_0x5d5d0f=_0x2fc5b5[_0x38ca80(0x8e)]??(()=>Date['now']()),_0x283c7b=_0x2fc5b5['intervalFactory']??setInterval,_0x11bcec=createCommandSpinner(_0x209705,_0x2fc5b5);_0x11bcec[_0x38ca80(0x7e)]();const _0x463a02=_0x5d5d0f(),_0x528b7d=_0x209705[_0x38ca80(0x92)](_0x38ca80(0x7a),'')['trim']()||_0x38ca80(0x83),_0x4f7bf8={};let _0x2ac0fb=_0x209705;const _0x3f369c=()=>{const _0x51dd46=_0x38ca80;if(!_0x11bcec[_0x51dd46(0x88)])return;const _0x5c57be=_0x5d5d0f()-_0x463a02,_0x224310=formatElapsed(_0x5c57be),_0x279052=_0x4f7bf8[_0x51dd46(0x79)]?.[_0x51dd46(0x81)]()||_0x528b7d,_0x45cf04=_0x4f7bf8['jobId']?_0x51dd46(0x78)+_0x4f7bf8['jobId']+']':'',_0x3e3bc7=_0x4f7bf8['extra']?'\x20'+_0x4f7bf8[_0x51dd46(0x7b)]:'',_0x3016e7=_0x279052+'\x20'+_0x224310+_0x3e3bc7+_0x45cf04;_0x3016e7!==_0x2ac0fb&&_0x3016e7[_0x51dd46(0x81)]()&&(_0x11bcec[_0x51dd46(0x86)]=_0x3016e7,_0x2ac0fb=_0x3016e7);},_0x20c40d=_0x283c7b(()=>{_0x3f369c();},0x3e8),_0x1edf51={'setPhase':_0x36a077=>{const _0x12b778=_0x38ca80;_0x4f7bf8[_0x12b778(0x79)]=_0x36a077;const _0xa3afbe=_0x36a077?.[_0x12b778(0x81)]()||_0x528b7d,_0x1b9bf3=_0x5d5d0f()-_0x463a02,_0x33278d=formatElapsed(_0x1b9bf3),_0x141ed2=_0x4f7bf8[_0x12b778(0x80)]?_0x12b778(0x78)+_0x4f7bf8['jobId']+']':'',_0xccbb9b=_0x4f7bf8[_0x12b778(0x7b)]?'\x20'+_0x4f7bf8[_0x12b778(0x7b)]:'',_0x25efe9=_0xa3afbe+'\x20'+_0x33278d+_0xccbb9b+_0x141ed2;_0x11bcec[_0x12b778(0x88)]&&_0x25efe9[_0x12b778(0x81)]()&&(_0x11bcec[_0x12b778(0x86)]=_0x25efe9,_0x2ac0fb=_0x25efe9);},'setJobId':_0x548fa9=>{const _0x412117=_0x38ca80;_0x4f7bf8[_0x412117(0x80)]=_0x548fa9,_0x3f369c();},'setExtra':_0x45afa0=>{const _0x24b5cc=_0x38ca80;_0x4f7bf8[_0x24b5cc(0x7b)]=_0x45afa0,_0x3f369c();}};_0x3f369c();try{const _0x504cc6=await _0x47008d(_0x1edf51),_0x2f0d5f=_0x5d5d0f()-_0x463a02;return{'data':_0x504cc6,'elapsedMs':_0x2f0d5f};}finally{clearInterval(_0x20c40d),_0x11bcec[_0x38ca80(0x77)]();}}export function formatElapsed(_0x58401c){const _0xa33b4a=a176_0x1229,_0x43f826=Math[_0xa33b4a(0x85)](_0x58401c/0x3e8);if(_0x43f826<0x3c)return(_0x58401c/0x3e8)[_0xa33b4a(0x7c)](0x1)+'s';const _0x4df1f4=Math['floor'](_0x43f826/0x3c),_0x5585ee=_0x43f826%0x3c;if(_0x4df1f4<0x3c)return _0x4df1f4+'m\x20'+_0x5585ee+'s';const _0x1e2135=Math['floor'](_0x4df1f4/0x3c),_0x31277e=_0x4df1f4%0x3c;return _0x1e2135+'h\x20'+_0x31277e+'m';}function a176_0x831f(){const _0x3a4742=['clock','isTTY','19645MjvOFN','1043guLQzU','replace','10696KShIGr','stop','\x20[Job\x20ID:\x20','phase','...','extra','toFixed','now','start','stderr','jobId','trim','6sULVBR','Processing','cyan','floor','text','12416380khUlEh','isSpinning','5765499xMzSgv','3042656OpvBjK','78hMoQfg','1146130cNfVGN','670619hwNeAC'];a176_0x831f=function(){return _0x3a4742;};return a176_0x831f();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b175c,_0x382d23){const _0x200486=a177_0x2492,_0x433a00=_0x1b175c();while(!![]){try{const _0x38ec0f=parseInt(_0x200486(0x1ed))/0x1*(parseInt(_0x200486(0x1eb))/0x2)+parseInt(_0x200486(0x1ef))/0x3+parseInt(_0x200486(0x1ee))/0x4+-parseInt(_0x200486(0x1db))/0x5+parseInt(_0x200486(0x1e0))/0x6+-parseInt(_0x200486(0x1e5))/0x7+-parseInt(_0x200486(0x1de))/0x8;if(_0x38ec0f===_0x382d23)break;else _0x433a00['push'](_0x433a00['shift']());}catch(_0x271a7b){_0x433a00['push'](_0x433a00['shift']());}}}(a177_0x5b81,0xf120d));export async function*parseSSEStream(_0x883330,_0x37e758){const _0x545058=a177_0x2492;if(!_0x883330[_0x545058(0x1ec)])throw new Error(_0x545058(0x1e1));const _0x367270=_0x883330['body'][_0x545058(0x1e3)](),_0x1a1ba4=new TextDecoder();let _0x590d3f='',_0x258989={};try{while(!![]){const {done:_0x21d566,value:_0x463a6b}=await _0x367270['read']();if(_0x21d566){if(_0x258989[_0x545058(0x1e2)]){_0x37e758?.[_0x545058(0x1e7)]('[LLM\x20API\x20SSE]\x20'+_0x258989[_0x545058(0x1e2)]);const _0x3b05f8=parseSSEData(_0x258989['data']);yield _0x3b05f8;}break;}_0x590d3f+=_0x1a1ba4[_0x545058(0x1e6)](_0x463a6b,{'stream':!![]});const _0x774733=_0x590d3f[_0x545058(0x1dd)]('\x0a');_0x590d3f=_0x774733[_0x545058(0x1df)]()||'';for(const _0x2690c8 of _0x774733){if(_0x2690c8[_0x545058(0x1dc)]()===''){if(_0x258989[_0x545058(0x1e2)]){_0x37e758?.['debug'](_0x545058(0x1e4)+_0x258989[_0x545058(0x1e2)]);const _0xe3e801=parseSSEData(_0x258989[_0x545058(0x1e2)]);yield _0xe3e801,_0x258989={};}continue;}if(_0x2690c8[_0x545058(0x1f0)](':'))continue;const _0x34aed9=_0x2690c8['indexOf'](':');if(_0x34aed9===-0x1)continue;const _0xdf6bee=_0x2690c8[_0x545058(0x1f1)](0x0,_0x34aed9);let _0x5684e0=_0x2690c8[_0x545058(0x1f1)](_0x34aed9+0x1);_0x5684e0[_0x545058(0x1f0)]('\x20')&&(_0x5684e0=_0x5684e0['slice'](0x1));switch(_0xdf6bee){case _0x545058(0x1e9):_0x258989[_0x545058(0x1e9)]=_0x5684e0;break;case _0x545058(0x1e2):_0x258989[_0x545058(0x1e2)]=_0x258989[_0x545058(0x1e2)]?_0x258989[_0x545058(0x1e2)]+'\x0a'+_0x5684e0:_0x5684e0;break;case'id':_0x258989['id']=_0x5684e0;break;}}}}finally{_0x367270[_0x545058(0x1ea)]();}}function a177_0x2492(_0x11074f,_0x21efae){_0x11074f=_0x11074f-0x1db;const _0x5b81ff=a177_0x5b81();let _0x2492df=_0x5b81ff[_0x11074f];return _0x2492df;}function a177_0x5b81(){const _0xa27d43=['5605560cbdJWK','Response\x20body\x20is\x20null','data','getReader','[LLM\x20API\x20SSE]\x20','7302393xeuzRS','decode','debug','parse','event','releaseLock','4ExSGHs','body','507782xOyovH','6820260NNfvbW','5326998UIjzBp','startsWith','slice','187150BIEhVd','trim','split','26898120kLYqzI','pop'];a177_0x5b81=function(){return _0xa27d43;};return a177_0x5b81();}function parseSSEData(_0x38195d){const _0x2668e2=a177_0x2492;try{return JSON[_0x2668e2(0x1e8)](_0x38195d);}catch(_0x273255){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x38195d,{'cause':_0x273255});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58f7d6,_0x528211){const _0x539cb3=a178_0x48c9,_0x53e8f5=_0x58f7d6();while(!![]){try{const _0x5b73c6=parseInt(_0x539cb3(0x1e2))/0x1+-parseInt(_0x539cb3(0x1e0))/0x2*(-parseInt(_0x539cb3(0x1da))/0x3)+-parseInt(_0x539cb3(0x1db))/0x4*(parseInt(_0x539cb3(0x1f0))/0x5)+parseInt(_0x539cb3(0x1eb))/0x6+parseInt(_0x539cb3(0x1e7))/0x7*(parseInt(_0x539cb3(0x1e4))/0x8)+parseInt(_0x539cb3(0x1df))/0x9+-parseInt(_0x539cb3(0x1d9))/0xa;if(_0x5b73c6===_0x528211)break;else _0x53e8f5['push'](_0x53e8f5['shift']());}catch(_0x591cf8){_0x53e8f5['push'](_0x53e8f5['shift']());}}}(a178_0x50f7,0x47c00));import a178_0x4e023a from'string-width';export function stringWidth(_0x261b4){return a178_0x4e023a(_0x261b4);}function a178_0x50f7(){const _0x37ce47=['unknown','replace','935559KIOXfE','46nYzptd','env','259720Wcuzyp','toLowerCase','770648pDENzx','USER','length','28cDQYFQ','trim','substring','repeat','779340vXgxXT','padStart','\x5c$&','toString','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','441635uFrgym','floor','8759030UWmzGj','72507dmDBwP','12cahNsg','slice'];a178_0x50f7=function(){return _0x37ce47;};return a178_0x50f7();}export function padEnd(_0x5b3742,_0x53ef4a){const _0x63f71=stringWidth(_0x5b3742);if(_0x63f71>=_0x53ef4a)return _0x5b3742;return _0x5b3742+'\x20'['repeat'](_0x53ef4a-_0x63f71);}export function padStart(_0x1c2fe1,_0x21c612){const _0x5ab5d7=a178_0x48c9,_0x27846e=stringWidth(_0x1c2fe1);if(_0x27846e>=_0x21c612)return _0x1c2fe1;return'\x20'[_0x5ab5d7(0x1ea)](_0x21c612-_0x27846e)+_0x1c2fe1;}export function centerAlign(_0x539f86,_0x277fb1){const _0x5785ae=a178_0x48c9,_0x4ecdc8=stringWidth(_0x539f86);if(_0x4ecdc8>_0x277fb1){if(_0x277fb1<=0x1)return'…'[_0x5785ae(0x1e9)](0x0,_0x277fb1);let _0xd1a4e0=_0x539f86;while(stringWidth(_0xd1a4e0+'…')>_0x277fb1){_0xd1a4e0=_0xd1a4e0[_0x5785ae(0x1dc)](0x0,-0x1);}return _0xd1a4e0+'…';}if(_0x4ecdc8===_0x277fb1)return _0x539f86;const _0x269bc5=_0x277fb1-_0x4ecdc8,_0x85037e=Math[_0x5785ae(0x1d8)](_0x269bc5/0x2),_0x415940=_0x269bc5-_0x85037e;return'\x20'['repeat'](_0x85037e)+_0x539f86+'\x20'[_0x5785ae(0x1ea)](_0x415940);}export function escapeStringLiteral(_0x518962){const _0x12f2f0=a178_0x48c9;if(!_0x518962||_0x518962[_0x12f2f0(0x1e8)]()[_0x12f2f0(0x1e6)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x2f3052=_0x518962['replace'](/'/g,'\x27\x27');return'\x27'+_0x2f3052+'\x27';}export function globToLike(_0x378d9e){const _0x4442d5=a178_0x48c9;let _0x35fcd1=_0x378d9e[_0x4442d5(0x1de)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x4442d5(0x1de)](/_/g,'\x5c_');return _0x35fcd1=_0x35fcd1['replace'](/\*/g,'%')[_0x4442d5(0x1de)](/\?/g,'_'),_0x35fcd1;}export function buildLikePattern(_0x2ff5a5){const _0x98278f=a178_0x48c9;if(!_0x2ff5a5||_0x2ff5a5[_0x98278f(0x1e8)]()[_0x98278f(0x1e6)]===0x0)throw new Error(_0x98278f(0x1ef));const _0x3d3b5c=globToLike(_0x2ff5a5),_0x5749cf=_0x3d3b5c['replace'](/'/g,'\x27\x27');return'\x27'+_0x5749cf+'\x27';}export function matchGlobPattern(_0x31000c,_0x4d8a0b){const _0x1508fb=a178_0x48c9,_0x1dd23b=_0x4d8a0b[_0x1508fb(0x1de)](/[.+^${}()|[\]\\]/g,_0x1508fb(0x1ed))[_0x1508fb(0x1de)](/\*/g,'.*')[_0x1508fb(0x1de)](/\?/g,'.'),_0x374e3d=new RegExp('^'+_0x1dd23b+'$');return _0x374e3d['test'](_0x31000c);}export function getSanitizedUsername(){const _0x52835f=a178_0x48c9,_0x3138f7=process[_0x52835f(0x1e1)][_0x52835f(0x1e5)]||process['env']['USERNAME']||_0x52835f(0x1dd);return _0x3138f7[_0x52835f(0x1de)](/[^a-zA-Z0-9]/g,'')[_0x52835f(0x1e3)]();}export function generateRandomHex(){const _0x33f289=a178_0x48c9,_0x1ecc1c=Math[_0x33f289(0x1d8)](Math['random']()*0xfffff);return _0x1ecc1c[_0x33f289(0x1ee)](0x10)[_0x33f289(0x1ec)](0x5,'0');}function a178_0x48c9(_0x5d5f36,_0x39386d){_0x5d5f36=_0x5d5f36-0x1d8;const _0x50f7d2=a178_0x50f7();let _0x48c9b5=_0x50f7d2[_0x5d5f36];return _0x48c9b5;}export function sanitizeFileName(_0x2507f8){const _0x24e940=a178_0x48c9;return _0x2507f8[_0x24e940(0x1e3)]()[_0x24e940(0x1de)](/[/\\:*?"<>|]/g,'-')[_0x24e940(0x1de)](/\s+/g,'-')[_0x24e940(0x1de)](/-+/g,'-')[_0x24e940(0x1de)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22ab28,_0x4f065e){const _0x4b35ca=a179_0x4f64,_0x49574c=_0x22ab28();while(!![]){try{const _0xe29873=parseInt(_0x4b35ca(0xc3))/0x1+-parseInt(_0x4b35ca(0xbe))/0x2*(parseInt(_0x4b35ca(0xb8))/0x3)+-parseInt(_0x4b35ca(0xb5))/0x4+-parseInt(_0x4b35ca(0xb6))/0x5*(parseInt(_0x4b35ca(0xc4))/0x6)+-parseInt(_0x4b35ca(0xbf))/0x7*(-parseInt(_0x4b35ca(0xb7))/0x8)+parseInt(_0x4b35ca(0xb9))/0x9+-parseInt(_0x4b35ca(0xbb))/0xa;if(_0xe29873===_0x4f065e)break;else _0x49574c['push'](_0x49574c['shift']());}catch(_0x2ab21f){_0x49574c['push'](_0x49574c['shift']());}}}(a179_0x3580,0xdebc4));function hasWildcard(_0x5ed821){const _0x4afbce=a179_0x4f64;return _0x5ed821[_0x4afbce(0xac)]('*')||_0x5ed821[_0x4afbce(0xac)]('?');}export function parseTableReference(_0x46a6a7){const _0x6c6465=a179_0x4f64;if(!_0x46a6a7||_0x46a6a7['trim']()[_0x6c6465(0xc2)]===0x0)throw new Error(_0x6c6465(0xaf));const _0x481003=_0x46a6a7[_0x6c6465(0xad)](),_0x2c6815={'original':_0x481003},_0x6a8362=_0x481003[_0x6c6465(0xb2)]('.');if(_0x6a8362[_0x6c6465(0xc2)]===0x1){const _0x50cc92=_0x6a8362[0x0];if(!_0x50cc92)throw new Error(_0x6c6465(0xc1));_0x2c6815[_0x6c6465(0xc0)]=_0x50cc92;}else{if(_0x6a8362['length']===0x2){const [_0x21db2a,_0x55442e]=_0x6a8362;if(!_0x21db2a)throw new Error(_0x6c6465(0xbc));if(!_0x55442e)throw new Error(_0x6c6465(0xae));_0x2c6815['database']=_0x21db2a,_0x2c6815[_0x6c6465(0xc0)]=_0x55442e;}else{if(_0x6a8362[_0x6c6465(0xc2)]===0x3){const [_0x250363,_0x5a86d0,_0x494696]=_0x6a8362;if(!_0x250363||!_0x5a86d0||!_0x494696)throw new Error(_0x6c6465(0xba));_0x2c6815['catalog']=_0x250363,_0x2c6815[_0x6c6465(0xbd)]=_0x5a86d0,_0x2c6815[_0x6c6465(0xc0)]=_0x494696;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x2c6815;}export function formatTableReference(_0x5521b7){const _0x26ef05=a179_0x4f64,_0x373386=[];return _0x5521b7[_0x26ef05(0xb1)]&&_0x373386['push'](_0x5521b7[_0x26ef05(0xb1)]),_0x5521b7[_0x26ef05(0xbd)]&&_0x373386['push'](_0x5521b7[_0x26ef05(0xbd)]),_0x5521b7['table']&&_0x373386[_0x26ef05(0xb4)](_0x5521b7[_0x26ef05(0xc0)]),_0x373386['join']('.');}function a179_0x4f64(_0x352541,_0x4d5c06){_0x352541=_0x352541-0xac;const _0x35802c=a179_0x3580();let _0x4f645e=_0x35802c[_0x352541];return _0x4f645e;}function a179_0x3580(){const _0x16026b=['1150366rzVEpF','6idnvRV','includes','trim','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','catalog','split','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','push','2315524pBVcsf','4847205nUQSLO','3984aRKlpW','934509CFirdH','11927322lRGhCL','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','1302450vXHDzY','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','database','10CMscvH','23513JdDzfA','table','Pattern\x20cannot\x20be\x20just\x20a\x20dot','length'];a179_0x3580=function(){return _0x16026b;};return a179_0x3580();}export function validateTableListReference(_0x63ad24){return undefined;}export function validateTableDescribeReference(_0x2c8a93){const _0x3865e2=a179_0x4f64;if(!_0x2c8a93[_0x3865e2(0xc0)])return _0x3865e2(0xb3);if(_0x2c8a93[_0x3865e2(0xbd)]&&hasWildcard(_0x2c8a93[_0x3865e2(0xbd)]))return _0x3865e2(0xb0);if(hasWildcard(_0x2c8a93['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a180_0x33bbbb=a180_0x5f0a;(function(_0x5834fc,_0x38c220){const _0x2ba333=a180_0x5f0a,_0x4ecac4=_0x5834fc();while(!![]){try{const _0x1f3b64=-parseInt(_0x2ba333(0x1c1))/0x1+-parseInt(_0x2ba333(0x1c9))/0x2*(-parseInt(_0x2ba333(0x1ce))/0x3)+-parseInt(_0x2ba333(0x1c7))/0x4+-parseInt(_0x2ba333(0x1b4))/0x5+parseInt(_0x2ba333(0x1cc))/0x6*(-parseInt(_0x2ba333(0x1bc))/0x7)+parseInt(_0x2ba333(0x1ca))/0x8+-parseInt(_0x2ba333(0x1b5))/0x9*(-parseInt(_0x2ba333(0x1bb))/0xa);if(_0x1f3b64===_0x38c220)break;else _0x4ecac4['push'](_0x4ecac4['shift']());}catch(_0x3620cf){_0x4ecac4['push'](_0x4ecac4['shift']());}}}(a180_0x7005,0x56bf4));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';function a180_0x7005(){const _0x277f59=['42pbczwT','init','warn','debug','fileOnly','475966FOFORF','info','tdx','push','fileHandler','error','1983076ttPEFV','getLogPath','2loVQYH','614776NzRPvk','logFileName','370644RgXbKS','consoleHandler','23676BKqrwt','logLevel','tdx.log','logs','INFO','2715575OYsvGb','19404639gfdPXK','isInitialized','close','trace','logger','logDir','10lrrwZv'];a180_0x7005=function(){return _0x277f59;};return a180_0x7005();}import{getGlobalCacheDir}from'./global-cache.js';function a180_0x5f0a(_0x3c1805,_0x526570){_0x3c1805=_0x3c1805-0x1b4;const _0x7005e=a180_0x7005();let _0x5f0a01=_0x7005e[_0x3c1805];return _0x5f0a01;}export{LogLevel}from'./logger/index.js';export class TDXLogger{['logLevel'];[a180_0x33bbbb(0x1c0)];['logDir'];[a180_0x33bbbb(0x1cb)];[a180_0x33bbbb(0x1b9)];[a180_0x33bbbb(0x1c5)]=null;[a180_0x33bbbb(0x1cd)]=null;constructor(_0x474c22=LogLevel['INFO'],_0x29a08b=![],_0x5630a9,_0x55b656=a180_0x33bbbb(0x1d0)){const _0x247795=a180_0x33bbbb;this[_0x247795(0x1cf)]=_0x474c22,this[_0x247795(0x1c0)]=_0x29a08b,this[_0x247795(0x1ba)]=_0x5630a9||join(getGlobalCacheDir(),_0x247795(0x1d1)),this[_0x247795(0x1cb)]=_0x55b656,this['logger']=Logger['of'](_0x247795(0x1c3));}async[a180_0x33bbbb(0x1bd)](){const _0x5d9472=a180_0x33bbbb,_0x5273c2=join(this[_0x5d9472(0x1ba)],this['logFileName']);if(Logger[_0x5d9472(0x1b6)]()){!this['fileOnly']&&(this[_0x5d9472(0x1cd)]=new ConsoleHandler({'minLevel':LogLevel[_0x5d9472(0x1d2)],'colors':!![]}),Logger['addHandler'](this[_0x5d9472(0x1cd)]));return;}this[_0x5d9472(0x1c5)]=new FileHandler({'filePath':_0x5273c2});const _0x129703=[this[_0x5d9472(0x1c5)]];!this[_0x5d9472(0x1c0)]&&(this[_0x5d9472(0x1cd)]=new ConsoleHandler({'minLevel':LogLevel[_0x5d9472(0x1d2)],'colors':!![]}),_0x129703[_0x5d9472(0x1c4)](this[_0x5d9472(0x1cd)])),await Logger[_0x5d9472(0x1bd)]({'defaultLevel':this[_0x5d9472(0x1cf)],'handlers':_0x129703,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a180_0x33bbbb(0x1bf)](..._0x541265){const _0x11775c=a180_0x33bbbb;this[_0x11775c(0x1b9)][_0x11775c(0x1bf)](..._0x541265);}['trace'](..._0x314336){const _0x439b31=a180_0x33bbbb;this[_0x439b31(0x1b9)][_0x439b31(0x1b8)](..._0x314336);}['info'](..._0x433e38){const _0x42ec46=a180_0x33bbbb;this[_0x42ec46(0x1b9)][_0x42ec46(0x1c2)](..._0x433e38);}['warn'](..._0x465151){const _0x207df3=a180_0x33bbbb;this[_0x207df3(0x1b9)][_0x207df3(0x1be)](..._0x465151);}[a180_0x33bbbb(0x1c6)](..._0x3cf594){this['logger']['error'](..._0x3cf594);}async[a180_0x33bbbb(0x1b7)](){const _0x5d38a0=a180_0x33bbbb;this[_0x5d38a0(0x1b9)][_0x5d38a0(0x1c2)]('Session\x20ended'),await Logger['shutdown']();}[a180_0x33bbbb(0x1c8)](){const _0x574700=a180_0x33bbbb;return join(this[_0x574700(0x1ba)],this[_0x574700(0x1cb)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x235d3e=a181_0x3e55;(function(_0x2c265f,_0x4e1303){const _0x5486b6=a181_0x3e55,_0xe7dd7=_0x2c265f();while(!![]){try{const _0x5df326=parseInt(_0x5486b6(0x9d))/0x1*(-parseInt(_0x5486b6(0x99))/0x2)+-parseInt(_0x5486b6(0x81))/0x3+parseInt(_0x5486b6(0x84))/0x4*(-parseInt(_0x5486b6(0x82))/0x5)+parseInt(_0x5486b6(0x8f))/0x6*(-parseInt(_0x5486b6(0x89))/0x7)+-parseInt(_0x5486b6(0x7f))/0x8*(-parseInt(_0x5486b6(0x8c))/0x9)+parseInt(_0x5486b6(0x9e))/0xa+-parseInt(_0x5486b6(0x8a))/0xb*(-parseInt(_0x5486b6(0x85))/0xc);if(_0x5df326===_0x4e1303)break;else _0xe7dd7['push'](_0xe7dd7['shift']());}catch(_0x4e0b38){_0xe7dd7['push'](_0xe7dd7['shift']());}}}(a181_0x2d58,0xd9f6a));import{get}from'https';import{gt,valid}from'semver';import a181_0x5d3594 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a181_0x235d3e(0x88),TIMEOUT_MS=0x7d0,versionCache=createGlobalCache('last_version_check',a181_0x235d3e(0x7c));function readCache(){const _0x2965d3=a181_0x235d3e;return versionCache[_0x2965d3(0x95)]()??null;}function writeCache(_0x472123){const _0x1db46b=a181_0x235d3e;try{versionCache[_0x1db46b(0x94)]({'lastCheck':new Date()['toISOString'](),'latestVersion':_0x472123});}catch{}}function isCacheValid(_0x184279){const _0x152939=a181_0x235d3e;if(!_0x184279)return![];const _0x1af4c6=new Date(_0x184279[_0x152939(0x9a)])[_0x152939(0x9f)](),_0x1bce60=Date[_0x152939(0x7b)]();return _0x1bce60-_0x1af4c6<CACHE_DURATION_MS;}function a181_0x3e55(_0x40d7b3,_0x3f1f83){_0x40d7b3=_0x40d7b3-0x7b;const _0x2d5802=a181_0x2d58();let _0x3e55d4=_0x2d5802[_0x40d7b3];return _0x3e55d4;}function fetchLatestVersion(){return new Promise((_0x6bda3c,_0x2ad84a)=>{const _0x39cbaa=get(NPM_REGISTRY_URL,_0x12fd36=>{const _0x5e1197=a181_0x3e55;if(_0x12fd36[_0x5e1197(0x83)]!==0xc8){clearTimeout(_0x2ac554),_0x2ad84a(new Error(_0x5e1197(0x93)+_0x12fd36[_0x5e1197(0x83)]));return;}let _0x34614e='';_0x12fd36['on'](_0x5e1197(0x96),_0x297190=>{_0x34614e+=_0x297190;}),_0x12fd36['on']('end',()=>{const _0x570dfb=_0x5e1197;clearTimeout(_0x2ac554);try{const _0x23d625=JSON['parse'](_0x34614e);if(!valid(_0x23d625['version'])){_0x2ad84a(new Error('Invalid\x20version\x20format'));return;}_0x6bda3c(_0x23d625[_0x570dfb(0x8d)]);}catch(_0x19c6da){_0x2ad84a(_0x19c6da);}});})['on']('error',_0x4380d9=>{clearTimeout(_0x2ac554),_0x2ad84a(_0x4380d9);}),_0x2ac554=setTimeout(()=>{_0x39cbaa['destroy'](),_0x2ad84a(new Error('Request\x20timeout'));},TIMEOUT_MS);});}export async function checkForUpdate(_0xe2d4f){const _0x4dd7a4=a181_0x235d3e;try{const _0x4a9668=readCache();if(isCacheValid(_0x4a9668)){const _0x41c22b=gt(_0x4a9668['latestVersion'],_0xe2d4f);return{'updateAvailable':_0x41c22b,'currentVersion':_0xe2d4f,'latestVersion':_0x4a9668[_0x4dd7a4(0x87)]};}const _0x45eded=await fetchLatestVersion();writeCache(_0x45eded);const _0x3465ab=gt(_0x45eded,_0xe2d4f);return{'updateAvailable':_0x3465ab,'currentVersion':_0xe2d4f,'latestVersion':_0x45eded};}catch{return null;}}export function displayUpdateNotification(_0xeca5b9){const _0x4bfc2e=a181_0x235d3e;if(!_0xeca5b9[_0x4bfc2e(0x98)])return;const _0x50a8f6=process['stderr'][_0x4bfc2e(0x8b)]&&!process[_0x4bfc2e(0x7d)]['NO_COLOR'],_0x5c8f56=_0x50a8f6?a181_0x5d3594['gray']('→'):'→',_0x278ae0=_0x50a8f6?a181_0x5d3594['dim'](_0xeca5b9[_0x4bfc2e(0x9c)]):_0xeca5b9[_0x4bfc2e(0x9c)],_0xac3cf4=_0x50a8f6?a181_0x5d3594[_0x4bfc2e(0x92)](_0xeca5b9[_0x4bfc2e(0x87)]):_0xeca5b9[_0x4bfc2e(0x87)],_0x416b2c=_0x50a8f6?a181_0x5d3594[_0x4bfc2e(0x8e)]('npm\x20install\x20-g\x20@treasuredata/tdx@latest'):_0x4bfc2e(0x97),_0x1fa253=_0x50a8f6?'\x0a'+a181_0x5d3594[_0x4bfc2e(0x91)]('Update\x20available:')+'\x20'+_0x278ae0+'\x20'+_0x5c8f56+'\x20'+_0xac3cf4+'\x0a'+a181_0x5d3594[_0x4bfc2e(0x80)](_0x4bfc2e(0x7e))+'\x20'+_0x416b2c+'\x0a':_0x4bfc2e(0x90)+_0x278ae0+'\x20'+_0x5c8f56+'\x20'+_0xac3cf4+_0x4bfc2e(0x9b)+_0x416b2c+'\x0a';process[_0x4bfc2e(0x86)]['write'](_0x1fa253);}function a181_0x2d58(){const _0x3dd011=['cyan','44826zYdQsR','\x0aUpdate\x20available:\x20','yellow','green','HTTP\x20','write','read','data','npm\x20install\x20-g\x20@treasuredata/tdx@latest','updateAvailable','3548DrYyrZ','lastCheck','\x0aRun:\x20','currentVersion','303jdVmQl','1303670GdjCqu','getTime','now','utils/version-check','env','Run:','2168hQjQPC','dim','3158817jRadQU','7101120LaItDK','statusCode','4TMfwuE','43229148BmkqJA','stderr','latestVersion','https://registry.npmjs.org/@treasuredata/tdx/latest','434RiMBOh','11rqYide','isTTY','21051kpFRun','version'];a181_0x2d58=function(){return _0x3dd011;};return a181_0x2d58();}
|