@treasuredata/tdx 2026.7.0 → 2026.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.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-move-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.d.ts +1 -0
- package/dist/sdk/client/http-client.d.ts.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/http-client.js.map +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/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/util/tree-search.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
|
-
(function(
|
|
1
|
+
(function(_0xcd8f41,_0x187417){var _0x30cf22=a230_0x4c45,_0x45b6a1=_0xcd8f41();while(!![]){try{var _0x4562c5=-parseInt(_0x30cf22(0x133))/0x1*(-parseInt(_0x30cf22(0x12f))/0x2)+parseInt(_0x30cf22(0x12e))/0x3*(-parseInt(_0x30cf22(0x132))/0x4)+parseInt(_0x30cf22(0x135))/0x5*(-parseInt(_0x30cf22(0x12d))/0x6)+-parseInt(_0x30cf22(0x12c))/0x7*(parseInt(_0x30cf22(0x137))/0x8)+-parseInt(_0x30cf22(0x138))/0x9*(parseInt(_0x30cf22(0x136))/0xa)+parseInt(_0x30cf22(0x131))/0xb+parseInt(_0x30cf22(0x134))/0xc*(parseInt(_0x30cf22(0x130))/0xd);if(_0x4562c5===_0x187417)break;else _0x45b6a1['push'](_0x45b6a1['shift']());}catch(_0x18b701){_0x45b6a1['push'](_0x45b6a1['shift']());}}}(a230_0x2eaf,0x52c98));function a230_0x2eaf(){var _0x32ba42=['1744704zYdpPF','1035738kBxhIM','7pkpKVW','1518162vFlplH','372YJFscd','12nmCgfg','11665602dUMWDm','6435451TcFMaG','18608EYEXKa','3291vCzAaq','12CqUXMx','5blveWr','10eqkEHF'];a230_0x2eaf=function(){return _0x32ba42;};return a230_0x2eaf();}export{Logger}from'./logger.js';export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';function a230_0x4c45(_0x4d4880,_0x5505d6){_0x4d4880=_0x4d4880-0x12c;var _0x2eaf70=a230_0x2eaf();var _0x4c4569=_0x2eaf70[_0x4d4880];return _0x4c4569;}export{DefaultLogFormatter}from'./formatters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a231_0x562d18=a231_0x10a3;(function(_0x1c6cb1,_0xf89049){const _0xa65e9f=a231_0x10a3,_0xf9a11f=_0x1c6cb1();while(!![]){try{const _0x4656e3=parseInt(_0xa65e9f(0x121))/0x1+-parseInt(_0xa65e9f(0x111))/0x2+-parseInt(_0xa65e9f(0xf4))/0x3+parseInt(_0xa65e9f(0x123))/0x4*(-parseInt(_0xa65e9f(0x115))/0x5)+parseInt(_0xa65e9f(0x100))/0x6+parseInt(_0xa65e9f(0xf7))/0x7+parseInt(_0xa65e9f(0x120))/0x8*(parseInt(_0xa65e9f(0x101))/0x9);if(_0x4656e3===_0xf89049)break;else _0xf9a11f['push'](_0xf9a11f['shift']());}catch(_0x5a3dc8){_0xf9a11f['push'](_0xf9a11f['shift']());}}}(a231_0x117c,0x829dd));import{LogLevel as a231_0x1aacb5,logLevelToString}from'./types.js';const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a231_0x1aacb5[a231_0x562d18(0x12a)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x4d2be3){const _0x23d104=a231_0x562d18;if(typeof _0x4d2be3==='string')return _0x4d2be3;if(_0x4d2be3 instanceof Error)return _0x4d2be3[_0x23d104(0x129)]||_0x4d2be3['name']+':\x20'+_0x4d2be3['message'];try{return JSON[_0x23d104(0x105)](_0x4d2be3,(_0x594288,_0x437b5e)=>{const _0x3d5aa5=_0x23d104;if(_0x437b5e instanceof Error)return{'name':_0x437b5e[_0x3d5aa5(0xfb)],'message':_0x437b5e['message'],'stack':_0x437b5e['stack'],'cause':_0x437b5e[_0x3d5aa5(0x116)]};return _0x437b5e;});}catch{return String(_0x4d2be3);}}function a231_0x117c(){const _0x149a79=['initialized','2702724WVcZpc','shutdown','loggers','1496614QKfiMh','ERROR','entries','warn','name','component','levelOverrides','info','dispatch','5210706pAbHdE','711gMFNmc','formatter','handle','DEBUG','stringify','close','pendingRecords','getEffectiveLevel','clear','has','addHandler','isInitialized','TRACE','log','setLogLevel','handlers','1595756YEXItg','string','trace','debug','23325wZdOhD','cause','defaultLevel','get','function','init','clearHandlers','WARN','toISOString','set','error','92168mijCsa','623909OnlFLG','shouldLog','328iezjPc','setDefaultLevel','split',']\x20[','message','push','stack','INFO','level','length','map'];a231_0x117c=function(){return _0x149a79;};return a231_0x117c();}function a231_0x10a3(_0x410e94,_0x26483e){_0x410e94=_0x410e94-0xf3;const _0x117c1d=a231_0x117c();let _0x10a3a6=_0x117c1d[_0x410e94];return _0x10a3a6;}export class Logger{['component'];constructor(_0x38a2a7){const _0x3c5456=a231_0x562d18;this[_0x3c5456(0xfc)]=_0x38a2a7;}static['of'](_0x596c32){const _0x2de5ff=a231_0x562d18,_0x534f5c=typeof _0x596c32===_0x2de5ff(0x112)?_0x596c32:_0x596c32[_0x2de5ff(0xfb)];let _0x343572=state[_0x2de5ff(0xf6)][_0x2de5ff(0x118)](_0x534f5c);return!_0x343572&&(_0x343572=new Logger(_0x534f5c),state[_0x2de5ff(0xf6)]['set'](_0x534f5c,_0x343572)),_0x343572;}static async[a231_0x562d18(0x11a)](_0x421fc3={}){const _0x16b6f4=a231_0x562d18;state[_0x16b6f4(0x117)]=_0x421fc3['defaultLevel']??a231_0x1aacb5[_0x16b6f4(0x12a)],state[_0x16b6f4(0x110)]=_0x421fc3[_0x16b6f4(0x110)]??[],state['formatter']=_0x421fc3[_0x16b6f4(0x102)]??null,state[_0x16b6f4(0xfd)][_0x16b6f4(0x109)]();if(_0x421fc3['levelOverrides'])for(const [_0xefffae,_0x5896d5]of Object[_0x16b6f4(0xf9)](_0x421fc3[_0x16b6f4(0xfd)])){state[_0x16b6f4(0xfd)][_0x16b6f4(0x11e)](_0xefffae,_0x5896d5);}for(const _0x791cd2 of state['handlers']){_0x791cd2['init']&&await _0x791cd2[_0x16b6f4(0x11a)]();}state[_0x16b6f4(0xf3)]=!![];for(const _0x489252 of state[_0x16b6f4(0x107)]){Logger[_0x16b6f4(0xff)](_0x489252);}state[_0x16b6f4(0x107)]=[];}static[a231_0x562d18(0x10f)](_0xfc6525,_0xe9d647){state['levelOverrides']['set'](_0xfc6525,_0xe9d647);}static[a231_0x562d18(0x124)](_0x17d70f){const _0x1075a8=a231_0x562d18;state[_0x1075a8(0x117)]=_0x17d70f;}static[a231_0x562d18(0x10b)](_0x44c9b2){const _0x5d039b=a231_0x562d18;state[_0x5d039b(0x110)][_0x5d039b(0x128)](_0x44c9b2),state['initialized']&&_0x44c9b2[_0x5d039b(0x11a)]&&_0x44c9b2[_0x5d039b(0x11a)]();}static[a231_0x562d18(0x11b)](){const _0x4fbae4=a231_0x562d18;state[_0x4fbae4(0x110)]=[];}static async[a231_0x562d18(0xf5)](){const _0x3e0acf=a231_0x562d18;for(const _0x276e22 of state[_0x3e0acf(0x110)]){_0x276e22[_0x3e0acf(0x106)]&&await _0x276e22['close']();}state[_0x3e0acf(0x110)]=[],state['initialized']=![],state[_0x3e0acf(0xf6)]['clear'](),state['pendingRecords']=[];}static['reset'](){const _0x54c2bf=a231_0x562d18;state[_0x54c2bf(0xf3)]=![],state[_0x54c2bf(0x117)]=a231_0x1aacb5[_0x54c2bf(0x12a)],state[_0x54c2bf(0xfd)][_0x54c2bf(0x109)](),state[_0x54c2bf(0x110)]=[],state[_0x54c2bf(0x102)]=null,state[_0x54c2bf(0xf6)][_0x54c2bf(0x109)](),state[_0x54c2bf(0x107)]=[];}static[a231_0x562d18(0x10c)](){return state['initialized'];}static[a231_0x562d18(0x108)](_0xc11dcd){const _0xbb7251=a231_0x562d18;if(state['levelOverrides'][_0xbb7251(0x10a)](_0xc11dcd))return state[_0xbb7251(0xfd)][_0xbb7251(0x118)](_0xc11dcd);const _0x2f5a8c=_0xc11dcd[_0xbb7251(0x125)]('.');for(let _0x20cd6e=_0x2f5a8c[_0xbb7251(0x12c)]-0x1;_0x20cd6e>0x0;_0x20cd6e--){const _0x5816b5=_0x2f5a8c['slice'](0x0,_0x20cd6e)['join']('.');if(state[_0xbb7251(0xfd)][_0xbb7251(0x10a)](_0x5816b5))return state[_0xbb7251(0xfd)]['get'](_0x5816b5);}return state[_0xbb7251(0x117)];}['shouldLog'](_0x4b3fba){const _0x5c2503=a231_0x562d18,_0x5d04bb=Logger[_0x5c2503(0x108)](this[_0x5c2503(0xfc)]);return _0x4b3fba>=_0x5d04bb;}static[a231_0x562d18(0xff)](_0x4ca1d8){const _0x109a40=a231_0x562d18;for(const _0x3c8c91 of state['handlers']){_0x3c8c91[_0x109a40(0x103)](_0x4ca1d8);}}[a231_0x562d18(0x10e)](_0x2052b0,_0x273d48){const _0x17d81c=a231_0x562d18;if(!this[_0x17d81c(0x122)](_0x2052b0))return;const _0x483df5=_0x273d48[_0x17d81c(0x12d)](_0x3a6ac5=>typeof _0x3a6ac5===_0x17d81c(0x119)?_0x3a6ac5():_0x3a6ac5),_0x59077a=_0x483df5[_0x17d81c(0x12d)](safeStringify)['join']('\x20'),_0x454b40={'timestamp':new Date(),'level':_0x2052b0,'component':this[_0x17d81c(0xfc)],'message':_0x59077a};if(!state['initialized']){state[_0x17d81c(0x107)][_0x17d81c(0x12c)]<MAX_PENDING_RECORDS&&state[_0x17d81c(0x107)][_0x17d81c(0x128)](_0x454b40);return;}Logger[_0x17d81c(0xff)](_0x454b40);}[a231_0x562d18(0x113)](..._0x3f90e8){const _0xa134f8=a231_0x562d18;this['log'](a231_0x1aacb5[_0xa134f8(0x10d)],_0x3f90e8);}[a231_0x562d18(0x114)](..._0x19ebf8){const _0x5e4c47=a231_0x562d18;this[_0x5e4c47(0x10e)](a231_0x1aacb5[_0x5e4c47(0x104)],_0x19ebf8);}[a231_0x562d18(0xfe)](..._0x1c3bc7){const _0x10b688=a231_0x562d18;this[_0x10b688(0x10e)](a231_0x1aacb5['INFO'],_0x1c3bc7);}[a231_0x562d18(0xfa)](..._0x556afc){const _0x3767ec=a231_0x562d18;this[_0x3767ec(0x10e)](a231_0x1aacb5[_0x3767ec(0x11c)],_0x556afc);}[a231_0x562d18(0x11f)](..._0x18e288){const _0x57e4c5=a231_0x562d18;this[_0x57e4c5(0x10e)](a231_0x1aacb5[_0x57e4c5(0xf8)],_0x18e288);}static['getFormatter'](){return state['formatter'];}static['format'](_0x2cdbda){const _0xeb4f5a=a231_0x562d18;if(state[_0xeb4f5a(0x102)])return state[_0xeb4f5a(0x102)]['format'](_0x2cdbda);return _0x2cdbda['timestamp'][_0xeb4f5a(0x11d)]()+'\x20['+logLevelToString(_0x2cdbda[_0xeb4f5a(0x12b)])+_0xeb4f5a(0x126)+_0x2cdbda[_0xeb4f5a(0xfc)]+']\x20'+_0x2cdbda[_0xeb4f5a(0x127)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a232_0x5e53(_0x560539,_0x465887){_0x560539=_0x560539-0xea;const _0x541335=a232_0x5413();let _0x5e537c=_0x541335[_0x560539];return _0x5e537c;}(function(_0x2b825b,_0x318fe7){const _0x5b3c9b=a232_0x5e53,_0x15d683=_0x2b825b();while(!![]){try{const _0x1dc04d=-parseInt(_0x5b3c9b(0xff))/0x1*(-parseInt(_0x5b3c9b(0x104))/0x2)+-parseInt(_0x5b3c9b(0x101))/0x3*(parseInt(_0x5b3c9b(0x109))/0x4)+-parseInt(_0x5b3c9b(0xf2))/0x5+parseInt(_0x5b3c9b(0xfe))/0x6+parseInt(_0x5b3c9b(0xf5))/0x7+-parseInt(_0x5b3c9b(0xf3))/0x8*(-parseInt(_0x5b3c9b(0xef))/0x9)+parseInt(_0x5b3c9b(0xfa))/0xa*(-parseInt(_0x5b3c9b(0x102))/0xb);if(_0x1dc04d===_0x318fe7)break;else _0x15d683['push'](_0x15d683['shift']());}catch(_0x3d19a2){_0x15d683['push'](_0x15d683['shift']());}}}(a232_0x5413,0xb7921));export var LogLevel;(function(_0x2f223e){const _0x55126d=a232_0x5e53;_0x2f223e[_0x2f223e['TRACE']=-0x2]=_0x55126d(0xf0),_0x2f223e[_0x2f223e[_0x55126d(0xeb)]=-0x1]=_0x55126d(0xeb),_0x2f223e[_0x2f223e[_0x55126d(0xfd)]=0x0]=_0x55126d(0xfd),_0x2f223e[_0x2f223e[_0x55126d(0xf1)]=0x1]=_0x55126d(0xf1),_0x2f223e[_0x2f223e[_0x55126d(0xf9)]=0x2]=_0x55126d(0xf9);}(LogLevel||(LogLevel={})));export function parseLogLevel(_0x7f896d){const _0x4317ac=a232_0x5e53;switch(_0x7f896d[_0x4317ac(0x105)]()){case _0x4317ac(0xf0):return LogLevel[_0x4317ac(0xf0)];case'DEBUG':return LogLevel['DEBUG'];case _0x4317ac(0xfd):return LogLevel['INFO'];case _0x4317ac(0xf1):case _0x4317ac(0xf8):return LogLevel['WARN'];case _0x4317ac(0xf9):return LogLevel[_0x4317ac(0xf9)];default:return LogLevel['INFO'];}}export function logLevelToString(_0x35de6f){const _0x4f1587=a232_0x5e53;switch(_0x35de6f){case LogLevel[_0x4f1587(0xf0)]:return'trace';case LogLevel['DEBUG']:return _0x4f1587(0xec);case LogLevel[_0x4f1587(0xfd)]:return _0x4f1587(0x100);case LogLevel['WARN']:return _0x4f1587(0xf4);case LogLevel[_0x4f1587(0xf9)]:return _0x4f1587(0xee);default:return'info';}}export function formatTimestamp(_0x213343){const _0x5b5198=a232_0x5e53,_0x461ca3=_0x213343['getFullYear'](),_0x522ade=(_0x213343[_0x5b5198(0xf7)]()+0x1)[_0x5b5198(0x10a)]()['padStart'](0x2,'0'),_0x509fe9=_0x213343[_0x5b5198(0xfb)]()['toString']()[_0x5b5198(0x103)](0x2,'0'),_0x32e7aa=_0x213343[_0x5b5198(0x106)]()[_0x5b5198(0x10a)]()[_0x5b5198(0x103)](0x2,'0'),_0x32ec9a=_0x213343[_0x5b5198(0xfc)]()[_0x5b5198(0x10a)]()[_0x5b5198(0x103)](0x2,'0'),_0x4915b1=_0x213343[_0x5b5198(0xf6)]()[_0x5b5198(0x10a)]()[_0x5b5198(0x103)](0x2,'0'),_0x3b8884=_0x213343[_0x5b5198(0xed)]()[_0x5b5198(0x10a)]()['padStart'](0x3,'0'),_0x2274aa=-_0x213343[_0x5b5198(0xea)](),_0x37eb98=Math[_0x5b5198(0x107)](Math['abs'](_0x2274aa)/0x3c),_0x2faa7b=Math[_0x5b5198(0x108)](_0x2274aa)%0x3c,_0x3857d1=_0x2274aa>=0x0?'+':'-',_0x21bce6=''+_0x3857d1+_0x37eb98[_0x5b5198(0x10a)]()[_0x5b5198(0x103)](0x2,'0')+_0x2faa7b[_0x5b5198(0x10a)]()[_0x5b5198(0x103)](0x2,'0');return _0x461ca3+'-'+_0x522ade+'-'+_0x509fe9+'\x20'+_0x32e7aa+':'+_0x32ec9a+':'+_0x4915b1+'.'+_0x3b8884+_0x21bce6;}function a232_0x5413(){const _0x546dd1=['getMonth','WARNING','ERROR','160FLslkR','getDate','getMinutes','INFO','1443402xZvpCc','592567SEjyyx','info','29139jiazlD','112453vqVaXy','padStart','4SmoojT','toUpperCase','getHours','floor','abs','188WShcyE','toString','getTimezoneOffset','DEBUG','debug','getMilliseconds','error','9401139IRQoYQ','TRACE','WARN','5641740voiJef','8GJmaRf','warn','210420HZBIID','getSeconds'];a232_0x5413=function(){return _0x546dd1;};return a232_0x5413();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a233_0x1c99(_0x1ac185,_0x5e4371){_0x1ac185=_0x1ac185-0xe4;const _0x31c3ca=a233_0x31c3();let _0x1c9988=_0x31c3ca[_0x1ac185];return _0x1c9988;}function a233_0x31c3(){const _0x28e667=['6FhPpYE','7067459qSfTZG','184865wwpNmp','isInteger','44YvQRlX','277731PguHFA','2922381KmjcnX','100uWzqMV','5583848nnykFS','Invalid\x20limit\x20value:\x20','4SdJzKr','260015WjQSwh','Invalid\x20timeout\x20value:\x20','.\x20Must\x20be\x20a\x20positive\x20number.','.\x20Must\x20be\x20an\x20integer.','.\x20Must\x20be\x20a\x20positive\x20integer.','200199XtCguw'];a233_0x31c3=function(){return _0x28e667;};return a233_0x31c3();}(function(_0x3cd37d,_0x1bd46e){const _0x5b2bd1=a233_0x1c99,_0x21060b=_0x3cd37d();while(!![]){try{const _0x2c9e6a=-parseInt(_0x5b2bd1(0xe8))/0x1+-parseInt(_0x5b2bd1(0xe7))/0x2*(-parseInt(_0x5b2bd1(0xed))/0x3)+parseInt(_0x5b2bd1(0xf2))/0x4*(parseInt(_0x5b2bd1(0xf0))/0x5)+-parseInt(_0x5b2bd1(0xee))/0x6*(parseInt(_0x5b2bd1(0xef))/0x7)+parseInt(_0x5b2bd1(0xe5))/0x8+-parseInt(_0x5b2bd1(0xf3))/0x9*(-parseInt(_0x5b2bd1(0xe4))/0xa)+parseInt(_0x5b2bd1(0xf4))/0xb;if(_0x2c9e6a===_0x1bd46e)break;else _0x21060b['push'](_0x21060b['shift']());}catch(_0x414c48){_0x21060b['push'](_0x21060b['shift']());}}}(a233_0x31c3,0x84827));export function validateLimitOption(_0x2b965d){const _0x435775=a233_0x1c99;if(!Number[_0x435775(0xf1)](_0x2b965d))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x2b965d+_0x435775(0xeb)};if(_0x2b965d<=0x0)return{'isValid':![],'error':_0x435775(0xe6)+_0x2b965d+_0x435775(0xec)};return{'isValid':!![],'value':_0x2b965d};}export function validateTimeoutOption(_0x81299d,_0x14533b=0x1e){const _0x34da8e=a233_0x1c99;if(_0x81299d===undefined)return{'isValid':!![],'value':_0x14533b};const _0x2e5e98=typeof _0x81299d==='number'?_0x81299d:parseFloat(_0x81299d);if(isNaN(_0x2e5e98))return{'isValid':![],'error':_0x34da8e(0xe9)+_0x81299d+'.\x20Must\x20be\x20a\x20number.'};if(_0x2e5e98<=0x0)return{'isValid':![],'error':_0x34da8e(0xe9)+_0x2e5e98+_0x34da8e(0xea)};return{'isValid':!![],'value':_0x2e5e98};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a234_0x395c55=a234_0x6447;function a234_0x4a52(){const _0x53becf=['exit','5504108sFBvbD','ps\x20-p\x20','xdg-open','toLowerCase','tcsh','split','6FlyuFV','map','http:','comm','ignore','has','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','test','open','pipe','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','treasure\x20studio','darwin','utf-8','isInteger','write','zsh','12111280rdZNOJ','stderr','cursor','pid','dash','https:','\x20-o\x20ppid=,comm=','ion','replace','start','unref','9204559bAihbF','win32','protocol','10166643XviZTk','trim','2491034pZusjk','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','which','ksh','pwsh','1349773IYQrTd','join','ppid','csh','4077171GtVMgO','platform','function','Invalid\x20URL:\x20','5vtLdHi','href','claude','elvish','10nuWOcJ'];a234_0x4a52=function(){return _0x53becf;};return a234_0x4a52();}(function(_0x52506f,_0x467dc4){const _0x180fed=a234_0x6447,_0x2985c2=_0x52506f();while(!![]){try{const _0x5577f5=parseInt(_0x180fed(0x182))/0x1+parseInt(_0x180fed(0x17d))/0x2+-parseInt(_0x180fed(0x186))/0x3+-parseInt(_0x180fed(0x156))/0x4*(parseInt(_0x180fed(0x18a))/0x5)+parseInt(_0x180fed(0x15c))/0x6*(parseInt(_0x180fed(0x178))/0x7)+-parseInt(_0x180fed(0x16d))/0x8+-parseInt(_0x180fed(0x17b))/0x9*(-parseInt(_0x180fed(0x154))/0xa);if(_0x5577f5===_0x467dc4)break;else _0x2985c2['push'](_0x2985c2['shift']());}catch(_0x1c88e8){_0x2985c2['push'](_0x2985c2['shift']());}}}(a234_0x4a52,0xc114c));import{execFile,execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash',a234_0x395c55(0x16c),'sh','fish',a234_0x395c55(0x180),a234_0x395c55(0x15a),a234_0x395c55(0x185),a234_0x395c55(0x171),a234_0x395c55(0x181),'powershell','nu',a234_0x395c55(0x174),a234_0x395c55(0x153),'xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a234_0x395c55(0x152),'code',a234_0x395c55(0x16f),'electron',a234_0x395c55(0x167)]);function getProcessInfoWindows(_0x5817cf){const _0x8711a7=a234_0x395c55;try{if(!Number[_0x8711a7(0x16a)](_0x5817cf)||_0x5817cf<=0x0)return null;const _0x2b8512=_0x8711a7(0x162)+_0x5817cf+_0x8711a7(0x166),_0x5911d7=execSync(_0x8711a7(0x17e)+_0x2b8512+'\x22',{'encoding':_0x8711a7(0x169),'windowsHide':!![],'stdio':[_0x8711a7(0x165),_0x8711a7(0x165),_0x8711a7(0x165)]})[_0x8711a7(0x17c)]();if(!_0x5911d7)return null;const [_0x16eb06,..._0xc4a546]=_0x5911d7[_0x8711a7(0x15b)](','),_0x4c8034=parseInt(_0x16eb06,0xa),_0x407b77=_0xc4a546[_0x8711a7(0x183)](',')[_0x8711a7(0x17c)]();if(isNaN(_0x4c8034)||!_0x407b77)return null;return{'pid':_0x5817cf,'ppid':_0x4c8034,'comm':_0x407b77[_0x8711a7(0x175)](/\.exe$/i,'')};}catch{return null;}}function a234_0x6447(_0x5937bf,_0x55a21a){_0x5937bf=_0x5937bf-0x152;const _0x4a5270=a234_0x4a52();let _0x6447a9=_0x4a5270[_0x5937bf];return _0x6447a9;}function getProcessInfoPosix(_0x1cee1b){const _0x1eecb6=a234_0x395c55;try{const _0xec83b0=0x400000;if(!Number[_0x1eecb6(0x16a)](_0x1cee1b)||_0x1cee1b<=0x0||_0x1cee1b>_0xec83b0)return null;const _0x2a2065=execSync(_0x1eecb6(0x157)+_0x1cee1b+_0x1eecb6(0x173),{'encoding':_0x1eecb6(0x169),'stdio':_0x1eecb6(0x165)})[_0x1eecb6(0x17c)](),[_0xb047cf,..._0x2ef0ec]=_0x2a2065[_0x1eecb6(0x15b)](/\s+/),_0x33c42d=parseInt(_0xb047cf,0xa),_0x23440a=_0x2ef0ec[_0x1eecb6(0x183)]('\x20');if(isNaN(_0x33c42d))return null;return{'pid':_0x1cee1b,'ppid':_0x33c42d,'comm':_0x23440a};}catch{return null;}}function getProcessInfo(_0x1e6c5f){const _0xf27b6f=a234_0x395c55;if(process['platform']===_0xf27b6f(0x179))return getProcessInfoWindows(_0x1e6c5f);return getProcessInfoPosix(_0x1e6c5f);}function getBasename(_0x55da4d){const _0x5ef082=a234_0x395c55;return _0x55da4d[_0x5ef082(0x175)](/^-/,'')[_0x5ef082(0x15b)]('/')['pop']()?.[_0x5ef082(0x159)]()||'';}function isShell(_0x3f13db){return SHELL_NAMES['has'](getBasename(_0x3f13db));}function isEphemeralShellSpawner(_0x30f266){const _0x1ef2a7=a234_0x395c55;return EPHEMERAL_SHELL_SPAWNERS[_0x1ef2a7(0x161)](getBasename(_0x30f266));}let cachedShellPID;function findShellPID(){const _0x1169ab=a234_0x395c55;if(process[_0x1169ab(0x184)]===undefined)return process['pid'];let _0x314998=process[_0x1169ab(0x184)];const _0x51fdcf=0xa;let _0x29ef80=0x0;while(_0x29ef80<_0x51fdcf){const _0x1b045f=getProcessInfo(_0x314998);if(!_0x1b045f)break;if(isShell(_0x1b045f['comm'])){const _0x16e0f5=getProcessInfo(_0x1b045f[_0x1169ab(0x184)]);if(_0x16e0f5&&isEphemeralShellSpawner(_0x16e0f5[_0x1169ab(0x15f)])){_0x314998=_0x1b045f[_0x1169ab(0x184)],_0x29ef80++;continue;}return _0x1b045f[_0x1169ab(0x170)];}if(_0x1b045f[_0x1169ab(0x184)]===0x0||_0x1b045f[_0x1169ab(0x184)]===0x1){if(isShell(_0x1b045f[_0x1169ab(0x15f)]))return _0x1b045f['pid'];break;}_0x314998=_0x1b045f[_0x1169ab(0x184)],_0x29ef80++;}return process['ppid']!==undefined?process['ppid']:process[_0x1169ab(0x170)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x144bde){const _0x484b08=a234_0x395c55;if(!Number[_0x484b08(0x16a)](_0x144bde)||_0x144bde<=0x0)return![];try{return process['kill'](_0x144bde,0x0),!![];}catch{return![];}}export function openBrowser(_0x537db7){const _0x2e2b40=a234_0x395c55;let _0x5d2775;try{_0x5d2775=new URL(_0x537db7);}catch{throw new Error(_0x2e2b40(0x189)+_0x537db7);}if(_0x5d2775[_0x2e2b40(0x17a)]!==_0x2e2b40(0x15e)&&_0x5d2775[_0x2e2b40(0x17a)]!==_0x2e2b40(0x172))throw new Error('Unsupported\x20protocol:\x20'+_0x5d2775[_0x2e2b40(0x17a)]);const _0x467f21=_0x5d2775[_0x2e2b40(0x18b)],_0x332c42=process['platform'];if(_0x332c42===_0x2e2b40(0x179))spawn('cmd.exe',['/c',_0x2e2b40(0x176),'',_0x467f21],{'detached':!![],'stdio':_0x2e2b40(0x160)})[_0x2e2b40(0x177)]();else{const _0x23e33f=_0x332c42===_0x2e2b40(0x168)?_0x2e2b40(0x164):_0x2e2b40(0x158);spawn(_0x23e33f,[_0x467f21],{'detached':!![],'stdio':_0x2e2b40(0x160)})[_0x2e2b40(0x177)]();}}export function isWindows(){const _0x1586e4=a234_0x395c55;return process[_0x1586e4(0x187)]===_0x1586e4(0x179);}export function getCrossSpawnOptions(_0x52c267){return{..._0x52c267??{},'shell':isWindows()};}export function escapeWindowsArg(_0x58c034){const _0x5f49ab=a234_0x395c55;if(!/[ \t"&|<>^%!`\r\n]/[_0x5f49ab(0x163)](_0x58c034))return _0x58c034;const _0x3afe94=_0x58c034[_0x5f49ab(0x175)](/"/g,'\x22\x22');return'\x22'+_0x3afe94+'\x22';}export function crossSpawn(_0x3b2f58,_0x5b1bf8,_0x5d4083){const _0x12a636=a234_0x395c55;if(isWindows()){const _0x4a3d46=escapeWindowsArg(_0x3b2f58),_0x55c383=_0x5b1bf8[_0x12a636(0x15d)](escapeWindowsArg),_0x5f2f26=[_0x4a3d46,..._0x55c383][_0x12a636(0x183)]('\x20');return spawn(_0x5f2f26,[],{..._0x5d4083,'shell':!![]});}return spawn(_0x3b2f58,_0x5b1bf8,{..._0x5d4083,'shell':![]});}export function gracefulExit(_0x277ff9=0x0){const _0xc52af3=a234_0x395c55,_0x15d3fa=()=>{const _0x5ccac8=a234_0x6447;isWindows()?setTimeout(()=>process[_0x5ccac8(0x155)](_0x277ff9),0x32):process[_0x5ccac8(0x155)](_0x277ff9);};let _0x5820e6=![];const _0xb7c9de=()=>{if(_0x5820e6)return;_0x5820e6=!![],_0x15d3fa();};let _0x540fce=0x2;const _0x1f10f5=()=>{if(--_0x540fce===0x0)_0xb7c9de();},_0xb51483=setTimeout(_0xb7c9de,0x7d0);if(typeof _0xb51483['unref']===_0xc52af3(0x188))_0xb51483[_0xc52af3(0x177)]();process['stdout'][_0xc52af3(0x16b)]('',_0x1f10f5),process[_0xc52af3(0x16e)][_0xc52af3(0x16b)]('',_0x1f10f5);}export function findExecutable(_0x59efb6,_0x536027=0x1388){return new Promise(_0x10697d=>{const _0x3957db=a234_0x6447,_0x2882ca=isWindows()?'where.exe':_0x3957db(0x17f);execFile(_0x2882ca,[_0x59efb6],{'timeout':_0x536027,'windowsHide':!![]},(_0x533d35,_0x3fff1d)=>{const _0x3532bc=_0x3957db;if(_0x533d35||!_0x3fff1d[_0x3532bc(0x17c)]())_0x10697d(null);else{const _0x2dfc80=_0x3fff1d['trim']()[_0x3532bc(0x15b)](/\r?\n/)[0x0];_0x10697d(_0x2dfc80);}});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28cbac,_0x374840){const _0x14dfb3=a235_0x3a97,_0x1c5647=_0x28cbac();while(!![]){try{const _0x5b67a8=-parseInt(_0x14dfb3(0x88))/0x1*(parseInt(_0x14dfb3(0x8f))/0x2)+-parseInt(_0x14dfb3(0x9c))/0x3*(parseInt(_0x14dfb3(0x9f))/0x4)+parseInt(_0x14dfb3(0x91))/0x5+parseInt(_0x14dfb3(0x9b))/0x6+parseInt(_0x14dfb3(0x97))/0x7+parseInt(_0x14dfb3(0x94))/0x8+parseInt(_0x14dfb3(0xa0))/0x9;if(_0x5b67a8===_0x374840)break;else _0x1c5647['push'](_0x1c5647['shift']());}catch(_0x59f08c){_0x1c5647['push'](_0x1c5647['shift']());}}}(a235_0x1ac0,0xdc0e2));function a235_0x3a97(_0x5db5ed,_0x544f95){_0x5db5ed=_0x5db5ed-0x86;const _0x1ac025=a235_0x1ac0();let _0x3a973e=_0x1ac025[_0x5db5ed];return _0x3a973e;}import*as a235_0x58a7dd from'readline';import{gracefulExit}from'./process.js';export function isInteractive(){const _0x2c1419=a235_0x3a97;return process[_0x2c1419(0x86)]['isTTY']===!![];}export async function confirm(_0xfa655b){const _0x5a7553=a235_0x3a97,_0x32b994=a235_0x58a7dd[_0x5a7553(0x8d)]({'input':process[_0x5a7553(0x86)],'output':process[_0x5a7553(0x96)]});return new Promise(_0x102f17=>{const _0x182ec9=_0x5a7553;_0x32b994[_0x182ec9(0x93)](_0xfa655b+_0x182ec9(0x98),_0x41333c=>{const _0xa506bc=_0x182ec9;_0x32b994[_0xa506bc(0x9d)](),_0x102f17(_0x41333c[_0xa506bc(0x8c)]()==='y'||_0x41333c[_0xa506bc(0x8c)]()===_0xa506bc(0x8b));});});}export async function confirmKey(_0x4f1396){const _0x1bc0b6=a235_0x3a97;if(!process[_0x1bc0b6(0x86)]['isTTY'])return![];return process[_0x1bc0b6(0x8a)]['write'](_0x4f1396+_0x1bc0b6(0x9a)),new Promise(_0x2521a8=>{const _0x181f0f=_0x1bc0b6,_0x848e2f=process[_0x181f0f(0x86)];_0x848e2f[_0x181f0f(0x92)](!![]),_0x848e2f[_0x181f0f(0x95)](),_0x848e2f[_0x181f0f(0x99)](_0x181f0f(0x9e));const _0x3866f9=_0x5e3589=>{const _0x2281f1=_0x181f0f;_0x848e2f['setRawMode'](![]),_0x848e2f[_0x2281f1(0x8e)](),_0x848e2f[_0x2281f1(0x87)](_0x2281f1(0x89),_0x3866f9);if(_0x5e3589==='\x1b'){process[_0x2281f1(0x8a)]['write']('\x0a'),_0x2521a8(![]);return;}_0x5e3589==='\x03'&&(process[_0x2281f1(0x8a)][_0x2281f1(0x90)]('\x0a'),gracefulExit(0x82));if(_0x5e3589[_0x2281f1(0x8c)]()==='y'){process['stderr']['write']('y\x0a'),_0x2521a8(!![]);return;}process[_0x2281f1(0x8a)][_0x2281f1(0x90)]('\x0a'),_0x2521a8(![]);};_0x848e2f['on']('data',_0x3866f9);});}function a235_0x1ac0(){const _0x384a0e=['write','242080WjqCBc','setRawMode','question','3592696vJiIkM','resume','stdout','2218594XyswuG','\x20(y/N):\x20','setEncoding','\x20[y/N]\x20','9322590NoKoct','6lHmuzt','close','utf8','3555012mvSwvU','6205815euNIxp','stdin','removeListener','1UBEsdr','data','stderr','yes','toLowerCase','createInterface','pause','757786IhoBDs'];a235_0x1ac0=function(){return _0x384a0e;};return a235_0x1ac0();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x547fe0,_0x257e7e){const _0x305d63=a236_0x3e5f,_0x2099db=_0x547fe0();while(!![]){try{const _0x4df783=-parseInt(_0x305d63(0x147))/0x1+-parseInt(_0x305d63(0x143))/0x2+parseInt(_0x305d63(0x14b))/0x3*(-parseInt(_0x305d63(0x146))/0x4)+-parseInt(_0x305d63(0x154))/0x5+-parseInt(_0x305d63(0x14e))/0x6+-parseInt(_0x305d63(0x141))/0x7+parseInt(_0x305d63(0x148))/0x8*(parseInt(_0x305d63(0x151))/0x9);if(_0x4df783===_0x257e7e)break;else _0x2099db['push'](_0x2099db['shift']());}catch(_0x52f2c8){_0x2099db['push'](_0x2099db['shift']());}}}(a236_0x2719,0xb7b14));import a236_0x4da5cb from'ora';import{isWindows}from'./process.js';function a236_0x3e5f(_0x5bdaf5,_0x275f31){_0x5bdaf5=_0x5bdaf5-0x140;const _0x2719f2=a236_0x2719();let _0x3e5f22=_0x2719f2[_0x5bdaf5];return _0x3e5f22;}const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x37e097,_0x364071={}){const _0x40a5ad=a236_0x3e5f,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x364071;return a236_0x4da5cb({'text':_0x37e097,'color':_0x40a5ad(0x153),'stream':process[_0x40a5ad(0x150)],'isEnabled':forceEnabled||process['stderr'][_0x40a5ad(0x140)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x178bba,_0x526630,_0x1fae9a={}){const _0x5dca0a=a236_0x3e5f,_0x4587c1=_0x1fae9a[_0x5dca0a(0x14d)]??(()=>Date[_0x5dca0a(0x144)]()),_0xf90e9e=createCommandSpinner(_0x178bba,_0x1fae9a);_0xf90e9e[_0x5dca0a(0x157)]();const _0x13ff11=_0x4587c1();try{const _0xeef9eb=await _0x526630(),_0x464837=_0x4587c1()-_0x13ff11;return _0xf90e9e['stop'](),{'data':_0xeef9eb,'elapsedMs':_0x464837};}catch(_0x4d5a78){_0xf90e9e[_0x5dca0a(0x158)]();throw _0x4d5a78;}}export async function withProgressSpinner(_0x4181cd,_0x2ef79e,_0x2d7eb0={}){const _0xe52aee=a236_0x3e5f,_0x39db4e=_0x2d7eb0['clock']??(()=>Date[_0xe52aee(0x144)]()),_0x11b565=_0x2d7eb0['intervalFactory']??setInterval,_0x33a48b=createCommandSpinner(_0x4181cd,_0x2d7eb0);_0x33a48b[_0xe52aee(0x157)]();const _0x233566=_0x39db4e(),_0x180853=_0x4181cd['replace'](_0xe52aee(0x14c),'')[_0xe52aee(0x14f)]()||_0xe52aee(0x156),_0x3c665e={};let _0x3c9d50=_0x4181cd;const _0xffbb8d=()=>{const _0x35cf41=_0xe52aee;if(!_0x33a48b[_0x35cf41(0x159)])return;const _0x51f07e=_0x39db4e()-_0x233566,_0x2ebcb4=formatElapsed(_0x51f07e),_0x58fcd1=_0x3c665e['phase']?.[_0x35cf41(0x14f)]()||_0x180853,_0x6aae9c=_0x3c665e[_0x35cf41(0x155)]?_0x35cf41(0x149)+_0x3c665e[_0x35cf41(0x155)]+']':'',_0x8ce9e4=_0x3c665e[_0x35cf41(0x142)]?'\x20'+_0x3c665e[_0x35cf41(0x142)]:'',_0xbc0765=_0x58fcd1+'\x20'+_0x2ebcb4+_0x8ce9e4+_0x6aae9c;_0xbc0765!==_0x3c9d50&&_0xbc0765[_0x35cf41(0x14f)]()&&(_0x33a48b[_0x35cf41(0x14a)]=_0xbc0765,_0x3c9d50=_0xbc0765);},_0x594ead=_0x11b565(()=>{_0xffbb8d();},0x3e8),_0x2fa18c={'setPhase':_0x41bb31=>{const _0x396bd8=_0xe52aee;_0x3c665e[_0x396bd8(0x152)]=_0x41bb31;const _0x718144=_0x41bb31?.[_0x396bd8(0x14f)]()||_0x180853,_0x3799da=_0x39db4e()-_0x233566,_0xe97882=formatElapsed(_0x3799da),_0x327231=_0x3c665e['jobId']?_0x396bd8(0x149)+_0x3c665e[_0x396bd8(0x155)]+']':'',_0x390e46=_0x3c665e[_0x396bd8(0x142)]?'\x20'+_0x3c665e[_0x396bd8(0x142)]:'',_0x2ec0f4=_0x718144+'\x20'+_0xe97882+_0x390e46+_0x327231;_0x33a48b[_0x396bd8(0x159)]&&_0x2ec0f4[_0x396bd8(0x14f)]()&&(_0x33a48b[_0x396bd8(0x14a)]=_0x2ec0f4,_0x3c9d50=_0x2ec0f4);},'setJobId':_0xbb4003=>{const _0x4ec531=_0xe52aee;_0x3c665e[_0x4ec531(0x155)]=_0xbb4003,_0xffbb8d();},'setExtra':_0x127273=>{_0x3c665e['extra']=_0x127273,_0xffbb8d();}};_0xffbb8d();try{const _0x750b3=await _0x2ef79e(_0x2fa18c),_0x1d756d=_0x39db4e()-_0x233566;return{'data':_0x750b3,'elapsedMs':_0x1d756d};}finally{clearInterval(_0x594ead),_0x33a48b[_0xe52aee(0x158)]();}}export function formatElapsed(_0x5de357){const _0x3a7626=a236_0x3e5f,_0x236310=Math[_0x3a7626(0x145)](_0x5de357/0x3e8);if(_0x236310<0x3c)return(_0x5de357/0x3e8)['toFixed'](0x1)+'s';const _0x59aed7=Math['floor'](_0x236310/0x3c),_0x48d1ea=_0x236310%0x3c;if(_0x59aed7<0x3c)return _0x59aed7+'m\x20'+_0x48d1ea+'s';const _0x525330=Math['floor'](_0x59aed7/0x3c),_0x20f57d=_0x59aed7%0x3c;return _0x525330+'h\x20'+_0x20f57d+'m';}function a236_0x2719(){const _0x1ff472=['jobId','Processing','start','stop','isSpinning','isTTY','5629302UtVIun','extra','1873254UiWNCN','now','floor','16yPMayX','374573GUGtiG','3528XnBISv','\x20[Job\x20ID:\x20','text','391329OpFPkV','...','clock','8564850DLUqqc','trim','stderr','112626bdQXMz','phase','cyan','3508185QALoby'];a236_0x2719=function(){return _0x1ff472;};return a236_0x2719();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a237_0x2e92(){const _0x39f7e8=['body','decode','debug','parse','4977512UUjWCt','3034350yKfBYI','slice','5215130yPBsbC','763681oslIAp','event','pop','startsWith','713104HVQfqQ','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','2056qXDmmT','getReader','releaseLock','6DrFQts','64179KMPknm','data','1621036zPwFII','indexOf','[LLM\x20API\x20SSE]\x20'];a237_0x2e92=function(){return _0x39f7e8;};return a237_0x2e92();}(function(_0x454a15,_0x162607){const _0x3b228f=a237_0x1752,_0x42b86c=_0x454a15();while(!![]){try{const _0x2daaa6=parseInt(_0x3b228f(0x1fc))/0x1+parseInt(_0x3b228f(0x1f1))/0x2+-parseInt(_0x3b228f(0x1f9))/0x3+parseInt(_0x3b228f(0x1f8))/0x4+-parseInt(_0x3b228f(0x1fb))/0x5*(-parseInt(_0x3b228f(0x1ee))/0x6)+-parseInt(_0x3b228f(0x1e9))/0x7+parseInt(_0x3b228f(0x1eb))/0x8*(-parseInt(_0x3b228f(0x1ef))/0x9);if(_0x2daaa6===_0x162607)break;else _0x42b86c['push'](_0x42b86c['shift']());}catch(_0x1d4576){_0x42b86c['push'](_0x42b86c['shift']());}}}(a237_0x2e92,0xdf89e));export async function*parseSSEStream(_0x93fb32,_0x1ff793){const _0x5335a1=a237_0x1752;if(!_0x93fb32[_0x5335a1(0x1f4)])throw new Error('Response\x20body\x20is\x20null');const _0x596d99=_0x93fb32[_0x5335a1(0x1f4)][_0x5335a1(0x1ec)](),_0x17e715=new TextDecoder();let _0x17845='',_0x4b8b7f={};try{while(!![]){const {done:_0x5d5aa4,value:_0x57cdfc}=await _0x596d99['read']();if(_0x5d5aa4){if(_0x4b8b7f['data']){_0x1ff793?.[_0x5335a1(0x1f6)](_0x5335a1(0x1f3)+_0x4b8b7f[_0x5335a1(0x1f0)]);const _0x115829=parseSSEData(_0x4b8b7f[_0x5335a1(0x1f0)]);yield _0x115829;}break;}_0x17845+=_0x17e715[_0x5335a1(0x1f5)](_0x57cdfc,{'stream':!![]});const _0xf85de3=_0x17845['split']('\x0a');_0x17845=_0xf85de3[_0x5335a1(0x1fe)]()||'';for(const _0x4b7a1f of _0xf85de3){if(_0x4b7a1f['trim']()===''){if(_0x4b8b7f[_0x5335a1(0x1f0)]){_0x1ff793?.[_0x5335a1(0x1f6)](_0x5335a1(0x1f3)+_0x4b8b7f[_0x5335a1(0x1f0)]);const _0x37b70b=parseSSEData(_0x4b8b7f[_0x5335a1(0x1f0)]);yield _0x37b70b,_0x4b8b7f={};}continue;}if(_0x4b7a1f[_0x5335a1(0x1ff)](':'))continue;const _0x279970=_0x4b7a1f[_0x5335a1(0x1f2)](':');if(_0x279970===-0x1)continue;const _0xed2c54=_0x4b7a1f['slice'](0x0,_0x279970);let _0x2a32e8=_0x4b7a1f[_0x5335a1(0x1fa)](_0x279970+0x1);_0x2a32e8[_0x5335a1(0x1ff)]('\x20')&&(_0x2a32e8=_0x2a32e8[_0x5335a1(0x1fa)](0x1));switch(_0xed2c54){case _0x5335a1(0x1fd):_0x4b8b7f['event']=_0x2a32e8;break;case _0x5335a1(0x1f0):_0x4b8b7f[_0x5335a1(0x1f0)]=_0x4b8b7f['data']?_0x4b8b7f[_0x5335a1(0x1f0)]+'\x0a'+_0x2a32e8:_0x2a32e8;break;case'id':_0x4b8b7f['id']=_0x2a32e8;break;}}}}finally{_0x596d99[_0x5335a1(0x1ed)]();}}function a237_0x1752(_0x306dee,_0x57a916){_0x306dee=_0x306dee-0x1e9;const _0x2e92d=a237_0x2e92();let _0x17522f=_0x2e92d[_0x306dee];return _0x17522f;}function parseSSEData(_0x489de5){const _0x306534=a237_0x1752;try{return JSON[_0x306534(0x1f7)](_0x489de5);}catch(_0x1fbc4d){throw new Error(_0x306534(0x1ea)+_0x489de5,{'cause':_0x1fbc4d});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c889a,_0x12a31d){const _0x340345=a238_0x2636,_0x4910a3=_0x1c889a();while(!![]){try{const _0x3c81ab=parseInt(_0x340345(0xe5))/0x1*(-parseInt(_0x340345(0xe0))/0x2)+parseInt(_0x340345(0xe7))/0x3+parseInt(_0x340345(0xd7))/0x4*(-parseInt(_0x340345(0xe9))/0x5)+parseInt(_0x340345(0xe8))/0x6+parseInt(_0x340345(0xdf))/0x7+-parseInt(_0x340345(0xd3))/0x8*(parseInt(_0x340345(0xd5))/0x9)+-parseInt(_0x340345(0xde))/0xa*(-parseInt(_0x340345(0xda))/0xb);if(_0x3c81ab===_0x12a31d)break;else _0x4910a3['push'](_0x4910a3['shift']());}catch(_0x1ae777){_0x4910a3['push'](_0x4910a3['shift']());}}}(a238_0x3a47,0x74df7));import a238_0x4b5ad4 from'string-width';export function stringWidth(_0x4fccd3){return a238_0x4b5ad4(_0x4fccd3);}export function padEnd(_0x174865,_0x2ee2ce){const _0x38fece=stringWidth(_0x174865);if(_0x38fece>=_0x2ee2ce)return _0x174865;return _0x174865+'\x20'['repeat'](_0x2ee2ce-_0x38fece);}export function padStart(_0x240081,_0x11cdb3){const _0x18d65b=stringWidth(_0x240081);if(_0x18d65b>=_0x11cdb3)return _0x240081;return'\x20'['repeat'](_0x11cdb3-_0x18d65b)+_0x240081;}export function centerAlign(_0x4c21a3,_0x40259a){const _0xd7d050=a238_0x2636,_0x131a13=stringWidth(_0x4c21a3);if(_0x131a13>_0x40259a){if(_0x40259a<=0x1)return'…'[_0xd7d050(0xe2)](0x0,_0x40259a);let _0x5ec551=_0x4c21a3;while(stringWidth(_0x5ec551+'…')>_0x40259a){_0x5ec551=_0x5ec551['slice'](0x0,-0x1);}return _0x5ec551+'…';}if(_0x131a13===_0x40259a)return _0x4c21a3;const _0x5e9d2e=_0x40259a-_0x131a13,_0x68f0e3=Math[_0xd7d050(0xe4)](_0x5e9d2e/0x2),_0x539d93=_0x5e9d2e-_0x68f0e3;return'\x20'[_0xd7d050(0xe1)](_0x68f0e3)+_0x4c21a3+'\x20'[_0xd7d050(0xe1)](_0x539d93);}export function escapeStringLiteral(_0x48877a){const _0xabea73=a238_0x2636;if(!_0x48877a||_0x48877a[_0xabea73(0xd6)]()[_0xabea73(0xe6)]===0x0)throw new Error(_0xabea73(0xd8));const _0x5d7a8a=_0x48877a[_0xabea73(0xdd)](/'/g,'\x27\x27');return'\x27'+_0x5d7a8a+'\x27';}export function globToLike(_0x65566a){const _0x2acf26=a238_0x2636;let _0xa15ac8=_0x65566a[_0x2acf26(0xdd)](/\\/g,'\x5c\x5c')[_0x2acf26(0xdd)](/%/g,'\x5c%')[_0x2acf26(0xdd)](/_/g,'\x5c_');return _0xa15ac8=_0xa15ac8[_0x2acf26(0xdd)](/\*/g,'%')['replace'](/\?/g,'_'),_0xa15ac8;}function a238_0x2636(_0xeedcb9,_0x1a9e97){_0xeedcb9=_0xeedcb9-0xd3;const _0x3a47d6=a238_0x3a47();let _0x263653=_0x3a47d6[_0xeedcb9];return _0x263653;}export function buildLikePattern(_0x54fb71){const _0x3c9f22=a238_0x2636;if(!_0x54fb71||_0x54fb71[_0x3c9f22(0xd6)]()[_0x3c9f22(0xe6)]===0x0)throw new Error(_0x3c9f22(0xea));const _0x792f67=globToLike(_0x54fb71),_0x2f9d0f=_0x792f67[_0x3c9f22(0xdd)](/'/g,'\x27\x27');return'\x27'+_0x2f9d0f+'\x27';}export function matchGlobPattern(_0x2574a4,_0x516e67){const _0x4ce737=a238_0x2636,_0xbbfbed=_0x516e67[_0x4ce737(0xdd)](/[.+^${}()|[\]\\]/g,_0x4ce737(0xdc))['replace'](/\*/g,'.*')[_0x4ce737(0xdd)](/\?/g,'.'),_0x126ad5=new RegExp('^'+_0xbbfbed+'$');return _0x126ad5[_0x4ce737(0xd4)](_0x2574a4);}export function getSanitizedUsername(){const _0x2ae37b=a238_0x2636,_0x420369=process.env.USER||process.env.USERNAME||_0x2ae37b(0xeb);return _0x420369['replace'](/[^a-zA-Z0-9]/g,'')[_0x2ae37b(0xd9)]();}export function generateRandomHex(){const _0x368e70=a238_0x2636,_0x3e9f72=Math[_0x368e70(0xe4)](Math[_0x368e70(0xdb)]()*0xfffff);return _0x3e9f72[_0x368e70(0xe3)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x32dacd){const _0x118cfa=a238_0x2636;return _0x32dacd['toLowerCase']()[_0x118cfa(0xdd)](/[/\\:*?"<>|]/g,'-')[_0x118cfa(0xdd)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x118cfa(0xdd)](/^-|-$/g,'');}function a238_0x3a47(){const _0x4cbc9f=['\x5c$&','replace','10ENOBbw','1100379ifnOal','1326956hWnnbm','repeat','substring','toString','floor','1ahEwHF','length','1421553SdHwkI','302322hXhubw','605acGDdV','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','unknown','856xnJMRu','test','9081aYhith','trim','29196KNzxJJ','Cannot\x20escape\x20empty\x20string\x20literal','toLowerCase','15970856DBEADi','random'];a238_0x3a47=function(){return _0x4cbc9f;};return a238_0x3a47();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x272408,_0x1a5d46){const _0x10108b=a239_0x48bc,_0x52cb38=_0x272408();while(!![]){try{const _0x566676=parseInt(_0x10108b(0x1fc))/0x1*(-parseInt(_0x10108b(0x1e8))/0x2)+parseInt(_0x10108b(0x1f7))/0x3+-parseInt(_0x10108b(0x1ff))/0x4+-parseInt(_0x10108b(0x1f5))/0x5*(-parseInt(_0x10108b(0x1ef))/0x6)+-parseInt(_0x10108b(0x1fd))/0x7*(parseInt(_0x10108b(0x1ea))/0x8)+parseInt(_0x10108b(0x1f0))/0x9+-parseInt(_0x10108b(0x1e9))/0xa;if(_0x566676===_0x1a5d46)break;else _0x52cb38['push'](_0x52cb38['shift']());}catch(_0x38eeff){_0x52cb38['push'](_0x52cb38['shift']());}}}(a239_0x4d76,0xabfc6));function a239_0x4d76(){const _0x15edd2=['trim','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','333503jLuxat','7VlytJe','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','4650276XvqBCF','table','2CxLRaA','2602170HSoSgv','5503784pCLHYH','database','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','join','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','6pnwldE','11917296zogwYe','length','Pattern\x20cannot\x20be\x20just\x20a\x20dot','push','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','6090020VxoRPk','includes','1819704OrAkwa','catalog'];a239_0x4d76=function(){return _0x15edd2;};return a239_0x4d76();}function a239_0x48bc(_0x3e2ce5,_0x22863b){_0x3e2ce5=_0x3e2ce5-0x1e7;const _0x4d7606=a239_0x4d76();let _0x48bc63=_0x4d7606[_0x3e2ce5];return _0x48bc63;}function hasWildcard(_0x5720ea){const _0x297854=a239_0x48bc;return _0x5720ea[_0x297854(0x1f6)]('*')||_0x5720ea['includes']('?');}export function parseTableReference(_0x489b5d){const _0x18ae90=a239_0x48bc;if(!_0x489b5d||_0x489b5d[_0x18ae90(0x1f9)]()[_0x18ae90(0x1f1)]===0x0)throw new Error(_0x18ae90(0x1fe));const _0x74aee1=_0x489b5d['trim'](),_0x581cfb={'original':_0x74aee1},_0x4b9c9b=_0x74aee1['split']('.');if(_0x4b9c9b[_0x18ae90(0x1f1)]===0x1){const _0x19ddd6=_0x4b9c9b[0x0];if(!_0x19ddd6)throw new Error(_0x18ae90(0x1f2));_0x581cfb[_0x18ae90(0x1e7)]=_0x19ddd6;}else{if(_0x4b9c9b['length']===0x2){const [_0xcee736,_0x56631a]=_0x4b9c9b;if(!_0xcee736)throw new Error(_0x18ae90(0x1fa));if(!_0x56631a)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x581cfb[_0x18ae90(0x1eb)]=_0xcee736,_0x581cfb[_0x18ae90(0x1e7)]=_0x56631a;}else{if(_0x4b9c9b[_0x18ae90(0x1f1)]===0x3){const [_0x3f12cd,_0x59abff,_0x23f95a]=_0x4b9c9b;if(!_0x3f12cd||!_0x59abff||!_0x23f95a)throw new Error(_0x18ae90(0x1fb));_0x581cfb['catalog']=_0x3f12cd,_0x581cfb[_0x18ae90(0x1eb)]=_0x59abff,_0x581cfb[_0x18ae90(0x1e7)]=_0x23f95a;}else throw new Error(_0x18ae90(0x1ee));}}return _0x581cfb;}export function formatTableReference(_0x120fb3){const _0x2c32fe=a239_0x48bc,_0x56eed2=[];return _0x120fb3[_0x2c32fe(0x1f8)]&&_0x56eed2[_0x2c32fe(0x1f3)](_0x120fb3[_0x2c32fe(0x1f8)]),_0x120fb3['database']&&_0x56eed2[_0x2c32fe(0x1f3)](_0x120fb3[_0x2c32fe(0x1eb)]),_0x120fb3[_0x2c32fe(0x1e7)]&&_0x56eed2[_0x2c32fe(0x1f3)](_0x120fb3[_0x2c32fe(0x1e7)]),_0x56eed2[_0x2c32fe(0x1ed)]('.');}export function validateTableListReference(_0x43593a){return undefined;}export function validateTableDescribeReference(_0xf97525){const _0x26bacd=a239_0x48bc;if(!_0xf97525[_0x26bacd(0x1e7)])return _0x26bacd(0x1f4);if(_0xf97525[_0x26bacd(0x1eb)]&&hasWildcard(_0xf97525[_0x26bacd(0x1eb)]))return _0x26bacd(0x1ec);if(hasWildcard(_0xf97525['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a240_0x3bf90f=a240_0x4c66;(function(_0x330166,_0x4f6e08){const _0x30260a=a240_0x4c66,_0x3c2c51=_0x330166();while(!![]){try{const _0x305b4f=parseInt(_0x30260a(0x1a1))/0x1*(-parseInt(_0x30260a(0x1bb))/0x2)+parseInt(_0x30260a(0x1a6))/0x3+parseInt(_0x30260a(0x1b7))/0x4+parseInt(_0x30260a(0x1be))/0x5*(parseInt(_0x30260a(0x1b8))/0x6)+parseInt(_0x30260a(0x1ba))/0x7*(parseInt(_0x30260a(0x1ac))/0x8)+parseInt(_0x30260a(0x1a2))/0x9*(parseInt(_0x30260a(0x1ad))/0xa)+-parseInt(_0x30260a(0x1b2))/0xb*(parseInt(_0x30260a(0x1b3))/0xc);if(_0x305b4f===_0x4f6e08)break;else _0x3c2c51['push'](_0x3c2c51['shift']());}catch(_0x3673c7){_0x3c2c51['push'](_0x3c2c51['shift']());}}}(a240_0x83a5,0x89ead));function a240_0x83a5(){const _0x530849=['1592310AbGzGV','getLogPath','tdx.log','logs','debug','3498ORFDev','15960fgVhiR','error','init','INFO','4318316pLHdac','272388opSfFH','logger','7jGmZls','28diZfMM','addHandler','consoleHandler','25AWVvDk','info','push','warn','51361TzEQBF','9WIgwnA','fileHandler','logLevel','Session\x20ended','364527JLrSSE','logDir','shutdown','trace','fileOnly','logFileName','956752nomSMJ'];a240_0x83a5=function(){return _0x530849;};return a240_0x83a5();}import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';function a240_0x4c66(_0x2c1c04,_0x16c766){_0x2c1c04=_0x2c1c04-0x19e;const _0x83a5b1=a240_0x83a5();let _0x4c665=_0x83a5b1[_0x2c1c04];return _0x4c665;}import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{[a240_0x3bf90f(0x1a4)];[a240_0x3bf90f(0x1aa)];[a240_0x3bf90f(0x1a7)];[a240_0x3bf90f(0x1ab)];[a240_0x3bf90f(0x1b9)];[a240_0x3bf90f(0x1a3)]=null;[a240_0x3bf90f(0x1bd)]=null;constructor(_0x229473=LogLevel[a240_0x3bf90f(0x1b6)],_0x209f2d=![],_0x431d28,_0x212397=a240_0x3bf90f(0x1af)){const _0x3798ff=a240_0x3bf90f;this[_0x3798ff(0x1a4)]=_0x229473,this[_0x3798ff(0x1aa)]=_0x209f2d,this[_0x3798ff(0x1a7)]=_0x431d28||join(getGlobalCacheDir(),_0x3798ff(0x1b0)),this[_0x3798ff(0x1ab)]=_0x212397,this[_0x3798ff(0x1b9)]=Logger['of']('tdx');}async[a240_0x3bf90f(0x1b5)](){const _0x3ae12a=a240_0x3bf90f,_0x4a3e7d=join(this['logDir'],this[_0x3ae12a(0x1ab)]);if(Logger['isInitialized']()){!this[_0x3ae12a(0x1aa)]&&(this[_0x3ae12a(0x1bd)]=new ConsoleHandler({'minLevel':LogLevel[_0x3ae12a(0x1b6)],'colors':!![]}),Logger[_0x3ae12a(0x1bc)](this['consoleHandler']));return;}this[_0x3ae12a(0x1a3)]=new FileHandler({'filePath':_0x4a3e7d});const _0x1c5227=[this[_0x3ae12a(0x1a3)]];!this[_0x3ae12a(0x1aa)]&&(this[_0x3ae12a(0x1bd)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x1c5227[_0x3ae12a(0x19f)](this['consoleHandler'])),await Logger['init']({'defaultLevel':this[_0x3ae12a(0x1a4)],'handlers':_0x1c5227,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a240_0x3bf90f(0x1b1)](..._0x1bfd91){const _0x2889a4=a240_0x3bf90f;this['logger'][_0x2889a4(0x1b1)](..._0x1bfd91);}[a240_0x3bf90f(0x1a9)](..._0x3d76f9){const _0x4065a0=a240_0x3bf90f;this[_0x4065a0(0x1b9)][_0x4065a0(0x1a9)](..._0x3d76f9);}['info'](..._0x5cb2e3){const _0x33a087=a240_0x3bf90f;this['logger'][_0x33a087(0x19e)](..._0x5cb2e3);}[a240_0x3bf90f(0x1a0)](..._0x22adc7){const _0x5ee774=a240_0x3bf90f;this[_0x5ee774(0x1b9)][_0x5ee774(0x1a0)](..._0x22adc7);}[a240_0x3bf90f(0x1b4)](..._0x1390da){const _0x3757d8=a240_0x3bf90f;this[_0x3757d8(0x1b9)][_0x3757d8(0x1b4)](..._0x1390da);}async['close'](){const _0x5275e0=a240_0x3bf90f;this['logger'][_0x5275e0(0x19e)](_0x5275e0(0x1a5)),await Logger[_0x5275e0(0x1a8)]();}[a240_0x3bf90f(0x1ae)](){const _0x2f9736=a240_0x3bf90f;return join(this[_0x2f9736(0x1a7)],this[_0x2f9736(0x1ab)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a241_0x458370=a241_0x347e;(function(_0x329080,_0x4b0502){const _0x182987=a241_0x347e,_0x3031c7=_0x329080();while(!![]){try{const _0x2eb92b=-parseInt(_0x182987(0x1d3))/0x1+-parseInt(_0x182987(0x1fd))/0x2*(parseInt(_0x182987(0x1cf))/0x3)+-parseInt(_0x182987(0x1fa))/0x4+parseInt(_0x182987(0x1e0))/0x5+-parseInt(_0x182987(0x1ef))/0x6*(-parseInt(_0x182987(0x1e3))/0x7)+parseInt(_0x182987(0x1d4))/0x8*(parseInt(_0x182987(0x1e9))/0x9)+parseInt(_0x182987(0x1f9))/0xa;if(_0x2eb92b===_0x4b0502)break;else _0x3031c7['push'](_0x3031c7['shift']());}catch(_0x30b502){_0x3031c7['push'](_0x3031c7['shift']());}}}(a241_0x32d5,0x563c4));function a241_0x32d5(){const _0xf8a9dc=['1589RcNEWE','utils/version-check','version','lastCheck','tdx\x20upgrade\x20--next','HTTP\x20','3325086ykpJEY','toISOString','channel','yellow','stable','\x0aUpdate\x20available:\x20','1110GLZAMc','tdx\x20upgrade','background','data','\x0aRun:\x20','read','unref','green','stderr','next','5892300HbBBxw','1940328wbsVAw','error','latest','5864uOGFlu','Invalid\x20version\x20format','216EbUfsp','statusCode','write','Request\x20timeout','99620PySwRB','8LDMJki','cyan','Run:','end','latestVersion','updateAvailable','utils/version-check-next','isTTY','getTime','destroy','socket','dim','741735RltNpe','now','last_version_check'];a241_0x32d5=function(){return _0xf8a9dc;};return a241_0x32d5();}import{get}from'https';import{gt,valid}from'semver';import a241_0x26e657 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE='https://registry.npmjs.org/@treasuredata/tdx',TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a241_0x458370(0x1e2),a241_0x458370(0x1e4)),nextVersionCache=createGlobalCache('last_version_check_next',a241_0x458370(0x1da));function getCacheForChannel(_0x2b44d1){return _0x2b44d1==='next'?nextVersionCache:stableVersionCache;}function readCache(_0x57a4ea){const _0x30e4da=a241_0x458370;return getCacheForChannel(_0x57a4ea)[_0x30e4da(0x1f4)]()??null;}function writeCache(_0x204bc0,_0x2c93a2){const _0x1c921b=a241_0x458370;try{getCacheForChannel(_0x2c93a2)['write']({'lastCheck':new Date()[_0x1c921b(0x1ea)](),'latestVersion':_0x204bc0});}catch{}}function isCacheValid(_0x173c8f){const _0x12ce4d=a241_0x458370;if(!_0x173c8f)return![];const _0x59ff02=new Date(_0x173c8f[_0x12ce4d(0x1e6)])[_0x12ce4d(0x1dc)](),_0x5ea4d2=Date[_0x12ce4d(0x1e1)]();return _0x5ea4d2-_0x59ff02<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x39b92b=a241_0x458370(0x1ed),_0xb3b6b1){const _0x168af0=a241_0x458370,_0x3482fb=_0xb3b6b1?.[_0x168af0(0x1f1)]??![],_0x22c20c=_0x39b92b===_0x168af0(0x1f8)?_0x168af0(0x1f8):_0x168af0(0x1fc),_0x1bf7df=NPM_REGISTRY_BASE+'/'+_0x22c20c;return new Promise((_0x565d26,_0x3f20ec)=>{const _0x27ffc2=_0x168af0,_0x2e7c9b=get(_0x1bf7df,{'timeout':TIMEOUT_MS},_0x103c2c=>{const _0x41b9f3=a241_0x347e;if(_0x103c2c[_0x41b9f3(0x1d0)]!==0xc8){clearTimeout(_0x1203f7),_0x3f20ec(new Error(_0x41b9f3(0x1e8)+_0x103c2c['statusCode']));return;}let _0xfc0c45='';_0x103c2c['on'](_0x41b9f3(0x1f2),_0x51855e=>{_0xfc0c45+=_0x51855e;}),_0x103c2c['on'](_0x41b9f3(0x1d7),()=>{const _0x41e715=_0x41b9f3;clearTimeout(_0x1203f7);try{const _0x125448=JSON['parse'](_0xfc0c45);if(!valid(_0x125448[_0x41e715(0x1e5)])){_0x3f20ec(new Error(_0x41e715(0x1ce)));return;}_0x565d26(_0x125448[_0x41e715(0x1e5)]);}catch(_0x506ffc){_0x3f20ec(_0x506ffc);}});})['on'](_0x27ffc2(0x1fb),_0x890414=>{clearTimeout(_0x1203f7),_0x3f20ec(_0x890414);}),_0x1203f7=setTimeout(()=>{const _0x1f4fdd=_0x27ffc2;_0x2e7c9b[_0x1f4fdd(0x1dd)](),_0x3f20ec(new Error(_0x1f4fdd(0x1d2)));},TIMEOUT_MS);_0x3482fb&&(_0x2e7c9b['on'](_0x27ffc2(0x1de),_0x4cb44f=>{const _0x5a3f54=_0x27ffc2;_0x4cb44f[_0x5a3f54(0x1f5)]();}),_0x1203f7[_0x27ffc2(0x1f5)]());});}function a241_0x347e(_0xcaa3c1,_0xb77ce8){_0xcaa3c1=_0xcaa3c1-0x1ce;const _0x32d556=a241_0x32d5();let _0x347edd=_0x32d556[_0xcaa3c1];return _0x347edd;}export async function checkForUpdate(_0x5a6635,_0x17c448='stable'){const _0x4dfc65=a241_0x458370;try{const _0x5eb842=readCache(_0x17c448);if(isCacheValid(_0x5eb842)){const _0x31edb4=gt(_0x5eb842[_0x4dfc65(0x1d8)],_0x5a6635);return{'updateAvailable':_0x31edb4,'currentVersion':_0x5a6635,'latestVersion':_0x5eb842[_0x4dfc65(0x1d8)],'channel':_0x17c448};}const _0x4884f1=await fetchLatestVersion(_0x17c448,{'background':!![]});writeCache(_0x4884f1,_0x17c448);const _0xd23b53=gt(_0x4884f1,_0x5a6635);return{'updateAvailable':_0xd23b53,'currentVersion':_0x5a6635,'latestVersion':_0x4884f1,'channel':_0x17c448};}catch{return null;}}export function displayUpdateNotification(_0x36ade9){const _0x213b8e=a241_0x458370;if(!_0x36ade9[_0x213b8e(0x1d9)])return;const _0x569e1f=_0x36ade9[_0x213b8e(0x1eb)]===_0x213b8e(0x1f8)?_0x213b8e(0x1e7):_0x213b8e(0x1f0),_0x6e3118=process[_0x213b8e(0x1f7)][_0x213b8e(0x1db)]&&!process.env.NO_COLOR,_0x2765a2=_0x6e3118?a241_0x26e657['gray']('→'):'→',_0x419b37=_0x6e3118?a241_0x26e657[_0x213b8e(0x1df)](_0x36ade9['currentVersion']):_0x36ade9['currentVersion'],_0x1571a5=_0x6e3118?a241_0x26e657[_0x213b8e(0x1f6)](_0x36ade9[_0x213b8e(0x1d8)]):_0x36ade9[_0x213b8e(0x1d8)],_0x2fc784=_0x6e3118?a241_0x26e657[_0x213b8e(0x1d5)](_0x569e1f):_0x569e1f,_0x9123f2=_0x6e3118?'\x0a'+a241_0x26e657[_0x213b8e(0x1ec)]('Update\x20available:')+'\x20'+_0x419b37+'\x20'+_0x2765a2+'\x20'+_0x1571a5+'\x0a'+a241_0x26e657['dim'](_0x213b8e(0x1d6))+'\x20'+_0x2fc784+'\x0a':_0x213b8e(0x1ee)+_0x419b37+'\x20'+_0x2765a2+'\x20'+_0x1571a5+_0x213b8e(0x1f3)+_0x2fc784+'\x0a';process['stderr'][_0x213b8e(0x1d1)](_0x9123f2);}
|