@treasuredata/tdx 0.9.3 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- 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.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.d.ts +52 -1
- package/dist/client/llm-api-client.d.ts.map +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/llm-api-client.js.map +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.d.ts +45 -1
- package/dist/client/td-api-client.d.ts.map +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/td-api-client.js.map +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/agent-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.d.ts +35 -0
- package/dist/commands/connection-command.d.ts.map +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/connection-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.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +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-pull-command.d.ts.map +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-pull-command.js.map +1 -1
- package/dist/commands/segment-push-command.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/agent/agent-yaml.d.ts +15 -2
- package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/agent-yaml.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/connection-validator.d.ts +119 -0
- package/dist/sdk/connection-validator.d.ts.map +1 -0
- package/dist/sdk/connection-validator.js +1 -0
- package/dist/sdk/connection-validator.js.map +1 -0
- package/dist/sdk/connection.d.ts +120 -1
- package/dist/sdk/connection.d.ts.map +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/connection.js.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.d.ts +4 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm.d.ts.map +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/llm.js.map +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +22 -6
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/connector-schema.d.ts +182 -0
- package/dist/types/connector-schema.d.ts.map +1 -0
- package/dist/types/connector-schema.js +1 -0
- package/dist/types/connector-schema.js.map +1 -0
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/llm.d.ts +107 -2
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/utils/agent-config.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/fields-display.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/journey-utils.d.ts.map +1 -1
- package/dist/utils/journey-utils.js +1 -1
- package/dist/utils/journey-utils.js.map +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-config.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x30fa38=a37_0x2ff4;function a37_0x415b(){const _0x109455=['name','length','data','segment','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','616ptiTbQ','Update\x20existing\x20child\x20segment','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','resolvePathToResource','720856NxiVTZ','Resolved\x20folder\x20ID:\x20','ruleFile','Resolving\x20folder\x20\x27','1357316HbrGnM','465AdaDmT','verbose','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','resolveFolderId','parentId','segment:update','segmentPath','✔\x20Updated\x20segment\x20\x27','1830094yOpoJP','1359XsEUKG','segmentId','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','yellow','24690aHqKKk','error','type','470qaBQvX','Error:\x20Cannot\x20update\x20','description','\x27...','Parent\x20ID:\x20','\x20\x20\x20Path:\x20','18tnAYrz','34990gClPqE','segmentName','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','617849VsjjCA','includes','updateSegmentById','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Updating\x20segment\x20\x27','folder','Segment\x20ID:\x20','Resolved\x20type:\x20'];a37_0x415b=function(){return _0x109455;};return a37_0x415b();}(function(_0x2c58e1,_0x5cef91){const _0x29c4c6=a37_0x2ff4,_0x561857=_0x2c58e1();while(!![]){try{const _0x30353c=parseInt(_0x29c4c6(0xd5))/0x1+parseInt(_0x29c4c6(0xcb))/0x2*(-parseInt(_0x29c4c6(0xc4))/0x3)+-parseInt(_0x29c4c6(0xba))/0x4+-parseInt(_0x29c4c6(0xbb))/0x5*(-parseInt(_0x29c4c6(0xc8))/0x6)+-parseInt(_0x29c4c6(0xc3))/0x7+-parseInt(_0x29c4c6(0xb6))/0x8*(parseInt(_0x29c4c6(0xd1))/0x9)+-parseInt(_0x29c4c6(0xd2))/0xa*(-parseInt(_0x29c4c6(0xb1))/0xb);if(_0x30353c===_0x5cef91)break;else _0x561857['push'](_0x561857['shift']());}catch(_0x297688){_0x561857['push'](_0x561857['shift']());}}}(a37_0x415b,0x4b738));function a37_0x2ff4(_0x55a3fc,_0x565dcd){_0x55a3fc=_0x55a3fc-0xb1;const _0x415b97=a37_0x415b();let _0x2ff44a=_0x415b97[_0x55a3fc];return _0x2ff44a;}import{BaseCommand}from'./command.js';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';import a37_0x29f15c from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a37_0x30fa38(0xdd)]=a37_0x30fa38(0xc0);[a37_0x30fa38(0xcd)]=a37_0x30fa38(0xb2);async['execute'](_0x96a626){const _0x31e1f4=a37_0x30fa38;console[_0x31e1f4(0xc9)](a37_0x29f15c['yellow'](_0x31e1f4(0xbd))),console[_0x31e1f4(0xc9)](a37_0x29f15c[_0x31e1f4(0xc7)](_0x31e1f4(0xb4)));const {options:_0x5d1897,args:_0x36bc8f,tdx:_0x586bbf}=_0x96a626,_0x41c9de=_0x5d1897;if(_0x36bc8f[_0x31e1f4(0xde)]===0x0)return console[_0x31e1f4(0xc9)](_0x31e1f4(0xd8)),console[_0x31e1f4(0xc9)](_0x31e1f4(0xb3)),console[_0x31e1f4(0xc9)]('Examples:'),console[_0x31e1f4(0xc9)](_0x31e1f4(0xe1)),console['error'](_0x31e1f4(0xc6)),0x1;const _0x49258d=_0x36bc8f[0x0],_0x252a3f=_0x5d1897[_0x31e1f4(0xc1)];let _0x5e9359=_0x49258d;_0x252a3f&&!_0x49258d[_0x31e1f4(0xd6)]('/')&&(_0x5e9359=_0x252a3f+'/'+_0x49258d,_0x41c9de[_0x31e1f4(0xbc)]&&console[_0x31e1f4(0xc9)]('Resolved\x20relative\x20path\x20to:\x20'+_0x5e9359));const _0x569319=await withSpinner('Resolving\x20path\x20\x27'+_0x5e9359+_0x31e1f4(0xce),()=>_0x586bbf[_0x31e1f4(0xe0)][_0x31e1f4(0xb5)](_0x5e9359),{'verbose':_0x41c9de[_0x31e1f4(0xbc)]}),_0x1c22b7=_0x569319[_0x31e1f4(0xdf)];_0x41c9de[_0x31e1f4(0xbc)]&&console[_0x31e1f4(0xc9)](_0x31e1f4(0xdc)+_0x1c22b7['type']);if(_0x1c22b7[_0x31e1f4(0xca)]!==_0x31e1f4(0xe0))return console[_0x31e1f4(0xc9)](_0x31e1f4(0xcc)+_0x1c22b7[_0x31e1f4(0xca)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x31e1f4(0xc9)](_0x31e1f4(0xd4)),0x1;if(!_0x1c22b7[_0x31e1f4(0xc5)])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1e583b=_0x1c22b7[_0x31e1f4(0xbf)],_0x3c12b1=_0x1c22b7[_0x31e1f4(0xc5)];_0x41c9de[_0x31e1f4(0xbc)]&&(console[_0x31e1f4(0xc9)](_0x31e1f4(0xcf)+_0x1e583b),console[_0x31e1f4(0xc9)](_0x31e1f4(0xdb)+_0x3c12b1));let _0x4dafbb;if(_0x41c9de[_0x31e1f4(0xda)]){const _0x5345c9=_0x41c9de[_0x31e1f4(0xda)],_0x2e6956=await withSpinner(_0x31e1f4(0xb9)+_0x5345c9+'\x27...',()=>_0x586bbf['segment'][_0x31e1f4(0xbe)](_0x1e583b,_0x5345c9),{'verbose':_0x41c9de['verbose']});_0x4dafbb=parseInt(_0x2e6956[_0x31e1f4(0xdf)],0xa),_0x41c9de[_0x31e1f4(0xbc)]&&console['error'](_0x31e1f4(0xb7)+_0x4dafbb);}const _0x3d4eba=await loadJSONFromOptions(_0x41c9de['rule'],_0x41c9de[_0x31e1f4(0xb8)]),_0x1d018b={'name':_0x41c9de[_0x31e1f4(0xdd)],'description':_0x41c9de['description'],'rule':_0x3d4eba,'kind':_0x41c9de['kind']!==undefined?parseInt(_0x41c9de['kind'],0xa):undefined,'segmentFolderId':_0x4dafbb},_0x5a86a8=await withSpinner(_0x31e1f4(0xd9)+_0x1c22b7[_0x31e1f4(0xd3)]+_0x31e1f4(0xce),()=>_0x586bbf[_0x31e1f4(0xe0)][_0x31e1f4(0xd7)](_0x1e583b,_0x3c12b1,_0x1d018b),{'verbose':_0x41c9de[_0x31e1f4(0xbc)]}),_0x5913a5=_0x5a86a8[_0x31e1f4(0xdf)];return console[_0x31e1f4(0xc9)](_0x31e1f4(0xc2)+_0x5913a5[_0x31e1f4(0xdd)]+'\x27'),_0x5e9359!==_0x49258d&&console[_0x31e1f4(0xc9)](_0x31e1f4(0xd0)+_0x5e9359),await handleSDKOutput([_0x5913a5],_0x41c9de),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x1a4d2f=a38_0x2f05;(function(_0x3944ee,_0x736e71){const _0x43dfe9=a38_0x2f05,_0x5b2718=_0x3944ee();while(!![]){try{const _0x1321ec=-parseInt(_0x43dfe9(0x96))/0x1*(-parseInt(_0x43dfe9(0x9a))/0x2)+parseInt(_0x43dfe9(0xa6))/0x3+parseInt(_0x43dfe9(0x79))/0x4+-parseInt(_0x43dfe9(0x77))/0x5+-parseInt(_0x43dfe9(0xa2))/0x6*(parseInt(_0x43dfe9(0x7b))/0x7)+parseInt(_0x43dfe9(0xa4))/0x8+-parseInt(_0x43dfe9(0x99))/0x9;if(_0x1321ec===_0x736e71)break;else _0x5b2718['push'](_0x5b2718['shift']());}catch(_0x180b4d){_0x5b2718['push'](_0x5b2718['shift']());}}}(a38_0xdcff,0x40676));function a38_0x2f05(_0x6dc01,_0x537778){_0x6dc01=_0x6dc01-0x75;const _0xdcff33=a38_0xdcff();let _0x2f0576=_0xdcff33[_0x6dc01];return _0x2f0576;}import{existsSync,statSync}from'fs';import a38_0x40d014 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a38_0xdcff(){const _0x281a70=['Usage:\x20tdx\x20segment\x20use\x20<path>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','folderId','Resolved\x20relative\x20path\x20to:\x20','cyan','green','length','parentId','verbose','red','parentName','Site:\x20','Resolved\x20path\x20type:\x20','segment','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Folder\x20ID:\x20','config','17HVBLiH','dim','Parent\x20ID:\x20','5112252IUxVJT','53918MBqCNv','segments','data','execute','log','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','308238phspva','site','2534000gajJZq','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','1122570reoxJT','Use:\x20tdx\x20segment\x20use\x20','join','type','fullPath','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','888330TweKDE','name','879440VIajfB','folderPath','49IPqLpn','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','segmentPath','isAbsolute','segment:use','✔\x20Context\x20set\x20to:\x20','slice','error','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Examples:'];a38_0xdcff=function(){return _0x281a70;};return a38_0xdcff();}import{parsePath,normalizePath}from'../utils/segment-path-parser.js';import{findTdxConfig}from'../utils/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a38_0x1a4d2f(0x78)]=a38_0x1a4d2f(0x7f);['description']=a38_0x1a4d2f(0xa5);async[a38_0x1a4d2f(0x9d)](_0xdf50cb){const _0x21dc31=a38_0x1a4d2f,{options:_0x1979df,args:_0x3a3c41,tdx:_0x20b501}=_0xdf50cb;if(_0x3a3c41[_0x21dc31(0x8b)]===0x0)return console['error'](a38_0x40d014[_0x21dc31(0x8e)]('Error:\x20Path\x20is\x20required\x0a')),console[_0x21dc31(0x82)](_0x21dc31(0x85)),console['error'](_0x21dc31(0x84)),console[_0x21dc31(0x82)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x21dc31(0x82)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x21dc31(0x82)](_0x21dc31(0x76)),console[_0x21dc31(0x82)](_0x21dc31(0x83)),0x1;const _0x12d1c5=_0x3a3c41[0x0],_0x4cf4ea=_0x1979df['session'];try{if(_0x12d1c5==='/')return saveSessionContext({'segment_path':undefined},_0x4cf4ea),console[_0x21dc31(0x9e)](a38_0x40d014[_0x21dc31(0x8a)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x12d1c5)&&statSync(_0x12d1c5)['isDirectory']()){let _0x5891bf;try{_0x5891bf=findTdxConfig(_0x12d1c5);}catch{return console['error'](a38_0x40d014['red']('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x12d1c5)),console[_0x21dc31(0x82)](a38_0x40d014[_0x21dc31(0x89)](_0x21dc31(0x86))),0x1;}const _0x45ec22=_0x5891bf[_0x21dc31(0x95)]['parent_segment'];return saveSessionContext({'segment_path':_0x45ec22,'parent_segment':_0x45ec22},_0x4cf4ea),console['log'](a38_0x40d014[_0x21dc31(0x8a)](_0x21dc31(0x80)+a38_0x40d014[_0x21dc31(0x89)](_0x45ec22))),0x0;}const _0x3dc1f9=_0x1979df[_0x21dc31(0x7d)];let _0x5bd20c=_0x12d1c5;const _0x3b5456=parsePath(_0x12d1c5);if(!_0x3b5456[_0x21dc31(0x7e)]){if(!_0x3dc1f9)return console[_0x21dc31(0x82)](a38_0x40d014[_0x21dc31(0x8e)](_0x21dc31(0xa1))),console['error'](a38_0x40d014[_0x21dc31(0x89)](_0x21dc31(0xa0))),0x1;if(_0x12d1c5==='..'){const _0x440f48=_0x3dc1f9['split']('/')[_0x21dc31(0x81)](0x0,-0x1)[_0x21dc31(0xa8)]('/');_0x5bd20c=_0x440f48||'/';}else _0x12d1c5==='.'?_0x5bd20c=_0x3dc1f9:_0x5bd20c=_0x3dc1f9+'/'+_0x12d1c5;_0x1979df[_0x21dc31(0x8d)]&&console[_0x21dc31(0x82)](_0x21dc31(0x88)+_0x5bd20c);}if(_0x5bd20c==='/'||_0x5bd20c==='')return saveSessionContext({'segment_path':undefined},_0x4cf4ea),console[_0x21dc31(0x9e)](a38_0x40d014[_0x21dc31(0x8a)](_0x21dc31(0x7c))),0x0;_0x5bd20c=normalizePath(_0x5bd20c);const _0x4deec4=parsePath(_0x5bd20c)[_0x21dc31(0x9b)];if(_0x4deec4['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x4cf4ea),console['log'](a38_0x40d014[_0x21dc31(0x8a)](_0x21dc31(0x7c))),0x0;_0x1979df[_0x21dc31(0x8d)]&&(console['error'](_0x21dc31(0x90)+_0x1979df[_0x21dc31(0xa3)]),console[_0x21dc31(0x82)]('Target\x20path:\x20'+_0x5bd20c));const _0x1b280a=await withSpinner('Resolving\x20path\x20\x27'+_0x5bd20c+'\x27...',()=>_0x20b501[_0x21dc31(0x92)]['resolvePathToResource'](_0x5bd20c),{'verbose':_0x1979df[_0x21dc31(0x8d)]}),_0x396a4c=_0x1b280a[_0x21dc31(0x9c)];_0x1979df['verbose']&&(console['error'](_0x21dc31(0x91)+_0x396a4c[_0x21dc31(0xa9)]),console[_0x21dc31(0x82)](_0x21dc31(0x98)+_0x396a4c[_0x21dc31(0x8c)]),_0x396a4c[_0x21dc31(0x87)]&&console[_0x21dc31(0x82)](_0x21dc31(0x94)+_0x396a4c['folderId']));if(_0x396a4c[_0x21dc31(0xa9)]===_0x21dc31(0x92))return console['error'](a38_0x40d014[_0x21dc31(0x8e)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x21dc31(0x82)](_0x21dc31(0x9f)),console[_0x21dc31(0x82)](a38_0x40d014[_0x21dc31(0x89)](_0x21dc31(0xa7)+_0x396a4c[_0x21dc31(0x8f)]+(_0x396a4c['folderPath']?'/'+_0x396a4c[_0x21dc31(0x7a)][_0x21dc31(0xa8)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x396a4c[_0x21dc31(0x75)],'parent_segment':_0x396a4c[_0x21dc31(0x8f)]},_0x4cf4ea),console[_0x21dc31(0x9e)](a38_0x40d014[_0x21dc31(0x8a)](_0x21dc31(0x80)+a38_0x40d014[_0x21dc31(0x89)](_0x396a4c[_0x21dc31(0x75)]))),_0x1979df[_0x21dc31(0x8d)]&&(console[_0x21dc31(0x82)](a38_0x40d014[_0x21dc31(0x97)](_0x21dc31(0x93))),console[_0x21dc31(0x82)](a38_0x40d014[_0x21dc31(0x97)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x1dd009){throw _0x1dd009;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a39_0x525914=a39_0xeb28;(function(_0x5dcdef,_0x33a58d){const _0x53d371=a39_0xeb28,_0x5ab749=_0x5dcdef();while(!![]){try{const _0x18b533=-parseInt(_0x53d371(0xf0))/0x1+-parseInt(_0x53d371(0xbd))/0x2*(parseInt(_0x53d371(0xd2))/0x3)+parseInt(_0x53d371(0xcb))/0x4*(parseInt(_0x53d371(0xdd))/0x5)+-parseInt(_0x53d371(0xb2))/0x6+-parseInt(_0x53d371(0xe6))/0x7+-parseInt(_0x53d371(0xc6))/0x8*(parseInt(_0x53d371(0xf1))/0x9)+parseInt(_0x53d371(0xbb))/0xa*(parseInt(_0x53d371(0xf5))/0xb);if(_0x18b533===_0x33a58d)break;else _0x5ab749['push'](_0x5ab749['shift']());}catch(_0x1976d6){_0x5ab749['push'](_0x5ab749['shift']());}}}(a39_0xb89d,0x5c4cf));import{BaseCommand}from'./command.js';function a39_0xeb28(_0x26c32d,_0x3f7ec3){_0x26c32d=_0x26c32d-0xaa;const _0xb89d39=a39_0xb89d();let _0xeb2838=_0xb89d39[_0x26c32d];return _0xeb2838;}function a39_0xb89d(){const _0x1c1ff0=['✔\x20Built\x20tree\x20with\x20','1390cAaMwb','✔\x20Found\x20','71234XcePyA','test','Parent\x20segment\x20context:\x20','Resolving\x20parent\x20segment\x20\x27','Resolving\x20path\x20\x27','\x5c$&','error','jsonl','Recursive\x20mode:\x20enabled','8kijgUU','/j/da','Folder\x20ID:\x20','journeyBundleName','listJourneysFromParentSegment','3756chWTDT','localeCompare','Building\x20hierarchy\x20tree...','execute','name','listWithPattern','json','51EjqpHp','Folder/pattern\x20arg:\x20','format','\x20folder','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','resolvePathToResource','Listing\x20folders,\x20segments,\x20and\x20journeys...','Error:\x20No\x20parent\x20segment\x20context\x20set.','journey','maxDepth','235bowVXk','message','cause','sort',']\x20matching\x20\x27','replace','filter','Site:\x20','dim','5075462AcLTzl','verbose','site','\x20segment','folderId','length','listRecursive','includes','\x27...','log','638338eFkrhn','1644156zvULOK','\x20journey','listUnified','List\x20folders\x20and\x20child\x20segments','243463aXtIUv','/app/ps/','segment','map','Parent\x20ID:\x20','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','\x20top-level\x20items','data','(empty)','folder','/e/',',\x20and\x20','3545880ZyESQU','description','Set\x20a\x20parent\x20segment\x20context\x20first:','parentId','recursive','web','all','Error:\x20'];a39_0xb89d=function(){return _0x1c1ff0;};return a39_0xb89d();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{getConsoleNextUrl}from'../types/endpoints.js';import a39_0x17d0dc from'chalk';export class SegmentsCommand extends BaseCommand{['name']='segments';[a39_0x525914(0xb3)]=a39_0x525914(0xf4);async[a39_0x525914(0xce)](_0x38a8c6){const _0x1ec8e5=a39_0x525914,{options:_0x4d3242,args:_0x5bc594}=_0x38a8c6,_0x53f362=_0x4d3242[_0x1ec8e5(0xb6)],_0x3ea3f5=_0x5bc594[0x0];try{const _0x8f1a60=_0x4d3242['parentSegment'];_0x4d3242[_0x1ec8e5(0xe7)]&&(console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xe4)+_0x4d3242[_0x1ec8e5(0xe8)]),console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xbf)+(_0x8f1a60||'(not\x20set)')),_0x3ea3f5&&console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xd3)+_0x3ea3f5),_0x53f362&&console['error'](_0x1ec8e5(0xc5)));if(!_0x8f1a60)return console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xda)),console[_0x1ec8e5(0xc3)](''),console['error'](_0x1ec8e5(0xb4)),console['error'](_0x1ec8e5(0xd6)),console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xd7)),console[_0x1ec8e5(0xc3)](''),console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xab)),0x1;const _0x52310e=_0x3ea3f5&&(_0x3ea3f5[_0x1ec8e5(0xed)]('*')||_0x3ea3f5[_0x1ec8e5(0xed)]('?'));if(_0x52310e)return await this[_0x1ec8e5(0xd0)](_0x38a8c6,_0x8f1a60,_0x3ea3f5);const _0x4dbdd1=_0x3ea3f5?_0x8f1a60+'/'+_0x3ea3f5:_0x8f1a60;return _0x53f362?await this['listRecursive'](_0x38a8c6,_0x4dbdd1):await this[_0x1ec8e5(0xf3)](_0x38a8c6,_0x4dbdd1);}catch(_0x4380a5){if(_0x4380a5 instanceof SDKError)return console[_0x1ec8e5(0xc3)](_0x1ec8e5(0xb9)+_0x4380a5[_0x1ec8e5(0xde)]),_0x4380a5[_0x1ec8e5(0xdf)]&&console[_0x1ec8e5(0xc3)]('\x20\x20Cause:\x20'+_0x4380a5[_0x1ec8e5(0xdf)]),0x1;throw _0x4380a5;}}async[a39_0x525914(0xd0)](_0x696634,_0x1c9b00,_0x335fc5){const _0xc0574c=a39_0x525914,{options:_0x4dad11,tdx:_0x489443}=_0x696634,_0x1b5ffb=_0x4dad11[_0xc0574c(0xb7)],_0x47d3ad=await withSpinner(_0xc0574c(0xc0)+_0x1c9b00+_0xc0574c(0xee),()=>_0x489443[_0xc0574c(0xf7)]['resolvePathToResource'](_0x1c9b00),{'verbose':_0x4dad11[_0xc0574c(0xe7)]}),_0x24dd32=_0x47d3ad[_0xc0574c(0xad)],_0x463021=await withSpinner(_0xc0574c(0xd9),()=>Promise[_0xc0574c(0xb8)]([_0x489443[_0xc0574c(0xf7)][_0xc0574c(0xf3)](_0x24dd32[_0xc0574c(0xb5)],_0x24dd32[_0xc0574c(0xea)]),_0x489443[_0xc0574c(0xdb)]['listJourneysFromParentSegment'](_0x24dd32[_0xc0574c(0xb5)])]),{'verbose':_0x4dad11[_0xc0574c(0xe7)]}),[_0xc5f1,_0x5b679f]=_0x463021[_0xc0574c(0xad)],{folders:_0x3e04e5,segments:_0x371049}=_0xc5f1,_0x3f1581=_0x335fc5[_0xc0574c(0xe2)](/[.+^${}()|[\]\\]/g,_0xc0574c(0xc2))[_0xc0574c(0xe2)](/\*/g,'.*')[_0xc0574c(0xe2)](/\?/g,'.'),_0x1497ea=new RegExp('^'+_0x3f1581+'$','i'),_0x1fe587=_0x3e04e5[_0xc0574c(0xe3)](_0x13bb6c=>_0x1497ea['test'](_0x13bb6c[_0xc0574c(0xcf)])),_0x8f2cad=_0x371049['filter'](_0x28591f=>_0x1497ea[_0xc0574c(0xbe)](_0x28591f['name'])),_0x470558=_0x5b679f['filter'](_0x2debb7=>_0x1497ea[_0xc0574c(0xbe)](_0x2debb7[_0xc0574c(0xc9)])),_0x166598=_0x1fe587[_0xc0574c(0xeb)]+_0x8f2cad[_0xc0574c(0xeb)]+_0x470558[_0xc0574c(0xeb)];console[_0xc0574c(0xc3)](_0xc0574c(0xbc)+_0x1fe587[_0xc0574c(0xeb)]+_0xc0574c(0xd5)+(_0x1fe587[_0xc0574c(0xeb)]!==0x1?'s':'')+',\x20'+_0x8f2cad['length']+_0xc0574c(0xe9)+(_0x8f2cad[_0xc0574c(0xeb)]!==0x1?'s':'')+_0xc0574c(0xb1)+_0x470558[_0xc0574c(0xeb)]+_0xc0574c(0xf2)+(_0x470558[_0xc0574c(0xeb)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x335fc5+'\x27');const _0x4f73f8=_0x407769=>{const _0x51409f=_0xc0574c;return getConsoleNextUrl(_0x4dad11[_0x51409f(0xe8)],_0x51409f(0xf6)+_0x24dd32[_0x51409f(0xb5)]+_0x51409f(0xb0)+_0x407769);},_0x245b64=_0x4dad11[_0xc0574c(0xd4)]===_0xc0574c(0xd1)||_0x4dad11[_0xc0574c(0xd4)]===_0xc0574c(0xc4);if(_0x245b64){const _0x523fbe=[..._0x1fe587['map'](_0x123c3a=>({..._0x123c3a,'type':_0xc0574c(0xaf)})),..._0x8f2cad[_0xc0574c(0xf8)](_0x15c269=>({..._0x15c269,'type':_0xc0574c(0xf7),'url':_0x4f73f8(_0x15c269['id'])})),..._0x470558['map'](_0x43e14b=>({..._0x43e14b,'name':_0x43e14b['journeyBundleName'],'type':'journey'}))][_0xc0574c(0xe0)]((_0x5d151f,_0x182b50)=>_0x5d151f[_0xc0574c(0xcf)]['localeCompare'](_0x182b50[_0xc0574c(0xcf)]));await handleSDKOutput(_0x523fbe,_0x4dad11);}else{if(_0x166598===0x0)console[_0xc0574c(0xef)]('No\x20items\x20match\x20pattern:\x20'+_0x335fc5);else{console[_0xc0574c(0xef)](a39_0x17d0dc[_0xc0574c(0xe5)]('['+_0x1c9b00+_0xc0574c(0xe1)+_0x335fc5+'\x27'));const _0x35c9a8=formatFlatList(_0x1fe587,_0x8f2cad,{'showMetadata':!![],'showUrl':_0x1b5ffb,'getSegmentUrl':_0x4f73f8},_0x470558);console['log'](_0x35c9a8);}}return 0x0;}async[a39_0x525914(0xf3)](_0x1f33c,_0xbb90c9){const _0x119a83=a39_0x525914,{options:_0x2da65a,tdx:_0x44d812}=_0x1f33c,_0x2b7f3a=_0x2da65a[_0x119a83(0xb7)],_0x31affb=await withSpinner(_0x119a83(0xc1)+_0xbb90c9+'\x27...',()=>_0x44d812[_0x119a83(0xf7)][_0x119a83(0xd8)](_0xbb90c9),{'verbose':_0x2da65a['verbose']}),_0x50e4f5=_0x31affb[_0x119a83(0xad)];_0x2da65a[_0x119a83(0xe7)]&&(console[_0x119a83(0xc3)]('Parent\x20ID:\x20'+_0x50e4f5[_0x119a83(0xb5)]),_0x50e4f5[_0x119a83(0xea)]&&console[_0x119a83(0xc3)](_0x119a83(0xc8)+_0x50e4f5[_0x119a83(0xea)]));const _0x1ff47e=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>Promise[_0x119a83(0xb8)]([_0x44d812[_0x119a83(0xf7)]['listUnified'](_0x50e4f5[_0x119a83(0xb5)],_0x50e4f5[_0x119a83(0xea)]),_0x44d812['journey'][_0x119a83(0xca)](_0x50e4f5[_0x119a83(0xb5)])]),{'verbose':_0x2da65a[_0x119a83(0xe7)]}),[_0x19fc19,_0x30cf4a]=_0x1ff47e[_0x119a83(0xad)],{folders:_0x56f292,segments:_0x2c76a6}=_0x19fc19,_0x4c3fdb=_0x56f292['length']+_0x2c76a6[_0x119a83(0xeb)]+_0x30cf4a[_0x119a83(0xeb)];console[_0x119a83(0xc3)]('✔\x20Found\x20'+_0x56f292[_0x119a83(0xeb)]+_0x119a83(0xd5)+(_0x56f292[_0x119a83(0xeb)]!==0x1?'s':'')+',\x20'+_0x2c76a6['length']+'\x20segment'+(_0x2c76a6['length']!==0x1?'s':'')+_0x119a83(0xb1)+_0x30cf4a['length']+'\x20journey'+(_0x30cf4a['length']!==0x1?'s':''));const _0x27bb4e=_0x5108c6=>{const _0x285e65=_0x119a83;return getConsoleNextUrl(_0x2da65a[_0x285e65(0xe8)],_0x285e65(0xf6)+_0x50e4f5[_0x285e65(0xb5)]+_0x285e65(0xb0)+_0x5108c6);},_0x2af4fa=_0x197437=>{const _0x4aedff=_0x119a83;return getConsoleNextUrl(_0x2da65a[_0x4aedff(0xe8)],_0x4aedff(0xf6)+_0x50e4f5['parentId']+_0x4aedff(0xb0)+_0x197437+_0x4aedff(0xc7));},_0x138e39=_0x2da65a[_0x119a83(0xd4)]==='json'||_0x2da65a['format']===_0x119a83(0xc4);if(_0x138e39){const _0x52c257=[..._0x56f292[_0x119a83(0xf8)](_0x204ed3=>({..._0x204ed3,'type':_0x119a83(0xaf)})),..._0x2c76a6[_0x119a83(0xf8)](_0x51e2b9=>({..._0x51e2b9,'type':_0x119a83(0xf7),'url':_0x27bb4e(_0x51e2b9['id'])})),..._0x30cf4a[_0x119a83(0xf8)](_0x4c0a40=>({..._0x4c0a40,'name':_0x4c0a40[_0x119a83(0xc9)],'type':_0x119a83(0xdb),'url':_0x2af4fa(_0x4c0a40['id'])}))][_0x119a83(0xe0)]((_0xba592c,_0x4a6c5a)=>_0xba592c[_0x119a83(0xcf)][_0x119a83(0xcc)](_0x4a6c5a[_0x119a83(0xcf)]));await handleSDKOutput(_0x52c257,_0x2da65a);}else{if(_0x4c3fdb===0x0)console[_0x119a83(0xef)](a39_0x17d0dc[_0x119a83(0xe5)]('['+_0xbb90c9+']')),console[_0x119a83(0xef)](_0x119a83(0xae));else{console['log'](a39_0x17d0dc['dim']('['+_0xbb90c9+']'));const _0x481ab4=formatFlatList(_0x56f292,_0x2c76a6,{'showMetadata':!![],'showUrl':_0x2b7f3a,'getSegmentUrl':_0x27bb4e,'getJourneyUrl':_0x2af4fa},_0x30cf4a);console[_0x119a83(0xef)](_0x481ab4);}}return 0x0;}async[a39_0x525914(0xec)](_0x109191,_0x1b04f5){const _0x55ac35=a39_0x525914,{options:_0x459440,tdx:_0x24cd93}=_0x109191,_0x2e94cc=_0x459440[_0x55ac35(0xb7)],_0x174423=await withSpinner(_0x55ac35(0xc1)+_0x1b04f5+_0x55ac35(0xee),()=>_0x24cd93[_0x55ac35(0xf7)][_0x55ac35(0xd8)](_0x1b04f5),{'verbose':_0x459440[_0x55ac35(0xe7)]}),_0x50c678=_0x174423[_0x55ac35(0xad)];_0x459440[_0x55ac35(0xe7)]&&(console[_0x55ac35(0xc3)](_0x55ac35(0xaa)+_0x50c678[_0x55ac35(0xb5)]),_0x50c678['folderId']&&console[_0x55ac35(0xc3)](_0x55ac35(0xc8)+_0x50c678[_0x55ac35(0xea)]));const _0x4abc82=_0x459440[_0x55ac35(0xdc)]||0xa,_0x10ccee=await withSpinner(_0x55ac35(0xcd),()=>_0x24cd93[_0x55ac35(0xf7)][_0x55ac35(0xec)](_0x50c678['parentId'],_0x50c678['folderId'],0x0,_0x4abc82),{'verbose':_0x459440['verbose']}),_0x1a8b3c=_0x10ccee['data'];console[_0x55ac35(0xc3)](_0x55ac35(0xba)+_0x1a8b3c[_0x55ac35(0xeb)]+_0x55ac35(0xac));const _0x4d3102=_0x13cea8=>{const _0x3d9c6c=_0x55ac35;return getConsoleNextUrl(_0x459440[_0x3d9c6c(0xe8)],_0x3d9c6c(0xf6)+_0x50c678['parentId']+_0x3d9c6c(0xb0)+_0x13cea8);};if(_0x459440[_0x55ac35(0xd4)]===_0x55ac35(0xd1)||_0x459440[_0x55ac35(0xd4)]===_0x55ac35(0xc4))await handleSDKOutput(_0x1a8b3c,_0x459440);else{console[_0x55ac35(0xef)](a39_0x17d0dc[_0x55ac35(0xe5)]('['+_0x1b04f5+']'));const _0x573f5b=formatTree(_0x1a8b3c,{'showMetadata':!![],'showUrl':_0x2e94cc,'getSegmentUrl':_0x4d3102});console[_0x55ac35(0xef)](_0x573f5b);}return 0x0;}}
|
|
1
|
+
const a39_0x2a5a8c=a39_0x1045;function a39_0x3d4d(){const _0x118c22=['57124VNECTf','Listing\x20folders,\x20segments,\x20and\x20journeys...','Parent\x20ID:\x20','name','parentSegment','folder','/app/ps/','parentId','cause','replace','map','length','Site:\x20','jsonl','description','execute','recursive',',\x20and\x20','journeyBundleName','Folder\x20ID:\x20','1307119kJLUyQ','\x20matching\x20\x27','format','includes','Error:\x20No\x20parent\x20segment\x20context\x20set.','40mAOFUe','folderId','/j/da','21Mkqdte','9865yGZGsJ','589965dCLmom','message','listUnified','listWithPattern','test','listJourneysFromParentSegment','\x5c$&','json','Folder/pattern\x20arg:\x20','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','No\x20items\x20match\x20pattern:\x20','error','journey','verbose','(empty)','all','filter','\x20top-level\x20items','sort','\x27...','segment','30oORmFj','resolvePathToResource','List\x20folders\x20and\x20child\x20segments','/e/','\x20\x20Cause:\x20','415528kcAaCE','Recursive\x20mode:\x20enabled','\x20folder','558558inLBHv','log','Error:\x20','1299933IZBhTw','dim','site','\x20journey','web','Resolving\x20path\x20\x27','segments','localeCompare','data','7FAtciA','✔\x20Built\x20tree\x20with\x20'];a39_0x3d4d=function(){return _0x118c22;};return a39_0x3d4d();}(function(_0x2bd36d,_0x2e4473){const _0x3f1c4e=a39_0x1045,_0x5cc428=_0x2bd36d();while(!![]){try{const _0x5db86e=-parseInt(_0x3f1c4e(0x160))/0x1*(-parseInt(_0x3f1c4e(0x15c))/0x2)+parseInt(_0x3f1c4e(0x15f))/0x3*(parseInt(_0x3f1c4e(0x143))/0x4)+-parseInt(_0x3f1c4e(0x161))/0x5+parseInt(_0x3f1c4e(0x135))/0x6+-parseInt(_0x3f1c4e(0x141))/0x7*(-parseInt(_0x3f1c4e(0x132))/0x8)+parseInt(_0x3f1c4e(0x138))/0x9+parseInt(_0x3f1c4e(0x12d))/0xa*(-parseInt(_0x3f1c4e(0x157))/0xb);if(_0x5db86e===_0x2e4473)break;else _0x5cc428['push'](_0x5cc428['shift']());}catch(_0x4fe1df){_0x5cc428['push'](_0x5cc428['shift']());}}}(a39_0x3d4d,0x1b682));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a39_0x1045(_0x3bded4,_0x3bd881){_0x3bded4=_0x3bded4-0x120;const _0x3d4d84=a39_0x3d4d();let _0x10451d=_0x3d4d84[_0x3bded4];return _0x10451d;}import{getConsoleNextUrl}from'../types/endpoints.js';import a39_0xf4d6e0 from'chalk';export class SegmentsCommand extends BaseCommand{[a39_0x2a5a8c(0x146)]=a39_0x2a5a8c(0x13e);[a39_0x2a5a8c(0x151)]=a39_0x2a5a8c(0x12f);async[a39_0x2a5a8c(0x152)](_0x25fae4){const _0x12a84b=a39_0x2a5a8c,{options:_0x135fcb,args:_0x416771}=_0x25fae4,_0x4bc86b=_0x135fcb[_0x12a84b(0x153)],_0x13769e=_0x416771[0x0];try{const _0x1298bd=_0x135fcb[_0x12a84b(0x147)];_0x135fcb[_0x12a84b(0x125)]&&(console[_0x12a84b(0x123)](_0x12a84b(0x14f)+_0x135fcb[_0x12a84b(0x13a)]),console[_0x12a84b(0x123)]('Parent\x20segment\x20context:\x20'+(_0x1298bd||'(not\x20set)')),_0x13769e&&console[_0x12a84b(0x123)](_0x12a84b(0x120)+_0x13769e),_0x4bc86b&&console['error'](_0x12a84b(0x133)));if(!_0x1298bd)return console[_0x12a84b(0x123)](_0x12a84b(0x15b)),console['error'](''),console['error']('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x12a84b(0x123)](_0x12a84b(0x121)),console[_0x12a84b(0x123)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console['error'](''),console[_0x12a84b(0x123)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x5ba3fa=_0x13769e&&(_0x13769e[_0x12a84b(0x15a)]('*')||_0x13769e[_0x12a84b(0x15a)]('?'));if(_0x5ba3fa)return await this[_0x12a84b(0x164)](_0x25fae4,_0x1298bd,_0x13769e);const _0x3dad39=_0x13769e?_0x1298bd+'/'+_0x13769e:_0x1298bd;return _0x4bc86b?await this['listRecursive'](_0x25fae4,_0x3dad39):await this[_0x12a84b(0x163)](_0x25fae4,_0x3dad39);}catch(_0x1d8e65){if(_0x1d8e65 instanceof SDKError)return console['error'](_0x12a84b(0x137)+_0x1d8e65[_0x12a84b(0x162)]),_0x1d8e65[_0x12a84b(0x14b)]&&console[_0x12a84b(0x123)](_0x12a84b(0x131)+_0x1d8e65['cause']),0x1;throw _0x1d8e65;}}async[a39_0x2a5a8c(0x164)](_0x4ca807,_0x5b5756,_0x26ccce){const _0x2f4d33=a39_0x2a5a8c,{options:_0x5f1c4a,tdx:_0x4e5df5}=_0x4ca807,_0x56091c=_0x5f1c4a[_0x2f4d33(0x13c)],_0x3ff9ef=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5b5756+_0x2f4d33(0x12b),()=>_0x4e5df5[_0x2f4d33(0x12c)][_0x2f4d33(0x12e)](_0x5b5756),{'verbose':_0x5f1c4a[_0x2f4d33(0x125)]}),_0x3a6142=_0x3ff9ef[_0x2f4d33(0x140)],_0x132d92=await withSpinner(_0x2f4d33(0x144),()=>Promise[_0x2f4d33(0x127)]([_0x4e5df5[_0x2f4d33(0x12c)][_0x2f4d33(0x163)](_0x3a6142[_0x2f4d33(0x14a)],_0x3a6142[_0x2f4d33(0x15d)]),_0x4e5df5[_0x2f4d33(0x124)][_0x2f4d33(0x166)](_0x3a6142['parentId'])]),{'verbose':_0x5f1c4a['verbose']}),[_0x9a1f1d,_0xaf47a4]=_0x132d92[_0x2f4d33(0x140)],{folders:_0x205fd0,segments:_0x2ceba6}=_0x9a1f1d,_0x199a55=_0x26ccce[_0x2f4d33(0x14c)](/[.+^${}()|[\]\\]/g,_0x2f4d33(0x167))[_0x2f4d33(0x14c)](/\*/g,'.*')[_0x2f4d33(0x14c)](/\?/g,'.'),_0xed3548=new RegExp('^'+_0x199a55+'$','i'),_0x23545b=_0x205fd0[_0x2f4d33(0x128)](_0x199ee8=>_0xed3548[_0x2f4d33(0x165)](_0x199ee8[_0x2f4d33(0x146)])),_0x29ca14=_0x2ceba6[_0x2f4d33(0x128)](_0x1f0299=>_0xed3548[_0x2f4d33(0x165)](_0x1f0299[_0x2f4d33(0x146)])),_0x180f9b=_0xaf47a4[_0x2f4d33(0x128)](_0x2417b8=>_0xed3548[_0x2f4d33(0x165)](_0x2417b8[_0x2f4d33(0x155)])),_0x1d66da=_0x23545b[_0x2f4d33(0x14e)]+_0x29ca14['length']+_0x180f9b[_0x2f4d33(0x14e)];console[_0x2f4d33(0x123)]('✔\x20Found\x20'+_0x23545b[_0x2f4d33(0x14e)]+_0x2f4d33(0x134)+(_0x23545b[_0x2f4d33(0x14e)]!==0x1?'s':'')+',\x20'+_0x29ca14['length']+'\x20segment'+(_0x29ca14[_0x2f4d33(0x14e)]!==0x1?'s':'')+_0x2f4d33(0x154)+_0x180f9b[_0x2f4d33(0x14e)]+_0x2f4d33(0x13b)+(_0x180f9b['length']!==0x1?'s':'')+_0x2f4d33(0x158)+_0x26ccce+'\x27');const _0x4b9503=_0x20dc25=>{const _0x5d4e81=_0x2f4d33;return getConsoleNextUrl(_0x5f1c4a[_0x5d4e81(0x13a)],_0x5d4e81(0x149)+_0x3a6142['parentId']+_0x5d4e81(0x130)+_0x20dc25);},_0x1ebb37=_0x5f1c4a[_0x2f4d33(0x159)]===_0x2f4d33(0x168)||_0x5f1c4a[_0x2f4d33(0x159)]==='jsonl';if(_0x1ebb37){const _0x5c2481=[..._0x23545b[_0x2f4d33(0x14d)](_0xbdd952=>({..._0xbdd952,'type':_0x2f4d33(0x148)})),..._0x29ca14[_0x2f4d33(0x14d)](_0x288723=>({..._0x288723,'type':_0x2f4d33(0x12c),'url':_0x4b9503(_0x288723['id'])})),..._0x180f9b[_0x2f4d33(0x14d)](_0x3b650e=>({..._0x3b650e,'name':_0x3b650e[_0x2f4d33(0x155)],'type':_0x2f4d33(0x124)}))][_0x2f4d33(0x12a)]((_0x2b0d52,_0x1f1992)=>_0x2b0d52['name'][_0x2f4d33(0x13f)](_0x1f1992['name']));await handleSDKOutput(_0x5c2481,_0x5f1c4a);}else{if(_0x1d66da===0x0)console[_0x2f4d33(0x136)](_0x2f4d33(0x122)+_0x26ccce);else{console['log'](a39_0xf4d6e0[_0x2f4d33(0x139)]('['+_0x5b5756+']\x20matching\x20\x27'+_0x26ccce+'\x27'));const _0x4c0989=formatFlatList(_0x23545b,_0x29ca14,{'showMetadata':!![],'showUrl':_0x56091c,'getSegmentUrl':_0x4b9503},_0x180f9b);console[_0x2f4d33(0x136)](_0x4c0989);}}return 0x0;}async[a39_0x2a5a8c(0x163)](_0x25ef72,_0x1c23ac){const _0x4dd3ac=a39_0x2a5a8c,{options:_0x5c4efc,tdx:_0x33e667}=_0x25ef72,_0x39f0ca=_0x5c4efc[_0x4dd3ac(0x13c)],_0x5bbf48=await withSpinner(_0x4dd3ac(0x13d)+_0x1c23ac+_0x4dd3ac(0x12b),()=>_0x33e667[_0x4dd3ac(0x12c)][_0x4dd3ac(0x12e)](_0x1c23ac),{'verbose':_0x5c4efc[_0x4dd3ac(0x125)]}),_0xc288ac=_0x5bbf48['data'];_0x5c4efc['verbose']&&(console[_0x4dd3ac(0x123)](_0x4dd3ac(0x145)+_0xc288ac['parentId']),_0xc288ac[_0x4dd3ac(0x15d)]&&console[_0x4dd3ac(0x123)](_0x4dd3ac(0x156)+_0xc288ac[_0x4dd3ac(0x15d)]));const _0x259eba=await withSpinner(_0x4dd3ac(0x144),()=>Promise[_0x4dd3ac(0x127)]([_0x33e667['segment'][_0x4dd3ac(0x163)](_0xc288ac[_0x4dd3ac(0x14a)],_0xc288ac[_0x4dd3ac(0x15d)]),_0x33e667['journey'][_0x4dd3ac(0x166)](_0xc288ac['parentId'])]),{'verbose':_0x5c4efc['verbose']}),[_0x17b5c0,_0x131b5d]=_0x259eba[_0x4dd3ac(0x140)],{folders:_0x41f333,segments:_0x178d1f}=_0x17b5c0,_0x280b8e=_0x41f333[_0x4dd3ac(0x14e)]+_0x178d1f[_0x4dd3ac(0x14e)]+_0x131b5d['length'];console[_0x4dd3ac(0x123)]('✔\x20Found\x20'+_0x41f333[_0x4dd3ac(0x14e)]+_0x4dd3ac(0x134)+(_0x41f333[_0x4dd3ac(0x14e)]!==0x1?'s':'')+',\x20'+_0x178d1f[_0x4dd3ac(0x14e)]+'\x20segment'+(_0x178d1f[_0x4dd3ac(0x14e)]!==0x1?'s':'')+',\x20and\x20'+_0x131b5d[_0x4dd3ac(0x14e)]+_0x4dd3ac(0x13b)+(_0x131b5d[_0x4dd3ac(0x14e)]!==0x1?'s':''));const _0x2cabbe=_0x321afb=>{const _0x5cdbe3=_0x4dd3ac;return getConsoleNextUrl(_0x5c4efc[_0x5cdbe3(0x13a)],_0x5cdbe3(0x149)+_0xc288ac[_0x5cdbe3(0x14a)]+_0x5cdbe3(0x130)+_0x321afb);},_0x5a1660=_0x2987e0=>{const _0x456e3d=_0x4dd3ac;return getConsoleNextUrl(_0x5c4efc[_0x456e3d(0x13a)],_0x456e3d(0x149)+_0xc288ac[_0x456e3d(0x14a)]+_0x456e3d(0x130)+_0x2987e0+_0x456e3d(0x15e));},_0x5c1ef1=_0x5c4efc[_0x4dd3ac(0x159)]===_0x4dd3ac(0x168)||_0x5c4efc[_0x4dd3ac(0x159)]==='jsonl';if(_0x5c1ef1){const _0x4a1bd0=[..._0x41f333[_0x4dd3ac(0x14d)](_0x2ed6f2=>({..._0x2ed6f2,'type':_0x4dd3ac(0x148)})),..._0x178d1f[_0x4dd3ac(0x14d)](_0x32bf12=>({..._0x32bf12,'type':_0x4dd3ac(0x12c),'url':_0x2cabbe(_0x32bf12['id'])})),..._0x131b5d[_0x4dd3ac(0x14d)](_0xf3b6bb=>({..._0xf3b6bb,'name':_0xf3b6bb[_0x4dd3ac(0x155)],'type':_0x4dd3ac(0x124),'url':_0x5a1660(_0xf3b6bb['id'])}))][_0x4dd3ac(0x12a)]((_0x57b2eb,_0x3495a7)=>_0x57b2eb[_0x4dd3ac(0x146)][_0x4dd3ac(0x13f)](_0x3495a7[_0x4dd3ac(0x146)]));await handleSDKOutput(_0x4a1bd0,_0x5c4efc);}else{if(_0x280b8e===0x0)console['log'](a39_0xf4d6e0[_0x4dd3ac(0x139)]('['+_0x1c23ac+']')),console[_0x4dd3ac(0x136)](_0x4dd3ac(0x126));else{console[_0x4dd3ac(0x136)](a39_0xf4d6e0['dim']('['+_0x1c23ac+']'));const _0x19cd49=formatFlatList(_0x41f333,_0x178d1f,{'showMetadata':!![],'showUrl':_0x39f0ca,'getSegmentUrl':_0x2cabbe,'getJourneyUrl':_0x5a1660},_0x131b5d);console['log'](_0x19cd49);}}return 0x0;}async['listRecursive'](_0x3e411c,_0x482371){const _0x5c1b8b=a39_0x2a5a8c,{options:_0xf6d17a,tdx:_0x44dc21}=_0x3e411c,_0xe7471e=_0xf6d17a['web'],_0x5155d3=await withSpinner(_0x5c1b8b(0x13d)+_0x482371+_0x5c1b8b(0x12b),()=>_0x44dc21['segment']['resolvePathToResource'](_0x482371),{'verbose':_0xf6d17a[_0x5c1b8b(0x125)]}),_0x3bbc48=_0x5155d3[_0x5c1b8b(0x140)];_0xf6d17a[_0x5c1b8b(0x125)]&&(console[_0x5c1b8b(0x123)](_0x5c1b8b(0x145)+_0x3bbc48[_0x5c1b8b(0x14a)]),_0x3bbc48['folderId']&&console['error']('Folder\x20ID:\x20'+_0x3bbc48[_0x5c1b8b(0x15d)]));const _0x104fc8=_0xf6d17a['maxDepth']||0xa,_0x3abd8b=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x44dc21[_0x5c1b8b(0x12c)]['listRecursive'](_0x3bbc48[_0x5c1b8b(0x14a)],_0x3bbc48[_0x5c1b8b(0x15d)],0x0,_0x104fc8),{'verbose':_0xf6d17a['verbose']}),_0x2bfb9e=_0x3abd8b['data'];console[_0x5c1b8b(0x123)](_0x5c1b8b(0x142)+_0x2bfb9e[_0x5c1b8b(0x14e)]+_0x5c1b8b(0x129));const _0x5cc055=_0x17acab=>{const _0x4c8df2=_0x5c1b8b;return getConsoleNextUrl(_0xf6d17a[_0x4c8df2(0x13a)],_0x4c8df2(0x149)+_0x3bbc48['parentId']+_0x4c8df2(0x130)+_0x17acab);};if(_0xf6d17a[_0x5c1b8b(0x159)]==='json'||_0xf6d17a[_0x5c1b8b(0x159)]===_0x5c1b8b(0x150))await handleSDKOutput(_0x2bfb9e,_0xf6d17a);else{console[_0x5c1b8b(0x136)](a39_0xf4d6e0[_0x5c1b8b(0x139)]('['+_0x482371+']'));const _0x4b0550=formatTree(_0x2bfb9e,{'showMetadata':!![],'showUrl':_0xe7471e,'getSegmentUrl':_0x5cc055});console[_0x5c1b8b(0x136)](_0x4b0550);}return 0x0;}}
|
package/dist/commands/show.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a40_0x3ed4b4=a40_0x5a67;(function(_0x4473cf,_0x26510f){const _0x409414=a40_0x5a67,_0x1c64a0=_0x4473cf();while(!![]){try{const _0x5d7d79=-parseInt(_0x409414(0x13b))/0x1+-parseInt(_0x409414(0x136))/0x2+parseInt(_0x409414(0x14a))/0x3+-parseInt(_0x409414(0x12e))/0x4*(parseInt(_0x409414(0x130))/0x5)+parseInt(_0x409414(0x137))/0x6*(-parseInt(_0x409414(0x148))/0x7)+-parseInt(_0x409414(0x147))/0x8+parseInt(_0x409414(0x144))/0x9*(parseInt(_0x409414(0x153))/0xa);if(_0x5d7d79===_0x26510f)break;else _0x1c64a0['push'](_0x1c64a0['shift']());}catch(_0x51a140){_0x1c64a0['push'](_0x1c64a0['shift']());}}}(a40_0x210f,0x6d179));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a40_0x5a67(_0x4f3a89,_0x2b52a2){_0x4f3a89=_0x4f3a89-0x12b;const _0x210f97=a40_0x210f();let _0x5a679d=_0x210f97[_0x4f3a89];return _0x5a679d;}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a40_0x210f(){const _0x1eefec=['limit','28ZRvNlj','args','510605VClVMV','name','database','error','Usage:\x20tdx\x20show\x20<database.table>','show','545602rtYuva','1449582zzFXDI','message','table','Table:\x20','94082nqHSRE','showTable','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Error:\x20','verbose','Catalog:\x20','data','...','query','9bbdpWP','length','\x20from\x20','5841360OGlTwU','14Ayqcly','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','123558yPOktl','description','✔\x20Retrieved\x20','execute','catalog','cause','Show\x20table\x20contents','Database:\x20','Querying\x20','27007490NMYaha','validate','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Limit:\x20'];a40_0x210f=function(){return _0x1eefec;};return a40_0x210f();}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a40_0x3ed4b4(0x131)]=a40_0x3ed4b4(0x135);[a40_0x3ed4b4(0x14b)]=a40_0x3ed4b4(0x150);async[a40_0x3ed4b4(0x14d)](_0x483287){return this['showTable'](_0x483287);}async[a40_0x3ed4b4(0x13c)](_0x529bb2){const _0xf09ee1=a40_0x3ed4b4,{options:_0x392562,args:_0x399853,tdx:_0x537d73}=_0x529bb2;let _0x3937f5;try{_0x3937f5=parseTableReference(_0x399853[0x0]);const _0x591d95=_0x392562['database'];!_0x3937f5['database']&&_0x591d95&&(_0x3937f5[_0xf09ee1(0x132)]=_0x591d95);const _0x2bf622=validateTableDescribeReference(_0x3937f5);if(_0x2bf622)return console[_0xf09ee1(0x133)](_0xf09ee1(0x13e)+_0x2bf622),console[_0xf09ee1(0x133)](_0xf09ee1(0x134)),console[_0xf09ee1(0x133)](_0xf09ee1(0x12b)),console[_0xf09ee1(0x133)](_0xf09ee1(0x13d)),0x1;}catch(_0x34c8de){return console[_0xf09ee1(0x133)](_0xf09ee1(0x13e)+_0x34c8de[_0xf09ee1(0x138)]),console['error'](_0xf09ee1(0x134)),console[_0xf09ee1(0x133)](_0xf09ee1(0x12b)),console[_0xf09ee1(0x133)](_0xf09ee1(0x13d)),0x1;}const _0x28f7d0=_0x3937f5[_0xf09ee1(0x14e)],_0x346512=_0x3937f5['database'],_0x521988=_0x3937f5[_0xf09ee1(0x139)],_0x5329eb=resolveLimit(_0x392562[_0xf09ee1(0x12d)],DEFAULT_DISPLAY_LIMIT);try{_0x392562[_0xf09ee1(0x13f)]&&(console['error']('Site:\x20'+_0x392562['site']),_0x28f7d0&&console[_0xf09ee1(0x133)](_0xf09ee1(0x140)+_0x28f7d0),console[_0xf09ee1(0x133)](_0xf09ee1(0x151)+_0x346512),console[_0xf09ee1(0x133)](_0xf09ee1(0x13a)+_0x521988),console[_0xf09ee1(0x133)](_0xf09ee1(0x12c)+_0x5329eb));const _0x4a071d=_0x28f7d0?_0x28f7d0+'.'+_0x346512+'.'+_0x521988:_0x346512+'.'+_0x521988,_0x285f3c=await withSpinner(_0xf09ee1(0x152)+_0x4a071d+_0xf09ee1(0x142),()=>_0x537d73[_0xf09ee1(0x143)][_0xf09ee1(0x13c)](_0x346512,_0x521988,_0x5329eb,_0x28f7d0),{'verbose':_0x392562['verbose']}),_0x519c7b=_0x285f3c['data'],_0x28db15=_0x519c7b[_0xf09ee1(0x141)];return _0x28db15[_0xf09ee1(0x145)]===0x0?console[_0xf09ee1(0x133)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0xf09ee1(0x133)](_0xf09ee1(0x14c)+_0x28db15[_0xf09ee1(0x145)]+'\x20row'+(_0x28db15[_0xf09ee1(0x145)]!==0x1?'s':'')+_0xf09ee1(0x146)+_0x4a071d),await handleSDKOutput(_0x28db15,_0x392562),0x0;}catch(_0x228af3){if(_0x228af3 instanceof SDKError)return console[_0xf09ee1(0x133)]('Error:\x20'+_0x228af3[_0xf09ee1(0x138)]),_0x228af3[_0xf09ee1(0x14f)]&&console['error']('\x20\x20Cause:\x20'+_0x228af3['cause']),0x1;throw _0x228af3;}}[a40_0x3ed4b4(0x154)](_0xde9eec){const _0x23681b=a40_0x3ed4b4;if(_0xde9eec[_0x23681b(0x12f)][_0x23681b(0x145)]===0x0)return _0x23681b(0x149);if(_0xde9eec[_0x23681b(0x12f)][_0x23681b(0x145)]>0x1)return'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';return undefined;}}
|
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x59e876=a41_0x1256;(function(_0x2ee612,_0x378364){const _0x587845=a41_0x1256,_0x285bef=_0x2ee612();while(!![]){try{const _0x50b630=parseInt(_0x587845(0x196))/0x1*(parseInt(_0x587845(0x1b7))/0x2)+-parseInt(_0x587845(0x1a4))/0x3+parseInt(_0x587845(0x1bf))/0x4+-parseInt(_0x587845(0x1c1))/0x5*(parseInt(_0x587845(0x1c2))/0x6)+-parseInt(_0x587845(0x1a2))/0x7*(-parseInt(_0x587845(0x1a1))/0x8)+parseInt(_0x587845(0x194))/0x9*(parseInt(_0x587845(0x1a9))/0xa)+-parseInt(_0x587845(0x1bb))/0xb;if(_0x50b630===_0x378364)break;else _0x285bef['push'](_0x285bef['shift']());}catch(_0x3de715){_0x285bef['push'](_0x285bef['shift']());}}}(a41_0x2a35,0xc4609));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a41_0x1256(_0x4baa44,_0x3e2cb6){_0x4baa44=_0x4baa44-0x194;const _0x2a3576=a41_0x2a35();let _0x1256e7=_0x2a3576[_0x4baa44];return _0x1256e7;}import{parseTableReference}from'../utils/table-ref-parser.js';function a41_0x2a35(){const _0x5301dc=['\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','name','.*\x22','site','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','table','Database:\x20','Listing\x20tables...','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','cause','error','verbose','2GAVxqq','limit','validate','Error:\x20','33606694rmonDV','database','Note:\x20\x27','Database:\x20all','5943592FHWJnr','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','5aKaNan','2818566UQMwAh','Table\x20pattern:\x20','785727cRpjCZ','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','1601429tmJUmY','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Site:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','length','message','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','data','Database\x20pattern:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20across\x20all\x20databases.','8Hpfdtd','9161999xKBUpz','includes','2034087CZGmQG','description','\x20\x20Cause:\x20','Error:\x20Pattern\x20\x27','execute','70eMnjqT','Or\x20use\x20--in\x20flag:'];a41_0x2a35=function(){return _0x5301dc;};return a41_0x2a35();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a41_0x59e876(0x1ac)]='tables';[a41_0x59e876(0x1a5)]='List\x20tables\x20in\x20a\x20database';async[a41_0x59e876(0x1a8)](_0x50e275){const _0x1b1a7e=a41_0x59e876,{options:_0x4e2f36,args:_0x4eb5b3,tdx:_0x191b3a}=_0x50e275;let _0x1ace0a;if(_0x4eb5b3['length']===0x0)_0x1ace0a={'database':undefined,'table':undefined,'original':''};else{if(_0x4eb5b3[_0x1b1a7e(0x19a)]===0x1)try{_0x1ace0a=parseTableReference(_0x4eb5b3[0x0]);if(_0x1ace0a[_0x1b1a7e(0x1b0)]&&!_0x1ace0a[_0x1b1a7e(0x1bc)]&&!_0x1ace0a[_0x1b1a7e(0x1b0)][_0x1b1a7e(0x1a3)]('*')&&!_0x1ace0a['table']['includes']('?'))return console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1a7)+_0x4eb5b3[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1b3)+_0x1ace0a[_0x1b1a7e(0x1b0)]+'\x27?'),console['error'](_0x1b1a7e(0x199)+_0x1ace0a[_0x1b1a7e(0x1b0)]+_0x1b1a7e(0x1ad)),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x19c)+_0x1ace0a[_0x1b1a7e(0x1b0)]),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x19f)+_0x1ace0a['table']),console['error'](''),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1bd)+_0x4eb5b3[0x0]+_0x1b1a7e(0x1af)+_0x1ace0a[_0x1b1a7e(0x1b0)]+_0x1b1a7e(0x1a0)),0x1;}catch(_0x131295){return console[_0x1b1a7e(0x1b5)]('Error:\x20'+_0x131295[_0x1b1a7e(0x19b)]),0x1;}else return console[_0x1b1a7e(0x1b5)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x1b1a7e(0x1b5)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console['error'](_0x1b1a7e(0x1ab)),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x195)),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x197)),console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1aa)),console['error'](_0x1b1a7e(0x1c0)),0x1;}const _0xc24530=_0x4e2f36['database'];!_0x1ace0a[_0x1b1a7e(0x1bc)]&&_0xc24530&&(_0x1ace0a[_0x1b1a7e(0x1bc)]=_0xc24530);try{const _0xb741b5=_0x232b57=>_0x232b57&&(_0x232b57[_0x1b1a7e(0x1a3)]('*')||_0x232b57[_0x1b1a7e(0x1a3)]('?')),_0x2fbb8b=_0xb741b5(_0x1ace0a[_0x1b1a7e(0x1bc)]);_0x4e2f36[_0x1b1a7e(0x1b6)]&&(console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x198)+_0x4e2f36[_0x1b1a7e(0x1ae)]),_0x1ace0a[_0x1b1a7e(0x1bc)]?_0x2fbb8b?console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x19e)+_0x1ace0a[_0x1b1a7e(0x1bc)]):console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1b1)+_0x1ace0a['database']):console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1be)),_0x1ace0a['table']&&console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1c3)+_0x1ace0a[_0x1b1a7e(0x1b0)]));const _0x5c6411=_0x1ace0a[_0x1b1a7e(0x1bc)]&&!_0x2fbb8b?_0x1ace0a[_0x1b1a7e(0x1bc)]:undefined,_0x1e2381=_0x2fbb8b?_0x1ace0a[_0x1b1a7e(0x1bc)]:undefined,_0xa83105=_0x1ace0a[_0x1b1a7e(0x1b0)],_0x1344c2=resolveLimit(_0x4e2f36[_0x1b1a7e(0x1b8)],DEFAULT_LISTING_LIMIT),_0x2ffc00=await withSpinner(_0x1b1a7e(0x1b2),()=>_0x191b3a['query']['listTables'](_0x5c6411,_0xa83105,_0x1e2381,_0x1344c2),{'verbose':_0x4e2f36['verbose']}),_0x35bdc9=_0x2ffc00[_0x1b1a7e(0x19d)];if(_0x35bdc9[_0x1b1a7e(0x19a)]===0x0&&_0x1ace0a['database']&&!_0x2fbb8b)return console[_0x1b1a7e(0x1b5)]('✖\x20No\x20tables\x20found'),console['error']('Database\x20\x27'+_0x1ace0a[_0x1b1a7e(0x1bc)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x1b1a7e(0x1b5)]('✔\x20Found\x20'+_0x35bdc9[_0x1b1a7e(0x19a)]+'\x20table'+(_0x35bdc9[_0x1b1a7e(0x19a)]!==0x1?'s':'')),await handleSDKOutput(_0x35bdc9,{..._0x4e2f36,'limit':_0x1344c2}),0x0;}catch(_0x5a299a){if(_0x5a299a instanceof SDKError)return console['error'](_0x1b1a7e(0x1ba)+_0x5a299a[_0x1b1a7e(0x19b)]),_0x5a299a[_0x1b1a7e(0x1b4)]&&console[_0x1b1a7e(0x1b5)](_0x1b1a7e(0x1a6)+_0x5a299a['cause']),0x1;throw _0x5a299a;}}[a41_0x59e876(0x1b9)](_0x32f08f){return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x5d26e8=a42_0x21a0;function a42_0x21a0(_0x1e8243,_0x193f3a){_0x1e8243=_0x1e8243-0x1e3;const _0xa28f2f=a42_0xa28f();let _0x21a089=_0xa28f2f[_0x1e8243];return _0x21a089;}(function(_0x1c6831,_0x33d437){const _0x4f758c=a42_0x21a0,_0x5a7ff0=_0x1c6831();while(!![]){try{const _0x3596be=parseInt(_0x4f758c(0x1f5))/0x1+-parseInt(_0x4f758c(0x1f1))/0x2*(parseInt(_0x4f758c(0x217))/0x3)+-parseInt(_0x4f758c(0x1fc))/0x4*(parseInt(_0x4f758c(0x203))/0x5)+parseInt(_0x4f758c(0x1ea))/0x6+-parseInt(_0x4f758c(0x210))/0x7*(parseInt(_0x4f758c(0x1f3))/0x8)+-parseInt(_0x4f758c(0x20e))/0x9*(-parseInt(_0x4f758c(0x200))/0xa)+-parseInt(_0x4f758c(0x1ee))/0xb*(-parseInt(_0x4f758c(0x1eb))/0xc);if(_0x3596be===_0x33d437)break;else _0x5a7ff0['push'](_0x5a7ff0['shift']());}catch(_0x519273){_0x5a7ff0['push'](_0x5a7ff0['shift']());}}}(a42_0xa28f,0x78c7d));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a42_0xa28f(){const _0x25366c=['Session\x20profile\x20set\x20to:\x20','engage_workspace','name','33FJTuhj','Invalid\x20resource:\x20','agent','Error:\x20','Error:\x20Profile\x20\x27','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','parent_segment','green','Session\x20engage_workspace\x20set\x20to:\x20','cleared','error','display','4311492gLkIHW','10167348VAWPZd','Session\x20context\x20','displayWithSources','11oVHqfV','Set\x20session-level\x20context','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','156572AyjmMB','log','1088XUhTyy','dim','666632xxMKtY','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','(session:\x20','llm_project','clear','\x27\x20does\x20not\x20exist','includes','3656948NmnOHk','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','database','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','30NqbtEk','use','llm_agent','5DEpUqf','execute','profile','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','join','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20agent\x20set\x20to:\x20','Session\x20llm_project\x20set\x20to:\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','length','113229hgrRkY','Session\x20parent_segment\x20set\x20to:\x20','7MtSqIK','toString','debug','session'];a42_0xa28f=function(){return _0x25366c;};return a42_0xa28f();}import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import a42_0x5f0a37 from'chalk';export class UseCommand extends BaseCommand{[a42_0x5d26e8(0x216)]=a42_0x5d26e8(0x201);[a42_0x5d26e8(0x208)]=a42_0x5d26e8(0x1ef);['validate'](_0x591693){const _0xa40ed=a42_0x5d26e8,{args:_0x15ac56}=_0x591693;if(_0x15ac56[_0xa40ed(0x20d)]===0x0)return undefined;if(_0x15ac56[_0xa40ed(0x20d)]===0x1)return _0xa40ed(0x1f0)+_0xa40ed(0x1ff)+_0xa40ed(0x209)+_0xa40ed(0x1e3)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x473ce7=_0x15ac56[0x0],_0x28890f=[_0xa40ed(0x1fe),'parent_segment',_0xa40ed(0x1f8),_0xa40ed(0x219),_0xa40ed(0x205),_0xa40ed(0x215)];if(!_0x28890f[_0xa40ed(0x1fb)](_0x473ce7))return _0xa40ed(0x218)+_0x473ce7+'.\x20Must\x20be\x20one\x20of:\x20'+_0x28890f[_0xa40ed(0x207)](',\x20');return undefined;}async[a42_0x5d26e8(0x204)](_0x51e128){const _0x51ca6d=a42_0x5d26e8,{args:_0x7db326,options:_0x7172cb}=_0x51e128,_0x43776a=_0x7172cb[_0x51ca6d(0x212)],_0x381ee6=_0x7172cb[_0x51ca6d(0x1f9)];cleanExpiredSessions();try{if(_0x381ee6){clearSessionContext(_0x7172cb[_0x51ca6d(0x213)]);const _0x28e539=_0x7172cb[_0x51ca6d(0x213)]||getCurrentSessionPID()[_0x51ca6d(0x211)]();return console[_0x51ca6d(0x1f2)](_0x51ca6d(0x1ec)+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0x51ca6d(0x1e7))+'\x20'+a42_0x5f0a37['dim']('(session:\x20'+_0x28e539+')')),0x0;}if(_0x7db326[_0x51ca6d(0x20d)]===0x0){const _0x43d533=new GlobalContext(_0x7172cb);return _0x43776a?_0x43d533[_0x51ca6d(0x1ed)]():_0x43d533[_0x51ca6d(0x1e9)](),console[_0x51ca6d(0x1f2)](a42_0x5f0a37['dim'](_0x51ca6d(0x20c))),console['log'](a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1fd))),0x0;}const _0x1ba2c7=_0x7db326[0x0],_0xe12859=_0x7db326[0x1];if(_0x1ba2c7===_0x51ca6d(0x205)){if(!profileExists(_0xe12859))return console[_0x51ca6d(0x1e8)](_0x51ca6d(0x21b)+_0xe12859+_0x51ca6d(0x1fa)),console[_0x51ca6d(0x1e8)](_0x51ca6d(0x206)),0x1;const _0x135925=_0x7172cb[_0x51ca6d(0x213)]||getCurrentSessionPID()[_0x51ca6d(0x211)]();return saveSessionContext({'profile':_0xe12859},_0x7172cb[_0x51ca6d(0x213)]),console['log'](_0x51ca6d(0x214)+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0xe12859)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f7)+_0x135925+')')),console[_0x51ca6d(0x1f2)](a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f6))),0x0;}const _0x429b76={},_0x4a1819=_0x7172cb['session']||getCurrentSessionPID()[_0x51ca6d(0x211)]();switch(_0x1ba2c7){case'database':_0x429b76[_0x51ca6d(0x1fe)]=_0xe12859,console['log']('Session\x20database\x20set\x20to:\x20'+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0xe12859)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f7)+_0x4a1819+')'));break;case'parent_segment':_0x429b76[_0x51ca6d(0x1e4)]=_0xe12859,console[_0x51ca6d(0x1f2)](_0x51ca6d(0x20f)+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0xe12859)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f7)+_0x4a1819+')'));break;case _0x51ca6d(0x1f8):_0x429b76[_0x51ca6d(0x1f8)]=_0xe12859,console[_0x51ca6d(0x1f2)](_0x51ca6d(0x20b)+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0xe12859)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)]('(session:\x20'+_0x4a1819+')'));break;case _0x51ca6d(0x219):{const {projectName:_0x53a7f4,agentName:_0x5c1bad}=parseAgentRef(_0xe12859);_0x5c1bad?(_0x429b76['llm_project']=_0x53a7f4,_0x429b76[_0x51ca6d(0x202)]=_0x5c1bad,console['log'](_0x51ca6d(0x20b)+a42_0x5f0a37['green'](_0x53a7f4)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f7)+_0x4a1819+')')),console[_0x51ca6d(0x1f2)]('Session\x20agent\x20set\x20to:\x20'+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0x5c1bad)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)]('(session:\x20'+_0x4a1819+')'))):(_0x429b76[_0x51ca6d(0x202)]=_0xe12859,console[_0x51ca6d(0x1f2)](_0x51ca6d(0x20a)+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0xe12859)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f7)+_0x4a1819+')')));break;}case _0x51ca6d(0x215):_0x429b76['engage_workspace']=_0xe12859,console[_0x51ca6d(0x1f2)](_0x51ca6d(0x1e6)+a42_0x5f0a37[_0x51ca6d(0x1e5)](_0xe12859)+'\x20'+a42_0x5f0a37[_0x51ca6d(0x1f4)]('(session:\x20'+_0x4a1819+')'));break;}return saveSessionContext(_0x429b76,_0x7172cb['session']),console[_0x51ca6d(0x1f2)](a42_0x5f0a37[_0x51ca6d(0x1f4)](_0x51ca6d(0x1f6))),0x0;}catch(_0xad6e37){return _0xad6e37 instanceof Error&&console[_0x51ca6d(0x1e8)](_0x51ca6d(0x21a)+_0xad6e37['message']),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a43_0x559137=a43_0x2d4d;(function(_0x443be2,_0x248c87){const _0x26a6d4=a43_0x2d4d,_0x18a175=_0x443be2();while(!![]){try{const _0x51d926=-parseInt(_0x26a6d4(0x179))/0x1+-parseInt(_0x26a6d4(0x17e))/0x2*(-parseInt(_0x26a6d4(0x16b))/0x3)+-parseInt(_0x26a6d4(0x17c))/0x4+-parseInt(_0x26a6d4(0x16c))/0x5+-parseInt(_0x26a6d4(0x167))/0x6+parseInt(_0x26a6d4(0x166))/0x7+parseInt(_0x26a6d4(0x16f))/0x8;if(_0x51d926===_0x248c87)break;else _0x18a175['push'](_0x18a175['shift']());}catch(_0x2fc6f7){_0x18a175['push'](_0x18a175['shift']());}}}(a43_0x30e6,0x8ef18));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a43_0x30e6(){const _0x580d66=['4214784dBVSsS','error','execute','message','141kjPqMo','5391120xRzyOc','Fetching\x20user\x20info...','getCurrent','8740696Ulthcc','description','Show\x20current\x20user\x20information','user','verbose','✔\x20Found\x20','data','length','cause','Error:\x20','208890oIFakw','\x20user','name','1863952QUTnNE','user\x20list','37958MVtTWL','\x20\x20Cause:\x20','Listing\x20users...','list','7395234mjCewp'];a43_0x30e6=function(){return _0x580d66;};return a43_0x30e6();}import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';function a43_0x2d4d(_0x591b3e,_0x192edd){_0x591b3e=_0x591b3e-0x164;const _0x30e6a0=a43_0x30e6();let _0x2d4d02=_0x30e6a0[_0x591b3e];return _0x2d4d02;}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a43_0x559137(0x17b)]='user';[a43_0x559137(0x170)]=a43_0x559137(0x171);async[a43_0x559137(0x169)](_0x33af18){const _0x4df5f1=a43_0x559137,{options:_0x25f699,tdx:_0x39e99c}=_0x33af18;try{const _0x4c119b=await withSpinner(_0x4df5f1(0x16d),()=>_0x39e99c[_0x4df5f1(0x172)][_0x4df5f1(0x16e)](),{'verbose':_0x25f699[_0x4df5f1(0x173)]}),_0x1d59a2=_0x4c119b[_0x4df5f1(0x175)];return await handleSingleObjectOutput(_0x1d59a2,_0x25f699),0x0;}catch(_0x448219){if(_0x448219 instanceof SDKError)return console[_0x4df5f1(0x168)]('Error:\x20'+_0x448219[_0x4df5f1(0x16a)]),_0x448219[_0x4df5f1(0x177)]&&console[_0x4df5f1(0x168)](_0x4df5f1(0x17f)+_0x448219['cause']),0x1;throw _0x448219;}}}export class UserListCommand extends BaseCommand{[a43_0x559137(0x17b)]=a43_0x559137(0x17d);['description']='List\x20all\x20users\x20in\x20the\x20account';async[a43_0x559137(0x169)](_0x2fa543){const _0x3d663e=a43_0x559137,{options:_0x1f99e0,tdx:_0xf897f}=_0x2fa543;try{const _0x2320af=await withSpinner(_0x3d663e(0x164),()=>_0xf897f[_0x3d663e(0x172)][_0x3d663e(0x165)](),{'verbose':_0x1f99e0['verbose']}),_0x388742=_0x2320af[_0x3d663e(0x175)];return console[_0x3d663e(0x168)](_0x3d663e(0x174)+_0x388742[_0x3d663e(0x176)]+_0x3d663e(0x17a)+(_0x388742[_0x3d663e(0x176)]!==0x1?'s':'')),await handleSDKOutput(_0x388742,_0x1f99e0),0x0;}catch(_0x387a30){if(_0x387a30 instanceof SDKError)return console[_0x3d663e(0x168)](_0x3d663e(0x178)+_0x387a30['message']),_0x387a30[_0x3d663e(0x177)]&&console[_0x3d663e(0x168)](_0x3d663e(0x17f)+_0x387a30[_0x3d663e(0x177)]),0x1;throw _0x387a30;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x9c18ca=a44_0x17b7;(function(_0x1022f1,_0x278bd3){const _0x13d883=a44_0x17b7,_0x46b1ae=_0x1022f1();while(!![]){try{const _0x511242=parseInt(_0x13d883(0x148))/0x1*(parseInt(_0x13d883(0x140))/0x2)+parseInt(_0x13d883(0x165))/0x3+-parseInt(_0x13d883(0x191))/0x4+-parseInt(_0x13d883(0x15d))/0x5+parseInt(_0x13d883(0x15b))/0x6*(-parseInt(_0x13d883(0x177))/0x7)+parseInt(_0x13d883(0x150))/0x8*(parseInt(_0x13d883(0x1bf))/0x9)+parseInt(_0x13d883(0x162))/0xa*(parseInt(_0x13d883(0x1c5))/0xb);if(_0x511242===_0x278bd3)break;else _0x46b1ae['push'](_0x46b1ae['shift']());}catch(_0x2cb7b7){_0x46b1ae['push'](_0x46b1ae['shift']());}}}(a44_0x5c23,0x4e06e));function a44_0x5c23(){const _0x72530a=['getTime','substring','Error:\x20Workflow\x20identifier\x20is\x20required','Show\x20tasks\x20for\x20an\x20attempt','Force:\x20yes','workflow:run','createdAt','7ZXNgbl','\x20is\x20not\x20a\x20directory','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Kill\x20a\x20running\x20attempt','Output\x20directory:\x20','\x20\x20Project\x20ID:\x20','includeRetried','running','workflow:workflows','select','Error:\x20Attempt\x20ID\x20is\x20required','from','workflow','sessionId','Params:\x20','Project\x20name:\x20','execute','index','Project\x20filter:\x20','...','✔\x20Workflow\x20run\x20started','readFile','Show\x20logs\x20for\x20a\x20workflow\x20attempt','format','workflow:retry','List\x20workflow\x20execution\x20sessions','1193764luZhJl','status','keys','retryAttempt','reason','param','indexOf','Pushing\x20workflow\x20project...','stat','✔\x20Found\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','Filter:\x20project=','attempt:','✔\x20Pushed\x20','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','cancelRequested','startsWith','params','Deleting\x20project\x20','includeSubtasks','Expected\x20format:\x20--param\x20key=value','\x20attempt','map','✔\x20Deleted\x20project\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Pattern:\x20','workflow:delete','Filter:\x20','projectName','done','Session\x20time:\x20','limit','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','workflow:download','length','download','filesExtracted','\x20\x20Attempt\x20ID:\x20','parse','yes','Error:\x20','utf-8','resumeFrom','attemptId','Reason:\x20','fromTask','99mouGLv','workflow:push','\x20\x20Revision:\x20','isDirectory','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','task','276441fkRMoq','error','message','Retrying\x20attempt...','Retry\x20a\x20session\x20or\x20attempt','cause','Attempt\x20ID:\x20','Select\x20a\x20task\x20to\x20view\x20logs:','round','Target:\x20','\x20\x20Files\x20extracted:\x20','Starting\x20workflow\x20run...','retrySession','List\x20workflows','\x20project','delete','workflow:kill','split','✔\x20Retry\x20started','projectId','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Session\x20ID:\x20','log','projects','verbose','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','kill','session','Listing\x20workflows...','Including\x20subtasks:\x20yes','logs','Task\x20name:\x20','Downloading\x20project\x20','push','name','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x20\x20Project:\x20','8zTWnbt','fileSize','workflow:attempt','project','\x20workflow','List\x20workflow\x20attempts','attempts','revision','52406pBDyrx','\x20\x20New\x20attempt\x20ID:\x20','skipValidation','\x20session','finishedAt','success','Start\x20a\x20workflow\x20run','Getting\x20attempt\x20details...','159944SrAGSx','Show\x20specific\x20attempt\x20details','taskName','Revision:\x20','Parameters:\x20','attempt','Listing\x20workflow\x20projects...','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Cancelled','retryAttemptName','Status:\x20','487752nWSGnO','isArray','2107915EtoMeM','Include\x20retried:\x20yes','json','description','workflow:sessions','70rXfEmD','Getting\x20attempt\x20tasks...','sessions','1546350PnAhAD','\x20\x20Cause:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','sessionTime','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflow:logs','Retrying\x20session...','workflow:tasks','Error:\x20Invalid\x20parameter\x20format:\x20','\x20\x20Location:\x20','data'];a44_0x5c23=function(){return _0x72530a;};return a44_0x5c23();}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';function a44_0x17b7(_0x6979a3,_0x53a418){_0x6979a3=_0x6979a3-0x138;const _0x5c2300=a44_0x5c23();let _0x17b767=_0x5c2300[_0x6979a3];return _0x17b767;}import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a44_0x19105c from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]='workflow:projects';[a44_0x9c18ca(0x160)]='List\x20all\x20workflow\x20projects';async[a44_0x9c18ca(0x187)](_0x308519){const _0x45d822=a44_0x9c18ca,{options:_0x302a96,args:_0x15beb2,tdx:_0x14b017}=_0x308519,_0x383091=_0x15beb2[0x0];try{_0x302a96['verbose']&&_0x383091&&console['error'](_0x45d822(0x1aa)+_0x383091);const _0x247c94=await withSpinner(_0x45d822(0x156),()=>_0x14b017['workflow'][_0x45d822(0x1de)](_0x383091,{'limit':_0x302a96[_0x45d822(0x1b0)]}),{'verbose':_0x302a96[_0x45d822(0x1df)]}),_0x24d537=_0x247c94['data'];return console['error'](_0x45d822(0x19a)+_0x24d537[_0x45d822(0x1b3)]+_0x45d822(0x1d3)+(_0x24d537['length']!==0x1?'s':'')),await handleSDKOutput(_0x24d537,_0x302a96),0x0;}catch(_0x5b57f7){if(_0x5b57f7 instanceof SDKError)return console[_0x45d822(0x1c6)](_0x45d822(0x1b9)+_0x5b57f7[_0x45d822(0x1c7)]),_0x5b57f7[_0x45d822(0x1ca)]&&console['error'](_0x45d822(0x166)+_0x5b57f7[_0x45d822(0x1ca)]),0x1;throw _0x5b57f7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x17f);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x1d2);async[a44_0x9c18ca(0x187)](_0x59d73a){const _0x363b88=a44_0x9c18ca,{options:_0x79d1aa,args:_0x42fca4,tdx:_0x2871ef}=_0x59d73a,_0x57a4cb=_0x42fca4[0x0];try{_0x79d1aa[_0x363b88(0x1df)]&&_0x57a4cb&&console['error'](_0x363b88(0x189)+_0x57a4cb);const _0x590e7b=await withSpinner(_0x363b88(0x1e3),()=>_0x2871ef['workflow']['workflows'](_0x57a4cb,{'limit':_0x79d1aa[_0x363b88(0x1b0)]}),{'verbose':_0x79d1aa[_0x363b88(0x1df)]}),_0x37fb54=_0x590e7b[_0x363b88(0x16f)];return console['error']('✔\x20Found\x20'+_0x37fb54[_0x363b88(0x1b3)]+_0x363b88(0x144)+(_0x37fb54[_0x363b88(0x1b3)]!==0x1?'s':'')),await handleSDKOutput(_0x37fb54,_0x79d1aa),0x0;}catch(_0x142b8a){if(_0x142b8a instanceof SDKError)return console[_0x363b88(0x1c6)](_0x363b88(0x1b9)+_0x142b8a[_0x363b88(0x1c7)]),_0x142b8a[_0x363b88(0x1ca)]&&console[_0x363b88(0x1c6)](_0x363b88(0x166)+_0x142b8a[_0x363b88(0x1ca)]),0x1;throw _0x142b8a;}}}export class WorkflowSessionsCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x161);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x190);async[a44_0x9c18ca(0x187)](_0x4ec03a){const _0xeb0ecf=a44_0x9c18ca,{options:_0x6a6a90,args:_0x322cf0,tdx:_0x5f2804}=_0x4ec03a;let _0x3f21ac,_0xbe682a;if(_0x322cf0[0x0]){const _0x5d3fc9=_0x322cf0[0x0][_0xeb0ecf(0x1d6)]('.');if(_0x5d3fc9['length']===0x1)_0x3f21ac=_0x5d3fc9[0x0];else{if(_0x5d3fc9['length']===0x2)[_0x3f21ac,_0xbe682a]=_0x5d3fc9;else return console[_0xeb0ecf(0x1c6)](_0xeb0ecf(0x169)),0x1;}}try{if(_0x6a6a90['verbose']){if(_0x3f21ac&&_0xbe682a)console['error'](_0xeb0ecf(0x1ac)+_0x3f21ac+'.'+_0xbe682a);else _0x3f21ac&&console[_0xeb0ecf(0x1c6)](_0xeb0ecf(0x19c)+_0x3f21ac);const _0xf9f477=_0x6a6a90['status'];_0xf9f477&&console[_0xeb0ecf(0x1c6)](_0xeb0ecf(0x15a)+_0xf9f477);}const _0x806a2=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x5f2804[_0xeb0ecf(0x183)][_0xeb0ecf(0x164)]({'projectName':_0x3f21ac,'workflowName':_0xbe682a,'status':_0x6a6a90[_0xeb0ecf(0x192)],'fromTime':_0x6a6a90[_0xeb0ecf(0x182)],'toTime':_0x6a6a90['to'],'limit':_0x6a6a90[_0xeb0ecf(0x1b0)]}),{'verbose':_0x6a6a90[_0xeb0ecf(0x1df)]}),_0xd28537=_0x806a2[_0xeb0ecf(0x16f)];return console[_0xeb0ecf(0x1c6)](_0xeb0ecf(0x19a)+_0xd28537['length']+_0xeb0ecf(0x14b)+(_0xd28537['length']!==0x1?'s':'')),await handleSDKOutput(_0xd28537,_0x6a6a90),0x0;}catch(_0x598e62){if(_0x598e62 instanceof SDKError)return console['error']('Error:\x20'+_0x598e62[_0xeb0ecf(0x1c7)]),_0x598e62['cause']&&console[_0xeb0ecf(0x1c6)](_0xeb0ecf(0x166)+_0x598e62[_0xeb0ecf(0x1ca)]),0x1;throw _0x598e62;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']='workflow:attempts';['description']=a44_0x9c18ca(0x145);async['execute'](_0x4c1234){const _0x521b75=a44_0x9c18ca,{options:_0x2a839a,args:_0x1a104f,tdx:_0x22d010}=_0x4c1234;let _0x18adcc,_0x20c116;if(_0x1a104f[0x0]){const _0x38ec5c=_0x1a104f[0x0][_0x521b75(0x1d6)]('.');if(_0x38ec5c['length']===0x1)_0x18adcc=_0x38ec5c[0x0];else{if(_0x38ec5c[_0x521b75(0x1b3)]===0x2)[_0x18adcc,_0x20c116]=_0x38ec5c;else return console[_0x521b75(0x1c6)](_0x521b75(0x169)),0x1;}}try{const _0x2b659a=_0x2a839a[_0x521b75(0x17d)];if(_0x2a839a[_0x521b75(0x1df)]){if(_0x18adcc&&_0x20c116)console[_0x521b75(0x1c6)](_0x521b75(0x1ac)+_0x18adcc+'.'+_0x20c116);else _0x18adcc&&console[_0x521b75(0x1c6)](_0x521b75(0x19c)+_0x18adcc);_0x2b659a&&console[_0x521b75(0x1c6)](_0x521b75(0x15e));}const _0x3ff32a=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x22d010[_0x521b75(0x183)][_0x521b75(0x146)]({'projectName':_0x18adcc,'workflowName':_0x20c116,'includeRetried':_0x2b659a,'limit':_0x2a839a[_0x521b75(0x1b0)]}),{'verbose':_0x2a839a[_0x521b75(0x1df)]}),_0x4cec00=_0x3ff32a[_0x521b75(0x16f)];return console[_0x521b75(0x1c6)](_0x521b75(0x19a)+_0x4cec00['length']+_0x521b75(0x1a6)+(_0x4cec00[_0x521b75(0x1b3)]!==0x1?'s':'')),await handleSDKOutput(_0x4cec00,_0x2a839a),0x0;}catch(_0x47a9f4){if(_0x47a9f4 instanceof SDKError)return console[_0x521b75(0x1c6)]('Error:\x20'+_0x47a9f4[_0x521b75(0x1c7)]),_0x47a9f4['cause']&&console['error']('\x20\x20Cause:\x20'+_0x47a9f4['cause']),0x1;throw _0x47a9f4;}}}export class WorkflowAttemptCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x142);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x151);async[a44_0x9c18ca(0x187)](_0x18fb29){const _0x5bf906=a44_0x9c18ca,{options:_0x2cbd44,args:_0x5dbd84,tdx:_0x31ef7f}=_0x18fb29,_0xa31ee2=_0x5dbd84[0x0];if(!_0xa31ee2)return console[_0x5bf906(0x1c6)](_0x5bf906(0x181)),0x1;try{_0x2cbd44[_0x5bf906(0x1df)]&&console[_0x5bf906(0x1c6)](_0x5bf906(0x1cb)+_0xa31ee2);const _0x51b511=await withSpinner(_0x5bf906(0x14f),()=>_0x31ef7f[_0x5bf906(0x183)][_0x5bf906(0x155)](_0xa31ee2),{'verbose':_0x2cbd44[_0x5bf906(0x1df)]}),_0x28c9d3=_0x51b511[_0x5bf906(0x16f)];let _0x97bec3;!_0x28c9d3[_0x5bf906(0x1ae)]?_0x97bec3=_0x28c9d3[_0x5bf906(0x1a0)]?'canceling':_0x5bf906(0x17e):_0x97bec3=_0x28c9d3[_0x5bf906(0x14d)]?_0x5bf906(0x14d):_0x5bf906(0x1c6);let _0x4193fc;if(_0x28c9d3[_0x5bf906(0x176)]&&_0x28c9d3[_0x5bf906(0x14c)]){const _0x1a0047=new Date(_0x28c9d3[_0x5bf906(0x176)])[_0x5bf906(0x170)](),_0x3afb03=new Date(_0x28c9d3[_0x5bf906(0x14c)])[_0x5bf906(0x170)]();_0x4193fc=Math[_0x5bf906(0x1cd)]((_0x3afb03-_0x1a0047)/0x3e8);}const _0x2e2108={'attempt_id':_0x28c9d3['id'],'status':_0x97bec3,..._0x28c9d3[_0x5bf906(0x188)]!==undefined&&{'index':_0x28c9d3['index']},..._0x28c9d3[_0x5bf906(0x143)]&&{'project':_0x28c9d3[_0x5bf906(0x143)][_0x5bf906(0x13d)]},..._0x28c9d3['workflow']&&{'workflow':_0x28c9d3['workflow'][_0x5bf906(0x13d)]},..._0x28c9d3[_0x5bf906(0x184)]&&{'session_id':_0x28c9d3[_0x5bf906(0x184)]},..._0x28c9d3['sessionTime']&&{'session_time':_0x28c9d3[_0x5bf906(0x168)]},..._0x28c9d3[_0x5bf906(0x159)]&&{'retry_attempt':_0x28c9d3[_0x5bf906(0x159)]},..._0x4193fc!==undefined&&{'duration_sec':_0x4193fc},..._0x28c9d3[_0x5bf906(0x176)]&&{'created_at':_0x28c9d3[_0x5bf906(0x176)]},..._0x28c9d3[_0x5bf906(0x14c)]&&{'finished_at':_0x28c9d3['finishedAt']},...Object[_0x5bf906(0x193)](_0x28c9d3[_0x5bf906(0x1a2)])[_0x5bf906(0x1b3)]>0x0&&{'params':_0x28c9d3['params']}};return await handleSingleObjectOutput(_0x2e2108,_0x2cbd44),0x0;}catch(_0x26d36a){if(_0x26d36a instanceof SDKError)return console[_0x5bf906(0x1c6)](_0x5bf906(0x1b9)+_0x26d36a[_0x5bf906(0x1c7)]),_0x26d36a[_0x5bf906(0x1ca)]&&console['error'](_0x5bf906(0x166)+_0x26d36a[_0x5bf906(0x1ca)]),0x1;throw _0x26d36a;}}}export class WorkflowTasksCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x16c);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x173);async[a44_0x9c18ca(0x187)](_0x41119f){const _0x26a10f=a44_0x9c18ca,{options:_0x39cda6,args:_0x59730f,tdx:_0x1d0f3b}=_0x41119f,_0x17644d=_0x59730f[0x0];if(!_0x17644d)return console[_0x26a10f(0x1c6)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x4c4dd0=_0x39cda6[_0x26a10f(0x1a4)];_0x39cda6['verbose']&&(console[_0x26a10f(0x1c6)](_0x26a10f(0x1cb)+_0x17644d),_0x4c4dd0&&console['error'](_0x26a10f(0x138)));const _0x3c556b=await withSpinner(_0x26a10f(0x163),()=>_0x1d0f3b['workflow']['tasks'](_0x17644d,_0x4c4dd0||![]),{'verbose':_0x39cda6[_0x26a10f(0x1df)]}),_0x4f2ba5=_0x3c556b[_0x26a10f(0x16f)];return console[_0x26a10f(0x1c6)]('✔\x20Found\x20'+_0x4f2ba5[_0x26a10f(0x1b3)]+'\x20task'+(_0x4f2ba5[_0x26a10f(0x1b3)]!==0x1?'s':'')),await handleSDKOutput(_0x4f2ba5,_0x39cda6),0x0;}catch(_0x9bbfe0){if(_0x9bbfe0 instanceof SDKError)return console[_0x26a10f(0x1c6)](_0x26a10f(0x1b9)+_0x9bbfe0[_0x26a10f(0x1c7)]),_0x9bbfe0['cause']&&console[_0x26a10f(0x1c6)]('\x20\x20Cause:\x20'+_0x9bbfe0[_0x26a10f(0x1ca)]),0x1;throw _0x9bbfe0;}}}export class WorkflowLogsCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x16a);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x18d);async[a44_0x9c18ca(0x187)](_0xc83e09){const _0x37c8cf=a44_0x9c18ca,{options:_0x47898f,args:_0x247029,tdx:_0x564b47}=_0xc83e09,_0x1f5d28=_0x247029[0x0];let _0x4c328d=_0x247029[0x1];if(!_0x1f5d28)return console['error'](_0x37c8cf(0x181)),0x1;try{_0x47898f[_0x37c8cf(0x1df)]&&(console[_0x37c8cf(0x1c6)](_0x37c8cf(0x1cb)+_0x1f5d28),_0x4c328d&&console[_0x37c8cf(0x1c6)](_0x37c8cf(0x13a)+_0x4c328d));const _0x3353c7=await withSpinner('Fetching\x20log\x20files...',()=>_0x564b47[_0x37c8cf(0x183)]['logFiles'](_0x1f5d28,_0x4c328d),{'verbose':_0x47898f[_0x37c8cf(0x1df)]}),_0x25b92f=_0x3353c7[_0x37c8cf(0x16f)];if(_0x25b92f[_0x37c8cf(0x1b3)]===0x0)return console['error'](_0x37c8cf(0x1da)),0x0;if(!_0x4c328d&&(_0x47898f[_0x37c8cf(0x15f)]||_0x47898f[_0x37c8cf(0x18e)]))return await handleSDKOutput(_0x25b92f,_0x47898f),0x0;if(!_0x4c328d){const _0x588014=_0x25b92f[_0x37c8cf(0x1a7)](_0x520cf2=>({'title':_0x520cf2['taskName']+'\x20('+formatBytes(_0x520cf2[_0x37c8cf(0x141)])+')','value':_0x520cf2[_0x37c8cf(0x152)]})),_0x2cea1c=await a44_0x19105c({'type':_0x37c8cf(0x180),'name':_0x37c8cf(0x1c4),'message':_0x37c8cf(0x1cc),'choices':_0x588014});if(!_0x2cea1c['task'])return console[_0x37c8cf(0x1c6)](_0x37c8cf(0x158)),0x0;_0x4c328d=_0x2cea1c['task'];}const _0x22bdf4=await withSpinner('Downloading\x20logs...',()=>_0x564b47['workflow'][_0x37c8cf(0x139)](_0x1f5d28,_0x4c328d),{'verbose':_0x47898f[_0x37c8cf(0x1df)]}),_0x36ac1f=_0x22bdf4[_0x37c8cf(0x16f)];return _0x36ac1f?console[_0x37c8cf(0x1dd)](_0x36ac1f):console['error']('No\x20log\x20content\x20found'),0x0;}catch(_0x4e5218){if(_0x4e5218 instanceof SDKError)return console[_0x37c8cf(0x1c6)](_0x37c8cf(0x1b9)+_0x4e5218['message']),_0x4e5218[_0x37c8cf(0x1ca)]&&console[_0x37c8cf(0x1c6)](_0x37c8cf(0x166)+_0x4e5218[_0x37c8cf(0x1ca)]),0x1;throw _0x4e5218;}}}export class WorkflowKillCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x1d5);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x17a);async[a44_0x9c18ca(0x187)](_0x4adc41){const _0x49aab8=a44_0x9c18ca,{options:_0x329301,args:_0x1d4eef,tdx:_0x21d148}=_0x4adc41,_0x1de32d=_0x1d4eef[0x0];if(!_0x1de32d)return console[_0x49aab8(0x1c6)](_0x49aab8(0x181)),0x1;try{const _0x59d943=_0x329301[_0x49aab8(0x195)];_0x329301['verbose']&&(console[_0x49aab8(0x1c6)](_0x49aab8(0x1cb)+_0x1de32d),_0x59d943&&console[_0x49aab8(0x1c6)](_0x49aab8(0x1bd)+_0x59d943));if(!_0x329301['yes']){const _0x5a5b51=await confirm(_0x49aab8(0x1b1)+_0x1de32d+'?');if(!_0x5a5b51)return console[_0x49aab8(0x1c6)](_0x49aab8(0x158)),0x0;}const _0x41d407=await withSpinner('Killing\x20attempt...',()=>_0x21d148[_0x49aab8(0x183)][_0x49aab8(0x1e1)](_0x1de32d,_0x59d943),{'verbose':_0x329301[_0x49aab8(0x1df)]}),_0x241e89=_0x41d407['data'];return console[_0x49aab8(0x1c6)]('✔\x20'+_0x241e89),0x0;}catch(_0x544335){if(_0x544335 instanceof SDKError)return console['error'](_0x49aab8(0x1b9)+_0x544335['message']),_0x544335['cause']&&console['error']('\x20\x20Cause:\x20'+_0x544335[_0x49aab8(0x1ca)]),0x1;throw _0x544335;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a44_0x9c18ca(0x18f);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x1c9);async[a44_0x9c18ca(0x187)](_0x8bb29f){const _0x1f4218=a44_0x9c18ca,{options:_0x513982,args:_0x5053bc,tdx:_0x370a3d}=_0x8bb29f,_0x2ee016=_0x5053bc[0x0];if(!_0x2ee016)return console['error'](_0x1f4218(0x1a9)),console[_0x1f4218(0x1c6)](_0x1f4218(0x1e0)),0x1;let _0x1585be=![],_0x3aff57=_0x2ee016;if(_0x2ee016[_0x1f4218(0x1a1)]('session:'))_0x1585be=!![],_0x3aff57=_0x2ee016['substring'](0x8);else{if(_0x2ee016[_0x1f4218(0x1a1)](_0x1f4218(0x19d)))_0x1585be=![],_0x3aff57=_0x2ee016[_0x1f4218(0x171)](0x8);else return console[_0x1f4218(0x1c6)](_0x1f4218(0x179)),console[_0x1f4218(0x1c6)](_0x1f4218(0x1e0)),0x1;}try{const _0x3797d8=_0x513982[_0x1f4218(0x1be)],_0x40f9b0=_0x513982[_0x1f4218(0x1bb)],_0x549858=_0x513982[_0x1f4218(0x1a2)],_0x3a8b55=_0x513982['force'];_0x513982[_0x1f4218(0x1df)]&&(console[_0x1f4218(0x1c6)](_0x1f4218(0x1ce)+(_0x1585be?_0x1f4218(0x1e2):_0x1f4218(0x155))+'\x20'+_0x3aff57),_0x3797d8&&console[_0x1f4218(0x1c6)]('From\x20task:\x20'+_0x3797d8),_0x40f9b0&&console[_0x1f4218(0x1c6)]('Resume\x20from:\x20'+_0x40f9b0),_0x549858&&console['error'](_0x1f4218(0x185)+_0x549858),_0x3a8b55&&console['error'](_0x1f4218(0x174)));let _0x3b83a0;if(_0x549858)try{if(_0x549858[_0x1f4218(0x1a1)]('@')){const _0x20d4cd=await import('fs/promises'),_0x28a842=_0x549858[_0x1f4218(0x171)](0x1),_0x30005d=await _0x20d4cd[_0x1f4218(0x18c)](_0x28a842,_0x1f4218(0x1ba));_0x3b83a0=JSON['parse'](_0x30005d);}else _0x3b83a0=JSON[_0x1f4218(0x1b7)](_0x549858);}catch{return console[_0x1f4218(0x1c6)](_0x1f4218(0x1db)),0x1;}if(!_0x513982['yes']){const _0x32f3e9=await confirm(_0x1f4218(0x13e)+(_0x1585be?_0x1f4218(0x1e2):_0x1f4218(0x155))+'\x20'+_0x3aff57+'?');if(!_0x32f3e9)return console[_0x1f4218(0x1c6)]('Cancelled'),0x0;}let _0x103062;_0x1585be?_0x103062=await withSpinner(_0x1f4218(0x16b),()=>_0x370a3d[_0x1f4218(0x183)][_0x1f4218(0x1d1)](_0x3aff57,{'fromTask':_0x3797d8,'retryParams':_0x3b83a0}),{'verbose':_0x513982[_0x1f4218(0x1df)]}):_0x103062=await withSpinner(_0x1f4218(0x1c8),()=>_0x370a3d[_0x1f4218(0x183)][_0x1f4218(0x194)](_0x3aff57,{'resumeFrom':_0x40f9b0,'retryParams':_0x3b83a0,'force':_0x3a8b55}),{'verbose':_0x513982['verbose']});const _0x195b37=_0x103062[_0x1f4218(0x16f)];return console[_0x1f4218(0x1c6)](_0x1f4218(0x1d7)),console['error'](_0x1f4218(0x149)+_0x195b37[_0x1f4218(0x1bc)]),console['error'](_0x1f4218(0x1dc)+_0x195b37[_0x1f4218(0x184)]),0x0;}catch(_0x452f64){if(_0x452f64 instanceof SDKError)return console[_0x1f4218(0x1c6)](_0x1f4218(0x1b9)+_0x452f64[_0x1f4218(0x1c7)]),_0x452f64[_0x1f4218(0x1ca)]&&console[_0x1f4218(0x1c6)](_0x1f4218(0x166)+_0x452f64[_0x1f4218(0x1ca)]),0x1;throw _0x452f64;}}}export class WorkflowRunCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x175);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x14e);async[a44_0x9c18ca(0x187)](_0x46668b){const _0x56ce52=a44_0x9c18ca,{options:_0x2b4f23,args:_0x13970f,tdx:_0x1c9495}=_0x46668b,_0x2c2326=_0x13970f[0x0];if(!_0x2c2326)return console[_0x56ce52(0x1c6)](_0x56ce52(0x172)),console[_0x56ce52(0x1c6)](_0x56ce52(0x19f)),0x1;const _0x50d858=_0x2b4f23[_0x56ce52(0x196)],_0x524dcb=_0x2b4f23['sessionTime'],_0x598cff={};if(_0x50d858&&Array[_0x56ce52(0x15c)](_0x50d858))for(const _0xed8cc0 of _0x50d858){const _0x4791fd=_0xed8cc0[_0x56ce52(0x197)]('=');if(_0x4791fd===-0x1)return console['error'](_0x56ce52(0x16d)+_0xed8cc0),console[_0x56ce52(0x1c6)](_0x56ce52(0x1a5)),0x1;const _0x1ef830=_0xed8cc0[_0x56ce52(0x171)](0x0,_0x4791fd),_0xdb88d6=_0xed8cc0[_0x56ce52(0x171)](_0x4791fd+0x1);try{_0x598cff[_0x1ef830]=JSON[_0x56ce52(0x1b7)](_0xdb88d6);}catch{_0x598cff[_0x1ef830]=_0xdb88d6;}}_0x2b4f23['verbose']&&(console[_0x56ce52(0x1c6)]('Workflow:\x20'+_0x2c2326),Object['keys'](_0x598cff)[_0x56ce52(0x1b3)]>0x0&&console['error'](_0x56ce52(0x154)+JSON['stringify'](_0x598cff)),_0x524dcb&&console[_0x56ce52(0x1c6)](_0x56ce52(0x1af)+_0x524dcb));const _0x21a0a2=await withSpinner(_0x56ce52(0x1d0),()=>_0x1c9495['workflow']['run'](_0x2c2326,_0x598cff,{'sessionTime':_0x524dcb}),{'verbose':_0x2b4f23[_0x56ce52(0x1df)]}),_0x1ebb9a=_0x21a0a2['data'];return console['error'](_0x56ce52(0x18b)),console[_0x56ce52(0x1c6)](_0x56ce52(0x1b6)+_0x1ebb9a['id']),console[_0x56ce52(0x1c6)](_0x56ce52(0x1dc)+_0x1ebb9a[_0x56ce52(0x184)]),console[_0x56ce52(0x1c6)](_0x56ce52(0x13f)+_0x1ebb9a[_0x56ce52(0x143)]?.[_0x56ce52(0x13d)]),console[_0x56ce52(0x1c6)]('\x20\x20Workflow:\x20'+_0x1ebb9a[_0x56ce52(0x183)]?.[_0x56ce52(0x13d)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a44_0x9c18ca(0x1b2);[a44_0x9c18ca(0x160)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a44_0x9c18ca(0x187)](_0x404178){const _0x1f8f6e=a44_0x9c18ca,{options:_0x147275,args:_0x50d63e,tdx:_0x2683f4}=_0x404178,_0x1a66bd=_0x50d63e[0x0],_0x42c1cd=_0x50d63e[0x1]||'.';if(!_0x1a66bd)return console[_0x1f8f6e(0x1c6)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x1f8f6e(0x1c6)](_0x1f8f6e(0x157)),0x1;const _0x1dbaed=_0x147275['revision'];_0x147275[_0x1f8f6e(0x1df)]&&(console[_0x1f8f6e(0x1c6)]('Project:\x20'+_0x1a66bd),console[_0x1f8f6e(0x1c6)](_0x1f8f6e(0x17b)+_0x42c1cd),_0x1dbaed&&console[_0x1f8f6e(0x1c6)](_0x1f8f6e(0x153)+_0x1dbaed));const _0x42389b=await withSpinner(_0x1f8f6e(0x13b)+_0x1a66bd+_0x1f8f6e(0x18a),()=>_0x2683f4[_0x1f8f6e(0x183)][_0x1f8f6e(0x1b4)](_0x1a66bd,_0x42c1cd,{'revision':_0x1dbaed}),{'verbose':_0x147275[_0x1f8f6e(0x1df)]}),_0x3e1078=_0x42389b[_0x1f8f6e(0x16f)];return console[_0x1f8f6e(0x1c6)]('✔\x20Downloaded\x20'+_0x3e1078[_0x1f8f6e(0x1ad)]),console[_0x1f8f6e(0x1c6)](_0x1f8f6e(0x1c1)+_0x3e1078['revision']),console[_0x1f8f6e(0x1c6)](_0x1f8f6e(0x1cf)+_0x3e1078[_0x1f8f6e(0x1b5)]),console['error'](_0x1f8f6e(0x16e)+_0x42c1cd+'/'+_0x3e1078[_0x1f8f6e(0x1ad)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x1c0);[a44_0x9c18ca(0x160)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async['execute'](_0x4d2148){const _0x2e0593=a44_0x9c18ca,{options:_0x4bf975,args:_0x47af5c,tdx:_0x58a22b}=_0x4d2148;let _0x290d4a='.',_0x404189=_0x4bf975['name'];if(_0x47af5c[0x0]){const {promises:_0x4405a4}=await import('fs');try{const _0x3b1f1c=await _0x4405a4[_0x2e0593(0x199)](_0x47af5c[0x0]);if(_0x3b1f1c[_0x2e0593(0x1c2)]())_0x290d4a=_0x47af5c[0x0];else return console[_0x2e0593(0x1c6)](_0x2e0593(0x1b9)+_0x47af5c[0x0]+_0x2e0593(0x178)),0x1;}catch{_0x404189=_0x47af5c[0x0],_0x290d4a='.';}}const _0x45f509=_0x4bf975[_0x2e0593(0x147)],_0x9341a6=_0x4bf975[_0x2e0593(0x14a)];_0x4bf975[_0x2e0593(0x1df)]&&(console[_0x2e0593(0x1c6)]('Project\x20directory:\x20'+_0x290d4a),_0x404189&&console[_0x2e0593(0x1c6)](_0x2e0593(0x186)+_0x404189),_0x45f509&&console[_0x2e0593(0x1c6)](_0x2e0593(0x153)+_0x45f509),_0x9341a6&&console[_0x2e0593(0x1c6)]('Validation:\x20skipped'));const _0x5dd7da=await withSpinner(_0x2e0593(0x198),()=>_0x58a22b[_0x2e0593(0x183)][_0x2e0593(0x13c)](_0x290d4a,{'projectName':_0x404189,'revision':_0x45f509,'skipValidation':_0x9341a6}),{'verbose':_0x4bf975[_0x2e0593(0x1df)]}),_0x50d5a4=_0x5dd7da[_0x2e0593(0x16f)];return console[_0x2e0593(0x1c6)](_0x2e0593(0x19e)+_0x50d5a4[_0x2e0593(0x1ad)]),console[_0x2e0593(0x1c6)]('\x20\x20Project\x20ID:\x20'+_0x50d5a4[_0x2e0593(0x1d8)]),console[_0x2e0593(0x1c6)]('\x20\x20Revision:\x20'+_0x50d5a4[_0x2e0593(0x147)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a44_0x9c18ca(0x13d)]=a44_0x9c18ca(0x1ab);[a44_0x9c18ca(0x160)]=a44_0x9c18ca(0x1c3);async[a44_0x9c18ca(0x187)](_0x52a3d5){const _0x761f53=a44_0x9c18ca,{options:_0x211a37,args:_0x341d3c,tdx:_0x27b47f}=_0x52a3d5,_0x37a59c=_0x341d3c[0x0];if(!_0x37a59c)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x761f53(0x1c6)](_0x761f53(0x19b)),0x1;_0x211a37[_0x761f53(0x1df)]&&console['error']('Project:\x20'+_0x37a59c);if(!_0x211a37[_0x761f53(0x1b8)]){const _0x582ba5=await confirm(_0x761f53(0x1d9)+_0x37a59c+_0x761f53(0x167));if(!_0x582ba5)return console[_0x761f53(0x1c6)](_0x761f53(0x158)),0x0;}const _0x3a83a0=await withSpinner(_0x761f53(0x1a3)+_0x37a59c+_0x761f53(0x18a),()=>_0x27b47f[_0x761f53(0x183)][_0x761f53(0x1d4)](_0x37a59c),{'verbose':_0x211a37[_0x761f53(0x1df)]}),_0x4a2f76=_0x3a83a0[_0x761f53(0x16f)];return console[_0x761f53(0x1c6)](_0x761f53(0x1a8)+_0x4a2f76[_0x761f53(0x1ad)]),console['error'](_0x761f53(0x17c)+_0x4a2f76[_0x761f53(0x1d8)]),0x0;}}
|
|
1
|
+
const a44_0x322c85=a44_0x3098;(function(_0x556959,_0xadb28d){const _0x4a74a0=a44_0x3098,_0x56f2d1=_0x556959();while(!![]){try{const _0x1f4704=-parseInt(_0x4a74a0(0x9a))/0x1*(-parseInt(_0x4a74a0(0xaf))/0x2)+-parseInt(_0x4a74a0(0xf4))/0x3+-parseInt(_0x4a74a0(0xfe))/0x4+parseInt(_0x4a74a0(0x125))/0x5*(-parseInt(_0x4a74a0(0x9e))/0x6)+parseInt(_0x4a74a0(0xbf))/0x7+-parseInt(_0x4a74a0(0x12c))/0x8*(-parseInt(_0x4a74a0(0xdb))/0x9)+parseInt(_0x4a74a0(0xc5))/0xa;if(_0x1f4704===_0xadb28d)break;else _0x56f2d1['push'](_0x56f2d1['shift']());}catch(_0x20fe76){_0x56f2d1['push'](_0x56f2d1['shift']());}}}(a44_0x20af,0x2b536));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 a44_0x526862 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a44_0x322c85(0x10a)]=a44_0x322c85(0xe3);[a44_0x322c85(0xe7)]=a44_0x322c85(0x95);async[a44_0x322c85(0x11d)](_0x101ddf){const _0x461ffb=a44_0x322c85,{options:_0x325c77,args:_0x24a728,tdx:_0x1f7e47}=_0x101ddf,_0x27eab3=_0x24a728[0x0];try{_0x325c77[_0x461ffb(0x118)]&&_0x27eab3&&console['error'](_0x461ffb(0xdd)+_0x27eab3);const _0x357447=await withSpinner(_0x461ffb(0x131),()=>_0x1f7e47['workflow'][_0x461ffb(0xae)](_0x27eab3,{'limit':_0x325c77[_0x461ffb(0x138)]}),{'verbose':_0x325c77[_0x461ffb(0x118)]}),_0x49b584=_0x357447['data'];return console[_0x461ffb(0xe8)](_0x461ffb(0xd4)+_0x49b584[_0x461ffb(0xb0)]+_0x461ffb(0xb3)+(_0x49b584[_0x461ffb(0xb0)]!==0x1?'s':'')),await handleSDKOutput(_0x49b584,_0x325c77),0x0;}catch(_0x120564){if(_0x120564 instanceof SDKError)return console[_0x461ffb(0xe8)](_0x461ffb(0x10f)+_0x120564[_0x461ffb(0xaa)]),_0x120564['cause']&&console[_0x461ffb(0xe8)](_0x461ffb(0x108)+_0x120564['cause']),0x1;throw _0x120564;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a44_0x322c85(0x129);[a44_0x322c85(0xe7)]=a44_0x322c85(0x132);async[a44_0x322c85(0x11d)](_0x14f317){const _0x36ef3f=a44_0x322c85,{options:_0x537c18,args:_0x2042d1,tdx:_0x444e25}=_0x14f317,_0x237536=_0x2042d1[0x0];try{_0x537c18[_0x36ef3f(0x118)]&&_0x237536&&console[_0x36ef3f(0xe8)](_0x36ef3f(0x121)+_0x237536);const _0x6ddcdd=await withSpinner(_0x36ef3f(0xbe),()=>_0x444e25['workflow'][_0x36ef3f(0x9d)](_0x237536,{'limit':_0x537c18[_0x36ef3f(0x138)]}),{'verbose':_0x537c18[_0x36ef3f(0x118)]}),_0x230099=_0x6ddcdd['data'];return console[_0x36ef3f(0xe8)](_0x36ef3f(0xd4)+_0x230099['length']+_0x36ef3f(0xa8)+(_0x230099['length']!==0x1?'s':'')),await handleSDKOutput(_0x230099,_0x537c18),0x0;}catch(_0x4d9262){if(_0x4d9262 instanceof SDKError)return console[_0x36ef3f(0xe8)](_0x36ef3f(0x10f)+_0x4d9262[_0x36ef3f(0xaa)]),_0x4d9262[_0x36ef3f(0xd8)]&&console[_0x36ef3f(0xe8)](_0x36ef3f(0x108)+_0x4d9262[_0x36ef3f(0xd8)]),0x1;throw _0x4d9262;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']='workflow:sessions';[a44_0x322c85(0xe7)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x1c00bc){const _0x184b34=a44_0x322c85,{options:_0x43c984,args:_0x2ef045,tdx:_0x52816d}=_0x1c00bc;let _0x585f6d,_0xc2ad6c;if(_0x2ef045[0x0]){const _0x57eabb=_0x2ef045[0x0]['split']('.');if(_0x57eabb[_0x184b34(0xb0)]===0x1)_0x585f6d=_0x57eabb[0x0];else{if(_0x57eabb['length']===0x2)[_0x585f6d,_0xc2ad6c]=_0x57eabb;else return console[_0x184b34(0xe8)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x43c984[_0x184b34(0x118)]){if(_0x585f6d&&_0xc2ad6c)console['error'](_0x184b34(0x133)+_0x585f6d+'.'+_0xc2ad6c);else _0x585f6d&&console[_0x184b34(0xe8)](_0x184b34(0x11e)+_0x585f6d);const _0x17aa1d=_0x43c984[_0x184b34(0x106)];_0x17aa1d&&console[_0x184b34(0xe8)]('Status:\x20'+_0x17aa1d);}const _0x2d0a99=await withSpinner(_0x184b34(0xb1),()=>_0x52816d[_0x184b34(0x117)][_0x184b34(0xcb)]({'projectName':_0x585f6d,'workflowName':_0xc2ad6c,'status':_0x43c984[_0x184b34(0x106)],'fromTime':_0x43c984[_0x184b34(0xde)],'toTime':_0x43c984['to'],'limit':_0x43c984[_0x184b34(0x138)]}),{'verbose':_0x43c984[_0x184b34(0x118)]}),_0x2f2a32=_0x2d0a99[_0x184b34(0xfc)];return console[_0x184b34(0xe8)](_0x184b34(0xd4)+_0x2f2a32[_0x184b34(0xb0)]+_0x184b34(0x123)+(_0x2f2a32[_0x184b34(0xb0)]!==0x1?'s':'')),await handleSDKOutput(_0x2f2a32,_0x43c984),0x0;}catch(_0x3bcf11){if(_0x3bcf11 instanceof SDKError)return console['error'](_0x184b34(0x10f)+_0x3bcf11[_0x184b34(0xaa)]),_0x3bcf11[_0x184b34(0xd8)]&&console['error']('\x20\x20Cause:\x20'+_0x3bcf11[_0x184b34(0xd8)]),0x1;throw _0x3bcf11;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a44_0x322c85(0x10a)]='workflow:attempts';[a44_0x322c85(0xe7)]=a44_0x322c85(0xa5);async[a44_0x322c85(0x11d)](_0x300acc){const _0x4aefbf=a44_0x322c85,{options:_0x179489,args:_0x82f917,tdx:_0x3d1dbc}=_0x300acc;let _0x2df8b1,_0x2c5c5f;if(_0x82f917[0x0]){const _0x5081de=_0x82f917[0x0][_0x4aefbf(0xcd)]('.');if(_0x5081de[_0x4aefbf(0xb0)]===0x1)_0x2df8b1=_0x5081de[0x0];else{if(_0x5081de[_0x4aefbf(0xb0)]===0x2)[_0x2df8b1,_0x2c5c5f]=_0x5081de;else return console[_0x4aefbf(0xe8)](_0x4aefbf(0xe5)),0x1;}}try{const _0x4a5626=_0x179489[_0x4aefbf(0xce)];if(_0x179489[_0x4aefbf(0x118)]){if(_0x2df8b1&&_0x2c5c5f)console[_0x4aefbf(0xe8)](_0x4aefbf(0x133)+_0x2df8b1+'.'+_0x2c5c5f);else _0x2df8b1&&console[_0x4aefbf(0xe8)](_0x4aefbf(0x11e)+_0x2df8b1);_0x4a5626&&console[_0x4aefbf(0xe8)]('Include\x20retried:\x20yes');}const _0x2abc97=await withSpinner(_0x4aefbf(0xd6),()=>_0x3d1dbc[_0x4aefbf(0x117)][_0x4aefbf(0x98)]({'projectName':_0x2df8b1,'workflowName':_0x2c5c5f,'includeRetried':_0x4a5626,'limit':_0x179489[_0x4aefbf(0x138)]}),{'verbose':_0x179489[_0x4aefbf(0x118)]}),_0x36b502=_0x2abc97[_0x4aefbf(0xfc)];return console['error'](_0x4aefbf(0xd4)+_0x36b502['length']+'\x20attempt'+(_0x36b502[_0x4aefbf(0xb0)]!==0x1?'s':'')),await handleSDKOutput(_0x36b502,_0x179489),0x0;}catch(_0x3291b0){if(_0x3291b0 instanceof SDKError)return console[_0x4aefbf(0xe8)](_0x4aefbf(0x10f)+_0x3291b0[_0x4aefbf(0xaa)]),_0x3291b0['cause']&&console[_0x4aefbf(0xe8)](_0x4aefbf(0x108)+_0x3291b0[_0x4aefbf(0xd8)]),0x1;throw _0x3291b0;}}}export class WorkflowAttemptCommand extends BaseCommand{[a44_0x322c85(0x10a)]=a44_0x322c85(0xf2);[a44_0x322c85(0xe7)]=a44_0x322c85(0x97);async['execute'](_0x5ad75c){const _0x153e5f=a44_0x322c85,{options:_0x2803e0,args:_0x84ccc0,tdx:_0x26fa71}=_0x5ad75c,_0x4179e9=_0x84ccc0[0x0];if(!_0x4179e9)return console[_0x153e5f(0xe8)](_0x153e5f(0xa0)),0x1;try{_0x2803e0[_0x153e5f(0x118)]&&console[_0x153e5f(0xe8)](_0x153e5f(0x10c)+_0x4179e9);const _0x175ca2=await withSpinner(_0x153e5f(0xf0),()=>_0x26fa71['workflow'][_0x153e5f(0x126)](_0x4179e9),{'verbose':_0x2803e0[_0x153e5f(0x118)]}),_0x1dd592=_0x175ca2[_0x153e5f(0xfc)];let _0x2c9a73;!_0x1dd592[_0x153e5f(0xd1)]?_0x2c9a73=_0x1dd592[_0x153e5f(0xe4)]?_0x153e5f(0xdf):_0x153e5f(0xf5):_0x2c9a73=_0x1dd592['success']?_0x153e5f(0xe1):_0x153e5f(0xe8);let _0x2fdafe;if(_0x1dd592[_0x153e5f(0xda)]&&_0x1dd592[_0x153e5f(0xd0)]){const _0x9c306e=new Date(_0x1dd592[_0x153e5f(0xda)])[_0x153e5f(0x128)](),_0x186a37=new Date(_0x1dd592[_0x153e5f(0xd0)])['getTime']();_0x2fdafe=Math[_0x153e5f(0xb2)]((_0x186a37-_0x9c306e)/0x3e8);}const _0x2a6a2f={'attempt_id':_0x1dd592['id'],'status':_0x2c9a73,..._0x1dd592[_0x153e5f(0x107)]!==undefined&&{'index':_0x1dd592[_0x153e5f(0x107)]},..._0x1dd592[_0x153e5f(0xab)]&&{'project':_0x1dd592[_0x153e5f(0xab)][_0x153e5f(0x10a)]},..._0x1dd592[_0x153e5f(0x117)]&&{'workflow':_0x1dd592['workflow']['name']},..._0x1dd592[_0x153e5f(0x100)]&&{'session_id':_0x1dd592[_0x153e5f(0x100)]},..._0x1dd592['sessionTime']&&{'session_time':_0x1dd592[_0x153e5f(0xa1)]},..._0x1dd592[_0x153e5f(0xc1)]&&{'retry_attempt':_0x1dd592[_0x153e5f(0xc1)]},..._0x2fdafe!==undefined&&{'duration_sec':_0x2fdafe},..._0x1dd592['createdAt']&&{'created_at':_0x1dd592[_0x153e5f(0xda)]},..._0x1dd592[_0x153e5f(0xd0)]&&{'finished_at':_0x1dd592['finishedAt']},...Object[_0x153e5f(0xd7)](_0x1dd592[_0x153e5f(0x12d)])[_0x153e5f(0xb0)]>0x0&&{'params':_0x1dd592[_0x153e5f(0x12d)]}};return await handleSingleObjectOutput(_0x2a6a2f,_0x2803e0),0x0;}catch(_0x681004){if(_0x681004 instanceof SDKError)return console[_0x153e5f(0xe8)]('Error:\x20'+_0x681004[_0x153e5f(0xaa)]),_0x681004[_0x153e5f(0xd8)]&&console[_0x153e5f(0xe8)]('\x20\x20Cause:\x20'+_0x681004[_0x153e5f(0xd8)]),0x1;throw _0x681004;}}}export class WorkflowTasksCommand extends BaseCommand{[a44_0x322c85(0x10a)]='workflow:tasks';[a44_0x322c85(0xe7)]=a44_0x322c85(0x130);async['execute'](_0x5a52a7){const _0x16e03d=a44_0x322c85,{options:_0x33be0a,args:_0x259ba7,tdx:_0x3654a6}=_0x5a52a7,_0x14615e=_0x259ba7[0x0];if(!_0x14615e)return console[_0x16e03d(0xe8)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x232c1b=_0x33be0a[_0x16e03d(0x120)];_0x33be0a[_0x16e03d(0x118)]&&(console[_0x16e03d(0xe8)](_0x16e03d(0x10c)+_0x14615e),_0x232c1b&&console[_0x16e03d(0xe8)](_0x16e03d(0xd5)));const _0x11b4f8=await withSpinner(_0x16e03d(0xa9),()=>_0x3654a6[_0x16e03d(0x117)][_0x16e03d(0xbb)](_0x14615e,_0x232c1b||![]),{'verbose':_0x33be0a[_0x16e03d(0x118)]}),_0x5f2fdd=_0x11b4f8[_0x16e03d(0xfc)];return console[_0x16e03d(0xe8)](_0x16e03d(0xd4)+_0x5f2fdd[_0x16e03d(0xb0)]+_0x16e03d(0x124)+(_0x5f2fdd[_0x16e03d(0xb0)]!==0x1?'s':'')),await handleSDKOutput(_0x5f2fdd,_0x33be0a),0x0;}catch(_0x1fd0ef){if(_0x1fd0ef instanceof SDKError)return console['error'](_0x16e03d(0x10f)+_0x1fd0ef['message']),_0x1fd0ef['cause']&&console['error'](_0x16e03d(0x108)+_0x1fd0ef[_0x16e03d(0xd8)]),0x1;throw _0x1fd0ef;}}}function a44_0x3098(_0x3ada99,_0x34981c){_0x3ada99=_0x3ada99-0x95;const _0x20af1b=a44_0x20af();let _0x309897=_0x20af1b[_0x3ada99];return _0x309897;}export class WorkflowLogsCommand extends BaseCommand{[a44_0x322c85(0x10a)]=a44_0x322c85(0xeb);[a44_0x322c85(0xe7)]=a44_0x322c85(0xe9);async[a44_0x322c85(0x11d)](_0x3f5b25){const _0x2c31ce=a44_0x322c85,{options:_0x4957fb,args:_0x27ce6a,tdx:_0x132cfe}=_0x3f5b25,_0x1e3372=_0x27ce6a[0x0];let _0x5edf9d=_0x27ce6a[0x1];if(!_0x1e3372)return console[_0x2c31ce(0xe8)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x4957fb[_0x2c31ce(0x118)]&&(console['error'](_0x2c31ce(0x10c)+_0x1e3372),_0x5edf9d&&console[_0x2c31ce(0xe8)](_0x2c31ce(0xd3)+_0x5edf9d));const _0x418ed2=await withSpinner(_0x2c31ce(0x134),()=>_0x132cfe[_0x2c31ce(0x117)][_0x2c31ce(0xe0)](_0x1e3372,_0x5edf9d),{'verbose':_0x4957fb['verbose']}),_0x3eeb6d=_0x418ed2[_0x2c31ce(0xfc)];if(_0x3eeb6d[_0x2c31ce(0xb0)]===0x0)return console['error'](_0x2c31ce(0x96)),0x0;if(!_0x5edf9d&&(_0x4957fb[_0x2c31ce(0xc3)]||_0x4957fb[_0x2c31ce(0xbc)]))return await handleSDKOutput(_0x3eeb6d,_0x4957fb),0x0;if(!_0x5edf9d){const _0x108185=_0x3eeb6d['map'](_0x3dc1c5=>({'title':_0x3dc1c5[_0x2c31ce(0xcc)]+'\x20('+formatBytes(_0x3dc1c5[_0x2c31ce(0xb7)])+')','value':_0x3dc1c5[_0x2c31ce(0xcc)]})),_0x3cfec8=await a44_0x526862({'type':_0x2c31ce(0x113),'name':_0x2c31ce(0xb8),'message':_0x2c31ce(0x115),'choices':_0x108185});if(!_0x3cfec8[_0x2c31ce(0xb8)])return console[_0x2c31ce(0xe8)]('Cancelled'),0x0;_0x5edf9d=_0x3cfec8[_0x2c31ce(0xb8)];}const _0x212a08=await withSpinner(_0x2c31ce(0xc9),()=>_0x132cfe[_0x2c31ce(0x117)][_0x2c31ce(0x109)](_0x1e3372,_0x5edf9d),{'verbose':_0x4957fb[_0x2c31ce(0x118)]}),_0x17134c=_0x212a08[_0x2c31ce(0xfc)];return _0x17134c?console['log'](_0x17134c):console[_0x2c31ce(0xe8)](_0x2c31ce(0xc4)),0x0;}catch(_0x52f283){if(_0x52f283 instanceof SDKError)return console[_0x2c31ce(0xe8)](_0x2c31ce(0x10f)+_0x52f283[_0x2c31ce(0xaa)]),_0x52f283['cause']&&console[_0x2c31ce(0xe8)](_0x2c31ce(0x108)+_0x52f283['cause']),0x1;throw _0x52f283;}}}export class WorkflowKillCommand extends BaseCommand{['name']=a44_0x322c85(0xd2);[a44_0x322c85(0xe7)]=a44_0x322c85(0xff);async[a44_0x322c85(0x11d)](_0x231979){const _0xc045d7=a44_0x322c85,{options:_0x404499,args:_0x217c1a,tdx:_0x333992}=_0x231979,_0x587d4c=_0x217c1a[0x0];if(!_0x587d4c)return console[_0xc045d7(0xe8)](_0xc045d7(0xa0)),0x1;try{const _0x37bf66=_0x404499[_0xc045d7(0xe2)];_0x404499[_0xc045d7(0x118)]&&(console[_0xc045d7(0xe8)](_0xc045d7(0x10c)+_0x587d4c),_0x37bf66&&console[_0xc045d7(0xe8)]('Reason:\x20'+_0x37bf66));if(!_0x404499[_0xc045d7(0x127)]){const _0x3c7dd3=await confirm(_0xc045d7(0xca)+_0x587d4c+'?');if(!_0x3c7dd3)return console[_0xc045d7(0xe8)]('Cancelled'),0x0;}const _0x53d07a=await withSpinner(_0xc045d7(0xc0),()=>_0x333992[_0xc045d7(0x117)][_0xc045d7(0x101)](_0x587d4c,_0x37bf66),{'verbose':_0x404499[_0xc045d7(0x118)]}),_0x5bee9e=_0x53d07a['data'];return console[_0xc045d7(0xe8)]('✔\x20'+_0x5bee9e),0x0;}catch(_0x2dc934){if(_0x2dc934 instanceof SDKError)return console[_0xc045d7(0xe8)](_0xc045d7(0x10f)+_0x2dc934[_0xc045d7(0xaa)]),_0x2dc934[_0xc045d7(0xd8)]&&console[_0xc045d7(0xe8)](_0xc045d7(0x108)+_0x2dc934[_0xc045d7(0xd8)]),0x1;throw _0x2dc934;}}}export class WorkflowRetryCommand extends BaseCommand{[a44_0x322c85(0x10a)]=a44_0x322c85(0xfb);[a44_0x322c85(0xe7)]=a44_0x322c85(0x99);async[a44_0x322c85(0x11d)](_0x185ee8){const _0x903c12=a44_0x322c85,{options:_0x2c61c9,args:_0x6c9d3b,tdx:_0x558ccd}=_0x185ee8,_0x49d1c1=_0x6c9d3b[0x0];if(!_0x49d1c1)return console[_0x903c12(0xe8)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x2ba413=![],_0x1a5b34=_0x49d1c1;if(_0x49d1c1['startsWith']('session:'))_0x2ba413=!![],_0x1a5b34=_0x49d1c1[_0x903c12(0xcf)](0x8);else{if(_0x49d1c1['startsWith']('attempt:'))_0x2ba413=![],_0x1a5b34=_0x49d1c1['substring'](0x8);else return console[_0x903c12(0xe8)](_0x903c12(0xdc)),console['error'](_0x903c12(0x10e)),0x1;}try{const _0x2bc132=_0x2c61c9[_0x903c12(0x9f)],_0x2e5815=_0x2c61c9[_0x903c12(0x11a)],_0x22cb7a=_0x2c61c9['params'],_0x11bd5b=_0x2c61c9['force'];_0x2c61c9[_0x903c12(0x118)]&&(console['error'](_0x903c12(0x13a)+(_0x2ba413?_0x903c12(0x135):_0x903c12(0x126))+'\x20'+_0x1a5b34),_0x2bc132&&console['error'](_0x903c12(0xc6)+_0x2bc132),_0x2e5815&&console[_0x903c12(0xe8)](_0x903c12(0x12e)+_0x2e5815),_0x22cb7a&&console[_0x903c12(0xe8)](_0x903c12(0x112)+_0x22cb7a),_0x11bd5b&&console[_0x903c12(0xe8)](_0x903c12(0x12b)));let _0x264f25;if(_0x22cb7a)try{if(_0x22cb7a['startsWith']('@')){const _0x21ac58=await import(_0x903c12(0xe6)),_0x424261=_0x22cb7a[_0x903c12(0xcf)](0x1),_0x4e3753=await _0x21ac58['readFile'](_0x424261,_0x903c12(0xb4));_0x264f25=JSON[_0x903c12(0xfd)](_0x4e3753);}else _0x264f25=JSON[_0x903c12(0xfd)](_0x22cb7a);}catch{return console[_0x903c12(0xe8)](_0x903c12(0xf1)),0x1;}if(!_0x2c61c9['yes']){const _0x3d8e29=await confirm(_0x903c12(0xa2)+(_0x2ba413?_0x903c12(0x135):_0x903c12(0x126))+'\x20'+_0x1a5b34+'?');if(!_0x3d8e29)return console[_0x903c12(0xe8)](_0x903c12(0xa4)),0x0;}let _0x329cec;_0x2ba413?_0x329cec=await withSpinner(_0x903c12(0x116),()=>_0x558ccd[_0x903c12(0x117)][_0x903c12(0xac)](_0x1a5b34,{'fromTask':_0x2bc132,'retryParams':_0x264f25}),{'verbose':_0x2c61c9[_0x903c12(0x118)]}):_0x329cec=await withSpinner(_0x903c12(0x105),()=>_0x558ccd[_0x903c12(0x117)][_0x903c12(0xed)](_0x1a5b34,{'resumeFrom':_0x2e5815,'retryParams':_0x264f25,'force':_0x11bd5b}),{'verbose':_0x2c61c9[_0x903c12(0x118)]});const _0x2df30c=_0x329cec[_0x903c12(0xfc)];return console[_0x903c12(0xe8)](_0x903c12(0x122)),console[_0x903c12(0xe8)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x2df30c[_0x903c12(0xad)]),console[_0x903c12(0xe8)](_0x903c12(0xb5)+_0x2df30c[_0x903c12(0x100)]),0x0;}catch(_0x35f295){if(_0x35f295 instanceof SDKError)return console[_0x903c12(0xe8)](_0x903c12(0x10f)+_0x35f295[_0x903c12(0xaa)]),_0x35f295[_0x903c12(0xd8)]&&console[_0x903c12(0xe8)](_0x903c12(0x108)+_0x35f295[_0x903c12(0xd8)]),0x1;throw _0x35f295;}}}export class WorkflowRunCommand extends BaseCommand{[a44_0x322c85(0x10a)]='workflow:run';[a44_0x322c85(0xe7)]='Start\x20a\x20workflow\x20run';async[a44_0x322c85(0x11d)](_0x26512c){const _0xfe3a0d=a44_0x322c85,{options:_0x3f9a61,args:_0x384cde,tdx:_0x4b2b75}=_0x26512c,_0x3a2683=_0x384cde[0x0];if(!_0x3a2683)return console['error']('Error:\x20Workflow\x20identifier\x20is\x20required'),console['error'](_0xfe3a0d(0xee)),0x1;const _0x2664e9=_0x3f9a61['param'],_0x35a6ce=_0x3f9a61[_0xfe3a0d(0xa1)],_0x3b4771={};if(_0x2664e9&&Array[_0xfe3a0d(0xb6)](_0x2664e9))for(const _0x421c61 of _0x2664e9){const _0x34fb75=_0x421c61[_0xfe3a0d(0xf8)]('=');if(_0x34fb75===-0x1)return console[_0xfe3a0d(0xe8)](_0xfe3a0d(0xfa)+_0x421c61),console[_0xfe3a0d(0xe8)](_0xfe3a0d(0xc2)),0x1;const _0x3b4896=_0x421c61['substring'](0x0,_0x34fb75),_0x232e27=_0x421c61[_0xfe3a0d(0xcf)](_0x34fb75+0x1);try{_0x3b4771[_0x3b4896]=JSON[_0xfe3a0d(0xfd)](_0x232e27);}catch{_0x3b4771[_0x3b4896]=_0x232e27;}}_0x3f9a61['verbose']&&(console['error'](_0xfe3a0d(0xbd)+_0x3a2683),Object[_0xfe3a0d(0xd7)](_0x3b4771)[_0xfe3a0d(0xb0)]>0x0&&console[_0xfe3a0d(0xe8)](_0xfe3a0d(0xb9)+JSON[_0xfe3a0d(0xba)](_0x3b4771)),_0x35a6ce&&console[_0xfe3a0d(0xe8)](_0xfe3a0d(0x137)+_0x35a6ce));const _0x4c08b9=await withSpinner(_0xfe3a0d(0x111),()=>_0x4b2b75[_0xfe3a0d(0x117)][_0xfe3a0d(0x119)](_0x3a2683,_0x3b4771,{'sessionTime':_0x35a6ce}),{'verbose':_0x3f9a61[_0xfe3a0d(0x118)]}),_0x333b1d=_0x4c08b9['data'];return console[_0xfe3a0d(0xe8)](_0xfe3a0d(0x12f)),console['error'](_0xfe3a0d(0xea)+_0x333b1d['id']),console[_0xfe3a0d(0xe8)]('\x20\x20Session\x20ID:\x20'+_0x333b1d[_0xfe3a0d(0x100)]),console[_0xfe3a0d(0xe8)]('\x20\x20Project:\x20'+_0x333b1d['project']?.[_0xfe3a0d(0x10a)]),console[_0xfe3a0d(0xe8)]('\x20\x20Workflow:\x20'+_0x333b1d[_0xfe3a0d(0x117)]?.[_0xfe3a0d(0x10a)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a44_0x322c85(0x10a)]='workflow:download';[a44_0x322c85(0xe7)]=a44_0x322c85(0x104);async[a44_0x322c85(0x11d)](_0x2aa2f2){const _0x972b89=a44_0x322c85,{options:_0x3c7a5a,args:_0xaaf384,tdx:_0x2883ff}=_0x2aa2f2,_0x180de5=_0xaaf384[0x0],_0x4e61fe=_0xaaf384[0x1]||'.';if(!_0x180de5)return console[_0x972b89(0xe8)](_0x972b89(0x136)),console[_0x972b89(0xe8)](_0x972b89(0x10b)),0x1;const _0x52358b=_0x3c7a5a['revision'];_0x3c7a5a[_0x972b89(0x118)]&&(console['error']('Project:\x20'+_0x180de5),console[_0x972b89(0xe8)](_0x972b89(0xd9)+_0x4e61fe),_0x52358b&&console[_0x972b89(0xe8)]('Revision:\x20'+_0x52358b));const _0x16a408=await withSpinner('Downloading\x20project\x20'+_0x180de5+_0x972b89(0x10d),()=>_0x2883ff[_0x972b89(0x117)][_0x972b89(0xf7)](_0x180de5,_0x4e61fe,{'revision':_0x52358b}),{'verbose':_0x3c7a5a['verbose']}),_0x450824=_0x16a408[_0x972b89(0xfc)];return console[_0x972b89(0xe8)](_0x972b89(0xec)+_0x450824[_0x972b89(0xa6)]),console['error'](_0x972b89(0x12a)+_0x450824[_0x972b89(0x11f)]),console[_0x972b89(0xe8)](_0x972b89(0xc8)+_0x450824['filesExtracted']),console['error'](_0x972b89(0x9b)+_0x4e61fe+'/'+_0x450824[_0x972b89(0xa6)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a44_0x322c85(0x10a)]=a44_0x322c85(0x114);[a44_0x322c85(0xe7)]=a44_0x322c85(0xc7);async['execute'](_0x1d2097){const _0x4195d2=a44_0x322c85,{options:_0x49cfc4,args:_0x8d9631,tdx:_0x426e9d}=_0x1d2097;let _0x422ddc='.',_0x566694=_0x49cfc4[_0x4195d2(0x10a)];if(_0x8d9631[0x0]){const {promises:_0x4c3917}=await import('fs');try{const _0x19fd3e=await _0x4c3917[_0x4195d2(0xa3)](_0x8d9631[0x0]);if(_0x19fd3e['isDirectory']())_0x422ddc=_0x8d9631[0x0];else return console['error'](_0x4195d2(0x10f)+_0x8d9631[0x0]+_0x4195d2(0x11b)),0x1;}catch{_0x566694=_0x8d9631[0x0],_0x422ddc='.';}}const _0x3da80a=_0x49cfc4[_0x4195d2(0x11f)],_0x16a957=_0x49cfc4[_0x4195d2(0x9c)];_0x49cfc4[_0x4195d2(0x118)]&&(console[_0x4195d2(0xe8)](_0x4195d2(0xf6)+_0x422ddc),_0x566694&&console[_0x4195d2(0xe8)]('Project\x20name:\x20'+_0x566694),_0x3da80a&&console[_0x4195d2(0xe8)](_0x4195d2(0xef)+_0x3da80a),_0x16a957&&console[_0x4195d2(0xe8)](_0x4195d2(0x11c)));const _0x295aca=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x426e9d[_0x4195d2(0x117)]['push'](_0x422ddc,{'projectName':_0x566694,'revision':_0x3da80a,'skipValidation':_0x16a957}),{'verbose':_0x49cfc4[_0x4195d2(0x118)]}),_0xd291f9=_0x295aca['data'];return console[_0x4195d2(0xe8)](_0x4195d2(0xf9)+_0xd291f9[_0x4195d2(0xa6)]),console[_0x4195d2(0xe8)](_0x4195d2(0x102)+_0xd291f9['projectId']),console[_0x4195d2(0xe8)](_0x4195d2(0x12a)+_0xd291f9[_0x4195d2(0x11f)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a44_0x322c85(0x10a)]=a44_0x322c85(0x110);[a44_0x322c85(0xe7)]=a44_0x322c85(0x103);async[a44_0x322c85(0x11d)](_0x35030d){const _0x35bc39=a44_0x322c85,{options:_0x3f1ecd,args:_0x45069a,tdx:_0x5c8b85}=_0x35030d,_0x109f09=_0x45069a[0x0];if(!_0x109f09)return console[_0x35bc39(0xe8)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x3f1ecd[_0x35bc39(0x118)]&&console[_0x35bc39(0xe8)]('Project:\x20'+_0x109f09);if(!_0x3f1ecd[_0x35bc39(0x127)]){const _0x3ce086=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x109f09+_0x35bc39(0xa7));if(!_0x3ce086)return console['error'](_0x35bc39(0xa4)),0x0;}const _0x496bf6=await withSpinner(_0x35bc39(0x139)+_0x109f09+_0x35bc39(0x10d),()=>_0x5c8b85[_0x35bc39(0x117)]['delete'](_0x109f09),{'verbose':_0x3f1ecd[_0x35bc39(0x118)]}),_0x4581bf=_0x496bf6[_0x35bc39(0xfc)];return console[_0x35bc39(0xe8)](_0x35bc39(0xf3)+_0x4581bf['projectName']),console[_0x35bc39(0xe8)](_0x35bc39(0x102)+_0x4581bf[_0x35bc39(0x13b)]),0x0;}}function a44_0x20af(){const _0x65cdc0=['Resume\x20from:\x20','✔\x20Workflow\x20run\x20started','Show\x20tasks\x20for\x20an\x20attempt','Listing\x20workflow\x20projects...','List\x20workflows','Filter:\x20','Fetching\x20log\x20files...','session','Error:\x20Project\x20name\x20is\x20required','Session\x20time:\x20','limit','Deleting\x20project\x20','Target:\x20','projectId','List\x20all\x20workflow\x20projects','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Show\x20specific\x20attempt\x20details','attempts','Retry\x20a\x20session\x20or\x20attempt','94ZuzSpP','\x20\x20Location:\x20','skipValidation','workflows','72ziCedG','fromTask','Error:\x20Attempt\x20ID\x20is\x20required','sessionTime','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','stat','Cancelled','List\x20workflow\x20attempts','projectName','\x22?\x20This\x20cannot\x20be\x20undone.','\x20workflow','Getting\x20attempt\x20tasks...','message','project','retrySession','attemptId','projects','2424dyHITP','length','Listing\x20workflow\x20sessions...','round','\x20project','utf-8','\x20\x20Session\x20ID:\x20','isArray','fileSize','task','Parameters:\x20','stringify','tasks','format','Workflow:\x20','Listing\x20workflows...','1304534KaDlvR','Killing\x20attempt...','retryAttemptName','Expected\x20format:\x20--param\x20key=value','json','No\x20log\x20content\x20found','1575130pajnpP','From\x20task:\x20','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','\x20\x20Files\x20extracted:\x20','Downloading\x20logs...','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','sessions','taskName','split','includeRetried','substring','finishedAt','done','workflow:kill','Task\x20name:\x20','✔\x20Found\x20','Including\x20subtasks:\x20yes','Listing\x20workflow\x20attempts...','keys','cause','Output\x20directory:\x20','createdAt','12051ikCVBY','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Pattern:\x20','from','canceling','logFiles','success','reason','workflow:projects','cancelRequested','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','fs/promises','description','error','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20Attempt\x20ID:\x20','workflow:logs','✔\x20Downloaded\x20','retryAttempt','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','Revision:\x20','Getting\x20attempt\x20details...','Error:\x20Invalid\x20JSON\x20in\x20--params','workflow:attempt','✔\x20Deleted\x20project\x20','539211QnyscT','running','Project\x20directory:\x20','download','indexOf','✔\x20Pushed\x20','Error:\x20Invalid\x20parameter\x20format:\x20','workflow:retry','data','parse','1070292ltzxbY','Kill\x20a\x20running\x20attempt','sessionId','kill','\x20\x20Project\x20ID:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Retrying\x20attempt...','status','index','\x20\x20Cause:\x20','logs','name','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Attempt\x20ID:\x20','...','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Error:\x20','workflow:delete','Starting\x20workflow\x20run...','Params:\x20','select','workflow:push','Select\x20a\x20task\x20to\x20view\x20logs:','Retrying\x20session...','workflow','verbose','run','resumeFrom','\x20is\x20not\x20a\x20directory','Validation:\x20skipped','execute','Filter:\x20project=','revision','includeSubtasks','Project\x20filter:\x20','✔\x20Retry\x20started','\x20session','\x20task','1285BwyGhy','attempt','yes','getTime','workflow:workflows','\x20\x20Revision:\x20','Force:\x20yes','1016RlixoF','params'];a44_0x20af=function(){return _0x65cdc0;};return a44_0x20af();}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a45_0x1324(){const _0xab6711=['18yVnyEH','16373BJyeYD','2vhJInZ','23169JOGdjI','tdx/','entries','363467EoPcyU','0.0.0','75752BNDSBX',';\x20node/','2310820eykjmf','1305135ajjmKb','utf-8','version','length','3228885BXqFrT','X-Trino-User','168NNFYQG','tdx','152TgvHdK','TD1\x20'];a45_0x1324=function(){return _0xab6711;};return a45_0x1324();}(function(_0x525383,_0x3cc27b){const _0x221200=a45_0x37a8,_0x2427bf=_0x525383();while(!![]){try{const _0x293f72=-parseInt(_0x221200(0x12b))/0x1*(-parseInt(_0x221200(0x127))/0x2)+parseInt(_0x221200(0x128))/0x3*(-parseInt(_0x221200(0x123))/0x4)+parseInt(_0x221200(0x11b))/0x5+-parseInt(_0x221200(0x121))/0x6*(parseInt(_0x221200(0x126))/0x7)+-parseInt(_0x221200(0x12d))/0x8*(parseInt(_0x221200(0x125))/0x9)+parseInt(_0x221200(0x12f))/0xa+-parseInt(_0x221200(0x11f))/0xb;if(_0x293f72===_0x3cc27b)break;else _0x2427bf['push'](_0x2427bf['shift']());}catch(_0xe52369){_0x2427bf['push'](_0x2427bf['shift']());}}}(a45_0x1324,0x2cf49));import{platform}from'os';function a45_0x37a8(_0x4c285a,_0x3286d4){_0x4c285a=_0x4c285a-0x11b;const _0x132411=a45_0x1324();let _0x37a87e=_0x132411[_0x4c285a];return _0x37a87e;}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x14a195=a45_0x37a8;try{const _0x596502=fileURLToPath(import.meta.url),_0x2aeb29=dirname(_0x596502),_0x3d912b=join(_0x2aeb29,'../../package.json'),_0x55f57e=JSON['parse'](readFileSync(_0x3d912b,_0x14a195(0x11c)));return _0x55f57e['version'];}catch{return _0x14a195(0x12c);}}export function getUserAgent(){const _0xe873f5=a45_0x37a8,_0x110057=getVersion(),_0x414938=platform(),_0x7d59fc=process[_0xe873f5(0x11d)]['replace']('v','');return _0xe873f5(0x129)+_0x110057+'\x20('+_0x414938+_0xe873f5(0x12e)+_0x7d59fc+')';}export function getAuthHeaders(_0x34ed2c,_0x3181fd){const _0x552c6a=a45_0x37a8,_0x3ff023=getVersion(),_0x25896e={'User-Agent':getUserAgent(),'X-TD-Client':_0x552c6a(0x122),'X-TD-Client-Version':_0x3ff023};return _0x3181fd&&(_0x25896e['Authorization']=_0x552c6a(0x124)+_0x3181fd),_0x25896e;}export function toHeaderRecord(_0x56d42c){const _0x267c73=a45_0x37a8,_0x3ec716={};for(const [_0x1e888e,_0x31547d]of Object[_0x267c73(0x12a)](_0x56d42c)){_0x31547d!==undefined&&(_0x3ec716[_0x1e888e]=_0x31547d);}return _0x3ec716;}export function getTrinoHeaders(_0xddaa33,_0x4d4d5c){const _0x51435f=a45_0x37a8,_0x5b923c=getAuthHeaders(_0xddaa33,_0x4d4d5c),_0x18df6d=toHeaderRecord(_0x5b923c);return delete _0x18df6d['Authorization'],_0x4d4d5c&&(_0x18df6d[_0x51435f(0x120)]=_0x4d4d5c),_0x18df6d;}export function hasAPIKey(_0x4891db){const _0x2eecbf=a45_0x37a8,_0x212095=getAPIKey(_0x4891db);return _0x212095!==undefined&&_0x212095[_0x2eecbf(0x11e)]>0x0;}
|