@treasuredata/tdx 2026.4.12 → 2026.4.13
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a225_0x5117(_0x38d16b,_0x539724){_0x38d16b=_0x38d16b-0x154;const _0x3b8433=a225_0x3b84();let _0x511793=_0x3b8433[_0x38d16b];return _0x511793;}const a225_0x9f9039=a225_0x5117;(function(_0x474e8c,_0x4261a7){const _0x20a58b=a225_0x5117,_0x3884fa=_0x474e8c();while(!![]){try{const _0xfe43a=-parseInt(_0x20a58b(0x18d))/0x1*(parseInt(_0x20a58b(0x15a))/0x2)+-parseInt(_0x20a58b(0x179))/0x3+parseInt(_0x20a58b(0x17e))/0x4*(-parseInt(_0x20a58b(0x16f))/0x5)+-parseInt(_0x20a58b(0x180))/0x6*(parseInt(_0x20a58b(0x163))/0x7)+parseInt(_0x20a58b(0x168))/0x8+parseInt(_0x20a58b(0x169))/0x9*(-parseInt(_0x20a58b(0x184))/0xa)+parseInt(_0x20a58b(0x16a))/0xb;if(_0xfe43a===_0x4261a7)break;else _0x3884fa['push'](_0x3884fa['shift']());}catch(_0x3a3f82){_0x3884fa['push'](_0x3884fa['shift']());}}}(a225_0x3b84,0xc2ed9));import{LogLevel as a225_0x152f26,logLevelToString}from'./types.js';const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a225_0x152f26['INFO'],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function a225_0x3b84(){const _0x3a08c9=['warn','trace','has','3675SGYWVc','string','format','initialized','stringify','10745704fIsWvo','501309KCQDWv','41790639HfotKv','slice','levelOverrides','shutdown','reset','5SFRzzm','push','level','TRACE','timestamp','name','ERROR','handle','addHandler','length','813237GNVBWC','entries','INFO','set','getEffectiveLevel','3697788epQNFb','error','17562RRTVpc','loggers','setLogLevel','get','260qjNvAJ','stack','defaultLevel','init','log','formatter','dispatch','clear','isInitialized','197pRUAZc','getFormatter','join',']\x20[','shouldLog','pendingRecords','DEBUG','close','function','1660KsetBG','handlers','message','component','debug','cause'];a225_0x3b84=function(){return _0x3a08c9;};return a225_0x3b84();}function safeStringify(_0x4da9dc){const _0x336464=a225_0x5117;if(typeof _0x4da9dc===_0x336464(0x164))return _0x4da9dc;if(_0x4da9dc instanceof Error)return _0x4da9dc[_0x336464(0x185)]||_0x4da9dc['name']+':\x20'+_0x4da9dc[_0x336464(0x15c)];try{return JSON[_0x336464(0x167)](_0x4da9dc,(_0xe77a94,_0x30c0cb)=>{const _0x8599e5=_0x336464;if(_0x30c0cb instanceof Error)return{'name':_0x30c0cb[_0x8599e5(0x174)],'message':_0x30c0cb[_0x8599e5(0x15c)],'stack':_0x30c0cb[_0x8599e5(0x185)],'cause':_0x30c0cb[_0x8599e5(0x15f)]};return _0x30c0cb;});}catch{return String(_0x4da9dc);}}export class Logger{['component'];constructor(_0x57a3b1){const _0x21934f=a225_0x5117;this[_0x21934f(0x15d)]=_0x57a3b1;}static['of'](_0x405dea){const _0x34bfc0=a225_0x5117,_0x9892aa=typeof _0x405dea===_0x34bfc0(0x164)?_0x405dea:_0x405dea[_0x34bfc0(0x174)];let _0x42ad5e=state[_0x34bfc0(0x181)][_0x34bfc0(0x183)](_0x9892aa);return!_0x42ad5e&&(_0x42ad5e=new Logger(_0x9892aa),state['loggers'][_0x34bfc0(0x17c)](_0x9892aa,_0x42ad5e)),_0x42ad5e;}static async[a225_0x9f9039(0x187)](_0xb995f8={}){const _0x2d7edc=a225_0x9f9039;state['defaultLevel']=_0xb995f8['defaultLevel']??a225_0x152f26[_0x2d7edc(0x17b)],state['handlers']=_0xb995f8[_0x2d7edc(0x15b)]??[],state[_0x2d7edc(0x189)]=_0xb995f8[_0x2d7edc(0x189)]??null,state[_0x2d7edc(0x16c)][_0x2d7edc(0x18b)]();if(_0xb995f8[_0x2d7edc(0x16c)])for(const [_0x5bcc72,_0x223925]of Object[_0x2d7edc(0x17a)](_0xb995f8['levelOverrides'])){state[_0x2d7edc(0x16c)][_0x2d7edc(0x17c)](_0x5bcc72,_0x223925);}for(const _0x148476 of state[_0x2d7edc(0x15b)]){_0x148476[_0x2d7edc(0x187)]&&await _0x148476[_0x2d7edc(0x187)]();}state[_0x2d7edc(0x166)]=!![];for(const _0x1065d2 of state[_0x2d7edc(0x156)]){Logger['dispatch'](_0x1065d2);}state['pendingRecords']=[];}static[a225_0x9f9039(0x182)](_0x59a7f4,_0x146074){state['levelOverrides']['set'](_0x59a7f4,_0x146074);}static['setDefaultLevel'](_0x5e08a1){const _0x41458c=a225_0x9f9039;state[_0x41458c(0x186)]=_0x5e08a1;}static[a225_0x9f9039(0x177)](_0x46780e){const _0x3d2086=a225_0x9f9039;state[_0x3d2086(0x15b)][_0x3d2086(0x170)](_0x46780e),state[_0x3d2086(0x166)]&&_0x46780e[_0x3d2086(0x187)]&&_0x46780e[_0x3d2086(0x187)]();}static['clearHandlers'](){const _0x10ff01=a225_0x9f9039;state[_0x10ff01(0x15b)]=[];}static async[a225_0x9f9039(0x16d)](){const _0x1df333=a225_0x9f9039;for(const _0x16d09f of state[_0x1df333(0x15b)]){_0x16d09f[_0x1df333(0x158)]&&await _0x16d09f[_0x1df333(0x158)]();}state[_0x1df333(0x15b)]=[],state['initialized']=![],state[_0x1df333(0x181)][_0x1df333(0x18b)](),state[_0x1df333(0x156)]=[];}static[a225_0x9f9039(0x16e)](){const _0x118e0d=a225_0x9f9039;state['initialized']=![],state[_0x118e0d(0x186)]=a225_0x152f26[_0x118e0d(0x17b)],state[_0x118e0d(0x16c)][_0x118e0d(0x18b)](),state[_0x118e0d(0x15b)]=[],state[_0x118e0d(0x189)]=null,state[_0x118e0d(0x181)][_0x118e0d(0x18b)](),state[_0x118e0d(0x156)]=[];}static[a225_0x9f9039(0x18c)](){const _0x1ce452=a225_0x9f9039;return state[_0x1ce452(0x166)];}static[a225_0x9f9039(0x17d)](_0x2dad81){const _0x53b7a0=a225_0x9f9039;if(state[_0x53b7a0(0x16c)][_0x53b7a0(0x162)](_0x2dad81))return state[_0x53b7a0(0x16c)][_0x53b7a0(0x183)](_0x2dad81);const _0x3ae479=_0x2dad81['split']('.');for(let _0x2da45e=_0x3ae479[_0x53b7a0(0x178)]-0x1;_0x2da45e>0x0;_0x2da45e--){const _0x78904e=_0x3ae479[_0x53b7a0(0x16b)](0x0,_0x2da45e)[_0x53b7a0(0x18f)]('.');if(state[_0x53b7a0(0x16c)]['has'](_0x78904e))return state[_0x53b7a0(0x16c)][_0x53b7a0(0x183)](_0x78904e);}return state['defaultLevel'];}[a225_0x9f9039(0x155)](_0x174d3b){const _0x2f2620=a225_0x9f9039,_0xb6714d=Logger['getEffectiveLevel'](this[_0x2f2620(0x15d)]);return _0x174d3b>=_0xb6714d;}static['dispatch'](_0x29340e){const _0x1893b2=a225_0x9f9039;for(const _0x10e579 of state[_0x1893b2(0x15b)]){_0x10e579[_0x1893b2(0x176)](_0x29340e);}}[a225_0x9f9039(0x188)](_0xc3db9f,_0x5e0b8c){const _0x2787a4=a225_0x9f9039;if(!this[_0x2787a4(0x155)](_0xc3db9f))return;const _0x1d79ad=_0x5e0b8c['map'](_0x576422=>typeof _0x576422===_0x2787a4(0x159)?_0x576422():_0x576422),_0x164112=_0x1d79ad['map'](safeStringify)[_0x2787a4(0x18f)]('\x20'),_0x9e23f4={'timestamp':new Date(),'level':_0xc3db9f,'component':this['component'],'message':_0x164112};if(!state['initialized']){state[_0x2787a4(0x156)][_0x2787a4(0x178)]<MAX_PENDING_RECORDS&&state[_0x2787a4(0x156)][_0x2787a4(0x170)](_0x9e23f4);return;}Logger[_0x2787a4(0x18a)](_0x9e23f4);}[a225_0x9f9039(0x161)](..._0x439098){const _0x21e206=a225_0x9f9039;this['log'](a225_0x152f26[_0x21e206(0x172)],_0x439098);}[a225_0x9f9039(0x15e)](..._0x39b38f){const _0x577bf6=a225_0x9f9039;this[_0x577bf6(0x188)](a225_0x152f26[_0x577bf6(0x157)],_0x39b38f);}['info'](..._0x55c98f){this['log'](a225_0x152f26['INFO'],_0x55c98f);}[a225_0x9f9039(0x160)](..._0x5d0c8e){const _0x2b12ab=a225_0x9f9039;this[_0x2b12ab(0x188)](a225_0x152f26['WARN'],_0x5d0c8e);}[a225_0x9f9039(0x17f)](..._0x4e758e){const _0x1cee68=a225_0x9f9039;this[_0x1cee68(0x188)](a225_0x152f26[_0x1cee68(0x175)],_0x4e758e);}static[a225_0x9f9039(0x18e)](){const _0x478065=a225_0x9f9039;return state[_0x478065(0x189)];}static[a225_0x9f9039(0x165)](_0x5e5e3a){const _0x48ce53=a225_0x9f9039;if(state['formatter'])return state[_0x48ce53(0x189)][_0x48ce53(0x165)](_0x5e5e3a);return _0x5e5e3a[_0x48ce53(0x173)]['toISOString']()+'\x20['+logLevelToString(_0x5e5e3a[_0x48ce53(0x171)])+_0x48ce53(0x154)+_0x5e5e3a[_0x48ce53(0x15d)]+']\x20'+_0x5e5e3a[_0x48ce53(0x15c)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a226_0x14a3(_0x4358bf,_0x5c5a1d){_0x4358bf=_0x4358bf-0xa7;const _0x4cf991=a226_0x4cf9();let _0x14a347=_0x4cf991[_0x4358bf];return _0x14a347;}(function(_0x5af438,_0x51e6ef){const _0xb7e431=a226_0x14a3,_0x59fe2a=_0x5af438();while(!![]){try{const _0x345371=parseInt(_0xb7e431(0xae))/0x1*(parseInt(_0xb7e431(0xbe))/0x2)+parseInt(_0xb7e431(0xa8))/0x3*(-parseInt(_0xb7e431(0xbc))/0x4)+-parseInt(_0xb7e431(0xc2))/0x5*(-parseInt(_0xb7e431(0xaf))/0x6)+parseInt(_0xb7e431(0xb4))/0x7+parseInt(_0xb7e431(0xa7))/0x8*(parseInt(_0xb7e431(0xaa))/0x9)+-parseInt(_0xb7e431(0xc3))/0xa+parseInt(_0xb7e431(0xc1))/0xb*(-parseInt(_0xb7e431(0xb0))/0xc);if(_0x345371===_0x51e6ef)break;else _0x59fe2a['push'](_0x59fe2a['shift']());}catch(_0x214a6e){_0x59fe2a['push'](_0x59fe2a['shift']());}}}(a226_0x4cf9,0x825d0));export var LogLevel;(function(_0x3be2d8){const _0xdc9ed8=a226_0x14a3;_0x3be2d8[_0x3be2d8[_0xdc9ed8(0xa9)]=-0x2]=_0xdc9ed8(0xa9),_0x3be2d8[_0x3be2d8[_0xdc9ed8(0xb5)]=-0x1]=_0xdc9ed8(0xb5),_0x3be2d8[_0x3be2d8[_0xdc9ed8(0xb2)]=0x0]=_0xdc9ed8(0xb2),_0x3be2d8[_0x3be2d8[_0xdc9ed8(0xc0)]=0x1]=_0xdc9ed8(0xc0),_0x3be2d8[_0x3be2d8['ERROR']=0x2]=_0xdc9ed8(0xad);}(LogLevel||(LogLevel={})));function a226_0x4cf9(){const _0x136ee0=['TRACE','2547711JrBaXM','getDate','abs','ERROR','36014xzfGin','3075414ZwpaYR','17004mhhwqe','WARNING','INFO','floor','4318790uyskER','DEBUG','trace','info','getMilliseconds','padStart','getMonth','getTimezoneOffset','28HhPgwH','toString','2LogkQr','getFullYear','WARN','3861PJczPK','5BXVXAl','2220730pjiJkQ','error','getSeconds','16DsVnyW','204987YpAftZ'];a226_0x4cf9=function(){return _0x136ee0;};return a226_0x4cf9();}export function parseLogLevel(_0x1b7ca1){const _0x328b10=a226_0x14a3;switch(_0x1b7ca1['toUpperCase']()){case _0x328b10(0xa9):return LogLevel[_0x328b10(0xa9)];case _0x328b10(0xb5):return LogLevel[_0x328b10(0xb5)];case _0x328b10(0xb2):return LogLevel[_0x328b10(0xb2)];case _0x328b10(0xc0):case _0x328b10(0xb1):return LogLevel['WARN'];case _0x328b10(0xad):return LogLevel[_0x328b10(0xad)];default:return LogLevel[_0x328b10(0xb2)];}}export function logLevelToString(_0x5ee9fe){const _0x49d1e6=a226_0x14a3;switch(_0x5ee9fe){case LogLevel[_0x49d1e6(0xa9)]:return _0x49d1e6(0xb6);case LogLevel[_0x49d1e6(0xb5)]:return'debug';case LogLevel[_0x49d1e6(0xb2)]:return _0x49d1e6(0xb7);case LogLevel[_0x49d1e6(0xc0)]:return'warn';case LogLevel[_0x49d1e6(0xad)]:return _0x49d1e6(0xc4);default:return _0x49d1e6(0xb7);}}export function formatTimestamp(_0x35ca46){const _0x391e0e=a226_0x14a3,_0x2240ee=_0x35ca46[_0x391e0e(0xbf)](),_0xddeed6=(_0x35ca46[_0x391e0e(0xba)]()+0x1)['toString']()[_0x391e0e(0xb9)](0x2,'0'),_0x30ddcc=_0x35ca46[_0x391e0e(0xab)]()['toString']()[_0x391e0e(0xb9)](0x2,'0'),_0x2b7163=_0x35ca46['getHours']()['toString']()[_0x391e0e(0xb9)](0x2,'0'),_0x78cdd6=_0x35ca46['getMinutes']()[_0x391e0e(0xbd)]()[_0x391e0e(0xb9)](0x2,'0'),_0x1609a0=_0x35ca46[_0x391e0e(0xc5)]()['toString']()[_0x391e0e(0xb9)](0x2,'0'),_0x4f4a08=_0x35ca46[_0x391e0e(0xb8)]()['toString']()['padStart'](0x3,'0'),_0x5eddb1=-_0x35ca46[_0x391e0e(0xbb)](),_0xad4c8d=Math[_0x391e0e(0xb3)](Math['abs'](_0x5eddb1)/0x3c),_0x1c9830=Math[_0x391e0e(0xac)](_0x5eddb1)%0x3c,_0x1266d7=_0x5eddb1>=0x0?'+':'-',_0x2a26c5=''+_0x1266d7+_0xad4c8d['toString']()[_0x391e0e(0xb9)](0x2,'0')+_0x1c9830[_0x391e0e(0xbd)]()['padStart'](0x2,'0');return _0x2240ee+'-'+_0xddeed6+'-'+_0x30ddcc+'\x20'+_0x2b7163+':'+_0x78cdd6+':'+_0x1609a0+'.'+_0x4f4a08+_0x2a26c5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x39afd6,_0x4e225f){const _0x4d0fe1=a227_0x3b2a,_0x5685ca=_0x39afd6();while(!![]){try{const _0x41d553=parseInt(_0x4d0fe1(0x1bd))/0x1*(parseInt(_0x4d0fe1(0x1b9))/0x2)+parseInt(_0x4d0fe1(0x1b3))/0x3+parseInt(_0x4d0fe1(0x1b0))/0x4*(-parseInt(_0x4d0fe1(0x1b7))/0x5)+parseInt(_0x4d0fe1(0x1b5))/0x6*(-parseInt(_0x4d0fe1(0x1b6))/0x7)+parseInt(_0x4d0fe1(0x1b1))/0x8+-parseInt(_0x4d0fe1(0x1b2))/0x9*(parseInt(_0x4d0fe1(0x1bc))/0xa)+parseInt(_0x4d0fe1(0x1be))/0xb;if(_0x41d553===_0x4e225f)break;else _0x5685ca['push'](_0x5685ca['shift']());}catch(_0x52dc95){_0x5685ca['push'](_0x5685ca['shift']());}}}(a227_0x9c6c,0x59a1f));function a227_0x3b2a(_0x275b99,_0x393360){_0x275b99=_0x275b99-0x1af;const _0x9c6cfd=a227_0x9c6c();let _0x3b2a99=_0x9c6cfd[_0x275b99];return _0x3b2a99;}export function validateLimitOption(_0x5763af){const _0x271860=a227_0x3b2a;if(!Number[_0x271860(0x1bf)](_0x5763af))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x5763af+'.\x20Must\x20be\x20an\x20integer.'};if(_0x5763af<=0x0)return{'isValid':![],'error':_0x271860(0x1bb)+_0x5763af+_0x271860(0x1b8)};return{'isValid':!![],'value':_0x5763af};}function a227_0x9c6c(){const _0x1c5196=['3035252WQRuOi','isInteger','Invalid\x20timeout\x20value:\x20','12MxggqT','5751248cEymSL','1969821ZOyEno','685056sGhDgx','.\x20Must\x20be\x20a\x20number.','294XnYGRA','60767MFdMkS','985045tusbVA','.\x20Must\x20be\x20a\x20positive\x20integer.','2DtXKhW','number','Invalid\x20limit\x20value:\x20','20faPVMM','598079qEDUMh'];a227_0x9c6c=function(){return _0x1c5196;};return a227_0x9c6c();}export function validateTimeoutOption(_0x4b129c,_0x3515d7=0x1e){const _0x4e3a28=a227_0x3b2a;if(_0x4b129c===undefined)return{'isValid':!![],'value':_0x3515d7};const _0x1ca000=typeof _0x4b129c===_0x4e3a28(0x1ba)?_0x4b129c:parseFloat(_0x4b129c);if(isNaN(_0x1ca000))return{'isValid':![],'error':_0x4e3a28(0x1af)+_0x4b129c+_0x4e3a28(0x1b4)};if(_0x1ca000<=0x0)return{'isValid':![],'error':_0x4e3a28(0x1af)+_0x1ca000+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x1ca000};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a228_0x241429=a228_0x54f0;(function(_0x4210a4,_0x4e91c1){const _0x42deb0=a228_0x54f0,_0x2a842c=_0x4210a4();while(!![]){try{const _0x32aca3=-parseInt(_0x42deb0(0x152))/0x1+-parseInt(_0x42deb0(0x13e))/0x2*(parseInt(_0x42deb0(0x12a))/0x3)+parseInt(_0x42deb0(0x143))/0x4*(-parseInt(_0x42deb0(0x148))/0x5)+-parseInt(_0x42deb0(0x13b))/0x6*(parseInt(_0x42deb0(0x154))/0x7)+parseInt(_0x42deb0(0x14a))/0x8+parseInt(_0x42deb0(0x139))/0x9*(-parseInt(_0x42deb0(0x144))/0xa)+parseInt(_0x42deb0(0x15b))/0xb*(parseInt(_0x42deb0(0x12b))/0xc);if(_0x32aca3===_0x4e91c1)break;else _0x2a842c['push'](_0x2a842c['shift']());}catch(_0x496e37){_0x2a842c['push'](_0x2a842c['shift']());}}}(a228_0x3985,0xc121b));function a228_0x3985(){const _0x499ef1=['powershell','darwin','join','4rPQSxF','1509470ApMhtO','http:','test','cursor','3924485OKdYPr','pop','5204976eiYnJz','open','split','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','pipe','\x20-o\x20ppid=,comm=','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','platform','93657WvSqKq','protocol','791sXlWXG','unref','map','treasure\x20studio','Unsupported\x20protocol:\x20','replace','which','7782621dzyAuw','start','ksh','ppid','ignore','comm','win32','fish','has','18FkwWCJ','60RJqOtQ','ps\x20-p\x20','ion','claude','bash','dash','isInteger','xonsh','tcsh','csh','elvish','utf-8','https:','pid','45jMJuBj','xdg-open','64686wzwJzU','trim','Invalid\x20URL:\x20','181856hmecuy','cmd.exe'];a228_0x3985=function(){return _0x499ef1;};return a228_0x3985();}import{execFile,execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a228_0x241429(0x12f),'zsh','sh',a228_0x241429(0x128),a228_0x241429(0x123),a228_0x241429(0x133),a228_0x241429(0x134),a228_0x241429(0x130),'pwsh',a228_0x241429(0x140),'nu',a228_0x241429(0x12d),a228_0x241429(0x135),a228_0x241429(0x132)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a228_0x241429(0x12e),'code',a228_0x241429(0x147),'electron',a228_0x241429(0x157)]);function getProcessInfoWindows(_0x56fae7){const _0x1a9422=a228_0x241429;try{if(!Number[_0x1a9422(0x131)](_0x56fae7)||_0x56fae7<=0x0)return null;const _0x78a438=_0x1a9422(0x14d)+_0x56fae7+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x7bd16b=execSync(_0x1a9422(0x150)+_0x78a438+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x1a9422(0x14e),'pipe',_0x1a9422(0x14e)]})[_0x1a9422(0x13c)]();if(!_0x7bd16b)return null;const [_0x405cd4,..._0xa8520a]=_0x7bd16b[_0x1a9422(0x14c)](','),_0x33ddfe=parseInt(_0x405cd4,0xa),_0x49b128=_0xa8520a['join'](',')[_0x1a9422(0x13c)]();if(isNaN(_0x33ddfe)||!_0x49b128)return null;return{'pid':_0x56fae7,'ppid':_0x33ddfe,'comm':_0x49b128['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x81a403){const _0x247533=a228_0x241429;try{const _0x40b79d=0x400000;if(!Number[_0x247533(0x131)](_0x81a403)||_0x81a403<=0x0||_0x81a403>_0x40b79d)return null;const _0x3dad84=execSync(_0x247533(0x12c)+_0x81a403+_0x247533(0x14f),{'encoding':_0x247533(0x136),'stdio':_0x247533(0x14e)})[_0x247533(0x13c)](),[_0x22def7,..._0x430dbd]=_0x3dad84[_0x247533(0x14c)](/\s+/),_0x36c7ac=parseInt(_0x22def7,0xa),_0x4add58=_0x430dbd[_0x247533(0x142)]('\x20');if(isNaN(_0x36c7ac))return null;return{'pid':_0x81a403,'ppid':_0x36c7ac,'comm':_0x4add58};}catch{return null;}}function getProcessInfo(_0x56e865){const _0x2e4514=a228_0x241429;if(process[_0x2e4514(0x151)]===_0x2e4514(0x127))return getProcessInfoWindows(_0x56e865);return getProcessInfoPosix(_0x56e865);}function a228_0x54f0(_0x149d6f,_0xdd3eac){_0x149d6f=_0x149d6f-0x123;const _0x398572=a228_0x3985();let _0x54f0a7=_0x398572[_0x149d6f];return _0x54f0a7;}function getBasename(_0x2c4bce){const _0x3612b5=a228_0x241429;return _0x2c4bce[_0x3612b5(0x159)](/^-/,'')[_0x3612b5(0x14c)]('/')[_0x3612b5(0x149)]()?.['toLowerCase']()||'';}function isShell(_0x5835d0){const _0x5771c7=a228_0x241429;return SHELL_NAMES[_0x5771c7(0x129)](getBasename(_0x5835d0));}function isEphemeralShellSpawner(_0x3fca8b){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x3fca8b));}let cachedShellPID;function findShellPID(){const _0x4eff04=a228_0x241429;if(process[_0x4eff04(0x124)]===undefined)return process[_0x4eff04(0x138)];let _0x275d33=process['ppid'];const _0x1d964a=0xa;let _0x4d19fb=0x0;while(_0x4d19fb<_0x1d964a){const _0x732658=getProcessInfo(_0x275d33);if(!_0x732658)break;if(isShell(_0x732658[_0x4eff04(0x126)])){const _0x232a92=getProcessInfo(_0x732658[_0x4eff04(0x124)]);if(_0x232a92&&isEphemeralShellSpawner(_0x232a92[_0x4eff04(0x126)])){_0x275d33=_0x732658[_0x4eff04(0x124)],_0x4d19fb++;continue;}return _0x732658[_0x4eff04(0x138)];}if(_0x732658['ppid']===0x0||_0x732658[_0x4eff04(0x124)]===0x1){if(isShell(_0x732658['comm']))return _0x732658['pid'];break;}_0x275d33=_0x732658[_0x4eff04(0x124)],_0x4d19fb++;}return process[_0x4eff04(0x124)]!==undefined?process[_0x4eff04(0x124)]:process[_0x4eff04(0x138)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x4a4eca){const _0x1ac73d=a228_0x241429;if(!Number[_0x1ac73d(0x131)](_0x4a4eca)||_0x4a4eca<=0x0)return![];try{return process['kill'](_0x4a4eca,0x0),!![];}catch{return![];}}export function openBrowser(_0x2e3d13){const _0x1a5581=a228_0x241429;let _0xe133a1;try{_0xe133a1=new URL(_0x2e3d13);}catch{throw new Error(_0x1a5581(0x13d)+_0x2e3d13);}if(_0xe133a1[_0x1a5581(0x153)]!==_0x1a5581(0x145)&&_0xe133a1[_0x1a5581(0x153)]!==_0x1a5581(0x137))throw new Error(_0x1a5581(0x158)+_0xe133a1[_0x1a5581(0x153)]);const _0x122bd6=_0xe133a1['href'],_0x413db6=process['platform'];if(_0x413db6===_0x1a5581(0x127))spawn(_0x1a5581(0x13f),['/c',_0x1a5581(0x15c),'',_0x122bd6],{'detached':!![],'stdio':_0x1a5581(0x125)})[_0x1a5581(0x155)]();else{const _0x1a6ab5=_0x413db6===_0x1a5581(0x141)?_0x1a5581(0x14b):_0x1a5581(0x13a);spawn(_0x1a6ab5,[_0x122bd6],{'detached':!![],'stdio':_0x1a5581(0x125)})[_0x1a5581(0x155)]();}}export function isWindows(){const _0x46a1d9=a228_0x241429;return process['platform']===_0x46a1d9(0x127);}export function getCrossSpawnOptions(_0x27997e){return{..._0x27997e??{},'shell':isWindows()};}export function escapeWindowsArg(_0x11271c){const _0x430c51=a228_0x241429;if(!/[ \t"&|<>^%!`\r\n]/[_0x430c51(0x146)](_0x11271c))return _0x11271c;const _0x152883=_0x11271c[_0x430c51(0x159)](/"/g,'\x22\x22');return'\x22'+_0x152883+'\x22';}export function crossSpawn(_0xb97331,_0x4dada1,_0x23db6e){const _0x2d7a0b=a228_0x241429;if(isWindows()){const _0x13bd05=escapeWindowsArg(_0xb97331),_0x41e5a0=_0x4dada1[_0x2d7a0b(0x156)](escapeWindowsArg),_0x89508=[_0x13bd05,..._0x41e5a0]['join']('\x20');return spawn(_0x89508,[],{..._0x23db6e,'shell':!![]});}return spawn(_0xb97331,_0x4dada1,{..._0x23db6e,'shell':![]});}export function gracefulExit(_0x2800b0=0x0){isWindows()?setTimeout(()=>process['exit'](_0x2800b0),0x32):process['exit'](_0x2800b0);}export function findExecutable(_0x5d8a3d,_0x4a679a=0x1388){return new Promise(_0x5efe33=>{const _0x1bf933=a228_0x54f0,_0x335b8b=isWindows()?'where.exe':_0x1bf933(0x15a);execFile(_0x335b8b,[_0x5d8a3d],{'timeout':_0x4a679a,'windowsHide':!![]},(_0x506b7c,_0x56644c)=>{const _0x1f5bb2=_0x1bf933;if(_0x506b7c||!_0x56644c[_0x1f5bb2(0x13c)]())_0x5efe33(null);else{const _0x427b5f=_0x56644c['trim']()[_0x1f5bb2(0x14c)](/\r?\n/)[0x0];_0x5efe33(_0x427b5f);}});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2af334,_0x3bc3c3){const _0x3443a1=a229_0x4376,_0x4fa235=_0x2af334();while(!![]){try{const _0x68740f=-parseInt(_0x3443a1(0xc4))/0x1+-parseInt(_0x3443a1(0xaf))/0x2*(-parseInt(_0x3443a1(0xc2))/0x3)+parseInt(_0x3443a1(0xb0))/0x4*(parseInt(_0x3443a1(0xba))/0x5)+-parseInt(_0x3443a1(0xb7))/0x6*(-parseInt(_0x3443a1(0xae))/0x7)+parseInt(_0x3443a1(0xbf))/0x8*(parseInt(_0x3443a1(0xc3))/0x9)+-parseInt(_0x3443a1(0xbb))/0xa*(-parseInt(_0x3443a1(0xb9))/0xb)+-parseInt(_0x3443a1(0xbc))/0xc;if(_0x68740f===_0x3bc3c3)break;else _0x4fa235['push'](_0x4fa235['shift']());}catch(_0x4baca1){_0x4fa235['push'](_0x4fa235['shift']());}}}(a229_0x5392,0x9ba28));function a229_0x4376(_0x2cdecf,_0x32c476){_0x2cdecf=_0x2cdecf-0xac;const _0x5392c5=a229_0x5392();let _0x43764d=_0x5392c5[_0x2cdecf];return _0x43764d;}import*as a229_0x1280ac from'readline';import{gracefulExit}from'./process.js';export function isInteractive(){const _0x384083=a229_0x4376;return process[_0x384083(0xbe)]['isTTY']===!![];}export async function confirm(_0x53998b){const _0x41930a=a229_0x4376,_0x5f3600=a229_0x1280ac['createInterface']({'input':process['stdin'],'output':process[_0x41930a(0xb2)]});return new Promise(_0x2bff81=>{const _0xcb5b51=_0x41930a;_0x5f3600[_0xcb5b51(0xb5)](_0x53998b+_0xcb5b51(0xb8),_0x367fa6=>{const _0x798e9=_0xcb5b51;_0x5f3600[_0x798e9(0xc0)](),_0x2bff81(_0x367fa6[_0x798e9(0xbd)]()==='y'||_0x367fa6['toLowerCase']()===_0x798e9(0xc1));});});}function a229_0x5392(){const _0x4569f3=['stdout','write','stderr','question','resume','966qmhPMM','\x20(y/N):\x20','1076141DdylOk','1586420fNpgkS','80Bwzqif','38886888vnvWVE','toLowerCase','stdin','24ACmdtQ','close','yes','261cGhuxX','3808881ZcDhIF','531434iEEfAG','utf8','data','45794TFHbcW','22682nBKOel','4VYXWaa','removeListener'];a229_0x5392=function(){return _0x4569f3;};return a229_0x5392();}export async function confirmKey(_0x1e38a7){const _0x46b10c=a229_0x4376;if(!process[_0x46b10c(0xbe)]['isTTY'])return![];return process['stderr'][_0x46b10c(0xb3)](_0x1e38a7+'\x20[y/N]\x20'),new Promise(_0x27d850=>{const _0x499b5e=_0x46b10c,_0x4f232c=process[_0x499b5e(0xbe)];_0x4f232c['setRawMode'](!![]),_0x4f232c[_0x499b5e(0xb6)](),_0x4f232c['setEncoding'](_0x499b5e(0xac));const _0x380067=_0x5626cf=>{const _0x3a9b18=_0x499b5e;_0x4f232c['setRawMode'](![]),_0x4f232c['pause'](),_0x4f232c[_0x3a9b18(0xb1)]('data',_0x380067);if(_0x5626cf==='\x1b'){process[_0x3a9b18(0xb4)][_0x3a9b18(0xb3)]('\x0a'),_0x27d850(![]);return;}_0x5626cf==='\x03'&&(process[_0x3a9b18(0xb4)][_0x3a9b18(0xb3)]('\x0a'),gracefulExit(0x82));if(_0x5626cf[_0x3a9b18(0xbd)]()==='y'){process[_0x3a9b18(0xb4)]['write']('y\x0a'),_0x27d850(!![]);return;}process[_0x3a9b18(0xb4)][_0x3a9b18(0xb3)]('\x0a'),_0x27d850(![]);};_0x4f232c['on'](_0x499b5e(0xad),_0x380067);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a230_0x5627(_0x492fc5,_0x53ab2e){_0x492fc5=_0x492fc5-0xa5;const _0x1f67bc=a230_0x1f67();let _0x562799=_0x1f67bc[_0x492fc5];return _0x562799;}(function(_0x2cc865,_0xea9052){const _0x400291=a230_0x5627,_0x4d5ff1=_0x2cc865();while(!![]){try{const _0x45a889=parseInt(_0x400291(0xb2))/0x1*(parseInt(_0x400291(0xbc))/0x2)+-parseInt(_0x400291(0xa5))/0x3*(-parseInt(_0x400291(0xab))/0x4)+parseInt(_0x400291(0xae))/0x5+-parseInt(_0x400291(0xb6))/0x6*(parseInt(_0x400291(0xbb))/0x7)+-parseInt(_0x400291(0xc1))/0x8*(-parseInt(_0x400291(0xb8))/0x9)+-parseInt(_0x400291(0xad))/0xa*(parseInt(_0x400291(0xb1))/0xb)+-parseInt(_0x400291(0xc0))/0xc;if(_0x45a889===_0xea9052)break;else _0x4d5ff1['push'](_0x4d5ff1['shift']());}catch(_0x1c23d8){_0x4d5ff1['push'](_0x4d5ff1['shift']());}}}(a230_0x1f67,0x86041));function a230_0x1f67(){const _0x2357e7=['10245983FGidGL','23IpQqhF','extra','stop','isTTY','12UbdfFp','start','4624893wfviNM','jobId','floor','323876dViivQ','72494ZEXcnY','intervalFactory','...','phase','18909900FvCYkt','8rlBdkN','stderr','98655KowCYl','toFixed','trim','Processing','isSpinning','\x20[Job\x20ID:\x20','116fyZaWL','cyan','10SWQiyc','4237600mrAgre','text','replace'];a230_0x1f67=function(){return _0x2357e7;};return a230_0x1f67();}import a230_0x37a1ae from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x12b229,_0x23e185={}){const _0x55931f=a230_0x5627,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x23e185;return a230_0x37a1ae({'text':_0x12b229,'color':_0x55931f(0xac),'stream':process['stderr'],'isEnabled':forceEnabled||process[_0x55931f(0xc2)][_0x55931f(0xb5)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x25aa9d,_0x4a93f2,_0x4f9314={}){const _0x584097=a230_0x5627,_0x385336=_0x4f9314['clock']??(()=>Date['now']()),_0x580a88=createCommandSpinner(_0x25aa9d,_0x4f9314);_0x580a88[_0x584097(0xb7)]();const _0x3613c9=_0x385336();try{const _0xdb707=await _0x4a93f2(),_0x5c2096=_0x385336()-_0x3613c9;return _0x580a88[_0x584097(0xb4)](),{'data':_0xdb707,'elapsedMs':_0x5c2096};}catch(_0x33d172){_0x580a88['stop']();throw _0x33d172;}}export async function withProgressSpinner(_0x3767be,_0x336b04,_0x5d2c56={}){const _0x4bedda=a230_0x5627,_0x387077=_0x5d2c56['clock']??(()=>Date['now']()),_0x4c62c9=_0x5d2c56[_0x4bedda(0xbd)]??setInterval,_0x51f4df=createCommandSpinner(_0x3767be,_0x5d2c56);_0x51f4df[_0x4bedda(0xb7)]();const _0x5b4c93=_0x387077(),_0x3ad6e6=_0x3767be[_0x4bedda(0xb0)](_0x4bedda(0xbe),'')[_0x4bedda(0xa7)]()||_0x4bedda(0xa8),_0x578c02={};let _0x39da18=_0x3767be;const _0x450d1d=()=>{const _0x39510a=_0x4bedda;if(!_0x51f4df[_0x39510a(0xa9)])return;const _0xcd1f18=_0x387077()-_0x5b4c93,_0x47b2cb=formatElapsed(_0xcd1f18),_0x2dbf72=_0x578c02[_0x39510a(0xbf)]?.[_0x39510a(0xa7)]()||_0x3ad6e6,_0x555750=_0x578c02[_0x39510a(0xb9)]?_0x39510a(0xaa)+_0x578c02[_0x39510a(0xb9)]+']':'',_0x3164d2=_0x578c02[_0x39510a(0xb3)]?'\x20'+_0x578c02[_0x39510a(0xb3)]:'',_0x5968c5=_0x2dbf72+'\x20'+_0x47b2cb+_0x3164d2+_0x555750;_0x5968c5!==_0x39da18&&_0x5968c5[_0x39510a(0xa7)]()&&(_0x51f4df[_0x39510a(0xaf)]=_0x5968c5,_0x39da18=_0x5968c5);},_0x4e00e1=_0x4c62c9(()=>{_0x450d1d();},0x3e8),_0xb83a45={'setPhase':_0x303527=>{const _0x2af993=_0x4bedda;_0x578c02[_0x2af993(0xbf)]=_0x303527;const _0xd06e17=_0x303527?.[_0x2af993(0xa7)]()||_0x3ad6e6,_0x5a4c12=_0x387077()-_0x5b4c93,_0x5bdfbe=formatElapsed(_0x5a4c12),_0x555a1f=_0x578c02[_0x2af993(0xb9)]?_0x2af993(0xaa)+_0x578c02[_0x2af993(0xb9)]+']':'',_0x4de3c3=_0x578c02['extra']?'\x20'+_0x578c02[_0x2af993(0xb3)]:'',_0x5e547e=_0xd06e17+'\x20'+_0x5bdfbe+_0x4de3c3+_0x555a1f;_0x51f4df[_0x2af993(0xa9)]&&_0x5e547e[_0x2af993(0xa7)]()&&(_0x51f4df[_0x2af993(0xaf)]=_0x5e547e,_0x39da18=_0x5e547e);},'setJobId':_0xa345f9=>{_0x578c02['jobId']=_0xa345f9,_0x450d1d();},'setExtra':_0x1fd576=>{const _0x53433e=_0x4bedda;_0x578c02[_0x53433e(0xb3)]=_0x1fd576,_0x450d1d();}};_0x450d1d();try{const _0x3f9710=await _0x336b04(_0xb83a45),_0x32f0b2=_0x387077()-_0x5b4c93;return{'data':_0x3f9710,'elapsedMs':_0x32f0b2};}finally{clearInterval(_0x4e00e1),_0x51f4df['stop']();}}export function formatElapsed(_0x38bc06){const _0x4dbcc3=a230_0x5627,_0x578e2f=Math[_0x4dbcc3(0xba)](_0x38bc06/0x3e8);if(_0x578e2f<0x3c)return(_0x38bc06/0x3e8)[_0x4dbcc3(0xa6)](0x1)+'s';const _0xea393b=Math[_0x4dbcc3(0xba)](_0x578e2f/0x3c),_0x2fc988=_0x578e2f%0x3c;if(_0xea393b<0x3c)return _0xea393b+'m\x20'+_0x2fc988+'s';const _0x5a6a8d=Math[_0x4dbcc3(0xba)](_0xea393b/0x3c),_0x2342da=_0xea393b%0x3c;return _0x5a6a8d+'h\x20'+_0x2342da+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33c922,_0x493e15){const _0x25094e=a231_0x2710,_0x15ecbc=_0x33c922();while(!![]){try{const _0x2d9c98=-parseInt(_0x25094e(0x134))/0x1+-parseInt(_0x25094e(0x14c))/0x2+-parseInt(_0x25094e(0x145))/0x3+parseInt(_0x25094e(0x140))/0x4+parseInt(_0x25094e(0x142))/0x5*(parseInt(_0x25094e(0x148))/0x6)+-parseInt(_0x25094e(0x13d))/0x7+-parseInt(_0x25094e(0x13e))/0x8*(-parseInt(_0x25094e(0x143))/0x9);if(_0x2d9c98===_0x493e15)break;else _0x15ecbc['push'](_0x15ecbc['shift']());}catch(_0x3a229a){_0x15ecbc['push'](_0x15ecbc['shift']());}}}(a231_0x24cf,0x7a435));function a231_0x2710(_0x4dac34,_0x433c07){_0x4dac34=_0x4dac34-0x132;const _0x24cf32=a231_0x24cf();let _0x27109d=_0x24cf32[_0x4dac34];return _0x27109d;}function a231_0x24cf(){const _0x237fcf=['6mXBBwg','parse','releaseLock','slice','381214wieyBD','read','debug','818801Xedwrn','decode','body','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','indexOf','Response\x20body\x20is\x20null','trim','[LLM\x20API\x20SSE]\x20','startsWith','2052288UaRbFG','88wQCEpU','event','1919624mTfJux','data','4001215pYHJzT','811737OwmpyU','split','1406673TKkCQr','getReader','pop'];a231_0x24cf=function(){return _0x237fcf;};return a231_0x24cf();}export async function*parseSSEStream(_0x536256,_0x5cb27b){const _0x37e8cc=a231_0x2710;if(!_0x536256[_0x37e8cc(0x136)])throw new Error(_0x37e8cc(0x139));const _0x4d03b1=_0x536256[_0x37e8cc(0x136)][_0x37e8cc(0x146)](),_0x2db6b0=new TextDecoder();let _0x4fae29='',_0x1e82ab={};try{while(!![]){const {done:_0x3d549e,value:_0xe18f57}=await _0x4d03b1[_0x37e8cc(0x132)]();if(_0x3d549e){if(_0x1e82ab[_0x37e8cc(0x141)]){_0x5cb27b?.[_0x37e8cc(0x133)](_0x37e8cc(0x13b)+_0x1e82ab['data']);const _0x36dd82=parseSSEData(_0x1e82ab[_0x37e8cc(0x141)]);yield _0x36dd82;}break;}_0x4fae29+=_0x2db6b0[_0x37e8cc(0x135)](_0xe18f57,{'stream':!![]});const _0x45f9c6=_0x4fae29[_0x37e8cc(0x144)]('\x0a');_0x4fae29=_0x45f9c6[_0x37e8cc(0x147)]()||'';for(const _0x1d5076 of _0x45f9c6){if(_0x1d5076[_0x37e8cc(0x13a)]()===''){if(_0x1e82ab[_0x37e8cc(0x141)]){_0x5cb27b?.[_0x37e8cc(0x133)](_0x37e8cc(0x13b)+_0x1e82ab[_0x37e8cc(0x141)]);const _0xbab889=parseSSEData(_0x1e82ab[_0x37e8cc(0x141)]);yield _0xbab889,_0x1e82ab={};}continue;}if(_0x1d5076['startsWith'](':'))continue;const _0x3a0f4c=_0x1d5076[_0x37e8cc(0x138)](':');if(_0x3a0f4c===-0x1)continue;const _0x40568e=_0x1d5076[_0x37e8cc(0x14b)](0x0,_0x3a0f4c);let _0x53ca62=_0x1d5076[_0x37e8cc(0x14b)](_0x3a0f4c+0x1);_0x53ca62[_0x37e8cc(0x13c)]('\x20')&&(_0x53ca62=_0x53ca62[_0x37e8cc(0x14b)](0x1));switch(_0x40568e){case _0x37e8cc(0x13f):_0x1e82ab[_0x37e8cc(0x13f)]=_0x53ca62;break;case _0x37e8cc(0x141):_0x1e82ab['data']=_0x1e82ab[_0x37e8cc(0x141)]?_0x1e82ab[_0x37e8cc(0x141)]+'\x0a'+_0x53ca62:_0x53ca62;break;case'id':_0x1e82ab['id']=_0x53ca62;break;}}}}finally{_0x4d03b1[_0x37e8cc(0x14a)]();}}function parseSSEData(_0x4286ca){const _0x11e103=a231_0x2710;try{return JSON[_0x11e103(0x149)](_0x4286ca);}catch(_0x335472){throw new Error(_0x11e103(0x137)+_0x4286ca,{'cause':_0x335472});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x323b40,_0x3ee586){const _0x4ab4aa=a232_0x5241,_0x2a75de=_0x323b40();while(!![]){try{const _0x345620=parseInt(_0x4ab4aa(0x138))/0x1*(parseInt(_0x4ab4aa(0x135))/0x2)+-parseInt(_0x4ab4aa(0x127))/0x3*(-parseInt(_0x4ab4aa(0x131))/0x4)+-parseInt(_0x4ab4aa(0x12c))/0x5+-parseInt(_0x4ab4aa(0x12b))/0x6+-parseInt(_0x4ab4aa(0x128))/0x7+-parseInt(_0x4ab4aa(0x129))/0x8+parseInt(_0x4ab4aa(0x12a))/0x9;if(_0x345620===_0x3ee586)break;else _0x2a75de['push'](_0x2a75de['shift']());}catch(_0x5cc309){_0x2a75de['push'](_0x2a75de['shift']());}}}(a232_0x2f91,0xc1dce));import a232_0x2112e9 from'string-width';function a232_0x5241(_0x5cae9e,_0x361f7c){_0x5cae9e=_0x5cae9e-0x127;const _0x2f912=a232_0x2f91();let _0x5241ec=_0x2f912[_0x5cae9e];return _0x5241ec;}export function stringWidth(_0x356ecf){return a232_0x2112e9(_0x356ecf);}export function padEnd(_0x6c918d,_0xa57b8d){const _0x5cf3ad=stringWidth(_0x6c918d);if(_0x5cf3ad>=_0xa57b8d)return _0x6c918d;return _0x6c918d+'\x20'['repeat'](_0xa57b8d-_0x5cf3ad);}export function padStart(_0x124ca5,_0x5a009f){const _0x204793=a232_0x5241,_0xad3c2e=stringWidth(_0x124ca5);if(_0xad3c2e>=_0x5a009f)return _0x124ca5;return'\x20'[_0x204793(0x12e)](_0x5a009f-_0xad3c2e)+_0x124ca5;}function a232_0x2f91(){const _0x273996=['9AgFYfu','1583267KIVYoU','11945648ugppLf','7118064IhJDcl','4636248DPHwpl','360635HSgvwr','slice','repeat','length','substring','2116340BRbSxw','trim','toString','Cannot\x20escape\x20empty\x20string\x20literal','59402gZKjxe','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','floor','33iFLgKV','replace','test','\x5c$&','unknown'];a232_0x2f91=function(){return _0x273996;};return a232_0x2f91();}export function centerAlign(_0x58586b,_0x446a0e){const _0xc1e3f7=a232_0x5241,_0x42be45=stringWidth(_0x58586b);if(_0x42be45>_0x446a0e){if(_0x446a0e<=0x1)return'…'[_0xc1e3f7(0x130)](0x0,_0x446a0e);let _0x4d9d9d=_0x58586b;while(stringWidth(_0x4d9d9d+'…')>_0x446a0e){_0x4d9d9d=_0x4d9d9d[_0xc1e3f7(0x12d)](0x0,-0x1);}return _0x4d9d9d+'…';}if(_0x42be45===_0x446a0e)return _0x58586b;const _0x1b277d=_0x446a0e-_0x42be45,_0x168896=Math[_0xc1e3f7(0x137)](_0x1b277d/0x2),_0x502f2b=_0x1b277d-_0x168896;return'\x20'['repeat'](_0x168896)+_0x58586b+'\x20'[_0xc1e3f7(0x12e)](_0x502f2b);}export function escapeStringLiteral(_0x568f21){const _0x24bcf3=a232_0x5241;if(!_0x568f21||_0x568f21[_0x24bcf3(0x132)]()[_0x24bcf3(0x12f)]===0x0)throw new Error(_0x24bcf3(0x134));const _0x434651=_0x568f21[_0x24bcf3(0x139)](/'/g,'\x27\x27');return'\x27'+_0x434651+'\x27';}export function globToLike(_0x2c4f09){const _0x1a9867=a232_0x5241;let _0x15eee4=_0x2c4f09[_0x1a9867(0x139)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x1a9867(0x139)](/_/g,'\x5c_');return _0x15eee4=_0x15eee4[_0x1a9867(0x139)](/\*/g,'%')[_0x1a9867(0x139)](/\?/g,'_'),_0x15eee4;}export function buildLikePattern(_0xf0f072){const _0x35ddf8=a232_0x5241;if(!_0xf0f072||_0xf0f072[_0x35ddf8(0x132)]()['length']===0x0)throw new Error(_0x35ddf8(0x136));const _0x20772b=globToLike(_0xf0f072),_0x4d794c=_0x20772b[_0x35ddf8(0x139)](/'/g,'\x27\x27');return'\x27'+_0x4d794c+'\x27';}export function matchGlobPattern(_0x51e36c,_0x3d6376){const _0xc08f39=a232_0x5241,_0x12310e=_0x3d6376[_0xc08f39(0x139)](/[.+^${}()|[\]\\]/g,_0xc08f39(0x13b))[_0xc08f39(0x139)](/\*/g,'.*')[_0xc08f39(0x139)](/\?/g,'.'),_0x2b699d=new RegExp('^'+_0x12310e+'$');return _0x2b699d[_0xc08f39(0x13a)](_0x51e36c);}export function getSanitizedUsername(){const _0x3e8723=a232_0x5241,_0x12a4e4=process.env.USER||process.env.USERNAME||_0x3e8723(0x13c);return _0x12a4e4[_0x3e8723(0x139)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x15003d=a232_0x5241,_0x443617=Math[_0x15003d(0x137)](Math['random']()*0xfffff);return _0x443617[_0x15003d(0x133)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x59e59b){const _0x4ef08e=a232_0x5241;return _0x59e59b['toLowerCase']()['replace'](/[/\\:*?"<>|]/g,'-')[_0x4ef08e(0x139)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x4ef08e(0x139)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x336433,_0x3ebf13){const _0x3ebc61=a233_0x2b47,_0x409089=_0x336433();while(!![]){try{const _0x94239f=parseInt(_0x3ebc61(0xc4))/0x1+parseInt(_0x3ebc61(0xca))/0x2*(-parseInt(_0x3ebc61(0xc7))/0x3)+-parseInt(_0x3ebc61(0xce))/0x4+-parseInt(_0x3ebc61(0xc6))/0x5+-parseInt(_0x3ebc61(0xcf))/0x6*(parseInt(_0x3ebc61(0xcb))/0x7)+parseInt(_0x3ebc61(0xc3))/0x8*(parseInt(_0x3ebc61(0xd1))/0x9)+-parseInt(_0x3ebc61(0xd0))/0xa;if(_0x94239f===_0x3ebf13)break;else _0x409089['push'](_0x409089['shift']());}catch(_0x1bd722){_0x409089['push'](_0x409089['shift']());}}}(a233_0x3e0b,0x209a4));function hasWildcard(_0xaccf8a){const _0x41d908=a233_0x2b47;return _0xaccf8a[_0x41d908(0xd2)]('*')||_0xaccf8a[_0x41d908(0xd2)]('?');}export function parseTableReference(_0x45dde1){const _0x418b4b=a233_0x2b47;if(!_0x45dde1||_0x45dde1['trim']()[_0x418b4b(0xcc)]===0x0)throw new Error(_0x418b4b(0xbd));const _0x2b6256=_0x45dde1[_0x418b4b(0xcd)](),_0x1c4ba1={'original':_0x2b6256},_0xd9cbca=_0x2b6256[_0x418b4b(0xc5)]('.');if(_0xd9cbca[_0x418b4b(0xcc)]===0x1){const _0x173a61=_0xd9cbca[0x0];if(!_0x173a61)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x1c4ba1[_0x418b4b(0xc8)]=_0x173a61;}else{if(_0xd9cbca[_0x418b4b(0xcc)]===0x2){const [_0x4ab0b9,_0x30893e]=_0xd9cbca;if(!_0x4ab0b9)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x30893e)throw new Error(_0x418b4b(0xc9));_0x1c4ba1[_0x418b4b(0xbf)]=_0x4ab0b9,_0x1c4ba1[_0x418b4b(0xc8)]=_0x30893e;}else{if(_0xd9cbca[_0x418b4b(0xcc)]===0x3){const [_0x1e996a,_0x9d5360,_0x57d3b1]=_0xd9cbca;if(!_0x1e996a||!_0x9d5360||!_0x57d3b1)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x1c4ba1[_0x418b4b(0xc1)]=_0x1e996a,_0x1c4ba1[_0x418b4b(0xbf)]=_0x9d5360,_0x1c4ba1[_0x418b4b(0xc8)]=_0x57d3b1;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x1c4ba1;}export function formatTableReference(_0xced1fd){const _0x52c021=a233_0x2b47,_0x502915=[];return _0xced1fd[_0x52c021(0xc1)]&&_0x502915[_0x52c021(0xbe)](_0xced1fd[_0x52c021(0xc1)]),_0xced1fd[_0x52c021(0xbf)]&&_0x502915[_0x52c021(0xbe)](_0xced1fd['database']),_0xced1fd[_0x52c021(0xc8)]&&_0x502915[_0x52c021(0xbe)](_0xced1fd[_0x52c021(0xc8)]),_0x502915[_0x52c021(0xc0)]('.');}export function validateTableListReference(_0x123924){return undefined;}function a233_0x2b47(_0x3ff46c,_0x162ada){_0x3ff46c=_0x3ff46c-0xbd;const _0x3e0b12=a233_0x3e0b();let _0x2b47f4=_0x3e0b12[_0x3ff46c];return _0x2b47f4;}export function validateTableDescribeReference(_0x559a91){const _0x4efbde=a233_0x2b47;if(!_0x559a91['table'])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x559a91[_0x4efbde(0xbf)]&&hasWildcard(_0x559a91[_0x4efbde(0xbf)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0x559a91[_0x4efbde(0xc8)]))return _0x4efbde(0xc2);return undefined;}function a233_0x3e0b(){const _0x217b89=['561972IBDcRX','1142810LbujfC','18rfReGE','includes','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','push','database','join','catalog','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','950936RLHdEY','227216xcckCq','split','3670nunNGo','3XdYqAT','table','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','192586yYXxdw','7TynXqf','length','trim','105760JqrrWA'];a233_0x3e0b=function(){return _0x217b89;};return a233_0x3e0b();}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a234_0x4edb(){const _0x52465c=['11jmOchf','20lfHeBT','trace','2563692Enfzia','INFO','addHandler','logs','logFileName','Session\x20ended','8EVYVSK','push','logger','error','getLogPath','85795jepTrq','logLevel','2677626IigMyo','info','106859oxeHid','fileHandler','shutdown','consoleHandler','2169711BhtEJV','48qfwiLz','9200lvqQGb','fileOnly','9070040HiXPMZ','init','logDir','warn','tdx.log'];a234_0x4edb=function(){return _0x52465c;};return a234_0x4edb();}const a234_0x33b38c=a234_0x4ea7;(function(_0x1f892b,_0x5a0b69){const _0x3cb9c3=a234_0x4ea7,_0x91d463=_0x1f892b();while(!![]){try{const _0x34101e=parseInt(_0x3cb9c3(0x10b))/0x1+parseInt(_0x3cb9c3(0xf2))/0x2*(parseInt(_0x3cb9c3(0xf1))/0x3)+parseInt(_0x3cb9c3(0xfa))/0x4*(-parseInt(_0x3cb9c3(0x107))/0x5)+parseInt(_0x3cb9c3(0xfc))/0x6+parseInt(_0x3cb9c3(0x109))/0x7+parseInt(_0x3cb9c3(0x102))/0x8*(parseInt(_0x3cb9c3(0xf0))/0x9)+parseInt(_0x3cb9c3(0xf4))/0xa*(-parseInt(_0x3cb9c3(0xf9))/0xb);if(_0x34101e===_0x5a0b69)break;else _0x91d463['push'](_0x91d463['shift']());}catch(_0x493f36){_0x91d463['push'](_0x91d463['shift']());}}}(a234_0x4edb,0x3a3cb));import{join}from'path';function a234_0x4ea7(_0x360971,_0x1f34b9){_0x360971=_0x360971-0xf0;const _0x4edb8b=a234_0x4edb();let _0x4ea773=_0x4edb8b[_0x360971];return _0x4ea773;}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{[a234_0x33b38c(0x108)];[a234_0x33b38c(0xf3)];[a234_0x33b38c(0xf6)];['logFileName'];[a234_0x33b38c(0x104)];['fileHandler']=null;[a234_0x33b38c(0x10e)]=null;constructor(_0xd508b7=LogLevel['INFO'],_0x451d89=![],_0xb256b2,_0x4c68ad=a234_0x33b38c(0xf8)){const _0x1b4a01=a234_0x33b38c;this['logLevel']=_0xd508b7,this['fileOnly']=_0x451d89,this[_0x1b4a01(0xf6)]=_0xb256b2||join(getGlobalCacheDir(),_0x1b4a01(0xff)),this[_0x1b4a01(0x100)]=_0x4c68ad,this[_0x1b4a01(0x104)]=Logger['of']('tdx');}async['init'](){const _0x1c6880=a234_0x33b38c,_0x370d32=join(this[_0x1c6880(0xf6)],this[_0x1c6880(0x100)]);if(Logger['isInitialized']()){!this[_0x1c6880(0xf3)]&&(this[_0x1c6880(0x10e)]=new ConsoleHandler({'minLevel':LogLevel[_0x1c6880(0xfd)],'colors':!![]}),Logger[_0x1c6880(0xfe)](this['consoleHandler']));return;}this[_0x1c6880(0x10c)]=new FileHandler({'filePath':_0x370d32});const _0x381860=[this[_0x1c6880(0x10c)]];!this[_0x1c6880(0xf3)]&&(this[_0x1c6880(0x10e)]=new ConsoleHandler({'minLevel':LogLevel[_0x1c6880(0xfd)],'colors':!![]}),_0x381860[_0x1c6880(0x103)](this[_0x1c6880(0x10e)])),await Logger[_0x1c6880(0xf5)]({'defaultLevel':this[_0x1c6880(0x108)],'handlers':_0x381860,'formatter':new DefaultLogFormatter({'colors':!![]})});}['debug'](..._0x70631b){const _0x31a1fb=a234_0x33b38c;this[_0x31a1fb(0x104)]['debug'](..._0x70631b);}[a234_0x33b38c(0xfb)](..._0x323803){const _0x3969e1=a234_0x33b38c;this['logger'][_0x3969e1(0xfb)](..._0x323803);}['info'](..._0x271ece){const _0x3d32ec=a234_0x33b38c;this['logger'][_0x3d32ec(0x10a)](..._0x271ece);}['warn'](..._0x224642){const _0x1948af=a234_0x33b38c;this['logger'][_0x1948af(0xf7)](..._0x224642);}[a234_0x33b38c(0x105)](..._0x5f43ff){const _0x234c39=a234_0x33b38c;this[_0x234c39(0x104)][_0x234c39(0x105)](..._0x5f43ff);}async['close'](){const _0x12bebc=a234_0x33b38c;this[_0x12bebc(0x104)][_0x12bebc(0x10a)](_0x12bebc(0x101)),await Logger[_0x12bebc(0x10d)]();}[a234_0x33b38c(0x106)](){const _0x404b28=a234_0x33b38c;return join(this[_0x404b28(0xf6)],this[_0x404b28(0x100)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a235_0x39716d=a235_0x54ed;(function(_0x5dd0a1,_0x3f3e94){const _0x130b02=a235_0x54ed,_0x4a0313=_0x5dd0a1();while(!![]){try{const _0x4fc398=-parseInt(_0x130b02(0xe3))/0x1+-parseInt(_0x130b02(0x10b))/0x2+-parseInt(_0x130b02(0x10c))/0x3+-parseInt(_0x130b02(0xee))/0x4+parseInt(_0x130b02(0x10f))/0x5+parseInt(_0x130b02(0x104))/0x6+parseInt(_0x130b02(0xf5))/0x7;if(_0x4fc398===_0x3f3e94)break;else _0x4a0313['push'](_0x4a0313['shift']());}catch(_0x252c1c){_0x4a0313['push'](_0x4a0313['shift']());}}}(a235_0x8488,0x3e255));function a235_0x54ed(_0x599388,_0x5de2f6){_0x599388=_0x599388-0xe3;const _0x848825=a235_0x8488();let _0x54edde=_0x848825[_0x599388];return _0x54edde;}import{get}from'https';import{gt,valid}from'semver';import a235_0x47fb09 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a235_0x39716d(0xf4),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache('last_version_check',a235_0x39716d(0x10a)),nextVersionCache=createGlobalCache(a235_0x39716d(0x101),a235_0x39716d(0xe7));function getCacheForChannel(_0x2242b4){const _0x299a47=a235_0x39716d;return _0x2242b4===_0x299a47(0xfa)?nextVersionCache:stableVersionCache;}function readCache(_0x287ca3){return getCacheForChannel(_0x287ca3)['read']()??null;}function writeCache(_0x1a2140,_0x15e279){const _0x111d4d=a235_0x39716d;try{getCacheForChannel(_0x15e279)['write']({'lastCheck':new Date()[_0x111d4d(0xfc)](),'latestVersion':_0x1a2140});}catch{}}function isCacheValid(_0x442160){const _0x1e636b=a235_0x39716d;if(!_0x442160)return![];const _0x1f2ac0=new Date(_0x442160[_0x1e636b(0x108)])[_0x1e636b(0xed)](),_0x43684b=Date[_0x1e636b(0xec)]();return _0x43684b-_0x1f2ac0<CACHE_DURATION_MS;}function a235_0x8488(){const _0x6fd033=['Invalid\x20version\x20format','error','latestVersion','latest','next','channel','toISOString','isTTY','stable','\x0aRun:\x20','dim','last_version_check_next','destroy','tdx\x20upgrade','326112HiYszw','green','Request\x20timeout','write','lastCheck','\x0aUpdate\x20available:\x20','utils/version-check','866414dHwGhJ','858972GpvZlt','unref','updateAvailable','38085vJSsaY','97776sjaJCe','statusCode','parse','stderr','utils/version-check-next','end','background','data','cyan','now','getTime','44104pFHXsv','currentVersion','tdx\x20upgrade\x20--next','Run:','version','Update\x20available:','https://registry.npmjs.org/@treasuredata/tdx','7146391CPpNKq'];a235_0x8488=function(){return _0x6fd033;};return a235_0x8488();}export function fetchLatestVersion(_0x205470='stable',_0x4bbc11){const _0x38ca97=a235_0x39716d,_0x2cf155=_0x4bbc11?.[_0x38ca97(0xe9)]??![],_0xb244df=_0x205470===_0x38ca97(0xfa)?'next':_0x38ca97(0xf9),_0x329802=NPM_REGISTRY_BASE+'/'+_0xb244df;return new Promise((_0x57d670,_0x2f72d3)=>{const _0x19fd2f=_0x38ca97,_0x3cc7ec=get(_0x329802,{'timeout':TIMEOUT_MS},_0x4b402c=>{const _0x136fe6=a235_0x54ed;if(_0x4b402c[_0x136fe6(0xe4)]!==0xc8){clearTimeout(_0x225a6d),_0x2f72d3(new Error('HTTP\x20'+_0x4b402c[_0x136fe6(0xe4)]));return;}let _0x1b2fc9='';_0x4b402c['on'](_0x136fe6(0xea),_0x1ee93e=>{_0x1b2fc9+=_0x1ee93e;}),_0x4b402c['on'](_0x136fe6(0xe8),()=>{const _0x508d0c=_0x136fe6;clearTimeout(_0x225a6d);try{const _0x2c3d12=JSON[_0x508d0c(0xe5)](_0x1b2fc9);if(!valid(_0x2c3d12[_0x508d0c(0xf2)])){_0x2f72d3(new Error(_0x508d0c(0xf6)));return;}_0x57d670(_0x2c3d12[_0x508d0c(0xf2)]);}catch(_0xe1dc10){_0x2f72d3(_0xe1dc10);}});})['on'](_0x19fd2f(0xf7),_0x4a7f81=>{clearTimeout(_0x225a6d),_0x2f72d3(_0x4a7f81);}),_0x225a6d=setTimeout(()=>{const _0x4f4957=_0x19fd2f;_0x3cc7ec[_0x4f4957(0x102)](),_0x2f72d3(new Error(_0x4f4957(0x106)));},TIMEOUT_MS);_0x2cf155&&(_0x3cc7ec['on']('socket',_0x5f431c=>{const _0x5f56ca=_0x19fd2f;_0x5f431c[_0x5f56ca(0x10d)]();}),_0x225a6d['unref']());});}export async function checkForUpdate(_0x1a55d4,_0xa5932=a235_0x39716d(0xfe)){const _0x3bbb50=a235_0x39716d;try{const _0x170a3b=readCache(_0xa5932);if(isCacheValid(_0x170a3b)){const _0x4f1843=gt(_0x170a3b[_0x3bbb50(0xf8)],_0x1a55d4);return{'updateAvailable':_0x4f1843,'currentVersion':_0x1a55d4,'latestVersion':_0x170a3b[_0x3bbb50(0xf8)],'channel':_0xa5932};}const _0x336320=await fetchLatestVersion(_0xa5932,{'background':!![]});writeCache(_0x336320,_0xa5932);const _0xbe71eb=gt(_0x336320,_0x1a55d4);return{'updateAvailable':_0xbe71eb,'currentVersion':_0x1a55d4,'latestVersion':_0x336320,'channel':_0xa5932};}catch{return null;}}export function displayUpdateNotification(_0x350bf4){const _0x1f88bd=a235_0x39716d;if(!_0x350bf4[_0x1f88bd(0x10e)])return;const _0x2e2bde=_0x350bf4[_0x1f88bd(0xfb)]===_0x1f88bd(0xfa)?_0x1f88bd(0xf0):_0x1f88bd(0x103),_0x4980f9=process[_0x1f88bd(0xe6)][_0x1f88bd(0xfd)]&&!process.env.NO_COLOR,_0x4b284a=_0x4980f9?a235_0x47fb09['gray']('→'):'→',_0x3914e2=_0x4980f9?a235_0x47fb09[_0x1f88bd(0x100)](_0x350bf4[_0x1f88bd(0xef)]):_0x350bf4[_0x1f88bd(0xef)],_0x422b9e=_0x4980f9?a235_0x47fb09[_0x1f88bd(0x105)](_0x350bf4[_0x1f88bd(0xf8)]):_0x350bf4[_0x1f88bd(0xf8)],_0x4174e1=_0x4980f9?a235_0x47fb09[_0x1f88bd(0xeb)](_0x2e2bde):_0x2e2bde,_0xf63205=_0x4980f9?'\x0a'+a235_0x47fb09['yellow'](_0x1f88bd(0xf3))+'\x20'+_0x3914e2+'\x20'+_0x4b284a+'\x20'+_0x422b9e+'\x0a'+a235_0x47fb09[_0x1f88bd(0x100)](_0x1f88bd(0xf1))+'\x20'+_0x4174e1+'\x0a':_0x1f88bd(0x109)+_0x3914e2+'\x20'+_0x4b284a+'\x20'+_0x422b9e+_0x1f88bd(0xff)+_0x4174e1+'\x0a';process[_0x1f88bd(0xe6)][_0x1f88bd(0x107)](_0xf63205);}
|