@treasuredata/tdx 0.29.2 β 0.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a30_0x1ff8d3=a30_0x3906;(function(_0x40b777,_0x1d9e30){const _0x5075e8=a30_0x3906,_0x519952=_0x40b777();while(!![]){try{const _0x287292=-parseInt(_0x5075e8(0xa3))/0x1*(-parseInt(_0x5075e8(0xb2))/0x2)+-parseInt(_0x5075e8(0xe3))/0x3*(parseInt(_0x5075e8(0x10c))/0x4)+parseInt(_0x5075e8(0xda))/0x5*(-parseInt(_0x5075e8(0xba))/0x6)+parseInt(_0x5075e8(0xc6))/0x7+-parseInt(_0x5075e8(0x100))/0x8*(parseInt(_0x5075e8(0xef))/0x9)+-parseInt(_0x5075e8(0x103))/0xa*(parseInt(_0x5075e8(0x11c))/0xb)+parseInt(_0x5075e8(0xc3))/0xc;if(_0x287292===_0x1d9e30)break;else _0x519952['push'](_0x519952['shift']());}catch(_0x5ab5da){_0x519952['push'](_0x519952['shift']());}}}(a30_0x1d61,0x34e48));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';function a30_0x3906(_0x538a2d,_0x36cc57){_0x538a2d=_0x538a2d-0x9c;const _0x1d6194=a30_0x1d61();let _0x390619=_0x1d6194[_0x538a2d];return _0x390619;}import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{readFileSync}from'fs';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a30_0x1d61(){const _0x206444=['4XhkIVt','last_job','lastRun','next_run_at','\x20\x20Time:\x20','length','retry_limit','toLocaleDateString','history','status','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20history\x20<name>\x20[--from\x20<n>]\x20[--to\x20<n>]','schedule:delete','schedule:create','entries','execute','1466Sltknj','schedule:history','jobs','map','created_at','Run\x20a\x20scheduled\x20query\x20immediately','\x20\x20Database:\x20','padEnd','372cWFESB','No\x20scheduled\x20queries\x20found','At\x20least\x20one\x20option\x20must\x20be\x20provided\x20to\x20update','num','start_at','time_zone','\x20\x20β\x20','Create\x20a\x20scheduled\x20query','timezone','7393644gwxDDt','statusIcon','Schedule\x20created:\x20','2332155kCHTvi','data','abs','engine_version','cyan','schedule:list','list','type','name','show','time','\x20matching\x20\x22','round','(unnamed)','delay','in\x20','red','validate','success','table','26160IdMTKL','engineVersion','user_name','delete','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20update\x20<name>\x20[options]','trino','Schedule\x20deleted:\x20','output','updated_at','3oeireL','has_next_page','run','Show\x20schedule\x20execution\x20history','queries','Delete\x20a\x20scheduled\x20query','Update\x20a\x20scheduled\x20query','schedules','\x20created','Getting\x20schedule\x20details...','queryUrl','create','247392zygbdi','yes','Getting\x20schedule\x20history...','max','database','Showing\x20first\x20','Creating\x20schedule:\x20','job_id','join','List\x20scheduled\x20queries','Running\x20schedule...','ies','args','log','soon','keys','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20run\x20<name>\x20[--time\x20<iso8601>]\x20[--num\x20<1-10>]','48GCuhcG','nextRun','...','1699310OlRiPF','green','trim','\x20schedules','scheduled_at','limit','listQueries','Show\x20schedule\x20details','jsonl','305372AIGKgo','format','h\x20ago','INVALID_ARGUMENT','error','query','retryLimit','Schedule\x20run\x20submitted:\x20','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]','cron','file','\x20\x20Job\x20ID:\x20','Failed\x20to\x20read\x20file:\x20','/app/queries/editor?queryId=','getTime','options','11petnza','description','substring','priority','Searching\x20scheduled\x20queries\x20matching\x20\x22','Query\x20file\x20is\x20empty','\x20(use\x20--limit\x20to\x20see\x20more)','verbose','\x20\x20Type:\x20','just\x20now','Updating\x20schedule:\x20','Found\x20','json','count','Running\x20schedule:\x20','from','π
\x20','Listing\x20scheduled\x20queries...','ended_at','site','result','Cancelled'];a30_0x1d61=function(){return _0x206444;};return a30_0x1d61();}import{getConsoleUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a30_0x2917ba from'chalk';function formatRelativeTime(_0x1c9612){const _0x3ce014=a30_0x3906,_0x461a96=new Date(_0x1c9612),_0x2d7882=new Date(),_0x4e7278=_0x461a96[_0x3ce014(0x11a)]()-_0x2d7882[_0x3ce014(0x11a)](),_0x211d2c=Math[_0x3ce014(0xc8)](_0x4e7278)/0x3e8,_0x4ea78a=_0x4e7278<0x0;if(_0x211d2c<0x3c)return _0x4ea78a?_0x3ce014(0x125):_0x3ce014(0xfd);else{if(_0x211d2c<0xe10){const _0x5d4c93=Math['round'](_0x211d2c/0x3c);return _0x4ea78a?_0x5d4c93+'m\x20ago':_0x3ce014(0xd5)+_0x5d4c93+'m';}else{if(_0x211d2c<0x15180){const _0x4f57df=Math[_0x3ce014(0xd2)](_0x211d2c/0xe10);return _0x4ea78a?_0x4f57df+_0x3ce014(0x10e):_0x3ce014(0xd5)+_0x4f57df+'h';}else{if(_0x211d2c<0x93a80){const _0x27a43c=Math[_0x3ce014(0xd2)](_0x211d2c/0x15180);return _0x4ea78a?_0x27a43c+'d\x20ago':_0x3ce014(0xd5)+_0x27a43c+'d';}else return _0x461a96[_0x3ce014(0xaa)]();}}}}export class ScheduleListCommand extends BaseCommand{[a30_0x1ff8d3(0xce)]=a30_0x1ff8d3(0xcb);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xf8);async[a30_0x1ff8d3(0xb1)](_0x5b6028){const _0x47c961=a30_0x1ff8d3,{options:_0x5ba1ef,args:_0x410340,tdx:_0x32176b}=_0x5b6028,_0x416cd8=resolveLimit(_0x5ba1ef[_0x47c961(0x108)],DEFAULT_DISPLAY_LIMIT),_0x2eef20=_0x410340[0x0],_0x22b3de=_0x2eef20?_0x47c961(0x120)+_0x2eef20+'\x22...':_0x47c961(0x9e),_0x4c70e1=await withSpinner(_0x22b3de,()=>_0x32176b['schedules'][_0x47c961(0x109)]({'limit':_0x416cd8,'scheduled':!![],'pattern':_0x2eef20}),{'verbose':_0x5ba1ef[_0x47c961(0x123)]}),_0x2def05=_0x4c70e1['data'][_0x47c961(0xe7)],_0x501499=_0x4c70e1[_0x47c961(0xc7)]['pagination'][_0x47c961(0xe4)],_0x4d9c43=_0x2eef20?_0x47c961(0xd1)+_0x2eef20+'\x22':'';_0x501499?console[_0x47c961(0x110)](_0x47c961(0xf4)+_0x2def05[_0x47c961(0xa8)]+_0x47c961(0x106)+_0x4d9c43+_0x47c961(0x122)):console[_0x47c961(0x110)](_0x47c961(0x127)+_0x2def05[_0x47c961(0xa8)]+'\x20scheduled\x20quer'+(_0x2def05[_0x47c961(0xa8)]!==0x1?_0x47c961(0xfa):'y')+_0x4d9c43);if(_0x5ba1ef[_0x47c961(0x10d)]===_0x47c961(0x128)||_0x5ba1ef[_0x47c961(0x10d)]===_0x47c961(0x10b)||_0x5ba1ef[_0x47c961(0x10d)]===_0x47c961(0xd9)||_0x5ba1ef[_0x47c961(0x10d)]==='tsv'){const _0x55161c=_0x2def05[_0x47c961(0xb5)](_0x15f934=>({'id':_0x15f934['id'],'name':_0x15f934[_0x47c961(0xce)],'cron':_0x15f934[_0x47c961(0x115)],'database':_0x15f934['database']?.[_0x47c961(0xce)],'type':_0x15f934[_0x47c961(0xcd)],'timezone':_0x15f934[_0x47c961(0xbf)],'user_name':_0x15f934['user']?.[_0x47c961(0xce)],'updated_at':_0x15f934[_0x47c961(0xe2)],'next_run_at':_0x15f934['next_run_at'],'last_job_status':_0x15f934['last_job']?.[_0x47c961(0xac)]}));await handleSDKOutput(_0x55161c,_0x5ba1ef);}else{if(_0x2def05[_0x47c961(0xa8)]===0x0)console[_0x47c961(0xfc)](_0x47c961(0xbb));else{const _0x5bc618=_0x5ba1ef[_0x47c961(0xa0)],_0x4b44ac=_0x2def05[_0x47c961(0xb5)](_0x37515c=>{const _0x1b0030=_0x47c961,_0x5b36fa=_0x37515c[_0x1b0030(0xa4)]?.[_0x1b0030(0xac)]?_0x37515c[_0x1b0030(0xa4)][_0x1b0030(0xac)]==='success'?'β':'β':'-',_0x4915a0=_0x37515c[_0x1b0030(0xa4)]?.[_0x1b0030(0x9f)]?formatRelativeTime(_0x37515c['last_job'][_0x1b0030(0x9f)]):'never',_0x13e1ed=_0x37515c[_0x1b0030(0xa6)]?formatRelativeTime(_0x37515c[_0x1b0030(0xa6)]):'-',_0x3f8805=_0x37515c[_0x1b0030(0x115)]||'',_0x4a39c2=_0x37515c['name']||_0x1b0030(0xd3),_0x44a8ed=getConsoleUrl(_0x5bc618,_0x1b0030(0x119)+_0x37515c['id']);return{'statusIcon':_0x5b36fa,'lastRun':_0x4915a0,'nextRun':_0x13e1ed,'cron':_0x3f8805,'name':_0x4a39c2,'queryUrl':_0x44a8ed,'status':_0x37515c['last_job']?.[_0x1b0030(0xac)]};}),_0x8631c2=Math[_0x47c961(0xf2)](..._0x4b44ac[_0x47c961(0xb5)](_0x5e216f=>_0x5e216f[_0x47c961(0xa5)][_0x47c961(0xa8)])),_0x4f4a56=Math[_0x47c961(0xf2)](..._0x4b44ac[_0x47c961(0xb5)](_0x306054=>_0x306054['nextRun'][_0x47c961(0xa8)])),_0x19b72b=Math[_0x47c961(0xf2)](..._0x4b44ac[_0x47c961(0xb5)](_0x3e5abc=>_0x3e5abc[_0x47c961(0x115)][_0x47c961(0xa8)])),_0x33d4cd=_0x4b44ac[_0x47c961(0xb5)](_0x86c5df=>{const _0x31bb1e=_0x47c961,_0x16c32b=_0x86c5df['status']===_0x31bb1e(0xd8)?a30_0x2917ba[_0x31bb1e(0x104)](_0x86c5df['statusIcon']):_0x86c5df['status']==='error'?a30_0x2917ba[_0x31bb1e(0xd6)](_0x86c5df[_0x31bb1e(0xc4)]):a30_0x2917ba['dim'](_0x86c5df[_0x31bb1e(0xc4)]),_0x58def1=_0x86c5df[_0x31bb1e(0xa5)]['padEnd'](_0x8631c2),_0x51db29=_0x86c5df[_0x31bb1e(0x101)][_0x31bb1e(0xb9)](_0x4f4a56),_0x15b92c=_0x86c5df[_0x31bb1e(0x115)]?a30_0x2917ba[_0x31bb1e(0xca)](_0x86c5df[_0x31bb1e(0x115)]['padEnd'](_0x19b72b)):'\x20'['repeat'](_0x19b72b),_0xc8063b=hyperlink(_0x86c5df[_0x31bb1e(0xce)],_0x86c5df[_0x31bb1e(0xed)]);return _0x31bb1e(0x9d)+_0x16c32b+'\x20'+_0x58def1+_0x31bb1e(0xc0)+_0x51db29+'\x20\x20'+_0x15b92c+'\x20\x20'+_0xc8063b;});await writeOutput(_0x33d4cd[_0x47c961(0xf7)]('\x0a'),_0x5ba1ef[_0x47c961(0xe1)],_0x47c961(0xcc));}}return 0x0;}}export class ScheduleShowCommand extends BaseCommand{[a30_0x1ff8d3(0xce)]='schedule:show';['description']=a30_0x1ff8d3(0x10a);[a30_0x1ff8d3(0xd7)](_0x4a14c4){const _0x2e1677=a30_0x1ff8d3,_0x5543fa=_0x4a14c4[_0x2e1677(0xfb)][0x0];if(!_0x5543fa)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20show\x20<name>';return undefined;}async[a30_0x1ff8d3(0xb1)](_0x4ae9d0){const _0x383fdd=a30_0x1ff8d3,{options:_0x4ee797,args:_0xee18f7,tdx:_0x22572a}=_0x4ae9d0,_0xa8fac1=_0xee18f7[0x0],_0x56fb5d=await withSpinner(_0x383fdd(0xec),()=>_0x22572a[_0x383fdd(0xea)][_0x383fdd(0xcf)](_0xa8fac1),{'verbose':_0x4ee797[_0x383fdd(0x123)]}),_0x4f9bd9=_0x56fb5d['data'],_0x383f79={'name':_0x4f9bd9[_0x383fdd(0xce)],'cron':_0x4f9bd9['cron'],'database':_0x4f9bd9[_0x383fdd(0xf3)],'type':_0x4f9bd9['type'],'timezone':_0x4f9bd9[_0x383fdd(0xc2)],'user_name':_0x4f9bd9[_0x383fdd(0xdc)],'created_at':_0x4f9bd9[_0x383fdd(0xb6)],'engine_version':_0x4f9bd9[_0x383fdd(0xc9)],'executing_user_id':_0x4f9bd9['executing_user_id'],'query':_0x4f9bd9['query'],'delay':_0x4f9bd9[_0x383fdd(0xd4)],'priority':_0x4f9bd9[_0x383fdd(0x11f)],'retry_limit':_0x4f9bd9[_0x383fdd(0xa9)],..._0x4f9bd9['result']&&{'result':_0x4f9bd9[_0x383fdd(0xa1)]}};return await handleSingleObjectOutput(_0x383f79,_0x4ee797),0x0;}}export class ScheduleCreateCommand extends BaseCommand{['name']=a30_0x1ff8d3(0xaf);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xc1);[a30_0x1ff8d3(0xd7)](_0x58d77b){const _0x1248f2=a30_0x1ff8d3,_0xd9837e=_0x58d77b[_0x1248f2(0xfb)][0x0];if(!_0xd9837e)return _0x1248f2(0x114);const _0x499af8=_0x58d77b[_0x1248f2(0x11b)];if(!_0x499af8[_0x1248f2(0xf3)])return'Database\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]';return undefined;}async[a30_0x1ff8d3(0xb1)](_0x472b90){const _0x543110=a30_0x1ff8d3,{options:_0x56fcd4,args:_0x47192a,tdx:_0x40db99}=_0x472b90,_0x488694=_0x47192a[0x0],_0x5944bf=_0x56fcd4,_0x2a04e5=_0x5944bf[_0x543110(0xf3)],_0x242a3d=_0x5944bf['file'],_0x1897ab=_0x5944bf['type']||_0x543110(0xdf);let _0x33e0ef;try{_0x33e0ef=readFileSync(_0x242a3d,'utf-8')['trim']();}catch(_0x3f633d){throw new SDKError(ErrorCode[_0x543110(0x10f)],_0x543110(0x118)+_0x242a3d,_0x3f633d instanceof Error?_0x3f633d:undefined);}if(!_0x33e0ef)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x543110(0x121));const _0x10ca90={'database':_0x2a04e5,'query':_0x33e0ef,'type':_0x1897ab};if(_0x5944bf[_0x543110(0x115)])_0x10ca90[_0x543110(0x115)]=_0x5944bf[_0x543110(0x115)];if(_0x5944bf[_0x543110(0xc2)])_0x10ca90[_0x543110(0xc2)]=_0x5944bf['timezone'];if(_0x5944bf[_0x543110(0xd4)]!==undefined)_0x10ca90['delay']=Number(_0x5944bf[_0x543110(0xd4)]);if(_0x5944bf['priority']!==undefined)_0x10ca90['priority']=Number(_0x5944bf[_0x543110(0x11f)]);if(_0x5944bf[_0x543110(0x112)]!==undefined)_0x10ca90[_0x543110(0xa9)]=Number(_0x5944bf[_0x543110(0x112)]);if(_0x5944bf['engineVersion'])_0x10ca90[_0x543110(0xc9)]=_0x5944bf['engineVersion'];if(_0x5944bf[_0x543110(0xa1)])_0x10ca90[_0x543110(0xa1)]=_0x5944bf[_0x543110(0xa1)];if(_0x56fcd4[_0x543110(0x123)]){console[_0x543110(0x110)](_0x543110(0xf5)+_0x488694),console[_0x543110(0x110)](_0x543110(0xb8)+_0x2a04e5),console[_0x543110(0x110)](_0x543110(0x124)+_0x1897ab);if(_0x10ca90[_0x543110(0x115)])console['error']('\x20\x20Cron:\x20'+_0x10ca90[_0x543110(0x115)]);if(_0x10ca90[_0x543110(0xc2)])console['error']('\x20\x20Timezone:\x20'+_0x10ca90[_0x543110(0xc2)]);}const _0x4d2774=await withSpinner('Creating\x20schedule...',()=>_0x40db99[_0x543110(0xea)][_0x543110(0xee)](_0x488694,_0x10ca90),{'verbose':_0x56fcd4[_0x543110(0x123)]});return console[_0x543110(0x110)](_0x543110(0xc5)+_0x4d2774[_0x543110(0xc7)]['name']),await handleSingleObjectOutput(_0x4d2774[_0x543110(0xc7)],_0x56fcd4),0x0;}}export class ScheduleUpdateCommand extends BaseCommand{['name']='schedule:update';['description']=a30_0x1ff8d3(0xe9);[a30_0x1ff8d3(0xd7)](_0x2146ef){const _0x509bb3=a30_0x1ff8d3,_0x24ca7b=_0x2146ef[_0x509bb3(0xfb)][0x0];if(!_0x24ca7b)return _0x509bb3(0xde);return undefined;}async[a30_0x1ff8d3(0xb1)](_0x3e94fa){const _0x56d7a4=a30_0x1ff8d3,{options:_0x3042eb,args:_0x5ee3ad,tdx:_0x5d84f1}=_0x3e94fa,_0x46fe00=_0x5ee3ad[0x0],_0x34580c=_0x3042eb,_0x2aae47={};if(_0x34580c['database'])_0x2aae47[_0x56d7a4(0xf3)]=_0x34580c['database'];if(_0x34580c[_0x56d7a4(0xcd)])_0x2aae47[_0x56d7a4(0xcd)]=_0x34580c[_0x56d7a4(0xcd)];if(_0x34580c['cron'])_0x2aae47[_0x56d7a4(0x115)]=_0x34580c['cron'];if(_0x34580c[_0x56d7a4(0xc2)])_0x2aae47[_0x56d7a4(0xc2)]=_0x34580c['timezone'];if(_0x34580c[_0x56d7a4(0xd4)]!==undefined)_0x2aae47[_0x56d7a4(0xd4)]=Number(_0x34580c[_0x56d7a4(0xd4)]);if(_0x34580c[_0x56d7a4(0x11f)]!==undefined)_0x2aae47[_0x56d7a4(0x11f)]=Number(_0x34580c[_0x56d7a4(0x11f)]);if(_0x34580c[_0x56d7a4(0x112)]!==undefined)_0x2aae47[_0x56d7a4(0xa9)]=Number(_0x34580c[_0x56d7a4(0x112)]);if(_0x34580c[_0x56d7a4(0xdb)])_0x2aae47[_0x56d7a4(0xc9)]=_0x34580c[_0x56d7a4(0xdb)];if(_0x34580c['result'])_0x2aae47['result']=_0x34580c['result'];if(_0x34580c[_0x56d7a4(0x116)])try{_0x2aae47[_0x56d7a4(0x111)]=readFileSync(_0x34580c[_0x56d7a4(0x116)],'utf-8')[_0x56d7a4(0x105)]();}catch(_0x5958b2){throw new SDKError(ErrorCode[_0x56d7a4(0x10f)],'Failed\x20to\x20read\x20file:\x20'+_0x34580c['file'],_0x5958b2 instanceof Error?_0x5958b2:undefined);}if(Object[_0x56d7a4(0xfe)](_0x2aae47)[_0x56d7a4(0xa8)]===0x0)throw new SDKError(ErrorCode[_0x56d7a4(0x10f)],_0x56d7a4(0xbc));if(_0x3042eb[_0x56d7a4(0x123)]){console['error'](_0x56d7a4(0x126)+_0x46fe00);for(const [_0x496e68,_0x3fd7c7]of Object[_0x56d7a4(0xb0)](_0x2aae47)){_0x496e68===_0x56d7a4(0x111)?console['error']('\x20\x20'+_0x496e68+':\x20'+_0x3fd7c7[_0x56d7a4(0x11e)](0x0,0x32)+_0x56d7a4(0x102)):console[_0x56d7a4(0x110)]('\x20\x20'+_0x496e68+':\x20'+_0x3fd7c7);}}const _0x193afb=await withSpinner('Updating\x20schedule...',()=>_0x5d84f1['schedules']['update'](_0x46fe00,_0x2aae47),{'verbose':_0x3042eb[_0x56d7a4(0x123)]});return console['error']('Schedule\x20updated:\x20'+_0x193afb['data'][_0x56d7a4(0xce)]),await handleSingleObjectOutput(_0x193afb[_0x56d7a4(0xc7)],_0x3042eb),0x0;}}export class ScheduleDeleteCommand extends BaseCommand{['name']=a30_0x1ff8d3(0xae);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xe8);[a30_0x1ff8d3(0xd7)](_0x1f7914){const _0x332623=a30_0x1ff8d3,_0x1cc136=_0x1f7914[_0x332623(0xfb)][0x0];if(!_0x1cc136)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20delete\x20<name>';return undefined;}async[a30_0x1ff8d3(0xb1)](_0x35438c){const _0x319027=a30_0x1ff8d3,{options:_0x2a8c01,args:_0x1f5a55,tdx:_0x4731ae}=_0x35438c,_0x4ff049=_0x1f5a55[0x0];if(!_0x2a8c01[_0x319027(0xf0)]){const _0x2ad118=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20schedule\x20\x22'+_0x4ff049+'\x22?');if(!_0x2ad118)return console['error'](_0x319027(0xa2)),0x0;}const _0x266537=await withSpinner('Deleting\x20schedule...',()=>_0x4731ae[_0x319027(0xea)][_0x319027(0xdd)](_0x4ff049),{'verbose':_0x2a8c01[_0x319027(0x123)]});return console[_0x319027(0x110)](_0x319027(0xe0)+_0x266537[_0x319027(0xc7)][_0x319027(0xce)]),0x0;}}export class ScheduleRunCommand extends BaseCommand{[a30_0x1ff8d3(0xce)]='schedule:run';[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xb7);[a30_0x1ff8d3(0xd7)](_0x29d26f){const _0xd3bc89=a30_0x1ff8d3,_0x1bc937=_0x29d26f[_0xd3bc89(0xfb)][0x0];if(!_0x1bc937)return _0xd3bc89(0xff);return undefined;}async[a30_0x1ff8d3(0xb1)](_0x5c1af3){const _0x53006b=a30_0x1ff8d3,{options:_0x2a12b2,args:_0x30946d,tdx:_0x240d68}=_0x5c1af3,_0xe47a4e=_0x30946d[0x0],_0x222ae7=_0x2a12b2,_0x3bd566=_0x222ae7[_0x53006b(0xd0)],_0x4b2d19=_0x222ae7[_0x53006b(0xbd)]!==undefined?Number(_0x222ae7[_0x53006b(0xbd)]):undefined;if(_0x2a12b2[_0x53006b(0x123)]){console[_0x53006b(0x110)](_0x53006b(0x12a)+_0xe47a4e);if(_0x3bd566)console[_0x53006b(0x110)](_0x53006b(0xa7)+_0x3bd566);if(_0x4b2d19)console[_0x53006b(0x110)]('\x20\x20Num:\x20'+_0x4b2d19);}const _0x1ee627=await withSpinner(_0x53006b(0xf9),()=>_0x240d68['schedules'][_0x53006b(0xe5)](_0xe47a4e,{'time':_0x3bd566,'num':_0x4b2d19}),{'verbose':_0x2a12b2['verbose']}),_0x360538=_0x1ee627[_0x53006b(0xc7)][_0x53006b(0xb4)];console[_0x53006b(0x110)](_0x53006b(0x113)+_0x360538[_0x53006b(0xa8)]+'\x20job'+(_0x360538[_0x53006b(0xa8)]!==0x1?'s':'')+_0x53006b(0xeb));for(const _0x3c02f4 of _0x360538){console[_0x53006b(0x110)](_0x53006b(0x117)+_0x3c02f4['job_id']);}return await handleSDKOutput(_0x360538,_0x2a12b2),0x0;}}export class ScheduleHistoryCommand extends BaseCommand{['name']=a30_0x1ff8d3(0xb3);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xe6);[a30_0x1ff8d3(0xd7)](_0x285136){const _0x53e56f=a30_0x1ff8d3,_0x1d1090=_0x285136[_0x53e56f(0xfb)][0x0];if(!_0x1d1090)return _0x53e56f(0xad);return undefined;}async[a30_0x1ff8d3(0xb1)](_0x4f8eb2){const _0x26bc97=a30_0x1ff8d3,{options:_0x3e0831,args:_0x2e7314,tdx:_0x15f129}=_0x4f8eb2,_0x33bfea=_0x2e7314[0x0],_0x1b0836=_0x3e0831,_0x26e971=_0x1b0836[_0x26bc97(0x9c)]!==undefined?Number(_0x1b0836[_0x26bc97(0x9c)]):undefined,_0x412a2f=_0x1b0836['to']!==undefined?Number(_0x1b0836['to']):undefined,_0x5a7f83=await withSpinner(_0x26bc97(0xf1),()=>_0x15f129[_0x26bc97(0xea)][_0x26bc97(0xab)](_0x33bfea,{'from':_0x26e971,'to':_0x412a2f}),{'verbose':_0x3e0831[_0x26bc97(0x123)]}),_0xadea98=_0x5a7f83['data'];console[_0x26bc97(0x110)]('Found\x20'+_0xadea98[_0x26bc97(0x129)]+'\x20execution'+(_0xadea98[_0x26bc97(0x129)]!==0x1?'s':'')+'\x20(showing\x20'+_0xadea98['from']+'-'+_0xadea98['to']+')');const _0x485b74=_0xadea98[_0x26bc97(0xab)][_0x26bc97(0xb5)](_0x3924b9=>({'job_id':_0x3924b9[_0x26bc97(0xf6)],'type':_0x3924b9[_0x26bc97(0xcd)],'status':_0x3924b9[_0x26bc97(0xac)],'scheduled_at':_0x3924b9[_0x26bc97(0x107)],'created_at':_0x3924b9[_0x26bc97(0xb6)],'start_at':_0x3924b9[_0x26bc97(0xbe)],'end_at':_0x3924b9['end_at']}));return await handleSDKOutput(_0x485b74,_0x3e0831),0x0;}}
|
|
1
|
+
const a30_0x468473=a30_0x4eef;function a30_0x5e0b(){const _0x497569=['Listing\x20scheduled\x20queries...','padEnd','jobs','data','verbose','time_zone','6BFcLEY','2370208AydcIW','type','green','\x20schedules','852tCsSib','cron','status','Updating\x20schedule:\x20','\x20\x20Database:\x20','nextRun','start_at','json','\x20\x20Num:\x20','soon','create','162321RzUMyB','last_job','ended_at','schedule:run','\x20\x20β\x20','d\x20ago','queryUrl','ies','\x20job','\x20(use\x20--limit\x20to\x20see\x20more)','\x20scheduled\x20quer','44985RARywi','substring','map','trim','/app/queries/editor?queryId=','Failed\x20to\x20read\x20file:\x20','retryLimit','log','\x20(showing\x20','20041520AXpQyk','dim','description','Schedule\x20run\x20submitted:\x20','Database\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]','error','file','At\x20least\x20one\x20option\x20must\x20be\x20provided\x20to\x20update','cyan','engine_version','schedule:update','\x20\x20Time:\x20','lastRun','name','9585486DvsYia','Run\x20a\x20scheduled\x20query\x20immediately','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20delete\x20<name>','getTime','Creating\x20schedule...','Update\x20a\x20scheduled\x20query','database','success','INVALID_ARGUMENT','Updating\x20schedule...','created_at','round','statusIcon','schedule:list','\x20matching\x20\x22','length','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]','jsonl','max','timezone','toLocaleDateString','result','schedule:show','end_at','pagination','validate','query','join','h\x20ago','has_next_page','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20schedule\x20\x22','job_id','List\x20scheduled\x20queries','run','utf-8','Create\x20a\x20scheduled\x20query','retry_limit','update','Running\x20schedule...','engineVersion','Query\x20file\x20is\x20empty','args','repeat','Found\x20','schedule:delete','list','Schedule\x20updated:\x20','Searching\x20scheduled\x20queries\x20matching\x20\x22','queries','red','count','schedules','Deleting\x20schedule...','next_run_at','No\x20scheduled\x20queries\x20found','time','trino','priority','output','\x20\x20Timezone:\x20','Running\x20schedule:\x20','site','format','\x20\x20Type:\x20','3129tUlhuV','just\x20now','\x22...','delay','\x20\x20Job\x20ID:\x20','18204xCvNyw','num','yes','(unnamed)','\x20\x20Cron:\x20','1485346qSzVBb','delete','keys','tsv','executing_user_id','listQueries','schedule:history','user_name','π
\x20','in\x20','from','Show\x20schedule\x20details','never','execute'];a30_0x5e0b=function(){return _0x497569;};return a30_0x5e0b();}(function(_0x1e05f2,_0x550d6a){const _0x45bfde=a30_0x4eef,_0x1d4559=_0x1e05f2();while(!![]){try{const _0x2b1de0=parseInt(_0x45bfde(0x18f))/0x1+parseInt(_0x45bfde(0x16b))/0x2*(parseInt(_0x45bfde(0x17f))/0x3)+parseInt(_0x45bfde(0x184))/0x4*(parseInt(_0x45bfde(0x19a))/0x5)+-parseInt(_0x45bfde(0x166))/0x6*(parseInt(_0x45bfde(0x161))/0x7)+-parseInt(_0x45bfde(0x180))/0x8+parseInt(_0x45bfde(0x121))/0x9+-parseInt(_0x45bfde(0x113))/0xa;if(_0x2b1de0===_0x550d6a)break;else _0x1d4559['push'](_0x1d4559['shift']());}catch(_0x552c1a){_0x1d4559['push'](_0x1d4559['shift']());}}}(a30_0x5e0b,0xed6a8));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{readFileSync}from'fs';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a30_0x2d3e2d from'chalk';function formatRelativeTime(_0x4a48cf){const _0x33007e=a30_0x4eef,_0x1b2a3c=new Date(_0x4a48cf),_0x5f133d=new Date(),_0x53e722=_0x1b2a3c[_0x33007e(0x124)]()-_0x5f133d[_0x33007e(0x124)](),_0x2694b2=Math['abs'](_0x53e722)/0x3e8,_0x4d56d6=_0x53e722<0x0;if(_0x2694b2<0x3c)return _0x4d56d6?_0x33007e(0x162):_0x33007e(0x18d);else{if(_0x2694b2<0xe10){const _0xc3c0fc=Math[_0x33007e(0x12c)](_0x2694b2/0x3c);return _0x4d56d6?_0xc3c0fc+'m\x20ago':_0x33007e(0x174)+_0xc3c0fc+'m';}else{if(_0x2694b2<0x15180){const _0x23e453=Math[_0x33007e(0x12c)](_0x2694b2/0xe10);return _0x4d56d6?_0x23e453+_0x33007e(0x13d):_0x33007e(0x174)+_0x23e453+'h';}else{if(_0x2694b2<0x93a80){const _0x2b145e=Math[_0x33007e(0x12c)](_0x2694b2/0x15180);return _0x4d56d6?_0x2b145e+_0x33007e(0x194):_0x33007e(0x174)+_0x2b145e+'d';}else return _0x1b2a3c[_0x33007e(0x135)]();}}}}export class ScheduleListCommand extends BaseCommand{[a30_0x468473(0x120)]=a30_0x468473(0x12e);[a30_0x468473(0x115)]=a30_0x468473(0x141);async[a30_0x468473(0x178)](_0x4a1be3){const _0x432652=a30_0x468473,{options:_0x327b71,args:_0x27ce65,tdx:_0x4423ba}=_0x4a1be3,_0x5abddf=resolveLimit(_0x327b71['limit'],DEFAULT_DISPLAY_LIMIT),_0x1a2c51=_0x27ce65[0x0],_0x5cfec3=_0x1a2c51?_0x432652(0x150)+_0x1a2c51+_0x432652(0x163):_0x432652(0x179),_0x76fbec=await withSpinner(_0x5cfec3,()=>_0x4423ba[_0x432652(0x154)][_0x432652(0x170)]({'limit':_0x5abddf,'scheduled':!![],'pattern':_0x1a2c51}),{'verbose':_0x327b71[_0x432652(0x17d)]}),_0x45c46b=_0x76fbec[_0x432652(0x17c)][_0x432652(0x151)],_0x274986=_0x76fbec['data'][_0x432652(0x139)][_0x432652(0x13e)],_0x3f0617=_0x1a2c51?_0x432652(0x12f)+_0x1a2c51+'\x22':'';_0x274986?console[_0x432652(0x118)]('Showing\x20first\x20'+_0x45c46b[_0x432652(0x130)]+_0x432652(0x183)+_0x3f0617+_0x432652(0x198)):console[_0x432652(0x118)](_0x432652(0x14c)+_0x45c46b[_0x432652(0x130)]+_0x432652(0x199)+(_0x45c46b[_0x432652(0x130)]!==0x1?_0x432652(0x196):'y')+_0x3f0617);if(_0x327b71['format']===_0x432652(0x18b)||_0x327b71['format']===_0x432652(0x132)||_0x327b71[_0x432652(0x15f)]==='table'||_0x327b71[_0x432652(0x15f)]===_0x432652(0x16e)){const _0x12ff97=_0x45c46b['map'](_0xd6a44b=>({'id':_0xd6a44b['id'],'name':_0xd6a44b['name'],'cron':_0xd6a44b[_0x432652(0x185)],'database':_0xd6a44b[_0x432652(0x127)]?.[_0x432652(0x120)],'type':_0xd6a44b[_0x432652(0x181)],'timezone':_0xd6a44b[_0x432652(0x17e)],'user_name':_0xd6a44b['user']?.[_0x432652(0x120)],'updated_at':_0xd6a44b['updated_at'],'next_run_at':_0xd6a44b[_0x432652(0x156)],'last_job_status':_0xd6a44b[_0x432652(0x190)]?.[_0x432652(0x186)]}));await handleSDKOutput(_0x12ff97,_0x327b71);}else{if(_0x45c46b['length']===0x0)console[_0x432652(0x111)](_0x432652(0x157));else{const _0x109595=_0x327b71[_0x432652(0x15e)],_0x3dae87=_0x45c46b['map'](_0x322e90=>{const _0x204aa2=_0x432652,_0x17c96c=_0x322e90[_0x204aa2(0x190)]?.[_0x204aa2(0x186)]?_0x322e90[_0x204aa2(0x190)][_0x204aa2(0x186)]===_0x204aa2(0x128)?'β':'β':'-',_0x110d3a=_0x322e90[_0x204aa2(0x190)]?.[_0x204aa2(0x191)]?formatRelativeTime(_0x322e90[_0x204aa2(0x190)][_0x204aa2(0x191)]):_0x204aa2(0x177),_0x24df89=_0x322e90[_0x204aa2(0x156)]?formatRelativeTime(_0x322e90[_0x204aa2(0x156)]):'-',_0x281c91=_0x322e90[_0x204aa2(0x185)]||'',_0xb8ddc3=_0x322e90[_0x204aa2(0x120)]||_0x204aa2(0x169),_0x918379=getConsoleUrl(_0x109595,_0x204aa2(0x10e)+_0x322e90['id']);return{'statusIcon':_0x17c96c,'lastRun':_0x110d3a,'nextRun':_0x24df89,'cron':_0x281c91,'name':_0xb8ddc3,'queryUrl':_0x918379,'status':_0x322e90[_0x204aa2(0x190)]?.[_0x204aa2(0x186)]};}),_0x43cf74=Math[_0x432652(0x133)](..._0x3dae87[_0x432652(0x19c)](_0x48c1ad=>_0x48c1ad[_0x432652(0x11f)][_0x432652(0x130)])),_0x39acc0=Math[_0x432652(0x133)](..._0x3dae87['map'](_0x2b0759=>_0x2b0759[_0x432652(0x189)][_0x432652(0x130)])),_0x2402fa=Math[_0x432652(0x133)](..._0x3dae87[_0x432652(0x19c)](_0x32072c=>_0x32072c[_0x432652(0x185)][_0x432652(0x130)])),_0x27b5c9=_0x3dae87[_0x432652(0x19c)](_0xa537b4=>{const _0x5ab745=_0x432652,_0x28f3be=_0xa537b4[_0x5ab745(0x186)]==='success'?a30_0x2d3e2d[_0x5ab745(0x182)](_0xa537b4[_0x5ab745(0x12d)]):_0xa537b4[_0x5ab745(0x186)]===_0x5ab745(0x118)?a30_0x2d3e2d[_0x5ab745(0x152)](_0xa537b4[_0x5ab745(0x12d)]):a30_0x2d3e2d[_0x5ab745(0x114)](_0xa537b4[_0x5ab745(0x12d)]),_0x1d91d4=_0xa537b4[_0x5ab745(0x11f)][_0x5ab745(0x17a)](_0x43cf74),_0x475176=_0xa537b4[_0x5ab745(0x189)][_0x5ab745(0x17a)](_0x39acc0),_0x45bf35=_0xa537b4[_0x5ab745(0x185)]?a30_0x2d3e2d[_0x5ab745(0x11b)](_0xa537b4['cron'][_0x5ab745(0x17a)](_0x2402fa)):'\x20'[_0x5ab745(0x14b)](_0x2402fa),_0x5ed913=hyperlink(_0xa537b4[_0x5ab745(0x120)],_0xa537b4[_0x5ab745(0x195)]);return _0x5ab745(0x173)+_0x28f3be+'\x20'+_0x1d91d4+_0x5ab745(0x193)+_0x475176+'\x20\x20'+_0x45bf35+'\x20\x20'+_0x5ed913;});await writeOutput(_0x27b5c9[_0x432652(0x13c)]('\x0a'),_0x327b71[_0x432652(0x15b)],_0x432652(0x14e));}}return 0x0;}}export class ScheduleShowCommand extends BaseCommand{['name']=a30_0x468473(0x137);[a30_0x468473(0x115)]=a30_0x468473(0x176);[a30_0x468473(0x13a)](_0x2a4b90){const _0x5f20ef=a30_0x468473,_0x40d929=_0x2a4b90[_0x5f20ef(0x14a)][0x0];if(!_0x40d929)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20show\x20<name>';return undefined;}async['execute'](_0x33f21a){const _0x31fc30=a30_0x468473,{options:_0x7c1aa3,args:_0xca728c,tdx:_0x5cc12b}=_0x33f21a,_0x1cec8b=_0xca728c[0x0],_0x27bd76=await withSpinner('Getting\x20schedule\x20details...',()=>_0x5cc12b[_0x31fc30(0x154)]['show'](_0x1cec8b),{'verbose':_0x7c1aa3[_0x31fc30(0x17d)]}),_0x4545a4=_0x27bd76['data'],_0x2d0449={'name':_0x4545a4[_0x31fc30(0x120)],'cron':_0x4545a4[_0x31fc30(0x185)],'database':_0x4545a4['database'],'type':_0x4545a4['type'],'timezone':_0x4545a4[_0x31fc30(0x134)],'user_name':_0x4545a4[_0x31fc30(0x172)],'created_at':_0x4545a4[_0x31fc30(0x12b)],'engine_version':_0x4545a4[_0x31fc30(0x11c)],'executing_user_id':_0x4545a4[_0x31fc30(0x16f)],'query':_0x4545a4[_0x31fc30(0x13b)],'delay':_0x4545a4[_0x31fc30(0x164)],'priority':_0x4545a4[_0x31fc30(0x15a)],'retry_limit':_0x4545a4[_0x31fc30(0x145)],..._0x4545a4[_0x31fc30(0x136)]&&{'result':_0x4545a4[_0x31fc30(0x136)]}};return await handleSingleObjectOutput(_0x2d0449,_0x7c1aa3),0x0;}}export class ScheduleCreateCommand extends BaseCommand{[a30_0x468473(0x120)]='schedule:create';['description']=a30_0x468473(0x144);[a30_0x468473(0x13a)](_0x119759){const _0x2c9d36=a30_0x468473,_0x332816=_0x119759[_0x2c9d36(0x14a)][0x0];if(!_0x332816)return _0x2c9d36(0x131);const _0x5d04eb=_0x119759['options'];if(!_0x5d04eb[_0x2c9d36(0x127)])return _0x2c9d36(0x117);return undefined;}async['execute'](_0x5b636e){const _0xba40f8=a30_0x468473,{options:_0x33bc55,args:_0x6f3a2f,tdx:_0x568be8}=_0x5b636e,_0x89a89=_0x6f3a2f[0x0],_0x4afec0=_0x33bc55,_0x4162f5=_0x4afec0[_0xba40f8(0x127)],_0x4be872=_0x4afec0[_0xba40f8(0x119)],_0x46a2be=_0x4afec0[_0xba40f8(0x181)]||_0xba40f8(0x159);let _0xbaf222;try{_0xbaf222=readFileSync(_0x4be872,'utf-8')['trim']();}catch(_0xd11a7e){throw new SDKError(ErrorCode[_0xba40f8(0x129)],_0xba40f8(0x10f)+_0x4be872,_0xd11a7e instanceof Error?_0xd11a7e:undefined);}if(!_0xbaf222)throw new SDKError(ErrorCode[_0xba40f8(0x129)],_0xba40f8(0x149));const _0x5d7053={'database':_0x4162f5,'query':_0xbaf222,'type':_0x46a2be};if(_0x4afec0['cron'])_0x5d7053['cron']=_0x4afec0[_0xba40f8(0x185)];if(_0x4afec0[_0xba40f8(0x134)])_0x5d7053['timezone']=_0x4afec0[_0xba40f8(0x134)];if(_0x4afec0['delay']!==undefined)_0x5d7053[_0xba40f8(0x164)]=Number(_0x4afec0['delay']);if(_0x4afec0[_0xba40f8(0x15a)]!==undefined)_0x5d7053[_0xba40f8(0x15a)]=Number(_0x4afec0[_0xba40f8(0x15a)]);if(_0x4afec0[_0xba40f8(0x110)]!==undefined)_0x5d7053['retry_limit']=Number(_0x4afec0[_0xba40f8(0x110)]);if(_0x4afec0[_0xba40f8(0x148)])_0x5d7053[_0xba40f8(0x11c)]=_0x4afec0['engineVersion'];if(_0x4afec0['result'])_0x5d7053[_0xba40f8(0x136)]=_0x4afec0[_0xba40f8(0x136)];if(_0x33bc55[_0xba40f8(0x17d)]){console[_0xba40f8(0x118)]('Creating\x20schedule:\x20'+_0x89a89),console['error'](_0xba40f8(0x188)+_0x4162f5),console[_0xba40f8(0x118)](_0xba40f8(0x160)+_0x46a2be);if(_0x5d7053['cron'])console[_0xba40f8(0x118)](_0xba40f8(0x16a)+_0x5d7053[_0xba40f8(0x185)]);if(_0x5d7053[_0xba40f8(0x134)])console[_0xba40f8(0x118)](_0xba40f8(0x15c)+_0x5d7053[_0xba40f8(0x134)]);}const _0x3855ec=await withSpinner(_0xba40f8(0x125),()=>_0x568be8['schedules'][_0xba40f8(0x18e)](_0x89a89,_0x5d7053),{'verbose':_0x33bc55[_0xba40f8(0x17d)]});return console['error']('Schedule\x20created:\x20'+_0x3855ec[_0xba40f8(0x17c)]['name']),await handleSingleObjectOutput(_0x3855ec[_0xba40f8(0x17c)],_0x33bc55),0x0;}}export class ScheduleUpdateCommand extends BaseCommand{[a30_0x468473(0x120)]=a30_0x468473(0x11d);[a30_0x468473(0x115)]=a30_0x468473(0x126);[a30_0x468473(0x13a)](_0x177a1b){const _0x3af23c=a30_0x468473,_0x4466d2=_0x177a1b[_0x3af23c(0x14a)][0x0];if(!_0x4466d2)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20update\x20<name>\x20[options]';return undefined;}async[a30_0x468473(0x178)](_0x2c7da4){const _0x5e505a=a30_0x468473,{options:_0x298ea8,args:_0x23631b,tdx:_0x10ee6e}=_0x2c7da4,_0xcd283c=_0x23631b[0x0],_0x5c575f=_0x298ea8,_0x4a3d10={};if(_0x5c575f['database'])_0x4a3d10[_0x5e505a(0x127)]=_0x5c575f[_0x5e505a(0x127)];if(_0x5c575f[_0x5e505a(0x181)])_0x4a3d10[_0x5e505a(0x181)]=_0x5c575f[_0x5e505a(0x181)];if(_0x5c575f['cron'])_0x4a3d10[_0x5e505a(0x185)]=_0x5c575f[_0x5e505a(0x185)];if(_0x5c575f[_0x5e505a(0x134)])_0x4a3d10['timezone']=_0x5c575f[_0x5e505a(0x134)];if(_0x5c575f[_0x5e505a(0x164)]!==undefined)_0x4a3d10[_0x5e505a(0x164)]=Number(_0x5c575f[_0x5e505a(0x164)]);if(_0x5c575f[_0x5e505a(0x15a)]!==undefined)_0x4a3d10[_0x5e505a(0x15a)]=Number(_0x5c575f[_0x5e505a(0x15a)]);if(_0x5c575f[_0x5e505a(0x110)]!==undefined)_0x4a3d10[_0x5e505a(0x145)]=Number(_0x5c575f[_0x5e505a(0x110)]);if(_0x5c575f[_0x5e505a(0x148)])_0x4a3d10[_0x5e505a(0x11c)]=_0x5c575f[_0x5e505a(0x148)];if(_0x5c575f[_0x5e505a(0x136)])_0x4a3d10[_0x5e505a(0x136)]=_0x5c575f['result'];if(_0x5c575f['file'])try{_0x4a3d10[_0x5e505a(0x13b)]=readFileSync(_0x5c575f[_0x5e505a(0x119)],_0x5e505a(0x143))[_0x5e505a(0x10d)]();}catch(_0xc0d361){throw new SDKError(ErrorCode[_0x5e505a(0x129)],_0x5e505a(0x10f)+_0x5c575f[_0x5e505a(0x119)],_0xc0d361 instanceof Error?_0xc0d361:undefined);}if(Object[_0x5e505a(0x16d)](_0x4a3d10)['length']===0x0)throw new SDKError(ErrorCode[_0x5e505a(0x129)],_0x5e505a(0x11a));if(_0x298ea8[_0x5e505a(0x17d)]){console[_0x5e505a(0x118)](_0x5e505a(0x187)+_0xcd283c);for(const [_0x41c055,_0x530216]of Object['entries'](_0x4a3d10)){_0x41c055===_0x5e505a(0x13b)?console[_0x5e505a(0x118)]('\x20\x20'+_0x41c055+':\x20'+_0x530216[_0x5e505a(0x19b)](0x0,0x32)+'...'):console[_0x5e505a(0x118)]('\x20\x20'+_0x41c055+':\x20'+_0x530216);}}const _0x121070=await withSpinner(_0x5e505a(0x12a),()=>_0x10ee6e['schedules'][_0x5e505a(0x146)](_0xcd283c,_0x4a3d10),{'verbose':_0x298ea8[_0x5e505a(0x17d)]});return console[_0x5e505a(0x118)](_0x5e505a(0x14f)+_0x121070[_0x5e505a(0x17c)]['name']),await handleSingleObjectOutput(_0x121070[_0x5e505a(0x17c)],_0x298ea8),0x0;}}export class ScheduleDeleteCommand extends BaseCommand{[a30_0x468473(0x120)]=a30_0x468473(0x14d);[a30_0x468473(0x115)]='Delete\x20a\x20scheduled\x20query';[a30_0x468473(0x13a)](_0x45c517){const _0x4d4d63=a30_0x468473,_0x3879c4=_0x45c517[_0x4d4d63(0x14a)][0x0];if(!_0x3879c4)return _0x4d4d63(0x123);return undefined;}async['execute'](_0x221ddd){const _0x2dfa13=a30_0x468473,{options:_0x1b7c5b,args:_0x5c96ad,tdx:_0x5dfa8c}=_0x221ddd,_0xf3e297=_0x5c96ad[0x0];if(!_0x1b7c5b[_0x2dfa13(0x168)]){const _0x1eb380=await confirm(_0x2dfa13(0x13f)+_0xf3e297+'\x22?');if(!_0x1eb380)return console[_0x2dfa13(0x118)]('Cancelled'),0x0;}const _0x28266a=await withSpinner(_0x2dfa13(0x155),()=>_0x5dfa8c[_0x2dfa13(0x154)][_0x2dfa13(0x16c)](_0xf3e297),{'verbose':_0x1b7c5b['verbose']});return console[_0x2dfa13(0x118)]('Schedule\x20deleted:\x20'+_0x28266a[_0x2dfa13(0x17c)][_0x2dfa13(0x120)]),0x0;}}export class ScheduleRunCommand extends BaseCommand{['name']=a30_0x468473(0x192);[a30_0x468473(0x115)]=a30_0x468473(0x122);[a30_0x468473(0x13a)](_0x2aea68){const _0x2d798e=_0x2aea68['args'][0x0];if(!_0x2d798e)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20run\x20<name>\x20[--time\x20<iso8601>]\x20[--num\x20<1-10>]';return undefined;}async[a30_0x468473(0x178)](_0xe74f1c){const _0x7111de=a30_0x468473,{options:_0x2e7d39,args:_0x226102,tdx:_0x44cb97}=_0xe74f1c,_0x33c1e9=_0x226102[0x0],_0x4c4313=_0x2e7d39,_0x3a77fb=_0x4c4313[_0x7111de(0x158)],_0x5d5db6=_0x4c4313[_0x7111de(0x167)]!==undefined?Number(_0x4c4313['num']):undefined;if(_0x2e7d39[_0x7111de(0x17d)]){console['error'](_0x7111de(0x15d)+_0x33c1e9);if(_0x3a77fb)console['error'](_0x7111de(0x11e)+_0x3a77fb);if(_0x5d5db6)console[_0x7111de(0x118)](_0x7111de(0x18c)+_0x5d5db6);}const _0x34c448=await withSpinner(_0x7111de(0x147),()=>_0x44cb97[_0x7111de(0x154)][_0x7111de(0x142)](_0x33c1e9,{'time':_0x3a77fb,'num':_0x5d5db6}),{'verbose':_0x2e7d39[_0x7111de(0x17d)]}),_0x22fbb2=_0x34c448[_0x7111de(0x17c)][_0x7111de(0x17b)];console['error'](_0x7111de(0x116)+_0x22fbb2[_0x7111de(0x130)]+_0x7111de(0x197)+(_0x22fbb2[_0x7111de(0x130)]!==0x1?'s':'')+'\x20created');for(const _0x208fa7 of _0x22fbb2){console[_0x7111de(0x118)](_0x7111de(0x165)+_0x208fa7[_0x7111de(0x140)]);}return await handleSDKOutput(_0x22fbb2,_0x2e7d39),0x0;}}function a30_0x4eef(_0x577e3a,_0x3dc60c){_0x577e3a=_0x577e3a-0x10d;const _0x5e0b01=a30_0x5e0b();let _0x4eefb0=_0x5e0b01[_0x577e3a];return _0x4eefb0;}export class ScheduleHistoryCommand extends BaseCommand{[a30_0x468473(0x120)]=a30_0x468473(0x171);['description']='Show\x20schedule\x20execution\x20history';[a30_0x468473(0x13a)](_0x14ab88){const _0x4a7ed7=_0x14ab88['args'][0x0];if(!_0x4a7ed7)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20history\x20<name>\x20[--from\x20<n>]\x20[--to\x20<n>]';return undefined;}async[a30_0x468473(0x178)](_0x2bc7b3){const _0x2f3c5c=a30_0x468473,{options:_0xc0fcc1,args:_0x590274,tdx:_0xab2ac}=_0x2bc7b3,_0x2c2711=_0x590274[0x0],_0x3356dc=_0xc0fcc1,_0x3dc796=_0x3356dc[_0x2f3c5c(0x175)]!==undefined?Number(_0x3356dc[_0x2f3c5c(0x175)]):undefined,_0x39d1b7=_0x3356dc['to']!==undefined?Number(_0x3356dc['to']):undefined,_0x5a3446=await withSpinner('Getting\x20schedule\x20history...',()=>_0xab2ac['schedules']['history'](_0x2c2711,{'from':_0x3dc796,'to':_0x39d1b7}),{'verbose':_0xc0fcc1[_0x2f3c5c(0x17d)]}),_0x5c20b4=_0x5a3446['data'];console['error'](_0x2f3c5c(0x14c)+_0x5c20b4[_0x2f3c5c(0x153)]+'\x20execution'+(_0x5c20b4[_0x2f3c5c(0x153)]!==0x1?'s':'')+_0x2f3c5c(0x112)+_0x5c20b4['from']+'-'+_0x5c20b4['to']+')');const _0x4940a9=_0x5c20b4['history'][_0x2f3c5c(0x19c)](_0x1899d7=>({'job_id':_0x1899d7[_0x2f3c5c(0x140)],'type':_0x1899d7['type'],'status':_0x1899d7[_0x2f3c5c(0x186)],'scheduled_at':_0x1899d7['scheduled_at'],'created_at':_0x1899d7['created_at'],'start_at':_0x1899d7[_0x2f3c5c(0x18a)],'end_at':_0x1899d7[_0x2f3c5c(0x138)]}));return await handleSDKOutput(_0x4940a9,_0xc0fcc1),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x4de3a5=a31_0x59aa;(function(_0x3471a5,_0x500af2){const _0x1fd011=a31_0x59aa,_0x328f02=_0x3471a5();while(!![]){try{const _0xbf8f85=parseInt(_0x1fd011(0x10b))/0x1+parseInt(_0x1fd011(0x106))/0x2+parseInt(_0x1fd011(0xc4))/0x3+parseInt(_0x1fd011(0x10e))/0x4*(parseInt(_0x1fd011(0xd7))/0x5)+parseInt(_0x1fd011(0x11a))/0x6+parseInt(_0x1fd011(0x115))/0x7*(parseInt(_0x1fd011(0x104))/0x8)+-parseInt(_0x1fd011(0x114))/0x9;if(_0xbf8f85===_0x500af2)break;else _0x328f02['push'](_0x328f02['shift']());}catch(_0x7a58f3){_0x328f02['push'](_0x328f02['shift']());}}}(a31_0x310d,0x7ad12));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{executeSchemaQuery}from'../sdk/segment/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import a31_0x57f4f7 from'chalk';async function resolveSegmentTarget(_0x363db0,_0x5ed378,_0x1bacb0){const _0x520240=a31_0x59aa;if(isYamlFilePath(_0x363db0))try{const _0x471976=await resolveYamlFilePath(_0x363db0);return _0x1bacb0&&(console['error'](_0x520240(0x12d)+_0x363db0),console[_0x520240(0xed)](_0x520240(0x123)+_0x471976['parentSegment']),console[_0x520240(0xed)]('\x20\x20Segment\x20name:\x20'+_0x471976[_0x520240(0xda)]),console[_0x520240(0xed)](_0x520240(0x127)+(_0x471976[_0x520240(0x96)]||_0x520240(0xb7))),console[_0x520240(0xed)]('\x20\x20Full\x20path:\x20'+_0x471976[_0x520240(0x116)])),_0x471976['fullPath'];}catch(_0x8ef592){throw new SDKError(ErrorCode[_0x520240(0xc2)],_0x520240(0xfc)+_0x8ef592['message']);}if(!_0x5ed378)throw new SDKError(ErrorCode[_0x520240(0xc2)],'No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');return _0x5ed378+'/'+_0x363db0;}export class SegmentDescribeCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xa7);['description']=a31_0x4de3a5(0x136);async[a31_0x4de3a5(0x113)](_0x56036c){const _0x465f5e=a31_0x4de3a5,{options:_0x53342a,args:_0x1fdea0,tdx:_0x4806dd}=_0x56036c,_0x503e31=_0x1fdea0[0x0],_0x1d0c3a=!_0x503e31&&!!_0x53342a[_0x465f5e(0xe7)],_0x3e4a60=_0x503e31||_0x53342a['parentSegment'];if(!_0x3e4a60)return console['error']('Error:\x20Path\x20or\x20name\x20is\x20required'),console['error'](_0x465f5e(0xd6)),console[_0x465f5e(0xed)](_0x465f5e(0x137)),console[_0x465f5e(0xed)](_0x465f5e(0xc6)),console[_0x465f5e(0xed)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x465f5e(0xed)]('\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0x465f5e(0xed)](_0x465f5e(0xec)),0x1;try{const _0x169ada=_0x53342a['segmentPath'];let _0x5a258e=_0x3e4a60;!_0x1d0c3a&&_0x169ada&&!_0x3e4a60[_0x465f5e(0x124)]('/')&&(_0x5a258e=_0x169ada+'/'+_0x3e4a60,_0x53342a['verbose']&&console[_0x465f5e(0xed)](_0x465f5e(0xff)+_0x5a258e));const _0x3fb1be=await withSpinner(_0x465f5e(0x121)+_0x5a258e+_0x465f5e(0xd1),()=>_0x4806dd[_0x465f5e(0xab)][_0x465f5e(0xdc)](_0x5a258e),{'verbose':_0x53342a[_0x465f5e(0x9f)]}),_0x4b743d=_0x3fb1be['data'];_0x53342a[_0x465f5e(0x9f)]&&(console[_0x465f5e(0xed)](_0x465f5e(0x10c)+_0x4b743d[_0x465f5e(0xdd)]),console['error'](_0x465f5e(0xa1)+_0x4b743d[_0x465f5e(0xcf)]),_0x4b743d['folderId']&&console['error'](_0x465f5e(0x100)+_0x4b743d[_0x465f5e(0xe5)]),_0x4b743d[_0x465f5e(0x12c)]&&console[_0x465f5e(0xed)](_0x465f5e(0xf7)+_0x4b743d[_0x465f5e(0x12c)]));if(_0x4b743d[_0x465f5e(0xdd)]==='parent'){const _0x3b09dd=await withSpinner('Fetching\x20parent\x20segment\x20details...',()=>_0x4806dd['segment'][_0x465f5e(0x10f)](_0x4b743d[_0x465f5e(0xcf)]),{'verbose':_0x53342a[_0x465f5e(0x9f)]});await handleSingleObjectOutput(_0x3b09dd[_0x465f5e(0x134)],_0x53342a);}else{if(_0x4b743d[_0x465f5e(0xdd)]===_0x465f5e(0xac)){if(!_0x4b743d['folderId'])throw new SDKError(ErrorCode[_0x465f5e(0xf5)],_0x465f5e(0xaf));const _0x324cf7=await withSpinner(_0x465f5e(0xf8),()=>_0x4806dd[_0x465f5e(0xab)][_0x465f5e(0xdf)](_0x4b743d['folderId']),{'verbose':_0x53342a[_0x465f5e(0x9f)]});await handleSingleObjectOutput(_0x324cf7[_0x465f5e(0x134)],_0x53342a);}else{if(_0x4b743d[_0x465f5e(0xdd)]===_0x465f5e(0xab)){if(!_0x4b743d[_0x465f5e(0x12c)])throw new SDKError(ErrorCode[_0x465f5e(0xb9)],_0x465f5e(0xf0));const _0x262e6c=await withSpinner(_0x465f5e(0xbf),()=>_0x4806dd[_0x465f5e(0xab)][_0x465f5e(0xbb)](_0x4b743d['parentId'],_0x4b743d[_0x465f5e(0x12c)]),{'verbose':_0x53342a[_0x465f5e(0x9f)]});await handleSingleObjectOutput(_0x262e6c[_0x465f5e(0x134)],_0x53342a);}}}return 0x0;}catch(_0x524ef7){if(_0x524ef7 instanceof SDKError)return console['error'](_0x465f5e(0x9e)+_0x524ef7['message']),_0x524ef7['cause']&&console[_0x465f5e(0xed)](_0x465f5e(0xc0)+_0x524ef7['cause']),0x1;throw _0x524ef7;}}}export class SegmentShowCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]='segment:show';[a31_0x4de3a5(0xd8)]='Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x4de3a5(0x113)](_0x5658b7){const _0x482b1d=a31_0x4de3a5,{options:_0x5d6b5f,args:_0x5bb871,tdx:_0x3b6f79}=_0x5658b7,_0x2dcbbf=_0x5bb871[0x0];if(!_0x2dcbbf)return console[_0x482b1d(0xed)](_0x482b1d(0x133)),console[_0x482b1d(0xed)](_0x482b1d(0x129)),console['error'](_0x482b1d(0xc5)),console[_0x482b1d(0xed)]('Examples:'),console['error'](_0x482b1d(0x97)),console[_0x482b1d(0xed)](_0x482b1d(0x108)),0x1;try{const _0x29a996=_0x5d6b5f[_0x482b1d(0xe7)],_0x2075aa=await resolveSegmentTarget(_0x2dcbbf,_0x29a996,_0x5d6b5f[_0x482b1d(0x9f)]);_0x5d6b5f['verbose']&&console[_0x482b1d(0xed)](_0x482b1d(0xbc)+_0x2075aa);const _0x237e41=await withSpinner('Resolving\x20\x27'+_0x2dcbbf+'\x27...',()=>_0x3b6f79['segment'][_0x482b1d(0xdc)](_0x2075aa),{'verbose':_0x5d6b5f[_0x482b1d(0x9f)]}),_0x3b6a8f=_0x237e41[_0x482b1d(0x134)];_0x5d6b5f['verbose']&&(console['error'](_0x482b1d(0x10c)+_0x3b6a8f[_0x482b1d(0xdd)]),console[_0x482b1d(0xed)](_0x482b1d(0xa1)+_0x3b6a8f['parentId']));if(_0x3b6a8f[_0x482b1d(0xdd)]===_0x482b1d(0xac))return console[_0x482b1d(0xed)](_0x482b1d(0x117)),console[_0x482b1d(0xed)](_0x482b1d(0x135)),0x1;if(_0x3b6a8f[_0x482b1d(0xdd)]===_0x482b1d(0xb1))return console[_0x482b1d(0xed)]('Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console['error'](_0x482b1d(0x101)),0x1;if(!_0x3b6a8f['segmentId'])throw new SDKError(ErrorCode[_0x482b1d(0xb9)],_0x482b1d(0xf0));const _0x5eccd4=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3b6f79[_0x482b1d(0xab)][_0x482b1d(0xa4)](_0x3b6a8f[_0x482b1d(0xcf)],_0x3b6a8f[_0x482b1d(0x12c)]),{'verbose':_0x5d6b5f[_0x482b1d(0x9f)]});let _0x5c3328=_0x5eccd4[_0x482b1d(0x134)];const _0x163532=resolveLimit(_0x5d6b5f[_0x482b1d(0xf3)],DEFAULT_DISPLAY_LIMIT),_0x21562c=/\bLIMIT\s+\d+/i['test'](_0x5c3328);!_0x21562c&&(_0x5c3328=_0x5c3328[_0x482b1d(0x109)]()[_0x482b1d(0xb5)](/;+$/,''),_0x5c3328='SELECT\x20*\x20FROM\x20(\x0a'+_0x5c3328+_0x482b1d(0xce)+_0x163532);_0x5d6b5f[_0x482b1d(0x9f)]&&console[_0x482b1d(0xed)]('SQL\x20query:\x0a'+_0x5c3328);const _0x32b1cc=await withProgressSpinner(_0x482b1d(0x11f),async _0x518a99=>{const _0x2d0dbf=_0x482b1d,_0x1b3406=await _0x3b6f79['query'][_0x2d0dbf(0x113)](_0x5c3328,{'catalog':'td','schema':_0x2d0dbf(0xc1),'onJobId':_0x5a3656=>{const _0x5cf447=_0x2d0dbf;_0x518a99[_0x5cf447(0xb2)](_0x5a3656);}});return _0x1b3406;},{'verbose':_0x5d6b5f[_0x482b1d(0x9f)]}),_0x21b7f7=_0x32b1cc[_0x482b1d(0x134)],_0x33c114=_0x21b7f7[_0x482b1d(0xe8)]?'\x20[Job\x20ID:\x20'+_0x21b7f7[_0x482b1d(0xe8)]+']':'';return console[_0x482b1d(0xed)](_0x482b1d(0x9d)+_0x21b7f7[_0x482b1d(0x103)][_0x482b1d(0xe6)][_0x482b1d(0xc8)]()+_0x482b1d(0x130)+(_0x482b1d(0xcc)+formatElapsed(_0x21b7f7[_0x482b1d(0x103)][_0x482b1d(0xcd)])+_0x33c114)),await handleQueryOutput(_0x21b7f7,_0x5d6b5f),0x0;}catch(_0x1b163d){if(_0x1b163d instanceof SDKError)return console['error'](_0x482b1d(0xbe)+_0x1b163d['code']+']'),console[_0x482b1d(0xed)]('\x0a'+_0x1b163d[_0x482b1d(0x10a)]),0x1;throw _0x1b163d;}}}export class SegmentFolderListCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]='segment:folder:list';['description']=a31_0x4de3a5(0xa0);async[a31_0x4de3a5(0x113)](_0x595682){const _0x50f67e=a31_0x4de3a5,{options:_0x47f233,args:_0x3e3dfa,tdx:_0x1df508}=_0x595682;if(_0x3e3dfa[_0x50f67e(0xc7)]===0x0)return console[_0x50f67e(0xed)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console['error'](_0x50f67e(0xf6)),0x1;const _0x1f8c31=_0x3e3dfa[0x0];try{_0x47f233[_0x50f67e(0x9f)]&&(console['error']('Site:\x20'+_0x47f233[_0x50f67e(0x99)]),console[_0x50f67e(0xed)](_0x50f67e(0xaa)+_0x1f8c31));const _0x4cd098=await withSpinner(_0x50f67e(0xe9)+_0x1f8c31+_0x50f67e(0xd1),()=>_0x1df508[_0x50f67e(0xab)][_0x50f67e(0x9a)](_0x1f8c31),{'verbose':_0x47f233[_0x50f67e(0x9f)]}),_0x155489=_0x4cd098[_0x50f67e(0x134)];_0x47f233[_0x50f67e(0x9f)]&&console[_0x50f67e(0xed)]('Resolved\x20parent\x20ID:\x20'+_0x155489);const _0x329235=await withSpinner(_0x50f67e(0xb4)+_0x1f8c31+'\x27...',()=>_0x1df508[_0x50f67e(0xab)][_0x50f67e(0x105)](_0x155489),{'verbose':_0x47f233[_0x50f67e(0x9f)]}),_0x299085=_0x329235['data'];return console['error'](_0x50f67e(0xcb)+_0x299085['length']+'\x20folder'+(_0x299085[_0x50f67e(0xc7)]!==0x1?'s':'')),await handleSDKOutput(_0x299085,_0x47f233),0x0;}catch(_0x1c0c9e){if(_0x1c0c9e instanceof SDKError)return console['error']('Error:\x20'+_0x1c0c9e['message']),_0x1c0c9e[_0x50f67e(0x120)]&&console['error'](_0x50f67e(0xc0)+_0x1c0c9e[_0x50f67e(0x120)]),0x1;throw _0x1c0c9e;}}}export class SegmentFolderShowCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xae);['description']='Show\x20segment\x20folder\x20details';async[a31_0x4de3a5(0x113)](_0x421f2b){const _0x574c54=a31_0x4de3a5,{options:_0x647561,args:_0x460741,tdx:_0x43e236}=_0x421f2b;if(_0x460741[_0x574c54(0xc7)]===0x0)return console[_0x574c54(0xed)](_0x574c54(0xef)),console[_0x574c54(0xed)](_0x574c54(0xbd)),0x1;try{const {parentId:_0x348202,childId:_0x1e4870}=parseSegmentRef(_0x460741[0x0]);_0x647561[_0x574c54(0x9f)]&&(console[_0x574c54(0xed)]('Site:\x20'+_0x647561[_0x574c54(0x99)]),console[_0x574c54(0xed)]('Parent\x20name:\x20'+_0x348202),_0x1e4870&&console[_0x574c54(0xed)](_0x574c54(0x12b)+_0x1e4870));if(!_0x1e4870)return console[_0x574c54(0xed)](_0x574c54(0x12e)),0x1;const _0x48d93b=await withSpinner(_0x574c54(0xe9)+_0x348202+_0x574c54(0xd1),()=>_0x43e236[_0x574c54(0xab)][_0x574c54(0x9a)](_0x348202),{'verbose':_0x647561['verbose']}),_0x3f7c4=_0x48d93b[_0x574c54(0x134)];_0x647561[_0x574c54(0x9f)]&&console['error'](_0x574c54(0xd4)+_0x3f7c4);const _0x21c043=await withSpinner(_0x574c54(0x126)+_0x1e4870+_0x574c54(0xd1),()=>_0x43e236[_0x574c54(0xab)][_0x574c54(0x132)](_0x3f7c4,_0x1e4870),{'verbose':_0x647561[_0x574c54(0x9f)]}),_0x380882=_0x21c043[_0x574c54(0x134)];_0x647561[_0x574c54(0x9f)]&&console[_0x574c54(0xed)](_0x574c54(0xfa)+_0x380882);const _0x466ee6=await withSpinner(_0x574c54(0xad)+_0x1e4870+_0x574c54(0xd1),()=>_0x43e236[_0x574c54(0xab)][_0x574c54(0xdf)](_0x380882),{'verbose':_0x647561[_0x574c54(0x9f)]});return await handleSDKOutput([_0x466ee6[_0x574c54(0x134)]],_0x647561),0x0;}catch(_0xdf53d1){if(_0xdf53d1 instanceof SDKError)return console['error'](_0x574c54(0x9e)+_0xdf53d1['message']),_0xdf53d1[_0x574c54(0x120)]&&console[_0x574c54(0xed)]('\x20\x20Cause:\x20'+_0xdf53d1[_0x574c54(0x120)]),0x1;throw _0xdf53d1;}}}export class SegmentSQLCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xc3);[a31_0x4de3a5(0xd8)]='Get\x20SQL\x20query\x20for\x20child\x20segment';async[a31_0x4de3a5(0x113)](_0x3babfb){const _0x378a95=a31_0x4de3a5,{options:_0x3e2282,args:_0x282389}=_0x3babfb,_0x4f59df=_0x3e2282,_0x486ea9=_0x4f59df['path'],_0xcdba73=_0x282389[0x0];if(!_0xcdba73&&!_0x486ea9)return console['error'](a31_0x57f4f7[_0x378a95(0x128)](_0x378a95(0xb6))),console['error'](_0x378a95(0xe4)),console[_0x378a95(0xed)]('\x20\x20Server-side\x20segment:\x20\x20tdx\x20sg\x20sql\x20<name>'),console[_0x378a95(0xed)](_0x378a95(0x12f)),console['error']('Examples:'),console['error']('\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22'),console[_0x378a95(0xed)]('\x20\x20tdx\x20sg\x20sql\x20--path\x20segments/my-audience/premium-users.yml'),0x1;if(_0xcdba73&&_0x486ea9)return console[_0x378a95(0xed)](a31_0x57f4f7['red'](_0x378a95(0x112))),0x1;try{let _0x3d6df4;if(_0x486ea9)_0x3d6df4=await this[_0x378a95(0xeb)](_0x486ea9,_0x3babfb);else{if(isYamlFilePath(_0xcdba73))return console[_0x378a95(0xed)](a31_0x57f4f7['red'](_0x378a95(0xa9))),console[_0x378a95(0xed)](_0x378a95(0xb8)+_0xcdba73),0x1;else _0x3d6df4=await this['getSQLFromServerSegment'](_0xcdba73,_0x3babfb);}return _0x3e2282[_0x378a95(0xd0)]===_0x378a95(0xfe)||_0x3e2282['format']===_0x378a95(0xa3)?await handleSDKOutput([{'sql':_0x3d6df4}],_0x3e2282):console[_0x378a95(0xa2)](_0x3d6df4),0x0;}catch(_0x44dde3){if(_0x44dde3 instanceof SDKError)return console[_0x378a95(0xed)](_0x378a95(0x9e)+_0x44dde3[_0x378a95(0x10a)]),_0x44dde3[_0x378a95(0x120)]&&console[_0x378a95(0xed)]('\x20\x20Cause:\x20'+_0x44dde3[_0x378a95(0x120)]),0x1;throw _0x44dde3;}}async[a31_0x4de3a5(0xeb)](_0x3931a7,_0x471017){const _0x27fc9f=a31_0x4de3a5,{options:_0x5285f2,tdx:_0x3a88c3}=_0x471017;let _0x53fc9d;try{_0x53fc9d=await resolveYamlFilePath(_0x3931a7);}catch(_0x1d015f){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x27fc9f(0xfc)+_0x1d015f[_0x27fc9f(0x10a)]);}_0x5285f2[_0x27fc9f(0x9f)]&&console[_0x27fc9f(0xed)]('Resolved:\x20'+_0x53fc9d[_0x27fc9f(0xe7)]+'/'+_0x53fc9d[_0x27fc9f(0xda)]);const _0x5e5cd3=await withSpinner(_0x27fc9f(0x10d),()=>_0x3a88c3[_0x27fc9f(0xab)][_0x27fc9f(0x11e)](_0x53fc9d[_0x27fc9f(0x11c)],_0x53fc9d[_0x27fc9f(0xe7)],_0x53fc9d[_0x27fc9f(0xda)]),{'verbose':_0x5285f2[_0x27fc9f(0x9f)]});return _0x5e5cd3[_0x27fc9f(0x134)];}async[a31_0x4de3a5(0xb3)](_0x5886d0,_0x81d3c6){const _0xb7d419=a31_0x4de3a5,{options:_0x54342d,tdx:_0x3c5f8e}=_0x81d3c6,_0x55f21e=_0x54342d[_0xb7d419(0xe7)],_0x5ca097=await resolveSegmentTarget(_0x5886d0,_0x55f21e,_0x54342d[_0xb7d419(0x9f)]);_0x54342d[_0xb7d419(0x9f)]&&console[_0xb7d419(0xed)]('Target\x20path:\x20'+_0x5ca097);const _0x5a9500=await withSpinner(_0xb7d419(0x110)+_0x5886d0+_0xb7d419(0xd1),()=>_0x3c5f8e[_0xb7d419(0xab)][_0xb7d419(0xdc)](_0x5ca097),{'verbose':_0x54342d[_0xb7d419(0x9f)]}),_0x1db543=_0x5a9500[_0xb7d419(0x134)];_0x54342d[_0xb7d419(0x9f)]&&(console[_0xb7d419(0xed)](_0xb7d419(0x10c)+_0x1db543[_0xb7d419(0xdd)]),console[_0xb7d419(0xed)](_0xb7d419(0xa1)+_0x1db543['parentId']));if(_0x1db543['type']===_0xb7d419(0xac))throw new SDKError(ErrorCode[_0xb7d419(0xc2)],'Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.\x20Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.');if(_0x1db543[_0xb7d419(0xdd)]==='parent')throw new SDKError(ErrorCode[_0xb7d419(0xc2)],_0xb7d419(0xfd));if(!_0x1db543[_0xb7d419(0x12c)])throw new SDKError(ErrorCode[_0xb7d419(0xb9)],_0xb7d419(0xf0));const _0x2dcc5b=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3c5f8e['segment'][_0xb7d419(0xa4)](_0x1db543['parentId'],_0x1db543[_0xb7d419(0x12c)]),{'verbose':_0x54342d[_0xb7d419(0x9f)]});return _0x2dcc5b[_0xb7d419(0x134)];}}export class SegmentFolderCreateCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xe1);[a31_0x4de3a5(0xd8)]=a31_0x4de3a5(0x118);async[a31_0x4de3a5(0x113)](_0x196777){const _0x33e71a=a31_0x4de3a5,{options:_0x448cbd,args:_0xa3f3d7,tdx:_0x3889d3}=_0x196777,_0xf44c4e=_0x448cbd;if(_0xa3f3d7[_0x33e71a(0xc7)]<0x2)return console[_0x33e71a(0xed)](_0x33e71a(0xe2)),console[_0x33e71a(0xed)](_0x33e71a(0xde)),0x1;const _0x57916a=_0xa3f3d7[0x0],_0x3abc9f=_0xa3f3d7[0x1];_0xf44c4e[_0x33e71a(0x9f)]&&(console[_0x33e71a(0xed)](_0x33e71a(0xc9)+_0xf44c4e[_0x33e71a(0x99)]),console[_0x33e71a(0xed)](_0x33e71a(0xd3)+_0x57916a),console['error'](_0x33e71a(0x12b)+_0x3abc9f));let _0x224aad;if(_0xf44c4e['parentFolder']){const _0x4cb490=_0xf44c4e['parentFolder'],_0x27999a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x57916a+_0x33e71a(0xd1),()=>_0x3889d3[_0x33e71a(0xab)][_0x33e71a(0x9a)](_0x57916a),{'verbose':_0xf44c4e[_0x33e71a(0x9f)]}),_0x1ad0f5=_0x27999a[_0x33e71a(0x134)],_0x30e482=await withSpinner('Resolving\x20parent\x20folder\x20\x27'+_0x4cb490+'\x27...',()=>_0x3889d3[_0x33e71a(0xab)]['resolveFolderId'](_0x1ad0f5,_0x4cb490),{'verbose':_0xf44c4e[_0x33e71a(0x9f)]});_0x224aad=_0x30e482[_0x33e71a(0x134)],_0xf44c4e[_0x33e71a(0x9f)]&&console[_0x33e71a(0xed)](_0x33e71a(0xf4)+_0x224aad);}const _0x335bd9={'name':_0x3abc9f,'description':_0xf44c4e[_0x33e71a(0xd8)],'parentFolderId':_0x224aad},_0x46d1c0=await withSpinner('Creating\x20folder\x20\x27'+_0x3abc9f+_0x33e71a(0xd1),()=>_0x3889d3[_0x33e71a(0xab)][_0x33e71a(0xf2)](_0x57916a,_0x335bd9),{'verbose':_0xf44c4e[_0x33e71a(0x9f)]}),_0xe4a0a8=_0x46d1c0[_0x33e71a(0x134)];return console[_0x33e71a(0xed)]('β\x20Created\x20folder\x20\x27'+_0xe4a0a8[_0x33e71a(0xa8)]+_0x33e71a(0xb0)+_0xe4a0a8['id']),await handleSDKOutput([_0xe4a0a8],_0xf44c4e),0x0;}}export class SegmentViewCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xba);[a31_0x4de3a5(0xd8)]='Show\x20folder\x20or\x20child\x20segment\x20details';async[a31_0x4de3a5(0x113)](_0x41ef75){const _0x3ed80e=a31_0x4de3a5,{options:_0x3c8c3d,args:_0x44a3c3,tdx:_0x266562}=_0x41ef75,_0x285f00=_0x44a3c3[0x0];if(!_0x285f00)return console[_0x3ed80e(0xed)](_0x3ed80e(0x12a)),console['error'](_0x3ed80e(0x102)),console[_0x3ed80e(0xed)](_0x3ed80e(0xa6)),console[_0x3ed80e(0xed)](_0x3ed80e(0x9c)),console[_0x3ed80e(0xed)](_0x3ed80e(0x11d)),console['error'](_0x3ed80e(0x137)),console[_0x3ed80e(0xed)](_0x3ed80e(0x107)),console[_0x3ed80e(0xed)](_0x3ed80e(0xca)),console['error']('\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser'),console[_0x3ed80e(0xed)]('\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x15edb1=_0x3c8c3d['parentSegment'],_0x4f2d22=await resolveSegmentTarget(_0x285f00,_0x15edb1,_0x3c8c3d['verbose']);_0x3c8c3d['verbose']&&console[_0x3ed80e(0xed)](_0x3ed80e(0xbc)+_0x4f2d22);const _0x477d83=await withSpinner('Resolving\x20\x27'+_0x285f00+'\x27...',()=>_0x266562[_0x3ed80e(0xab)][_0x3ed80e(0xdc)](_0x4f2d22),{'verbose':_0x3c8c3d[_0x3ed80e(0x9f)]}),_0x2b9200=_0x477d83['data'];_0x3c8c3d['verbose']&&(console[_0x3ed80e(0xed)](_0x3ed80e(0x10c)+_0x2b9200[_0x3ed80e(0xdd)]),console[_0x3ed80e(0xed)](_0x3ed80e(0xa1)+_0x2b9200[_0x3ed80e(0xcf)]),_0x2b9200[_0x3ed80e(0xe5)]&&console[_0x3ed80e(0xed)](_0x3ed80e(0x100)+_0x2b9200['folderId']),_0x2b9200[_0x3ed80e(0x12c)]&&console[_0x3ed80e(0xed)](_0x3ed80e(0xf7)+_0x2b9200[_0x3ed80e(0x12c)]));if(_0x3c8c3d[_0x3ed80e(0xfb)]){if(_0x2b9200[_0x3ed80e(0xdd)]==='folder')return console[_0x3ed80e(0xed)](_0x3ed80e(0xea)),0x1;if(_0x2b9200[_0x3ed80e(0xdd)]===_0x3ed80e(0xb1))return console[_0x3ed80e(0xed)](_0x3ed80e(0x122)),console[_0x3ed80e(0xed)](_0x3ed80e(0x11b)),0x1;if(!_0x2b9200[_0x3ed80e(0x12c)])throw new SDKError(ErrorCode[_0x3ed80e(0xb9)],_0x3ed80e(0xf0));const _0xf66602=getConsoleNextUrl(_0x3c8c3d[_0x3ed80e(0x99)],_0x3ed80e(0xd5)+_0x2b9200['parentId']+_0x3ed80e(0x131)+_0x2b9200[_0x3ed80e(0x12c)]);return console['error'](a31_0x57f4f7[_0x3ed80e(0xd9)]('β')+_0x3ed80e(0xf9)+a31_0x57f4f7[_0x3ed80e(0x9b)](_0xf66602)),openBrowser(_0xf66602),0x0;}if(_0x2b9200[_0x3ed80e(0xdd)]==='folder'){if(!_0x2b9200[_0x3ed80e(0xe5)])throw new SDKError(ErrorCode['SEGMENT_FOLDER_NOT_FOUND'],_0x3ed80e(0xaf));const _0x2e6e32=await withSpinner(_0x3ed80e(0xf8),()=>_0x266562[_0x3ed80e(0xab)][_0x3ed80e(0xdf)](_0x2b9200[_0x3ed80e(0xe5)]),{'verbose':_0x3c8c3d[_0x3ed80e(0x9f)]});await handleSingleObjectOutput(_0x2e6e32['data'],_0x3c8c3d);}else{if(_0x2b9200[_0x3ed80e(0xdd)]===_0x3ed80e(0xab)){if(!_0x2b9200[_0x3ed80e(0x12c)])throw new SDKError(ErrorCode[_0x3ed80e(0xb9)],_0x3ed80e(0xf0));const _0x539661=await withSpinner(_0x3ed80e(0xbf),()=>_0x266562['segment'][_0x3ed80e(0xbb)](_0x2b9200['parentId'],_0x2b9200[_0x3ed80e(0x12c)]),{'verbose':_0x3c8c3d[_0x3ed80e(0x9f)]}),_0x380500=getConsoleNextUrl(_0x3c8c3d[_0x3ed80e(0x99)],_0x3ed80e(0xd5)+_0x2b9200[_0x3ed80e(0xcf)]+_0x3ed80e(0x131)+_0x2b9200[_0x3ed80e(0x12c)]),_0x555b4d=_0x539661[_0x3ed80e(0x134)];_0x555b4d[_0x3ed80e(0x119)]=_0x380500,await handleSingleObjectOutput(_0x555b4d,_0x3c8c3d);}else return console[_0x3ed80e(0xed)](_0x3ed80e(0xe3)),console[_0x3ed80e(0xed)](_0x3ed80e(0xd2)),0x1;}return 0x0;}catch(_0xd61f26){if(_0xd61f26 instanceof SDKError)return console[_0x3ed80e(0xed)]('Error:\x20'+_0xd61f26[_0x3ed80e(0x10a)]),_0xd61f26[_0x3ed80e(0x120)]&&console[_0x3ed80e(0xed)](_0x3ed80e(0xc0)+_0xd61f26[_0x3ed80e(0x120)]),0x1;throw _0xd61f26;}}}function a31_0x59aa(_0x3e0e51,_0x250a6a){_0x3e0e51=_0x3e0e51-0x96;const _0x310d91=a31_0x310d();let _0x59aad7=_0x310d91[_0x3e0e51];return _0x59aad7;}function a31_0x310d(){const _0x27900f=['folderId','processedRows','parentSegment','jobId','Resolving\x20parent\x20segment\x20\x27','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','getSQLFromYamlFile','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','error','\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml','Error:\x20Folder\x20reference\x20is\x20required','Segment\x20ID\x20missing\x20from\x20resolved\x20path','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','createFolder','limit','Resolved\x20parent\x20folder\x20ID:\x20','SEGMENT_FOLDER_NOT_FOUND','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Segment\x20ID:\x20','Fetching\x20folder\x20details...','\x20Opening\x20','Resolved\x20folder\x20ID:\x20','web','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.\x20Use:\x20tdx\x20ps\x20sql','json','Resolved\x20relative\x20path\x20to:\x20','Folder\x20ID:\x20','Use:\x20tdx\x20ps\x20show','Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]','stats','245280QqRVAW','listFolders','790152VQZTrM','\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details','\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml','trim','message','140374wMDeZQ','Resolved\x20type:\x20','Fetching\x20SQL\x20from\x20rule...','20XTjJBQ','getParent','Resolving\x20\x27','Fetching\x20SQL\x20for\x20segment...','Error:\x20Specify\x20either\x20segment\x20name\x20or\x20--path,\x20not\x20both','execute','23826087xxjUts','112ZqgVHy','fullPath','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','Create\x20segment\x20folder\x20for\x20organization','url','3237612etqGPI','Use:\x20tdx\x20ps\x20view\x20-w','content','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','getSegmentSQLFromYaml','Executing\x20segment\x20query...','cause','Resolving\x20path\x20\x27','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','\x20\x20Parent\x20segment:\x20','includes','Show\x20child\x20segment\x20schema\x20(column\x20types)','Resolving\x20folder\x20\x27','\x20\x20Folder\x20path:\x20','red','Usage:\x20tdx\x20sg\x20show\x20<name>','Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required','Folder\x20name:\x20','segmentId','Resolved\x20YAML\x20file:\x20','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','\x20\x20Local\x20YAML\x20file:\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20--path\x20<file-path>','\x20rows\x20','/e/','resolveFolderId','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','data','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','Show\x20segment\x20or\x20folder\x20details','Examples:','folderPath','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','Usage:\x20tdx\x20sg\x20desc\x20<name>','site','resolveParentId','cyan','Options:','β\x20Query\x20completed:\x20Processed\x20','Error:\x20','verbose','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Parent\x20ID:\x20','log','jsonl','getSegmentSQL','segment:desc','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','segment:describe','name','Error:\x20YAML\x20file\x20paths\x20must\x20be\x20specified\x20with\x20--path\x20option','Parent\x20name:\x20','segment','folder','Fetching\x20folder\x20\x27','segment:folder:show','Folder\x20ID\x20missing\x20from\x20resolved\x20path','\x27\x20with\x20ID:\x20','parent','setJobId','getSQLFromServerSegment','Listing\x20folders\x20for\x20parent\x20\x27','replace','Error:\x20Segment\x20name\x20or\x20--path\x20is\x20required','(root)','\x20\x20tdx\x20sg\x20sql\x20--path\x20','SEGMENT_NOT_FOUND','segment:view','getSegment','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','β\x20Query\x20failed\x20[','Fetching\x20segment\x20details...','\x20\x20Cause:\x20','information_schema','INVALID_ARGUMENT','segment:sql','2468712rHAODq','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','length','toLocaleString','Site:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','β\x20Found\x20','in\x20','elapsedTimeMillis','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','parentId','format','\x27...','Use:\x20tdx\x20ps\x20view','Parent\x20segment:\x20','Resolved\x20parent\x20ID:\x20','/app/ps/','Usage:\x20tdx\x20segment\x20describe\x20<path>','761885JftJeU','description','green','segmentName','\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22','resolvePathToResource','type','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','getFolder','Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.','segment:folder:create','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','Usage:'];a31_0x310d=function(){return _0x27900f;};return a31_0x310d();}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{['name']=a31_0x4de3a5(0xa5);[a31_0x4de3a5(0xd8)]=a31_0x4de3a5(0x125);async[a31_0x4de3a5(0x113)](_0x4cf968){const _0x3fc4a1=a31_0x4de3a5,{options:_0x33924a,args:_0x53c248,tdx:_0x3ca3ee}=_0x4cf968,_0x283a37=_0x53c248[0x0];if(!_0x283a37)return console[_0x3fc4a1(0xed)]('Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0x3fc4a1(0xed)](_0x3fc4a1(0x98)),console[_0x3fc4a1(0xed)](_0x3fc4a1(0xf1)),console['error']('Examples:'),console[_0x3fc4a1(0xed)](_0x3fc4a1(0xdb)),console[_0x3fc4a1(0xed)](_0x3fc4a1(0xee)),0x1;try{const _0x15f406=_0x33924a[_0x3fc4a1(0xe7)],_0x3aa3f8=await resolveSegmentTarget(_0x283a37,_0x15f406,_0x33924a[_0x3fc4a1(0x9f)]);_0x33924a['verbose']&&console['error'](_0x3fc4a1(0xbc)+_0x3aa3f8);const _0x2a7063=await withSpinner(_0x3fc4a1(0x110)+_0x283a37+_0x3fc4a1(0xd1),()=>_0x3ca3ee[_0x3fc4a1(0xab)][_0x3fc4a1(0xdc)](_0x3aa3f8),{'verbose':_0x33924a[_0x3fc4a1(0x9f)]}),_0x485fad=_0x2a7063['data'];_0x33924a[_0x3fc4a1(0x9f)]&&(console[_0x3fc4a1(0xed)]('Resolved\x20type:\x20'+_0x485fad['type']),console[_0x3fc4a1(0xed)]('Parent\x20ID:\x20'+_0x485fad[_0x3fc4a1(0xcf)]));if(_0x485fad[_0x3fc4a1(0xdd)]===_0x3fc4a1(0xac))return console[_0x3fc4a1(0xed)](_0x3fc4a1(0xe0)),console[_0x3fc4a1(0xed)]('Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.'),0x1;if(_0x485fad[_0x3fc4a1(0xdd)]===_0x3fc4a1(0xb1))return console[_0x3fc4a1(0xed)]('Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console[_0x3fc4a1(0xed)]('Use:\x20tdx\x20ps\x20desc'),0x1;if(!_0x485fad[_0x3fc4a1(0x12c)])throw new SDKError(ErrorCode[_0x3fc4a1(0xb9)],_0x3fc4a1(0xf0));const _0x3f403e=await withSpinner(_0x3fc4a1(0x111),()=>_0x3ca3ee[_0x3fc4a1(0xab)][_0x3fc4a1(0xa4)](_0x485fad[_0x3fc4a1(0xcf)],_0x485fad[_0x3fc4a1(0x12c)]),{'verbose':_0x33924a[_0x3fc4a1(0x9f)]}),_0x58151d=_0x3f403e[_0x3fc4a1(0x134)],_0x153532=await executeSchemaQuery(_0x58151d,_0x3ca3ee,_0x33924a);return await handleQueryOutput(_0x153532,_0x33924a),0x0;}catch(_0x17bb8f){if(_0x17bb8f instanceof SDKError)return console[_0x3fc4a1(0xed)](_0x3fc4a1(0x9e)+_0x17bb8f[_0x3fc4a1(0x10a)]),_0x17bb8f['cause']&&console[_0x3fc4a1(0xed)](_0x3fc4a1(0xc0)+_0x17bb8f[_0x3fc4a1(0x120)]),0x1;throw _0x17bb8f;}}}
|
|
1
|
+
const a31_0x38beab=a31_0x2aa3;(function(_0x485a67,_0x5ba946){const _0x46ed41=a31_0x2aa3,_0x280baa=_0x485a67();while(!![]){try{const _0x17727f=-parseInt(_0x46ed41(0x169))/0x1+parseInt(_0x46ed41(0x115))/0x2*(parseInt(_0x46ed41(0x108))/0x3)+-parseInt(_0x46ed41(0x125))/0x4+parseInt(_0x46ed41(0xfe))/0x5*(parseInt(_0x46ed41(0x11a))/0x6)+parseInt(_0x46ed41(0x19a))/0x7+parseInt(_0x46ed41(0x13e))/0x8*(-parseInt(_0x46ed41(0x15a))/0x9)+parseInt(_0x46ed41(0x13f))/0xa;if(_0x17727f===_0x5ba946)break;else _0x280baa['push'](_0x280baa['shift']());}catch(_0x303281){_0x280baa['push'](_0x280baa['shift']());}}}(a31_0x1271,0x8bf02));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a31_0x2aa3(_0x2ae574,_0x60c09d){_0x2ae574=_0x2ae574-0xfd;const _0x12717c=a31_0x1271();let _0x2aa384=_0x12717c[_0x2ae574];return _0x2aa384;}import{executeSchemaQuery}from'../sdk/segment/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a31_0x1271(){const _0x31bf06=['Folder\x20ID\x20missing\x20from\x20resolved\x20path','Resolving\x20\x27','Parent\x20segment:\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','stats','\x20\x20Server-side\x20segment:\x20\x20tdx\x20sg\x20sql\x20<name>','segment','Show\x20child\x20segment\x20schema\x20(column\x20types)','in\x20','Usage:\x20tdx\x20segment\x20describe\x20<path>','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','β\x20Query\x20completed:\x20Processed\x20','processedRows','Parent\x20name:\x20','2215496rgBUmm','1730530iRYunk','segmentName','\x20\x20Parent\x20segment:\x20','cause','execute','trim','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','segment:show','INVALID_ARGUMENT','includes','segment:folder:show','getSegment','SEGMENT_FOLDER_NOT_FOUND','resolvePathToResource','Fetching\x20parent\x20segment\x20details...','red','Options:','segment:sql','folderPath','\x20\x20Folder\x20path:\x20','Folder\x20ID:\x20','\x20\x20Local\x20YAML\x20file:\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20--path\x20<file-path>','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','segment:desc','Error:\x20Path\x20or\x20name\x20is\x20required','\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22','Resolved\x20parent\x20ID:\x20','9awXjpn','β\x20Created\x20folder\x20\x27','jobId','SEGMENT_NOT_FOUND','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','segment:describe','Fetching\x20folder\x20\x27','\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details','\x20\x20Segment\x20name:\x20','parentSegment','β\x20Found\x20','Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.\x20Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','setJobId','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','Fetching\x20SQL\x20for\x20segment...','1137279cwjrNR','\x27...','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser','web','SQL\x20query:\x0a','resolveParentId','Resolved\x20type:\x20','/e/','SELECT\x20*\x20FROM\x20(\x0a','getSQLFromServerSegment','segmentId','Resolving\x20parent\x20segment\x20\x27','Usage:','Error:\x20Folder\x20reference\x20is\x20required','\x20\x20Full\x20path:\x20','name','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Error:\x20Segment\x20name\x20or\x20--path\x20is\x20required','Examples:','Use:\x20tdx\x20ps\x20view\x20-w','url','getSegmentSQL','Segment\x20ID:\x20','jsonl','replace','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','Error:\x20Specify\x20either\x20segment\x20name\x20or\x20--path,\x20not\x20both','Use:\x20tdx\x20ps\x20show','log','length','getFolder','Show\x20segment\x20or\x20folder\x20details','Show\x20folder\x20or\x20child\x20segment\x20details','Parent\x20ID:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','\x20rows\x20','query','parentId','Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.\x20Use:\x20tdx\x20ps\x20sql','/app/ps/','createFolder','Get\x20SQL\x20query\x20for\x20child\x20segment','Executing\x20segment\x20query...','format','Resolving\x20parent\x20folder\x20\x27','folder','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','segment:folder:list','\x20[Job\x20ID:\x20','7877723GLPZhc','Resolved\x20parent\x20folder\x20ID:\x20','Usage:\x20tdx\x20sg\x20desc\x20<name>','Fetching\x20SQL\x20from\x20rule...','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','path','fullPath','content','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','data','\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml','cyan','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22','428845LPcwVW','listFolders','folderId','Segment\x20ID\x20missing\x20from\x20resolved\x20path','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results','parent','Use:\x20tdx\x20ps\x20desc','getParent','Fetching\x20segment\x20details...','618HzXbCP','Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.','Folder\x20name:\x20','Resolved:\x20','error','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>','Error:\x20','Use:\x20tdx\x20ps\x20view','getSQLFromYamlFile','segment:view','\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml','Site:\x20','8528JtZnpW','Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','getSegmentSQLFromYaml','\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml','24pStnEj','Usage:\x20tdx\x20sg\x20show\x20<name>','Create\x20segment\x20folder\x20for\x20organization','resolveFolderId','description','json','Target\x20path:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','message','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','\x20\x20Cause:\x20','2130000qNyNst','site','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','\x20Opening\x20','type','Creating\x20folder\x20\x27','verbose','green','Fetching\x20folder\x20details...','β\x20Query\x20failed\x20[','test'];a31_0x1271=function(){return _0x31bf06;};return a31_0x1271();}import{openBrowser}from'../utils/process.js';import a31_0x442dd3 from'chalk';async function resolveSegmentTarget(_0x343a74,_0x2e5d7f,_0xef35c2){const _0x149cf6=a31_0x2aa3;if(isYamlFilePath(_0x343a74))try{const _0x9a2cc0=await resolveYamlFilePath(_0x343a74);return _0xef35c2&&(console[_0x149cf6(0x10c)]('Resolved\x20YAML\x20file:\x20'+_0x343a74),console['error'](_0x149cf6(0x141)+_0x9a2cc0[_0x149cf6(0x163)]),console[_0x149cf6(0x10c)](_0x149cf6(0x162)+_0x9a2cc0[_0x149cf6(0x140)]),console[_0x149cf6(0x10c)](_0x149cf6(0x152)+(_0x9a2cc0[_0x149cf6(0x151)]||'(root)')),console[_0x149cf6(0x10c)](_0x149cf6(0x177)+_0x9a2cc0['fullPath'])),_0x9a2cc0[_0x149cf6(0x1a0)];}catch(_0x20210a){throw new SDKError(ErrorCode[_0x149cf6(0x147)],'Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20'+_0x20210a[_0x149cf6(0x122)]);}if(!_0x2e5d7f)throw new SDKError(ErrorCode[_0x149cf6(0x147)],_0x149cf6(0x1a3));return _0x2e5d7f+'/'+_0x343a74;}export class SegmentDescribeCommand extends BaseCommand{[a31_0x38beab(0x178)]=a31_0x38beab(0x15f);['description']=a31_0x38beab(0x188);async['execute'](_0x257a2f){const _0x3d4eed=a31_0x38beab,{options:_0x278f4b,args:_0x59c128,tdx:_0x42dd05}=_0x257a2f,_0x20eac7=_0x59c128[0x0],_0x17088b=!_0x20eac7&&!!_0x278f4b[_0x3d4eed(0x163)],_0xcfed25=_0x20eac7||_0x278f4b[_0x3d4eed(0x163)];if(!_0xcfed25)return console[_0x3d4eed(0x10c)](_0x3d4eed(0x157)),console[_0x3d4eed(0x10c)](_0x3d4eed(0x139)),console[_0x3d4eed(0x10c)]('Examples:'),console[_0x3d4eed(0x10c)](_0x3d4eed(0x167)),console[_0x3d4eed(0x10c)](_0x3d4eed(0x197)),console[_0x3d4eed(0x10c)](_0x3d4eed(0x121)),console[_0x3d4eed(0x10c)](_0x3d4eed(0x127)),0x1;try{const _0x40656f=_0x278f4b['segmentPath'];let _0x5afd76=_0xcfed25;!_0x17088b&&_0x40656f&&!_0xcfed25[_0x3d4eed(0x148)]('/')&&(_0x5afd76=_0x40656f+'/'+_0xcfed25,_0x278f4b[_0x3d4eed(0x12b)]&&console[_0x3d4eed(0x10c)]('Resolved\x20relative\x20path\x20to:\x20'+_0x5afd76));const _0x492b03=await withSpinner('Resolving\x20path\x20\x27'+_0x5afd76+_0x3d4eed(0x16a),()=>_0x42dd05['segment'][_0x3d4eed(0x14c)](_0x5afd76),{'verbose':_0x278f4b[_0x3d4eed(0x12b)]}),_0x339ef3=_0x492b03[_0x3d4eed(0x1a4)];_0x278f4b[_0x3d4eed(0x12b)]&&(console[_0x3d4eed(0x10c)](_0x3d4eed(0x16f)+_0x339ef3[_0x3d4eed(0x129)]),console[_0x3d4eed(0x10c)](_0x3d4eed(0x18a)+_0x339ef3[_0x3d4eed(0x18e)]),_0x339ef3[_0x3d4eed(0x100)]&&console[_0x3d4eed(0x10c)](_0x3d4eed(0x153)+_0x339ef3[_0x3d4eed(0x100)]),_0x339ef3[_0x3d4eed(0x173)]&&console[_0x3d4eed(0x10c)](_0x3d4eed(0x17f)+_0x339ef3[_0x3d4eed(0x173)]));if(_0x339ef3[_0x3d4eed(0x129)]===_0x3d4eed(0x104)){const _0x8f9811=await withSpinner(_0x3d4eed(0x14d),()=>_0x42dd05['segment'][_0x3d4eed(0x106)](_0x339ef3[_0x3d4eed(0x18e)]),{'verbose':_0x278f4b[_0x3d4eed(0x12b)]});await handleSingleObjectOutput(_0x8f9811['data'],_0x278f4b);}else{if(_0x339ef3[_0x3d4eed(0x129)]===_0x3d4eed(0x196)){if(!_0x339ef3['folderId'])throw new SDKError(ErrorCode[_0x3d4eed(0x14b)],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x3622e7=await withSpinner(_0x3d4eed(0x12d),()=>_0x42dd05[_0x3d4eed(0x136)][_0x3d4eed(0x187)](_0x339ef3[_0x3d4eed(0x100)]),{'verbose':_0x278f4b[_0x3d4eed(0x12b)]});await handleSingleObjectOutput(_0x3622e7[_0x3d4eed(0x1a4)],_0x278f4b);}else{if(_0x339ef3['type']==='segment'){if(!_0x339ef3[_0x3d4eed(0x173)])throw new SDKError(ErrorCode[_0x3d4eed(0x15d)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x5f4fed=await withSpinner(_0x3d4eed(0x107),()=>_0x42dd05[_0x3d4eed(0x136)][_0x3d4eed(0x14a)](_0x339ef3['parentId'],_0x339ef3['segmentId']),{'verbose':_0x278f4b[_0x3d4eed(0x12b)]});await handleSingleObjectOutput(_0x5f4fed['data'],_0x278f4b);}}}return 0x0;}catch(_0x5c3191){if(_0x5c3191 instanceof SDKError)return console[_0x3d4eed(0x10c)](_0x3d4eed(0x10f)+_0x5c3191[_0x3d4eed(0x122)]),_0x5c3191['cause']&&console['error'](_0x3d4eed(0x124)+_0x5c3191[_0x3d4eed(0x142)]),0x1;throw _0x5c3191;}}}export class SegmentShowCommand extends BaseCommand{[a31_0x38beab(0x178)]=a31_0x38beab(0x146);['description']=a31_0x38beab(0x103);async['execute'](_0x40e9cb){const _0x3fa40f=a31_0x38beab,{options:_0x1d8175,args:_0x125ce0,tdx:_0x2e4023}=_0x40e9cb,_0x5626e0=_0x125ce0[0x0];if(!_0x5626e0)return console['error'](_0x3fa40f(0x145)),console[_0x3fa40f(0x10c)](_0x3fa40f(0x11b)),console[_0x3fa40f(0x10c)](_0x3fa40f(0x10e)),console[_0x3fa40f(0x10c)]('Examples:'),console[_0x3fa40f(0x10c)](_0x3fa40f(0x182)),console[_0x3fa40f(0x10c)](_0x3fa40f(0x1a5)),0x1;try{const _0x3b37ea=_0x1d8175['parentSegment'],_0x10f409=await resolveSegmentTarget(_0x5626e0,_0x3b37ea,_0x1d8175[_0x3fa40f(0x12b)]);_0x1d8175[_0x3fa40f(0x12b)]&&console[_0x3fa40f(0x10c)](_0x3fa40f(0x120)+_0x10f409);const _0x2ad380=await withSpinner('Resolving\x20\x27'+_0x5626e0+'\x27...',()=>_0x2e4023[_0x3fa40f(0x136)][_0x3fa40f(0x14c)](_0x10f409),{'verbose':_0x1d8175['verbose']}),_0x65bf0f=_0x2ad380['data'];_0x1d8175[_0x3fa40f(0x12b)]&&(console[_0x3fa40f(0x10c)](_0x3fa40f(0x16f)+_0x65bf0f['type']),console[_0x3fa40f(0x10c)](_0x3fa40f(0x18a)+_0x65bf0f[_0x3fa40f(0x18e)]));if(_0x65bf0f[_0x3fa40f(0x129)]==='folder')return console['error']('Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.'),console[_0x3fa40f(0x10c)]('Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details'),0x1;if(_0x65bf0f[_0x3fa40f(0x129)]===_0x3fa40f(0x104))return console[_0x3fa40f(0x10c)](_0x3fa40f(0x109)),console[_0x3fa40f(0x10c)](_0x3fa40f(0x184)),0x1;if(!_0x65bf0f[_0x3fa40f(0x173)])throw new SDKError(ErrorCode[_0x3fa40f(0x15d)],_0x3fa40f(0x101));const _0x47ce88=await withSpinner(_0x3fa40f(0x168),()=>_0x2e4023[_0x3fa40f(0x136)][_0x3fa40f(0x17e)](_0x65bf0f[_0x3fa40f(0x18e)],_0x65bf0f[_0x3fa40f(0x173)]),{'verbose':_0x1d8175[_0x3fa40f(0x12b)]});let _0x549c39=_0x47ce88[_0x3fa40f(0x1a4)];const _0x37d9ca=resolveLimit(_0x1d8175['limit'],DEFAULT_DISPLAY_LIMIT),_0x2a5654=/\bLIMIT\s+\d+/i[_0x3fa40f(0x12f)](_0x549c39);!_0x2a5654&&(_0x549c39=_0x549c39[_0x3fa40f(0x144)]()[_0x3fa40f(0x181)](/;+$/,''),_0x549c39=_0x3fa40f(0x171)+_0x549c39+_0x3fa40f(0x13a)+_0x37d9ca);_0x1d8175['verbose']&&console[_0x3fa40f(0x10c)](_0x3fa40f(0x16d)+_0x549c39);const _0x3f139c=await withProgressSpinner(_0x3fa40f(0x193),async _0xe26a68=>{const _0x3a6b58=_0x3fa40f,_0x510ef0=await _0x2e4023[_0x3a6b58(0x18d)]['execute'](_0x549c39,{'catalog':'td','schema':'information_schema','onJobId':_0x498a55=>{const _0x5657ce=_0x3a6b58;_0xe26a68[_0x5657ce(0x166)](_0x498a55);}});return _0x510ef0;},{'verbose':_0x1d8175[_0x3fa40f(0x12b)]}),_0x4a2d46=_0x3f139c[_0x3fa40f(0x1a4)],_0x110cc9=_0x4a2d46[_0x3fa40f(0x15c)]?_0x3fa40f(0x199)+_0x4a2d46['jobId']+']':'';return console['error'](_0x3fa40f(0x13b)+_0x4a2d46[_0x3fa40f(0x134)][_0x3fa40f(0x13c)]['toLocaleString']()+_0x3fa40f(0x18c)+(_0x3fa40f(0x138)+formatElapsed(_0x4a2d46['stats']['elapsedTimeMillis'])+_0x110cc9)),await handleQueryOutput(_0x4a2d46,_0x1d8175),0x0;}catch(_0x8e5d70){if(_0x8e5d70 instanceof SDKError)return console[_0x3fa40f(0x10c)](_0x3fa40f(0x12e)+_0x8e5d70['code']+']'),console['error']('\x0a'+_0x8e5d70['message']),0x1;throw _0x8e5d70;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a31_0x38beab(0x198);[a31_0x38beab(0x11e)]=a31_0x38beab(0x10d);async[a31_0x38beab(0x143)](_0x7741a1){const _0x3317c7=a31_0x38beab,{options:_0x58aaf6,args:_0x48fc72,tdx:_0x430d47}=_0x7741a1;if(_0x48fc72[_0x3317c7(0x186)]===0x0)return console[_0x3317c7(0x10c)](_0x3317c7(0x133)),console[_0x3317c7(0x10c)]('Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>'),0x1;const _0x225f55=_0x48fc72[0x0];try{_0x58aaf6[_0x3317c7(0x12b)]&&(console[_0x3317c7(0x10c)](_0x3317c7(0x114)+_0x58aaf6[_0x3317c7(0x126)]),console['error'](_0x3317c7(0x13d)+_0x225f55));const _0x3ed536=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x225f55+_0x3317c7(0x16a),()=>_0x430d47[_0x3317c7(0x136)]['resolveParentId'](_0x225f55),{'verbose':_0x58aaf6['verbose']}),_0x4af859=_0x3ed536[_0x3317c7(0x1a4)];_0x58aaf6['verbose']&&console[_0x3317c7(0x10c)](_0x3317c7(0x159)+_0x4af859);const _0x254883=await withSpinner('Listing\x20folders\x20for\x20parent\x20\x27'+_0x225f55+_0x3317c7(0x16a),()=>_0x430d47[_0x3317c7(0x136)][_0x3317c7(0xff)](_0x4af859),{'verbose':_0x58aaf6[_0x3317c7(0x12b)]}),_0x390d2c=_0x254883[_0x3317c7(0x1a4)];return console['error'](_0x3317c7(0x164)+_0x390d2c[_0x3317c7(0x186)]+'\x20folder'+(_0x390d2c[_0x3317c7(0x186)]!==0x1?'s':'')),await handleSDKOutput(_0x390d2c,_0x58aaf6),0x0;}catch(_0x39caae){if(_0x39caae instanceof SDKError)return console[_0x3317c7(0x10c)](_0x3317c7(0x10f)+_0x39caae[_0x3317c7(0x122)]),_0x39caae[_0x3317c7(0x142)]&&console[_0x3317c7(0x10c)](_0x3317c7(0x124)+_0x39caae[_0x3317c7(0x142)]),0x1;throw _0x39caae;}}}export class SegmentFolderShowCommand extends BaseCommand{[a31_0x38beab(0x178)]=a31_0x38beab(0x149);['description']='Show\x20segment\x20folder\x20details';async[a31_0x38beab(0x143)](_0x58e55a){const _0x4e455f=a31_0x38beab,{options:_0x198962,args:_0x243155,tdx:_0x5aadf5}=_0x58e55a;if(_0x243155[_0x4e455f(0x186)]===0x0)return console[_0x4e455f(0x10c)](_0x4e455f(0x176)),console[_0x4e455f(0x10c)](_0x4e455f(0x179)),0x1;try{const {parentId:_0x2c3697,childId:_0x4716ab}=parseSegmentRef(_0x243155[0x0]);_0x198962[_0x4e455f(0x12b)]&&(console[_0x4e455f(0x10c)](_0x4e455f(0x114)+_0x198962[_0x4e455f(0x126)]),console[_0x4e455f(0x10c)](_0x4e455f(0x13d)+_0x2c3697),_0x4716ab&&console['error'](_0x4e455f(0x10a)+_0x4716ab));if(!_0x4716ab)return console[_0x4e455f(0x10c)]('Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)'),0x1;const _0x3896c7=await withSpinner(_0x4e455f(0x174)+_0x2c3697+_0x4e455f(0x16a),()=>_0x5aadf5[_0x4e455f(0x136)]['resolveParentId'](_0x2c3697),{'verbose':_0x198962[_0x4e455f(0x12b)]}),_0x3a03ae=_0x3896c7[_0x4e455f(0x1a4)];_0x198962[_0x4e455f(0x12b)]&&console[_0x4e455f(0x10c)]('Resolved\x20parent\x20ID:\x20'+_0x3a03ae);const _0x2e1ab0=await withSpinner('Resolving\x20folder\x20\x27'+_0x4716ab+_0x4e455f(0x16a),()=>_0x5aadf5[_0x4e455f(0x136)]['resolveFolderId'](_0x3a03ae,_0x4716ab),{'verbose':_0x198962[_0x4e455f(0x12b)]}),_0x2aa691=_0x2e1ab0[_0x4e455f(0x1a4)];_0x198962[_0x4e455f(0x12b)]&&console[_0x4e455f(0x10c)]('Resolved\x20folder\x20ID:\x20'+_0x2aa691);const _0x52ef23=await withSpinner(_0x4e455f(0x160)+_0x4716ab+'\x27...',()=>_0x5aadf5[_0x4e455f(0x136)][_0x4e455f(0x187)](_0x2aa691),{'verbose':_0x198962[_0x4e455f(0x12b)]});return await handleSDKOutput([_0x52ef23[_0x4e455f(0x1a4)]],_0x198962),0x0;}catch(_0x213ce3){if(_0x213ce3 instanceof SDKError)return console[_0x4e455f(0x10c)](_0x4e455f(0x10f)+_0x213ce3[_0x4e455f(0x122)]),_0x213ce3[_0x4e455f(0x142)]&&console[_0x4e455f(0x10c)](_0x4e455f(0x124)+_0x213ce3['cause']),0x1;throw _0x213ce3;}}}export class SegmentSQLCommand extends BaseCommand{[a31_0x38beab(0x178)]=a31_0x38beab(0x150);[a31_0x38beab(0x11e)]=a31_0x38beab(0x192);async[a31_0x38beab(0x143)](_0x25046a){const _0x295ece=a31_0x38beab,{options:_0x2c2e51,args:_0x2eee1b}=_0x25046a,_0x41cf0d=_0x2c2e51,_0x27467b=_0x41cf0d[_0x295ece(0x19f)],_0x4066dd=_0x2eee1b[0x0];if(!_0x4066dd&&!_0x27467b)return console[_0x295ece(0x10c)](a31_0x442dd3[_0x295ece(0x14e)](_0x295ece(0x17a))),console[_0x295ece(0x10c)](_0x295ece(0x175)),console['error'](_0x295ece(0x135)),console['error'](_0x295ece(0x154)),console['error']('Examples:'),console[_0x295ece(0x10c)](_0x295ece(0xfd)),console['error']('\x20\x20tdx\x20sg\x20sql\x20--path\x20segments/my-audience/premium-users.yml'),0x1;if(_0x4066dd&&_0x27467b)return console[_0x295ece(0x10c)](a31_0x442dd3['red'](_0x295ece(0x183))),0x1;try{let _0x27d93d;if(_0x27467b)_0x27d93d=await this['getSQLFromYamlFile'](_0x27467b,_0x25046a);else{if(isYamlFilePath(_0x4066dd))return console['error'](a31_0x442dd3[_0x295ece(0x14e)]('Error:\x20YAML\x20file\x20paths\x20must\x20be\x20specified\x20with\x20--path\x20option')),console[_0x295ece(0x10c)]('\x20\x20tdx\x20sg\x20sql\x20--path\x20'+_0x4066dd),0x1;else _0x27d93d=await this[_0x295ece(0x172)](_0x4066dd,_0x25046a);}return _0x2c2e51[_0x295ece(0x194)]===_0x295ece(0x11f)||_0x2c2e51[_0x295ece(0x194)]===_0x295ece(0x180)?await handleSDKOutput([{'sql':_0x27d93d}],_0x2c2e51):console[_0x295ece(0x185)](_0x27d93d),0x0;}catch(_0xa13296){if(_0xa13296 instanceof SDKError)return console[_0x295ece(0x10c)](_0x295ece(0x10f)+_0xa13296['message']),_0xa13296[_0x295ece(0x142)]&&console[_0x295ece(0x10c)](_0x295ece(0x124)+_0xa13296['cause']),0x1;throw _0xa13296;}}async[a31_0x38beab(0x111)](_0x1c169c,_0x3672cb){const _0x178a13=a31_0x38beab,{options:_0x51efac,tdx:_0xb27a9f}=_0x3672cb;let _0x47f1c5;try{_0x47f1c5=await resolveYamlFilePath(_0x1c169c);}catch(_0x4e0553){throw new SDKError(ErrorCode[_0x178a13(0x147)],_0x178a13(0x117)+_0x4e0553[_0x178a13(0x122)]);}_0x51efac[_0x178a13(0x12b)]&&console[_0x178a13(0x10c)](_0x178a13(0x10b)+_0x47f1c5['parentSegment']+'/'+_0x47f1c5[_0x178a13(0x140)]);const _0x3058ab=await withSpinner(_0x178a13(0x19d),()=>_0xb27a9f['segment'][_0x178a13(0x118)](_0x47f1c5[_0x178a13(0x1a1)],_0x47f1c5[_0x178a13(0x163)],_0x47f1c5[_0x178a13(0x140)]),{'verbose':_0x51efac[_0x178a13(0x12b)]});return _0x3058ab[_0x178a13(0x1a4)];}async['getSQLFromServerSegment'](_0x26aed9,_0x3b6146){const _0x3a5b18=a31_0x38beab,{options:_0x2ed3c8,tdx:_0x5b7d2c}=_0x3b6146,_0x228f4a=_0x2ed3c8['parentSegment'],_0x55151f=await resolveSegmentTarget(_0x26aed9,_0x228f4a,_0x2ed3c8[_0x3a5b18(0x12b)]);_0x2ed3c8[_0x3a5b18(0x12b)]&&console[_0x3a5b18(0x10c)](_0x3a5b18(0x120)+_0x55151f);const _0x1fbe05=await withSpinner(_0x3a5b18(0x131)+_0x26aed9+_0x3a5b18(0x16a),()=>_0x5b7d2c[_0x3a5b18(0x136)][_0x3a5b18(0x14c)](_0x55151f),{'verbose':_0x2ed3c8[_0x3a5b18(0x12b)]}),_0x28aa07=_0x1fbe05[_0x3a5b18(0x1a4)];_0x2ed3c8[_0x3a5b18(0x12b)]&&(console[_0x3a5b18(0x10c)]('Resolved\x20type:\x20'+_0x28aa07[_0x3a5b18(0x129)]),console['error'](_0x3a5b18(0x18a)+_0x28aa07[_0x3a5b18(0x18e)]));if(_0x28aa07[_0x3a5b18(0x129)]==='folder')throw new SDKError(ErrorCode[_0x3a5b18(0x147)],_0x3a5b18(0x165));if(_0x28aa07['type']==='parent')throw new SDKError(ErrorCode[_0x3a5b18(0x147)],_0x3a5b18(0x18f));if(!_0x28aa07[_0x3a5b18(0x173)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x3a5b18(0x101));const _0x37b648=await withSpinner(_0x3a5b18(0x168),()=>_0x5b7d2c[_0x3a5b18(0x136)][_0x3a5b18(0x17e)](_0x28aa07['parentId'],_0x28aa07[_0x3a5b18(0x173)]),{'verbose':_0x2ed3c8[_0x3a5b18(0x12b)]});return _0x37b648[_0x3a5b18(0x1a4)];}}export class SegmentFolderCreateCommand extends BaseCommand{[a31_0x38beab(0x178)]='segment:folder:create';[a31_0x38beab(0x11e)]=a31_0x38beab(0x11c);async[a31_0x38beab(0x143)](_0x228262){const _0x15b58e=a31_0x38beab,{options:_0x3a08f0,args:_0x3cdfa1,tdx:_0x1dd062}=_0x228262,_0x4b7058=_0x3a08f0;if(_0x3cdfa1[_0x15b58e(0x186)]<0x2)return console['error'](_0x15b58e(0x19e)),console[_0x15b58e(0x10c)](_0x15b58e(0x123)),0x1;const _0x57a411=_0x3cdfa1[0x0],_0x4cd139=_0x3cdfa1[0x1];_0x4b7058[_0x15b58e(0x12b)]&&(console[_0x15b58e(0x10c)](_0x15b58e(0x114)+_0x4b7058[_0x15b58e(0x126)]),console[_0x15b58e(0x10c)](_0x15b58e(0x132)+_0x57a411),console[_0x15b58e(0x10c)](_0x15b58e(0x10a)+_0x4cd139));let _0x5c8693;if(_0x4b7058['parentFolder']){const _0x4dbd19=_0x4b7058['parentFolder'],_0x265601=await withSpinner(_0x15b58e(0x174)+_0x57a411+_0x15b58e(0x16a),()=>_0x1dd062['segment'][_0x15b58e(0x16e)](_0x57a411),{'verbose':_0x4b7058[_0x15b58e(0x12b)]}),_0x5d0081=_0x265601[_0x15b58e(0x1a4)],_0x4b3d91=await withSpinner(_0x15b58e(0x195)+_0x4dbd19+'\x27...',()=>_0x1dd062[_0x15b58e(0x136)][_0x15b58e(0x11d)](_0x5d0081,_0x4dbd19),{'verbose':_0x4b7058[_0x15b58e(0x12b)]});_0x5c8693=_0x4b3d91[_0x15b58e(0x1a4)],_0x4b7058[_0x15b58e(0x12b)]&&console['error'](_0x15b58e(0x19b)+_0x5c8693);}const _0x1f2868={'name':_0x4cd139,'description':_0x4b7058[_0x15b58e(0x11e)],'parentFolderId':_0x5c8693},_0x39c633=await withSpinner(_0x15b58e(0x12a)+_0x4cd139+'\x27...',()=>_0x1dd062[_0x15b58e(0x136)][_0x15b58e(0x191)](_0x57a411,_0x1f2868),{'verbose':_0x4b7058['verbose']}),_0x569478=_0x39c633['data'];return console[_0x15b58e(0x10c)](_0x15b58e(0x15b)+_0x569478[_0x15b58e(0x178)]+'\x27\x20with\x20ID:\x20'+_0x569478['id']),await handleSDKOutput([_0x569478],_0x4b7058),0x0;}}export class SegmentViewCommand extends BaseCommand{[a31_0x38beab(0x178)]=a31_0x38beab(0x112);[a31_0x38beab(0x11e)]=a31_0x38beab(0x189);async[a31_0x38beab(0x143)](_0x3d4c71){const _0x127516=a31_0x38beab,{options:_0xe1b9f2,args:_0x22a7ac,tdx:_0x5cea1c}=_0x3d4c71,_0x4bd942=_0x22a7ac[0x0];if(!_0x4bd942)return console[_0x127516(0x10c)]('Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0x127516(0x10c)]('Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]'),console[_0x127516(0x10c)](_0x127516(0x15e)),console['error'](_0x127516(0x14f)),console[_0x127516(0x10c)](_0x127516(0x1a7)),console[_0x127516(0x10c)](_0x127516(0x17b)),console[_0x127516(0x10c)](_0x127516(0x161)),console[_0x127516(0x10c)](_0x127516(0x18b)),console[_0x127516(0x10c)](_0x127516(0x16b)),console[_0x127516(0x10c)](_0x127516(0x113)),0x1;try{const _0x3b3483=_0xe1b9f2[_0x127516(0x163)],_0x295091=await resolveSegmentTarget(_0x4bd942,_0x3b3483,_0xe1b9f2[_0x127516(0x12b)]);_0xe1b9f2[_0x127516(0x12b)]&&console[_0x127516(0x10c)](_0x127516(0x120)+_0x295091);const _0x2fe170=await withSpinner(_0x127516(0x131)+_0x4bd942+_0x127516(0x16a),()=>_0x5cea1c['segment'][_0x127516(0x14c)](_0x295091),{'verbose':_0xe1b9f2[_0x127516(0x12b)]}),_0x207795=_0x2fe170['data'];_0xe1b9f2[_0x127516(0x12b)]&&(console[_0x127516(0x10c)](_0x127516(0x16f)+_0x207795['type']),console[_0x127516(0x10c)](_0x127516(0x18a)+_0x207795[_0x127516(0x18e)]),_0x207795[_0x127516(0x100)]&&console[_0x127516(0x10c)](_0x127516(0x153)+_0x207795['folderId']),_0x207795['segmentId']&&console['error'](_0x127516(0x17f)+_0x207795[_0x127516(0x173)]));if(_0xe1b9f2[_0x127516(0x16c)]){if(_0x207795['type']===_0x127516(0x196))return console[_0x127516(0x10c)]('Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.'),0x1;if(_0x207795[_0x127516(0x129)]===_0x127516(0x104))return console['error'](_0x127516(0x1a2)),console['error'](_0x127516(0x17c)),0x1;if(!_0x207795[_0x127516(0x173)])throw new SDKError(ErrorCode[_0x127516(0x15d)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2a6e2e=getConsoleNextUrl(_0xe1b9f2['site'],_0x127516(0x190)+_0x207795[_0x127516(0x18e)]+'/e/'+_0x207795[_0x127516(0x173)]);return console['error'](a31_0x442dd3[_0x127516(0x12c)]('β')+_0x127516(0x128)+a31_0x442dd3[_0x127516(0x1a6)](_0x2a6e2e)),openBrowser(_0x2a6e2e),0x0;}if(_0x207795['type']===_0x127516(0x196)){if(!_0x207795['folderId'])throw new SDKError(ErrorCode[_0x127516(0x14b)],_0x127516(0x130));const _0x5e2453=await withSpinner('Fetching\x20folder\x20details...',()=>_0x5cea1c['segment'][_0x127516(0x187)](_0x207795[_0x127516(0x100)]),{'verbose':_0xe1b9f2[_0x127516(0x12b)]});await handleSingleObjectOutput(_0x5e2453[_0x127516(0x1a4)],_0xe1b9f2);}else{if(_0x207795[_0x127516(0x129)]===_0x127516(0x136)){if(!_0x207795[_0x127516(0x173)])throw new SDKError(ErrorCode[_0x127516(0x15d)],_0x127516(0x101));const _0x10c0d3=await withSpinner(_0x127516(0x107),()=>_0x5cea1c[_0x127516(0x136)]['getSegment'](_0x207795[_0x127516(0x18e)],_0x207795[_0x127516(0x173)]),{'verbose':_0xe1b9f2['verbose']}),_0x423f7b=getConsoleNextUrl(_0xe1b9f2[_0x127516(0x126)],_0x127516(0x190)+_0x207795['parentId']+_0x127516(0x170)+_0x207795['segmentId']),_0x5a2784=_0x10c0d3[_0x127516(0x1a4)];_0x5a2784[_0x127516(0x17d)]=_0x423f7b,await handleSingleObjectOutput(_0x5a2784,_0xe1b9f2);}else return console['error'](_0x127516(0x155)),console[_0x127516(0x10c)](_0x127516(0x110)),0x1;}return 0x0;}catch(_0x4b13e9){if(_0x4b13e9 instanceof SDKError)return console[_0x127516(0x10c)](_0x127516(0x10f)+_0x4b13e9[_0x127516(0x122)]),_0x4b13e9[_0x127516(0x142)]&&console['error'](_0x127516(0x124)+_0x4b13e9[_0x127516(0x142)]),0x1;throw _0x4b13e9;}}}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{[a31_0x38beab(0x178)]=a31_0x38beab(0x156);['description']=a31_0x38beab(0x137);async[a31_0x38beab(0x143)](_0x5a4d0b){const _0xa17ddb=a31_0x38beab,{options:_0x486448,args:_0x48c6f4,tdx:_0xa3f326}=_0x5a4d0b,_0x2b7964=_0x48c6f4[0x0];if(!_0x2b7964)return console[_0xa17ddb(0x10c)]('Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0xa17ddb(0x10c)](_0xa17ddb(0x19c)),console[_0xa17ddb(0x10c)](_0xa17ddb(0x102)),console[_0xa17ddb(0x10c)](_0xa17ddb(0x17b)),console[_0xa17ddb(0x10c)](_0xa17ddb(0x158)),console['error'](_0xa17ddb(0x119)),0x1;try{const _0x16bcb7=_0x486448[_0xa17ddb(0x163)],_0x112f79=await resolveSegmentTarget(_0x2b7964,_0x16bcb7,_0x486448[_0xa17ddb(0x12b)]);_0x486448['verbose']&&console[_0xa17ddb(0x10c)]('Target\x20path:\x20'+_0x112f79);const _0x15675e=await withSpinner(_0xa17ddb(0x131)+_0x2b7964+'\x27...',()=>_0xa3f326['segment'][_0xa17ddb(0x14c)](_0x112f79),{'verbose':_0x486448[_0xa17ddb(0x12b)]}),_0x32c9fb=_0x15675e[_0xa17ddb(0x1a4)];_0x486448[_0xa17ddb(0x12b)]&&(console[_0xa17ddb(0x10c)]('Resolved\x20type:\x20'+_0x32c9fb[_0xa17ddb(0x129)]),console[_0xa17ddb(0x10c)](_0xa17ddb(0x18a)+_0x32c9fb[_0xa17ddb(0x18e)]));if(_0x32c9fb[_0xa17ddb(0x129)]===_0xa17ddb(0x196))return console[_0xa17ddb(0x10c)](_0xa17ddb(0x116)),console[_0xa17ddb(0x10c)]('Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.'),0x1;if(_0x32c9fb[_0xa17ddb(0x129)]===_0xa17ddb(0x104))return console[_0xa17ddb(0x10c)]('Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console[_0xa17ddb(0x10c)](_0xa17ddb(0x105)),0x1;if(!_0x32c9fb[_0xa17ddb(0x173)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1d635a=await withSpinner(_0xa17ddb(0x168),()=>_0xa3f326[_0xa17ddb(0x136)][_0xa17ddb(0x17e)](_0x32c9fb[_0xa17ddb(0x18e)],_0x32c9fb[_0xa17ddb(0x173)]),{'verbose':_0x486448[_0xa17ddb(0x12b)]}),_0xd42e30=_0x1d635a[_0xa17ddb(0x1a4)],_0x3491d8=await executeSchemaQuery(_0xd42e30,_0xa3f326,_0x486448);return await handleQueryOutput(_0x3491d8,_0x486448),0x0;}catch(_0x3a171a){if(_0x3a171a instanceof SDKError)return console['error'](_0xa17ddb(0x10f)+_0x3a171a[_0xa17ddb(0x122)]),_0x3a171a[_0xa17ddb(0x142)]&&console[_0xa17ddb(0x10c)](_0xa17ddb(0x124)+_0x3a171a[_0xa17ddb(0x142)]),0x1;throw _0x3a171a;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a32_0x2a24(){const _0x334df6=['\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','\x27\x20with\x20ID:\x20','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','resolvePathToResource','type','verbose','segmentPath','152ViKHFa','73hUOXuB','Site:\x20','folderId','length','Parent\x20path:\x20','description','Examples:','createSegment','10254QlCMxE','4055080gxSxoa','Resolved\x20relative\x20path\x20to:\x20','invisible','execute','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','includes','Creating\x20segment\x20\x27','site','kind','Resolved\x20folder\x20ID:\x20','2209368IzQQjf','segments','Resolving\x20folder\x20path\x20\x27','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','41780IBIvld','6115194dvciHd','858wzXmeE','segment','resolveParentId','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','yellow','folder','11sxLtIu','ruleFile','noCountPopulation','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','10wwsVgJ','error','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','segment:create','data','parent','472297QJZntl','Target\x20path:\x20','1265829tWJrhW','Parent:\x20','Resolving\x20parent\x20segment\x20\x27','\x27...'];a32_0x2a24=function(){return _0x334df6;};return a32_0x2a24();}const a32_0x3109b3=a32_0x5622;(function(_0x40cdf2,_0x447a0a){const _0x2d0aa1=a32_0x5622,_0x18de8a=_0x40cdf2();while(!![]){try{const _0x1bec9f=-parseInt(_0x2d0aa1(0xb1))/0x1*(parseInt(_0x2d0aa1(0xb9))/0x2)+-parseInt(_0x2d0aa1(0xa5))/0x3+parseInt(_0x2d0aa1(0xba))/0x4+parseInt(_0x2d0aa1(0xc8))/0x5*(-parseInt(_0x2d0aa1(0xca))/0x6)+-parseInt(_0x2d0aa1(0xa3))/0x7*(-parseInt(_0x2d0aa1(0xb0))/0x8)+-parseInt(_0x2d0aa1(0xc9))/0x9*(-parseInt(_0x2d0aa1(0x9d))/0xa)+parseInt(_0x2d0aa1(0xd0))/0xb*(-parseInt(_0x2d0aa1(0xc4))/0xc);if(_0x1bec9f===_0x447a0a)break;else _0x18de8a['push'](_0x18de8a['shift']());}catch(_0x3e9726){_0x18de8a['push'](_0x18de8a['shift']());}}}(a32_0x2a24,0xc34cd));import{BaseCommand}from'./command.js';function a32_0x5622(_0x179a42,_0x53d837){_0x179a42=_0x179a42-0x9d;const _0x2a245d=a32_0x2a24();let _0x56220c=_0x2a245d[_0x179a42];return _0x56220c;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../sdk/segment/segment-path-parser.js';import a32_0x1f1692 from'chalk';export class SegmentCreateCommand extends BaseCommand{['name']=a32_0x3109b3(0xa0);[a32_0x3109b3(0xb6)]='Create\x20child\x20segment\x20with\x20filtering\x20rules';async[a32_0x3109b3(0xbd)](_0x3edf9a){const _0x2ccf73=a32_0x3109b3;console[_0x2ccf73(0x9e)](a32_0x1f1692[_0x2ccf73(0xce)]('β \x20Deprecation\x20warning:\x20`segment\x20create`\x20is\x20deprecated.')),console['error'](a32_0x1f1692[_0x2ccf73(0xce)](_0x2ccf73(0xab)));const {options:_0x5342d4,args:_0x38c1c5,tdx:_0x3f7a23}=_0x3edf9a,_0x3db512=_0x5342d4;if(_0x38c1c5[_0x2ccf73(0xb4)]===0x0)return console[_0x2ccf73(0x9e)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x2ccf73(0x9e)](_0x2ccf73(0xc7)),console[_0x2ccf73(0x9e)](_0x2ccf73(0xb7)),console['error'](_0x2ccf73(0x9f)),console['error'](_0x2ccf73(0xd3)),console[_0x2ccf73(0x9e)](_0x2ccf73(0xa9)),0x1;const _0x343085=_0x38c1c5[0x0],_0x13bc03=_0x5342d4[_0x2ccf73(0xaf)];let _0x42b1ff=_0x343085;_0x13bc03&&!_0x343085[_0x2ccf73(0xbf)]('/')&&(_0x42b1ff=_0x13bc03+'/'+_0x343085,_0x3db512[_0x2ccf73(0xae)]&&console[_0x2ccf73(0x9e)](_0x2ccf73(0xbb)+_0x42b1ff));const _0x262a6f=parsePath(_0x42b1ff);if(_0x262a6f['segments'][_0x2ccf73(0xb4)]<0x2)return console[_0x2ccf73(0x9e)](_0x2ccf73(0xcd)),console['error']('Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]'),0x1;const _0x56aa27=_0x262a6f['segments'][0x0],_0x37bcd6=getBaseName(_0x42b1ff),_0x88b28d=getParentPath(_0x42b1ff);_0x3db512[_0x2ccf73(0xae)]&&(console['error'](_0x2ccf73(0xb2)+_0x3db512[_0x2ccf73(0xc1)]),console[_0x2ccf73(0x9e)](_0x2ccf73(0xa4)+_0x42b1ff),console[_0x2ccf73(0x9e)](_0x2ccf73(0xa6)+_0x56aa27),console['error']('Segment\x20name:\x20'+_0x37bcd6),console['error'](_0x2ccf73(0xb5)+_0x88b28d));const _0x31a8ce=await withSpinner(_0x2ccf73(0xa7)+_0x56aa27+_0x2ccf73(0xa8),()=>_0x3f7a23[_0x2ccf73(0xcb)][_0x2ccf73(0xcc)](_0x56aa27),{'verbose':_0x3db512[_0x2ccf73(0xae)]}),_0x566321=_0x31a8ce[_0x2ccf73(0xa1)];let _0x5f5221;if(_0x262a6f[_0x2ccf73(0xc5)][_0x2ccf73(0xb4)]>0x2){const _0x4889ad=await withSpinner(_0x2ccf73(0xc6)+_0x88b28d+_0x2ccf73(0xa8),()=>_0x3f7a23[_0x2ccf73(0xcb)][_0x2ccf73(0xac)](_0x88b28d),{'verbose':_0x3db512[_0x2ccf73(0xae)]}),_0x12a07c=_0x4889ad['data'];if(_0x12a07c[_0x2ccf73(0xad)]!==_0x2ccf73(0xcf)&&_0x12a07c[_0x2ccf73(0xad)]!==_0x2ccf73(0xa2))return console[_0x2ccf73(0x9e)](_0x2ccf73(0xbe)),0x1;_0x5f5221=_0x12a07c[_0x2ccf73(0xb3)];}else{if(_0x3db512['folder']){const _0x153787=await withSpinner('Resolving\x20folder\x20\x27'+_0x3db512[_0x2ccf73(0xcf)]+_0x2ccf73(0xa8),()=>_0x3f7a23['segment']['resolveFolderId'](_0x566321,_0x3db512['folder']),{'verbose':_0x3db512[_0x2ccf73(0xae)]});_0x5f5221=_0x153787[_0x2ccf73(0xa1)];}}_0x3db512[_0x2ccf73(0xae)]&&_0x5f5221&&console['error'](_0x2ccf73(0xc3)+_0x5f5221);const _0x392183=await loadJSONFromOptions(_0x3db512['rule'],_0x3db512[_0x2ccf73(0xd1)]),_0xcd5357={'name':_0x37bcd6,'description':_0x3db512[_0x2ccf73(0xb6)],'rule':_0x392183,'kind':_0x3db512[_0x2ccf73(0xc2)]!==undefined?parseInt(_0x3db512[_0x2ccf73(0xc2)],0xa):undefined,'isVisible':_0x3db512[_0x2ccf73(0xbc)]?![]:undefined,'segmentFolderId':_0x5f5221,'countPopulation':_0x3db512[_0x2ccf73(0xd2)]?![]:undefined},_0x5a84e0=await withSpinner(_0x2ccf73(0xc0)+_0x37bcd6+'\x27...',()=>_0x3f7a23[_0x2ccf73(0xcb)][_0x2ccf73(0xb8)](_0x566321,_0xcd5357),{'verbose':_0x3db512[_0x2ccf73(0xae)]}),_0x16a005=_0x5a84e0[_0x2ccf73(0xa1)];return console[_0x2ccf73(0x9e)]('β\x20Created\x20segment\x20\x27'+_0x16a005['name']+_0x2ccf73(0xaa)+_0x16a005['id']),_0x42b1ff!==_0x343085&&console[_0x2ccf73(0x9e)]('\x20\x20\x20Path:\x20'+_0x42b1ff),await handleSDKOutput([_0x16a005],_0x3db512),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x22e28f=a33_0xb2f6;(function(_0x43c464,_0x1d5c4a){const _0x49c713=a33_0xb2f6,_0x240b6d=_0x43c464();while(!![]){try{const _0x5ca417=parseInt(_0x49c713(0x1a7))/0x1+parseInt(_0x49c713(0x1af))/0x2*(parseInt(_0x49c713(0x1a5))/0x3)+-parseInt(_0x49c713(0x1ad))/0x4*(parseInt(_0x49c713(0x1a4))/0x5)+-parseInt(_0x49c713(0x1a2))/0x6+parseInt(_0x49c713(0x19c))/0x7+-parseInt(_0x49c713(0x1aa))/0x8*(-parseInt(_0x49c713(0x1a8))/0x9)+parseInt(_0x49c713(0x19a))/0xa*(-parseInt(_0x49c713(0x19f))/0xb);if(_0x5ca417===_0x1d5c4a)break;else _0x240b6d['push'](_0x240b6d['shift']());}catch(_0x2bc761){_0x240b6d['push'](_0x240b6d['shift']());}}}(a33_0x2304,0x4d9cb));function a33_0x2304(){const _0x47af23=['length','Parent\x20segment:\x20','error','6689630kFhZWL','site','2702210KrZSGw','verbose','description','11bJuJEk','\x27...','listFields','525324wOUtun','json','10MczeYv','21wmYYpP','Site:\x20','390654MUHmCj','636102cvkaGl','Listing\x20fields\x20for\x20\x27','40ZdxWJk','execute','segment:fields','591460rxJncn','data','68592iOGQfM','Error:\x20Parent\x20segment\x20name\x20is\x20required','segment'];a33_0x2304=function(){return _0x47af23;};return a33_0x2304();}function a33_0xb2f6(_0x174873,_0x42e0ec){_0x174873=_0x174873-0x19a;const _0x2304db=a33_0x2304();let _0xb2f641=_0x2304db[_0x174873];return _0xb2f641;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{displayFieldsHumanReadable}from'../sdk/segment/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{['name']=a33_0x22e28f(0x1ac);[a33_0x22e28f(0x19e)]='List\x20available\x20fields\x20for\x20segmentation';async[a33_0x22e28f(0x1ab)](_0x13a901){const _0xa6979f=a33_0x22e28f,{options:_0x406bf6,args:_0xaa347b,tdx:_0x5641f4}=_0x13a901,_0x308b7c=_0xaa347b[0x0]||_0x406bf6['parentSegment'];if(!_0x308b7c)return console[_0xa6979f(0x1b4)](_0xa6979f(0x1b0)),console['error']('Usage:\x20tdx\x20segment\x20fields\x20<parent_name>'),console[_0xa6979f(0x1b4)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;_0x406bf6[_0xa6979f(0x19d)]&&(console[_0xa6979f(0x1b4)](_0xa6979f(0x1a6)+_0x406bf6[_0xa6979f(0x19b)]),console[_0xa6979f(0x1b4)](_0xa6979f(0x1b3)+_0x308b7c));const _0x526ffc=await withSpinner(_0xa6979f(0x1a9)+_0x308b7c+_0xa6979f(0x1a0),()=>_0x5641f4[_0xa6979f(0x1b1)][_0xa6979f(0x1a1)](_0x308b7c),{'verbose':_0x406bf6[_0xa6979f(0x19d)]}),_0x5b92a6=_0x526ffc[_0xa6979f(0x1ae)];console[_0xa6979f(0x1b4)]('β\x20Found\x20'+_0x5b92a6[_0xa6979f(0x1b2)]+'\x20field'+(_0x5b92a6['length']!==0x1?'s':''));if(_0x406bf6[_0xa6979f(0x1a3)]||_0x406bf6['jsonl'])return await handleSDKOutput(_0x5b92a6,_0x406bf6),0x0;return displayFieldsHumanReadable(_0x5b92a6,_0x308b7c),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a34_0x105f(_0x5145b0,_0x4d6b28){_0x5145b0=_0x5145b0-0x67;const _0x1432e3=a34_0x1432();let _0x105f78=_0x1432e3[_0x5145b0];return _0x105f78;}const a34_0x4fa24b=a34_0x105f;(function(_0x28c1ae,_0x35989b){const _0x2b6281=a34_0x105f,_0x23b17d=_0x28c1ae();while(!![]){try{const _0x3576fc=parseInt(_0x2b6281(0xb2))/0x1+parseInt(_0x2b6281(0x8a))/0x2+-parseInt(_0x2b6281(0x77))/0x3+-parseInt(_0x2b6281(0x6f))/0x4*(parseInt(_0x2b6281(0x6a))/0x5)+parseInt(_0x2b6281(0x8c))/0x6*(-parseInt(_0x2b6281(0x88))/0x7)+parseInt(_0x2b6281(0x6c))/0x8+parseInt(_0x2b6281(0xaa))/0x9;if(_0x3576fc===_0x35989b)break;else _0x23b17d['push'](_0x23b17d['shift']());}catch(_0x112763){_0x23b17d['push'](_0x23b17d['shift']());}}}(a34_0x1432,0x877ad));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';function a34_0x1432(){const _0x48245=['site','yellow','\x20segments','\x27...','\x20new\x20files','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','segment','segments','Pulling\x20segments\x20from\x20\x27','parent_segment','file','Parent\x20segment:\x20','pullSegments','\x20=\x20','journeys','\x0aPull\x20summary\x20for\x20\x27','\x20journeys','activations','dirname','dim','red','filter','helpText','parentName','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent','cwd','setPhase','\x20\x20π―\x20','6922278RmLnCZ','repeat','name','session','no_parent','parentSegment','type','content','611848WNyLVP','errorCode','β\x20Context\x20set:\x20','\x20unchanged\x20files','counts','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','verbose','green','targetDir','Site:\x20','5WFCzgu','Write\x20','8213384ikXUiC','\x20\x20πΊοΈ\x20\x20','cyan','4230308OJbltE','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','error','relativePath','\x20\x20Target:\x20','length','dryRun','utf-8','2883594iaxKCH','files','\x20with\x20','message','\x0aChanges\x20to\x20\x27','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20activations','hasChanges','execute','isNew','diff','β\x20Pulled\x20','resourceName','journeyVersions','-\x20no\x20files\x20written','Target\x20resource:\x20','description','1480367rIawlV','absolutePath','2023922qpoiqp','Aborted.','24imRBIn','\x20changed\x20files'];a34_0x1432=function(){return _0x48245;};return a34_0x1432();}import a34_0x2b0163 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a34_0x3eda8a from'path';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';export{buildFolderIdToPathMap as buildFolderPathMap}from'../sdk/segment/resolution-context.js';export class SegmentPullCommand extends BaseCommand{[a34_0x4fa24b(0xac)]='segment:pull';[a34_0x4fa24b(0x87)]=a34_0x4fa24b(0xb7);async[a34_0x4fa24b(0x7f)](_0x126de2){const _0x1fea36=a34_0x4fa24b,{options:_0x112827,args:_0x5aad82,tdx:_0x267003}=_0x126de2,_0x375a21=_0x112827,_0x3949c3=await resolveTarget({'arg':_0x5aad82[0x0],'contextParent':_0x112827[_0x1fea36(0xaf)],'cwd':process[_0x1fea36(0xa7)]()});if(!isSuccessfulResolution(_0x3949c3))return _0x3949c3[_0x1fea36(0xb3)]===_0x1fea36(0xae)?(console[_0x1fea36(0x71)](a34_0x2b0163['yellow'](_0x1fea36(0x7c))),console[_0x1fea36(0x71)]('Usage:\x20tdx\x20sg\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20(requires\x20context\x20or\x20tdx.json)'),console['error'](_0x1fea36(0xa6)),console[_0x1fea36(0x71)](_0x1fea36(0x93))):(console['error'](a34_0x2b0163[_0x1fea36(0xa2)]('Error:\x20'+_0x3949c3[_0x1fea36(0x7a)]+'\x0a')),_0x3949c3['helpText']&&console[_0x1fea36(0x71)](a34_0x2b0163[_0x1fea36(0x6e)](_0x3949c3[_0x1fea36(0xa4)]))),0x1;const _0x3e306f=_0x3949c3[_0x1fea36(0xa5)],_0x2f65cf=_0x3949c3[_0x1fea36(0x68)],_0x38822d=_0x3949c3[_0x1fea36(0xb0)]===_0x1fea36(0x98)?_0x3949c3[_0x1fea36(0x83)]:undefined;_0x375a21[_0x1fea36(0xb8)]&&(console[_0x1fea36(0x71)](_0x1fea36(0x69)+_0x375a21[_0x1fea36(0x8e)]),console['error'](_0x1fea36(0x99)+_0x3e306f),_0x38822d&&console[_0x1fea36(0x71)](_0x1fea36(0x86)+_0x38822d));const _0x226ef6=await withProgressSpinner(_0x1fea36(0x96)+_0x3e306f+_0x1fea36(0x91),_0x596ca6=>_0x267003[_0x1fea36(0x94)][_0x1fea36(0x9a)](_0x3e306f,{'targetDir':_0x2f65cf,'targetResourceName':_0x38822d,'verbose':_0x375a21['verbose'],'progress':{'update':_0x43bf56=>{const _0xf4058c=_0x1fea36;_0x596ca6[_0xf4058c(0xa8)](_0x43bf56),_0x375a21[_0xf4058c(0xb8)]&&console[_0xf4058c(0x71)]('\x20\x20'+_0x43bf56);}}}),{'verbose':_0x375a21['verbose']}),_0x163bdb=_0x226ef6['data'];if(_0x163bdb[_0x1fea36(0xb6)][_0x1fea36(0x95)]===0x0&&_0x163bdb[_0x1fea36(0xb6)][_0x1fea36(0x9c)]===0x0)return console['error'](a34_0x2b0163[_0x1fea36(0x8f)]('No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27'+_0x163bdb[_0x1fea36(0xa5)]+'\x27')),0x0;const _0x51dc0f=_0x163bdb[_0x1fea36(0x78)][_0x1fea36(0xa3)](_0x7cc159=>_0x7cc159[_0x1fea36(0x80)]),_0x89792c=_0x163bdb['files'][_0x1fea36(0xa3)](_0x284168=>!_0x284168['isNew']&&_0x284168[_0x1fea36(0x7e)]),_0x120579=_0x163bdb[_0x1fea36(0x78)][_0x1fea36(0xa3)](_0x5d8a4c=>!_0x5d8a4c[_0x1fea36(0x80)]&&!_0x5d8a4c[_0x1fea36(0x7e)]);console[_0x1fea36(0x71)](_0x1fea36(0x9d)+_0x163bdb['parentName']+'\x27:'),console[_0x1fea36(0x71)](_0x1fea36(0xa9)+a34_0x2b0163[_0x1fea36(0x6e)](_0x163bdb['counts'][_0x1fea36(0x95)]+_0x1fea36(0x90))+_0x1fea36(0x79)+a34_0x2b0163[_0x1fea36(0x6e)](_0x163bdb[_0x1fea36(0xb6)][_0x1fea36(0x9f)]+_0x1fea36(0x7d)));if(_0x163bdb[_0x1fea36(0xb6)][_0x1fea36(0x9c)]>0x0){const _0x330008=_0x163bdb[_0x1fea36(0xb6)][_0x1fea36(0x84)]>_0x163bdb[_0x1fea36(0xb6)]['journeys']?'\x20('+_0x163bdb[_0x1fea36(0xb6)]['journeyVersions']+'\x20versions)':'';console[_0x1fea36(0x71)](_0x1fea36(0x6d)+a34_0x2b0163['cyan'](_0x163bdb['counts'][_0x1fea36(0x9c)]+_0x1fea36(0x9e))+a34_0x2b0163[_0x1fea36(0xa1)](_0x330008));}console[_0x1fea36(0x71)]('\x20\x20'+a34_0x2b0163['green']('+\x20'+_0x51dc0f[_0x1fea36(0x74)]+_0x1fea36(0x92))),console[_0x1fea36(0x71)]('\x20\x20'+a34_0x2b0163['yellow']('~\x20'+_0x89792c[_0x1fea36(0x74)]+_0x1fea36(0x8d))),console[_0x1fea36(0x71)]('\x20\x20'+a34_0x2b0163['dim']('=\x20'+_0x120579[_0x1fea36(0x74)]+_0x1fea36(0xb5))),console[_0x1fea36(0x71)](_0x1fea36(0x73)+a34_0x2b0163[_0x1fea36(0x6e)](_0x163bdb[_0x1fea36(0x68)])+'\x0a');if(_0x89792c[_0x1fea36(0x74)]>0x0)for(const _0x338085 of _0x89792c){console[_0x1fea36(0x71)](_0x1fea36(0x7b)+_0x338085[_0x1fea36(0x72)]+'\x27:'),console[_0x1fea36(0x71)]('β'[_0x1fea36(0xab)](0x3c)),console[_0x1fea36(0x71)](_0x338085[_0x1fea36(0x81)]),console['error']('β'[_0x1fea36(0xab)](0x3c));}if(_0x375a21[_0x1fea36(0x75)])return console['error'](a34_0x2b0163[_0x1fea36(0x8f)](_0x1fea36(0x70))),0x0;if(_0x51dc0f['length']===0x0&&_0x89792c[_0x1fea36(0x74)]===0x0)return console[_0x1fea36(0x71)](a34_0x2b0163['green']('β\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'parent_segment':_0x163bdb['parentName']},_0x375a21[_0x1fea36(0xad)]),console['error'](a34_0x2b0163[_0x1fea36(0x67)]('β\x20Context\x20set:\x20'+a34_0x2b0163['dim'](_0x1fea36(0x97))+_0x1fea36(0x9b)+a34_0x2b0163[_0x1fea36(0x6e)](_0x163bdb[_0x1fea36(0xa5)]))),0x0;if(!_0x375a21['yes']){if(!isInteractive())return console[_0x1fea36(0x71)](a34_0x2b0163['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1fea36(0x71)](a34_0x2b0163[_0x1fea36(0xa1)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x228a15=await confirmKey(_0x1fea36(0x6b)+(_0x51dc0f[_0x1fea36(0x74)]+_0x89792c[_0x1fea36(0x74)])+'\x20files?');if(!_0x228a15)return console[_0x1fea36(0x71)](a34_0x2b0163[_0x1fea36(0x8f)](_0x1fea36(0x8b)),_0x1fea36(0x85)),0x1;}for(const _0x193bf9 of _0x163bdb['files']){if(_0x193bf9[_0x1fea36(0x80)]||_0x193bf9[_0x1fea36(0x7e)]){const _0x41d9d6=a34_0x3eda8a[_0x1fea36(0xa0)](_0x193bf9['absolutePath']);!existsSync(_0x41d9d6)&&mkdirSync(_0x41d9d6,{'recursive':!![]}),writeFileSync(_0x193bf9[_0x1fea36(0x89)],_0x193bf9[_0x1fea36(0xb1)],_0x1fea36(0x76));}}return console[_0x1fea36(0x71)](a34_0x2b0163[_0x1fea36(0x67)](_0x1fea36(0x82)+(_0x51dc0f[_0x1fea36(0x74)]+_0x89792c[_0x1fea36(0x74)])+'\x20files\x20to\x20'+_0x163bdb['targetDir'])),saveSessionContext({'parent_segment':_0x163bdb[_0x1fea36(0xa5)]},_0x375a21['session']),console[_0x1fea36(0x71)](a34_0x2b0163[_0x1fea36(0x67)](_0x1fea36(0xb4)+a34_0x2b0163[_0x1fea36(0xa1)](_0x1fea36(0x97))+_0x1fea36(0x9b)+a34_0x2b0163[_0x1fea36(0x6e)](_0x163bdb['parentName']))),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x16cda1=a35_0x4462;(function(_0x4f87ff,_0x285cc6){const _0x4d4e6a=a35_0x4462,_0x16662c=_0x4f87ff();while(!![]){try{const _0x3703d6=-parseInt(_0x4d4e6a(0x247))/0x1+parseInt(_0x4d4e6a(0x229))/0x2+parseInt(_0x4d4e6a(0x20b))/0x3+-parseInt(_0x4d4e6a(0x245))/0x4*(-parseInt(_0x4d4e6a(0x1f6))/0x5)+parseInt(_0x4d4e6a(0x1f0))/0x6+parseInt(_0x4d4e6a(0x24f))/0x7+-parseInt(_0x4d4e6a(0x262))/0x8;if(_0x3703d6===_0x285cc6)break;else _0x16662c['push'](_0x16662c['shift']());}catch(_0x203a29){_0x16662c['push'](_0x16662c['shift']());}}}(a35_0x12bd,0xc0054));function a35_0x12bd(){const _0x16385d=['nameToId','parentFolder','New\x20journey:','392439GVzzrT','\x20\x20πΊοΈ\x20\x20Journeys:','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','versionNumber','segment\x20or\x20journey','listFolders','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','type','delete','dryRun','changed','\x20activations]','\x20YAML\x20files\x20found','parent_name','helpText','unchanged','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','deleted','\x0aError:','message','listSegments','\x27...','user','createdAt','\x0aβ\x20Push\x20complete','toString','then','Error\x20parsing\x20YAML:\x20','audienceId','no_parent','1699338kenkak','description','\x20to\x20create','/sb/da/esr','Folders\x20to\x20create:','results','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','journeys','journeyBundleId','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','\x20new','isScoped','execute','Delete\x20segment:','\x20to\x20delete','buildUserMaps','add','push','journeyId','segment:push','Usage:\x20tdx\x20sg\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20(requires\x20context)','(Journey\x20will\x20be\x20deleted)','\x20to\x20update','Fetching\x20existing\x20activations...','Fetching\x20existing\x20data...','data','Fetching\x20connections\x20for\x20name\x20resolution...','Error:\x20Directory\x20not\x20found:\x20','11708jJyXYo','map','526607bNQcOv','yamlConfig','segment','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','join','activations','.yml','setPhase','9448327SgARIh','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','errorCode','attributes','journeyBundleName','β\x20All\x20journeys\x20are\x20up\x20to\x20date','length','\x20updated','Push\x20','parentName','green','scopedFolderPath','folderPath','\x20\x20Activations:','/app/ps/','updated','filter','listActivations','Error:\x20','19484352XtxZxS','created','site','\x20created','cyan','\x20\x20Activations:\x20','\x20deleted','toDelete','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','\x20\x20\x20\x20','β\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','journey','getParent','Changes\x20to:','error','toUpdate','segmentFolderId','.yaml','idToName','file','Site:\x20','get','yellow','New\x20segment:','targetDir','listJourneysWithDetailsFromParentSegment','all','state','existingSegment','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','\x0aValidation\x20failed:','\x20\x20π\x20Segments:','diff','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','name','Resolving\x20parent\x20segment\x20\x27','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','/e/','updatedAt','existingJourney','red','/j/da/je','3435126emiNrB','\x20changes?','getJourney','\x0aPush\x20summary\x20for\x20\x27','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','blue','1445hGxYGk','\x20unchanged','connection','createdSegmentIds','journeysOnly','verbose','No\x20','segments','dim','isNew','getOutputSchemaWithCache','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','\x20\x20Journeys:\x20','repeat','new','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','\x20changed','Preparing\x20journeys...'];a35_0x12bd=function(){return _0x16385d;};return a35_0x12bd();}import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a35_0x5d6580 from'chalk';import{existsSync}from'fs';function a35_0x4462(_0x3ba3fd,_0x20d75d){_0x3ba3fd=_0x3ba3fd-0x1e5;const _0x12bdf3=a35_0x12bd();let _0x4462ef=_0x12bdf3[_0x3ba3fd];return _0x4462ef;}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{[a35_0x16cda1(0x1e8)]=a35_0x16cda1(0x23c);[a35_0x16cda1(0x22a)]=a35_0x16cda1(0x211);async[a35_0x16cda1(0x235)](_0x12f78b){const _0x51963d=a35_0x16cda1,{options:_0x4fa69f,args:_0x29f460,tdx:_0x501d76}=_0x12f78b,_0x586acc=_0x4fa69f,_0x3af288=await resolveTarget({'arg':_0x29f460[0x0],'contextParent':_0x4fa69f['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x3af288))return _0x3af288[_0x51963d(0x251)]===_0x51963d(0x228)?(console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x21b))),console[_0x51963d(0x270)](_0x51963d(0x23d)),console[_0x51963d(0x270)](_0x51963d(0x201)),console[_0x51963d(0x270)](_0x51963d(0x250))):(console['error'](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x261)+_0x3af288[_0x51963d(0x21e)]+'\x0a')),_0x3af288[_0x51963d(0x219)]&&console[_0x51963d(0x270)](a35_0x5d6580['cyan'](_0x3af288[_0x51963d(0x219)]))),0x1;if(_0x3af288['type']===_0x51963d(0x218))return console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)]('Error:\x20Directory\x20not\x20found:\x20'+_0x3af288[_0x51963d(0x27a)]+'\x0a')),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x266)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;const _0x39fbde=_0x3af288[_0x51963d(0x258)],_0x108f0f=_0x3af288[_0x51963d(0x27a)],_0x304180=_0x3af288[_0x51963d(0x212)]===_0x51963d(0x275)?_0x3af288['filePath']:undefined,_0xad1551=getScopedDetails(_0x3af288),_0x2cd0ae=_0xad1551?.[_0x51963d(0x234)]??![],_0x44cd79=_0xad1551?.[_0x51963d(0x25a)]??'';if(!existsSync(_0x108f0f))return console[_0x51963d(0x270)](a35_0x5d6580['red'](_0x51963d(0x244)+_0x108f0f+'\x0a')),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x266)](_0x51963d(0x26a))),0x1;_0x586acc[_0x51963d(0x1fb)]&&(console['error'](_0x51963d(0x276)+_0x586acc['site']),console[_0x51963d(0x270)]('Parent\x20segment:\x20'+_0x39fbde),console[_0x51963d(0x270)]('Source\x20directory:\x20'+_0x108f0f),_0x2cd0ae&&console[_0x51963d(0x270)]('Scoped\x20to\x20folder:\x20'+_0x44cd79));const _0x886ba6=await withSpinner(_0x51963d(0x1e9)+_0x39fbde+_0x51963d(0x220),()=>_0x501d76[_0x51963d(0x249)]['resolveParentId'](_0x39fbde),{'verbose':_0x586acc[_0x51963d(0x1fb)]}),_0x169f03=_0x886ba6['data'],{parentSegmentResult:_0x43f834,segmentsResult:_0x252a4f,foldersResult:_0x3ea2dd,journeysWithDetailsResult:_0x16d791,userMaps:_0x2849fa}=await withSpinner(_0x51963d(0x241),async()=>{const _0x16c675=_0x51963d,[_0x448f00,_0x1d17fa,_0x473786,_0x122990,_0x562a8e]=await Promise[_0x16c675(0x27c)]([_0x501d76['segment'][_0x16c675(0x26e)](_0x169f03),_0x501d76['segment'][_0x16c675(0x21f)](_0x169f03),_0x501d76[_0x16c675(0x249)][_0x16c675(0x210)](_0x169f03),_0x501d76[_0x16c675(0x26d)][_0x16c675(0x27b)](_0x169f03,{'includeAllVersions':!![]}),_0x501d76[_0x16c675(0x221)][_0x16c675(0x238)]()]);return{'parentSegmentResult':_0x448f00,'segmentsResult':_0x1d17fa,'foldersResult':_0x473786,'journeysWithDetailsResult':_0x122990,'userMaps':_0x562a8e};},{'verbose':_0x586acc[_0x51963d(0x1fb)]})['then'](_0x2250d=>_0x2250d[_0x51963d(0x242)]),_0x527d14=_0x43f834,_0x2e277c=extractRootFolderId(_0x527d14),_0x4ff995=_0x252a4f,_0xcca10c=_0x3ea2dd,{journeys:_0x1e1a35,activationStepsById:_0x28a4dd}=_0x16d791,_0x57fccc=new Map(_0x1e1a35[_0x51963d(0x246)](_0x25fe95=>[_0x25fe95['id'],_0x25fe95])),_0x4b5746=_0x1e1a35[_0x51963d(0x246)](_0x3356b1=>({'id':_0x3356b1['id'],'name':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x1e8)],'journeyBundleName':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x253)]||'','journeyBundleId':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x231)]||'','versionNumber':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x20e)],'description':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x22a)],'state':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x27d)],'paused':_0x3356b1[_0x51963d(0x252)]['paused'],'audienceId':_0x3356b1['attributes'][_0x51963d(0x227)],'folderId':_0x3356b1['relationships']?.[_0x51963d(0x209)]?.[_0x51963d(0x242)]?.['id'],'createdAt':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x222)],'updatedAt':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x1ec)]})),{emailToId:_0x54815f,idToEmail:_0x264422}=_0x2849fa,_0x3365c2=await withSpinner(_0x51963d(0x243),async()=>{const _0x4209ab=_0x51963d,_0x5eca4b=await _0x501d76[_0x4209ab(0x1f8)]['list']();return buildConnectionMaps(_0x5eca4b);},{'verbose':_0x586acc[_0x51963d(0x1fb)]})[_0x51963d(0x225)](_0x34016e=>_0x34016e['data']),_0x22e886=_0x3365c2[_0x51963d(0x208)],_0x154c86=_0x3365c2[_0x51963d(0x274)],_0xea5794=_0x3365c2['nameToType'],_0x3e2586={'emailToIdMap':_0x54815f,'connectionNameToIdMap':_0x22e886,'connectionNameToTypeMap':_0xea5794,'getSchema':_0x24717a=>_0x501d76['connection'][_0x51963d(0x200)](_0x24717a)};let {pathToId:_0x44335d,idToPath:_0x2cec11}=buildFolderMaps(_0xcca10c);const _0x4c1719=buildSegmentLookupMap(_0x4ff995,_0x2cec11),_0x38df0e=buildSegmentNameToIdMap(_0x4ff995),_0x3aac25=buildJourneyBundleLookupMap(_0x4b5746,_0x2cec11);let _0x5ae501;if(_0x304180){if(!_0x304180['endsWith'](_0x51963d(0x24d))&&!_0x304180['endsWith'](_0x51963d(0x273)))return console[_0x51963d(0x270)](a35_0x5d6580['red'](_0x51963d(0x1e7)+_0x304180+'\x0a')),0x1;_0x5ae501=[_0x304180];}else _0x5ae501=findYamlFiles(_0x108f0f);if(_0x5ae501['length']===0x0)return console[_0x51963d(0x270)](a35_0x5d6580['red'](_0x51963d(0x22f)+_0x108f0f+'\x0a')),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x266)](_0x51963d(0x27f))),0x1;let _0x3a3196,_0x415cab;try{const _0x1b5b98=parseAndClassifyYamlFiles(_0x5ae501,_0x108f0f,{'skipSegments':_0x586acc[_0x51963d(0x1fa)]});_0x3a3196=_0x1b5b98[_0x51963d(0x1fd)],_0x415cab=_0x1b5b98['journeys'];const _0x24dea0=validateParsedFiles(_0x1b5b98,_0x108f0f);if(_0x24dea0[_0x51963d(0x255)]>0x0)return console['error'](a35_0x5d6580['red'](_0x51963d(0x280))),console[_0x51963d(0x270)](formatValidationErrors(_0x24dea0)),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x20d))),0x1;}catch(_0x4e93a4){return console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x226)+(_0x4e93a4 instanceof Error?_0x4e93a4[_0x51963d(0x21e)]:_0x4e93a4))),0x1;}if(_0x3a3196[_0x51963d(0x255)]===0x0&&_0x415cab[_0x51963d(0x255)]===0x0){const _0x30abbd=_0x586acc[_0x51963d(0x1fa)]?'journey':_0x51963d(0x20f);return console['error'](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x1fc)+_0x30abbd+_0x51963d(0x217))),0x0;}const _0x24cc19=new Map();_0x4ff995[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&await withSpinner(_0x51963d(0x240),async()=>{await batchAsync(_0x4ff995,async _0x23abef=>{const _0x2d9b80=a35_0x4462,_0x3ecff6=await _0x501d76[_0x2d9b80(0x249)][_0x2d9b80(0x260)](_0x169f03,_0x23abef['id']);_0x24cc19['set'](_0x23abef['id'],_0x3ecff6);});},{'verbose':_0x586acc[_0x51963d(0x1fb)]});const {segmentFiles:_0x5ba468,foldersToCreate:_0x34cf54}=await prepareSegmentFiles(_0x3a3196,{'segmentByFolderAndName':_0x4c1719,'activationsBySegmentId':_0x24cc19,'folderPathToId':_0x44335d,'idToEmailMap':_0x264422,'connectionIdToNameMap':_0x154c86},_0x3e2586,_0x2cd0ae,_0x44cd79),_0x257e9b=_0x304180?[]:findSegmentsToDelete(_0x4ff995,_0x3a3196['map'](({yamlConfig:_0x553808,folderPath:_0x7e84b7})=>({'yamlConfig':_0x553808,'folderPath':resolveTDFolderPath(_0x7e84b7,_0x2cd0ae,_0x44cd79)})),_0x2cec11,_0x44cd79,_0x2cd0ae),{journeyFiles:_0x403169,foldersToCreate:_0x5f1bf3}=await withProgressSpinner(_0x51963d(0x207),async _0x41f327=>prepareJourneyFiles(_0x415cab,{'fetchJourney':async _0x50ec5c=>_0x501d76[_0x51963d(0x26d)][_0x51963d(0x1f2)](_0x50ec5c[_0x51963d(0x23b)]),'journeyBundlesByFolderAndName':_0x3aac25,'folderPathToId':_0x44335d,'idToEmailMap':_0x264422,'connectionIdToNameMap':_0x154c86,'existingSegments':_0x4ff995,'parentId':_0x169f03,'deps':_0x501d76,'progress':{'update':_0x281a87=>{const _0x3fa507=_0x51963d;_0x41f327[_0x3fa507(0x24e)](_0x281a87),_0x586acc[_0x3fa507(0x1fb)]&&console[_0x3fa507(0x270)]('\x20\x20'+_0x281a87);}},'journeyById':_0x57fccc,'activationStepsById':_0x28a4dd},_0x2cd0ae,_0x44cd79),{'verbose':_0x586acc[_0x51963d(0x1fb)]})[_0x51963d(0x225)](_0x57d389=>_0x57d389[_0x51963d(0x242)]);for(const _0x3bc117 of _0x5f1bf3){_0x34cf54[_0x51963d(0x239)](_0x3bc117);}const _0x19c8ef=_0x304180?[]:findJourneysToDelete(_0x4b5746,_0x415cab[_0x51963d(0x246)](({yamlConfig:_0x1ae5d7,folderPath:_0x5d9152})=>({'yamlConfig':_0x1ae5d7,'folderPath':resolveTDFolderPath(_0x5d9152,_0x2cd0ae,_0x44cd79)})),_0x2cec11,_0x44cd79,_0x2cd0ae),_0x1f73bf=calculatePushStats(_0x5ba468,_0x403169,_0x34cf54,_0x257e9b,_0x19c8ef,!!_0x586acc[_0x51963d(0x213)],!!_0x586acc[_0x51963d(0x1fa)]),_0x4a033e=_0x1f73bf[_0x51963d(0x1fd)][_0x51963d(0x204)],_0x5c788a=_0x1f73bf['segments'][_0x51963d(0x215)],_0x5247f8=_0x1f73bf[_0x51963d(0x1fd)][_0x51963d(0x21a)],_0x4d80ad=_0x1f73bf[_0x51963d(0x1fd)][_0x51963d(0x269)],_0x5d3275=_0x1f73bf['folders']['toCreate'],_0x26207a=_0x1f73bf[_0x51963d(0x230)]['new'],_0x57c657=_0x1f73bf['journeys'][_0x51963d(0x215)],_0x312aac=_0x1f73bf[_0x51963d(0x230)][_0x51963d(0x21a)],_0xb3cce4=_0x1f73bf[_0x51963d(0x230)]['toDelete'],_0x390c32=_0x1f73bf[_0x51963d(0x24c)][_0x51963d(0x27c)],_0x1193ca=_0x1f73bf[_0x51963d(0x24c)]['toCreate'],_0x237bcc=_0x1f73bf[_0x51963d(0x24c)][_0x51963d(0x271)],_0x4eabe1=_0x1f73bf['activations']['toDelete'];console['error'](_0x51963d(0x1f3)+_0x39fbde+'\x27:');_0x5d3275[_0x51963d(0x255)]>0x0&&console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x1f5)]('π\x20'+_0x5d3275[_0x51963d(0x255)]+'\x20folders\x20to\x20create'));if(!_0x586acc[_0x51963d(0x1fa)]){console[_0x51963d(0x270)](_0x51963d(0x1e5)),console['error']('\x20\x20\x20\x20'+a35_0x5d6580['green']('+\x20'+_0x4a033e[_0x51963d(0x255)]+_0x51963d(0x233))),console['error']('\x20\x20\x20\x20'+a35_0x5d6580[_0x51963d(0x278)]('~\x20'+_0x5c788a[_0x51963d(0x255)]+'\x20changed'));if(_0x4d80ad[_0x51963d(0x255)]>0x0)console['error'](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x1ee)]('-\x20'+_0x4d80ad[_0x51963d(0x255)]+_0x51963d(0x237)));else _0x257e9b[_0x51963d(0x255)]>0x0&&!_0x586acc['delete']&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['dim'](_0x257e9b[_0x51963d(0x255)]+_0x51963d(0x232)));console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x1fe)]('=\x20'+_0x5247f8[_0x51963d(0x255)]+_0x51963d(0x1f7)));}if(_0x403169[_0x51963d(0x255)]>0x0||_0x19c8ef[_0x51963d(0x255)]>0x0){console['error'](_0x51963d(0x20c)),console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['green']('+\x20'+_0x26207a['length']+_0x51963d(0x233))),console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x278)]('~\x20'+_0x57c657['length']+_0x51963d(0x206)));if(_0xb3cce4[_0x51963d(0x255)]>0x0)console['error'](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x1ee)]('-\x20'+_0xb3cce4[_0x51963d(0x255)]+_0x51963d(0x237)));else _0x19c8ef['length']>0x0&&!_0x586acc[_0x51963d(0x213)]&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['dim'](_0x19c8ef[_0x51963d(0x255)]+_0x51963d(0x232)));console['error']('\x20\x20\x20\x20'+a35_0x5d6580['dim']('=\x20'+_0x312aac[_0x51963d(0x255)]+_0x51963d(0x1f7)));}_0x390c32['length']>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&(console['error'](''),console['error'](_0x51963d(0x25c)),_0x1193ca[_0x51963d(0x255)]>0x0&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x259)]('+\x20'+_0x1193ca[_0x51963d(0x255)]+_0x51963d(0x22b))),_0x237bcc[_0x51963d(0x255)]>0x0&&console['error']('\x20\x20\x20\x20'+a35_0x5d6580[_0x51963d(0x278)]('~\x20'+_0x237bcc['length']+_0x51963d(0x23f))),_0x4eabe1[_0x51963d(0x255)]>0x0&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['red']('-\x20'+_0x4eabe1[_0x51963d(0x255)]+_0x51963d(0x237))));console[_0x51963d(0x270)]('\x20\x20Source:\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x108f0f)+'\x0a');if(_0x5d3275['length']>0x0){console[_0x51963d(0x270)](_0x51963d(0x22d));for(const _0x5bd3e1 of _0x5d3275){console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x1f5)]('+')+'\x20'+_0x5bd3e1);}console[_0x51963d(0x270)]('');}if(_0x4a033e[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)])for(const _0x8b9f86 of _0x4a033e){const _0x3e070f=_0x8b9f86[_0x51963d(0x25b)]?_0x8b9f86[_0x51963d(0x25b)]+'/'+_0x8b9f86[_0x51963d(0x248)][_0x51963d(0x1e8)]:_0x8b9f86['yamlConfig']['name'],_0x416f42=_0x8b9f86[_0x51963d(0x248)][_0x51963d(0x24c)]?.[_0x51963d(0x255)]||0x0,_0x993e6a=_0x416f42>0x0?a35_0x5d6580[_0x51963d(0x1fe)]('\x20['+_0x416f42+_0x51963d(0x216)):'';console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x259)](_0x51963d(0x279))+'\x20'+_0x3e070f+_0x993e6a),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c)),_0x8b9f86['diff']&&console[_0x51963d(0x270)](_0x8b9f86[_0x51963d(0x1e6)]),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c));}if(_0x4d80ad[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)])for(const _0xa4834a of _0x4d80ad){const _0x58f6c7=_0xa4834a[_0x51963d(0x272)]?_0x2cec11[_0x51963d(0x277)](_0xa4834a[_0x51963d(0x272)][_0x51963d(0x224)]())||'':'',_0x1f6a09=_0x58f6c7?_0x58f6c7+'/'+_0xa4834a[_0x51963d(0x1e8)]:_0xa4834a[_0x51963d(0x1e8)],_0x470b18=_0x24cc19['get'](_0xa4834a['id'])||[],_0xdecee5=_0x470b18[_0x51963d(0x255)]>0x0?a35_0x5d6580[_0x51963d(0x1fe)]('\x20['+_0x470b18[_0x51963d(0x255)]+_0x51963d(0x216)):'';console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x236))+'\x20'+_0x1f6a09+_0xdecee5),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c));const _0x37fc8e=segmentWithActivationsToYaml(_0xa4834a,_0x470b18,undefined,_0x264422,_0x154c86),_0x5b1d17=segmentToYamlString(_0x37fc8e),_0xebeee4=generateDiff(_0x5b1d17,'');console[_0x51963d(0x270)](formatDiffWithColors(_0xebeee4)),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c));}const _0x5b28fc=_0x5ba468[_0x51963d(0x25f)](_0x3ad646=>!_0x3ad646[_0x51963d(0x1ff)]&&_0x3ad646[_0x51963d(0x1e6)]);if(_0x5b28fc[_0x51963d(0x255)]>0x0&&!_0x586acc['journeysOnly'])for(const _0x51b9cb of _0x5b28fc){const _0x11bf89=_0x51b9cb[_0x51963d(0x25b)]?_0x51b9cb[_0x51963d(0x25b)]+'/'+_0x51b9cb[_0x51963d(0x248)][_0x51963d(0x1e8)]:_0x51b9cb['yamlConfig'][_0x51963d(0x1e8)];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580['yellow'](_0x51963d(0x26f))+'\x20'+_0x11bf89),console[_0x51963d(0x270)]('β'['repeat'](0x3c)),console[_0x51963d(0x270)](_0x51b9cb[_0x51963d(0x1e6)]),console[_0x51963d(0x270)]('β'['repeat'](0x3c));}if(_0x26207a[_0x51963d(0x255)]>0x0)for(const _0x4367f0 of _0x26207a){const _0x1fc72f=_0x4367f0[_0x51963d(0x25b)]?_0x4367f0[_0x51963d(0x25b)]+'/'+_0x4367f0[_0x51963d(0x248)][_0x51963d(0x1e8)]:_0x4367f0['yamlConfig'][_0x51963d(0x1e8)];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x259)](_0x51963d(0x20a))+'\x20'+_0x1fc72f),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c)),_0x4367f0[_0x51963d(0x1e6)]&&console['error'](_0x4367f0['diff']),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c));}const _0x4d8a08=_0x403169[_0x51963d(0x25f)](_0x2c8bae=>!_0x2c8bae[_0x51963d(0x1ff)]&&_0x2c8bae[_0x51963d(0x1e6)]);if(_0x4d8a08[_0x51963d(0x255)]>0x0)for(const _0x4a81f0 of _0x4d8a08){const _0x2bb45c=_0x4a81f0[_0x51963d(0x25b)]?_0x4a81f0[_0x51963d(0x25b)]+'/'+_0x4a81f0['yamlConfig']['name']:_0x4a81f0[_0x51963d(0x248)][_0x51963d(0x1e8)];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x278)]('Changes\x20to\x20journey:')+'\x20'+_0x2bb45c),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c)),console['error'](_0x4a81f0['diff']),console[_0x51963d(0x270)]('β'['repeat'](0x3c));}if(_0xb3cce4[_0x51963d(0x255)]>0x0)for(const _0x5aafd2 of _0xb3cce4){const _0x59c78e=_0x5aafd2['folderId']?_0x2cec11[_0x51963d(0x277)](_0x5aafd2['folderId'])||'':'',_0x1177d0=_0x59c78e?_0x59c78e+'/'+_0x5aafd2[_0x51963d(0x253)]:_0x5aafd2['journeyBundleName'];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x1ee)]('Delete\x20journey:')+'\x20'+_0x1177d0),console[_0x51963d(0x270)]('β'['repeat'](0x3c)),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x23e))),console[_0x51963d(0x270)]('β'[_0x51963d(0x203)](0x3c));}if(_0x586acc[_0x51963d(0x214)])return console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x1ea))),0x0;const _0xe3b2a7=_0x586acc[_0x51963d(0x1fa)]?![]:_0x4a033e[_0x51963d(0x255)]>0x0||_0x5c788a[_0x51963d(0x255)]>0x0||_0x4d80ad[_0x51963d(0x255)]>0x0,_0x2eaa2e=_0x26207a[_0x51963d(0x255)]>0x0||_0x57c657['length']>0x0||_0xb3cce4[_0x51963d(0x255)]>0x0,_0x38f65c=_0x586acc['journeysOnly']?![]:_0x390c32[_0x51963d(0x255)]>0x0,_0x396530=_0x5d3275['length']>0x0;if(!_0xe3b2a7&&!_0x2eaa2e&&!_0x38f65c&&!_0x396530){const _0x33e1b9=_0x586acc[_0x51963d(0x1fa)]?_0x51963d(0x254):_0x51963d(0x26c);console[_0x51963d(0x270)](a35_0x5d6580['green'](_0x33e1b9));if(_0x304180&&_0x5247f8[_0x51963d(0x255)]===0x1){const _0x5200a1=_0x5247f8[0x0];if(_0x5200a1[_0x51963d(0x27e)]?.['id']){const _0x23c90d=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+'/e/'+_0x5200a1['existingSegment']['id']+_0x51963d(0x22c));console[_0x51963d(0x270)]('\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x23c90d));}}if(_0x304180&&_0x312aac['length']===0x1){const _0x58c314=_0x312aac[0x0];if(_0x58c314['existingJourney']?.['id']){const _0x4077ef=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+_0x51963d(0x1eb)+_0x58c314[_0x51963d(0x1ed)]['id']+'/j/da/je');console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x4077ef));}}return 0x0;}const _0x1afbdd=_0x586acc[_0x51963d(0x1fa)]?_0x26207a[_0x51963d(0x255)]+_0x57c657[_0x51963d(0x255)]+_0xb3cce4[_0x51963d(0x255)]+_0x5d3275[_0x51963d(0x255)]:_0x4a033e['length']+_0x5c788a['length']+_0x4d80ad[_0x51963d(0x255)]+_0x26207a[_0x51963d(0x255)]+_0x57c657['length']+_0xb3cce4[_0x51963d(0x255)]+_0x5d3275['length']+_0x390c32['length'];if(!_0x586acc['yes']&&_0x1afbdd>0x0){if(!isInteractive())return console['error'](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x21d)),_0x51963d(0x24a)),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1fe)](_0x51963d(0x1f4))),0x1;const _0x13df07=await confirmKey(_0x51963d(0x257)+_0x1afbdd+_0x51963d(0x1f1));if(!_0x13df07)return console['error'](a35_0x5d6580['yellow']('Aborted.')),0x1;}const _0x323a93={'withProgress':async(_0x5393df,_0x14b741)=>{const _0x3a00ff=_0x51963d,_0x1b16c7=await withSpinner(_0x5393df,_0x14b741,{'verbose':_0x586acc['verbose']});return{'data':_0x1b16c7[_0x3a00ff(0x242)]};},'logInfo':_0x24df40=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1f5)]('β\x20'+_0x24df40)),'logSuccess':_0x483d8f=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x259)]('β\x20'+_0x483d8f)),'logWarning':_0x40171b=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)]('β \x20'+_0x40171b)),'logDeleted':_0x42b325=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)]('β\x20'+_0x42b325))},_0x48070c={'segment':_0x501d76[_0x51963d(0x249)],'journey':_0x501d76[_0x51963d(0x26d)],'user':_0x501d76[_0x51963d(0x221)],'connection':_0x501d76[_0x51963d(0x1f8)]};_0x5d3275[_0x51963d(0x255)]>0x0&&(_0x44335d=await executePushFolders(_0x48070c,_0x5d3275,_0x44335d,{'parentId':_0x169f03},_0x323a93));const _0x2c597a={'rootFolderId':_0x2e277c,'folderPathToId':_0x44335d,'folderIdToPath':_0x2cec11,'segmentNameToId':_0x38df0e,'activationsBySegmentId':_0x24cc19,'emailToIdMap':_0x54815f,'idToEmailMap':_0x264422,'connectionNameToIdMap':_0x3365c2[_0x51963d(0x208)],'connectionIdToNameMap':_0x3365c2[_0x51963d(0x274)],'connectionNameToTypeMap':_0xea5794},_0x15f0b0=await executePushSegments(_0x48070c,_0x586acc[_0x51963d(0x1fa)]?[]:_0x5ba468,_0x2c597a,{'parentId':_0x169f03},_0x323a93),_0x188155=_0x15f0b0[_0x51963d(0x263)],_0x1571f7=_0x15f0b0[_0x51963d(0x25e)],_0x38a659=_0x15f0b0[_0x51963d(0x24c)][_0x51963d(0x263)],_0x1c20ec=_0x15f0b0[_0x51963d(0x24c)][_0x51963d(0x25e)],_0x3afd67=_0x15f0b0[_0x51963d(0x24c)][_0x51963d(0x21c)];let _0x2d35a3;if(_0x304180&&_0x5ba468['length']===0x1){const _0xcb743e=_0x5ba468[0x0];_0x2d35a3=_0xcb743e[_0x51963d(0x27e)]?.['id']??_0x15f0b0[_0x51963d(0x1f9)][_0x51963d(0x277)](_0xcb743e[_0x51963d(0x248)][_0x51963d(0x1e8)]);}const _0x29c6a2=await executePushSegmentDeletions(_0x48070c,_0x586acc['journeysOnly']?[]:_0x4d80ad,_0x323a93);let _0x3104b1=0x0,_0xeb411d=0x0,_0x51548f=0x0;const _0x36ff5e=new Map(_0x38df0e);for(const [_0x234092,_0x31b29d]of _0x15f0b0[_0x51963d(0x1f9)]){_0x36ff5e['set'](_0x234092,_0x31b29d);}if(_0x403169['length']>0x0){const _0x3af011={..._0x2c597a,'segmentNameToId':_0x36ff5e,'existingSegments':_0x4ff995,'activationContext':_0x3e2586},_0x36a174=await executePushJourneys(_0x48070c,_0x403169,_0x3af011,{'parentId':_0x169f03,'rootFolderId':_0x2e277c,'verbose':_0x586acc['verbose']},_0x323a93);_0x3104b1=_0x36a174[_0x51963d(0x263)],_0xeb411d=_0x36a174['updated'];if(_0x304180&&_0x36a174[_0x51963d(0x22e)][_0x51963d(0x255)]===0x1){const _0x30fc45=_0x36a174[_0x51963d(0x22e)][0x0];if(_0x30fc45[_0x51963d(0x23b)]){const _0x72eabb=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+_0x51963d(0x1eb)+_0x30fc45['journeyId']+_0x51963d(0x1ef));console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x72eabb));}}}for(const _0x2cdcc0 of _0xb3cce4){console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)]('β \x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x2cdcc0[_0x51963d(0x253)])),_0x51548f++;}const _0x46cd1f=[];if(_0x188155>0x0)_0x46cd1f[_0x51963d(0x23a)](_0x188155+_0x51963d(0x265));if(_0x1571f7>0x0)_0x46cd1f[_0x51963d(0x23a)](_0x1571f7+_0x51963d(0x256));if(_0x29c6a2>0x0)_0x46cd1f['push'](_0x29c6a2+_0x51963d(0x268));const _0x41770f=[];if(_0x3104b1>0x0)_0x41770f[_0x51963d(0x23a)](_0x3104b1+_0x51963d(0x265));if(_0xeb411d>0x0)_0x41770f[_0x51963d(0x23a)](_0xeb411d+'\x20updated');if(_0x51548f>0x0)_0x41770f['push'](_0x51548f+_0x51963d(0x268));const _0x67b9d3=[];if(_0x38a659>0x0)_0x67b9d3[_0x51963d(0x23a)](_0x38a659+'\x20created');if(_0x1c20ec>0x0)_0x67b9d3['push'](_0x1c20ec+_0x51963d(0x256));if(_0x3afd67>0x0)_0x67b9d3[_0x51963d(0x23a)](_0x3afd67+_0x51963d(0x268));console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x259)](_0x51963d(0x223)));_0x46cd1f[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&console[_0x51963d(0x270)]('\x20\x20Segments:\x20'+_0x46cd1f[_0x51963d(0x24b)](',\x20'));_0x41770f['length']>0x0&&console['error'](_0x51963d(0x202)+_0x41770f[_0x51963d(0x24b)](',\x20'));_0x67b9d3['length']>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&console[_0x51963d(0x270)](_0x51963d(0x267)+_0x67b9d3['join'](',\x20'));if(_0x2d35a3){const _0x172a3a=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+_0x51963d(0x1eb)+_0x2d35a3+_0x51963d(0x22c));console[_0x51963d(0x270)](_0x51963d(0x205)+a35_0x5d6580[_0x51963d(0x266)](_0x172a3a));}return 0x0;}}
|
|
1
|
+
const a35_0x40a4b7=a35_0x50e2;function a35_0x50e2(_0x380bbf,_0x1b1a95){_0x380bbf=_0x380bbf-0x75;const _0x28fdea=a35_0x28fd();let _0x50e2e1=_0x28fdea[_0x380bbf];return _0x50e2e1;}(function(_0xc9fb2d,_0x153543){const _0x517eb4=a35_0x50e2,_0x2b310e=_0xc9fb2d();while(!![]){try{const _0x5e7eaa=parseInt(_0x517eb4(0xb6))/0x1+parseInt(_0x517eb4(0xcf))/0x2*(parseInt(_0x517eb4(0x75))/0x3)+-parseInt(_0x517eb4(0xe3))/0x4+parseInt(_0x517eb4(0x104))/0x5+-parseInt(_0x517eb4(0xf7))/0x6*(parseInt(_0x517eb4(0xcb))/0x7)+parseInt(_0x517eb4(0xbe))/0x8+-parseInt(_0x517eb4(0xf9))/0x9;if(_0x5e7eaa===_0x153543)break;else _0x2b310e['push'](_0x2b310e['shift']());}catch(_0x839a34){_0x2b310e['push'](_0x2b310e['shift']());}}}(a35_0x28fd,0x38735));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a35_0x9322fb from'chalk';import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{[a35_0x40a4b7(0xde)]=a35_0x40a4b7(0xb5);['description']='Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments';async['execute'](_0x3d8a75){const _0x4b6a53=a35_0x40a4b7,{options:_0x565b27,args:_0x3612f2,tdx:_0x27090d}=_0x3d8a75,_0x47ec94=_0x565b27,_0x4c6922=await resolveTarget({'arg':_0x3612f2[0x0],'contextParent':_0x565b27[_0x4b6a53(0xd6)],'cwd':process[_0x4b6a53(0xeb)]()});if(!isSuccessfulResolution(_0x4c6922))return _0x4c6922[_0x4b6a53(0xf2)]===_0x4b6a53(0xc9)?(console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x8b)](_0x4b6a53(0xca))),console['error'](_0x4b6a53(0x9e)),console[_0x4b6a53(0xbf)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent'),console[_0x4b6a53(0xbf)](_0x4b6a53(0xaa))):(console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)](_0x4b6a53(0xa6)+_0x4c6922[_0x4b6a53(0xab)]+'\x0a')),_0x4c6922[_0x4b6a53(0xae)]&&console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0xe6)](_0x4c6922[_0x4b6a53(0xae)]))),0x1;if(_0x4c6922[_0x4b6a53(0xd8)]===_0x4b6a53(0xd9))return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)]('Error:\x20Directory\x20not\x20found:\x20'+_0x4c6922[_0x4b6a53(0xa1)]+'\x0a')),console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0xe6)](_0x4b6a53(0xfa))),0x1;const _0x5185ba=_0x4c6922[_0x4b6a53(0xe9)],_0x25fb78=_0x4c6922[_0x4b6a53(0xa1)],_0x20991c=_0x4c6922['type']===_0x4b6a53(0xee)?_0x4c6922[_0x4b6a53(0x100)]:undefined,_0xb03f2b=getScopedDetails(_0x4c6922),_0x4e6063=_0xb03f2b?.[_0x4b6a53(0xd5)]??![],_0x3a847d=_0xb03f2b?.[_0x4b6a53(0xf8)]??'';if(!existsSync(_0x25fb78))return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)](_0x4b6a53(0xaf)+_0x25fb78+'\x0a')),console[_0x4b6a53(0xbf)](a35_0x9322fb['cyan'](_0x4b6a53(0xfa))),0x1;_0x47ec94[_0x4b6a53(0x98)]&&(console[_0x4b6a53(0xbf)](_0x4b6a53(0xe2)+_0x47ec94[_0x4b6a53(0x81)]),console[_0x4b6a53(0xbf)](_0x4b6a53(0xb0)+_0x5185ba),console[_0x4b6a53(0xbf)]('Source\x20directory:\x20'+_0x25fb78),_0x4e6063&&console[_0x4b6a53(0xbf)](_0x4b6a53(0xc3)+_0x3a847d));const _0x2a1b7a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5185ba+_0x4b6a53(0x93),()=>_0x27090d[_0x4b6a53(0xc6)][_0x4b6a53(0xac)](_0x5185ba),{'verbose':_0x47ec94['verbose']}),_0xa9efd6=_0x2a1b7a[_0x4b6a53(0x91)],{parentSegmentResult:_0x183aae,segmentsResult:_0x2897e1,foldersResult:_0x155405,journeysWithDetailsResult:_0x3bf855,userMaps:_0x21df76}=await withSpinner(_0x4b6a53(0xf3),async()=>{const _0x4361e0=_0x4b6a53,[_0x2537b1,_0x21f2b8,_0x1d06d8,_0x21f2cf,_0x203161]=await Promise[_0x4361e0(0xbd)]([_0x27090d[_0x4361e0(0xc6)][_0x4361e0(0x96)](_0xa9efd6),_0x27090d[_0x4361e0(0xc6)]['listSegments'](_0xa9efd6),_0x27090d[_0x4361e0(0xc6)][_0x4361e0(0xf0)](_0xa9efd6),_0x27090d[_0x4361e0(0xc7)][_0x4361e0(0xa8)](_0xa9efd6,{'includeAllVersions':!![]}),_0x27090d['user']['buildUserMaps']()]);return{'parentSegmentResult':_0x2537b1,'segmentsResult':_0x21f2b8,'foldersResult':_0x1d06d8,'journeysWithDetailsResult':_0x21f2cf,'userMaps':_0x203161};},{'verbose':_0x47ec94[_0x4b6a53(0x98)]})[_0x4b6a53(0xc8)](_0x11dd87=>_0x11dd87[_0x4b6a53(0x91)]),_0x1a4570=_0x183aae,_0x3eb23b=extractRootFolderId(_0x1a4570),_0x102cd5=_0x2897e1,_0x4c0187=_0x155405,{journeys:_0x1d9c31,activationStepsById:_0x3b2d39}=_0x3bf855,_0x5eff8a=new Map(_0x1d9c31[_0x4b6a53(0xdc)](_0x12b9ed=>[_0x12b9ed['id'],_0x12b9ed])),_0x5018a1=_0x1d9c31['map'](_0x435418=>({'id':_0x435418['id'],'name':_0x435418[_0x4b6a53(0x87)]['name'],'journeyBundleName':_0x435418[_0x4b6a53(0x87)][_0x4b6a53(0x95)]||'','journeyBundleId':_0x435418[_0x4b6a53(0x87)]['journeyBundleId']||'','versionNumber':_0x435418[_0x4b6a53(0x87)]['versionNumber'],'description':_0x435418[_0x4b6a53(0x87)]['description'],'state':_0x435418[_0x4b6a53(0x87)][_0x4b6a53(0x9d)],'paused':_0x435418[_0x4b6a53(0x87)][_0x4b6a53(0xc0)],'audienceId':_0x435418['attributes'][_0x4b6a53(0x79)],'folderId':_0x435418[_0x4b6a53(0xcc)]?.['parentFolder']?.[_0x4b6a53(0x91)]?.['id'],'createdAt':_0x435418[_0x4b6a53(0x87)][_0x4b6a53(0x94)],'updatedAt':_0x435418[_0x4b6a53(0x87)][_0x4b6a53(0xe1)]})),{emailToId:_0x59ea11,idToEmail:_0x3357ef}=_0x21df76,_0x354f56=await withSpinner(_0x4b6a53(0xf5),async()=>{const _0x2f5c40=_0x4b6a53,_0x1c46a6=await _0x27090d[_0x2f5c40(0x9b)][_0x2f5c40(0xdd)]();return buildConnectionMaps(_0x1c46a6);},{'verbose':_0x47ec94[_0x4b6a53(0x98)]})[_0x4b6a53(0xc8)](_0x21d4f2=>_0x21d4f2[_0x4b6a53(0x91)]),_0x47a44d=_0x354f56[_0x4b6a53(0xa3)],_0x351d8d=_0x354f56[_0x4b6a53(0x105)],_0x4289d3=_0x354f56[_0x4b6a53(0xbc)],_0x192463={'emailToIdMap':_0x59ea11,'connectionNameToIdMap':_0x47a44d,'connectionNameToTypeMap':_0x4289d3,'getSchema':_0xa6d587=>_0x27090d[_0x4b6a53(0x9b)]['getOutputSchemaWithCache'](_0xa6d587)};let {pathToId:_0x6cff36,idToPath:_0x3957af}=buildFolderMaps(_0x4c0187);const _0x3cba0c=buildSegmentLookupMap(_0x102cd5,_0x3957af),_0x2380f8=buildSegmentNameToIdMap(_0x102cd5),_0x2446bf=buildJourneyBundleLookupMap(_0x5018a1,_0x3957af);let _0x184634;if(_0x20991c){if(!_0x20991c[_0x4b6a53(0xa9)]('.yml')&&!_0x20991c[_0x4b6a53(0xa9)](_0x4b6a53(0x7d)))return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)](_0x4b6a53(0xfc)+_0x20991c+'\x0a')),0x1;_0x184634=[_0x20991c];}else _0x184634=findYamlFiles(_0x25fb78);if(_0x184634[_0x4b6a53(0x84)]===0x0)return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)](_0x4b6a53(0xdb)+_0x25fb78+'\x0a')),console['error'](a35_0x9322fb['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files')),0x1;let _0x55376c,_0x31c0c4;try{const _0x3c6507=parseAndClassifyYamlFiles(_0x184634,_0x25fb78,{'skipSegments':_0x47ec94[_0x4b6a53(0xec)]});_0x55376c=_0x3c6507[_0x4b6a53(0xa7)],_0x31c0c4=_0x3c6507[_0x4b6a53(0x86)];const _0x1bd9ab=validateParsedFiles(_0x3c6507,_0x25fb78);if(_0x1bd9ab[_0x4b6a53(0x84)]>0x0)return console['error'](a35_0x9322fb[_0x4b6a53(0x77)]('\x0aValidation\x20failed:')),console[_0x4b6a53(0xbf)](formatValidationErrors(_0x1bd9ab)),console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x8b)](_0x4b6a53(0xf4))),0x1;}catch(_0x270a5e){return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)](_0x4b6a53(0xd7)+(_0x270a5e instanceof Error?_0x270a5e['message']:_0x270a5e))),0x1;}if(_0x55376c[_0x4b6a53(0x84)]===0x0&&_0x31c0c4['length']===0x0){const _0x327e2b=_0x47ec94[_0x4b6a53(0xec)]?_0x4b6a53(0xc7):_0x4b6a53(0xb9);return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x8b)](_0x4b6a53(0xa0)+_0x327e2b+_0x4b6a53(0x8a))),0x0;}const _0xe5ae74=new Map();_0x102cd5[_0x4b6a53(0x84)]>0x0&&!_0x47ec94[_0x4b6a53(0xec)]&&await withSpinner(_0x4b6a53(0x80),async()=>{await batchAsync(_0x102cd5,async _0x3a8fec=>{const _0x14c002=a35_0x50e2,_0x501904=await _0x27090d['segment'][_0x14c002(0xe5)](_0xa9efd6,_0x3a8fec['id']);_0xe5ae74['set'](_0x3a8fec['id'],_0x501904);});},{'verbose':_0x47ec94['verbose']});const {segmentFiles:_0x960be4,foldersToCreate:_0x556398}=await prepareSegmentFiles(_0x55376c,{'segmentByFolderAndName':_0x3cba0c,'activationsBySegmentId':_0xe5ae74,'folderPathToId':_0x6cff36,'idToEmailMap':_0x3357ef,'connectionIdToNameMap':_0x351d8d},_0x192463,_0x4e6063,_0x3a847d),_0x3cc7a1=_0x20991c?[]:findSegmentsToDelete(_0x102cd5,_0x55376c['map'](({yamlConfig:_0x121170,folderPath:_0x593496})=>({'yamlConfig':_0x121170,'folderPath':resolveTDFolderPath(_0x593496,_0x4e6063,_0x3a847d)})),_0x3957af,_0x3a847d,_0x4e6063),{journeyFiles:_0x3767db,foldersToCreate:_0x4854c7}=await withProgressSpinner('Preparing\x20journeys...',async _0x3e2236=>prepareJourneyFiles(_0x31c0c4,{'fetchJourney':async _0x529094=>_0x27090d[_0x4b6a53(0xc7)]['getJourney'](_0x529094['journeyId']),'journeyBundlesByFolderAndName':_0x2446bf,'folderPathToId':_0x6cff36,'idToEmailMap':_0x3357ef,'connectionIdToNameMap':_0x351d8d,'existingSegments':_0x102cd5,'parentId':_0xa9efd6,'deps':_0x27090d,'progress':{'update':_0x1b81cc=>{const _0x1097b6=_0x4b6a53;_0x3e2236[_0x1097b6(0x88)](_0x1b81cc),_0x47ec94[_0x1097b6(0x98)]&&console[_0x1097b6(0xbf)]('\x20\x20'+_0x1b81cc);}},'journeyById':_0x5eff8a,'activationStepsById':_0x3b2d39},_0x4e6063,_0x3a847d),{'verbose':_0x47ec94[_0x4b6a53(0x98)]})['then'](_0x574e4c=>_0x574e4c[_0x4b6a53(0x91)]);for(const _0x5eb079 of _0x4854c7){_0x556398[_0x4b6a53(0xe0)](_0x5eb079);}const _0x59aada=_0x20991c?[]:findJourneysToDelete(_0x5018a1,_0x31c0c4['map'](({yamlConfig:_0x1f1b1d,folderPath:_0x3683cc})=>({'yamlConfig':_0x1f1b1d,'folderPath':resolveTDFolderPath(_0x3683cc,_0x4e6063,_0x3a847d)})),_0x3957af,_0x3a847d,_0x4e6063),_0x6493ce=calculatePushStats(_0x960be4,_0x3767db,_0x556398,_0x3cc7a1,_0x59aada,!!_0x47ec94[_0x4b6a53(0xd2)],!!_0x47ec94[_0x4b6a53(0xec)]),_0x2502e9=_0x6493ce[_0x4b6a53(0xa7)]['new'],_0x355cb4=_0x6493ce['segments']['changed'],_0x51e347=_0x6493ce[_0x4b6a53(0xa7)]['unchanged'],_0x4ddc06=_0x6493ce['segments']['toDelete'],_0x382a59=_0x6493ce['folders']['toCreate'],_0x491c08=_0x6493ce[_0x4b6a53(0x86)]['new'],_0x4190b8=_0x6493ce['journeys']['changed'],_0x2a8e16=_0x6493ce[_0x4b6a53(0x86)]['unchanged'],_0x7c2e8e=_0x6493ce[_0x4b6a53(0x86)]['toDelete'],_0x288a94=_0x6493ce[_0x4b6a53(0xed)][_0x4b6a53(0xbd)],_0x4fdacf=_0x6493ce['activations'][_0x4b6a53(0x90)],_0x7b8a38=_0x6493ce[_0x4b6a53(0xed)][_0x4b6a53(0xce)],_0x50309=_0x6493ce['activations']['toDelete'];console[_0x4b6a53(0xbf)](_0x4b6a53(0xa5)+_0x5185ba+'\x27:');_0x382a59[_0x4b6a53(0x84)]>0x0&&console['error']('\x20\x20'+a35_0x9322fb[_0x4b6a53(0xa4)](_0x4b6a53(0xad)+_0x382a59[_0x4b6a53(0x84)]+'\x20folders\x20to\x20create'));if(!_0x47ec94['journeysOnly']){console[_0x4b6a53(0xbf)]('\x20\x20π\x20Segments:'),console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb['green']('+\x20'+_0x2502e9['length']+_0x4b6a53(0xb3))),console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0x8b)]('~\x20'+_0x355cb4[_0x4b6a53(0x84)]+_0x4b6a53(0xf1)));if(_0x4ddc06[_0x4b6a53(0x84)]>0x0)console[_0x4b6a53(0xbf)]('\x20\x20\x20\x20'+a35_0x9322fb[_0x4b6a53(0x77)]('-\x20'+_0x4ddc06[_0x4b6a53(0x84)]+_0x4b6a53(0xea)));else _0x3cc7a1['length']>0x0&&!_0x47ec94[_0x4b6a53(0xd2)]&&console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0xc4)](_0x3cc7a1['length']+'\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)'));console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb['dim']('=\x20'+_0x51e347[_0x4b6a53(0x84)]+'\x20unchanged'));}if(_0x3767db[_0x4b6a53(0x84)]>0x0||_0x59aada[_0x4b6a53(0x84)]>0x0){console[_0x4b6a53(0xbf)]('\x20\x20πΊοΈ\x20\x20Journeys:'),console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0x99)]('+\x20'+_0x491c08[_0x4b6a53(0x84)]+_0x4b6a53(0xb3))),console['error'](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0x8b)]('~\x20'+_0x4190b8[_0x4b6a53(0x84)]+'\x20changed'));if(_0x7c2e8e['length']>0x0)console[_0x4b6a53(0xbf)]('\x20\x20\x20\x20'+a35_0x9322fb['red']('-\x20'+_0x7c2e8e[_0x4b6a53(0x84)]+_0x4b6a53(0xea)));else _0x59aada['length']>0x0&&!_0x47ec94[_0x4b6a53(0xd2)]&&console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb['dim'](_0x59aada[_0x4b6a53(0x84)]+'\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)'));console['error'](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0xc4)]('=\x20'+_0x2a8e16['length']+_0x4b6a53(0x7c)));}_0x288a94[_0x4b6a53(0x84)]>0x0&&!_0x47ec94[_0x4b6a53(0xec)]&&(console[_0x4b6a53(0xbf)](''),console['error'](_0x4b6a53(0x9c)),_0x4fdacf[_0x4b6a53(0x84)]>0x0&&console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0x99)]('+\x20'+_0x4fdacf[_0x4b6a53(0x84)]+_0x4b6a53(0x7a))),_0x7b8a38['length']>0x0&&console[_0x4b6a53(0xbf)](_0x4b6a53(0x82)+a35_0x9322fb[_0x4b6a53(0x8b)]('~\x20'+_0x7b8a38['length']+_0x4b6a53(0xb4))),_0x50309[_0x4b6a53(0x84)]>0x0&&console['error']('\x20\x20\x20\x20'+a35_0x9322fb[_0x4b6a53(0x77)]('-\x20'+_0x50309['length']+_0x4b6a53(0xea))));console[_0x4b6a53(0xbf)](_0x4b6a53(0xb1)+a35_0x9322fb['cyan'](_0x25fb78)+'\x0a');if(_0x382a59['length']>0x0){console[_0x4b6a53(0xbf)](_0x4b6a53(0xba));for(const _0x252cc0 of _0x382a59){console[_0x4b6a53(0xbf)]('\x20\x20'+a35_0x9322fb[_0x4b6a53(0xa4)]('+')+'\x20'+_0x252cc0);}console[_0x4b6a53(0xbf)]('');}if(_0x2502e9[_0x4b6a53(0x84)]>0x0&&!_0x47ec94[_0x4b6a53(0xec)])for(const _0x29769d of _0x2502e9){const _0x393c6a=_0x29769d[_0x4b6a53(0x103)]?_0x29769d['folderPath']+'/'+_0x29769d['yamlConfig']['name']:_0x29769d[_0x4b6a53(0x8e)][_0x4b6a53(0xde)],_0x3c2b7c=_0x29769d[_0x4b6a53(0x8e)]['activations']?.[_0x4b6a53(0x84)]||0x0,_0x9a7925=_0x3c2b7c>0x0?a35_0x9322fb['dim']('\x20['+_0x3c2b7c+_0x4b6a53(0xfe)):'';console[_0x4b6a53(0xbf)]('\x0a'+a35_0x9322fb[_0x4b6a53(0x99)](_0x4b6a53(0xe7))+'\x20'+_0x393c6a+_0x9a7925),console['error']('β'[_0x4b6a53(0xd0)](0x3c)),_0x29769d[_0x4b6a53(0x85)]&&console[_0x4b6a53(0xbf)](_0x29769d[_0x4b6a53(0x85)]),console['error']('β'[_0x4b6a53(0xd0)](0x3c));}if(_0x4ddc06['length']>0x0&&!_0x47ec94['journeysOnly'])for(const _0x4405d4 of _0x4ddc06){const _0x5b296e=_0x4405d4['segmentFolderId']?_0x3957af[_0x4b6a53(0x76)](_0x4405d4[_0x4b6a53(0x9f)]['toString']())||'':'',_0x26e557=_0x5b296e?_0x5b296e+'/'+_0x4405d4[_0x4b6a53(0xde)]:_0x4405d4[_0x4b6a53(0xde)],_0x8633a0=_0xe5ae74[_0x4b6a53(0x76)](_0x4405d4['id'])||[],_0x5df35e=_0x8633a0[_0x4b6a53(0x84)]>0x0?a35_0x9322fb[_0x4b6a53(0xc4)]('\x20['+_0x8633a0['length']+_0x4b6a53(0xfe)):'';console[_0x4b6a53(0xbf)]('\x0a'+a35_0x9322fb['red'](_0x4b6a53(0xc1))+'\x20'+_0x26e557+_0x5df35e),console[_0x4b6a53(0xbf)]('β'[_0x4b6a53(0xd0)](0x3c));const _0x5d9728=segmentWithActivationsToYaml(_0x4405d4,_0x8633a0,undefined,_0x3357ef,_0x351d8d),_0x9fd1d6=segmentToYamlString(_0x5d9728),_0x18c558=generateDiff(_0x9fd1d6,'');console[_0x4b6a53(0xbf)](formatDiffWithColors(_0x18c558)),console[_0x4b6a53(0xbf)]('β'[_0x4b6a53(0xd0)](0x3c));}const _0x552efc=_0x960be4['filter'](_0x4160a8=>!_0x4160a8[_0x4b6a53(0x83)]&&_0x4160a8[_0x4b6a53(0x85)]);if(_0x552efc[_0x4b6a53(0x84)]>0x0&&!_0x47ec94['journeysOnly'])for(const _0x456309 of _0x552efc){const _0x3e7182=_0x456309[_0x4b6a53(0x103)]?_0x456309[_0x4b6a53(0x103)]+'/'+_0x456309[_0x4b6a53(0x8e)][_0x4b6a53(0xde)]:_0x456309[_0x4b6a53(0x8e)][_0x4b6a53(0xde)];console['error']('\x0a'+a35_0x9322fb['yellow'](_0x4b6a53(0xb8))+'\x20'+_0x3e7182),console[_0x4b6a53(0xbf)]('β'[_0x4b6a53(0xd0)](0x3c)),console[_0x4b6a53(0xbf)](_0x456309[_0x4b6a53(0x85)]),console['error']('β'['repeat'](0x3c));}if(_0x491c08['length']>0x0)for(const _0x40c32c of _0x491c08){const _0x1df0b4=_0x40c32c[_0x4b6a53(0x103)]?_0x40c32c['folderPath']+'/'+_0x40c32c[_0x4b6a53(0x8e)][_0x4b6a53(0xde)]:_0x40c32c['yamlConfig'][_0x4b6a53(0xde)];console['error']('\x0a'+a35_0x9322fb['green'](_0x4b6a53(0x8c))+'\x20'+_0x1df0b4),console[_0x4b6a53(0xbf)]('β'['repeat'](0x3c)),_0x40c32c['diff']&&console['error'](_0x40c32c[_0x4b6a53(0x85)]),console[_0x4b6a53(0xbf)]('β'['repeat'](0x3c));}const _0x2013c7=_0x3767db[_0x4b6a53(0x8d)](_0x4b85b3=>!_0x4b85b3[_0x4b6a53(0x83)]&&_0x4b85b3['diff']);if(_0x2013c7[_0x4b6a53(0x84)]>0x0)for(const _0x5bcb0a of _0x2013c7){const _0x1c5a8e=_0x5bcb0a[_0x4b6a53(0x103)]?_0x5bcb0a[_0x4b6a53(0x103)]+'/'+_0x5bcb0a[_0x4b6a53(0x8e)]['name']:_0x5bcb0a['yamlConfig'][_0x4b6a53(0xde)];console['error']('\x0a'+a35_0x9322fb[_0x4b6a53(0x8b)]('Changes\x20to\x20journey:')+'\x20'+_0x1c5a8e),console['error']('β'[_0x4b6a53(0xd0)](0x3c)),console['error'](_0x5bcb0a['diff']),console[_0x4b6a53(0xbf)]('β'['repeat'](0x3c));}if(_0x7c2e8e[_0x4b6a53(0x84)]>0x0)for(const _0x119520 of _0x7c2e8e){const _0x28a2dd=_0x119520[_0x4b6a53(0xc5)]?_0x3957af[_0x4b6a53(0x76)](_0x119520['folderId'])||'':'',_0x3f6604=_0x28a2dd?_0x28a2dd+'/'+_0x119520['journeyBundleName']:_0x119520[_0x4b6a53(0x95)];console[_0x4b6a53(0xbf)]('\x0a'+a35_0x9322fb['red'](_0x4b6a53(0xff))+'\x20'+_0x3f6604),console[_0x4b6a53(0xbf)]('β'[_0x4b6a53(0xd0)](0x3c)),console[_0x4b6a53(0xbf)](a35_0x9322fb['red']('(Journey\x20will\x20be\x20deleted)')),console[_0x4b6a53(0xbf)]('β'['repeat'](0x3c));}if(_0x47ec94[_0x4b6a53(0xd4)])return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x8b)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made')),0x0;const _0x587f4a=_0x47ec94['journeysOnly']?![]:_0x2502e9[_0x4b6a53(0x84)]>0x0||_0x355cb4[_0x4b6a53(0x84)]>0x0||_0x4ddc06[_0x4b6a53(0x84)]>0x0,_0x23d002=_0x491c08[_0x4b6a53(0x84)]>0x0||_0x4190b8[_0x4b6a53(0x84)]>0x0||_0x7c2e8e[_0x4b6a53(0x84)]>0x0,_0x362255=_0x47ec94[_0x4b6a53(0xec)]?![]:_0x288a94[_0x4b6a53(0x84)]>0x0,_0x4486ec=_0x382a59[_0x4b6a53(0x84)]>0x0;if(!_0x587f4a&&!_0x23d002&&!_0x362255&&!_0x4486ec){const _0x1b1925=_0x47ec94[_0x4b6a53(0xec)]?_0x4b6a53(0x7b):_0x4b6a53(0x78);console['error'](a35_0x9322fb['green'](_0x1b1925));if(_0x20991c&&_0x51e347[_0x4b6a53(0x84)]===0x1){const _0x167d5d=_0x51e347[0x0];if(_0x167d5d[_0x4b6a53(0x97)]?.['id']){const _0x5f167e=getConsoleNextUrl(_0x47ec94[_0x4b6a53(0x81)],_0x4b6a53(0xda)+_0xa9efd6+_0x4b6a53(0xf6)+_0x167d5d[_0x4b6a53(0x97)]['id']+_0x4b6a53(0xd1));console['error'](_0x4b6a53(0x92)+a35_0x9322fb['cyan'](_0x5f167e));}}if(_0x20991c&&_0x2a8e16[_0x4b6a53(0x84)]===0x1){const _0x10806b=_0x2a8e16[0x0];if(_0x10806b[_0x4b6a53(0xfd)]?.['id']){const _0x982544=getConsoleNextUrl(_0x47ec94[_0x4b6a53(0x81)],_0x4b6a53(0xda)+_0xa9efd6+_0x4b6a53(0xf6)+_0x10806b[_0x4b6a53(0xfd)]['id']+_0x4b6a53(0xe8));console[_0x4b6a53(0xbf)]('\x20\x20'+a35_0x9322fb[_0x4b6a53(0xe6)](_0x982544));}}return 0x0;}const _0x102bb1=_0x47ec94[_0x4b6a53(0xec)]?_0x491c08[_0x4b6a53(0x84)]+_0x4190b8[_0x4b6a53(0x84)]+_0x7c2e8e[_0x4b6a53(0x84)]+_0x382a59[_0x4b6a53(0x84)]:_0x2502e9['length']+_0x355cb4[_0x4b6a53(0x84)]+_0x4ddc06[_0x4b6a53(0x84)]+_0x491c08[_0x4b6a53(0x84)]+_0x4190b8['length']+_0x7c2e8e[_0x4b6a53(0x84)]+_0x382a59[_0x4b6a53(0x84)]+_0x288a94['length'];if(!_0x47ec94[_0x4b6a53(0x7e)]&&_0x102bb1>0x0){if(!isInteractive())return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x77)](_0x4b6a53(0x89)),_0x4b6a53(0xa2)),console['error'](a35_0x9322fb[_0x4b6a53(0xc4)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4efd5c=await confirmKey(_0x4b6a53(0xbb)+_0x102bb1+_0x4b6a53(0x8f));if(!_0x4efd5c)return console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x8b)](_0x4b6a53(0xdf))),0x1;}const _0x1df97d={'withProgress':async(_0x181f33,_0x4d8cd6)=>{const _0x5521b5=_0x4b6a53,_0x5c341f=await withSpinner(_0x181f33,_0x4d8cd6,{'verbose':_0x47ec94[_0x5521b5(0x98)]});return{'data':_0x5c341f[_0x5521b5(0x91)]};},'logInfo':_0x53b6be=>console['error'](a35_0x9322fb['blue']('β\x20'+_0x53b6be)),'logSuccess':_0x2f7fff=>console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x99)]('β\x20'+_0x2f7fff)),'logWarning':_0x4c54fb=>console['error'](a35_0x9322fb[_0x4b6a53(0x8b)]('β \x20'+_0x4c54fb)),'logDeleted':_0x31d134=>console['error'](a35_0x9322fb[_0x4b6a53(0x77)]('β\x20'+_0x31d134))},_0x3e17c6={'segment':_0x27090d[_0x4b6a53(0xc6)],'journey':_0x27090d[_0x4b6a53(0xc7)],'user':_0x27090d[_0x4b6a53(0x9a)],'connection':_0x27090d[_0x4b6a53(0x9b)]};_0x382a59[_0x4b6a53(0x84)]>0x0&&(_0x6cff36=await executePushFolders(_0x3e17c6,_0x382a59,_0x6cff36,{'parentId':_0xa9efd6},_0x1df97d));const _0x30fd0b={'rootFolderId':_0x3eb23b,'folderPathToId':_0x6cff36,'folderIdToPath':_0x3957af,'segmentNameToId':_0x2380f8,'activationsBySegmentId':_0xe5ae74,'emailToIdMap':_0x59ea11,'idToEmailMap':_0x3357ef,'connectionNameToIdMap':_0x354f56[_0x4b6a53(0xa3)],'connectionIdToNameMap':_0x354f56[_0x4b6a53(0x105)],'connectionNameToTypeMap':_0x4289d3},_0x461475=await executePushSegments(_0x3e17c6,_0x47ec94[_0x4b6a53(0xec)]?[]:_0x960be4,_0x30fd0b,{'parentId':_0xa9efd6},_0x1df97d),_0x39b45b=_0x461475[_0x4b6a53(0xc2)],_0x3500bb=_0x461475[_0x4b6a53(0xfb)],_0x4b9696=_0x461475[_0x4b6a53(0xed)][_0x4b6a53(0xc2)],_0x195449=_0x461475[_0x4b6a53(0xed)][_0x4b6a53(0xfb)],_0x225d40=_0x461475['activations']['deleted'];let _0x41e145;if(_0x20991c&&_0x960be4[_0x4b6a53(0x84)]===0x1){const _0x25ab05=_0x960be4[0x0];_0x41e145=_0x25ab05[_0x4b6a53(0x97)]?.['id']??_0x461475['createdSegmentIds'][_0x4b6a53(0x76)](_0x25ab05[_0x4b6a53(0x8e)][_0x4b6a53(0xde)]);}const _0x20bec7=await executePushSegmentDeletions(_0x3e17c6,_0x47ec94[_0x4b6a53(0xec)]?[]:_0x4ddc06,_0x1df97d);let _0x483658=0x0,_0x401dc6=0x0,_0x44d1c9=0x0;const _0x984091=new Map(_0x2380f8);for(const [_0x554439,_0x38b3aa]of _0x461475['createdSegmentIds']){_0x984091[_0x4b6a53(0xd3)](_0x554439,_0x38b3aa);}if(_0x3767db[_0x4b6a53(0x84)]>0x0){const _0x52efb3={..._0x30fd0b,'segmentNameToId':_0x984091,'existingSegments':_0x102cd5,'activationContext':_0x192463},_0x42789e=await executePushJourneys(_0x3e17c6,_0x3767db,_0x52efb3,{'parentId':_0xa9efd6,'rootFolderId':_0x3eb23b,'verbose':_0x47ec94['verbose']},_0x1df97d);_0x483658=_0x42789e['created'],_0x401dc6=_0x42789e[_0x4b6a53(0xfb)];if(_0x20991c&&_0x42789e[_0x4b6a53(0x101)][_0x4b6a53(0x84)]===0x1){const _0x5d5341=_0x42789e[_0x4b6a53(0x101)][0x0];if(_0x5d5341[_0x4b6a53(0xef)]){const _0x37cb5b=getConsoleNextUrl(_0x47ec94['site'],_0x4b6a53(0xda)+_0xa9efd6+'/e/'+_0x5d5341[_0x4b6a53(0xef)]+'/j/da/je');console[_0x4b6a53(0xbf)]('\x20\x20'+a35_0x9322fb[_0x4b6a53(0xe6)](_0x37cb5b));}}}for(const _0x3ead10 of _0x7c2e8e){console[_0x4b6a53(0xbf)](a35_0x9322fb[_0x4b6a53(0x8b)]('β \x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x3ead10['journeyBundleName'])),_0x44d1c9++;}const _0x4ba9f3=[];if(_0x39b45b>0x0)_0x4ba9f3['push'](_0x39b45b+_0x4b6a53(0xb2));if(_0x3500bb>0x0)_0x4ba9f3['push'](_0x3500bb+'\x20updated');if(_0x20bec7>0x0)_0x4ba9f3[_0x4b6a53(0x7f)](_0x20bec7+_0x4b6a53(0xcd));const _0x4c5137=[];if(_0x483658>0x0)_0x4c5137[_0x4b6a53(0x7f)](_0x483658+'\x20created');if(_0x401dc6>0x0)_0x4c5137[_0x4b6a53(0x7f)](_0x401dc6+'\x20updated');if(_0x44d1c9>0x0)_0x4c5137['push'](_0x44d1c9+_0x4b6a53(0xcd));const _0x367ef7=[];if(_0x4b9696>0x0)_0x367ef7[_0x4b6a53(0x7f)](_0x4b9696+_0x4b6a53(0xb2));if(_0x195449>0x0)_0x367ef7['push'](_0x195449+'\x20updated');if(_0x225d40>0x0)_0x367ef7['push'](_0x225d40+_0x4b6a53(0xcd));console[_0x4b6a53(0xbf)](a35_0x9322fb['green'](_0x4b6a53(0xb7)));_0x4ba9f3[_0x4b6a53(0x84)]>0x0&&!_0x47ec94[_0x4b6a53(0xec)]&&console[_0x4b6a53(0xbf)]('\x20\x20Segments:\x20'+_0x4ba9f3[_0x4b6a53(0xe4)](',\x20'));_0x4c5137['length']>0x0&&console[_0x4b6a53(0xbf)]('\x20\x20Journeys:\x20'+_0x4c5137['join'](',\x20'));_0x367ef7[_0x4b6a53(0x84)]>0x0&&!_0x47ec94[_0x4b6a53(0xec)]&&console['error'](_0x4b6a53(0x102)+_0x367ef7['join'](',\x20'));if(_0x41e145){const _0xa0dcdf=getConsoleNextUrl(_0x47ec94[_0x4b6a53(0x81)],_0x4b6a53(0xda)+_0xa9efd6+'/e/'+_0x41e145+'/sb/da/esr');console[_0x4b6a53(0xbf)](_0x4b6a53(0x92)+a35_0x9322fb[_0x4b6a53(0xe6)](_0xa0dcdf));}return 0x0;}}function a35_0x28fd(){const _0x5b2110=['/sb/da/esr','delete','set','dryRun','isScoped','parentSegment','Error\x20parsing\x20YAML:\x20','type','parent_name','/app/ps/','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','map','list','name','Aborted.','add','updatedAt','Site:\x20','782976GHuCsf','join','listActivations','cyan','New\x20segment:','/j/da/je','parentName','\x20to\x20delete','cwd','journeysOnly','activations','file','journeyId','listFolders','\x20changed','errorCode','Fetching\x20existing\x20data...','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','Fetching\x20connections\x20for\x20name\x20resolution...','/e/','102126RWoogo','scopedFolderPath','4026861LWfiLe','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','updated','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','existingJourney','\x20activations]','Delete\x20journey:','filePath','results','\x20\x20Activations:\x20','folderPath','2121255wmbNMk','idToName','1071834IeuiHz','get','red','β\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','audienceId','\x20to\x20create','β\x20All\x20journeys\x20are\x20up\x20to\x20date','\x20unchanged','.yaml','yes','push','Fetching\x20existing\x20activations...','site','\x20\x20\x20\x20','isNew','length','diff','journeys','attributes','setPhase','\x0aError:','\x20YAML\x20files\x20found','yellow','New\x20journey:','filter','yamlConfig','\x20changes?','toCreate','data','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','\x27...','createdAt','journeyBundleName','getParent','existingSegment','verbose','green','user','connection','\x20\x20Activations:','state','Usage:\x20tdx\x20sg\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20(requires\x20context)','segmentFolderId','No\x20','targetDir','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','nameToId','blue','\x0aPush\x20summary\x20for\x20\x27','Error:\x20','segments','listJourneysWithDetailsFromParentSegment','endsWith','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','message','resolveParentId','π\x20','helpText','Error:\x20Directory\x20not\x20found:\x20','Parent\x20segment:\x20','\x20\x20Source:\x20','\x20created','\x20new','\x20to\x20update','segment:push','9134uoIkCo','\x0aβ\x20Push\x20complete','Changes\x20to:','segment\x20or\x20journey','Folders\x20to\x20create:','Push\x20','nameToType','all','2984704cuJvGB','error','paused','Delete\x20segment:','created','Scoped\x20to\x20folder:\x20','dim','folderId','segment','journey','then','no_parent','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','119yiwqGh','relationships','\x20deleted','toUpdate','2InaJko','repeat'];a35_0x28fd=function(){return _0x5b2110;};return a35_0x28fd();}
|