@treasuredata/tdx 0.1.8 → 0.1.9
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/README.md +14 -1
- package/dist/cli.js +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-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/chat-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/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +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/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/global-context.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.d.ts +36 -1
- package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/anthropic-adapter.js.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +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/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.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/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a19_0x236656=a19_0x3efb;(function(_0x38f769,_0xb634ce){const _0x598b58=a19_0x3efb,_0x5a1bc2=_0x38f769();while(!![]){try{const _0x2e9732=-parseInt(_0x598b58(0x198))/0x1*(parseInt(_0x598b58(0x1c5))/0x2)+parseInt(_0x598b58(0x1d7))/0x3+-parseInt(_0x598b58(0x1b7))/0x4+-parseInt(_0x598b58(0x19a))/0x5+parseInt(_0x598b58(0x1a8))/0x6+parseInt(_0x598b58(0x1cb))/0x7+parseInt(_0x598b58(0x199))/0x8*(parseInt(_0x598b58(0x18e))/0x9);if(_0x2e9732===_0xb634ce)break;else _0x5a1bc2['push'](_0x5a1bc2['shift']());}catch(_0x2393d5){_0x5a1bc2['push'](_0x5a1bc2['shift']());}}}(a19_0x3361,0xae748));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';function a19_0x3efb(_0x3ac31e,_0x1d8573){const _0x3361ce=a19_0x3361();return a19_0x3efb=function(_0x3efbc9,_0x5005c4){_0x3efbc9=_0x3efbc9-0x18d;let _0x50f688=_0x3361ce[_0x3efbc9];return _0x50f688;},a19_0x3efb(_0x3ac31e,_0x1d8573);}export class SegmentDescribeCommand extends BaseCommand{['name']=a19_0x236656(0x1ae);[a19_0x236656(0x1a6)]=a19_0x236656(0x1a9);async[a19_0x236656(0x190)](_0x55b2fd){const _0x1ddf04=a19_0x236656,{options:_0x582e67,args:_0x5dc767,tdx:_0x191f83}=_0x55b2fd;if(_0x5dc767[_0x1ddf04(0x1c4)]===0x0)return console[_0x1ddf04(0x1a2)](_0x1ddf04(0x19e)),console['error'](_0x1ddf04(0x1b2)),0x1;try{const {parentId:_0x3b124f,childId:_0x13ae84}=parseSegmentRef(_0x5dc767[0x0]);_0x582e67[_0x1ddf04(0x1a3)]&&(console[_0x1ddf04(0x1a2)](_0x1ddf04(0x1be)+_0x582e67[_0x1ddf04(0x1ab)]),console['error']('Parent\x20name:\x20'+_0x3b124f),_0x13ae84&&console[_0x1ddf04(0x1a2)](_0x1ddf04(0x1d5)+_0x13ae84));const _0x3d68d9=await withSpinner(_0x1ddf04(0x1bc)+_0x3b124f+_0x1ddf04(0x19b),()=>_0x191f83['segment']['resolveParentId'](_0x3b124f),{'verbose':_0x582e67[_0x1ddf04(0x1a3)]}),_0x1acffb=_0x3d68d9['data'];_0x582e67[_0x1ddf04(0x1a3)]&&console[_0x1ddf04(0x1a2)](_0x1ddf04(0x1d9)+_0x1acffb);if(!_0x13ae84){const _0x47baf4=await withSpinner(_0x1ddf04(0x1a7)+_0x3b124f+_0x1ddf04(0x19b),()=>_0x191f83['segment'][_0x1ddf04(0x1b8)](_0x1acffb),{'verbose':_0x582e67['verbose']});await handleSDKOutput([_0x47baf4[_0x1ddf04(0x1a4)]],_0x582e67);}else{const _0x39fc0b=await withSpinner('Resolving\x20child\x20segment\x20\x27'+_0x13ae84+_0x1ddf04(0x19b),()=>_0x191f83[_0x1ddf04(0x196)][_0x1ddf04(0x191)](_0x1acffb,_0x13ae84),{'verbose':_0x582e67[_0x1ddf04(0x1a3)]}),_0x418f18=_0x39fc0b['data'];_0x582e67['verbose']&&console[_0x1ddf04(0x1a2)](_0x1ddf04(0x1c0)+_0x418f18);const _0x4bd785=await withSpinner('Fetching\x20segment\x20\x27'+_0x13ae84+'\x27...',()=>_0x191f83[_0x1ddf04(0x196)][_0x1ddf04(0x19f)](_0x1acffb,_0x418f18),{'verbose':_0x582e67[_0x1ddf04(0x1a3)]});await handleSDKOutput([_0x4bd785[_0x1ddf04(0x1a4)]],_0x582e67);}return 0x0;}catch(_0x1518a6){if(_0x1518a6 instanceof SDKError)return console[_0x1ddf04(0x1a2)]('Error:\x20'+_0x1518a6[_0x1ddf04(0x195)]),_0x1518a6['cause']&&console[_0x1ddf04(0x1a2)](_0x1ddf04(0x1d8)+_0x1518a6[_0x1ddf04(0x1de)]),0x1;throw _0x1518a6;}}}export class SegmentShowCommand extends BaseCommand{[a19_0x236656(0x193)]=a19_0x236656(0x1d6);['description']='Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a19_0x236656(0x190)](_0x93620c){const _0x421064=a19_0x236656,{options:_0x17ccae,args:_0x43e234,tdx:_0x2db6b1}=_0x93620c;if(_0x43e234[_0x421064(0x1c4)]===0x0)return console[_0x421064(0x1a2)](_0x421064(0x19e)),console[_0x421064(0x1a2)](_0x421064(0x1bf)),0x1;try{const {parentId:_0x3b8693,childId:_0x3e3746}=parseSegmentRef(_0x43e234[0x0]);_0x17ccae[_0x421064(0x1a3)]&&(console[_0x421064(0x1a2)]('Site:\x20'+_0x17ccae[_0x421064(0x1ab)]),console['error'](_0x421064(0x1bb)+_0x3b8693),_0x3e3746&&console[_0x421064(0x1a2)]('Child\x20name:\x20'+_0x3e3746));const _0x11c665=await withSpinner(_0x421064(0x1bc)+_0x3b8693+'\x27...',()=>_0x2db6b1[_0x421064(0x196)][_0x421064(0x18f)](_0x3b8693),{'verbose':_0x17ccae[_0x421064(0x1a3)]}),_0xe3c9c6=_0x11c665[_0x421064(0x1a4)];_0x17ccae['verbose']&&console[_0x421064(0x1a2)](_0x421064(0x1d9)+_0xe3c9c6);let _0x354e16;if(!_0x3e3746){const _0x135aa0=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20\x27'+_0x3b8693+'\x27...',()=>_0x2db6b1[_0x421064(0x196)][_0x421064(0x1b4)](_0xe3c9c6),{'verbose':_0x17ccae[_0x421064(0x1a3)]});_0x354e16=_0x135aa0[_0x421064(0x1a4)];}else{const _0x5124de=await withSpinner(_0x421064(0x197)+_0x3e3746+'\x27...',()=>_0x2db6b1[_0x421064(0x196)][_0x421064(0x191)](_0xe3c9c6,_0x3e3746),{'verbose':_0x17ccae[_0x421064(0x1a3)]}),_0x123ca1=_0x5124de['data'];_0x17ccae[_0x421064(0x1a3)]&&console['error']('Resolved\x20child\x20ID:\x20'+_0x123ca1);const _0x37cdd9=await withSpinner(_0x421064(0x194)+_0x3e3746+_0x421064(0x19b),()=>_0x2db6b1[_0x421064(0x196)][_0x421064(0x1dd)](_0xe3c9c6,_0x123ca1),{'verbose':_0x17ccae[_0x421064(0x1a3)]});_0x354e16=_0x37cdd9[_0x421064(0x1a4)];}const _0x3afc79=_0x17ccae[_0x421064(0x19d)],_0x5192c1=/\bLIMIT\s+\d+/i[_0x421064(0x1c2)](_0x354e16);!_0x5192c1&&(_0x354e16=_0x354e16[_0x421064(0x19c)]()[_0x421064(0x1af)](/;+$/,''),_0x354e16=_0x421064(0x1d4)+_0x354e16+_0x421064(0x1c7)+_0x3afc79);_0x17ccae[_0x421064(0x1a3)]&&console['error'](_0x421064(0x1b5)+_0x354e16);const _0x3b8fe5=await withQuerySpinner('Executing\x20segment\x20query...',async _0xc11a17=>{const _0x4dad68=_0x421064,_0x578b5d=await _0x2db6b1[_0x4dad68(0x1ce)](_0x354e16,{'catalog':'td','schema':_0x4dad68(0x1c1),'onJobId':_0x105b4b=>{const _0x452d5a=_0x4dad68;_0xc11a17[_0x452d5a(0x1dc)](_0x105b4b);}});return _0x578b5d;},{'verbose':_0x17ccae['verbose']}),_0x2da6cf=_0x3b8fe5[_0x421064(0x1a4)],_0x5eee7b=_0x2da6cf[_0x421064(0x1ca)]?_0x421064(0x1cc)+_0x2da6cf[_0x421064(0x1ca)]+']':'';return console[_0x421064(0x1a2)](_0x421064(0x18d)+_0x2da6cf[_0x421064(0x1da)]['processedRows']['toLocaleString']()+_0x421064(0x1b1)+(_0x421064(0x1d0)+formatElapsed(_0x2da6cf['stats'][_0x421064(0x1b6)])+_0x5eee7b)),await handleQueryOutput(_0x2da6cf,_0x17ccae),0x0;}catch(_0x2c020f){if(_0x2c020f instanceof SDKError)return console[_0x421064(0x1a2)](_0x421064(0x1d1)+_0x2c020f[_0x421064(0x1d3)]+']'),console[_0x421064(0x1a2)]('\x0a'+_0x2c020f[_0x421064(0x195)]),0x1;throw _0x2c020f;}}}export class SegmentFolderListCommand extends BaseCommand{[a19_0x236656(0x193)]='segment:folder:list';[a19_0x236656(0x1a6)]='List\x20segment\x20folders\x20under\x20a\x20parent\x20segment';async[a19_0x236656(0x190)](_0x5e5585){const _0x5ab9d5=a19_0x236656,{options:_0x388e8d,args:_0x3712ea,tdx:_0x17c3e9}=_0x5e5585;if(_0x3712ea[_0x5ab9d5(0x1c4)]===0x0)return console[_0x5ab9d5(0x1a2)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x5ab9d5(0x1a2)]('Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>'),0x1;const _0xbdd236=_0x3712ea[0x0];try{_0x388e8d[_0x5ab9d5(0x1a3)]&&(console['error'](_0x5ab9d5(0x1be)+_0x388e8d[_0x5ab9d5(0x1ab)]),console[_0x5ab9d5(0x1a2)]('Parent\x20name:\x20'+_0xbdd236));const _0x405bb1=await withSpinner(_0x5ab9d5(0x1bc)+_0xbdd236+'\x27...',()=>_0x17c3e9[_0x5ab9d5(0x196)][_0x5ab9d5(0x18f)](_0xbdd236),{'verbose':_0x388e8d['verbose']}),_0x114d35=_0x405bb1[_0x5ab9d5(0x1a4)];_0x388e8d[_0x5ab9d5(0x1a3)]&&console['error'](_0x5ab9d5(0x1d9)+_0x114d35);const _0x1cb8b5=await withSpinner('Listing\x20folders\x20for\x20parent\x20\x27'+_0xbdd236+_0x5ab9d5(0x19b),()=>_0x17c3e9[_0x5ab9d5(0x196)][_0x5ab9d5(0x1db)](_0x114d35),{'verbose':_0x388e8d[_0x5ab9d5(0x1a3)]}),_0x4cd821=_0x1cb8b5['data'];return console[_0x5ab9d5(0x1a2)](_0x5ab9d5(0x1c9)+_0x4cd821[_0x5ab9d5(0x1c4)]+_0x5ab9d5(0x1b0)+(_0x4cd821[_0x5ab9d5(0x1c4)]!==0x1?'s':'')),await handleSDKOutput(_0x4cd821,_0x388e8d),0x0;}catch(_0x35f860){if(_0x35f860 instanceof SDKError)return console['error'](_0x5ab9d5(0x1ad)+_0x35f860[_0x5ab9d5(0x195)]),_0x35f860[_0x5ab9d5(0x1de)]&&console[_0x5ab9d5(0x1a2)](_0x5ab9d5(0x1d8)+_0x35f860['cause']),0x1;throw _0x35f860;}}}export class SegmentFolderShowCommand extends BaseCommand{[a19_0x236656(0x193)]=a19_0x236656(0x1c8);[a19_0x236656(0x1a6)]=a19_0x236656(0x1c6);async['execute'](_0x47d4c6){const _0x294d4f=a19_0x236656,{options:_0x5689db,args:_0x1fc74b,tdx:_0xf2b599}=_0x47d4c6;if(_0x1fc74b['length']===0x0)return console[_0x294d4f(0x1a2)](_0x294d4f(0x1ba)),console[_0x294d4f(0x1a2)](_0x294d4f(0x1cd)),0x1;try{const {parentId:_0x522c5e,childId:_0x408254}=parseSegmentRef(_0x1fc74b[0x0]);_0x5689db[_0x294d4f(0x1a3)]&&(console['error']('Site:\x20'+_0x5689db[_0x294d4f(0x1ab)]),console[_0x294d4f(0x1a2)]('Parent\x20name:\x20'+_0x522c5e),_0x408254&&console[_0x294d4f(0x1a2)](_0x294d4f(0x1a0)+_0x408254));if(!_0x408254)return console[_0x294d4f(0x1a2)](_0x294d4f(0x1bd)),0x1;const _0x10ee65=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x522c5e+_0x294d4f(0x19b),()=>_0xf2b599[_0x294d4f(0x196)]['resolveParentId'](_0x522c5e),{'verbose':_0x5689db[_0x294d4f(0x1a3)]}),_0xb7e463=_0x10ee65[_0x294d4f(0x1a4)];_0x5689db[_0x294d4f(0x1a3)]&&console[_0x294d4f(0x1a2)](_0x294d4f(0x1d9)+_0xb7e463);const _0x39628f=await withSpinner(_0x294d4f(0x1d2)+_0x408254+_0x294d4f(0x19b),()=>_0xf2b599[_0x294d4f(0x196)][_0x294d4f(0x1ac)](_0xb7e463,_0x408254),{'verbose':_0x5689db[_0x294d4f(0x1a3)]}),_0x42b1d1=_0x39628f[_0x294d4f(0x1a4)];_0x5689db['verbose']&&console['error'](_0x294d4f(0x1b9)+_0x42b1d1);const _0x31d524=await withSpinner(_0x294d4f(0x1aa)+_0x408254+_0x294d4f(0x19b),()=>_0xf2b599[_0x294d4f(0x196)]['getFolder'](_0x42b1d1),{'verbose':_0x5689db[_0x294d4f(0x1a3)]});return await handleSDKOutput([_0x31d524[_0x294d4f(0x1a4)]],_0x5689db),0x0;}catch(_0x46b26a){if(_0x46b26a instanceof SDKError)return console[_0x294d4f(0x1a2)](_0x294d4f(0x1ad)+_0x46b26a[_0x294d4f(0x195)]),_0x46b26a['cause']&&console[_0x294d4f(0x1a2)](_0x294d4f(0x1d8)+_0x46b26a['cause']),0x1;throw _0x46b26a;}}}export class SegmentSQLCommand extends BaseCommand{[a19_0x236656(0x193)]='segment:sql';[a19_0x236656(0x1a6)]=a19_0x236656(0x1a5);async[a19_0x236656(0x190)](_0x5ab5dc){const _0x206a31=a19_0x236656,{options:_0x100073,args:_0x1c48d1,tdx:_0x3341ae}=_0x5ab5dc;if(_0x1c48d1[_0x206a31(0x1c4)]===0x0)return console[_0x206a31(0x1a2)](_0x206a31(0x19e)),console['error'](_0x206a31(0x1b3)),0x1;try{const {parentId:_0x43a84e,childId:_0x10efef}=parseSegmentRef(_0x1c48d1[0x0]);_0x100073[_0x206a31(0x1a3)]&&(console[_0x206a31(0x1a2)](_0x206a31(0x1be)+_0x100073['site']),console[_0x206a31(0x1a2)](_0x206a31(0x1bb)+_0x43a84e),_0x10efef&&console[_0x206a31(0x1a2)](_0x206a31(0x1d5)+_0x10efef));const _0x576709=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x43a84e+_0x206a31(0x19b),()=>_0x3341ae[_0x206a31(0x196)][_0x206a31(0x18f)](_0x43a84e),{'verbose':_0x100073[_0x206a31(0x1a3)]}),_0x42d464=_0x576709[_0x206a31(0x1a4)];_0x100073[_0x206a31(0x1a3)]&&console['error'](_0x206a31(0x1d9)+_0x42d464);let _0xdff78a;if(!_0x10efef){const _0x3574c4=await withSpinner(_0x206a31(0x1cf)+_0x43a84e+_0x206a31(0x19b),()=>_0x3341ae[_0x206a31(0x196)]['getParentSQL'](_0x42d464),{'verbose':_0x100073['verbose']});_0xdff78a=_0x3574c4[_0x206a31(0x1a4)];}else{const _0x2da29a=await withSpinner(_0x206a31(0x197)+_0x10efef+_0x206a31(0x19b),()=>_0x3341ae[_0x206a31(0x196)][_0x206a31(0x191)](_0x42d464,_0x10efef),{'verbose':_0x100073[_0x206a31(0x1a3)]}),_0x57268d=_0x2da29a[_0x206a31(0x1a4)];_0x100073['verbose']&&console[_0x206a31(0x1a2)](_0x206a31(0x1c0)+_0x57268d);const _0x2e547e=await withSpinner('Fetching\x20SQL\x20for\x20segment\x20\x27'+_0x10efef+_0x206a31(0x19b),()=>_0x3341ae['segment'][_0x206a31(0x1dd)](_0x42d464,_0x57268d),{'verbose':_0x100073[_0x206a31(0x1a3)]});_0xdff78a=_0x2e547e[_0x206a31(0x1a4)];}return _0x100073[_0x206a31(0x1c3)]===_0x206a31(0x1a1)||_0x100073['format']==='jsonl'?await handleSDKOutput([{'sql':_0xdff78a}],_0x100073):console[_0x206a31(0x192)](_0xdff78a),0x0;}catch(_0x243819){if(_0x243819 instanceof SDKError)return console[_0x206a31(0x1a2)](_0x206a31(0x1ad)+_0x243819['message']),_0x243819[_0x206a31(0x1de)]&&console['error']('\x20\x20Cause:\x20'+_0x243819['cause']),0x1;throw _0x243819;}}}function a19_0x3361(){const _0x51a47a=['Resolving\x20parent\x20segment\x20\x27','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Site:\x20','Usage:\x20tdx\x20segment\x20show\x20<parent_name>\x20or\x20<parent_name/child_name>','Resolved\x20child\x20ID:\x20','information_schema','test','format','length','6FowSWL','Show\x20segment\x20folder\x20details','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','segment:folder:show','✔\x20Found\x20','jobId','705390KDBvwI','\x20[Job\x20ID:\x20','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','query','Fetching\x20SQL\x20for\x20parent\x20\x27','in\x20','✖\x20Query\x20failed\x20[','Resolving\x20folder\x20\x27','code','SELECT\x20*\x20FROM\x20(\x0a','Child\x20name:\x20','segment:show','3581754owHJSj','\x20\x20Cause:\x20','Resolved\x20parent\x20ID:\x20','stats','listFolders','setJobId','getSegmentSQL','cause','✔\x20Query\x20completed:\x20Processed\x20','1251ScbDpf','resolveParentId','execute','resolveSegmentId','log','name','Fetching\x20SQL\x20for\x20segment\x20\x27','message','segment','Resolving\x20child\x20segment\x20\x27','49262sbuJdp','56296juqXmv','6817380VttnCP','\x27...','trim','limit','Error:\x20Segment\x20name\x20is\x20required','getSegment','Folder\x20name:\x20','json','error','verbose','data','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','description','Fetching\x20parent\x20segment\x20\x27','1907688qZDxZb','Show\x20parent\x20or\x20child\x20segment\x20details','Fetching\x20folder\x20\x27','site','resolveFolderId','Error:\x20','segment:describe','replace','\x20folder','\x20rows\x20','Usage:\x20tdx\x20segment\x20describe\x20<parent_name>\x20or\x20<parent_name/child_name>','Usage:\x20tdx\x20segment\x20sql\x20<parent_name>\x20or\x20<parent_name/child_name>','getParentSQL','SQL\x20query:\x0a','elapsedTimeMillis','1459796JnKMMl','getParent','Resolved\x20folder\x20ID:\x20','Error:\x20Folder\x20reference\x20is\x20required','Parent\x20name:\x20'];a19_0x3361=function(){return _0x51a47a;};return a19_0x3361();}
|
|
1
|
+
const a19_0x17cb27=a19_0x2224;(function(_0x1b913e,_0x5ba251){const _0x46c091=a19_0x2224,_0x1cfde0=_0x1b913e();while(!![]){try{const _0x311e03=parseInt(_0x46c091(0x1df))/0x1*(parseInt(_0x46c091(0x1d0))/0x2)+-parseInt(_0x46c091(0x1e4))/0x3*(-parseInt(_0x46c091(0x1d1))/0x4)+-parseInt(_0x46c091(0x209))/0x5*(parseInt(_0x46c091(0x1eb))/0x6)+parseInt(_0x46c091(0x1c0))/0x7+-parseInt(_0x46c091(0x1fd))/0x8*(-parseInt(_0x46c091(0x1ff))/0x9)+-parseInt(_0x46c091(0x1c1))/0xa+parseInt(_0x46c091(0x1f6))/0xb*(-parseInt(_0x46c091(0x1c5))/0xc);if(_0x311e03===_0x5ba251)break;else _0x1cfde0['push'](_0x1cfde0['shift']());}catch(_0x12845e){_0x1cfde0['push'](_0x1cfde0['shift']());}}}(a19_0x403d,0xbc1a5));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a19_0x403d(){const _0x52c90f=['Fetching\x20SQL\x20for\x20parent\x20\x27','8QWINqr','resolveParentId','test','\x20\x20Cause:\x20','execute','120399NjmXBO','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','Folder\x20name:\x20','getFolder','json','Fetching\x20SQL\x20for\x20segment\x20\x27','segment:sql','702588duRfld','Resolved\x20parent\x20ID:\x20','Resolving\x20folder\x20\x27','Resolved\x20child\x20ID:\x20','Usage:\x20tdx\x20segment\x20sql\x20<parent_name>\x20or\x20<parent_name/child_name>','format','segment','Usage:\x20tdx\x20segment\x20show\x20<parent_name>\x20or\x20<parent_name/child_name>','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','elapsedTimeMillis','limit','132022KcaCwE','\x27...','error','log','getSegmentSQL','site','\x20rows\x20','48cnTZTQ','stats','1195983PSKpfN','in\x20','jsonl','message','Fetching\x20folder\x20\x27','length','Fetching\x20segment\x20\x27','getParentSQL','Error:\x20Folder\x20reference\x20is\x20required','Executing\x20segment\x20query...','20dBVONv','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','segment:show','information_schema','Child\x20name:\x20','\x20[Job\x20ID:\x20','Error:\x20Segment\x20name\x20is\x20required','segment:describe','5179496BIiNzc','12677350BNMuFh','data','description','processedRows','1308PuwMWi','Resolving\x20parent\x20segment\x20\x27','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','segment:folder:show','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Site:\x20','Fetching\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20segment\x20describe\x20<parent_name>\x20or\x20<parent_name/child_name>','verbose','cause','Resolving\x20child\x20segment\x20\x27','368726KwQoDa','80yUrrCu','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Resolved\x20folder\x20ID:\x20','name','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','Parent\x20name:\x20','Error:\x20','resolveSegmentId','SQL\x20query:\x0a','SELECT\x20*\x20FROM\x20(\x0a','✔\x20Found\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','listFolders'];a19_0x403d=function(){return _0x52c90f;};return a19_0x403d();}function a19_0x2224(_0x469edb,_0xc00316){const _0x403d1a=a19_0x403d();return a19_0x2224=function(_0x222484,_0x2f0d36){_0x222484=_0x222484-0x1bc;let _0x381598=_0x403d1a[_0x222484];return _0x381598;},a19_0x2224(_0x469edb,_0xc00316);}import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';export class SegmentDescribeCommand extends BaseCommand{['name']=a19_0x17cb27(0x1bf);[a19_0x17cb27(0x1c3)]='Show\x20parent\x20or\x20child\x20segment\x20details';async[a19_0x17cb27(0x1e3)](_0x3216ee){const _0x1ddd1b=a19_0x17cb27,{options:_0x314317,args:_0x5f96d6,tdx:_0x3bf560}=_0x3216ee;if(_0x5f96d6[_0x1ddd1b(0x204)]===0x0)return console[_0x1ddd1b(0x1f8)](_0x1ddd1b(0x1be)),console[_0x1ddd1b(0x1f8)](_0x1ddd1b(0x1cc)),0x1;try{const {parentId:_0x3683b3,childId:_0x1d6ef9}=parseSegmentRef(_0x5f96d6[0x0]);_0x314317[_0x1ddd1b(0x1cd)]&&(console[_0x1ddd1b(0x1f8)](_0x1ddd1b(0x1ca)+_0x314317[_0x1ddd1b(0x1fb)]),console[_0x1ddd1b(0x1f8)](_0x1ddd1b(0x1d6)+_0x3683b3),_0x1d6ef9&&console[_0x1ddd1b(0x1f8)](_0x1ddd1b(0x1bc)+_0x1d6ef9));const _0x21150e=await withSpinner(_0x1ddd1b(0x1c6)+_0x3683b3+_0x1ddd1b(0x1f7),()=>_0x3bf560[_0x1ddd1b(0x1f1)]['resolveParentId'](_0x3683b3),{'verbose':_0x314317[_0x1ddd1b(0x1cd)]}),_0x1ba3cf=_0x21150e['data'];_0x314317[_0x1ddd1b(0x1cd)]&&console[_0x1ddd1b(0x1f8)]('Resolved\x20parent\x20ID:\x20'+_0x1ba3cf);if(!_0x1d6ef9){const _0x3d9405=await withSpinner(_0x1ddd1b(0x1cb)+_0x3683b3+_0x1ddd1b(0x1f7),()=>_0x3bf560[_0x1ddd1b(0x1f1)]['getParent'](_0x1ba3cf),{'verbose':_0x314317['verbose']});await handleSDKOutput([_0x3d9405[_0x1ddd1b(0x1c2)]],_0x314317);}else{const _0x24ae06=await withSpinner(_0x1ddd1b(0x1cf)+_0x1d6ef9+'\x27...',()=>_0x3bf560[_0x1ddd1b(0x1f1)][_0x1ddd1b(0x1d8)](_0x1ba3cf,_0x1d6ef9),{'verbose':_0x314317[_0x1ddd1b(0x1cd)]}),_0xf964d8=_0x24ae06[_0x1ddd1b(0x1c2)];_0x314317[_0x1ddd1b(0x1cd)]&&console[_0x1ddd1b(0x1f8)](_0x1ddd1b(0x1ee)+_0xf964d8);const _0xe9ed5d=await withSpinner(_0x1ddd1b(0x205)+_0x1d6ef9+_0x1ddd1b(0x1f7),()=>_0x3bf560[_0x1ddd1b(0x1f1)]['getSegment'](_0x1ba3cf,_0xf964d8),{'verbose':_0x314317[_0x1ddd1b(0x1cd)]});await handleSDKOutput([_0xe9ed5d['data']],_0x314317);}return 0x0;}catch(_0x2ba072){if(_0x2ba072 instanceof SDKError)return console['error'](_0x1ddd1b(0x1d7)+_0x2ba072[_0x1ddd1b(0x202)]),_0x2ba072[_0x1ddd1b(0x1ce)]&&console[_0x1ddd1b(0x1f8)]('\x20\x20Cause:\x20'+_0x2ba072['cause']),0x1;throw _0x2ba072;}}}export class SegmentShowCommand extends BaseCommand{['name']=a19_0x17cb27(0x20b);['description']=a19_0x17cb27(0x1e5);async['execute'](_0x199768){const _0x1533d9=a19_0x17cb27,{options:_0xa368e,args:_0x3d8536,tdx:_0x5e8f37}=_0x199768;if(_0x3d8536[_0x1533d9(0x204)]===0x0)return console[_0x1533d9(0x1f8)](_0x1533d9(0x1be)),console[_0x1533d9(0x1f8)](_0x1533d9(0x1f2)),0x1;try{const {parentId:_0x206e63,childId:_0x25870a}=parseSegmentRef(_0x3d8536[0x0]);_0xa368e[_0x1533d9(0x1cd)]&&(console[_0x1533d9(0x1f8)]('Site:\x20'+_0xa368e[_0x1533d9(0x1fb)]),console['error'](_0x1533d9(0x1d6)+_0x206e63),_0x25870a&&console['error'](_0x1533d9(0x1bc)+_0x25870a));const _0x361226=await withSpinner(_0x1533d9(0x1c6)+_0x206e63+_0x1533d9(0x1f7),()=>_0x5e8f37[_0x1533d9(0x1f1)]['resolveParentId'](_0x206e63),{'verbose':_0xa368e[_0x1533d9(0x1cd)]}),_0x578e31=_0x361226[_0x1533d9(0x1c2)];_0xa368e['verbose']&&console[_0x1533d9(0x1f8)]('Resolved\x20parent\x20ID:\x20'+_0x578e31);let _0x5b1b47;if(!_0x25870a){const _0x544d6c=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20\x27'+_0x206e63+_0x1533d9(0x1f7),()=>_0x5e8f37[_0x1533d9(0x1f1)][_0x1533d9(0x206)](_0x578e31),{'verbose':_0xa368e[_0x1533d9(0x1cd)]});_0x5b1b47=_0x544d6c[_0x1533d9(0x1c2)];}else{const _0x59ea41=await withSpinner(_0x1533d9(0x1cf)+_0x25870a+_0x1533d9(0x1f7),()=>_0x5e8f37[_0x1533d9(0x1f1)][_0x1533d9(0x1d8)](_0x578e31,_0x25870a),{'verbose':_0xa368e['verbose']}),_0x35804d=_0x59ea41[_0x1533d9(0x1c2)];_0xa368e[_0x1533d9(0x1cd)]&&console[_0x1533d9(0x1f8)](_0x1533d9(0x1ee)+_0x35804d);const _0x263997=await withSpinner('Fetching\x20SQL\x20for\x20segment\x20\x27'+_0x25870a+_0x1533d9(0x1f7),()=>_0x5e8f37[_0x1533d9(0x1f1)][_0x1533d9(0x1fa)](_0x578e31,_0x35804d),{'verbose':_0xa368e[_0x1533d9(0x1cd)]});_0x5b1b47=_0x263997[_0x1533d9(0x1c2)];}const _0xa36517=_0xa368e[_0x1533d9(0x1f5)],_0x4f0e60=/\bLIMIT\s+\d+/i[_0x1533d9(0x1e1)](_0x5b1b47);!_0x4f0e60&&(_0x5b1b47=_0x5b1b47['trim']()['replace'](/;+$/,''),_0x5b1b47=_0x1533d9(0x1da)+_0x5b1b47+_0x1533d9(0x1f3)+_0xa36517);_0xa368e['verbose']&&console['error'](_0x1533d9(0x1d9)+_0x5b1b47);const _0x472f3b=await withQuerySpinner(_0x1533d9(0x208),async _0x388bda=>{const _0x54108a=_0x1533d9,_0x826553=await _0x5e8f37['query'](_0x5b1b47,{'catalog':'td','schema':_0x54108a(0x20c),'onJobId':_0x24773a=>{_0x388bda['setJobId'](_0x24773a);}});return _0x826553;},{'verbose':_0xa368e['verbose']}),_0x50d2a1=_0x472f3b['data'],_0x1a6938=_0x50d2a1['jobId']?_0x1533d9(0x1bd)+_0x50d2a1['jobId']+']':'';return console[_0x1533d9(0x1f8)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x50d2a1[_0x1533d9(0x1fe)][_0x1533d9(0x1c4)]['toLocaleString']()+_0x1533d9(0x1fc)+(_0x1533d9(0x200)+formatElapsed(_0x50d2a1[_0x1533d9(0x1fe)][_0x1533d9(0x1f4)])+_0x1a6938)),await handleQueryOutput(_0x50d2a1,_0xa368e),0x0;}catch(_0xb19a24){if(_0xb19a24 instanceof SDKError)return console[_0x1533d9(0x1f8)]('✖\x20Query\x20failed\x20['+_0xb19a24['code']+']'),console['error']('\x0a'+_0xb19a24[_0x1533d9(0x202)]),0x1;throw _0xb19a24;}}}export class SegmentFolderListCommand extends BaseCommand{[a19_0x17cb27(0x1d4)]='segment:folder:list';[a19_0x17cb27(0x1c3)]=a19_0x17cb27(0x1c7);async['execute'](_0x119646){const _0x10a154=a19_0x17cb27,{options:_0x184123,args:_0x513467,tdx:_0x5e59a8}=_0x119646;if(_0x513467[_0x10a154(0x204)]===0x0)return console[_0x10a154(0x1f8)](_0x10a154(0x1dc)),console[_0x10a154(0x1f8)](_0x10a154(0x20a)),0x1;const _0x4ff50a=_0x513467[0x0];try{_0x184123['verbose']&&(console[_0x10a154(0x1f8)]('Site:\x20'+_0x184123[_0x10a154(0x1fb)]),console[_0x10a154(0x1f8)](_0x10a154(0x1d6)+_0x4ff50a));const _0x4ed22a=await withSpinner(_0x10a154(0x1c6)+_0x4ff50a+_0x10a154(0x1f7),()=>_0x5e59a8['segment']['resolveParentId'](_0x4ff50a),{'verbose':_0x184123[_0x10a154(0x1cd)]}),_0x4ce97e=_0x4ed22a[_0x10a154(0x1c2)];_0x184123[_0x10a154(0x1cd)]&&console[_0x10a154(0x1f8)](_0x10a154(0x1ec)+_0x4ce97e);const _0x4bb166=await withSpinner('Listing\x20folders\x20for\x20parent\x20\x27'+_0x4ff50a+_0x10a154(0x1f7),()=>_0x5e59a8[_0x10a154(0x1f1)][_0x10a154(0x1dd)](_0x4ce97e),{'verbose':_0x184123['verbose']}),_0x178375=_0x4bb166[_0x10a154(0x1c2)];return console[_0x10a154(0x1f8)](_0x10a154(0x1db)+_0x178375[_0x10a154(0x204)]+'\x20folder'+(_0x178375['length']!==0x1?'s':'')),await handleSDKOutput(_0x178375,_0x184123),0x0;}catch(_0x353674){if(_0x353674 instanceof SDKError)return console[_0x10a154(0x1f8)](_0x10a154(0x1d7)+_0x353674[_0x10a154(0x202)]),_0x353674[_0x10a154(0x1ce)]&&console[_0x10a154(0x1f8)](_0x10a154(0x1e2)+_0x353674[_0x10a154(0x1ce)]),0x1;throw _0x353674;}}}export class SegmentFolderShowCommand extends BaseCommand{[a19_0x17cb27(0x1d4)]=a19_0x17cb27(0x1c8);[a19_0x17cb27(0x1c3)]='Show\x20segment\x20folder\x20details';async['execute'](_0x4918de){const _0x4c33c8=a19_0x17cb27,{options:_0x12bef9,args:_0x15c123,tdx:_0x5ecc34}=_0x4918de;if(_0x15c123[_0x4c33c8(0x204)]===0x0)return console['error'](_0x4c33c8(0x207)),console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1c9)),0x1;try{const {parentId:_0x4f4590,childId:_0x1e363e}=parseSegmentRef(_0x15c123[0x0]);_0x12bef9[_0x4c33c8(0x1cd)]&&(console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1ca)+_0x12bef9['site']),console[_0x4c33c8(0x1f8)]('Parent\x20name:\x20'+_0x4f4590),_0x1e363e&&console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1e6)+_0x1e363e));if(!_0x1e363e)return console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1d2)),0x1;const _0x4a83cd=await withSpinner(_0x4c33c8(0x1c6)+_0x4f4590+_0x4c33c8(0x1f7),()=>_0x5ecc34[_0x4c33c8(0x1f1)][_0x4c33c8(0x1e0)](_0x4f4590),{'verbose':_0x12bef9[_0x4c33c8(0x1cd)]}),_0x518131=_0x4a83cd[_0x4c33c8(0x1c2)];_0x12bef9[_0x4c33c8(0x1cd)]&&console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1ec)+_0x518131);const _0x89ba8f=await withSpinner(_0x4c33c8(0x1ed)+_0x1e363e+'\x27...',()=>_0x5ecc34[_0x4c33c8(0x1f1)]['resolveFolderId'](_0x518131,_0x1e363e),{'verbose':_0x12bef9[_0x4c33c8(0x1cd)]}),_0x43d34d=_0x89ba8f['data'];_0x12bef9[_0x4c33c8(0x1cd)]&&console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1d3)+_0x43d34d);const _0x5cc742=await withSpinner(_0x4c33c8(0x203)+_0x1e363e+_0x4c33c8(0x1f7),()=>_0x5ecc34['segment'][_0x4c33c8(0x1e7)](_0x43d34d),{'verbose':_0x12bef9[_0x4c33c8(0x1cd)]});return await handleSDKOutput([_0x5cc742[_0x4c33c8(0x1c2)]],_0x12bef9),0x0;}catch(_0x51f710){if(_0x51f710 instanceof SDKError)return console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1d7)+_0x51f710[_0x4c33c8(0x202)]),_0x51f710[_0x4c33c8(0x1ce)]&&console[_0x4c33c8(0x1f8)](_0x4c33c8(0x1e2)+_0x51f710[_0x4c33c8(0x1ce)]),0x1;throw _0x51f710;}}}export class SegmentSQLCommand extends BaseCommand{['name']=a19_0x17cb27(0x1ea);[a19_0x17cb27(0x1c3)]=a19_0x17cb27(0x1d5);async[a19_0x17cb27(0x1e3)](_0x978879){const _0x15d7c3=a19_0x17cb27,{options:_0x2c1ddf,args:_0xeaa621,tdx:_0x51b7bc}=_0x978879;if(_0xeaa621[_0x15d7c3(0x204)]===0x0)return console['error']('Error:\x20Segment\x20name\x20is\x20required'),console['error'](_0x15d7c3(0x1ef)),0x1;try{const {parentId:_0x48ba96,childId:_0x39a358}=parseSegmentRef(_0xeaa621[0x0]);_0x2c1ddf[_0x15d7c3(0x1cd)]&&(console[_0x15d7c3(0x1f8)](_0x15d7c3(0x1ca)+_0x2c1ddf[_0x15d7c3(0x1fb)]),console[_0x15d7c3(0x1f8)](_0x15d7c3(0x1d6)+_0x48ba96),_0x39a358&&console[_0x15d7c3(0x1f8)]('Child\x20name:\x20'+_0x39a358));const _0x5896c0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x48ba96+_0x15d7c3(0x1f7),()=>_0x51b7bc[_0x15d7c3(0x1f1)][_0x15d7c3(0x1e0)](_0x48ba96),{'verbose':_0x2c1ddf['verbose']}),_0x440a97=_0x5896c0['data'];_0x2c1ddf[_0x15d7c3(0x1cd)]&&console[_0x15d7c3(0x1f8)](_0x15d7c3(0x1ec)+_0x440a97);let _0x5cb5f3;if(!_0x39a358){const _0x1c8df8=await withSpinner(_0x15d7c3(0x1de)+_0x48ba96+_0x15d7c3(0x1f7),()=>_0x51b7bc['segment']['getParentSQL'](_0x440a97),{'verbose':_0x2c1ddf[_0x15d7c3(0x1cd)]});_0x5cb5f3=_0x1c8df8[_0x15d7c3(0x1c2)];}else{const _0x8801f6=await withSpinner(_0x15d7c3(0x1cf)+_0x39a358+_0x15d7c3(0x1f7),()=>_0x51b7bc[_0x15d7c3(0x1f1)]['resolveSegmentId'](_0x440a97,_0x39a358),{'verbose':_0x2c1ddf[_0x15d7c3(0x1cd)]}),_0x37bf9a=_0x8801f6[_0x15d7c3(0x1c2)];_0x2c1ddf[_0x15d7c3(0x1cd)]&&console[_0x15d7c3(0x1f8)]('Resolved\x20child\x20ID:\x20'+_0x37bf9a);const _0x2ebea3=await withSpinner(_0x15d7c3(0x1e9)+_0x39a358+_0x15d7c3(0x1f7),()=>_0x51b7bc[_0x15d7c3(0x1f1)]['getSegmentSQL'](_0x440a97,_0x37bf9a),{'verbose':_0x2c1ddf[_0x15d7c3(0x1cd)]});_0x5cb5f3=_0x2ebea3[_0x15d7c3(0x1c2)];}return _0x2c1ddf[_0x15d7c3(0x1f0)]===_0x15d7c3(0x1e8)||_0x2c1ddf['format']===_0x15d7c3(0x201)?await handleSDKOutput([{'sql':_0x5cb5f3}],_0x2c1ddf):console[_0x15d7c3(0x1f9)](_0x5cb5f3),0x0;}catch(_0x52e4ad){if(_0x52e4ad instanceof SDKError)return console[_0x15d7c3(0x1f8)](_0x15d7c3(0x1d7)+_0x52e4ad[_0x15d7c3(0x202)]),_0x52e4ad[_0x15d7c3(0x1ce)]&&console[_0x15d7c3(0x1f8)](_0x15d7c3(0x1e2)+_0x52e4ad[_0x15d7c3(0x1ce)]),0x1;throw _0x52e4ad;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a20_0x183e(_0x459ebc,_0x1735e4){const _0x123304=a20_0x1233();return a20_0x183e=function(_0x183e96,_0x5c38df){_0x183e96=_0x183e96-0xab;let _0x58e513=_0x123304[_0x183e96];return _0x58e513;},a20_0x183e(_0x459ebc,_0x1735e4);}const a20_0x235a36=a20_0x183e;(function(_0x245f05,_0x4d5d97){const _0x44e7dc=a20_0x183e,_0xee74dd=_0x245f05();while(!![]){try{const _0x20df08=parseInt(_0x44e7dc(0xaf))/0x1+parseInt(_0x44e7dc(0xc5))/0x2+parseInt(_0x44e7dc(0xba))/0x3*(parseInt(_0x44e7dc(0xbd))/0x4)+-parseInt(_0x44e7dc(0xc6))/0x5*(-parseInt(_0x44e7dc(0xc0))/0x6)+-parseInt(_0x44e7dc(0xc8))/0x7*(parseInt(_0x44e7dc(0xab))/0x8)+-parseInt(_0x44e7dc(0xd0))/0x9*(parseInt(_0x44e7dc(0xd1))/0xa)+-parseInt(_0x44e7dc(0xcd))/0xb;if(_0x20df08===_0x4d5d97)break;else _0xee74dd['push'](_0xee74dd['shift']());}catch(_0x390d1f){_0xee74dd['push'](_0xee74dd['shift']());}}}(a20_0x1233,0x9b4b6));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a20_0x1233(){const _0x1001d8=['2527888ZPtPES','3860BUtBkL','segments','9688EtqHnd','Listing\x20segments\x20for\x20parent\x20\x27','execute','cause','✔\x20Found\x20','7042310zOnoRE','data','updatedAt','823518pzffko','40iOtduj','Listing\x20parent\x20segments...','1992jywirE','site','message','population','171739GpZLYo','listParents','map','name','List\x20parent\x20segments\x20or\x20child\x20segments','length','segment','Resolved\x20parent\x20ID:\x20','verbose','Site:\x20','\x20parent\x20segment','366015BtcKao','createdAt','resolveParentId','4WXmOHY','error','\x27...','3336ayvxsQ','Resolving\x20parent\x20segment\x20\x27','description','attributes','\x20\x20Cause:\x20'];a20_0x1233=function(){return _0x1001d8;};return a20_0x1233();}import{withSpinner}from'../utils/spinner.js';export class SegmentsCommand extends BaseCommand{[a20_0x235a36(0xb2)]=a20_0x235a36(0xc7);[a20_0x235a36(0xc2)]=a20_0x235a36(0xb3);async[a20_0x235a36(0xca)](_0x43938e){const _0x3dd45f=a20_0x235a36,{options:_0x3df37e,args:_0x2a55ba,tdx:_0x320a8c}=_0x43938e,_0x1a503a=_0x2a55ba[0x0];try{_0x3df37e[_0x3dd45f(0xb7)]&&(console[_0x3dd45f(0xbe)](_0x3dd45f(0xb8)+_0x3df37e[_0x3dd45f(0xac)]),_0x1a503a&&console[_0x3dd45f(0xbe)]('Parent\x20name:\x20'+_0x1a503a));if(!_0x1a503a){const _0x124e5f=await withSpinner(_0x3dd45f(0xd2),()=>_0x320a8c[_0x3dd45f(0xb5)][_0x3dd45f(0xb0)](),{'verbose':_0x3df37e[_0x3dd45f(0xb7)]}),_0x201f1c=_0x124e5f['data'];console[_0x3dd45f(0xbe)](_0x3dd45f(0xcc)+_0x201f1c[_0x3dd45f(0xb4)]+_0x3dd45f(0xb9)+(_0x201f1c[_0x3dd45f(0xb4)]!==0x1?'s':''));const _0x493cb4=_0x201f1c[_0x3dd45f(0xb1)](_0x353726=>({'id':_0x353726['id'],'name':_0x353726[_0x3dd45f(0xc3)][_0x3dd45f(0xb2)],'description':_0x353726[_0x3dd45f(0xc3)][_0x3dd45f(0xc2)],'population':_0x353726['attributes'][_0x3dd45f(0xae)],'createdAt':_0x353726[_0x3dd45f(0xc3)]['createdAt'],'updatedAt':_0x353726[_0x3dd45f(0xc3)][_0x3dd45f(0xcf)]}));await handleSDKOutput(_0x493cb4,_0x3df37e);}else{const _0x51288d=await withSpinner(_0x3dd45f(0xc1)+_0x1a503a+'\x27...',()=>_0x320a8c[_0x3dd45f(0xb5)][_0x3dd45f(0xbc)](_0x1a503a),{'verbose':_0x3df37e[_0x3dd45f(0xb7)]}),_0x92d457=_0x51288d[_0x3dd45f(0xce)];_0x3df37e[_0x3dd45f(0xb7)]&&console[_0x3dd45f(0xbe)](_0x3dd45f(0xb6)+_0x92d457);const _0x1696af=await withSpinner(_0x3dd45f(0xc9)+_0x1a503a+_0x3dd45f(0xbf),()=>_0x320a8c[_0x3dd45f(0xb5)]['listSegments'](_0x92d457),{'verbose':_0x3df37e[_0x3dd45f(0xb7)]}),_0x3d62ab=_0x1696af[_0x3dd45f(0xce)];console[_0x3dd45f(0xbe)]('✔\x20Found\x20'+_0x3d62ab[_0x3dd45f(0xb4)]+'\x20segment'+(_0x3d62ab[_0x3dd45f(0xb4)]!==0x1?'s':''));const _0x18efd0=_0x3d62ab[_0x3dd45f(0xb1)](_0x38095f=>({'id':_0x38095f['id'],'name':_0x38095f['name'],'description':_0x38095f[_0x3dd45f(0xc2)],'population':_0x38095f['population'],'createdAt':_0x38095f[_0x3dd45f(0xbb)],'updatedAt':_0x38095f[_0x3dd45f(0xcf)]}));await handleSDKOutput(_0x18efd0,_0x3df37e);}return 0x0;}catch(_0x8186de){if(_0x8186de instanceof SDKError)return console[_0x3dd45f(0xbe)]('Error:\x20'+_0x8186de[_0x3dd45f(0xad)]),_0x8186de[_0x3dd45f(0xcb)]&&console[_0x3dd45f(0xbe)](_0x3dd45f(0xc4)+_0x8186de[_0x3dd45f(0xcb)]),0x1;throw _0x8186de;}}}
|
package/dist/commands/show.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x2e842e=a21_0x253f;(function(_0x31dfe7,_0x377c47){const _0x4a7657=a21_0x253f,_0x1b1dca=_0x31dfe7();while(!![]){try{const _0x435374=-parseInt(_0x4a7657(0x1c9))/0x1+-parseInt(_0x4a7657(0x1be))/0x2*(parseInt(_0x4a7657(0x1c7))/0x3)+parseInt(_0x4a7657(0x1c5))/0x4*(-parseInt(_0x4a7657(0x1b3))/0x5)+parseInt(_0x4a7657(0x1b5))/0x6+parseInt(_0x4a7657(0x1bc))/0x7*(parseInt(_0x4a7657(0x1a7))/0x8)+parseInt(_0x4a7657(0x1cd))/0x9+parseInt(_0x4a7657(0x1cf))/0xa*(parseInt(_0x4a7657(0x1cb))/0xb);if(_0x435374===_0x377c47)break;else _0x1b1dca['push'](_0x1b1dca['shift']());}catch(_0x45cd0f){_0x1b1dca['push'](_0x1b1dca['shift']());}}}(a21_0x1103,0xada66));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a21_0x253f(_0x2d7546,_0x5644a6){const _0x1103b1=a21_0x1103();return a21_0x253f=function(_0x253fa2,_0x41af01){_0x253fa2=_0x253fa2-0x1a7;let _0x166779=_0x1103b1[_0x253fa2];return _0x166779;},a21_0x253f(_0x2d7546,_0x5644a6);}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a21_0x1103(){const _0x266d81=['database','limit','15mHdQFh','cause','2018694jxAkel','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Catalog:\x20','validate','\x20from\x20','Site:\x20','Limit:\x20','150619IMfZxI','catalog','366jtuLlX','showTable','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','\x20\x20Cause:\x20','execute','message','error','938084TSykeb','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','16365nOpwLu','Usage:\x20tdx\x20show\x20<database.table>','201048wykwWX','verbose','242BYSWjA','length','2331549ovxZsU','Database:\x20','663270Xzthky','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','208rRFjoZ','show','Table:\x20','args','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Error:\x20','description','Show\x20table\x20contents','table','site'];a21_0x1103=function(){return _0x266d81;};return a21_0x1103();}export class ShowCommand extends BaseCommand{['name']=a21_0x2e842e(0x1a8);[a21_0x2e842e(0x1ad)]=a21_0x2e842e(0x1ae);async[a21_0x2e842e(0x1c2)](_0x462d74){const _0x43a027=a21_0x2e842e;return this[_0x43a027(0x1bf)](_0x462d74);}async[a21_0x2e842e(0x1bf)](_0xa02d8e){const _0x59cbc7=a21_0x2e842e,{options:_0x40e22e,args:_0x33134b,tdx:_0x2ddba5}=_0xa02d8e;let _0x9bedb1;try{_0x9bedb1=parseTableReference(_0x33134b[0x0]);const _0x217c96=_0x40e22e['database'];!_0x9bedb1[_0x59cbc7(0x1b1)]&&_0x217c96&&(_0x9bedb1[_0x59cbc7(0x1b1)]=_0x217c96);const _0x53ad1a=validateTableDescribeReference(_0x9bedb1);if(_0x53ad1a)return console['error']('Error:\x20'+_0x53ad1a),console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1c8)),console['error'](_0x59cbc7(0x1d0)),console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1c6)),0x1;}catch(_0x3ca24f){return console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1ac)+_0x3ca24f[_0x59cbc7(0x1c3)]),console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1c8)),console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1d0)),console[_0x59cbc7(0x1c4)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x116b63=_0x9bedb1[_0x59cbc7(0x1bd)],_0x46247b=_0x9bedb1[_0x59cbc7(0x1b1)],_0x38960f=_0x9bedb1[_0x59cbc7(0x1af)],_0x2b27ea=_0x40e22e[_0x59cbc7(0x1b2)];try{_0x40e22e['verbose']&&(console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1ba)+_0x40e22e[_0x59cbc7(0x1b0)]),_0x116b63&&console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1b7)+_0x116b63),console['error'](_0x59cbc7(0x1ce)+_0x46247b),console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1a9)+_0x38960f),console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1bb)+_0x2b27ea));const _0xf771cd=_0x116b63?_0x116b63+'.'+_0x46247b+'.'+_0x38960f:_0x46247b+'.'+_0x38960f,_0x409dcc=await withSpinner('Querying\x20'+_0xf771cd+'...',()=>_0x2ddba5[_0x59cbc7(0x1af)]['show'](_0x46247b,_0x38960f,_0x2b27ea,_0x116b63),{'verbose':_0x40e22e[_0x59cbc7(0x1ca)]}),_0x4dbe9b=_0x409dcc[_0x59cbc7(0x1d1)],_0x30e7b8=_0x4dbe9b[_0x59cbc7(0x1d1)];return _0x30e7b8[_0x59cbc7(0x1cc)]===0x0?console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1c0)):console[_0x59cbc7(0x1c4)]('✔\x20Retrieved\x20'+_0x30e7b8[_0x59cbc7(0x1cc)]+'\x20row'+(_0x30e7b8[_0x59cbc7(0x1cc)]!==0x1?'s':'')+_0x59cbc7(0x1b9)+_0xf771cd),await handleSDKOutput(_0x30e7b8,_0x40e22e),0x0;}catch(_0x880dc5){if(_0x880dc5 instanceof SDKError)return console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1ac)+_0x880dc5['message']),_0x880dc5['cause']&&console[_0x59cbc7(0x1c4)](_0x59cbc7(0x1c1)+_0x880dc5[_0x59cbc7(0x1b4)]),0x1;throw _0x880dc5;}}[a21_0x2e842e(0x1b8)](_0x355652){const _0x49c96a=a21_0x2e842e;if(_0x355652[_0x49c96a(0x1aa)][_0x49c96a(0x1cc)]===0x0)return _0x49c96a(0x1ab);if(_0x355652[_0x49c96a(0x1aa)][_0x49c96a(0x1cc)]>0x1)return _0x49c96a(0x1b6);return undefined;}}
|
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x369e5c=a22_0x5db4;(function(_0x37cfd0,_0x59d683){const _0x3a2737=a22_0x5db4,_0xd60c62=_0x37cfd0();while(!![]){try{const _0x5aadd2=parseInt(_0x3a2737(0x92))/0x1*(-parseInt(_0x3a2737(0x81))/0x2)+-parseInt(_0x3a2737(0x98))/0x3*(-parseInt(_0x3a2737(0xa2))/0x4)+parseInt(_0x3a2737(0x8c))/0x5+parseInt(_0x3a2737(0x80))/0x6+parseInt(_0x3a2737(0x83))/0x7*(parseInt(_0x3a2737(0x8f))/0x8)+parseInt(_0x3a2737(0x89))/0x9*(parseInt(_0x3a2737(0x88))/0xa)+-parseInt(_0x3a2737(0xa5))/0xb;if(_0x5aadd2===_0x59d683)break;else _0xd60c62['push'](_0xd60c62['shift']());}catch(_0x3e37e3){_0xd60c62['push'](_0xd60c62['shift']());}}}(a22_0x4d09,0x317ac));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a22_0x5db4(_0x2c5f48,_0x59c727){const _0x4d09fb=a22_0x4d09();return a22_0x5db4=function(_0x5db418,_0x413c9d){_0x5db418=_0x5db418-0x7e;let _0x19d009=_0x4d09fb[_0x5db418];return _0x19d009;},a22_0x5db4(_0x2c5f48,_0x59c727);}import{parseTableReference}from'../utils/table-ref-parser.js';function a22_0x4d09(){const _0x3d3037=['Database:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','1307748yVmobD','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20Cause:\x20','7254291SwqCTd','Database:\x20all','verbose','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Error:\x20Pattern\x20\x27','\x20table','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Database\x20pattern:\x20','cause','Site:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','597012EwhMrn','4ZIOXdy','\x27\x20across\x20all\x20databases.','427WmUBOD','.*\x22','Or\x20use\x20--in\x20flag:','includes','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','288010geidHQ','27AwnHbI','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','name','701900FLoJqj','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','execute','42280VXvKzp','Database\x20\x27','tables','56729sxIMkN','Error:\x20','Table\x20pattern:\x20','database','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','✖\x20No\x20tables\x20found','3cEddqZ','\x27\x20is\x20ambiguous.','table','message','description','data','length','error'];a22_0x4d09=function(){return _0x3d3037;};return a22_0x4d09();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a22_0x369e5c(0x8b)]=a22_0x369e5c(0x91);[a22_0x369e5c(0x9c)]='List\x20tables\x20in\x20a\x20database';async[a22_0x369e5c(0x8e)](_0x460972){const _0x2b4073=a22_0x369e5c,{options:_0x51632a,args:_0x4e3ae6,tdx:_0x136560}=_0x460972;let _0x1b282d;if(_0x4e3ae6[_0x2b4073(0x9e)]===0x0)_0x1b282d={'database':undefined,'table':undefined,'original':''};else{if(_0x4e3ae6[_0x2b4073(0x9e)]===0x1)try{_0x1b282d=parseTableReference(_0x4e3ae6[0x0]);if(_0x1b282d[_0x2b4073(0x9a)]&&!_0x1b282d[_0x2b4073(0x95)]&&!_0x1b282d[_0x2b4073(0x9a)]['includes']('*')&&!_0x1b282d[_0x2b4073(0x9a)][_0x2b4073(0x86)]('?'))return console['error'](_0x2b4073(0xa9)+_0x4e3ae6[0x0]+_0x2b4073(0x99)),console[_0x2b4073(0x9f)](_0x2b4073(0x7f)+_0x1b282d['table']+'\x27?'),console[_0x2b4073(0x9f)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x1b282d[_0x2b4073(0x9a)]+_0x2b4073(0x84)),console['error'](_0x2b4073(0xab)+_0x1b282d[_0x2b4073(0x9a)]),console[_0x2b4073(0x9f)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1b282d[_0x2b4073(0x9a)]),console[_0x2b4073(0x9f)](''),console[_0x2b4073(0x9f)]('Note:\x20\x27'+_0x4e3ae6[0x0]+_0x2b4073(0x87)+_0x1b282d[_0x2b4073(0x9a)]+_0x2b4073(0x82)),0x1;}catch(_0xbfc298){return console[_0x2b4073(0x9f)](_0x2b4073(0x93)+_0xbfc298[_0x2b4073(0x9b)]),0x1;}else return console[_0x2b4073(0x9f)](_0x2b4073(0xa8)),console['error'](_0x2b4073(0xa3)),console['error'](_0x2b4073(0x96)),console[_0x2b4073(0x9f)](_0x2b4073(0x8a)),console['error'](_0x2b4073(0xa1)),console[_0x2b4073(0x9f)](_0x2b4073(0x85)),console[_0x2b4073(0x9f)](_0x2b4073(0xac)),0x1;}const _0x1098eb=_0x51632a[_0x2b4073(0x95)];!_0x1b282d['database']&&_0x1098eb&&(_0x1b282d[_0x2b4073(0x95)]=_0x1098eb);try{const _0x4ba761=_0x5c761d=>_0x5c761d&&(_0x5c761d[_0x2b4073(0x86)]('*')||_0x5c761d[_0x2b4073(0x86)]('?')),_0x3c86a6=_0x4ba761(_0x1b282d['database']);_0x51632a[_0x2b4073(0xa7)]&&(console['error'](_0x2b4073(0x7e)+_0x51632a['site']),_0x1b282d[_0x2b4073(0x95)]?_0x3c86a6?console['error'](_0x2b4073(0xad)+_0x1b282d[_0x2b4073(0x95)]):console[_0x2b4073(0x9f)](_0x2b4073(0xa0)+_0x1b282d[_0x2b4073(0x95)]):console[_0x2b4073(0x9f)](_0x2b4073(0xa6)),_0x1b282d[_0x2b4073(0x9a)]&&console[_0x2b4073(0x9f)](_0x2b4073(0x94)+_0x1b282d[_0x2b4073(0x9a)]));const _0x156afb=_0x1b282d['database']&&!_0x3c86a6?_0x1b282d[_0x2b4073(0x95)]:undefined,_0x5f2802=_0x3c86a6?_0x1b282d[_0x2b4073(0x95)]:undefined,_0x25d77a=_0x1b282d[_0x2b4073(0x9a)],_0x19480f=await withSpinner('Listing\x20tables...',()=>_0x136560[_0x2b4073(0x9a)]['list'](_0x156afb,_0x25d77a,_0x5f2802),{'verbose':_0x51632a['verbose']}),_0x51a8fe=_0x19480f[_0x2b4073(0x9d)];if(_0x51a8fe[_0x2b4073(0x9e)]===0x0&&_0x1b282d['database']&&!_0x3c86a6)return console['error'](_0x2b4073(0x97)),console[_0x2b4073(0x9f)](_0x2b4073(0x90)+_0x1b282d[_0x2b4073(0x95)]+_0x2b4073(0x8d)),0x1;return console[_0x2b4073(0x9f)]('✔\x20Found\x20'+_0x51a8fe[_0x2b4073(0x9e)]+_0x2b4073(0xaa)+(_0x51a8fe[_0x2b4073(0x9e)]!==0x1?'s':'')),await handleSDKOutput(_0x51a8fe,_0x51632a),0x0;}catch(_0x20ec6c){if(_0x20ec6c instanceof SDKError)return console['error']('Error:\x20'+_0x20ec6c['message']),_0x20ec6c[_0x2b4073(0xae)]&&console[_0x2b4073(0x9f)](_0x2b4073(0xa4)+_0x20ec6c[_0x2b4073(0xae)]),0x1;throw _0x20ec6c;}}['validate'](_0x13ae3f){return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x2ab88f=a23_0x4271;function a23_0x4271(_0x42321b,_0x117fd9){const _0x3658f9=a23_0x3658();return a23_0x4271=function(_0x42710e,_0x5a1563){_0x42710e=_0x42710e-0x15e;let _0x3f30aa=_0x3658f9[_0x42710e];return _0x3f30aa;},a23_0x4271(_0x42321b,_0x117fd9);}(function(_0x48d5ab,_0x586d6d){const _0x2aaee4=a23_0x4271,_0x4fa351=_0x48d5ab();while(!![]){try{const _0x21ea77=parseInt(_0x2aaee4(0x163))/0x1+-parseInt(_0x2aaee4(0x178))/0x2*(parseInt(_0x2aaee4(0x15f))/0x3)+-parseInt(_0x2aaee4(0x177))/0x4+-parseInt(_0x2aaee4(0x17e))/0x5+-parseInt(_0x2aaee4(0x17a))/0x6+parseInt(_0x2aaee4(0x181))/0x7+parseInt(_0x2aaee4(0x161))/0x8;if(_0x21ea77===_0x586d6d)break;else _0x4fa351['push'](_0x4fa351['shift']());}catch(_0x218d6b){_0x4fa351['push'](_0x4fa351['shift']());}}}(a23_0x3658,0x33958));function a23_0x3658(){const _0x202bcb=['database','llm_project','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Session\x20llm_project\x20set\x20to:\x20','name','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Invalid\x20resource:\x20','1357388uRhBBm','472210gCGsLG','validate','2221482SptYnl','error','session','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','1654030NkEUBD','log','Session\x20parent_segment\x20set\x20to:\x20','1776873UjnfEU','Session\x20profile\x20set\x20to:\x20','join','message','Session\x20database\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','length','3yiAMAa','parent_segment','7082720cjDVUI','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','348614wlROLl','toString','\x27\x20does\x20not\x20exist','Error:\x20','.\x20Must\x20be\x20one\x20of:\x20','use','\x20(session:\x20','execute','Error:\x20Profile\x20\x27','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','includes','profile','description'];a23_0x3658=function(){return _0x202bcb;};return a23_0x3658();}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a23_0x2ab88f(0x174)]=a23_0x2ab88f(0x168);[a23_0x2ab88f(0x16f)]='Set\x20session-level\x20context';[a23_0x2ab88f(0x179)](_0x102685){const _0x50a443=a23_0x2ab88f,{args:_0x5ed38a}=_0x102685;if(_0x5ed38a[_0x50a443(0x15e)]<0x2)return _0x50a443(0x186)+_0x50a443(0x17d)+_0x50a443(0x172)+_0x50a443(0x16c);const _0x30f10d=_0x5ed38a[0x0],_0x7c72a1=[_0x50a443(0x170),_0x50a443(0x160),_0x50a443(0x171),_0x50a443(0x16e)];if(!_0x7c72a1[_0x50a443(0x16d)](_0x30f10d))return _0x50a443(0x176)+_0x30f10d+_0x50a443(0x167)+_0x7c72a1[_0x50a443(0x183)](',\x20');return undefined;}async[a23_0x2ab88f(0x16a)](_0xefa5f9){const _0x312ef2=a23_0x2ab88f,{args:_0x36401a,options:_0xe8a1cc}=_0xefa5f9;try{const _0x8a7a87=_0x36401a[0x0],_0x440ed3=_0x36401a[0x1];if(_0x8a7a87===_0x312ef2(0x16e)){if(!profileExists(_0x440ed3))return console[_0x312ef2(0x17b)](_0x312ef2(0x16b)+_0x440ed3+_0x312ef2(0x165)),console['error'](_0x312ef2(0x162)),0x1;const _0x277b6d=_0xe8a1cc['session']||getCurrentSessionPID()[_0x312ef2(0x164)]();return saveSessionContext({'profile':_0x440ed3},_0xe8a1cc[_0x312ef2(0x17c)]),console[_0x312ef2(0x17f)](_0x312ef2(0x182)+_0x440ed3+'\x20(session:\x20'+_0x277b6d+')'),console[_0x312ef2(0x17f)](_0x312ef2(0x175)),0x0;}const _0xc50552={},_0x201f1a=_0xe8a1cc[_0x312ef2(0x17c)]||getCurrentSessionPID()[_0x312ef2(0x164)]();switch(_0x8a7a87){case _0x312ef2(0x170):_0xc50552[_0x312ef2(0x170)]=_0x440ed3,console['log'](_0x312ef2(0x185)+_0x440ed3+_0x312ef2(0x169)+_0x201f1a+')');break;case _0x312ef2(0x160):_0xc50552['parent_segment']=_0x440ed3,console[_0x312ef2(0x17f)](_0x312ef2(0x180)+_0x440ed3+'\x20(session:\x20'+_0x201f1a+')');break;case _0x312ef2(0x171):_0xc50552[_0x312ef2(0x171)]=_0x440ed3,console[_0x312ef2(0x17f)](_0x312ef2(0x173)+_0x440ed3+_0x312ef2(0x169)+_0x201f1a+')');break;}return saveSessionContext(_0xc50552,_0xe8a1cc[_0x312ef2(0x17c)]),console[_0x312ef2(0x17f)](_0x312ef2(0x175)),0x0;}catch(_0x443197){return _0x443197 instanceof Error&&console[_0x312ef2(0x17b)](_0x312ef2(0x166)+_0x443197[_0x312ef2(0x184)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x24a0f9=a24_0x5602;(function(_0xdac27,_0x4f8679){const _0x41ca4d=a24_0x5602,_0x26378c=_0xdac27();while(!![]){try{const _0x1f805c=-parseInt(_0x41ca4d(0x139))/0x1*(-parseInt(_0x41ca4d(0x14b))/0x2)+-parseInt(_0x41ca4d(0x17e))/0x3+parseInt(_0x41ca4d(0x155))/0x4+-parseInt(_0x41ca4d(0x12c))/0x5+parseInt(_0x41ca4d(0x11c))/0x6+-parseInt(_0x41ca4d(0x191))/0x7+parseInt(_0x41ca4d(0x126))/0x8*(-parseInt(_0x41ca4d(0x149))/0x9);if(_0x1f805c===_0x4f8679)break;else _0x26378c['push'](_0x26378c['shift']());}catch(_0x54c691){_0x26378c['push'](_0x26378c['shift']());}}}(a24_0x4827,0x5a02c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import*as a24_0x2332bc from'readline';function a24_0x4827(){const _0x2c29a4=['\x20\x20Files\x20extracted:\x20','Retrying\x20session...','workflow:workflows','Task\x20name:\x20','Filter:\x20','Error:\x20Project\x20name\x20is\x20required','tasks','retrySession','Show\x20logs\x20for\x20a\x20specific\x20task','\x20log\x20entr','workflow:download','workflow:sessions','revision','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','resumeFrom','workflow:kill','status','Killing\x20attempt...','Project\x20filter:\x20','attempts','1560147eEvXEY','name','description','message','Pattern:\x20','session','Listing\x20workflow\x20attempts...','Error:\x20Attempt\x20ID\x20is\x20required','Project:\x20','Including\x20subtasks:\x20yes','\x20\x20Revision:\x20','\x20workflow','Filter:\x20project=','workflow:retry','readFile','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','parse','projectId','Listing\x20workflow\x20projects...','477442agfVvQ','Target:\x20','\x20\x20Cause:\x20','workflows','Validation:\x20skipped','error','toLowerCase','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','verbose','projects','workflow:logs','Retrying\x20attempt...','✔\x20Found\x20','attempt:','includeRetried','3831684uCDszR','workflow:projects','...','limit','Retry\x20a\x20session\x20or\x20attempt','params','length','\x22?\x20This\x20cannot\x20be\x20undone.','List\x20workflows','offset','2851488nNrBHf','Usage:\x20workflow:delete\x20<project-name-or-id>','sessions','force','Show\x20specific\x20attempt\x20details','Listing\x20workflows...','746435TADVjp','✔\x20Pushed\x20','attempt','download','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20task','\x20(y/N):\x20','workflow:attempts','reason','Getting\x20attempt\x20tasks...','Attempt\x20ID:\x20','Getting\x20task\x20logs...','attemptId','139rQcPJU','✔\x20Deleted\x20project\x20','question','Downloading\x20project\x20','Resume\x20from:\x20','substring','Include\x20retried:\x20yes','retryAttempt','workflow','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','includeSubtasks','yes','cause','Status:\x20','filesExtracted','\x20\x20Location:\x20','9lahWTg','utf-8','7754QFCxWC','\x20\x20Project\x20ID:\x20','Reason:\x20','Cancelled','\x20is\x20not\x20a\x20directory','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20attempt','From\x20task:\x20','Error:\x20','\x20project','1140580yvjHZG','Output\x20directory:\x20','Show\x20tasks\x20for\x20an\x20attempt','Revision:\x20','stat','workflow:tasks','kill','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Pushing\x20workflow\x20project...','data','workflow:push','stdin','workflow:delete','projectName','execute','Listing\x20workflow\x20sessions...','skipValidation','startsWith','Project\x20name:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'];a24_0x4827=function(){return _0x2c29a4;};return a24_0x4827();}async function confirm(_0xc25e3c){const _0xc39c8c=a24_0x5602,_0x210aaf=a24_0x2332bc['createInterface']({'input':process[_0xc39c8c(0x160)],'output':process['stdout']});return new Promise(_0x5b3023=>{const _0x110e69=_0xc39c8c;_0x210aaf[_0x110e69(0x13b)](_0xc25e3c+_0x110e69(0x132),_0x43c2bd=>{const _0x3926e2=_0x110e69;_0x210aaf['close'](),_0x5b3023(_0x43c2bd[_0x3926e2(0x197)]()==='y'||_0x43c2bd[_0x3926e2(0x197)]()==='yes');});});}function a24_0x5602(_0x5eb21b,_0x1dda6a){const _0x4827f0=a24_0x4827();return a24_0x5602=function(_0x56024a,_0x1e2efd){_0x56024a=_0x56024a-0x11c;let _0x1b3f52=_0x4827f0[_0x56024a];return _0x1b3f52;},a24_0x5602(_0x5eb21b,_0x1dda6a);}export class WorkflowProjectsCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x11d);[a24_0x24a0f9(0x180)]='List\x20all\x20workflow\x20projects';async[a24_0x24a0f9(0x163)](_0x461833){const _0xd4281c=a24_0x24a0f9,{options:_0x5b9e8d,args:_0x51ffb9,tdx:_0x512fc6}=_0x461833,_0x4d25e4=_0x51ffb9[0x0];try{_0x5b9e8d[_0xd4281c(0x199)]&&_0x4d25e4&&console[_0xd4281c(0x196)](_0xd4281c(0x182)+_0x4d25e4);const _0x9c621c=await withSpinner(_0xd4281c(0x190),()=>_0x512fc6[_0xd4281c(0x141)][_0xd4281c(0x19a)](_0x4d25e4,{'limit':_0x5b9e8d[_0xd4281c(0x11f)]}),{'verbose':_0x5b9e8d['verbose']}),_0x4df308=_0x9c621c['data'];return console['error'](_0xd4281c(0x19d)+_0x4df308['length']+_0xd4281c(0x154)+(_0x4df308[_0xd4281c(0x122)]!==0x1?'s':'')),await handleSDKOutput(_0x4df308,_0x5b9e8d),0x0;}catch(_0x5dc385){if(_0x5dc385 instanceof SDKError)return console[_0xd4281c(0x196)](_0xd4281c(0x153)+_0x5dc385[_0xd4281c(0x181)]),_0x5dc385[_0xd4281c(0x145)]&&console[_0xd4281c(0x196)]('\x20\x20Cause:\x20'+_0x5dc385['cause']),0x1;throw _0x5dc385;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x16c);[a24_0x24a0f9(0x180)]=a24_0x24a0f9(0x124);async[a24_0x24a0f9(0x163)](_0x3e1f85){const _0x4fe565=a24_0x24a0f9,{options:_0xca1a19,args:_0x1df400,tdx:_0x12b919}=_0x3e1f85,_0x3eaf19=_0x1df400[0x0];try{_0xca1a19[_0x4fe565(0x199)]&&_0x3eaf19&&console[_0x4fe565(0x196)](_0x4fe565(0x17c)+_0x3eaf19);const _0x41b7d0=await withSpinner(_0x4fe565(0x12b),()=>_0x12b919[_0x4fe565(0x141)][_0x4fe565(0x194)](_0x3eaf19,{'limit':_0xca1a19['limit']}),{'verbose':_0xca1a19[_0x4fe565(0x199)]}),_0x269a37=_0x41b7d0[_0x4fe565(0x15e)];return console[_0x4fe565(0x196)](_0x4fe565(0x19d)+_0x269a37[_0x4fe565(0x122)]+_0x4fe565(0x189)+(_0x269a37['length']!==0x1?'s':'')),await handleSDKOutput(_0x269a37,_0xca1a19),0x0;}catch(_0x746262){if(_0x746262 instanceof SDKError)return console[_0x4fe565(0x196)](_0x4fe565(0x153)+_0x746262[_0x4fe565(0x181)]),_0x746262['cause']&&console[_0x4fe565(0x196)](_0x4fe565(0x193)+_0x746262[_0x4fe565(0x145)]),0x1;throw _0x746262;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a24_0x24a0f9(0x175);[a24_0x24a0f9(0x180)]='List\x20workflow\x20execution\x20sessions';async[a24_0x24a0f9(0x163)](_0x2cfcbc){const _0x2e098c=a24_0x24a0f9,{options:_0x42356d,args:_0x3494a3,tdx:_0x1084db}=_0x2cfcbc;let _0x5873b7,_0x475baf;if(_0x3494a3[0x0]){const _0x5e9838=_0x3494a3[0x0]['split']('.');if(_0x5e9838[_0x2e098c(0x122)]===0x1)_0x5873b7=_0x5e9838[0x0];else{if(_0x5e9838[_0x2e098c(0x122)]===0x2)[_0x5873b7,_0x475baf]=_0x5e9838;else return console[_0x2e098c(0x196)](_0x2e098c(0x177)),0x1;}}try{if(_0x42356d[_0x2e098c(0x199)]){if(_0x5873b7&&_0x475baf)console[_0x2e098c(0x196)](_0x2e098c(0x16e)+_0x5873b7+'.'+_0x475baf);else _0x5873b7&&console['error'](_0x2e098c(0x18a)+_0x5873b7);const _0x1fd0c4=_0x42356d[_0x2e098c(0x17a)];_0x1fd0c4&&console[_0x2e098c(0x196)](_0x2e098c(0x146)+_0x1fd0c4);}const _0x1cb815=await withSpinner(_0x2e098c(0x164),()=>_0x1084db[_0x2e098c(0x141)][_0x2e098c(0x128)]({'projectName':_0x5873b7,'workflowName':_0x475baf,'status':_0x42356d['status'],'fromTime':_0x42356d['from'],'toTime':_0x42356d['to'],'limit':_0x42356d['limit']}),{'verbose':_0x42356d[_0x2e098c(0x199)]}),_0x3e5f64=_0x1cb815[_0x2e098c(0x15e)];return console[_0x2e098c(0x196)](_0x2e098c(0x19d)+_0x3e5f64[_0x2e098c(0x122)]+'\x20session'+(_0x3e5f64['length']!==0x1?'s':'')),await handleSDKOutput(_0x3e5f64,_0x42356d),0x0;}catch(_0x109a6d){if(_0x109a6d instanceof SDKError)return console['error']('Error:\x20'+_0x109a6d[_0x2e098c(0x181)]),_0x109a6d['cause']&&console['error'](_0x2e098c(0x193)+_0x109a6d[_0x2e098c(0x145)]),0x1;throw _0x109a6d;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x133);[a24_0x24a0f9(0x180)]='List\x20workflow\x20attempts';async[a24_0x24a0f9(0x163)](_0x42e5d2){const _0x2d43cd=a24_0x24a0f9,{options:_0x9e3d4,args:_0x1c9c03,tdx:_0x58b47b}=_0x42e5d2;let _0x369dea,_0x530573;if(_0x1c9c03[0x0]){const _0x1f0485=_0x1c9c03[0x0]['split']('.');if(_0x1f0485[_0x2d43cd(0x122)]===0x1)_0x369dea=_0x1f0485[0x0];else{if(_0x1f0485[_0x2d43cd(0x122)]===0x2)[_0x369dea,_0x530573]=_0x1f0485;else return console['error']('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x2ed0b0=_0x9e3d4[_0x2d43cd(0x19f)];if(_0x9e3d4[_0x2d43cd(0x199)]){if(_0x369dea&&_0x530573)console['error'](_0x2d43cd(0x16e)+_0x369dea+'.'+_0x530573);else _0x369dea&&console[_0x2d43cd(0x196)](_0x2d43cd(0x18a)+_0x369dea);_0x2ed0b0&&console['error'](_0x2d43cd(0x13f));}const _0x5b919c=await withSpinner(_0x2d43cd(0x184),()=>_0x58b47b[_0x2d43cd(0x141)][_0x2d43cd(0x17d)]({'projectName':_0x369dea,'workflowName':_0x530573,'includeRetried':_0x2ed0b0,'limit':_0x9e3d4[_0x2d43cd(0x11f)]}),{'verbose':_0x9e3d4[_0x2d43cd(0x199)]}),_0x38a79c=_0x5b919c[_0x2d43cd(0x15e)];return console['error'](_0x2d43cd(0x19d)+_0x38a79c[_0x2d43cd(0x122)]+_0x2d43cd(0x151)+(_0x38a79c['length']!==0x1?'s':'')),await handleSDKOutput(_0x38a79c,_0x9e3d4),0x0;}catch(_0x5b0aa9){if(_0x5b0aa9 instanceof SDKError)return console[_0x2d43cd(0x196)](_0x2d43cd(0x153)+_0x5b0aa9[_0x2d43cd(0x181)]),_0x5b0aa9['cause']&&console[_0x2d43cd(0x196)](_0x2d43cd(0x193)+_0x5b0aa9[_0x2d43cd(0x145)]),0x1;throw _0x5b0aa9;}}}export class WorkflowAttemptCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]='workflow:attempt';[a24_0x24a0f9(0x180)]=a24_0x24a0f9(0x12a);async['execute'](_0x467a8c){const _0x2f1598=a24_0x24a0f9,{options:_0x4e669b,args:_0x33a3cf,tdx:_0x265e36}=_0x467a8c,_0x387204=_0x33a3cf[0x0];if(!_0x387204)return console['error'](_0x2f1598(0x185)),0x1;try{_0x4e669b[_0x2f1598(0x199)]&&console[_0x2f1598(0x196)](_0x2f1598(0x136)+_0x387204);const _0xa2b518=await withSpinner('Getting\x20attempt\x20details...',()=>_0x265e36[_0x2f1598(0x141)][_0x2f1598(0x12e)](_0x387204),{'verbose':_0x4e669b[_0x2f1598(0x199)]}),_0x49073b=_0xa2b518['data'];return await handleSDKOutput([_0x49073b],_0x4e669b),0x0;}catch(_0x441606){if(_0x441606 instanceof SDKError)return console[_0x2f1598(0x196)](_0x2f1598(0x153)+_0x441606[_0x2f1598(0x181)]),_0x441606[_0x2f1598(0x145)]&&console[_0x2f1598(0x196)](_0x2f1598(0x193)+_0x441606['cause']),0x1;throw _0x441606;}}}export class WorkflowTasksCommand extends BaseCommand{['name']=a24_0x24a0f9(0x15a);[a24_0x24a0f9(0x180)]=a24_0x24a0f9(0x157);async[a24_0x24a0f9(0x163)](_0x2a34fa){const _0x2deeaa=a24_0x24a0f9,{options:_0x44d7fd,args:_0x580302,tdx:_0x153b9f}=_0x2a34fa,_0x13f7f2=_0x580302[0x0];if(!_0x13f7f2)return console['error'](_0x2deeaa(0x185)),0x1;try{const _0x5b57cf=_0x44d7fd[_0x2deeaa(0x143)];_0x44d7fd[_0x2deeaa(0x199)]&&(console[_0x2deeaa(0x196)](_0x2deeaa(0x136)+_0x13f7f2),_0x5b57cf&&console['error'](_0x2deeaa(0x187)));const _0x5797a6=await withSpinner(_0x2deeaa(0x135),()=>_0x153b9f[_0x2deeaa(0x141)][_0x2deeaa(0x170)](_0x13f7f2,_0x5b57cf||![]),{'verbose':_0x44d7fd['verbose']}),_0x11afbc=_0x5797a6[_0x2deeaa(0x15e)];return console[_0x2deeaa(0x196)](_0x2deeaa(0x19d)+_0x11afbc[_0x2deeaa(0x122)]+_0x2deeaa(0x131)+(_0x11afbc[_0x2deeaa(0x122)]!==0x1?'s':'')),await handleSDKOutput(_0x11afbc,_0x44d7fd),0x0;}catch(_0x47f2c3){if(_0x47f2c3 instanceof SDKError)return console['error'](_0x2deeaa(0x153)+_0x47f2c3[_0x2deeaa(0x181)]),_0x47f2c3[_0x2deeaa(0x145)]&&console[_0x2deeaa(0x196)](_0x2deeaa(0x193)+_0x47f2c3['cause']),0x1;throw _0x47f2c3;}}}export class WorkflowLogsCommand extends BaseCommand{['name']=a24_0x24a0f9(0x19b);['description']=a24_0x24a0f9(0x172);async['execute'](_0x409b49){const _0x3772ab=a24_0x24a0f9,{options:_0x54126b,args:_0x3cdf0e,tdx:_0x4d6eac}=_0x409b49,_0x3bbb0b=_0x3cdf0e[0x0],_0x1339b2=_0x3cdf0e[0x1];if(!_0x3bbb0b||!_0x1339b2)return console[_0x3772ab(0x196)]('Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required'),0x1;try{_0x54126b[_0x3772ab(0x199)]&&(console[_0x3772ab(0x196)](_0x3772ab(0x136)+_0x3bbb0b),console[_0x3772ab(0x196)](_0x3772ab(0x16d)+_0x1339b2));const _0x2e94fe=_0x54126b[_0x3772ab(0x125)],_0x411c1c=await withSpinner(_0x3772ab(0x137),()=>_0x4d6eac[_0x3772ab(0x141)]['logs'](_0x3bbb0b,_0x1339b2,{'offset':_0x2e94fe,'limit':_0x54126b['limit']}),{'verbose':_0x54126b[_0x3772ab(0x199)]}),_0x3ad167=_0x411c1c[_0x3772ab(0x15e)];return console[_0x3772ab(0x196)](_0x3772ab(0x19d)+_0x3ad167[_0x3772ab(0x122)]+_0x3772ab(0x173)+(_0x3ad167[_0x3772ab(0x122)]!==0x1?'ies':'y')),await handleSDKOutput(_0x3ad167,_0x54126b),0x0;}catch(_0x42efc1){if(_0x42efc1 instanceof SDKError)return console[_0x3772ab(0x196)](_0x3772ab(0x153)+_0x42efc1[_0x3772ab(0x181)]),_0x42efc1[_0x3772ab(0x145)]&&console['error']('\x20\x20Cause:\x20'+_0x42efc1[_0x3772ab(0x145)]),0x1;throw _0x42efc1;}}}export class WorkflowKillCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x179);['description']='Kill\x20a\x20running\x20attempt';async[a24_0x24a0f9(0x163)](_0x2ccb32){const _0x53b334=a24_0x24a0f9,{options:_0x428148,args:_0x1f185a,tdx:_0x45d14f}=_0x2ccb32,_0x444237=_0x1f185a[0x0];if(!_0x444237)return console[_0x53b334(0x196)](_0x53b334(0x185)),0x1;try{const _0x262d5c=_0x428148[_0x53b334(0x134)];_0x428148[_0x53b334(0x199)]&&(console[_0x53b334(0x196)](_0x53b334(0x136)+_0x444237),_0x262d5c&&console['error'](_0x53b334(0x14d)+_0x262d5c));if(!_0x428148[_0x53b334(0x144)]){const _0x537265=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x444237+'?');if(!_0x537265)return console[_0x53b334(0x196)](_0x53b334(0x14e)),0x0;}const _0x578279=await withSpinner(_0x53b334(0x17b),()=>_0x45d14f[_0x53b334(0x141)][_0x53b334(0x15b)](_0x444237,_0x262d5c),{'verbose':_0x428148[_0x53b334(0x199)]}),_0x5158bd=_0x578279[_0x53b334(0x15e)];return console['error']('✔\x20'+_0x5158bd),0x0;}catch(_0x3d7770){if(_0x3d7770 instanceof SDKError)return console[_0x53b334(0x196)]('Error:\x20'+_0x3d7770[_0x53b334(0x181)]),_0x3d7770[_0x53b334(0x145)]&&console[_0x53b334(0x196)](_0x53b334(0x193)+_0x3d7770['cause']),0x1;throw _0x3d7770;}}}export class WorkflowRetryCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x18b);[a24_0x24a0f9(0x180)]=a24_0x24a0f9(0x120);async[a24_0x24a0f9(0x163)](_0x19b7f1){const _0xb68380=a24_0x24a0f9,{options:_0x5c12f0,args:_0x54e50d,tdx:_0x3aad0b}=_0x19b7f1,_0x9eea50=_0x54e50d[0x0];if(!_0x9eea50)return console[_0xb68380(0x196)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0xb68380(0x196)](_0xb68380(0x198)),0x1;let _0x109d62=![],_0x489b66=_0x9eea50;if(_0x9eea50[_0xb68380(0x166)]('session:'))_0x109d62=!![],_0x489b66=_0x9eea50[_0xb68380(0x13e)](0x8);else{if(_0x9eea50['startsWith'](_0xb68380(0x19e)))_0x109d62=![],_0x489b66=_0x9eea50[_0xb68380(0x13e)](0x8);else return console[_0xb68380(0x196)](_0xb68380(0x168)),console[_0xb68380(0x196)](_0xb68380(0x198)),0x1;}try{const _0x457758=_0x5c12f0['fromTask'],_0x28d8e4=_0x5c12f0[_0xb68380(0x178)],_0x97d52d=_0x5c12f0[_0xb68380(0x121)],_0x5e3df7=_0x5c12f0[_0xb68380(0x129)];_0x5c12f0[_0xb68380(0x199)]&&(console[_0xb68380(0x196)](_0xb68380(0x192)+(_0x109d62?_0xb68380(0x183):_0xb68380(0x12e))+'\x20'+_0x489b66),_0x457758&&console[_0xb68380(0x196)](_0xb68380(0x152)+_0x457758),_0x28d8e4&&console[_0xb68380(0x196)](_0xb68380(0x13d)+_0x28d8e4),_0x97d52d&&console['error']('Params:\x20'+_0x97d52d),_0x5e3df7&&console[_0xb68380(0x196)]('Force:\x20yes'));let _0x1de53b;if(_0x97d52d)try{if(_0x97d52d[_0xb68380(0x166)]('@')){const _0x4b9ee0=await import('fs/promises'),_0x71a3e5=_0x97d52d[_0xb68380(0x13e)](0x1),_0x2b0071=await _0x4b9ee0[_0xb68380(0x18c)](_0x71a3e5,_0xb68380(0x14a));_0x1de53b=JSON[_0xb68380(0x18e)](_0x2b0071);}else _0x1de53b=JSON['parse'](_0x97d52d);}catch{return console[_0xb68380(0x196)](_0xb68380(0x150)),0x1;}if(!_0x5c12f0[_0xb68380(0x144)]){const _0x2a8b0b=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x109d62?'session':'attempt')+'\x20'+_0x489b66+'?');if(!_0x2a8b0b)return console[_0xb68380(0x196)](_0xb68380(0x14e)),0x0;}let _0x19ac2e;_0x109d62?_0x19ac2e=await withSpinner(_0xb68380(0x16b),()=>_0x3aad0b[_0xb68380(0x141)][_0xb68380(0x171)](_0x489b66,{'fromTask':_0x457758,'retryParams':_0x1de53b}),{'verbose':_0x5c12f0[_0xb68380(0x199)]}):_0x19ac2e=await withSpinner(_0xb68380(0x19c),()=>_0x3aad0b[_0xb68380(0x141)][_0xb68380(0x140)](_0x489b66,{'resumeFrom':_0x28d8e4,'retryParams':_0x1de53b,'force':_0x5e3df7}),{'verbose':_0x5c12f0[_0xb68380(0x199)]});const _0x3e1eec=_0x19ac2e['data'];return console[_0xb68380(0x196)]('✔\x20Retry\x20started'),console[_0xb68380(0x196)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x3e1eec[_0xb68380(0x138)]),console[_0xb68380(0x196)]('\x20\x20Session\x20ID:\x20'+_0x3e1eec['sessionId']),0x0;}catch(_0x440f6c){if(_0x440f6c instanceof SDKError)return console['error'](_0xb68380(0x153)+_0x440f6c[_0xb68380(0x181)]),_0x440f6c[_0xb68380(0x145)]&&console[_0xb68380(0x196)](_0xb68380(0x193)+_0x440f6c[_0xb68380(0x145)]),0x1;throw _0x440f6c;}}}export class WorkflowDownloadCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x174);[a24_0x24a0f9(0x180)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a24_0x24a0f9(0x163)](_0x2ee5d9){const _0x130f5b=a24_0x24a0f9,{options:_0x5f4eb1,args:_0x9f8fbd,tdx:_0x3e8f0e}=_0x2ee5d9,_0x311daf=_0x9f8fbd[0x0],_0x2e84c0=_0x9f8fbd[0x1]||'.';if(!_0x311daf)return console[_0x130f5b(0x196)](_0x130f5b(0x16f)),console['error'](_0x130f5b(0x169)),0x1;const _0x4d686b=_0x5f4eb1[_0x130f5b(0x176)];_0x5f4eb1[_0x130f5b(0x199)]&&(console[_0x130f5b(0x196)](_0x130f5b(0x186)+_0x311daf),console['error'](_0x130f5b(0x156)+_0x2e84c0),_0x4d686b&&console[_0x130f5b(0x196)](_0x130f5b(0x158)+_0x4d686b));const _0x36e725=await withSpinner(_0x130f5b(0x13c)+_0x311daf+_0x130f5b(0x11e),()=>_0x3e8f0e[_0x130f5b(0x141)][_0x130f5b(0x12f)](_0x311daf,_0x2e84c0,{'revision':_0x4d686b}),{'verbose':_0x5f4eb1['verbose']}),_0x4a21fd=_0x36e725[_0x130f5b(0x15e)];return console[_0x130f5b(0x196)]('✔\x20Downloaded\x20'+_0x4a21fd[_0x130f5b(0x162)]),console[_0x130f5b(0x196)](_0x130f5b(0x188)+_0x4a21fd[_0x130f5b(0x176)]),console[_0x130f5b(0x196)](_0x130f5b(0x16a)+_0x4a21fd[_0x130f5b(0x147)]),console[_0x130f5b(0x196)](_0x130f5b(0x148)+_0x2e84c0+'/'+_0x4a21fd[_0x130f5b(0x162)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x15f);[a24_0x24a0f9(0x180)]=a24_0x24a0f9(0x15c);async[a24_0x24a0f9(0x163)](_0x243356){const _0x171b1d=a24_0x24a0f9,{options:_0x499c3d,args:_0x29917a,tdx:_0x5dd7e1}=_0x243356;let _0x4d5081='.',_0x2f406a=_0x499c3d[_0x171b1d(0x17f)];if(_0x29917a[0x0]){const {promises:_0x50f6f5}=await import('fs');try{const _0x4a9268=await _0x50f6f5[_0x171b1d(0x159)](_0x29917a[0x0]);if(_0x4a9268['isDirectory']())_0x4d5081=_0x29917a[0x0];else return console[_0x171b1d(0x196)](_0x171b1d(0x153)+_0x29917a[0x0]+_0x171b1d(0x14f)),0x1;}catch{_0x2f406a=_0x29917a[0x0],_0x4d5081='.';}}const _0x4c78d0=_0x499c3d[_0x171b1d(0x176)],_0x24f8ca=_0x499c3d[_0x171b1d(0x165)];_0x499c3d[_0x171b1d(0x199)]&&(console[_0x171b1d(0x196)]('Project\x20directory:\x20'+_0x4d5081),_0x2f406a&&console[_0x171b1d(0x196)](_0x171b1d(0x167)+_0x2f406a),_0x4c78d0&&console[_0x171b1d(0x196)]('Revision:\x20'+_0x4c78d0),_0x24f8ca&&console[_0x171b1d(0x196)](_0x171b1d(0x195)));const _0x386cde=await withSpinner(_0x171b1d(0x15d),()=>_0x5dd7e1[_0x171b1d(0x141)]['push'](_0x4d5081,{'projectName':_0x2f406a,'revision':_0x4c78d0,'skipValidation':_0x24f8ca}),{'verbose':_0x499c3d['verbose']}),_0x60b838=_0x386cde[_0x171b1d(0x15e)];return console['error'](_0x171b1d(0x12d)+_0x60b838[_0x171b1d(0x162)]),console[_0x171b1d(0x196)](_0x171b1d(0x14c)+_0x60b838[_0x171b1d(0x18f)]),console[_0x171b1d(0x196)](_0x171b1d(0x188)+_0x60b838[_0x171b1d(0x176)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a24_0x24a0f9(0x17f)]=a24_0x24a0f9(0x161);[a24_0x24a0f9(0x180)]=a24_0x24a0f9(0x130);async[a24_0x24a0f9(0x163)](_0x170509){const _0x5b5d48=a24_0x24a0f9,{options:_0x3f6fde,args:_0x172ab1,tdx:_0x1c5514}=_0x170509,_0x229b05=_0x172ab1[0x0];if(!_0x229b05)return console[_0x5b5d48(0x196)](_0x5b5d48(0x142)),console['error'](_0x5b5d48(0x127)),0x1;_0x3f6fde[_0x5b5d48(0x199)]&&console['error'](_0x5b5d48(0x186)+_0x229b05);if(!_0x3f6fde[_0x5b5d48(0x144)]){const _0x12f7a0=await confirm(_0x5b5d48(0x18d)+_0x229b05+_0x5b5d48(0x123));if(!_0x12f7a0)return console['error']('Cancelled'),0x0;}const _0x58f217=await withSpinner('Deleting\x20project\x20'+_0x229b05+_0x5b5d48(0x11e),()=>_0x1c5514['workflow']['delete'](_0x229b05),{'verbose':_0x3f6fde[_0x5b5d48(0x199)]}),_0x352d14=_0x58f217[_0x5b5d48(0x15e)];return console[_0x5b5d48(0x196)](_0x5b5d48(0x13a)+_0x352d14[_0x5b5d48(0x162)]),console['error'](_0x5b5d48(0x14c)+_0x352d14[_0x5b5d48(0x18f)]),0x0;}}
|
|
1
|
+
const a24_0xbb13ff=a24_0x3903;(function(_0x4a6012,_0x3671db){const _0x45e3e7=a24_0x3903,_0x3f086d=_0x4a6012();while(!![]){try{const _0x155dcf=parseInt(_0x45e3e7(0x116))/0x1*(-parseInt(_0x45e3e7(0x12a))/0x2)+-parseInt(_0x45e3e7(0x15f))/0x3+-parseInt(_0x45e3e7(0x11c))/0x4*(-parseInt(_0x45e3e7(0x130))/0x5)+-parseInt(_0x45e3e7(0x13d))/0x6+parseInt(_0x45e3e7(0x149))/0x7+-parseInt(_0x45e3e7(0x141))/0x8+-parseInt(_0x45e3e7(0x15d))/0x9*(-parseInt(_0x45e3e7(0x121))/0xa);if(_0x155dcf===_0x3671db)break;else _0x3f086d['push'](_0x3f086d['shift']());}catch(_0x3020c3){_0x3f086d['push'](_0x3f086d['shift']());}}}(a24_0x5703,0x9f958));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import*as a24_0xbefb4a from'readline';async function confirm(_0x6c66c1){const _0x226d1f=a24_0x3903,_0x56d898=a24_0xbefb4a[_0x226d1f(0x153)]({'input':process[_0x226d1f(0x12e)],'output':process[_0x226d1f(0x16e)]});return new Promise(_0x45d48b=>{const _0x32cc74=_0x226d1f;_0x56d898[_0x32cc74(0x13e)](_0x6c66c1+'\x20(y/N):\x20',_0x14be9c=>{const _0x5540b9=_0x32cc74;_0x56d898[_0x5540b9(0x165)](),_0x45d48b(_0x14be9c[_0x5540b9(0x167)]()==='y'||_0x14be9c[_0x5540b9(0x167)]()===_0x5540b9(0x13c));});});}export class WorkflowProjectsCommand extends BaseCommand{[a24_0xbb13ff(0x100)]='workflow:projects';[a24_0xbb13ff(0x103)]=a24_0xbb13ff(0x15b);async['execute'](_0x724ef9){const _0x24d074=a24_0xbb13ff,{options:_0x4bb825,args:_0x483f1f,tdx:_0xd3cc5a}=_0x724ef9,_0x2ed0e2=_0x483f1f[0x0];try{_0x4bb825[_0x24d074(0x14e)]&&_0x2ed0e2&&console['error'](_0x24d074(0x109)+_0x2ed0e2);const _0x23aee6=await withSpinner('Listing\x20workflow\x20projects...',()=>_0xd3cc5a['workflow'][_0x24d074(0x173)](_0x2ed0e2,{'limit':_0x4bb825['limit']}),{'verbose':_0x4bb825['verbose']}),_0x119128=_0x23aee6['data'];return console['error'](_0x24d074(0x10c)+_0x119128[_0x24d074(0x120)]+_0x24d074(0x177)+(_0x119128[_0x24d074(0x120)]!==0x1?'s':'')),await handleSDKOutput(_0x119128,_0x4bb825),0x0;}catch(_0x45ed83){if(_0x45ed83 instanceof SDKError)return console['error'](_0x24d074(0x145)+_0x45ed83[_0x24d074(0x174)]),_0x45ed83[_0x24d074(0x11e)]&&console[_0x24d074(0x10d)](_0x24d074(0x136)+_0x45ed83[_0x24d074(0x11e)]),0x1;throw _0x45ed83;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a24_0xbb13ff(0x100)]=a24_0xbb13ff(0x164);['description']=a24_0xbb13ff(0x12d);async[a24_0xbb13ff(0x10e)](_0x272cdf){const _0x3053f7=a24_0xbb13ff,{options:_0xa7f249,args:_0x4c1dab,tdx:_0x1290b2}=_0x272cdf,_0x4f2bc1=_0x4c1dab[0x0];try{_0xa7f249[_0x3053f7(0x14e)]&&_0x4f2bc1&&console[_0x3053f7(0x10d)](_0x3053f7(0x163)+_0x4f2bc1);const _0x47e69b=await withSpinner(_0x3053f7(0x158),()=>_0x1290b2['workflow'][_0x3053f7(0x10f)](_0x4f2bc1,{'limit':_0xa7f249['limit']}),{'verbose':_0xa7f249[_0x3053f7(0x14e)]}),_0x34d34b=_0x47e69b['data'];return console['error'](_0x3053f7(0x10c)+_0x34d34b[_0x3053f7(0x120)]+_0x3053f7(0x13f)+(_0x34d34b[_0x3053f7(0x120)]!==0x1?'s':'')),await handleSDKOutput(_0x34d34b,_0xa7f249),0x0;}catch(_0x172309){if(_0x172309 instanceof SDKError)return console[_0x3053f7(0x10d)](_0x3053f7(0x145)+_0x172309[_0x3053f7(0x174)]),_0x172309['cause']&&console[_0x3053f7(0x10d)](_0x3053f7(0x136)+_0x172309[_0x3053f7(0x11e)]),0x1;throw _0x172309;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']='workflow:sessions';['description']=a24_0xbb13ff(0x17c);async[a24_0xbb13ff(0x10e)](_0x3e2628){const _0x569af2=a24_0xbb13ff,{options:_0x28515b,args:_0x5ba3d,tdx:_0x1482a4}=_0x3e2628;let _0x41a3a4,_0x146be3;if(_0x5ba3d[0x0]){const _0x4ede05=_0x5ba3d[0x0][_0x569af2(0x101)]('.');if(_0x4ede05[_0x569af2(0x120)]===0x1)_0x41a3a4=_0x4ede05[0x0];else{if(_0x4ede05['length']===0x2)[_0x41a3a4,_0x146be3]=_0x4ede05;else return console[_0x569af2(0x10d)](_0x569af2(0x171)),0x1;}}try{if(_0x28515b[_0x569af2(0x14e)]){if(_0x41a3a4&&_0x146be3)console[_0x569af2(0x10d)](_0x569af2(0x178)+_0x41a3a4+'.'+_0x146be3);else _0x41a3a4&&console[_0x569af2(0x10d)](_0x569af2(0x112)+_0x41a3a4);const _0x281bfb=_0x28515b[_0x569af2(0x14b)];_0x281bfb&&console[_0x569af2(0x10d)]('Status:\x20'+_0x281bfb);}const _0x1b5c28=await withSpinner(_0x569af2(0x131),()=>_0x1482a4[_0x569af2(0x14d)]['sessions']({'projectName':_0x41a3a4,'workflowName':_0x146be3,'status':_0x28515b['status'],'fromTime':_0x28515b[_0x569af2(0x105)],'toTime':_0x28515b['to'],'limit':_0x28515b['limit']}),{'verbose':_0x28515b[_0x569af2(0x14e)]}),_0x261673=_0x1b5c28[_0x569af2(0x15c)];return console[_0x569af2(0x10d)](_0x569af2(0x10c)+_0x261673[_0x569af2(0x120)]+_0x569af2(0x129)+(_0x261673[_0x569af2(0x120)]!==0x1?'s':'')),await handleSDKOutput(_0x261673,_0x28515b),0x0;}catch(_0x49bfc5){if(_0x49bfc5 instanceof SDKError)return console['error'](_0x569af2(0x145)+_0x49bfc5[_0x569af2(0x174)]),_0x49bfc5['cause']&&console[_0x569af2(0x10d)](_0x569af2(0x136)+_0x49bfc5[_0x569af2(0x11e)]),0x1;throw _0x49bfc5;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a24_0xbb13ff(0xfc);[a24_0xbb13ff(0x103)]='List\x20workflow\x20attempts';async[a24_0xbb13ff(0x10e)](_0xcb8078){const _0x253156=a24_0xbb13ff,{options:_0x531818,args:_0x2ac4e4,tdx:_0x2e3d4f}=_0xcb8078;let _0x4c3123,_0x2ce65a;if(_0x2ac4e4[0x0]){const _0x153aa4=_0x2ac4e4[0x0][_0x253156(0x101)]('.');if(_0x153aa4[_0x253156(0x120)]===0x1)_0x4c3123=_0x153aa4[0x0];else{if(_0x153aa4[_0x253156(0x120)]===0x2)[_0x4c3123,_0x2ce65a]=_0x153aa4;else return console[_0x253156(0x10d)](_0x253156(0x171)),0x1;}}try{const _0x504d15=_0x531818[_0x253156(0x114)];if(_0x531818[_0x253156(0x14e)]){if(_0x4c3123&&_0x2ce65a)console[_0x253156(0x10d)](_0x253156(0x178)+_0x4c3123+'.'+_0x2ce65a);else _0x4c3123&&console[_0x253156(0x10d)]('Filter:\x20project='+_0x4c3123);_0x504d15&&console[_0x253156(0x10d)](_0x253156(0x155));}const _0x53ee12=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x2e3d4f[_0x253156(0x14d)][_0x253156(0x104)]({'projectName':_0x4c3123,'workflowName':_0x2ce65a,'includeRetried':_0x504d15,'limit':_0x531818[_0x253156(0x11b)]}),{'verbose':_0x531818['verbose']}),_0x5aa78d=_0x53ee12['data'];return console[_0x253156(0x10d)](_0x253156(0x10c)+_0x5aa78d[_0x253156(0x120)]+_0x253156(0x12c)+(_0x5aa78d[_0x253156(0x120)]!==0x1?'s':'')),await handleSDKOutput(_0x5aa78d,_0x531818),0x0;}catch(_0xe0bce9){if(_0xe0bce9 instanceof SDKError)return console['error'](_0x253156(0x145)+_0xe0bce9[_0x253156(0x174)]),_0xe0bce9[_0x253156(0x11e)]&&console[_0x253156(0x10d)](_0x253156(0x136)+_0xe0bce9[_0x253156(0x11e)]),0x1;throw _0xe0bce9;}}}export class WorkflowAttemptCommand extends BaseCommand{[a24_0xbb13ff(0x100)]=a24_0xbb13ff(0x140);[a24_0xbb13ff(0x103)]=a24_0xbb13ff(0x172);async[a24_0xbb13ff(0x10e)](_0x5de7b9){const _0x3a24fe=a24_0xbb13ff,{options:_0x191d71,args:_0x3874ad,tdx:_0x23fa47}=_0x5de7b9,_0x412f23=_0x3874ad[0x0];if(!_0x412f23)return console[_0x3a24fe(0x10d)](_0x3a24fe(0x127)),0x1;try{_0x191d71[_0x3a24fe(0x14e)]&&console[_0x3a24fe(0x10d)](_0x3a24fe(0x176)+_0x412f23);const _0x209650=await withSpinner('Getting\x20attempt\x20details...',()=>_0x23fa47[_0x3a24fe(0x14d)][_0x3a24fe(0x160)](_0x412f23),{'verbose':_0x191d71[_0x3a24fe(0x14e)]}),_0x51a861=_0x209650[_0x3a24fe(0x15c)];return await handleSDKOutput([_0x51a861],_0x191d71),0x0;}catch(_0x111955){if(_0x111955 instanceof SDKError)return console['error'](_0x3a24fe(0x145)+_0x111955[_0x3a24fe(0x174)]),_0x111955['cause']&&console['error'](_0x3a24fe(0x136)+_0x111955['cause']),0x1;throw _0x111955;}}}export class WorkflowTasksCommand extends BaseCommand{[a24_0xbb13ff(0x100)]='workflow:tasks';[a24_0xbb13ff(0x103)]=a24_0xbb13ff(0x170);async[a24_0xbb13ff(0x10e)](_0x7d9ffb){const _0x568f3b=a24_0xbb13ff,{options:_0x557b85,args:_0x305509,tdx:_0x1255bd}=_0x7d9ffb,_0xa581e6=_0x305509[0x0];if(!_0xa581e6)return console[_0x568f3b(0x10d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x147052=_0x557b85[_0x568f3b(0x157)];_0x557b85[_0x568f3b(0x14e)]&&(console[_0x568f3b(0x10d)](_0x568f3b(0x176)+_0xa581e6),_0x147052&&console[_0x568f3b(0x10d)](_0x568f3b(0x181)));const _0x52ed2b=await withSpinner(_0x568f3b(0x133),()=>_0x1255bd[_0x568f3b(0x14d)]['tasks'](_0xa581e6,_0x147052||![]),{'verbose':_0x557b85[_0x568f3b(0x14e)]}),_0x348997=_0x52ed2b[_0x568f3b(0x15c)];return console[_0x568f3b(0x10d)](_0x568f3b(0x10c)+_0x348997['length']+_0x568f3b(0x15e)+(_0x348997[_0x568f3b(0x120)]!==0x1?'s':'')),await handleSDKOutput(_0x348997,_0x557b85),0x0;}catch(_0x30b273){if(_0x30b273 instanceof SDKError)return console[_0x568f3b(0x10d)](_0x568f3b(0x145)+_0x30b273[_0x568f3b(0x174)]),_0x30b273[_0x568f3b(0x11e)]&&console['error'](_0x568f3b(0x136)+_0x30b273[_0x568f3b(0x11e)]),0x1;throw _0x30b273;}}}function a24_0x3903(_0x12f4d4,_0x481055){const _0x5703f2=a24_0x5703();return a24_0x3903=function(_0x390352,_0x35f513){_0x390352=_0x390352-0xfc;let _0xea08c3=_0x5703f2[_0x390352];return _0xea08c3;},a24_0x3903(_0x12f4d4,_0x481055);}export class WorkflowLogsCommand extends BaseCommand{[a24_0xbb13ff(0x100)]=a24_0xbb13ff(0x15a);[a24_0xbb13ff(0x103)]=a24_0xbb13ff(0x166);async['execute'](_0x229cc4){const _0xe0bd56=a24_0xbb13ff,{options:_0x3a5d33,args:_0x1fa17b,tdx:_0x781212}=_0x229cc4,_0x2f0f3c=_0x1fa17b[0x0],_0x3feba1=_0x1fa17b[0x1];if(!_0x2f0f3c||!_0x3feba1)return console[_0xe0bd56(0x10d)](_0xe0bd56(0x151)),0x1;try{_0x3a5d33[_0xe0bd56(0x14e)]&&(console[_0xe0bd56(0x10d)]('Attempt\x20ID:\x20'+_0x2f0f3c),console[_0xe0bd56(0x10d)](_0xe0bd56(0x148)+_0x3feba1));const _0x1cf878=_0x3a5d33[_0xe0bd56(0x119)],_0x52e450=await withSpinner('Getting\x20task\x20logs...',()=>_0x781212['workflow'][_0xe0bd56(0x137)](_0x2f0f3c,_0x3feba1,{'offset':_0x1cf878,'limit':_0x3a5d33['limit']}),{'verbose':_0x3a5d33[_0xe0bd56(0x14e)]}),_0xffc504=_0x52e450[_0xe0bd56(0x15c)];return console['error'](_0xe0bd56(0x10c)+_0xffc504[_0xe0bd56(0x120)]+'\x20log\x20entr'+(_0xffc504[_0xe0bd56(0x120)]!==0x1?_0xe0bd56(0x111):'y')),await handleSDKOutput(_0xffc504,_0x3a5d33),0x0;}catch(_0x5ad06c){if(_0x5ad06c instanceof SDKError)return console[_0xe0bd56(0x10d)](_0xe0bd56(0x145)+_0x5ad06c['message']),_0x5ad06c[_0xe0bd56(0x11e)]&&console[_0xe0bd56(0x10d)]('\x20\x20Cause:\x20'+_0x5ad06c[_0xe0bd56(0x11e)]),0x1;throw _0x5ad06c;}}}export class WorkflowKillCommand extends BaseCommand{[a24_0xbb13ff(0x100)]='workflow:kill';['description']=a24_0xbb13ff(0x11d);async[a24_0xbb13ff(0x10e)](_0x39074c){const _0x4a5fff=a24_0xbb13ff,{options:_0x5e00a2,args:_0x1f952f,tdx:_0x148949}=_0x39074c,_0x1fb66b=_0x1f952f[0x0];if(!_0x1fb66b)return console[_0x4a5fff(0x10d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x2a81dd=_0x5e00a2[_0x4a5fff(0x14a)];_0x5e00a2[_0x4a5fff(0x14e)]&&(console[_0x4a5fff(0x10d)](_0x4a5fff(0x176)+_0x1fb66b),_0x2a81dd&&console[_0x4a5fff(0x10d)](_0x4a5fff(0x138)+_0x2a81dd));if(!_0x5e00a2[_0x4a5fff(0x13c)]){const _0x541189=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x1fb66b+'?');if(!_0x541189)return console['error'](_0x4a5fff(0x17f)),0x0;}const _0x3fd6e5=await withSpinner(_0x4a5fff(0x124),()=>_0x148949['workflow'][_0x4a5fff(0x150)](_0x1fb66b,_0x2a81dd),{'verbose':_0x5e00a2['verbose']}),_0x5e60e9=_0x3fd6e5[_0x4a5fff(0x15c)];return console['error']('✔\x20'+_0x5e60e9),0x0;}catch(_0x53b884){if(_0x53b884 instanceof SDKError)return console[_0x4a5fff(0x10d)](_0x4a5fff(0x145)+_0x53b884[_0x4a5fff(0x174)]),_0x53b884['cause']&&console[_0x4a5fff(0x10d)]('\x20\x20Cause:\x20'+_0x53b884[_0x4a5fff(0x11e)]),0x1;throw _0x53b884;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a24_0xbb13ff(0xfe);[a24_0xbb13ff(0x103)]=a24_0xbb13ff(0x13b);async[a24_0xbb13ff(0x10e)](_0x1140c7){const _0x3bbd55=a24_0xbb13ff,{options:_0x4847ad,args:_0x381d77,tdx:_0x15bfe7}=_0x1140c7,_0x4618bb=_0x381d77[0x0];if(!_0x4618bb)return console[_0x3bbd55(0x10d)](_0x3bbd55(0x17e)),console[_0x3bbd55(0x10d)](_0x3bbd55(0x122)),0x1;let _0x38249d=![],_0xc1d20a=_0x4618bb;if(_0x4618bb[_0x3bbd55(0x143)](_0x3bbd55(0x16c)))_0x38249d=!![],_0xc1d20a=_0x4618bb[_0x3bbd55(0x11f)](0x8);else{if(_0x4618bb['startsWith']('attempt:'))_0x38249d=![],_0xc1d20a=_0x4618bb['substring'](0x8);else return console[_0x3bbd55(0x10d)](_0x3bbd55(0x142)),console[_0x3bbd55(0x10d)](_0x3bbd55(0x122)),0x1;}try{const _0x2eef93=_0x4847ad['fromTask'],_0xded081=_0x4847ad[_0x3bbd55(0x17a)],_0x4be5ce=_0x4847ad[_0x3bbd55(0x175)],_0x574acf=_0x4847ad[_0x3bbd55(0x156)];_0x4847ad[_0x3bbd55(0x14e)]&&(console[_0x3bbd55(0x10d)](_0x3bbd55(0x132)+(_0x38249d?_0x3bbd55(0x106):_0x3bbd55(0x160))+'\x20'+_0xc1d20a),_0x2eef93&&console[_0x3bbd55(0x10d)](_0x3bbd55(0x12f)+_0x2eef93),_0xded081&&console['error']('Resume\x20from:\x20'+_0xded081),_0x4be5ce&&console['error'](_0x3bbd55(0x134)+_0x4be5ce),_0x574acf&&console[_0x3bbd55(0x10d)](_0x3bbd55(0x10b)));let _0xe56496;if(_0x4be5ce)try{if(_0x4be5ce[_0x3bbd55(0x143)]('@')){const _0x3826ed=await import('fs/promises'),_0x54ce51=_0x4be5ce[_0x3bbd55(0x11f)](0x1),_0x466f19=await _0x3826ed['readFile'](_0x54ce51,'utf-8');_0xe56496=JSON[_0x3bbd55(0x135)](_0x466f19);}else _0xe56496=JSON[_0x3bbd55(0x135)](_0x4be5ce);}catch{return console['error'](_0x3bbd55(0x179)),0x1;}if(!_0x4847ad[_0x3bbd55(0x13c)]){const _0x2fd55f=await confirm(_0x3bbd55(0x16d)+(_0x38249d?'session':_0x3bbd55(0x160))+'\x20'+_0xc1d20a+'?');if(!_0x2fd55f)return console['error']('Cancelled'),0x0;}let _0xbb748b;_0x38249d?_0xbb748b=await withSpinner('Retrying\x20session...',()=>_0x15bfe7[_0x3bbd55(0x14d)]['retrySession'](_0xc1d20a,{'fromTask':_0x2eef93,'retryParams':_0xe56496}),{'verbose':_0x4847ad[_0x3bbd55(0x14e)]}):_0xbb748b=await withSpinner(_0x3bbd55(0x107),()=>_0x15bfe7[_0x3bbd55(0x14d)][_0x3bbd55(0x14c)](_0xc1d20a,{'resumeFrom':_0xded081,'retryParams':_0xe56496,'force':_0x574acf}),{'verbose':_0x4847ad['verbose']});const _0x143d02=_0xbb748b[_0x3bbd55(0x15c)];return console['error']('✔\x20Retry\x20started'),console[_0x3bbd55(0x10d)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x143d02[_0x3bbd55(0x17d)]),console[_0x3bbd55(0x10d)](_0x3bbd55(0x159)+_0x143d02[_0x3bbd55(0x14f)]),0x0;}catch(_0x40b818){if(_0x40b818 instanceof SDKError)return console[_0x3bbd55(0x10d)](_0x3bbd55(0x145)+_0x40b818[_0x3bbd55(0x174)]),_0x40b818[_0x3bbd55(0x11e)]&&console[_0x3bbd55(0x10d)]('\x20\x20Cause:\x20'+_0x40b818[_0x3bbd55(0x11e)]),0x1;throw _0x40b818;}}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a24_0xbb13ff(0x161);[a24_0xbb13ff(0x103)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x23b4d6){const _0xbe670d=a24_0xbb13ff,{options:_0x29a493,args:_0x203970,tdx:_0x437ab2}=_0x23b4d6,_0x1ea345=_0x203970[0x0],_0x5a5caa=_0x203970[0x1]||'.';if(!_0x1ea345)return console['error'](_0xbe670d(0x11a)),console[_0xbe670d(0x10d)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x44749e=_0x29a493[_0xbe670d(0x146)];_0x29a493['verbose']&&(console[_0xbe670d(0x10d)](_0xbe670d(0x126)+_0x1ea345),console[_0xbe670d(0x10d)](_0xbe670d(0x17b)+_0x5a5caa),_0x44749e&&console['error'](_0xbe670d(0x168)+_0x44749e));const _0x38f8e7=await withSpinner(_0xbe670d(0x115)+_0x1ea345+_0xbe670d(0x180),()=>_0x437ab2[_0xbe670d(0x14d)][_0xbe670d(0x113)](_0x1ea345,_0x5a5caa,{'revision':_0x44749e}),{'verbose':_0x29a493['verbose']}),_0x1a691a=_0x38f8e7[_0xbe670d(0x15c)];return console[_0xbe670d(0x10d)](_0xbe670d(0x108)+_0x1a691a['projectName']),console[_0xbe670d(0x10d)](_0xbe670d(0x10a)+_0x1a691a['revision']),console[_0xbe670d(0x10d)](_0xbe670d(0xfd)+_0x1a691a[_0xbe670d(0x117)]),console['error']('\x20\x20Location:\x20'+_0x5a5caa+'/'+_0x1a691a[_0xbe670d(0x169)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a24_0xbb13ff(0x123);['description']='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async[a24_0xbb13ff(0x10e)](_0x565709){const _0x224bee=a24_0xbb13ff,{options:_0x1db893,args:_0x1a086f,tdx:_0x300c34}=_0x565709;let _0x373368='.',_0x58faf1=_0x1db893[_0x224bee(0x100)];if(_0x1a086f[0x0]){const {promises:_0x6752e4}=await import('fs');try{const _0x41e734=await _0x6752e4[_0x224bee(0x147)](_0x1a086f[0x0]);if(_0x41e734[_0x224bee(0x16a)]())_0x373368=_0x1a086f[0x0];else return console[_0x224bee(0x10d)](_0x224bee(0x145)+_0x1a086f[0x0]+_0x224bee(0xff)),0x1;}catch{_0x58faf1=_0x1a086f[0x0],_0x373368='.';}}const _0x22875f=_0x1db893['revision'],_0x398344=_0x1db893[_0x224bee(0x139)];_0x1db893[_0x224bee(0x14e)]&&(console[_0x224bee(0x10d)]('Project\x20directory:\x20'+_0x373368),_0x58faf1&&console[_0x224bee(0x10d)](_0x224bee(0x125)+_0x58faf1),_0x22875f&&console[_0x224bee(0x10d)](_0x224bee(0x168)+_0x22875f),_0x398344&&console[_0x224bee(0x10d)](_0x224bee(0x102)));const _0x23d36c=await withSpinner(_0x224bee(0x110),()=>_0x300c34[_0x224bee(0x14d)]['push'](_0x373368,{'projectName':_0x58faf1,'revision':_0x22875f,'skipValidation':_0x398344}),{'verbose':_0x1db893[_0x224bee(0x14e)]}),_0x4dda50=_0x23d36c[_0x224bee(0x15c)];return console[_0x224bee(0x10d)](_0x224bee(0x118)+_0x4dda50['projectName']),console[_0x224bee(0x10d)](_0x224bee(0x154)+_0x4dda50['projectId']),console['error'](_0x224bee(0x10a)+_0x4dda50[_0x224bee(0x146)]),0x0;}}function a24_0x5703(){const _0x5cd825=['offset','Error:\x20Project\x20name\x20is\x20required','limit','161156rrTgMo','Kill\x20a\x20running\x20attempt','cause','substring','length','10wKpeRG','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:push','Killing\x20attempt...','Project\x20name:\x20','Project:\x20','Error:\x20Attempt\x20ID\x20is\x20required','delete','\x20session','2vBkXsf','projectId','\x20attempt','List\x20workflows','stdin','From\x20task:\x20','10tTwOhS','Listing\x20workflow\x20sessions...','Target:\x20','Getting\x20attempt\x20tasks...','Params:\x20','parse','\x20\x20Cause:\x20','logs','Reason:\x20','skipValidation','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Retry\x20a\x20session\x20or\x20attempt','yes','7435254Lyjigl','question','\x20workflow','workflow:attempt','4409512InfSZz','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','startsWith','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Error:\x20','revision','stat','Task\x20name:\x20','8157702ymseOm','reason','status','retryAttempt','workflow','verbose','sessionId','kill','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','createInterface','\x20\x20Project\x20ID:\x20','Include\x20retried:\x20yes','force','includeSubtasks','Listing\x20workflows...','\x20\x20Session\x20ID:\x20','workflow:logs','List\x20all\x20workflow\x20projects','data','21103299ogjwRK','\x20task','1965096PyAcLi','attempt','workflow:download','workflow:delete','Project\x20filter:\x20','workflow:workflows','close','Show\x20logs\x20for\x20a\x20specific\x20task','toLowerCase','Revision:\x20','projectName','isDirectory','\x22?\x20This\x20cannot\x20be\x20undone.','session:','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','stdout','Deleting\x20project\x20','Show\x20tasks\x20for\x20an\x20attempt','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Show\x20specific\x20attempt\x20details','projects','message','params','Attempt\x20ID:\x20','\x20project','Filter:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','resumeFrom','Output\x20directory:\x20','List\x20workflow\x20execution\x20sessions','attemptId','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Cancelled','...','Including\x20subtasks:\x20yes','workflow:attempts','\x20\x20Files\x20extracted:\x20','workflow:retry','\x20is\x20not\x20a\x20directory','name','split','Validation:\x20skipped','description','attempts','from','session','Retrying\x20attempt...','✔\x20Downloaded\x20','Pattern:\x20','\x20\x20Revision:\x20','Force:\x20yes','✔\x20Found\x20','error','execute','workflows','Pushing\x20workflow\x20project...','ies','Filter:\x20project=','download','includeRetried','Downloading\x20project\x20','491689jLgPPl','filesExtracted','✔\x20Pushed\x20'];a24_0x5703=function(){return _0x5cd825;};return a24_0x5703();}export class WorkflowDeleteCommand extends BaseCommand{[a24_0xbb13ff(0x100)]=a24_0xbb13ff(0x162);[a24_0xbb13ff(0x103)]=a24_0xbb13ff(0x13a);async[a24_0xbb13ff(0x10e)](_0x2ff935){const _0x48c137=a24_0xbb13ff,{options:_0x3ca140,args:_0x3b7c0a,tdx:_0x31cbb9}=_0x2ff935,_0x179c9c=_0x3b7c0a[0x0];if(!_0x179c9c)return console[_0x48c137(0x10d)](_0x48c137(0x144)),console[_0x48c137(0x10d)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x3ca140[_0x48c137(0x14e)]&&console[_0x48c137(0x10d)]('Project:\x20'+_0x179c9c);if(!_0x3ca140[_0x48c137(0x13c)]){const _0x9e8eb0=await confirm(_0x48c137(0x152)+_0x179c9c+_0x48c137(0x16b));if(!_0x9e8eb0)return console[_0x48c137(0x10d)](_0x48c137(0x17f)),0x0;}const _0x66b5eb=await withSpinner(_0x48c137(0x16f)+_0x179c9c+_0x48c137(0x180),()=>_0x31cbb9['workflow'][_0x48c137(0x128)](_0x179c9c),{'verbose':_0x3ca140[_0x48c137(0x14e)]}),_0x5ef519=_0x66b5eb['data'];return console[_0x48c137(0x10d)]('✔\x20Deleted\x20project\x20'+_0x5ef519[_0x48c137(0x169)]),console[_0x48c137(0x10d)](_0x48c137(0x154)+_0x5ef519[_0x48c137(0x12b)]),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x428819,_0x110f99){const _0x5ecca4=a25_0x98c0,_0x2efdf0=_0x428819();while(!![]){try{const _0x3c5d9a=-parseInt(_0x5ecca4(0x116))/0x1+-parseInt(_0x5ecca4(0x113))/0x2+-parseInt(_0x5ecca4(0x11b))/0x3*(parseInt(_0x5ecca4(0x10d))/0x4)+-parseInt(_0x5ecca4(0x110))/0x5+parseInt(_0x5ecca4(0x118))/0x6*(parseInt(_0x5ecca4(0x10e))/0x7)+-parseInt(_0x5ecca4(0x11a))/0x8+parseInt(_0x5ecca4(0x124))/0x9;if(_0x3c5d9a===_0x110f99)break;else _0x2efdf0['push'](_0x2efdf0['shift']());}catch(_0x594024){_0x2efdf0['push'](_0x2efdf0['shift']());}}}(a25_0x338d,0x9133d));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a25_0x98c0(_0x360eeb,_0x17a8bd){const _0x338d46=a25_0x338d();return a25_0x98c0=function(_0x98c0a5,_0x56405d){_0x98c0a5=_0x98c0a5-0x10d;let _0x1dc53a=_0x338d46[_0x98c0a5];return _0x1dc53a;},a25_0x98c0(_0x360eeb,_0x17a8bd);}import{getAPIKey}from'./config.js';export function getVersion(){const _0x51b171=a25_0x98c0;try{const _0x4d23b9=fileURLToPath(import.meta[_0x51b171(0x11f)]),_0x3b55bd=dirname(_0x4d23b9),_0x12825c=join(_0x3b55bd,'../../package.json'),_0x222860=JSON[_0x51b171(0x122)](readFileSync(_0x12825c,_0x51b171(0x117)));return _0x222860[_0x51b171(0x11e)];}catch{return _0x51b171(0x114);}}export function getUserAgent(){const _0x186453=a25_0x98c0,_0x54cd5f=getVersion(),_0x341436=platform(),_0x5133b4=process[_0x186453(0x11e)][_0x186453(0x10f)]('v','');return _0x186453(0x115)+_0x54cd5f+'\x20('+_0x341436+_0x186453(0x111)+_0x5133b4+')';}export function getAuthHeaders(_0x460da9,_0x3f4634){const _0x18221a=a25_0x98c0,_0x38b43b=getVersion(),_0x4aa968={'User-Agent':getUserAgent(),'X-TD-Client':_0x18221a(0x119),'X-TD-Client-Version':_0x38b43b};return _0x3f4634&&(_0x4aa968[_0x18221a(0x123)]=_0x18221a(0x121)+_0x3f4634),_0x4aa968;}export function toHeaderRecord(_0x3e5810){const _0x44f358=a25_0x98c0,_0xf60fd0={};for(const [_0x15a21c,_0x10aeb4]of Object[_0x44f358(0x120)](_0x3e5810)){_0x10aeb4!==undefined&&(_0xf60fd0[_0x15a21c]=_0x10aeb4);}return _0xf60fd0;}export function getTrinoHeaders(_0x5e4835,_0x5dea84){const _0x382fd7=a25_0x98c0,_0x35848b=getAuthHeaders(_0x5e4835,_0x5dea84),_0x17a504=toHeaderRecord(_0x35848b);return delete _0x17a504[_0x382fd7(0x123)],_0x5dea84&&(_0x17a504[_0x382fd7(0x11d)]=_0x5dea84),_0x17a504;}export function validateAPIKey(_0x50215d){const _0x502a17=a25_0x98c0;return _0x50215d[_0x502a17(0x11c)]('/')&&_0x50215d[_0x502a17(0x112)]('/')['length']===0x2;}export function hasAPIKey(_0x4677a2){const _0x5923d9=getAPIKey(_0x4677a2);return _0x5923d9!==undefined&&validateAPIKey(_0x5923d9);}function a25_0x338d(){const _0x2f4e9b=['7kbQdPa','replace','2283985zvmkBO',';\x20node/','split','1913344CkjXQj','0.0.0','tdx/','669467mInUSZ','utf-8','1996614KjRVug','tdx','4209968KjIByy','214437VxLcfT','includes','X-Trino-User','version','url','entries','TD1\x20','parse','Authorization','30986946yWhBUh','32SNEcpU'];a25_0x338d=function(){return _0x2f4e9b;};return a25_0x338d();}
|
package/dist/core/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x1e6771,_0x46245c){const _0x3f6d69=a26_0x1073,_0x759829=_0x1e6771();while(!![]){try{const _0x4730b7=parseInt(_0x3f6d69(0x1b6))/0x1*(-parseInt(_0x3f6d69(0x1d9))/0x2)+parseInt(_0x3f6d69(0x1e4))/0x3+parseInt(_0x3f6d69(0x1c3))/0x4+parseInt(_0x3f6d69(0x1df))/0x5+-parseInt(_0x3f6d69(0x1d2))/0x6*(parseInt(_0x3f6d69(0x1ca))/0x7)+-parseInt(_0x3f6d69(0x1c9))/0x8*(-parseInt(_0x3f6d69(0x1de))/0x9)+parseInt(_0x3f6d69(0x1e6))/0xa*(parseInt(_0x3f6d69(0x1d0))/0xb);if(_0x4730b7===_0x46245c)break;else _0x759829['push'](_0x759829['shift']());}catch(_0x5804de){_0x759829['push'](_0x759829['shift']());}}}(a26_0x3480,0x48860));import{homedir}from'os';function a26_0x3480(){const _0x9d81f5=['TD_API_KEY_','parse','105052SOndEe','TD_API_KEY','.env.','ap03','replace','us01','1418840CuPmdN','7945JVHOav','profile:\x20','jp01','eu01','tdx','stg-us01','33oRsXdB','map','2712YwMzFj','env:\x20TD_API_KEY','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','.env','global:\x20','.config','Warning:\x20Unknown\x20site\x20\x27','464336OtvUHu','TDX_CACHE_DIR','TDX_CONFIG_DIR','env','match','18TimhRK','1039235rHIlek','env:\x20','toUpperCase','stg-jp01','join','1201368vqziIB','stg-ap03','176560JawmIg','error','.cache','apiKeys','existsSync','llm_default_project','\x27,\x20defaulting\x20to\x20us01','startsWith','dev-us01','1uYbBPn','dev-eu01','profile','readFileSync','ap02','endsWith','utf-8','profiles','warn','trim','\x20(TD_API_KEY)'];a26_0x3480=function(){return _0x9d81f5;};return a26_0x3480();}import{join}from'path';function a26_0x1073(_0x3c38cd,_0x57a213){const _0x348067=a26_0x3480();return a26_0x1073=function(_0x10730e,_0x278aeb){_0x10730e=_0x10730e-0x1af;let _0x222cc8=_0x348067[_0x10730e];return _0x222cc8;},a26_0x1073(_0x3c38cd,_0x57a213);}import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a26_0x4a96fb from'node:fs';import*as a26_0x6eb913 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x3dfd13=a26_0x1073;return process[_0x3dfd13(0x1dc)][_0x3dfd13(0x1db)]||join(homedir(),_0x3dfd13(0x1d7),_0x3dfd13(0x1ce));}export function getConfigFile(){const _0x1ae4fb=a26_0x1073;return join(getConfigDir(),_0x1ae4fb(0x1d5));}export function getCacheDir(){const _0x2326ba=a26_0x1073;return process[_0x2326ba(0x1dc)][_0x2326ba(0x1da)]||join(homedir(),_0x2326ba(0x1af),_0x2326ba(0x1ce));}export function getLLMProjectCacheFile(){const _0x4c369a=a26_0x1073;return join(getCacheDir(),_0x4c369a(0x1b2));}export function readCachedLLMProject(){const _0x376d1d=a26_0x1073;try{const _0x1b8709=getLLMProjectCacheFile();if(!existsSync(_0x1b8709))return null;return readFileSync(_0x1b8709,_0x376d1d(0x1bc))[_0x376d1d(0x1bf)]();}catch{return null;}}export function writeCachedLLMProject(_0x4da0b3){const _0x3ea5df=a26_0x1073;try{const _0x5dc76d=getCacheDir(),_0x3aeb8b=getLLMProjectCacheFile();!existsSync(_0x5dc76d)&&mkdirSync(_0x5dc76d,{'recursive':!![]}),writeFileSync(_0x3aeb8b,_0x4da0b3,'utf-8');}catch(_0x2fb5d6){console[_0x3ea5df(0x1e7)]('Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:',_0x2fb5d6);}}export function parseEnvFile(_0x28e194){const _0x3ae25c=a26_0x1073,_0x2577a1={};for(const _0xf54b38 of _0x28e194['split']('\x0a')){const _0x335a71=_0xf54b38['trim']();if(!_0x335a71||_0x335a71[_0x3ae25c(0x1b4)]('#'))continue;const _0x4f7241=_0x335a71[_0x3ae25c(0x1dd)](/^([^=]+)=(.*)$/);if(_0x4f7241){const _0x3e09ac=_0x4f7241[0x1][_0x3ae25c(0x1bf)]();let _0x5a50c2=_0x4f7241[0x2][_0x3ae25c(0x1bf)]();(_0x5a50c2[_0x3ae25c(0x1b4)]('\x22')&&_0x5a50c2[_0x3ae25c(0x1bb)]('\x22')||_0x5a50c2['startsWith']('\x27')&&_0x5a50c2[_0x3ae25c(0x1bb)]('\x27'))&&(_0x5a50c2=_0x5a50c2['slice'](0x1,-0x1)),_0x2577a1[_0x3e09ac]=_0x5a50c2;}}return _0x2577a1;}export function readUserConfig(){const _0x3bb311=a26_0x1073,_0x107119=getConfigFile();if(!existsSync(_0x107119))return{};try{const _0x11ebce=readFileSync(_0x107119,'utf-8');return parseEnvFile(_0x11ebce);}catch(_0x42898b){return console[_0x3bb311(0x1be)](_0x3bb311(0x1d4)+_0x107119+':',_0x42898b),{};}}export function resolveSite(_0x28d49d){const _0x2336e3=a26_0x1073,_0x5c10df=[_0x2336e3(0x1c8),_0x2336e3(0x1cc),'eu01',_0x2336e3(0x1ba),_0x2336e3(0x1c6),_0x2336e3(0x1b5),_0x2336e3(0x1b7),'stg-us01',_0x2336e3(0x1e2),_0x2336e3(0x1e5)];if(_0x5c10df['includes'](_0x28d49d))return _0x28d49d;if(_0x28d49d in SITE_ALIASES)return SITE_ALIASES[_0x28d49d];return console['warn'](_0x2336e3(0x1d8)+_0x28d49d+_0x2336e3(0x1b3)),_0x2336e3(0x1c8);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0xa4d073,_0x185f76){const _0x45c526=a26_0x1073,_0x5918fe=_0xa4d073[_0x45c526(0x1e1)]()[_0x45c526(0x1c7)](/-/g,'_'),_0x16e13e=_0x45c526(0x1c1)+_0x5918fe;if(process[_0x45c526(0x1dc)][_0x16e13e])return process[_0x45c526(0x1dc)][_0x16e13e];if(process[_0x45c526(0x1dc)][_0x45c526(0x1c4)])return process['env'][_0x45c526(0x1c4)];const _0x52283d=_0x185f76||getActiveProfileName();if(_0x52283d){const _0x451cb5=loadProfileEnv(_0x52283d);if(_0x451cb5){if(_0x451cb5[_0x16e13e])return _0x451cb5[_0x16e13e];if(_0x451cb5['TD_API_KEY'])return _0x451cb5[_0x45c526(0x1c4)];}}const _0x469004=loadUserConfigOnce();if(_0x469004[_0x16e13e])return _0x469004[_0x16e13e];if(_0x469004[_0x45c526(0x1c4)])return _0x469004[_0x45c526(0x1c4)];return undefined;}export function getAPIKeySource(_0x588d1b,_0x3ef725){const _0x4b13af=a26_0x1073,_0x1e1eb0=_0x4b13af(0x1c1)+_0x588d1b[_0x4b13af(0x1e1)]()[_0x4b13af(0x1c7)](/-/g,'_');if(process[_0x4b13af(0x1dc)][_0x1e1eb0])return _0x4b13af(0x1e0)+_0x1e1eb0;if(process[_0x4b13af(0x1dc)]['TD_API_KEY'])return _0x4b13af(0x1d3);const _0x4eb4c3=_0x3ef725||getActiveProfileName();if(_0x4eb4c3){const _0x386ad1=loadProfileEnv(_0x4eb4c3);if(_0x386ad1){if(_0x386ad1[_0x1e1eb0])return _0x4b13af(0x1cb)+_0x4eb4c3+'\x20('+_0x1e1eb0+')';if(_0x386ad1[_0x4b13af(0x1c4)])return _0x4b13af(0x1cb)+_0x4eb4c3+_0x4b13af(0x1c0);}}const _0x35f5fc=loadUserConfigOnce(),_0x353e42=getConfigFile();if(_0x35f5fc[_0x1e1eb0])return _0x4b13af(0x1d6)+_0x353e42+'\x20('+_0x1e1eb0+')';if(_0x35f5fc['TD_API_KEY'])return _0x4b13af(0x1d6)+_0x353e42+_0x4b13af(0x1c0);return null;}function loadProfileEnv(_0x4bade5){const _0x56a38a=a26_0x1073,_0x220470=a26_0x6eb913['join'](getConfigDir(),_0x56a38a(0x1c5)+_0x4bade5);if(a26_0x4a96fb['existsSync'](_0x220470)){validateSecureFilePermissions(_0x220470);try{const _0xcf850a=a26_0x4a96fb[_0x56a38a(0x1b9)](_0x220470,_0x56a38a(0x1bc));return parseEnvFile(_0xcf850a);}catch(_0x577d82){console[_0x56a38a(0x1be)]('Warning:\x20Failed\x20to\x20load\x20'+_0x220470+':\x20'+_0x577d82);}}const _0x39eb86=a26_0x6eb913[_0x56a38a(0x1e3)](getConfigDir(),_0x56a38a(0x1bd),_0x4bade5,_0x56a38a(0x1d5));if(a26_0x4a96fb[_0x56a38a(0x1b1)](_0x39eb86)){validateSecureFilePermissions(_0x39eb86);try{const _0x1b7cbc=a26_0x4a96fb['readFileSync'](_0x39eb86,_0x56a38a(0x1bc));return parseEnvFile(_0x1b7cbc);}catch(_0x2b0eaf){return console['warn']('Warning:\x20Failed\x20to\x20load\x20'+_0x39eb86+':\x20'+_0x2b0eaf),null;}}return null;}function getActiveProfileName(){const _0x312191=a26_0x1073,_0x20c8a9=a26_0x6eb913[_0x312191(0x1e3)](getConfigDir(),'tdx.json');if(!a26_0x4a96fb[_0x312191(0x1b1)](_0x20c8a9))return null;try{const _0x1b6c46=a26_0x4a96fb[_0x312191(0x1b9)](_0x20c8a9,_0x312191(0x1bc)),_0x10c26c=JSON[_0x312191(0x1c2)](_0x1b6c46);return _0x10c26c[_0x312191(0x1b8)]||null;}catch{return null;}}export function saveAPIKey(_0x336380,_0x11c63e){const _0x1f5517=a26_0x1073,_0x45d2f4=getConfigDir(),_0x223c72=getConfigFile();!existsSync(_0x45d2f4)&&mkdirSync(_0x45d2f4,{'recursive':!![],'mode':0x1c0});const _0x4129c6=readUserConfig(),_0x54730f=_0x336380[_0x1f5517(0x1e1)]()['replace'](/-/g,'_');_0x4129c6['TD_API_KEY_'+_0x54730f]=_0x11c63e;const _0x338d68=Object['entries'](_0x4129c6)[_0x1f5517(0x1d1)](([_0x8a2427,_0x37c569])=>_0x8a2427+'='+_0x37c569);writeFileSync(_0x223c72,_0x338d68[_0x1f5517(0x1e3)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x281b58=a26_0x1073,_0x17c8ea={'apiKeys':{},'defaultSite':_0x281b58(0x1c8)},_0x3e7316=[_0x281b58(0x1c8),_0x281b58(0x1cc),_0x281b58(0x1cd),_0x281b58(0x1ba),'ap03',_0x281b58(0x1b5),_0x281b58(0x1b7),_0x281b58(0x1cf),_0x281b58(0x1e2),_0x281b58(0x1e5)];for(const _0x52d49a of _0x3e7316){const _0x144d4d=getAPIKey(_0x52d49a);_0x144d4d&&(_0x17c8ea[_0x281b58(0x1b0)][_0x52d49a]=_0x144d4d);}return _0x17c8ea;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x3d7e13=a27_0x4ff8;function a27_0x4ff8(_0x42dcca,_0x59bb36){const _0x197d9f=a27_0x197d();return a27_0x4ff8=function(_0x4ff8a6,_0x5b3f7f){_0x4ff8a6=_0x4ff8a6-0x1c1;let _0x5b5f06=_0x197d9f[_0x4ff8a6];return _0x5b5f06;},a27_0x4ff8(_0x42dcca,_0x59bb36);}(function(_0x1e79f1,_0x151667){const _0x34673b=a27_0x4ff8,_0x3aef81=_0x1e79f1();while(!![]){try{const _0x998962=-parseInt(_0x34673b(0x1f1))/0x1+-parseInt(_0x34673b(0x1fd))/0x2*(-parseInt(_0x34673b(0x1c8))/0x3)+-parseInt(_0x34673b(0x1ee))/0x4*(parseInt(_0x34673b(0x1c6))/0x5)+parseInt(_0x34673b(0x1fc))/0x6+parseInt(_0x34673b(0x1d0))/0x7*(-parseInt(_0x34673b(0x1f4))/0x8)+-parseInt(_0x34673b(0x1c2))/0x9+parseInt(_0x34673b(0x1da))/0xa;if(_0x998962===_0x151667)break;else _0x3aef81['push'](_0x3aef81['shift']());}catch(_0x21ca2c){_0x3aef81['push'](_0x3aef81['shift']());}}}(a27_0x197d,0x89cee));import{resolveSite,getAPIKey,getConfigDir}from'./config.js';import{loadSessionContext}from'./session.js';import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';function a27_0x197d(){const _0x4db6da=['CLI\x20flag:\x20--','profile:\x20','14wwWMYb','injectIntoOptions','log','entries','(active)','Session','join','project','.json','displayWithSources','21742300RSXNBR','getSource',':\x20none','tdx.json','layers','cliFlags','Project','llm_project','session','us01','loadGlobalConfig','verbose','database',':\x20none\x20(using\x20session:\x20','globalCredentials','existsSync','profileCredentials','config','\x0a[configuration\x20files]','sessions','4agJOPs','parent_segment','parentSegment','650687kMVUOI','string','ppid','3012848HwrvCe','toString','configFiles','parse','global','[context]','not\x20set','Global','1619892SbXEhj','74PwJkfm','llmProject','sessionId','Profile','549297WdaBRn','apiKey','profiles','profile','2534555oMolfk','default','7467qCpLky','getParameters','.env','replace','site','activeProfile'];a27_0x197d=function(){return _0x4db6da;};return a27_0x197d();}import*as a27_0x2bdb72 from'node:fs';import*as a27_0x51964d from'node:path';export class GlobalContext{[a27_0x3d7e13(0x1cc)];[a27_0x3d7e13(0x1e6)];[a27_0x3d7e13(0x1ef)];[a27_0x3d7e13(0x1e1)];[a27_0x3d7e13(0x1c3)];['verbose'];[a27_0x3d7e13(0x1de)];['activeProfile'];[a27_0x3d7e13(0x1ff)];[a27_0x3d7e13(0x1f6)];constructor(_0x4a21fe){const _0x456b52=a27_0x3d7e13;this['sessionId']=_0x4a21fe[_0x456b52(0x1e2)]||process[_0x456b52(0x1f3)][_0x456b52(0x1f5)]();const _0x2b0b9d=loadSessionContext(_0x4a21fe['session']),_0x16a173=loadProjectConfig(),_0x9cc3ad=this[_0x456b52(0x1e4)]();this['activeProfile']=_0x4a21fe['profile']||_0x2b0b9d?.['profile']||_0x9cc3ad[_0x456b52(0x1c5)]||getActiveProfile();const _0x3ea2ed=this[_0x456b52(0x1cd)]?loadProfile(this[_0x456b52(0x1cd)]):null,_0x144075=_0x5e0c31=>{const _0x5b18e7=_0x456b52;if(!_0x5e0c31)return{};const _0x352e2b=_0x5e0c31,_0x3410f3={};for(const [_0x82e445,_0x127fe6]of Object[_0x5b18e7(0x1d3)](_0x352e2b)){typeof _0x127fe6===_0x5b18e7(0x1f2)&&(_0x3410f3[_0x82e445]=_0x127fe6);}return _0x3410f3;},_0x36362a={};if(_0x4a21fe[_0x456b52(0x1cc)]&&_0x4a21fe[_0x456b52(0x1cc)]!==_0x456b52(0x1e3))_0x36362a[_0x456b52(0x1cc)]=_0x4a21fe['site'];const _0x4487c9=_0x2b0b9d?.[_0x456b52(0x1e6)],_0x5d6bbc=_0x16a173?.[_0x456b52(0x1e6)],_0x42a0c9=_0x3ea2ed?.[_0x456b52(0x1eb)]?.[_0x456b52(0x1e6)],_0x18bdc5=_0x9cc3ad[_0x456b52(0x1e6)];_0x4a21fe[_0x456b52(0x1e6)]&&(_0x4a21fe[_0x456b52(0x1e6)]!==_0x4487c9&&_0x4a21fe[_0x456b52(0x1e6)]!==_0x5d6bbc&&_0x4a21fe[_0x456b52(0x1e6)]!==_0x42a0c9&&_0x4a21fe[_0x456b52(0x1e6)]!==_0x18bdc5)&&(_0x36362a[_0x456b52(0x1e6)]=_0x4a21fe[_0x456b52(0x1e6)]);if(_0x4a21fe[_0x456b52(0x1f0)])_0x36362a[_0x456b52(0x1ef)]=_0x4a21fe[_0x456b52(0x1f0)];if(_0x4a21fe['llmProject'])_0x36362a['llm_project']=_0x4a21fe[_0x456b52(0x1fe)];if(_0x4a21fe[_0x456b52(0x1c5)])_0x36362a[_0x456b52(0x1c5)]=_0x4a21fe[_0x456b52(0x1c5)];this[_0x456b52(0x1de)]={'cliFlags':_0x36362a,'session':_0x144075(_0x2b0b9d),'project':_0x144075(_0x16a173),'profile':_0x144075(_0x3ea2ed?.['config']),'global':_0x144075(_0x9cc3ad)};const _0x279ab5={...this[_0x456b52(0x1de)]['global'],...this[_0x456b52(0x1de)][_0x456b52(0x1c5)],...this['layers'][_0x456b52(0x1d7)],...this[_0x456b52(0x1de)][_0x456b52(0x1e2)],...this[_0x456b52(0x1de)][_0x456b52(0x1df)]},_0xa8faaf=_0x279ab5[_0x456b52(0x1cc)]||_0x456b52(0x1e3);this[_0x456b52(0x1cc)]=resolveSite(_0xa8faaf),this[_0x456b52(0x1e6)]=_0x279ab5[_0x456b52(0x1e6)],this[_0x456b52(0x1ef)]=_0x279ab5[_0x456b52(0x1ef)],this[_0x456b52(0x1e1)]=_0x279ab5[_0x456b52(0x1e1)],this[_0x456b52(0x1e5)]=_0x4a21fe['verbose']||![],this[_0x456b52(0x1c3)]=getAPIKey(this[_0x456b52(0x1cc)],this[_0x456b52(0x1cd)]||undefined);const _0x3b9b48=getConfigDir(),_0x71da54=a27_0x51964d[_0x456b52(0x1d6)](_0x3b9b48,_0x456b52(0x1ed),this[_0x456b52(0x1ff)]+_0x456b52(0x1d8)),_0x18b146=findProjectConfigPath(),_0x2c7df1=a27_0x51964d[_0x456b52(0x1d6)](_0x3b9b48,_0x456b52(0x1dd)),_0x1b1c60=a27_0x51964d[_0x456b52(0x1d6)](_0x3b9b48,_0x456b52(0x1ca));let _0x40a6e1=null,_0x377349=null;this['activeProfile']&&(_0x40a6e1=a27_0x51964d['join'](_0x3b9b48,_0x456b52(0x1c4),this[_0x456b52(0x1cd)],_0x456b52(0x1dd)),_0x377349=a27_0x51964d['join'](_0x3b9b48,_0x456b52(0x1c4),this[_0x456b52(0x1cd)],_0x456b52(0x1ca))),this[_0x456b52(0x1f6)]={'session':a27_0x2bdb72[_0x456b52(0x1e9)](_0x71da54)?_0x71da54:null,'project':_0x18b146,'profile':_0x40a6e1&&a27_0x2bdb72[_0x456b52(0x1e9)](_0x40a6e1)?_0x40a6e1:null,'profileCredentials':_0x377349&&a27_0x2bdb72[_0x456b52(0x1e9)](_0x377349)?_0x377349:null,'global':a27_0x2bdb72[_0x456b52(0x1e9)](_0x2c7df1)?_0x2c7df1:null,'globalCredentials':a27_0x2bdb72[_0x456b52(0x1e9)](_0x1b1c60)?_0x1b1c60:null};}[a27_0x3d7e13(0x1db)](_0x23eb1c,_0x15bcac){const _0x369d85=a27_0x3d7e13;if(!_0x15bcac)return _0x369d85(0x1fa);const _0x45fd0a=_0x15bcac;if(this[_0x369d85(0x1de)][_0x369d85(0x1df)][_0x23eb1c]===_0x45fd0a){if(_0x23eb1c===_0x369d85(0x1cc)&&_0x45fd0a==='us01'&&!this[_0x369d85(0x1de)][_0x369d85(0x1e2)][_0x369d85(0x1cc)]&&!this[_0x369d85(0x1de)][_0x369d85(0x1d7)][_0x369d85(0x1cc)]&&!this[_0x369d85(0x1de)][_0x369d85(0x1c5)][_0x369d85(0x1cc)]&&!this[_0x369d85(0x1de)][_0x369d85(0x1f8)][_0x369d85(0x1cc)])return _0x369d85(0x1c7);return _0x369d85(0x1ce)+_0x23eb1c[_0x369d85(0x1cb)](/_/g,'-');}if(this[_0x369d85(0x1de)][_0x369d85(0x1e2)][_0x23eb1c]===_0x45fd0a)return _0x369d85(0x1e2);if(this[_0x369d85(0x1de)][_0x369d85(0x1d7)][_0x23eb1c]===_0x45fd0a)return _0x369d85(0x1d7);if(this[_0x369d85(0x1de)][_0x369d85(0x1c5)][_0x23eb1c]===_0x45fd0a)return _0x369d85(0x1cf)+this[_0x369d85(0x1cd)];if(this[_0x369d85(0x1de)]['global'][_0x23eb1c]===_0x45fd0a)return _0x369d85(0x1f8);return'default';}[a27_0x3d7e13(0x1e4)](){const _0x38a14d=a27_0x3d7e13,_0x1a4659=a27_0x51964d[_0x38a14d(0x1d6)](getConfigDir(),'tdx.json');if(!a27_0x2bdb72[_0x38a14d(0x1e9)](_0x1a4659))return{};try{const _0x4ebd2a=a27_0x2bdb72['readFileSync'](_0x1a4659,'utf-8');return JSON[_0x38a14d(0x1f7)](_0x4ebd2a);}catch{return{};}}[a27_0x3d7e13(0x1d1)](_0x18651b){const _0x43ae16=a27_0x3d7e13;_0x18651b['site']=this[_0x43ae16(0x1cc)],!_0x18651b['database']&&this[_0x43ae16(0x1e6)]&&(_0x18651b[_0x43ae16(0x1e6)]=this[_0x43ae16(0x1e6)]),!_0x18651b['parentSegment']&&this['parent_segment']&&(_0x18651b[_0x43ae16(0x1f0)]=this[_0x43ae16(0x1ef)]),!_0x18651b[_0x43ae16(0x1fe)]&&this[_0x43ae16(0x1e1)]&&(_0x18651b[_0x43ae16(0x1fe)]=this[_0x43ae16(0x1e1)]);}[a27_0x3d7e13(0x1c9)](){const _0x2524fa=a27_0x3d7e13;return[{'key':_0x2524fa(0x1cc),'value':this['site']},{'key':_0x2524fa(0x1e6),'value':this['database']},{'key':_0x2524fa(0x1ef),'value':this['parent_segment']},{'key':_0x2524fa(0x1e1),'value':this[_0x2524fa(0x1e1)]},{'key':_0x2524fa(0x1c5),'value':this['activeProfile']||undefined}];}['display'](){const _0x5991e7=a27_0x3d7e13;console[_0x5991e7(0x1d2)](_0x5991e7(0x1f9));for(const {key:_0x5b8ecf,value:_0x246e00}of this[_0x5991e7(0x1c9)]()){_0x246e00&&console[_0x5991e7(0x1d2)](_0x5b8ecf+':\x20'+_0x246e00);}}[a27_0x3d7e13(0x1d9)](){const _0x4bc1cf=a27_0x3d7e13;console[_0x4bc1cf(0x1d2)]('[context]');for(const {key:_0x2553e2,value:_0x571b02}of this[_0x4bc1cf(0x1c9)]()){if(_0x571b02){const _0x22eedd=_0x2553e2==='profile'?_0x4bc1cf(0x1d4):'('+this['getSource'](_0x2553e2,_0x571b02)+')';console[_0x4bc1cf(0x1d2)](_0x2553e2+':\x20'+_0x571b02+'\x20'+_0x22eedd);}}console[_0x4bc1cf(0x1d2)](_0x4bc1cf(0x1ec));const _0x1b11dc=[{'label':_0x4bc1cf(0x1d5),'path':this[_0x4bc1cf(0x1f6)][_0x4bc1cf(0x1e2)],'extra':'(session:\x20'+this[_0x4bc1cf(0x1ff)]+')'},{'label':_0x4bc1cf(0x1e0),'path':this[_0x4bc1cf(0x1f6)][_0x4bc1cf(0x1d7)]},{'label':_0x4bc1cf(0x1c1),'path':this[_0x4bc1cf(0x1f6)][_0x4bc1cf(0x1c5)]},{'label':'Profile\x20Credentials','path':this['configFiles'][_0x4bc1cf(0x1ea)]},{'label':_0x4bc1cf(0x1fb),'path':this['configFiles']['global']},{'label':'Global\x20Credentials','path':this['configFiles'][_0x4bc1cf(0x1e8)]}];for(const {label:_0x5105e3,path:_0x8d7db3,extra:_0x3b8224}of _0x1b11dc){if(_0x8d7db3)console[_0x4bc1cf(0x1d2)](_0x5105e3+':\x20'+_0x8d7db3+'\x20✓'+(_0x3b8224?'\x20'+_0x3b8224:''));else{if(_0x5105e3===_0x4bc1cf(0x1d5))console['log'](_0x5105e3+_0x4bc1cf(0x1e7)+this[_0x4bc1cf(0x1ff)]+')');else(_0x5105e3===_0x4bc1cf(0x1e0)||_0x5105e3===_0x4bc1cf(0x1fb))&&console[_0x4bc1cf(0x1d2)](_0x5105e3+_0x4bc1cf(0x1dc));}}}}
|