@treasuredata/tdx 2026.6.1 → 2026.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/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/cas-command.js +1 -1
- package/dist/commands/cas-segment-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/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-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/policy-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/table-deleted.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/work-command.js +1 -1
- package/dist/commands/workflow-command.d.ts +2 -2
- package/dist/commands/workflow-command.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +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/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/tools/work-create-item.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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.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/oauth-refresh.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.d.ts +23 -1
- package/dist/sdk/client/workflow-client.d.ts.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +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/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-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/types/template-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/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.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/types/workflow.d.ts +1 -1
- package/dist/sdk/types/workflow.d.ts.map +1 -1
- package/dist/sdk/types/workspace.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/paginate.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.d.ts +23 -2
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.d.ts +4 -0
- package/dist/sdk/workflow/push-workflow.d.ts.map +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js.map +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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/github-releases.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 a24_0x19b1a3=a24_0x46ca;(function(_0x532635,_0x1c1341){const _0x3f9dfd=a24_0x46ca,_0x239c63=_0x532635();while(!![]){try{const _0x334156=parseInt(_0x3f9dfd(0x1a2))/0x1*(parseInt(_0x3f9dfd(0x16f))/0x2)+-parseInt(_0x3f9dfd(0x19b))/0x3+-parseInt(_0x3f9dfd(0x155))/0x4*(-parseInt(_0x3f9dfd(0x174))/0x5)+-parseInt(_0x3f9dfd(0x154))/0x6*(parseInt(_0x3f9dfd(0x166))/0x7)+parseInt(_0x3f9dfd(0x1a0))/0x8+parseInt(_0x3f9dfd(0x168))/0x9*(-parseInt(_0x3f9dfd(0x16b))/0xa)+parseInt(_0x3f9dfd(0x197))/0xb*(parseInt(_0x3f9dfd(0x161))/0xc);if(_0x334156===_0x1c1341)break;else _0x239c63['push'](_0x239c63['shift']());}catch(_0x57468e){_0x239c63['push'](_0x239c63['shift']());}}}(a24_0x9393,0xb72f0));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a24_0x40f081 from'chalk';import a24_0x2f4f86 from'path';import{discoverAndParseTemplateFiles,parseTemplateFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/template-push.js';function a24_0x46ca(_0x2eb27c,_0x779958){_0x2eb27c=_0x2eb27c-0x154;const _0x93935e=a24_0x9393();let _0x46cac2=_0x93935e[_0x2eb27c];return _0x46cac2;}import{validateTemplateDef}from'../sdk/engage/template-validator.js';function a24_0x9393(){const _0x1b8f9b=['21938yCLXjI','Workspace\x20is\x20required.','3015ZpMwgF','-\x20no\x20changes\x20applied','data','32220mIloMy','Aborted.','path','configDir','1191134HdRvia','yellow','action','errors','green','55NsHMwE','def','\x0aError:','results','created','✔\x20Created\x20','message','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20template\x20push\x20--workspace\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20with\x20explicit\x20workspace','cwd','yes','update','1\x20template\x20file:\x20','warnings','\x20\x20\x20\x20','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','engage','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','No\x20template\x20YAML\x20files\x20found\x20in\x20','red','dim','\x20errors:','create','config','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20template\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20(requires\x20tdx.json)','engage_workspace','✔\x20All\x20templates\x20are\x20up\x20to\x20date','\x20template\x20files','name','resolve','resolveWorkspaceId','cyan','length','Found\x20','\x0aValidation\x20errors\x20in\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','33AvpWGy','updated','Push\x20','\x20templates','2164575ovUZKn','\x27...','\x20templates?','\x20new\x20templates:','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','2688776IMYtxz','Pushing\x20templates...','2FWNpXA','\x0aUsage:\x20tdx\x20engage\x20template\x20push\x20<file.yaml>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20single\x20file','6RPxwUh','234844JpvADy','setPhase','relativePath','execute','Resolving\x20references...','✔\x20Updated\x20','error','valid','templateId','workspace','\x20templates\x20to\x20update:','dirname','1525188nRyPzI','verbose','session','engage:template:push','dryRun'];a24_0x9393=function(){return _0x1b8f9b;};return a24_0x9393();}import{getTemplateUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageTemplatePushCommand extends BaseCommand{[a24_0x19b1a3(0x18f)]=a24_0x19b1a3(0x164);['description']=a24_0x19b1a3(0x182);async[a24_0x19b1a3(0x158)](_0x2e16f0){const _0x292945=a24_0x19b1a3,{options:_0x11e272,args:_0x60c7ed,tdx:_0x394ac6}=_0x2e16f0,_0x29270e=_0x11e272,_0x57ca35=_0x60c7ed[0x0],_0x1d1fe6=_0x57ca35?a24_0x2f4f86[_0x292945(0x190)](_0x57ca35):undefined,_0x39ea91=_0x1d1fe6?isYamlFile(_0x1d1fe6):![];let _0x11e756;if(_0x39ea91&&_0x1d1fe6)_0x11e756=a24_0x2f4f86[_0x292945(0x160)](_0x1d1fe6);else _0x1d1fe6?_0x11e756=_0x1d1fe6:_0x11e756=process[_0x292945(0x17c)]();let _0x4e18b3;const _0x115cdd=tryFindTdxConfig(_0x11e756);_0x115cdd?.[_0x292945(0x18a)][_0x292945(0x18c)]&&(_0x4e18b3=_0x115cdd['config'][_0x292945(0x18c)],!_0x39ea91&&(_0x11e756=_0x115cdd[_0x292945(0x16e)]));_0x29270e[_0x292945(0x15e)]&&(_0x4e18b3=_0x29270e[_0x292945(0x15e)]);if(!_0x4e18b3){const _0x278227=loadSessionContext(_0x29270e[_0x292945(0x163)]);_0x278227?.[_0x292945(0x18c)]&&(_0x4e18b3=_0x278227[_0x292945(0x18c)]);}if(!_0x4e18b3)return console[_0x292945(0x15b)](a24_0x40f081['yellow'](_0x292945(0x167))),console[_0x292945(0x15b)](_0x292945(0x1a3)),console[_0x292945(0x15b)](_0x292945(0x18b)),console[_0x292945(0x15b)](_0x292945(0x17b)),console[_0x292945(0x15b)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;let _0x30e172;_0x39ea91&&_0x1d1fe6?_0x30e172=[parseTemplateFile(_0x1d1fe6,a24_0x2f4f86[_0x292945(0x160)](_0x1d1fe6))]:_0x30e172=discoverAndParseTemplateFiles(_0x11e756);if(_0x30e172[_0x292945(0x193)]===0x0)return console['error'](a24_0x40f081[_0x292945(0x170)](_0x292945(0x185)+_0x11e756)),console['error'](a24_0x40f081['dim'](_0x292945(0x19f))),0x1;const _0x159132=_0x30e172[_0x292945(0x193)]===0x1?_0x292945(0x17f)+_0x30e172[0x0]['def'][_0x292945(0x18f)]:_0x30e172[_0x292945(0x193)]+_0x292945(0x18e);console[_0x292945(0x15b)](_0x292945(0x194)+a24_0x40f081[_0x292945(0x192)](_0x159132));let _0x10a78b=![];for(const _0x57b8d3 of _0x30e172){const _0x9b9a8e=validateTemplateDef(_0x57b8d3[_0x292945(0x175)]);if(!_0x9b9a8e[_0x292945(0x15c)]){_0x10a78b=!![],console[_0x292945(0x15b)](a24_0x40f081['red'](_0x292945(0x195)+_0x57b8d3[_0x292945(0x157)]+':'));for(const _0x5c9b94 of _0x9b9a8e['errors']){console[_0x292945(0x15b)]('\x20\x20'+a24_0x40f081[_0x292945(0x186)]('✗')+'\x20'+_0x5c9b94[_0x292945(0x16d)]+':\x20'+_0x5c9b94['message']);}}for(const _0x38097e of _0x9b9a8e[_0x292945(0x180)]){console[_0x292945(0x15b)]('\x20\x20'+a24_0x40f081[_0x292945(0x170)]('⚠')+'\x20'+_0x38097e[_0x292945(0x16d)]+':\x20'+_0x38097e[_0x292945(0x17a)]);}}if(_0x10a78b)return console[_0x292945(0x15b)](a24_0x40f081[_0x292945(0x186)](_0x292945(0x184))),0x1;const _0x19b4c5=await _0x394ac6[_0x292945(0x183)][_0x292945(0x191)](_0x4e18b3),_0x201469=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x4e18b3+_0x292945(0x19c),_0x21e47c=>preparePush({'engage':_0x394ac6['engage']},_0x30e172,_0x19b4c5,{'progress':{'update':_0x3c4eb0=>_0x21e47c[_0x292945(0x156)](_0x3c4eb0)}}),{'verbose':_0x29270e['verbose']}),_0x3665b9=_0x201469[_0x292945(0x16a)];await withProgressSpinner(_0x292945(0x159),_0x13c759=>resolveAndBuildInputs({'engage':_0x394ac6['engage']},_0x3665b9,_0x19b4c5,{'progress':{'update':_0x487319=>_0x13c759[_0x292945(0x156)](_0x487319)}}),{'verbose':_0x29270e[_0x292945(0x162)]});const _0xeca276=_0x3665b9['filter'](_0x1fdd2c=>_0x1fdd2c['action']===_0x292945(0x189)),_0x1a9895=_0x3665b9['filter'](_0x3d8337=>_0x3d8337['action']===_0x292945(0x17e));console[_0x292945(0x15b)]('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0x4e18b3+'\x27:');if(_0xeca276[_0x292945(0x193)]>0x0){console['error']('\x20\x20'+a24_0x40f081[_0x292945(0x173)]('+\x20'+_0xeca276[_0x292945(0x193)]+_0x292945(0x19e)));for(const _0xf9ca8 of _0xeca276){console['error'](_0x292945(0x181)+a24_0x40f081[_0x292945(0x173)]('+')+'\x20'+_0xf9ca8['def'][_0x292945(0x18f)]);}}if(_0x1a9895[_0x292945(0x193)]>0x0){console[_0x292945(0x15b)]('\x20\x20'+a24_0x40f081[_0x292945(0x170)]('~\x20'+_0x1a9895[_0x292945(0x193)]+_0x292945(0x15f)));for(const _0x2a96cd of _0x1a9895){console[_0x292945(0x15b)](_0x292945(0x181)+a24_0x40f081[_0x292945(0x170)]('~')+'\x20'+_0x2a96cd[_0x292945(0x175)][_0x292945(0x18f)]);}}if(_0xeca276[_0x292945(0x193)]===0x0&&_0x1a9895[_0x292945(0x193)]===0x0)return console['error'](a24_0x40f081[_0x292945(0x173)](_0x292945(0x18d))),0x0;if(_0x29270e[_0x292945(0x165)])return console[_0x292945(0x15b)](a24_0x40f081[_0x292945(0x170)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(!_0x29270e[_0x292945(0x17d)]){if(!isInteractive())return console[_0x292945(0x15b)](a24_0x40f081[_0x292945(0x186)](_0x292945(0x176)),_0x292945(0x196)),console[_0x292945(0x15b)](a24_0x40f081['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x384314=await confirmKey(_0x292945(0x199)+(_0xeca276[_0x292945(0x193)]+_0x1a9895[_0x292945(0x193)])+_0x292945(0x19d));if(!_0x384314)return console[_0x292945(0x15b)](a24_0x40f081[_0x292945(0x170)](_0x292945(0x16c)),_0x292945(0x169)),0x1;}const _0x1dd781=await withProgressSpinner(_0x292945(0x1a1),_0x41ad74=>executePush({'engage':_0x394ac6['engage']},_0x3665b9,{'progress':{'update':_0x52ed76=>_0x41ad74['setPhase'](_0x52ed76)}}),{'verbose':_0x29270e[_0x292945(0x162)]}),_0x439f5f=_0x1dd781[_0x292945(0x16a)];for(const _0x3565a8 of _0x439f5f[_0x292945(0x177)]){if(_0x3565a8[_0x292945(0x15d)]&&(_0x3565a8[_0x292945(0x171)]==='created'||_0x3565a8[_0x292945(0x171)]===_0x292945(0x198))){const _0x372d05=getTemplateUrl(_0x29270e['site'],_0x19b4c5,_0x3565a8[_0x292945(0x15d)]),_0x2ede61=_0x3565a8[_0x292945(0x171)]===_0x292945(0x178)?'+':'~',_0x4ddcd3=_0x3565a8[_0x292945(0x171)]===_0x292945(0x178)?a24_0x40f081[_0x292945(0x173)](_0x2ede61):a24_0x40f081['yellow'](_0x2ede61);console[_0x292945(0x15b)]('\x20\x20'+_0x4ddcd3+'\x20'+hyperlink(_0x3565a8['name'],_0x372d05)+'\x20'+a24_0x40f081[_0x292945(0x187)](_0x372d05));}}_0x439f5f[_0x292945(0x178)]>0x0&&console[_0x292945(0x15b)](a24_0x40f081[_0x292945(0x173)](_0x292945(0x179)+_0x439f5f[_0x292945(0x178)]+_0x292945(0x19a)));_0x439f5f['updated']>0x0&&console[_0x292945(0x15b)](a24_0x40f081['green'](_0x292945(0x15a)+_0x439f5f[_0x292945(0x198)]+_0x292945(0x19a)));if(_0x439f5f['errors']['length']>0x0){console[_0x292945(0x15b)](a24_0x40f081['red']('✘\x20'+_0x439f5f[_0x292945(0x172)]['length']+_0x292945(0x188)));for(const _0x3bd728 of _0x439f5f[_0x292945(0x172)]){console[_0x292945(0x15b)]('\x20\x20'+a24_0x40f081[_0x292945(0x186)](_0x3bd728[_0x292945(0x18f)])+':\x20'+_0x3bd728[_0x292945(0x15b)]);}}return saveSessionContext({'engage_workspace':_0x4e18b3},_0x29270e[_0x292945(0x163)]),_0x439f5f[_0x292945(0x172)][_0x292945(0x193)]>0x0?0x1:0x0;}}
|
|
1
|
+
function a24_0x3382(_0x2b1806,_0xad14ad){_0x2b1806=_0x2b1806-0x136;const _0x2fae2a=a24_0x2fae();let _0x338299=_0x2fae2a[_0x2b1806];return _0x338299;}const a24_0x2aabcc=a24_0x3382;(function(_0xdfc97,_0x2b8fa0){const _0x234249=a24_0x3382,_0x4f22f1=_0xdfc97();while(!![]){try{const _0x58516b=parseInt(_0x234249(0x142))/0x1*(parseInt(_0x234249(0x153))/0x2)+parseInt(_0x234249(0x15f))/0x3*(parseInt(_0x234249(0x176))/0x4)+parseInt(_0x234249(0x177))/0x5*(-parseInt(_0x234249(0x13e))/0x6)+parseInt(_0x234249(0x13f))/0x7*(parseInt(_0x234249(0x14a))/0x8)+-parseInt(_0x234249(0x165))/0x9*(-parseInt(_0x234249(0x164))/0xa)+parseInt(_0x234249(0x14b))/0xb+-parseInt(_0x234249(0x137))/0xc;if(_0x58516b===_0x2b8fa0)break;else _0x4f22f1['push'](_0x4f22f1['shift']());}catch(_0x57a6c5){_0x4f22f1['push'](_0x4f22f1['shift']());}}}(a24_0x2fae,0xce063));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a24_0x230d30 from'chalk';import a24_0xaa2f6a from'path';import{discoverAndParseTemplateFiles,parseTemplateFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/template-push.js';import{validateTemplateDef}from'../sdk/engage/template-validator.js';import{getTemplateUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageTemplatePushCommand extends BaseCommand{[a24_0x2aabcc(0x156)]=a24_0x2aabcc(0x13d);[a24_0x2aabcc(0x16f)]=a24_0x2aabcc(0x174);async[a24_0x2aabcc(0x13b)](_0x457097){const _0x2ee3d1=a24_0x2aabcc,{options:_0x356c4d,args:_0xb90136,tdx:_0x28f2d6}=_0x457097,_0x4f9179=_0x356c4d,_0xd29805=_0xb90136[0x0],_0x580c02=_0xd29805?a24_0xaa2f6a[_0x2ee3d1(0x166)](_0xd29805):undefined,_0x35306f=_0x580c02?isYamlFile(_0x580c02):![];let _0x25643a;if(_0x35306f&&_0x580c02)_0x25643a=a24_0xaa2f6a['dirname'](_0x580c02);else _0x580c02?_0x25643a=_0x580c02:_0x25643a=process['cwd']();let _0x56bad7;const _0x37a399=tryFindTdxConfig(_0x25643a);_0x37a399?.['config'][_0x2ee3d1(0x173)]&&(_0x56bad7=_0x37a399[_0x2ee3d1(0x161)][_0x2ee3d1(0x173)],!_0x35306f&&(_0x25643a=_0x37a399[_0x2ee3d1(0x150)]));_0x4f9179[_0x2ee3d1(0x160)]&&(_0x56bad7=_0x4f9179['workspace']);if(!_0x56bad7){const _0x52b2bd=loadSessionContext(_0x4f9179[_0x2ee3d1(0x151)]);_0x52b2bd?.['engage_workspace']&&(_0x56bad7=_0x52b2bd[_0x2ee3d1(0x173)]);}if(!_0x56bad7)return console[_0x2ee3d1(0x169)](a24_0x230d30['yellow'](_0x2ee3d1(0x15e))),console[_0x2ee3d1(0x169)](_0x2ee3d1(0x148)),console[_0x2ee3d1(0x169)](_0x2ee3d1(0x175)),console[_0x2ee3d1(0x169)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20template\x20push\x20--workspace\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20with\x20explicit\x20workspace'),console[_0x2ee3d1(0x169)](_0x2ee3d1(0x168)),0x1;let _0x24eda0;_0x35306f&&_0x580c02?_0x24eda0=[parseTemplateFile(_0x580c02,a24_0xaa2f6a[_0x2ee3d1(0x136)](_0x580c02))]:_0x24eda0=discoverAndParseTemplateFiles(_0x25643a);if(_0x24eda0[_0x2ee3d1(0x155)]===0x0)return console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x144)]('No\x20template\x20YAML\x20files\x20found\x20in\x20'+_0x25643a)),console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x15d)](_0x2ee3d1(0x16d))),0x1;const _0xc171c7=_0x24eda0[_0x2ee3d1(0x155)]===0x1?_0x2ee3d1(0x13a)+_0x24eda0[0x0][_0x2ee3d1(0x14d)]['name']:_0x24eda0['length']+_0x2ee3d1(0x16c);console[_0x2ee3d1(0x169)](_0x2ee3d1(0x17b)+a24_0x230d30[_0x2ee3d1(0x139)](_0xc171c7));let _0xcbe29a=![];for(const _0x48d86e of _0x24eda0){const _0x152558=validateTemplateDef(_0x48d86e[_0x2ee3d1(0x14d)]);if(!_0x152558['valid']){_0xcbe29a=!![],console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x16b)]('\x0aValidation\x20errors\x20in\x20'+_0x48d86e[_0x2ee3d1(0x159)]+':'));for(const _0x163276 of _0x152558[_0x2ee3d1(0x14e)]){console[_0x2ee3d1(0x169)]('\x20\x20'+a24_0x230d30[_0x2ee3d1(0x16b)]('✗')+'\x20'+_0x163276['path']+':\x20'+_0x163276[_0x2ee3d1(0x140)]);}}for(const _0x4c4def of _0x152558['warnings']){console[_0x2ee3d1(0x169)]('\x20\x20'+a24_0x230d30[_0x2ee3d1(0x144)]('⚠')+'\x20'+_0x4c4def['path']+':\x20'+_0x4c4def['message']);}}if(_0xcbe29a)return console['error'](a24_0x230d30['red']('\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.')),0x1;const _0x17bb1a=await _0x28f2d6[_0x2ee3d1(0x15a)][_0x2ee3d1(0x149)](_0x56bad7),_0x37c248=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x56bad7+'\x27...',_0x131718=>preparePush({'engage':_0x28f2d6[_0x2ee3d1(0x15a)]},_0x24eda0,_0x17bb1a,{'progress':{'update':_0x1153d1=>_0x131718[_0x2ee3d1(0x145)](_0x1153d1)}}),{'verbose':_0x4f9179[_0x2ee3d1(0x167)]}),_0x4f0eb8=_0x37c248[_0x2ee3d1(0x138)];await withProgressSpinner('Resolving\x20references...',_0x38fe6d=>resolveAndBuildInputs({'engage':_0x28f2d6[_0x2ee3d1(0x15a)]},_0x4f0eb8,_0x17bb1a,{'progress':{'update':_0x2bf457=>_0x38fe6d['setPhase'](_0x2bf457)}}),{'verbose':_0x4f9179[_0x2ee3d1(0x167)]});const _0x18ff78=_0x4f0eb8[_0x2ee3d1(0x15b)](_0x4bf6ed=>_0x4bf6ed[_0x2ee3d1(0x13c)]==='create'),_0x158e62=_0x4f0eb8[_0x2ee3d1(0x15b)](_0x465064=>_0x465064[_0x2ee3d1(0x13c)]==='update');console[_0x2ee3d1(0x169)]('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0x56bad7+'\x27:');if(_0x18ff78[_0x2ee3d1(0x155)]>0x0){console['error']('\x20\x20'+a24_0x230d30[_0x2ee3d1(0x154)]('+\x20'+_0x18ff78[_0x2ee3d1(0x155)]+_0x2ee3d1(0x152)));for(const _0x1094ef of _0x18ff78){console['error'](_0x2ee3d1(0x171)+a24_0x230d30[_0x2ee3d1(0x154)]('+')+'\x20'+_0x1094ef[_0x2ee3d1(0x14d)]['name']);}}if(_0x158e62[_0x2ee3d1(0x155)]>0x0){console['error']('\x20\x20'+a24_0x230d30['yellow']('~\x20'+_0x158e62[_0x2ee3d1(0x155)]+_0x2ee3d1(0x143)));for(const _0x25c217 of _0x158e62){console[_0x2ee3d1(0x169)](_0x2ee3d1(0x171)+a24_0x230d30[_0x2ee3d1(0x144)]('~')+'\x20'+_0x25c217[_0x2ee3d1(0x14d)][_0x2ee3d1(0x156)]);}}if(_0x18ff78[_0x2ee3d1(0x155)]===0x0&&_0x158e62[_0x2ee3d1(0x155)]===0x0)return console['error'](a24_0x230d30[_0x2ee3d1(0x154)](_0x2ee3d1(0x16e))),0x0;if(_0x4f9179[_0x2ee3d1(0x16a)])return console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x144)](_0x2ee3d1(0x15c))),0x0;if(!_0x4f9179[_0x2ee3d1(0x163)]){if(!isInteractive())return console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x16b)](_0x2ee3d1(0x157)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x15d)](_0x2ee3d1(0x178))),0x1;const _0x32caeb=await confirmKey('Push\x20'+(_0x18ff78[_0x2ee3d1(0x155)]+_0x158e62['length'])+_0x2ee3d1(0x141));if(!_0x32caeb)return console['error'](a24_0x230d30[_0x2ee3d1(0x144)]('Aborted.'),_0x2ee3d1(0x146)),0x1;}const _0x20d44c=await withProgressSpinner(_0x2ee3d1(0x172),_0x5a5e00=>executePush({'engage':_0x28f2d6['engage']},_0x4f0eb8,{'progress':{'update':_0xea9cfb=>_0x5a5e00[_0x2ee3d1(0x145)](_0xea9cfb)}}),{'verbose':_0x4f9179[_0x2ee3d1(0x167)]}),_0x430dad=_0x20d44c[_0x2ee3d1(0x138)];for(const _0x26cbe5 of _0x430dad['results']){if(_0x26cbe5['templateId']&&(_0x26cbe5[_0x2ee3d1(0x13c)]==='created'||_0x26cbe5[_0x2ee3d1(0x13c)]===_0x2ee3d1(0x14c))){const _0x126b90=getTemplateUrl(_0x4f9179[_0x2ee3d1(0x17a)],_0x17bb1a,_0x26cbe5[_0x2ee3d1(0x147)]),_0x337d79=_0x26cbe5[_0x2ee3d1(0x13c)]===_0x2ee3d1(0x170)?'+':'~',_0x5b1edc=_0x26cbe5[_0x2ee3d1(0x13c)]===_0x2ee3d1(0x170)?a24_0x230d30[_0x2ee3d1(0x154)](_0x337d79):a24_0x230d30[_0x2ee3d1(0x144)](_0x337d79);console['error']('\x20\x20'+_0x5b1edc+'\x20'+hyperlink(_0x26cbe5[_0x2ee3d1(0x156)],_0x126b90)+'\x20'+a24_0x230d30[_0x2ee3d1(0x15d)](_0x126b90));}}_0x430dad[_0x2ee3d1(0x170)]>0x0&&console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x154)](_0x2ee3d1(0x179)+_0x430dad[_0x2ee3d1(0x170)]+_0x2ee3d1(0x158)));_0x430dad[_0x2ee3d1(0x14c)]>0x0&&console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x154)](_0x2ee3d1(0x162)+_0x430dad[_0x2ee3d1(0x14c)]+_0x2ee3d1(0x158)));if(_0x430dad[_0x2ee3d1(0x14e)]['length']>0x0){console[_0x2ee3d1(0x169)](a24_0x230d30[_0x2ee3d1(0x16b)]('✘\x20'+_0x430dad[_0x2ee3d1(0x14e)][_0x2ee3d1(0x155)]+_0x2ee3d1(0x14f)));for(const _0x2d6167 of _0x430dad[_0x2ee3d1(0x14e)]){console[_0x2ee3d1(0x169)]('\x20\x20'+a24_0x230d30[_0x2ee3d1(0x16b)](_0x2d6167[_0x2ee3d1(0x156)])+':\x20'+_0x2d6167['error']);}}return saveSessionContext({'engage_workspace':_0x56bad7},_0x4f9179[_0x2ee3d1(0x151)]),_0x430dad[_0x2ee3d1(0x14e)]['length']>0x0?0x1:0x0;}}function a24_0x2fae(){const _0x438459=['55287rUsqud','\x20templates\x20to\x20update:','yellow','setPhase','-\x20no\x20changes\x20applied','templateId','\x0aUsage:\x20tdx\x20engage\x20template\x20push\x20<file.yaml>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20single\x20file','resolveWorkspaceId','176xIFUwk','9859465xzRooA','updated','def','errors','\x20errors:','configDir','session','\x20new\x20templates:','4OxWcKb','green','length','name','\x0aError:','\x20templates','relativePath','engage','filter','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','dim','Workspace\x20is\x20required.','3391752nLIwAX','workspace','config','✔\x20Updated\x20','yes','245690oDrWNZ','477cyHblp','resolve','verbose','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','error','dryRun','red','\x20template\x20files','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','✔\x20All\x20templates\x20are\x20up\x20to\x20date','description','created','\x20\x20\x20\x20','Pushing\x20templates...','engage_workspace','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20template\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20(requires\x20tdx.json)','4MEFrTM','2397155WdSpqA','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','✔\x20Created\x20','site','Found\x20','dirname','26527128FtcWUo','data','cyan','1\x20template\x20file:\x20','execute','action','engage:template:push','6UdeBLU','29995hgXqEo','message','\x20templates?'];a24_0x2fae=function(){return _0x438459;};return a24_0x2fae();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a25_0x54d6(_0x4970c8,_0x147574){_0x4970c8=_0x4970c8-0x199;const _0x2832cb=a25_0x2832();let _0x54d6fa=_0x2832cb[_0x4970c8];return _0x54d6fa;}const a25_0x1c537f=a25_0x54d6;(function(_0x7da96,_0x5c8515){const _0xa4ef00=a25_0x54d6,_0x1433f4=_0x7da96();while(!![]){try{const _0x18bb08=-parseInt(_0xa4ef00(0x1b1))/0x1+parseInt(_0xa4ef00(0x1c7))/0x2+parseInt(_0xa4ef00(0x1a3))/0x3+-parseInt(_0xa4ef00(0x19a))/0x4+parseInt(_0xa4ef00(0x1c3))/0x5*(parseInt(_0xa4ef00(0x1c2))/0x6)+-parseInt(_0xa4ef00(0x1bd))/0x7+-parseInt(_0xa4ef00(0x1ac))/0x8*(-parseInt(_0xa4ef00(0x1b7))/0x9);if(_0x18bb08===_0x5c8515)break;else _0x1433f4['push'](_0x1433f4['shift']());}catch(_0x430476){_0x1433f4['push'](_0x1433f4['shift']());}}}(a25_0x2832,0x3f0d2));import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';function a25_0x2832(){const _0x1eeeed=['endsWith','execute','Validation\x20failed:\x20','\x20error(s)','validCount','1215512pGwCpx','warningCount','\x20non-template\x20file(s)\x20skipped','.yaml','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','481604ukaZFD','template','red','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20non-template\x20file(s)\x20skipped)','valid','9JraCEm','error','.yml','✔\x20All\x20','yellow','relativePath','2550583yDzaAT','invalidCount','engage:template:validate','cwd','verbose','12ANatDP','1019595ueVJpE','reason','Error:\x20Directory\x20not\x20found:\x20','name','364614zdpZqG','skippedCount','\x20template(s)\x20with\x20errors,\x20','length','description','540564UNElyz','filter','log','green','warnings','resolve','\x20warning(s)\x20found','dim','Validate\x20template\x20YAML\x20files','1491864UqElPK','errors','\x20template(s)\x20valid','dirname'];a25_0x2832=function(){return _0x1eeeed;};return a25_0x2832();}import{existsSync}from'fs';import a25_0x1a74c7 from'chalk';import a25_0x38c04e from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageTemplateValidateCommand extends BaseCommand{[a25_0x1c537f(0x1c6)]=a25_0x1c537f(0x1bf);[a25_0x1c537f(0x199)]=a25_0x1c537f(0x1a2);async[a25_0x1c537f(0x1a8)](_0x2d7ff6){const _0x2fd1dd=a25_0x1c537f,{options:_0x3f9f27,args:_0x2f712d}=_0x2d7ff6,_0x365da5=_0x3f9f27,_0x211c73=_0x2f712d[0x0],_0x3afc24=_0x211c73?a25_0x38c04e[_0x2fd1dd(0x19f)](_0x211c73):undefined,_0x132a43=_0x3afc24?isYamlFile(_0x3afc24):![];let _0x28bc6e,_0x35c9a8;if(_0x132a43&&_0x3afc24)_0x28bc6e=a25_0x38c04e[_0x2fd1dd(0x1a6)](_0x3afc24),_0x35c9a8=_0x3afc24;else _0x3afc24?_0x28bc6e=_0x3afc24:_0x28bc6e=process[_0x2fd1dd(0x1c0)]();if(!_0x35c9a8&&!existsSync(_0x28bc6e))return console[_0x2fd1dd(0x1b8)](a25_0x1a74c7[_0x2fd1dd(0x1b3)](_0x2fd1dd(0x1c5)+_0x28bc6e+'\x0a')),0x1;let _0x2f7a5c;if(_0x35c9a8){if(!_0x35c9a8['endsWith'](_0x2fd1dd(0x1b9))&&!_0x35c9a8[_0x2fd1dd(0x1a7)](_0x2fd1dd(0x1af)))return console[_0x2fd1dd(0x1b8)](a25_0x1a74c7[_0x2fd1dd(0x1b3)](_0x2fd1dd(0x1b4)+_0x35c9a8+'\x0a')),0x1;_0x2f7a5c=[_0x35c9a8];}else _0x2f7a5c=findYamlFiles(_0x28bc6e);if(_0x2f7a5c[_0x2fd1dd(0x1ca)]===0x0)return console[_0x2fd1dd(0x1b8)](a25_0x1a74c7[_0x2fd1dd(0x1b3)](_0x2fd1dd(0x1b0)+_0x28bc6e+'\x0a')),0x1;const _0x2b2ecb=validateYamlFiles(_0x2f7a5c,_0x28bc6e,{'filterType':_0x2fd1dd(0x1b2)}),_0x207f1a=calculateSummary(_0x2b2ecb),_0x4164c7=_0x2b2ecb[_0x2fd1dd(0x19b)](isValidationResult);if(_0x4164c7['length']===0x0)return console['error'](a25_0x1a74c7['yellow']('No\x20template\x20YAML\x20files\x20found\x20in\x20'+_0x28bc6e+'\x0a')),_0x207f1a[_0x2fd1dd(0x1c8)]>0x0&&console[_0x2fd1dd(0x1b8)](a25_0x1a74c7[_0x2fd1dd(0x1a1)]('('+_0x207f1a[_0x2fd1dd(0x1c8)]+_0x2fd1dd(0x1b5))),0x0;for(const _0x4efe39 of _0x2b2ecb){if(!isValidationResult(_0x4efe39)){_0x365da5['verbose']&&console[_0x2fd1dd(0x19c)](a25_0x1a74c7['dim']('-\x20'+_0x4efe39[_0x2fd1dd(0x1bc)]+'\x20(skipped:\x20'+_0x4efe39[_0x2fd1dd(0x1c4)]+')'));continue;}const {relativePath:_0x339d9b,source:_0x537f10,result:_0xbfbe84}=_0x4efe39;if(_0xbfbe84[_0x2fd1dd(0x1b6)]&&_0xbfbe84[_0x2fd1dd(0x19e)][_0x2fd1dd(0x1ca)]===0x0)_0x365da5[_0x2fd1dd(0x1c1)]&&console[_0x2fd1dd(0x19c)](a25_0x1a74c7[_0x2fd1dd(0x19d)]('✔\x20'+_0x339d9b));else _0xbfbe84['valid']?(console[_0x2fd1dd(0x19c)](a25_0x1a74c7[_0x2fd1dd(0x1bb)]('⚠\x20'+_0x339d9b+':\x20'+_0xbfbe84[_0x2fd1dd(0x19e)][_0x2fd1dd(0x1ca)]+'\x20warning(s)')),console['log'](formatValidationResult(_0xbfbe84,_0x537f10,_0x339d9b))):(console[_0x2fd1dd(0x19c)](a25_0x1a74c7[_0x2fd1dd(0x1b3)]('✖\x20'+_0x339d9b+':\x20'+_0xbfbe84[_0x2fd1dd(0x1a4)]['length']+_0x2fd1dd(0x1aa))),console[_0x2fd1dd(0x19c)](formatValidationResult(_0xbfbe84,_0x537f10,_0x339d9b)));}return console[_0x2fd1dd(0x19c)](''),_0x207f1a['hasErrors']?(console['log'](a25_0x1a74c7[_0x2fd1dd(0x1b3)](_0x2fd1dd(0x1a9)+_0x207f1a[_0x2fd1dd(0x1be)]+_0x2fd1dd(0x1c9)+_0x207f1a[_0x2fd1dd(0x1ab)]+'\x20valid')),_0x207f1a[_0x2fd1dd(0x1ad)]>0x0&&console[_0x2fd1dd(0x19c)](a25_0x1a74c7[_0x2fd1dd(0x1bb)](_0x207f1a[_0x2fd1dd(0x1ad)]+_0x2fd1dd(0x1a0))),_0x207f1a[_0x2fd1dd(0x1c8)]>0x0&&console[_0x2fd1dd(0x19c)](a25_0x1a74c7['dim'](_0x207f1a['skippedCount']+_0x2fd1dd(0x1ae))),0x1):(console['log'](a25_0x1a74c7[_0x2fd1dd(0x19d)](_0x2fd1dd(0x1ba)+_0x207f1a[_0x2fd1dd(0x1ab)]+_0x2fd1dd(0x1a5))),_0x207f1a[_0x2fd1dd(0x1ad)]>0x0&&console[_0x2fd1dd(0x19c)](a25_0x1a74c7['yellow'](_0x207f1a[_0x2fd1dd(0x1ad)]+_0x2fd1dd(0x1a0))),_0x207f1a[_0x2fd1dd(0x1c8)]>0x0&&console[_0x2fd1dd(0x19c)](a25_0x1a74c7[_0x2fd1dd(0x1a1)](_0x207f1a[_0x2fd1dd(0x1c8)]+_0x2fd1dd(0x1ae))),0x0);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x4f248f=a26_0x4352;(function(_0x6f294f,_0x2369f8){const _0x26db39=a26_0x4352,_0x2dba53=_0x6f294f();while(!![]){try{const _0x32501b=-parseInt(_0x26db39(0xdc))/0x1*(parseInt(_0x26db39(0xd0))/0x2)+-parseInt(_0x26db39(0xee))/0x3*(-parseInt(_0x26db39(0x101))/0x4)+-parseInt(_0x26db39(0x105))/0x5*(parseInt(_0x26db39(0xd7))/0x6)+-parseInt(_0x26db39(0xf0))/0x7*(-parseInt(_0x26db39(0x112))/0x8)+-parseInt(_0x26db39(0xec))/0x9*(parseInt(_0x26db39(0xeb))/0xa)+parseInt(_0x26db39(0xdf))/0xb*(-parseInt(_0x26db39(0xcf))/0xc)+parseInt(_0x26db39(0xff))/0xd;if(_0x32501b===_0x2369f8)break;else _0x2dba53['push'](_0x2dba53['shift']());}catch(_0x2335ae){_0x2dba53['push'](_0x2dba53['shift']());}}}(a26_0x38d6,0xb2c62));import{BaseCommand}from'./command.js';function a26_0x4352(_0x2a5670,_0x276e47){_0x2a5670=_0x2a5670-0xcd;const _0x38d6f3=a26_0x38d6();let _0x43524d=_0x38d6f3[_0x2a5670];return _0x43524d;}import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../sdk/query/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{getJobUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a26_0x26f008 from'chalk';function formatDuration(_0x267163){const _0x4d031b=a26_0x4352;if(_0x267163<0x3c)return _0x267163+'s';if(_0x267163<0xe10)return Math[_0x4d031b(0xde)](_0x267163/0x3c)+'m\x20'+_0x267163%0x3c+'s';const _0x5e28b4=Math['floor'](_0x267163/0xe10),_0x40f1c0=Math[_0x4d031b(0xde)](_0x267163%0xe10/0x3c);return _0x40f1c0>0x0?_0x5e28b4+'h\x20'+_0x40f1c0+'m':_0x5e28b4+'h';}function formatRelativeTime(_0x475444){const _0x390598=a26_0x4352,_0x488d08=Date[_0x390598(0xfb)]()-_0x475444[_0x390598(0x10a)](),_0x169605=Math[_0x390598(0xde)](Math['abs'](_0x488d08)/0x3e8);if(_0x169605<0x3c)return _0x390598(0xe0);const _0x1720ca=Math[_0x390598(0xde)](_0x169605/0x3c);if(_0x1720ca<0x3c)return _0x1720ca+_0x390598(0xd8);const _0x4cc44a=Math['floor'](_0x1720ca/0x3c);if(_0x4cc44a<0x18)return _0x4cc44a+_0x390598(0x122);const _0x3a0097=Math[_0x390598(0xde)](_0x4cc44a/0x18);if(_0x3a0097<0x1e)return _0x3a0097+_0x390598(0x120);return Math[_0x390598(0xde)](_0x3a0097/0x1e)+'mo\x20ago';}export class JobListCommand extends BaseCommand{[a26_0x4f248f(0x10d)]='jobs';[a26_0x4f248f(0x119)]='List\x20jobs';async[a26_0x4f248f(0x116)](_0x5bd196){const _0x3ca343=a26_0x4f248f,{options:_0x7f631e,tdx:_0x4a2a31}=_0x5bd196,_0x120cab=resolveLimit(_0x7f631e[_0x3ca343(0x103)],DEFAULT_DISPLAY_LIMIT),_0x21475e=_0x7f631e['status'];_0x7f631e[_0x3ca343(0x100)]&&(console['error'](_0x3ca343(0xd3)+_0x120cab+'\x20jobs'),_0x21475e&&console[_0x3ca343(0xce)](_0x3ca343(0x115)+_0x21475e));const _0x4851a7=await withSpinner(_0x3ca343(0xd4),()=>_0x4a2a31[_0x3ca343(0x10f)][_0x3ca343(0xf5)]({'from':0x0,'to':_0x120cab-0x1,'status':_0x21475e}),{'verbose':_0x7f631e['verbose']}),_0x3aa9ce=_0x4851a7['data'];console[_0x3ca343(0xce)](_0x3ca343(0xfe)+_0x3aa9ce[_0x3ca343(0x117)]+'\x20job'+(_0x3aa9ce[_0x3ca343(0x117)]!==0x1?'s':''));const _0x2299e0=_0x7f631e[_0x3ca343(0xf8)];if(isStructuredFormat(_0x7f631e)){const _0x3c8119=_0x3aa9ce[_0x3ca343(0xe3)](_0x1c8414=>{const _0x250d38=_0x3ca343;let _0x3d4ff9;if(_0x1c8414[_0x250d38(0xe7)]&&_0x1c8414['end_at']){const _0x880c02=new Date(_0x1c8414[_0x250d38(0xe7)])['getTime'](),_0x23dde5=new Date(_0x1c8414['end_at'])['getTime']();_0x3d4ff9=Math[_0x250d38(0xd2)]((_0x23dde5-_0x880c02)/0x3e8);}return{'job_id':_0x1c8414[_0x250d38(0x11a)],'type':_0x1c8414[_0x250d38(0x121)]===_0x250d38(0xd5)?_0x250d38(0xe8):_0x1c8414['type'],'status':_0x1c8414[_0x250d38(0xe6)],'user_name':_0x1c8414['user_name'],'duration_sec':_0x3d4ff9,'created_at':_0x1c8414[_0x250d38(0x118)],'started_at':_0x1c8414['start_at'],'end_at':_0x1c8414[_0x250d38(0x11c)]};});await handleSDKOutput(_0x3c8119,_0x7f631e);}else for(const _0x333e26 of _0x3aa9ce){const _0x1070a0=_0x333e26['status']==='success'?a26_0x26f008[_0x3ca343(0xdb)]:_0x333e26['status']===_0x3ca343(0xce)?a26_0x26f008[_0x3ca343(0xe1)]:a26_0x26f008[_0x3ca343(0xef)],_0x109872=_0x1070a0(_0x333e26[_0x3ca343(0xe6)]),_0x4b025a=getJobUrl(_0x2299e0,_0x333e26['job_id']),_0x2e97ab=hyperlink(_0x333e26['job_id'],_0x4b025a),_0x57c986=a26_0x26f008[_0x3ca343(0xef)](_0x333e26[_0x3ca343(0x121)]===_0x3ca343(0xd5)?_0x3ca343(0xe8):_0x333e26['type']),_0xe5df71=[];if(_0x333e26['start_at']&&_0x333e26[_0x3ca343(0x11c)]){const _0x170d2c=Math['round']((new Date(_0x333e26[_0x3ca343(0x11c)])[_0x3ca343(0x10a)]()-new Date(_0x333e26['start_at'])['getTime']())/0x3e8);_0xe5df71[_0x3ca343(0x11f)](formatDuration(_0x170d2c));}if(_0x333e26[_0x3ca343(0x11c)])_0xe5df71[_0x3ca343(0x11f)](formatRelativeTime(new Date(_0x333e26[_0x3ca343(0x11c)])));else _0x333e26[_0x3ca343(0xe7)]&&_0xe5df71[_0x3ca343(0x11f)](formatRelativeTime(new Date(_0x333e26[_0x3ca343(0xe7)])));const _0x5514d7=_0xe5df71[_0x3ca343(0x117)]>0x0?a26_0x26f008['dim']('\x20'+_0xe5df71['join'](',\x20')):'';console[_0x3ca343(0x109)]('⚡\x20'+_0x2e97ab+'\x20'+_0x57c986+'\x20'+_0x109872+_0x5514d7);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0x4f248f(0x10d)]='job:show';[a26_0x4f248f(0x119)]=a26_0x4f248f(0x10c);[a26_0x4f248f(0x107)](_0xd021ca){const _0x44e2c2=a26_0x4f248f,_0x24049d=_0xd021ca['args'][0x0];if(!_0x24049d)return _0x44e2c2(0x10b);return undefined;}async[a26_0x4f248f(0x116)](_0x2ab86c){const _0x25a05b=a26_0x4f248f,{options:_0x5cd10d,args:_0x11f590,tdx:_0x58d1f7}=_0x2ab86c,_0x3a6680=_0x11f590[0x0],_0x1dac93=await withSpinner(_0x25a05b(0xf2),()=>_0x58d1f7[_0x25a05b(0x10f)][_0x25a05b(0xd1)](_0x3a6680),{'verbose':_0x5cd10d[_0x25a05b(0x100)]}),_0x1ed5dc=_0x1dac93[_0x25a05b(0x114)];let _0x426eea;if(_0x1ed5dc[_0x25a05b(0xe7)]&&_0x1ed5dc[_0x25a05b(0x11c)]){const _0x4e11d3=new Date(_0x1ed5dc['start_at'])['getTime'](),_0x441dbd=new Date(_0x1ed5dc[_0x25a05b(0x11c)])['getTime']();_0x426eea=Math[_0x25a05b(0xd2)]((_0x441dbd-_0x4e11d3)/0x3e8);}const _0x161a0d={'job_id':_0x1ed5dc['job_id'],'type':_0x1ed5dc[_0x25a05b(0x121)],'status':_0x1ed5dc['status'],..._0x1ed5dc[_0x25a05b(0xd6)]&&{'user_name':_0x1ed5dc[_0x25a05b(0xd6)]},..._0x426eea!==undefined&&{'duration_sec':_0x426eea},..._0x1ed5dc[_0x25a05b(0x118)]&&{'created_at':_0x1ed5dc[_0x25a05b(0x118)]},..._0x1ed5dc[_0x25a05b(0xe7)]&&{'started_at':_0x1ed5dc[_0x25a05b(0xe7)]},..._0x1ed5dc[_0x25a05b(0x11c)]&&{'end_at':_0x1ed5dc[_0x25a05b(0x11c)]},..._0x1ed5dc[_0x25a05b(0xf3)]&&{'database':_0x1ed5dc[_0x25a05b(0xf3)]},..._0x1ed5dc[_0x25a05b(0xf6)]!==undefined&&{'priority':_0x1ed5dc[_0x25a05b(0xf6)]},..._0x1ed5dc[_0x25a05b(0x106)]&&{'url':_0x1ed5dc[_0x25a05b(0x106)]},..._0x1ed5dc[_0x25a05b(0xe4)]&&{'query':_0x1ed5dc['query']},..._0x1ed5dc[_0x25a05b(0xfc)]&&{'debug':_0x1ed5dc[_0x25a05b(0xfc)]}};return await handleSingleObjectOutput(_0x161a0d,_0x5cd10d),0x0;}}export class JobKillCommand extends BaseCommand{[a26_0x4f248f(0x10d)]='job:kill';[a26_0x4f248f(0x119)]='Kill\x20a\x20job';[a26_0x4f248f(0x107)](_0x1c1ac4){const _0x2afb8a=a26_0x4f248f,_0x4a7309=_0x1c1ac4[_0x2afb8a(0xf7)][0x0];if(!_0x4a7309)return _0x2afb8a(0x104);return undefined;}async[a26_0x4f248f(0x116)](_0x513766){const _0x18f4de=a26_0x4f248f,{options:_0x208cad,args:_0x5575fc,tdx:_0x50573f}=_0x513766,_0x16f6ce=_0x5575fc[0x0];if(!_0x208cad[_0x18f4de(0xf1)]){const _0x4f2a54=await confirm(_0x18f4de(0x11e)+_0x16f6ce+'?');if(!_0x4f2a54)return console[_0x18f4de(0xce)](_0x18f4de(0x113)),0x0;}return await withSpinner(_0x18f4de(0x102),()=>_0x50573f[_0x18f4de(0x10f)]['kill'](_0x16f6ce),{'verbose':_0x208cad['verbose']}),console['error'](_0x18f4de(0xdd)+_0x16f6ce),console[_0x18f4de(0xce)]('\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20'+_0x16f6ce+'\x27\x20to\x20verify\x20the\x20job\x20status'),0x0;}}export class JobSubmitCommand extends BaseCommand{[a26_0x4f248f(0x10d)]=a26_0x4f248f(0xcd);[a26_0x4f248f(0x119)]='Submit\x20a\x20job';async['execute'](_0x29f79d){const _0x4573de=a26_0x4f248f,{options:_0x8bc48e,args:_0x4a2f91,tdx:_0x34a0db}=_0x29f79d,_0x3645d2=_0x8bc48e[_0x4573de(0xd9)]||_0x4573de(0xe8),_0x432b27=_0x8bc48e['file'],_0x582729=_0x8bc48e[_0x4573de(0xf3)]||'information_schema',_0x1f3e55=_0x8bc48e[_0x4573de(0x108)];if(_0x3645d2!==_0x4573de(0xe8)&&_0x3645d2!==_0x4573de(0xfa))throw new SDKError(ErrorCode[_0x4573de(0x11b)],_0x4573de(0x10e));let _0x42f730;if(_0x432b27){if(_0x4a2f91[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4573de(0xf9));const _0x52616b=readSqlStatementsFromFile(_0x432b27);if(_0x52616b[_0x4573de(0x117)]===0x0)throw new SDKError(ErrorCode[_0x4573de(0x11b)],_0x4573de(0xe2));if(_0x52616b[_0x4573de(0x117)]>0x1)throw new SDKError(ErrorCode[_0x4573de(0x11b)],_0x4573de(0x11d));_0x42f730=_0x52616b[0x0];}else{if(!_0x4a2f91[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4573de(0xf4));_0x42f730=_0x4a2f91[0x0];}_0x8bc48e['verbose']&&(console[_0x4573de(0xce)]('Job\x20type:\x20'+_0x3645d2),console['error']('Database:\x20'+_0x582729),console['error'](_0x4573de(0x111)+_0x42f730['substring'](0x0,0x64)+(_0x42f730['length']>0x64?_0x4573de(0xda):'')));const _0x2b9785=await withSpinner(_0x4573de(0xed),()=>_0x34a0db[_0x4573de(0x10f)][_0x4573de(0xe5)](_0x582729,_0x42f730,_0x3645d2,_0x1f3e55),{'verbose':_0x8bc48e[_0x4573de(0x100)]}),_0x279f55=_0x2b9785[_0x4573de(0x114)];return console[_0x4573de(0xce)]('✔\x20Job\x20submitted'),console[_0x4573de(0xce)](_0x4573de(0xfd)+_0x279f55[_0x4573de(0x11a)]),await handleSDKOutput([_0x279f55],_0x8bc48e),0x0;}}export class JobResultCommand extends BaseCommand{['name']='job:result';['description']='Get\x20job\x20results';[a26_0x4f248f(0x107)](_0x4881ea){const _0x6db4da=a26_0x4f248f,_0x464a2a=_0x4881ea['args'][0x0];if(!_0x464a2a)return _0x6db4da(0x110);return undefined;}async[a26_0x4f248f(0x116)](_0x2e2782){const _0x2a42f8=a26_0x4f248f,{options:_0x44d367,args:_0x174337,tdx:_0x265821}=_0x2e2782,_0x25afc3=_0x174337[0x0],_0x3c77f2=await withSpinner(_0x2a42f8(0xe9),()=>_0x265821[_0x2a42f8(0x10f)][_0x2a42f8(0x108)](_0x25afc3),{'verbose':_0x44d367[_0x2a42f8(0x100)]}),_0x45c7e0=_0x3c77f2[_0x2a42f8(0x114)];return console['error'](_0x2a42f8(0xea)+_0x45c7e0[_0x2a42f8(0x117)]+'\x20row'+(_0x45c7e0[_0x2a42f8(0x117)]!==0x1?'s':'')),await handleSDKOutput(_0x45c7e0,_0x44d367),0x0;}}function a26_0x38d6(){const _0x59feb8=['2793IaSEDY','dim','119evAxHY','yes','Getting\x20job\x20details...','database','Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','list','priority','args','site','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','hive','now','debug','\x20\x20Job\x20ID:\x20','✔\x20Found\x20','27951794XEhxbP','verbose','5440QhTDMS','Submitting\x20kill\x20request...','limit','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>','1991840foqFmQ','url','validate','result','log','getTime','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>','Show\x20job\x20details','name','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','jobs','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>','Query:\x20','297456gSPUjY','Cancelled','data','Status\x20filter:\x20','execute','length','created_at','description','job_id','INVALID_ARGUMENT','end_at','Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','push','d\x20ago','type','h\x20ago','job:submit','error','48ChDspj','2529066Pidyxj','show','round','Limit:\x20','Listing\x20jobs...','presto','user_name','6mQGFzw','m\x20ago','jobType','...','green','1BAEfny','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','floor','749287AEmkYq','just\x20now','red','No\x20SQL\x20statements\x20found\x20in\x20file','map','query','submit','status','start_at','trino','Getting\x20job\x20results...','✔\x20Retrieved\x20','30gekZFQ','4142295cAkeiu','Submitting\x20job...'];a26_0x38d6=function(){return _0x59feb8;};return a26_0x38d6();}
|
|
1
|
+
function a26_0x20a8(){const _0x331575=['603578KyJQDU','validate','Query:\x20','Show\x20job\x20details','start_at','Get\x20job\x20results','round','7442855TFWCud','getTime','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','9WYQNvm','18628810LrZXxv','35076VXymWV','Getting\x20job\x20details...','Submit\x20a\x20job','user_name','substring','\x20job','1244220lwhFNP','length','job:submit','verbose','debug','database','\x20jobs','Limit:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','show','job:kill','priority','3774568LLrPlp','success','status','error','Submitting\x20kill\x20request...','description','presto','trino','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>','map','end_at','1180mdjjJu','Job\x20type:\x20','push','✔\x20Job\x20submitted','h\x20ago','2IRIZLx','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','green','query','jobs','list','type','limit','m\x20ago','url','information_schema','Getting\x20job\x20results...','name','site','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','✔\x20Found\x20','result','58103507PuUTLs','Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','kill','✔\x20Retrieved\x20','file','floor','Kill\x20a\x20job','8dTtffE','...','args','yes','Cancelled','job:show','execute','Submitting\x20job...','log','INVALID_ARGUMENT','job_id','dim','data'];a26_0x20a8=function(){return _0x331575;};return a26_0x20a8();}const a26_0x42f72c=a26_0x4dec;(function(_0x26d8c9,_0x1f7181){const _0x13a614=a26_0x4dec,_0x14d9eb=_0x26d8c9();while(!![]){try{const _0x5d40b6=parseInt(_0x13a614(0xc1))/0x1*(parseInt(_0x13a614(0x9c))/0x2)+parseInt(_0x13a614(0xd3))/0x3+parseInt(_0x13a614(0xdf))/0x4+parseInt(_0x13a614(0xea))/0x5*(parseInt(_0x13a614(0xcd))/0x6)+parseInt(_0x13a614(0xc8))/0x7*(parseInt(_0x13a614(0xb4))/0x8)+parseInt(_0x13a614(0xcb))/0x9*(parseInt(_0x13a614(0xcc))/0xa)+-parseInt(_0x13a614(0xad))/0xb;if(_0x5d40b6===_0x1f7181)break;else _0x14d9eb['push'](_0x14d9eb['shift']());}catch(_0x5a134e){_0x14d9eb['push'](_0x14d9eb['shift']());}}}(a26_0x20a8,0xf0a19));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../sdk/query/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{getJobUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a26_0x2b98b4 from'chalk';function formatDuration(_0x3fec34){const _0x4b135e=a26_0x4dec;if(_0x3fec34<0x3c)return _0x3fec34+'s';if(_0x3fec34<0xe10)return Math[_0x4b135e(0xb2)](_0x3fec34/0x3c)+'m\x20'+_0x3fec34%0x3c+'s';const _0x6ddfcf=Math[_0x4b135e(0xb2)](_0x3fec34/0xe10),_0x3cf310=Math['floor'](_0x3fec34%0xe10/0x3c);return _0x3cf310>0x0?_0x6ddfcf+'h\x20'+_0x3cf310+'m':_0x6ddfcf+'h';}function formatRelativeTime(_0x1c75ce){const _0x5e6829=a26_0x4dec,_0x227eab=Date['now']()-_0x1c75ce[_0x5e6829(0xc9)](),_0x449bb0=Math['floor'](Math['abs'](_0x227eab)/0x3e8);if(_0x449bb0<0x3c)return'just\x20now';const _0x1bad25=Math[_0x5e6829(0xb2)](_0x449bb0/0x3c);if(_0x1bad25<0x3c)return _0x1bad25+_0x5e6829(0xa4);const _0x560661=Math['floor'](_0x1bad25/0x3c);if(_0x560661<0x18)return _0x560661+_0x5e6829(0x9b);const _0x555c17=Math[_0x5e6829(0xb2)](_0x560661/0x18);if(_0x555c17<0x1e)return _0x555c17+'d\x20ago';return Math[_0x5e6829(0xb2)](_0x555c17/0x1e)+'mo\x20ago';}export class JobListCommand extends BaseCommand{['name']='jobs';['description']='List\x20jobs';async[a26_0x42f72c(0xba)](_0x2f5252){const _0x28db30=a26_0x42f72c,{options:_0xd430e5,tdx:_0x410633}=_0x2f5252,_0x580339=resolveLimit(_0xd430e5[_0x28db30(0xa3)],DEFAULT_DISPLAY_LIMIT),_0x5f46e6=_0xd430e5['status'];_0xd430e5[_0x28db30(0xd6)]&&(console[_0x28db30(0xe2)](_0x28db30(0xda)+_0x580339+_0x28db30(0xd9)),_0x5f46e6&&console[_0x28db30(0xe2)]('Status\x20filter:\x20'+_0x5f46e6));const _0x53d9d7=await withSpinner('Listing\x20jobs...',()=>_0x410633[_0x28db30(0xa0)][_0x28db30(0xa1)]({'from':0x0,'to':_0x580339-0x1,'status':_0x5f46e6}),{'verbose':_0xd430e5[_0x28db30(0xd6)]}),_0x255dc6=_0x53d9d7['data'];console[_0x28db30(0xe2)](_0x28db30(0xab)+_0x255dc6[_0x28db30(0xd4)]+_0x28db30(0xd2)+(_0x255dc6[_0x28db30(0xd4)]!==0x1?'s':''));const _0x2a0922=_0xd430e5[_0x28db30(0xa9)];if(isStructuredFormat(_0xd430e5)){const _0x26b5f9=_0x255dc6[_0x28db30(0xe8)](_0x1b747c=>{const _0x13930a=_0x28db30;let _0x104c0b;if(_0x1b747c[_0x13930a(0xc5)]&&_0x1b747c[_0x13930a(0xe9)]){const _0x51b454=new Date(_0x1b747c[_0x13930a(0xc5)])[_0x13930a(0xc9)](),_0xaf9c90=new Date(_0x1b747c[_0x13930a(0xe9)])[_0x13930a(0xc9)]();_0x104c0b=Math['round']((_0xaf9c90-_0x51b454)/0x3e8);}return{'job_id':_0x1b747c[_0x13930a(0xbe)],'type':_0x1b747c['type']===_0x13930a(0xe5)?_0x13930a(0xe6):_0x1b747c[_0x13930a(0xa2)],'status':_0x1b747c[_0x13930a(0xe1)],'user_name':_0x1b747c[_0x13930a(0xd0)],'duration_sec':_0x104c0b,'created_at':_0x1b747c['created_at'],'started_at':_0x1b747c[_0x13930a(0xc5)],'end_at':_0x1b747c[_0x13930a(0xe9)]};});await handleSDKOutput(_0x26b5f9,_0xd430e5);}else for(const _0x4da8b2 of _0x255dc6){const _0x1e4b0d=_0x4da8b2[_0x28db30(0xe1)]===_0x28db30(0xe0)?a26_0x2b98b4[_0x28db30(0x9e)]:_0x4da8b2['status']==='error'?a26_0x2b98b4['red']:a26_0x2b98b4[_0x28db30(0xbf)],_0x57ae79=_0x1e4b0d(_0x4da8b2[_0x28db30(0xe1)]),_0x14063f=getJobUrl(_0x2a0922,_0x4da8b2['job_id']),_0x426793=hyperlink(_0x4da8b2[_0x28db30(0xbe)],_0x14063f),_0x51f49d=a26_0x2b98b4['dim'](_0x4da8b2[_0x28db30(0xa2)]===_0x28db30(0xe5)?_0x28db30(0xe6):_0x4da8b2[_0x28db30(0xa2)]),_0x3e7435=[];if(_0x4da8b2['start_at']&&_0x4da8b2[_0x28db30(0xe9)]){const _0x375427=Math['round']((new Date(_0x4da8b2['end_at'])['getTime']()-new Date(_0x4da8b2[_0x28db30(0xc5)])[_0x28db30(0xc9)]())/0x3e8);_0x3e7435[_0x28db30(0x99)](formatDuration(_0x375427));}if(_0x4da8b2['end_at'])_0x3e7435[_0x28db30(0x99)](formatRelativeTime(new Date(_0x4da8b2['end_at'])));else _0x4da8b2['start_at']&&_0x3e7435[_0x28db30(0x99)](formatRelativeTime(new Date(_0x4da8b2[_0x28db30(0xc5)])));const _0x3c47c7=_0x3e7435['length']>0x0?a26_0x2b98b4[_0x28db30(0xbf)]('\x20'+_0x3e7435['join'](',\x20')):'';console[_0x28db30(0xbc)]('⚡\x20'+_0x426793+'\x20'+_0x51f49d+'\x20'+_0x57ae79+_0x3c47c7);}return 0x0;}}export class JobShowCommand extends BaseCommand{['name']=a26_0x42f72c(0xb9);[a26_0x42f72c(0xe4)]=a26_0x42f72c(0xc4);[a26_0x42f72c(0xc2)](_0x495e74){const _0x397414=a26_0x42f72c,_0x1fa363=_0x495e74[_0x397414(0xb6)][0x0];if(!_0x1fa363)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>';return undefined;}async[a26_0x42f72c(0xba)](_0x79e4cc){const _0x4baadc=a26_0x42f72c,{options:_0x24b203,args:_0x3cec96,tdx:_0x1e144c}=_0x79e4cc,_0xae8ba6=_0x3cec96[0x0],_0x282476=await withSpinner(_0x4baadc(0xce),()=>_0x1e144c['jobs'][_0x4baadc(0xdc)](_0xae8ba6),{'verbose':_0x24b203[_0x4baadc(0xd6)]}),_0x1e9a90=_0x282476[_0x4baadc(0xc0)];let _0x15a67c;if(_0x1e9a90[_0x4baadc(0xc5)]&&_0x1e9a90[_0x4baadc(0xe9)]){const _0xd7c1bd=new Date(_0x1e9a90[_0x4baadc(0xc5)])[_0x4baadc(0xc9)](),_0x253e52=new Date(_0x1e9a90[_0x4baadc(0xe9)])['getTime']();_0x15a67c=Math[_0x4baadc(0xc7)]((_0x253e52-_0xd7c1bd)/0x3e8);}const _0x16612f={'job_id':_0x1e9a90[_0x4baadc(0xbe)],'type':_0x1e9a90[_0x4baadc(0xa2)],'status':_0x1e9a90[_0x4baadc(0xe1)],..._0x1e9a90[_0x4baadc(0xd0)]&&{'user_name':_0x1e9a90[_0x4baadc(0xd0)]},..._0x15a67c!==undefined&&{'duration_sec':_0x15a67c},..._0x1e9a90['created_at']&&{'created_at':_0x1e9a90['created_at']},..._0x1e9a90[_0x4baadc(0xc5)]&&{'started_at':_0x1e9a90[_0x4baadc(0xc5)]},..._0x1e9a90['end_at']&&{'end_at':_0x1e9a90[_0x4baadc(0xe9)]},..._0x1e9a90[_0x4baadc(0xd8)]&&{'database':_0x1e9a90[_0x4baadc(0xd8)]},..._0x1e9a90['priority']!==undefined&&{'priority':_0x1e9a90[_0x4baadc(0xde)]},..._0x1e9a90[_0x4baadc(0xa5)]&&{'url':_0x1e9a90[_0x4baadc(0xa5)]},..._0x1e9a90[_0x4baadc(0x9f)]&&{'query':_0x1e9a90[_0x4baadc(0x9f)]},..._0x1e9a90[_0x4baadc(0xd7)]&&{'debug':_0x1e9a90[_0x4baadc(0xd7)]}};return await handleSingleObjectOutput(_0x16612f,_0x24b203),0x0;}}function a26_0x4dec(_0x29f306,_0x4755c7){_0x29f306=_0x29f306-0x98;const _0x20a844=a26_0x20a8();let _0x4dec01=_0x20a844[_0x29f306];return _0x4dec01;}export class JobKillCommand extends BaseCommand{[a26_0x42f72c(0xa8)]=a26_0x42f72c(0xdd);[a26_0x42f72c(0xe4)]=a26_0x42f72c(0xb3);[a26_0x42f72c(0xc2)](_0x468819){const _0x4563d6=a26_0x42f72c,_0x4b67ae=_0x468819[_0x4563d6(0xb6)][0x0];if(!_0x4b67ae)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>';return undefined;}async[a26_0x42f72c(0xba)](_0x56f666){const _0x24c31c=a26_0x42f72c,{options:_0xe4b58e,args:_0x3c0f7e,tdx:_0x5f18e6}=_0x56f666,_0x3ccdfe=_0x3c0f7e[0x0];if(!_0xe4b58e[_0x24c31c(0xb7)]){const _0x2882f4=await confirm(_0x24c31c(0xdb)+_0x3ccdfe+'?');if(!_0x2882f4)return console['error'](_0x24c31c(0xb8)),0x0;}return await withSpinner(_0x24c31c(0xe3),()=>_0x5f18e6[_0x24c31c(0xa0)][_0x24c31c(0xaf)](_0x3ccdfe),{'verbose':_0xe4b58e[_0x24c31c(0xd6)]}),console[_0x24c31c(0xe2)]('✔\x20Kill\x20request\x20submitted\x20for\x20job\x20'+_0x3ccdfe),console[_0x24c31c(0xe2)](_0x24c31c(0x9d)+_0x3ccdfe+'\x27\x20to\x20verify\x20the\x20job\x20status'),0x0;}}export class JobSubmitCommand extends BaseCommand{[a26_0x42f72c(0xa8)]=a26_0x42f72c(0xd5);['description']=a26_0x42f72c(0xcf);async[a26_0x42f72c(0xba)](_0x4bf657){const _0x2aaabb=a26_0x42f72c,{options:_0x64990a,args:_0x959fd4,tdx:_0x78dcee}=_0x4bf657,_0x3131f4=_0x64990a['jobType']||_0x2aaabb(0xe6),_0x3a40e4=_0x64990a[_0x2aaabb(0xb1)],_0x20cb7a=_0x64990a[_0x2aaabb(0xd8)]||_0x2aaabb(0xa6),_0x13451f=_0x64990a[_0x2aaabb(0xac)];if(_0x3131f4!==_0x2aaabb(0xe6)&&_0x3131f4!=='hive')throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2aaabb(0xaa));let _0x4793c9;if(_0x3a40e4){if(_0x959fd4[0x0])throw new SDKError(ErrorCode[_0x2aaabb(0xbd)],_0x2aaabb(0xca));const _0x3d07b8=readSqlStatementsFromFile(_0x3a40e4);if(_0x3d07b8['length']===0x0)throw new SDKError(ErrorCode[_0x2aaabb(0xbd)],'No\x20SQL\x20statements\x20found\x20in\x20file');if(_0x3d07b8[_0x2aaabb(0xd4)]>0x1)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.');_0x4793c9=_0x3d07b8[0x0];}else{if(!_0x959fd4[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2aaabb(0xae));_0x4793c9=_0x959fd4[0x0];}_0x64990a[_0x2aaabb(0xd6)]&&(console['error'](_0x2aaabb(0x98)+_0x3131f4),console[_0x2aaabb(0xe2)]('Database:\x20'+_0x20cb7a),console[_0x2aaabb(0xe2)](_0x2aaabb(0xc3)+_0x4793c9[_0x2aaabb(0xd1)](0x0,0x64)+(_0x4793c9[_0x2aaabb(0xd4)]>0x64?_0x2aaabb(0xb5):'')));const _0x57be4c=await withSpinner(_0x2aaabb(0xbb),()=>_0x78dcee[_0x2aaabb(0xa0)]['submit'](_0x20cb7a,_0x4793c9,_0x3131f4,_0x13451f),{'verbose':_0x64990a[_0x2aaabb(0xd6)]}),_0x3a1067=_0x57be4c[_0x2aaabb(0xc0)];return console[_0x2aaabb(0xe2)](_0x2aaabb(0x9a)),console[_0x2aaabb(0xe2)]('\x20\x20Job\x20ID:\x20'+_0x3a1067['job_id']),await handleSDKOutput([_0x3a1067],_0x64990a),0x0;}}export class JobResultCommand extends BaseCommand{[a26_0x42f72c(0xa8)]='job:result';['description']=a26_0x42f72c(0xc6);[a26_0x42f72c(0xc2)](_0x4c5c9c){const _0x460d6c=a26_0x42f72c,_0xe65a68=_0x4c5c9c['args'][0x0];if(!_0xe65a68)return _0x460d6c(0xe7);return undefined;}async[a26_0x42f72c(0xba)](_0xb96557){const _0xff61da=a26_0x42f72c,{options:_0x11db6c,args:_0x210314,tdx:_0xfa9bff}=_0xb96557,_0x387a4f=_0x210314[0x0],_0xa72318=await withSpinner(_0xff61da(0xa7),()=>_0xfa9bff[_0xff61da(0xa0)][_0xff61da(0xac)](_0x387a4f),{'verbose':_0x11db6c[_0xff61da(0xd6)]}),_0x2b6625=_0xa72318[_0xff61da(0xc0)];return console[_0xff61da(0xe2)](_0xff61da(0xb0)+_0x2b6625[_0xff61da(0xd4)]+'\x20row'+(_0x2b6625['length']!==0x1?'s':'')),await handleSDKOutput(_0x2b6625,_0x11db6c),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x363bd7=a27_0x2667;(function(_0x2a0c5f,_0x12c4a6){const _0x27958a=a27_0x2667,_0x3002d2=_0x2a0c5f();while(!![]){try{const _0x556356=-parseInt(_0x27958a(0x1e1))/0x1*(parseInt(_0x27958a(0x203))/0x2)+-parseInt(_0x27958a(0x19a))/0x3+-parseInt(_0x27958a(0x1e2))/0x4+parseInt(_0x27958a(0x122))/0x5+parseInt(_0x27958a(0xfd))/0x6*(parseInt(_0x27958a(0x202))/0x7)+-parseInt(_0x27958a(0x200))/0x8+parseInt(_0x27958a(0x1c7))/0x9*(parseInt(_0x27958a(0x12b))/0xa);if(_0x556356===_0x12c4a6)break;else _0x3002d2['push'](_0x3002d2['shift']());}catch(_0x32b08a){_0x3002d2['push'](_0x3002d2['shift']());}}}(a27_0x43f2,0x57948));import a27_0x241683 from'chalk';import a27_0x5d2d5b from'path';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{aggregateStageHistory,assembleJourneyStats,buildStageNameMap}from'../sdk/journey.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{confirm,confirmKey,isInteractive}from'../utils/prompt.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{journeyResponseToDef,toYamlString,parseYamlString,normalizeJourneyDef}from'../sdk/segment/journey-yaml.js';import{segmentResponseToDef,journeyActivationStepToYaml,serializeRule}from'../sdk/segment/child-segment-yaml.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';import{SegmentPushCommand}from'./segment-push-command.js';import{buildFolderIdToPathMap}from'../sdk/segment/resolution-context.js';import{createTdxConfigContent}from'../sdk/segment/tdx-config.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyDef,createJumpTargetCache,resolveJumpTarget}from'../sdk/segment/journey-utils.js';import{getConsoleNextUrl,getWorkflowSessionUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import{hyperlink}from'../sdk/util/formatters.js';function requireNameOrPath(_0x1ec54e){const _0x54fed2=a27_0x2667;return!_0x1ec54e&&(console[_0x54fed2(0x1d4)](_0x54fed2(0x1f7)),console[_0x54fed2(0x1d4)]('Usage:\x20journey\x20<subcommand>\x20<name-or-path>')),!!_0x1ec54e;}function withJsonFormat(_0x264017){const _0x51f9c3=a27_0x2667;if(!_0x264017[_0x51f9c3(0x149)]&&!_0x264017[_0x51f9c3(0x1e3)]&&!_0x264017[_0x51f9c3(0x12c)]&&!_0x264017[_0x51f9c3(0x160)])return{..._0x264017,'format':'json','json':!![]};return _0x264017;}function formatJourneyState(_0xee0e13){const _0x4e1be4=a27_0x2667;switch(_0xee0e13){case _0x4e1be4(0xd5):return a27_0x241683[_0x4e1be4(0xee)](_0x4e1be4(0x101));case _0x4e1be4(0x18c):return a27_0x241683[_0x4e1be4(0x11f)](_0x4e1be4(0x1b5));case _0x4e1be4(0x1ec):return a27_0x241683['yellow']('(paused)');case _0x4e1be4(0xe3):return a27_0x241683['blue'](_0x4e1be4(0x1d5));case'archived':return a27_0x241683[_0x4e1be4(0x11f)](_0x4e1be4(0x19f));default:return'('+_0xee0e13+')';}}function formatJourneyItem(_0x1ca1fc,_0x2ef9e2='',_0x51163c){const _0x2a9ef9=a27_0x2667,_0x280e05=formatJourneyState(_0x1ca1fc[_0x2a9ef9(0x1d2)]),_0x5878ae=_0x51163c?hyperlink(_0x1ca1fc[_0x2a9ef9(0xf9)],_0x51163c):_0x1ca1fc[_0x2a9ef9(0xf9)];return _0x2ef9e2+'🗺️\x20'+_0x5878ae+'\x20'+_0x280e05;}function escapeRegex(_0x170cd8){const _0x14512e=a27_0x2667;return _0x170cd8[_0x14512e(0x187)](/[.*+?^${}()|[\]\\]/g,_0x14512e(0x1c9));}function globToRegex(_0x2648f6){const _0x55feb9=a27_0x2667,_0x15d3a1=_0x2648f6['split']('*')['map'](escapeRegex);return new RegExp(_0x15d3a1[_0x55feb9(0x1b2)]('.*'),'i');}function buildRuleToNameMapping(_0x1ab9ae){const _0x5dc97b=a27_0x2667,_0x25c955=new Map();if(_0x1ab9ae[_0x5dc97b(0x12d)])for(const [_0x4c77e0,_0x43f656]of Object[_0x5dc97b(0x114)](_0x1ab9ae[_0x5dc97b(0x12d)])){if(_0x43f656[_0x5dc97b(0x134)]){const _0x42452b=serializeRule(_0x43f656[_0x5dc97b(0x134)]),_0x41117d=_0x25c955[_0x5dc97b(0x146)](_0x42452b);_0x41117d?_0x41117d[_0x5dc97b(0x14b)](_0x4c77e0):_0x25c955['set'](_0x42452b,[_0x4c77e0]);}}return _0x25c955;}async function resolveJourneyIdFromInput(_0x1d8e84,_0x2401e1,_0x5c33d8){const _0x384d4a=a27_0x2667,_0x4da578=await resolveJourneyTarget(_0x1d8e84,_0x2401e1[_0x384d4a(0x135)],_0x2401e1[_0x384d4a(0x1b7)]),_0x31bc58=_0x4da578[_0x384d4a(0x135)];if(!_0x31bc58)throw new SDKError(ErrorCode[_0x384d4a(0x1ab)],_0x384d4a(0x148));const _0x375af3=await withSpinner(_0x384d4a(0x142),()=>_0x5c33d8[_0x384d4a(0x1b6)]['resolveParentId'](_0x31bc58),{'verbose':_0x2401e1['verbose']}),_0x392f17=_0x375af3[_0x384d4a(0x129)],_0x53c612=await withSpinner(_0x384d4a(0x1f8),()=>_0x5c33d8[_0x384d4a(0x1ba)]['resolveJourneyId'](_0x392f17,_0x4da578[_0x384d4a(0x1a8)]),{'verbose':_0x2401e1[_0x384d4a(0x1b7)]});return{'journeyId':_0x53c612[_0x384d4a(0x129)],'journeyName':_0x4da578[_0x384d4a(0x1a8)],'parentSegmentId':_0x392f17};}async function resolveJourneyTarget(_0x53a3fd,_0x1c0e10,_0x4a0fa9){const _0x2d6aca=a27_0x2667;if(isYamlFilePath(_0x53a3fd))try{const _0x12ebb6=await resolveYamlFilePath(_0x53a3fd);return _0x4a0fa9&&(console[_0x2d6aca(0x1d4)]('Resolved\x20YAML\x20file:\x20'+_0x53a3fd),console[_0x2d6aca(0x1d4)]('\x20\x20Parent\x20segment:\x20'+_0x12ebb6[_0x2d6aca(0x135)]),console[_0x2d6aca(0x1d4)](_0x2d6aca(0x13a)+_0x12ebb6[_0x2d6aca(0x1ff)]),console[_0x2d6aca(0x1d4)]('\x20\x20Folder\x20path:\x20'+(_0x12ebb6['folderPath']||_0x2d6aca(0x12f)))),{'journeyName':_0x12ebb6['segmentName'],'parentSegment':_0x12ebb6[_0x2d6aca(0x135)],'resolved':_0x12ebb6};}catch(_0x101595){throw new SDKError(ErrorCode[_0x2d6aca(0x1ab)],'Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20'+_0x101595['message']);}if(!_0x1c0e10)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2d6aca(0x12a));return{'journeyName':_0x53a3fd,'parentSegment':_0x1c0e10};}export class JourneyListCommand extends BaseCommand{[a27_0x363bd7(0x113)]='journey:list';[a27_0x363bd7(0x139)]='List\x20journeys\x20in\x20current\x20context';async[a27_0x363bd7(0x1f2)](_0x4c6838){const _0x713ee6=a27_0x363bd7,{options:_0x28ea28,args:_0x512621,tdx:_0x2d3513}=_0x4c6838,_0x2862c7=_0x512621[0x0],_0x571ddc=_0x28ea28[_0x713ee6(0x135)];if(!_0x571ddc)return console['error'](_0x713ee6(0x190)),console['error'](_0x713ee6(0x1a0)),0x1;const _0x54206d=await withSpinner(_0x713ee6(0x142),()=>_0x2d3513[_0x713ee6(0x1b6)]['resolveParentId'](_0x571ddc),{'verbose':_0x28ea28[_0x713ee6(0x1b7)]}),_0x5503f0=_0x54206d['data'];_0x28ea28['verbose']&&(console['error'](_0x713ee6(0xdd)+_0x571ddc+_0x713ee6(0x172)+_0x5503f0+')'),_0x2862c7&&console['error']('Pattern:\x20'+_0x2862c7));const _0x4bfd0b=await withSpinner(_0x713ee6(0x1b9),()=>_0x2d3513[_0x713ee6(0x1b6)][_0x713ee6(0x18d)](_0x5503f0),{'verbose':_0x28ea28[_0x713ee6(0x1b7)]}),_0x51846b=_0x4bfd0b['data'],_0x54ce23=_0x51846b['rootFolderId'],_0x26b063=await withSpinner('Listing\x20journeys...',()=>_0x2d3513[_0x713ee6(0x1ba)]['listJourneysWithFolders'](_0x5503f0,_0x54ce23),{'verbose':_0x28ea28[_0x713ee6(0x1b7)]});let _0x3ade1d=_0x26b063[_0x713ee6(0x129)]['journeys'];const _0xe3faf3=_0x26b063[_0x713ee6(0x129)][_0x713ee6(0x1a2)],_0x57cb1f=new Map();for(const _0x4150f4 of _0xe3faf3){_0x57cb1f['set'](_0x4150f4['id'],_0x4150f4[_0x713ee6(0x113)]);}if(_0x2862c7){const _0x4942db=globToRegex(_0x2862c7);_0x3ade1d=_0x3ade1d[_0x713ee6(0x1ea)](_0x35891a=>_0x4942db[_0x713ee6(0x10b)](_0x35891a[_0x713ee6(0xf9)]));}console[_0x713ee6(0x1d4)](_0x713ee6(0x183)+_0x3ade1d[_0x713ee6(0x198)]+_0x713ee6(0xf6)+(_0x3ade1d['length']!==0x1?'s':''));const _0x22a0aa=_0x579172=>{const _0x4ae7f8=_0x713ee6;return getConsoleNextUrl(_0x28ea28[_0x4ae7f8(0x164)],_0x4ae7f8(0x169)+_0x5503f0+_0x4ae7f8(0x18f)+_0x579172+_0x4ae7f8(0x143));};if(_0x28ea28[_0x713ee6(0x149)]===_0x713ee6(0x115))await handleSDKOutput(_0x3ade1d,_0x28ea28);else{if(_0x28ea28[_0x713ee6(0x149)]==='json'){const _0x2be437=_0x3ade1d[_0x713ee6(0x19e)](_0x14d7b6=>({..._0x14d7b6,'url':_0x22a0aa(_0x14d7b6['id'])}));await handleSDKOutput(_0x2be437,_0x28ea28);}else{console['log']('['+_0x571ddc+']');const _0x28fcbf=new Map(),_0x52baf4=[];for(const _0x4b6a8d of _0x3ade1d){if(!_0x4b6a8d[_0x713ee6(0x1bf)]||_0x4b6a8d[_0x713ee6(0x1bf)]===_0x54ce23)_0x52baf4[_0x713ee6(0x14b)](_0x4b6a8d);else{const _0xb0e211=_0x28fcbf['get'](_0x4b6a8d[_0x713ee6(0x1bf)])||[];_0xb0e211[_0x713ee6(0x14b)](_0x4b6a8d),_0x28fcbf[_0x713ee6(0x1e9)](_0x4b6a8d['folderId'],_0xb0e211);}}const _0x20d5ae=(_0x2cf8ed,_0x3e5697)=>_0x2cf8ed['journeyBundleName'][_0x713ee6(0xfc)](_0x3e5697[_0x713ee6(0xf9)],undefined,{'sensitivity':_0x713ee6(0x14e)});_0x52baf4[_0x713ee6(0x1e6)](_0x20d5ae);for(const _0xb14602 of _0x52baf4){console[_0x713ee6(0xf2)](formatJourneyItem(_0xb14602,'',_0x22a0aa(_0xb14602['id'])));}const _0x355a5a=[..._0x28fcbf['entries']()][_0x713ee6(0x1e6)]((_0xf73dc,_0x1a31a4)=>{const _0x356568=_0x713ee6,_0x3e9a5f=_0x57cb1f[_0x356568(0x146)](_0xf73dc[0x0])||_0xf73dc[0x0],_0x2d0c04=_0x57cb1f[_0x356568(0x146)](_0x1a31a4[0x0])||_0x1a31a4[0x0];return _0x3e9a5f['localeCompare'](_0x2d0c04,undefined,{'sensitivity':_0x356568(0x14e)});});for(const [_0x2d46d1,_0x11b648]of _0x355a5a){const _0x42c29f=_0x57cb1f[_0x713ee6(0x146)](_0x2d46d1)||_0x2d46d1;console[_0x713ee6(0xf2)]('📁\x20'+_0x42c29f),_0x11b648[_0x713ee6(0x1e6)](_0x20d5ae);for(const _0x3703b7 of _0x11b648){console['log'](formatJourneyItem(_0x3703b7,'\x20\x20',_0x22a0aa(_0x3703b7['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{['name']=a27_0x363bd7(0x1fe);['description']=a27_0x363bd7(0x120);async[a27_0x363bd7(0x1f2)](_0x573489){const _0x1ad072=a27_0x363bd7,{options:_0x452c67,args:_0x4f80da,tdx:_0x5cb494}=_0x573489,_0x26a17e=_0x4f80da[0x0];if(!_0x26a17e)return console['error'](_0x1ad072(0x1f7)),console[_0x1ad072(0x1d4)](_0x1ad072(0x17e)),console['error'](_0x1ad072(0x1c6)),console['error'](_0x1ad072(0x104)),0x1;_0x452c67[_0x1ad072(0x1b7)]&&console[_0x1ad072(0x1d4)]('Input:\x20'+_0x26a17e);const {journeyId:_0x156b70,parentSegmentId:_0x992be9}=await resolveJourneyIdFromInput(_0x26a17e,_0x452c67,_0x5cb494);if(_0x452c67[_0x1ad072(0x179)]){const _0x4eb998=getConsoleNextUrl(_0x452c67[_0x1ad072(0x164)],_0x1ad072(0x169)+_0x992be9+_0x1ad072(0x18f)+_0x156b70+_0x1ad072(0x1c0));return console[_0x1ad072(0x1d4)](a27_0x241683[_0x1ad072(0xee)]('✔')+'\x20Opening\x20'+a27_0x241683[_0x1ad072(0x111)](_0x4eb998)),openBrowser(_0x4eb998),0x0;}const _0x33c097=await withSpinner(_0x1ad072(0x16c),()=>_0x5cb494[_0x1ad072(0x1ba)]['getJourney'](_0x156b70),{'verbose':_0x452c67[_0x1ad072(0x1b7)]}),_0x1fce61=_0x33c097[_0x1ad072(0x129)],_0x1b9855=_0x452c67['includeStats'];let _0x22169a;if(_0x1b9855)try{const _0x32f1f2=await withSpinner(_0x1ad072(0x171),()=>_0x5cb494[_0x1ad072(0x1ba)][_0x1ad072(0xf1)](_0x156b70),{'verbose':_0x452c67[_0x1ad072(0x1b7)]});_0x22169a=_0x32f1f2[_0x1ad072(0x129)];}catch{_0x452c67['verbose']&&console['error'](_0x1ad072(0x110));}const _0xd8668c=getConsoleNextUrl(_0x452c67[_0x1ad072(0x164)],_0x1ad072(0x169)+_0x992be9+_0x1ad072(0x18f)+_0x156b70+'/j/da/je'),_0x371d42={'id':_0x1fce61['id'],'name':_0x1fce61[_0x1ad072(0x147)][_0x1ad072(0x113)],'description':_0x1fce61['attributes'][_0x1ad072(0x139)],'state':_0x1fce61[_0x1ad072(0x147)]['state'],'paused':_0x1fce61[_0x1ad072(0x147)]['paused'],'reentry_mode':_0x1fce61[_0x1ad072(0x147)][_0x1ad072(0x197)],'stages':_0x1fce61['attributes'][_0x1ad072(0x16d)]?.[_0x1ad072(0x198)]||0x0,..._0x1fce61['attributes'][_0x1ad072(0x1c5)]&&{'goal':_0x1fce61['attributes'][_0x1ad072(0x1c5)][_0x1ad072(0x113)]},..._0x22169a&&{'statistics':{'size':_0x22169a[_0x1ad072(0x126)],'entered':_0x22169a[_0x1ad072(0x1fa)],'goal_achieved':_0x22169a[_0x1ad072(0x1df)],'completion_rate':_0x22169a['completionRate'],'exit_or_jump':_0x22169a[_0x1ad072(0x1c3)],'exit_or_jump_rate':_0x22169a['exitOrJumpRate'],'stages':_0x22169a[_0x1ad072(0x144)]}},'url':_0xd8668c};return await handleSingleObjectOutput(_0x371d42,_0x452c67),0x0;}}export class JourneyStatsCommand extends BaseCommand{['name']=a27_0x363bd7(0xf5);[a27_0x363bd7(0x139)]=a27_0x363bd7(0x10c);async[a27_0x363bd7(0x1f2)](_0x2c26f3){const _0x578135=a27_0x363bd7,{options:_0x986316,args:_0x2a4306,tdx:_0x3a1eca}=_0x2c26f3,_0x22d715=_0x2a4306[0x0];if(!requireNameOrPath(_0x22d715))return 0x1;_0x986316[_0x578135(0x1b7)]&&console[_0x578135(0x1d4)](_0x578135(0x1f4)+_0x22d715);const _0x55b85=_0x986316,_0x811e6e=_0x55b85[_0x578135(0x13c)],_0x29b1f6=_0x55b85['to'],_0xf0c888=_0x55b85[_0x578135(0x10d)],_0x2120de=_0x55b85[_0x578135(0x1c4)];_0xf0c888&&!_0x811e6e&&!_0x29b1f6&&console[_0x578135(0x1d4)](_0x578135(0x182));const _0x3959b5=_0xf0c888?withJsonFormat(_0x986316):_0x986316,{journeyId:_0x77a1c7,journeyName:_0x11e822}=await resolveJourneyIdFromInput(_0x22d715,_0x3959b5,_0x3a1eca),_0x58420c=_0x811e6e||_0x29b1f6?{'from':_0x811e6e,'to':_0x29b1f6}:undefined,_0x59aa2e=await withSpinner('Getting\x20journey\x20statistics...',()=>Promise[_0x578135(0xdc)]([_0x3a1eca[_0x578135(0x1ba)][_0x578135(0x1c8)](_0x77a1c7),_0x3a1eca[_0x578135(0x1ba)][_0x578135(0xf1)](_0x77a1c7,_0x58420c)]),{'verbose':_0x3959b5[_0x578135(0x1b7)]}),[_0xc61890,_0x44000f]=_0x59aa2e[_0x578135(0x129)];if(!_0x44000f||_0x44000f[_0x578135(0x1c2)]===null)return console[_0x578135(0x1d4)](_0x578135(0xf0)+_0x11e822),console[_0x578135(0x1d4)](_0x578135(0x193)),0x0;const _0x5ee543=buildStageNameMap(_0xc61890),_0x4a32ac=!!(_0x58420c&&_0x44000f[_0x578135(0x1d8)]?.[_0x578135(0x198)]),_0x379835={'stageNameMap':_0x5ee543,'hasPeriod':_0x4a32ac,'includeHistory':!!_0xf0c888};if(_0x2120de&&_0x44000f[_0x578135(0x144)]){const _0x51533=_0x44000f['stages'][_0x578135(0x1bd)](_0x2be13e=>{const _0x105dc2=_0x578135,_0xde0d82=_0x5ee543[_0x105dc2(0x146)](_0x2be13e['id'])??'';return _0xde0d82['toLowerCase']()===_0x2120de[_0x105dc2(0x16e)]();});if(_0x51533)return await handleSingleObjectOutput(formatStageStats(_0x51533,_0x379835),_0x3959b5),0x0;const _0x279bdf=_0x44000f['stages'][_0x578135(0x19e)](_0x3fb302=>_0x5ee543[_0x578135(0x146)](_0x3fb302['id'])??_0x3fb302['id']);return console[_0x578135(0x1d4)](_0x578135(0x14d)+_0x2120de+_0x578135(0x1db)),console['error'](_0x578135(0xfe)+_0x279bdf[_0x578135(0x1b2)](',\x20')),0x1;}const _0x33fd1e=_0x44000f[_0x578135(0x144)]?.[_0x578135(0x19e)](_0x2f1cb2=>formatStageStats(_0x2f1cb2,_0x379835)),_0x5ac0b2=assembleJourneyStats(_0x44000f,{'from':_0x811e6e,'to':_0x29b1f6,'includeHistory':_0xf0c888});return await this['renderStats'](_0x5ac0b2,_0x33fd1e??[],_0x3959b5),0x0;}async[a27_0x363bd7(0x17d)](_0x14b069,_0x4f8016,_0x5c2fe3){const _0x10d9d6=a27_0x363bd7,_0x23379c=_0x5c2fe3['format']===_0x10d9d6(0x1e3)||_0x5c2fe3[_0x10d9d6(0x149)]===_0x10d9d6(0x12c)||_0x5c2fe3['json']||_0x5c2fe3[_0x10d9d6(0x12c)];if(_0x23379c){_0x14b069[_0x10d9d6(0x144)]=_0x4f8016,await handleSingleObjectOutput(_0x14b069,_0x5c2fe3);return;}await handleSingleObjectOutput(_0x14b069,_0x5c2fe3);for(const _0x57fea6 of _0x4f8016){console[_0x10d9d6(0xf2)](''),console[_0x10d9d6(0xf2)](String(a27_0x241683[_0x10d9d6(0x111)][_0x10d9d6(0x127)]('['+_0x57fea6['name']+']'))+a27_0x241683[_0x10d9d6(0x11f)]('\x20'+_0x57fea6['id']));const {id:_0x3d4403,name:_0x3c2b59,..._0x368dd1}=_0x57fea6;await handleSingleObjectOutput(_0x368dd1,_0x5c2fe3);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x363bd7(0x113)]='journey:traffic';[a27_0x363bd7(0x139)]=a27_0x363bd7(0x132);async['execute'](_0x38e930){const _0x2c702a=a27_0x363bd7,{options:_0x5df529,args:_0x47d3ac,tdx:_0x68d842}=_0x38e930,_0x77f335=_0x47d3ac[0x0];if(!requireNameOrPath(_0x77f335))return 0x1;_0x5df529[_0x2c702a(0x1b7)]&&console[_0x2c702a(0x1d4)](_0x2c702a(0x1f4)+_0x77f335);const _0x2e4db4=_0x5df529,_0x4b79e8=_0x2e4db4[_0x2c702a(0x156)],_0x1fc6f7=_0x2e4db4[_0x2c702a(0x13c)],_0xebd471=_0x2e4db4['to'],_0x59f1e8=_0x2e4db4[_0x2c702a(0x161)];if(_0x4b79e8&&_0x4b79e8!=='conversion'&&_0x4b79e8!==_0x2c702a(0x158))return console[_0x2c702a(0x1d4)](_0x2c702a(0x17f)+_0x4b79e8+_0x2c702a(0xe4)),0x1;const _0x52c401=withJsonFormat(_0x5df529),{journeyId:_0x4f6920,journeyName:_0x5eabda}=await resolveJourneyIdFromInput(_0x77f335,_0x52c401,_0x68d842),_0x24f2c2={'type':_0x4b79e8,'from':_0x1fc6f7,'to':_0xebd471,'limit':_0x59f1e8},_0xd896f5=await withSpinner('Getting\x20journey\x20traffic\x20data...',()=>_0x68d842['journey'][_0x2c702a(0x108)](_0x4f6920,_0x24f2c2),{'verbose':_0x52c401[_0x2c702a(0x1b7)]}),_0x1a197a=_0xd896f5[_0x2c702a(0x129)],_0x18d7b3=_0x1a197a[_0x2c702a(0x15e)]&&(_0x1a197a['conversion'][_0x2c702a(0x13e)][_0x2c702a(0x198)]>0x0||_0x1a197a[_0x2c702a(0x15e)][_0x2c702a(0xfb)][_0x2c702a(0x198)]>0x0),_0x38bb15=_0x1a197a[_0x2c702a(0x158)]&&_0x1a197a['activation'][_0x2c702a(0x198)]>0x0;if(!_0x18d7b3&&!_0x38bb15)return console[_0x2c702a(0x1d4)](_0x2c702a(0x1ce)+_0x5eabda),console[_0x2c702a(0x1d4)]('Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.'),_0x1fc6f7&&_0xebd471&&console['error'](_0x2c702a(0x18b)),0x0;return await handleSingleObjectOutput(_0x1a197a,_0x52c401),0x0;}}function formatStageStats(_0x2773f3,_0x252c4b){const _0x283d71=a27_0x363bd7,_0x4f74a5=_0x252c4b[_0x283d71(0x1b1)]&&_0x2773f3[_0x283d71(0x1d8)]?.[_0x283d71(0x198)]?aggregateStageHistory(_0x2773f3['history']):{'size':_0x2773f3['size'],'entered':_0x2773f3['enteredSize'],'milestone':_0x2773f3[_0x283d71(0x1bc)],'milestone_rate':_0x2773f3[_0x283d71(0x11a)],'exit_or_jump':_0x2773f3['exitOrJumpSize'],'exit_or_jump_rate':_0x2773f3[_0x283d71(0x1b8)]},_0xeddd04={'id':_0x2773f3['id'],'name':_0x252c4b[_0x283d71(0xd8)][_0x283d71(0x146)](_0x2773f3['id'])??_0x2773f3['id'],..._0x4f74a5};return _0x252c4b[_0x283d71(0x1b1)]&&_0x252c4b[_0x283d71(0x10d)]&&_0x2773f3['history']&&(_0xeddd04[_0x283d71(0x1d8)]=_0x2773f3[_0x283d71(0x1d8)]),_0xeddd04;}export class JourneyPauseCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x13f);[a27_0x363bd7(0x139)]=a27_0x363bd7(0x159);async[a27_0x363bd7(0x1f2)](_0x1111ec){const _0x1889a7=a27_0x363bd7,{options:_0x2a9d31,args:_0x470b24,tdx:_0x2746ae}=_0x1111ec,_0x23590b=_0x470b24[0x0];if(!requireNameOrPath(_0x23590b))return 0x1;_0x2a9d31[_0x1889a7(0x1b7)]&&console['error'](_0x1889a7(0x1f4)+_0x23590b);const {journeyId:_0x238724,journeyName:_0x5deefe}=await resolveJourneyIdFromInput(_0x23590b,_0x2a9d31,_0x2746ae);if(!_0x2a9d31[_0x1889a7(0xfa)]){const _0x3208e5=await confirm(_0x1889a7(0x14c)+_0x5deefe+'\x22?');if(!_0x3208e5)return console['error'](_0x1889a7(0x10f)),0x0;}const _0x2ebaec=await withSpinner(_0x1889a7(0x1de),()=>_0x2746ae['journey'][_0x1889a7(0x1aa)](_0x238724),{'verbose':_0x2a9d31[_0x1889a7(0x1b7)]}),_0x58b961=_0x2ebaec['data'];return console[_0x1889a7(0x1d4)](_0x1889a7(0x103)+_0x58b961['attributes'][_0x1889a7(0x113)]+'\x22\x20paused'),0x0;}}export class JourneyRunCommand extends BaseCommand{['name']='journey:run';['description']='Trigger\x20on-demand\x20journey\x20workflow\x20execution';async[a27_0x363bd7(0x1f2)](_0x940919){const _0x4868e8=a27_0x363bd7,{options:_0x46c7cd,args:_0x20feac,tdx:_0xd7d0af}=_0x940919,_0x590e48=_0x20feac[0x0];if(!requireNameOrPath(_0x590e48))return 0x1;_0x46c7cd['verbose']&&console['error']('Input:\x20'+_0x590e48);const {journeyId:_0x1e1081,journeyName:_0x538fb2}=await resolveJourneyIdFromInput(_0x590e48,_0x46c7cd,_0xd7d0af);if(_0x46c7cd[_0x4868e8(0x1ac)])return await this['executeDryRun'](_0x940919,_0x1e1081,_0x538fb2);if(!_0x46c7cd[_0x4868e8(0xfa)]){const _0x2c0f35=await confirm(_0x4868e8(0x13d)+_0x538fb2+'\x22?');if(!_0x2c0f35)return console[_0x4868e8(0x1d4)](_0x4868e8(0x10f)),0x0;}const _0x4ab574=await withSpinner(_0x4868e8(0xeb),()=>_0xd7d0af['journey'][_0x4868e8(0x199)](_0x1e1081),{'verbose':_0x46c7cd[_0x4868e8(0x1b7)]}),_0x4618a7=_0x4ab574[_0x4868e8(0x129)],_0x3cfd04=getWorkflowSessionUrl(_0x46c7cd[_0x4868e8(0x164)],_0x4618a7[_0x4868e8(0x162)],_0x4618a7['workflowSessionId']);return console[_0x4868e8(0x1d4)]('\x0a'+a27_0x241683[_0x4868e8(0xee)]('✔')+_0x4868e8(0xd9)),console['error']('\x20\x20'+a27_0x241683[_0x4868e8(0x11f)](_0x4868e8(0x1f1))+'\x20'+_0x538fb2),console[_0x4868e8(0x1d4)]('\x20\x20'+a27_0x241683['dim'](_0x4868e8(0x181))+'\x20'+_0x4618a7[_0x4868e8(0x10a)]),console['error']('\x20\x20'+a27_0x241683[_0x4868e8(0x11f)](_0x4868e8(0x1a3))+'\x20'+_0x4618a7[_0x4868e8(0x11c)]),console['error']('\x20\x20'+_0x3cfd04),0x0;}async[a27_0x363bd7(0x206)](_0x54a00c,_0x18715c,_0x4121a3){const _0x5cebf9=a27_0x363bd7,{options:_0x285679,tdx:_0x245562}=_0x54a00c,_0x29c59d=await withSpinner('Fetching\x20journey\x20'+_0x4121a3+_0x5cebf9(0x1b0),()=>Promise[_0x5cebf9(0xdc)]([_0x245562[_0x5cebf9(0x1ba)][_0x5cebf9(0x1c8)](_0x18715c),_0x245562[_0x5cebf9(0x1ba)]['listActivationsFlat'](_0x18715c)]),{'verbose':_0x285679[_0x5cebf9(0x1b7)]}),[_0x4be95a,_0x463e09]=_0x29c59d[_0x5cebf9(0x129)],_0x2a64de=_0x4be95a[_0x5cebf9(0x147)],_0x1fe0e6=_0x2a64de[_0x5cebf9(0x16d)];console[_0x5cebf9(0xf2)](a27_0x241683[_0x5cebf9(0x127)](_0x5cebf9(0x1f1)),_0x2a64de[_0x5cebf9(0x113)]),console['log'](a27_0x241683[_0x5cebf9(0x127)](_0x5cebf9(0x1dd)),_0x4be95a['id']),console[_0x5cebf9(0xf2)](a27_0x241683[_0x5cebf9(0x127)]('State:'),_0x2a64de['state']),console[_0x5cebf9(0xf2)](a27_0x241683[_0x5cebf9(0x127)](_0x5cebf9(0x137)),_0x2a64de[_0x5cebf9(0x1ec)]?a27_0x241683[_0x5cebf9(0x14a)]('yes'):a27_0x241683[_0x5cebf9(0xee)]('no')),console['log'](a27_0x241683[_0x5cebf9(0x127)](_0x5cebf9(0x117)),_0x2a64de[_0x5cebf9(0x11d)]);const _0x312790=_0x1fe0e6[_0x5cebf9(0x198)]>0x0?'\x20('+_0x1fe0e6[_0x5cebf9(0x19e)](_0x173146=>_0x173146['name'])[_0x5cebf9(0x1b2)](',\x20')+')':'';console[_0x5cebf9(0xf2)](a27_0x241683[_0x5cebf9(0x127)](_0x5cebf9(0x130)),''+_0x1fe0e6['length']+_0x312790),console[_0x5cebf9(0xf2)]('');if(_0x463e09['length']===0x0)console[_0x5cebf9(0xf2)](a27_0x241683[_0x5cebf9(0x127)]('Activations:'),a27_0x241683[_0x5cebf9(0x11f)](_0x5cebf9(0x157)));else{console[_0x5cebf9(0xf2)](a27_0x241683['bold']('Activations:'));for(const _0x26b008 of _0x463e09){const _0x460719=_0x26b008[_0x5cebf9(0x113)]??'(unnamed)',_0x38eb2b=_0x26b008[_0x5cebf9(0x1d1)]!=null?'connection\x20'+_0x26b008[_0x5cebf9(0x1d1)]:_0x5cebf9(0xe7),_0x2e39ba=_0x26b008[_0x5cebf9(0x112)]?''+_0x26b008['scheduleType']+(_0x26b008[_0x5cebf9(0x201)]?'\x20@\x20'+_0x26b008[_0x5cebf9(0x201)]:''):_0x5cebf9(0x1e4),_0x5c6b0a=_0x26b008[_0x5cebf9(0x176)]?_0x5cebf9(0x1c1):'';console[_0x5cebf9(0xf2)]('\x20\x20'+a27_0x241683[_0x5cebf9(0x14a)](_0x5cebf9(0x1da))+'\x20'+_0x460719+_0x5cebf9(0x102)+_0x38eb2b+',\x20schedule:\x20'+_0x2e39ba+_0x5c6b0a);}}return console['log'](a27_0x241683['yellow']('\x0a[Dry\x20run]\x20Journey\x20workflow\x20was\x20NOT\x20triggered.')),0x0;}}export class JourneyResumeCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x1f0);['description']=a27_0x363bd7(0x174);async['execute'](_0x2af228){const _0x460c09=a27_0x363bd7,{options:_0x36d0a3,args:_0x115fe5,tdx:_0x22fd24}=_0x2af228,_0x580c32=_0x115fe5[0x0];if(!requireNameOrPath(_0x580c32))return 0x1;_0x36d0a3[_0x460c09(0x1b7)]&&console[_0x460c09(0x1d4)](_0x460c09(0x1f4)+_0x580c32);const {journeyId:_0x55b989,journeyName:_0x5969d4}=await resolveJourneyIdFromInput(_0x580c32,_0x36d0a3,_0x22fd24);if(_0x36d0a3[_0x460c09(0x1ac)])return await this[_0x460c09(0x206)](_0x2af228,_0x55b989,_0x5969d4);if(!_0x36d0a3[_0x460c09(0xfa)]){const _0x3044b0=await confirm(_0x460c09(0x178)+_0x5969d4+'\x22?');if(!_0x3044b0)return console['error']('Cancelled'),0x0;}const _0x782d73=await withSpinner('Resuming\x20journey...',()=>_0x22fd24[_0x460c09(0x1ba)][_0x460c09(0x18e)](_0x55b989),{'verbose':_0x36d0a3[_0x460c09(0x1b7)]}),_0x4ad79e=_0x782d73[_0x460c09(0x129)];return console[_0x460c09(0x1d4)](_0x460c09(0x103)+_0x4ad79e['attributes'][_0x460c09(0x113)]+_0x460c09(0x140)),0x0;}async[a27_0x363bd7(0x206)](_0x261691,_0x26bb4e,_0x1789ab){const _0x5bbd69=a27_0x363bd7,{options:_0x271787,tdx:_0x3243c5}=_0x261691,_0x1b7a1f=await withSpinner(_0x5bbd69(0x107)+_0x1789ab+_0x5bbd69(0x1b0),()=>Promise[_0x5bbd69(0xdc)]([_0x3243c5['journey'][_0x5bbd69(0x1c8)](_0x26bb4e),_0x3243c5[_0x5bbd69(0x1ba)]['listActivationsFlat'](_0x26bb4e)]),{'verbose':_0x271787[_0x5bbd69(0x1b7)]}),[_0x41d263,_0x5637c7]=_0x1b7a1f[_0x5bbd69(0x129)],_0x41cc78=_0x41d263[_0x5bbd69(0x147)],_0x541594=_0x41cc78[_0x5bbd69(0x16d)];console['log'](a27_0x241683[_0x5bbd69(0x127)](_0x5bbd69(0x1f1)),_0x41cc78[_0x5bbd69(0x113)]),console[_0x5bbd69(0xf2)](a27_0x241683['bold'](_0x5bbd69(0x1dd)),_0x41d263['id']),console[_0x5bbd69(0xf2)](a27_0x241683[_0x5bbd69(0x127)](_0x5bbd69(0x1a7)),_0x41cc78[_0x5bbd69(0x1d2)]),console[_0x5bbd69(0xf2)](a27_0x241683[_0x5bbd69(0x127)]('Paused:'),_0x41cc78[_0x5bbd69(0x1ec)]?a27_0x241683['yellow']('yes'):a27_0x241683[_0x5bbd69(0xee)]('no'));_0x41cc78[_0x5bbd69(0x1fc)]&&console['log'](a27_0x241683[_0x5bbd69(0x127)]('Paused\x20at:'),_0x41cc78[_0x5bbd69(0x1fc)]);console['log'](a27_0x241683['bold']('Parent\x20segment\x20ID:'),_0x41cc78[_0x5bbd69(0x11d)]);const _0x2ad71b=_0x541594[_0x5bbd69(0x198)]>0x0?'\x20('+_0x541594[_0x5bbd69(0x19e)](_0x48952f=>_0x48952f[_0x5bbd69(0x113)])[_0x5bbd69(0x1b2)](',\x20')+')':'';console[_0x5bbd69(0xf2)](a27_0x241683['bold']('Stages:'),''+_0x541594['length']+_0x2ad71b),console['log']('');if(_0x5637c7[_0x5bbd69(0x198)]===0x0)console[_0x5bbd69(0xf2)](a27_0x241683[_0x5bbd69(0x127)](_0x5bbd69(0x1a9)),a27_0x241683[_0x5bbd69(0x11f)](_0x5bbd69(0x157)));else{console[_0x5bbd69(0xf2)](a27_0x241683[_0x5bbd69(0x127)]('Activations:'));for(const _0x15b1ce of _0x5637c7){const _0x3e471f=_0x15b1ce[_0x5bbd69(0x113)]??_0x5bbd69(0x175),_0x58326c=_0x15b1ce[_0x5bbd69(0x1d1)]!=null?_0x5bbd69(0x204)+_0x15b1ce[_0x5bbd69(0x1d1)]:_0x5bbd69(0xe7),_0x5bc830=_0x15b1ce[_0x5bbd69(0x112)]?''+_0x15b1ce[_0x5bbd69(0x112)]+(_0x15b1ce[_0x5bbd69(0x201)]?_0x5bbd69(0x185)+_0x15b1ce['runAt']:''):_0x5bbd69(0x1e4),_0x55da6b=_0x15b1ce[_0x5bbd69(0x176)]?_0x5bbd69(0x1c1):'';console['log']('\x20\x20'+a27_0x241683[_0x5bbd69(0x14a)](_0x5bbd69(0x1da))+'\x20'+_0x3e471f+_0x5bbd69(0x102)+_0x58326c+',\x20schedule:\x20'+_0x5bc830+_0x55da6b);}}return console[_0x5bbd69(0xf2)](a27_0x241683[_0x5bbd69(0x14a)](_0x5bbd69(0x173))),0x0;}}export class JourneyPullCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x1e5);[a27_0x363bd7(0x139)]=a27_0x363bd7(0x1a4);async[a27_0x363bd7(0x1f2)](_0x457274){const _0x322175=a27_0x363bd7,{options:_0x49f163,args:_0x49c975,tdx:_0x1f7832}=_0x457274,_0x17d6eb=_0x49f163,_0x188963=_0x49c975[0x0],_0x31b6e2=_0x188963&&isYamlFilePath(_0x188963),_0x2ad234=await resolveTarget({'arg':_0x31b6e2?_0x188963:undefined,'contextParent':_0x49f163[_0x322175(0x135)],'cwd':process[_0x322175(0x19b)]()});if(!isSuccessfulResolution(_0x2ad234))return _0x2ad234[_0x322175(0x1ca)]===_0x322175(0x196)?(console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x14a)](_0x322175(0xdf))),console[_0x322175(0x1d4)](_0x322175(0x100)),console[_0x322175(0x1d4)](_0x322175(0x133)),console['error'](_0x322175(0x209)),console[_0x322175(0x1d4)](_0x322175(0x1dc))):(console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x168)](_0x322175(0x195)+_0x2ad234[_0x322175(0x188)]+'\x0a')),_0x2ad234[_0x322175(0x131)]&&console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x111)](_0x2ad234[_0x322175(0x131)]))),0x1;let _0x90cb83=_0x31b6e2?undefined:_0x188963,_0x474f8b,_0x4128dc;_0x2ad234[_0x322175(0x156)]===_0x322175(0x17b)&&(_0x90cb83=_0x2ad234[_0x322175(0x1cd)],_0x474f8b=_0x2ad234['filePath'],_0x4128dc=_0x2ad234[_0x322175(0x116)]);const _0x3cd28c=_0x2ad234[_0x322175(0xe9)],_0x3c50fe=_0x2ad234[_0x322175(0x10e)];_0x17d6eb['verbose']&&(console['error'](_0x322175(0xdd)+_0x3cd28c),console[_0x322175(0x1d4)](_0x322175(0x1e0)+_0x3c50fe),_0x90cb83&&console['error'](_0x322175(0xda)+_0x90cb83),_0x474f8b&&console[_0x322175(0x1d4)](_0x322175(0x16f)+_0x474f8b),_0x4128dc&&console[_0x322175(0x1d4)](_0x322175(0x1cc)+_0x4128dc));const _0x31474b=await withSpinner(_0x322175(0x142),()=>_0x1f7832[_0x322175(0x1b6)][_0x322175(0xf7)](_0x3cd28c),{'verbose':_0x49f163['verbose']}),_0x1ed0a0=_0x31474b[_0x322175(0x129)],{journeys:_0x1bbadd,folders:_0x873088}=await withSpinner(_0x322175(0x1fd),async()=>{const _0x18a154=_0x322175,[_0x54dd31,_0x3be966]=await Promise[_0x18a154(0xdc)]([_0x1f7832['journey'][_0x18a154(0x125)](_0x1ed0a0,undefined,{'includeAllVersions':!![]}),_0x1f7832[_0x18a154(0x1b6)][_0x18a154(0x186)](_0x1ed0a0)]);return{'journeys':_0x54dd31,'folders':_0x3be966};},{'verbose':_0x49f163[_0x322175(0x1b7)]})[_0x322175(0x138)](_0x199b04=>_0x199b04['data']);let _0x3f7dd1=_0x1bbadd;const _0x34f0de=buildFolderIdToPathMap(_0x873088);if(_0x90cb83){const _0x58de86=_0x3f7dd1[_0x322175(0x1ea)](_0xc02672=>_0xc02672[_0x322175(0xf9)][_0x322175(0x16e)]()===_0x90cb83['toLowerCase']());if(_0x58de86[_0x322175(0x198)]===0x0)return console[_0x322175(0x1d4)](_0x322175(0xe0)+_0x90cb83),console[_0x322175(0x1d4)](_0x322175(0x109)),0x1;_0x3f7dd1=_0x58de86;}if(_0x4128dc!==undefined){const _0x47df85=_0x3f7dd1[_0x322175(0x1ea)](_0x351003=>{const _0x1569e3=_0x322175,_0x495fce=_0x351003['folderId']?_0x34f0de[_0x1569e3(0x146)](_0x351003['folderId'])||'':'';return _0x495fce===_0x4128dc;});if(_0x47df85[_0x322175(0x198)]===0x0&&_0x3f7dd1[_0x322175(0x198)]>0x0){console['error'](_0x322175(0x1eb)+_0x90cb83+_0x322175(0x1cf)+(_0x4128dc||_0x322175(0x189))),console['error'](_0x322175(0x121));for(const _0xcc15c of _0x3f7dd1){const _0x22e890=_0xcc15c['folderId']?_0x34f0de['get'](_0xcc15c[_0x322175(0x1bf)])||'':'';console[_0x322175(0x1d4)]('\x20\x20-\x20'+(_0x22e890||_0x322175(0x12f))+'/'+_0xcc15c[_0x322175(0xf9)]);}return 0x1;}_0x3f7dd1=_0x47df85;}if(_0x3f7dd1[_0x322175(0x198)]===0x0)return console[_0x322175(0x1d4)]('No\x20journeys\x20found'),0x0;const _0x322123=new Map();for(const _0x37f085 of _0x3f7dd1){const _0x365b98=_0x37f085[_0x322175(0x11e)];!_0x322123[_0x322175(0xff)](_0x365b98)&&_0x322123['set'](_0x365b98,[]),_0x322123[_0x322175(0x146)](_0x365b98)[_0x322175(0x14b)](_0x37f085);}for(const _0x375ca8 of _0x322123[_0x322175(0x19d)]()){_0x375ca8['sort']((_0x407d14,_0x1f2a84)=>(_0x407d14[_0x322175(0x1cb)]||0x0)-(_0x1f2a84[_0x322175(0x1cb)]||0x0));}const _0x141120=[],{idToEmailMap:_0x3649a4,connectionIdToNameMap:_0x92da22}=await withSpinner('Fetching\x20users\x20and\x20connections...',async()=>{const _0x5abfd2=_0x322175,[_0x329bee,_0xdac6a7]=await Promise[_0x5abfd2(0xdc)]([_0x1f7832[_0x5abfd2(0x12e)][_0x5abfd2(0xd3)](),_0x1f7832[_0x5abfd2(0x15b)][_0x5abfd2(0x15f)]()]);return{'idToEmailMap':_0x329bee,'connectionIdToNameMap':_0xdac6a7};},{'verbose':_0x49f163['verbose']})[_0x322175(0x138)](_0x2fb53e=>_0x2fb53e[_0x322175(0x129)]);for(const _0x3e8b8c of _0x322123[_0x322175(0x19d)]()){const _0x2a65ff=_0x3e8b8c[0x0]['journeyBundleName'],_0x23344d=_0x3e8b8c[0x0][_0x322175(0x1bf)],_0x1d4547=_0x23344d?_0x34f0de['get'](_0x23344d)||'':'',_0x4bf7a4=_0x1d4547?a27_0x5d2d5b[_0x322175(0x1b2)](_0x3c50fe,_0x1d4547):_0x3c50fe,_0x3f86f0=_0x474f8b||a27_0x5d2d5b['join'](_0x4bf7a4,sanitizeFileName(_0x2a65ff)+_0x322175(0x141));let _0x3c1e76,_0x2d77fd;if(existsSync(_0x3f86f0))try{const _0x58049d=readFileSync(_0x3f86f0,_0x322175(0x1ef)),_0x547eb6=parseYamlString(_0x58049d);_0x2d77fd=_0x547eb6,_0x3c1e76=buildRuleToNameMapping(_0x547eb6),_0x17d6eb[_0x322175(0x1b7)]&&_0x3c1e76[_0x322175(0x126)]>0x0&&console['error'](_0x322175(0x118)+_0x3c1e76[_0x322175(0x126)]+_0x322175(0x1f6)+_0x2a65ff);}catch(_0x42510f){_0x17d6eb[_0x322175(0x1b7)]&&console['error']('Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20'+_0x42510f[_0x322175(0x188)]);}const _0x1cfcf4=[],_0x3c2966=new Set(),_0x1350f5=new Map(),_0xcd576b=new Map(),_0x5744f1=new Set(),_0x35dcd2=new Map(),_0x30281c=new Map(),_0x4a70ea=createJumpTargetCache();await withProgressSpinner('Fetching\x20'+_0x2a65ff+_0x322175(0x1b0),async _0x90c8e0=>{const _0x107fc8=_0x322175;for(const _0x2105fc of _0x3e8b8c){const _0x466014=_0x3e8b8c[_0x107fc8(0x198)]>0x1?_0x2105fc[_0x107fc8(0xf9)]+'\x20v'+(_0x2105fc[_0x107fc8(0x1cb)]||0x1):_0x2105fc[_0x107fc8(0xf9)];_0x90c8e0[_0x107fc8(0x170)](_0x107fc8(0x106)+_0x466014);const _0xd2073e=await _0x1f7832['journey']['getJourney'](_0x2105fc['id']),_0x2e2da8=_0xd2073e['attributes']?.['audienceId'],_0x12ff3c={'resolveSegment':async _0x314f37=>{const _0x163e10=_0x107fc8;if(!_0x2e2da8)return{'name':_0x314f37,'isJourneyLocal':![]};const _0x4aeb6a=_0x1350f5[_0x163e10(0x146)](_0x314f37);if(_0x4aeb6a)return _0x4aeb6a;try{const _0x16bdd2=await _0x1f7832['segment'][_0x163e10(0x208)](_0x2e2da8,_0x314f37),_0x1ad769=_0x16bdd2[_0x163e10(0x17a)]===SEGMENT_KIND_JOURNEY;let _0x450780,_0x2646b8=_0x16bdd2[_0x163e10(0x113)];if(_0x1ad769&&_0x16bdd2[_0x163e10(0x134)]){const _0x6ab857=await segmentResponseToDef(_0x16bdd2,{'resolveSegmentName':async _0x3f45fc=>{const _0x169abe=_0x163e10,_0x2837d3=_0x1350f5['get'](_0x3f45fc);if(_0x2837d3)return _0x2837d3[_0x169abe(0x113)];const _0x57639d=await _0x12ff3c[_0x169abe(0x151)](_0x3f45fc);return _0x57639d[_0x169abe(0x113)];}}),_0x271884=_0x6ab857[_0x163e10(0x134)];_0x450780={'description':_0x16bdd2['description'],'rule':_0x271884};const _0x4ed286=serializeRule(_0x271884),_0x5d70c7=_0xcd576b[_0x163e10(0x146)](_0x4ed286);if(_0x5d70c7)_0x2646b8=_0x5d70c7,_0x450780=undefined,_0x17d6eb[_0x163e10(0x1b7)]&&console[_0x163e10(0x1d4)](_0x163e10(0xd6)+_0x16bdd2[_0x163e10(0x113)]+_0x163e10(0x207)+_0x5d70c7);else{let _0x125bfb=![];if(_0x3c1e76){const _0x25c978=_0x3c1e76[_0x163e10(0x146)](_0x4ed286);if(_0x25c978){const _0x816e09=_0x25c978['find'](_0x10e186=>!_0x3c2966[_0x163e10(0xff)](_0x10e186));_0x816e09&&(_0x2646b8=_0x816e09,_0x3c2966[_0x163e10(0xf8)](_0x816e09),_0xcd576b['set'](_0x4ed286,_0x816e09),_0x125bfb=!![],_0x17d6eb[_0x163e10(0x1b7)]&&console[_0x163e10(0x1d4)](_0x163e10(0x145)+_0x816e09+_0x163e10(0x1e7)));}}if(!_0x125bfb){const _0x2ebcd5=generateJourneyLocalName(_0x16bdd2[_0x163e10(0x113)]);_0x2ebcd5&&(_0x2646b8=_0x2ebcd5);let _0x15d686=_0x2646b8,_0x2f58ab=0x2;while(_0x3c2966[_0x163e10(0xff)](_0x15d686)){_0x15d686=_0x2646b8+'_'+_0x2f58ab,_0x2f58ab++;}_0x3c2966['add'](_0x15d686),_0xcd576b['set'](_0x4ed286,_0x15d686),_0x2646b8=_0x15d686;}}}const _0x28b69a={'name':_0x2646b8,'isJourneyLocal':_0x1ad769,'definition':_0x450780};return _0x1350f5[_0x163e10(0x1e9)](_0x314f37,_0x28b69a),_0x28b69a;}catch(_0x1f289e){return _0x49f163[_0x163e10(0x1b7)]&&console[_0x163e10(0x1d4)](_0x163e10(0x191)+_0x314f37+':\x20'+_0x1f289e[_0x163e10(0x188)]),{'name':_0x314f37,'isJourneyLocal':![]};}},'resolveActivation':async _0x369726=>{const _0x1b4abe=_0x107fc8,_0x34fee0=_0x35dcd2[_0x1b4abe(0x146)](_0x369726);if(_0x34fee0)return _0x34fee0;try{const _0x3c05de=await _0x1f7832['journey'][_0x1b4abe(0xed)](_0x2105fc['id'],_0x369726),_0x1dc06c=journeyActivationStepToYaml(_0x3c05de,_0x3649a4,_0x92da22),_0x22e10c=JSON['stringify']({'name':_0x1dc06c[_0x1b4abe(0x113)],'connection':_0x1dc06c[_0x1b4abe(0x15b)],'connector_config':_0x1dc06c[_0x1b4abe(0x123)]}),_0x231681=_0x30281c[_0x1b4abe(0x146)](_0x22e10c);if(_0x231681){const _0x5d2f57={'name':_0x231681,'isJourneyLocal':!![],'definition':_0x1dc06c};return _0x35dcd2['set'](_0x369726,_0x5d2f57),_0x5d2f57;}const _0x161841=_0x3c05de[_0x1b4abe(0x147)][_0x1b4abe(0xde)][_0x1b4abe(0x113)]||_0x369726,_0x11cda9=sanitizeYamlKey(_0x161841)||_0x1b4abe(0x1af)+_0x369726;let _0x5ed27f=_0x11cda9,_0x300f91=0x2;while(_0x5744f1[_0x1b4abe(0xff)](_0x5ed27f)){_0x5ed27f=_0x11cda9+'_'+_0x300f91,_0x300f91++;}_0x5744f1[_0x1b4abe(0xf8)](_0x5ed27f),_0x30281c['set'](_0x22e10c,_0x5ed27f);const _0x384b74={'name':_0x5ed27f,'isJourneyLocal':!![],'definition':_0x1dc06c};return _0x35dcd2['set'](_0x369726,_0x384b74),_0x384b74;}catch(_0xe66e41){return _0x49f163[_0x1b4abe(0x1b7)]&&console[_0x1b4abe(0x1d4)](_0x1b4abe(0x1ee)+_0x369726+':\x20'+_0xe66e41[_0x1b4abe(0x188)]),{'name':_0x369726,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x574eb5,_0x2fe2fa)=>{const _0x153438=_0x107fc8;return resolveJumpTarget(_0x574eb5,_0x2fe2fa,_0x4a70ea,_0x2218a3=>_0x1f7832[_0x153438(0x1ba)][_0x153438(0x1c8)](_0x2218a3));}},_0x172f6f=await journeyResponseToDef(_0xd2073e,_0x12ff3c);_0x1cfcf4[_0x107fc8(0x14b)]({'item':_0x2105fc,'yaml':_0x172f6f});}},{'verbose':_0x49f163['verbose']});const _0x12efc1=await _0x1f7832[_0x322175(0x1ba)][_0x322175(0x15d)](_0x3e8b8c[0x0]['journeyBundleId']),_0x1817b2=buildMergedJourneyDef(_0x1cfcf4,_0x3c1e76,_0x12efc1),_0x1deaa3=normalizeJourneyDef(_0x1817b2,_0x2d77fd),_0x4cd053=toYamlString(_0x1deaa3),_0x569363=_0x474f8b||a27_0x5d2d5b['join'](_0x4bf7a4,sanitizeFileName(_0x2a65ff)+_0x322175(0x141));!_0x474f8b&&_0x1d4547&&!existsSync(_0x4bf7a4)&&mkdirSync(_0x4bf7a4,{'recursive':!![]});const _0x152308=a27_0x5d2d5b[_0x322175(0x154)](process[_0x322175(0x19b)](),_0x569363);if(existsSync(_0x569363)){const _0x1c4cc9=readFileSync(_0x569363,_0x322175(0x1ef)),_0xf4b3b7=generateDiff(_0x1c4cc9,_0x4cd053),_0x1e5a0f=hasChanges(_0xf4b3b7);_0x141120[_0x322175(0x14b)]({'relativePath':_0x152308,'absolutePath':_0x569363,'content':_0x4cd053,'isNew':![],'hasChanges':_0x1e5a0f,'diff':_0x1e5a0f?formatDiffWithColors(_0xf4b3b7):undefined});}else _0x141120[_0x322175(0x14b)]({'relativePath':_0x152308,'absolutePath':_0x569363,'content':_0x4cd053,'isNew':!![],'hasChanges':![]});}const _0x5a3c26=_0x141120[_0x322175(0x1ea)](_0xd2095e=>_0xd2095e[_0x322175(0xe2)]),_0x333634=_0x141120['filter'](_0x4e7a3c=>!_0x4e7a3c['isNew']&&_0x4e7a3c[_0x322175(0x1a5)]),_0x38a517=_0x141120[_0x322175(0x1ea)](_0xdc88e=>!_0xdc88e[_0x322175(0xe2)]&&!_0xdc88e['hasChanges']),_0x13d34b=_0x3f7dd1['length'],_0x36764b=_0x322123[_0x322175(0x126)],_0x151b6c=_0x13d34b>_0x36764b?'\x20('+_0x13d34b+_0x322175(0x1ad):'';console['error'](_0x322175(0x15a)),console['error']('\x20\x20'+a27_0x241683[_0x322175(0x111)](_0x36764b+_0x322175(0x1d3))+a27_0x241683['dim'](_0x151b6c)),console[_0x322175(0x1d4)]('\x20\x20'+a27_0x241683[_0x322175(0xee)]('+\x20'+_0x5a3c26[_0x322175(0x198)]+_0x322175(0x153))),console[_0x322175(0x1d4)]('\x20\x20'+a27_0x241683[_0x322175(0x14a)]('~\x20'+_0x333634['length']+_0x322175(0xe5))),console[_0x322175(0x1d4)]('\x20\x20'+a27_0x241683[_0x322175(0x11f)]('=\x20'+_0x38a517[_0x322175(0x198)]+'\x20unchanged\x20files')),console['error'](_0x322175(0x152)+a27_0x241683['cyan'](_0x3c50fe)+'\x0a');if(_0x333634[_0x322175(0x198)]>0x0)for(const _0x389a05 of _0x333634){console[_0x322175(0x1d4)](_0x322175(0x167)+_0x389a05['relativePath']+'\x27:'),console[_0x322175(0x1d4)]('─'[_0x322175(0x1b4)](0x3c)),console['error'](_0x389a05[_0x322175(0x1f5)]),console['error']('─'[_0x322175(0x1b4)](0x3c));}if(_0x17d6eb['dryRun'])return console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x14a)](_0x322175(0xec))),0x0;if(_0x5a3c26[_0x322175(0x198)]===0x0&&_0x333634[_0x322175(0x198)]===0x0)return console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0xee)](_0x322175(0x177))),saveSessionContext({'parent_segment':_0x3cd28c},_0x17d6eb[_0x322175(0x184)]),console[_0x322175(0x1d4)](a27_0x241683['green']('✔\x20Context\x20set:\x20'+a27_0x241683[_0x322175(0x11f)](_0x322175(0x14f))+_0x322175(0x205)+a27_0x241683[_0x322175(0x111)](_0x3cd28c))),0x0;if(!_0x17d6eb[_0x322175(0xfa)]&&(_0x5a3c26[_0x322175(0x198)]>0x0||_0x333634[_0x322175(0x198)]>0x0)){if(!isInteractive())return console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x168)](_0x322175(0xf4)),_0x322175(0x15c)),console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x11f)](_0x322175(0x194))),0x1;const _0x286aaf=await confirmKey(_0x322175(0x165)+(_0x5a3c26[_0x322175(0x198)]+_0x333634[_0x322175(0x198)])+_0x322175(0x19c));if(!_0x286aaf)return console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0x14a)]('Aborted.'),_0x322175(0x11b)),0x1;}!existsSync(_0x3c50fe)&&mkdirSync(_0x3c50fe,{'recursive':!![]});const _0x1e5985=a27_0x5d2d5b[_0x322175(0x1b2)](_0x3c50fe,_0x322175(0x1fb));writeFileSync(_0x1e5985,createTdxConfigContent(_0x3cd28c),_0x322175(0x1ef));for(const _0x10ab4a of _0x141120){(_0x10ab4a[_0x322175(0xe2)]||_0x10ab4a['hasChanges'])&&writeFileSync(_0x10ab4a['absolutePath'],_0x10ab4a[_0x322175(0x124)],_0x322175(0x1ef));}return console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0xee)](_0x322175(0x18a)+(_0x5a3c26[_0x322175(0x198)]+_0x333634[_0x322175(0x198)])+_0x322175(0x1d0)+_0x3c50fe)),saveSessionContext({'parent_segment':_0x3cd28c},_0x17d6eb[_0x322175(0x184)]),console[_0x322175(0x1d4)](a27_0x241683[_0x322175(0xee)](_0x322175(0x192)+a27_0x241683[_0x322175(0x11f)](_0x322175(0x14f))+_0x322175(0x205)+a27_0x241683['cyan'](_0x3cd28c))),0x0;}}function a27_0x2667(_0x31bf25,_0x3dd466){_0x31bf25=_0x31bf25-0xd3;const _0x43f2e2=a27_0x43f2();let _0x2667a2=_0x43f2e2[_0x31bf25];return _0x2667a2;}export class JourneyColumnsCommand extends BaseCommand{[a27_0x363bd7(0x113)]='journey:columns';[a27_0x363bd7(0x139)]='Show\x20journey\x20table\x20column\x20mapping';async[a27_0x363bd7(0x1f2)](_0x5a144c){const _0x2a9f99=a27_0x363bd7,{options:_0x3010ab,args:_0xe0e550,tdx:_0x3c2e7b}=_0x5a144c,_0x5724a0=_0xe0e550[0x0];if(!requireNameOrPath(_0x5724a0))return 0x1;_0x3010ab[_0x2a9f99(0x1b7)]&&console[_0x2a9f99(0x1d4)](_0x2a9f99(0x1f4)+_0x5724a0);const {journeyId:_0x47b995}=await resolveJourneyIdFromInput(_0x5724a0,_0x3010ab,_0x3c2e7b),_0x3f1588=await withSpinner(_0x2a9f99(0x1a6),()=>_0x3c2e7b[_0x2a9f99(0x1ba)][_0x2a9f99(0x1f3)](_0x47b995),{'verbose':_0x3010ab['verbose']}),_0xc58d9e=_0x3f1588[_0x2a9f99(0x129)];return console['log'](_0x2a9f99(0x1b3)+_0xc58d9e[_0x2a9f99(0x1d6)]),console[_0x2a9f99(0xf2)](_0x2a9f99(0x128)+_0xc58d9e['table']),await handleSDKOutput(_0xc58d9e[_0x2a9f99(0x1f9)],_0x3010ab),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x180);['description']=a27_0x363bd7(0x150);async[a27_0x363bd7(0x1f2)](_0x52f967){const _0x1cee43=a27_0x363bd7,{options:_0x55f265,args:_0x2001dc,tdx:_0x47493b}=_0x52f967,_0x5d0410=_0x2001dc[0x0];if(!requireNameOrPath(_0x5d0410))return 0x1;_0x55f265[_0x1cee43(0x1b7)]&&console[_0x1cee43(0x1d4)]('Input:\x20'+_0x5d0410);const {journeyId:_0x3aeac1}=await resolveJourneyIdFromInput(_0x5d0410,_0x55f265,_0x47493b),_0x4abad9=await withSpinner(_0x1cee43(0xd4),()=>_0x47493b['journey'][_0x1cee43(0xe8)](_0x3aeac1),{'verbose':_0x55f265[_0x1cee43(0x1b7)]}),_0x4e1665=_0x4abad9['data'];return console[_0x1cee43(0x1d4)](_0x1cee43(0x118)+_0x4e1665[_0x1cee43(0x198)]+'\x20activation'+(_0x4e1665[_0x1cee43(0x198)]!==0x1?'s':'')),await handleSDKOutput(_0x4e1665,_0x55f265),0x0;}}export class JourneyPushCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x155);[a27_0x363bd7(0x139)]='Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20AI';['segmentPushCommand']=new SegmentPushCommand();async['execute'](_0x1a5b6e){const _0x3ac1f3=a27_0x363bd7,_0x226b20=_0x1a5b6e[_0x3ac1f3(0x1d7)][0x0];let _0x5a1663;if(_0x226b20){const _0x1d03e7=await resolveTarget({'arg':_0x226b20,'contextParent':_0x1a5b6e[_0x3ac1f3(0x166)][_0x3ac1f3(0x135)],'cwd':process['cwd']()});isSuccessfulResolution(_0x1d03e7)&&_0x1d03e7[_0x3ac1f3(0x156)]===_0x3ac1f3(0x17b)&&(_0x5a1663=_0x1d03e7['filePath']);}const _0x551078={..._0x1a5b6e,'options':{..._0x1a5b6e[_0x3ac1f3(0x166)],'journeysOnly':!![],..._0x5a1663&&{'singleFilePath':_0x5a1663}}};return this[_0x3ac1f3(0xdb)]['execute'](_0x551078);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x1a1);['description']='List\x20all\x20versions\x20of\x20a\x20journey';async[a27_0x363bd7(0x1f2)](_0x306a3b){const _0x25a90e=a27_0x363bd7,{options:_0x3dd78c,args:_0x32db11,tdx:_0xb9da0b}=_0x306a3b,_0x5a5484=_0x32db11[0x0];if(!requireNameOrPath(_0x5a5484))return 0x1;if(_0x3dd78c['verbose'])console[_0x25a90e(0x1d4)](_0x25a90e(0x1f4)+_0x5a5484);const {journeyId:_0xd5028d}=await resolveJourneyIdFromInput(_0x5a5484,_0x3dd78c,_0xb9da0b),_0x1822ce=await withSpinner('Listing\x20journey\x20versions...',()=>_0xb9da0b['journey'][_0x25a90e(0x163)](_0xd5028d),{'verbose':_0x3dd78c[_0x25a90e(0x1b7)]}),{bundleName:_0x4649b3,versions:_0x32a39d,latestJourneyId:_0x3ba639}=_0x1822ce[_0x25a90e(0x129)];console[_0x25a90e(0x1d4)](_0x4649b3+':\x20'+_0x32a39d[_0x25a90e(0x198)]+_0x25a90e(0xea)+(_0x32a39d[_0x25a90e(0x198)]!==0x1?'s':''));const _0x2fb483=_0x32a39d[_0x25a90e(0x19e)](_0x454841=>({'version':_0x454841[_0x25a90e(0x1cb)],'journey_id':_0x454841[_0x25a90e(0x1c2)],'name':_0x454841[_0x25a90e(0x113)],'state':_0x454841[_0x25a90e(0x1d2)],'paused':_0x454841[_0x25a90e(0x1ec)],'latest':_0x454841['journeyId']===_0x3ba639,'created_at':_0x454841['createdAt']}));return await handleSDKOutput(_0x2fb483,_0x3dd78c),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x16a);['description']=a27_0x363bd7(0xf3);async['execute'](_0x287550){const _0x424421=a27_0x363bd7,{options:_0x1b3d9c,args:_0x4f147d,tdx:_0x286e41}=_0x287550,_0x14166d=_0x4f147d[0x0];if(!requireNameOrPath(_0x14166d))return 0x1;if(_0x1b3d9c[_0x424421(0x1b7)])console[_0x424421(0x1d4)](_0x424421(0x1f4)+_0x14166d);const {journeyId:_0x497fbb,journeyName:_0x44e2f6}=await resolveJourneyIdFromInput(_0x14166d,_0x1b3d9c,_0x286e41);if(!_0x1b3d9c['yes']){const _0x32cb55=await confirm(_0x424421(0x16b)+_0x44e2f6+'\x22?');if(!_0x32cb55)return console[_0x424421(0x1d4)](_0x424421(0x10f)),0x0;}const _0x1965f4=await withSpinner('Creating\x20new\x20version...',()=>_0x286e41['journey'][_0x424421(0x17c)](_0x497fbb),{'verbose':_0x1b3d9c['verbose']}),_0x5d812a=_0x1965f4['data'];return console['error'](a27_0x241683[_0x424421(0xee)]('✔')+_0x424421(0x1ae)+_0x5d812a[_0x424421(0x147)][_0x424421(0x1cb)]+_0x424421(0x1d9)+_0x5d812a['attributes'][_0x424421(0x113)]+'\x22'),console[_0x424421(0x1d4)](_0x424421(0x1bb)+_0x5d812a['id']),await handleSingleObjectOutput({'id':_0x5d812a['id'],'name':_0x5d812a[_0x424421(0x147)][_0x424421(0x113)],'version':_0x5d812a[_0x424421(0x147)]['versionNumber'],'state':_0x5d812a['attributes'][_0x424421(0x1d2)],'bundle_id':_0x5d812a['attributes'][_0x424421(0x11e)],'created_at':_0x5d812a['attributes'][_0x424421(0xef)]},_0x1b3d9c),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{[a27_0x363bd7(0x113)]=a27_0x363bd7(0x119);[a27_0x363bd7(0x139)]=a27_0x363bd7(0x13b);async[a27_0x363bd7(0x1f2)](_0x16e455){const _0x4c12b1=a27_0x363bd7,{options:_0x1c8207,args:_0x597d77,tdx:_0x5b0593}=_0x16e455,_0x1b3f1a=_0x597d77[0x0];if(!requireNameOrPath(_0x1b3f1a))return 0x1;const _0x21b128=_0x1c8207[_0x4c12b1(0xe6)];if(!_0x21b128)return console['error'](_0x4c12b1(0x1ed)),console['error'](_0x4c12b1(0x136)),0x1;const _0x3af859=parseInt(_0x21b128,0xa);if(isNaN(_0x3af859)||_0x3af859<0x1)return console[_0x4c12b1(0x1d4)]('Error:\x20Invalid\x20version\x20number:\x20'+_0x21b128),0x1;if(_0x1c8207[_0x4c12b1(0x1b7)])console[_0x4c12b1(0x1d4)]('Input:\x20'+_0x1b3f1a+',\x20version:\x20'+_0x3af859);const {journeyId:_0x4b301b,parentSegmentId:_0x174f61}=await resolveJourneyIdFromInput(_0x1b3f1a,_0x1c8207,_0x5b0593),_0x1932f8=await withSpinner(_0x4c12b1(0x1be),()=>_0x5b0593[_0x4c12b1(0x1ba)]['listVersions'](_0x4b301b),{'verbose':_0x1c8207['verbose']}),{versions:_0x3bb7e7,latestJourneyId:_0x49ec5f}=_0x1932f8[_0x4c12b1(0x129)],_0x4fe33a=_0x3bb7e7[_0x4c12b1(0x1bd)](_0x2f5965=>_0x2f5965[_0x4c12b1(0x1cb)]===_0x3af859);if(!_0x4fe33a){const _0x177af6=_0x3bb7e7[_0x4c12b1(0x19e)](_0x5b3fc7=>'v'+_0x5b3fc7[_0x4c12b1(0x1cb)])['join'](',\x20');return console[_0x4c12b1(0x1d4)](_0x4c12b1(0x1e8)+_0x3af859+_0x4c12b1(0xd7)+_0x177af6),0x1;}const _0x4922be=await withSpinner('Getting\x20version\x20'+_0x3af859+_0x4c12b1(0x105),()=>_0x5b0593[_0x4c12b1(0x1ba)][_0x4c12b1(0x1c8)](_0x4fe33a[_0x4c12b1(0x1c2)]),{'verbose':_0x1c8207[_0x4c12b1(0x1b7)]}),_0x503ffb=_0x4922be['data'],_0x5461a2=getConsoleNextUrl(_0x1c8207[_0x4c12b1(0x164)],_0x4c12b1(0x169)+_0x174f61+_0x4c12b1(0x18f)+_0x4fe33a[_0x4c12b1(0x1c2)]+'/j/da/je');return await handleSingleObjectOutput({'id':_0x503ffb['id'],'name':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0x113)],'version':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0x1cb)],'description':_0x503ffb['attributes'][_0x4c12b1(0x139)],'state':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0x1d2)],'paused':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0x1ec)],'reentry_mode':_0x503ffb['attributes'][_0x4c12b1(0x197)],'stages':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0x16d)]?.[_0x4c12b1(0x198)]||0x0,..._0x503ffb['attributes'][_0x4c12b1(0x1c5)]&&{'goal':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0x1c5)]['name']},'latest':_0x4fe33a['journeyId']===_0x49ec5f,'created_at':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0xef)],'updated_at':_0x503ffb[_0x4c12b1(0x147)][_0x4c12b1(0xe1)],'url':_0x5461a2},_0x1c8207),0x0;}}function a27_0x43f2(){const _0x2b06d0=['resolveParentId','add','journeyBundleName','yes','links','localeCompare','12YJCwOS','Available\x20stages:\x20','has','Usage:\x20tdx\x20journey\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Inside\x20a\x20segment\x20folder\x20(with\x20tdx.json)','(running)','\x20\x20←\x20','✔\x20Journey\x20\x22','\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser','\x20details...','Fetching\x20','Fetching\x20journey\x20','getTrafficData','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','status','test','Show\x20journey\x20statistics','includeHistory','targetDir','Cancelled','\x20\x20Statistics\x20not\x20available','cyan','scheduleType','name','entries','table','folderPath','Parent\x20segment\x20ID:','Found\x20','journey:version:view','completeMilestoneRate','-\x20no\x20files\x20written','workflowSessionId','audienceId','journeyBundleId','dim','Show\x20journey\x20details','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','655155DaPSOq','connector_config','content','listJourneysFromParentSegment','size','bold','Table:\x20','data','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','10UAlGCu','jsonl','segments','user','(root)','Stages:','helpText','Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','rule','parentSegment','Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N','Paused:','then','description','\x20\x20Name:\x20','View\x20a\x20specific\x20version\x20of\x20a\x20journey','from','Trigger\x20on-demand\x20workflow\x20execution\x20for\x20journey\x20\x22','nodes','journey:pause','\x22\x20resumed','.yml','Resolving\x20parent\x20segment...','/j/da','stages','\x20\x20Preserving\x20local\x20segment\x20name:\x20','get','attributes','Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','format','yellow','push','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','Error:\x20Stage\x20\x22','base','parent_segment','List\x20activations\x20for\x20a\x20journey','resolveSegment','\x20\x20Target:\x20','\x20new\x20files','relative','journey:push','type','(none)','activation','Pause\x20a\x20running\x20journey','\x0aPull\x20summary:','connection','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','getLatestJourneyId','conversion','buildIdToNameMap','tsv','limit','workflowId','listVersions','site','Write\x20','options','\x0aChanges\x20to\x20\x27','red','/app/ps/','journey:version:create','Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22','Getting\x20journey\x20details...','journeyStages','toLowerCase','Target\x20file:\x20','setPhase','Getting\x20journey\x20statistics...','\x20(ID:\x20','\x0a[Dry\x20run]\x20Journey\x20was\x20NOT\x20resumed.','Resume\x20a\x20paused\x20journey','(unnamed)','runAfterJourneyRefresh','✔\x20All\x20files\x20are\x20up\x20to\x20date','Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22','web','kind','file','createVersion','renderStats','Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]','Error:\x20Invalid\x20--type\x20\x22','journey:activations','Status:','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','✔\x20Found\x20','session','\x20@\x20','listFolders','replace','message','root\x20folder','✔\x20Pulled\x20','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','draft','getParentFull','resume','/e/','Error:\x20Parent\x20segment\x20context\x20required','Warning:\x20Could\x20not\x20resolve\x20segment\x20','✔\x20Context\x20set:\x20','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Error:\x20','no_parent','reentryMode','length','run','1710000hsmqpu','cwd','\x20files?','values','map','(archived)','Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22','journey:versions','folders','Session:','Export\x20journey(s)\x20as\x20YAML\x20files','hasChanges','Getting\x20column\x20mapping...','State:','journeyName','Activations:','pause','INVALID_ARGUMENT','dryRun','\x20versions)','\x20Created\x20v','activation_','...','hasPeriod','join','Database:\x20','repeat','(draft)','segment','verbose','exitOrJumpRate','Fetching\x20parent\x20segment...','journey','\x20\x20Journey\x20ID:\x20','milestoneSize','find','Resolving\x20version...','folderId','/j/da/je','\x20[runs\x20on\x20refresh]','journeyId','exitOrJumpSize','stage','goal','Options:','8660061egREUY','getJourney','\x5c$&','errorCode','versionNumber','Folder\x20path:\x20','resourceName','No\x20traffic\x20data\x20available\x20for\x20journey:\x20','\x27\x20not\x20found\x20in\x20','\x20journey\x20files\x20to\x20','connectionId','state','\x20journeys','error','(completed)','database','args','history','\x20(draft)\x20—\x20\x22','⚠️\x20','\x22\x20not\x20found','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','ID:','Pausing\x20journey...','goalSize','Target\x20directory:\x20','13903OwTmUD','472508ChMbvj','json','none','journey:pull','sort','\x20(rule\x20match)','Error:\x20Version\x20','set','filter','Error:\x20Journey\x20\x27','paused','Error:\x20--version\x20option\x20is\x20required','Warning:\x20Could\x20not\x20resolve\x20activation\x20','utf-8','journey:resume','Journey:','execute','getColumnMapping','Input:\x20','diff','\x20segment\x20rule(s)\x20to\x20match\x20for\x20','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','Resolving\x20journey...','columns','enteredSize','tdx.json','pausedAt','Fetching\x20journeys\x20and\x20folders...','journey:view','segmentName','2450336QSLLXk','runAt','2320759VbJhtq','58wSsNoi','connection\x20','\x20=\x20','executeDryRun','\x20->\x20','getSegment','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file','buildIdToEmailMap','Listing\x20journey\x20activations...','launched','\x20\x20Consolidating\x20duplicate\x20segment:\x20','\x20not\x20found.\x20Available:\x20','stageNameMap','\x20Journey\x20workflow\x20started','Journey\x20name:\x20','segmentPushCommand','all','Parent\x20segment:\x20','activationParams','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','Error:\x20Journey\x20not\x20found:\x20','updatedAt','isNew','completed','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','\x20changed\x20files','version','no\x20connection','listActivationsFlat','parentName','\x20version','Triggering\x20journey\x20workflow...','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','getActivation','green','createdAt','No\x20statistics\x20available\x20for\x20journey:\x20','getStatistics','log','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','\x0aError:','journey:stats','\x20journey'];a27_0x43f2=function(){return _0x2b06d0;};return a27_0x43f2();}
|
|
1
|
+
const a27_0x466491=a27_0xe88c;(function(_0x17fa91,_0x1df71e){const _0x566ab7=a27_0xe88c,_0x72a768=_0x17fa91();while(!![]){try{const _0xe9c6b=parseInt(_0x566ab7(0x1b1))/0x1+parseInt(_0x566ab7(0x1dd))/0x2*(parseInt(_0x566ab7(0x299))/0x3)+parseInt(_0x566ab7(0x29e))/0x4*(parseInt(_0x566ab7(0x22a))/0x5)+parseInt(_0x566ab7(0x1d2))/0x6+parseInt(_0x566ab7(0x226))/0x7+parseInt(_0x566ab7(0x277))/0x8*(parseInt(_0x566ab7(0x197))/0x9)+-parseInt(_0x566ab7(0x1cc))/0xa;if(_0xe9c6b===_0x1df71e)break;else _0x72a768['push'](_0x72a768['shift']());}catch(_0x314553){_0x72a768['push'](_0x72a768['shift']());}}}(a27_0x32ce,0xc4a4b));import a27_0x5bb097 from'chalk';import a27_0x35f653 from'path';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{BaseCommand}from'./command.js';function a27_0xe88c(_0x5b7801,_0x581fd5){_0x5b7801=_0x5b7801-0x175;const _0x32ce31=a27_0x32ce();let _0xe88cfe=_0x32ce31[_0x5b7801];return _0xe88cfe;}import{SDKError,ErrorCode}from'../sdk/index.js';import{aggregateStageHistory,assembleJourneyStats,buildStageNameMap}from'../sdk/journey.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{confirm,confirmKey,isInteractive}from'../utils/prompt.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{journeyResponseToDef,toYamlString,parseYamlString,normalizeJourneyDef}from'../sdk/segment/journey-yaml.js';import{segmentResponseToDef,journeyActivationStepToYaml,serializeRule}from'../sdk/segment/child-segment-yaml.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';import{SegmentPushCommand}from'./segment-push-command.js';import{buildFolderIdToPathMap}from'../sdk/segment/resolution-context.js';import{createTdxConfigContent}from'../sdk/segment/tdx-config.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyDef,createJumpTargetCache,resolveJumpTarget}from'../sdk/segment/journey-utils.js';import{getConsoleNextUrl,getWorkflowSessionUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import{hyperlink}from'../sdk/util/formatters.js';function requireNameOrPath(_0x530073){const _0x2eaef9=a27_0xe88c;return!_0x530073&&(console[_0x2eaef9(0x25e)](_0x2eaef9(0x253)),console[_0x2eaef9(0x25e)]('Usage:\x20journey\x20<subcommand>\x20<name-or-path>')),!!_0x530073;}function withJsonFormat(_0x11c116){const _0x122638=a27_0xe88c;if(!_0x11c116[_0x122638(0x1ee)]&&!_0x11c116['json']&&!_0x11c116[_0x122638(0x26d)]&&!_0x11c116['tsv'])return{..._0x11c116,'format':_0x122638(0x1c2),'json':!![]};return _0x11c116;}function formatJourneyState(_0x5292d8){const _0x17fb97=a27_0xe88c;switch(_0x5292d8){case _0x17fb97(0x254):return a27_0x5bb097[_0x17fb97(0x18f)](_0x17fb97(0x252));case _0x17fb97(0x298):return a27_0x5bb097[_0x17fb97(0x239)](_0x17fb97(0x1e0));case _0x17fb97(0x1b9):return a27_0x5bb097[_0x17fb97(0x256)](_0x17fb97(0x24e));case _0x17fb97(0x24b):return a27_0x5bb097['blue'](_0x17fb97(0x1ec));case _0x17fb97(0x1a5):return a27_0x5bb097[_0x17fb97(0x239)](_0x17fb97(0x293));default:return'('+_0x5292d8+')';}}function formatJourneyItem(_0x1d9782,_0x5aabad='',_0x142d6d){const _0x220149=a27_0xe88c,_0x56bc67=formatJourneyState(_0x1d9782[_0x220149(0x296)]),_0x2964b5=_0x142d6d?hyperlink(_0x1d9782[_0x220149(0x1e6)],_0x142d6d):_0x1d9782['journeyBundleName'];return _0x5aabad+_0x220149(0x275)+_0x2964b5+'\x20'+_0x56bc67;}function escapeRegex(_0x1808c7){const _0x367a06=a27_0xe88c;return _0x1808c7['replace'](/[.*+?^${}()|[\]\\]/g,_0x367a06(0x28a));}function globToRegex(_0x670918){const _0x4dd7d1=a27_0xe88c,_0x4a8da5=_0x670918[_0x4dd7d1(0x258)]('*')['map'](escapeRegex);return new RegExp(_0x4a8da5['join']('.*'),'i');}function buildRuleToNameMapping(_0x561ab8){const _0x4118d4=a27_0xe88c,_0xa76095=new Map();if(_0x561ab8['segments'])for(const [_0x1c0feb,_0x1ba976]of Object[_0x4118d4(0x278)](_0x561ab8[_0x4118d4(0x255)])){if(_0x1ba976['rule']){const _0x2d9b75=serializeRule(_0x1ba976[_0x4118d4(0x259)]),_0x49f260=_0xa76095['get'](_0x2d9b75);_0x49f260?_0x49f260[_0x4118d4(0x1d9)](_0x1c0feb):_0xa76095[_0x4118d4(0x1c7)](_0x2d9b75,[_0x1c0feb]);}}return _0xa76095;}async function resolveJourneyIdFromInput(_0x139912,_0x149aed,_0x139d17){const _0xe75371=a27_0xe88c,_0x2c6b6b=await resolveJourneyTarget(_0x139912,_0x149aed[_0xe75371(0x276)],_0x149aed[_0xe75371(0x23b)]),_0x1041db=_0x2c6b6b['parentSegment'];if(!_0x1041db)throw new SDKError(ErrorCode[_0xe75371(0x28f)],_0xe75371(0x18c));const _0x376f60=await withSpinner('Resolving\x20parent\x20segment...',()=>_0x139d17['segment'][_0xe75371(0x20f)](_0x1041db),{'verbose':_0x149aed[_0xe75371(0x23b)]}),_0x447010=_0x376f60['data'],_0x377f79=await withSpinner(_0xe75371(0x23e),()=>_0x139d17[_0xe75371(0x21e)][_0xe75371(0x194)](_0x447010,_0x2c6b6b[_0xe75371(0x17a)]),{'verbose':_0x149aed['verbose']});return{'journeyId':_0x377f79[_0xe75371(0x17f)],'journeyName':_0x2c6b6b['journeyName'],'parentSegmentId':_0x447010};}async function resolveJourneyTarget(_0xfd2a05,_0x4f89da,_0x525003){const _0xed1013=a27_0xe88c;if(isYamlFilePath(_0xfd2a05))try{const _0x4acaee=await resolveYamlFilePath(_0xfd2a05);return _0x525003&&(console[_0xed1013(0x25e)]('Resolved\x20YAML\x20file:\x20'+_0xfd2a05),console[_0xed1013(0x25e)]('\x20\x20Parent\x20segment:\x20'+_0x4acaee[_0xed1013(0x276)]),console[_0xed1013(0x25e)]('\x20\x20Name:\x20'+_0x4acaee[_0xed1013(0x1ba)]),console[_0xed1013(0x25e)](_0xed1013(0x1ff)+(_0x4acaee[_0xed1013(0x178)]||'(root)'))),{'journeyName':_0x4acaee['segmentName'],'parentSegment':_0x4acaee[_0xed1013(0x276)],'resolved':_0x4acaee};}catch(_0x5b6882){throw new SDKError(ErrorCode[_0xed1013(0x28f)],_0xed1013(0x238)+_0x5b6882[_0xed1013(0x2a2)]);}if(!_0x4f89da)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0xed1013(0x26c));return{'journeyName':_0xfd2a05,'parentSegment':_0x4f89da};}export class JourneyListCommand extends BaseCommand{[a27_0x466491(0x29b)]='journey:list';[a27_0x466491(0x270)]=a27_0x466491(0x211);async[a27_0x466491(0x271)](_0x196b71){const _0x15c7b6=a27_0x466491,{options:_0x5b6f30,args:_0x3d2735,tdx:_0x2dda55}=_0x196b71,_0x5c3a19=_0x3d2735[0x0],_0x288eea=_0x5b6f30['parentSegment'];if(!_0x288eea)return console[_0x15c7b6(0x25e)]('Error:\x20Parent\x20segment\x20context\x20required'),console[_0x15c7b6(0x25e)](_0x15c7b6(0x210)),0x1;const _0x4ef5da=await withSpinner(_0x15c7b6(0x273),()=>_0x2dda55['segment'][_0x15c7b6(0x20f)](_0x288eea),{'verbose':_0x5b6f30['verbose']}),_0x2cc1f8=_0x4ef5da[_0x15c7b6(0x17f)];_0x5b6f30['verbose']&&(console[_0x15c7b6(0x25e)](_0x15c7b6(0x1be)+_0x288eea+'\x20(ID:\x20'+_0x2cc1f8+')'),_0x5c3a19&&console[_0x15c7b6(0x25e)]('Pattern:\x20'+_0x5c3a19));const _0x54521a=await withSpinner(_0x15c7b6(0x1a4),()=>_0x2dda55[_0x15c7b6(0x1e5)]['getParentFull'](_0x2cc1f8),{'verbose':_0x5b6f30[_0x15c7b6(0x23b)]}),_0x5e7667=_0x54521a[_0x15c7b6(0x17f)],_0x512b96=_0x5e7667[_0x15c7b6(0x1b7)],_0x347508=await withSpinner('Listing\x20journeys...',()=>_0x2dda55['journey'][_0x15c7b6(0x2a3)](_0x2cc1f8,_0x512b96),{'verbose':_0x5b6f30['verbose']});let _0x392fd0=_0x347508['data'][_0x15c7b6(0x1ca)];const _0x12d8a8=_0x347508[_0x15c7b6(0x17f)][_0x15c7b6(0x184)],_0x5bd4b2=new Map();for(const _0xc3dc73 of _0x12d8a8){_0x5bd4b2[_0x15c7b6(0x1c7)](_0xc3dc73['id'],_0xc3dc73[_0x15c7b6(0x29b)]);}if(_0x5c3a19){const _0x556f0a=globToRegex(_0x5c3a19);_0x392fd0=_0x392fd0['filter'](_0x528df8=>_0x556f0a[_0x15c7b6(0x24a)](_0x528df8[_0x15c7b6(0x1e6)]));}console['error']('✔\x20Found\x20'+_0x392fd0[_0x15c7b6(0x1c4)]+_0x15c7b6(0x292)+(_0x392fd0['length']!==0x1?'s':''));const _0x26530f=_0x11fcef=>{const _0x335bbf=_0x15c7b6;return getConsoleNextUrl(_0x5b6f30[_0x335bbf(0x1d0)],'/app/ps/'+_0x2cc1f8+'/e/'+_0x11fcef+_0x335bbf(0x266));};if(_0x5b6f30[_0x15c7b6(0x1ee)]==='table')await handleSDKOutput(_0x392fd0,_0x5b6f30);else{if(_0x5b6f30[_0x15c7b6(0x1ee)]===_0x15c7b6(0x1c2)){const _0x144dfd=_0x392fd0[_0x15c7b6(0x262)](_0x121686=>({..._0x121686,'url':_0x26530f(_0x121686['id'])}));await handleSDKOutput(_0x144dfd,_0x5b6f30);}else{console['log']('['+_0x288eea+']');const _0x2b6e99=new Map(),_0x185d7e=[];for(const _0x431ab8 of _0x392fd0){if(!_0x431ab8[_0x15c7b6(0x176)]||_0x431ab8[_0x15c7b6(0x176)]===_0x512b96)_0x185d7e[_0x15c7b6(0x1d9)](_0x431ab8);else{const _0x4ce949=_0x2b6e99[_0x15c7b6(0x1e1)](_0x431ab8[_0x15c7b6(0x176)])||[];_0x4ce949[_0x15c7b6(0x1d9)](_0x431ab8),_0x2b6e99[_0x15c7b6(0x1c7)](_0x431ab8[_0x15c7b6(0x176)],_0x4ce949);}}const _0x211bdd=(_0x546ee9,_0x1bfff0)=>_0x546ee9[_0x15c7b6(0x1e6)][_0x15c7b6(0x1bd)](_0x1bfff0[_0x15c7b6(0x1e6)],undefined,{'sensitivity':'base'});_0x185d7e['sort'](_0x211bdd);for(const _0x3b142a of _0x185d7e){console[_0x15c7b6(0x1df)](formatJourneyItem(_0x3b142a,'',_0x26530f(_0x3b142a['id'])));}const _0x401041=[..._0x2b6e99[_0x15c7b6(0x278)]()]['sort']((_0x176678,_0x8c9879)=>{const _0x2b4d5b=_0x15c7b6,_0x51c6ae=_0x5bd4b2[_0x2b4d5b(0x1e1)](_0x176678[0x0])||_0x176678[0x0],_0x341dc2=_0x5bd4b2[_0x2b4d5b(0x1e1)](_0x8c9879[0x0])||_0x8c9879[0x0];return _0x51c6ae[_0x2b4d5b(0x1bd)](_0x341dc2,undefined,{'sensitivity':_0x2b4d5b(0x1c9)});});for(const [_0x17172a,_0x1b8718]of _0x401041){const _0x302579=_0x5bd4b2[_0x15c7b6(0x1e1)](_0x17172a)||_0x17172a;console['log'](_0x15c7b6(0x1d7)+_0x302579),_0x1b8718[_0x15c7b6(0x182)](_0x211bdd);for(const _0x393b22 of _0x1b8718){console[_0x15c7b6(0x1df)](formatJourneyItem(_0x393b22,'\x20\x20',_0x26530f(_0x393b22['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x466491(0x29b)]=a27_0x466491(0x21f);[a27_0x466491(0x270)]=a27_0x466491(0x218);async[a27_0x466491(0x271)](_0x47a271){const _0x246146=a27_0x466491,{options:_0x27709f,args:_0x2a4f8c,tdx:_0x16b498}=_0x47a271,_0x5d20f9=_0x2a4f8c[0x0];if(!_0x5d20f9)return console[_0x246146(0x25e)](_0x246146(0x253)),console[_0x246146(0x25e)](_0x246146(0x1b2)),console[_0x246146(0x25e)](_0x246146(0x290)),console[_0x246146(0x25e)](_0x246146(0x1cb)),0x1;_0x27709f[_0x246146(0x23b)]&&console[_0x246146(0x25e)](_0x246146(0x18a)+_0x5d20f9);const {journeyId:_0x1abc07,parentSegmentId:_0x246e58}=await resolveJourneyIdFromInput(_0x5d20f9,_0x27709f,_0x16b498);if(_0x27709f[_0x246146(0x206)]){const _0x5c9b9c=getConsoleNextUrl(_0x27709f[_0x246146(0x1d0)],_0x246146(0x225)+_0x246e58+_0x246146(0x17b)+_0x1abc07+_0x246146(0x1b4));return console['error'](a27_0x5bb097[_0x246146(0x18f)]('✔')+_0x246146(0x250)+a27_0x5bb097[_0x246146(0x1ea)](_0x5c9b9c)),openBrowser(_0x5c9b9c),0x0;}const _0x1a0fb8=await withSpinner('Getting\x20journey\x20details...',()=>_0x16b498[_0x246146(0x21e)][_0x246146(0x240)](_0x1abc07),{'verbose':_0x27709f[_0x246146(0x23b)]}),_0x1d6dc0=_0x1a0fb8['data'],_0x624851=_0x27709f['includeStats'];let _0x5d08d9;if(_0x624851)try{const _0x2f97ca=await withSpinner(_0x246146(0x297),()=>_0x16b498[_0x246146(0x21e)][_0x246146(0x1da)](_0x1abc07),{'verbose':_0x27709f[_0x246146(0x23b)]});_0x5d08d9=_0x2f97ca[_0x246146(0x17f)];}catch{_0x27709f[_0x246146(0x23b)]&&console[_0x246146(0x25e)](_0x246146(0x231));}const _0x441cbb=getConsoleNextUrl(_0x27709f[_0x246146(0x1d0)],'/app/ps/'+_0x246e58+_0x246146(0x17b)+_0x1abc07+_0x246146(0x1b4)),_0x7344fe={'id':_0x1d6dc0['id'],'name':_0x1d6dc0[_0x246146(0x27d)][_0x246146(0x29b)],'description':_0x1d6dc0[_0x246146(0x27d)][_0x246146(0x270)],'state':_0x1d6dc0[_0x246146(0x27d)][_0x246146(0x296)],'paused':_0x1d6dc0[_0x246146(0x27d)][_0x246146(0x1b9)],'reentry_mode':_0x1d6dc0[_0x246146(0x27d)]['reentryMode'],'stages':_0x1d6dc0[_0x246146(0x27d)][_0x246146(0x23d)]?.[_0x246146(0x1c4)]||0x0,..._0x1d6dc0['attributes'][_0x246146(0x189)]&&{'goal':_0x1d6dc0[_0x246146(0x27d)][_0x246146(0x189)][_0x246146(0x29b)]},..._0x5d08d9&&{'statistics':{'size':_0x5d08d9['size'],'entered':_0x5d08d9[_0x246146(0x216)],'goal_achieved':_0x5d08d9[_0x246146(0x21b)],'completion_rate':_0x5d08d9['completionRate'],'exit_or_jump':_0x5d08d9[_0x246146(0x1ac)],'exit_or_jump_rate':_0x5d08d9[_0x246146(0x21a)],'stages':_0x5d08d9[_0x246146(0x26a)]}},'url':_0x441cbb};return await handleSingleObjectOutput(_0x7344fe,_0x27709f),0x0;}}export class JourneyStatsCommand extends BaseCommand{['name']=a27_0x466491(0x193);[a27_0x466491(0x270)]=a27_0x466491(0x261);async[a27_0x466491(0x271)](_0x30989c){const _0x1e90db=a27_0x466491,{options:_0x3be4ff,args:_0x108559,tdx:_0x116a84}=_0x30989c,_0x1ac4e1=_0x108559[0x0];if(!requireNameOrPath(_0x1ac4e1))return 0x1;_0x3be4ff['verbose']&&console['error'](_0x1e90db(0x18a)+_0x1ac4e1);const _0x527fe8=_0x3be4ff,_0x41609b=_0x527fe8['from'],_0x2efad8=_0x527fe8['to'],_0xb86ce=_0x527fe8['includeHistory'],_0x1b9627=_0x527fe8[_0x1e90db(0x1f2)];_0xb86ce&&!_0x41609b&&!_0x2efad8&&console[_0x1e90db(0x25e)](_0x1e90db(0x198));const _0x1c5a8d=_0xb86ce?withJsonFormat(_0x3be4ff):_0x3be4ff,{journeyId:_0x133fba,journeyName:_0x5d9475}=await resolveJourneyIdFromInput(_0x1ac4e1,_0x1c5a8d,_0x116a84),_0x2d1115=_0x41609b||_0x2efad8?{'from':_0x41609b,'to':_0x2efad8}:undefined,_0x5df060=await withSpinner(_0x1e90db(0x297),()=>Promise[_0x1e90db(0x1fa)]([_0x116a84['journey']['getJourney'](_0x133fba),_0x116a84[_0x1e90db(0x21e)][_0x1e90db(0x1da)](_0x133fba,_0x2d1115)]),{'verbose':_0x1c5a8d[_0x1e90db(0x23b)]}),[_0x771c94,_0x2d1fe8]=_0x5df060[_0x1e90db(0x17f)];if(!_0x2d1fe8||_0x2d1fe8[_0x1e90db(0x1f9)]===null)return console[_0x1e90db(0x25e)](_0x1e90db(0x207)+_0x5d9475),console['error'](_0x1e90db(0x1ae)),0x0;const _0x2ceade=buildStageNameMap(_0x771c94),_0x4081d2=!!(_0x2d1115&&_0x2d1fe8[_0x1e90db(0x267)]?.[_0x1e90db(0x1c4)]),_0x5c456e={'stageNameMap':_0x2ceade,'hasPeriod':_0x4081d2,'includeHistory':!!_0xb86ce};if(_0x1b9627&&_0x2d1fe8[_0x1e90db(0x26a)]){const _0x5dcec7=_0x2d1fe8[_0x1e90db(0x26a)][_0x1e90db(0x175)](_0x244b7a=>{const _0x1bbaf2=_0x1e90db,_0x4667ac=_0x2ceade[_0x1bbaf2(0x1e1)](_0x244b7a['id'])??'';return _0x4667ac[_0x1bbaf2(0x214)]()===_0x1b9627[_0x1bbaf2(0x214)]();});if(_0x5dcec7)return await handleSingleObjectOutput(formatStageStats(_0x5dcec7,_0x5c456e),_0x1c5a8d),0x0;const _0x257d2a=_0x2d1fe8[_0x1e90db(0x26a)][_0x1e90db(0x262)](_0xace72b=>_0x2ceade[_0x1e90db(0x1e1)](_0xace72b['id'])??_0xace72b['id']);return console[_0x1e90db(0x25e)](_0x1e90db(0x187)+_0x1b9627+_0x1e90db(0x196)),console[_0x1e90db(0x25e)](_0x1e90db(0x22c)+_0x257d2a[_0x1e90db(0x236)](',\x20')),0x1;}const _0xd55cbe=_0x2d1fe8['stages']?.[_0x1e90db(0x262)](_0x125d6c=>formatStageStats(_0x125d6c,_0x5c456e)),_0x4351fa=assembleJourneyStats(_0x2d1fe8,{'from':_0x41609b,'to':_0x2efad8,'includeHistory':_0xb86ce});return await this['renderStats'](_0x4351fa,_0xd55cbe??[],_0x1c5a8d),0x0;}async[a27_0x466491(0x177)](_0x7fd530,_0x21bba2,_0x32d7ba){const _0xfe06aa=a27_0x466491,_0x1016c7=_0x32d7ba[_0xfe06aa(0x1ee)]==='json'||_0x32d7ba[_0xfe06aa(0x1ee)]===_0xfe06aa(0x26d)||_0x32d7ba[_0xfe06aa(0x1c2)]||_0x32d7ba[_0xfe06aa(0x26d)];if(_0x1016c7){_0x7fd530[_0xfe06aa(0x26a)]=_0x21bba2,await handleSingleObjectOutput(_0x7fd530,_0x32d7ba);return;}await handleSingleObjectOutput(_0x7fd530,_0x32d7ba);for(const _0x2ca323 of _0x21bba2){console['log'](''),console[_0xfe06aa(0x1df)](String(a27_0x5bb097[_0xfe06aa(0x1ea)][_0xfe06aa(0x1cf)]('['+_0x2ca323[_0xfe06aa(0x29b)]+']'))+a27_0x5bb097[_0xfe06aa(0x239)]('\x20'+_0x2ca323['id']));const {id:_0x2ea5c5,name:_0x56ee0b,..._0xdbba8d}=_0x2ca323;await handleSingleObjectOutput(_0xdbba8d,_0x32d7ba);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x466491(0x29b)]='journey:traffic';['description']=a27_0x466491(0x1a0);async[a27_0x466491(0x271)](_0x5711ee){const _0x2d2043=a27_0x466491,{options:_0x1611ab,args:_0x54b542,tdx:_0x480b1b}=_0x5711ee,_0x32589e=_0x54b542[0x0];if(!requireNameOrPath(_0x32589e))return 0x1;_0x1611ab[_0x2d2043(0x23b)]&&console[_0x2d2043(0x25e)](_0x2d2043(0x18a)+_0x32589e);const _0x1348b3=_0x1611ab,_0x341a4e=_0x1348b3[_0x2d2043(0x25d)],_0x260bc3=_0x1348b3[_0x2d2043(0x221)],_0x57cda5=_0x1348b3['to'],_0x20690b=_0x1348b3[_0x2d2043(0x288)];if(_0x341a4e&&_0x341a4e!==_0x2d2043(0x1fb)&&_0x341a4e!==_0x2d2043(0x1bb))return console[_0x2d2043(0x25e)]('Error:\x20Invalid\x20--type\x20\x22'+_0x341a4e+_0x2d2043(0x2a1)),0x1;const _0x13f96f=withJsonFormat(_0x1611ab),{journeyId:_0x4b6ab1,journeyName:_0x3b5b2b}=await resolveJourneyIdFromInput(_0x32589e,_0x13f96f,_0x480b1b),_0x51fc1c={'type':_0x341a4e,'from':_0x260bc3,'to':_0x57cda5,'limit':_0x20690b},_0x5bedcc=await withSpinner(_0x2d2043(0x281),()=>_0x480b1b[_0x2d2043(0x21e)][_0x2d2043(0x25b)](_0x4b6ab1,_0x51fc1c),{'verbose':_0x13f96f[_0x2d2043(0x23b)]}),_0x36c775=_0x5bedcc[_0x2d2043(0x17f)],_0x3eca11=_0x36c775[_0x2d2043(0x1fb)]&&(_0x36c775['conversion'][_0x2d2043(0x1f0)][_0x2d2043(0x1c4)]>0x0||_0x36c775[_0x2d2043(0x1fb)][_0x2d2043(0x22f)][_0x2d2043(0x1c4)]>0x0),_0x252f3b=_0x36c775[_0x2d2043(0x1bb)]&&_0x36c775[_0x2d2043(0x1bb)][_0x2d2043(0x1c4)]>0x0;if(!_0x3eca11&&!_0x252f3b)return console[_0x2d2043(0x25e)](_0x2d2043(0x200)+_0x3b5b2b),console['error']('Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.'),_0x260bc3&&_0x57cda5&&console[_0x2d2043(0x25e)](_0x2d2043(0x287)),0x0;return await handleSingleObjectOutput(_0x36c775,_0x13f96f),0x0;}}function formatStageStats(_0x1b23b3,_0x3f8eb1){const _0x370bc2=a27_0x466491,_0x1be5af=_0x3f8eb1['hasPeriod']&&_0x1b23b3[_0x370bc2(0x267)]?.[_0x370bc2(0x1c4)]?aggregateStageHistory(_0x1b23b3[_0x370bc2(0x267)]):{'size':_0x1b23b3[_0x370bc2(0x222)],'entered':_0x1b23b3[_0x370bc2(0x216)],'milestone':_0x1b23b3[_0x370bc2(0x201)],'milestone_rate':_0x1b23b3[_0x370bc2(0x17e)],'exit_or_jump':_0x1b23b3['exitOrJumpSize'],'exit_or_jump_rate':_0x1b23b3[_0x370bc2(0x21a)]},_0x49b358={'id':_0x1b23b3['id'],'name':_0x3f8eb1[_0x370bc2(0x1ef)][_0x370bc2(0x1e1)](_0x1b23b3['id'])??_0x1b23b3['id'],..._0x1be5af};return _0x3f8eb1[_0x370bc2(0x17c)]&&_0x3f8eb1[_0x370bc2(0x1e2)]&&_0x1b23b3['history']&&(_0x49b358[_0x370bc2(0x267)]=_0x1b23b3[_0x370bc2(0x267)]),_0x49b358;}export class JourneyPauseCommand extends BaseCommand{['name']='journey:pause';[a27_0x466491(0x270)]=a27_0x466491(0x1d1);async['execute'](_0x22cab6){const _0x3576ef=a27_0x466491,{options:_0x1eef4d,args:_0x17551d,tdx:_0x4f1476}=_0x22cab6,_0x4d4288=_0x17551d[0x0];if(!requireNameOrPath(_0x4d4288))return 0x1;_0x1eef4d[_0x3576ef(0x23b)]&&console[_0x3576ef(0x25e)](_0x3576ef(0x18a)+_0x4d4288);const {journeyId:_0x1e2a53,journeyName:_0xbc06b9}=await resolveJourneyIdFromInput(_0x4d4288,_0x1eef4d,_0x4f1476);if(!_0x1eef4d[_0x3576ef(0x28b)]){const _0x547441=await confirm(_0x3576ef(0x28e)+_0xbc06b9+'\x22?');if(!_0x547441)return console[_0x3576ef(0x25e)](_0x3576ef(0x26f)),0x0;}const _0x32180c=await withSpinner(_0x3576ef(0x249),()=>_0x4f1476[_0x3576ef(0x21e)]['pause'](_0x1e2a53),{'verbose':_0x1eef4d[_0x3576ef(0x23b)]}),_0x97e3ba=_0x32180c['data'];return console['error']('✔\x20Journey\x20\x22'+_0x97e3ba['attributes']['name']+_0x3576ef(0x247)),0x0;}}export class JourneyRunCommand extends BaseCommand{[a27_0x466491(0x29b)]=a27_0x466491(0x188);[a27_0x466491(0x270)]='Trigger\x20on-demand\x20journey\x20workflow\x20execution';async[a27_0x466491(0x271)](_0x5c0b8f){const _0x459452=a27_0x466491,{options:_0xe0f7ee,args:_0x56ed21,tdx:_0x1805db}=_0x5c0b8f,_0x1cd67f=_0x56ed21[0x0];if(!requireNameOrPath(_0x1cd67f))return 0x1;_0xe0f7ee['verbose']&&console['error']('Input:\x20'+_0x1cd67f);const {journeyId:_0x1eafae,journeyName:_0x51f544}=await resolveJourneyIdFromInput(_0x1cd67f,_0xe0f7ee,_0x1805db);if(_0xe0f7ee[_0x459452(0x1eb)])return await this[_0x459452(0x272)](_0x5c0b8f,_0x1eafae,_0x51f544);if(!_0xe0f7ee[_0x459452(0x28b)]){const _0x4f7135=await confirm(_0x459452(0x223)+_0x51f544+'\x22?');if(!_0x4f7135)return console[_0x459452(0x25e)]('Cancelled'),0x0;}const _0x3e3256=await withSpinner(_0x459452(0x183),()=>_0x1805db[_0x459452(0x21e)][_0x459452(0x1c3)](_0x1eafae),{'verbose':_0xe0f7ee['verbose']}),_0x51966c=_0x3e3256[_0x459452(0x17f)],_0x37056b=getWorkflowSessionUrl(_0xe0f7ee[_0x459452(0x1d0)],_0x51966c[_0x459452(0x1ed)],_0x51966c['workflowSessionId']);return console[_0x459452(0x25e)]('\x0a'+a27_0x5bb097[_0x459452(0x18f)]('✔')+_0x459452(0x1d6)),console[_0x459452(0x25e)]('\x20\x20'+a27_0x5bb097['dim'](_0x459452(0x1af))+'\x20'+_0x51f544),console[_0x459452(0x25e)]('\x20\x20'+a27_0x5bb097['dim'](_0x459452(0x1f8))+'\x20'+_0x51966c['status']),console[_0x459452(0x25e)]('\x20\x20'+a27_0x5bb097['dim'](_0x459452(0x1fc))+'\x20'+_0x51966c[_0x459452(0x1fd)]),console[_0x459452(0x25e)]('\x20\x20'+_0x37056b),0x0;}async['executeDryRun'](_0x319c47,_0x5a686a,_0x342314){const _0x28931f=a27_0x466491,{options:_0x534478,tdx:_0x2c828c}=_0x319c47,_0x5dc1da=await withSpinner(_0x28931f(0x192)+_0x342314+'...',()=>Promise[_0x28931f(0x1fa)]([_0x2c828c[_0x28931f(0x21e)]['getJourney'](_0x5a686a),_0x2c828c[_0x28931f(0x21e)][_0x28931f(0x22d)](_0x5a686a)]),{'verbose':_0x534478[_0x28931f(0x23b)]}),[_0x401455,_0x1bc167]=_0x5dc1da[_0x28931f(0x17f)],_0x4eb292=_0x401455[_0x28931f(0x27d)],_0x5aee2c=_0x4eb292[_0x28931f(0x23d)];console['log'](a27_0x5bb097[_0x28931f(0x1cf)](_0x28931f(0x1af)),_0x4eb292[_0x28931f(0x29b)]),console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x1cf)](_0x28931f(0x294)),_0x401455['id']),console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x1cf)](_0x28931f(0x18b)),_0x4eb292['state']),console['log'](a27_0x5bb097[_0x28931f(0x1cf)](_0x28931f(0x1f5)),_0x4eb292[_0x28931f(0x1b9)]?a27_0x5bb097['yellow'](_0x28931f(0x28b)):a27_0x5bb097[_0x28931f(0x18f)]('no')),console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x1cf)]('Parent\x20segment\x20ID:'),_0x4eb292['audienceId']);const _0x2bfecb=_0x5aee2c[_0x28931f(0x1c4)]>0x0?'\x20('+_0x5aee2c[_0x28931f(0x262)](_0x28d016=>_0x28d016[_0x28931f(0x29b)])[_0x28931f(0x236)](',\x20')+')':'';console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x1cf)]('Stages:'),''+_0x5aee2c[_0x28931f(0x1c4)]+_0x2bfecb),console[_0x28931f(0x1df)]('');if(_0x1bc167[_0x28931f(0x1c4)]===0x0)console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x1cf)](_0x28931f(0x233)),a27_0x5bb097[_0x28931f(0x239)](_0x28931f(0x257)));else{console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x1cf)](_0x28931f(0x233)));for(const _0x14f375 of _0x1bc167){const _0x2b79ec=_0x14f375[_0x28931f(0x29b)]??_0x28931f(0x220),_0x13beff=_0x14f375[_0x28931f(0x203)]!=null?_0x28931f(0x1a7)+_0x14f375[_0x28931f(0x203)]:_0x28931f(0x230),_0x39513c=_0x14f375[_0x28931f(0x1fe)]?''+_0x14f375[_0x28931f(0x1fe)]+(_0x14f375[_0x28931f(0x27b)]?_0x28931f(0x227)+_0x14f375[_0x28931f(0x27b)]:''):_0x28931f(0x217),_0x322ed1=_0x14f375['runAfterJourneyRefresh']?_0x28931f(0x191):'';console[_0x28931f(0x1df)]('\x20\x20'+a27_0x5bb097[_0x28931f(0x256)](_0x28931f(0x1c5))+'\x20'+_0x2b79ec+_0x28931f(0x1a8)+_0x13beff+_0x28931f(0x20d)+_0x39513c+_0x322ed1);}}return console[_0x28931f(0x1df)](a27_0x5bb097[_0x28931f(0x256)](_0x28931f(0x235))),0x0;}}export class JourneyResumeCommand extends BaseCommand{[a27_0x466491(0x29b)]=a27_0x466491(0x195);[a27_0x466491(0x270)]=a27_0x466491(0x1c0);async[a27_0x466491(0x271)](_0x3a0980){const _0x15175a=a27_0x466491,{options:_0x2565ab,args:_0x2cea7a,tdx:_0xed4fbe}=_0x3a0980,_0x59dd0f=_0x2cea7a[0x0];if(!requireNameOrPath(_0x59dd0f))return 0x1;_0x2565ab['verbose']&&console[_0x15175a(0x25e)](_0x15175a(0x18a)+_0x59dd0f);const {journeyId:_0x599a45,journeyName:_0x54b445}=await resolveJourneyIdFromInput(_0x59dd0f,_0x2565ab,_0xed4fbe);if(_0x2565ab[_0x15175a(0x1eb)])return await this[_0x15175a(0x272)](_0x3a0980,_0x599a45,_0x54b445);if(!_0x2565ab['yes']){const _0x4c1ce3=await confirm(_0x15175a(0x1dc)+_0x54b445+'\x22?');if(!_0x4c1ce3)return console[_0x15175a(0x25e)](_0x15175a(0x26f)),0x0;}const _0x41b6a9=await withSpinner(_0x15175a(0x1aa),()=>_0xed4fbe[_0x15175a(0x21e)]['resume'](_0x599a45),{'verbose':_0x2565ab[_0x15175a(0x23b)]}),_0x523cfc=_0x41b6a9[_0x15175a(0x17f)];return console[_0x15175a(0x25e)](_0x15175a(0x1d5)+_0x523cfc[_0x15175a(0x27d)][_0x15175a(0x29b)]+_0x15175a(0x1d8)),0x0;}async[a27_0x466491(0x272)](_0x27f968,_0x1e4a0b,_0x6b0722){const _0x40789f=a27_0x466491,{options:_0x2e7378,tdx:_0x21a3fa}=_0x27f968,_0x4de32f=await withSpinner('Fetching\x20journey\x20'+_0x6b0722+'...',()=>Promise[_0x40789f(0x1fa)]([_0x21a3fa['journey'][_0x40789f(0x240)](_0x1e4a0b),_0x21a3fa['journey'][_0x40789f(0x22d)](_0x1e4a0b)]),{'verbose':_0x2e7378['verbose']}),[_0x474fd9,_0x5bc56c]=_0x4de32f['data'],_0x23148d=_0x474fd9[_0x40789f(0x27d)],_0x1edab8=_0x23148d[_0x40789f(0x23d)];console[_0x40789f(0x1df)](a27_0x5bb097[_0x40789f(0x1cf)](_0x40789f(0x1af)),_0x23148d[_0x40789f(0x29b)]),console[_0x40789f(0x1df)](a27_0x5bb097[_0x40789f(0x1cf)](_0x40789f(0x294)),_0x474fd9['id']),console['log'](a27_0x5bb097[_0x40789f(0x1cf)](_0x40789f(0x18b)),_0x23148d['state']),console[_0x40789f(0x1df)](a27_0x5bb097[_0x40789f(0x1cf)](_0x40789f(0x1f5)),_0x23148d['paused']?a27_0x5bb097[_0x40789f(0x256)](_0x40789f(0x28b)):a27_0x5bb097[_0x40789f(0x18f)]('no'));_0x23148d[_0x40789f(0x1a2)]&&console['log'](a27_0x5bb097['bold']('Paused\x20at:'),_0x23148d[_0x40789f(0x1a2)]);console[_0x40789f(0x1df)](a27_0x5bb097[_0x40789f(0x1cf)]('Parent\x20segment\x20ID:'),_0x23148d[_0x40789f(0x1e8)]);const _0x44f3a5=_0x1edab8[_0x40789f(0x1c4)]>0x0?'\x20('+_0x1edab8[_0x40789f(0x262)](_0x4adffa=>_0x4adffa[_0x40789f(0x29b)])['join'](',\x20')+')':'';console[_0x40789f(0x1df)](a27_0x5bb097[_0x40789f(0x1cf)](_0x40789f(0x27a)),''+_0x1edab8[_0x40789f(0x1c4)]+_0x44f3a5),console[_0x40789f(0x1df)]('');if(_0x5bc56c[_0x40789f(0x1c4)]===0x0)console[_0x40789f(0x1df)](a27_0x5bb097[_0x40789f(0x1cf)](_0x40789f(0x233)),a27_0x5bb097[_0x40789f(0x239)](_0x40789f(0x257)));else{console['log'](a27_0x5bb097['bold'](_0x40789f(0x233)));for(const _0x198e86 of _0x5bc56c){const _0x5a6562=_0x198e86['name']??_0x40789f(0x220),_0x25a7f3=_0x198e86[_0x40789f(0x203)]!=null?'connection\x20'+_0x198e86[_0x40789f(0x203)]:_0x40789f(0x230),_0x51a724=_0x198e86[_0x40789f(0x1fe)]?''+_0x198e86[_0x40789f(0x1fe)]+(_0x198e86[_0x40789f(0x27b)]?_0x40789f(0x227)+_0x198e86[_0x40789f(0x27b)]:''):'none',_0x2f95a6=_0x198e86[_0x40789f(0x208)]?_0x40789f(0x191):'';console[_0x40789f(0x1df)]('\x20\x20'+a27_0x5bb097[_0x40789f(0x256)](_0x40789f(0x1c5))+'\x20'+_0x5a6562+_0x40789f(0x1a8)+_0x25a7f3+_0x40789f(0x20d)+_0x51a724+_0x2f95a6);}}return console[_0x40789f(0x1df)](a27_0x5bb097['yellow'](_0x40789f(0x185))),0x0;}}export class JourneyPullCommand extends BaseCommand{[a27_0x466491(0x29b)]=a27_0x466491(0x186);['description']='Export\x20journey(s)\x20as\x20YAML\x20files';async[a27_0x466491(0x271)](_0xa4809a){const _0x28bcad=a27_0x466491,{options:_0x4aa1c1,args:_0x5c1283,tdx:_0x570b60}=_0xa4809a,_0x3e14bf=_0x4aa1c1,_0xcd468c=_0x5c1283[0x0],_0x16a6c8=_0xcd468c&&isYamlFilePath(_0xcd468c),_0x2e5208=await resolveTarget({'arg':_0x16a6c8?_0xcd468c:undefined,'contextParent':_0x4aa1c1[_0x28bcad(0x276)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x2e5208))return _0x2e5208[_0x28bcad(0x22b)]===_0x28bcad(0x1f4)?(console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x256)](_0x28bcad(0x23a))),console['error'](_0x28bcad(0x19c)),console['error'](_0x28bcad(0x1b6)),console[_0x28bcad(0x25e)](_0x28bcad(0x26b)),console[_0x28bcad(0x25e)](_0x28bcad(0x237))):(console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x212)](_0x28bcad(0x215)+_0x2e5208[_0x28bcad(0x2a2)]+'\x0a')),_0x2e5208[_0x28bcad(0x22e)]&&console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x1ea)](_0x2e5208[_0x28bcad(0x22e)]))),0x1;let _0x1d5fb9=_0x16a6c8?undefined:_0xcd468c,_0x23b63b,_0x16be69;_0x2e5208[_0x28bcad(0x25d)]===_0x28bcad(0x286)&&(_0x1d5fb9=_0x2e5208['resourceName'],_0x23b63b=_0x2e5208[_0x28bcad(0x213)],_0x16be69=_0x2e5208[_0x28bcad(0x178)]);const _0x2d21dc=_0x2e5208['parentName'],_0x4baddc=_0x2e5208[_0x28bcad(0x1e7)];_0x3e14bf[_0x28bcad(0x23b)]&&(console[_0x28bcad(0x25e)](_0x28bcad(0x1be)+_0x2d21dc),console[_0x28bcad(0x25e)](_0x28bcad(0x282)+_0x4baddc),_0x1d5fb9&&console['error'](_0x28bcad(0x27c)+_0x1d5fb9),_0x23b63b&&console['error'](_0x28bcad(0x2a5)+_0x23b63b),_0x16be69&&console[_0x28bcad(0x25e)]('Folder\x20path:\x20'+_0x16be69));const _0x3b555b=await withSpinner(_0x28bcad(0x273),()=>_0x570b60[_0x28bcad(0x1e5)][_0x28bcad(0x20f)](_0x2d21dc),{'verbose':_0x4aa1c1[_0x28bcad(0x23b)]}),_0x11d5a4=_0x3b555b[_0x28bcad(0x17f)],{journeys:_0x1c9def,folders:_0x130e79}=await withSpinner('Fetching\x20journeys\x20and\x20folders...',async()=>{const _0x438d94=_0x28bcad,[_0x5abf1d,_0x4f7447]=await Promise['all']([_0x570b60['journey'][_0x438d94(0x1f7)](_0x11d5a4,undefined,{'includeAllVersions':!![]}),_0x570b60[_0x438d94(0x1e5)][_0x438d94(0x209)](_0x11d5a4)]);return{'journeys':_0x5abf1d,'folders':_0x4f7447};},{'verbose':_0x4aa1c1[_0x28bcad(0x23b)]})['then'](_0x2998cc=>_0x2998cc[_0x28bcad(0x17f)]);let _0x1913f0=_0x1c9def;const _0x4d04d5=buildFolderIdToPathMap(_0x130e79);if(_0x1d5fb9){const _0x4f7426=_0x1913f0[_0x28bcad(0x269)](_0x7a135b=>_0x7a135b[_0x28bcad(0x1e6)]['toLowerCase']()===_0x1d5fb9[_0x28bcad(0x214)]());if(_0x4f7426[_0x28bcad(0x1c4)]===0x0)return console['error'](_0x28bcad(0x1e4)+_0x1d5fb9),console[_0x28bcad(0x25e)]('Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'),0x1;_0x1913f0=_0x4f7426;}if(_0x16be69!==undefined){const _0x4eb266=_0x1913f0[_0x28bcad(0x269)](_0x413b0d=>{const _0x3866da=_0x28bcad,_0x37517a=_0x413b0d[_0x3866da(0x176)]?_0x4d04d5[_0x3866da(0x1e1)](_0x413b0d[_0x3866da(0x176)])||'':'';return _0x37517a===_0x16be69;});if(_0x4eb266[_0x28bcad(0x1c4)]===0x0&&_0x1913f0[_0x28bcad(0x1c4)]>0x0){console[_0x28bcad(0x25e)](_0x28bcad(0x21c)+_0x1d5fb9+_0x28bcad(0x19d)+(_0x16be69||_0x28bcad(0x246))),console[_0x28bcad(0x25e)](_0x28bcad(0x241));for(const _0x510b3b of _0x1913f0){const _0x291740=_0x510b3b['folderId']?_0x4d04d5[_0x28bcad(0x1e1)](_0x510b3b[_0x28bcad(0x176)])||'':'';console[_0x28bcad(0x25e)](_0x28bcad(0x1a3)+(_0x291740||_0x28bcad(0x1b0))+'/'+_0x510b3b['journeyBundleName']);}return 0x1;}_0x1913f0=_0x4eb266;}if(_0x1913f0[_0x28bcad(0x1c4)]===0x0)return console['error']('No\x20journeys\x20found'),0x0;const _0x1cf84e=new Map();for(const _0x3dd22f of _0x1913f0){const _0x43afdb=_0x3dd22f['journeyBundleId'];!_0x1cf84e['has'](_0x43afdb)&&_0x1cf84e[_0x28bcad(0x1c7)](_0x43afdb,[]),_0x1cf84e[_0x28bcad(0x1e1)](_0x43afdb)[_0x28bcad(0x1d9)](_0x3dd22f);}for(const _0x553c38 of _0x1cf84e['values']()){_0x553c38['sort']((_0x30a7bb,_0x12f721)=>(_0x30a7bb['versionNumber']||0x0)-(_0x12f721[_0x28bcad(0x18d)]||0x0));}const _0x46f4da=[],{idToEmailMap:_0x15bfea,connectionIdToNameMap:_0x3c9373}=await withSpinner(_0x28bcad(0x29d),async()=>{const _0xf3a8bd=_0x28bcad,[_0x31c0a7,_0x1730a1]=await Promise['all']([_0x570b60[_0xf3a8bd(0x1b3)]['buildIdToEmailMap'](),_0x570b60['connection'][_0xf3a8bd(0x234)]()]);return{'idToEmailMap':_0x31c0a7,'connectionIdToNameMap':_0x1730a1};},{'verbose':_0x4aa1c1[_0x28bcad(0x23b)]})[_0x28bcad(0x1ab)](_0x3a9e58=>_0x3a9e58[_0x28bcad(0x17f)]);for(const _0x394976 of _0x1cf84e[_0x28bcad(0x1f3)]()){const _0x271a12=_0x394976[0x0][_0x28bcad(0x1e6)],_0x3bca87=_0x394976[0x0][_0x28bcad(0x176)],_0x4bc618=_0x3bca87?_0x4d04d5[_0x28bcad(0x1e1)](_0x3bca87)||'':'',_0x52f43b=_0x4bc618?a27_0x35f653[_0x28bcad(0x236)](_0x4baddc,_0x4bc618):_0x4baddc,_0x26030f=_0x23b63b||a27_0x35f653['join'](_0x52f43b,sanitizeFileName(_0x271a12)+_0x28bcad(0x20b));let _0x4d0dd2,_0x3e8a1b;if(existsSync(_0x26030f))try{const _0x1453c7=readFileSync(_0x26030f,_0x28bcad(0x29a)),_0x266d4d=parseYamlString(_0x1453c7);_0x3e8a1b=_0x266d4d,_0x4d0dd2=buildRuleToNameMapping(_0x266d4d),_0x3e14bf[_0x28bcad(0x23b)]&&_0x4d0dd2['size']>0x0&&console[_0x28bcad(0x25e)](_0x28bcad(0x229)+_0x4d0dd2['size']+_0x28bcad(0x202)+_0x271a12);}catch(_0x9bd167){_0x3e14bf[_0x28bcad(0x23b)]&&console[_0x28bcad(0x25e)](_0x28bcad(0x242)+_0x9bd167['message']);}const _0x12d3b9=[],_0x9f00c8=new Set(),_0x256bd8=new Map(),_0x1a55b7=new Map(),_0x48df60=new Set(),_0x53bd6d=new Map(),_0x4bad85=new Map(),_0x322413=createJumpTargetCache();await withProgressSpinner('Fetching\x20'+_0x271a12+_0x28bcad(0x28c),async _0x5f561e=>{const _0x465a85=_0x28bcad;for(const _0x8f794c of _0x394976){const _0xc2d6b6=_0x394976[_0x465a85(0x1c4)]>0x1?_0x8f794c[_0x465a85(0x1e6)]+'\x20v'+(_0x8f794c[_0x465a85(0x18d)]||0x1):_0x8f794c[_0x465a85(0x1e6)];_0x5f561e['setPhase'](_0x465a85(0x1a1)+_0xc2d6b6);const _0x57e549=await _0x570b60[_0x465a85(0x21e)][_0x465a85(0x240)](_0x8f794c['id']),_0xe9c420=_0x57e549[_0x465a85(0x27d)]?.[_0x465a85(0x1e8)],_0x404ecc={'resolveSegment':async _0x13f06b=>{const _0x2c572d=_0x465a85;if(!_0xe9c420)return{'name':_0x13f06b,'isJourneyLocal':![]};const _0x353c33=_0x256bd8[_0x2c572d(0x1e1)](_0x13f06b);if(_0x353c33)return _0x353c33;try{const _0x3b3aed=await _0x570b60[_0x2c572d(0x1e5)][_0x2c572d(0x24c)](_0xe9c420,_0x13f06b),_0x501185=_0x3b3aed[_0x2c572d(0x1db)]===SEGMENT_KIND_JOURNEY;let _0x3aabcc,_0x25f9e5=_0x3b3aed[_0x2c572d(0x29b)];if(_0x501185&&_0x3b3aed[_0x2c572d(0x259)]){const _0x4933c4=await segmentResponseToDef(_0x3b3aed,{'resolveSegmentName':async _0x286955=>{const _0x5ec0d3=_0x2c572d,_0x2b1497=_0x256bd8[_0x5ec0d3(0x1e1)](_0x286955);if(_0x2b1497)return _0x2b1497['name'];const _0x324057=await _0x404ecc[_0x5ec0d3(0x205)](_0x286955);return _0x324057[_0x5ec0d3(0x29b)];}}),_0x3c93d6=_0x4933c4[_0x2c572d(0x259)];_0x3aabcc={'description':_0x3b3aed['description'],'rule':_0x3c93d6};const _0x132250=serializeRule(_0x3c93d6),_0x46c711=_0x1a55b7[_0x2c572d(0x1e1)](_0x132250);if(_0x46c711)_0x25f9e5=_0x46c711,_0x3aabcc=undefined,_0x3e14bf[_0x2c572d(0x23b)]&&console[_0x2c572d(0x25e)]('\x20\x20Consolidating\x20duplicate\x20segment:\x20'+_0x3b3aed[_0x2c572d(0x29b)]+_0x2c572d(0x1c6)+_0x46c711);else{let _0x121cd3=![];if(_0x4d0dd2){const _0x2e82ce=_0x4d0dd2[_0x2c572d(0x1e1)](_0x132250);if(_0x2e82ce){const _0x378880=_0x2e82ce['find'](_0x4a603c=>!_0x9f00c8[_0x2c572d(0x19f)](_0x4a603c));_0x378880&&(_0x25f9e5=_0x378880,_0x9f00c8[_0x2c572d(0x289)](_0x378880),_0x1a55b7[_0x2c572d(0x1c7)](_0x132250,_0x378880),_0x121cd3=!![],_0x3e14bf[_0x2c572d(0x23b)]&&console[_0x2c572d(0x25e)](_0x2c572d(0x25c)+_0x378880+'\x20(rule\x20match)'));}}if(!_0x121cd3){const _0x1ae876=generateJourneyLocalName(_0x3b3aed[_0x2c572d(0x29b)]);_0x1ae876&&(_0x25f9e5=_0x1ae876);let _0x2ce916=_0x25f9e5,_0xa94876=0x2;while(_0x9f00c8[_0x2c572d(0x19f)](_0x2ce916)){_0x2ce916=_0x25f9e5+'_'+_0xa94876,_0xa94876++;}_0x9f00c8[_0x2c572d(0x289)](_0x2ce916),_0x1a55b7[_0x2c572d(0x1c7)](_0x132250,_0x2ce916),_0x25f9e5=_0x2ce916;}}}const _0x17cfd2={'name':_0x25f9e5,'isJourneyLocal':_0x501185,'definition':_0x3aabcc};return _0x256bd8[_0x2c572d(0x1c7)](_0x13f06b,_0x17cfd2),_0x17cfd2;}catch(_0x22f294){return _0x4aa1c1[_0x2c572d(0x23b)]&&console[_0x2c572d(0x25e)](_0x2c572d(0x1b8)+_0x13f06b+':\x20'+_0x22f294[_0x2c572d(0x2a2)]),{'name':_0x13f06b,'isJourneyLocal':![]};}},'resolveActivation':async _0x10ee97=>{const _0x49aa71=_0x465a85,_0x15c66c=_0x53bd6d[_0x49aa71(0x1e1)](_0x10ee97);if(_0x15c66c)return _0x15c66c;try{const _0x2b944b=await _0x570b60['journey'][_0x49aa71(0x228)](_0x8f794c['id'],_0x10ee97),_0x23357e=journeyActivationStepToYaml(_0x2b944b,_0x15bfea,_0x3c9373),_0x58bf36=JSON[_0x49aa71(0x232)]({'name':_0x23357e['name'],'connection':_0x23357e['connection'],'connector_config':_0x23357e[_0x49aa71(0x1bc)]}),_0x1956b7=_0x4bad85[_0x49aa71(0x1e1)](_0x58bf36);if(_0x1956b7){const _0x5ed61a={'name':_0x1956b7,'isJourneyLocal':!![],'definition':_0x23357e};return _0x53bd6d['set'](_0x10ee97,_0x5ed61a),_0x5ed61a;}const _0x4d16ec=_0x2b944b[_0x49aa71(0x27d)][_0x49aa71(0x181)]['name']||_0x10ee97,_0x1656aa=sanitizeYamlKey(_0x4d16ec)||_0x49aa71(0x27e)+_0x10ee97;let _0xca0144=_0x1656aa,_0x4e45f0=0x2;while(_0x48df60['has'](_0xca0144)){_0xca0144=_0x1656aa+'_'+_0x4e45f0,_0x4e45f0++;}_0x48df60[_0x49aa71(0x289)](_0xca0144),_0x4bad85['set'](_0x58bf36,_0xca0144);const _0x1c0d4b={'name':_0xca0144,'isJourneyLocal':!![],'definition':_0x23357e};return _0x53bd6d['set'](_0x10ee97,_0x1c0d4b),_0x1c0d4b;}catch(_0x99a738){return _0x4aa1c1[_0x49aa71(0x23b)]&&console[_0x49aa71(0x25e)](_0x49aa71(0x1ad)+_0x10ee97+':\x20'+_0x99a738[_0x49aa71(0x2a2)]),{'name':_0x10ee97,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x4254e0,_0x29b26d)=>{const _0x769a02=_0x465a85;return resolveJumpTarget(_0x4254e0,_0x29b26d,_0x322413,_0x4de763=>_0x570b60[_0x769a02(0x21e)][_0x769a02(0x240)](_0x4de763));}},_0x3c4d22=await journeyResponseToDef(_0x57e549,_0x404ecc);_0x12d3b9[_0x465a85(0x1d9)]({'item':_0x8f794c,'yaml':_0x3c4d22});}},{'verbose':_0x4aa1c1[_0x28bcad(0x23b)]});const _0x58d067=await _0x570b60['journey'][_0x28bcad(0x248)](_0x394976[0x0][_0x28bcad(0x1a6)]),_0x29583c=buildMergedJourneyDef(_0x12d3b9,_0x4d0dd2,_0x58d067),_0x3703b4=normalizeJourneyDef(_0x29583c,_0x3e8a1b),_0x27689c=toYamlString(_0x3703b4),_0x72a47=_0x23b63b||a27_0x35f653[_0x28bcad(0x236)](_0x52f43b,sanitizeFileName(_0x271a12)+_0x28bcad(0x20b));!_0x23b63b&&_0x4bc618&&!existsSync(_0x52f43b)&&mkdirSync(_0x52f43b,{'recursive':!![]});const _0x5a7130=a27_0x35f653[_0x28bcad(0x1ce)](process[_0x28bcad(0x244)](),_0x72a47);if(existsSync(_0x72a47)){const _0x473741=readFileSync(_0x72a47,_0x28bcad(0x29a)),_0x3855ed=generateDiff(_0x473741,_0x27689c),_0x1be56f=hasChanges(_0x3855ed);_0x46f4da['push']({'relativePath':_0x5a7130,'absolutePath':_0x72a47,'content':_0x27689c,'isNew':![],'hasChanges':_0x1be56f,'diff':_0x1be56f?formatDiffWithColors(_0x3855ed):undefined});}else _0x46f4da['push']({'relativePath':_0x5a7130,'absolutePath':_0x72a47,'content':_0x27689c,'isNew':!![],'hasChanges':![]});}const _0x34a75f=_0x46f4da[_0x28bcad(0x269)](_0xf7a0e3=>_0xf7a0e3['isNew']),_0x2ad2c4=_0x46f4da[_0x28bcad(0x269)](_0x350b97=>!_0x350b97[_0x28bcad(0x1e9)]&&_0x350b97[_0x28bcad(0x1e3)]),_0x72f025=_0x46f4da['filter'](_0x4190a4=>!_0x4190a4[_0x28bcad(0x1e9)]&&!_0x4190a4[_0x28bcad(0x1e3)]),_0x197584=_0x1913f0[_0x28bcad(0x1c4)],_0x21bf17=_0x1cf84e[_0x28bcad(0x222)],_0x2fdd07=_0x197584>_0x21bf17?'\x20('+_0x197584+'\x20versions)':'';console[_0x28bcad(0x25e)](_0x28bcad(0x1f1)),console['error']('\x20\x20'+a27_0x5bb097[_0x28bcad(0x1ea)](_0x21bf17+'\x20journeys')+a27_0x5bb097[_0x28bcad(0x239)](_0x2fdd07)),console['error']('\x20\x20'+a27_0x5bb097[_0x28bcad(0x18f)]('+\x20'+_0x34a75f[_0x28bcad(0x1c4)]+_0x28bcad(0x1d4))),console[_0x28bcad(0x25e)]('\x20\x20'+a27_0x5bb097[_0x28bcad(0x256)]('~\x20'+_0x2ad2c4[_0x28bcad(0x1c4)]+_0x28bcad(0x1de))),console[_0x28bcad(0x25e)]('\x20\x20'+a27_0x5bb097['dim']('=\x20'+_0x72f025[_0x28bcad(0x1c4)]+_0x28bcad(0x20c))),console[_0x28bcad(0x25e)](_0x28bcad(0x1c1)+a27_0x5bb097['cyan'](_0x4baddc)+'\x0a');if(_0x2ad2c4['length']>0x0)for(const _0x461548 of _0x2ad2c4){console[_0x28bcad(0x25e)](_0x28bcad(0x18e)+_0x461548['relativePath']+'\x27:'),console[_0x28bcad(0x25e)]('─'[_0x28bcad(0x204)](0x3c)),console[_0x28bcad(0x25e)](_0x461548[_0x28bcad(0x264)]),console['error']('─'[_0x28bcad(0x204)](0x3c));}if(_0x3e14bf[_0x28bcad(0x1eb)])return console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x256)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x34a75f[_0x28bcad(0x1c4)]===0x0&&_0x2ad2c4[_0x28bcad(0x1c4)]===0x0)return console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x18f)]('✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'parent_segment':_0x2d21dc},_0x3e14bf[_0x28bcad(0x24d)]),console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x18f)](_0x28bcad(0x295)+a27_0x5bb097[_0x28bcad(0x239)](_0x28bcad(0x29f))+_0x28bcad(0x1c8)+a27_0x5bb097['cyan'](_0x2d21dc))),0x0;if(!_0x3e14bf[_0x28bcad(0x28b)]&&(_0x34a75f[_0x28bcad(0x1c4)]>0x0||_0x2ad2c4[_0x28bcad(0x1c4)]>0x0)){if(!isInteractive())return console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x212)]('\x0aError:'),_0x28bcad(0x28d)),console[_0x28bcad(0x25e)](a27_0x5bb097[_0x28bcad(0x239)](_0x28bcad(0x1d3))),0x1;const _0x5e86d6=await confirmKey(_0x28bcad(0x199)+(_0x34a75f[_0x28bcad(0x1c4)]+_0x2ad2c4[_0x28bcad(0x1c4)])+_0x28bcad(0x24f));if(!_0x5e86d6)return console['error'](a27_0x5bb097[_0x28bcad(0x256)](_0x28bcad(0x243)),_0x28bcad(0x1f6)),0x1;}!existsSync(_0x4baddc)&&mkdirSync(_0x4baddc,{'recursive':!![]});const _0x8d8343=a27_0x35f653[_0x28bcad(0x236)](_0x4baddc,'tdx.json');writeFileSync(_0x8d8343,createTdxConfigContent(_0x2d21dc),_0x28bcad(0x29a));for(const _0x3f365f of _0x46f4da){(_0x3f365f[_0x28bcad(0x1e9)]||_0x3f365f[_0x28bcad(0x1e3)])&&writeFileSync(_0x3f365f['absolutePath'],_0x3f365f[_0x28bcad(0x285)],_0x28bcad(0x29a));}return console[_0x28bcad(0x25e)](a27_0x5bb097['green'](_0x28bcad(0x1b5)+(_0x34a75f['length']+_0x2ad2c4[_0x28bcad(0x1c4)])+_0x28bcad(0x219)+_0x4baddc)),saveSessionContext({'parent_segment':_0x2d21dc},_0x3e14bf[_0x28bcad(0x24d)]),console[_0x28bcad(0x25e)](a27_0x5bb097['green'](_0x28bcad(0x295)+a27_0x5bb097[_0x28bcad(0x239)](_0x28bcad(0x29f))+_0x28bcad(0x1c8)+a27_0x5bb097[_0x28bcad(0x1ea)](_0x2d21dc))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{[a27_0x466491(0x29b)]=a27_0x466491(0x21d);[a27_0x466491(0x270)]='Show\x20journey\x20table\x20column\x20mapping';async[a27_0x466491(0x271)](_0x1e44a){const _0x8c80f4=a27_0x466491,{options:_0x53deab,args:_0xedd26e,tdx:_0x47999f}=_0x1e44a,_0x3c7405=_0xedd26e[0x0];if(!requireNameOrPath(_0x3c7405))return 0x1;_0x53deab[_0x8c80f4(0x23b)]&&console[_0x8c80f4(0x25e)](_0x8c80f4(0x18a)+_0x3c7405);const {journeyId:_0x23e072}=await resolveJourneyIdFromInput(_0x3c7405,_0x53deab,_0x47999f),_0x14ec08=await withSpinner(_0x8c80f4(0x27f),()=>_0x47999f[_0x8c80f4(0x21e)]['getColumnMapping'](_0x23e072),{'verbose':_0x53deab[_0x8c80f4(0x23b)]}),_0x22b333=_0x14ec08[_0x8c80f4(0x17f)];return console[_0x8c80f4(0x1df)](_0x8c80f4(0x2a0)+_0x22b333['database']),console[_0x8c80f4(0x1df)](_0x8c80f4(0x224)+_0x22b333['table']),await handleSDKOutput(_0x22b333[_0x8c80f4(0x280)],_0x53deab),0x0;}}export class JourneyActivationsCommand extends BaseCommand{['name']=a27_0x466491(0x284);[a27_0x466491(0x270)]=a27_0x466491(0x20a);async[a27_0x466491(0x271)](_0x420927){const _0x57dee4=a27_0x466491,{options:_0x3f841c,args:_0x14899c,tdx:_0x186375}=_0x420927,_0x2d912f=_0x14899c[0x0];if(!requireNameOrPath(_0x2d912f))return 0x1;_0x3f841c['verbose']&&console['error'](_0x57dee4(0x18a)+_0x2d912f);const {journeyId:_0x20e497}=await resolveJourneyIdFromInput(_0x2d912f,_0x3f841c,_0x186375),_0x464eac=await withSpinner('Listing\x20journey\x20activations...',()=>_0x186375[_0x57dee4(0x21e)][_0x57dee4(0x22d)](_0x20e497),{'verbose':_0x3f841c[_0x57dee4(0x23b)]}),_0x8f1459=_0x464eac['data'];return console[_0x57dee4(0x25e)](_0x57dee4(0x229)+_0x8f1459[_0x57dee4(0x1c4)]+'\x20activation'+(_0x8f1459[_0x57dee4(0x1c4)]!==0x1?'s':'')),await handleSDKOutput(_0x8f1459,_0x3f841c),0x0;}}export class JourneyPushCommand extends BaseCommand{['name']=a27_0x466491(0x283);['description']='Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20AI';[a27_0x466491(0x180)]=new SegmentPushCommand();async[a27_0x466491(0x271)](_0x417ceb){const _0x3369bd=a27_0x466491,_0x1658fe=_0x417ceb[_0x3369bd(0x291)][0x0];let _0x25396f;if(_0x1658fe){const _0x2c68bf=await resolveTarget({'arg':_0x1658fe,'contextParent':_0x417ceb[_0x3369bd(0x26e)][_0x3369bd(0x276)],'cwd':process[_0x3369bd(0x244)]()});isSuccessfulResolution(_0x2c68bf)&&_0x2c68bf['type']===_0x3369bd(0x286)&&(_0x25396f=_0x2c68bf['filePath']);}const _0x19984a={..._0x417ceb,'options':{..._0x417ceb[_0x3369bd(0x26e)],'journeysOnly':!![],..._0x25396f&&{'singleFilePath':_0x25396f}}};return this[_0x3369bd(0x180)][_0x3369bd(0x271)](_0x19984a);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x466491(0x29b)]=a27_0x466491(0x1a9);['description']=a27_0x466491(0x251);async[a27_0x466491(0x271)](_0x452253){const _0x25e907=a27_0x466491,{options:_0x1642cf,args:_0x2f3611,tdx:_0x207a41}=_0x452253,_0x315268=_0x2f3611[0x0];if(!requireNameOrPath(_0x315268))return 0x1;if(_0x1642cf[_0x25e907(0x23b)])console[_0x25e907(0x25e)](_0x25e907(0x18a)+_0x315268);const {journeyId:_0x4a098c}=await resolveJourneyIdFromInput(_0x315268,_0x1642cf,_0x207a41),_0xa00fed=await withSpinner('Listing\x20journey\x20versions...',()=>_0x207a41['journey'][_0x25e907(0x265)](_0x4a098c),{'verbose':_0x1642cf['verbose']}),{bundleName:_0xa042f0,versions:_0x31beb2,latestJourneyId:_0x2d8e0d}=_0xa00fed[_0x25e907(0x17f)];console[_0x25e907(0x25e)](_0xa042f0+':\x20'+_0x31beb2[_0x25e907(0x1c4)]+_0x25e907(0x23c)+(_0x31beb2['length']!==0x1?'s':''));const _0x1a85a8=_0x31beb2[_0x25e907(0x262)](_0x39e4aa=>({'version':_0x39e4aa[_0x25e907(0x18d)],'journey_id':_0x39e4aa[_0x25e907(0x1f9)],'name':_0x39e4aa[_0x25e907(0x29b)],'state':_0x39e4aa['state'],'paused':_0x39e4aa[_0x25e907(0x1b9)],'latest':_0x39e4aa[_0x25e907(0x1f9)]===_0x2d8e0d,'created_at':_0x39e4aa['createdAt']}));return await handleSDKOutput(_0x1a85a8,_0x1642cf),0x0;}}function a27_0x32ce(){const _0x452270=['activation_','Getting\x20column\x20mapping...','columns','Getting\x20journey\x20traffic\x20data...','Target\x20directory:\x20','journey:push','journey:activations','content','file','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','limit','add','\x5c$&','yes','...','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','INVALID_ARGUMENT','Options:','args','\x20journey','(archived)','ID:','✔\x20Context\x20set:\x20','state','Getting\x20journey\x20statistics...','draft','3qlPQOm','utf-8','name','\x20(draft)\x20—\x20\x22','Fetching\x20users\x20and\x20connections...','140860ouBngE','parent_segment','Database:\x20','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','message','listJourneysWithFolders','version','Target\x20file:\x20','find','folderId','renderStats','folderPath','\x20\x20Journey\x20ID:\x20','journeyName','/e/','hasPeriod','Getting\x20version\x20','completeMilestoneRate','data','segmentPushCommand','activationParams','sort','Triggering\x20journey\x20workflow...','folders','\x0a[Dry\x20run]\x20Journey\x20was\x20NOT\x20resumed.','journey:pull','Error:\x20Stage\x20\x22','journey:run','goal','Input:\x20','State:','Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','versionNumber','\x0aChanges\x20to\x20\x27','green','\x20details...','\x20[runs\x20on\x20refresh]','Fetching\x20journey\x20','journey:stats','resolveJourneyId','journey:resume','\x22\x20not\x20found','464175GbRtLG','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','Write\x20','\x20not\x20found.\x20Available:\x20','Error:\x20Invalid\x20version\x20number:\x20','Usage:\x20tdx\x20journey\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Inside\x20a\x20segment\x20folder\x20(with\x20tdx.json)','\x27\x20not\x20found\x20in\x20','createdAt','has','Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)','Fetching\x20','pausedAt','\x20\x20-\x20','Fetching\x20parent\x20segment...','archived','journeyBundleId','connection\x20','\x20\x20←\x20','journey:versions','Resuming\x20journey...','then','exitOrJumpSize','Warning:\x20Could\x20not\x20resolve\x20activation\x20','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','Journey:','(root)','1571339RthDyx','Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]','user','/j/da/je','✔\x20Pulled\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','rootFolderId','Warning:\x20Could\x20not\x20resolve\x20segment\x20','paused','segmentName','activation','connector_config','localeCompare','Parent\x20segment:\x20','reentryMode','Resume\x20a\x20paused\x20journey','\x20\x20Target:\x20','json','run','length','⚠️\x20','\x20->\x20','set','\x20=\x20','base','journeys','\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser','52165430oNPyzK','journey:version:view','relative','bold','site','Pause\x20a\x20running\x20journey','6445092zsPdHd','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20new\x20files','✔\x20Journey\x20\x22','\x20Journey\x20workflow\x20started','📁\x20','\x22\x20resumed','push','getStatistics','kind','Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22','725986LTHgDr','\x20changed\x20files','log','(draft)','get','includeHistory','hasChanges','Error:\x20Journey\x20not\x20found:\x20','segment','journeyBundleName','targetDir','audienceId','isNew','cyan','dryRun','(completed)','workflowId','format','stageNameMap','nodes','\x0aPull\x20summary:','stage','values','no_parent','Paused:','-\x20no\x20files\x20written','listJourneysFromParentSegment','Status:','journeyId','all','conversion','Session:','workflowSessionId','scheduleType','\x20\x20Folder\x20path:\x20','No\x20traffic\x20data\x20available\x20for\x20journey:\x20','milestoneSize','\x20segment\x20rule(s)\x20to\x20match\x20for\x20','connectionId','repeat','resolveSegment','web','No\x20statistics\x20available\x20for\x20journey:\x20','runAfterJourneyRefresh','listFolders','List\x20activations\x20for\x20a\x20journey','.yml','\x20unchanged\x20files',',\x20schedule:\x20','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','resolveParentId','Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22','List\x20journeys\x20in\x20current\x20context','red','filePath','toLowerCase','Error:\x20','enteredSize','none','Show\x20journey\x20details','\x20journey\x20files\x20to\x20','exitOrJumpRate','goalSize','Error:\x20Journey\x20\x27','journey:columns','journey','journey:view','(unnamed)','from','size','Trigger\x20on-demand\x20workflow\x20execution\x20for\x20journey\x20\x22','Table:\x20','/app/ps/','6082755kqlPEE','\x20@\x20','getActivation','Found\x20','180TYteyB','errorCode','Available\x20stages:\x20','listActivationsFlat','helpText','links','no\x20connection','\x20\x20Statistics\x20not\x20available','stringify','Activations:','buildIdToNameMap','\x0a[Dry\x20run]\x20Journey\x20workflow\x20was\x20NOT\x20triggered.','join','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','dim','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','verbose','\x20version','journeyStages','Resolving\x20journey...','createVersion','getJourney','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20','Aborted.','cwd','\x20Created\x20v','root\x20folder','\x22\x20paused','getLatestJourneyId','Pausing\x20journey...','test','completed','getSegment','session','(paused)','\x20files?','\x20Opening\x20','List\x20all\x20versions\x20of\x20a\x20journey','(running)','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','launched','segments','yellow','(none)','split','rule','Resolving\x20version...','getTrafficData','\x20\x20Preserving\x20local\x20segment\x20name:\x20','type','error','Error:\x20--version\x20option\x20is\x20required','Error:\x20Version\x20','Show\x20journey\x20statistics','map','Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22','diff','listVersions','/j/da','history','Creating\x20new\x20version...','filter','stages','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','jsonl','options','Cancelled','description','execute','executeDryRun','Resolving\x20parent\x20segment...','View\x20a\x20specific\x20version\x20of\x20a\x20journey','🗺️\x20','parentSegment','136kpxRlo','entries','Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N','Stages:','runAt','Journey\x20name:\x20','attributes'];a27_0x32ce=function(){return _0x452270;};return a27_0x32ce();}export class JourneyVersionCreateCommand extends BaseCommand{[a27_0x466491(0x29b)]='journey:version:create';[a27_0x466491(0x270)]=a27_0x466491(0x20e);async[a27_0x466491(0x271)](_0x568d9e){const _0x56af20=a27_0x466491,{options:_0x1d17e7,args:_0x190d2a,tdx:_0x4d329c}=_0x568d9e,_0x179b6a=_0x190d2a[0x0];if(!requireNameOrPath(_0x179b6a))return 0x1;if(_0x1d17e7[_0x56af20(0x23b)])console[_0x56af20(0x25e)]('Input:\x20'+_0x179b6a);const {journeyId:_0xaa0b12,journeyName:_0x5ec1df}=await resolveJourneyIdFromInput(_0x179b6a,_0x1d17e7,_0x4d329c);if(!_0x1d17e7['yes']){const _0x50b3f6=await confirm(_0x56af20(0x263)+_0x5ec1df+'\x22?');if(!_0x50b3f6)return console[_0x56af20(0x25e)](_0x56af20(0x26f)),0x0;}const _0x338591=await withSpinner(_0x56af20(0x268),()=>_0x4d329c[_0x56af20(0x21e)][_0x56af20(0x23f)](_0xaa0b12),{'verbose':_0x1d17e7[_0x56af20(0x23b)]}),_0x572204=_0x338591[_0x56af20(0x17f)];return console[_0x56af20(0x25e)](a27_0x5bb097[_0x56af20(0x18f)]('✔')+_0x56af20(0x245)+_0x572204[_0x56af20(0x27d)]['versionNumber']+_0x56af20(0x29c)+_0x572204[_0x56af20(0x27d)][_0x56af20(0x29b)]+'\x22'),console[_0x56af20(0x25e)](_0x56af20(0x179)+_0x572204['id']),await handleSingleObjectOutput({'id':_0x572204['id'],'name':_0x572204[_0x56af20(0x27d)][_0x56af20(0x29b)],'version':_0x572204[_0x56af20(0x27d)][_0x56af20(0x18d)],'state':_0x572204['attributes'][_0x56af20(0x296)],'bundle_id':_0x572204[_0x56af20(0x27d)]['journeyBundleId'],'created_at':_0x572204['attributes'][_0x56af20(0x19e)]},_0x1d17e7),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{['name']=a27_0x466491(0x1cd);['description']=a27_0x466491(0x274);async[a27_0x466491(0x271)](_0xaf45a6){const _0x5dadfa=a27_0x466491,{options:_0x5ed798,args:_0x20d4d6,tdx:_0x333f63}=_0xaf45a6,_0x2a1cfa=_0x20d4d6[0x0];if(!requireNameOrPath(_0x2a1cfa))return 0x1;const _0x99fcf4=_0x5ed798[_0x5dadfa(0x2a4)];if(!_0x99fcf4)return console[_0x5dadfa(0x25e)](_0x5dadfa(0x25f)),console['error'](_0x5dadfa(0x279)),0x1;const _0x13f45a=parseInt(_0x99fcf4,0xa);if(isNaN(_0x13f45a)||_0x13f45a<0x1)return console[_0x5dadfa(0x25e)](_0x5dadfa(0x19b)+_0x99fcf4),0x1;if(_0x5ed798[_0x5dadfa(0x23b)])console[_0x5dadfa(0x25e)](_0x5dadfa(0x18a)+_0x2a1cfa+',\x20version:\x20'+_0x13f45a);const {journeyId:_0x56856f,parentSegmentId:_0xc3f4bc}=await resolveJourneyIdFromInput(_0x2a1cfa,_0x5ed798,_0x333f63),_0x7e86ff=await withSpinner(_0x5dadfa(0x25a),()=>_0x333f63[_0x5dadfa(0x21e)][_0x5dadfa(0x265)](_0x56856f),{'verbose':_0x5ed798['verbose']}),{versions:_0x146ec8,latestJourneyId:_0x5ab626}=_0x7e86ff[_0x5dadfa(0x17f)],_0x58051a=_0x146ec8[_0x5dadfa(0x175)](_0x2edb35=>_0x2edb35[_0x5dadfa(0x18d)]===_0x13f45a);if(!_0x58051a){const _0x20d9c3=_0x146ec8[_0x5dadfa(0x262)](_0x369ee7=>'v'+_0x369ee7[_0x5dadfa(0x18d)])[_0x5dadfa(0x236)](',\x20');return console[_0x5dadfa(0x25e)](_0x5dadfa(0x260)+_0x13f45a+_0x5dadfa(0x19a)+_0x20d9c3),0x1;}const _0xd8408a=await withSpinner(_0x5dadfa(0x17d)+_0x13f45a+_0x5dadfa(0x190),()=>_0x333f63['journey'][_0x5dadfa(0x240)](_0x58051a[_0x5dadfa(0x1f9)]),{'verbose':_0x5ed798[_0x5dadfa(0x23b)]}),_0x2a45e1=_0xd8408a[_0x5dadfa(0x17f)],_0x44606f=getConsoleNextUrl(_0x5ed798['site'],_0x5dadfa(0x225)+_0xc3f4bc+_0x5dadfa(0x17b)+_0x58051a['journeyId']+_0x5dadfa(0x1b4));return await handleSingleObjectOutput({'id':_0x2a45e1['id'],'name':_0x2a45e1[_0x5dadfa(0x27d)][_0x5dadfa(0x29b)],'version':_0x2a45e1[_0x5dadfa(0x27d)]['versionNumber'],'description':_0x2a45e1[_0x5dadfa(0x27d)]['description'],'state':_0x2a45e1[_0x5dadfa(0x27d)][_0x5dadfa(0x296)],'paused':_0x2a45e1['attributes']['paused'],'reentry_mode':_0x2a45e1[_0x5dadfa(0x27d)][_0x5dadfa(0x1bf)],'stages':_0x2a45e1[_0x5dadfa(0x27d)][_0x5dadfa(0x23d)]?.[_0x5dadfa(0x1c4)]||0x0,..._0x2a45e1[_0x5dadfa(0x27d)]['goal']&&{'goal':_0x2a45e1[_0x5dadfa(0x27d)][_0x5dadfa(0x189)]['name']},'latest':_0x58051a['journeyId']===_0x5ab626,'created_at':_0x2a45e1[_0x5dadfa(0x27d)][_0x5dadfa(0x19e)],'updated_at':_0x2a45e1['attributes']['updatedAt'],'url':_0x44606f},_0x5ed798),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x4c58f1=a28_0x1a64;(function(_0x5e78c7,_0x55cf00){const _0x42bce7=a28_0x1a64,_0x46a7a4=_0x5e78c7();while(!![]){try{const _0x4dfa94=parseInt(_0x42bce7(0x133))/0x1+parseInt(_0x42bce7(0x12d))/0x2*(-parseInt(_0x42bce7(0x145))/0x3)+parseInt(_0x42bce7(0x148))/0x4*(-parseInt(_0x42bce7(0x13a))/0x5)+-parseInt(_0x42bce7(0x163))/0x6*(-parseInt(_0x42bce7(0x146))/0x7)+-parseInt(_0x42bce7(0x13f))/0x8+-parseInt(_0x42bce7(0x137))/0x9+-parseInt(_0x42bce7(0x157))/0xa*(-parseInt(_0x42bce7(0x136))/0xb);if(_0x4dfa94===_0x55cf00)break;else _0x46a7a4['push'](_0x46a7a4['shift']());}catch(_0x54dfa6){_0x46a7a4['push'](_0x46a7a4['shift']());}}}(a28_0x55e2,0x4e5d5));import{BaseCommand}from'./command.js';function a28_0x55e2(){const _0x41f931=['404651ahEwHm','Validate\x20journey\x20YAML\x20files','dim','11243045dtezZV','3197538DkhxcT','execute','red','15vLwGGE','green','validCount','\x20segment\x20file(s)\x20skipped','endsWith','907688fEnrjD','file','relativePath','reason','error','\x20warning(s)\x20found','62634cmONYj','595QuVcuE','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','330300VxZRRS','yellow','valid','Error:\x20Directory\x20not\x20found:\x20','warningCount','No\x20journey\x20YAML\x20files\x20found\x20in\x20','\x20valid','verbose','invalidCount','filePath','helpText','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20segment\x20file(s)\x20skipped)','skippedCount','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','10GDPfbi','name','targetDir','journey:validate','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','errorCode','journey','\x20(skipped:\x20','log','description','\x20journey(s)\x20valid','7890fvFjeY','\x20warning(s)','length','cwd','hasErrors','Validation\x20failed:\x20','✔\x20All\x20','type','48BRJztk','warnings','.yml','no_parent','errors','\x20journey(s)\x20with\x20errors,\x20'];a28_0x55e2=function(){return _0x41f931;};return a28_0x55e2();}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a28_0x4f36a0 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a28_0x1a64(_0x4fe181,_0x2ac0df){_0x4fe181=_0x4fe181-0x12a;const _0x55e2e1=a28_0x55e2();let _0x1a6415=_0x55e2e1[_0x4fe181];return _0x1a6415;}export class JourneyValidateCommand extends BaseCommand{[a28_0x4c58f1(0x158)]=a28_0x4c58f1(0x15a);[a28_0x4c58f1(0x161)]=a28_0x4c58f1(0x134);async[a28_0x4c58f1(0x138)](_0x59265d){const _0x5265b1=a28_0x4c58f1,{options:_0x3645cd,args:_0x740f6d}=_0x59265d,_0x1a5359=_0x3645cd,_0x5109a5=await resolveTarget({'arg':_0x740f6d[0x0],'contextParent':_0x3645cd['parentSegment'],'cwd':process[_0x5265b1(0x166)]()});if(!isSuccessfulResolution(_0x5109a5))return _0x5109a5[_0x5265b1(0x15d)]===_0x5265b1(0x130)?(console[_0x5265b1(0x143)](a28_0x4f36a0[_0x5265b1(0x149)](_0x5265b1(0x147))),console[_0x5265b1(0x143)]('Usage:\x20tdx\x20journey\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x5265b1(0x143)](_0x5265b1(0x15b)),console[_0x5265b1(0x143)](_0x5265b1(0x15c))):(console[_0x5265b1(0x143)](a28_0x4f36a0[_0x5265b1(0x139)]('Error:\x20'+_0x5109a5['message']+'\x0a')),_0x5109a5[_0x5265b1(0x152)]&&console[_0x5265b1(0x143)](a28_0x4f36a0['cyan'](_0x5109a5[_0x5265b1(0x152)]))),0x1;const _0x80158e=_0x5109a5[_0x5265b1(0x159)],_0x26c9aa=_0x5109a5[_0x5265b1(0x12c)]===_0x5265b1(0x140)?_0x5109a5[_0x5265b1(0x151)]:undefined;if(!_0x26c9aa&&!existsSync(_0x80158e))return console[_0x5265b1(0x143)](a28_0x4f36a0[_0x5265b1(0x139)](_0x5265b1(0x14b)+_0x80158e+'\x0a')),0x1;let _0x37b5b8;if(_0x26c9aa){if(!_0x26c9aa[_0x5265b1(0x13e)](_0x5265b1(0x12f))&&!_0x26c9aa[_0x5265b1(0x13e)]('.yaml'))return console[_0x5265b1(0x143)](a28_0x4f36a0[_0x5265b1(0x139)](_0x5265b1(0x153)+_0x26c9aa+'\x0a')),0x1;_0x37b5b8=[_0x26c9aa];}else _0x37b5b8=findYamlFiles(_0x80158e);if(_0x37b5b8['length']===0x0)return console['error'](a28_0x4f36a0[_0x5265b1(0x139)](_0x5265b1(0x156)+_0x80158e+'\x0a')),0x1;const _0x59b74e=validateYamlFiles(_0x37b5b8,_0x80158e,{'filterType':_0x5265b1(0x15e)}),_0x1a1947=calculateSummary(_0x59b74e),_0xf87da1=_0x59b74e['filter'](isValidationResult);if(_0xf87da1[_0x5265b1(0x165)]===0x0)return console['error'](a28_0x4f36a0['yellow'](_0x5265b1(0x14d)+_0x80158e+'\x0a')),_0x1a1947[_0x5265b1(0x155)]>0x0&&console[_0x5265b1(0x143)](a28_0x4f36a0[_0x5265b1(0x135)]('('+_0x1a1947[_0x5265b1(0x155)]+_0x5265b1(0x154))),0x0;for(const _0x4389d8 of _0x59b74e){if(!isValidationResult(_0x4389d8)){_0x1a5359[_0x5265b1(0x14f)]&&console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x135)]('-\x20'+_0x4389d8[_0x5265b1(0x141)]+_0x5265b1(0x15f)+_0x4389d8[_0x5265b1(0x142)]+')'));continue;}const {relativePath:_0xba5bf9,source:_0x2dd0a8,result:_0x425254}=_0x4389d8;if(_0x425254['valid']&&_0x425254[_0x5265b1(0x12e)]['length']===0x0)_0x1a5359[_0x5265b1(0x14f)]&&console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x13b)]('✔\x20'+_0xba5bf9));else _0x425254[_0x5265b1(0x14a)]?(console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x149)]('⚠\x20'+_0xba5bf9+':\x20'+_0x425254[_0x5265b1(0x12e)]['length']+_0x5265b1(0x164))),console['log'](formatValidationResult(_0x425254,_0x2dd0a8,_0xba5bf9))):(console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x139)]('✖\x20'+_0xba5bf9+':\x20'+_0x425254[_0x5265b1(0x131)][_0x5265b1(0x165)]+'\x20error(s)')),console[_0x5265b1(0x160)](formatValidationResult(_0x425254,_0x2dd0a8,_0xba5bf9)));}return console['log'](''),_0x1a1947[_0x5265b1(0x167)]?(console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x139)](_0x5265b1(0x12a)+_0x1a1947[_0x5265b1(0x150)]+_0x5265b1(0x132)+_0x1a1947[_0x5265b1(0x13c)]+_0x5265b1(0x14e))),_0x1a1947[_0x5265b1(0x14c)]>0x0&&console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x149)](_0x1a1947['warningCount']+_0x5265b1(0x144))),_0x1a1947[_0x5265b1(0x155)]>0x0&&console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x135)](_0x1a1947[_0x5265b1(0x155)]+_0x5265b1(0x13d))),0x1):(console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x13b)](_0x5265b1(0x12b)+_0x1a1947[_0x5265b1(0x13c)]+_0x5265b1(0x162))),_0x1a1947['warningCount']>0x0&&console[_0x5265b1(0x160)](a28_0x4f36a0['yellow'](_0x1a1947[_0x5265b1(0x14c)]+_0x5265b1(0x144))),_0x1a1947[_0x5265b1(0x155)]>0x0&&console[_0x5265b1(0x160)](a28_0x4f36a0[_0x5265b1(0x135)](_0x1a1947['skippedCount']+_0x5265b1(0x13d))),0x0);}}
|