@treasuredata/tdx 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/engage-api-client.d.ts +79 -1
- package/dist/client/engage-api-client.d.ts.map +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/engage-api-client.js.map +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/command.d.ts.map +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/command.js.map +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.d.ts +128 -0
- package/dist/commands/engage-command.d.ts.map +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-command.js.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.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/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.d.ts +1 -0
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.d.ts +1 -0
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/session.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/engage.d.ts +105 -1
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/engage.d.ts +102 -0
- package/dist/types/engage.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0x2ce7(_0xbb396c,_0x2d90f7){const _0x387018=a28_0x3870();return a28_0x2ce7=function(_0x2ce72d,_0x2300c8){_0x2ce72d=_0x2ce72d-0xc1;let _0x588356=_0x387018[_0x2ce72d];return _0x588356;},a28_0x2ce7(_0xbb396c,_0x2d90f7);}const a28_0x15b173=a28_0x2ce7;(function(_0x472bac,_0x122b4c){const _0x518bcf=a28_0x2ce7,_0x5bfe4e=_0x472bac();while(!![]){try{const _0x1f8445=-parseInt(_0x518bcf(0xc1))/0x1*(parseInt(_0x518bcf(0xc4))/0x2)+-parseInt(_0x518bcf(0xc9))/0x3+parseInt(_0x518bcf(0xcb))/0x4*(-parseInt(_0x518bcf(0xd6))/0x5)+-parseInt(_0x518bcf(0xc8))/0x6+-parseInt(_0x518bcf(0xc6))/0x7*(-parseInt(_0x518bcf(0xca))/0x8)+parseInt(_0x518bcf(0xcf))/0x9*(parseInt(_0x518bcf(0xd3))/0xa)+-parseInt(_0x518bcf(0xcc))/0xb*(-parseInt(_0x518bcf(0xd8))/0xc);if(_0x1f8445===_0x122b4c)break;else _0x5bfe4e['push'](_0x5bfe4e['shift']());}catch(_0x54b3df){_0x5bfe4e['push'](_0x5bfe4e['shift']());}}}(a28_0x3870,0x2d574));import{BaseCommand}from'./command.js';function a28_0x3870(){const _0x55a58a=['json','1830231rdyaQk','stringify','segment:pwd','format','10BuPvOJ','error','root','10Pjqrid','segmentPath','4858740xfPeEY','67jtdIkX','verbose','log','6884dvARbu','jsonl','919247HeeldE','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','272610CilkEB','625470sXBcPx','8jHHlxg','138640RzjXCV','11TizjjL','name'];a28_0x3870=function(){return _0x55a58a;};return a28_0x3870();}export class SegmentPwdCommand extends BaseCommand{[a28_0x15b173(0xcd)]=a28_0x15b173(0xd1);['description']='Show\x20current\x20segment/folder\x20context';async['execute'](_0xc087ff){const _0x13ba35=a28_0x15b173,{options:_0x268e8f}=_0xc087ff;try{const _0x1b6b8b=_0x268e8f[_0x13ba35(0xd7)];if(!_0x1b6b8b)return _0x268e8f[_0x13ba35(0xd2)]===_0x13ba35(0xce)||_0x268e8f[_0x13ba35(0xd2)]===_0x13ba35(0xc5)?console[_0x13ba35(0xc3)](JSON[_0x13ba35(0xd0)]({'path':'/','type':_0x13ba35(0xd5)})):console['log']('/'),0x0;if(_0x268e8f[_0x13ba35(0xd2)]==='json'||_0x268e8f[_0x13ba35(0xd2)]===_0x13ba35(0xc5)){const _0x2be081={'path':_0x1b6b8b};console[_0x13ba35(0xc3)](JSON['stringify'](_0x2be081));}else console[_0x13ba35(0xc3)](_0x1b6b8b),_0x268e8f[_0x13ba35(0xc2)]&&(console[_0x13ba35(0xd4)](''),console[_0x13ba35(0xd4)]('Context\x20details:'),console['error']('\x20\x20Path:\x20'+_0x1b6b8b),console[_0x13ba35(0xd4)](''),console[_0x13ba35(0xd4)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x13ba35(0xd4)](_0x13ba35(0xc7)));return 0x0;}catch(_0x481c24){throw _0x481c24;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a29_0x49413e=a29_0xb9dc;(function(_0x3745c4,_0x102cd9){const _0x1f75f7=a29_0xb9dc,_0x2cfda4=_0x3745c4();while(!![]){try{const _0x9f4190=parseInt(_0x1f75f7(0x18d))/0x1*(parseInt(_0x1f75f7(0x193))/0x2)+-parseInt(_0x1f75f7(0x191))/0x3+-parseInt(_0x1f75f7(0x1b7))/0x4+-parseInt(_0x1f75f7(0x1b9))/0x5*(-parseInt(_0x1f75f7(0x18f))/0x6)+parseInt(_0x1f75f7(0x190))/0x7*(parseInt(_0x1f75f7(0x19e))/0x8)+-parseInt(_0x1f75f7(0x1a3))/0x9*(-parseInt(_0x1f75f7(0x18e))/0xa)+-parseInt(_0x1f75f7(0x196))/0xb;if(_0x9f4190===_0x102cd9)break;else _0x2cfda4['push'](_0x2cfda4['shift']());}catch(_0x4c7fe7){_0x2cfda4['push'](_0x2cfda4['shift']());}}}(a29_0x1301,0xcfd15));import{BaseCommand}from'./command.js';function a29_0x1301(){const _0x1d9799=['39714GcrSKd','7fupAJS','3488319dqaCag','segment','177358aPGjIp','name','\x20\x20\x20Path:\x20','7927260dSfosU','Parent\x20ID:\x20','Error:\x20Cannot\x20update\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Resolving\x20folder\x20\x27','length','resolvePathToResource','Segment\x20ID\x20missing\x20from\x20resolved\x20path','3997048pgNwJN','type','verbose','folder','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','3942ifCAPD','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','rule','includes','resolveFolderId','Resolved\x20type:\x20','parentId','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','INTERNAL','Update\x20existing\x20child\x20segment','segmentName','segmentPath','ruleFile','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','✔\x20Updated\x20segment\x20\x27','data','Resolved\x20folder\x20ID:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','description','2577004zatifD','error','665BfuRkd','Updating\x20segment\x20\x27','segmentId','\x27...','Examples:','updateSegmentById','19VkIdPo','7170bJRHCI'];a29_0x1301=function(){return _0x1d9799;};return a29_0x1301();}function a29_0xb9dc(_0x5c4c61,_0x1cb9e7){const _0x130184=a29_0x1301();return a29_0xb9dc=function(_0xb9dcaa,_0x1a2438){_0xb9dcaa=_0xb9dcaa-0x18d;let _0x271391=_0x130184[_0xb9dcaa];return _0x271391;},a29_0xb9dc(_0x5c4c61,_0x1cb9e7);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a29_0x49413e(0x194)]='segment:update';['description']=a29_0x49413e(0x1ac);async['execute'](_0x5d35fe){const _0x1e056f=a29_0x49413e,{options:_0x44441b,args:_0x14ffe8,tdx:_0x49f6a3}=_0x5d35fe,_0x593835=_0x44441b;if(_0x14ffe8[_0x1e056f(0x19b)]===0x0)return console[_0x1e056f(0x1b8)](_0x1e056f(0x1b5)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1b0)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1bd)),console[_0x1e056f(0x1b8)](_0x1e056f(0x199)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1aa)),0x1;const _0x849b93=_0x14ffe8[0x0],_0x38131f=_0x44441b[_0x1e056f(0x1ae)];let _0x2b21a1=_0x849b93;_0x38131f&&!_0x849b93[_0x1e056f(0x1a6)]('/')&&(_0x2b21a1=_0x38131f+'/'+_0x849b93,_0x593835[_0x1e056f(0x1a0)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x2b21a1));const _0x31f294=await withSpinner('Resolving\x20path\x20\x27'+_0x2b21a1+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x19c)](_0x2b21a1),{'verbose':_0x593835['verbose']}),_0x3ab269=_0x31f294[_0x1e056f(0x1b3)];_0x593835[_0x1e056f(0x1a0)]&&console['error'](_0x1e056f(0x1a8)+_0x3ab269[_0x1e056f(0x19f)]);if(_0x3ab269['type']!==_0x1e056f(0x192))return console[_0x1e056f(0x1b8)](_0x1e056f(0x198)+_0x3ab269['type']+_0x1e056f(0x1a2)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1a4)),0x1;if(!_0x3ab269[_0x1e056f(0x1bb)])throw new SDKError(ErrorCode[_0x1e056f(0x1ab)],_0x1e056f(0x19d));const _0x54c37d=_0x3ab269[_0x1e056f(0x1a9)],_0x442160=_0x3ab269[_0x1e056f(0x1bb)];_0x593835[_0x1e056f(0x1a0)]&&(console[_0x1e056f(0x1b8)](_0x1e056f(0x197)+_0x54c37d),console[_0x1e056f(0x1b8)]('Segment\x20ID:\x20'+_0x442160));let _0xc5d3e;if(_0x593835[_0x1e056f(0x1a1)]){const _0x54579e=_0x593835[_0x1e056f(0x1a1)],_0x2961fb=await withSpinner(_0x1e056f(0x19a)+_0x54579e+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x1a7)](_0x54c37d,_0x54579e),{'verbose':_0x593835[_0x1e056f(0x1a0)]});_0xc5d3e=parseInt(_0x2961fb['data'],0xa),_0x593835[_0x1e056f(0x1a0)]&&console[_0x1e056f(0x1b8)](_0x1e056f(0x1b4)+_0xc5d3e);}const _0x148ee8=await loadJSONFromOptions(_0x593835[_0x1e056f(0x1a5)],_0x593835[_0x1e056f(0x1af)]),_0x1c982d={'name':_0x593835[_0x1e056f(0x194)],'description':_0x593835[_0x1e056f(0x1b6)],'rule':_0x148ee8,'kind':_0x593835[_0x1e056f(0x1b1)]!==undefined?parseInt(_0x593835[_0x1e056f(0x1b1)],0xa):undefined,'segmentFolderId':_0xc5d3e},_0xc441bd=await withSpinner(_0x1e056f(0x1ba)+_0x3ab269[_0x1e056f(0x1ad)]+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x1be)](_0x54c37d,_0x442160,_0x1c982d),{'verbose':_0x593835[_0x1e056f(0x1a0)]}),_0x4de48f=_0xc441bd[_0x1e056f(0x1b3)];return console[_0x1e056f(0x1b8)](_0x1e056f(0x1b2)+_0x4de48f[_0x1e056f(0x194)]+'\x27'),_0x2b21a1!==_0x849b93&&console[_0x1e056f(0x1b8)](_0x1e056f(0x195)+_0x2b21a1),await handleSDKOutput([_0x4de48f],_0x593835),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x4c5c1c=a30_0xc054;function a30_0x2564(){const _0x517be2=['Examples:','Context\x20cleared.\x20Back\x20to\x20root.','Error:\x20Path\x20is\x20required','Usage:\x20tdx\x20segment\x20use\x20<path>','12IRIMnv','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Resolving\x20path\x20\x27','segment','log','site','join','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','parentId','350553rXftbG','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','\x27...','isAbsolute','209055DkfYDp','250rOjMro','folderId','8069397zKvwEu','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose','length','8JVBilp','84lpZssL','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','execute','fullPath','Parent\x20ID:\x20','resolvePathToResource','segments','description','type','Target\x20path:\x20','parentName','Resolved\x20path\x20type:\x20','1963750cavnKy','2696968rwNCQU','2532194juVTdR','249912xQCVUY','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Site:\x20','segmentPath','error','data','split','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Use:\x20tdx\x20segment\x20use\x20','1BBacCX'];a30_0x2564=function(){return _0x517be2;};return a30_0x2564();}(function(_0x3780f8,_0x2ad34a){const _0x141da0=a30_0xc054,_0x2988d2=_0x3780f8();while(!![]){try{const _0x51f337=-parseInt(_0x141da0(0x168))/0x1*(-parseInt(_0x141da0(0x15e))/0x2)+-parseInt(_0x141da0(0x141))/0x3+parseInt(_0x141da0(0x15d))/0x4+-parseInt(_0x141da0(0x15c))/0x5*(parseInt(_0x141da0(0x137))/0x6)+parseInt(_0x141da0(0x148))/0x7*(-parseInt(_0x141da0(0x14d))/0x8)+-parseInt(_0x141da0(0x15f))/0x9*(-parseInt(_0x141da0(0x146))/0xa)+-parseInt(_0x141da0(0x145))/0xb*(-parseInt(_0x141da0(0x14e))/0xc);if(_0x51f337===_0x2ad34a)break;else _0x2988d2['push'](_0x2988d2['shift']());}catch(_0x8b780){_0x2988d2['push'](_0x2988d2['shift']());}}}(a30_0x2564,0xadf04));function a30_0xc054(_0x360a71,_0x5ef088){const _0x256463=a30_0x2564();return a30_0xc054=function(_0xc0543e,_0x97bfb3){_0xc0543e=_0xc0543e-0x136;let _0x4c8099=_0x256463[_0xc0543e];return _0x4c8099;},a30_0xc054(_0x360a71,_0x5ef088);}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';[a30_0x4c5c1c(0x157)]=a30_0x4c5c1c(0x160);async[a30_0x4c5c1c(0x152)](_0x4280ce){const _0x528527=a30_0x4c5c1c,{options:_0x541c65,args:_0x387157,tdx:_0x76b8b3}=_0x4280ce;if(_0x387157['length']===0x0)return console['error'](_0x528527(0x16b)),console[_0x528527(0x163)](_0x528527(0x136)),console[_0x528527(0x163)](_0x528527(0x169)),console[_0x528527(0x163)](_0x528527(0x149)),console['error'](_0x528527(0x151)),console[_0x528527(0x163)](_0x528527(0x13f)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x2b2e91=_0x387157[0x0],_0x10d870=_0x541c65['session'];try{if(_0x2b2e91==='/')return saveSessionContext({'segment_path':undefined},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x16a)),0x0;const _0x5d4086=_0x541c65[_0x528527(0x162)];let _0x553f0a=_0x2b2e91;const _0x150e08=parsePath(_0x2b2e91);if(!_0x150e08[_0x528527(0x144)]){if(!_0x5d4086)return console[_0x528527(0x163)](_0x528527(0x14a)),console[_0x528527(0x163)](_0x528527(0x142)),0x1;if(_0x2b2e91==='..'){const _0x353551=_0x5d4086[_0x528527(0x165)]('/')['slice'](0x0,-0x1)[_0x528527(0x13d)]('/');_0x553f0a=_0x353551||'/';}else _0x2b2e91==='.'?_0x553f0a=_0x5d4086:_0x553f0a=_0x5d4086+'/'+_0x2b2e91;_0x541c65[_0x528527(0x14b)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x553f0a);}if(_0x553f0a==='/'||_0x553f0a==='')return saveSessionContext({'segment_path':undefined},_0x10d870),console['log'](_0x528527(0x16a)),0x0;_0x553f0a=normalizePath(_0x553f0a);const _0x2b2cd1=parsePath(_0x553f0a)[_0x528527(0x156)];if(_0x2b2cd1[_0x528527(0x14c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x16a)),0x0;_0x541c65[_0x528527(0x14b)]&&(console[_0x528527(0x163)](_0x528527(0x161)+_0x541c65[_0x528527(0x13c)]),console[_0x528527(0x163)](_0x528527(0x159)+_0x553f0a));const _0x5375bd=await withSpinner(_0x528527(0x139)+_0x553f0a+_0x528527(0x143),()=>_0x76b8b3[_0x528527(0x13a)][_0x528527(0x155)](_0x553f0a),{'verbose':_0x541c65[_0x528527(0x14b)]}),_0x221ff0=_0x5375bd[_0x528527(0x164)];_0x541c65[_0x528527(0x14b)]&&(console[_0x528527(0x163)](_0x528527(0x15b)+_0x221ff0[_0x528527(0x158)]),console[_0x528527(0x163)](_0x528527(0x154)+_0x221ff0[_0x528527(0x140)]),_0x221ff0[_0x528527(0x147)]&&console[_0x528527(0x163)]('Folder\x20ID:\x20'+_0x221ff0[_0x528527(0x147)]));if(_0x221ff0[_0x528527(0x158)]==='segment')return console['error'](_0x528527(0x138)),console[_0x528527(0x163)](_0x528527(0x14f)),console['error'](_0x528527(0x167)+_0x221ff0[_0x528527(0x15a)]+(_0x221ff0['folderPath']?'/'+_0x221ff0['folderPath'][_0x528527(0x13d)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x221ff0['fullPath'],'parent_segment':_0x221ff0[_0x528527(0x15a)]},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x150)+_0x221ff0[_0x528527(0x153)]),_0x541c65[_0x528527(0x14b)]&&(console['error'](_0x528527(0x166)),console['error'](_0x528527(0x13e)),console[_0x528527(0x163)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x42e149){throw _0x42e149;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x3a866c=a31_0x1929;(function(_0x1116be,_0x359379){const _0x36bb5a=a31_0x1929,_0x536e16=_0x1116be();while(!![]){try{const _0x567323=parseInt(_0x36bb5a(0xfd))/0x1*(-parseInt(_0x36bb5a(0xbb))/0x2)+-parseInt(_0x36bb5a(0xdb))/0x3+parseInt(_0x36bb5a(0xcc))/0x4+-parseInt(_0x36bb5a(0xe9))/0x5+-parseInt(_0x36bb5a(0xe2))/0x6*(parseInt(_0x36bb5a(0xe0))/0x7)+parseInt(_0x36bb5a(0xf6))/0x8*(-parseInt(_0x36bb5a(0xd0))/0x9)+parseInt(_0x36bb5a(0xbd))/0xa;if(_0x567323===_0x359379)break;else _0x536e16['push'](_0x536e16['shift']());}catch(_0x4f55d7){_0x536e16['push'](_0x536e16['shift']());}}}(a31_0x1b22,0x28214));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a31_0x1929(_0x2dc12e,_0x2d90e3){const _0x1b22b1=a31_0x1b22();return a31_0x1929=function(_0x192909,_0x4a2859){_0x192909=_0x192909-0xbb;let _0x1004f2=_0x1b22b1[_0x192909];return _0x1004f2;},a31_0x1929(_0x2dc12e,_0x2d90e3);}function a31_0x1b22(){const _0x576373=['Building\x20hierarchy\x20tree...','No\x20parent\x20segments\x20match\x20pattern:\x20','Listing\x20parent\x20segments\x20matching\x20\x27','Resolving\x20context\x20path\x20\x27','listUnified','site','json','population','👥\x20','jsonl','8glLpGs','parentId','name','[parent\x20segments]','replace','attributes','format','1jzIUli','✔\x20Found\x20','description','\x20and\x20','message','384586GjaoBw','map','8230670IDylnj','dim','\x20folder','length','sort','\x27...','log','error','verbose','Error:\x20','Current\x20context:\x20','(empty)','\x20top-level\x20items','\x20\x20Cause:\x20','\x20segment','895556oyZkzG','folder','execute','data','116856vwFdVd','includes','Listing\x20parent\x20segments...','✔\x20Built\x20tree\x20with\x20','\x20parent\x20segment','resolvePathToResource','listParentsWithPattern','segment','Folder\x20ID:\x20','Path/pattern\x20arg:\x20','\x20matching\x20\x27','912495OcahQo','segmentPath','recursive','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Parent\x20ID:\x20','53753PRwnPJ','Listing\x20folders\x20and\x20segments...','186PMChwn','localeCompare','listRecursive','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','cause','folderId','segments','675465atfsTP','listParents','filter'];a31_0x1b22=function(){return _0x576373;};return a31_0x1b22();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a31_0x265af8 from'chalk';export class SegmentsCommand extends BaseCommand{[a31_0x3a866c(0xf8)]=a31_0x3a866c(0xe8);[a31_0x3a866c(0xff)]=a31_0x3a866c(0xde);async[a31_0x3a866c(0xce)](_0x54d841){const _0x4d200a=a31_0x3a866c,{options:_0x4a89af,args:_0x221874}=_0x54d841,_0x28b278=_0x4a89af[_0x4d200a(0xdd)],_0x353207=_0x221874[0x0];try{const _0x4784ee=_0x4a89af[_0x4d200a(0xdc)];_0x4a89af[_0x4d200a(0xc5)]&&(console['error']('Site:\x20'+_0x4a89af[_0x4d200a(0xf1)]),console[_0x4d200a(0xc4)](_0x4d200a(0xc7)+(_0x4784ee||'/')),_0x353207&&console[_0x4d200a(0xc4)](_0x4d200a(0xd9)+_0x353207),_0x28b278&&console[_0x4d200a(0xc4)]('Recursive\x20mode:\x20enabled'));if(_0x353207){const _0xc53a5f=_0x353207[_0x4d200a(0xd1)]('*')||_0x353207['includes']('?');if(_0xc53a5f&&!_0x4784ee)return await this[_0x4d200a(0xd6)](_0x54d841,_0x353207);else return _0xc53a5f?(console[_0x4d200a(0xc4)](_0x4d200a(0xe5)),console['error']('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x28b278?await this[_0x4d200a(0xe4)](_0x54d841,_0x353207):await this[_0x4d200a(0xf0)](_0x54d841,_0x353207);}if(!_0x4784ee)return await this[_0x4d200a(0xea)](_0x54d841);return _0x28b278?await this[_0x4d200a(0xe4)](_0x54d841,_0x4784ee):await this[_0x4d200a(0xf0)](_0x54d841,_0x4784ee);}catch(_0x4babe4){if(_0x4babe4 instanceof SDKError)return console[_0x4d200a(0xc4)](_0x4d200a(0xc6)+_0x4babe4[_0x4d200a(0x101)]),_0x4babe4[_0x4d200a(0xe6)]&&console[_0x4d200a(0xc4)](_0x4d200a(0xca)+_0x4babe4[_0x4d200a(0xe6)]),0x1;throw _0x4babe4;}}async[a31_0x3a866c(0xd6)](_0x484135,_0x4dd5c0){const _0x37cf3d=a31_0x3a866c,{options:_0x154890,tdx:_0x41aa99}=_0x484135,_0x483a86=await withSpinner(_0x37cf3d(0xee)+_0x4dd5c0+_0x37cf3d(0xc2),()=>_0x41aa99['segment'][_0x37cf3d(0xea)](),{'verbose':_0x154890['verbose']}),_0x1599cf=_0x483a86[_0x37cf3d(0xcf)],_0x49d799=_0x4dd5c0[_0x37cf3d(0xfa)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x37cf3d(0xfa)](/\*/g,'.*')[_0x37cf3d(0xfa)](/\?/g,'.'),_0x25371f=new RegExp('^'+_0x49d799+'$','i'),_0x55c40e=_0x1599cf[_0x37cf3d(0xeb)](_0x57e3be=>_0x25371f['test'](_0x57e3be[_0x37cf3d(0xfb)][_0x37cf3d(0xf8)]));console[_0x37cf3d(0xc4)](_0x37cf3d(0xfe)+_0x55c40e[_0x37cf3d(0xc0)]+'\x20parent\x20segment'+(_0x55c40e[_0x37cf3d(0xc0)]!==0x1?'s':'')+_0x37cf3d(0xda)+_0x4dd5c0+'\x27');if(_0x154890[_0x37cf3d(0xfc)]==='json'||_0x154890[_0x37cf3d(0xfc)]==='jsonl')await handleSDKOutput(_0x55c40e,_0x154890);else{if(_0x55c40e[_0x37cf3d(0xc0)]===0x0)console[_0x37cf3d(0xc3)](_0x37cf3d(0xed)+_0x4dd5c0);else{console[_0x37cf3d(0xc3)](_0x37cf3d(0xf9));for(const _0xef1282 of _0x55c40e){const _0x137fdd=_0xef1282['attributes'][_0x37cf3d(0xf3)]?a31_0x265af8[_0x37cf3d(0xbe)]('\x20('+formatRows(_0xef1282[_0x37cf3d(0xfb)]['population'])+')'):'';console[_0x37cf3d(0xc3)](_0x37cf3d(0xf4)+_0xef1282['attributes'][_0x37cf3d(0xf8)]+_0x137fdd);}}}return 0x0;}async[a31_0x3a866c(0xea)](_0x494688){const _0x1af95e=a31_0x3a866c,{options:_0x1d6e76,tdx:_0x1533b0}=_0x494688,_0x2cab75=await withSpinner(_0x1af95e(0xd2),()=>_0x1533b0[_0x1af95e(0xd7)][_0x1af95e(0xea)](),{'verbose':_0x1d6e76[_0x1af95e(0xc5)]}),_0x1f3d90=_0x2cab75[_0x1af95e(0xcf)];console[_0x1af95e(0xc4)](_0x1af95e(0xfe)+_0x1f3d90['length']+_0x1af95e(0xd4)+(_0x1f3d90['length']!==0x1?'s':''));if(_0x1d6e76['format']==='json'||_0x1d6e76[_0x1af95e(0xfc)]===_0x1af95e(0xf5))await handleSDKOutput(_0x1f3d90,_0x1d6e76);else{console[_0x1af95e(0xc3)](_0x1af95e(0xf9));for(const _0x2d0aa1 of _0x1f3d90){const _0x3d98bc=_0x2d0aa1[_0x1af95e(0xfb)][_0x1af95e(0xf3)]?a31_0x265af8[_0x1af95e(0xbe)]('\x20('+formatRows(_0x2d0aa1[_0x1af95e(0xfb)][_0x1af95e(0xf3)])+')'):'';console['log'](_0x1af95e(0xf4)+_0x2d0aa1['attributes'][_0x1af95e(0xf8)]+_0x3d98bc);}}return 0x0;}async['listUnified'](_0x432855,_0x1ec297){const _0x2fd924=a31_0x3a866c,{options:_0x2104e6,tdx:_0x5c8d49}=_0x432855,_0xd1ad28=await withSpinner(_0x2fd924(0xef)+_0x1ec297+_0x2fd924(0xc2),()=>_0x5c8d49[_0x2fd924(0xd7)][_0x2fd924(0xd5)](_0x1ec297),{'verbose':_0x2104e6['verbose']}),_0x6216af=_0xd1ad28[_0x2fd924(0xcf)];_0x2104e6[_0x2fd924(0xc5)]&&(console[_0x2fd924(0xc4)](_0x2fd924(0xdf)+_0x6216af[_0x2fd924(0xf7)]),_0x6216af[_0x2fd924(0xe7)]&&console[_0x2fd924(0xc4)]('Folder\x20ID:\x20'+_0x6216af['folderId']));const _0x1505fe=await withSpinner(_0x2fd924(0xe1),()=>_0x5c8d49[_0x2fd924(0xd7)]['listUnified'](_0x6216af[_0x2fd924(0xf7)],_0x6216af[_0x2fd924(0xe7)]),{'verbose':_0x2104e6['verbose']}),{folders:_0x2a2f6b,segments:_0x13ff6b}=_0x1505fe[_0x2fd924(0xcf)],_0x585b56=_0x2a2f6b[_0x2fd924(0xc0)]+_0x13ff6b['length'];console[_0x2fd924(0xc4)](_0x2fd924(0xfe)+_0x2a2f6b['length']+_0x2fd924(0xbf)+(_0x2a2f6b[_0x2fd924(0xc0)]!==0x1?'s':'')+_0x2fd924(0x100)+_0x13ff6b['length']+_0x2fd924(0xcb)+(_0x13ff6b['length']!==0x1?'s':''));if(_0x2104e6[_0x2fd924(0xfc)]===_0x2fd924(0xf2)||_0x2104e6[_0x2fd924(0xfc)]===_0x2fd924(0xf5)){const _0x1da45a=[..._0x2a2f6b['map'](_0x107841=>({..._0x107841,'type':_0x2fd924(0xcd)})),..._0x13ff6b[_0x2fd924(0xbc)](_0x9bd33=>({..._0x9bd33,'type':'segment'}))][_0x2fd924(0xc1)]((_0x2e7a76,_0x38c332)=>_0x2e7a76[_0x2fd924(0xf8)][_0x2fd924(0xe3)](_0x38c332[_0x2fd924(0xf8)]));await handleSDKOutput(_0x1da45a,_0x2104e6);}else{if(_0x585b56===0x0)console['log'](a31_0x265af8[_0x2fd924(0xbe)]('[/'+_0x1ec297+']')),console['log'](_0x2fd924(0xc8));else{console['log'](a31_0x265af8[_0x2fd924(0xbe)]('[/'+_0x1ec297+']'));const _0x4806bb=formatFlatList(_0x2a2f6b,_0x13ff6b,{'showMetadata':!![]});console[_0x2fd924(0xc3)](_0x4806bb);}}return 0x0;}async['listRecursive'](_0x4a6142,_0x584686){const _0x2cda3d=a31_0x3a866c,{options:_0xd28628,tdx:_0x2f41d3}=_0x4a6142,_0x52610e=await withSpinner(_0x2cda3d(0xef)+_0x584686+_0x2cda3d(0xc2),()=>_0x2f41d3[_0x2cda3d(0xd7)][_0x2cda3d(0xd5)](_0x584686),{'verbose':_0xd28628[_0x2cda3d(0xc5)]}),_0x3dd461=_0x52610e[_0x2cda3d(0xcf)];_0xd28628['verbose']&&(console['error'](_0x2cda3d(0xdf)+_0x3dd461['parentId']),_0x3dd461[_0x2cda3d(0xe7)]&&console[_0x2cda3d(0xc4)](_0x2cda3d(0xd8)+_0x3dd461[_0x2cda3d(0xe7)]));const _0x564fa9=_0xd28628['maxDepth']||0xa,_0x47d656=await withSpinner(_0x2cda3d(0xec),()=>_0x2f41d3[_0x2cda3d(0xd7)][_0x2cda3d(0xe4)](_0x3dd461[_0x2cda3d(0xf7)],_0x3dd461[_0x2cda3d(0xe7)],0x0,_0x564fa9),{'verbose':_0xd28628[_0x2cda3d(0xc5)]}),_0x3d6295=_0x47d656[_0x2cda3d(0xcf)];console['error'](_0x2cda3d(0xd3)+_0x3d6295[_0x2cda3d(0xc0)]+_0x2cda3d(0xc9));if(_0xd28628[_0x2cda3d(0xfc)]==='json'||_0xd28628['format']===_0x2cda3d(0xf5))await handleSDKOutput(_0x3d6295,_0xd28628);else{console[_0x2cda3d(0xc3)](a31_0x265af8['dim']('[/'+_0x584686+']'));const _0x5340f5=formatTree(_0x3d6295,{'showMetadata':!![]});console[_0x2cda3d(0xc3)](_0x5340f5);}return 0x0;}}
|
package/dist/commands/show.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x46eb0e=a32_0x1a4d;(function(_0x4efa2b,_0x1ad061){const _0x143bc6=a32_0x1a4d,_0x45cc20=_0x4efa2b();while(!![]){try{const _0x2dd0ee=-parseInt(_0x143bc6(0x12f))/0x1+-parseInt(_0x143bc6(0x148))/0x2*(-parseInt(_0x143bc6(0x137))/0x3)+parseInt(_0x143bc6(0x129))/0x4+-parseInt(_0x143bc6(0x13c))/0x5+parseInt(_0x143bc6(0x121))/0x6+parseInt(_0x143bc6(0x127))/0x7*(-parseInt(_0x143bc6(0x134))/0x8)+parseInt(_0x143bc6(0x12d))/0x9;if(_0x2dd0ee===_0x1ad061)break;else _0x45cc20['push'](_0x45cc20['shift']());}catch(_0x6bc262){_0x45cc20['push'](_0x45cc20['shift']());}}}(a32_0x5853,0x368be));import{BaseCommand}from'./command.js';function a32_0x1a4d(_0x40ad4f,_0x34cdad){const _0x5853c3=a32_0x5853();return a32_0x1a4d=function(_0x1a4d98,_0x26fba9){_0x1a4d98=_0x1a4d98-0x11f;let _0x990dd6=_0x5853c3[_0x1a4d98];return _0x990dd6;},a32_0x1a4d(_0x40ad4f,_0x34cdad);}import{SDKError}from'../sdk/index.js';function a32_0x5853(){const _0x8df7b2=['length','\x20\x20Cause:\x20','Limit:\x20','Querying\x20','name','query','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','34xNoMKv','table','Error:\x20','554472BjOmfk','error','Show\x20table\x20contents','\x20from\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','showTable','1381562MptJlT','limit','860984LrtjuJ','validate','args','message','5442255rxqaHp','Usage:\x20tdx\x20show\x20<database.table>','104843CxHDlE','Table:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','catalog','data','16wFkEfH','cause','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','39909zzLbgP','verbose','site','✔\x20Retrieved\x20','Catalog:\x20','2077535eFkXEb','Site:\x20','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','...','database'];a32_0x5853=function(){return _0x8df7b2;};return a32_0x5853();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a32_0x46eb0e(0x145)]='show';['description']=a32_0x46eb0e(0x123);async['execute'](_0x7c1b60){const _0x7a88f=a32_0x46eb0e;return this[_0x7a88f(0x126)](_0x7c1b60);}async[a32_0x46eb0e(0x126)](_0x17600a){const _0x5f0966=a32_0x46eb0e,{options:_0x428a1b,args:_0x2ece18,tdx:_0x2f3556}=_0x17600a;let _0x4e652e;try{_0x4e652e=parseTableReference(_0x2ece18[0x0]);const _0x5755a6=_0x428a1b[_0x5f0966(0x140)];!_0x4e652e[_0x5f0966(0x140)]&&_0x5755a6&&(_0x4e652e[_0x5f0966(0x140)]=_0x5755a6);const _0x3e02ac=validateTableDescribeReference(_0x4e652e);if(_0x3e02ac)return console[_0x5f0966(0x122)]('Error:\x20'+_0x3e02ac),console['error'](_0x5f0966(0x12e)),console[_0x5f0966(0x122)](_0x5f0966(0x147)),console[_0x5f0966(0x122)](_0x5f0966(0x131)),0x1;}catch(_0x1568a9){return console['error'](_0x5f0966(0x120)+_0x1568a9[_0x5f0966(0x12c)]),console[_0x5f0966(0x122)](_0x5f0966(0x12e)),console[_0x5f0966(0x122)](_0x5f0966(0x147)),console[_0x5f0966(0x122)](_0x5f0966(0x131)),0x1;}const _0x556c79=_0x4e652e[_0x5f0966(0x132)],_0x5cd72b=_0x4e652e[_0x5f0966(0x140)],_0x356965=_0x4e652e[_0x5f0966(0x11f)],_0x37d605=resolveLimit(_0x428a1b[_0x5f0966(0x128)],DEFAULT_DISPLAY_LIMIT);try{_0x428a1b['verbose']&&(console[_0x5f0966(0x122)](_0x5f0966(0x13d)+_0x428a1b[_0x5f0966(0x139)]),_0x556c79&&console['error'](_0x5f0966(0x13b)+_0x556c79),console[_0x5f0966(0x122)]('Database:\x20'+_0x5cd72b),console[_0x5f0966(0x122)](_0x5f0966(0x130)+_0x356965),console[_0x5f0966(0x122)](_0x5f0966(0x143)+_0x37d605));const _0xecfe7e=_0x556c79?_0x556c79+'.'+_0x5cd72b+'.'+_0x356965:_0x5cd72b+'.'+_0x356965,_0x4e9a61=await withSpinner(_0x5f0966(0x144)+_0xecfe7e+_0x5f0966(0x13f),()=>_0x2f3556[_0x5f0966(0x146)][_0x5f0966(0x126)](_0x5cd72b,_0x356965,_0x37d605,_0x556c79),{'verbose':_0x428a1b[_0x5f0966(0x138)]}),_0x27cff4=_0x4e9a61[_0x5f0966(0x133)],_0x49b7a9=_0x27cff4[_0x5f0966(0x133)];return _0x49b7a9['length']===0x0?console[_0x5f0966(0x122)](_0x5f0966(0x125)):console[_0x5f0966(0x122)](_0x5f0966(0x13a)+_0x49b7a9['length']+'\x20row'+(_0x49b7a9[_0x5f0966(0x141)]!==0x1?'s':'')+_0x5f0966(0x124)+_0xecfe7e),await handleSDKOutput(_0x49b7a9,_0x428a1b),0x0;}catch(_0x211af2){if(_0x211af2 instanceof SDKError)return console[_0x5f0966(0x122)]('Error:\x20'+_0x211af2[_0x5f0966(0x12c)]),_0x211af2['cause']&&console[_0x5f0966(0x122)](_0x5f0966(0x142)+_0x211af2[_0x5f0966(0x135)]),0x1;throw _0x211af2;}}[a32_0x46eb0e(0x12a)](_0x72e254){const _0x572837=a32_0x46eb0e;if(_0x72e254[_0x572837(0x12b)]['length']===0x0)return _0x572837(0x136);if(_0x72e254['args'][_0x572837(0x141)]>0x1)return _0x572837(0x13e);return undefined;}}
|
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x5b9b7b=a33_0x18d8;function a33_0x8550(){const _0x26de10=['\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','1031217STmtgp','Database:\x20','✔\x20Found\x20','error','\x27\x20across\x20all\x20databases.','Or\x20use\x20--in\x20flag:','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','validate','6ObgCNU','Error:\x20','name','database','Table\x20pattern:\x20','query','50880kBkSCH','verbose','483556vdfNjf','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','63vRIhlX','\x27\x20is\x20ambiguous.','Database:\x20all','Database\x20\x27','242568wFFVcN','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','128469qCDRsu','tables','description','execute','719411lUURTR','Note:\x20\x27','.*\x22','table','cause','1382064BudLSv','length','includes','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','data','site','message','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','✖\x20No\x20tables\x20found','Site:\x20','Database\x20pattern:\x20'];a33_0x8550=function(){return _0x26de10;};return a33_0x8550();}(function(_0x5ec1f9,_0xd1b881){const _0x3e048a=a33_0x18d8,_0x40e3e7=_0x5ec1f9();while(!![]){try{const _0x53b230=parseInt(_0x3e048a(0x13e))/0x1+-parseInt(_0x3e048a(0x135))/0x2+-parseInt(_0x3e048a(0x125))/0x3+parseInt(_0x3e048a(0x147))/0x4+parseInt(_0x3e048a(0x133))/0x5*(-parseInt(_0x3e048a(0x12d))/0x6)+parseInt(_0x3e048a(0x142))/0x7+-parseInt(_0x3e048a(0x13b))/0x8*(-parseInt(_0x3e048a(0x137))/0x9);if(_0x53b230===_0xd1b881)break;else _0x40e3e7['push'](_0x40e3e7['shift']());}catch(_0xa3932c){_0x40e3e7['push'](_0x40e3e7['shift']());}}}(a33_0x8550,0x2f320));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';function a33_0x18d8(_0x26f590,_0x59a023){const _0x855063=a33_0x8550();return a33_0x18d8=function(_0x18d81c,_0x3c0c35){_0x18d81c=_0x18d81c-0x11e;let _0x4bcdc2=_0x855063[_0x18d81c];return _0x4bcdc2;},a33_0x18d8(_0x26f590,_0x59a023);}export class TablesCommand extends BaseCommand{[a33_0x5b9b7b(0x12f)]=a33_0x5b9b7b(0x13f);[a33_0x5b9b7b(0x140)]='List\x20tables\x20in\x20a\x20database';async[a33_0x5b9b7b(0x141)](_0x246d69){const _0x380b6e=a33_0x5b9b7b,{options:_0x3bbc2a,args:_0x1e0ce5,tdx:_0xbec6b0}=_0x246d69;let _0x328ca7;if(_0x1e0ce5[_0x380b6e(0x148)]===0x0)_0x328ca7={'database':undefined,'table':undefined,'original':''};else{if(_0x1e0ce5[_0x380b6e(0x148)]===0x1)try{_0x328ca7=parseTableReference(_0x1e0ce5[0x0]);if(_0x328ca7[_0x380b6e(0x145)]&&!_0x328ca7[_0x380b6e(0x130)]&&!_0x328ca7[_0x380b6e(0x145)][_0x380b6e(0x149)]('*')&&!_0x328ca7[_0x380b6e(0x145)][_0x380b6e(0x149)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x1e0ce5[0x0]+_0x380b6e(0x138)),console[_0x380b6e(0x128)](_0x380b6e(0x14a)+_0x328ca7[_0x380b6e(0x145)]+'\x27?'),console['error'](_0x380b6e(0x13c)+_0x328ca7[_0x380b6e(0x145)]+_0x380b6e(0x144)),console[_0x380b6e(0x128)](_0x380b6e(0x13d)+_0x328ca7[_0x380b6e(0x145)]),console[_0x380b6e(0x128)](_0x380b6e(0x136)+_0x328ca7['table']),console[_0x380b6e(0x128)](''),console[_0x380b6e(0x128)](_0x380b6e(0x143)+_0x1e0ce5[0x0]+_0x380b6e(0x12b)+_0x328ca7['table']+_0x380b6e(0x129)),0x1;}catch(_0x5bc60f){return console[_0x380b6e(0x128)]('Error:\x20'+_0x5bc60f[_0x380b6e(0x11f)]),0x1;}else return console[_0x380b6e(0x128)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x380b6e(0x128)](_0x380b6e(0x124)),console[_0x380b6e(0x128)](_0x380b6e(0x120)),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x380b6e(0x12a)),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0xbe853f=_0x3bbc2a[_0x380b6e(0x130)];!_0x328ca7['database']&&_0xbe853f&&(_0x328ca7[_0x380b6e(0x130)]=_0xbe853f);try{const _0xdff1fe=_0x3dc05c=>_0x3dc05c&&(_0x3dc05c[_0x380b6e(0x149)]('*')||_0x3dc05c[_0x380b6e(0x149)]('?')),_0x441cd0=_0xdff1fe(_0x328ca7[_0x380b6e(0x130)]);_0x3bbc2a[_0x380b6e(0x134)]&&(console[_0x380b6e(0x128)](_0x380b6e(0x122)+_0x3bbc2a[_0x380b6e(0x11e)]),_0x328ca7[_0x380b6e(0x130)]?_0x441cd0?console[_0x380b6e(0x128)](_0x380b6e(0x123)+_0x328ca7[_0x380b6e(0x130)]):console['error'](_0x380b6e(0x126)+_0x328ca7[_0x380b6e(0x130)]):console[_0x380b6e(0x128)](_0x380b6e(0x139)),_0x328ca7[_0x380b6e(0x145)]&&console['error'](_0x380b6e(0x131)+_0x328ca7[_0x380b6e(0x145)]));const _0x20fd12=_0x328ca7['database']&&!_0x441cd0?_0x328ca7[_0x380b6e(0x130)]:undefined,_0xd09209=_0x441cd0?_0x328ca7[_0x380b6e(0x130)]:undefined,_0x4a1e9f=_0x328ca7[_0x380b6e(0x145)],_0x47dd5c=resolveLimit(_0x3bbc2a['limit'],DEFAULT_LISTING_LIMIT),_0x6a62f5=await withSpinner('Listing\x20tables...',()=>_0xbec6b0[_0x380b6e(0x132)]['listTables'](_0x20fd12,_0x4a1e9f,_0xd09209,_0x47dd5c),{'verbose':_0x3bbc2a[_0x380b6e(0x134)]}),_0xa7bdd0=_0x6a62f5[_0x380b6e(0x14b)];if(_0xa7bdd0[_0x380b6e(0x148)]===0x0&&_0x328ca7['database']&&!_0x441cd0)return console['error'](_0x380b6e(0x121)),console[_0x380b6e(0x128)](_0x380b6e(0x13a)+_0x328ca7[_0x380b6e(0x130)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x380b6e(0x128)](_0x380b6e(0x127)+_0xa7bdd0[_0x380b6e(0x148)]+'\x20table'+(_0xa7bdd0[_0x380b6e(0x148)]!==0x1?'s':'')),await handleSDKOutput(_0xa7bdd0,{..._0x3bbc2a,'limit':_0x47dd5c}),0x0;}catch(_0x78befa){if(_0x78befa instanceof SDKError)return console['error'](_0x380b6e(0x12e)+_0x78befa[_0x380b6e(0x11f)]),_0x78befa[_0x380b6e(0x146)]&&console[_0x380b6e(0x128)]('\x20\x20Cause:\x20'+_0x78befa[_0x380b6e(0x146)]),0x1;throw _0x78befa;}}[a33_0x5b9b7b(0x12c)](_0x491898){return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-command.d.ts","sourceRoot":"","sources":["../../src/commands/use-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"use-command.d.ts","sourceRoot":"","sources":["../../src/commands/use-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAIhE,qBAAa,UAAW,SAAQ,WAAW;IACzC,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,WAAW,+BAA+B;IAEnD,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS;IA6BzD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAiExD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x32ce9d=a34_0x1a64;(function(_0x5ffe8e,_0x289c29){const _0x267e52=a34_0x1a64,_0x199e60=_0x5ffe8e();while(!![]){try{const _0x444d0b=-parseInt(_0x267e52(0x134))/0x1*(-parseInt(_0x267e52(0x12d))/0x2)+parseInt(_0x267e52(0x122))/0x3+parseInt(_0x267e52(0x11f))/0x4*(-parseInt(_0x267e52(0x110))/0x5)+-parseInt(_0x267e52(0x129))/0x6*(parseInt(_0x267e52(0x11c))/0x7)+-parseInt(_0x267e52(0x113))/0x8+parseInt(_0x267e52(0x111))/0x9*(parseInt(_0x267e52(0x120))/0xa)+-parseInt(_0x267e52(0x126))/0xb*(-parseInt(_0x267e52(0x130))/0xc);if(_0x444d0b===_0x289c29)break;else _0x199e60['push'](_0x199e60['shift']());}catch(_0x5ed447){_0x199e60['push'](_0x199e60['shift']());}}}(a34_0x2de0,0x9dd9b));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a34_0x1a64(_0x366c60,_0xcb2cd3){const _0x2de04c=a34_0x2de0();return a34_0x1a64=function(_0x1a64e6,_0x21f3fc){_0x1a64e6=_0x1a64e6-0x10e;let _0x15a9b3=_0x2de04c[_0x1a64e6];return _0x15a9b3;},a34_0x1a64(_0x366c60,_0xcb2cd3);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']='use';[a34_0x32ce9d(0x132)]=a34_0x32ce9d(0x116);[a34_0x32ce9d(0x12a)](_0x45161f){const _0x3816ad=a34_0x32ce9d,{args:_0x53054b}=_0x45161f;if(_0x53054b['length']<0x2)return _0x3816ad(0x11e)+_0x3816ad(0x127)+_0x3816ad(0x11a)+_0x3816ad(0x12c);const _0x21f7db=_0x53054b[0x0],_0x5236e9=[_0x3816ad(0x125),_0x3816ad(0x117),_0x3816ad(0x112),_0x3816ad(0x131),_0x3816ad(0x118)];if(!_0x5236e9[_0x3816ad(0x124)](_0x21f7db))return'Invalid\x20resource:\x20'+_0x21f7db+_0x3816ad(0x133)+_0x5236e9[_0x3816ad(0x115)](',\x20');return undefined;}async[a34_0x32ce9d(0x135)](_0x57be73){const _0x4a226e=a34_0x32ce9d,{args:_0x21b640,options:_0x2ba6b9}=_0x57be73;try{const _0x3f8b3e=_0x21b640[0x0],_0x3b247b=_0x21b640[0x1];if(_0x3f8b3e===_0x4a226e(0x131)){if(!profileExists(_0x3b247b))return console[_0x4a226e(0x12e)](_0x4a226e(0x12f)+_0x3b247b+_0x4a226e(0x123)),console[_0x4a226e(0x12e)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x113b4d=_0x2ba6b9[_0x4a226e(0x121)]||getCurrentSessionPID()[_0x4a226e(0x12b)]();return saveSessionContext({'profile':_0x3b247b},_0x2ba6b9[_0x4a226e(0x121)]),console[_0x4a226e(0x10e)](_0x4a226e(0x119)+_0x3b247b+_0x4a226e(0x114)+_0x113b4d+')'),console['log'](_0x4a226e(0x11d)),0x0;}const _0x5703ec={},_0x4c64c7=_0x2ba6b9[_0x4a226e(0x121)]||getCurrentSessionPID()[_0x4a226e(0x12b)]();switch(_0x3f8b3e){case _0x4a226e(0x125):_0x5703ec['database']=_0x3b247b,console['log']('Session\x20database\x20set\x20to:\x20'+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;case _0x4a226e(0x117):_0x5703ec['parent_segment']=_0x3b247b,console['log'](_0x4a226e(0x128)+_0x3b247b+_0x4a226e(0x114)+_0x4c64c7+')');break;case _0x4a226e(0x112):_0x5703ec[_0x4a226e(0x112)]=_0x3b247b,console[_0x4a226e(0x10e)]('Session\x20llm_project\x20set\x20to:\x20'+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;case _0x4a226e(0x118):_0x5703ec[_0x4a226e(0x118)]=_0x3b247b,console[_0x4a226e(0x10e)](_0x4a226e(0x10f)+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;}return saveSessionContext(_0x5703ec,_0x2ba6b9[_0x4a226e(0x121)]),console[_0x4a226e(0x10e)](_0x4a226e(0x11d)),0x0;}catch(_0x39d5ac){return _0x39d5ac instanceof Error&&console[_0x4a226e(0x12e)](_0x4a226e(0x11b)+_0x39d5ac['message']),0x1;}}}function a34_0x2de0(){const _0x3e73e3=['Error:\x20Profile\x20\x27','37788BIMdWl','profile','description','.\x20Must\x20be\x20one\x20of:\x20','442324lOgKzO','execute','log','Session\x20engage_workspace\x20set\x20to:\x20','365nLszFh','4203VugKYX','llm_project','9465896wdNwaU','\x20(session:\x20','join','Set\x20session-level\x20context','parent_segment','engage_workspace','Session\x20profile\x20set\x20to:\x20','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Error:\x20','175tgqyoo','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','11596lashdD','12290CgIsuW','session','1161105ExCnWT','\x27\x20does\x20not\x20exist','includes','database','5027oeXAXR','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Session\x20parent_segment\x20set\x20to:\x20','298392OFJdDK','validate','toString','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','4FHUGUG','error'];a34_0x2de0=function(){return _0x3e73e3;};return a34_0x2de0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-command.js","sourceRoot":"","sources":["../../src/commands/use-command.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"use-command.js","sourceRoot":"","sources":["../../src/commands/use-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAuB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,OAAO,UAAW,SAAQ,WAAW;IAChC,IAAI,GAAG,KAAK,CAAC;IACb,WAAW,GAAG,2BAA2B,CAAC;IAEzC,QAAQ,CAAC,OAAuB;QACxC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAEzB,kCAAkC;QAClC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,OAAO,CACL,qCAAqC;gBACrC,6DAA6D;gBAC7D,wDAAwD;gBACxD,yCAAyC,CAC1C,CAAC;QACJ,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,cAAc,GAAG;YACrB,UAAU;YACV,gBAAgB;YAChB,aAAa;YACb,SAAS;YACT,kBAAkB;SACnB,CAAC;QAEF,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,OAAO,qBAAqB,QAAQ,qBAAqB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACvF,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAuB;QACnC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAElC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAEtB,oEAAoE;YACpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,0BAA0B;gBAC1B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC1B,OAAO,CAAC,KAAK,CAAC,mBAAmB,KAAK,kBAAkB,CAAC,CAAC;oBAC1D,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;oBAChE,OAAO,CAAC,CAAC;gBACX,CAAC;gBAED,8BAA8B;gBAC9B,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,IAAI,oBAAoB,EAAE,CAAC,QAAQ,EAAE,CAAC;gBACvE,kBAAkB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;gBAExD,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,cAAc,SAAS,GAAG,CAAC,CAAC;gBACxE,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;gBAC3E,OAAO,CAAC,CAAC;YACX,CAAC;YAED,8CAA8C;YAC9C,MAAM,aAAa,GAA2B,EAAE,CAAC;YACjD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,IAAI,oBAAoB,EAAE,CAAC,QAAQ,EAAE,CAAC;YAEvE,QAAQ,QAAQ,EAAE,CAAC;gBACjB,KAAK,UAAU;oBACb,aAAa,CAAC,QAAQ,GAAG,KAAK,CAAC;oBAC/B,OAAO,CAAC,GAAG,CAAC,4BAA4B,KAAK,cAAc,SAAS,GAAG,CAAC,CAAC;oBACzE,MAAM;gBAER,KAAK,gBAAgB;oBACnB,aAAa,CAAC,cAAc,GAAG,KAAK,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,kCAAkC,KAAK,cAAc,SAAS,GAAG,CAAC,CAAC;oBAC/E,MAAM;gBAER,KAAK,aAAa;oBAChB,aAAa,CAAC,WAAW,GAAG,KAAK,CAAC;oBAClC,OAAO,CAAC,GAAG,CAAC,+BAA+B,KAAK,cAAc,SAAS,GAAG,CAAC,CAAC;oBAC5E,MAAM;gBAER,KAAK,kBAAkB;oBACrB,aAAa,CAAC,gBAAgB,GAAG,KAAK,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,oCAAoC,KAAK,cAAc,SAAS,GAAG,CAAC,CAAC;oBACjF,MAAM;YACV,CAAC;YAED,kBAAkB;YAClB,kBAAkB,CAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAEnD,0BAA0B;YAC1B,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;YAE3E,OAAO,CAAC,CAAC;QACX,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x3cf62c=a35_0x2913;(function(_0x5322d4,_0x538645){const _0x4d7b0b=a35_0x2913,_0x202953=_0x5322d4();while(!![]){try{const _0x5135aa=parseInt(_0x4d7b0b(0x224))/0x1*(parseInt(_0x4d7b0b(0x286))/0x2)+-parseInt(_0x4d7b0b(0x1f1))/0x3*(parseInt(_0x4d7b0b(0x1fa))/0x4)+-parseInt(_0x4d7b0b(0x1d9))/0x5*(parseInt(_0x4d7b0b(0x254))/0x6)+-parseInt(_0x4d7b0b(0x1ff))/0x7*(-parseInt(_0x4d7b0b(0x25f))/0x8)+-parseInt(_0x4d7b0b(0x1d8))/0x9*(-parseInt(_0x4d7b0b(0x21a))/0xa)+-parseInt(_0x4d7b0b(0x21f))/0xb*(parseInt(_0x4d7b0b(0x289))/0xc)+parseInt(_0x4d7b0b(0x27b))/0xd;if(_0x5135aa===_0x538645)break;else _0x202953['push'](_0x202953['shift']());}catch(_0x1f2416){_0x202953['push'](_0x202953['shift']());}}}(a35_0x4653,0x3b284));function a35_0x4653(){const _0x2ba9d7=['keys','\x20project','Resume\x20from:\x20','Retrying\x20session...','readFile','✔\x20Found\x20','Error:\x20Workflow\x20identifier\x20is\x20required','328EfxdOS','Listing\x20workflows...','\x20workflow','Revision:\x20','status','2576rEUgGX','logs','List\x20workflow\x20execution\x20sessions','running','Listing\x20workflow\x20projects...','round','map','✔\x20Pushed\x20','sessionId','Show\x20logs\x20for\x20a\x20workflow\x20attempt','kill','createdAt','List\x20all\x20workflow\x20projects','workflow:kill','Project\x20filter:\x20','success','skipValidation','isDirectory','projects','Start\x20a\x20workflow\x20run','workflows','attempt','Select\x20a\x20task\x20to\x20view\x20logs:','\x20\x20Location:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Fetching\x20log\x20files...','246550mYjxCS','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','cause','length','Params:\x20','59939vaGegn','Error:\x20Project\x20name\x20is\x20required','Task\x20name:\x20','includeSubtasks','Expected\x20format:\x20--param\x20key=value','2osCibp','\x20\x20Revision:\x20','run','task','execute','Getting\x20attempt\x20tasks...','Error:\x20Invalid\x20JSON\x20in\x20--params','✔\x20Retry\x20started','projectId','stringify','sessionTime','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Cancelled','\x20\x20Attempt\x20ID:\x20','Kill\x20a\x20running\x20attempt','attempt:','index','Killing\x20attempt...','\x20\x20Workflow:\x20','retrySession','push','Status:\x20','Filter:\x20','\x20\x20Cause:\x20','workflow:retry','cancelRequested','stat','workflow:attempt','includeRetried','utf-8','logFiles','\x20\x20Session\x20ID:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','name','attemptId','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflow','Target:\x20','retryAttemptName','Project\x20directory:\x20','session:','Error:\x20Attempt\x20ID\x20is\x20required','indexOf','\x20attempt','error','workflow:delete','Workflow:\x20','Getting\x20attempt\x20details...','6906godWVT','select','✔\x20Downloaded\x20','done','\x22?\x20This\x20cannot\x20be\x20undone.','Starting\x20workflow\x20run...','taskName','\x20\x20Project:\x20','workflow:run','Filter:\x20project=','project','344HziDER','Include\x20retried:\x20yes','List\x20workflows','download','getTime','startsWith','params','split','Error:\x20Invalid\x20parameter\x20format:\x20','verbose','Parameters:\x20','Reason:\x20','From\x20task:\x20','fromTask','Error:\x20','json','parse','workflow:attempts','Downloading\x20logs...','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','message','retryAttempt','finishedAt','workflow:workflows','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Workflow\x20run\x20started','projectName','\x20task','8060299mYTpFQ','Show\x20specific\x20attempt\x20details','delete','workflow:tasks','Session\x20time:\x20','\x20is\x20not\x20a\x20directory','Attempt\x20ID:\x20','session','Project\x20name:\x20','data','Validation:\x20skipped','133954BTMndw','description','filesExtracted','960qeBexE','Deleting\x20project\x20','72ADcYCo','835bapDdZ','yes','revision','limit','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflow:sessions','substring','Listing\x20workflow\x20sessions...','fileSize','from','workflow:projects','\x20\x20Project\x20ID:\x20','Show\x20tasks\x20for\x20an\x20attempt','Project:\x20','isArray','reason','...','fs/promises','attempts','Force:\x20yes','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Files\x20extracted:\x20','workflow:push','workflow:download','3534mQWywA','Output\x20directory:\x20'];a35_0x4653=function(){return _0x2ba9d7;};return a35_0x4653();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a35_0xc912cc from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x1e3);['description']=a35_0x3cf62c(0x20b);async[a35_0x3cf62c(0x228)](_0x26f315){const _0x5d38bf=a35_0x3cf62c,{options:_0x4bdf19,args:_0xb6efd,tdx:_0x5771f6}=_0x26f315,_0xb585=_0xb6efd[0x0];try{_0x4bdf19[_0x5d38bf(0x268)]&&_0xb585&&console[_0x5d38bf(0x250)]('Pattern:\x20'+_0xb585);const _0x30798a=await withSpinner(_0x5d38bf(0x203),()=>_0x5771f6[_0x5d38bf(0x248)][_0x5d38bf(0x211)](_0xb585,{'limit':_0x4bdf19[_0x5d38bf(0x1dc)]}),{'verbose':_0x4bdf19[_0x5d38bf(0x268)]}),_0x22c1c2=_0x30798a['data'];return console[_0x5d38bf(0x250)](_0x5d38bf(0x1f8)+_0x22c1c2[_0x5d38bf(0x21d)]+_0x5d38bf(0x1f4)+(_0x22c1c2[_0x5d38bf(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x22c1c2,_0x4bdf19),0x0;}catch(_0x2e4e36){if(_0x2e4e36 instanceof SDKError)return console[_0x5d38bf(0x250)](_0x5d38bf(0x26d)+_0x2e4e36['message']),_0x2e4e36[_0x5d38bf(0x21c)]&&console[_0x5d38bf(0x250)](_0x5d38bf(0x23b)+_0x2e4e36[_0x5d38bf(0x21c)]),0x1;throw _0x2e4e36;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a35_0x3cf62c(0x276);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x261);async[a35_0x3cf62c(0x228)](_0x3840a6){const _0x50503a=a35_0x3cf62c,{options:_0x1532fc,args:_0x470778,tdx:_0x740225}=_0x3840a6,_0x3f6a76=_0x470778[0x0];try{_0x1532fc['verbose']&&_0x3f6a76&&console[_0x50503a(0x250)](_0x50503a(0x20d)+_0x3f6a76);const _0x44f216=await withSpinner(_0x50503a(0x1fb),()=>_0x740225['workflow'][_0x50503a(0x213)](_0x3f6a76,{'limit':_0x1532fc[_0x50503a(0x1dc)]}),{'verbose':_0x1532fc[_0x50503a(0x268)]}),_0x454102=_0x44f216[_0x50503a(0x284)];return console[_0x50503a(0x250)](_0x50503a(0x1f8)+_0x454102[_0x50503a(0x21d)]+_0x50503a(0x1fc)+(_0x454102[_0x50503a(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x454102,_0x1532fc),0x0;}catch(_0x2e5bdd){if(_0x2e5bdd instanceof SDKError)return console[_0x50503a(0x250)](_0x50503a(0x26d)+_0x2e5bdd[_0x50503a(0x273)]),_0x2e5bdd['cause']&&console[_0x50503a(0x250)]('\x20\x20Cause:\x20'+_0x2e5bdd['cause']),0x1;throw _0x2e5bdd;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a35_0x3cf62c(0x1de);['description']=a35_0x3cf62c(0x201);async[a35_0x3cf62c(0x228)](_0x547412){const _0x18e464=a35_0x3cf62c,{options:_0x1023b7,args:_0x4670f1,tdx:_0x58c606}=_0x547412;let _0x53433,_0x3c4a4e;if(_0x4670f1[0x0]){const _0x2d85af=_0x4670f1[0x0][_0x18e464(0x266)]('.');if(_0x2d85af[_0x18e464(0x21d)]===0x1)_0x53433=_0x2d85af[0x0];else{if(_0x2d85af[_0x18e464(0x21d)]===0x2)[_0x53433,_0x3c4a4e]=_0x2d85af;else return console[_0x18e464(0x250)](_0x18e464(0x1dd)),0x1;}}try{if(_0x1023b7[_0x18e464(0x268)]){if(_0x53433&&_0x3c4a4e)console[_0x18e464(0x250)](_0x18e464(0x23a)+_0x53433+'.'+_0x3c4a4e);else _0x53433&&console[_0x18e464(0x250)](_0x18e464(0x25d)+_0x53433);const _0x21b76a=_0x1023b7[_0x18e464(0x1fe)];_0x21b76a&&console[_0x18e464(0x250)](_0x18e464(0x239)+_0x21b76a);}const _0x5b9b6f=await withSpinner(_0x18e464(0x1e0),()=>_0x58c606[_0x18e464(0x248)]['sessions']({'projectName':_0x53433,'workflowName':_0x3c4a4e,'status':_0x1023b7[_0x18e464(0x1fe)],'fromTime':_0x1023b7[_0x18e464(0x1e2)],'toTime':_0x1023b7['to'],'limit':_0x1023b7['limit']}),{'verbose':_0x1023b7[_0x18e464(0x268)]}),_0x52cf80=_0x5b9b6f[_0x18e464(0x284)];return console['error'](_0x18e464(0x1f8)+_0x52cf80[_0x18e464(0x21d)]+'\x20session'+(_0x52cf80['length']!==0x1?'s':'')),await handleSDKOutput(_0x52cf80,_0x1023b7),0x0;}catch(_0x55d834){if(_0x55d834 instanceof SDKError)return console[_0x18e464(0x250)](_0x18e464(0x26d)+_0x55d834[_0x18e464(0x273)]),_0x55d834['cause']&&console[_0x18e464(0x250)]('\x20\x20Cause:\x20'+_0x55d834[_0x18e464(0x21c)]),0x1;throw _0x55d834;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x270);[a35_0x3cf62c(0x287)]='List\x20workflow\x20attempts';async['execute'](_0x37f712){const _0x3422e8=a35_0x3cf62c,{options:_0x296c35,args:_0x45250e,tdx:_0x37a30a}=_0x37f712;let _0x816204,_0x24aa24;if(_0x45250e[0x0]){const _0x502ad3=_0x45250e[0x0][_0x3422e8(0x266)]('.');if(_0x502ad3[_0x3422e8(0x21d)]===0x1)_0x816204=_0x502ad3[0x0];else{if(_0x502ad3['length']===0x2)[_0x816204,_0x24aa24]=_0x502ad3;else return console[_0x3422e8(0x250)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x7bfd49=_0x296c35[_0x3422e8(0x240)];if(_0x296c35[_0x3422e8(0x268)]){if(_0x816204&&_0x24aa24)console[_0x3422e8(0x250)](_0x3422e8(0x23a)+_0x816204+'.'+_0x24aa24);else _0x816204&&console[_0x3422e8(0x250)](_0x3422e8(0x25d)+_0x816204);_0x7bfd49&&console[_0x3422e8(0x250)](_0x3422e8(0x260));}const _0x2f7118=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x37a30a[_0x3422e8(0x248)][_0x3422e8(0x1eb)]({'projectName':_0x816204,'workflowName':_0x24aa24,'includeRetried':_0x7bfd49,'limit':_0x296c35[_0x3422e8(0x1dc)]}),{'verbose':_0x296c35[_0x3422e8(0x268)]}),_0x4c8f0b=_0x2f7118['data'];return console[_0x3422e8(0x250)]('✔\x20Found\x20'+_0x4c8f0b[_0x3422e8(0x21d)]+_0x3422e8(0x24f)+(_0x4c8f0b[_0x3422e8(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x4c8f0b,_0x296c35),0x0;}catch(_0x16f1ea){if(_0x16f1ea instanceof SDKError)return console[_0x3422e8(0x250)]('Error:\x20'+_0x16f1ea['message']),_0x16f1ea[_0x3422e8(0x21c)]&&console['error']('\x20\x20Cause:\x20'+_0x16f1ea[_0x3422e8(0x21c)]),0x1;throw _0x16f1ea;}}}export class WorkflowAttemptCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x23f);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x27c);async['execute'](_0x151e8f){const _0x308eb4=a35_0x3cf62c,{options:_0x10b150,args:_0x5f1213,tdx:_0x907a27}=_0x151e8f,_0x211950=_0x5f1213[0x0];if(!_0x211950)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x10b150[_0x308eb4(0x268)]&&console[_0x308eb4(0x250)](_0x308eb4(0x281)+_0x211950);const _0x1630d7=await withSpinner(_0x308eb4(0x253),()=>_0x907a27[_0x308eb4(0x248)][_0x308eb4(0x214)](_0x211950),{'verbose':_0x10b150[_0x308eb4(0x268)]}),_0x4e3933=_0x1630d7[_0x308eb4(0x284)];let _0x11fa24;!_0x4e3933[_0x308eb4(0x257)]?_0x11fa24=_0x4e3933[_0x308eb4(0x23d)]?'canceling':_0x308eb4(0x202):_0x11fa24=_0x4e3933[_0x308eb4(0x20e)]?_0x308eb4(0x20e):_0x308eb4(0x250);let _0x30e8dc;if(_0x4e3933[_0x308eb4(0x20a)]&&_0x4e3933['finishedAt']){const _0x33e249=new Date(_0x4e3933[_0x308eb4(0x20a)])[_0x308eb4(0x263)](),_0x2d90d7=new Date(_0x4e3933[_0x308eb4(0x275)])[_0x308eb4(0x263)]();_0x30e8dc=Math[_0x308eb4(0x204)]((_0x2d90d7-_0x33e249)/0x3e8);}const _0x472b13={'attempt_id':_0x4e3933['id'],'status':_0x11fa24,..._0x4e3933[_0x308eb4(0x234)]!==undefined&&{'index':_0x4e3933[_0x308eb4(0x234)]},..._0x4e3933[_0x308eb4(0x25e)]&&{'project':_0x4e3933[_0x308eb4(0x25e)][_0x308eb4(0x245)]},..._0x4e3933[_0x308eb4(0x248)]&&{'workflow':_0x4e3933[_0x308eb4(0x248)]['name']},..._0x4e3933[_0x308eb4(0x207)]&&{'session_id':_0x4e3933[_0x308eb4(0x207)]},..._0x4e3933[_0x308eb4(0x22e)]&&{'session_time':_0x4e3933[_0x308eb4(0x22e)]},..._0x4e3933[_0x308eb4(0x24a)]&&{'retry_attempt':_0x4e3933[_0x308eb4(0x24a)]},..._0x30e8dc!==undefined&&{'duration_sec':_0x30e8dc},..._0x4e3933[_0x308eb4(0x20a)]&&{'created_at':_0x4e3933[_0x308eb4(0x20a)]},..._0x4e3933[_0x308eb4(0x275)]&&{'finished_at':_0x4e3933[_0x308eb4(0x275)]},...Object[_0x308eb4(0x1f3)](_0x4e3933[_0x308eb4(0x265)])[_0x308eb4(0x21d)]>0x0&&{'params':_0x4e3933[_0x308eb4(0x265)]}};return await handleSingleObjectOutput(_0x472b13,_0x10b150),0x0;}catch(_0x55ee96){if(_0x55ee96 instanceof SDKError)return console[_0x308eb4(0x250)](_0x308eb4(0x26d)+_0x55ee96['message']),_0x55ee96[_0x308eb4(0x21c)]&&console[_0x308eb4(0x250)](_0x308eb4(0x23b)+_0x55ee96['cause']),0x1;throw _0x55ee96;}}}export class WorkflowTasksCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x27e);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x1e5);async[a35_0x3cf62c(0x228)](_0x4484fc){const _0x54ca74=a35_0x3cf62c,{options:_0x3c01c8,args:_0x3340d6,tdx:_0x46bd50}=_0x4484fc,_0x5e9334=_0x3340d6[0x0];if(!_0x5e9334)return console[_0x54ca74(0x250)](_0x54ca74(0x24d)),0x1;try{const _0x8fb230=_0x3c01c8[_0x54ca74(0x222)];_0x3c01c8[_0x54ca74(0x268)]&&(console[_0x54ca74(0x250)](_0x54ca74(0x281)+_0x5e9334),_0x8fb230&&console['error']('Including\x20subtasks:\x20yes'));const _0x3dc63a=await withSpinner(_0x54ca74(0x229),()=>_0x46bd50[_0x54ca74(0x248)]['tasks'](_0x5e9334,_0x8fb230||![]),{'verbose':_0x3c01c8['verbose']}),_0x53c4fc=_0x3dc63a[_0x54ca74(0x284)];return console[_0x54ca74(0x250)]('✔\x20Found\x20'+_0x53c4fc[_0x54ca74(0x21d)]+_0x54ca74(0x27a)+(_0x53c4fc[_0x54ca74(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x53c4fc,_0x3c01c8),0x0;}catch(_0x3ebead){if(_0x3ebead instanceof SDKError)return console[_0x54ca74(0x250)](_0x54ca74(0x26d)+_0x3ebead[_0x54ca74(0x273)]),_0x3ebead[_0x54ca74(0x21c)]&&console[_0x54ca74(0x250)](_0x54ca74(0x23b)+_0x3ebead[_0x54ca74(0x21c)]),0x1;throw _0x3ebead;}}}export class WorkflowLogsCommand extends BaseCommand{[a35_0x3cf62c(0x245)]='workflow:logs';[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x208);async[a35_0x3cf62c(0x228)](_0xd03cd3){const _0x2b270a=a35_0x3cf62c,{options:_0x49763c,args:_0x185e71,tdx:_0x936d51}=_0xd03cd3,_0x14d876=_0x185e71[0x0];let _0x524794=_0x185e71[0x1];if(!_0x14d876)return console[_0x2b270a(0x250)](_0x2b270a(0x24d)),0x1;try{_0x49763c['verbose']&&(console[_0x2b270a(0x250)]('Attempt\x20ID:\x20'+_0x14d876),_0x524794&&console[_0x2b270a(0x250)](_0x2b270a(0x221)+_0x524794));const _0x1abc62=await withSpinner(_0x2b270a(0x219),()=>_0x936d51['workflow'][_0x2b270a(0x242)](_0x14d876,_0x524794),{'verbose':_0x49763c[_0x2b270a(0x268)]}),_0x45045d=_0x1abc62[_0x2b270a(0x284)];if(_0x45045d['length']===0x0)return console[_0x2b270a(0x250)](_0x2b270a(0x244)),0x0;if(!_0x524794&&(_0x49763c[_0x2b270a(0x26e)]||_0x49763c['format']))return await handleSDKOutput(_0x45045d,_0x49763c),0x0;if(!_0x524794){const _0x435497=_0x45045d[_0x2b270a(0x205)](_0x3c616f=>({'title':_0x3c616f[_0x2b270a(0x25a)]+'\x20('+formatBytes(_0x3c616f[_0x2b270a(0x1e1)])+')','value':_0x3c616f[_0x2b270a(0x25a)]})),_0x326be9=await a35_0xc912cc({'type':_0x2b270a(0x255),'name':_0x2b270a(0x227),'message':_0x2b270a(0x215),'choices':_0x435497});if(!_0x326be9[_0x2b270a(0x227)])return console['error'](_0x2b270a(0x230)),0x0;_0x524794=_0x326be9['task'];}const _0x50d916=await withSpinner(_0x2b270a(0x271),()=>_0x936d51[_0x2b270a(0x248)][_0x2b270a(0x200)](_0x14d876,_0x524794),{'verbose':_0x49763c[_0x2b270a(0x268)]}),_0x440185=_0x50d916[_0x2b270a(0x284)];return _0x440185?console['log'](_0x440185):console[_0x2b270a(0x250)]('No\x20log\x20content\x20found'),0x0;}catch(_0x497643){if(_0x497643 instanceof SDKError)return console[_0x2b270a(0x250)](_0x2b270a(0x26d)+_0x497643['message']),_0x497643['cause']&&console[_0x2b270a(0x250)](_0x2b270a(0x23b)+_0x497643[_0x2b270a(0x21c)]),0x1;throw _0x497643;}}}export class WorkflowKillCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x20c);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x232);async['execute'](_0x85f27a){const _0x303543=a35_0x3cf62c,{options:_0x520c47,args:_0x5e3681,tdx:_0x51db58}=_0x85f27a,_0x4aa3c4=_0x5e3681[0x0];if(!_0x4aa3c4)return console[_0x303543(0x250)](_0x303543(0x24d)),0x1;try{const _0x45563c=_0x520c47[_0x303543(0x1e8)];_0x520c47[_0x303543(0x268)]&&(console[_0x303543(0x250)]('Attempt\x20ID:\x20'+_0x4aa3c4),_0x45563c&&console['error'](_0x303543(0x26a)+_0x45563c));if(!_0x520c47[_0x303543(0x1da)]){const _0x3b327b=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4aa3c4+'?');if(!_0x3b327b)return console[_0x303543(0x250)]('Cancelled'),0x0;}const _0x4209d9=await withSpinner(_0x303543(0x235),()=>_0x51db58[_0x303543(0x248)][_0x303543(0x209)](_0x4aa3c4,_0x45563c),{'verbose':_0x520c47[_0x303543(0x268)]}),_0x44960e=_0x4209d9[_0x303543(0x284)];return console[_0x303543(0x250)]('✔\x20'+_0x44960e),0x0;}catch(_0xc572e7){if(_0xc572e7 instanceof SDKError)return console[_0x303543(0x250)](_0x303543(0x26d)+_0xc572e7['message']),_0xc572e7[_0x303543(0x21c)]&&console[_0x303543(0x250)](_0x303543(0x23b)+_0xc572e7[_0x303543(0x21c)]),0x1;throw _0xc572e7;}}}function a35_0x2913(_0x445a63,_0x391be5){const _0x4653c9=a35_0x4653();return a35_0x2913=function(_0x2913a8,_0x3b9cd2){_0x2913a8=_0x2913a8-0x1d7;let _0x45a29d=_0x4653c9[_0x2913a8];return _0x45a29d;},a35_0x2913(_0x445a63,_0x391be5);}export class WorkflowRetryCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x23c);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a35_0x3cf62c(0x228)](_0x1bb0df){const _0x3d7c68=a35_0x3cf62c,{options:_0x57e48f,args:_0x45d1bc,tdx:_0x148e69}=_0x1bb0df,_0x45168f=_0x45d1bc[0x0];if(!_0x45168f)return console[_0x3d7c68(0x250)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error'](_0x3d7c68(0x217)),0x1;let _0x257beb=![],_0x566ea2=_0x45168f;if(_0x45168f[_0x3d7c68(0x264)](_0x3d7c68(0x24c)))_0x257beb=!![],_0x566ea2=_0x45168f['substring'](0x8);else{if(_0x45168f[_0x3d7c68(0x264)](_0x3d7c68(0x233)))_0x257beb=![],_0x566ea2=_0x45168f[_0x3d7c68(0x1df)](0x8);else return console[_0x3d7c68(0x250)](_0x3d7c68(0x22f)),console[_0x3d7c68(0x250)](_0x3d7c68(0x217)),0x1;}try{const _0x122dbc=_0x57e48f[_0x3d7c68(0x26c)],_0x6624f8=_0x57e48f['resumeFrom'],_0x3ff2be=_0x57e48f[_0x3d7c68(0x265)],_0x2cf428=_0x57e48f['force'];_0x57e48f['verbose']&&(console['error'](_0x3d7c68(0x249)+(_0x257beb?_0x3d7c68(0x282):_0x3d7c68(0x214))+'\x20'+_0x566ea2),_0x122dbc&&console[_0x3d7c68(0x250)](_0x3d7c68(0x26b)+_0x122dbc),_0x6624f8&&console['error'](_0x3d7c68(0x1f5)+_0x6624f8),_0x3ff2be&&console[_0x3d7c68(0x250)](_0x3d7c68(0x21e)+_0x3ff2be),_0x2cf428&&console[_0x3d7c68(0x250)](_0x3d7c68(0x1ec)));let _0x5d4049;if(_0x3ff2be)try{if(_0x3ff2be[_0x3d7c68(0x264)]('@')){const _0xd166b6=await import(_0x3d7c68(0x1ea)),_0x36b491=_0x3ff2be[_0x3d7c68(0x1df)](0x1),_0x250a5c=await _0xd166b6[_0x3d7c68(0x1f7)](_0x36b491,_0x3d7c68(0x241));_0x5d4049=JSON[_0x3d7c68(0x26f)](_0x250a5c);}else _0x5d4049=JSON[_0x3d7c68(0x26f)](_0x3ff2be);}catch{return console[_0x3d7c68(0x250)](_0x3d7c68(0x22a)),0x1;}if(!_0x57e48f[_0x3d7c68(0x1da)]){const _0x82a213=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x257beb?_0x3d7c68(0x282):_0x3d7c68(0x214))+'\x20'+_0x566ea2+'?');if(!_0x82a213)return console['error'](_0x3d7c68(0x230)),0x0;}let _0x1c35ea;_0x257beb?_0x1c35ea=await withSpinner(_0x3d7c68(0x1f6),()=>_0x148e69[_0x3d7c68(0x248)][_0x3d7c68(0x237)](_0x566ea2,{'fromTask':_0x122dbc,'retryParams':_0x5d4049}),{'verbose':_0x57e48f[_0x3d7c68(0x268)]}):_0x1c35ea=await withSpinner('Retrying\x20attempt...',()=>_0x148e69['workflow'][_0x3d7c68(0x274)](_0x566ea2,{'resumeFrom':_0x6624f8,'retryParams':_0x5d4049,'force':_0x2cf428}),{'verbose':_0x57e48f[_0x3d7c68(0x268)]});const _0x452364=_0x1c35ea[_0x3d7c68(0x284)];return console[_0x3d7c68(0x250)](_0x3d7c68(0x22b)),console[_0x3d7c68(0x250)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x452364[_0x3d7c68(0x246)]),console['error'](_0x3d7c68(0x243)+_0x452364['sessionId']),0x0;}catch(_0x9746ee){if(_0x9746ee instanceof SDKError)return console[_0x3d7c68(0x250)]('Error:\x20'+_0x9746ee['message']),_0x9746ee['cause']&&console[_0x3d7c68(0x250)]('\x20\x20Cause:\x20'+_0x9746ee[_0x3d7c68(0x21c)]),0x1;throw _0x9746ee;}}}export class WorkflowRunCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x25c);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x212);async[a35_0x3cf62c(0x228)](_0x597ef0){const _0x16e7bc=a35_0x3cf62c,{options:_0x2266f8,args:_0x30fc9c,tdx:_0x1d9bc4}=_0x597ef0,_0x5c415b=_0x30fc9c[0x0];if(!_0x5c415b)return console[_0x16e7bc(0x250)](_0x16e7bc(0x1f9)),console[_0x16e7bc(0x250)]('Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]'),0x1;const _0x214223=_0x2266f8['param'],_0x920f6d=_0x2266f8[_0x16e7bc(0x22e)],_0xe78c02={};if(_0x214223&&Array[_0x16e7bc(0x1e7)](_0x214223))for(const _0x16b5ce of _0x214223){const _0x41d6ae=_0x16b5ce[_0x16e7bc(0x24e)]('=');if(_0x41d6ae===-0x1)return console[_0x16e7bc(0x250)](_0x16e7bc(0x267)+_0x16b5ce),console[_0x16e7bc(0x250)](_0x16e7bc(0x223)),0x1;const _0xcf02bc=_0x16b5ce[_0x16e7bc(0x1df)](0x0,_0x41d6ae),_0x277445=_0x16b5ce['substring'](_0x41d6ae+0x1);try{_0xe78c02[_0xcf02bc]=JSON[_0x16e7bc(0x26f)](_0x277445);}catch{_0xe78c02[_0xcf02bc]=_0x277445;}}_0x2266f8[_0x16e7bc(0x268)]&&(console[_0x16e7bc(0x250)](_0x16e7bc(0x252)+_0x5c415b),Object[_0x16e7bc(0x1f3)](_0xe78c02)[_0x16e7bc(0x21d)]>0x0&&console[_0x16e7bc(0x250)](_0x16e7bc(0x269)+JSON[_0x16e7bc(0x22d)](_0xe78c02)),_0x920f6d&&console[_0x16e7bc(0x250)](_0x16e7bc(0x27f)+_0x920f6d));const _0x1f5d8e=await withSpinner(_0x16e7bc(0x259),()=>_0x1d9bc4[_0x16e7bc(0x248)][_0x16e7bc(0x226)](_0x5c415b,_0xe78c02,{'sessionTime':_0x920f6d}),{'verbose':_0x2266f8['verbose']}),_0x4fc653=_0x1f5d8e[_0x16e7bc(0x284)];return console[_0x16e7bc(0x250)](_0x16e7bc(0x278)),console[_0x16e7bc(0x250)](_0x16e7bc(0x231)+_0x4fc653['id']),console[_0x16e7bc(0x250)]('\x20\x20Session\x20ID:\x20'+_0x4fc653[_0x16e7bc(0x207)]),console[_0x16e7bc(0x250)](_0x16e7bc(0x25b)+_0x4fc653[_0x16e7bc(0x25e)]?.[_0x16e7bc(0x245)]),console[_0x16e7bc(0x250)](_0x16e7bc(0x236)+_0x4fc653[_0x16e7bc(0x248)]?.[_0x16e7bc(0x245)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x1f0);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x272);async[a35_0x3cf62c(0x228)](_0x92a5d8){const _0x7c2447=a35_0x3cf62c,{options:_0x205ffa,args:_0x44ceb8,tdx:_0x312525}=_0x92a5d8,_0x8a69ca=_0x44ceb8[0x0],_0x3740d4=_0x44ceb8[0x1]||'.';if(!_0x8a69ca)return console[_0x7c2447(0x250)](_0x7c2447(0x220)),console[_0x7c2447(0x250)](_0x7c2447(0x247)),0x1;const _0x1ae417=_0x205ffa[_0x7c2447(0x1db)];_0x205ffa[_0x7c2447(0x268)]&&(console[_0x7c2447(0x250)]('Project:\x20'+_0x8a69ca),console['error'](_0x7c2447(0x1f2)+_0x3740d4),_0x1ae417&&console[_0x7c2447(0x250)]('Revision:\x20'+_0x1ae417));const _0x268d35=await withSpinner('Downloading\x20project\x20'+_0x8a69ca+_0x7c2447(0x1e9),()=>_0x312525[_0x7c2447(0x248)][_0x7c2447(0x262)](_0x8a69ca,_0x3740d4,{'revision':_0x1ae417}),{'verbose':_0x205ffa[_0x7c2447(0x268)]}),_0x233f3b=_0x268d35[_0x7c2447(0x284)];return console['error'](_0x7c2447(0x256)+_0x233f3b['projectName']),console[_0x7c2447(0x250)](_0x7c2447(0x225)+_0x233f3b[_0x7c2447(0x1db)]),console[_0x7c2447(0x250)](_0x7c2447(0x1ee)+_0x233f3b[_0x7c2447(0x288)]),console['error'](_0x7c2447(0x216)+_0x3740d4+'/'+_0x233f3b[_0x7c2447(0x279)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x1ef);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x21b);async[a35_0x3cf62c(0x228)](_0x52e892){const _0x195f9d=a35_0x3cf62c,{options:_0x1e8ff9,args:_0x2bef6c,tdx:_0x2a0c9b}=_0x52e892;let _0x1cbfdf='.',_0x27d6dc=_0x1e8ff9[_0x195f9d(0x245)];if(_0x2bef6c[0x0]){const {promises:_0x43d1a7}=await import('fs');try{const _0x5599ae=await _0x43d1a7[_0x195f9d(0x23e)](_0x2bef6c[0x0]);if(_0x5599ae[_0x195f9d(0x210)]())_0x1cbfdf=_0x2bef6c[0x0];else return console[_0x195f9d(0x250)](_0x195f9d(0x26d)+_0x2bef6c[0x0]+_0x195f9d(0x280)),0x1;}catch{_0x27d6dc=_0x2bef6c[0x0],_0x1cbfdf='.';}}const _0x38399f=_0x1e8ff9['revision'],_0x51e32e=_0x1e8ff9[_0x195f9d(0x20f)];_0x1e8ff9[_0x195f9d(0x268)]&&(console[_0x195f9d(0x250)](_0x195f9d(0x24b)+_0x1cbfdf),_0x27d6dc&&console[_0x195f9d(0x250)](_0x195f9d(0x283)+_0x27d6dc),_0x38399f&&console[_0x195f9d(0x250)](_0x195f9d(0x1fd)+_0x38399f),_0x51e32e&&console['error'](_0x195f9d(0x285)));const _0x5e2dd8=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x2a0c9b[_0x195f9d(0x248)][_0x195f9d(0x238)](_0x1cbfdf,{'projectName':_0x27d6dc,'revision':_0x38399f,'skipValidation':_0x51e32e}),{'verbose':_0x1e8ff9['verbose']}),_0x187a64=_0x5e2dd8[_0x195f9d(0x284)];return console[_0x195f9d(0x250)](_0x195f9d(0x206)+_0x187a64[_0x195f9d(0x279)]),console[_0x195f9d(0x250)](_0x195f9d(0x1e4)+_0x187a64[_0x195f9d(0x22c)]),console['error'](_0x195f9d(0x225)+_0x187a64[_0x195f9d(0x1db)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x251);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x277);async[a35_0x3cf62c(0x228)](_0x2b6c31){const _0x57e507=a35_0x3cf62c,{options:_0x51ddb0,args:_0x3ec870,tdx:_0x3e2176}=_0x2b6c31,_0x2ed3fe=_0x3ec870[0x0];if(!_0x2ed3fe)return console[_0x57e507(0x250)](_0x57e507(0x1ed)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x51ddb0['verbose']&&console[_0x57e507(0x250)](_0x57e507(0x1e6)+_0x2ed3fe);if(!_0x51ddb0[_0x57e507(0x1da)]){const _0x852ef5=await confirm(_0x57e507(0x218)+_0x2ed3fe+_0x57e507(0x258));if(!_0x852ef5)return console[_0x57e507(0x250)](_0x57e507(0x230)),0x0;}const _0x4858be=await withSpinner(_0x57e507(0x1d7)+_0x2ed3fe+_0x57e507(0x1e9),()=>_0x3e2176[_0x57e507(0x248)][_0x57e507(0x27d)](_0x2ed3fe),{'verbose':_0x51ddb0[_0x57e507(0x268)]}),_0x3bf51c=_0x4858be[_0x57e507(0x284)];return console['error']('✔\x20Deleted\x20project\x20'+_0x3bf51c[_0x57e507(0x279)]),console[_0x57e507(0x250)](_0x57e507(0x1e4)+_0x3bf51c[_0x57e507(0x22c)]),0x0;}}
|
|
1
|
+
const a35_0x254837=a35_0x4aad;function a35_0x4aad(_0xa72fa5,_0x5485d8){const _0x4dce67=a35_0x4dce();return a35_0x4aad=function(_0x4aad6e,_0x3fffce){_0x4aad6e=_0x4aad6e-0x17e;let _0x224aca=_0x4dce67[_0x4aad6e];return _0x224aca;},a35_0x4aad(_0xa72fa5,_0x5485d8);}(function(_0x51ebdb,_0x3d6d5b){const _0x1f38be=a35_0x4aad,_0x4d40e9=_0x51ebdb();while(!![]){try{const _0x49981e=-parseInt(_0x1f38be(0x19c))/0x1*(-parseInt(_0x1f38be(0x199))/0x2)+parseInt(_0x1f38be(0x214))/0x3+parseInt(_0x1f38be(0x1b5))/0x4*(parseInt(_0x1f38be(0x1e8))/0x5)+parseInt(_0x1f38be(0x209))/0x6*(-parseInt(_0x1f38be(0x21e))/0x7)+-parseInt(_0x1f38be(0x1a4))/0x8*(-parseInt(_0x1f38be(0x1f3))/0x9)+-parseInt(_0x1f38be(0x1f5))/0xa+parseInt(_0x1f38be(0x1ad))/0xb*(parseInt(_0x1f38be(0x1f9))/0xc);if(_0x49981e===_0x3d6d5b)break;else _0x4d40e9['push'](_0x4d40e9['shift']());}catch(_0x1837ff){_0x4d40e9['push'](_0x4d40e9['shift']());}}}(a35_0x4dce,0x96771));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a35_0x32181b from'prompts';function a35_0x4dce(){const _0x180e04=['Project\x20directory:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','stat','error','✔\x20Found\x20','fileSize','stringify','workflow:projects','map','List\x20all\x20workflow\x20projects','\x20attempt','startsWith','Kill\x20a\x20running\x20attempt','round','data','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','\x20project','Error:\x20Project\x20name\x20is\x20required','workflow:workflows','json','session:','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','logFiles','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Listing\x20workflow\x20attempts...','✔\x20Pushed\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:logs','isArray','format','Retrying\x20session...','901245LuHuft','Start\x20a\x20workflow\x20run','Including\x20subtasks:\x20yes','Project\x20name:\x20','verbose','workflows','reason','canceling','createdAt','push','workflow','216819reImFA','tasks','12243600tzIMYS','Getting\x20attempt\x20details...','Status:\x20','readFile','60KrcMmr','workflow:delete','\x20\x20Attempt\x20ID:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','filesExtracted','Target:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','sessionTime','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20\x20Project\x20ID:\x20','\x20session','getTime','\x20\x20Files\x20extracted:\x20','Pushing\x20workflow\x20project...','Filter:\x20project=','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','438AaXHDS','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','download','Session\x20time:\x20','✔\x20Retry\x20started','limit','\x20\x20Project:\x20','Project:\x20','split','\x20\x20Cause:\x20','keys','1142202oCFxqb','includeRetried','...','attemptId','Error:\x20Attempt\x20ID\x20is\x20required','fromTask','substring','Cancelled','session','resumeFrom','115976poOhBJ','Include\x20retried:\x20yes','description','\x20\x20Session\x20ID:\x20','Listing\x20workflow\x20projects...','Params:\x20','status','select','project','execute','\x20\x20Location:\x20','attempt:','from','includeSubtasks','\x20\x20New\x20attempt\x20ID:\x20','utf-8','Revision:\x20','Error:\x20','running','workflow:attempt','skipValidation','taskName','log','Starting\x20workflow\x20run...','Listing\x20workflows...','force','workflow:download','Validation:\x20skipped','workflow:kill','projectId','\x20task','Deleting\x20project\x20','Expected\x20format:\x20--param\x20key=value','workflow:sessions','16958zMZCtM','Killing\x20attempt...','task','36CkVQGZ','params','message','cause','retrySession','success','Error:\x20Workflow\x20identifier\x20is\x20required','finishedAt','296dcmwEj','✔\x20Downloaded\x20','Retrying\x20attempt...','Force:\x20yes','Resume\x20from:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','projects','List\x20workflow\x20attempts','Task\x20name:\x20','2843577zzABJj','retryAttemptName','Parameters:\x20','param','workflow:attempts','revision','parse','projectName','4cCpHrX','delete','attempt','Listing\x20workflow\x20sessions...','Pattern:\x20','Getting\x20attempt\x20tasks...','sessionId','Usage:\x20workflow:delete\x20<project-name-or-id>','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','name','done','\x20\x20Revision:\x20','yes','List\x20workflows','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','kill','workflow:retry','length','Attempt\x20ID:\x20','sessions'];a35_0x4dce=function(){return _0x180e04;};return a35_0x4dce();}export class WorkflowProjectsCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1d0);[a35_0x254837(0x220)]=a35_0x254837(0x1d2);async[a35_0x254837(0x180)](_0x5ff385){const _0x48fcdb=a35_0x254837,{options:_0x19f2f5,args:_0x114943,tdx:_0x386b00}=_0x5ff385,_0x25c07b=_0x114943[0x0];try{_0x19f2f5[_0x48fcdb(0x1ec)]&&_0x25c07b&&console[_0x48fcdb(0x1cc)](_0x48fcdb(0x1b9)+_0x25c07b);const _0x1f1105=await withSpinner(_0x48fcdb(0x222),()=>_0x386b00[_0x48fcdb(0x1f2)][_0x48fcdb(0x1aa)](_0x25c07b,{'limit':_0x19f2f5['limit']}),{'verbose':_0x19f2f5[_0x48fcdb(0x1ec)]}),_0x503483=_0x1f1105[_0x48fcdb(0x1d7)];return console['error'](_0x48fcdb(0x1cd)+_0x503483[_0x48fcdb(0x1c6)]+_0x48fcdb(0x1d9)+(_0x503483[_0x48fcdb(0x1c6)]!==0x1?'s':'')),await handleSDKOutput(_0x503483,_0x19f2f5),0x0;}catch(_0x519a2e){if(_0x519a2e instanceof SDKError)return console['error'](_0x48fcdb(0x188)+_0x519a2e[_0x48fcdb(0x19e)]),_0x519a2e[_0x48fcdb(0x19f)]&&console[_0x48fcdb(0x1cc)](_0x48fcdb(0x212)+_0x519a2e[_0x48fcdb(0x19f)]),0x1;throw _0x519a2e;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1db);[a35_0x254837(0x220)]=a35_0x254837(0x1c2);async[a35_0x254837(0x180)](_0x204b2e){const _0x25f62c=a35_0x254837,{options:_0x55bb8c,args:_0x147c56,tdx:_0x5ebf68}=_0x204b2e,_0x3f5538=_0x147c56[0x0];try{_0x55bb8c[_0x25f62c(0x1ec)]&&_0x3f5538&&console[_0x25f62c(0x1cc)]('Project\x20filter:\x20'+_0x3f5538);const _0x6a9705=await withSpinner(_0x25f62c(0x18f),()=>_0x5ebf68[_0x25f62c(0x1f2)][_0x25f62c(0x1ed)](_0x3f5538,{'limit':_0x55bb8c[_0x25f62c(0x20e)]}),{'verbose':_0x55bb8c['verbose']}),_0x5808c1=_0x6a9705[_0x25f62c(0x1d7)];return console['error'](_0x25f62c(0x1cd)+_0x5808c1[_0x25f62c(0x1c6)]+'\x20workflow'+(_0x5808c1['length']!==0x1?'s':'')),await handleSDKOutput(_0x5808c1,_0x55bb8c),0x0;}catch(_0x3c8c37){if(_0x3c8c37 instanceof SDKError)return console['error'](_0x25f62c(0x188)+_0x3c8c37[_0x25f62c(0x19e)]),_0x3c8c37['cause']&&console[_0x25f62c(0x1cc)]('\x20\x20Cause:\x20'+_0x3c8c37[_0x25f62c(0x19f)]),0x1;throw _0x3c8c37;}}}export class WorkflowSessionsCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x198);['description']='List\x20workflow\x20execution\x20sessions';async[a35_0x254837(0x180)](_0x29ac63){const _0x1300c2=a35_0x254837,{options:_0x9b7fc0,args:_0x40dc35,tdx:_0x5e661b}=_0x29ac63;let _0x47f05a,_0x401375;if(_0x40dc35[0x0]){const _0x1849bf=_0x40dc35[0x0]['split']('.');if(_0x1849bf[_0x1300c2(0x1c6)]===0x1)_0x47f05a=_0x1849bf[0x0];else{if(_0x1849bf['length']===0x2)[_0x47f05a,_0x401375]=_0x1849bf;else return console[_0x1300c2(0x1cc)](_0x1300c2(0x1a9)),0x1;}}try{if(_0x9b7fc0['verbose']){if(_0x47f05a&&_0x401375)console['error']('Filter:\x20'+_0x47f05a+'.'+_0x401375);else _0x47f05a&&console[_0x1300c2(0x1cc)](_0x1300c2(0x207)+_0x47f05a);const _0x59cb81=_0x9b7fc0[_0x1300c2(0x224)];_0x59cb81&&console[_0x1300c2(0x1cc)](_0x1300c2(0x1f7)+_0x59cb81);}const _0x5791c0=await withSpinner(_0x1300c2(0x1b8),()=>_0x5e661b[_0x1300c2(0x1f2)][_0x1300c2(0x1c8)]({'projectName':_0x47f05a,'workflowName':_0x401375,'status':_0x9b7fc0[_0x1300c2(0x224)],'fromTime':_0x9b7fc0[_0x1300c2(0x183)],'toTime':_0x9b7fc0['to'],'limit':_0x9b7fc0[_0x1300c2(0x20e)]}),{'verbose':_0x9b7fc0[_0x1300c2(0x1ec)]}),_0x37354e=_0x5791c0[_0x1300c2(0x1d7)];return console[_0x1300c2(0x1cc)](_0x1300c2(0x1cd)+_0x37354e[_0x1300c2(0x1c6)]+_0x1300c2(0x203)+(_0x37354e['length']!==0x1?'s':'')),await handleSDKOutput(_0x37354e,_0x9b7fc0),0x0;}catch(_0x4bc068){if(_0x4bc068 instanceof SDKError)return console[_0x1300c2(0x1cc)](_0x1300c2(0x188)+_0x4bc068['message']),_0x4bc068['cause']&&console[_0x1300c2(0x1cc)]('\x20\x20Cause:\x20'+_0x4bc068[_0x1300c2(0x19f)]),0x1;throw _0x4bc068;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a35_0x254837(0x1b1);['description']=a35_0x254837(0x1ab);async['execute'](_0x2f12b6){const _0x4962d4=a35_0x254837,{options:_0x55f6e5,args:_0x4afd5c,tdx:_0x58fb81}=_0x2f12b6;let _0x2a6143,_0x43f0f8;if(_0x4afd5c[0x0]){const _0x225886=_0x4afd5c[0x0][_0x4962d4(0x211)]('.');if(_0x225886[_0x4962d4(0x1c6)]===0x1)_0x2a6143=_0x225886[0x0];else{if(_0x225886['length']===0x2)[_0x2a6143,_0x43f0f8]=_0x225886;else return console[_0x4962d4(0x1cc)](_0x4962d4(0x1a9)),0x1;}}try{const _0x22fced=_0x55f6e5[_0x4962d4(0x215)];if(_0x55f6e5[_0x4962d4(0x1ec)]){if(_0x2a6143&&_0x43f0f8)console[_0x4962d4(0x1cc)]('Filter:\x20'+_0x2a6143+'.'+_0x43f0f8);else _0x2a6143&&console['error'](_0x4962d4(0x207)+_0x2a6143);_0x22fced&&console['error'](_0x4962d4(0x21f));}const _0x1a3cfb=await withSpinner(_0x4962d4(0x1e1),()=>_0x58fb81[_0x4962d4(0x1f2)]['attempts']({'projectName':_0x2a6143,'workflowName':_0x43f0f8,'includeRetried':_0x22fced,'limit':_0x55f6e5[_0x4962d4(0x20e)]}),{'verbose':_0x55f6e5[_0x4962d4(0x1ec)]}),_0x3d6ddd=_0x1a3cfb[_0x4962d4(0x1d7)];return console[_0x4962d4(0x1cc)]('✔\x20Found\x20'+_0x3d6ddd[_0x4962d4(0x1c6)]+_0x4962d4(0x1d3)+(_0x3d6ddd[_0x4962d4(0x1c6)]!==0x1?'s':'')),await handleSDKOutput(_0x3d6ddd,_0x55f6e5),0x0;}catch(_0x553288){if(_0x553288 instanceof SDKError)return console[_0x4962d4(0x1cc)]('Error:\x20'+_0x553288['message']),_0x553288[_0x4962d4(0x19f)]&&console[_0x4962d4(0x1cc)](_0x4962d4(0x212)+_0x553288[_0x4962d4(0x19f)]),0x1;throw _0x553288;}}}export class WorkflowAttemptCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x18a);['description']='Show\x20specific\x20attempt\x20details';async[a35_0x254837(0x180)](_0x1adbb8){const _0x5f9fe=a35_0x254837,{options:_0x2dbbda,args:_0x103d14,tdx:_0x55d624}=_0x1adbb8,_0x341980=_0x103d14[0x0];if(!_0x341980)return console[_0x5f9fe(0x1cc)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x2dbbda[_0x5f9fe(0x1ec)]&&console['error']('Attempt\x20ID:\x20'+_0x341980);const _0x560984=await withSpinner(_0x5f9fe(0x1f6),()=>_0x55d624[_0x5f9fe(0x1f2)][_0x5f9fe(0x1b7)](_0x341980),{'verbose':_0x2dbbda[_0x5f9fe(0x1ec)]}),_0x1a1587=_0x560984[_0x5f9fe(0x1d7)];let _0x4cc04c;!_0x1a1587[_0x5f9fe(0x1bf)]?_0x4cc04c=_0x1a1587['cancelRequested']?_0x5f9fe(0x1ef):_0x5f9fe(0x189):_0x4cc04c=_0x1a1587[_0x5f9fe(0x1a1)]?'success':'error';let _0x31f172;if(_0x1a1587[_0x5f9fe(0x1f0)]&&_0x1a1587[_0x5f9fe(0x1a3)]){const _0x5dbbe8=new Date(_0x1a1587[_0x5f9fe(0x1f0)])['getTime'](),_0x102d6c=new Date(_0x1a1587[_0x5f9fe(0x1a3)])[_0x5f9fe(0x204)]();_0x31f172=Math[_0x5f9fe(0x1d6)]((_0x102d6c-_0x5dbbe8)/0x3e8);}const _0x46587a={'attempt_id':_0x1a1587['id'],'status':_0x4cc04c,..._0x1a1587['index']!==undefined&&{'index':_0x1a1587['index']},..._0x1a1587['project']&&{'project':_0x1a1587[_0x5f9fe(0x17f)][_0x5f9fe(0x1be)]},..._0x1a1587[_0x5f9fe(0x1f2)]&&{'workflow':_0x1a1587[_0x5f9fe(0x1f2)][_0x5f9fe(0x1be)]},..._0x1a1587[_0x5f9fe(0x1bb)]&&{'session_id':_0x1a1587[_0x5f9fe(0x1bb)]},..._0x1a1587[_0x5f9fe(0x200)]&&{'session_time':_0x1a1587[_0x5f9fe(0x200)]},..._0x1a1587[_0x5f9fe(0x1ae)]&&{'retry_attempt':_0x1a1587[_0x5f9fe(0x1ae)]},..._0x31f172!==undefined&&{'duration_sec':_0x31f172},..._0x1a1587['createdAt']&&{'created_at':_0x1a1587[_0x5f9fe(0x1f0)]},..._0x1a1587['finishedAt']&&{'finished_at':_0x1a1587[_0x5f9fe(0x1a3)]},...Object[_0x5f9fe(0x213)](_0x1a1587[_0x5f9fe(0x19d)])['length']>0x0&&{'params':_0x1a1587[_0x5f9fe(0x19d)]}};return await handleSingleObjectOutput(_0x46587a,_0x2dbbda),0x0;}catch(_0x46494c){if(_0x46494c instanceof SDKError)return console[_0x5f9fe(0x1cc)](_0x5f9fe(0x188)+_0x46494c[_0x5f9fe(0x19e)]),_0x46494c[_0x5f9fe(0x19f)]&&console[_0x5f9fe(0x1cc)]('\x20\x20Cause:\x20'+_0x46494c['cause']),0x1;throw _0x46494c;}}}export class WorkflowTasksCommand extends BaseCommand{[a35_0x254837(0x1be)]='workflow:tasks';['description']='Show\x20tasks\x20for\x20an\x20attempt';async[a35_0x254837(0x180)](_0x5c8c01){const _0xdf8ea2=a35_0x254837,{options:_0x2afe7d,args:_0x64a30f,tdx:_0x488659}=_0x5c8c01,_0x5abd91=_0x64a30f[0x0];if(!_0x5abd91)return console['error'](_0xdf8ea2(0x218)),0x1;try{const _0x2f0aea=_0x2afe7d[_0xdf8ea2(0x184)];_0x2afe7d[_0xdf8ea2(0x1ec)]&&(console['error'](_0xdf8ea2(0x1c7)+_0x5abd91),_0x2f0aea&&console[_0xdf8ea2(0x1cc)](_0xdf8ea2(0x1ea)));const _0x2d8f65=await withSpinner(_0xdf8ea2(0x1ba),()=>_0x488659[_0xdf8ea2(0x1f2)][_0xdf8ea2(0x1f4)](_0x5abd91,_0x2f0aea||![]),{'verbose':_0x2afe7d[_0xdf8ea2(0x1ec)]}),_0x51dbea=_0x2d8f65[_0xdf8ea2(0x1d7)];return console[_0xdf8ea2(0x1cc)](_0xdf8ea2(0x1cd)+_0x51dbea[_0xdf8ea2(0x1c6)]+_0xdf8ea2(0x195)+(_0x51dbea[_0xdf8ea2(0x1c6)]!==0x1?'s':'')),await handleSDKOutput(_0x51dbea,_0x2afe7d),0x0;}catch(_0x383b42){if(_0x383b42 instanceof SDKError)return console['error'](_0xdf8ea2(0x188)+_0x383b42['message']),_0x383b42['cause']&&console[_0xdf8ea2(0x1cc)](_0xdf8ea2(0x212)+_0x383b42[_0xdf8ea2(0x19f)]),0x1;throw _0x383b42;}}}export class WorkflowLogsCommand extends BaseCommand{['name']=a35_0x254837(0x1e4);[a35_0x254837(0x220)]=a35_0x254837(0x1e0);async[a35_0x254837(0x180)](_0x285548){const _0x5a31a2=a35_0x254837,{options:_0x17a17d,args:_0x270444,tdx:_0x1d9b59}=_0x285548,_0x4bb2d9=_0x270444[0x0];let _0x38d346=_0x270444[0x1];if(!_0x4bb2d9)return console[_0x5a31a2(0x1cc)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x17a17d[_0x5a31a2(0x1ec)]&&(console[_0x5a31a2(0x1cc)](_0x5a31a2(0x1c7)+_0x4bb2d9),_0x38d346&&console['error'](_0x5a31a2(0x1ac)+_0x38d346));const _0x4f94f9=await withSpinner('Fetching\x20log\x20files...',()=>_0x1d9b59[_0x5a31a2(0x1f2)][_0x5a31a2(0x1df)](_0x4bb2d9,_0x38d346),{'verbose':_0x17a17d[_0x5a31a2(0x1ec)]}),_0xef2837=_0x4f94f9['data'];if(_0xef2837[_0x5a31a2(0x1c6)]===0x0)return console[_0x5a31a2(0x1cc)](_0x5a31a2(0x201)),0x0;if(!_0x38d346&&(_0x17a17d[_0x5a31a2(0x1dc)]||_0x17a17d[_0x5a31a2(0x1e6)]))return await handleSDKOutput(_0xef2837,_0x17a17d),0x0;if(!_0x38d346){const _0x525373=_0xef2837[_0x5a31a2(0x1d1)](_0x21d1af=>({'title':_0x21d1af[_0x5a31a2(0x18c)]+'\x20('+formatBytes(_0x21d1af[_0x5a31a2(0x1ce)])+')','value':_0x21d1af['taskName']})),_0x3b110b=await a35_0x32181b({'type':_0x5a31a2(0x17e),'name':_0x5a31a2(0x19b),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x525373});if(!_0x3b110b['task'])return console[_0x5a31a2(0x1cc)](_0x5a31a2(0x21b)),0x0;_0x38d346=_0x3b110b[_0x5a31a2(0x19b)];}const _0x5b72db=await withSpinner('Downloading\x20logs...',()=>_0x1d9b59[_0x5a31a2(0x1f2)]['logs'](_0x4bb2d9,_0x38d346),{'verbose':_0x17a17d[_0x5a31a2(0x1ec)]}),_0x438a4d=_0x5b72db['data'];return _0x438a4d?console[_0x5a31a2(0x18d)](_0x438a4d):console['error']('No\x20log\x20content\x20found'),0x0;}catch(_0x579df7){if(_0x579df7 instanceof SDKError)return console[_0x5a31a2(0x1cc)](_0x5a31a2(0x188)+_0x579df7[_0x5a31a2(0x19e)]),_0x579df7[_0x5a31a2(0x19f)]&&console['error'](_0x5a31a2(0x212)+_0x579df7[_0x5a31a2(0x19f)]),0x1;throw _0x579df7;}}}export class WorkflowKillCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x193);[a35_0x254837(0x220)]=a35_0x254837(0x1d5);async[a35_0x254837(0x180)](_0x5dea77){const _0xdff6fb=a35_0x254837,{options:_0x1edc88,args:_0x3b8f41,tdx:_0x349d12}=_0x5dea77,_0x1696b0=_0x3b8f41[0x0];if(!_0x1696b0)return console[_0xdff6fb(0x1cc)](_0xdff6fb(0x218)),0x1;try{const _0x4d6d70=_0x1edc88[_0xdff6fb(0x1ee)];_0x1edc88[_0xdff6fb(0x1ec)]&&(console['error']('Attempt\x20ID:\x20'+_0x1696b0),_0x4d6d70&&console['error']('Reason:\x20'+_0x4d6d70));if(!_0x1edc88[_0xdff6fb(0x1c1)]){const _0x4db6ca=await confirm(_0xdff6fb(0x1bd)+_0x1696b0+'?');if(!_0x4db6ca)return console[_0xdff6fb(0x1cc)](_0xdff6fb(0x21b)),0x0;}const _0x14c41b=await withSpinner(_0xdff6fb(0x19a),()=>_0x349d12[_0xdff6fb(0x1f2)][_0xdff6fb(0x1c4)](_0x1696b0,_0x4d6d70),{'verbose':_0x1edc88[_0xdff6fb(0x1ec)]}),_0x4342d6=_0x14c41b['data'];return console[_0xdff6fb(0x1cc)]('✔\x20'+_0x4342d6),0x0;}catch(_0x54fb36){if(_0x54fb36 instanceof SDKError)return console[_0xdff6fb(0x1cc)](_0xdff6fb(0x188)+_0x54fb36[_0xdff6fb(0x19e)]),_0x54fb36['cause']&&console[_0xdff6fb(0x1cc)](_0xdff6fb(0x212)+_0x54fb36[_0xdff6fb(0x19f)]),0x1;throw _0x54fb36;}}}export class WorkflowRetryCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1c5);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a35_0x254837(0x180)](_0x26816c){const _0x2f5dd2=a35_0x254837,{options:_0x131be2,args:_0x73cc77,tdx:_0x3794f0}=_0x26816c,_0xb470b9=_0x73cc77[0x0];if(!_0xb470b9)return console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1ff)),console[_0x2f5dd2(0x1cc)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x4cf609=![],_0x2485a9=_0xb470b9;if(_0xb470b9[_0x2f5dd2(0x1d4)](_0x2f5dd2(0x1dd)))_0x4cf609=!![],_0x2485a9=_0xb470b9['substring'](0x8);else{if(_0xb470b9[_0x2f5dd2(0x1d4)](_0x2f5dd2(0x182)))_0x4cf609=![],_0x2485a9=_0xb470b9[_0x2f5dd2(0x21a)](0x8);else return console['error']('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1e3)),0x1;}try{const _0x3f7c26=_0x131be2[_0x2f5dd2(0x219)],_0x171dde=_0x131be2[_0x2f5dd2(0x21d)],_0x4fc5f4=_0x131be2[_0x2f5dd2(0x19d)],_0x438d04=_0x131be2[_0x2f5dd2(0x190)];_0x131be2[_0x2f5dd2(0x1ec)]&&(console['error'](_0x2f5dd2(0x1fe)+(_0x4cf609?'session':_0x2f5dd2(0x1b7))+'\x20'+_0x2485a9),_0x3f7c26&&console[_0x2f5dd2(0x1cc)]('From\x20task:\x20'+_0x3f7c26),_0x171dde&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1a8)+_0x171dde),_0x4fc5f4&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x223)+_0x4fc5f4),_0x438d04&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1a7)));let _0x2efbf0;if(_0x4fc5f4)try{if(_0x4fc5f4[_0x2f5dd2(0x1d4)]('@')){const _0x331bf4=await import('fs/promises'),_0x320151=_0x4fc5f4[_0x2f5dd2(0x21a)](0x1),_0x124bbb=await _0x331bf4[_0x2f5dd2(0x1f8)](_0x320151,_0x2f5dd2(0x186));_0x2efbf0=JSON[_0x2f5dd2(0x1b3)](_0x124bbb);}else _0x2efbf0=JSON[_0x2f5dd2(0x1b3)](_0x4fc5f4);}catch{return console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1fc)),0x1;}if(!_0x131be2[_0x2f5dd2(0x1c1)]){const _0x16f37d=await confirm(_0x2f5dd2(0x208)+(_0x4cf609?_0x2f5dd2(0x21c):_0x2f5dd2(0x1b7))+'\x20'+_0x2485a9+'?');if(!_0x16f37d)return console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x21b)),0x0;}let _0x3771fd;_0x4cf609?_0x3771fd=await withSpinner(_0x2f5dd2(0x1e7),()=>_0x3794f0[_0x2f5dd2(0x1f2)][_0x2f5dd2(0x1a0)](_0x2485a9,{'fromTask':_0x3f7c26,'retryParams':_0x2efbf0}),{'verbose':_0x131be2[_0x2f5dd2(0x1ec)]}):_0x3771fd=await withSpinner(_0x2f5dd2(0x1a6),()=>_0x3794f0[_0x2f5dd2(0x1f2)]['retryAttempt'](_0x2485a9,{'resumeFrom':_0x171dde,'retryParams':_0x2efbf0,'force':_0x438d04}),{'verbose':_0x131be2[_0x2f5dd2(0x1ec)]});const _0xa8ec85=_0x3771fd[_0x2f5dd2(0x1d7)];return console['error'](_0x2f5dd2(0x20d)),console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x185)+_0xa8ec85[_0x2f5dd2(0x217)]),console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x221)+_0xa8ec85[_0x2f5dd2(0x1bb)]),0x0;}catch(_0xd2e690){if(_0xd2e690 instanceof SDKError)return console['error'](_0x2f5dd2(0x188)+_0xd2e690['message']),_0xd2e690[_0x2f5dd2(0x19f)]&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x212)+_0xd2e690['cause']),0x1;throw _0xd2e690;}}}export class WorkflowRunCommand extends BaseCommand{['name']='workflow:run';[a35_0x254837(0x220)]=a35_0x254837(0x1e9);async[a35_0x254837(0x180)](_0x2071ff){const _0x436073=a35_0x254837,{options:_0x1f8f33,args:_0x3c06ab,tdx:_0x28c72d}=_0x2071ff,_0xca1b62=_0x3c06ab[0x0];if(!_0xca1b62)return console[_0x436073(0x1cc)](_0x436073(0x1a2)),console[_0x436073(0x1cc)](_0x436073(0x1c3)),0x1;const _0x280074=_0x1f8f33[_0x436073(0x1b0)],_0xd83aab=_0x1f8f33[_0x436073(0x200)],_0x568e3d={};if(_0x280074&&Array[_0x436073(0x1e5)](_0x280074))for(const _0x8194c7 of _0x280074){const _0x450991=_0x8194c7['indexOf']('=');if(_0x450991===-0x1)return console[_0x436073(0x1cc)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x8194c7),console['error'](_0x436073(0x197)),0x1;const _0x295cf2=_0x8194c7[_0x436073(0x21a)](0x0,_0x450991),_0x3db56e=_0x8194c7['substring'](_0x450991+0x1);try{_0x568e3d[_0x295cf2]=JSON[_0x436073(0x1b3)](_0x3db56e);}catch{_0x568e3d[_0x295cf2]=_0x3db56e;}}_0x1f8f33[_0x436073(0x1ec)]&&(console[_0x436073(0x1cc)]('Workflow:\x20'+_0xca1b62),Object['keys'](_0x568e3d)[_0x436073(0x1c6)]>0x0&&console['error'](_0x436073(0x1af)+JSON[_0x436073(0x1cf)](_0x568e3d)),_0xd83aab&&console[_0x436073(0x1cc)](_0x436073(0x20c)+_0xd83aab));const _0x672b76=await withSpinner(_0x436073(0x18e),()=>_0x28c72d[_0x436073(0x1f2)]['run'](_0xca1b62,_0x568e3d,{'sessionTime':_0xd83aab}),{'verbose':_0x1f8f33['verbose']}),_0x4c51e6=_0x672b76[_0x436073(0x1d7)];return console[_0x436073(0x1cc)]('✔\x20Workflow\x20run\x20started'),console[_0x436073(0x1cc)](_0x436073(0x1fb)+_0x4c51e6['id']),console[_0x436073(0x1cc)](_0x436073(0x221)+_0x4c51e6[_0x436073(0x1bb)]),console['error'](_0x436073(0x20f)+_0x4c51e6[_0x436073(0x17f)]?.['name']),console[_0x436073(0x1cc)]('\x20\x20Workflow:\x20'+_0x4c51e6[_0x436073(0x1f2)]?.[_0x436073(0x1be)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x191);['description']=a35_0x254837(0x20a);async[a35_0x254837(0x180)](_0x229248){const _0x192db6=a35_0x254837,{options:_0x2789c8,args:_0x398319,tdx:_0x5eb52e}=_0x229248,_0x52094a=_0x398319[0x0],_0x306ea4=_0x398319[0x1]||'.';if(!_0x52094a)return console[_0x192db6(0x1cc)](_0x192db6(0x1da)),console['error']('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x5c1177=_0x2789c8[_0x192db6(0x1b2)];_0x2789c8[_0x192db6(0x1ec)]&&(console[_0x192db6(0x1cc)]('Project:\x20'+_0x52094a),console[_0x192db6(0x1cc)]('Output\x20directory:\x20'+_0x306ea4),_0x5c1177&&console[_0x192db6(0x1cc)](_0x192db6(0x187)+_0x5c1177));const _0x1339b8=await withSpinner('Downloading\x20project\x20'+_0x52094a+_0x192db6(0x216),()=>_0x5eb52e['workflow'][_0x192db6(0x20b)](_0x52094a,_0x306ea4,{'revision':_0x5c1177}),{'verbose':_0x2789c8['verbose']}),_0x1188ca=_0x1339b8[_0x192db6(0x1d7)];return console[_0x192db6(0x1cc)](_0x192db6(0x1a5)+_0x1188ca['projectName']),console[_0x192db6(0x1cc)](_0x192db6(0x1c0)+_0x1188ca[_0x192db6(0x1b2)]),console[_0x192db6(0x1cc)](_0x192db6(0x205)+_0x1188ca[_0x192db6(0x1fd)]),console[_0x192db6(0x1cc)](_0x192db6(0x181)+_0x306ea4+'/'+_0x1188ca[_0x192db6(0x1b4)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a35_0x254837(0x1be)]='workflow:push';['description']=a35_0x254837(0x1d8);async[a35_0x254837(0x180)](_0x528b90){const _0x2e42f4=a35_0x254837,{options:_0x15769b,args:_0xb795c2,tdx:_0x2e5a79}=_0x528b90;let _0x4cfaa8='.',_0x16f059=_0x15769b[_0x2e42f4(0x1be)];if(_0xb795c2[0x0]){const {promises:_0x3f7f1e}=await import('fs');try{const _0x19638d=await _0x3f7f1e[_0x2e42f4(0x1cb)](_0xb795c2[0x0]);if(_0x19638d['isDirectory']())_0x4cfaa8=_0xb795c2[0x0];else return console['error'](_0x2e42f4(0x188)+_0xb795c2[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x16f059=_0xb795c2[0x0],_0x4cfaa8='.';}}const _0x30da61=_0x15769b[_0x2e42f4(0x1b2)],_0x14a7b4=_0x15769b[_0x2e42f4(0x18b)];_0x15769b[_0x2e42f4(0x1ec)]&&(console[_0x2e42f4(0x1cc)](_0x2e42f4(0x1c9)+_0x4cfaa8),_0x16f059&&console[_0x2e42f4(0x1cc)](_0x2e42f4(0x1eb)+_0x16f059),_0x30da61&&console['error']('Revision:\x20'+_0x30da61),_0x14a7b4&&console[_0x2e42f4(0x1cc)](_0x2e42f4(0x192)));const _0x5dd65a=await withSpinner(_0x2e42f4(0x206),()=>_0x2e5a79[_0x2e42f4(0x1f2)][_0x2e42f4(0x1f1)](_0x4cfaa8,{'projectName':_0x16f059,'revision':_0x30da61,'skipValidation':_0x14a7b4}),{'verbose':_0x15769b[_0x2e42f4(0x1ec)]}),_0x797ca0=_0x5dd65a[_0x2e42f4(0x1d7)];return console[_0x2e42f4(0x1cc)](_0x2e42f4(0x1e2)+_0x797ca0[_0x2e42f4(0x1b4)]),console[_0x2e42f4(0x1cc)](_0x2e42f4(0x202)+_0x797ca0['projectId']),console['error'](_0x2e42f4(0x1c0)+_0x797ca0['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1fa);[a35_0x254837(0x220)]=a35_0x254837(0x1de);async[a35_0x254837(0x180)](_0x43ec05){const _0x55a3a9=a35_0x254837,{options:_0x4676f3,args:_0x4cb46c,tdx:_0x3eb0fb}=_0x43ec05,_0x3e4df5=_0x4cb46c[0x0];if(!_0x3e4df5)return console[_0x55a3a9(0x1cc)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x55a3a9(0x1cc)](_0x55a3a9(0x1bc)),0x1;_0x4676f3['verbose']&&console[_0x55a3a9(0x1cc)](_0x55a3a9(0x210)+_0x3e4df5);if(!_0x4676f3['yes']){const _0x24d22a=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x3e4df5+_0x55a3a9(0x1ca));if(!_0x24d22a)return console[_0x55a3a9(0x1cc)]('Cancelled'),0x0;}const _0x57ddff=await withSpinner(_0x55a3a9(0x196)+_0x3e4df5+_0x55a3a9(0x216),()=>_0x3eb0fb[_0x55a3a9(0x1f2)][_0x55a3a9(0x1b6)](_0x3e4df5),{'verbose':_0x4676f3[_0x55a3a9(0x1ec)]}),_0x39a0e0=_0x57ddff[_0x55a3a9(0x1d7)];return console[_0x55a3a9(0x1cc)]('✔\x20Deleted\x20project\x20'+_0x39a0e0[_0x55a3a9(0x1b4)]),console['error'](_0x55a3a9(0x202)+_0x39a0e0[_0x55a3a9(0x194)]),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb550ff,_0x156bc9){const _0x4b8d3e=a36_0x1804,_0x4e6c08=_0xb550ff();while(!![]){try{const _0x1eef34=-parseInt(_0x4b8d3e(0xdf))/0x1*(parseInt(_0x4b8d3e(0xef))/0x2)+-parseInt(_0x4b8d3e(0xf3))/0x3*(-parseInt(_0x4b8d3e(0xea))/0x4)+-parseInt(_0x4b8d3e(0xe6))/0x5+-parseInt(_0x4b8d3e(0xe4))/0x6*(-parseInt(_0x4b8d3e(0xde))/0x7)+-parseInt(_0x4b8d3e(0xf1))/0x8+-parseInt(_0x4b8d3e(0xe0))/0x9+parseInt(_0x4b8d3e(0xe8))/0xa*(parseInt(_0x4b8d3e(0xf0))/0xb);if(_0x1eef34===_0x156bc9)break;else _0x4e6c08['push'](_0x4e6c08['shift']());}catch(_0x2b60ae){_0x4e6c08['push'](_0x4e6c08['shift']());}}}(a36_0x1b63,0xbc279));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a36_0x1804(_0x4e583,_0x2b8f08){const _0x1b6338=a36_0x1b63();return a36_0x1804=function(_0x180424,_0x16b7a1){_0x180424=_0x180424-0xdc;let _0x308e7e=_0x1b6338[_0x180424];return _0x308e7e;},a36_0x1804(_0x4e583,_0x2b8f08);}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x311d43=a36_0x1804;try{const _0x238509=fileURLToPath(import.meta[_0x311d43(0xe3)]),_0x146577=dirname(_0x238509),_0x5f1e07=join(_0x146577,_0x311d43(0xec)),_0x7eba9f=JSON[_0x311d43(0xe1)](readFileSync(_0x5f1e07,_0x311d43(0xdd)));return _0x7eba9f[_0x311d43(0xed)];}catch{return _0x311d43(0xe7);}}export function getUserAgent(){const _0x2592b2=a36_0x1804,_0x1ec14a=getVersion(),_0x286b18=platform(),_0x23d8e1=process['version']['replace']('v','');return _0x2592b2(0xe2)+_0x1ec14a+'\x20('+_0x286b18+_0x2592b2(0xeb)+_0x23d8e1+')';}export function getAuthHeaders(_0x37abfd,_0x47a671){const _0x5a6e96=a36_0x1804,_0x24dd2c=getVersion(),_0x1aabfc={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x24dd2c};return _0x47a671&&(_0x1aabfc[_0x5a6e96(0xee)]=_0x5a6e96(0xe9)+_0x47a671),_0x1aabfc;}export function toHeaderRecord(_0x3e6843){const _0x37635d=a36_0x1804,_0x2fd1ae={};for(const [_0x25b032,_0x4c670e]of Object[_0x37635d(0xdc)](_0x3e6843)){_0x4c670e!==undefined&&(_0x2fd1ae[_0x25b032]=_0x4c670e);}return _0x2fd1ae;}export function getTrinoHeaders(_0x5d6202,_0x3ed3da){const _0x16f7bf=a36_0x1804,_0x5149ba=getAuthHeaders(_0x5d6202,_0x3ed3da),_0x39ae1e=toHeaderRecord(_0x5149ba);return delete _0x39ae1e[_0x16f7bf(0xee)],_0x3ed3da&&(_0x39ae1e[_0x16f7bf(0xf2)]=_0x3ed3da),_0x39ae1e;}export function hasAPIKey(_0x5de1b7){const _0x474c5e=a36_0x1804,_0x5330d9=getAPIKey(_0x5de1b7);return _0x5330d9!==undefined&&_0x5330d9[_0x474c5e(0xe5)]>0x0;}function a36_0x1b63(){const _0x573de4=['TD1\x20','16AQDmie',';\x20node/','../../package.json','version','Authorization','92802XYfiIh','3452196deSbjI','5997008tRchRN','X-Trino-User','127761JBnSfd','entries','utf-8','290269HkBLMr','3hyRDWt','12452562uFfYoP','parse','tdx/','url','30pWCatK','length','3933755nbnxVO','0.0.0','110dcEGEW'];a36_0x1b63=function(){return _0x573de4;};return a36_0x1b63();}
|