@treasuredata/tdx 2026.5.1 → 2026.6.0
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/table-deleted.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/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.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/segment-validator.js.map +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.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +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/task-graph.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
|
+
const a229_0x5ead71=a229_0x2cb4;(function(_0x2fd5de,_0x406ae0){const _0x46d20b=a229_0x2cb4,_0x397b8c=_0x2fd5de();while(!![]){try{const _0x14f039=parseInt(_0x46d20b(0x189))/0x1*(parseInt(_0x46d20b(0x168))/0x2)+parseInt(_0x46d20b(0x178))/0x3+parseInt(_0x46d20b(0x170))/0x4+parseInt(_0x46d20b(0x17d))/0x5*(parseInt(_0x46d20b(0x16d))/0x6)+-parseInt(_0x46d20b(0x163))/0x7+-parseInt(_0x46d20b(0x181))/0x8*(-parseInt(_0x46d20b(0x15c))/0x9)+parseInt(_0x46d20b(0x17e))/0xa*(-parseInt(_0x46d20b(0x175))/0xb);if(_0x14f039===_0x406ae0)break;else _0x397b8c['push'](_0x397b8c['shift']());}catch(_0x3a0f34){_0x397b8c['push'](_0x397b8c['shift']());}}}(a229_0x3a7a,0xafde0));import{LogLevel as a229_0x5eba21,logLevelToString}from'./types.js';const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a229_0x5eba21[a229_0x5ead71(0x185)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x252e7a){const _0x5e0e8f=a229_0x5ead71;if(typeof _0x252e7a===_0x5e0e8f(0x18d))return _0x252e7a;if(_0x252e7a instanceof Error)return _0x252e7a[_0x5e0e8f(0x174)]||_0x252e7a[_0x5e0e8f(0x188)]+':\x20'+_0x252e7a[_0x5e0e8f(0x183)];try{return JSON[_0x5e0e8f(0x182)](_0x252e7a,(_0x411bb4,_0x1d3402)=>{const _0x113b5b=_0x5e0e8f;if(_0x1d3402 instanceof Error)return{'name':_0x1d3402[_0x113b5b(0x188)],'message':_0x1d3402['message'],'stack':_0x1d3402[_0x113b5b(0x174)],'cause':_0x1d3402[_0x113b5b(0x17c)]};return _0x1d3402;});}catch{return String(_0x252e7a);}}function a229_0x2cb4(_0x467b5a,_0x1fbe57){_0x467b5a=_0x467b5a-0x155;const _0x3a7a40=a229_0x3a7a();let _0x2cb40d=_0x3a7a40[_0x467b5a];return _0x2cb40d;}export class Logger{[a229_0x5ead71(0x15a)];constructor(_0x2863d5){const _0x4de17c=a229_0x5ead71;this[_0x4de17c(0x15a)]=_0x2863d5;}static['of'](_0x35d957){const _0x28d7ad=a229_0x5ead71,_0x4930b3=typeof _0x35d957==='string'?_0x35d957:_0x35d957[_0x28d7ad(0x188)];let _0x4954eb=state[_0x28d7ad(0x165)][_0x28d7ad(0x187)](_0x4930b3);return!_0x4954eb&&(_0x4954eb=new Logger(_0x4930b3),state[_0x28d7ad(0x165)][_0x28d7ad(0x16c)](_0x4930b3,_0x4954eb)),_0x4954eb;}static async[a229_0x5ead71(0x177)](_0x576fe3={}){const _0x2ed5c6=a229_0x5ead71;state['defaultLevel']=_0x576fe3[_0x2ed5c6(0x16f)]??a229_0x5eba21['INFO'],state[_0x2ed5c6(0x159)]=_0x576fe3[_0x2ed5c6(0x159)]??[],state[_0x2ed5c6(0x15e)]=_0x576fe3['formatter']??null,state[_0x2ed5c6(0x173)][_0x2ed5c6(0x18e)]();if(_0x576fe3['levelOverrides'])for(const [_0x179d8f,_0x588cef]of Object[_0x2ed5c6(0x17a)](_0x576fe3[_0x2ed5c6(0x173)])){state[_0x2ed5c6(0x173)][_0x2ed5c6(0x16c)](_0x179d8f,_0x588cef);}for(const _0x21fb96 of state['handlers']){_0x21fb96[_0x2ed5c6(0x177)]&&await _0x21fb96[_0x2ed5c6(0x177)]();}state[_0x2ed5c6(0x172)]=!![];for(const _0x17d5bf of state[_0x2ed5c6(0x160)]){Logger[_0x2ed5c6(0x17b)](_0x17d5bf);}state[_0x2ed5c6(0x160)]=[];}static[a229_0x5ead71(0x18f)](_0x112cd5,_0x52bd76){state['levelOverrides']['set'](_0x112cd5,_0x52bd76);}static['setDefaultLevel'](_0xa7a68){const _0x39d94d=a229_0x5ead71;state[_0x39d94d(0x16f)]=_0xa7a68;}static[a229_0x5ead71(0x158)](_0x101a14){const _0x44431e=a229_0x5ead71;state[_0x44431e(0x159)][_0x44431e(0x18a)](_0x101a14),state[_0x44431e(0x172)]&&_0x101a14[_0x44431e(0x177)]&&_0x101a14[_0x44431e(0x177)]();}static[a229_0x5ead71(0x171)](){const _0x237f63=a229_0x5ead71;state[_0x237f63(0x159)]=[];}static async[a229_0x5ead71(0x15d)](){const _0x15388c=a229_0x5ead71;for(const _0x271c28 of state[_0x15388c(0x159)]){_0x271c28['close']&&await _0x271c28[_0x15388c(0x166)]();}state[_0x15388c(0x159)]=[],state[_0x15388c(0x172)]=![],state[_0x15388c(0x165)][_0x15388c(0x18e)](),state[_0x15388c(0x160)]=[];}static['reset'](){const _0x14b969=a229_0x5ead71;state[_0x14b969(0x172)]=![],state[_0x14b969(0x16f)]=a229_0x5eba21[_0x14b969(0x185)],state[_0x14b969(0x173)][_0x14b969(0x18e)](),state[_0x14b969(0x159)]=[],state['formatter']=null,state[_0x14b969(0x165)]['clear'](),state[_0x14b969(0x160)]=[];}static[a229_0x5ead71(0x180)](){return state['initialized'];}static[a229_0x5ead71(0x167)](_0x22fe49){const _0x4ece44=a229_0x5ead71;if(state['levelOverrides'][_0x4ece44(0x155)](_0x22fe49))return state[_0x4ece44(0x173)][_0x4ece44(0x187)](_0x22fe49);const _0x2c6664=_0x22fe49[_0x4ece44(0x18b)]('.');for(let _0x36d7dc=_0x2c6664[_0x4ece44(0x156)]-0x1;_0x36d7dc>0x0;_0x36d7dc--){const _0x344b00=_0x2c6664[_0x4ece44(0x16e)](0x0,_0x36d7dc)['join']('.');if(state[_0x4ece44(0x173)][_0x4ece44(0x155)](_0x344b00))return state[_0x4ece44(0x173)][_0x4ece44(0x187)](_0x344b00);}return state[_0x4ece44(0x16f)];}[a229_0x5ead71(0x16a)](_0x26bc29){const _0x43688c=a229_0x5ead71,_0x10bb3f=Logger[_0x43688c(0x167)](this['component']);return _0x26bc29>=_0x10bb3f;}static['dispatch'](_0x349904){const _0x29f9dc=a229_0x5ead71;for(const _0x3a6584 of state[_0x29f9dc(0x159)]){_0x3a6584[_0x29f9dc(0x176)](_0x349904);}}[a229_0x5ead71(0x15b)](_0x4136f0,_0x442876){const _0x2c4c58=a229_0x5ead71;if(!this['shouldLog'](_0x4136f0))return;const _0x2e4838=_0x442876[_0x2c4c58(0x17f)](_0x27b905=>typeof _0x27b905==='function'?_0x27b905():_0x27b905),_0x4eb300=_0x2e4838['map'](safeStringify)[_0x2c4c58(0x186)]('\x20'),_0xfeeb79={'timestamp':new Date(),'level':_0x4136f0,'component':this[_0x2c4c58(0x15a)],'message':_0x4eb300};if(!state[_0x2c4c58(0x172)]){state['pendingRecords'][_0x2c4c58(0x156)]<MAX_PENDING_RECORDS&&state[_0x2c4c58(0x160)][_0x2c4c58(0x18a)](_0xfeeb79);return;}Logger[_0x2c4c58(0x17b)](_0xfeeb79);}[a229_0x5ead71(0x18c)](..._0x41aa9f){const _0xef7151=a229_0x5ead71;this['log'](a229_0x5eba21[_0xef7151(0x184)],_0x41aa9f);}[a229_0x5ead71(0x190)](..._0x87775b){const _0xc3d657=a229_0x5ead71;this[_0xc3d657(0x15b)](a229_0x5eba21['DEBUG'],_0x87775b);}[a229_0x5ead71(0x162)](..._0x5c249b){const _0x2eba24=a229_0x5ead71;this['log'](a229_0x5eba21[_0x2eba24(0x185)],_0x5c249b);}[a229_0x5ead71(0x15f)](..._0xf74c95){const _0x662148=a229_0x5ead71;this[_0x662148(0x15b)](a229_0x5eba21['WARN'],_0xf74c95);}['error'](..._0x542ec9){const _0xf46a39=a229_0x5ead71;this[_0xf46a39(0x15b)](a229_0x5eba21[_0xf46a39(0x157)],_0x542ec9);}static[a229_0x5ead71(0x179)](){const _0x24dff1=a229_0x5ead71;return state[_0x24dff1(0x15e)];}static[a229_0x5ead71(0x164)](_0x3719e9){const _0x48cce4=a229_0x5ead71;if(state[_0x48cce4(0x15e)])return state['formatter'][_0x48cce4(0x164)](_0x3719e9);return _0x3719e9['timestamp'][_0x48cce4(0x161)]()+'\x20['+logLevelToString(_0x3719e9[_0x48cce4(0x16b)])+_0x48cce4(0x169)+_0x3719e9[_0x48cce4(0x15a)]+']\x20'+_0x3719e9[_0x48cce4(0x183)];}}function a229_0x3a7a(){const _0x36299c=['stack','11eLdjPJ','handle','init','3399558gumhnC','getFormatter','entries','dispatch','cause','10QKtzGQ','20504540dwYLSI','map','isInitialized','1016ZTRtYc','stringify','message','TRACE','INFO','join','get','name','1ygvkVX','push','split','trace','string','clear','setLogLevel','debug','has','length','ERROR','addHandler','handlers','component','log','8289ENAjIz','shutdown','formatter','warn','pendingRecords','toISOString','info','1833720NESeRW','format','loggers','close','getEffectiveLevel','314254NTiamb',']\x20[','shouldLog','level','set','2601318HXRHAg','slice','defaultLevel','3033520oQnoRk','clearHandlers','initialized','levelOverrides'];a229_0x3a7a=function(){return _0x36299c;};return a229_0x3a7a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4517cf,_0x56896d){const _0x5361c9=a230_0x4b62,_0xf536f2=_0x4517cf();while(!![]){try{const _0x1aa5d0=-parseInt(_0x5361c9(0x1dc))/0x1*(parseInt(_0x5361c9(0x1d7))/0x2)+-parseInt(_0x5361c9(0x1d5))/0x3*(-parseInt(_0x5361c9(0x1d0))/0x4)+parseInt(_0x5361c9(0x1d4))/0x5*(parseInt(_0x5361c9(0x1d8))/0x6)+-parseInt(_0x5361c9(0x1e1))/0x7+parseInt(_0x5361c9(0x1d6))/0x8+-parseInt(_0x5361c9(0x1ea))/0x9+-parseInt(_0x5361c9(0x1d1))/0xa*(-parseInt(_0x5361c9(0x1e7))/0xb);if(_0x1aa5d0===_0x56896d)break;else _0xf536f2['push'](_0xf536f2['shift']());}catch(_0x2ec178){_0xf536f2['push'](_0xf536f2['shift']());}}}(a230_0x3c3c,0xb903a));function a230_0x3c3c(){const _0x1c0f3d=['ERROR','toString','1804HkBYQF','error','padStart','10663632faMDWI','warn','getFullYear','204SojZba','43060TWyDAT','TRACE','abs','110uAdSAL','26037JIyhjl','10340928uDilCr','6FvETbs','388248EcYbPd','DEBUG','INFO','floor','354854wGRLBE','getDate','getMilliseconds','toUpperCase','trace','6004439DbWFNe','getSeconds','WARN','debug'];a230_0x3c3c=function(){return _0x1c0f3d;};return a230_0x3c3c();}export var LogLevel;(function(_0x5cbac1){const _0x37e2d6=a230_0x4b62;_0x5cbac1[_0x5cbac1[_0x37e2d6(0x1d2)]=-0x2]=_0x37e2d6(0x1d2),_0x5cbac1[_0x5cbac1[_0x37e2d6(0x1d9)]=-0x1]='DEBUG',_0x5cbac1[_0x5cbac1[_0x37e2d6(0x1da)]=0x0]=_0x37e2d6(0x1da),_0x5cbac1[_0x5cbac1[_0x37e2d6(0x1e3)]=0x1]='WARN',_0x5cbac1[_0x5cbac1[_0x37e2d6(0x1e5)]=0x2]=_0x37e2d6(0x1e5);}(LogLevel||(LogLevel={})));export function parseLogLevel(_0x5d99dd){const _0x49d616=a230_0x4b62;switch(_0x5d99dd[_0x49d616(0x1df)]()){case'TRACE':return LogLevel[_0x49d616(0x1d2)];case _0x49d616(0x1d9):return LogLevel[_0x49d616(0x1d9)];case _0x49d616(0x1da):return LogLevel[_0x49d616(0x1da)];case _0x49d616(0x1e3):case'WARNING':return LogLevel[_0x49d616(0x1e3)];case _0x49d616(0x1e5):return LogLevel[_0x49d616(0x1e5)];default:return LogLevel[_0x49d616(0x1da)];}}export function logLevelToString(_0x17e5a8){const _0x3eeaae=a230_0x4b62;switch(_0x17e5a8){case LogLevel[_0x3eeaae(0x1d2)]:return _0x3eeaae(0x1e0);case LogLevel[_0x3eeaae(0x1d9)]:return _0x3eeaae(0x1e4);case LogLevel[_0x3eeaae(0x1da)]:return'info';case LogLevel['WARN']:return _0x3eeaae(0x1eb);case LogLevel['ERROR']:return _0x3eeaae(0x1e8);default:return'info';}}function a230_0x4b62(_0x1a4696,_0x6d37ce){_0x1a4696=_0x1a4696-0x1cf;const _0x3c3c41=a230_0x3c3c();let _0x4b6239=_0x3c3c41[_0x1a4696];return _0x4b6239;}export function formatTimestamp(_0x30f131){const _0xb95d12=a230_0x4b62,_0x2e35cd=_0x30f131[_0xb95d12(0x1cf)](),_0xc1b14d=(_0x30f131['getMonth']()+0x1)[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x2,'0'),_0x2ea801=_0x30f131[_0xb95d12(0x1dd)]()[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x2,'0'),_0x2b5b05=_0x30f131['getHours']()[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x2,'0'),_0x2a656c=_0x30f131['getMinutes']()[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x2,'0'),_0x57f69c=_0x30f131[_0xb95d12(0x1e2)]()[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x2,'0'),_0x198d1e=_0x30f131[_0xb95d12(0x1de)]()[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x3,'0'),_0x17350a=-_0x30f131['getTimezoneOffset'](),_0x55e8d9=Math[_0xb95d12(0x1db)](Math[_0xb95d12(0x1d3)](_0x17350a)/0x3c),_0x325208=Math[_0xb95d12(0x1d3)](_0x17350a)%0x3c,_0x5846ff=_0x17350a>=0x0?'+':'-',_0x1af5f7=''+_0x5846ff+_0x55e8d9['toString']()['padStart'](0x2,'0')+_0x325208[_0xb95d12(0x1e6)]()[_0xb95d12(0x1e9)](0x2,'0');return _0x2e35cd+'-'+_0xc1b14d+'-'+_0x2ea801+'\x20'+_0x2b5b05+':'+_0x2a656c+':'+_0x57f69c+'.'+_0x198d1e+_0x1af5f7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24689a,_0x327f32){const _0x4be497=a231_0x4e09,_0x3f557f=_0x24689a();while(!![]){try{const _0xf02428=-parseInt(_0x4be497(0x8d))/0x1*(-parseInt(_0x4be497(0x91))/0x2)+parseInt(_0x4be497(0x97))/0x3*(parseInt(_0x4be497(0x92))/0x4)+-parseInt(_0x4be497(0x95))/0x5*(parseInt(_0x4be497(0x94))/0x6)+parseInt(_0x4be497(0x8f))/0x7*(parseInt(_0x4be497(0x9c))/0x8)+-parseInt(_0x4be497(0x98))/0x9+parseInt(_0x4be497(0x9a))/0xa+-parseInt(_0x4be497(0x8c))/0xb*(-parseInt(_0x4be497(0x9b))/0xc);if(_0xf02428===_0x327f32)break;else _0x3f557f['push'](_0x3f557f['shift']());}catch(_0x46c75a){_0x3f557f['push'](_0x3f557f['shift']());}}}(a231_0x3d20,0x9b8aa));export function validateLimitOption(_0x83dfd3){const _0x4f6189=a231_0x4e09;if(!Number[_0x4f6189(0x90)](_0x83dfd3))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x83dfd3+'.\x20Must\x20be\x20an\x20integer.'};if(_0x83dfd3<=0x0)return{'isValid':![],'error':_0x4f6189(0x96)+_0x83dfd3+_0x4f6189(0x99)};return{'isValid':!![],'value':_0x83dfd3};}function a231_0x3d20(){const _0x2fa427=['33gAdjMB','4ccpOXw','.\x20Must\x20be\x20a\x20positive\x20number.','261394DsYPZk','isInteger','213866hPnHfW','435756fRfCnh','number','2349246HJoRwx','15VPbnTb','Invalid\x20limit\x20value:\x20','15RboMBW','10511622VwjEGB','.\x20Must\x20be\x20a\x20positive\x20integer.','2234020WlWSVC','5940456tpedGS','64HmkxGf','.\x20Must\x20be\x20a\x20number.'];a231_0x3d20=function(){return _0x2fa427;};return a231_0x3d20();}function a231_0x4e09(_0x125787,_0x1cae0a){_0x125787=_0x125787-0x8b;const _0x3d20b2=a231_0x3d20();let _0x4e09a9=_0x3d20b2[_0x125787];return _0x4e09a9;}export function validateTimeoutOption(_0x5c194e,_0x28cd93=0x1e){const _0x1654a0=a231_0x4e09;if(_0x5c194e===undefined)return{'isValid':!![],'value':_0x28cd93};const _0x473d89=typeof _0x5c194e===_0x1654a0(0x93)?_0x5c194e:parseFloat(_0x5c194e);if(isNaN(_0x473d89))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x5c194e+_0x1654a0(0x8b)};if(_0x473d89<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x473d89+_0x1654a0(0x8e)};return{'isValid':!![],'value':_0x473d89};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a232_0x54511a=a232_0x1338;(function(_0x3cf279,_0x251b37){const _0x40353f=a232_0x1338,_0x4e450c=_0x3cf279();while(!![]){try{const _0x8d5125=parseInt(_0x40353f(0x1d2))/0x1+parseInt(_0x40353f(0x1c3))/0x2+parseInt(_0x40353f(0x1cb))/0x3*(-parseInt(_0x40353f(0x1a9))/0x4)+-parseInt(_0x40353f(0x1a8))/0x5+parseInt(_0x40353f(0x1a7))/0x6+parseInt(_0x40353f(0x1ad))/0x7+-parseInt(_0x40353f(0x1ac))/0x8;if(_0x8d5125===_0x251b37)break;else _0x4e450c['push'](_0x4e450c['shift']());}catch(_0x35837d){_0x4e450c['push'](_0x4e450c['shift']());}}}(a232_0x54fc,0x2409f));import{execFile,execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a232_0x54511a(0x1a6),'zsh','sh',a232_0x54511a(0x1d6),a232_0x54511a(0x1c1),a232_0x54511a(0x1d0),a232_0x54511a(0x1ca),a232_0x54511a(0x1d7),a232_0x54511a(0x1d9),a232_0x54511a(0x1b7),'nu','ion',a232_0x54511a(0x1c5),a232_0x54511a(0x1b2)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a232_0x54511a(0x1bd),a232_0x54511a(0x1d4),a232_0x54511a(0x1b9),a232_0x54511a(0x1ba),a232_0x54511a(0x1bf)]);function getProcessInfoWindows(_0x568b76){const _0x5312bf=a232_0x54511a;try{if(!Number[_0x5312bf(0x1c2)](_0x568b76)||_0x568b76<=0x0)return null;const _0x282914=_0x5312bf(0x1cf)+_0x568b76+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x4ce7a4=execSync(_0x5312bf(0x1ce)+_0x282914+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x5312bf(0x1b5),'pipe','pipe']})[_0x5312bf(0x1ab)]();if(!_0x4ce7a4)return null;const [_0x1f703c,..._0x1cfe63]=_0x4ce7a4[_0x5312bf(0x1c8)](','),_0x180078=parseInt(_0x1f703c,0xa),_0x3f9684=_0x1cfe63[_0x5312bf(0x1b3)](',')[_0x5312bf(0x1ab)]();if(isNaN(_0x180078)||!_0x3f9684)return null;return{'pid':_0x568b76,'ppid':_0x180078,'comm':_0x3f9684[_0x5312bf(0x1c7)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x30abdf){const _0x54233e=a232_0x54511a;try{const _0x2a4a63=0x400000;if(!Number['isInteger'](_0x30abdf)||_0x30abdf<=0x0||_0x30abdf>_0x2a4a63)return null;const _0x3cea62=execSync(_0x54233e(0x1d1)+_0x30abdf+_0x54233e(0x1af),{'encoding':_0x54233e(0x1b4),'stdio':_0x54233e(0x1b5)})[_0x54233e(0x1ab)](),[_0x51afb1,..._0x2ff988]=_0x3cea62[_0x54233e(0x1c8)](/\s+/),_0x22aeb6=parseInt(_0x51afb1,0xa),_0x520572=_0x2ff988[_0x54233e(0x1b3)]('\x20');if(isNaN(_0x22aeb6))return null;return{'pid':_0x30abdf,'ppid':_0x22aeb6,'comm':_0x520572};}catch{return null;}}function getProcessInfo(_0x2953b3){const _0x424a48=a232_0x54511a;if(process[_0x424a48(0x1da)]==='win32')return getProcessInfoWindows(_0x2953b3);return getProcessInfoPosix(_0x2953b3);}function getBasename(_0x3aa28a){const _0x137a8d=a232_0x54511a;return _0x3aa28a[_0x137a8d(0x1c7)](/^-/,'')[_0x137a8d(0x1c8)]('/')[_0x137a8d(0x1c9)]()?.['toLowerCase']()||'';}function isShell(_0x2e0cd9){return SHELL_NAMES['has'](getBasename(_0x2e0cd9));}function a232_0x54fc(){const _0x5acd26=['which','fish','dash','ignore','pwsh','platform','ppid','bash','1629900hnnojK','985210vTEMcg','68EXFPpE','href','trim','3083200fKagYx','1771742ylVnvG','pid','\x20-o\x20ppid=,comm=','darwin','win32','xonsh','join','utf-8','pipe','https:','powershell','has','cursor','electron','exit','test','claude','map','treasure\x20studio','cmd.exe','ksh','isInteger','532806NfslxA','unref','elvish','protocol','replace','split','pop','csh','14451jwfBjj','Invalid\x20URL:\x20','comm','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','tcsh','ps\x20-p\x20','20787HxUjLH','Unsupported\x20protocol:\x20','code'];a232_0x54fc=function(){return _0x5acd26;};return a232_0x54fc();}function isEphemeralShellSpawner(_0x174c99){const _0x27508d=a232_0x54511a;return EPHEMERAL_SHELL_SPAWNERS[_0x27508d(0x1b8)](getBasename(_0x174c99));}let cachedShellPID;function findShellPID(){const _0x1e7b6d=a232_0x54511a;if(process[_0x1e7b6d(0x1a5)]===undefined)return process[_0x1e7b6d(0x1ae)];let _0x36e07a=process['ppid'];const _0x28b961=0xa;let _0x19190a=0x0;while(_0x19190a<_0x28b961){const _0x320233=getProcessInfo(_0x36e07a);if(!_0x320233)break;if(isShell(_0x320233[_0x1e7b6d(0x1cd)])){const _0xad8ffe=getProcessInfo(_0x320233['ppid']);if(_0xad8ffe&&isEphemeralShellSpawner(_0xad8ffe[_0x1e7b6d(0x1cd)])){_0x36e07a=_0x320233[_0x1e7b6d(0x1a5)],_0x19190a++;continue;}return _0x320233[_0x1e7b6d(0x1ae)];}if(_0x320233[_0x1e7b6d(0x1a5)]===0x0||_0x320233[_0x1e7b6d(0x1a5)]===0x1){if(isShell(_0x320233['comm']))return _0x320233['pid'];break;}_0x36e07a=_0x320233[_0x1e7b6d(0x1a5)],_0x19190a++;}return process[_0x1e7b6d(0x1a5)]!==undefined?process[_0x1e7b6d(0x1a5)]:process[_0x1e7b6d(0x1ae)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x1c9e14){if(!Number['isInteger'](_0x1c9e14)||_0x1c9e14<=0x0)return![];try{return process['kill'](_0x1c9e14,0x0),!![];}catch{return![];}}export function openBrowser(_0xc14765){const _0xa90ea9=a232_0x54511a;let _0x382a92;try{_0x382a92=new URL(_0xc14765);}catch{throw new Error(_0xa90ea9(0x1cc)+_0xc14765);}if(_0x382a92[_0xa90ea9(0x1c6)]!=='http:'&&_0x382a92['protocol']!==_0xa90ea9(0x1b6))throw new Error(_0xa90ea9(0x1d3)+_0x382a92['protocol']);const _0x19c12b=_0x382a92[_0xa90ea9(0x1aa)],_0x3a65dd=process[_0xa90ea9(0x1da)];if(_0x3a65dd===_0xa90ea9(0x1b1))spawn(_0xa90ea9(0x1c0),['/c','start','',_0x19c12b],{'detached':!![],'stdio':_0xa90ea9(0x1d8)})['unref']();else{const _0x395d89=_0x3a65dd===_0xa90ea9(0x1b0)?'open':'xdg-open';spawn(_0x395d89,[_0x19c12b],{'detached':!![],'stdio':_0xa90ea9(0x1d8)})[_0xa90ea9(0x1c4)]();}}export function isWindows(){const _0x3206f3=a232_0x54511a;return process[_0x3206f3(0x1da)]==='win32';}export function getCrossSpawnOptions(_0x6f981b){return{..._0x6f981b??{},'shell':isWindows()};}export function escapeWindowsArg(_0x8701f7){const _0x1eac11=a232_0x54511a;if(!/[ \t"&|<>^%!`\r\n]/[_0x1eac11(0x1bc)](_0x8701f7))return _0x8701f7;const _0x327915=_0x8701f7['replace'](/"/g,'\x22\x22');return'\x22'+_0x327915+'\x22';}function a232_0x1338(_0x3ea60a,_0x5383f3){_0x3ea60a=_0x3ea60a-0x1a5;const _0x54fc26=a232_0x54fc();let _0x133881=_0x54fc26[_0x3ea60a];return _0x133881;}export function crossSpawn(_0x6708fe,_0x1067c6,_0x580426){const _0x2fb090=a232_0x54511a;if(isWindows()){const _0x1e2e0e=escapeWindowsArg(_0x6708fe),_0x6c1f8d=_0x1067c6[_0x2fb090(0x1be)](escapeWindowsArg),_0x51b905=[_0x1e2e0e,..._0x6c1f8d][_0x2fb090(0x1b3)]('\x20');return spawn(_0x51b905,[],{..._0x580426,'shell':!![]});}return spawn(_0x6708fe,_0x1067c6,{..._0x580426,'shell':![]});}export function gracefulExit(_0x3d2583=0x0){const _0x43c5f1=a232_0x54511a;isWindows()?setTimeout(()=>process[_0x43c5f1(0x1bb)](_0x3d2583),0x32):process[_0x43c5f1(0x1bb)](_0x3d2583);}export function findExecutable(_0x4bff8e,_0x13cfcb=0x1388){return new Promise(_0x1eb009=>{const _0x18c931=a232_0x1338,_0x233023=isWindows()?'where.exe':_0x18c931(0x1d5);execFile(_0x233023,[_0x4bff8e],{'timeout':_0x13cfcb,'windowsHide':!![]},(_0x57dfbf,_0x3b6ace)=>{const _0x403887=_0x18c931;if(_0x57dfbf||!_0x3b6ace[_0x403887(0x1ab)]())_0x1eb009(null);else{const _0x2d1e6a=_0x3b6ace[_0x403887(0x1ab)]()[_0x403887(0x1c8)](/\r?\n/)[0x0];_0x1eb009(_0x2d1e6a);}});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a233_0x4b7e(){const _0x49bffa=['44128ykIJuW','2366265JfTMXm','write','\x20(y/N):\x20','toLowerCase','pause','data','1940GlYuHn','createInterface','setEncoding','1009572mUbaNR','question','utf8','stderr','removeListener','setRawMode','yes','2pDkzSj','\x20[y/N]\x20','isTTY','245zMOHoQ','stdin','372782wImIax','43062GgNqWp','428zoDxvl','10zstEbg','close','3597489JAWSWF'];a233_0x4b7e=function(){return _0x49bffa;};return a233_0x4b7e();}(function(_0x2d842c,_0x43114c){const _0x3574bd=a233_0x359e,_0x1aed1f=_0x2d842c();while(!![]){try{const _0x367090=-parseInt(_0x3574bd(0x15e))/0x1*(-parseInt(_0x3574bd(0x163))/0x2)+parseInt(_0x3574bd(0x157))/0x3+-parseInt(_0x3574bd(0x165))/0x4*(parseInt(_0x3574bd(0x154))/0x5)+parseInt(_0x3574bd(0x164))/0x6*(-parseInt(_0x3574bd(0x161))/0x7)+parseInt(_0x3574bd(0x169))/0x8+-parseInt(_0x3574bd(0x168))/0x9*(parseInt(_0x3574bd(0x166))/0xa)+parseInt(_0x3574bd(0x16a))/0xb;if(_0x367090===_0x43114c)break;else _0x1aed1f['push'](_0x1aed1f['shift']());}catch(_0x30cf9e){_0x1aed1f['push'](_0x1aed1f['shift']());}}}(a233_0x4b7e,0x39fc1));function a233_0x359e(_0x4bb0ee,_0x331e15){_0x4bb0ee=_0x4bb0ee-0x153;const _0x4b7ea2=a233_0x4b7e();let _0x359ef2=_0x4b7ea2[_0x4bb0ee];return _0x359ef2;}import*as a233_0x5a636c from'readline';import{gracefulExit}from'./process.js';export function isInteractive(){const _0x369d96=a233_0x359e;return process[_0x369d96(0x162)][_0x369d96(0x160)]===!![];}export async function confirm(_0x1b43d3){const _0xc2523=a233_0x359e,_0x2b2f8c=a233_0x5a636c[_0xc2523(0x155)]({'input':process['stdin'],'output':process['stdout']});return new Promise(_0x2283ea=>{const _0x1eb5a9=_0xc2523;_0x2b2f8c[_0x1eb5a9(0x158)](_0x1b43d3+_0x1eb5a9(0x16c),_0x37e616=>{const _0x2a219f=_0x1eb5a9;_0x2b2f8c[_0x2a219f(0x167)](),_0x2283ea(_0x37e616[_0x2a219f(0x16d)]()==='y'||_0x37e616[_0x2a219f(0x16d)]()===_0x2a219f(0x15d));});});}export async function confirmKey(_0x545215){const _0x34e0db=a233_0x359e;if(!process['stdin'][_0x34e0db(0x160)])return![];return process[_0x34e0db(0x15a)][_0x34e0db(0x16b)](_0x545215+_0x34e0db(0x15f)),new Promise(_0x598601=>{const _0x544f50=_0x34e0db,_0x46ae9e=process[_0x544f50(0x162)];_0x46ae9e[_0x544f50(0x15c)](!![]),_0x46ae9e['resume'](),_0x46ae9e[_0x544f50(0x156)](_0x544f50(0x159));const _0x320c58=_0x5601d7=>{const _0x1f4640=_0x544f50;_0x46ae9e['setRawMode'](![]),_0x46ae9e[_0x1f4640(0x16e)](),_0x46ae9e[_0x1f4640(0x15b)]('data',_0x320c58);if(_0x5601d7==='\x1b'){process[_0x1f4640(0x15a)]['write']('\x0a'),_0x598601(![]);return;}_0x5601d7==='\x03'&&(process[_0x1f4640(0x15a)]['write']('\x0a'),gracefulExit(0x82));if(_0x5601d7[_0x1f4640(0x16d)]()==='y'){process['stderr']['write']('y\x0a'),_0x598601(!![]);return;}process[_0x1f4640(0x15a)][_0x1f4640(0x16b)]('\x0a'),_0x598601(![]);};_0x46ae9e['on'](_0x544f50(0x153),_0x320c58);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x168757,_0x6e1bf7){const _0x4ab5dd=a234_0x5383,_0x22ca70=_0x168757();while(!![]){try{const _0x5a7222=parseInt(_0x4ab5dd(0x12b))/0x1*(parseInt(_0x4ab5dd(0x140))/0x2)+-parseInt(_0x4ab5dd(0x137))/0x3+parseInt(_0x4ab5dd(0x13d))/0x4+-parseInt(_0x4ab5dd(0x136))/0x5*(-parseInt(_0x4ab5dd(0x13f))/0x6)+-parseInt(_0x4ab5dd(0x141))/0x7*(-parseInt(_0x4ab5dd(0x12e))/0x8)+-parseInt(_0x4ab5dd(0x132))/0x9+parseInt(_0x4ab5dd(0x131))/0xa*(-parseInt(_0x4ab5dd(0x13e))/0xb);if(_0x5a7222===_0x6e1bf7)break;else _0x22ca70['push'](_0x22ca70['shift']());}catch(_0x557d67){_0x22ca70['push'](_0x22ca70['shift']());}}}(a234_0x248f,0xe8004));function a234_0x5383(_0x41ca38,_0x5a8427){_0x41ca38=_0x41ca38-0x125;const _0x248f54=a234_0x248f();let _0x538360=_0x248f54[_0x41ca38];return _0x538360;}function a234_0x248f(){const _0x25bc4a=['7890516wvmAOA','stop','now','clock','5rYYWRz','5519589IsHcOZ','text','phase','\x20[Job\x20ID:\x20','trim','jobId','4316960uJbEWZ','286rHVicz','6749478rSnCwz','34pxELGa','2125067FKqowM','stderr','intervalFactory','toFixed','isSpinning','start','...','floor','103415UPuQsz','extra','isTTY','24kDWgxg','replace','Processing','463880NgfOVA'];a234_0x248f=function(){return _0x25bc4a;};return a234_0x248f();}import a234_0x4ee488 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x555eb9,_0x532de0={}){const _0x542519=a234_0x5383,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x532de0;return a234_0x4ee488({'text':_0x555eb9,'color':'cyan','stream':process[_0x542519(0x142)],'isEnabled':forceEnabled||process[_0x542519(0x142)][_0x542519(0x12d)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x56c72d,_0x540f97,_0x4405a4={}){const _0x312efd=a234_0x5383,_0x2ac15a=_0x4405a4[_0x312efd(0x135)]??(()=>Date[_0x312efd(0x134)]()),_0xd2c016=createCommandSpinner(_0x56c72d,_0x4405a4);_0xd2c016['start']();const _0x4b56e8=_0x2ac15a();try{const _0x210196=await _0x540f97(),_0x18ce3a=_0x2ac15a()-_0x4b56e8;return _0xd2c016[_0x312efd(0x133)](),{'data':_0x210196,'elapsedMs':_0x18ce3a};}catch(_0x259cbd){_0xd2c016[_0x312efd(0x133)]();throw _0x259cbd;}}export async function withProgressSpinner(_0x488dc1,_0x7f0320,_0x18a367={}){const _0x3ceb63=a234_0x5383,_0x41c830=_0x18a367[_0x3ceb63(0x135)]??(()=>Date[_0x3ceb63(0x134)]()),_0x2985a9=_0x18a367[_0x3ceb63(0x125)]??setInterval,_0x2f24c8=createCommandSpinner(_0x488dc1,_0x18a367);_0x2f24c8[_0x3ceb63(0x128)]();const _0x3cae51=_0x41c830(),_0x3c1533=_0x488dc1[_0x3ceb63(0x12f)](_0x3ceb63(0x129),'')['trim']()||_0x3ceb63(0x130),_0x4abee6={};let _0x16f416=_0x488dc1;const _0x2b370a=()=>{const _0xff4df=_0x3ceb63;if(!_0x2f24c8[_0xff4df(0x127)])return;const _0x18af71=_0x41c830()-_0x3cae51,_0x4b604d=formatElapsed(_0x18af71),_0x28a014=_0x4abee6[_0xff4df(0x139)]?.[_0xff4df(0x13b)]()||_0x3c1533,_0x25f83c=_0x4abee6[_0xff4df(0x13c)]?_0xff4df(0x13a)+_0x4abee6[_0xff4df(0x13c)]+']':'',_0x69850e=_0x4abee6['extra']?'\x20'+_0x4abee6[_0xff4df(0x12c)]:'',_0x383940=_0x28a014+'\x20'+_0x4b604d+_0x69850e+_0x25f83c;_0x383940!==_0x16f416&&_0x383940[_0xff4df(0x13b)]()&&(_0x2f24c8[_0xff4df(0x138)]=_0x383940,_0x16f416=_0x383940);},_0x144d15=_0x2985a9(()=>{_0x2b370a();},0x3e8),_0x3f6766={'setPhase':_0x15df66=>{const _0x3db307=_0x3ceb63;_0x4abee6[_0x3db307(0x139)]=_0x15df66;const _0x59b021=_0x15df66?.['trim']()||_0x3c1533,_0x243048=_0x41c830()-_0x3cae51,_0x376b82=formatElapsed(_0x243048),_0x335b8b=_0x4abee6[_0x3db307(0x13c)]?_0x3db307(0x13a)+_0x4abee6[_0x3db307(0x13c)]+']':'',_0x276f50=_0x4abee6['extra']?'\x20'+_0x4abee6[_0x3db307(0x12c)]:'',_0xa075f9=_0x59b021+'\x20'+_0x376b82+_0x276f50+_0x335b8b;_0x2f24c8['isSpinning']&&_0xa075f9[_0x3db307(0x13b)]()&&(_0x2f24c8[_0x3db307(0x138)]=_0xa075f9,_0x16f416=_0xa075f9);},'setJobId':_0x239276=>{const _0x5ac3a4=_0x3ceb63;_0x4abee6[_0x5ac3a4(0x13c)]=_0x239276,_0x2b370a();},'setExtra':_0x2279d6=>{const _0x6f9244=_0x3ceb63;_0x4abee6[_0x6f9244(0x12c)]=_0x2279d6,_0x2b370a();}};_0x2b370a();try{const _0x114248=await _0x7f0320(_0x3f6766),_0x54f7db=_0x41c830()-_0x3cae51;return{'data':_0x114248,'elapsedMs':_0x54f7db};}finally{clearInterval(_0x144d15),_0x2f24c8[_0x3ceb63(0x133)]();}}export function formatElapsed(_0x276f83){const _0x24a207=a234_0x5383,_0x375036=Math['floor'](_0x276f83/0x3e8);if(_0x375036<0x3c)return(_0x276f83/0x3e8)[_0x24a207(0x126)](0x1)+'s';const _0x185afb=Math[_0x24a207(0x12a)](_0x375036/0x3c),_0x558698=_0x375036%0x3c;if(_0x185afb<0x3c)return _0x185afb+'m\x20'+_0x558698+'s';const _0x2a746c=Math[_0x24a207(0x12a)](_0x185afb/0x3c),_0x439072=_0x185afb%0x3c;return _0x2a746c+'h\x20'+_0x439072+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x34607e,_0x5c6191){const _0x2096c6=a235_0x25af,_0x344a46=_0x34607e();while(!![]){try{const _0x44e7e8=-parseInt(_0x2096c6(0x1ee))/0x1*(-parseInt(_0x2096c6(0x1f6))/0x2)+-parseInt(_0x2096c6(0x1f3))/0x3*(parseInt(_0x2096c6(0x1f9))/0x4)+-parseInt(_0x2096c6(0x1fa))/0x5*(parseInt(_0x2096c6(0x1fe))/0x6)+parseInt(_0x2096c6(0x202))/0x7*(-parseInt(_0x2096c6(0x1f0))/0x8)+parseInt(_0x2096c6(0x1f2))/0x9+parseInt(_0x2096c6(0x1f1))/0xa*(-parseInt(_0x2096c6(0x1fd))/0xb)+parseInt(_0x2096c6(0x1f7))/0xc;if(_0x44e7e8===_0x5c6191)break;else _0x344a46['push'](_0x344a46['shift']());}catch(_0x593e5b){_0x344a46['push'](_0x344a46['shift']());}}}(a235_0xec1e,0xcc65a));function a235_0xec1e(){const _0x28443c=['621123Lvuzyk','parse','event','124282HhLZeu','14551080bmApyc','trim','28JXSemh','15MubZAM','[LLM\x20API\x20SSE]\x20','slice','352qBiMyy','746904XGiRBF','Response\x20body\x20is\x20null','debug','indexOf','14TRHoqF','startsWith','body','releaseLock','data','pop','getReader','13YHTNqG','split','2048856AsjFbt','42160sJbJjx','11579868zMMfSf'];a235_0xec1e=function(){return _0x28443c;};return a235_0xec1e();}function a235_0x25af(_0x1a8565,_0x395af1){_0x1a8565=_0x1a8565-0x1e9;const _0xec1e54=a235_0xec1e();let _0x25af51=_0xec1e54[_0x1a8565];return _0x25af51;}export async function*parseSSEStream(_0x4b0b2b,_0x397301){const _0x1bde48=a235_0x25af;if(!_0x4b0b2b[_0x1bde48(0x1e9)])throw new Error(_0x1bde48(0x1ff));const _0x3aded8=_0x4b0b2b['body'][_0x1bde48(0x1ed)](),_0x5475e6=new TextDecoder();let _0x2615da='',_0x44172e={};try{while(!![]){const {done:_0x1a164b,value:_0x10e7f2}=await _0x3aded8['read']();if(_0x1a164b){if(_0x44172e[_0x1bde48(0x1eb)]){_0x397301?.['debug'](_0x1bde48(0x1fb)+_0x44172e['data']);const _0x11fa8d=parseSSEData(_0x44172e[_0x1bde48(0x1eb)]);yield _0x11fa8d;}break;}_0x2615da+=_0x5475e6['decode'](_0x10e7f2,{'stream':!![]});const _0xcea552=_0x2615da[_0x1bde48(0x1ef)]('\x0a');_0x2615da=_0xcea552[_0x1bde48(0x1ec)]()||'';for(const _0x23f391 of _0xcea552){if(_0x23f391[_0x1bde48(0x1f8)]()===''){if(_0x44172e[_0x1bde48(0x1eb)]){_0x397301?.[_0x1bde48(0x200)]('[LLM\x20API\x20SSE]\x20'+_0x44172e[_0x1bde48(0x1eb)]);const _0x51157f=parseSSEData(_0x44172e[_0x1bde48(0x1eb)]);yield _0x51157f,_0x44172e={};}continue;}if(_0x23f391[_0x1bde48(0x203)](':'))continue;const _0x271a29=_0x23f391[_0x1bde48(0x201)](':');if(_0x271a29===-0x1)continue;const _0x5d56a1=_0x23f391['slice'](0x0,_0x271a29);let _0x18f451=_0x23f391['slice'](_0x271a29+0x1);_0x18f451[_0x1bde48(0x203)]('\x20')&&(_0x18f451=_0x18f451[_0x1bde48(0x1fc)](0x1));switch(_0x5d56a1){case _0x1bde48(0x1f5):_0x44172e[_0x1bde48(0x1f5)]=_0x18f451;break;case'data':_0x44172e[_0x1bde48(0x1eb)]=_0x44172e[_0x1bde48(0x1eb)]?_0x44172e[_0x1bde48(0x1eb)]+'\x0a'+_0x18f451:_0x18f451;break;case'id':_0x44172e['id']=_0x18f451;break;}}}}finally{_0x3aded8[_0x1bde48(0x1ea)]();}}function parseSSEData(_0x8f7b2b){const _0x2facff=a235_0x25af;try{return JSON[_0x2facff(0x1f4)](_0x8f7b2b);}catch(_0x4e1564){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x8f7b2b,{'cause':_0x4e1564});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a236_0xf550(_0x2de0eb,_0x242051){_0x2de0eb=_0x2de0eb-0x161;const _0x144746=a236_0x1447();let _0xf55057=_0x144746[_0x2de0eb];return _0xf55057;}(function(_0x4507cc,_0xe19aef){const _0x44391c=a236_0xf550,_0xa9d2ac=_0x4507cc();while(!![]){try{const _0x1eb3cc=-parseInt(_0x44391c(0x179))/0x1*(-parseInt(_0x44391c(0x168))/0x2)+-parseInt(_0x44391c(0x171))/0x3*(parseInt(_0x44391c(0x165))/0x4)+-parseInt(_0x44391c(0x162))/0x5+parseInt(_0x44391c(0x177))/0x6+-parseInt(_0x44391c(0x16c))/0x7+parseInt(_0x44391c(0x167))/0x8*(-parseInt(_0x44391c(0x172))/0x9)+parseInt(_0x44391c(0x16e))/0xa*(parseInt(_0x44391c(0x170))/0xb);if(_0x1eb3cc===_0xe19aef)break;else _0xa9d2ac['push'](_0xa9d2ac['shift']());}catch(_0x438642){_0xa9d2ac['push'](_0xa9d2ac['shift']());}}}(a236_0x1447,0x3fb8b));import a236_0x4f920a from'string-width';export function stringWidth(_0x282576){return a236_0x4f920a(_0x282576);}export function padEnd(_0x310745,_0x2e8d2f){const _0x45d5d8=a236_0xf550,_0x2fb834=stringWidth(_0x310745);if(_0x2fb834>=_0x2e8d2f)return _0x310745;return _0x310745+'\x20'[_0x45d5d8(0x173)](_0x2e8d2f-_0x2fb834);}function a236_0x1447(){const _0x38bd95=['slice','121lLYkTK','3xPLrqm','64278PdrDrA','repeat','trim','\x5c$&','length','3059256oKLUEl','test','4DujevS','toLowerCase','2001565sivqyd','toString','random','1191292XIINlD','substring','376wiWkCA','12794zMOvZG','replace','padStart','floor','340438iXEKYw','Cannot\x20escape\x20empty\x20string\x20literal','734530OzBlGW'];a236_0x1447=function(){return _0x38bd95;};return a236_0x1447();}export function padStart(_0x5b732a,_0xd8845){const _0x34c335=a236_0xf550,_0xdb097a=stringWidth(_0x5b732a);if(_0xdb097a>=_0xd8845)return _0x5b732a;return'\x20'[_0x34c335(0x173)](_0xd8845-_0xdb097a)+_0x5b732a;}export function centerAlign(_0xa89a40,_0x4e0e5e){const _0x4e9952=a236_0xf550,_0x3d38bb=stringWidth(_0xa89a40);if(_0x3d38bb>_0x4e0e5e){if(_0x4e0e5e<=0x1)return'…'[_0x4e9952(0x166)](0x0,_0x4e0e5e);let _0x18e4fc=_0xa89a40;while(stringWidth(_0x18e4fc+'…')>_0x4e0e5e){_0x18e4fc=_0x18e4fc[_0x4e9952(0x16f)](0x0,-0x1);}return _0x18e4fc+'…';}if(_0x3d38bb===_0x4e0e5e)return _0xa89a40;const _0x320724=_0x4e0e5e-_0x3d38bb,_0x4dbdf0=Math[_0x4e9952(0x16b)](_0x320724/0x2),_0x2d14b6=_0x320724-_0x4dbdf0;return'\x20'[_0x4e9952(0x173)](_0x4dbdf0)+_0xa89a40+'\x20'[_0x4e9952(0x173)](_0x2d14b6);}export function escapeStringLiteral(_0x2cd5f4){const _0x2dbf52=a236_0xf550;if(!_0x2cd5f4||_0x2cd5f4[_0x2dbf52(0x174)]()[_0x2dbf52(0x176)]===0x0)throw new Error(_0x2dbf52(0x16d));const _0x17b98c=_0x2cd5f4[_0x2dbf52(0x169)](/'/g,'\x27\x27');return'\x27'+_0x17b98c+'\x27';}export function globToLike(_0x78404){const _0xa77d54=a236_0xf550;let _0x18c8a7=_0x78404[_0xa77d54(0x169)](/\\/g,'\x5c\x5c')[_0xa77d54(0x169)](/%/g,'\x5c%')[_0xa77d54(0x169)](/_/g,'\x5c_');return _0x18c8a7=_0x18c8a7['replace'](/\*/g,'%')['replace'](/\?/g,'_'),_0x18c8a7;}export function buildLikePattern(_0x211314){const _0x5ed429=a236_0xf550;if(!_0x211314||_0x211314[_0x5ed429(0x174)]()[_0x5ed429(0x176)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x89647b=globToLike(_0x211314),_0x381147=_0x89647b['replace'](/'/g,'\x27\x27');return'\x27'+_0x381147+'\x27';}export function matchGlobPattern(_0x56a056,_0x3ee226){const _0x2a0340=a236_0xf550,_0x4bc647=_0x3ee226[_0x2a0340(0x169)](/[.+^${}()|[\]\\]/g,_0x2a0340(0x175))[_0x2a0340(0x169)](/\*/g,'.*')[_0x2a0340(0x169)](/\?/g,'.'),_0x2d3455=new RegExp('^'+_0x4bc647+'$');return _0x2d3455[_0x2a0340(0x178)](_0x56a056);}export function getSanitizedUsername(){const _0x2062ee=a236_0xf550,_0x47ef1c=process.env.USER||process.env.USERNAME||'unknown';return _0x47ef1c['replace'](/[^a-zA-Z0-9]/g,'')[_0x2062ee(0x161)]();}export function generateRandomHex(){const _0x1dd112=a236_0xf550,_0x4a3041=Math[_0x1dd112(0x16b)](Math[_0x1dd112(0x164)]()*0xfffff);return _0x4a3041[_0x1dd112(0x163)](0x10)[_0x1dd112(0x16a)](0x5,'0');}export function sanitizeFileName(_0x47e333){const _0x43884e=a236_0xf550;return _0x47e333[_0x43884e(0x161)]()[_0x43884e(0x169)](/[/\\:*?"<>|]/g,'-')[_0x43884e(0x169)](/\s+/g,'-')[_0x43884e(0x169)](/-+/g,'-')[_0x43884e(0x169)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x43d195,_0x3f7d27){const _0x8c80d0=a237_0x2e3a,_0x3432c8=_0x43d195();while(!![]){try{const _0x2a1d86=-parseInt(_0x8c80d0(0x17f))/0x1*(parseInt(_0x8c80d0(0x179))/0x2)+parseInt(_0x8c80d0(0x177))/0x3*(parseInt(_0x8c80d0(0x188))/0x4)+-parseInt(_0x8c80d0(0x18b))/0x5+-parseInt(_0x8c80d0(0x17e))/0x6*(-parseInt(_0x8c80d0(0x189))/0x7)+parseInt(_0x8c80d0(0x186))/0x8+-parseInt(_0x8c80d0(0x187))/0x9+parseInt(_0x8c80d0(0x183))/0xa;if(_0x2a1d86===_0x3f7d27)break;else _0x3432c8['push'](_0x3432c8['shift']());}catch(_0x5b87de){_0x3432c8['push'](_0x3432c8['shift']());}}}(a237_0xd537,0x6f9a1));function hasWildcard(_0x139eb1){const _0x8fd06f=a237_0x2e3a;return _0x139eb1[_0x8fd06f(0x184)]('*')||_0x139eb1[_0x8fd06f(0x184)]('?');}function a237_0xd537(){const _0x47a118=['length','3546ZkSZsq','212315kNqdry','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','push','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','7713470cAIGzF','includes','Pattern\x20cannot\x20be\x20just\x20a\x20dot','32896BJVDgp','5037525zVLUwo','4UZvaTF','4102iFvKgB','join','3241265DZuOWD','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','trim','catalog','2266887UHxKWS','table','2ssGcKG','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','database'];a237_0xd537=function(){return _0x47a118;};return a237_0xd537();}function a237_0x2e3a(_0x3adb04,_0x530947){_0x3adb04=_0x3adb04-0x177;const _0xd53724=a237_0xd537();let _0x2e3ade=_0xd53724[_0x3adb04];return _0x2e3ade;}export function parseTableReference(_0x5c4f32){const _0x30f0fe=a237_0x2e3a;if(!_0x5c4f32||_0x5c4f32[_0x30f0fe(0x18e)]()[_0x30f0fe(0x17d)]===0x0)throw new Error(_0x30f0fe(0x180));const _0x43f8b9=_0x5c4f32[_0x30f0fe(0x18e)](),_0x975bf7={'original':_0x43f8b9},_0x1817fd=_0x43f8b9['split']('.');if(_0x1817fd[_0x30f0fe(0x17d)]===0x1){const _0x244416=_0x1817fd[0x0];if(!_0x244416)throw new Error(_0x30f0fe(0x185));_0x975bf7['table']=_0x244416;}else{if(_0x1817fd[_0x30f0fe(0x17d)]===0x2){const [_0x5480f4,_0x5e0afd]=_0x1817fd;if(!_0x5480f4)throw new Error(_0x30f0fe(0x17b));if(!_0x5e0afd)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x975bf7['database']=_0x5480f4,_0x975bf7[_0x30f0fe(0x178)]=_0x5e0afd;}else{if(_0x1817fd['length']===0x3){const [_0x5d69bd,_0x2f23ea,_0x54f725]=_0x1817fd;if(!_0x5d69bd||!_0x2f23ea||!_0x54f725)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x975bf7[_0x30f0fe(0x18f)]=_0x5d69bd,_0x975bf7[_0x30f0fe(0x17c)]=_0x2f23ea,_0x975bf7['table']=_0x54f725;}else throw new Error(_0x30f0fe(0x182));}}return _0x975bf7;}export function formatTableReference(_0xd0686){const _0x303d2a=a237_0x2e3a,_0x362d7c=[];return _0xd0686[_0x303d2a(0x18f)]&&_0x362d7c[_0x303d2a(0x181)](_0xd0686[_0x303d2a(0x18f)]),_0xd0686[_0x303d2a(0x17c)]&&_0x362d7c[_0x303d2a(0x181)](_0xd0686['database']),_0xd0686[_0x303d2a(0x178)]&&_0x362d7c['push'](_0xd0686[_0x303d2a(0x178)]),_0x362d7c[_0x303d2a(0x18a)]('.');}export function validateTableListReference(_0x241add){return undefined;}export function validateTableDescribeReference(_0x14492b){const _0x5abb94=a237_0x2e3a;if(!_0x14492b[_0x5abb94(0x178)])return _0x5abb94(0x18c);if(_0x14492b[_0x5abb94(0x17c)]&&hasWildcard(_0x14492b['database']))return _0x5abb94(0x17a);if(hasWildcard(_0x14492b['table']))return _0x5abb94(0x18d);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a238_0x2fe4b9=a238_0x5a04;function a238_0x5b05(){const _0x2565fd=['INFO','2870667ukcbUv','logFileName','15PnxrWR','9HmFHRv','12496440ZTmBmP','logLevel','warn','getLogPath','trace','addHandler','2607366xRfSej','2349564CQESfX','2406140jJTlcs','consoleHandler','info','Session\x20ended','error','fileOnly','tdx.log','logDir','close','push','debug','1435445xxpDNy','logger','init','fileHandler','265758viFiXh'];a238_0x5b05=function(){return _0x2565fd;};return a238_0x5b05();}function a238_0x5a04(_0x507d8d,_0x5dccec){_0x507d8d=_0x507d8d-0x7a;const _0x5b0577=a238_0x5b05();let _0x5a0430=_0x5b0577[_0x507d8d];return _0x5a0430;}(function(_0x73edc1,_0x3e9eae){const _0x1434ee=a238_0x5a04,_0x1ebdc7=_0x73edc1();while(!![]){try{const _0x3d55d4=parseInt(_0x1434ee(0x91))/0x1+-parseInt(_0x1434ee(0x84))/0x2+parseInt(_0x1434ee(0x7a))/0x3+parseInt(_0x1434ee(0x86))/0x4*(parseInt(_0x1434ee(0x7c))/0x5)+-parseInt(_0x1434ee(0x95))/0x6+-parseInt(_0x1434ee(0x85))/0x7+-parseInt(_0x1434ee(0x7e))/0x8*(parseInt(_0x1434ee(0x7d))/0x9);if(_0x3d55d4===_0x3e9eae)break;else _0x1ebdc7['push'](_0x1ebdc7['shift']());}catch(_0x3b6890){_0x1ebdc7['push'](_0x1ebdc7['shift']());}}}(a238_0x5b05,0xe83d8));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{['logLevel'];[a238_0x2fe4b9(0x8b)];[a238_0x2fe4b9(0x8d)];[a238_0x2fe4b9(0x7b)];[a238_0x2fe4b9(0x92)];['fileHandler']=null;[a238_0x2fe4b9(0x87)]=null;constructor(_0x2d0962=LogLevel['INFO'],_0x285778=![],_0x5d5b9c,_0x1aec03=a238_0x2fe4b9(0x8c)){const _0x5ef8fe=a238_0x2fe4b9;this[_0x5ef8fe(0x7f)]=_0x2d0962,this[_0x5ef8fe(0x8b)]=_0x285778,this[_0x5ef8fe(0x8d)]=_0x5d5b9c||join(getGlobalCacheDir(),'logs'),this['logFileName']=_0x1aec03,this[_0x5ef8fe(0x92)]=Logger['of']('tdx');}async[a238_0x2fe4b9(0x93)](){const _0x3df6b1=a238_0x2fe4b9,_0x440862=join(this[_0x3df6b1(0x8d)],this['logFileName']);if(Logger['isInitialized']()){!this['fileOnly']&&(this[_0x3df6b1(0x87)]=new ConsoleHandler({'minLevel':LogLevel[_0x3df6b1(0x96)],'colors':!![]}),Logger[_0x3df6b1(0x83)](this[_0x3df6b1(0x87)]));return;}this[_0x3df6b1(0x94)]=new FileHandler({'filePath':_0x440862});const _0xb17394=[this[_0x3df6b1(0x94)]];!this['fileOnly']&&(this[_0x3df6b1(0x87)]=new ConsoleHandler({'minLevel':LogLevel[_0x3df6b1(0x96)],'colors':!![]}),_0xb17394[_0x3df6b1(0x8f)](this['consoleHandler'])),await Logger['init']({'defaultLevel':this['logLevel'],'handlers':_0xb17394,'formatter':new DefaultLogFormatter({'colors':!![]})});}['debug'](..._0x2ca6ed){const _0x4f28db=a238_0x2fe4b9;this[_0x4f28db(0x92)][_0x4f28db(0x90)](..._0x2ca6ed);}[a238_0x2fe4b9(0x82)](..._0x1d2196){const _0x428c38=a238_0x2fe4b9;this['logger'][_0x428c38(0x82)](..._0x1d2196);}['info'](..._0x4cf9e3){const _0x106260=a238_0x2fe4b9;this[_0x106260(0x92)]['info'](..._0x4cf9e3);}[a238_0x2fe4b9(0x80)](..._0x1f68bf){const _0x647e2b=a238_0x2fe4b9;this[_0x647e2b(0x92)][_0x647e2b(0x80)](..._0x1f68bf);}[a238_0x2fe4b9(0x8a)](..._0x22f6ae){const _0xdccb4a=a238_0x2fe4b9;this[_0xdccb4a(0x92)][_0xdccb4a(0x8a)](..._0x22f6ae);}async[a238_0x2fe4b9(0x8e)](){const _0x3f7de3=a238_0x2fe4b9;this['logger'][_0x3f7de3(0x88)](_0x3f7de3(0x89)),await Logger['shutdown']();}[a238_0x2fe4b9(0x81)](){const _0xc85796=a238_0x2fe4b9;return join(this[_0xc85796(0x8d)],this[_0xc85796(0x7b)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a239_0x27f3f9=a239_0x4e53;(function(_0x10b2c1,_0x12492f){const _0x4d7879=a239_0x4e53,_0x2dc1b6=_0x10b2c1();while(!![]){try{const _0x4a3811=-parseInt(_0x4d7879(0xb1))/0x1*(parseInt(_0x4d7879(0xab))/0x2)+parseInt(_0x4d7879(0x9b))/0x3*(-parseInt(_0x4d7879(0xac))/0x4)+parseInt(_0x4d7879(0xaa))/0x5+-parseInt(_0x4d7879(0xa2))/0x6+parseInt(_0x4d7879(0xbd))/0x7+-parseInt(_0x4d7879(0xad))/0x8*(parseInt(_0x4d7879(0xb6))/0x9)+parseInt(_0x4d7879(0xb0))/0xa*(parseInt(_0x4d7879(0x9c))/0xb);if(_0x4a3811===_0x12492f)break;else _0x2dc1b6['push'](_0x2dc1b6['shift']());}catch(_0x4864b7){_0x2dc1b6['push'](_0x2dc1b6['shift']());}}}(a239_0x52e8,0x4c718));import{get}from'https';import{gt,valid}from'semver';import a239_0x2f4911 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a239_0x27f3f9(0x9a),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache('last_version_check',a239_0x27f3f9(0x9f)),nextVersionCache=createGlobalCache('last_version_check_next',a239_0x27f3f9(0xa3));function getCacheForChannel(_0x2c4963){const _0x13318a=a239_0x27f3f9;return _0x2c4963===_0x13318a(0xb3)?nextVersionCache:stableVersionCache;}function readCache(_0x2b3f1d){return getCacheForChannel(_0x2b3f1d)['read']()??null;}function a239_0x52e8(){const _0x1bf388=['gray','dim','now','channel','https://registry.npmjs.org/@treasuredata/tdx','3VwCTit','105138HcyLpL','version','green','utils/version-check','toISOString','statusCode','2803926HxOOIt','utils/version-check-next','latestVersion','parse','HTTP\x20','getTime','destroy','stderr','1698435wbMSUo','10568vZjnva','206048GtpIjh','8bVtWtB','tdx\x20upgrade','currentVersion','980ngthnM','83LlJLUm','background','next','error','lastCheck','4499406kFuvYZ','cyan','\x0aUpdate\x20available:\x20','unref','isTTY','write','Run:','3458560UTqfFP','Invalid\x20version\x20format'];a239_0x52e8=function(){return _0x1bf388;};return a239_0x52e8();}function writeCache(_0x7f2539,_0xa40aaa){const _0x131b43=a239_0x27f3f9;try{getCacheForChannel(_0xa40aaa)[_0x131b43(0xbb)]({'lastCheck':new Date()[_0x131b43(0xa0)](),'latestVersion':_0x7f2539});}catch{}}function isCacheValid(_0x2b634c){const _0x56bb0f=a239_0x27f3f9;if(!_0x2b634c)return![];const _0x16ab19=new Date(_0x2b634c[_0x56bb0f(0xb5)])[_0x56bb0f(0xa7)](),_0x1c4747=Date[_0x56bb0f(0x98)]();return _0x1c4747-_0x16ab19<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x4d0705='stable',_0x4a8496){const _0x46dc70=a239_0x27f3f9,_0x2dc37f=_0x4a8496?.[_0x46dc70(0xb2)]??![],_0xa5ad3c=_0x4d0705==='next'?'next':'latest',_0x276c52=NPM_REGISTRY_BASE+'/'+_0xa5ad3c;return new Promise((_0x1cd8e1,_0x8ff57b)=>{const _0x407063=_0x46dc70,_0x4f4d0c=get(_0x276c52,{'timeout':TIMEOUT_MS},_0x499daa=>{const _0x57f49b=a239_0x4e53;if(_0x499daa[_0x57f49b(0xa1)]!==0xc8){clearTimeout(_0x316995),_0x8ff57b(new Error(_0x57f49b(0xa6)+_0x499daa[_0x57f49b(0xa1)]));return;}let _0x36cf62='';_0x499daa['on']('data',_0x16d3f8=>{_0x36cf62+=_0x16d3f8;}),_0x499daa['on']('end',()=>{const _0x5cfdd1=_0x57f49b;clearTimeout(_0x316995);try{const _0x39b5bc=JSON[_0x5cfdd1(0xa5)](_0x36cf62);if(!valid(_0x39b5bc[_0x5cfdd1(0x9d)])){_0x8ff57b(new Error(_0x5cfdd1(0xbe)));return;}_0x1cd8e1(_0x39b5bc['version']);}catch(_0x18e7ef){_0x8ff57b(_0x18e7ef);}});})['on'](_0x407063(0xb4),_0x380027=>{clearTimeout(_0x316995),_0x8ff57b(_0x380027);}),_0x316995=setTimeout(()=>{const _0x25389b=_0x407063;_0x4f4d0c[_0x25389b(0xa8)](),_0x8ff57b(new Error('Request\x20timeout'));},TIMEOUT_MS);_0x2dc37f&&(_0x4f4d0c['on']('socket',_0x2d53e6=>{const _0x50d1fd=_0x407063;_0x2d53e6[_0x50d1fd(0xb9)]();}),_0x316995[_0x407063(0xb9)]());});}export async function checkForUpdate(_0x24b462,_0x138420='stable'){const _0x415a10=a239_0x27f3f9;try{const _0x55909e=readCache(_0x138420);if(isCacheValid(_0x55909e)){const _0x54e246=gt(_0x55909e[_0x415a10(0xa4)],_0x24b462);return{'updateAvailable':_0x54e246,'currentVersion':_0x24b462,'latestVersion':_0x55909e[_0x415a10(0xa4)],'channel':_0x138420};}const _0x209a78=await fetchLatestVersion(_0x138420,{'background':!![]});writeCache(_0x209a78,_0x138420);const _0x2ef0ff=gt(_0x209a78,_0x24b462);return{'updateAvailable':_0x2ef0ff,'currentVersion':_0x24b462,'latestVersion':_0x209a78,'channel':_0x138420};}catch{return null;}}function a239_0x4e53(_0x34084c,_0x1d5817){_0x34084c=_0x34084c-0x98;const _0x52e8dc=a239_0x52e8();let _0x4e533c=_0x52e8dc[_0x34084c];return _0x4e533c;}export function displayUpdateNotification(_0x28815f){const _0x11dbfc=a239_0x27f3f9;if(!_0x28815f['updateAvailable'])return;const _0x463293=_0x28815f[_0x11dbfc(0x99)]==='next'?'tdx\x20upgrade\x20--next':_0x11dbfc(0xae),_0x493367=process['stderr'][_0x11dbfc(0xba)]&&!process.env.NO_COLOR,_0x1a5565=_0x493367?a239_0x2f4911[_0x11dbfc(0xbf)]('→'):'→',_0x22196f=_0x493367?a239_0x2f4911[_0x11dbfc(0xc0)](_0x28815f[_0x11dbfc(0xaf)]):_0x28815f[_0x11dbfc(0xaf)],_0x37c385=_0x493367?a239_0x2f4911[_0x11dbfc(0x9e)](_0x28815f['latestVersion']):_0x28815f['latestVersion'],_0x5a1837=_0x493367?a239_0x2f4911[_0x11dbfc(0xb7)](_0x463293):_0x463293,_0x5cf9a6=_0x493367?'\x0a'+a239_0x2f4911['yellow']('Update\x20available:')+'\x20'+_0x22196f+'\x20'+_0x1a5565+'\x20'+_0x37c385+'\x0a'+a239_0x2f4911[_0x11dbfc(0xc0)](_0x11dbfc(0xbc))+'\x20'+_0x5a1837+'\x0a':_0x11dbfc(0xb8)+_0x22196f+'\x20'+_0x1a5565+'\x20'+_0x37c385+'\x0aRun:\x20'+_0x5a1837+'\x0a';process[_0x11dbfc(0xa9)][_0x11dbfc(0xbb)](_0x5cf9a6);}
|