@treasuredata/tdx 0.26.6 → 0.26.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.d.ts.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/job-command.js.map +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/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.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/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.d.ts +14 -37
- package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/agent-yaml.js.map +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.d.ts +82 -0
- package/dist/sdk/agent/tool-target-registry.d.ts.map +1 -0
- package/dist/sdk/agent/tool-target-registry.js +1 -0
- package/dist/sdk/agent/tool-target-registry.js.map +1 -0
- package/dist/sdk/agent/types/agent-def.d.ts +3 -2
- package/dist/sdk/agent/types/agent-def.d.ts.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.d.ts +20 -0
- package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.d.ts +2 -2
- package/dist/sdk/client/td-api-client.d.ts.map +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/td-api-client.js.map +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.d.ts +1 -1
- package/dist/sdk/job.d.ts.map +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/job.js.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.d.ts.map +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/index.js.map +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a171_0x583328=a171_0xe79b;(function(_0x470749,_0x22f1e5){const _0x4d1f61=a171_0xe79b,_0x2879e6=_0x470749();while(!![]){try{const _0x59fea6=parseInt(_0x4d1f61(0x1a0))/0x1*(-parseInt(_0x4d1f61(0x17c))/0x2)+parseInt(_0x4d1f61(0x193))/0x3*(parseInt(_0x4d1f61(0x17d))/0x4)+-parseInt(_0x4d1f61(0x1ab))/0x5*(-parseInt(_0x4d1f61(0x1ac))/0x6)+-parseInt(_0x4d1f61(0x19b))/0x7+-parseInt(_0x4d1f61(0x1ae))/0x8+parseInt(_0x4d1f61(0x1af))/0x9*(-parseInt(_0x4d1f61(0x19a))/0xa)+parseInt(_0x4d1f61(0x195))/0xb*(parseInt(_0x4d1f61(0x1b8))/0xc);if(_0x59fea6===_0x22f1e5)break;else _0x2879e6['push'](_0x2879e6['shift']());}catch(_0x3c1899){_0x2879e6['push'](_0x2879e6['shift']());}}}(a171_0x5dbb,0x5e5d5));import{LogLevel as a171_0x59a595,logLevelToString}from'./types.js';function a171_0xe79b(_0xb8bb4c,_0x56b146){_0xb8bb4c=_0xb8bb4c-0x17a;const _0x5dbbea=a171_0x5dbb();let _0xe79b12=_0x5dbbea[_0xb8bb4c];return _0xe79b12;}const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a171_0x59a595['INFO'],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x21f3d2){const _0x169f12=a171_0xe79b;if(typeof _0x21f3d2===_0x169f12(0x18e))return _0x21f3d2;if(_0x21f3d2 instanceof Error)return _0x21f3d2[_0x169f12(0x19d)]||_0x21f3d2[_0x169f12(0x198)]+':\x20'+_0x21f3d2[_0x169f12(0x184)];try{return JSON[_0x169f12(0x1a8)](_0x21f3d2,(_0x2242d9,_0x18d8da)=>{const _0x559eb9=_0x169f12;if(_0x18d8da instanceof Error)return{'name':_0x18d8da['name'],'message':_0x18d8da['message'],'stack':_0x18d8da[_0x559eb9(0x19d)],'cause':_0x18d8da[_0x559eb9(0x1a6)]};return _0x18d8da;});}catch{return String(_0x21f3d2);}}export class Logger{[a171_0x583328(0x1b1)];constructor(_0xd0942a){const _0x3274af=a171_0x583328;this[_0x3274af(0x1b1)]=_0xd0942a;}static['of'](_0x41a5ff){const _0x45f036=a171_0x583328,_0x40b35b=typeof _0x41a5ff===_0x45f036(0x18e)?_0x41a5ff:_0x41a5ff[_0x45f036(0x198)];let _0x18db8c=state['loggers']['get'](_0x40b35b);return!_0x18db8c&&(_0x18db8c=new Logger(_0x40b35b),state[_0x45f036(0x180)][_0x45f036(0x1a2)](_0x40b35b,_0x18db8c)),_0x18db8c;}static async[a171_0x583328(0x18d)](_0x512457={}){const _0x266716=a171_0x583328;state[_0x266716(0x19f)]=_0x512457['defaultLevel']??a171_0x59a595[_0x266716(0x182)],state[_0x266716(0x186)]=_0x512457[_0x266716(0x186)]??[],state[_0x266716(0x17f)]=_0x512457[_0x266716(0x17f)]??null,state[_0x266716(0x19c)][_0x266716(0x1b3)]();if(_0x512457[_0x266716(0x19c)])for(const [_0x1a3030,_0x228c28]of Object[_0x266716(0x1a4)](_0x512457[_0x266716(0x19c)])){state[_0x266716(0x19c)]['set'](_0x1a3030,_0x228c28);}for(const _0x803aea of state[_0x266716(0x186)]){_0x803aea[_0x266716(0x18d)]&&await _0x803aea[_0x266716(0x18d)]();}state[_0x266716(0x183)]=!![];for(const _0x4b22da of state[_0x266716(0x199)]){Logger[_0x266716(0x1aa)](_0x4b22da);}state[_0x266716(0x199)]=[];}static[a171_0x583328(0x1a7)](_0x51e74e,_0x3b445a){const _0x23fc21=a171_0x583328;state[_0x23fc21(0x19c)][_0x23fc21(0x1a2)](_0x51e74e,_0x3b445a);}static[a171_0x583328(0x194)](_0x43fc7b){state['defaultLevel']=_0x43fc7b;}static[a171_0x583328(0x18c)](_0x114129){const _0x52c653=a171_0x583328;state[_0x52c653(0x186)][_0x52c653(0x188)](_0x114129),state[_0x52c653(0x183)]&&_0x114129[_0x52c653(0x18d)]&&_0x114129['init']();}static[a171_0x583328(0x190)](){const _0x28fa3c=a171_0x583328;state[_0x28fa3c(0x186)]=[];}static async[a171_0x583328(0x189)](){const _0x4f513e=a171_0x583328;for(const _0x2b2b84 of state[_0x4f513e(0x186)]){_0x2b2b84[_0x4f513e(0x1b7)]&&await _0x2b2b84['close']();}state[_0x4f513e(0x186)]=[],state[_0x4f513e(0x183)]=![],state[_0x4f513e(0x180)]['clear'](),state['pendingRecords']=[];}static['reset'](){const _0x33da59=a171_0x583328;state[_0x33da59(0x183)]=![],state[_0x33da59(0x19f)]=a171_0x59a595[_0x33da59(0x182)],state[_0x33da59(0x19c)][_0x33da59(0x1b3)](),state[_0x33da59(0x186)]=[],state[_0x33da59(0x17f)]=null,state['loggers'][_0x33da59(0x1b3)](),state[_0x33da59(0x199)]=[];}static['isInitialized'](){const _0x51e4c9=a171_0x583328;return state[_0x51e4c9(0x183)];}static[a171_0x583328(0x1b5)](_0x372796){const _0x261510=a171_0x583328;if(state[_0x261510(0x19c)]['has'](_0x372796))return state[_0x261510(0x19c)]['get'](_0x372796);const _0x1f2793=_0x372796[_0x261510(0x18a)]('.');for(let _0x571631=_0x1f2793[_0x261510(0x1b0)]-0x1;_0x571631>0x0;_0x571631--){const _0x286aed=_0x1f2793[_0x261510(0x187)](0x0,_0x571631)['join']('.');if(state[_0x261510(0x19c)][_0x261510(0x181)](_0x286aed))return state[_0x261510(0x19c)][_0x261510(0x17b)](_0x286aed);}return state[_0x261510(0x19f)];}[a171_0x583328(0x1a5)](_0x312fe4){const _0x50670b=a171_0x583328,_0x16eb59=Logger[_0x50670b(0x1b5)](this[_0x50670b(0x1b1)]);return _0x312fe4>=_0x16eb59;}static['dispatch'](_0x56c703){const _0x1f4d30=a171_0x583328;for(const _0x417e02 of state[_0x1f4d30(0x186)]){_0x417e02[_0x1f4d30(0x1b2)](_0x56c703);}}['log'](_0x304f77,_0x4f46db){const _0x3a644d=a171_0x583328;if(!this[_0x3a644d(0x1a5)](_0x304f77))return;const _0xf25b26=_0x4f46db['map'](_0x3a10d3=>typeof _0x3a10d3===_0x3a644d(0x1a3)?_0x3a10d3():_0x3a10d3),_0x1a8104=_0xf25b26['map'](safeStringify)[_0x3a644d(0x1ad)]('\x20'),_0x3eaccb={'timestamp':new Date(),'level':_0x304f77,'component':this[_0x3a644d(0x1b1)],'message':_0x1a8104};if(!state[_0x3a644d(0x183)]){state['pendingRecords'][_0x3a644d(0x1b0)]<MAX_PENDING_RECORDS&&state[_0x3a644d(0x199)]['push'](_0x3eaccb);return;}Logger[_0x3a644d(0x1aa)](_0x3eaccb);}[a171_0x583328(0x1a9)](..._0x46f52c){const _0x3f1b15=a171_0x583328;this[_0x3f1b15(0x19e)](a171_0x59a595[_0x3f1b15(0x17a)],_0x46f52c);}[a171_0x583328(0x1b4)](..._0x5374ee){const _0x51e098=a171_0x583328;this[_0x51e098(0x19e)](a171_0x59a595['DEBUG'],_0x5374ee);}[a171_0x583328(0x197)](..._0xc556c4){const _0x18dc4c=a171_0x583328;this['log'](a171_0x59a595[_0x18dc4c(0x182)],_0xc556c4);}['warn'](..._0xf985f2){const _0x340b0e=a171_0x583328;this[_0x340b0e(0x19e)](a171_0x59a595[_0x340b0e(0x196)],_0xf985f2);}[a171_0x583328(0x192)](..._0x92aac4){const _0x4719a6=a171_0x583328;this[_0x4719a6(0x19e)](a171_0x59a595[_0x4719a6(0x17e)],_0x92aac4);}static[a171_0x583328(0x18b)](){const _0x1b3bcf=a171_0x583328;return state[_0x1b3bcf(0x17f)];}static[a171_0x583328(0x185)](_0x302051){const _0x42a859=a171_0x583328;if(state[_0x42a859(0x17f)])return state[_0x42a859(0x17f)][_0x42a859(0x185)](_0x302051);return _0x302051[_0x42a859(0x1b6)][_0x42a859(0x18f)]()+'\x20['+logLevelToString(_0x302051[_0x42a859(0x191)])+_0x42a859(0x1a1)+_0x302051['component']+']\x20'+_0x302051['message'];}}function a171_0x5dbb(){const _0x58641e=['level','error','3oDpjee','setDefaultLevel','693QWeBNA','WARN','info','name','pendingRecords','40HNMfdD','2789885ueliJE','levelOverrides','stack','log','defaultLevel','1AQIhvp',']\x20[','set','function','entries','shouldLog','cause','setLogLevel','stringify','trace','dispatch','163645mqAvtK','138aqyJIK','join','4604584NBvbKi','1260369RAPGKM','length','component','handle','clear','debug','getEffectiveLevel','timestamp','close','273264GBNitG','TRACE','get','1227088JeXAdB','1387800hXkQvw','ERROR','formatter','loggers','has','INFO','initialized','message','format','handlers','slice','push','shutdown','split','getFormatter','addHandler','init','string','toISOString','clearHandlers'];a171_0x5dbb=function(){return _0x58641e;};return a171_0x5dbb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f189e,_0x358244){const _0x11c0a0=a172_0x26f8,_0x4ce7df=_0x3f189e();while(!![]){try{const _0x3a15ee=-parseInt(_0x11c0a0(0x7c))/0x1+-parseInt(_0x11c0a0(0x7f))/0x2*(parseInt(_0x11c0a0(0x88))/0x3)+-parseInt(_0x11c0a0(0x8a))/0x4*(-parseInt(_0x11c0a0(0x7a))/0x5)+-parseInt(_0x11c0a0(0x71))/0x6*(-parseInt(_0x11c0a0(0x85))/0x7)+-parseInt(_0x11c0a0(0x8c))/0x8+parseInt(_0x11c0a0(0x78))/0x9+parseInt(_0x11c0a0(0x79))/0xa;if(_0x3a15ee===_0x358244)break;else _0x4ce7df['push'](_0x4ce7df['shift']());}catch(_0x20db0d){_0x4ce7df['push'](_0x4ce7df['shift']());}}}(a172_0x503b,0xb8c97));export var LogLevel;(function(_0x3c6e9f){const _0x1314b0=a172_0x26f8;_0x3c6e9f[_0x3c6e9f[_0x1314b0(0x81)]=-0x2]=_0x1314b0(0x81),_0x3c6e9f[_0x3c6e9f[_0x1314b0(0x74)]=-0x1]=_0x1314b0(0x74),_0x3c6e9f[_0x3c6e9f[_0x1314b0(0x86)]=0x0]=_0x1314b0(0x86),_0x3c6e9f[_0x3c6e9f['WARN']=0x1]=_0x1314b0(0x72),_0x3c6e9f[_0x3c6e9f['ERROR']=0x2]=_0x1314b0(0x7b);}(LogLevel||(LogLevel={})));export function parseLogLevel(_0x9b1385){const _0x1ef8c5=a172_0x26f8;switch(_0x9b1385['toUpperCase']()){case _0x1ef8c5(0x81):return LogLevel[_0x1ef8c5(0x81)];case'DEBUG':return LogLevel[_0x1ef8c5(0x74)];case _0x1ef8c5(0x86):return LogLevel[_0x1ef8c5(0x86)];case'WARN':case _0x1ef8c5(0x82):return LogLevel[_0x1ef8c5(0x72)];case _0x1ef8c5(0x7b):return LogLevel[_0x1ef8c5(0x7b)];default:return LogLevel[_0x1ef8c5(0x86)];}}export function logLevelToString(_0x3cef06){const _0x10fd20=a172_0x26f8;switch(_0x3cef06){case LogLevel['TRACE']:return _0x10fd20(0x89);case LogLevel[_0x10fd20(0x74)]:return _0x10fd20(0x75);case LogLevel[_0x10fd20(0x86)]:return _0x10fd20(0x76);case LogLevel[_0x10fd20(0x72)]:return _0x10fd20(0x83);case LogLevel[_0x10fd20(0x7b)]:return _0x10fd20(0x87);default:return'info';}}function a172_0x26f8(_0x1040c3,_0x46a20d){_0x1040c3=_0x1040c3-0x71;const _0x503b68=a172_0x503b();let _0x26f80f=_0x503b68[_0x1040c3];return _0x26f80f;}function a172_0x503b(){const _0x5192d8=['error','1920486qnRrxh','trace','4bRadXt','abs','4861656Hadtmj','getHours','toString','padStart','5861706HBblAE','WARN','floor','DEBUG','debug','info','getMilliseconds','7386948NzLYfp','5941860MLoQXS','4078700qpJBRH','ERROR','562731zgKpKH','getSeconds','getDate','4hqLPBJ','getFullYear','TRACE','WARNING','warn','getTimezoneOffset','7WIvOLD','INFO'];a172_0x503b=function(){return _0x5192d8;};return a172_0x503b();}export function formatTimestamp(_0x188e72){const _0x4731bf=a172_0x26f8,_0x5fa15d=_0x188e72[_0x4731bf(0x80)](),_0x14452c=(_0x188e72['getMonth']()+0x1)[_0x4731bf(0x8e)]()[_0x4731bf(0x8f)](0x2,'0'),_0x26d1c7=_0x188e72[_0x4731bf(0x7e)]()[_0x4731bf(0x8e)]()[_0x4731bf(0x8f)](0x2,'0'),_0x200bb6=_0x188e72[_0x4731bf(0x8d)]()[_0x4731bf(0x8e)]()[_0x4731bf(0x8f)](0x2,'0'),_0x486e30=_0x188e72['getMinutes']()[_0x4731bf(0x8e)]()[_0x4731bf(0x8f)](0x2,'0'),_0x24ae9f=_0x188e72[_0x4731bf(0x7d)]()['toString']()[_0x4731bf(0x8f)](0x2,'0'),_0xaa98a8=_0x188e72[_0x4731bf(0x77)]()['toString']()[_0x4731bf(0x8f)](0x3,'0'),_0x5b3186=-_0x188e72[_0x4731bf(0x84)](),_0x2d40b0=Math[_0x4731bf(0x73)](Math[_0x4731bf(0x8b)](_0x5b3186)/0x3c),_0x2a79a2=Math[_0x4731bf(0x8b)](_0x5b3186)%0x3c,_0x1c1d27=_0x5b3186>=0x0?'+':'-',_0x301669=''+_0x1c1d27+_0x2d40b0['toString']()['padStart'](0x2,'0')+_0x2a79a2[_0x4731bf(0x8e)]()['padStart'](0x2,'0');return _0x5fa15d+'-'+_0x14452c+'-'+_0x26d1c7+'\x20'+_0x200bb6+':'+_0x486e30+':'+_0x24ae9f+'.'+_0xaa98a8+_0x301669;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a173_0x2ff7(_0x215bab,_0xd7a810){_0x215bab=_0x215bab-0x1b2;const _0x497f07=a173_0x497f();let _0x2ff7fc=_0x497f07[_0x215bab];return _0x2ff7fc;}function a173_0x497f(){const _0x389d0d=['Invalid\x20limit\x20value:\x20','2470362beNXdh','.\x20Must\x20be\x20a\x20number.','3831926zRwJiH','21764nRtzRR','isInteger','.\x20Must\x20be\x20a\x20positive\x20number.','58604BPQmtI','.\x20Must\x20be\x20a\x20positive\x20integer.','Invalid\x20timeout\x20value:\x20','156kxELte','.\x20Must\x20be\x20an\x20integer.','5OiSrzo','1179JsJmXN','1134284xUmxfm','16040gwMCEF','1893152VyMTxo'];a173_0x497f=function(){return _0x389d0d;};return a173_0x497f();}(function(_0xd1177f,_0x1abfd1){const _0x16758c=a173_0x2ff7,_0x2e89f7=_0xd1177f();while(!![]){try{const _0x160b20=-parseInt(_0x16758c(0x1be))/0x1+parseInt(_0x16758c(0x1bb))/0x2*(parseInt(_0x16758c(0x1c1))/0x3)+parseInt(_0x16758c(0x1b4))/0x4*(-parseInt(_0x16758c(0x1b2))/0x5)+-parseInt(_0x16758c(0x1b8))/0x6+parseInt(_0x16758c(0x1ba))/0x7+-parseInt(_0x16758c(0x1b6))/0x8+-parseInt(_0x16758c(0x1b3))/0x9*(-parseInt(_0x16758c(0x1b5))/0xa);if(_0x160b20===_0x1abfd1)break;else _0x2e89f7['push'](_0x2e89f7['shift']());}catch(_0x3f3995){_0x2e89f7['push'](_0x2e89f7['shift']());}}}(a173_0x497f,0x5143c));export function validateLimitOption(_0x3a20b9){const _0x2296c9=a173_0x2ff7;if(!Number[_0x2296c9(0x1bc)](_0x3a20b9))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x3a20b9+_0x2296c9(0x1c2)};if(_0x3a20b9<=0x0)return{'isValid':![],'error':_0x2296c9(0x1b7)+_0x3a20b9+_0x2296c9(0x1bf)};return{'isValid':!![],'value':_0x3a20b9};}export function validateTimeoutOption(_0x5cbb20,_0xeba6e5=0x1e){const _0x3c0908=a173_0x2ff7;if(_0x5cbb20===undefined)return{'isValid':!![],'value':_0xeba6e5};const _0x5d525d=typeof _0x5cbb20==='number'?_0x5cbb20:parseFloat(_0x5cbb20);if(isNaN(_0x5d525d))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x5cbb20+_0x3c0908(0x1b9)};if(_0x5d525d<=0x0)return{'isValid':![],'error':_0x3c0908(0x1c0)+_0x5d525d+_0x3c0908(0x1bd)};return{'isValid':!![],'value':_0x5d525d};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2075e5,_0x331f52){const _0x18e83e=a174_0x2e1d,_0xfc8307=_0x2075e5();while(!![]){try{const _0x9e76a4=parseInt(_0x18e83e(0x131))/0x1+parseInt(_0x18e83e(0x135))/0x2*(parseInt(_0x18e83e(0x12d))/0x3)+parseInt(_0x18e83e(0x134))/0x4+-parseInt(_0x18e83e(0x133))/0x5+parseInt(_0x18e83e(0x138))/0x6+-parseInt(_0x18e83e(0x130))/0x7*(parseInt(_0x18e83e(0x137))/0x8)+-parseInt(_0x18e83e(0x13b))/0x9*(parseInt(_0x18e83e(0x13e))/0xa);if(_0x9e76a4===_0x331f52)break;else _0xfc8307['push'](_0xfc8307['shift']());}catch(_0x186687){_0xfc8307['push'](_0xfc8307['shift']());}}}(a174_0x1783,0x8a2f3));import{createServer}from'node:net';export async function isPortAvailable(_0x4c9e45){return new Promise(_0x369ed7=>{const _0x298e91=a174_0x2e1d,_0x50da1c=createServer();_0x50da1c[_0x298e91(0x13f)](_0x298e91(0x13c),_0x223f65=>{const _0xa8d119=_0x298e91;_0x223f65[_0xa8d119(0x12f)]===_0xa8d119(0x136)?_0x369ed7(![]):_0x369ed7(![]);}),_0x50da1c[_0x298e91(0x13f)](_0x298e91(0x13a),()=>{const _0xddeb41=_0x298e91;_0x50da1c[_0xddeb41(0x12e)](),_0x369ed7(!![]);}),_0x50da1c['listen'](_0x4c9e45,_0x298e91(0x13d));});}function a174_0x2e1d(_0x5210de,_0x50a503){_0x5210de=_0x5210de-0x12d;const _0x178300=a174_0x1783();let _0x2e1dd6=_0x178300[_0x5210de];return _0x2e1dd6;}function a174_0x1783(){const _0x37da6f=['48GhFTwA','3746094xHUTuK','No\x20available\x20port\x20found\x20between\x20','listening','8803224DWoQOL','error','0.0.0.0','10WCZhQQ','once','67629IHcrOh','close','code','733285XRGAoD','1008483oyMRjp','\x20and\x20','5523185UAQKnj','3962908DfTxHe','58YUutxl','EADDRINUSE'];a174_0x1783=function(){return _0x37da6f;};return a174_0x1783();}export async function findAvailablePort(_0x28a1fd=0xfa0,_0x5ea3c2=0x64){const _0x1b6b12=a174_0x2e1d;for(let _0x56e8ba=0x0;_0x56e8ba<_0x5ea3c2;_0x56e8ba++){const _0x9d21cf=_0x28a1fd+_0x56e8ba;if(await isPortAvailable(_0x9d21cf))return _0x9d21cf;}throw new Error(_0x1b6b12(0x139)+_0x28a1fd+_0x1b6b12(0x132)+(_0x28a1fd+_0x5ea3c2-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x37fecd=a175_0x1594;(function(_0x9766b0,_0x123c39){const _0x1e678f=a175_0x1594,_0x53145b=_0x9766b0();while(!![]){try{const _0x39189e=-parseInt(_0x1e678f(0x162))/0x1+-parseInt(_0x1e678f(0x135))/0x2*(parseInt(_0x1e678f(0x138))/0x3)+-parseInt(_0x1e678f(0x141))/0x4+-parseInt(_0x1e678f(0x12b))/0x5+parseInt(_0x1e678f(0x15e))/0x6+parseInt(_0x1e678f(0x157))/0x7+-parseInt(_0x1e678f(0x14a))/0x8*(-parseInt(_0x1e678f(0x160))/0x9);if(_0x39189e===_0x123c39)break;else _0x53145b['push'](_0x53145b['shift']());}catch(_0x83f908){_0x53145b['push'](_0x53145b['shift']());}}}(a175_0x3f37,0xbda7b));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash',a175_0x37fecd(0x145),'sh',a175_0x37fecd(0x147),'ksh',a175_0x37fecd(0x136),a175_0x37fecd(0x149),'dash',a175_0x37fecd(0x12f),a175_0x37fecd(0x13a),'nu','ion',a175_0x37fecd(0x150),a175_0x37fecd(0x155)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a175_0x37fecd(0x14c),a175_0x37fecd(0x153),'cursor','electron',a175_0x37fecd(0x161)]);function getProcessInfoWindows(_0x38afc2){const _0x35c29a=a175_0x37fecd;try{if(!Number[_0x35c29a(0x148)](_0x38afc2)||_0x38afc2<=0x0)return null;const _0x3835d9=_0x35c29a(0x142)+_0x38afc2+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x47c98c=execSync(_0x35c29a(0x144)+_0x3835d9+'\x22',{'encoding':_0x35c29a(0x15b),'windowsHide':!![],'stdio':[_0x35c29a(0x12c),_0x35c29a(0x12c),_0x35c29a(0x12c)]})[_0x35c29a(0x158)]();if(!_0x47c98c)return null;const [_0x5afd8e,..._0x1441e5]=_0x47c98c[_0x35c29a(0x130)](','),_0x3fcfbc=parseInt(_0x5afd8e,0xa),_0x15c536=_0x1441e5[_0x35c29a(0x131)](',')[_0x35c29a(0x158)]();if(isNaN(_0x3fcfbc)||!_0x15c536)return null;return{'pid':_0x38afc2,'ppid':_0x3fcfbc,'comm':_0x15c536[_0x35c29a(0x14b)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x314a5c){const _0x18d60c=a175_0x37fecd;try{const _0x1def35=0x400000;if(!Number['isInteger'](_0x314a5c)||_0x314a5c<=0x0||_0x314a5c>_0x1def35)return null;const _0x508722=execSync(_0x18d60c(0x133)+_0x314a5c+_0x18d60c(0x132),{'encoding':_0x18d60c(0x15b),'stdio':_0x18d60c(0x12c)})[_0x18d60c(0x158)](),[_0x4da763,..._0x29d5c7]=_0x508722[_0x18d60c(0x130)](/\s+/),_0x22d5a1=parseInt(_0x4da763,0xa),_0x185657=_0x29d5c7[_0x18d60c(0x131)]('\x20');if(isNaN(_0x22d5a1))return null;return{'pid':_0x314a5c,'ppid':_0x22d5a1,'comm':_0x185657};}catch{return null;}}function getProcessInfo(_0x4a6f42){const _0x4661fe=a175_0x37fecd;if(process[_0x4661fe(0x156)]===_0x4661fe(0x12a))return getProcessInfoWindows(_0x4a6f42);return getProcessInfoPosix(_0x4a6f42);}function getBasename(_0x32ccfb){const _0x3e6a5d=a175_0x37fecd;return _0x32ccfb[_0x3e6a5d(0x14b)](/^-/,'')[_0x3e6a5d(0x130)]('/')[_0x3e6a5d(0x14f)]()?.[_0x3e6a5d(0x140)]()||'';}function isShell(_0x46cbf5){return SHELL_NAMES['has'](getBasename(_0x46cbf5));}function a175_0x1594(_0x3b158f,_0x505258){_0x3b158f=_0x3b158f-0x129;const _0x3f3767=a175_0x3f37();let _0x1594b0=_0x3f3767[_0x3b158f];return _0x1594b0;}function isEphemeralShellSpawner(_0x585e10){const _0x2b2ee3=a175_0x37fecd;return EPHEMERAL_SHELL_SPAWNERS[_0x2b2ee3(0x13e)](getBasename(_0x585e10));}let cachedShellPID;function findShellPID(){const _0x5933f1=a175_0x37fecd;if(process[_0x5933f1(0x15d)]===undefined)return process[_0x5933f1(0x143)];let _0x4cb6cf=process[_0x5933f1(0x15d)];const _0x412fc3=0xa;let _0x395083=0x0;while(_0x395083<_0x412fc3){const _0x13adb0=getProcessInfo(_0x4cb6cf);if(!_0x13adb0)break;if(isShell(_0x13adb0[_0x5933f1(0x146)])){const _0x1c9595=getProcessInfo(_0x13adb0[_0x5933f1(0x15d)]);if(_0x1c9595&&isEphemeralShellSpawner(_0x1c9595[_0x5933f1(0x146)])){_0x4cb6cf=_0x13adb0[_0x5933f1(0x15d)],_0x395083++;continue;}return _0x13adb0[_0x5933f1(0x143)];}if(_0x13adb0[_0x5933f1(0x15d)]===0x0||_0x13adb0['ppid']===0x1){if(isShell(_0x13adb0['comm']))return _0x13adb0['pid'];break;}_0x4cb6cf=_0x13adb0[_0x5933f1(0x15d)],_0x395083++;}return process[_0x5933f1(0x15d)]!==undefined?process[_0x5933f1(0x15d)]:process[_0x5933f1(0x143)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x5898d6){const _0x2e960c=a175_0x37fecd;if(!Number[_0x2e960c(0x148)](_0x5898d6)||_0x5898d6<=0x0)return![];try{return process[_0x2e960c(0x137)](_0x5898d6,0x0),!![];}catch{return![];}}export function openBrowser(_0x51704f){const _0x1cad1c=a175_0x37fecd;let _0x56e8f1;try{_0x56e8f1=new URL(_0x51704f);}catch{throw new Error(_0x1cad1c(0x13c)+_0x51704f);}if(_0x56e8f1[_0x1cad1c(0x152)]!==_0x1cad1c(0x15a)&&_0x56e8f1[_0x1cad1c(0x152)]!==_0x1cad1c(0x134))throw new Error(_0x1cad1c(0x13f)+_0x56e8f1[_0x1cad1c(0x152)]);const _0x23cc3b=_0x56e8f1[_0x1cad1c(0x12e)],_0x19548b=process['platform'];if(_0x19548b===_0x1cad1c(0x12a))spawn(_0x1cad1c(0x13d),['/c',_0x1cad1c(0x159),'',_0x23cc3b],{'detached':!![],'stdio':_0x1cad1c(0x154)})[_0x1cad1c(0x163)]();else{const _0x161dfc=_0x19548b===_0x1cad1c(0x151)?_0x1cad1c(0x14d):'xdg-open';spawn(_0x161dfc,[_0x23cc3b],{'detached':!![],'stdio':'ignore'})[_0x1cad1c(0x163)]();}}export function isWindows(){const _0x563a75=a175_0x37fecd;return process[_0x563a75(0x156)]===_0x563a75(0x12a);}export function getCrossSpawnOptions(_0x63a14){return{..._0x63a14??{},'shell':isWindows()};}export function escapeWindowsArg(_0xd3e4e2){const _0x202a20=a175_0x37fecd;if(!/[ \t"&|<>^%!`\r\n]/[_0x202a20(0x15c)](_0xd3e4e2))return _0xd3e4e2;const _0x55eabb=_0xd3e4e2['replace'](/"/g,'\x22\x22');return'\x22'+_0x55eabb+'\x22';}function a175_0x3f37(){const _0x2203f6=['90ukvXtP','treasure\x20studio','1077223trhjLi','unref','error','win32','6628005JxEQuy','pipe','stderr','href','pwsh','split','join','\x20-o\x20ppid=,comm=','ps\x20-p\x20','https:','31274rdoTSh','tcsh','kill','39rtmfoE','data','powershell','stdout','Invalid\x20URL:\x20','cmd.exe','has','Unsupported\x20protocol:\x20','toLowerCase','403152eWcidV','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','pid','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','zsh','comm','fish','isInteger','csh','1743304QLxNzW','replace','claude','open','toString','pop','elvish','darwin','protocol','code','ignore','xonsh','platform','4168885QJOFdj','trim','start','http:','utf-8','test','ppid','4254210FZTHDd','exit'];a175_0x3f37=function(){return _0x2203f6;};return a175_0x3f37();}export function crossSpawn(_0x3c5576,_0x59dee1,_0xc4d3aa){const _0x2d2451=a175_0x37fecd;if(isWindows()){const _0x4c991f=escapeWindowsArg(_0x3c5576),_0x4fbfb8=_0x59dee1['map'](escapeWindowsArg),_0x30a984=[_0x4c991f,..._0x4fbfb8][_0x2d2451(0x131)]('\x20');return spawn(_0x30a984,[],{..._0xc4d3aa,'shell':!![]});}return spawn(_0x3c5576,_0x59dee1,{..._0xc4d3aa,'shell':![]});}export function gracefulExit(_0x3e8da2=0x0){const _0x3ac9ee=a175_0x37fecd;isWindows()?setImmediate(()=>process[_0x3ac9ee(0x15f)](_0x3e8da2)):process['exit'](_0x3e8da2);}export function findExecutable(_0x59c816,_0x46939c=0x1388){return new Promise(_0x4dc68b=>{const _0x5f2e30=a175_0x1594,_0x1ce338=isWindows()?'where.exe':'which';let _0x276a89=![];const _0xb0c900=crossSpawn(_0x1ce338,[_0x59c816],{'stdio':'pipe','shell':isWindows()}),_0x5bf7b8=setTimeout(()=>{!_0x276a89&&(_0x276a89=!![],_0xb0c900['kill'](),_0x4dc68b(null));},_0x46939c);let _0x1aa312='';_0xb0c900[_0x5f2e30(0x13b)]?.['on'](_0x5f2e30(0x139),_0xa50169=>{const _0x2ca5b4=_0x5f2e30;_0x1aa312+=_0xa50169[_0x2ca5b4(0x14e)]();}),_0xb0c900[_0x5f2e30(0x12d)]?.['on'](_0x5f2e30(0x139),()=>{}),_0xb0c900['on'](_0x5f2e30(0x15f),_0x74ca4=>{const _0x25ee8e=_0x5f2e30;if(_0x276a89)return;_0x276a89=!![],clearTimeout(_0x5bf7b8);if(_0x74ca4===0x0&&_0x1aa312[_0x25ee8e(0x158)]()){const _0x4c3faf=_0x1aa312['trim']()[_0x25ee8e(0x130)](/\r?\n/)[0x0];_0x4dc68b(_0x4c3faf);}else _0x4dc68b(null);}),_0xb0c900['on'](_0x5f2e30(0x129),()=>{if(_0x276a89)return;_0x276a89=!![],clearTimeout(_0x5bf7b8),_0x4dc68b(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x269b8c,_0x540e1d){const _0x35b3d8=a176_0x1730,_0x50319a=_0x269b8c();while(!![]){try{const _0x17fab1=parseInt(_0x35b3d8(0x99))/0x1*(parseInt(_0x35b3d8(0x98))/0x2)+-parseInt(_0x35b3d8(0x9d))/0x3+parseInt(_0x35b3d8(0xa5))/0x4*(parseInt(_0x35b3d8(0x9a))/0x5)+-parseInt(_0x35b3d8(0xb0))/0x6+-parseInt(_0x35b3d8(0xaf))/0x7*(parseInt(_0x35b3d8(0xb1))/0x8)+-parseInt(_0x35b3d8(0x9b))/0x9+-parseInt(_0x35b3d8(0xa6))/0xa*(-parseInt(_0x35b3d8(0xa2))/0xb);if(_0x17fab1===_0x540e1d)break;else _0x50319a['push'](_0x50319a['shift']());}catch(_0x2b28ab){_0x50319a['push'](_0x50319a['shift']());}}}(a176_0x48e4,0x67a6d));function a176_0x48e4(){const _0x800981=['setRawMode','941228xdlBzp','45170pgArWT','\x20[y/N]\x20','question','stderr','\x20(y/N):\x20','setEncoding','stdin','toLowerCase','isTTY','7Baewuv','4982016MQoJkc','1730632IGmvMU','createInterface','removeListener','5134IneHHn','247pgrwRe','5IuXGOJ','4458951jVZoOc','pause','1613547ulvmQI','write','data','exit','utf8','3982IqrEdr','close'];a176_0x48e4=function(){return _0x800981;};return a176_0x48e4();}function a176_0x1730(_0x2dd961,_0x1d4d89){_0x2dd961=_0x2dd961-0x98;const _0x48e4c7=a176_0x48e4();let _0x1730c5=_0x48e4c7[_0x2dd961];return _0x1730c5;}import*as a176_0x2d8ba2 from'readline';export function isInteractive(){const _0x29965=a176_0x1730;return process[_0x29965(0xac)][_0x29965(0xae)]===!![];}export async function confirm(_0x4e1fe9){const _0x11ffa2=a176_0x1730,_0x3ae374=a176_0x2d8ba2[_0x11ffa2(0xb2)]({'input':process[_0x11ffa2(0xac)],'output':process['stdout']});return new Promise(_0x38aff0=>{const _0x206f33=_0x11ffa2;_0x3ae374[_0x206f33(0xa8)](_0x4e1fe9+_0x206f33(0xaa),_0x28b5dc=>{const _0x223a67=_0x206f33;_0x3ae374[_0x223a67(0xa3)](),_0x38aff0(_0x28b5dc['toLowerCase']()==='y'||_0x28b5dc[_0x223a67(0xad)]()==='yes');});});}export async function confirmKey(_0x178fb2){const _0x32fd41=a176_0x1730;if(!process[_0x32fd41(0xac)][_0x32fd41(0xae)])return![];return process['stderr'][_0x32fd41(0x9e)](_0x178fb2+_0x32fd41(0xa7)),new Promise(_0x120bdf=>{const _0xc00bd3=_0x32fd41,_0x1f5139=process[_0xc00bd3(0xac)];_0x1f5139[_0xc00bd3(0xa4)](!![]),_0x1f5139['resume'](),_0x1f5139[_0xc00bd3(0xab)](_0xc00bd3(0xa1));const _0x2c0822=_0x5b27fd=>{const _0x5e95a8=_0xc00bd3;_0x1f5139[_0x5e95a8(0xa4)](![]),_0x1f5139[_0x5e95a8(0x9c)](),_0x1f5139[_0x5e95a8(0xb3)](_0x5e95a8(0x9f),_0x2c0822);if(_0x5b27fd==='\x1b'){process[_0x5e95a8(0xa9)][_0x5e95a8(0x9e)]('\x0a'),_0x120bdf(![]);return;}_0x5b27fd==='\x03'&&(process['stderr'][_0x5e95a8(0x9e)]('\x0a'),process[_0x5e95a8(0xa0)](0x82));if(_0x5b27fd[_0x5e95a8(0xad)]()==='y'){process[_0x5e95a8(0xa9)]['write']('y\x0a'),_0x120bdf(!![]);return;}process['stderr']['write']('\x0a'),_0x120bdf(![]);};_0x1f5139['on'](_0xc00bd3(0x9f),_0x2c0822);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe06c42,_0x36b61d){const _0x23b382=a177_0x26a3,_0x4f8a03=_0xe06c42();while(!![]){try{const _0x47135b=-parseInt(_0x23b382(0x1dd))/0x1*(-parseInt(_0x23b382(0x1d9))/0x2)+-parseInt(_0x23b382(0x1ce))/0x3+parseInt(_0x23b382(0x1d7))/0x4*(parseInt(_0x23b382(0x1de))/0x5)+parseInt(_0x23b382(0x1d5))/0x6*(parseInt(_0x23b382(0x1c9))/0x7)+parseInt(_0x23b382(0x1db))/0x8+parseInt(_0x23b382(0x1e2))/0x9+-parseInt(_0x23b382(0x1c7))/0xa*(parseInt(_0x23b382(0x1ca))/0xb);if(_0x47135b===_0x36b61d)break;else _0x4f8a03['push'](_0x4f8a03['shift']());}catch(_0x3e6e32){_0x4f8a03['push'](_0x4f8a03['shift']());}}}(a177_0x362f,0xa6dfe));import a177_0xc4ffba from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x411b5e,_0x3d7c42={}){const _0x7be7a5=a177_0x26a3,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x3d7c42;return a177_0xc4ffba({'text':_0x411b5e,'color':_0x7be7a5(0x1d6),'stream':process[_0x7be7a5(0x1cf)],'isEnabled':forceEnabled||process[_0x7be7a5(0x1cf)][_0x7be7a5(0x1df)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x30c263,_0x42dfc7,_0x420ce3={}){const _0xca00a6=a177_0x26a3,_0x2302b4=_0x420ce3['clock']??(()=>Date['now']()),_0x541ec0=createCommandSpinner(_0x30c263,_0x420ce3);_0x541ec0['start']();const _0x5654e0=_0x2302b4();try{const _0x4aee9b=await _0x42dfc7(),_0x8b45a3=_0x2302b4()-_0x5654e0;return _0x541ec0[_0xca00a6(0x1d8)](),{'data':_0x4aee9b,'elapsedMs':_0x8b45a3};}catch(_0x25f348){_0x541ec0[_0xca00a6(0x1d8)]();throw _0x25f348;}}export async function withProgressSpinner(_0x2caee5,_0x4dc562,_0x34e6f7={}){const _0x4337f4=a177_0x26a3,_0x40c3c7=_0x34e6f7[_0x4337f4(0x1c6)]??(()=>Date[_0x4337f4(0x1cd)]()),_0x360bf7=_0x34e6f7['intervalFactory']??setInterval,_0x1d2214=createCommandSpinner(_0x2caee5,_0x34e6f7);_0x1d2214[_0x4337f4(0x1e0)]();const _0xfb5802=_0x40c3c7(),_0x4f3c39=_0x2caee5[_0x4337f4(0x1cc)](_0x4337f4(0x1c8),'')[_0x4337f4(0x1d2)]()||'Processing',_0x2311e5={};let _0x61fb=_0x2caee5;const _0x59735b=()=>{const _0x20a1da=_0x4337f4;if(!_0x1d2214['isSpinning'])return;const _0x37780e=_0x40c3c7()-_0xfb5802,_0x20d2aa=formatElapsed(_0x37780e),_0x251df3=_0x2311e5[_0x20a1da(0x1d3)]?.[_0x20a1da(0x1d2)]()||_0x4f3c39,_0x43dbe5=_0x2311e5[_0x20a1da(0x1da)]?'\x20[Job\x20ID:\x20'+_0x2311e5['jobId']+']':'',_0x57ca3c=_0x2311e5[_0x20a1da(0x1d4)]?'\x20'+_0x2311e5[_0x20a1da(0x1d4)]:'',_0x291c95=_0x251df3+'\x20'+_0x20d2aa+_0x57ca3c+_0x43dbe5;_0x291c95!==_0x61fb&&_0x291c95[_0x20a1da(0x1d2)]()&&(_0x1d2214[_0x20a1da(0x1dc)]=_0x291c95,_0x61fb=_0x291c95);},_0x18127f=_0x360bf7(()=>{_0x59735b();},0x3e8),_0x41286b={'setPhase':_0x1fca23=>{const _0x42bc2b=_0x4337f4;_0x2311e5[_0x42bc2b(0x1d3)]=_0x1fca23;const _0x25555d=_0x1fca23?.['trim']()||_0x4f3c39,_0x4f2332=_0x40c3c7()-_0xfb5802,_0x565c5d=formatElapsed(_0x4f2332),_0x58378c=_0x2311e5[_0x42bc2b(0x1da)]?_0x42bc2b(0x1e1)+_0x2311e5[_0x42bc2b(0x1da)]+']':'',_0x4df4e6=_0x2311e5[_0x42bc2b(0x1d4)]?'\x20'+_0x2311e5[_0x42bc2b(0x1d4)]:'',_0x15bc76=_0x25555d+'\x20'+_0x565c5d+_0x4df4e6+_0x58378c;_0x1d2214[_0x42bc2b(0x1d1)]&&_0x15bc76['trim']()&&(_0x1d2214['text']=_0x15bc76,_0x61fb=_0x15bc76);},'setJobId':_0x2fdc15=>{_0x2311e5['jobId']=_0x2fdc15,_0x59735b();},'setExtra':_0x586c44=>{_0x2311e5['extra']=_0x586c44,_0x59735b();}};_0x59735b();try{const _0x296c50=await _0x4dc562(_0x41286b),_0x549ec3=_0x40c3c7()-_0xfb5802;return{'data':_0x296c50,'elapsedMs':_0x549ec3};}finally{clearInterval(_0x18127f),_0x1d2214[_0x4337f4(0x1d8)]();}}function a177_0x26a3(_0x11ceae,_0x1be537){_0x11ceae=_0x11ceae-0x1c6;const _0x362fd8=a177_0x362f();let _0x26a3ec=_0x362fd8[_0x11ceae];return _0x26a3ec;}export function formatElapsed(_0x569186){const _0x5ee653=a177_0x26a3,_0x3a810b=Math['floor'](_0x569186/0x3e8);if(_0x3a810b<0x3c)return(_0x569186/0x3e8)[_0x5ee653(0x1cb)](0x1)+'s';const _0x435cd5=Math[_0x5ee653(0x1d0)](_0x3a810b/0x3c),_0xfba1f=_0x3a810b%0x3c;if(_0x435cd5<0x3c)return _0x435cd5+'m\x20'+_0xfba1f+'s';const _0x3384e3=Math[_0x5ee653(0x1d0)](_0x435cd5/0x3c),_0x2bc61f=_0x435cd5%0x3c;return _0x3384e3+'h\x20'+_0x2bc61f+'m';}function a177_0x362f(){const _0x18b75e=['11bRATuS','toFixed','replace','now','1212735UcrsXw','stderr','floor','isSpinning','trim','phase','extra','2562YbFDwT','cyan','8cByzGS','stop','2fjptsj','jobId','2589736OlZOZe','text','596026NqBoBg','2809390gtnOon','isTTY','start','\x20[Job\x20ID:\x20','9553140OSfhKm','clock','30027120ZRjkUv','...','16156sTqCXd'];a177_0x362f=function(){return _0x18b75e;};return a177_0x362f();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a178_0x26ed(_0x48c0e8,_0x2e8bc1){_0x48c0e8=_0x48c0e8-0x8a;const _0x3875a1=a178_0x3875();let _0x26ed39=_0x3875a1[_0x48c0e8];return _0x26ed39;}function a178_0x3875(){const _0x5a6c8d=['8ZDdkNQ','244760LeWVaW','trim','getReader','event','releaseLock','760388aJAOcB','18btxfng','split','startsWith','debug','data','pop','read','649170EFUzZE','decode','indexOf','139808NRALhS','slice','12pBDzKj','Response\x20body\x20is\x20null','380455nEpxew','1008406KfkTvA','body','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','448788SEiJTr','[LLM\x20API\x20SSE]\x20'];a178_0x3875=function(){return _0x5a6c8d;};return a178_0x3875();}(function(_0x4a5526,_0x5efbb9){const _0x5a42cc=a178_0x26ed,_0x2be5d7=_0x4a5526();while(!![]){try{const _0x5cef16=-parseInt(_0x5a42cc(0x94))/0x1+-parseInt(_0x5a42cc(0x9f))/0x2+parseInt(_0x5a42cc(0x9c))/0x3+-parseInt(_0x5a42cc(0xa4))/0x4+parseInt(_0x5a42cc(0x98))/0x5*(parseInt(_0x5a42cc(0x96))/0x6)+-parseInt(_0x5a42cc(0x99))/0x7*(-parseInt(_0x5a42cc(0x9e))/0x8)+-parseInt(_0x5a42cc(0x8a))/0x9*(-parseInt(_0x5a42cc(0x91))/0xa);if(_0x5cef16===_0x5efbb9)break;else _0x2be5d7['push'](_0x2be5d7['shift']());}catch(_0x450984){_0x2be5d7['push'](_0x2be5d7['shift']());}}}(a178_0x3875,0x1e1f9));export async function*parseSSEStream(_0x34129c,_0x132a1f){const _0x570e02=a178_0x26ed;if(!_0x34129c[_0x570e02(0x9a)])throw new Error(_0x570e02(0x97));const _0x3a9a2a=_0x34129c['body'][_0x570e02(0xa1)](),_0x1a6e53=new TextDecoder();let _0xfd82d6='',_0x16ce9c={};try{while(!![]){const {done:_0x3df333,value:_0x567223}=await _0x3a9a2a[_0x570e02(0x90)]();if(_0x3df333){if(_0x16ce9c['data']){_0x132a1f?.[_0x570e02(0x8d)](_0x570e02(0x9d)+_0x16ce9c[_0x570e02(0x8e)]);const _0x107128=parseSSEData(_0x16ce9c[_0x570e02(0x8e)]);yield _0x107128;}break;}_0xfd82d6+=_0x1a6e53[_0x570e02(0x92)](_0x567223,{'stream':!![]});const _0x3e4745=_0xfd82d6[_0x570e02(0x8b)]('\x0a');_0xfd82d6=_0x3e4745[_0x570e02(0x8f)]()||'';for(const _0x6cf66f of _0x3e4745){if(_0x6cf66f[_0x570e02(0xa0)]()===''){if(_0x16ce9c[_0x570e02(0x8e)]){_0x132a1f?.[_0x570e02(0x8d)](_0x570e02(0x9d)+_0x16ce9c[_0x570e02(0x8e)]);const _0x2aaad0=parseSSEData(_0x16ce9c[_0x570e02(0x8e)]);yield _0x2aaad0,_0x16ce9c={};}continue;}if(_0x6cf66f[_0x570e02(0x8c)](':'))continue;const _0xf17ff8=_0x6cf66f[_0x570e02(0x93)](':');if(_0xf17ff8===-0x1)continue;const _0x3af5ec=_0x6cf66f[_0x570e02(0x95)](0x0,_0xf17ff8);let _0x5dd37f=_0x6cf66f[_0x570e02(0x95)](_0xf17ff8+0x1);_0x5dd37f[_0x570e02(0x8c)]('\x20')&&(_0x5dd37f=_0x5dd37f[_0x570e02(0x95)](0x1));switch(_0x3af5ec){case'event':_0x16ce9c[_0x570e02(0xa2)]=_0x5dd37f;break;case _0x570e02(0x8e):_0x16ce9c[_0x570e02(0x8e)]=_0x16ce9c[_0x570e02(0x8e)]?_0x16ce9c[_0x570e02(0x8e)]+'\x0a'+_0x5dd37f:_0x5dd37f;break;case'id':_0x16ce9c['id']=_0x5dd37f;break;}}}}finally{_0x3a9a2a[_0x570e02(0xa3)]();}}function parseSSEData(_0x2dc496){const _0x1a8c1c=a178_0x26ed;try{return JSON['parse'](_0x2dc496);}catch(_0x1d27f8){throw new Error(_0x1a8c1c(0x9b)+_0x2dc496,{'cause':_0x1d27f8});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a0a8d,_0x5c5526){const _0x16a1a7=a179_0x37b0,_0x1cd3c2=_0x3a0a8d();while(!![]){try{const _0xa21f8e=parseInt(_0x16a1a7(0x1e0))/0x1+-parseInt(_0x16a1a7(0x1eb))/0x2*(parseInt(_0x16a1a7(0x1ee))/0x3)+parseInt(_0x16a1a7(0x1f0))/0x4*(parseInt(_0x16a1a7(0x1f4))/0x5)+parseInt(_0x16a1a7(0x1e3))/0x6+parseInt(_0x16a1a7(0x1e5))/0x7*(-parseInt(_0x16a1a7(0x1f2))/0x8)+-parseInt(_0x16a1a7(0x1f1))/0x9+-parseInt(_0x16a1a7(0x1e1))/0xa*(-parseInt(_0x16a1a7(0x1e4))/0xb);if(_0xa21f8e===_0x5c5526)break;else _0x1cd3c2['push'](_0x1cd3c2['shift']());}catch(_0x48422b){_0x1cd3c2['push'](_0x1cd3c2['shift']());}}}(a179_0x4afe,0xb2660));import a179_0x2b04cd from'string-width';export function stringWidth(_0x33ecac){return a179_0x2b04cd(_0x33ecac);}export function padEnd(_0x16ec57,_0x3913ed){const _0x2b3f31=a179_0x37b0,_0x1a68f5=stringWidth(_0x16ec57);if(_0x1a68f5>=_0x3913ed)return _0x16ec57;return _0x16ec57+'\x20'[_0x2b3f31(0x1ed)](_0x3913ed-_0x1a68f5);}export function padStart(_0x4d6cc2,_0x539033){const _0x37fcc9=stringWidth(_0x4d6cc2);if(_0x37fcc9>=_0x539033)return _0x4d6cc2;return'\x20'['repeat'](_0x539033-_0x37fcc9)+_0x4d6cc2;}export function centerAlign(_0x4b5997,_0x2bd7ef){const _0x22f818=a179_0x37b0,_0x58eb23=stringWidth(_0x4b5997);if(_0x58eb23>_0x2bd7ef){if(_0x2bd7ef<=0x1)return'…'[_0x22f818(0x1e6)](0x0,_0x2bd7ef);let _0xdf6c3a=_0x4b5997;while(stringWidth(_0xdf6c3a+'…')>_0x2bd7ef){_0xdf6c3a=_0xdf6c3a[_0x22f818(0x1e7)](0x0,-0x1);}return _0xdf6c3a+'…';}if(_0x58eb23===_0x2bd7ef)return _0x4b5997;const _0x349f65=_0x2bd7ef-_0x58eb23,_0x1354b2=Math[_0x22f818(0x1e8)](_0x349f65/0x2),_0x20f86c=_0x349f65-_0x1354b2;return'\x20'[_0x22f818(0x1ed)](_0x1354b2)+_0x4b5997+'\x20'[_0x22f818(0x1ed)](_0x20f86c);}export function escapeStringLiteral(_0x51f046){const _0x241307=a179_0x37b0;if(!_0x51f046||_0x51f046[_0x241307(0x1f6)]()['length']===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x2bf9e2=_0x51f046['replace'](/'/g,'\x27\x27');return'\x27'+_0x2bf9e2+'\x27';}function a179_0x37b0(_0x5c7145,_0x4f11ee){_0x5c7145=_0x5c7145-0x1e0;const _0x4afe64=a179_0x4afe();let _0x37b0cf=_0x4afe64[_0x5c7145];return _0x37b0cf;}export function globToLike(_0x28d039){const _0x99836d=a179_0x37b0;let _0x4eee55=_0x28d039[_0x99836d(0x1e2)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x99836d(0x1e2)](/_/g,'\x5c_');return _0x4eee55=_0x4eee55[_0x99836d(0x1e2)](/\*/g,'%')['replace'](/\?/g,'_'),_0x4eee55;}export function buildLikePattern(_0x5baa9b){const _0x324e9a=a179_0x37b0;if(!_0x5baa9b||_0x5baa9b[_0x324e9a(0x1f6)]()[_0x324e9a(0x1ec)]===0x0)throw new Error(_0x324e9a(0x1f5));const _0xaa6bda=globToLike(_0x5baa9b),_0x39462c=_0xaa6bda[_0x324e9a(0x1e2)](/'/g,'\x27\x27');return'\x27'+_0x39462c+'\x27';}export function matchGlobPattern(_0x47ef6e,_0x518f4f){const _0x25ce05=a179_0x37b0,_0xe6a5f=_0x518f4f[_0x25ce05(0x1e2)](/[.+^${}()|[\]\\]/g,_0x25ce05(0x1f3))[_0x25ce05(0x1e2)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3c5b80=new RegExp('^'+_0xe6a5f+'$');return _0x3c5b80[_0x25ce05(0x1ef)](_0x47ef6e);}export function getSanitizedUsername(){const _0x1c6b6f=a179_0x37b0,_0x3b82fa=process.env.USER||process.env.USERNAME||'unknown';return _0x3b82fa[_0x1c6b6f(0x1e2)](/[^a-zA-Z0-9]/g,'')[_0x1c6b6f(0x1ea)]();}function a179_0x4afe(){const _0xbf122b=['\x5c$&','276205fUHXFz','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','trim','45425mymrNu','2830XdEcQO','replace','3155304vtDXWQ','74470wKEsjl','5759684pAoKZr','substring','slice','floor','toString','toLowerCase','12dsZcHN','length','repeat','119982buGQit','test','4cTXiRj','6740676HUFwhH','8hNUCSz'];a179_0x4afe=function(){return _0xbf122b;};return a179_0x4afe();}export function generateRandomHex(){const _0x1349bd=a179_0x37b0,_0x4afc54=Math[_0x1349bd(0x1e8)](Math['random']()*0xfffff);return _0x4afc54[_0x1349bd(0x1e9)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x47a5da){const _0x59f2c2=a179_0x37b0;return _0x47a5da[_0x59f2c2(0x1ea)]()[_0x59f2c2(0x1e2)](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0x59f2c2(0x1e2)](/-+/g,'-')[_0x59f2c2(0x1e2)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4cf3f5,_0x296bdd){const _0x919311=a180_0x28cb,_0x319fd1=_0x4cf3f5();while(!![]){try{const _0x3783c0=parseInt(_0x919311(0x1ef))/0x1*(-parseInt(_0x919311(0x1fe))/0x2)+parseInt(_0x919311(0x1ec))/0x3+parseInt(_0x919311(0x1f8))/0x4+parseInt(_0x919311(0x1eb))/0x5+-parseInt(_0x919311(0x1e8))/0x6*(parseInt(_0x919311(0x1f3))/0x7)+parseInt(_0x919311(0x1e5))/0x8*(-parseInt(_0x919311(0x1fa))/0x9)+parseInt(_0x919311(0x1e6))/0xa*(parseInt(_0x919311(0x1f5))/0xb);if(_0x3783c0===_0x296bdd)break;else _0x319fd1['push'](_0x319fd1['shift']());}catch(_0x4df560){_0x319fd1['push'](_0x319fd1['shift']());}}}(a180_0x4247,0x75e3f));function hasWildcard(_0x16f849){const _0x3ff23d=a180_0x28cb;return _0x16f849[_0x3ff23d(0x1f1)]('*')||_0x16f849[_0x3ff23d(0x1f1)]('?');}export function parseTableReference(_0x54f147){const _0x26c53b=a180_0x28cb;if(!_0x54f147||_0x54f147[_0x26c53b(0x1f0)]()[_0x26c53b(0x1f4)]===0x0)throw new Error(_0x26c53b(0x1f6));const _0x316685=_0x54f147[_0x26c53b(0x1f0)](),_0x1947b0={'original':_0x316685},_0x54c96d=_0x316685[_0x26c53b(0x1e4)]('.');if(_0x54c96d[_0x26c53b(0x1f4)]===0x1){const _0x2f9584=_0x54c96d[0x0];if(!_0x2f9584)throw new Error(_0x26c53b(0x1fd));_0x1947b0['table']=_0x2f9584;}else{if(_0x54c96d[_0x26c53b(0x1f4)]===0x2){const [_0xfc1c62,_0x157716]=_0x54c96d;if(!_0xfc1c62)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x157716)throw new Error(_0x26c53b(0x1ee));_0x1947b0[_0x26c53b(0x1e9)]=_0xfc1c62,_0x1947b0[_0x26c53b(0x1f2)]=_0x157716;}else{if(_0x54c96d[_0x26c53b(0x1f4)]===0x3){const [_0x3de73d,_0x29ffb1,_0x5adc0f]=_0x54c96d;if(!_0x3de73d||!_0x29ffb1||!_0x5adc0f)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x1947b0[_0x26c53b(0x1f9)]=_0x3de73d,_0x1947b0[_0x26c53b(0x1e9)]=_0x29ffb1,_0x1947b0[_0x26c53b(0x1f2)]=_0x5adc0f;}else throw new Error(_0x26c53b(0x1e7));}}return _0x1947b0;}export function formatTableReference(_0xcce79e){const _0x3905a3=a180_0x28cb,_0x4fa768=[];return _0xcce79e[_0x3905a3(0x1f9)]&&_0x4fa768[_0x3905a3(0x1f7)](_0xcce79e[_0x3905a3(0x1f9)]),_0xcce79e['database']&&_0x4fa768[_0x3905a3(0x1f7)](_0xcce79e[_0x3905a3(0x1e9)]),_0xcce79e[_0x3905a3(0x1f2)]&&_0x4fa768[_0x3905a3(0x1f7)](_0xcce79e['table']),_0x4fa768[_0x3905a3(0x1ea)]('.');}export function validateTableListReference(_0x357424){return undefined;}function a180_0x28cb(_0x166b93,_0xbb299a){_0x166b93=_0x166b93-0x1e4;const _0x424766=a180_0x4247();let _0x28cb9d=_0x424766[_0x166b93];return _0x28cb9d;}function a180_0x4247(){const _0x79d124=['split','64byYUvu','733690sLlqKs','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','349380FajTiV','database','join','1905280QrVPve','157779yaRnbF','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','1bsULLJ','trim','includes','table','63NnWleR','length','253JmsXlM','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','push','2299300EhDzPU','catalog','999504gPREdN','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Pattern\x20cannot\x20be\x20just\x20a\x20dot','1601128wgOHAX'];a180_0x4247=function(){return _0x79d124;};return a180_0x4247();}export function validateTableDescribeReference(_0x445dca){const _0x1a5ed0=a180_0x28cb;if(!_0x445dca[_0x1a5ed0(0x1f2)])return _0x1a5ed0(0x1fc);if(_0x445dca[_0x1a5ed0(0x1e9)]&&hasWildcard(_0x445dca[_0x1a5ed0(0x1e9)]))return _0x1a5ed0(0x1ed);if(hasWildcard(_0x445dca[_0x1a5ed0(0x1f2)]))return _0x1a5ed0(0x1fb);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a181_0x2e01(){const _0x10b798=['595110CuNbsL','188936oEafrQ','logs','793701nssMwS','443655QoCQEr','logDir','error','info','addHandler','fileOnly','shutdown','warn','debug','INFO','logFileName','tdx','67750tCPsml','logger','push','730212dMPcvA','Session\x20ended','getLogPath','fileHandler','consoleHandler','713164JwJObe','isInitialized','logLevel','trace'];a181_0x2e01=function(){return _0x10b798;};return a181_0x2e01();}const a181_0xa00ab7=a181_0x1c8d;(function(_0x21c543,_0x3c843f){const _0x40b02a=a181_0x1c8d,_0xb16e21=_0x21c543();while(!![]){try{const _0xc2493a=-parseInt(_0x40b02a(0xfe))/0x1+parseInt(_0x40b02a(0xea))/0x2+-parseInt(_0x40b02a(0xf1))/0x3+parseInt(_0x40b02a(0xef))/0x4+-parseInt(_0x40b02a(0xf2))/0x5+parseInt(_0x40b02a(0xee))/0x6+parseInt(_0x40b02a(0x101))/0x7;if(_0xc2493a===_0x3c843f)break;else _0xb16e21['push'](_0xb16e21['shift']());}catch(_0x1d9b9b){_0xb16e21['push'](_0xb16e21['shift']());}}}(a181_0x2e01,0x2d79d));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';function a181_0x1c8d(_0x74588e,_0x48b68f){_0x74588e=_0x74588e-0xea;const _0x2e01f7=a181_0x2e01();let _0x1c8d27=_0x2e01f7[_0x74588e];return _0x1c8d27;}export{LogLevel}from'./logger/index.js';export class TDXLogger{[a181_0xa00ab7(0xec)];[a181_0xa00ab7(0xf7)];[a181_0xa00ab7(0xf3)];[a181_0xa00ab7(0xfc)];[a181_0xa00ab7(0xff)];[a181_0xa00ab7(0x104)]=null;[a181_0xa00ab7(0x105)]=null;constructor(_0x405f56=LogLevel[a181_0xa00ab7(0xfb)],_0x4fcb7f=![],_0xc86c12,_0x183b49='tdx.log'){const _0x254d00=a181_0xa00ab7;this['logLevel']=_0x405f56,this[_0x254d00(0xf7)]=_0x4fcb7f,this[_0x254d00(0xf3)]=_0xc86c12||join(getGlobalCacheDir(),_0x254d00(0xf0)),this['logFileName']=_0x183b49,this[_0x254d00(0xff)]=Logger['of'](_0x254d00(0xfd));}async['init'](){const _0x6058c=a181_0xa00ab7,_0x1bda33=join(this[_0x6058c(0xf3)],this[_0x6058c(0xfc)]);if(Logger[_0x6058c(0xeb)]()){!this[_0x6058c(0xf7)]&&(this[_0x6058c(0x105)]=new ConsoleHandler({'minLevel':LogLevel[_0x6058c(0xfb)],'colors':!![]}),Logger[_0x6058c(0xf6)](this['consoleHandler']));return;}this['fileHandler']=new FileHandler({'filePath':_0x1bda33});const _0x3b3c4e=[this[_0x6058c(0x104)]];!this[_0x6058c(0xf7)]&&(this[_0x6058c(0x105)]=new ConsoleHandler({'minLevel':LogLevel[_0x6058c(0xfb)],'colors':!![]}),_0x3b3c4e[_0x6058c(0x100)](this[_0x6058c(0x105)])),await Logger['init']({'defaultLevel':this[_0x6058c(0xec)],'handlers':_0x3b3c4e,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a181_0xa00ab7(0xfa)](..._0x20259d){const _0x453a6d=a181_0xa00ab7;this['logger'][_0x453a6d(0xfa)](..._0x20259d);}[a181_0xa00ab7(0xed)](..._0x238ba2){this['logger']['trace'](..._0x238ba2);}['info'](..._0x393872){const _0x24cc0b=a181_0xa00ab7;this[_0x24cc0b(0xff)][_0x24cc0b(0xf5)](..._0x393872);}[a181_0xa00ab7(0xf9)](..._0x56c5e7){const _0x59f6e3=a181_0xa00ab7;this[_0x59f6e3(0xff)][_0x59f6e3(0xf9)](..._0x56c5e7);}[a181_0xa00ab7(0xf4)](..._0x377cf9){const _0x1f52de=a181_0xa00ab7;this[_0x1f52de(0xff)][_0x1f52de(0xf4)](..._0x377cf9);}async['close'](){const _0x4b0ee7=a181_0xa00ab7;this[_0x4b0ee7(0xff)][_0x4b0ee7(0xf5)](_0x4b0ee7(0x102)),await Logger[_0x4b0ee7(0xf8)]();}[a181_0xa00ab7(0x103)](){const _0x53d8d1=a181_0xa00ab7;return join(this[_0x53d8d1(0xf3)],this['logFileName']);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x46e9c7=a182_0x23af;(function(_0x11849c,_0x27fb36){const _0x573b3b=a182_0x23af,_0x4dbf5b=_0x11849c();while(!![]){try{const _0x7cc846=parseInt(_0x573b3b(0x137))/0x1*(parseInt(_0x573b3b(0x124))/0x2)+parseInt(_0x573b3b(0x13d))/0x3*(-parseInt(_0x573b3b(0x135))/0x4)+parseInt(_0x573b3b(0x13e))/0x5+-parseInt(_0x573b3b(0x13a))/0x6*(-parseInt(_0x573b3b(0x12d))/0x7)+-parseInt(_0x573b3b(0x12b))/0x8*(-parseInt(_0x573b3b(0x134))/0x9)+-parseInt(_0x573b3b(0x146))/0xa+-parseInt(_0x573b3b(0x149))/0xb;if(_0x7cc846===_0x27fb36)break;else _0x4dbf5b['push'](_0x4dbf5b['shift']());}catch(_0x4c1663){_0x4dbf5b['push'](_0x4dbf5b['shift']());}}}(a182_0x2a5d,0xaea04));import{get}from'https';import{gt,valid}from'semver';import a182_0x4b9234 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(a182_0x46e9c7(0x12f),a182_0x46e9c7(0x13f)),nextVersionCache=createGlobalCache(a182_0x46e9c7(0x129),a182_0x46e9c7(0x14a));function a182_0x23af(_0x2701c4,_0x138e9b){_0x2701c4=_0x2701c4-0x11e;const _0x2a5d37=a182_0x2a5d();let _0x23af4e=_0x2a5d37[_0x2701c4];return _0x23af4e;}function getCacheForChannel(_0x2a6ad6){const _0x2e80e6=a182_0x46e9c7;return _0x2a6ad6===_0x2e80e6(0x130)?nextVersionCache:stableVersionCache;}function readCache(_0x15dc46){const _0x440cf4=a182_0x46e9c7;return getCacheForChannel(_0x15dc46)[_0x440cf4(0x120)]()??null;}function writeCache(_0x21c0d5,_0x3034d9){const _0x484760=a182_0x46e9c7;try{getCacheForChannel(_0x3034d9)[_0x484760(0x123)]({'lastCheck':new Date()[_0x484760(0x126)](),'latestVersion':_0x21c0d5});}catch{}}function isCacheValid(_0xa678e1){const _0x5500f7=a182_0x46e9c7;if(!_0xa678e1)return![];const _0xe09eb0=new Date(_0xa678e1[_0x5500f7(0x122)])[_0x5500f7(0x121)](),_0x55f342=Date[_0x5500f7(0x139)]();return _0x55f342-_0xe09eb0<CACHE_DURATION_MS;}function a182_0x2a5d(){const _0x5cd45f=['utils/version-check','end','destroy','gray','Request\x20timeout','currentVersion','stderr','11449010irNfCM','latestVersion','\x0aUpdate\x20available:\x20','7201700LapAUW','utils/version-check-next','\x0aRun:\x20','stable','error','cyan','read','getTime','lastCheck','write','178AwGGjB','yellow','toISOString','npm\x20install\x20-g\x20@treasuredata/tdx@','updateAvailable','last_version_check_next','latest','8VPYaJh','version','28fOUYRu','data','last_version_check','next','parse','HTTP\x20','isTTY','4542543Pvneef','36cDcxIH','statusCode','14610OeiDEB','dim','now','1722906AFXTKU','Update\x20available:','Run:','366237npGBAh','3299795WvRVSs'];a182_0x2a5d=function(){return _0x5cd45f;};return a182_0x2a5d();}function fetchLatestVersion(_0xbbcac9=a182_0x46e9c7(0x14c)){const _0x4639ae=a182_0x46e9c7,_0x4819b5=_0xbbcac9==='next'?_0x4639ae(0x130):_0x4639ae(0x12a),_0x1b23a3=NPM_REGISTRY_BASE+'/'+_0x4819b5;return new Promise((_0x3e33aa,_0xe36c9b)=>{const _0x5750e2=_0x4639ae,_0x13f7e3=get(_0x1b23a3,_0x473e95=>{const _0x2785d5=a182_0x23af;if(_0x473e95[_0x2785d5(0x136)]!==0xc8){clearTimeout(_0x5d8b03),_0xe36c9b(new Error(_0x2785d5(0x132)+_0x473e95[_0x2785d5(0x136)]));return;}let _0x531d8a='';_0x473e95['on'](_0x2785d5(0x12e),_0x7ddec5=>{_0x531d8a+=_0x7ddec5;}),_0x473e95['on'](_0x2785d5(0x140),()=>{const _0x14ab7c=_0x2785d5;clearTimeout(_0x5d8b03);try{const _0x1cd124=JSON[_0x14ab7c(0x131)](_0x531d8a);if(!valid(_0x1cd124['version'])){_0xe36c9b(new Error('Invalid\x20version\x20format'));return;}_0x3e33aa(_0x1cd124[_0x14ab7c(0x12c)]);}catch(_0x587465){_0xe36c9b(_0x587465);}});})['on'](_0x5750e2(0x11e),_0x13c7b8=>{clearTimeout(_0x5d8b03),_0xe36c9b(_0x13c7b8);}),_0x5d8b03=setTimeout(()=>{const _0x4e6c6b=_0x5750e2;_0x13f7e3[_0x4e6c6b(0x141)](),_0xe36c9b(new Error(_0x4e6c6b(0x143)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x1345c6,_0x3dc3a0=a182_0x46e9c7(0x14c)){const _0x5131a4=a182_0x46e9c7;try{const _0x74dd51=readCache(_0x3dc3a0);if(isCacheValid(_0x74dd51)){const _0x5c5ca3=gt(_0x74dd51[_0x5131a4(0x147)],_0x1345c6);return{'updateAvailable':_0x5c5ca3,'currentVersion':_0x1345c6,'latestVersion':_0x74dd51[_0x5131a4(0x147)],'channel':_0x3dc3a0};}const _0x100681=await fetchLatestVersion(_0x3dc3a0);writeCache(_0x100681,_0x3dc3a0);const _0x28b42d=gt(_0x100681,_0x1345c6);return{'updateAvailable':_0x28b42d,'currentVersion':_0x1345c6,'latestVersion':_0x100681,'channel':_0x3dc3a0};}catch{return null;}}export function displayUpdateNotification(_0x1c3488){const _0x544e03=a182_0x46e9c7;if(!_0x1c3488[_0x544e03(0x128)])return;const _0x573849=_0x1c3488['channel']===_0x544e03(0x130)?_0x544e03(0x130):_0x544e03(0x12a),_0x4a74bc=process[_0x544e03(0x145)][_0x544e03(0x133)]&&!process.env.NO_COLOR,_0x2419c3=_0x4a74bc?a182_0x4b9234[_0x544e03(0x142)]('→'):'→',_0x56b227=_0x4a74bc?a182_0x4b9234['dim'](_0x1c3488[_0x544e03(0x144)]):_0x1c3488[_0x544e03(0x144)],_0x5b9dd5=_0x4a74bc?a182_0x4b9234['green'](_0x1c3488['latestVersion']):_0x1c3488[_0x544e03(0x147)],_0x4e7fb4=_0x4a74bc?a182_0x4b9234[_0x544e03(0x11f)](_0x544e03(0x127)+_0x573849):_0x544e03(0x127)+_0x573849,_0x5bdc7e=_0x4a74bc?'\x0a'+a182_0x4b9234[_0x544e03(0x125)](_0x544e03(0x13b))+'\x20'+_0x56b227+'\x20'+_0x2419c3+'\x20'+_0x5b9dd5+'\x0a'+a182_0x4b9234[_0x544e03(0x138)](_0x544e03(0x13c))+'\x20'+_0x4e7fb4+'\x0a':_0x544e03(0x148)+_0x56b227+'\x20'+_0x2419c3+'\x20'+_0x5b9dd5+_0x544e03(0x14b)+_0x4e7fb4+'\x0a';process[_0x544e03(0x145)]['write'](_0x5bdc7e);}
|