@treasuredata/tdx 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.d.ts +11 -2
- package/dist/commands/parent-segment-command.d.ts.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/parent-segment-command.js.map +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/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.d.ts +1 -0
- package/dist/core/profile.d.ts.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +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/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-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.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-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.d.ts +24 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +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/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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(_0x3e3a4f,_0x43efde){var _0x15b812=a160_0x5158,_0x1a286d=_0x3e3a4f();while(!![]){try{var _0x1acc21=parseInt(_0x15b812(0x19c))/0x1+-parseInt(_0x15b812(0x195))/0x2*(-parseInt(_0x15b812(0x196))/0x3)+parseInt(_0x15b812(0x19e))/0x4*(parseInt(_0x15b812(0x197))/0x5)+parseInt(_0x15b812(0x194))/0x6*(-parseInt(_0x15b812(0x199))/0x7)+-parseInt(_0x15b812(0x19b))/0x8+parseInt(_0x15b812(0x19d))/0x9*(-parseInt(_0x15b812(0x198))/0xa)+-parseInt(_0x15b812(0x19a))/0xb*(-parseInt(_0x15b812(0x19f))/0xc);if(_0x1acc21===_0x43efde)break;else _0x1a286d['push'](_0x1a286d['shift']());}catch(_0x2c44fc){_0x1a286d['push'](_0x1a286d['shift']());}}}(a160_0xce18,0x3e3ef));function a160_0x5158(_0xabfaee,_0xa1e6e3){_0xabfaee=_0xabfaee-0x194;var _0xce1804=a160_0xce18();var _0x515806=_0xce1804[_0xabfaee];return _0x515806;}function a160_0xce18(){var _0x563851=['730HaCaZZ','1869343Hkjfcw','12133YJznlH','1780360kKyAnn','161561yYVXWb','8028IotpRY','248hBuuLH','4308GfuUxv','6kNaNqd','2eubsrR','580623xlZgvZ','4725okoQqj'];a160_0xce18=function(){return _0x563851;};return a160_0xce18();}export{DefaultLogFormatter}from'./default-formatter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x4df5c5=a161_0x47d4;(function(_0x5b7351,_0x2398e3){const _0x14bd69=a161_0x47d4,_0x31d57f=_0x5b7351();while(!![]){try{const _0x4e2075=-parseInt(_0x14bd69(0x84))/0x1*(parseInt(_0x14bd69(0x85))/0x2)+parseInt(_0x14bd69(0x8b))/0x3*(parseInt(_0x14bd69(0x90))/0x4)+parseInt(_0x14bd69(0x8c))/0x5*(-parseInt(_0x14bd69(0x93))/0x6)+-parseInt(_0x14bd69(0x95))/0x7+-parseInt(_0x14bd69(0x8d))/0x8+-parseInt(_0x14bd69(0x92))/0x9+parseInt(_0x14bd69(0x89))/0xa;if(_0x4e2075===_0x2398e3)break;else _0x31d57f['push'](_0x31d57f['shift']());}catch(_0x38122d){_0x31d57f['push'](_0x31d57f['shift']());}}}(a161_0x22c2,0x3f65a));import{LogLevel as a161_0x53982e}from'../types.js';import{DefaultLogFormatter}from'../formatters/index.js';export class ConsoleHandler{['minLevel'];[a161_0x4df5c5(0x91)];['formatter'];constructor(_0xc03524={}){const _0x2cd28d=a161_0x4df5c5;this['minLevel']=_0xc03524['minLevel']??a161_0x53982e[_0x2cd28d(0x8e)],this[_0x2cd28d(0x91)]=_0xc03524[_0x2cd28d(0x91)]??!![],this[_0x2cd28d(0x87)]=new DefaultLogFormatter({'colors':_0xc03524[_0x2cd28d(0x88)]??!![]});}[a161_0x4df5c5(0x97)](_0x553c7a){const _0x358cea=a161_0x4df5c5;if(_0x553c7a['level']<this[_0x358cea(0x94)])return;const _0x276e8f=this['formatter'][_0x358cea(0x8a)](_0x553c7a);this[_0x358cea(0x91)]&&_0x553c7a[_0x358cea(0x86)]>=a161_0x53982e[_0x358cea(0x8e)]?console[_0x358cea(0x8f)](_0x276e8f):console[_0x358cea(0x96)](_0x276e8f);}}function a161_0x47d4(_0x35f90c,_0x5bd735){_0x35f90c=_0x35f90c-0x84;const _0x22c243=a161_0x22c2();let _0x47d483=_0x22c243[_0x35f90c];return _0x47d483;}function a161_0x22c2(){const _0x3da228=['2150PZfddC','level','formatter','colors','8120440trmDGd','format','33CXLzPH','10jasjEM','2608480XVGiQI','WARN','error','106552FRbhvU','useStderr','2695257EgUxMg','37482MchxYl','minLevel','179802ixXtDe','log','handle','169THtlle'];a161_0x22c2=function(){return _0x3da228;};return a161_0x22c2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a162_0x75747b=a162_0x5248;(function(_0xb7bee,_0x773548){const _0x26d8bc=a162_0x5248,_0x23710d=_0xb7bee();while(!![]){try{const _0x5c043d=parseInt(_0x26d8bc(0x174))/0x1+parseInt(_0x26d8bc(0x154))/0x2*(parseInt(_0x26d8bc(0x177))/0x3)+parseInt(_0x26d8bc(0x172))/0x4+-parseInt(_0x26d8bc(0x16d))/0x5*(parseInt(_0x26d8bc(0x15b))/0x6)+parseInt(_0x26d8bc(0x155))/0x7+parseInt(_0x26d8bc(0x166))/0x8*(-parseInt(_0x26d8bc(0x15a))/0x9)+parseInt(_0x26d8bc(0x157))/0xa*(-parseInt(_0x26d8bc(0x161))/0xb);if(_0x5c043d===_0x773548)break;else _0x23710d['push'](_0x23710d['shift']());}catch(_0x16c927){_0x23710d['push'](_0x23710d['shift']());}}}(a162_0x512c,0x42005));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join,dirname,basename}from'path';function a162_0x512c(){const _0x3bd102=['2xGJSFz','2966229kjduyC','split','10USohks','.log','Warning:\x20Failed\x20to\x20initialize\x20log\x20file:','45nJQSKf','7386QXtTdB','rotateOldLogs','logBaseName','close','rotate','logs','4673757IUZRhm','replace','Warning:\x20Error\x20writing\x20to\x20','includes','filePath','299008oDmgXG','toISOString','handle','write','-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$','init','tdx.log','1385GCJIbN','format','message','Warning:\x20Failed\x20to\x20compress\x20','test','354000WXkGUU','logDir','273994kqMfue','logPath','\x5c$&','1310562tTwAEG','logStream','error','logFileName'];a162_0x512c=function(){return _0x3bd102;};return a162_0x512c();}import{createGzip}from'zlib';import{pipeline}from'stream/promises';function a162_0x5248(_0x4e9793,_0xd2ac31){_0x4e9793=_0x4e9793-0x153;const _0x512c17=a162_0x512c();let _0x5248f9=_0x512c17[_0x4e9793];return _0x5248f9;}import{Logger}from'../logger.js';import{getGlobalCacheDir}from'../../global-cache.js';export class FileHandler{[a162_0x75747b(0x175)];[a162_0x75747b(0x173)];[a162_0x75747b(0x153)];[a162_0x75747b(0x15d)];['logStream']=null;[a162_0x75747b(0x15f)];constructor(_0x5cca6f={}){const _0x3c0033=a162_0x75747b;this['logPath']=_0x5cca6f[_0x3c0033(0x165)]??join(getGlobalCacheDir(),_0x3c0033(0x160),_0x3c0033(0x16c)),this[_0x3c0033(0x173)]=dirname(this[_0x3c0033(0x175)]),this[_0x3c0033(0x153)]=basename(this[_0x3c0033(0x175)]),this[_0x3c0033(0x15d)]=this['logFileName']['replace'](/\.log$/,''),this[_0x3c0033(0x15f)]=_0x5cca6f[_0x3c0033(0x15f)]??!![];}async[a162_0x75747b(0x16b)](){const _0x37ac32=a162_0x75747b;try{await mkdir(this[_0x37ac32(0x173)],{'recursive':!![]}),this[_0x37ac32(0x15f)]&&await this['rotateOldLogs'](),this['logStream']=createWriteStream(this['logPath'],{'flags':'a'}),this[_0x37ac32(0x178)]['on'](_0x37ac32(0x179),_0x56ae45=>{const _0x22e10b=_0x37ac32;console[_0x22e10b(0x179)](_0x22e10b(0x163)+this[_0x22e10b(0x153)]+':',_0x56ae45[_0x22e10b(0x16f)]);});}catch(_0x242adb){console[_0x37ac32(0x179)](_0x37ac32(0x159),_0x242adb);}}[a162_0x75747b(0x168)](_0x3e5d9d){const _0x46531f=a162_0x75747b;if(!this[_0x46531f(0x178)])return;const _0x5acdb0=Logger[_0x46531f(0x16e)](_0x3e5d9d);this[_0x46531f(0x178)][_0x46531f(0x169)](_0x5acdb0+'\x0a');}async[a162_0x75747b(0x15e)](){return new Promise(_0x592779=>{const _0x127d5d=a162_0x5248;this['logStream']?this[_0x127d5d(0x178)]['end'](()=>{const _0x3be28e=_0x127d5d;this[_0x3be28e(0x178)]=null,_0x592779();}):_0x592779();});}['getLogPath'](){const _0x227f13=a162_0x75747b;return this[_0x227f13(0x175)];}async[a162_0x75747b(0x15c)](){const _0x1de092=a162_0x75747b;try{const _0x39a068=await readdir(this[_0x1de092(0x173)]),_0xd3c913=new Date()[_0x1de092(0x167)]()['split']('T')[0x0];if(_0x39a068[_0x1de092(0x164)](this[_0x1de092(0x153)])){const _0x37325b=join(this[_0x1de092(0x173)],this[_0x1de092(0x153)]),_0x488e48=await stat(_0x37325b),_0x4f9cd9=new Date(_0x488e48['mtime'])[_0x1de092(0x167)]()[_0x1de092(0x156)]('T')[0x0];if(_0x4f9cd9<_0xd3c913){const _0xe103d0=join(this['logDir'],this[_0x1de092(0x15d)]+'-'+_0x4f9cd9+_0x1de092(0x158));await rename(_0x37325b,_0xe103d0);}}const _0x3a139f=await readdir(this['logDir']),_0x1a5dff=this[_0x1de092(0x15d)][_0x1de092(0x162)](/[.*+?^${}()|[\]\\]/g,_0x1de092(0x176)),_0x1106db=new RegExp('^'+_0x1a5dff+_0x1de092(0x16a)),_0x416135=_0x3a139f['filter'](_0x4a0188=>_0x1106db[_0x1de092(0x171)](_0x4a0188));for(const _0x554b38 of _0x416135){const _0x579aa3=join(this[_0x1de092(0x173)],_0x554b38),_0x5778a9=join(this[_0x1de092(0x173)],_0x554b38+'.gz');try{await pipeline(createReadStream(_0x579aa3),createGzip(),createWriteStream(_0x5778a9)),await unlink(_0x579aa3);}catch(_0x213a41){console[_0x1de092(0x179)](_0x1de092(0x170)+_0x554b38+':',_0x213a41);}}}catch{}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a163_0x5ba1(_0x4a5f33,_0x396883){_0x4a5f33=_0x4a5f33-0xa9;var _0x5a7f74=a163_0x5a7f();var _0x5ba107=_0x5a7f74[_0x4a5f33];return _0x5ba107;}(function(_0x2dd23f,_0x2e7f09){var _0x2f5560=a163_0x5ba1,_0x53f4b8=_0x2dd23f();while(!![]){try{var _0x402ff4=parseInt(_0x2f5560(0xa9))/0x1+parseInt(_0x2f5560(0xaf))/0x2+parseInt(_0x2f5560(0xac))/0x3*(-parseInt(_0x2f5560(0xaa))/0x4)+-parseInt(_0x2f5560(0xae))/0x5+parseInt(_0x2f5560(0xb1))/0x6+parseInt(_0x2f5560(0xb0))/0x7+-parseInt(_0x2f5560(0xad))/0x8*(parseInt(_0x2f5560(0xab))/0x9);if(_0x402ff4===_0x2e7f09)break;else _0x53f4b8['push'](_0x53f4b8['shift']());}catch(_0x4c06d4){_0x53f4b8['push'](_0x53f4b8['shift']());}}}(a163_0x5a7f,0xec96f));export{FileHandler}from'./file-handler.js';function a163_0x5a7f(){var _0x28a105=['1101697hGoAYU','4QzSdbD','9BfBzpv','3640977GOgCRU','9665640fJvycc','1743100GJhVgA','1783794mBgzTl','5724257dKCPAG','5569260LvvyVH'];a163_0x5a7f=function(){return _0x28a105;};return a163_0x5a7f();}export{ConsoleHandler}from'./console-handler.js';export{NullHandler}from'./null-handler.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
var a164_0x2df2a9=a164_0x5c4a;(function(_0x21ea97,_0x32ca8c){var _0x282406=a164_0x5c4a,_0x214819=_0x21ea97();while(!![]){try{var _0x5d6499=parseInt(_0x282406(0x6d))/0x1+parseInt(_0x282406(0x72))/0x2+parseInt(_0x282406(0x79))/0x3*(parseInt(_0x282406(0x73))/0x4)+-parseInt(_0x282406(0x6f))/0x5*(-parseInt(_0x282406(0x70))/0x6)+-parseInt(_0x282406(0x75))/0x7*(parseInt(_0x282406(0x6e))/0x8)+parseInt(_0x282406(0x76))/0x9*(parseInt(_0x282406(0x78))/0xa)+-parseInt(_0x282406(0x74))/0xb*(parseInt(_0x282406(0x77))/0xc);if(_0x5d6499===_0x32ca8c)break;else _0x214819['push'](_0x214819['shift']());}catch(_0x1f971f){_0x214819['push'](_0x214819['shift']());}}}(a164_0x385c,0x57934));function a164_0x385c(){var _0xd861a6=['1221164CswPvO','18070679KGLLSg','7OvjSuq','117FwAnuH','12caPyat','135550lzfQkM','6FkpOUb','664153bcjHsH','1971336YJUrxc','355jgQTZM','7530wJmvIg','handle','1415718KVYcoM'];a164_0x385c=function(){return _0xd861a6;};return a164_0x385c();}function a164_0x5c4a(_0x25ad10,_0x181bd2){_0x25ad10=_0x25ad10-0x6d;var _0x385c11=a164_0x385c();var _0x5c4a81=_0x385c11[_0x25ad10];return _0x5c4a81;}export class NullHandler{[a164_0x2df2a9(0x71)](_0x269a64){}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x33512f,_0x273f7a){var _0x4ba3dc=a165_0x1515,_0x56ee21=_0x33512f();while(!![]){try{var _0x5018c7=-parseInt(_0x4ba3dc(0x12a))/0x1+-parseInt(_0x4ba3dc(0x12e))/0x2+parseInt(_0x4ba3dc(0x130))/0x3*(parseInt(_0x4ba3dc(0x132))/0x4)+-parseInt(_0x4ba3dc(0x129))/0x5*(parseInt(_0x4ba3dc(0x12d))/0x6)+-parseInt(_0x4ba3dc(0x12f))/0x7+parseInt(_0x4ba3dc(0x12c))/0x8+-parseInt(_0x4ba3dc(0x12b))/0x9*(-parseInt(_0x4ba3dc(0x131))/0xa);if(_0x5018c7===_0x273f7a)break;else _0x56ee21['push'](_0x56ee21['shift']());}catch(_0x141ca4){_0x56ee21['push'](_0x56ee21['shift']());}}}(a165_0x42f8,0x836fc));function a165_0x42f8(){var _0x1c5322=['1613546NCuRyT','4042577EQzEBh','2035551zwVvHK','5956300cYiFlo','4htySCt','175YSCdCe','116720uyqoKm','9eoOYqB','6187008OyFcLI','1398BpJTOP'];a165_0x42f8=function(){return _0x1c5322;};return a165_0x42f8();}export{Logger}from'./logger.js';function a165_0x1515(_0x9f1382,_0x5e3a31){_0x9f1382=_0x9f1382-0x129;var _0x42f897=a165_0x42f8();var _0x1515e5=_0x42f897[_0x9f1382];return _0x1515e5;}export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';export{DefaultLogFormatter}from'./formatters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0x1277ea=a166_0x3b7f;(function(_0x2e3e62,_0x58bb25){const _0x4094be=a166_0x3b7f,_0xcf07c0=_0x2e3e62();while(!![]){try{const _0x39efce=-parseInt(_0x4094be(0x19d))/0x1+parseInt(_0x4094be(0x1a6))/0x2+parseInt(_0x4094be(0x17b))/0x3+-parseInt(_0x4094be(0x190))/0x4*(-parseInt(_0x4094be(0x197))/0x5)+-parseInt(_0x4094be(0x19a))/0x6+parseInt(_0x4094be(0x1ad))/0x7+parseInt(_0x4094be(0x1af))/0x8;if(_0x39efce===_0x58bb25)break;else _0xcf07c0['push'](_0xcf07c0['shift']());}catch(_0x4c86db){_0xcf07c0['push'](_0xcf07c0['shift']());}}}(a166_0x5d10,0xca6e0));import{LogLevel as a166_0x4d60b3,logLevelToString}from'./types.js';const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a166_0x4d60b3[a166_0x1277ea(0x1b0)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x4d9db5){const _0x553caf=a166_0x1277ea;if(typeof _0x4d9db5===_0x553caf(0x1aa))return _0x4d9db5;if(_0x4d9db5 instanceof Error)return _0x4d9db5['stack']||_0x4d9db5[_0x553caf(0x1a2)]+':\x20'+_0x4d9db5[_0x553caf(0x1a4)];try{return JSON['stringify'](_0x4d9db5,(_0x509a3a,_0x19c109)=>{const _0x9dcd94=_0x553caf;if(_0x19c109 instanceof Error)return{'name':_0x19c109[_0x9dcd94(0x1a2)],'message':_0x19c109['message'],'stack':_0x19c109[_0x9dcd94(0x183)],'cause':_0x19c109[_0x9dcd94(0x184)]};return _0x19c109;});}catch{return String(_0x4d9db5);}}function a166_0x5d10(){const _0x4ea4f8=['reset','stack','cause','addHandler','DEBUG','getFormatter','push','getEffectiveLevel','dispatch','map','length','level','close','loggers','1464644nWqQBy','shouldLog','component','slice','clearHandlers','initialized','format','5SKVWbn','timestamp','trace','8041584LYbrEj','info','formatter','1446233tvGNXh','has','defaultLevel','WARN','entries','name','clear','message','error','978376PSKKjT','get','handlers','set','string','setDefaultLevel','warn','2977464QmUhWj','split','16636080zAPsIO','INFO','setLogLevel','handle','pendingRecords','766314DzIyeA','levelOverrides','log',']\x20[','init','join','isInitialized'];a166_0x5d10=function(){return _0x4ea4f8;};return a166_0x5d10();}function a166_0x3b7f(_0x3f9d89,_0x207219){_0x3f9d89=_0x3f9d89-0x17b;const _0x5d10c3=a166_0x5d10();let _0x3b7fb6=_0x5d10c3[_0x3f9d89];return _0x3b7fb6;}export class Logger{[a166_0x1277ea(0x192)];constructor(_0x4eb9b1){const _0x278cff=a166_0x1277ea;this[_0x278cff(0x192)]=_0x4eb9b1;}static['of'](_0x1d39e8){const _0x58eb45=a166_0x1277ea,_0x3a77e4=typeof _0x1d39e8==='string'?_0x1d39e8:_0x1d39e8[_0x58eb45(0x1a2)];let _0x4a8905=state[_0x58eb45(0x18f)]['get'](_0x3a77e4);return!_0x4a8905&&(_0x4a8905=new Logger(_0x3a77e4),state[_0x58eb45(0x18f)]['set'](_0x3a77e4,_0x4a8905)),_0x4a8905;}static async[a166_0x1277ea(0x17f)](_0x1abe2f={}){const _0x899298=a166_0x1277ea;state['defaultLevel']=_0x1abe2f[_0x899298(0x19f)]??a166_0x4d60b3[_0x899298(0x1b0)],state[_0x899298(0x1a8)]=_0x1abe2f[_0x899298(0x1a8)]??[],state['formatter']=_0x1abe2f[_0x899298(0x19c)]??null,state[_0x899298(0x17c)][_0x899298(0x1a3)]();if(_0x1abe2f['levelOverrides'])for(const [_0xe2b935,_0x14de4b]of Object[_0x899298(0x1a1)](_0x1abe2f['levelOverrides'])){state[_0x899298(0x17c)][_0x899298(0x1a9)](_0xe2b935,_0x14de4b);}for(const _0x9eef6c of state[_0x899298(0x1a8)]){_0x9eef6c['init']&&await _0x9eef6c[_0x899298(0x17f)]();}state['initialized']=!![];for(const _0x4ccf9e of state[_0x899298(0x1b3)]){Logger['dispatch'](_0x4ccf9e);}state[_0x899298(0x1b3)]=[];}static[a166_0x1277ea(0x1b1)](_0x4b7153,_0x5256ec){const _0x54fd33=a166_0x1277ea;state[_0x54fd33(0x17c)][_0x54fd33(0x1a9)](_0x4b7153,_0x5256ec);}static[a166_0x1277ea(0x1ab)](_0x39af30){state['defaultLevel']=_0x39af30;}static[a166_0x1277ea(0x185)](_0x4117b9){const _0x1d3b16=a166_0x1277ea;state[_0x1d3b16(0x1a8)][_0x1d3b16(0x188)](_0x4117b9),state[_0x1d3b16(0x195)]&&_0x4117b9[_0x1d3b16(0x17f)]&&_0x4117b9[_0x1d3b16(0x17f)]();}static[a166_0x1277ea(0x194)](){const _0x5868e9=a166_0x1277ea;state[_0x5868e9(0x1a8)]=[];}static async['shutdown'](){const _0x4b18ed=a166_0x1277ea;for(const _0x3dc8c5 of state['handlers']){_0x3dc8c5[_0x4b18ed(0x18e)]&&await _0x3dc8c5[_0x4b18ed(0x18e)]();}state[_0x4b18ed(0x1a8)]=[],state[_0x4b18ed(0x195)]=![],state['loggers']['clear'](),state[_0x4b18ed(0x1b3)]=[];}static[a166_0x1277ea(0x182)](){const _0xfdbf77=a166_0x1277ea;state['initialized']=![],state[_0xfdbf77(0x19f)]=a166_0x4d60b3['INFO'],state['levelOverrides'][_0xfdbf77(0x1a3)](),state[_0xfdbf77(0x1a8)]=[],state[_0xfdbf77(0x19c)]=null,state[_0xfdbf77(0x18f)][_0xfdbf77(0x1a3)](),state[_0xfdbf77(0x1b3)]=[];}static[a166_0x1277ea(0x181)](){const _0x4bc354=a166_0x1277ea;return state[_0x4bc354(0x195)];}static[a166_0x1277ea(0x189)](_0x23f5b7){const _0x1e5d09=a166_0x1277ea;if(state[_0x1e5d09(0x17c)][_0x1e5d09(0x19e)](_0x23f5b7))return state[_0x1e5d09(0x17c)][_0x1e5d09(0x1a7)](_0x23f5b7);const _0x30c141=_0x23f5b7[_0x1e5d09(0x1ae)]('.');for(let _0x17c8a0=_0x30c141[_0x1e5d09(0x18c)]-0x1;_0x17c8a0>0x0;_0x17c8a0--){const _0x517521=_0x30c141[_0x1e5d09(0x193)](0x0,_0x17c8a0)[_0x1e5d09(0x180)]('.');if(state[_0x1e5d09(0x17c)][_0x1e5d09(0x19e)](_0x517521))return state[_0x1e5d09(0x17c)][_0x1e5d09(0x1a7)](_0x517521);}return state[_0x1e5d09(0x19f)];}[a166_0x1277ea(0x191)](_0x44311a){const _0x56931d=a166_0x1277ea,_0x5e40fb=Logger[_0x56931d(0x189)](this['component']);return _0x44311a>=_0x5e40fb;}static[a166_0x1277ea(0x18a)](_0x162742){const _0x38b2fd=a166_0x1277ea;for(const _0x4ddd23 of state[_0x38b2fd(0x1a8)]){_0x4ddd23[_0x38b2fd(0x1b2)](_0x162742);}}[a166_0x1277ea(0x17d)](_0x40f0b7,_0x32c1e1){const _0x45bcc7=a166_0x1277ea;if(!this['shouldLog'](_0x40f0b7))return;const _0x57a254=_0x32c1e1['map'](_0x72ec7a=>typeof _0x72ec7a==='function'?_0x72ec7a():_0x72ec7a),_0x13f5f9=_0x57a254[_0x45bcc7(0x18b)](safeStringify)['join']('\x20'),_0x2b2942={'timestamp':new Date(),'level':_0x40f0b7,'component':this[_0x45bcc7(0x192)],'message':_0x13f5f9};if(!state['initialized']){state[_0x45bcc7(0x1b3)][_0x45bcc7(0x18c)]<MAX_PENDING_RECORDS&&state[_0x45bcc7(0x1b3)]['push'](_0x2b2942);return;}Logger[_0x45bcc7(0x18a)](_0x2b2942);}[a166_0x1277ea(0x199)](..._0x13f33c){const _0x310d3c=a166_0x1277ea;this[_0x310d3c(0x17d)](a166_0x4d60b3['TRACE'],_0x13f33c);}['debug'](..._0x2c45ae){const _0x3281e2=a166_0x1277ea;this[_0x3281e2(0x17d)](a166_0x4d60b3[_0x3281e2(0x186)],_0x2c45ae);}[a166_0x1277ea(0x19b)](..._0x1d3977){const _0x5072d7=a166_0x1277ea;this['log'](a166_0x4d60b3[_0x5072d7(0x1b0)],_0x1d3977);}[a166_0x1277ea(0x1ac)](..._0x3abbc1){const _0x47c238=a166_0x1277ea;this[_0x47c238(0x17d)](a166_0x4d60b3[_0x47c238(0x1a0)],_0x3abbc1);}[a166_0x1277ea(0x1a5)](..._0x120494){const _0x4d10aa=a166_0x1277ea;this[_0x4d10aa(0x17d)](a166_0x4d60b3['ERROR'],_0x120494);}static[a166_0x1277ea(0x187)](){const _0xc53376=a166_0x1277ea;return state[_0xc53376(0x19c)];}static[a166_0x1277ea(0x196)](_0x46d2a6){const _0x1592b2=a166_0x1277ea;if(state[_0x1592b2(0x19c)])return state['formatter']['format'](_0x46d2a6);return _0x46d2a6[_0x1592b2(0x198)]['toISOString']()+'\x20['+logLevelToString(_0x46d2a6[_0x1592b2(0x18d)])+_0x1592b2(0x17e)+_0x46d2a6['component']+']\x20'+_0x46d2a6['message'];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cdfb8,_0x992f3a){const _0x77fcd7=a167_0x1703,_0x38eb75=_0x2cdfb8();while(!![]){try{const _0x4b107c=parseInt(_0x77fcd7(0xb5))/0x1+-parseInt(_0x77fcd7(0xa4))/0x2+parseInt(_0x77fcd7(0xa3))/0x3+parseInt(_0x77fcd7(0xaf))/0x4+-parseInt(_0x77fcd7(0x9f))/0x5+parseInt(_0x77fcd7(0xab))/0x6*(parseInt(_0x77fcd7(0xbb))/0x7)+-parseInt(_0x77fcd7(0xaa))/0x8*(parseInt(_0x77fcd7(0xa9))/0x9);if(_0x4b107c===_0x992f3a)break;else _0x38eb75['push'](_0x38eb75['shift']());}catch(_0x4fa59b){_0x38eb75['push'](_0x38eb75['shift']());}}}(a167_0x3648,0xa2f34));export var LogLevel;function a167_0x3648(){const _0x47e281=['error','1763405XqBdgr','padStart','6133325ibzwgx','getFullYear','floor','getTimezoneOffset','3884163Mparna','1094460XGWdpv','DEBUG','getMilliseconds','ERROR','info','5646330aqeUIS','16CkjCdB','12mUbVRi','INFO','warn','abs','2343116ESmtuS','toString','debug','getSeconds','toUpperCase','getHours','1311749SqSyBl','WARN','TRACE','getDate','getMinutes'];a167_0x3648=function(){return _0x47e281;};return a167_0x3648();}(function(_0x848d73){const _0x32d9a7=a167_0x1703;_0x848d73[_0x848d73[_0x32d9a7(0xb7)]=-0x2]='TRACE',_0x848d73[_0x848d73[_0x32d9a7(0xa5)]=-0x1]=_0x32d9a7(0xa5),_0x848d73[_0x848d73['INFO']=0x0]=_0x32d9a7(0xac),_0x848d73[_0x848d73[_0x32d9a7(0xb6)]=0x1]=_0x32d9a7(0xb6),_0x848d73[_0x848d73['ERROR']=0x2]='ERROR';}(LogLevel||(LogLevel={})));function a167_0x1703(_0x3c17b4,_0x541fc3){_0x3c17b4=_0x3c17b4-0x9e;const _0x3648bf=a167_0x3648();let _0x1703ee=_0x3648bf[_0x3c17b4];return _0x1703ee;}export function parseLogLevel(_0x5b5bc0){const _0xe13751=a167_0x1703;switch(_0x5b5bc0[_0xe13751(0xb3)]()){case _0xe13751(0xb7):return LogLevel[_0xe13751(0xb7)];case _0xe13751(0xa5):return LogLevel[_0xe13751(0xa5)];case _0xe13751(0xac):return LogLevel[_0xe13751(0xac)];case _0xe13751(0xb6):case'WARNING':return LogLevel[_0xe13751(0xb6)];case _0xe13751(0xa7):return LogLevel[_0xe13751(0xa7)];default:return LogLevel[_0xe13751(0xac)];}}export function logLevelToString(_0x5b924e){const _0x1875a7=a167_0x1703;switch(_0x5b924e){case LogLevel[_0x1875a7(0xb7)]:return'trace';case LogLevel[_0x1875a7(0xa5)]:return _0x1875a7(0xb1);case LogLevel['INFO']:return _0x1875a7(0xa8);case LogLevel[_0x1875a7(0xb6)]:return _0x1875a7(0xad);case LogLevel[_0x1875a7(0xa7)]:return _0x1875a7(0xba);default:return _0x1875a7(0xa8);}}export function formatTimestamp(_0xebe3e){const _0x3d9866=a167_0x1703,_0x21643e=_0xebe3e[_0x3d9866(0xa0)](),_0x548085=(_0xebe3e['getMonth']()+0x1)[_0x3d9866(0xb0)]()['padStart'](0x2,'0'),_0x1b6ba9=_0xebe3e[_0x3d9866(0xb8)]()[_0x3d9866(0xb0)]()[_0x3d9866(0x9e)](0x2,'0'),_0x28674f=_0xebe3e[_0x3d9866(0xb4)]()['toString']()[_0x3d9866(0x9e)](0x2,'0'),_0x578a69=_0xebe3e[_0x3d9866(0xb9)]()[_0x3d9866(0xb0)]()[_0x3d9866(0x9e)](0x2,'0'),_0x3b0e9a=_0xebe3e[_0x3d9866(0xb2)]()['toString']()['padStart'](0x2,'0'),_0x2155b4=_0xebe3e[_0x3d9866(0xa6)]()[_0x3d9866(0xb0)]()['padStart'](0x3,'0'),_0x4b58a5=-_0xebe3e[_0x3d9866(0xa2)](),_0x1a581e=Math[_0x3d9866(0xa1)](Math[_0x3d9866(0xae)](_0x4b58a5)/0x3c),_0x21bb43=Math[_0x3d9866(0xae)](_0x4b58a5)%0x3c,_0x1f00bb=_0x4b58a5>=0x0?'+':'-',_0x5333d9=''+_0x1f00bb+_0x1a581e['toString']()[_0x3d9866(0x9e)](0x2,'0')+_0x21bb43[_0x3d9866(0xb0)]()[_0x3d9866(0x9e)](0x2,'0');return _0x21643e+'-'+_0x548085+'-'+_0x1b6ba9+'\x20'+_0x28674f+':'+_0x578a69+':'+_0x3b0e9a+'.'+_0x2155b4+_0x5333d9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a168_0x32ae(_0x22539f,_0x4b86e4){_0x22539f=_0x22539f-0xce;const _0x54f0c4=a168_0x54f0();let _0x32ae81=_0x54f0c4[_0x22539f];return _0x32ae81;}function a168_0x54f0(){const _0x47abe0=['Invalid\x20limit\x20value:\x20','1571308sWgMoI','1cDSHjC','13992072oKbuwD','11854920jeqsGN','isInteger','.\x20Must\x20be\x20a\x20positive\x20integer.','.\x20Must\x20be\x20a\x20number.','.\x20Must\x20be\x20a\x20positive\x20number.','4714650mfWnDg','number','5522340uUfiMy','40LXbbgr','9693474oTTWwX','6rFrOYX','.\x20Must\x20be\x20an\x20integer.','2351162cdlByM','Invalid\x20timeout\x20value:\x20'];a168_0x54f0=function(){return _0x47abe0;};return a168_0x54f0();}(function(_0x2293e0,_0x589a81){const _0x374bbc=a168_0x32ae,_0x25732b=_0x2293e0();while(!![]){try{const _0x402338=parseInt(_0x374bbc(0xd3))/0x1*(parseInt(_0x374bbc(0xcf))/0x2)+parseInt(_0x374bbc(0xdf))/0x3*(-parseInt(_0x374bbc(0xd2))/0x4)+parseInt(_0x374bbc(0xdc))/0x5+parseInt(_0x374bbc(0xde))/0x6+parseInt(_0x374bbc(0xd5))/0x7+-parseInt(_0x374bbc(0xd4))/0x8+parseInt(_0x374bbc(0xda))/0x9*(-parseInt(_0x374bbc(0xdd))/0xa);if(_0x402338===_0x589a81)break;else _0x25732b['push'](_0x25732b['shift']());}catch(_0xd289c2){_0x25732b['push'](_0x25732b['shift']());}}}(a168_0x54f0,0xea295));export function validateLimitOption(_0x7e441e){const _0x3295a5=a168_0x32ae;if(!Number[_0x3295a5(0xd6)](_0x7e441e))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x7e441e+_0x3295a5(0xce)};if(_0x7e441e<=0x0)return{'isValid':![],'error':_0x3295a5(0xd1)+_0x7e441e+_0x3295a5(0xd7)};return{'isValid':!![],'value':_0x7e441e};}export function validateTimeoutOption(_0x511392,_0x12ea89=0x1e){const _0x3db348=a168_0x32ae;if(_0x511392===undefined)return{'isValid':!![],'value':_0x12ea89};const _0x14b6ff=typeof _0x511392===_0x3db348(0xdb)?_0x511392:parseFloat(_0x511392);if(isNaN(_0x14b6ff))return{'isValid':![],'error':_0x3db348(0xd0)+_0x511392+_0x3db348(0xd8)};if(_0x14b6ff<=0x0)return{'isValid':![],'error':_0x3db348(0xd0)+_0x14b6ff+_0x3db348(0xd9)};return{'isValid':!![],'value':_0x14b6ff};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x22779b,_0x528a66){const _0x17f670=a169_0x4107,_0x46bce4=_0x22779b();while(!![]){try{const _0x4783f1=-parseInt(_0x17f670(0xd9))/0x1*(-parseInt(_0x17f670(0xd4))/0x2)+parseInt(_0x17f670(0xd1))/0x3*(-parseInt(_0x17f670(0xda))/0x4)+parseInt(_0x17f670(0xdb))/0x5+parseInt(_0x17f670(0xca))/0x6+-parseInt(_0x17f670(0xdc))/0x7+-parseInt(_0x17f670(0xd3))/0x8*(-parseInt(_0x17f670(0xdd))/0x9)+parseInt(_0x17f670(0xd2))/0xa*(-parseInt(_0x17f670(0xcd))/0xb);if(_0x4783f1===_0x528a66)break;else _0x46bce4['push'](_0x46bce4['shift']());}catch(_0x2d1a2a){_0x46bce4['push'](_0x46bce4['shift']());}}}(a169_0x32e3,0x45f83));import{createServer}from'node:net';function a169_0x4107(_0xade896,_0x145ab9){_0xade896=_0xade896-0xca;const _0x32e32e=a169_0x32e3();let _0x4107c1=_0x32e32e[_0xade896];return _0x4107c1;}export async function isPortAvailable(_0x5e56bb){return new Promise(_0x2c6423=>{const _0x58d5c4=a169_0x4107,_0x38ad18=createServer();_0x38ad18[_0x58d5c4(0xd7)](_0x58d5c4(0xcb),_0x23c6af=>{const _0x30cc2c=_0x58d5c4;_0x23c6af['code']===_0x30cc2c(0xd0)?_0x2c6423(![]):_0x2c6423(![]);}),_0x38ad18[_0x58d5c4(0xd7)](_0x58d5c4(0xcc),()=>{const _0x53cb3b=_0x58d5c4;_0x38ad18[_0x53cb3b(0xd5)](),_0x2c6423(!![]);}),_0x38ad18[_0x58d5c4(0xd8)](_0x5e56bb,_0x58d5c4(0xd6));});}function a169_0x32e3(){const _0x1f9b1d=['No\x20available\x20port\x20found\x20between\x20','EADDRINUSE','33KnxyVs','1019530KuruKM','136LNDUSf','28698RimgeN','close','0.0.0.0','once','listen','15drGKRd','20676PQmsQU','2833910BuMUal','1270115LJMjmL','104679AUMZak','941238nPhqGz','error','listening','66OXHssZ','\x20and\x20'];a169_0x32e3=function(){return _0x1f9b1d;};return a169_0x32e3();}export async function findAvailablePort(_0x56d7d6=0xfa0,_0x7c03ca=0x64){const _0x553e76=a169_0x4107;for(let _0x5ef5b1=0x0;_0x5ef5b1<_0x7c03ca;_0x5ef5b1++){const _0x560a4e=_0x56d7d6+_0x5ef5b1;if(await isPortAvailable(_0x560a4e))return _0x560a4e;}throw new Error(_0x553e76(0xcf)+_0x56d7d6+_0x553e76(0xce)+(_0x56d7d6+_0x7c03ca-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0xcc23f2=a170_0x2c86;(function(_0x308128,_0x3061b6){const _0x5c9771=a170_0x2c86,_0x2842aa=_0x308128();while(!![]){try{const _0x24115c=parseInt(_0x5c9771(0x1d4))/0x1+parseInt(_0x5c9771(0x1d2))/0x2+parseInt(_0x5c9771(0x1e0))/0x3*(-parseInt(_0x5c9771(0x1cc))/0x4)+-parseInt(_0x5c9771(0x1df))/0x5*(-parseInt(_0x5c9771(0x1d8))/0x6)+-parseInt(_0x5c9771(0x1b9))/0x7*(parseInt(_0x5c9771(0x1dd))/0x8)+-parseInt(_0x5c9771(0x1ae))/0x9*(parseInt(_0x5c9771(0x1d5))/0xa)+parseInt(_0x5c9771(0x1cb))/0xb;if(_0x24115c===_0x3061b6)break;else _0x2842aa['push'](_0x2842aa['shift']());}catch(_0x53038a){_0x2842aa['push'](_0x2842aa['shift']());}}}(a170_0xc8f8,0xb3d34));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a170_0xcc23f2(0x1c8),a170_0xcc23f2(0x1b5),'sh','fish',a170_0xcc23f2(0x1cd),'tcsh',a170_0xcc23f2(0x1a9),a170_0xcc23f2(0x1b2),a170_0xcc23f2(0x1e7),a170_0xcc23f2(0x1d1),'nu',a170_0xcc23f2(0x1da),'elvish','xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a170_0xcc23f2(0x1b1),a170_0xcc23f2(0x1de),a170_0xcc23f2(0x1ce),'electron','treasure\x20studio']);function getProcessInfoWindows(_0x5e4bd7){const _0x3c3c65=a170_0xcc23f2;try{if(!Number['isInteger'](_0x5e4bd7)||_0x5e4bd7<=0x0)return null;const _0x3da0ad=_0x3c3c65(0x1db)+_0x5e4bd7+_0x3c3c65(0x1cf),_0xdaa796=execSync(_0x3c3c65(0x1bb)+_0x3da0ad+'\x22',{'encoding':_0x3c3c65(0x1be),'windowsHide':!![],'stdio':[_0x3c3c65(0x1d6),'pipe','pipe']})['trim']();if(!_0xdaa796)return null;const [_0x44c343,..._0xa4600d]=_0xdaa796[_0x3c3c65(0x1d9)](','),_0x38eaa4=parseInt(_0x44c343,0xa),_0x3cbab6=_0xa4600d[_0x3c3c65(0x1ac)](',')['trim']();if(isNaN(_0x38eaa4)||!_0x3cbab6)return null;return{'pid':_0x5e4bd7,'ppid':_0x38eaa4,'comm':_0x3cbab6[_0x3c3c65(0x1c7)](/\.exe$/i,'')};}catch{return null;}}function a170_0xc8f8(){const _0x9c77a5=['4328FeBzZy','ksh','cursor','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','open','powershell','2057576xhWCwX','toString','1156869pwBtMv','390eWAbRW','pipe','map','60BtHQbb','split','ion','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','xdg-open','645776XzZjfk','code','122690wxzViq','3675TRDpls','which','href','ignore','trim','exit','start','pwsh','csh','where.exe','data','join','unref','333603brediz','ps\x20-p\x20','Invalid\x20URL:\x20','claude','dash','Unsupported\x20protocol:\x20','platform','zsh','https:','ppid','stderr','35MgaPgW','comm','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','pid','error','utf-8','\x20-o\x20ppid=,comm=','has','http:','isInteger','darwin','stdout','kill','protocol','replace','bash','win32','test','16282200mUnHaF'];a170_0xc8f8=function(){return _0x9c77a5;};return a170_0xc8f8();}function getProcessInfoPosix(_0xe8eab7){const _0x575a28=a170_0xcc23f2;try{const _0x2ee97f=0x400000;if(!Number[_0x575a28(0x1c2)](_0xe8eab7)||_0xe8eab7<=0x0||_0xe8eab7>_0x2ee97f)return null;const _0x1dedc8=execSync(_0x575a28(0x1af)+_0xe8eab7+_0x575a28(0x1bf),{'encoding':_0x575a28(0x1be),'stdio':'pipe'})[_0x575a28(0x1e4)](),[_0xcf11a6,..._0x3db586]=_0x1dedc8[_0x575a28(0x1d9)](/\s+/),_0x353de1=parseInt(_0xcf11a6,0xa),_0x2cd378=_0x3db586[_0x575a28(0x1ac)]('\x20');if(isNaN(_0x353de1))return null;return{'pid':_0xe8eab7,'ppid':_0x353de1,'comm':_0x2cd378};}catch{return null;}}function getProcessInfo(_0xfc5dd){const _0x2d53ac=a170_0xcc23f2;if(process[_0x2d53ac(0x1b4)]==='win32')return getProcessInfoWindows(_0xfc5dd);return getProcessInfoPosix(_0xfc5dd);}function getBasename(_0x3e6183){return _0x3e6183['replace'](/^-/,'')['split']('/')['pop']()?.['toLowerCase']()||'';}function isShell(_0x5b74c9){return SHELL_NAMES['has'](getBasename(_0x5b74c9));}function isEphemeralShellSpawner(_0x20bc42){const _0xc4f0aa=a170_0xcc23f2;return EPHEMERAL_SHELL_SPAWNERS[_0xc4f0aa(0x1c0)](getBasename(_0x20bc42));}let cachedShellPID;function findShellPID(){const _0x40be62=a170_0xcc23f2;if(process['ppid']===undefined)return process['pid'];let _0x2323a4=process[_0x40be62(0x1b7)];const _0xf65e26=0xa;let _0x2b5326=0x0;while(_0x2b5326<_0xf65e26){const _0x41d8c6=getProcessInfo(_0x2323a4);if(!_0x41d8c6)break;if(isShell(_0x41d8c6['comm'])){const _0x5b0892=getProcessInfo(_0x41d8c6[_0x40be62(0x1b7)]);if(_0x5b0892&&isEphemeralShellSpawner(_0x5b0892[_0x40be62(0x1ba)])){_0x2323a4=_0x41d8c6[_0x40be62(0x1b7)],_0x2b5326++;continue;}return _0x41d8c6[_0x40be62(0x1bc)];}if(_0x41d8c6['ppid']===0x0||_0x41d8c6[_0x40be62(0x1b7)]===0x1){if(isShell(_0x41d8c6[_0x40be62(0x1ba)]))return _0x41d8c6[_0x40be62(0x1bc)];break;}_0x2323a4=_0x41d8c6[_0x40be62(0x1b7)],_0x2b5326++;}return process[_0x40be62(0x1b7)]!==undefined?process[_0x40be62(0x1b7)]:process[_0x40be62(0x1bc)];}function a170_0x2c86(_0x559223,_0x2adccf){_0x559223=_0x559223-0x1a9;const _0xc8f8ad=a170_0xc8f8();let _0x2c8653=_0xc8f8ad[_0x559223];return _0x2c8653;}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x3cbe67){const _0x418d9e=a170_0xcc23f2;if(!Number[_0x418d9e(0x1c2)](_0x3cbe67)||_0x3cbe67<=0x0)return![];try{return process[_0x418d9e(0x1c5)](_0x3cbe67,0x0),!![];}catch{return![];}}export function openBrowser(_0x2af9b8){const _0x26c2f5=a170_0xcc23f2;let _0x44650e;try{_0x44650e=new URL(_0x2af9b8);}catch{throw new Error(_0x26c2f5(0x1b0)+_0x2af9b8);}if(_0x44650e[_0x26c2f5(0x1c6)]!==_0x26c2f5(0x1c1)&&_0x44650e['protocol']!==_0x26c2f5(0x1b6))throw new Error(_0x26c2f5(0x1b3)+_0x44650e[_0x26c2f5(0x1c6)]);const _0x1cd842=_0x44650e[_0x26c2f5(0x1e2)],_0x129f86=process['platform'];if(_0x129f86===_0x26c2f5(0x1c9))spawn('cmd.exe',['/c',_0x26c2f5(0x1e6),'',_0x1cd842],{'detached':!![],'stdio':_0x26c2f5(0x1e3)})[_0x26c2f5(0x1ad)]();else{const _0x34aab8=_0x129f86===_0x26c2f5(0x1c3)?_0x26c2f5(0x1d0):_0x26c2f5(0x1dc);spawn(_0x34aab8,[_0x1cd842],{'detached':!![],'stdio':'ignore'})[_0x26c2f5(0x1ad)]();}}export function isWindows(){const _0x3b7230=a170_0xcc23f2;return process[_0x3b7230(0x1b4)]===_0x3b7230(0x1c9);}export function getCrossSpawnOptions(_0x506124){return{..._0x506124??{},'shell':isWindows()};}export function escapeWindowsArg(_0x2447d7){const _0x470fe6=a170_0xcc23f2;if(!/[ \t"&|<>^%!`\r\n]/[_0x470fe6(0x1ca)](_0x2447d7))return _0x2447d7;const _0x10831c=_0x2447d7[_0x470fe6(0x1c7)](/"/g,'\x22\x22');return'\x22'+_0x10831c+'\x22';}export function crossSpawn(_0x1d4bbd,_0x1c7a62,_0x3abd14){const _0x48f728=a170_0xcc23f2;if(isWindows()){const _0x2d52fa=escapeWindowsArg(_0x1d4bbd),_0x586adc=_0x1c7a62[_0x48f728(0x1d7)](escapeWindowsArg),_0x8a8504=[_0x2d52fa,..._0x586adc][_0x48f728(0x1ac)]('\x20');return spawn(_0x8a8504,[],{..._0x3abd14,'shell':!![]});}return spawn(_0x1d4bbd,_0x1c7a62,{..._0x3abd14,'shell':![]});}export function gracefulExit(_0x58e374=0x0){const _0x2846b1=a170_0xcc23f2;isWindows()?setImmediate(()=>process[_0x2846b1(0x1e5)](_0x58e374)):process['exit'](_0x58e374);}export function findExecutable(_0x11b6a6,_0x3e6d85=0x1388){return new Promise(_0x5a6a4d=>{const _0x1fd172=a170_0x2c86,_0x512f74=isWindows()?_0x1fd172(0x1aa):_0x1fd172(0x1e1);let _0x476cc7=![];const _0x325027=crossSpawn(_0x512f74,[_0x11b6a6],{'stdio':_0x1fd172(0x1d6)}),_0x263be6=setTimeout(()=>{const _0x45337a=_0x1fd172;!_0x476cc7&&(_0x476cc7=!![],_0x325027[_0x45337a(0x1c5)](),_0x5a6a4d(null));},_0x3e6d85);let _0x21875f='';_0x325027[_0x1fd172(0x1c4)]?.['on'](_0x1fd172(0x1ab),_0x2722df=>{const _0x233e7f=_0x1fd172;_0x21875f+=_0x2722df[_0x233e7f(0x1d3)]();}),_0x325027[_0x1fd172(0x1b8)]?.['on'](_0x1fd172(0x1ab),()=>{}),_0x325027['on']('exit',_0x38d832=>{const _0x999ca3=_0x1fd172;if(_0x476cc7)return;_0x476cc7=!![],clearTimeout(_0x263be6);if(_0x38d832===0x0&&_0x21875f['trim']()){const _0x5b51a2=_0x21875f[_0x999ca3(0x1e4)]()[_0x999ca3(0x1d9)](/\r?\n/)[0x0];_0x5a6a4d(_0x5b51a2);}else _0x5a6a4d(null);}),_0x325027['on'](_0x1fd172(0x1bd),()=>{if(_0x476cc7)return;_0x476cc7=!![],clearTimeout(_0x263be6),_0x5a6a4d(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf17857,_0x3a0679){const _0x3aa72c=a171_0x2419,_0x49fa0e=_0xf17857();while(!![]){try{const _0x55dca2=-parseInt(_0x3aa72c(0xa0))/0x1*(-parseInt(_0x3aa72c(0x9d))/0x2)+-parseInt(_0x3aa72c(0xa8))/0x3+-parseInt(_0x3aa72c(0xa6))/0x4+parseInt(_0x3aa72c(0x99))/0x5*(parseInt(_0x3aa72c(0xad))/0x6)+parseInt(_0x3aa72c(0xb1))/0x7+-parseInt(_0x3aa72c(0xa9))/0x8*(-parseInt(_0x3aa72c(0x9c))/0x9)+parseInt(_0x3aa72c(0x9b))/0xa;if(_0x55dca2===_0x3a0679)break;else _0x49fa0e['push'](_0x49fa0e['shift']());}catch(_0x5dea64){_0x49fa0e['push'](_0x49fa0e['shift']());}}}(a171_0x2e45,0x36a6b));function a171_0x2e45(){const _0x339246=['231135bFVyNP','close','data','toLowerCase','exit','resume','1238904oZdBrr','setRawMode','1103391tnJSzX','383704CcMcjb','write','removeListener','isTTY','70116rigFKR','utf8','setEncoding','stderr','1055047qhlWmc','pause','stdin','stdout','30fXiTCP','\x20(y/N):\x20','1136610LHBLDq','63bDagqQ','2XfpIBG','question','\x20[y/N]\x20'];a171_0x2e45=function(){return _0x339246;};return a171_0x2e45();}function a171_0x2419(_0xd5cdf3,_0x5550b4){_0xd5cdf3=_0xd5cdf3-0x98;const _0x2e4505=a171_0x2e45();let _0x241912=_0x2e4505[_0xd5cdf3];return _0x241912;}import*as a171_0x4fb01c from'readline';export function isInteractive(){const _0x2be09e=a171_0x2419;return process[_0x2be09e(0xb3)][_0x2be09e(0xac)]===!![];}export async function confirm(_0x1a3d41){const _0x2599ea=a171_0x2419,_0x10dc32=a171_0x4fb01c['createInterface']({'input':process[_0x2599ea(0xb3)],'output':process[_0x2599ea(0x98)]});return new Promise(_0x2bf1fa=>{const _0x5279cf=_0x2599ea;_0x10dc32[_0x5279cf(0x9e)](_0x1a3d41+_0x5279cf(0x9a),_0x110795=>{const _0x592705=_0x5279cf;_0x10dc32[_0x592705(0xa1)](),_0x2bf1fa(_0x110795['toLowerCase']()==='y'||_0x110795[_0x592705(0xa3)]()==='yes');});});}export async function confirmKey(_0x16219b){const _0x4e75f8=a171_0x2419;if(!process[_0x4e75f8(0xb3)][_0x4e75f8(0xac)])return![];return process['stderr']['write'](_0x16219b+_0x4e75f8(0x9f)),new Promise(_0xe5cd3a=>{const _0x7f1d86=_0x4e75f8,_0x481979=process[_0x7f1d86(0xb3)];_0x481979[_0x7f1d86(0xa7)](!![]),_0x481979[_0x7f1d86(0xa5)](),_0x481979[_0x7f1d86(0xaf)](_0x7f1d86(0xae));const _0x31c780=_0x1d021a=>{const _0x50d0d6=_0x7f1d86;_0x481979[_0x50d0d6(0xa7)](![]),_0x481979[_0x50d0d6(0xb2)](),_0x481979[_0x50d0d6(0xab)](_0x50d0d6(0xa2),_0x31c780);if(_0x1d021a==='\x1b'){process[_0x50d0d6(0xb0)][_0x50d0d6(0xaa)]('\x0a'),_0xe5cd3a(![]);return;}_0x1d021a==='\x03'&&(process[_0x50d0d6(0xb0)]['write']('\x0a'),process[_0x50d0d6(0xa4)](0x82));if(_0x1d021a[_0x50d0d6(0xa3)]()==='y'){process['stderr'][_0x50d0d6(0xaa)]('y\x0a'),_0xe5cd3a(!![]);return;}process[_0x50d0d6(0xb0)][_0x50d0d6(0xaa)]('\x0a'),_0xe5cd3a(![]);};_0x481979['on'](_0x7f1d86(0xa2),_0x31c780);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x590fa7,_0x272bb1){const _0x1ed9e6=a172_0x38dc,_0x10a627=_0x590fa7();while(!![]){try{const _0x9632e9=parseInt(_0x1ed9e6(0x153))/0x1+parseInt(_0x1ed9e6(0x150))/0x2+-parseInt(_0x1ed9e6(0x160))/0x3+parseInt(_0x1ed9e6(0x14c))/0x4*(-parseInt(_0x1ed9e6(0x158))/0x5)+parseInt(_0x1ed9e6(0x15d))/0x6*(-parseInt(_0x1ed9e6(0x149))/0x7)+parseInt(_0x1ed9e6(0x15c))/0x8*(parseInt(_0x1ed9e6(0x14d))/0x9)+-parseInt(_0x1ed9e6(0x147))/0xa*(-parseInt(_0x1ed9e6(0x159))/0xb);if(_0x9632e9===_0x272bb1)break;else _0x10a627['push'](_0x10a627['shift']());}catch(_0x3d5eb0){_0x10a627['push'](_0x10a627['shift']());}}}(a172_0x3e62,0x31565));import a172_0x24c05a from'ora';function a172_0x38dc(_0x2705de,_0xc1d54b){_0x2705de=_0x2705de-0x147;const _0x3e62e6=a172_0x3e62();let _0x38dccc=_0x3e62e6[_0x2705de];return _0x38dccc;}import{isWindows}from'./process.js';function a172_0x3e62(){const _0x480976=['extra','isTTY','96lceXkb','14754BaexJF','...','isSpinning','1005882kRswCI','jobId','trim','20LtzpNK','floor','721GlHwlS','text','toFixed','4lpskFT','52911okgANf','\x20[Job\x20ID:\x20','clock','252670hTCTEP','stop','start','39067aoLGMu','intervalFactory','cyan','Processing','phase','559670JzbYnb','3666520MpzMes'];a172_0x3e62=function(){return _0x480976;};return a172_0x3e62();}const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x307428,_0x1024fd={}){const _0x4f6352=a172_0x38dc,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x1024fd;return a172_0x24c05a({'text':_0x307428,'color':_0x4f6352(0x155),'stream':process['stderr'],'isEnabled':forceEnabled||process['stderr'][_0x4f6352(0x15b)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x33b668,_0x568134,_0x4be899={}){const _0x5e3301=a172_0x38dc,_0x4a79a4=_0x4be899[_0x5e3301(0x14f)]??(()=>Date['now']()),_0x418d00=createCommandSpinner(_0x33b668,_0x4be899);_0x418d00[_0x5e3301(0x152)]();const _0x5caf94=_0x4a79a4();try{const _0xa77ae8=await _0x568134(),_0x3faeae=_0x4a79a4()-_0x5caf94;return _0x418d00[_0x5e3301(0x151)](),{'data':_0xa77ae8,'elapsedMs':_0x3faeae};}catch(_0x203929){_0x418d00['stop']();throw _0x203929;}}export async function withProgressSpinner(_0x42759b,_0x2054d0,_0x32f48c={}){const _0x2927ad=a172_0x38dc,_0x3770c1=_0x32f48c['clock']??(()=>Date['now']()),_0x1ad28e=_0x32f48c[_0x2927ad(0x154)]??setInterval,_0x4593f0=createCommandSpinner(_0x42759b,_0x32f48c);_0x4593f0[_0x2927ad(0x152)]();const _0x45cf6e=_0x3770c1(),_0x229ae1=_0x42759b['replace'](_0x2927ad(0x15e),'')[_0x2927ad(0x162)]()||_0x2927ad(0x156),_0x27176d={};let _0x43ffd6=_0x42759b;const _0x26c194=()=>{const _0x2c6033=_0x2927ad;if(!_0x4593f0['isSpinning'])return;const _0x47bc59=_0x3770c1()-_0x45cf6e,_0x2b9cea=formatElapsed(_0x47bc59),_0x44268c=_0x27176d[_0x2c6033(0x157)]?.['trim']()||_0x229ae1,_0x2b59fe=_0x27176d[_0x2c6033(0x161)]?_0x2c6033(0x14e)+_0x27176d[_0x2c6033(0x161)]+']':'',_0x53d99c=_0x27176d[_0x2c6033(0x15a)]?'\x20'+_0x27176d[_0x2c6033(0x15a)]:'',_0x10a357=_0x44268c+'\x20'+_0x2b9cea+_0x53d99c+_0x2b59fe;_0x10a357!==_0x43ffd6&&_0x10a357[_0x2c6033(0x162)]()&&(_0x4593f0['text']=_0x10a357,_0x43ffd6=_0x10a357);},_0x2fc6db=_0x1ad28e(()=>{_0x26c194();},0x3e8),_0x341035={'setPhase':_0x3a6a80=>{const _0x3b9f20=_0x2927ad;_0x27176d[_0x3b9f20(0x157)]=_0x3a6a80;const _0x1142df=_0x3a6a80?.['trim']()||_0x229ae1,_0x2a3ad0=_0x3770c1()-_0x45cf6e,_0x73f095=formatElapsed(_0x2a3ad0),_0x2c4947=_0x27176d[_0x3b9f20(0x161)]?'\x20[Job\x20ID:\x20'+_0x27176d[_0x3b9f20(0x161)]+']':'',_0x4350b7=_0x27176d[_0x3b9f20(0x15a)]?'\x20'+_0x27176d[_0x3b9f20(0x15a)]:'',_0x3c98da=_0x1142df+'\x20'+_0x73f095+_0x4350b7+_0x2c4947;_0x4593f0[_0x3b9f20(0x15f)]&&_0x3c98da['trim']()&&(_0x4593f0[_0x3b9f20(0x14a)]=_0x3c98da,_0x43ffd6=_0x3c98da);},'setJobId':_0x1d4d7b=>{const _0x33047d=_0x2927ad;_0x27176d[_0x33047d(0x161)]=_0x1d4d7b,_0x26c194();},'setExtra':_0x5790cc=>{const _0x458f57=_0x2927ad;_0x27176d[_0x458f57(0x15a)]=_0x5790cc,_0x26c194();}};_0x26c194();try{const _0x2bc4b3=await _0x2054d0(_0x341035),_0x21d897=_0x3770c1()-_0x45cf6e;return{'data':_0x2bc4b3,'elapsedMs':_0x21d897};}finally{clearInterval(_0x2fc6db),_0x4593f0[_0x2927ad(0x151)]();}}export function formatElapsed(_0x57273c){const _0x4fbd20=a172_0x38dc,_0xcb0a4d=Math[_0x4fbd20(0x148)](_0x57273c/0x3e8);if(_0xcb0a4d<0x3c)return(_0x57273c/0x3e8)[_0x4fbd20(0x14b)](0x1)+'s';const _0x56efed=Math[_0x4fbd20(0x148)](_0xcb0a4d/0x3c),_0x299a81=_0xcb0a4d%0x3c;if(_0x56efed<0x3c)return _0x56efed+'m\x20'+_0x299a81+'s';const _0x50e8ca=Math['floor'](_0x56efed/0x3c),_0x1f8a26=_0x56efed%0x3c;return _0x50e8ca+'h\x20'+_0x1f8a26+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a173_0x3a3b(_0x28b1ac,_0x1f8fea){_0x28b1ac=_0x28b1ac-0x157;const _0x2cb65b=a173_0x2cb6();let _0x3a3b71=_0x2cb65b[_0x28b1ac];return _0x3a3b71;}(function(_0x474295,_0x4abbe6){const _0x122492=a173_0x3a3b,_0x44720d=_0x474295();while(!![]){try{const _0x3221d3=parseInt(_0x122492(0x15a))/0x1+parseInt(_0x122492(0x165))/0x2*(parseInt(_0x122492(0x168))/0x3)+parseInt(_0x122492(0x157))/0x4+-parseInt(_0x122492(0x159))/0x5+parseInt(_0x122492(0x169))/0x6+parseInt(_0x122492(0x160))/0x7+-parseInt(_0x122492(0x16a))/0x8;if(_0x3221d3===_0x4abbe6)break;else _0x44720d['push'](_0x44720d['shift']());}catch(_0x5ad35d){_0x44720d['push'](_0x44720d['shift']());}}}(a173_0x2cb6,0xc1708));export async function*parseSSEStream(_0x40d214,_0x4daa8d){const _0x16077f=a173_0x3a3b;if(!_0x40d214['body'])throw new Error(_0x16077f(0x15e));const _0x80dcf6=_0x40d214[_0x16077f(0x167)][_0x16077f(0x163)](),_0xabb4a3=new TextDecoder();let _0x4d9f10='',_0x230571={};try{while(!![]){const {done:_0x31739a,value:_0x5436f9}=await _0x80dcf6[_0x16077f(0x15d)]();if(_0x31739a){if(_0x230571[_0x16077f(0x162)]){_0x4daa8d?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x230571[_0x16077f(0x162)]);const _0xab315a=parseSSEData(_0x230571['data']);yield _0xab315a;}break;}_0x4d9f10+=_0xabb4a3['decode'](_0x5436f9,{'stream':!![]});const _0x28c7d5=_0x4d9f10['split']('\x0a');_0x4d9f10=_0x28c7d5[_0x16077f(0x16b)]()||'';for(const _0x39410c of _0x28c7d5){if(_0x39410c[_0x16077f(0x15f)]()===''){if(_0x230571[_0x16077f(0x162)]){_0x4daa8d?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x230571[_0x16077f(0x162)]);const _0x165140=parseSSEData(_0x230571[_0x16077f(0x162)]);yield _0x165140,_0x230571={};}continue;}if(_0x39410c[_0x16077f(0x15c)](':'))continue;const _0x4b4686=_0x39410c[_0x16077f(0x158)](':');if(_0x4b4686===-0x1)continue;const _0x5cf70a=_0x39410c['slice'](0x0,_0x4b4686);let _0x556899=_0x39410c[_0x16077f(0x15b)](_0x4b4686+0x1);_0x556899[_0x16077f(0x15c)]('\x20')&&(_0x556899=_0x556899['slice'](0x1));switch(_0x5cf70a){case _0x16077f(0x164):_0x230571[_0x16077f(0x164)]=_0x556899;break;case _0x16077f(0x162):_0x230571[_0x16077f(0x162)]=_0x230571[_0x16077f(0x162)]?_0x230571['data']+'\x0a'+_0x556899:_0x556899;break;case'id':_0x230571['id']=_0x556899;break;}}}}finally{_0x80dcf6[_0x16077f(0x161)]();}}function parseSSEData(_0xaab342){const _0x3199d2=a173_0x3a3b;try{return JSON[_0x3199d2(0x166)](_0xaab342);}catch(_0xbff293){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0xaab342,{'cause':_0xbff293});}}function a173_0x2cb6(){const _0x512a32=['read','Response\x20body\x20is\x20null','trim','9465316dHFbnh','releaseLock','data','getReader','event','4imyyLp','parse','body','1944771PJKuIa','2293422cQgyZz','26526856laqHQR','pop','3306996YjrTDC','indexOf','986490HjajKh','447795eIBEJb','slice','startsWith'];a173_0x2cb6=function(){return _0x512a32;};return a173_0x2cb6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56abb1,_0x20e853){const _0xe99aec=a174_0x423e,_0x2563e2=_0x56abb1();while(!![]){try{const _0x5d66fa=parseInt(_0xe99aec(0xa9))/0x1+parseInt(_0xe99aec(0xb1))/0x2*(parseInt(_0xe99aec(0xa3))/0x3)+-parseInt(_0xe99aec(0xa0))/0x4*(-parseInt(_0xe99aec(0xaf))/0x5)+-parseInt(_0xe99aec(0xa7))/0x6*(-parseInt(_0xe99aec(0xa8))/0x7)+parseInt(_0xe99aec(0x9d))/0x8*(parseInt(_0xe99aec(0x9f))/0x9)+parseInt(_0xe99aec(0xaa))/0xa+-parseInt(_0xe99aec(0xa4))/0xb;if(_0x5d66fa===_0x20e853)break;else _0x2563e2['push'](_0x2563e2['shift']());}catch(_0x413b5c){_0x2563e2['push'](_0x2563e2['shift']());}}}(a174_0xea8e,0xf2ba6));import a174_0x42599e from'string-width';export function stringWidth(_0xa7991){return a174_0x42599e(_0xa7991);}export function padEnd(_0x409152,_0x15e075){const _0x5d372e=stringWidth(_0x409152);if(_0x5d372e>=_0x15e075)return _0x409152;return _0x409152+'\x20'['repeat'](_0x15e075-_0x5d372e);}export function padStart(_0xc9c941,_0x5961dd){const _0x44e932=a174_0x423e,_0x20e9f1=stringWidth(_0xc9c941);if(_0x20e9f1>=_0x5961dd)return _0xc9c941;return'\x20'[_0x44e932(0xb5)](_0x5961dd-_0x20e9f1)+_0xc9c941;}export function centerAlign(_0x4f7c44,_0x296555){const _0x57bde1=a174_0x423e,_0x49e61f=stringWidth(_0x4f7c44);if(_0x49e61f>_0x296555){if(_0x296555<=0x1)return'…'[_0x57bde1(0xb2)](0x0,_0x296555);let _0x54fd1d=_0x4f7c44;while(stringWidth(_0x54fd1d+'…')>_0x296555){_0x54fd1d=_0x54fd1d[_0x57bde1(0xa1)](0x0,-0x1);}return _0x54fd1d+'…';}if(_0x49e61f===_0x296555)return _0x4f7c44;const _0xbae3b5=_0x296555-_0x49e61f,_0xd0591b=Math[_0x57bde1(0xb4)](_0xbae3b5/0x2),_0xf2666d=_0xbae3b5-_0xd0591b;return'\x20'['repeat'](_0xd0591b)+_0x4f7c44+'\x20'[_0x57bde1(0xb5)](_0xf2666d);}export function escapeStringLiteral(_0x36dbbd){const _0x476046=a174_0x423e;if(!_0x36dbbd||_0x36dbbd['trim']()[_0x476046(0xab)]===0x0)throw new Error(_0x476046(0xa5));const _0x3a54d6=_0x36dbbd[_0x476046(0xb0)](/'/g,'\x27\x27');return'\x27'+_0x3a54d6+'\x27';}export function globToLike(_0x2c76bb){const _0x15951c=a174_0x423e;let _0x1fec16=_0x2c76bb[_0x15951c(0xb0)](/\\/g,'\x5c\x5c')[_0x15951c(0xb0)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x1fec16=_0x1fec16[_0x15951c(0xb0)](/\*/g,'%')['replace'](/\?/g,'_'),_0x1fec16;}function a174_0xea8e(){const _0x4962cb=['1356dWQBXs','3199xoefrc','438581tRZTFP','8163310erxEEw','length','padStart','toLowerCase','toString','5dxoSei','replace','427802rQVQsL','substring','random','floor','repeat','8iodatv','unknown','13935447XUIXKe','7059352TVzZyy','slice','trim','3pOKRNJ','42802122yGYPFR','Cannot\x20escape\x20empty\x20string\x20literal','test'];a174_0xea8e=function(){return _0x4962cb;};return a174_0xea8e();}export function buildLikePattern(_0x57a60f){const _0x1a2538=a174_0x423e;if(!_0x57a60f||_0x57a60f[_0x1a2538(0xa2)]()[_0x1a2538(0xab)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x5851b2=globToLike(_0x57a60f),_0x5f0e99=_0x5851b2[_0x1a2538(0xb0)](/'/g,'\x27\x27');return'\x27'+_0x5f0e99+'\x27';}export function matchGlobPattern(_0x2f3888,_0x17b8be){const _0x3a1bb1=a174_0x423e,_0x1869b9=_0x17b8be[_0x3a1bb1(0xb0)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x3a1bb1(0xb0)](/\*/g,'.*')[_0x3a1bb1(0xb0)](/\?/g,'.'),_0x3957b7=new RegExp('^'+_0x1869b9+'$');return _0x3957b7[_0x3a1bb1(0xa6)](_0x2f3888);}function a174_0x423e(_0x31eca0,_0x18d708){_0x31eca0=_0x31eca0-0x9d;const _0xea8e69=a174_0xea8e();let _0x423eab=_0xea8e69[_0x31eca0];return _0x423eab;}export function getSanitizedUsername(){const _0x40ff26=a174_0x423e,_0x3b5b48=process.env.USER||process.env.USERNAME||_0x40ff26(0x9e);return _0x3b5b48['replace'](/[^a-zA-Z0-9]/g,'')[_0x40ff26(0xad)]();}export function generateRandomHex(){const _0x5ea8f6=a174_0x423e,_0x1766fb=Math[_0x5ea8f6(0xb4)](Math[_0x5ea8f6(0xb3)]()*0xfffff);return _0x1766fb[_0x5ea8f6(0xae)](0x10)[_0x5ea8f6(0xac)](0x5,'0');}export function sanitizeFileName(_0x5de935){const _0x335baf=a174_0x423e;return _0x5de935[_0x335baf(0xad)]()[_0x335baf(0xb0)](/[/\\:*?"<>|]/g,'-')[_0x335baf(0xb0)](/\s+/g,'-')[_0x335baf(0xb0)](/-+/g,'-')['replace'](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1918d6,_0x517949){const _0x41f418=a175_0x3e8a,_0xebfba5=_0x1918d6();while(!![]){try{const _0x312225=-parseInt(_0x41f418(0x184))/0x1+parseInt(_0x41f418(0x18f))/0x2*(parseInt(_0x41f418(0x18d))/0x3)+-parseInt(_0x41f418(0x188))/0x4*(-parseInt(_0x41f418(0x183))/0x5)+-parseInt(_0x41f418(0x18a))/0x6*(-parseInt(_0x41f418(0x190))/0x7)+-parseInt(_0x41f418(0x189))/0x8+-parseInt(_0x41f418(0x18c))/0x9*(-parseInt(_0x41f418(0x182))/0xa)+parseInt(_0x41f418(0x17e))/0xb*(parseInt(_0x41f418(0x180))/0xc);if(_0x312225===_0x517949)break;else _0xebfba5['push'](_0xebfba5['shift']());}catch(_0x4d6bca){_0xebfba5['push'](_0xebfba5['shift']());}}}(a175_0x3161,0xd735c));function hasWildcard(_0x40efba){const _0x2153c7=a175_0x3e8a;return _0x40efba[_0x2153c7(0x18b)]('*')||_0x40efba['includes']('?');}export function parseTableReference(_0x4d026d){const _0x103ea9=a175_0x3e8a;if(!_0x4d026d||_0x4d026d[_0x103ea9(0x187)]()[_0x103ea9(0x18e)]===0x0)throw new Error(_0x103ea9(0x193));const _0x54abd2=_0x4d026d[_0x103ea9(0x187)](),_0x2eb839={'original':_0x54abd2},_0x5a7228=_0x54abd2['split']('.');if(_0x5a7228['length']===0x1){const _0x161d5d=_0x5a7228[0x0];if(!_0x161d5d)throw new Error(_0x103ea9(0x185));_0x2eb839[_0x103ea9(0x195)]=_0x161d5d;}else{if(_0x5a7228[_0x103ea9(0x18e)]===0x2){const [_0x155879,_0x550ffe]=_0x5a7228;if(!_0x155879)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x550ffe)throw new Error(_0x103ea9(0x186));_0x2eb839[_0x103ea9(0x181)]=_0x155879,_0x2eb839[_0x103ea9(0x195)]=_0x550ffe;}else{if(_0x5a7228[_0x103ea9(0x18e)]===0x3){const [_0x5ed378,_0x1191ba,_0x2108c5]=_0x5a7228;if(!_0x5ed378||!_0x1191ba||!_0x2108c5)throw new Error(_0x103ea9(0x194));_0x2eb839[_0x103ea9(0x192)]=_0x5ed378,_0x2eb839[_0x103ea9(0x181)]=_0x1191ba,_0x2eb839[_0x103ea9(0x195)]=_0x2108c5;}else throw new Error(_0x103ea9(0x191));}}return _0x2eb839;}function a175_0x3e8a(_0x1d1787,_0x3d7c8c){_0x1d1787=_0x1d1787-0x17e;const _0x316148=a175_0x3161();let _0x3e8af7=_0x316148[_0x1d1787];return _0x3e8af7;}export function formatTableReference(_0x753bd5){const _0x2fc418=a175_0x3e8a,_0x1de2e0=[];return _0x753bd5[_0x2fc418(0x192)]&&_0x1de2e0[_0x2fc418(0x196)](_0x753bd5['catalog']),_0x753bd5['database']&&_0x1de2e0['push'](_0x753bd5[_0x2fc418(0x181)]),_0x753bd5[_0x2fc418(0x195)]&&_0x1de2e0[_0x2fc418(0x196)](_0x753bd5['table']),_0x1de2e0['join']('.');}function a175_0x3161(){const _0x320d18=['22090KMKtJe','4485QhQFjv','758161rIqkqn','Pattern\x20cannot\x20be\x20just\x20a\x20dot','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','trim','4208zdjImg','11192440eFncXS','533874fbZdhX','includes','531Zrompt','3VCVjEo','length','285364mhKhSE','28PKiwOq','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','catalog','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','table','push','16127573UeSgvZ','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','12wkXEhC','database'];a175_0x3161=function(){return _0x320d18;};return a175_0x3161();}export function validateTableListReference(_0x37046d){return undefined;}export function validateTableDescribeReference(_0x75e050){const _0x4739b6=a175_0x3e8a;if(!_0x75e050[_0x4739b6(0x195)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x75e050['database']&&hasWildcard(_0x75e050[_0x4739b6(0x181)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0x75e050[_0x4739b6(0x195)]))return _0x4739b6(0x17f);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x1c9afc=a176_0x13bf;(function(_0x5065bc,_0x22fe79){const _0xb4fef2=a176_0x13bf,_0x3f548c=_0x5065bc();while(!![]){try{const _0x3cc95f=parseInt(_0xb4fef2(0x20a))/0x1+-parseInt(_0xb4fef2(0x1f8))/0x2*(parseInt(_0xb4fef2(0x201))/0x3)+parseInt(_0xb4fef2(0x208))/0x4+-parseInt(_0xb4fef2(0x1ff))/0x5+-parseInt(_0xb4fef2(0x1f1))/0x6*(parseInt(_0xb4fef2(0x200))/0x7)+-parseInt(_0xb4fef2(0x203))/0x8+parseInt(_0xb4fef2(0x1ec))/0x9*(parseInt(_0xb4fef2(0x1fe))/0xa);if(_0x3cc95f===_0x22fe79)break;else _0x3f548c['push'](_0x3f548c['shift']());}catch(_0x77663d){_0x3f548c['push'](_0x3f548c['shift']());}}}(a176_0x2e1f,0x95301));import{join}from'path';function a176_0x2e1f(){const _0x275ee8=['tdx.log','shutdown','fileHandler','12rxbFuv','debug','logLevel','error','close','warn','isInitialized','4eGwdwA','tdx','logger','push','trace','addHandler','250PmCLli','1963050nArOSk','978229bcIAlt','356304WKwhlM','Session\x20ended','3810944exYThK','consoleHandler','info','INFO','logs','1954836xtYKhE','getLogPath','694847uRstFu','logFileName','fileOnly','logDir','292869vgMloT','init'];a176_0x2e1f=function(){return _0x275ee8;};return a176_0x2e1f();}function a176_0x13bf(_0x4d2208,_0x36a175){_0x4d2208=_0x4d2208-0x1eb;const _0x2e1f0a=a176_0x2e1f();let _0x13bfab=_0x2e1f0a[_0x4d2208];return _0x13bfab;}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{[a176_0x1c9afc(0x1f3)];[a176_0x1c9afc(0x20c)];['logDir'];['logFileName'];['logger'];[a176_0x1c9afc(0x1f0)]=null;[a176_0x1c9afc(0x204)]=null;constructor(_0x58854b=LogLevel[a176_0x1c9afc(0x206)],_0x28256b=![],_0x322b87,_0x3b5728=a176_0x1c9afc(0x1ee)){const _0x54176f=a176_0x1c9afc;this['logLevel']=_0x58854b,this[_0x54176f(0x20c)]=_0x28256b,this[_0x54176f(0x1eb)]=_0x322b87||join(getGlobalCacheDir(),_0x54176f(0x207)),this[_0x54176f(0x20b)]=_0x3b5728,this[_0x54176f(0x1fa)]=Logger['of'](_0x54176f(0x1f9));}async[a176_0x1c9afc(0x1ed)](){const _0xe5a39=a176_0x1c9afc,_0x404886=join(this[_0xe5a39(0x1eb)],this[_0xe5a39(0x20b)]);if(Logger[_0xe5a39(0x1f7)]()){!this[_0xe5a39(0x20c)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),Logger[_0xe5a39(0x1fd)](this[_0xe5a39(0x204)]));return;}this[_0xe5a39(0x1f0)]=new FileHandler({'filePath':_0x404886});const _0x11925e=[this[_0xe5a39(0x1f0)]];!this[_0xe5a39(0x20c)]&&(this[_0xe5a39(0x204)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x11925e[_0xe5a39(0x1fb)](this[_0xe5a39(0x204)])),await Logger[_0xe5a39(0x1ed)]({'defaultLevel':this[_0xe5a39(0x1f3)],'handlers':_0x11925e,'formatter':new DefaultLogFormatter({'colors':!![]})});}['debug'](..._0x123894){const _0x3a9917=a176_0x1c9afc;this[_0x3a9917(0x1fa)][_0x3a9917(0x1f2)](..._0x123894);}['trace'](..._0x48e904){const _0xaa51cc=a176_0x1c9afc;this['logger'][_0xaa51cc(0x1fc)](..._0x48e904);}[a176_0x1c9afc(0x205)](..._0x48c37b){const _0x1c5459=a176_0x1c9afc;this[_0x1c5459(0x1fa)][_0x1c5459(0x205)](..._0x48c37b);}[a176_0x1c9afc(0x1f6)](..._0x26418d){const _0x23e91f=a176_0x1c9afc;this['logger'][_0x23e91f(0x1f6)](..._0x26418d);}[a176_0x1c9afc(0x1f4)](..._0x3c9879){this['logger']['error'](..._0x3c9879);}async[a176_0x1c9afc(0x1f5)](){const _0x1f87f3=a176_0x1c9afc;this[_0x1f87f3(0x1fa)][_0x1f87f3(0x205)](_0x1f87f3(0x202)),await Logger[_0x1f87f3(0x1ef)]();}[a176_0x1c9afc(0x209)](){const _0x3ea1e3=a176_0x1c9afc;return join(this[_0x3ea1e3(0x1eb)],this[_0x3ea1e3(0x20b)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x2393d7=a177_0x10bb;(function(_0x55704f,_0x58fa75){const _0x53b442=a177_0x10bb,_0x4b9294=_0x55704f();while(!![]){try{const _0x53279e=parseInt(_0x53b442(0x1b6))/0x1+-parseInt(_0x53b442(0x1d3))/0x2*(parseInt(_0x53b442(0x1cf))/0x3)+parseInt(_0x53b442(0x1c8))/0x4+-parseInt(_0x53b442(0x1d2))/0x5*(-parseInt(_0x53b442(0x1d8))/0x6)+-parseInt(_0x53b442(0x1cc))/0x7+parseInt(_0x53b442(0x1b8))/0x8+-parseInt(_0x53b442(0x1cd))/0x9*(parseInt(_0x53b442(0x1c5))/0xa);if(_0x53279e===_0x58fa75)break;else _0x4b9294['push'](_0x4b9294['shift']());}catch(_0xf2b788){_0x4b9294['push'](_0x4b9294['shift']());}}}(a177_0x454a,0x6d4e7));import{get}from'https';import{gt,valid}from'semver';import a177_0xdb36b from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a177_0x2393d7(0x1d4),TIMEOUT_MS=0x7d0,versionCache=createGlobalCache('last_version_check',a177_0x2393d7(0x1c4));function readCache(){const _0x4cf749=a177_0x2393d7;return versionCache[_0x4cf749(0x1d6)]()??null;}function writeCache(_0x1cbc9e){const _0x5c5be6=a177_0x2393d7;try{versionCache[_0x5c5be6(0x1b7)]({'lastCheck':new Date()[_0x5c5be6(0x1ca)](),'latestVersion':_0x1cbc9e});}catch{}}function isCacheValid(_0x3f0cc9){const _0x198ceb=a177_0x2393d7;if(!_0x3f0cc9)return![];const _0x205d1d=new Date(_0x3f0cc9[_0x198ceb(0x1b5)])[_0x198ceb(0x1d5)](),_0x3cd42d=Date['now']();return _0x3cd42d-_0x205d1d<CACHE_DURATION_MS;}function a177_0x10bb(_0x49cc74,_0x36063f){_0x49cc74=_0x49cc74-0x1b5;const _0x454a90=a177_0x454a();let _0x10bba2=_0x454a90[_0x49cc74];return _0x10bba2;}function fetchLatestVersion(){return new Promise((_0x2535f8,_0xf23776)=>{const _0x482908=a177_0x10bb,_0x3096c3=get(NPM_REGISTRY_URL,_0x448713=>{const _0x3b1621=a177_0x10bb;if(_0x448713[_0x3b1621(0x1c7)]!==0xc8){clearTimeout(_0x56e42e),_0xf23776(new Error(_0x3b1621(0x1c6)+_0x448713[_0x3b1621(0x1c7)]));return;}let _0x38d751='';_0x448713['on'](_0x3b1621(0x1c1),_0x46c2e7=>{_0x38d751+=_0x46c2e7;}),_0x448713['on'](_0x3b1621(0x1bb),()=>{const _0x4ad15b=_0x3b1621;clearTimeout(_0x56e42e);try{const _0x3345e0=JSON[_0x4ad15b(0x1d0)](_0x38d751);if(!valid(_0x3345e0[_0x4ad15b(0x1d7)])){_0xf23776(new Error(_0x4ad15b(0x1da)));return;}_0x2535f8(_0x3345e0[_0x4ad15b(0x1d7)]);}catch(_0x342e72){_0xf23776(_0x342e72);}});})['on'](_0x482908(0x1c9),_0x4e10ad=>{clearTimeout(_0x56e42e),_0xf23776(_0x4e10ad);}),_0x56e42e=setTimeout(()=>{const _0xd2b99d=_0x482908;_0x3096c3[_0xd2b99d(0x1ba)](),_0xf23776(new Error(_0xd2b99d(0x1bd)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x52973e){const _0x4d2523=a177_0x2393d7;try{const _0x462cd3=readCache();if(isCacheValid(_0x462cd3)){const _0x50e53e=gt(_0x462cd3[_0x4d2523(0x1c3)],_0x52973e);return{'updateAvailable':_0x50e53e,'currentVersion':_0x52973e,'latestVersion':_0x462cd3[_0x4d2523(0x1c3)]};}const _0x22c577=await fetchLatestVersion();writeCache(_0x22c577);const _0x431d17=gt(_0x22c577,_0x52973e);return{'updateAvailable':_0x431d17,'currentVersion':_0x52973e,'latestVersion':_0x22c577};}catch{return null;}}function a177_0x454a(){const _0x48b923=['npm\x20install\x20-g\x20@treasuredata/tdx@latest','isTTY','dim','data','\x0aRun:\x20','latestVersion','utils/version-check','90RuZYNZ','HTTP\x20','statusCode','1310100xYKPhY','error','toISOString','Update\x20available:','1278382woFjLj','277731cpPGFp','yellow','1262697jHrlvH','parse','Run:','205FOdNtN','2mJoVMr','https://registry.npmjs.org/@treasuredata/tdx/latest','getTime','read','version','40380rMRPac','updateAvailable','Invalid\x20version\x20format','lastCheck','501876PjbuDh','write','1789152jblVum','stderr','destroy','end','currentVersion','Request\x20timeout'];a177_0x454a=function(){return _0x48b923;};return a177_0x454a();}export function displayUpdateNotification(_0x9913dd){const _0xa2ccae=a177_0x2393d7;if(!_0x9913dd[_0xa2ccae(0x1d9)])return;const _0x17e767=process[_0xa2ccae(0x1b9)][_0xa2ccae(0x1bf)]&&!process.env.NO_COLOR,_0x488354=_0x17e767?a177_0xdb36b['gray']('→'):'→',_0x5d194a=_0x17e767?a177_0xdb36b[_0xa2ccae(0x1c0)](_0x9913dd['currentVersion']):_0x9913dd[_0xa2ccae(0x1bc)],_0x2d03ec=_0x17e767?a177_0xdb36b['green'](_0x9913dd['latestVersion']):_0x9913dd[_0xa2ccae(0x1c3)],_0x39fa01=_0x17e767?a177_0xdb36b['cyan']('npm\x20install\x20-g\x20@treasuredata/tdx@latest'):_0xa2ccae(0x1be),_0x3fd42c=_0x17e767?'\x0a'+a177_0xdb36b[_0xa2ccae(0x1ce)](_0xa2ccae(0x1cb))+'\x20'+_0x5d194a+'\x20'+_0x488354+'\x20'+_0x2d03ec+'\x0a'+a177_0xdb36b[_0xa2ccae(0x1c0)](_0xa2ccae(0x1d1))+'\x20'+_0x39fa01+'\x0a':'\x0aUpdate\x20available:\x20'+_0x5d194a+'\x20'+_0x488354+'\x20'+_0x2d03ec+_0xa2ccae(0x1c2)+_0x39fa01+'\x0a';process[_0xa2ccae(0x1b9)][_0xa2ccae(0x1b7)](_0x3fd42c);}
|