@treasuredata/tdx 0.7.1 → 0.7.2
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 +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.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/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.d.ts.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/parent-segment-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-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-pwd-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/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.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/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.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/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.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.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.d.ts +12 -0
- package/dist/types/endpoints.d.ts.map +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/endpoints.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/fields-display.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.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/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.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/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x2115f3=a12_0x5529;function a12_0x5529(_0x392d00,_0x1a5f35){const _0xc956b6=a12_0xc956();return a12_0x5529=function(_0x5529a1,_0x5a48b8){_0x5529a1=_0x5529a1-0xb4;let _0x3d4aea=_0xc956b6[_0x5529a1];return _0x3d4aea;},a12_0x5529(_0x392d00,_0x1a5f35);}(function(_0x17bfa4,_0x2b9c18){const _0x3ddf90=a12_0x5529,_0x4499d8=_0x17bfa4();while(!![]){try{const _0x15da0e=-parseInt(_0x3ddf90(0xc1))/0x1+parseInt(_0x3ddf90(0xe7))/0x2+parseInt(_0x3ddf90(0xc4))/0x3+-parseInt(_0x3ddf90(0xb7))/0x4*(-parseInt(_0x3ddf90(0xd5))/0x5)+parseInt(_0x3ddf90(0xe5))/0x6*(parseInt(_0x3ddf90(0xbb))/0x7)+-parseInt(_0x3ddf90(0xd3))/0x8*(parseInt(_0x3ddf90(0xe4))/0x9)+-parseInt(_0x3ddf90(0xf5))/0xa*(parseInt(_0x3ddf90(0xc0))/0xb);if(_0x15da0e===_0x2b9c18)break;else _0x4499d8['push'](_0x4499d8['shift']());}catch(_0x1043e9){_0x4499d8['push'](_0x4499d8['shift']());}}}(a12_0xc956,0x954a8));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';function a12_0xc956(){const _0x4b67b4=['set-cookie','136XWptxF','length','set-cookie2','x-xsrf-token','33929AkGGrQ','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','request','verbose','proxy-authorization','11xeccHc','800102eMMkrv','Invalid\x20API\x20type:\x20','trim','3273753VcgmVM','Invalid\x20HTTP\x20method:\x20','error','substring','.\x20Valid\x20types:\x20','validate','toLowerCase','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','includes','color','trino','x-trino-user','status','authorization','body','11368dnUDYS','noColor','12150XATerb','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','toUpperCase','has','api','type','Error:\x20','entries','PATCH','llm','startsWith','<\x20HTTP/1.1\x20','execute','Invalid\x20header\x20format:\x20\x22','\x22.\x20','4563BRpyCx','1464CBdlPi','join','343014HhSEjL','PUT','file','header','site','headers','stack','cdp','message','DELETE','name','method','Results\x20saved\x20to\x20','Endpoint\x20must\x20start\x20with\x20/:\x20','3960010eyYnlg','GET','data','output','POST'];a12_0xc956=function(){return _0x4b67b4;};return a12_0xc956();}import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a12_0x2115f3(0xd1),a12_0x2115f3(0xbf),'cookie',a12_0x2115f3(0xb6),a12_0x2115f3(0xb9),a12_0x2115f3(0xba),'x-auth-token',a12_0x2115f3(0xcf)]);function isSensitiveHeader(_0x2ec897){const _0x23811f=a12_0x2115f3;return SENSITIVE_HEADERS[_0x23811f(0xd8)](_0x2ec897[_0x23811f(0xca)]());}function parseHeader(_0x396cc9){const _0x2ddb2c=a12_0x2115f3,_0x4dc510=_0x396cc9['indexOf'](':');if(_0x4dc510===-0x1)throw new Error(_0x2ddb2c(0xe2)+_0x396cc9+_0x2ddb2c(0xe3)+'Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22');const _0x2f71ee=_0x396cc9[_0x2ddb2c(0xc7)](0x0,_0x4dc510)[_0x2ddb2c(0xc3)](),_0xa86953=_0x396cc9[_0x2ddb2c(0xc7)](_0x4dc510+0x1)[_0x2ddb2c(0xc3)]();if(!_0x2f71ee)throw new Error(_0x2ddb2c(0xd6)+_0x396cc9+'\x22');return[_0x2f71ee,_0xa86953];}export class ApiCommand extends BaseCommand{[a12_0x2115f3(0xf1)]=a12_0x2115f3(0xd9);['description']='Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs';[a12_0x2115f3(0xc9)](_0x1b0e7d){const _0x3b6dab=a12_0x2115f3,{args:_0xc4d1d2,options:_0x16b4f4}=_0x1b0e7d,_0x266077=_0x16b4f4;if(_0xc4d1d2[_0x3b6dab(0xb8)]===0x0)return _0x3b6dab(0xbc);const _0x2ee4a5=_0xc4d1d2[0x0];if(!_0x2ee4a5[_0x3b6dab(0xdf)]('/'))return _0x3b6dab(0xf4)+_0x2ee4a5;const _0x59f4f3=_0x266077[_0x3b6dab(0xf7)],_0x11f423=_0x266077['file'];if(_0x59f4f3&&_0x11f423)return _0x3b6dab(0xcb);const _0x2eda16=_0x266077[_0x3b6dab(0xf2)]||_0x3b6dab(0xf6),_0x4e9fa2=[_0x3b6dab(0xf6),_0x3b6dab(0xb5),_0x3b6dab(0xe8),_0x3b6dab(0xf0),_0x3b6dab(0xdd)];if(!_0x4e9fa2[_0x3b6dab(0xcc)](_0x2eda16['toUpperCase']()))return _0x3b6dab(0xc5)+_0x2eda16+'.\x20Valid\x20methods:\x20'+_0x4e9fa2[_0x3b6dab(0xe6)](',\x20');const _0x5a4745=_0x266077[_0x3b6dab(0xda)]||'td',_0x5b00e0=['td',_0x3b6dab(0xee),'workflow',_0x3b6dab(0xce),_0x3b6dab(0xde)];if(!_0x5b00e0[_0x3b6dab(0xcc)](_0x5a4745))return _0x3b6dab(0xc2)+_0x5a4745+_0x3b6dab(0xc8)+_0x5b00e0[_0x3b6dab(0xe6)](',\x20');return undefined;}async[a12_0x2115f3(0xe1)](_0x30c7c2){const _0x3deca4=a12_0x2115f3,{options:_0x10e5bc,args:_0x2b1086,tdx:_0x3b1d45}=_0x30c7c2,_0xe0b7bf=_0x10e5bc,_0x5b228b=_0x2b1086[0x0],_0x5ba96d=(_0xe0b7bf[_0x3deca4(0xf2)]||'GET')[_0x3deca4(0xd7)](),_0x1230a6=_0xe0b7bf[_0x3deca4(0xf7)],_0x50e508=_0xe0b7bf[_0x3deca4(0xe9)],_0x274ac2=_0xe0b7bf[_0x3deca4(0xea)],_0x59954d=_0xe0b7bf[_0x3deca4(0xda)]||'td';try{const _0x3a05f1={};if(_0x274ac2){const _0x1dce95=Array['isArray'](_0x274ac2)?_0x274ac2:[_0x274ac2];for(const _0x2662fa of _0x1dce95){const [_0x38494e,_0x5cca51]=parseHeader(_0x2662fa);_0x3a05f1[_0x38494e]=_0x5cca51;}}let _0x115cc5;if(_0x1230a6)_0x115cc5=_0x1230a6;else{if(_0x50e508)try{_0x115cc5=RawAPI['readBodyFromFile'](_0x50e508);}catch(_0x245a29){return console[_0x3deca4(0xc6)]('Error:\x20'+(_0x245a29 instanceof Error?_0x245a29['message']:String(_0x245a29))),0x1;}}const _0x157be0={'method':_0x5ba96d,'apiType':_0x59954d,'includeHeaders':_0x10e5bc['verbose']};_0x115cc5&&(_0x157be0[_0x3deca4(0xd2)]=_0x115cc5);Object['keys'](_0x3a05f1)[_0x3deca4(0xb8)]>0x0&&(_0x157be0[_0x3deca4(0xec)]=_0x3a05f1);if(_0x10e5bc['verbose']){const _0x127ba9=resolveSite(_0x10e5bc[_0x3deca4(0xeb)]),_0x4998e2=getEndpoint(_0x127ba9,_0x59954d),_0x2fc172=''+_0x4998e2+_0x5b228b;console['error']('>\x20'+_0x5ba96d+'\x20'+_0x2fc172);const _0x2bd194=getAuthHeaders(_0x127ba9),_0x5c16e9={..._0x2bd194,..._0x3a05f1};for(const [_0xb959d4,_0x2a2e53]of Object[_0x3deca4(0xdc)](_0x5c16e9)){!isSensitiveHeader(_0xb959d4)&&console[_0x3deca4(0xc6)]('>\x20'+_0xb959d4+':\x20'+_0x2a2e53);}_0x115cc5&&console[_0x3deca4(0xc6)]('>'),console[_0x3deca4(0xc6)]('');}const _0x331a06=await _0x3b1d45[_0x3deca4(0xd9)][_0x3deca4(0xbd)](_0x5b228b,_0x157be0);if(_0x10e5bc[_0x3deca4(0xbe)]&&_0x331a06[_0x3deca4(0xec)]){console[_0x3deca4(0xc6)](_0x3deca4(0xe0)+_0x331a06[_0x3deca4(0xd0)]);for(const [_0x543176,_0x568b26]of Object[_0x3deca4(0xdc)](_0x331a06[_0x3deca4(0xec)])){!isSensitiveHeader(_0x543176)&&console[_0x3deca4(0xc6)]('<\x20'+_0x543176+':\x20'+_0x568b26);}console[_0x3deca4(0xc6)]('');}const _0x5698ff=Boolean(_0x10e5bc[_0x3deca4(0xb4)]),_0x523de7={'color':_0x10e5bc['color'],'noColor':_0x10e5bc[_0x3deca4(0xd4)]||_0x5698ff&&!_0x10e5bc[_0x3deca4(0xcd)]},_0x123c59=colorizeJSON(_0x331a06[_0x3deca4(0xf7)],_0x523de7);return _0x10e5bc['output']?(writeFileSync(_0x10e5bc[_0x3deca4(0xb4)],_0x123c59),console['error'](_0x3deca4(0xf3)+_0x10e5bc[_0x3deca4(0xb4)])):console['log'](_0x123c59),0x0;}catch(_0x5bb1a0){return _0x5bb1a0 instanceof Error?(console['error'](_0x3deca4(0xdb)+_0x5bb1a0[_0x3deca4(0xef)]),_0x10e5bc[_0x3deca4(0xbe)]&&_0x5bb1a0[_0x3deca4(0xed)]&&console[_0x3deca4(0xc6)]('\x0aStack\x20trace:\x0a'+_0x5bb1a0['stack'])):console[_0x3deca4(0xc6)](_0x3deca4(0xdb)+String(_0x5bb1a0)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x2eaad2=a13_0x4467;(function(_0x3b1a09,_0x130582){const _0x6cf3c3=a13_0x4467,_0xfdc190=_0x3b1a09();while(!![]){try{const _0x266136=-parseInt(_0x6cf3c3(0xa2))/0x1+parseInt(_0x6cf3c3(0xd1))/0x2*(-parseInt(_0x6cf3c3(0xc0))/0x3)+parseInt(_0x6cf3c3(0xcf))/0x4+parseInt(_0x6cf3c3(0xb6))/0x5+-parseInt(_0x6cf3c3(0xb2))/0x6*(parseInt(_0x6cf3c3(0xa7))/0x7)+-parseInt(_0x6cf3c3(0xe5))/0x8*(parseInt(_0x6cf3c3(0xac))/0x9)+parseInt(_0x6cf3c3(0xd7))/0xa;if(_0x266136===_0x130582)break;else _0xfdc190['push'](_0xfdc190['shift']());}catch(_0x215121){_0xfdc190['push'](_0xfdc190['shift']());}}}(a13_0x3e01,0xe2410));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../types/endpoints.js';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import a13_0x2c2bce from'prompts';import{HTTPClientError}from'../client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a13_0x1e3024 from'chalk';export class AuthSetupCommand extends BaseCommand{[a13_0x2eaad2(0x9d)]=a13_0x2eaad2(0xb9);[a13_0x2eaad2(0x9e)]='Setup\x20API\x20key\x20authentication\x20interactively';async[a13_0x2eaad2(0xb8)](_0x485dfd){const _0x53fbff=a13_0x2eaad2,{options:_0x3f35fe}=_0x485dfd,_0x33a66c=_0x3f35fe[_0x53fbff(0x99)];console[_0x53fbff(0xcc)](a13_0x1e3024[_0x53fbff(0xa1)](_0x53fbff(0xeb)));const _0x5e2241=_0x3f35fe[_0x53fbff(0xea)]||'us01',_0xc305e1=[{'title':_0x53fbff(0x9a),'value':_0x53fbff(0xb3)},{'title':'jp\x20\x20\x20-\x20Japan','value':_0x53fbff(0xd6)},{'title':'eu\x20\x20\x20-\x20Europe','value':_0x53fbff(0xbc)},{'title':_0x53fbff(0xe2),'value':'ap02'}];let _0x379af8=_0xc305e1['findIndex'](_0x7593a4=>_0x7593a4[_0x53fbff(0xc9)]===_0x5e2241);_0x379af8===-0x1&&_0x5e2241!==_0x53fbff(0xb3)&&(_0xc305e1[_0x53fbff(0xe4)]({'title':_0x5e2241,'value':_0x5e2241}),_0x379af8=_0xc305e1[_0x53fbff(0xc5)]-0x1);_0xc305e1[_0x53fbff(0xe4)]({'title':'Enter\x20custom\x20site','value':'other'});const _0x5e248a=_0x33a66c?'Select\x20your\x20Treasure\x20Data\x20site\x20(for\x20profile:\x20'+_0x33a66c+'):':'Select\x20your\x20Treasure\x20Data\x20site:',_0x370f91=await a13_0x2c2bce({'type':_0x53fbff(0xc6),'name':_0x53fbff(0xea),'message':_0x5e248a,'choices':_0xc305e1,'initial':_0x379af8>=0x0?_0x379af8:0x0});if(!_0x370f91['site'])return console['log'](_0x53fbff(0xe0)),0x1;let _0x45b505;if(_0x370f91['site']===_0x53fbff(0x9c)){const _0x28ad6f=await a13_0x2c2bce({'type':_0x53fbff(0xd9),'name':_0x53fbff(0xae),'message':_0x53fbff(0xa0),'initial':'us01','validate':_0x4eae4d=>{const _0x39569c=_0x53fbff;if(!_0x4eae4d||!_0x4eae4d['trim']())return'Site\x20name\x20cannot\x20be\x20empty';if(!/^[a-z0-9-]+$/['test'](_0x4eae4d[_0x39569c(0xe3)]()))return _0x39569c(0xdc);return!![];}});if(!_0x28ad6f[_0x53fbff(0xae)])return console['log'](_0x53fbff(0xe0)),0x1;_0x45b505=_0x28ad6f['customSite'];}else _0x45b505=_0x370f91[_0x53fbff(0xea)];const _0x107c19=resolveSite(_0x45b505);console[_0x53fbff(0xcc)](_0x53fbff(0xb4)+_0x107c19),console[_0x53fbff(0xcc)](_0x53fbff(0xa3)),console[_0x53fbff(0xcc)]('\x20\x20'+getConsoleUrl(_0x107c19,_0x53fbff(0xbe)));const _0x3bcdef=await a13_0x2c2bce({'type':_0x53fbff(0xb5),'name':_0x53fbff(0xdf),'message':_0x53fbff(0xd2),'validate':_0x4defd3=>{const _0x4d7ed6=_0x53fbff;if(!_0x4defd3||!_0x4defd3[_0x4d7ed6(0xe3)]())return'API\x20key\x20cannot\x20be\x20empty';return!![];}});if(!_0x3bcdef['apiKey'])return console[_0x53fbff(0xcc)](_0x53fbff(0xe0)),0x1;const _0x14f889=_0x3bcdef[_0x53fbff(0xdf)];console[_0x53fbff(0xcc)](_0x53fbff(0xd5));try{const _0x38b7e9=TDX[_0x53fbff(0xe8)]({'site':_0x107c19,'apiKey':_0x14f889[_0x53fbff(0xe3)](),'logLevel':_0x3f35fe[_0x53fbff(0xa4)]??LogLevel[_0x53fbff(0xd0)]}),_0x2cad58=await _0x38b7e9[_0x53fbff(0xbb)][_0x53fbff(0xe7)]();console[_0x53fbff(0xcc)](_0x53fbff(0xe1)+_0x2cad58[_0x53fbff(0xde)]+')');const _0x344601=await isKeychainAvailable();_0x344601?(await saveAPIKeyAsync(_0x14f889[_0x53fbff(0xe3)](),_0x107c19,_0x33a66c),console[_0x53fbff(0xcc)]('✓\x20API\x20key\x20saved\x20to\x20system\x20keychain'+(_0x33a66c?'\x20(profile:\x20'+_0x33a66c+')':''))):(console[_0x53fbff(0x9f)](a13_0x1e3024[_0x53fbff(0xba)](_0x53fbff(0xc4))),console[_0x53fbff(0x9f)](a13_0x1e3024[_0x53fbff(0xba)]('\x20\x20Set\x20TD_API_KEY\x20environment\x20variable\x20for\x20authentication.')));if(_0x33a66c){const _0x57a0ed={'site':_0x107c19};saveProfileToUserConfig(_0x33a66c,_0x57a0ed),console[_0x53fbff(0xcc)](_0x53fbff(0xbd)+_0x33a66c+_0x53fbff(0xd8));}const _0x1502c5=_0x33a66c?_0x53fbff(0xca)+_0x33a66c:'';return console[_0x53fbff(0xcc)](),console[_0x53fbff(0xcc)](_0x53fbff(0xa8)),console[_0x53fbff(0xcc)](_0x53fbff(0xec)+_0x1502c5+_0x53fbff(0xe9)),console[_0x53fbff(0xcc)]('\x20\x20tdx'+_0x1502c5+_0x53fbff(0xbf)),0x0;}catch(_0x100a54){if(_0x100a54 instanceof HTTPClientError&&_0x100a54[_0x53fbff(0xb1)]===0x191)return printAuthError(_0x100a54),0x1;return console[_0x53fbff(0xd3)](a13_0x1e3024['red'](_0x53fbff(0xd4)+(_0x100a54 instanceof Error?_0x100a54[_0x53fbff(0xc1)]:String(_0x100a54)))),console[_0x53fbff(0xd3)]('API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.'),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a13_0x2eaad2(0x9d)]='auth';[a13_0x2eaad2(0x9e)]=a13_0x2eaad2(0xce);async[a13_0x2eaad2(0xb8)](_0x524859){const _0x697d22=a13_0x2eaad2,{options:_0x2ba785,tdx:_0x37afd3}=_0x524859,_0x47711c=_0x2ba785[_0x697d22(0xea)],_0x4dd1f5=_0x2ba785[_0x697d22(0x99)],_0x513f82=_0x4dd1f5?_0x4dd1f5:_0x697d22(0xdd);console['log']('tdx\x20profile:\x20'+_0x513f82+_0x697d22(0xc8)+_0x47711c+')');const _0x33241a=await resolveAPIKeyAsync(_0x47711c,_0x4dd1f5);if(_0x33241a){const {source:_0x4d2836,isDeprecated:_0x7ddd5}=_0x33241a,_0x2e87cf=_0x697d22(0xa6)+_0x4d2836;console[_0x697d22(0xcc)](_0x7ddd5?a13_0x1e3024[_0x697d22(0xba)](_0x2e87cf):_0x2e87cf);}else console[_0x697d22(0xcc)](a13_0x1e3024[_0x697d22(0xba)](_0x697d22(0xdb)));try{const _0x4d5be7=await _0x37afd3['jobs']['getUserInfo']();return console[_0x697d22(0xcc)](a13_0x1e3024[_0x697d22(0xb0)](_0x697d22(0xc2))),console[_0x697d22(0xcc)](_0x697d22(0xab)+_0x4d5be7[_0x697d22(0xde)]),(_0x4d5be7[_0x697d22(0x9b)]||_0x4d5be7['last_name'])&&console[_0x697d22(0xcc)](_0x697d22(0xda)+[_0x4d5be7[_0x697d22(0x9b)],_0x4d5be7[_0x697d22(0xaf)]]['filter'](Boolean)[_0x697d22(0xcd)]('\x20')),0x0;}catch(_0x1ba72c){return _0x1ba72c instanceof HTTPClientError&&_0x1ba72c['status']===0x191?printAuthError(_0x1ba72c,!![],_0x4dd1f5):console[_0x697d22(0xd3)](a13_0x1e3024[_0x697d22(0xa9)](_0x697d22(0xd4)+(_0x1ba72c instanceof Error?_0x1ba72c[_0x697d22(0xc1)]:String(_0x1ba72c)))),0x1;}}}export class AuthClearCommand extends BaseCommand{['name']=a13_0x2eaad2(0xc3);[a13_0x2eaad2(0x9e)]=a13_0x2eaad2(0xe6);async[a13_0x2eaad2(0xb8)](_0x24e849){const _0x77eac3=a13_0x2eaad2,{options:_0x5851fd}=_0x24e849,_0x25f09f=_0x5851fd[_0x77eac3(0x99)];console[_0x77eac3(0xcc)](a13_0x1e3024[_0x77eac3(0xa1)](_0x77eac3(0xaa)));const _0x2d2a6b=await isKeychainAvailable();if(!_0x2d2a6b)return console['error'](a13_0x1e3024[_0x77eac3(0xa9)](_0x77eac3(0xad))),0x1;const _0x3772df=await deleteKeychainAPIKey(_0x25f09f);return _0x3772df?(clearCredentialCache(),console[_0x77eac3(0xcc)](_0x77eac3(0xc7)+(_0x25f09f?_0x77eac3(0xb7)+_0x25f09f+')':'')),0x0):(console[_0x77eac3(0xcc)](_0x77eac3(0xcb)+(_0x25f09f?_0x77eac3(0xa5)+_0x25f09f:'')),0x1);}}function a13_0x4467(_0x3309cc,_0x132968){const _0x3e0141=a13_0x3e01();return a13_0x4467=function(_0x44674b,_0x25aedd){_0x44674b=_0x44674b-0x99;let _0x1fd7f1=_0x3e0141[_0x44674b];return _0x1fd7f1;},a13_0x4467(_0x3309cc,_0x132968);}function a13_0x3e01(){const _0x199a02=['execute','auth:setup','yellow','jobs','eu01','✓\x20Profile\x20\x27','/app/mp/ak','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','1953roKAHH','message','✓\x20Authentication\x20successful\x0a','auth:clear','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','length','select','✓\x20API\x20key\x20removed\x20from\x20keychain','\x20(site:\x20','value','\x20--profile\x20','No\x20API\x20key\x20found\x20in\x20keychain','log','join','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','175852UWFiap','ERROR','3108pzfRuU','Enter\x20your\x20TD\x20API\x20key:','error','✗\x20Validation\x20failed:\x20','Validating\x20API\x20key...','jp01','52965050WhcZdZ','\x27\x20registered','text','Name:\x20','No\x20credential\x20found','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','N/A','email','apiKey','\x0aSetup\x20cancelled','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','ap02\x20-\x20Korea','trim','push','4156184GJEwDD','Remove\x20API\x20key\x20from\x20system\x20keychain','getUserInfo','create','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','site','tdx:\x20auth\x20setup','\x20\x20tdx','profile','us\x20\x20\x20-\x20United\x20States','first_name','other','name','description','warn','Enter\x20site\x20name:','bold','695778IMttlT','You\x20can\x20find\x20your\x20API\x20key\x20at:','logLevel','\x20for\x20profile:\x20','Read\x20credential\x20from\x20','11028164ueNgFG','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','red','tdx:\x20auth\x20clear','User:\x20','27nNyOcj','System\x20keychain\x20is\x20not\x20available','customSite','last_name','green','status','6dIpBNm','us01','Setting\x20up\x20authentication\x20for\x20site:\x20','password','2138605ysoQPZ','\x20(profile:\x20'];a13_0x3e01=function(){return _0x199a02;};return a13_0x3e01();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0xa33ba0=a14_0x48ee;(function(_0x4b5033,_0x1244ae){const _0x39dc3b=a14_0x48ee,_0xa37a41=_0x4b5033();while(!![]){try{const _0x2b7898=-parseInt(_0x39dc3b(0x182))/0x1+-parseInt(_0x39dc3b(0x15e))/0x2*(-parseInt(_0x39dc3b(0x15f))/0x3)+parseInt(_0x39dc3b(0x18e))/0x4*(parseInt(_0x39dc3b(0x14f))/0x5)+-parseInt(_0x39dc3b(0x18b))/0x6+parseInt(_0x39dc3b(0x18a))/0x7+parseInt(_0x39dc3b(0x166))/0x8*(parseInt(_0x39dc3b(0x16b))/0x9)+-parseInt(_0x39dc3b(0x186))/0xa*(-parseInt(_0x39dc3b(0x17f))/0xb);if(_0x2b7898===_0x1244ae)break;else _0xa37a41['push'](_0xa37a41['shift']());}catch(_0x55a19b){_0xa37a41['push'](_0xa37a41['shift']());}}}(a14_0x2575,0x32ecd));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';function a14_0x48ee(_0x3e49c0,_0xa89890){const _0x25750a=a14_0x2575();return a14_0x48ee=function(_0x48ee7c,_0xe79398){_0x48ee7c=_0x48ee7c-0x14f;let _0x5c7e1a=_0x25750a[_0x48ee7c];return _0x5c7e1a;},a14_0x48ee(_0x3e49c0,_0xa89890);}import{saveLastChatId,loadLastChatId}from'../utils/chat-cache.js';import{resolveModelAlias}from'../utils/model-aliases.js';function handleSDKError(_0xc58d7a,_0x5e5acf){const _0x11116c=a14_0x48ee;if(_0xc58d7a instanceof SDKError)console[_0x11116c(0x183)](_0x11116c(0x164)+_0xc58d7a[_0x11116c(0x181)]),_0x5e5acf['verbose']&&(_0xc58d7a['cause']&&console[_0x11116c(0x183)](_0x11116c(0x15d)+_0xc58d7a[_0x11116c(0x152)]),_0xc58d7a['stack']&&(console['error'](_0x11116c(0x175)),console[_0x11116c(0x183)](_0xc58d7a[_0x11116c(0x157)])));else throw _0xc58d7a;}export class ChatCommand extends BaseCommand{[a14_0xa33ba0(0x179)]=a14_0xa33ba0(0x184);[a14_0xa33ba0(0x17b)]=a14_0xa33ba0(0x16f);[a14_0xa33ba0(0x16d)](_0x237b06){const _0x56b771=a14_0xa33ba0,_0x39ca14=_0x237b06[_0x56b771(0x17a)][_0x56b771(0x158)]('\x20');if(!_0x39ca14)return _0x56b771(0x18d);return undefined;}async[a14_0xa33ba0(0x16a)](_0x9fe254,_0x4c82c4,_0x2df8d4,_0xca9706,_0x439b19){const _0x527695=a14_0xa33ba0;for await(const _0x5356ae of _0x9fe254[_0x527695(0x161)][_0x527695(0x184)](_0x4c82c4,{'agentId':_0x2df8d4,'chatId':_0xca9706})){if(_0x5356ae['type']===_0x527695(0x170)){const _0xd025c0=_0x5356ae[_0x527695(0x165)][_0x527695(0x153)];saveLastChatId(_0xd025c0),_0x439b19&&console[_0x527695(0x183)](_0x527695(0x162)+_0xd025c0);}else _0x5356ae[_0x527695(0x16c)]==='event'&&this[_0x527695(0x160)](_0x5356ae[_0x527695(0x165)]);}}async[a14_0xa33ba0(0x169)](_0x477840,_0x1ad19c,_0x3e2bc3,_0x31da9f,_0x4ff75e){const _0x127a7d=a14_0xa33ba0;if(_0x1ad19c){const {projectName:_0x296800,agentName:_0xacce47}=parseAgentRef(_0x1ad19c);if(!_0xacce47)throw new Error('Agent\x20reference\x20must\x20include\x20project\x20name.\x20Usage:\x20--agent\x20\x22Project/Agent\x22');const _0x165ff2=await withSpinner(_0x127a7d(0x188)+_0x296800+'\x27...',()=>_0x477840[_0x127a7d(0x161)][_0x127a7d(0x173)](_0x296800),{'verbose':_0x4ff75e}),_0x9fe4ad=await withSpinner(_0x127a7d(0x17d)+_0xacce47+'\x27...',()=>_0x477840[_0x127a7d(0x161)][_0x127a7d(0x15a)](_0xacce47,_0x165ff2[_0x127a7d(0x165)]),{'verbose':_0x4ff75e});return _0x9fe4ad[_0x127a7d(0x165)];}else{const _0x4d438c=_0x3e2bc3||_0x127a7d(0x159),_0x476408=resolveModelAlias(_0x4d438c),_0x586511=await withSpinner(_0x127a7d(0x174)+_0x476408+'\x27...',()=>_0x477840[_0x127a7d(0x161)]['getOrCreateDefaultAgent'](_0x476408,0x0,_0x31da9f),{'verbose':_0x4ff75e});return _0x586511[_0x127a7d(0x165)]['id'];}}async[a14_0xa33ba0(0x177)](_0xbaadb1){const _0x5e7439=a14_0xa33ba0,{options:_0x10c242,args:_0x4e6c45,tdx:_0x3cb8e7}=_0xbaadb1,_0x4fd653=_0x4e6c45[_0x5e7439(0x158)]('\x20'),_0x5e33ec=_0x10c242,_0x1f8c52=_0x5e33ec[_0x5e7439(0x185)],_0x10c28b=_0x5e33ec[_0x5e7439(0x172)],_0x1556f1=_0x5e33ec[_0x5e7439(0x167)]?Number(_0x5e33ec[_0x5e7439(0x167)]):undefined,_0x39329c=_0x5e33ec[_0x5e7439(0x187)];try{let _0x2badb9,_0x393a77;!_0x39329c&&(_0x393a77=loadLastChatId(),_0x393a77&&_0x10c242['verbose']&&console[_0x5e7439(0x183)](_0x5e7439(0x168)+_0x393a77));(_0x39329c||!_0x393a77)&&(_0x2badb9=await this[_0x5e7439(0x169)](_0x3cb8e7,_0x1f8c52,_0x10c28b,_0x1556f1,_0x10c242['verbose']));try{await this[_0x5e7439(0x16a)](_0x3cb8e7,_0x4fd653,_0x2badb9,_0x393a77,_0x10c242['verbose']);}catch(_0x4eea2d){const _0x3d5457=_0x4eea2d instanceof SDKError&&_0x4eea2d[_0x5e7439(0x15b)]===ErrorCode['CHAT_NOT_FOUND']||_0x4eea2d instanceof Error&&_0x4eea2d[_0x5e7439(0x181)][_0x5e7439(0x163)](_0x5e7439(0x16e));if(_0x3d5457)_0x10c242[_0x5e7439(0x171)]&&console[_0x5e7439(0x183)](_0x5e7439(0x15c)),!_0x2badb9&&(_0x2badb9=await this['getAgentId'](_0x3cb8e7,_0x1f8c52,_0x10c28b,_0x1556f1,_0x10c242['verbose'])),await this[_0x5e7439(0x16a)](_0x3cb8e7,_0x4fd653,_0x2badb9,undefined,_0x10c242[_0x5e7439(0x171)]);else throw _0x4eea2d;}return console['log'](),0x0;}catch(_0x3029cb){return console[_0x5e7439(0x183)](),handleSDKError(_0x3029cb,_0x10c242),0x1;}}['handleSSEEvent'](_0x473c26){const _0x24b14c=a14_0xa33ba0;if(_0x24b14c(0x189)in _0x473c26)process[_0x24b14c(0x155)]['write'](_0x473c26[_0x24b14c(0x189)]);else{if(_0x24b14c(0x176)in _0x473c26)process['stderr']['write'](_0x24b14c(0x154)+_0x473c26[_0x24b14c(0x176)][_0x24b14c(0x18c)]+']\x0a');else{if(_0x24b14c(0x156)in _0x473c26)process[_0x24b14c(0x17c)][_0x24b14c(0x151)](_0x24b14c(0x180)+_0x473c26['tool']['functionName']+']\x0a');else{if(_0x24b14c(0x150)in _0x473c26)process[_0x24b14c(0x17c)][_0x24b14c(0x151)](_0x24b14c(0x17e)+_0x473c26[_0x24b14c(0x150)]['name']+']\x0a'),process['stderr'][_0x24b14c(0x151)](_0x473c26['output'][_0x24b14c(0x189)]+'\x0a');else _0x24b14c(0x183)in _0x473c26&&process[_0x24b14c(0x17c)][_0x24b14c(0x151)](_0x24b14c(0x178)+_0x473c26[_0x24b14c(0x183)]+']\x0a');}}}}}function a14_0x2575(){const _0x5d11f5=['286FwXLEU','8418OAkXmh','handleSSEEvent','llm','Chat\x20session:\x20','includes','Error:\x20','data','8cgaHwX','temperature','Continuing\x20chat:\x20','getAgentId','streamChat','426366qusANQ','type','validate','404','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','metadata','verbose','model','resolveProjectId','Getting\x20agent\x20for\x20model\x20\x27','\x0aStack\x20trace:','tool_call','execute','\x0a[Error:\x20','name','args','description','stderr','Resolving\x20agent\x20\x27','\x0a[Output:\x20','329549eObOqN','[Tool\x20result:\x20','message','381371KMLezB','error','chat','agent','10ELJpkt','new','Resolving\x20project\x20\x27','content','1089753rTNoyy','620070CyggWI','functionName','Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options','4tEQjNu','295175FDUJwX','output','write','cause','chatId','\x0a[Tool:\x20','stdout','tool','stack','join','haiku','resolveAgentId','code','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','\x20\x20Cause:\x20'];a14_0x2575=function(){return _0x5d11f5;};return a14_0x2575();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a15_0x47d289=a15_0x61f9;function a15_0x4e94(){const _0x5edf63=['trim','add','start','already\x20installed','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','\x27\x20updated','Failed\x20to\x20configure\x20marketplace\x20\x27','✓\x20Logging\x20to\x20','red','data','✓\x20Marketplace\x20\x27','Installing\x20plugin\x20\x27','tdx','findClaudePath','string','execute','COMMAND_NOT_FOUND','56GCbdly','\x27...','log','debug','exit','INSTALLATION_FAILED','close','Configuring\x20MCP\x20server\x20\x27','workflow-skills','green','utf-8','cwd','info','ANTHROPIC_MODEL','site','marketplace','1348119aRzPqx','https://github.com/treasure-data/td-skills','5394292LHZAGe','https://docs.treasuredata.com/mcp','✓\x20Settings\x20configured:\x20.claude/settings.local.json','):\x20claude\x20','llm','cause','message','\x27\x20installed','Command\x20failed\x20(exit\x20','verbose','4367619yYmGkP','fail','which','logger','hostname','Creating\x20.claude/settings.local.json...','--transport','install','server','toString','tdx\x20--profile\x20','stderr','Setting\x20up\x20project...','getLogPath','\x20claude\x20statusline','error','includes','Failed\x20to\x20install\x20plugin\x20\x27','\x27\x20configured','ANTHROPIC_BASE_URL','stdout','type','Claude\x20Code\x20CLI\x20not\x20found','Failed\x20to\x20launch\x20Claude\x20Code:\x20','Initializing\x20proxy\x20logger...','Starting\x20TD\x20LLM\x20proxy\x20server...','logLevel','\x20already\x20configured','td-docs','stringify','\x20configuration\x20failed','env','stop','settings.local.json','11759502ULpZeG','✓\x20TD\x20LLM\x20proxy\x20server\x20stopped','Executing:\x20claude\x20','update','statusline','.claude','✓\x20Logs\x20saved\x20to\x20','getOrCreateDefaultProject','description','754710nyXXxg','✓\x20Plugin\x20\x27','Warning:\x20Failed\x20to\x20configure\x20','command','name','already\x20configured','td-skills\x20Plugins','claude','TD\x20Docs\x20MCP\x20Server','5AxfWIq','Skipping\x20TD\x20LLM\x20proxy\x20setup\x20(--no-proxy)','originalSettings','statusLine','text','td-skills','20QVjniu','plugin','parse','12358430WhiFFT','join','mcp','http://127.0.0.1:','105767CrQZGl','model','sonnet','✓\x20Settings\x20restored:\x20.claude/settings.local.json','Updating\x20marketplace\x20\x27','2vYqpGs','Finding\x20available\x20port...'];a15_0x4e94=function(){return _0x5edf63;};return a15_0x4e94();}(function(_0xe47e47,_0x48d9c0){const _0x40296c=a15_0x61f9,_0x26fc4e=_0xe47e47();while(!![]){try{const _0x3384cd=parseInt(_0x40296c(0x1cb))/0x1+parseInt(_0x40296c(0x1d0))/0x2*(-parseInt(_0x40296c(0x18a))/0x3)+-parseInt(_0x40296c(0x180))/0x4*(-parseInt(_0x40296c(0x1be))/0x5)+-parseInt(_0x40296c(0x1ac))/0x6+parseInt(_0x40296c(0x1c7))/0x7+parseInt(_0x40296c(0x1e3))/0x8*(parseInt(_0x40296c(0x17e))/0x9)+-parseInt(_0x40296c(0x1c4))/0xa*(-parseInt(_0x40296c(0x1b5))/0xb);if(_0x3384cd===_0x48d9c0)break;else _0x26fc4e['push'](_0x26fc4e['shift']());}catch(_0x55558d){_0x26fc4e['push'](_0x26fc4e['shift']());}}}(a15_0x4e94,0xf1a65));import{spawn}from'node:child_process';import{readFile,writeFile,mkdir}from'node:fs/promises';function a15_0x61f9(_0x175f4c,_0x2da378){const _0x4e946f=a15_0x4e94();return a15_0x61f9=function(_0x61f929,_0x8a1bc2){_0x61f929=_0x61f929-0x17b;let _0x22806a=_0x4e946f[_0x61f929];return _0x22806a;},a15_0x61f9(_0x175f4c,_0x2da378);}import{existsSync}from'node:fs';import{join}from'node:path';import a15_0xb87d5d from'chalk';import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{TDXLogger}from'../utils/tdx-logger.js';import{findAvailablePort}from'../utils/port.js';import{SDKError,ErrorCode,errorContains}from'../sdk/errors.js';import{createCommandSpinner}from'../utils/spinner.js';function handleInstallationError(_0x3f18af,_0x58cb37,_0x36b633,_0x2e5111){const _0x254724=a15_0x61f9;errorContains(_0x3f18af,'already\x20exists',_0x254724(0x1d5),_0x254724(0x1ba))?(_0x36b633[_0x254724(0x1c2)]='✓\x20'+_0x58cb37+_0x254724(0x1a5),_0x2e5111?.['info'](_0x58cb37+_0x254724(0x1a5)),_0x3f18af instanceof SDKError&&_0x3f18af[_0x254724(0x185)]&&_0x2e5111?.[_0x254724(0x1e6)]('Command\x20output:\x20'+_0x3f18af['cause'][_0x254724(0x186)])):(_0x36b633['warn'](_0x254724(0x1b7)+_0x58cb37),_0x2e5111?.['error'](_0x58cb37+_0x254724(0x1a8),_0x3f18af));}async function executeClaudeCommand(_0x5c5983,_0x4770ce,_0x5e6d05){const _0x272d81=a15_0x61f9;return _0x5e6d05?.[_0x272d81(0x1ef)](_0x272d81(0x1ae)+_0x5c5983[_0x272d81(0x1c8)]('\x20')),new Promise((_0x56869d,_0x274a1e)=>{const _0x59d205=_0x272d81,_0x52d1fc=spawn('claude',_0x5c5983,{'stdio':'pipe'});let _0x3ca996='',_0x5360e6='';_0x52d1fc[_0x59d205(0x19e)]['on'](_0x59d205(0x1db),_0xf6d3e9=>{const _0x21c199=_0x59d205;_0x3ca996+=_0xf6d3e9[_0x21c199(0x193)]();}),_0x52d1fc[_0x59d205(0x195)]['on'](_0x59d205(0x1db),_0x558c57=>{_0x5360e6+=_0x558c57['toString']();}),_0x52d1fc['on'](_0x59d205(0x1e7),_0x280981=>{const _0x1c3286=_0x59d205;if(_0x280981===0x0)_0x56869d(_0x3ca996);else _0x4770ce?(_0x5e6d05?.[_0x1c3286(0x199)](_0x1c3286(0x188)+_0x280981+_0x1c3286(0x183)+_0x5c5983['join']('\x20')),_0x274a1e(new SDKError(ErrorCode[_0x1c3286(0x1e8)],_0x4770ce,new Error(_0x5360e6)))):_0x56869d('');});});}async function ensureMcpServer(_0xbbc1cb,_0x31f0ec,_0x51d91a,_0x338df4,_0x57fc13){const _0x4871f6=a15_0x61f9;_0x338df4[_0x4871f6(0x1c2)]=_0x4871f6(0x1ea)+_0xbbc1cb+_0x4871f6(0x1e4),await executeClaudeCommand([_0x4871f6(0x1c9),'add',_0xbbc1cb,_0x31f0ec,_0x4871f6(0x190),_0x51d91a],'Failed\x20to\x20configure\x20MCP\x20server\x20\x27'+_0xbbc1cb+'\x27',_0x57fc13),_0x338df4[_0x4871f6(0x1c2)]='✓\x20MCP\x20server\x20\x27'+_0xbbc1cb+_0x4871f6(0x19c);}async function ensureMarketplace(_0x22a68b,_0x345937,_0x18e810,_0x3905f9){const _0x398451=a15_0x61f9;_0x18e810['text']='Configuring\x20marketplace\x20\x27'+_0x22a68b+'\x27...',await executeClaudeCommand([_0x398451(0x1c5),_0x398451(0x17d),_0x398451(0x1d3),_0x345937],_0x398451(0x1d8)+_0x22a68b+'\x27',_0x3905f9),_0x18e810[_0x398451(0x1c2)]=_0x398451(0x1dc)+_0x22a68b+_0x398451(0x19c);}async function updateMarketplace(_0x371019,_0x12c498,_0x73eb03){const _0x1d4635=a15_0x61f9;_0x12c498[_0x1d4635(0x1c2)]=_0x1d4635(0x1cf)+_0x371019+_0x1d4635(0x1e4),await executeClaudeCommand(['plugin',_0x1d4635(0x17d),_0x1d4635(0x1af)],'Failed\x20to\x20update\x20marketplace\x20\x27'+_0x371019+'\x27',_0x73eb03),_0x12c498[_0x1d4635(0x1c2)]='✓\x20Marketplace\x20\x27'+_0x371019+_0x1d4635(0x1d7);}async function ensurePlugin(_0x2b9477,_0xe0968e,_0x1aa553,_0x190897){const _0x44813b=a15_0x61f9;_0x1aa553['text']=_0x44813b(0x1dd)+_0x2b9477+_0x44813b(0x1e4),await executeClaudeCommand(['plugin',_0x44813b(0x191),_0x2b9477+'@'+_0xe0968e],_0x44813b(0x19b)+_0x2b9477+'\x27',_0x190897),_0x1aa553[_0x44813b(0x1c2)]=_0x44813b(0x1b6)+_0x2b9477+_0x44813b(0x187);}async function createClaudeSettings(_0x4e34a4,_0x17b882=a15_0x47d289(0x1cd),_0x52cd33){const _0x22d63c=a15_0x47d289,_0x38164a=join(process[_0x22d63c(0x1ee)](),_0x22d63c(0x1b1)),_0x2a184c=join(_0x38164a,_0x22d63c(0x1ab));await mkdir(_0x38164a,{'recursive':!![]});let _0x44acdb={};if(existsSync(_0x2a184c))try{const _0xd107fe=await readFile(_0x2a184c,'utf-8');_0x44acdb=JSON['parse'](_0xd107fe);}catch{_0x44acdb={};}const _0x41b912=_0x44acdb[_0x22d63c(0x1a9)]||{},_0x321321={'ANTHROPIC_BASE_URL':_0x41b912[_0x22d63c(0x19d)],'ANTHROPIC_MODEL':_0x41b912[_0x22d63c(0x17b)],'statusLine':_0x44acdb[_0x22d63c(0x1c1)]},_0x3ddfd7={..._0x44acdb,'env':{..._0x41b912,'ANTHROPIC_BASE_URL':_0x22d63c(0x1ca)+_0x4e34a4,'ANTHROPIC_MODEL':_0x17b882},'statusLine':{'type':_0x22d63c(0x1b8),'command':_0x52cd33?_0x22d63c(0x194)+_0x52cd33+_0x22d63c(0x198):'tdx\x20claude\x20statusline'}};return await writeFile(_0x2a184c,JSON[_0x22d63c(0x1a7)](_0x3ddfd7,null,0x2)+'\x0a'),_0x321321;}async function restoreClaudeSettings(_0x200533){const _0x51af74=a15_0x47d289,_0x5986a2=join(process[_0x51af74(0x1ee)](),_0x51af74(0x1b1)),_0x43f263=join(_0x5986a2,_0x51af74(0x1ab));if(!existsSync(_0x43f263))return;try{const _0x5c7a4d=await readFile(_0x43f263,_0x51af74(0x1ed)),_0x2ef4dc=JSON[_0x51af74(0x1c6)](_0x5c7a4d),_0xb61892=_0x2ef4dc[_0x51af74(0x1a9)]||{},_0x3a47df=_0xb61892['ANTHROPIC_BASE_URL'],_0x4e337a=((()=>{const _0x2321d6=_0x51af74;if(typeof _0x3a47df!==_0x2321d6(0x1e0))return![];try{const _0x9c95f5=new URL(_0x3a47df);return _0x9c95f5['hostname']==='localhost'||_0x9c95f5[_0x2321d6(0x18e)]==='127.0.0.1';}catch{return![];}})());_0x4e337a?(delete _0xb61892['ANTHROPIC_BASE_URL'],delete _0xb61892[_0x51af74(0x17b)]):(_0x200533[_0x51af74(0x19d)]!==undefined?_0xb61892[_0x51af74(0x19d)]=_0x200533[_0x51af74(0x19d)]:delete _0xb61892[_0x51af74(0x19d)],_0x200533[_0x51af74(0x17b)]!==undefined?_0xb61892['ANTHROPIC_MODEL']=_0x200533[_0x51af74(0x17b)]:delete _0xb61892[_0x51af74(0x17b)]);const _0x235539=_0x2ef4dc[_0x51af74(0x1c1)],_0xf86ad6=((()=>{const _0x2438c5=_0x51af74;if(!_0x235539||typeof _0x235539!=='object')return![];if(_0x235539[_0x2438c5(0x19f)]!==_0x2438c5(0x1b8))return![];if(typeof _0x235539[_0x2438c5(0x1b8)]!=='string')return![];return _0x235539[_0x2438c5(0x1b8)][_0x2438c5(0x19a)](_0x2438c5(0x1de))&&_0x235539[_0x2438c5(0x1b8)][_0x2438c5(0x19a)](_0x2438c5(0x1b0));})());if(_0xf86ad6)delete _0x2ef4dc['statusLine'];else _0x200533['statusLine']!==undefined?_0x2ef4dc[_0x51af74(0x1c1)]=_0x200533[_0x51af74(0x1c1)]:delete _0x2ef4dc['statusLine'];_0x2ef4dc[_0x51af74(0x1a9)]=_0xb61892,await writeFile(_0x43f263,JSON['stringify'](_0x2ef4dc,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{[a15_0x47d289(0x1b9)]='claude';[a15_0x47d289(0x1b4)]='Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy';[a15_0x47d289(0x192)];[a15_0x47d289(0x1c0)];[a15_0x47d289(0x18d)];async[a15_0x47d289(0x1e1)](_0x101eb9){const _0x2655b1=a15_0x47d289,{tdx:_0x3471b3,options:_0x50470d,args:_0x40e413}=_0x101eb9;try{const _0x7583f8=_0x50470d,_0x2081a7=_0x7583f8[_0x2655b1(0x1cc)]||'sonnet',_0xae81e2=_0x7583f8['proxy']===![],_0x556e74=createCommandSpinner('Initializing...',{'verbose':_0x50470d[_0x2655b1(0x189)]});_0x556e74[_0x2655b1(0x1d4)]();try{if(!_0xae81e2){_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1d1);const _0x426640=await findAvailablePort(0xfa0);_0x556e74[_0x2655b1(0x1c2)]='✓\x20Port\x20'+_0x426640,_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x196);const _0x91bc8d=await _0x3471b3[_0x2655b1(0x184)][_0x2655b1(0x1b3)](),_0x3baf8e=_0x91bc8d['id'];_0x556e74['text']='✓\x20Using\x20project:\x20'+_0x91bc8d['attributes'][_0x2655b1(0x1b9)],_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1a2),this[_0x2655b1(0x18d)]=new TDXLogger(_0x50470d[_0x2655b1(0x1a4)],!![]),await this[_0x2655b1(0x18d)]['init']();const _0x525832=this[_0x2655b1(0x18d)][_0x2655b1(0x197)]();_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1d9)+_0x525832,_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1a3),this[_0x2655b1(0x192)]=new ProxyServer({'port':_0x426640,'projectId':_0x3baf8e,'tdx':_0x3471b3,'logger':this[_0x2655b1(0x18d)],'site':_0x50470d[_0x2655b1(0x17c)]}),await this['server'][_0x2655b1(0x1d4)](),_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1d6)+_0x426640,_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x18f);const _0x2ff204=_0x50470d['profile'];this[_0x2655b1(0x1c0)]=await createClaudeSettings(_0x426640,_0x2081a7,_0x2ff204),_0x556e74['text']=_0x2655b1(0x182);}else _0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1bf);try{await ensureMcpServer(_0x2655b1(0x1a6),_0x2655b1(0x181),'http',_0x556e74,this[_0x2655b1(0x18d)]);}catch(_0x4a0f35){handleInstallationError(_0x4a0f35,_0x2655b1(0x1bd),_0x556e74,this[_0x2655b1(0x18d)]);}try{await ensureMarketplace(_0x2655b1(0x1c3),_0x2655b1(0x17f),_0x556e74,this['logger']),await updateMarketplace(_0x2655b1(0x1c3),_0x556e74,this[_0x2655b1(0x18d)]),await ensurePlugin('sql-skills','td-skills',_0x556e74,this[_0x2655b1(0x18d)]),await ensurePlugin(_0x2655b1(0x1eb),_0x2655b1(0x1c3),_0x556e74,this['logger']),await ensurePlugin('tdx-skills',_0x2655b1(0x1c3),_0x556e74,this['logger']);}catch(_0x292c44){handleInstallationError(_0x292c44,_0x2655b1(0x1bb),_0x556e74,this[_0x2655b1(0x18d)]);}_0x556e74[_0x2655b1(0x1aa)]();}catch(_0x1d5626){_0x556e74[_0x2655b1(0x18b)]('Setup\x20failed');throw _0x1d5626;}const _0xa58e81=await this['findClaudePath']();if(!_0xa58e81)throw new SDKError(ErrorCode[_0x2655b1(0x1e2)],_0x2655b1(0x1a0),undefined,{'helpText':'Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code'});const _0x5359e9=spawn(_0xa58e81,_0x40e413,{'stdio':'inherit'}),_0x5362de=await new Promise(_0x1a9cea=>{const _0x1d4926=_0x2655b1;_0x5359e9['on'](_0x1d4926(0x1e7),_0x480799=>{_0x1a9cea(_0x480799||0x0);}),_0x5359e9['on'](_0x1d4926(0x199),_0xdf3b6f=>{const _0x2e0db5=_0x1d4926;console['error'](a15_0xb87d5d[_0x2e0db5(0x1da)](_0x2e0db5(0x1a1)+_0xdf3b6f[_0x2e0db5(0x186)])),_0x1a9cea(0x1);});});this[_0x2655b1(0x192)]&&(await this['server'][_0x2655b1(0x1aa)](),console['log'](a15_0xb87d5d[_0x2655b1(0x1ec)](_0x2655b1(0x1ad))));if(this['logger']){await this[_0x2655b1(0x18d)][_0x2655b1(0x1e9)]();const _0x5dc414=this[_0x2655b1(0x18d)][_0x2655b1(0x197)]();console[_0x2655b1(0x1e5)](a15_0xb87d5d[_0x2655b1(0x1ec)](_0x2655b1(0x1b2)+_0x5dc414));}return this['originalSettings']&&(await restoreClaudeSettings(this[_0x2655b1(0x1c0)]),console['log'](a15_0xb87d5d[_0x2655b1(0x1ec)](_0x2655b1(0x1ce)))),_0x5362de;}catch(_0x836eda){this['server']&&await this[_0x2655b1(0x192)][_0x2655b1(0x1aa)]();this['logger']&&await this[_0x2655b1(0x18d)][_0x2655b1(0x1e9)]();this['originalSettings']&&await restoreClaudeSettings(this[_0x2655b1(0x1c0)]);throw _0x836eda;}}async[a15_0x47d289(0x1df)](){return new Promise(_0x3f4ad6=>{const _0x444705=a15_0x61f9,_0x432572=spawn(_0x444705(0x18c),[_0x444705(0x1bc)]);let _0x4aae00='';_0x432572['stdout']['on'](_0x444705(0x1db),_0x422c67=>{const _0x3c3ba3=_0x444705;_0x4aae00+=_0x422c67[_0x3c3ba3(0x193)]();}),_0x432572['on'](_0x444705(0x1e7),_0x3e2cfb=>{const _0xd153d3=_0x444705;_0x3e2cfb===0x0&&_0x4aae00[_0xd153d3(0x1d2)]()?_0x3f4ad6(_0x4aae00[_0xd153d3(0x1d2)]()):_0x3f4ad6(_0xd153d3(0x1bc));});});}}
|
|
1
|
+
const a15_0x4f5c1e=a15_0x3080;(function(_0x295863,_0x1263c4){const _0x57260b=a15_0x3080,_0x1e20e3=_0x295863();while(!![]){try{const _0x159924=-parseInt(_0x57260b(0x10f))/0x1*(parseInt(_0x57260b(0x125))/0x2)+parseInt(_0x57260b(0x106))/0x3*(parseInt(_0x57260b(0xdc))/0x4)+-parseInt(_0x57260b(0x10c))/0x5+-parseInt(_0x57260b(0xe2))/0x6+parseInt(_0x57260b(0x112))/0x7*(-parseInt(_0x57260b(0x130))/0x8)+-parseInt(_0x57260b(0xf7))/0x9+-parseInt(_0x57260b(0xcb))/0xa*(-parseInt(_0x57260b(0x13a))/0xb);if(_0x159924===_0x1263c4)break;else _0x1e20e3['push'](_0x1e20e3['shift']());}catch(_0x406dc7){_0x1e20e3['push'](_0x1e20e3['shift']());}}}(a15_0x1a3b,0xbea15));import{spawn}from'node:child_process';import{readFile,writeFile,mkdir}from'node:fs/promises';import{existsSync}from'node:fs';import{join}from'node:path';import a15_0x202161 from'chalk';import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{TDXLogger}from'../utils/tdx-logger.js';import{findAvailablePort}from'../utils/port.js';import{SDKError,ErrorCode,errorContains}from'../sdk/errors.js';import{createCommandSpinner}from'../utils/spinner.js';function handleInstallationError(_0x39933c,_0x48b090,_0x54974f,_0x23f717){const _0x52a5c9=a15_0x3080;errorContains(_0x39933c,_0x52a5c9(0xc8),_0x52a5c9(0xd0),_0x52a5c9(0xf2))?(_0x54974f['text']='✓\x20'+_0x48b090+'\x20already\x20configured',_0x23f717?.[_0x52a5c9(0x11b)](_0x48b090+_0x52a5c9(0xd7)),_0x39933c instanceof SDKError&&_0x39933c['cause']&&_0x23f717?.[_0x52a5c9(0xcd)]('Command\x20output:\x20'+_0x39933c[_0x52a5c9(0xd3)][_0x52a5c9(0xf3)])):(_0x54974f[_0x52a5c9(0xf0)]('Warning:\x20Failed\x20to\x20configure\x20'+_0x48b090),_0x23f717?.['error'](_0x48b090+_0x52a5c9(0x135),_0x39933c));}async function executeClaudeCommand(_0x1e1a3b,_0x3d53bf,_0x155650){const _0x21dd3c=a15_0x3080;return _0x155650?.[_0x21dd3c(0x11b)](_0x21dd3c(0x132)+_0x1e1a3b[_0x21dd3c(0xe5)]('\x20')),new Promise((_0x363647,_0x3bc647)=>{const _0x1662f5=_0x21dd3c,_0x2b1eb9=spawn(_0x1662f5(0x118),_0x1e1a3b,{'stdio':_0x1662f5(0x133)});let _0x443a98='',_0x2ac150='';_0x2b1eb9[_0x1662f5(0xe0)]['on'](_0x1662f5(0x127),_0x5d323a=>{const _0x2a651e=_0x1662f5;_0x443a98+=_0x5d323a[_0x2a651e(0x111)]();}),_0x2b1eb9[_0x1662f5(0xf4)]['on'](_0x1662f5(0x127),_0x2ee44b=>{const _0x9cc02a=_0x1662f5;_0x2ac150+=_0x2ee44b[_0x9cc02a(0x111)]();}),_0x2b1eb9['on'](_0x1662f5(0x109),_0x387bcd=>{const _0x548d2e=_0x1662f5;if(_0x387bcd===0x0)_0x363647(_0x443a98);else _0x3d53bf?(_0x155650?.[_0x548d2e(0xe7)](_0x548d2e(0x122)+_0x387bcd+'):\x20claude\x20'+_0x1e1a3b[_0x548d2e(0xe5)]('\x20')),_0x3bc647(new SDKError(ErrorCode[_0x548d2e(0x137)],_0x3d53bf,new Error(_0x2ac150)))):_0x363647('');});});}async function ensureMcpServer(_0x39ab1d,_0x5274e3,_0x38720a,_0x22d3ac,_0x29901a){const _0x2a0d7d=a15_0x3080;_0x22d3ac[_0x2a0d7d(0x102)]=_0x2a0d7d(0xf5)+_0x39ab1d+'\x27...',await executeClaudeCommand([_0x2a0d7d(0xdf),'add',_0x39ab1d,_0x5274e3,_0x2a0d7d(0x124),_0x38720a],'Failed\x20to\x20configure\x20MCP\x20server\x20\x27'+_0x39ab1d+'\x27',_0x29901a),_0x22d3ac[_0x2a0d7d(0x102)]=_0x2a0d7d(0xf8)+_0x39ab1d+_0x2a0d7d(0xc6);}async function ensureMarketplace(_0xb5c60,_0x57b055,_0x575ed5,_0x3a49af){const _0x4cc7a3=a15_0x3080;_0x575ed5[_0x4cc7a3(0x102)]=_0x4cc7a3(0xef)+_0xb5c60+'\x27...',await executeClaudeCommand([_0x4cc7a3(0xee),'marketplace','add',_0x57b055],_0x4cc7a3(0x12f)+_0xb5c60+'\x27',_0x3a49af),_0x575ed5['text']=_0x4cc7a3(0xcf)+_0xb5c60+_0x4cc7a3(0xc6);}async function updateMarketplace(_0x5e67fd,_0x207c1b,_0x1b72fd){const _0x318118=a15_0x3080;_0x207c1b['text']=_0x318118(0xd2)+_0x5e67fd+'\x27...',await executeClaudeCommand([_0x318118(0xee),'marketplace',_0x318118(0x12b)],_0x318118(0xd8)+_0x5e67fd+'\x27',_0x1b72fd),_0x207c1b[_0x318118(0x102)]=_0x318118(0xcf)+_0x5e67fd+_0x318118(0xe9);}function a15_0x1a3b(){const _0xe07fd9=['debug','env','✓\x20Marketplace\x20\x27','already\x20installed','proxy','Updating\x20marketplace\x20\x27','cause','ANTHROPIC_BASE_URL','ANTHROPIC_MODEL','workflow-skills','\x20already\x20configured','Failed\x20to\x20update\x20marketplace\x20\x27','Skipping\x20TD\x20LLM\x20proxy\x20setup\x20(--no-proxy)','install','getLogPath','35396WZqhqI','trim','start','mcp','stdout','statusLine','1848510PZhxGA','model','string','join','llm','error','green','\x27\x20updated','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy','which','log','Initializing...','plugin','Configuring\x20marketplace\x20\x27','warn','TD\x20Docs\x20MCP\x20Server','already\x20configured','message','stderr','Configuring\x20MCP\x20server\x20\x27','Failed\x20to\x20launch\x20Claude\x20Code:\x20','9458343AOBAyX','✓\x20MCP\x20server\x20\x27','utf-8','execute','inherit','sonnet','\x27\x20installed','Failed\x20to\x20install\x20plugin\x20\x27','settings.local.json','tdx\x20--profile\x20','tdx\x20claude\x20statusline','text','localhost','parse','stringify','69eTZbbE','Claude\x20Code\x20CLI\x20not\x20found','✓\x20Logs\x20saved\x20to\x20','exit','server','✓\x20TD\x20LLM\x20proxy\x20server\x20stopped','1008420jvLiHI','Initializing\x20proxy\x20logger...','logger','338017zfSXDa','cwd','toString','1599913DSPiEe','stop','includes','COMMAND_NOT_FOUND','findClaudePath','✓\x20Settings\x20restored:\x20.claude/settings.local.json','claude','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','td-skills','info','✓\x20Plugin\x20\x27','sql-skills','Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code','close','getOrCreateDefaultProject','originalSettings','Command\x20failed\x20(exit\x20','https://docs.treasuredata.com/mcp','--transport','2vLLBtH','https://github.com/treasure-data/td-skills','data','td-skills\x20Plugins','tdx','name','update','fail','site','attributes','Failed\x20to\x20configure\x20marketplace\x20\x27','8vKkEpb','\x27...','Executing:\x20claude\x20','pipe','Setup\x20failed','\x20configuration\x20failed','init','INSTALLATION_FAILED','✓\x20Settings\x20configured:\x20.claude/settings.local.json','Finding\x20available\x20port...','66ZOMnwX','http','command','\x27\x20configured','http://127.0.0.1:','already\x20exists','Starting\x20TD\x20LLM\x20proxy\x20server...','hostname','4507610BpLAnG','.claude'];a15_0x1a3b=function(){return _0xe07fd9;};return a15_0x1a3b();}async function ensurePlugin(_0x25ff94,_0x557b41,_0x4a6d23,_0x5cb6c2){const _0x2f957a=a15_0x3080;_0x4a6d23[_0x2f957a(0x102)]='Installing\x20plugin\x20\x27'+_0x25ff94+_0x2f957a(0x131),await executeClaudeCommand([_0x2f957a(0xee),_0x2f957a(0xda),_0x25ff94+'@'+_0x557b41],_0x2f957a(0xfe)+_0x25ff94+'\x27',_0x5cb6c2),_0x4a6d23[_0x2f957a(0x102)]=_0x2f957a(0x11c)+_0x25ff94+_0x2f957a(0xfd);}async function createClaudeSettings(_0x253c05,_0x66a7f5=a15_0x4f5c1e(0xfc),_0x4a72d3){const _0x2e1ab8=a15_0x4f5c1e,_0x454251=join(process[_0x2e1ab8(0x110)](),_0x2e1ab8(0xcc)),_0x563a52=join(_0x454251,_0x2e1ab8(0xff));await mkdir(_0x454251,{'recursive':!![]});let _0x1d5b16={};if(existsSync(_0x563a52))try{const _0x2796b0=await readFile(_0x563a52,_0x2e1ab8(0xf9));_0x1d5b16=JSON[_0x2e1ab8(0x104)](_0x2796b0);}catch{_0x1d5b16={};}const _0x2e85aa=_0x1d5b16[_0x2e1ab8(0xce)]||{},_0x5d3bca={'ANTHROPIC_BASE_URL':_0x2e85aa[_0x2e1ab8(0xd4)],'ANTHROPIC_MODEL':_0x2e85aa['ANTHROPIC_MODEL'],'statusLine':_0x1d5b16['statusLine']},_0x40e025={..._0x1d5b16,'env':{..._0x2e85aa,'ANTHROPIC_BASE_URL':_0x2e1ab8(0xc7)+_0x253c05,'ANTHROPIC_MODEL':_0x66a7f5},'statusLine':{'type':_0x2e1ab8(0x13c),'command':_0x4a72d3?_0x2e1ab8(0x100)+_0x4a72d3+'\x20claude\x20statusline':_0x2e1ab8(0x101)}};return await writeFile(_0x563a52,JSON[_0x2e1ab8(0x105)](_0x40e025,null,0x2)+'\x0a'),_0x5d3bca;}function a15_0x3080(_0x5ab275,_0x20ac5c){const _0x1a3b79=a15_0x1a3b();return a15_0x3080=function(_0x3080e6,_0x2cc339){_0x3080e6=_0x3080e6-0xc6;let _0x4c9e42=_0x1a3b79[_0x3080e6];return _0x4c9e42;},a15_0x3080(_0x5ab275,_0x20ac5c);}async function restoreClaudeSettings(_0x15e7af){const _0x59305d=a15_0x4f5c1e,_0x3a0e18=join(process[_0x59305d(0x110)](),'.claude'),_0x457941=join(_0x3a0e18,_0x59305d(0xff));if(!existsSync(_0x457941))return;try{const _0x44e874=await readFile(_0x457941,_0x59305d(0xf9)),_0x2c2ade=JSON['parse'](_0x44e874),_0x410653=_0x2c2ade[_0x59305d(0xce)]||{},_0x35eac3=_0x410653[_0x59305d(0xd4)],_0x3d8a49=((()=>{const _0x265a91=_0x59305d;if(typeof _0x35eac3!=='string')return![];try{const _0x53eaf6=new URL(_0x35eac3);return _0x53eaf6['hostname']===_0x265a91(0x103)||_0x53eaf6[_0x265a91(0xca)]==='127.0.0.1';}catch{return![];}})());_0x3d8a49?(delete _0x410653[_0x59305d(0xd4)],delete _0x410653['ANTHROPIC_MODEL']):(_0x15e7af['ANTHROPIC_BASE_URL']!==undefined?_0x410653[_0x59305d(0xd4)]=_0x15e7af['ANTHROPIC_BASE_URL']:delete _0x410653[_0x59305d(0xd4)],_0x15e7af[_0x59305d(0xd5)]!==undefined?_0x410653[_0x59305d(0xd5)]=_0x15e7af[_0x59305d(0xd5)]:delete _0x410653[_0x59305d(0xd5)]);const _0x24c2ae=_0x2c2ade['statusLine'],_0x493aee=((()=>{const _0x2b3c4b=_0x59305d;if(!_0x24c2ae||typeof _0x24c2ae!=='object')return![];if(_0x24c2ae['type']!=='command')return![];if(typeof _0x24c2ae[_0x2b3c4b(0x13c)]!==_0x2b3c4b(0xe4))return![];return _0x24c2ae[_0x2b3c4b(0x13c)][_0x2b3c4b(0x114)](_0x2b3c4b(0x129))&&_0x24c2ae['command'][_0x2b3c4b(0x114)]('statusline');})());if(_0x493aee)delete _0x2c2ade[_0x59305d(0xe1)];else _0x15e7af['statusLine']!==undefined?_0x2c2ade[_0x59305d(0xe1)]=_0x15e7af[_0x59305d(0xe1)]:delete _0x2c2ade[_0x59305d(0xe1)];_0x2c2ade[_0x59305d(0xce)]=_0x410653,await writeFile(_0x457941,JSON[_0x59305d(0x105)](_0x2c2ade,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{[a15_0x4f5c1e(0x12a)]=a15_0x4f5c1e(0x118);['description']=a15_0x4f5c1e(0xea);[a15_0x4f5c1e(0x10a)];[a15_0x4f5c1e(0x121)];[a15_0x4f5c1e(0x10e)];async[a15_0x4f5c1e(0xfa)](_0x5baa59){const _0x3f3f4b=a15_0x4f5c1e,{tdx:_0x31dcfc,options:_0x9b4193,args:_0x29a3c8}=_0x5baa59;try{const _0x221fd0=_0x9b4193,_0x5d425d=_0x221fd0[_0x3f3f4b(0xe3)]||_0x3f3f4b(0xfc),_0x39a0bc=_0x221fd0[_0x3f3f4b(0xd1)]===![],_0x204092=createCommandSpinner(_0x3f3f4b(0xed),{'verbose':_0x9b4193['verbose']});_0x204092[_0x3f3f4b(0xde)]();try{if(!_0x39a0bc){_0x204092[_0x3f3f4b(0x102)]=_0x3f3f4b(0x139);const _0x30b568=await findAvailablePort(0xfa0);_0x204092[_0x3f3f4b(0x102)]='✓\x20Port\x20'+_0x30b568,_0x204092[_0x3f3f4b(0x102)]='Setting\x20up\x20project...';const _0xf5a454=await _0x31dcfc[_0x3f3f4b(0xe6)][_0x3f3f4b(0x120)](),_0x464c66=_0xf5a454['id'];_0x204092[_0x3f3f4b(0x102)]='✓\x20Using\x20project:\x20'+_0xf5a454[_0x3f3f4b(0x12e)][_0x3f3f4b(0x12a)],_0x204092[_0x3f3f4b(0x102)]=_0x3f3f4b(0x10d),this[_0x3f3f4b(0x10e)]=new TDXLogger(_0x9b4193['logLevel'],!![]),await this[_0x3f3f4b(0x10e)][_0x3f3f4b(0x136)]();const _0x5eeed4=this[_0x3f3f4b(0x10e)]['getLogPath']();_0x204092[_0x3f3f4b(0x102)]='✓\x20Logging\x20to\x20'+_0x5eeed4,_0x204092[_0x3f3f4b(0x102)]=_0x3f3f4b(0xc9),this[_0x3f3f4b(0x10a)]=new ProxyServer({'port':_0x30b568,'projectId':_0x464c66,'tdx':_0x31dcfc,'logger':this[_0x3f3f4b(0x10e)],'site':_0x9b4193[_0x3f3f4b(0x12d)]}),await this[_0x3f3f4b(0x10a)][_0x3f3f4b(0xde)](),_0x204092['text']=_0x3f3f4b(0x119)+_0x30b568,_0x204092['text']='Creating\x20.claude/settings.local.json...';const _0x62b3b8=_0x9b4193['profile'];this[_0x3f3f4b(0x121)]=await createClaudeSettings(_0x30b568,_0x5d425d,_0x62b3b8),_0x204092['text']=_0x3f3f4b(0x138);}else _0x204092['text']=_0x3f3f4b(0xd9);try{await ensureMcpServer('td-docs',_0x3f3f4b(0x123),_0x3f3f4b(0x13b),_0x204092,this[_0x3f3f4b(0x10e)]);}catch(_0x4a159b){handleInstallationError(_0x4a159b,_0x3f3f4b(0xf1),_0x204092,this[_0x3f3f4b(0x10e)]);}try{await ensureMarketplace(_0x3f3f4b(0x11a),_0x3f3f4b(0x126),_0x204092,this[_0x3f3f4b(0x10e)]),await updateMarketplace(_0x3f3f4b(0x11a),_0x204092,this[_0x3f3f4b(0x10e)]),await ensurePlugin(_0x3f3f4b(0x11d),_0x3f3f4b(0x11a),_0x204092,this[_0x3f3f4b(0x10e)]),await ensurePlugin(_0x3f3f4b(0xd6),_0x3f3f4b(0x11a),_0x204092,this[_0x3f3f4b(0x10e)]),await ensurePlugin('tdx-skills',_0x3f3f4b(0x11a),_0x204092,this['logger']);}catch(_0x2c0864){handleInstallationError(_0x2c0864,_0x3f3f4b(0x128),_0x204092,this[_0x3f3f4b(0x10e)]);}_0x204092[_0x3f3f4b(0x113)]();}catch(_0x3d7358){_0x204092[_0x3f3f4b(0x12c)](_0x3f3f4b(0x134));throw _0x3d7358;}const _0x36e0ed=await this[_0x3f3f4b(0x116)]();if(!_0x36e0ed)throw new SDKError(ErrorCode[_0x3f3f4b(0x115)],_0x3f3f4b(0x107),undefined,{'helpText':_0x3f3f4b(0x11e)});const _0x10b434=spawn(_0x36e0ed,_0x29a3c8,{'stdio':_0x3f3f4b(0xfb)}),_0x52b123=await new Promise(_0x2740e4=>{const _0x47c826=_0x3f3f4b;_0x10b434['on'](_0x47c826(0x109),_0x5e3219=>{_0x2740e4(_0x5e3219||0x0);}),_0x10b434['on'](_0x47c826(0xe7),_0x408ef4=>{const _0x2408e3=_0x47c826;console['error'](a15_0x202161['red'](_0x2408e3(0xf6)+_0x408ef4['message'])),_0x2740e4(0x1);});});this['server']&&(await this[_0x3f3f4b(0x10a)][_0x3f3f4b(0x113)](),console['log'](a15_0x202161[_0x3f3f4b(0xe8)](_0x3f3f4b(0x10b))));if(this['logger']){await this['logger'][_0x3f3f4b(0x11f)]();const _0x1b23ed=this[_0x3f3f4b(0x10e)][_0x3f3f4b(0xdb)]();console[_0x3f3f4b(0xec)](a15_0x202161[_0x3f3f4b(0xe8)](_0x3f3f4b(0x108)+_0x1b23ed));}return this[_0x3f3f4b(0x121)]&&(await restoreClaudeSettings(this['originalSettings']),console[_0x3f3f4b(0xec)](a15_0x202161[_0x3f3f4b(0xe8)](_0x3f3f4b(0x117)))),_0x52b123;}catch(_0x286b54){this['server']&&await this[_0x3f3f4b(0x10a)][_0x3f3f4b(0x113)]();this[_0x3f3f4b(0x10e)]&&await this[_0x3f3f4b(0x10e)][_0x3f3f4b(0x11f)]();this[_0x3f3f4b(0x121)]&&await restoreClaudeSettings(this[_0x3f3f4b(0x121)]);throw _0x286b54;}}async[a15_0x4f5c1e(0x116)](){return new Promise(_0x2287cd=>{const _0x32ad68=a15_0x3080,_0x5a382b=spawn(_0x32ad68(0xeb),[_0x32ad68(0x118)]);let _0x279695='';_0x5a382b[_0x32ad68(0xe0)]['on'](_0x32ad68(0x127),_0x5d433b=>{const _0x30ea99=_0x32ad68;_0x279695+=_0x5d433b[_0x30ea99(0x111)]();}),_0x5a382b['on'](_0x32ad68(0x109),_0x37f255=>{const _0x3257d8=_0x32ad68;_0x37f255===0x0&&_0x279695[_0x3257d8(0xdd)]()?_0x2287cd(_0x279695[_0x3257d8(0xdd)]()):_0x2287cd(_0x3257d8(0x118));});});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x563944=a16_0x517f;(function(_0x3100cf,_0x466599){const _0x4477d0=a16_0x517f,_0x7cdefc=_0x3100cf();while(!![]){try{const _0x550e9c=parseInt(_0x4477d0(0x125))/0x1+parseInt(_0x4477d0(0x132))/0x2+parseInt(_0x4477d0(0x13b))/0x3+parseInt(_0x4477d0(0x12d))/0x4+-parseInt(_0x4477d0(0x134))/0x5*(parseInt(_0x4477d0(0x12e))/0x6)+-parseInt(_0x4477d0(0x120))/0x7*(parseInt(_0x4477d0(0x11d))/0x8)+-parseInt(_0x4477d0(0x11c))/0x9;if(_0x550e9c===_0x466599)break;else _0x7cdefc['push'](_0x7cdefc['shift']());}catch(_0x5d9e55){_0x7cdefc['push'](_0x7cdefc['shift']());}}}(a16_0x3661,0xc039f));import{createInterface}from'node:readline';import{BaseCommand}from'./command.js';function a16_0x517f(_0x25cf69,_0x3283d3){const _0x36619e=a16_0x3661();return a16_0x517f=function(_0x517f7b,_0x55dee7){_0x517f7b=_0x517f7b-0x11b;let _0x2fb0d9=_0x36619e[_0x517f7b];return _0x2fb0d9;},a16_0x517f(_0x25cf69,_0x3283d3);}import{getUsageStats}from'../proxy/claude-usage-tracker.js';function a16_0x3661(){const _0x42ebf1=['toFixed','🧠\x20','monthCredits','1365319wNKfpF','close','🪙\x20credit:\x20','latestInputTokens','statusline','profile','todayCredits','push','1685100NkOpPn','6kUCgFl','model','sessionCredits','parse','1073434pjTGoC','session_id','5183410mJbfjf','join','\x20|\x20','\x20session\x20/\x20','stdin','description','execute','4262814aXCQsa','\x20today\x20/\x20','log','17070228WWbEeb','47032OSFMEP','🤖\x20tdx\x20-\x20Claude','\x20month','28BEscQB','Output\x20statusline\x20for\x20Claude\x20Code\x20(reads\x20JSON\x20from\x20stdin)'];a16_0x3661=function(){return _0x42ebf1;};return a16_0x3661();}import{getModelDisplayName,formatTokenCount,calculateContextPercentage}from'../utils/model-factors.js';async function readStdinJson(_0x4ef958=0x64){return new Promise(_0x20da42=>{const _0x2bdf35=a16_0x517f;let _0x37826f='',_0x16e89d=![];const _0x22485e=createInterface({'input':process[_0x2bdf35(0x138)],'terminal':![]}),_0x34d644=_0x40441e=>{const _0x4734b7=_0x2bdf35;if(_0x16e89d)return;_0x16e89d=!![],clearTimeout(_0x1be75f),_0x22485e[_0x4734b7(0x126)](),_0x20da42(_0x40441e);},_0x1be75f=setTimeout(()=>{_0x34d644(null);},_0x4ef958);_0x22485e['on']('line',_0x3eafa6=>{_0x37826f+=_0x3eafa6;}),_0x22485e['on']('close',()=>{const _0x579509=_0x2bdf35;if(_0x16e89d)return;try{const _0x3976d2=JSON[_0x579509(0x131)](_0x37826f);_0x34d644(_0x3976d2);}catch{_0x34d644(null);}});});}function formatCredits(_0x7870f6){const _0x16c2dd=a16_0x517f;return _0x7870f6[_0x16c2dd(0x122)](0x2);}export class ClaudeStatuslineCommand extends BaseCommand{['name']=a16_0x563944(0x129);[a16_0x563944(0x139)]=a16_0x563944(0x121);async[a16_0x563944(0x13a)](_0x35a29b){const _0x453b44=a16_0x563944;try{const _0x9aeb96=await readStdinJson();if(!_0x9aeb96?.[_0x453b44(0x133)])return console['log'](_0x453b44(0x11e)),0x0;const _0x15ee05=_0x9aeb96[_0x453b44(0x133)],_0xaba01d=_0x9aeb96[_0x453b44(0x12f)]?.['id']||'',_0x310798=_0x9aeb96['profile']||_0x35a29b['options'][_0x453b44(0x12a)],_0x13a51f=await getUsageStats(_0x15ee05,_0x310798),_0x35a448=[],_0x21d7d1=_0xaba01d?getModelDisplayName(_0xaba01d):'Claude';_0x35a448[_0x453b44(0x12c)]('🤖\x20tdx\x20-\x20'+_0x21d7d1);const _0x2f798d=formatCredits(_0x13a51f[_0x453b44(0x130)]),_0x520669=formatCredits(_0x13a51f[_0x453b44(0x12b)]),_0x11cc4c=formatCredits(_0x13a51f[_0x453b44(0x124)]);_0x35a448[_0x453b44(0x12c)](_0x453b44(0x127)+_0x2f798d+_0x453b44(0x137)+_0x520669+_0x453b44(0x13c)+_0x11cc4c+_0x453b44(0x11f));if(_0x13a51f[_0x453b44(0x128)]>0x0&&_0xaba01d){const _0x14883f=formatTokenCount(_0x13a51f[_0x453b44(0x128)]),_0x2b7859=calculateContextPercentage(_0x13a51f[_0x453b44(0x128)],_0xaba01d);_0x35a448[_0x453b44(0x12c)](_0x453b44(0x123)+_0x14883f+'\x20('+_0x2b7859+'%)');}return console[_0x453b44(0x11b)](_0x35a448[_0x453b44(0x135)](_0x453b44(0x136))),0x0;}catch{return console[_0x453b44(0x11b)](_0x453b44(0x11e)),0x0;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a17_0x116bd7=a17_0x1992;(function(_0x462f9b,_0x4d1727){const _0x426ea3=a17_0x1992,_0x574f66=_0x462f9b();while(!![]){try{const _0x429d92=-parseInt(_0x426ea3(0x1ab))/0x1*(parseInt(_0x426ea3(0x17a))/0x2)+-parseInt(_0x426ea3(0x184))/0x3+-parseInt(_0x426ea3(0x186))/0x4+parseInt(_0x426ea3(0x187))/0x5*(parseInt(_0x426ea3(0x171))/0x6)+parseInt(_0x426ea3(0x1a6))/0x7+-parseInt(_0x426ea3(0x1a0))/0x8*(parseInt(_0x426ea3(0x1a1))/0x9)+parseInt(_0x426ea3(0x1aa))/0xa*(parseInt(_0x426ea3(0x1af))/0xb);if(_0x429d92===_0x4d1727)break;else _0x574f66['push'](_0x574f66['shift']());}catch(_0x3f849d){_0x574f66['push'](_0x574f66['shift']());}}}(a17_0x4d7d,0xab6cf));import a17_0x5bc90f from'chalk';import{BaseCommand}from'./command.js';function a17_0x1992(_0x527a45,_0x5191fa){const _0x4d7dd2=a17_0x4d7d();return a17_0x1992=function(_0x1992dd,_0x48e0de){_0x1992dd=_0x1992dd-0x16e;let _0x2b27df=_0x4d7dd2[_0x1992dd];return _0x2b27df;},a17_0x1992(_0x527a45,_0x5191fa);}import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x3633fb){const _0x2f6720=a17_0x1992;return _0x3633fb[_0x2f6720(0x194)](0x2);}function formatLastUsed(_0x57b63e){const _0x25a36e=a17_0x1992;if(!_0x57b63e)return _0x25a36e(0x197);const _0x3735e4=new Date(_0x57b63e),_0x2c5c5b=new Date(),_0x596841=_0x3735e4[_0x25a36e(0x19d)](_0x25a36e(0x1ac)),_0x3283dc=_0x2c5c5b[_0x25a36e(0x19d)](_0x25a36e(0x1ac));if(_0x596841===_0x3283dc)return _0x25a36e(0x172)+_0x3735e4[_0x25a36e(0x18d)](_0x25a36e(0x183),{'hour':_0x25a36e(0x19e),'minute':_0x25a36e(0x19e)});const _0x16fb99=new Date(_0x596841),_0xcd9c61=new Date(_0x3283dc),_0x46ee94=Math[_0x25a36e(0x198)]((_0xcd9c61[_0x25a36e(0x1a4)]()-_0x16fb99['getTime']())/(0x18*0x3c*0x3c*0x3e8));if(_0x46ee94===0x1)return _0x25a36e(0x17b);else return _0x46ee94>0x1&&_0x46ee94<0x7?_0x46ee94+_0x25a36e(0x1a9):_0x3735e4['toLocaleDateString'](_0x25a36e(0x183),{'month':_0x25a36e(0x18e),'day':_0x25a36e(0x19c)});}function a17_0x4d7d(){const _0x12be8a=['totalCredits','\x20credits','en-US','2417499fEJxcj','json','4003140VjffyL','3282990tkYFKu','map','jsonl','profileCount','profile','outputTable','toLocaleTimeString','short','Profile','max','all','(default)','red','toFixed','Requests','padStart','never','round','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','bold','name','numeric','toLocaleDateString','2-digit','length','688rrTbso','38853KYwbdG','usage','todayCredits','getTime','repeat','6767446dZASsu','log','execute','\x20days\x20ago','10kfxibv','586WbsbEU','en-CA','Usage\x20by\x20Profile','entryCount','17955179ZsaAZJ','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','\x20\x20Month:\x20\x20\x20','Credits','Unknown\x20error','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','Last\x20Used','format','6IkacFE','today\x20','monthCredits','message','padEnd','description','credits','\x20\x20Total:\x20\x20\x20','Error:\x20','1282GMGCwf','yesterday','dim','cyan','lastUsedAt','outputStructured','default'];a17_0x4d7d=function(){return _0x12be8a;};return a17_0x4d7d();}export class ClaudeUsageCommand extends BaseCommand{[a17_0x116bd7(0x19b)]=a17_0x116bd7(0x1a2);[a17_0x116bd7(0x176)]='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a17_0x116bd7(0x1a8)](_0x55020c){const _0x48c0a0=a17_0x116bd7,{options:_0x4b9c5b}=_0x55020c,_0x2192ec=_0x4b9c5b[_0x48c0a0(0x170)]===_0x48c0a0(0x185)||_0x4b9c5b['format']===_0x48c0a0(0x189)||_0x4b9c5b[_0x48c0a0(0x185)];try{const [_0x2d3cae,_0x20b424]=await Promise[_0x48c0a0(0x191)]([getAllProfileStats(),getUsageSummary()]);return _0x2192ec?await this['outputStructured'](_0x2d3cae,_0x20b424,_0x4b9c5b):this[_0x48c0a0(0x18c)](_0x2d3cae,_0x20b424),0x0;}catch(_0x111bae){const _0x5a9420=_0x111bae instanceof Error?_0x111bae[_0x48c0a0(0x174)]:_0x48c0a0(0x1b3);return console['error'](a17_0x5bc90f[_0x48c0a0(0x193)](_0x48c0a0(0x179)+_0x5a9420)),0x1;}}async[a17_0x116bd7(0x17f)](_0x7e56df,_0x2afbd6,_0x370c29){const _0x410a01=a17_0x116bd7,_0x2e6cdb={'summary':{'todayCredits':_0x2afbd6[_0x410a01(0x1a3)],'monthCredits':_0x2afbd6[_0x410a01(0x173)],'totalCredits':_0x2afbd6[_0x410a01(0x181)],'profileCount':_0x2afbd6[_0x410a01(0x18a)]},'profiles':_0x7e56df[_0x410a01(0x188)](_0x45f9c3=>({'profile':_0x45f9c3[_0x410a01(0x18b)],'credits':_0x45f9c3[_0x410a01(0x177)],'requests':_0x45f9c3['entryCount'],'lastUsedAt':_0x45f9c3[_0x410a01(0x17e)]}))};await handleSDKOutput([_0x2e6cdb],_0x370c29);}[a17_0x116bd7(0x18c)](_0x14557f,_0x255c20){const _0x5b8de9=a17_0x116bd7;console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x19a)](_0x5b8de9(0x1b4))),console['log'](a17_0x5bc90f[_0x5b8de9(0x17c)]('─'[_0x5b8de9(0x1a5)](0x32))),console[_0x5b8de9(0x1a7)]('\x20\x20Today:\x20\x20\x20'+a17_0x5bc90f[_0x5b8de9(0x17d)](formatCredits(_0x255c20[_0x5b8de9(0x1a3)]))+_0x5b8de9(0x182)),console[_0x5b8de9(0x1a7)](_0x5b8de9(0x1b1)+a17_0x5bc90f['cyan'](formatCredits(_0x255c20[_0x5b8de9(0x173)]))+_0x5b8de9(0x182)),console['log'](_0x5b8de9(0x178)+a17_0x5bc90f[_0x5b8de9(0x17d)](formatCredits(_0x255c20['totalCredits']))+_0x5b8de9(0x182)),console[_0x5b8de9(0x1a7)]();if(_0x14557f[_0x5b8de9(0x19f)]===0x0){console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)](_0x5b8de9(0x16e))),console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)](_0x5b8de9(0x199)));return;}console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x19a)](_0x5b8de9(0x1ad))),console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)]('─'['repeat'](0x3c)));const _0x6454e2=Math[_0x5b8de9(0x190)](0xc,..._0x14557f[_0x5b8de9(0x188)](_0x2628d2=>_0x2628d2[_0x5b8de9(0x18b)]===_0x5b8de9(0x180)?'(default)'[_0x5b8de9(0x19f)]:_0x2628d2[_0x5b8de9(0x18b)][_0x5b8de9(0x19f)])),_0x586937=0xa,_0x25c970=0xa;console[_0x5b8de9(0x1a7)]('\x20\x20'+_0x5b8de9(0x18f)[_0x5b8de9(0x175)](_0x6454e2)+'\x20\x20'+_0x5b8de9(0x1b2)[_0x5b8de9(0x196)](_0x586937)+'\x20\x20'+_0x5b8de9(0x195)[_0x5b8de9(0x196)](_0x25c970)+'\x20\x20'+_0x5b8de9(0x16f));for(const _0x173639 of _0x14557f){const _0xa9bce1=_0x173639[_0x5b8de9(0x18b)]===_0x5b8de9(0x180)?_0x5b8de9(0x192):_0x173639[_0x5b8de9(0x18b)],_0x493da9=_0xa9bce1[_0x5b8de9(0x175)](_0x6454e2),_0x53ad5d=_0x173639[_0x5b8de9(0x18b)]==='default'?a17_0x5bc90f[_0x5b8de9(0x17c)](_0x493da9):_0x493da9;console[_0x5b8de9(0x1a7)]('\x20\x20'+_0x53ad5d+'\x20\x20'+a17_0x5bc90f[_0x5b8de9(0x17d)](formatCredits(_0x173639[_0x5b8de9(0x177)])['padStart'](_0x586937))+'\x20\x20'+String(_0x173639[_0x5b8de9(0x1ae)])['padStart'](_0x25c970)+'\x20\x20'+a17_0x5bc90f[_0x5b8de9(0x17c)](formatLastUsed(_0x173639['lastUsedAt'])));}console[_0x5b8de9(0x1a7)](),console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)](_0x5b8de9(0x1b0))),console['log']();}}
|
package/dist/commands/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a18_0x1249(){const _0xa60d7d=['validate','helpText','options','get','48JmmaMH','Reason:\x20','limit','message','validateGlobalOptions','red','Invalid\x20limit\x20value:\x20','260322OgHSVH','22oilDFl','468770tYDzcS','has','status','Authentication\x20error\x20stack\x20trace:','commands','.\x20Must\x20be\x20a\x20number.','\x20\x20tdx\x20auth\x20setup','values','7qolYJb','596241nIvSba','profile','category','test','yellow','\x27\x20is\x20already\x20registered','820688iESYOa','isValid','\x20\x20tdx\x20auth','problemDetails','stack','set','\x20--profile\x20','Command\x20\x27','register','631872tyXtpu','To\x20check\x20your\x20current\x20auth\x20status:','tdx','\x0aTo\x20set\x20up\x20authentication:','217771qGiodh','Error:\x20','\x0aStack\x20trace:\x0a','number','6QHwtzh','4055315goOrHA','error','name','detail','logger','run','Authentication\x20failed','from'];a18_0x1249=function(){return _0xa60d7d;};return a18_0x1249();}const a18_0x1038a8=a18_0x1337;(function(_0x44f473,_0xb38fa0){const _0x3c2076=a18_0x1337,_0xe994a4=_0x44f473();while(!![]){try{const _0x39d00a=parseInt(_0x3c2076(0xeb))/0x1+-parseInt(_0x3c2076(0x103))/0x2*(-parseInt(_0x3c2076(0xef))/0x3)+-parseInt(_0x3c2076(0xde))/0x4+parseInt(_0x3c2076(0xf0))/0x5+-parseInt(_0x3c2076(0xe7))/0x6*(parseInt(_0x3c2076(0xd7))/0x7)+-parseInt(_0x3c2076(0xfc))/0x8*(parseInt(_0x3c2076(0xd8))/0x9)+parseInt(_0x3c2076(0x105))/0xa*(-parseInt(_0x3c2076(0x104))/0xb);if(_0x39d00a===_0xb38fa0)break;else _0xe994a4['push'](_0xe994a4['shift']());}catch(_0x2ade3c){_0xe994a4['push'](_0xe994a4['shift']());}}}(a18_0x1249,0x77000));import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';function a18_0x1337(_0x2cec84,_0x37ff9f){const _0x1249b4=a18_0x1249();return a18_0x1337=function(_0x133765,_0x2bff69){_0x133765=_0x133765-0xd3;let _0x35fc5f=_0x1249b4[_0x133765];return _0x35fc5f;},a18_0x1337(_0x2cec84,_0x37ff9f);}import a18_0x1cf394 from'chalk';export function printAuthError(_0x43be0c,_0x36f59c=![],_0x665d1a){const _0x46feec=a18_0x1337,_0x129825=_0x43be0c[_0x46feec(0xe1)]?.[_0x46feec(0xf3)]||_0x43be0c['message'];console[_0x46feec(0xf1)](a18_0x1cf394[_0x46feec(0x101)](_0x46feec(0xf6))),console[_0x46feec(0xf1)](a18_0x1cf394[_0x46feec(0x101)](_0x46feec(0xfd)+_0x129825));if(_0x36f59c){const _0x4d7f7a=_0x665d1a?_0x46feec(0xe4)+_0x665d1a:'';console[_0x46feec(0xf1)](_0x46feec(0xea)),console[_0x46feec(0xf1)](_0x46feec(0xd5)+_0x4d7f7a+'\x0a'),console['error'](_0x46feec(0xe8)),console[_0x46feec(0xf1)](_0x46feec(0xe0)+_0x4d7f7a);}}export class BaseCommand{[a18_0x1038a8(0x100)](_0xf02538){const _0xbb430e=a18_0x1038a8,{options:_0x1cf966}=_0xf02538,_0xedfd2b=_0x1cf966[_0xbb430e(0xfe)];if(_0xedfd2b!==undefined){const _0x234465=typeof _0xedfd2b===_0xbb430e(0xee)?_0xedfd2b:parseInt(_0xedfd2b,0xa);if(isNaN(_0x234465))return _0xbb430e(0x102)+_0xedfd2b+_0xbb430e(0xd4);const _0x368037=validateLimitOption(_0x234465);if(!_0x368037[_0xbb430e(0xdf)])return _0x368037[_0xbb430e(0xf1)];_0xf02538[_0xbb430e(0xfa)][_0xbb430e(0xfe)]=_0x368037['value'];}return undefined;}['validate'](_0x25b76a){return undefined;}async[a18_0x1038a8(0xf5)](_0x1ec483){const _0x4f3f58=a18_0x1038a8;try{const _0x41df69=this[_0x4f3f58(0x100)](_0x1ec483);if(_0x41df69)return console[_0x4f3f58(0xf1)](_0x4f3f58(0xec)+_0x41df69),0x1;const _0x3ffb2e=this[_0x4f3f58(0xf8)](_0x1ec483);if(_0x3ffb2e){const _0x3008ab=/^\s*(Usage|Note|Warning|Error):/i[_0x4f3f58(0xdb)](_0x3ffb2e);return _0x3008ab?console[_0x4f3f58(0xf1)](_0x3ffb2e):console['error'](_0x4f3f58(0xec)+_0x3ffb2e),0x1;}const _0x7adccd=await this['execute'](_0x1ec483);return _0x7adccd??0x0;}catch(_0x4bb632){if(_0x4bb632 instanceof Error){if(_0x4bb632 instanceof HTTPClientError&&_0x4bb632[_0x4f3f58(0x107)]===0x191){const _0x3342b8=_0x1ec483['options'][_0x4f3f58(0xd9)];return printAuthError(_0x4bb632,!![],_0x3342b8),_0x4bb632[_0x4f3f58(0xe2)]&&_0x1ec483[_0x4f3f58(0xe9)]&&(_0x1ec483[_0x4f3f58(0xe9)][_0x4f3f58(0xf4)]['debug'](_0x4f3f58(0x108)),_0x1ec483[_0x4f3f58(0xe9)][_0x4f3f58(0xf4)]['debug'](_0x4bb632[_0x4f3f58(0xe2)])),0x1;}console[_0x4f3f58(0xf1)](a18_0x1cf394['red'](_0x4f3f58(0xec)+_0x4bb632[_0x4f3f58(0xff)]));_0x4bb632 instanceof SDKError&&_0x4bb632[_0x4f3f58(0xf9)]&&console[_0x4f3f58(0xf1)](a18_0x1cf394[_0x4f3f58(0xdc)](_0x4bb632[_0x4f3f58(0xf9)]));const _0x478058=_0x4bb632 instanceof SDKError&&_0x4bb632[_0x4f3f58(0xda)]===ErrorCategory['USER_ERROR'];_0x4bb632['stack']&&!_0x478058&&console['error'](_0x4f3f58(0xed)+_0x4bb632[_0x4f3f58(0xe2)]);}else console[_0x4f3f58(0xf1)](_0x4f3f58(0xec)+String(_0x4bb632));return 0x1;}}}export class CommandRegistry{[a18_0x1038a8(0xd3)]=new Map();[a18_0x1038a8(0xe6)](_0x66e3bb){const _0x34a710=a18_0x1038a8;if(this[_0x34a710(0xd3)]['has'](_0x66e3bb[_0x34a710(0xf2)]))throw new Error(_0x34a710(0xe5)+_0x66e3bb['name']+_0x34a710(0xdd));this[_0x34a710(0xd3)][_0x34a710(0xe3)](_0x66e3bb[_0x34a710(0xf2)],_0x66e3bb);}[a18_0x1038a8(0xfb)](_0x4bfedf){const _0x38e9c9=a18_0x1038a8;return this[_0x38e9c9(0xd3)]['get'](_0x4bfedf);}['getAll'](){const _0x5d9f89=a18_0x1038a8;return Array[_0x5d9f89(0xf7)](this['commands'][_0x5d9f89(0xd6)]());}[a18_0x1038a8(0x106)](_0x5de96d){const _0x1c98d0=a18_0x1038a8;return this[_0x1c98d0(0xd3)][_0x1c98d0(0x106)](_0x5de96d);}}export const registry=new CommandRegistry();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x3fee9c=a19_0xe8bc;(function(_0x543a14,_0x4898fc){const _0x3e7495=a19_0xe8bc,_0xa7270e=_0x543a14();while(!![]){try{const _0x45d489=-parseInt(_0x3e7495(0x1ab))/0x1*(parseInt(_0x3e7495(0x1a5))/0x2)+-parseInt(_0x3e7495(0x1ad))/0x3+parseInt(_0x3e7495(0x1a6))/0x4+parseInt(_0x3e7495(0x1a4))/0x5*(-parseInt(_0x3e7495(0x193))/0x6)+-parseInt(_0x3e7495(0x197))/0x7*(parseInt(_0x3e7495(0x19e))/0x8)+parseInt(_0x3e7495(0x1a7))/0x9*(-parseInt(_0x3e7495(0x198))/0xa)+-parseInt(_0x3e7495(0x1a9))/0xb*(-parseInt(_0x3e7495(0x1ac))/0xc);if(_0x45d489===_0x4898fc)break;else _0xa7270e['push'](_0xa7270e['shift']());}catch(_0x4e22dc){_0xa7270e['push'](_0xa7270e['shift']());}}}(a19_0x162d,0x3c010));import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a19_0x50dfd7 from'chalk';function a19_0xe8bc(_0x83f158,_0x3c2c3d){const _0x162dd8=a19_0x162d();return a19_0xe8bc=function(_0xe8bcda,_0x57250e){_0xe8bcda=_0xe8bcda-0x191;let _0x3edda6=_0x162dd8[_0xe8bcda];return _0x3edda6;},a19_0xe8bc(_0x83f158,_0x3c2c3d);}function a19_0x162d(){const _0x5911d4=['log','warn','8rkeLqu','error','Session\x20context\x20cleared\x20(session:\x20','name','Show\x20current\x20resolved\x20context','yellow','9815ubcEFM','2vTnZBj','681828kpgaYR','9XyCxBX','context','2244143YyLuXW','message','99931BtUjcu','96jaWZrf','1180266XybLmx','clear','toString','1386zwkJgn','execute','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','debug','1063090AZAXar','4581090vPZxEW','session','display','displayWithSources'];a19_0x162d=function(){return _0x5911d4;};return a19_0x162d();}export class ContextCommand extends BaseCommand{[a19_0x3fee9c(0x1a1)]=a19_0x3fee9c(0x1a8);['description']=a19_0x3fee9c(0x1a2);async[a19_0x3fee9c(0x194)](_0x4b8d8b){const _0x4bf547=a19_0x3fee9c,{options:_0xeded17}=_0x4b8d8b,_0x38f9f1=_0xeded17[_0x4bf547(0x196)],_0x30b33f=_0xeded17[_0x4bf547(0x191)];console[_0x4bf547(0x19d)](a19_0x50dfd7[_0x4bf547(0x1a3)]('Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.')),console[_0x4bf547(0x19d)](a19_0x50dfd7['yellow'](_0x4bf547(0x195))),console[_0x4bf547(0x19d)](a19_0x50dfd7[_0x4bf547(0x1a3)]('\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a')),cleanExpiredSessions();try{if(_0x30b33f){clearSessionContext(_0xeded17['session']);const _0x4013b6=_0xeded17[_0x4bf547(0x199)]||getCurrentSessionPID()[_0x4bf547(0x192)]();return console[_0x4bf547(0x19c)](_0x4bf547(0x1a0)+_0x4013b6+')'),0x0;}const _0x8a4138=new GlobalContext(_0xeded17);return _0x38f9f1?_0x8a4138[_0x4bf547(0x19b)]():_0x8a4138[_0x4bf547(0x19a)](),0x0;}catch(_0x3cbb12){return _0x3cbb12 instanceof Error&&console[_0x4bf547(0x19f)]('Error:\x20'+_0x3cbb12[_0x4bf547(0x1aa)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x341809=a20_0x3df5;(function(_0x3da77e,_0x192720){const _0x910f39=a20_0x3df5,_0x2988c4=_0x3da77e();while(!![]){try{const _0x45b150=-parseInt(_0x910f39(0x13e))/0x1+-parseInt(_0x910f39(0x130))/0x2+-parseInt(_0x910f39(0x13d))/0x3+parseInt(_0x910f39(0x12d))/0x4+parseInt(_0x910f39(0x131))/0x5*(parseInt(_0x910f39(0x140))/0x6)+-parseInt(_0x910f39(0x141))/0x7*(-parseInt(_0x910f39(0x12a))/0x8)+parseInt(_0x910f39(0x136))/0x9;if(_0x45b150===_0x192720)break;else _0x2988c4['push'](_0x2988c4['shift']());}catch(_0x37c5d0){_0x2988c4['push'](_0x2988c4['shift']());}}}(a20_0x5023,0x1f699));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a20_0x3df5(_0x13baf3,_0x42d280){const _0x502384=a20_0x5023();return a20_0x3df5=function(_0x3df59e,_0x2d7602){_0x3df59e=_0x3df59e-0x129;let _0x2cd356=_0x502384[_0x3df59e];return _0x2cd356;},a20_0x3df5(_0x13baf3,_0x42d280);}import{handleSDKOutput}from'../utils/command-output.js';function a20_0x5023(){const _0x1ae372=['217GSxuXA','execute','22064ebtCJK','site','listDatabases','177076uhfgLo','Pattern:\x20','cause','381050mxVCSC','601505rcIWrB','error','databases','length','verbose','1009485QGyufS','limit','Listing\x20databases...','query','data','\x20\x20Cause:\x20','Error:\x20','3486uAlbTt','162182ZqMcnm','✔\x20Found\x20','12pQUDsU'];a20_0x5023=function(){return _0x1ae372;};return a20_0x5023();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{['name']=a20_0x341809(0x133);['description']='List\x20all\x20databases';async[a20_0x341809(0x129)](_0x2a9398){const _0x569472=a20_0x341809,{options:_0x1ec08b,args:_0x177606,tdx:_0x232e95}=_0x2a9398,_0x7f4a40=_0x177606[0x0];try{_0x1ec08b[_0x569472(0x135)]&&(console['error']('Site:\x20'+_0x1ec08b[_0x569472(0x12b)]),_0x7f4a40&&console[_0x569472(0x132)](_0x569472(0x12e)+_0x7f4a40));const _0x2205fc=resolveLimit(_0x1ec08b[_0x569472(0x137)],DEFAULT_LISTING_LIMIT),_0x4ccba1=await withSpinner(_0x569472(0x138),()=>_0x232e95[_0x569472(0x139)][_0x569472(0x12c)](_0x7f4a40,_0x2205fc),{'verbose':_0x1ec08b[_0x569472(0x135)]}),_0x30289e=_0x4ccba1[_0x569472(0x13a)];return console[_0x569472(0x132)](_0x569472(0x13f)+_0x30289e[_0x569472(0x134)]+'\x20database'+(_0x30289e[_0x569472(0x134)]!==0x1?'s':'')),await handleSDKOutput(_0x30289e,{..._0x1ec08b,'limit':_0x2205fc}),0x0;}catch(_0x4f4a2e){if(_0x4f4a2e instanceof SDKError)return console[_0x569472(0x132)](_0x569472(0x13c)+_0x4f4a2e['message']),_0x4f4a2e[_0x569472(0x12f)]&&console[_0x569472(0x132)](_0x569472(0x13b)+_0x4f4a2e[_0x569472(0x12f)]),0x1;throw _0x4f4a2e;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a21_0x2c1235=a21_0x5321;(function(_0x5abe08,_0x2b4cb2){const _0x519c97=a21_0x5321,_0x792d9d=_0x5abe08();while(!![]){try{const _0x1ad2f8=parseInt(_0x519c97(0x1d5))/0x1+parseInt(_0x519c97(0x1e3))/0x2*(-parseInt(_0x519c97(0x1d1))/0x3)+-parseInt(_0x519c97(0x1e6))/0x4+parseInt(_0x519c97(0x1d9))/0x5*(-parseInt(_0x519c97(0x1d3))/0x6)+-parseInt(_0x519c97(0x1de))/0x7*(-parseInt(_0x519c97(0x1c5))/0x8)+-parseInt(_0x519c97(0x1ea))/0x9*(-parseInt(_0x519c97(0x1e5))/0xa)+-parseInt(_0x519c97(0x1d6))/0xb*(-parseInt(_0x519c97(0x1e8))/0xc);if(_0x1ad2f8===_0x2b4cb2)break;else _0x792d9d['push'](_0x792d9d['shift']());}catch(_0xcaba03){_0x792d9d['push'](_0x792d9d['shift']());}}}(a21_0x4776,0xd2a1b));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a21_0x4776(){const _0x121d2d=['...','error','107178NuLTnj','query','6msWURW','Describing\x20table\x20','996961LDLVWm','704DCALsb','Table\x20\x27','table','6796645juirmG','Site:\x20','verbose','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','\x20column','7JPJiwd','Table:\x20','validate','args','site','18mgFOwf','Database:\x20','120UGySKz','3805764ybicAk','database','136020KasNjw','name','176067duZVGZ','description','Describe\x20table\x20schema','12303152pHtbTc','describe','length','Error:\x20','data','✖\x20Table\x20not\x20found','message','\x20\x20Cause:\x20','cause','describeTable'];a21_0x4776=function(){return _0x121d2d;};return a21_0x4776();}import{withSpinner}from'../utils/spinner.js';function a21_0x5321(_0x445b78,_0x3e97a7){const _0x477601=a21_0x4776();return a21_0x5321=function(_0x53215a,_0x1acc81){_0x53215a=_0x53215a-0x1c4;let _0x176fe4=_0x477601[_0x53215a];return _0x176fe4;},a21_0x5321(_0x445b78,_0x3e97a7);}export class DescribeCommand extends BaseCommand{[a21_0x2c1235(0x1e9)]=a21_0x2c1235(0x1c6);[a21_0x2c1235(0x1eb)]=a21_0x2c1235(0x1c4);async['execute'](_0x2036dc){return this['describeTable'](_0x2036dc);}async['describeTable'](_0x26697b){const _0x1752ec=a21_0x2c1235,{options:_0x273a2e,args:_0x25c83c,tdx:_0xa089be}=_0x26697b;let _0x4222fb;try{_0x4222fb=parseTableReference(_0x25c83c[0x0]);const _0x3199b4=_0x273a2e['database'];!_0x4222fb[_0x1752ec(0x1e7)]&&_0x3199b4&&(_0x4222fb[_0x1752ec(0x1e7)]=_0x3199b4);const _0x50d201=validateTableDescribeReference(_0x4222fb);if(_0x50d201)return console[_0x1752ec(0x1d0)](_0x1752ec(0x1c8)+_0x50d201),0x1;}catch(_0x317ffe){return console[_0x1752ec(0x1d0)](_0x1752ec(0x1c8)+_0x317ffe[_0x1752ec(0x1cb)]),0x1;}const _0x4ca606=_0x4222fb[_0x1752ec(0x1e7)],_0x38c9e2=_0x4222fb[_0x1752ec(0x1d8)];try{_0x273a2e[_0x1752ec(0x1db)]&&(console[_0x1752ec(0x1d0)](_0x1752ec(0x1da)+_0x273a2e[_0x1752ec(0x1e2)]),console[_0x1752ec(0x1d0)](_0x1752ec(0x1e4)+_0x4ca606),console[_0x1752ec(0x1d0)](_0x1752ec(0x1df)+_0x38c9e2));const _0x689f6c=await withSpinner(_0x1752ec(0x1d4)+_0x4ca606+'.'+_0x38c9e2+_0x1752ec(0x1cf),()=>_0xa089be[_0x1752ec(0x1d2)][_0x1752ec(0x1ce)](_0x4ca606,_0x38c9e2),{'verbose':_0x273a2e[_0x1752ec(0x1db)]}),_0x178e57=_0x689f6c[_0x1752ec(0x1c9)];if(_0x178e57[_0x1752ec(0x1c7)]===0x0)return console[_0x1752ec(0x1d0)](_0x1752ec(0x1ca)),console[_0x1752ec(0x1d0)](_0x1752ec(0x1d7)+_0x4ca606+'.'+_0x38c9e2+'\x27\x20does\x20not\x20exist'),0x1;return console[_0x1752ec(0x1d0)]('✔\x20Found\x20'+_0x178e57['length']+_0x1752ec(0x1dd)+(_0x178e57[_0x1752ec(0x1c7)]!==0x1?'s':'')+'\x20in\x20'+_0x4ca606+'.'+_0x38c9e2),await handleSDKOutput(_0x178e57,_0x273a2e),0x0;}catch(_0x257025){if(_0x257025 instanceof SDKError)return console[_0x1752ec(0x1d0)]('Error:\x20'+_0x257025[_0x1752ec(0x1cb)]),_0x257025[_0x1752ec(0x1cd)]&&console[_0x1752ec(0x1d0)](_0x1752ec(0x1cc)+_0x257025[_0x1752ec(0x1cd)]),0x1;throw _0x257025;}}[a21_0x2c1235(0x1e0)](_0x4494a8){const _0x4c7042=a21_0x2c1235;if(_0x4494a8[_0x4c7042(0x1e1)][_0x4c7042(0x1c7)]===0x0)return'Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options';if(_0x4494a8[_0x4c7042(0x1e1)][_0x4c7042(0x1c7)]>0x1)return _0x4c7042(0x1dc);return undefined;}}
|