@treasuredata/tdx 2026.6.4 → 2026.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +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-move-command.d.ts +19 -0
- package/dist/commands/segment-move-command.d.ts.map +1 -0
- package/dist/commands/segment-move-command.js +1 -0
- package/dist/commands/segment-move-command.js.map +1 -0
- 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.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/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.d.ts +18 -0
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +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.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/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.d.ts +28 -1
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/cdp.d.ts +15 -0
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +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.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/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_0x3e71c4=a24_0x518e;(function(_0x53d2d8,_0x3765f1){const _0xb4f73c=a24_0x518e,_0x39224c=_0x53d2d8();while(!![]){try{const _0x5826d7=-parseInt(_0xb4f73c(0x195))/0x1*(-parseInt(_0xb4f73c(0x190))/0x2)+-parseInt(_0xb4f73c(0x1a5))/0x3*(parseInt(_0xb4f73c(0x1b6))/0x4)+-parseInt(_0xb4f73c(0x1cd))/0x5*(-parseInt(_0xb4f73c(0x1d4))/0x6)+-parseInt(_0xb4f73c(0x199))/0x7+-parseInt(_0xb4f73c(0x1b8))/0x8+parseInt(_0xb4f73c(0x1b2))/0x9*(-parseInt(_0xb4f73c(0x1c4))/0xa)+-parseInt(_0xb4f73c(0x1d1))/0xb*(-parseInt(_0xb4f73c(0x193))/0xc);if(_0x5826d7===_0x3765f1)break;else _0x39224c['push'](_0x39224c['shift']());}catch(_0x44d956){_0x39224c['push'](_0x39224c['shift']());}}}(a24_0x2cba,0xd7aca));function a24_0x2cba(){const _0x3be592=['resolveWorkspaceId','session','verbose','Resolving\x20references...','dim','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','17070tziAnV','✔\x20Updated\x20','\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)','filter','cwd','✔\x20All\x20templates\x20are\x20up\x20to\x20date','description','config','relativePath','395075YxYyDd','setPhase','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','error','14686199ZjOBDQ','\x27...','valid','36DczevG','✔\x20Created\x20','Push\x20','red','Preparing\x20push\x20to\x20workspace\x20\x27','\x20errors:','templateId','action','521302Oqhjco','Aborted.','engage','24kpOKFg','\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','5HgrcDW','Workspace\x20is\x20required.','\x0aError:','updated','2293186aHzHZh','execute','Pushing\x20templates...','dirname','\x20\x20\x20\x20','\x20templates\x20to\x20update:','engage:template:push','1\x20template\x20file:\x20','\x20new\x20templates:','yes','workspace','engage_workspace','585783oZxYnF','errors','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','def','\x20template\x20files','created','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','update','create','No\x20template\x20YAML\x20files\x20found\x20in\x20','results','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','data','2970OKiqPV','length','message','dryRun','32kkzUzS','site','8889320uSQhvY','yellow','green','\x20templates?','name','resolve'];a24_0x2cba=function(){return _0x3be592;};return a24_0x2cba();}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_0x12ac3a from'chalk';import a24_0x40d030 from'path';function a24_0x518e(_0x26f002,_0x573207){_0x26f002=_0x26f002-0x18c;const _0x2cbaf5=a24_0x2cba();let _0x518eb0=_0x2cbaf5[_0x26f002];return _0x518eb0;}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{['name']=a24_0x3e71c4(0x19f);[a24_0x3e71c4(0x1ca)]='Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates';async[a24_0x3e71c4(0x19a)](_0x4d29a0){const _0xe03a57=a24_0x3e71c4,{options:_0x34373c,args:_0x3ab755,tdx:_0xf8fb92}=_0x4d29a0,_0x4ddc09=_0x34373c,_0x4e0098=_0x3ab755[0x0],_0x4bc78d=_0x4e0098?a24_0x40d030[_0xe03a57(0x1bd)](_0x4e0098):undefined,_0x16d456=_0x4bc78d?isYamlFile(_0x4bc78d):![];let _0x551267;if(_0x16d456&&_0x4bc78d)_0x551267=a24_0x40d030[_0xe03a57(0x19c)](_0x4bc78d);else _0x4bc78d?_0x551267=_0x4bc78d:_0x551267=process[_0xe03a57(0x1c8)]();let _0x52e1d2;const _0x3df18c=tryFindTdxConfig(_0x551267);_0x3df18c?.[_0xe03a57(0x1cb)][_0xe03a57(0x1a4)]&&(_0x52e1d2=_0x3df18c['config'][_0xe03a57(0x1a4)],!_0x16d456&&(_0x551267=_0x3df18c['configDir']));_0x4ddc09[_0xe03a57(0x1a3)]&&(_0x52e1d2=_0x4ddc09[_0xe03a57(0x1a3)]);if(!_0x52e1d2){const _0x8fb7b0=loadSessionContext(_0x4ddc09[_0xe03a57(0x1bf)]);_0x8fb7b0?.[_0xe03a57(0x1a4)]&&(_0x52e1d2=_0x8fb7b0[_0xe03a57(0x1a4)]);}if(!_0x52e1d2)return console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1b9)](_0xe03a57(0x196))),console[_0xe03a57(0x1d0)](_0xe03a57(0x194)),console['error'](_0xe03a57(0x1c6)),console[_0xe03a57(0x1d0)]('\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['error'](_0xe03a57(0x1b0)),0x1;let _0x2a7b4b;_0x16d456&&_0x4bc78d?_0x2a7b4b=[parseTemplateFile(_0x4bc78d,a24_0x40d030[_0xe03a57(0x19c)](_0x4bc78d))]:_0x2a7b4b=discoverAndParseTemplateFiles(_0x551267);if(_0x2a7b4b[_0xe03a57(0x1b3)]===0x0)return console['error'](a24_0x12ac3a[_0xe03a57(0x1b9)](_0xe03a57(0x1ae)+_0x551267)),console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1c2)](_0xe03a57(0x1c3))),0x1;const _0x51b4ac=_0x2a7b4b[_0xe03a57(0x1b3)]===0x1?_0xe03a57(0x1a0)+_0x2a7b4b[0x0][_0xe03a57(0x1a8)]['name']:_0x2a7b4b[_0xe03a57(0x1b3)]+_0xe03a57(0x1a9);console[_0xe03a57(0x1d0)]('Found\x20'+a24_0x12ac3a['cyan'](_0x51b4ac));let _0x1d4dfd=![];for(const _0x54b9a9 of _0x2a7b4b){const _0xc283d5=validateTemplateDef(_0x54b9a9[_0xe03a57(0x1a8)]);if(!_0xc283d5[_0xe03a57(0x1d3)]){_0x1d4dfd=!![],console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1d7)]('\x0aValidation\x20errors\x20in\x20'+_0x54b9a9[_0xe03a57(0x1cc)]+':'));for(const _0x15a8f5 of _0xc283d5[_0xe03a57(0x1a6)]){console[_0xe03a57(0x1d0)]('\x20\x20'+a24_0x12ac3a[_0xe03a57(0x1d7)]('✗')+'\x20'+_0x15a8f5['path']+':\x20'+_0x15a8f5['message']);}}for(const _0x19647b of _0xc283d5['warnings']){console[_0xe03a57(0x1d0)]('\x20\x20'+a24_0x12ac3a['yellow']('⚠')+'\x20'+_0x19647b['path']+':\x20'+_0x19647b[_0xe03a57(0x1b4)]);}}if(_0x1d4dfd)return console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1d7)]('\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.')),0x1;const _0x49fece=await _0xf8fb92[_0xe03a57(0x192)][_0xe03a57(0x1be)](_0x52e1d2),_0x31c475=await withProgressSpinner(_0xe03a57(0x18c)+_0x52e1d2+_0xe03a57(0x1d2),_0x613f19=>preparePush({'engage':_0xf8fb92[_0xe03a57(0x192)]},_0x2a7b4b,_0x49fece,{'progress':{'update':_0x35965c=>_0x613f19[_0xe03a57(0x1ce)](_0x35965c)}}),{'verbose':_0x4ddc09[_0xe03a57(0x1c0)]}),_0x46118b=_0x31c475[_0xe03a57(0x1b1)];await withProgressSpinner(_0xe03a57(0x1c1),_0x4a7456=>resolveAndBuildInputs({'engage':_0xf8fb92[_0xe03a57(0x192)]},_0x46118b,_0x49fece,{'progress':{'update':_0x15a79f=>_0x4a7456[_0xe03a57(0x1ce)](_0x15a79f)}}),{'verbose':_0x4ddc09[_0xe03a57(0x1c0)]});const _0x175b35=_0x46118b[_0xe03a57(0x1c7)](_0x20e7b4=>_0x20e7b4[_0xe03a57(0x18f)]===_0xe03a57(0x1ad)),_0x565dd3=_0x46118b[_0xe03a57(0x1c7)](_0xfb1425=>_0xfb1425[_0xe03a57(0x18f)]===_0xe03a57(0x1ac));console['error']('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0x52e1d2+'\x27:');if(_0x175b35[_0xe03a57(0x1b3)]>0x0){console[_0xe03a57(0x1d0)]('\x20\x20'+a24_0x12ac3a[_0xe03a57(0x1ba)]('+\x20'+_0x175b35['length']+_0xe03a57(0x1a1)));for(const _0x4716e5 of _0x175b35){console['error'](_0xe03a57(0x19d)+a24_0x12ac3a['green']('+')+'\x20'+_0x4716e5[_0xe03a57(0x1a8)][_0xe03a57(0x1bc)]);}}if(_0x565dd3[_0xe03a57(0x1b3)]>0x0){console[_0xe03a57(0x1d0)]('\x20\x20'+a24_0x12ac3a[_0xe03a57(0x1b9)]('~\x20'+_0x565dd3[_0xe03a57(0x1b3)]+_0xe03a57(0x19e)));for(const _0x28b79d of _0x565dd3){console[_0xe03a57(0x1d0)](_0xe03a57(0x19d)+a24_0x12ac3a[_0xe03a57(0x1b9)]('~')+'\x20'+_0x28b79d[_0xe03a57(0x1a8)][_0xe03a57(0x1bc)]);}}if(_0x175b35[_0xe03a57(0x1b3)]===0x0&&_0x565dd3['length']===0x0)return console[_0xe03a57(0x1d0)](a24_0x12ac3a['green'](_0xe03a57(0x1c9))),0x0;if(_0x4ddc09[_0xe03a57(0x1b5)])return console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1b9)](_0xe03a57(0x1ab))),0x0;if(!_0x4ddc09[_0xe03a57(0x1a2)]){if(!isInteractive())return console['error'](a24_0x12ac3a[_0xe03a57(0x1d7)](_0xe03a57(0x197)),_0xe03a57(0x1cf)),console['error'](a24_0x12ac3a[_0xe03a57(0x1c2)](_0xe03a57(0x1a7))),0x1;const _0x15ddf4=await confirmKey(_0xe03a57(0x1d6)+(_0x175b35[_0xe03a57(0x1b3)]+_0x565dd3['length'])+_0xe03a57(0x1bb));if(!_0x15ddf4)return console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1b9)](_0xe03a57(0x191)),'-\x20no\x20changes\x20applied'),0x1;}const _0x6bb250=await withProgressSpinner(_0xe03a57(0x19b),_0x19d804=>executePush({'engage':_0xf8fb92[_0xe03a57(0x192)]},_0x46118b,{'progress':{'update':_0x4ba476=>_0x19d804[_0xe03a57(0x1ce)](_0x4ba476)}}),{'verbose':_0x4ddc09['verbose']}),_0x57cb02=_0x6bb250['data'];for(const _0x35eb72 of _0x57cb02[_0xe03a57(0x1af)]){if(_0x35eb72['templateId']&&(_0x35eb72[_0xe03a57(0x18f)]==='created'||_0x35eb72[_0xe03a57(0x18f)]==='updated')){const _0x4aab67=getTemplateUrl(_0x4ddc09[_0xe03a57(0x1b7)],_0x49fece,_0x35eb72[_0xe03a57(0x18e)]),_0x53524c=_0x35eb72[_0xe03a57(0x18f)]==='created'?'+':'~',_0x3c723c=_0x35eb72[_0xe03a57(0x18f)]===_0xe03a57(0x1aa)?a24_0x12ac3a['green'](_0x53524c):a24_0x12ac3a[_0xe03a57(0x1b9)](_0x53524c);console[_0xe03a57(0x1d0)]('\x20\x20'+_0x3c723c+'\x20'+hyperlink(_0x35eb72[_0xe03a57(0x1bc)],_0x4aab67)+'\x20'+a24_0x12ac3a[_0xe03a57(0x1c2)](_0x4aab67));}}_0x57cb02[_0xe03a57(0x1aa)]>0x0&&console['error'](a24_0x12ac3a[_0xe03a57(0x1ba)](_0xe03a57(0x1d5)+_0x57cb02[_0xe03a57(0x1aa)]+'\x20templates'));_0x57cb02[_0xe03a57(0x198)]>0x0&&console[_0xe03a57(0x1d0)](a24_0x12ac3a[_0xe03a57(0x1ba)](_0xe03a57(0x1c5)+_0x57cb02['updated']+'\x20templates'));if(_0x57cb02[_0xe03a57(0x1a6)]['length']>0x0){console['error'](a24_0x12ac3a['red']('✘\x20'+_0x57cb02[_0xe03a57(0x1a6)][_0xe03a57(0x1b3)]+_0xe03a57(0x18d)));for(const _0x11bc60 of _0x57cb02[_0xe03a57(0x1a6)]){console[_0xe03a57(0x1d0)]('\x20\x20'+a24_0x12ac3a[_0xe03a57(0x1d7)](_0x11bc60[_0xe03a57(0x1bc)])+':\x20'+_0x11bc60[_0xe03a57(0x1d0)]);}}return saveSessionContext({'engage_workspace':_0x52e1d2},_0x4ddc09['session']),_0x57cb02[_0xe03a57(0x1a6)]['length']>0x0?0x1:0x0;}}
|
|
1
|
+
const a24_0x4310a0=a24_0x4d1e;(function(_0xf05eff,_0x2a2ab6){const _0x5a83ed=a24_0x4d1e,_0x2dd6ba=_0xf05eff();while(!![]){try{const _0x5b335c=parseInt(_0x5a83ed(0x13f))/0x1*(parseInt(_0x5a83ed(0x12d))/0x2)+-parseInt(_0x5a83ed(0x14d))/0x3*(parseInt(_0x5a83ed(0x137))/0x4)+parseInt(_0x5a83ed(0x155))/0x5+parseInt(_0x5a83ed(0x160))/0x6+parseInt(_0x5a83ed(0x148))/0x7*(-parseInt(_0x5a83ed(0x135))/0x8)+parseInt(_0x5a83ed(0x151))/0x9+parseInt(_0x5a83ed(0x125))/0xa;if(_0x5b335c===_0x2a2ab6)break;else _0x2dd6ba['push'](_0x2dd6ba['shift']());}catch(_0xb0736f){_0x2dd6ba['push'](_0x2dd6ba['shift']());}}}(a24_0x4459,0xc4520));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_0x366086 from'chalk';import a24_0x3fa35a from'path';function a24_0x4459(){const _0x57788f=['8468073VHUdwr','cwd','action','execute','2404795XcgoSb','\x20templates\x20to\x20update:','green','\x20errors:','-\x20no\x20changes\x20applied','Found\x20','resolveWorkspaceId','Resolving\x20references...','\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)','session','length','5594970vwyRjV','\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','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','create','updated','config','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','engage_workspace','setPhase','engage','yes','Workspace\x20is\x20required.','Pushing\x20templates...','message','\x20new\x20templates:','yellow','3106900pqrRPN','templateId','\x0aValidation\x20errors\x20in\x20','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','error','update','\x20templates','\x0aPush\x20summary\x20for\x20workspace\x20\x27','7450XlZVyg','✔\x20Created\x20','verbose','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x27...','cyan','filter','Aborted.','3375368auOaht','No\x20template\x20YAML\x20files\x20found\x20in\x20','1723628VKnusN','dim','\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','dirname','description','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','valid','\x0aError:','74xbytUP','dryRun','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','def','configDir','warnings','results','engage:template:push','errors','14tRXZOc','workspace','red','site','name','9eljjgK','\x20template\x20files','Push\x20','created'];a24_0x4459=function(){return _0x57788f;};return a24_0x4459();}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';function a24_0x4d1e(_0x137c16,_0x4798c0){_0x137c16=_0x137c16-0x120;const _0x445901=a24_0x4459();let _0x4d1e6d=_0x445901[_0x137c16];return _0x4d1e6d;}import{hyperlink}from'../sdk/util/formatters.js';export class EngageTemplatePushCommand extends BaseCommand{[a24_0x4310a0(0x14c)]=a24_0x4310a0(0x146);[a24_0x4310a0(0x13b)]=a24_0x4310a0(0x13c);async[a24_0x4310a0(0x154)](_0x3b2109){const _0x339bfd=a24_0x4310a0,{options:_0x1ea18a,args:_0x4e69ab,tdx:_0x4b34dd}=_0x3b2109,_0x272805=_0x1ea18a,_0x22f073=_0x4e69ab[0x0],_0x3f637b=_0x22f073?a24_0x3fa35a['resolve'](_0x22f073):undefined,_0x2fb9b8=_0x3f637b?isYamlFile(_0x3f637b):![];let _0x4c1003;if(_0x2fb9b8&&_0x3f637b)_0x4c1003=a24_0x3fa35a['dirname'](_0x3f637b);else _0x3f637b?_0x4c1003=_0x3f637b:_0x4c1003=process[_0x339bfd(0x152)]();let _0x45bc72;const _0x2ad188=tryFindTdxConfig(_0x4c1003);_0x2ad188?.[_0x339bfd(0x165)][_0x339bfd(0x168)]&&(_0x45bc72=_0x2ad188[_0x339bfd(0x165)][_0x339bfd(0x168)],!_0x2fb9b8&&(_0x4c1003=_0x2ad188[_0x339bfd(0x143)]));_0x272805['workspace']&&(_0x45bc72=_0x272805[_0x339bfd(0x149)]);if(!_0x45bc72){const _0x15f6ba=loadSessionContext(_0x272805[_0x339bfd(0x15e)]);_0x15f6ba?.[_0x339bfd(0x168)]&&(_0x45bc72=_0x15f6ba[_0x339bfd(0x168)]);}if(!_0x45bc72)return console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x124)](_0x339bfd(0x120))),console[_0x339bfd(0x129)](_0x339bfd(0x139)),console[_0x339bfd(0x129)](_0x339bfd(0x15d)),console['error'](_0x339bfd(0x161)),console[_0x339bfd(0x129)](_0x339bfd(0x162)),0x1;let _0xec37eb;_0x2fb9b8&&_0x3f637b?_0xec37eb=[parseTemplateFile(_0x3f637b,a24_0x3fa35a[_0x339bfd(0x13a)](_0x3f637b))]:_0xec37eb=discoverAndParseTemplateFiles(_0x4c1003);if(_0xec37eb[_0x339bfd(0x15f)]===0x0)return console['error'](a24_0x366086[_0x339bfd(0x124)](_0x339bfd(0x136)+_0x4c1003)),console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x138)](_0x339bfd(0x167))),0x1;const _0x86c049=_0xec37eb[_0x339bfd(0x15f)]===0x1?'1\x20template\x20file:\x20'+_0xec37eb[0x0][_0x339bfd(0x142)][_0x339bfd(0x14c)]:_0xec37eb['length']+_0x339bfd(0x14e);console[_0x339bfd(0x129)](_0x339bfd(0x15a)+a24_0x366086[_0x339bfd(0x132)](_0x86c049));let _0x5242d6=![];for(const _0xa58bc4 of _0xec37eb){const _0x5edda3=validateTemplateDef(_0xa58bc4[_0x339bfd(0x142)]);if(!_0x5edda3[_0x339bfd(0x13d)]){_0x5242d6=!![],console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x14a)](_0x339bfd(0x127)+_0xa58bc4['relativePath']+':'));for(const _0x54f0d3 of _0x5edda3[_0x339bfd(0x147)]){console[_0x339bfd(0x129)]('\x20\x20'+a24_0x366086[_0x339bfd(0x14a)]('✗')+'\x20'+_0x54f0d3['path']+':\x20'+_0x54f0d3['message']);}}for(const _0x54efb1 of _0x5edda3[_0x339bfd(0x144)]){console[_0x339bfd(0x129)]('\x20\x20'+a24_0x366086[_0x339bfd(0x124)]('⚠')+'\x20'+_0x54efb1['path']+':\x20'+_0x54efb1[_0x339bfd(0x122)]);}}if(_0x5242d6)return console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x14a)](_0x339bfd(0x141))),0x1;const _0x291e16=await _0x4b34dd[_0x339bfd(0x16a)][_0x339bfd(0x15b)](_0x45bc72),_0x449d75=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x45bc72+_0x339bfd(0x131),_0x29cacc=>preparePush({'engage':_0x4b34dd['engage']},_0xec37eb,_0x291e16,{'progress':{'update':_0x541a28=>_0x29cacc[_0x339bfd(0x169)](_0x541a28)}}),{'verbose':_0x272805[_0x339bfd(0x12f)]}),_0x116b5f=_0x449d75['data'];await withProgressSpinner(_0x339bfd(0x15c),_0x384d79=>resolveAndBuildInputs({'engage':_0x4b34dd[_0x339bfd(0x16a)]},_0x116b5f,_0x291e16,{'progress':{'update':_0x1edeed=>_0x384d79[_0x339bfd(0x169)](_0x1edeed)}}),{'verbose':_0x272805[_0x339bfd(0x12f)]});const _0x73780=_0x116b5f[_0x339bfd(0x133)](_0x4b1b73=>_0x4b1b73['action']===_0x339bfd(0x163)),_0x5359b7=_0x116b5f[_0x339bfd(0x133)](_0x4bd1e7=>_0x4bd1e7[_0x339bfd(0x153)]===_0x339bfd(0x12a));console[_0x339bfd(0x129)](_0x339bfd(0x12c)+_0x45bc72+'\x27:');if(_0x73780[_0x339bfd(0x15f)]>0x0){console[_0x339bfd(0x129)]('\x20\x20'+a24_0x366086[_0x339bfd(0x157)]('+\x20'+_0x73780[_0x339bfd(0x15f)]+_0x339bfd(0x123)));for(const _0x31b51f of _0x73780){console['error']('\x20\x20\x20\x20'+a24_0x366086['green']('+')+'\x20'+_0x31b51f[_0x339bfd(0x142)]['name']);}}if(_0x5359b7[_0x339bfd(0x15f)]>0x0){console[_0x339bfd(0x129)]('\x20\x20'+a24_0x366086[_0x339bfd(0x124)]('~\x20'+_0x5359b7[_0x339bfd(0x15f)]+_0x339bfd(0x156)));for(const _0x5c2a9d of _0x5359b7){console[_0x339bfd(0x129)]('\x20\x20\x20\x20'+a24_0x366086[_0x339bfd(0x124)]('~')+'\x20'+_0x5c2a9d[_0x339bfd(0x142)]['name']);}}if(_0x73780['length']===0x0&&_0x5359b7[_0x339bfd(0x15f)]===0x0)return console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x157)]('✔\x20All\x20templates\x20are\x20up\x20to\x20date')),0x0;if(_0x272805[_0x339bfd(0x140)])return console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x124)](_0x339bfd(0x128))),0x0;if(!_0x272805[_0x339bfd(0x16b)]){if(!isInteractive())return console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x14a)](_0x339bfd(0x13e)),_0x339bfd(0x166)),console[_0x339bfd(0x129)](a24_0x366086['dim'](_0x339bfd(0x130))),0x1;const _0x576e33=await confirmKey(_0x339bfd(0x14f)+(_0x73780[_0x339bfd(0x15f)]+_0x5359b7['length'])+'\x20templates?');if(!_0x576e33)return console['error'](a24_0x366086[_0x339bfd(0x124)](_0x339bfd(0x134)),_0x339bfd(0x159)),0x1;}const _0x529f51=await withProgressSpinner(_0x339bfd(0x121),_0xf94ca0=>executePush({'engage':_0x4b34dd[_0x339bfd(0x16a)]},_0x116b5f,{'progress':{'update':_0x4ce44a=>_0xf94ca0[_0x339bfd(0x169)](_0x4ce44a)}}),{'verbose':_0x272805['verbose']}),_0x61c192=_0x529f51['data'];for(const _0xcfb98 of _0x61c192[_0x339bfd(0x145)]){if(_0xcfb98[_0x339bfd(0x126)]&&(_0xcfb98[_0x339bfd(0x153)]==='created'||_0xcfb98[_0x339bfd(0x153)]===_0x339bfd(0x164))){const _0x4b1d53=getTemplateUrl(_0x272805[_0x339bfd(0x14b)],_0x291e16,_0xcfb98['templateId']),_0x4f88e1=_0xcfb98[_0x339bfd(0x153)]===_0x339bfd(0x150)?'+':'~',_0x23ce39=_0xcfb98[_0x339bfd(0x153)]===_0x339bfd(0x150)?a24_0x366086[_0x339bfd(0x157)](_0x4f88e1):a24_0x366086[_0x339bfd(0x124)](_0x4f88e1);console[_0x339bfd(0x129)]('\x20\x20'+_0x23ce39+'\x20'+hyperlink(_0xcfb98[_0x339bfd(0x14c)],_0x4b1d53)+'\x20'+a24_0x366086[_0x339bfd(0x138)](_0x4b1d53));}}_0x61c192[_0x339bfd(0x150)]>0x0&&console[_0x339bfd(0x129)](a24_0x366086[_0x339bfd(0x157)](_0x339bfd(0x12e)+_0x61c192[_0x339bfd(0x150)]+_0x339bfd(0x12b)));_0x61c192[_0x339bfd(0x164)]>0x0&&console[_0x339bfd(0x129)](a24_0x366086['green']('✔\x20Updated\x20'+_0x61c192[_0x339bfd(0x164)]+'\x20templates'));if(_0x61c192['errors'][_0x339bfd(0x15f)]>0x0){console['error'](a24_0x366086[_0x339bfd(0x14a)]('✘\x20'+_0x61c192[_0x339bfd(0x147)][_0x339bfd(0x15f)]+_0x339bfd(0x158)));for(const _0x155c7d of _0x61c192['errors']){console[_0x339bfd(0x129)]('\x20\x20'+a24_0x366086['red'](_0x155c7d[_0x339bfd(0x14c)])+':\x20'+_0x155c7d['error']);}}return saveSessionContext({'engage_workspace':_0x45bc72},_0x272805[_0x339bfd(0x15e)]),_0x61c192[_0x339bfd(0x147)][_0x339bfd(0x15f)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a25_0x3e335b=a25_0x1669;function a25_0x1669(_0x66f686,_0x1d02f4){_0x66f686=_0x66f686-0xfc;const _0x1d865e=a25_0x1d86();let _0x16693e=_0x1d865e[_0x66f686];return _0x16693e;}(function(_0x155562,_0x5a7a58){const _0x1547ab=a25_0x1669,_0x4e9de3=_0x155562();while(!![]){try{const _0x49d00f=-parseInt(_0x1547ab(0x108))/0x1+-parseInt(_0x1547ab(0x100))/0x2+parseInt(_0x1547ab(0x11e))/0x3*(parseInt(_0x1547ab(0x120))/0x4)+-parseInt(_0x1547ab(0x119))/0x5*(-parseInt(_0x1547ab(0x10d))/0x6)+-parseInt(_0x1547ab(0x115))/0x7+-parseInt(_0x1547ab(0x110))/0x8+parseInt(_0x1547ab(0xfd))/0x9;if(_0x49d00f===_0x5a7a58)break;else _0x4e9de3['push'](_0x4e9de3['shift']());}catch(_0x463d11){_0x4e9de3['push'](_0x4e9de3['shift']());}}}(a25_0x1d86,0x5c007));import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';function a25_0x1d86(){const _0x2e1b0a=['Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','error','relativePath','execute','6eqwcjH','Validation\x20failed:\x20','warnings','3508448YKzkhd','skippedCount','valid','\x20non-template\x20file(s)\x20skipped)','dim','4996922kdmPDv','yellow','\x20template(s)\x20valid','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','1573515cRIjWP','warningCount','green','\x20warning(s)\x20found','resolve','1407Uicuyc','Error:\x20Directory\x20not\x20found:\x20','1916GfFddi','cwd','name','validCount','\x20error(s)','✔\x20All\x20','\x20valid','length','verbose','red','engage:template:validate','description','endsWith','19096254rSXKUt','template','log','1311798JpxYvs','.yaml','\x20(skipped:\x20','Validate\x20template\x20YAML\x20files','\x20non-template\x20file(s)\x20skipped','\x20warning(s)','invalidCount','\x20template(s)\x20with\x20errors,\x20','476020nToNZc'];a25_0x1d86=function(){return _0x2e1b0a;};return a25_0x1d86();}import a25_0x4faa44 from'chalk';import a25_0x40f5c5 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_0x3e335b(0x122)]=a25_0x3e335b(0x12a);[a25_0x3e335b(0x12b)]=a25_0x3e335b(0x103);async[a25_0x3e335b(0x10c)](_0x207de0){const _0x4ec419=a25_0x3e335b,{options:_0x22b949,args:_0x4242b5}=_0x207de0,_0x3c8ad5=_0x22b949,_0x16c165=_0x4242b5[0x0],_0x1f5c6c=_0x16c165?a25_0x40f5c5[_0x4ec419(0x11d)](_0x16c165):undefined,_0xe9b91d=_0x1f5c6c?isYamlFile(_0x1f5c6c):![];let _0x420fe0,_0x14bd5e;if(_0xe9b91d&&_0x1f5c6c)_0x420fe0=a25_0x40f5c5['dirname'](_0x1f5c6c),_0x14bd5e=_0x1f5c6c;else _0x1f5c6c?_0x420fe0=_0x1f5c6c:_0x420fe0=process[_0x4ec419(0x121)]();if(!_0x14bd5e&&!existsSync(_0x420fe0))return console[_0x4ec419(0x10a)](a25_0x4faa44['red'](_0x4ec419(0x11f)+_0x420fe0+'\x0a')),0x1;let _0x4c3853;if(_0x14bd5e){if(!_0x14bd5e[_0x4ec419(0xfc)]('.yml')&&!_0x14bd5e['endsWith'](_0x4ec419(0x101)))return console[_0x4ec419(0x10a)](a25_0x4faa44[_0x4ec419(0x129)](_0x4ec419(0x109)+_0x14bd5e+'\x0a')),0x1;_0x4c3853=[_0x14bd5e];}else _0x4c3853=findYamlFiles(_0x420fe0);if(_0x4c3853[_0x4ec419(0x127)]===0x0)return console[_0x4ec419(0x10a)](a25_0x4faa44[_0x4ec419(0x129)](_0x4ec419(0x118)+_0x420fe0+'\x0a')),0x1;const _0x350989=validateYamlFiles(_0x4c3853,_0x420fe0,{'filterType':_0x4ec419(0xfe)}),_0x1be0d1=calculateSummary(_0x350989),_0x45b910=_0x350989['filter'](isValidationResult);if(_0x45b910[_0x4ec419(0x127)]===0x0)return console['error'](a25_0x4faa44[_0x4ec419(0x116)]('No\x20template\x20YAML\x20files\x20found\x20in\x20'+_0x420fe0+'\x0a')),_0x1be0d1[_0x4ec419(0x111)]>0x0&&console[_0x4ec419(0x10a)](a25_0x4faa44[_0x4ec419(0x114)]('('+_0x1be0d1[_0x4ec419(0x111)]+_0x4ec419(0x113))),0x0;for(const _0x338e21 of _0x350989){if(!isValidationResult(_0x338e21)){_0x3c8ad5[_0x4ec419(0x128)]&&console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x114)]('-\x20'+_0x338e21[_0x4ec419(0x10b)]+_0x4ec419(0x102)+_0x338e21['reason']+')'));continue;}const {relativePath:_0x494044,source:_0x2f2c04,result:_0x441195}=_0x338e21;if(_0x441195[_0x4ec419(0x112)]&&_0x441195[_0x4ec419(0x10f)]['length']===0x0)_0x3c8ad5[_0x4ec419(0x128)]&&console['log'](a25_0x4faa44['green']('✔\x20'+_0x494044));else _0x441195[_0x4ec419(0x112)]?(console[_0x4ec419(0xff)](a25_0x4faa44['yellow']('⚠\x20'+_0x494044+':\x20'+_0x441195[_0x4ec419(0x10f)][_0x4ec419(0x127)]+_0x4ec419(0x105))),console['log'](formatValidationResult(_0x441195,_0x2f2c04,_0x494044))):(console['log'](a25_0x4faa44[_0x4ec419(0x129)]('✖\x20'+_0x494044+':\x20'+_0x441195['errors'][_0x4ec419(0x127)]+_0x4ec419(0x124))),console[_0x4ec419(0xff)](formatValidationResult(_0x441195,_0x2f2c04,_0x494044)));}return console[_0x4ec419(0xff)](''),_0x1be0d1['hasErrors']?(console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x129)](_0x4ec419(0x10e)+_0x1be0d1[_0x4ec419(0x106)]+_0x4ec419(0x107)+_0x1be0d1[_0x4ec419(0x123)]+_0x4ec419(0x126))),_0x1be0d1[_0x4ec419(0x11a)]>0x0&&console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x116)](_0x1be0d1['warningCount']+'\x20warning(s)\x20found')),_0x1be0d1['skippedCount']>0x0&&console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x114)](_0x1be0d1[_0x4ec419(0x111)]+_0x4ec419(0x104))),0x1):(console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x11b)](_0x4ec419(0x125)+_0x1be0d1[_0x4ec419(0x123)]+_0x4ec419(0x117))),_0x1be0d1['warningCount']>0x0&&console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x116)](_0x1be0d1['warningCount']+_0x4ec419(0x11c))),_0x1be0d1[_0x4ec419(0x111)]>0x0&&console[_0x4ec419(0xff)](a25_0x4faa44[_0x4ec419(0x114)](_0x1be0d1[_0x4ec419(0x111)]+_0x4ec419(0x104))),0x0);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a26_0x19be(_0x5353da,_0x454709){_0x5353da=_0x5353da-0xbd;const _0x183c02=a26_0x183c();let _0x19be9e=_0x183c02[_0x5353da];return _0x19be9e;}const a26_0x5328ed=a26_0x19be;(function(_0x1aee7b,_0x27e643){const _0x42f629=a26_0x19be,_0x5b7ad9=_0x1aee7b();while(!![]){try{const _0x6f65e1=parseInt(_0x42f629(0xda))/0x1+parseInt(_0x42f629(0xe8))/0x2+-parseInt(_0x42f629(0xdb))/0x3*(parseInt(_0x42f629(0xe2))/0x4)+parseInt(_0x42f629(0xcd))/0x5+-parseInt(_0x42f629(0xf4))/0x6*(-parseInt(_0x42f629(0xe7))/0x7)+-parseInt(_0x42f629(0x10c))/0x8+parseInt(_0x42f629(0xd1))/0x9*(-parseInt(_0x42f629(0xc8))/0xa);if(_0x6f65e1===_0x27e643)break;else _0x5b7ad9['push'](_0x5b7ad9['shift']());}catch(_0x2f485b){_0x5b7ad9['push'](_0x5b7ad9['shift']());}}}(a26_0x183c,0x24ff1));import{BaseCommand}from'./command.js';function a26_0x183c(){const _0x179e93=['status','push','database','Submitting\x20kill\x20request...','round','args','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>','✔\x20Job\x20submitted','abs','mo\x20ago','job_id','\x20job','map','No\x20SQL\x20statements\x20found\x20in\x20file','red','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','1680672PHQKVS','priority','Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','name','job:submit','now','trino','jobs','hive','query','show','information_schema','user_name','Submit\x20a\x20job','result','✔\x20Found\x20','job:show','getTime','end_at','...','168710Rnmnyk','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','submit','verbose','Get\x20job\x20results','923295fMhXXp','site','success','\x20row','27ZDlWMM','Show\x20job\x20details','validate','error','Limit:\x20','length','limit','\x20\x20Job\x20ID:\x20','Status\x20filter:\x20','161696IhAIYH','677718VrUOxn','m\x20ago','data','substring','list','debug','\x27\x20to\x20verify\x20the\x20job\x20status','4fdbRws','execute','description','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','type','100597qaqlbd','382376cBXNIA','just\x20now','List\x20jobs','start_at','Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','job:result','yes','dim','Listing\x20jobs...','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>','floor','✔\x20Retrieved\x20','42gONPtZ','url','INVALID_ARGUMENT','file','Job\x20type:\x20','created_at','presto'];a26_0x183c=function(){return _0x179e93;};return a26_0x183c();}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_0x20caf5 from'chalk';function formatDuration(_0x1959db){const _0x4988ec=a26_0x19be;if(_0x1959db<0x3c)return _0x1959db+'s';if(_0x1959db<0xe10)return Math['floor'](_0x1959db/0x3c)+'m\x20'+_0x1959db%0x3c+'s';const _0x3ea681=Math[_0x4988ec(0xf2)](_0x1959db/0xe10),_0x485f18=Math['floor'](_0x1959db%0xe10/0x3c);return _0x485f18>0x0?_0x3ea681+'h\x20'+_0x485f18+'m':_0x3ea681+'h';}function formatRelativeTime(_0x36f0f5){const _0xfe9c63=a26_0x19be,_0x1f13ff=Date[_0xfe9c63(0x111)]()-_0x36f0f5[_0xfe9c63(0xc5)](),_0x25f33a=Math[_0xfe9c63(0xf2)](Math[_0xfe9c63(0x103)](_0x1f13ff)/0x3e8);if(_0x25f33a<0x3c)return _0xfe9c63(0xe9);const _0xf6dda=Math[_0xfe9c63(0xf2)](_0x25f33a/0x3c);if(_0xf6dda<0x3c)return _0xf6dda+_0xfe9c63(0xdc);const _0x1b9cb4=Math[_0xfe9c63(0xf2)](_0xf6dda/0x3c);if(_0x1b9cb4<0x18)return _0x1b9cb4+'h\x20ago';const _0x1c4660=Math[_0xfe9c63(0xf2)](_0x1b9cb4/0x18);if(_0x1c4660<0x1e)return _0x1c4660+'d\x20ago';return Math['floor'](_0x1c4660/0x1e)+_0xfe9c63(0x104);}export class JobListCommand extends BaseCommand{[a26_0x5328ed(0x10f)]='jobs';[a26_0x5328ed(0xe4)]=a26_0x5328ed(0xea);async[a26_0x5328ed(0xe3)](_0x5bd7d0){const _0x2c29fe=a26_0x5328ed,{options:_0x499349,tdx:_0x586833}=_0x5bd7d0,_0x60f272=resolveLimit(_0x499349[_0x2c29fe(0xd7)],DEFAULT_DISPLAY_LIMIT),_0x4f1a10=_0x499349[_0x2c29fe(0xfb)];_0x499349[_0x2c29fe(0xcb)]&&(console[_0x2c29fe(0xd4)](_0x2c29fe(0xd5)+_0x60f272+'\x20jobs'),_0x4f1a10&&console[_0x2c29fe(0xd4)](_0x2c29fe(0xd9)+_0x4f1a10));const _0x59b736=await withSpinner(_0x2c29fe(0xf0),()=>_0x586833[_0x2c29fe(0x113)][_0x2c29fe(0xdf)]({'from':0x0,'to':_0x60f272-0x1,'status':_0x4f1a10}),{'verbose':_0x499349['verbose']}),_0x57b68c=_0x59b736[_0x2c29fe(0xdd)];console[_0x2c29fe(0xd4)](_0x2c29fe(0xc3)+_0x57b68c['length']+_0x2c29fe(0x106)+(_0x57b68c[_0x2c29fe(0xd6)]!==0x1?'s':''));const _0x44cb41=_0x499349[_0x2c29fe(0xce)];if(isStructuredFormat(_0x499349)){const _0x260b85=_0x57b68c[_0x2c29fe(0x107)](_0x1ebd59=>{const _0x96ce70=_0x2c29fe;let _0x15f7f3;if(_0x1ebd59[_0x96ce70(0xeb)]&&_0x1ebd59[_0x96ce70(0xc6)]){const _0x48df77=new Date(_0x1ebd59['start_at'])[_0x96ce70(0xc5)](),_0x579d52=new Date(_0x1ebd59['end_at'])[_0x96ce70(0xc5)]();_0x15f7f3=Math['round']((_0x579d52-_0x48df77)/0x3e8);}return{'job_id':_0x1ebd59['job_id'],'type':_0x1ebd59[_0x96ce70(0xe6)]==='presto'?_0x96ce70(0x112):_0x1ebd59[_0x96ce70(0xe6)],'status':_0x1ebd59[_0x96ce70(0xfb)],'user_name':_0x1ebd59[_0x96ce70(0xc0)],'duration_sec':_0x15f7f3,'created_at':_0x1ebd59[_0x96ce70(0xf9)],'started_at':_0x1ebd59['start_at'],'end_at':_0x1ebd59[_0x96ce70(0xc6)]};});await handleSDKOutput(_0x260b85,_0x499349);}else for(const _0x22fc67 of _0x57b68c){const _0x8c8adc=_0x22fc67[_0x2c29fe(0xfb)]===_0x2c29fe(0xcf)?a26_0x20caf5['green']:_0x22fc67[_0x2c29fe(0xfb)]==='error'?a26_0x20caf5[_0x2c29fe(0x109)]:a26_0x20caf5[_0x2c29fe(0xef)],_0x494b4a=_0x8c8adc(_0x22fc67[_0x2c29fe(0xfb)]),_0x132bcc=getJobUrl(_0x44cb41,_0x22fc67[_0x2c29fe(0x105)]),_0x40da89=hyperlink(_0x22fc67[_0x2c29fe(0x105)],_0x132bcc),_0x6678a9=a26_0x20caf5['dim'](_0x22fc67[_0x2c29fe(0xe6)]===_0x2c29fe(0xfa)?'trino':_0x22fc67['type']),_0x4a1eea=[];if(_0x22fc67['start_at']&&_0x22fc67[_0x2c29fe(0xc6)]){const _0x31be6d=Math['round']((new Date(_0x22fc67['end_at'])['getTime']()-new Date(_0x22fc67[_0x2c29fe(0xeb)])[_0x2c29fe(0xc5)]())/0x3e8);_0x4a1eea[_0x2c29fe(0xfc)](formatDuration(_0x31be6d));}if(_0x22fc67[_0x2c29fe(0xc6)])_0x4a1eea['push'](formatRelativeTime(new Date(_0x22fc67[_0x2c29fe(0xc6)])));else _0x22fc67['start_at']&&_0x4a1eea[_0x2c29fe(0xfc)](formatRelativeTime(new Date(_0x22fc67['start_at'])));const _0x2343ec=_0x4a1eea[_0x2c29fe(0xd6)]>0x0?a26_0x20caf5[_0x2c29fe(0xef)]('\x20'+_0x4a1eea['join'](',\x20')):'';console['log']('⚡\x20'+_0x40da89+'\x20'+_0x6678a9+'\x20'+_0x494b4a+_0x2343ec);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0x5328ed(0x10f)]=a26_0x5328ed(0xc4);[a26_0x5328ed(0xe4)]=a26_0x5328ed(0xd2);[a26_0x5328ed(0xd3)](_0x4cf979){const _0x25f0f2=a26_0x5328ed,_0x4da7f5=_0x4cf979['args'][0x0];if(!_0x4da7f5)return _0x25f0f2(0x101);return undefined;}async[a26_0x5328ed(0xe3)](_0x4aa4e7){const _0x1564ae=a26_0x5328ed,{options:_0x932840,args:_0x4335ba,tdx:_0x3be380}=_0x4aa4e7,_0x2db0fa=_0x4335ba[0x0],_0x2091f1=await withSpinner('Getting\x20job\x20details...',()=>_0x3be380[_0x1564ae(0x113)][_0x1564ae(0xbe)](_0x2db0fa),{'verbose':_0x932840['verbose']}),_0x44854c=_0x2091f1[_0x1564ae(0xdd)];let _0x1509a8;if(_0x44854c[_0x1564ae(0xeb)]&&_0x44854c[_0x1564ae(0xc6)]){const _0x281157=new Date(_0x44854c[_0x1564ae(0xeb)])['getTime'](),_0x34f8e0=new Date(_0x44854c[_0x1564ae(0xc6)])[_0x1564ae(0xc5)]();_0x1509a8=Math[_0x1564ae(0xff)]((_0x34f8e0-_0x281157)/0x3e8);}const _0x5e5e11={'job_id':_0x44854c['job_id'],'type':_0x44854c['type'],'status':_0x44854c[_0x1564ae(0xfb)],..._0x44854c['user_name']&&{'user_name':_0x44854c[_0x1564ae(0xc0)]},..._0x1509a8!==undefined&&{'duration_sec':_0x1509a8},..._0x44854c[_0x1564ae(0xf9)]&&{'created_at':_0x44854c[_0x1564ae(0xf9)]},..._0x44854c[_0x1564ae(0xeb)]&&{'started_at':_0x44854c[_0x1564ae(0xeb)]},..._0x44854c[_0x1564ae(0xc6)]&&{'end_at':_0x44854c[_0x1564ae(0xc6)]},..._0x44854c['database']&&{'database':_0x44854c['database']},..._0x44854c[_0x1564ae(0x10d)]!==undefined&&{'priority':_0x44854c[_0x1564ae(0x10d)]},..._0x44854c[_0x1564ae(0xf5)]&&{'url':_0x44854c[_0x1564ae(0xf5)]},..._0x44854c[_0x1564ae(0xbd)]&&{'query':_0x44854c[_0x1564ae(0xbd)]},..._0x44854c[_0x1564ae(0xe0)]&&{'debug':_0x44854c['debug']}};return await handleSingleObjectOutput(_0x5e5e11,_0x932840),0x0;}}export class JobKillCommand extends BaseCommand{['name']='job:kill';[a26_0x5328ed(0xe4)]='Kill\x20a\x20job';[a26_0x5328ed(0xd3)](_0x528a85){const _0x5c292=a26_0x5328ed,_0x458902=_0x528a85[_0x5c292(0x100)][0x0];if(!_0x458902)return _0x5c292(0xf1);return undefined;}async[a26_0x5328ed(0xe3)](_0x1e567d){const _0x2ae23f=a26_0x5328ed,{options:_0x4af245,args:_0x4d9231,tdx:_0x3fe7f5}=_0x1e567d,_0x35a320=_0x4d9231[0x0];if(!_0x4af245[_0x2ae23f(0xee)]){const _0x4512b3=await confirm(_0x2ae23f(0x10b)+_0x35a320+'?');if(!_0x4512b3)return console['error']('Cancelled'),0x0;}return await withSpinner(_0x2ae23f(0xfe),()=>_0x3fe7f5[_0x2ae23f(0x113)]['kill'](_0x35a320),{'verbose':_0x4af245[_0x2ae23f(0xcb)]}),console[_0x2ae23f(0xd4)](_0x2ae23f(0xc9)+_0x35a320),console[_0x2ae23f(0xd4)](_0x2ae23f(0x10a)+_0x35a320+_0x2ae23f(0xe1)),0x0;}}export class JobSubmitCommand extends BaseCommand{[a26_0x5328ed(0x10f)]=a26_0x5328ed(0x110);[a26_0x5328ed(0xe4)]=a26_0x5328ed(0xc1);async[a26_0x5328ed(0xe3)](_0x323d1c){const _0x4e4834=a26_0x5328ed,{options:_0x14aa69,args:_0x2a3f3b,tdx:_0x2cde1d}=_0x323d1c,_0x3a57f3=_0x14aa69['jobType']||_0x4e4834(0x112),_0x29ac1c=_0x14aa69[_0x4e4834(0xf7)],_0x3a8ba7=_0x14aa69[_0x4e4834(0xfd)]||_0x4e4834(0xbf),_0xcbf34=_0x14aa69[_0x4e4834(0xc2)];if(_0x3a57f3!==_0x4e4834(0x112)&&_0x3a57f3!==_0x4e4834(0x114))throw new SDKError(ErrorCode[_0x4e4834(0xf6)],_0x4e4834(0xe5));let _0x1d10e2;if(_0x29ac1c){if(_0x2a3f3b[0x0])throw new SDKError(ErrorCode[_0x4e4834(0xf6)],'Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option');const _0x3c238c=readSqlStatementsFromFile(_0x29ac1c);if(_0x3c238c[_0x4e4834(0xd6)]===0x0)throw new SDKError(ErrorCode[_0x4e4834(0xf6)],_0x4e4834(0x108));if(_0x3c238c[_0x4e4834(0xd6)]>0x1)throw new SDKError(ErrorCode[_0x4e4834(0xf6)],_0x4e4834(0xec));_0x1d10e2=_0x3c238c[0x0];}else{if(!_0x2a3f3b[0x0])throw new SDKError(ErrorCode[_0x4e4834(0xf6)],_0x4e4834(0x10e));_0x1d10e2=_0x2a3f3b[0x0];}_0x14aa69[_0x4e4834(0xcb)]&&(console[_0x4e4834(0xd4)](_0x4e4834(0xf8)+_0x3a57f3),console['error']('Database:\x20'+_0x3a8ba7),console[_0x4e4834(0xd4)]('Query:\x20'+_0x1d10e2[_0x4e4834(0xde)](0x0,0x64)+(_0x1d10e2[_0x4e4834(0xd6)]>0x64?_0x4e4834(0xc7):'')));const _0x1fef5b=await withSpinner('Submitting\x20job...',()=>_0x2cde1d[_0x4e4834(0x113)][_0x4e4834(0xca)](_0x3a8ba7,_0x1d10e2,_0x3a57f3,_0xcbf34),{'verbose':_0x14aa69['verbose']}),_0x25b9ba=_0x1fef5b[_0x4e4834(0xdd)];return console['error'](_0x4e4834(0x102)),console[_0x4e4834(0xd4)](_0x4e4834(0xd8)+_0x25b9ba['job_id']),await handleSDKOutput([_0x25b9ba],_0x14aa69),0x0;}}export class JobResultCommand extends BaseCommand{['name']=a26_0x5328ed(0xed);[a26_0x5328ed(0xe4)]=a26_0x5328ed(0xcc);[a26_0x5328ed(0xd3)](_0x3526a9){const _0x2e01ef=_0x3526a9['args'][0x0];if(!_0x2e01ef)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>';return undefined;}async[a26_0x5328ed(0xe3)](_0x6f141d){const _0x16352d=a26_0x5328ed,{options:_0x4f60f6,args:_0x5d8824,tdx:_0x8ae426}=_0x6f141d,_0x2d445b=_0x5d8824[0x0],_0x576e9c=await withSpinner('Getting\x20job\x20results...',()=>_0x8ae426[_0x16352d(0x113)]['result'](_0x2d445b),{'verbose':_0x4f60f6[_0x16352d(0xcb)]}),_0x15c849=_0x576e9c[_0x16352d(0xdd)];return console[_0x16352d(0xd4)](_0x16352d(0xf3)+_0x15c849['length']+_0x16352d(0xd0)+(_0x15c849[_0x16352d(0xd6)]!==0x1?'s':'')),await handleSDKOutput(_0x15c849,_0x4f60f6),0x0;}}
|
|
1
|
+
const a26_0x5a88bb=a26_0x4872;(function(_0x2c50d0,_0x41c638){const _0x1f5214=a26_0x4872,_0x44751b=_0x2c50d0();while(!![]){try{const _0x518642=-parseInt(_0x1f5214(0x121))/0x1*(-parseInt(_0x1f5214(0x132))/0x2)+-parseInt(_0x1f5214(0x119))/0x3+-parseInt(_0x1f5214(0x10a))/0x4+parseInt(_0x1f5214(0x122))/0x5*(parseInt(_0x1f5214(0x124))/0x6)+parseInt(_0x1f5214(0x107))/0x7+parseInt(_0x1f5214(0x109))/0x8*(-parseInt(_0x1f5214(0x106))/0x9)+parseInt(_0x1f5214(0x129))/0xa;if(_0x518642===_0x41c638)break;else _0x44751b['push'](_0x44751b['shift']());}catch(_0x3c0f43){_0x44751b['push'](_0x44751b['shift']());}}}(a26_0x45ab,0x245f1));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';function a26_0x45ab(){const _0x38d11d=['push','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','2ofmzrE','INVALID_ARGUMENT','round','jobType','abs','getTime','presto','kill','end_at','information_schema','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','trino','\x20job','job_id','execute','job:submit','mo\x20ago','length','status','submit','Submit\x20a\x20job','limit','success','floor','✔\x20Found\x20','Submitting\x20kill\x20request...','green','Limit:\x20','dim','job:kill','list','result','data','file','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','validate','Status\x20filter:\x20','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>','Submitting\x20job...','name','verbose','d\x20ago','debug','yes','13446iHYXUX','447146OBpJIb','✔\x20Job\x20submitted','1048mgctNX','167740HrGNov','description','\x20jobs','database','Job\x20type:\x20','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>','user_name','m\x20ago','just\x20now','Kill\x20a\x20job','query','substring','type','priority','error','736683DPMjub','now','Get\x20job\x20results','Listing\x20jobs...','start_at','red','url','jobs','241867bwoDee','5tBLQjH','Getting\x20job\x20results...','536754zNYabz','site','Database:\x20','join','...','2369830TdSlMq','\x20\x20Job\x20ID:\x20','show','args','hive'];a26_0x45ab=function(){return _0x38d11d;};return a26_0x45ab();}import{getJobUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a26_0x5e74f2 from'chalk';function a26_0x4872(_0x2d1679,_0x6911c8){_0x2d1679=_0x2d1679-0xf1;const _0x45abd1=a26_0x45ab();let _0x487210=_0x45abd1[_0x2d1679];return _0x487210;}function formatDuration(_0x30bba8){const _0x143904=a26_0x4872;if(_0x30bba8<0x3c)return _0x30bba8+'s';if(_0x30bba8<0xe10)return Math[_0x143904(0xf1)](_0x30bba8/0x3c)+'m\x20'+_0x30bba8%0x3c+'s';const _0x36b8bb=Math[_0x143904(0xf1)](_0x30bba8/0xe10),_0x2de6b0=Math[_0x143904(0xf1)](_0x30bba8%0xe10/0x3c);return _0x2de6b0>0x0?_0x36b8bb+'h\x20'+_0x2de6b0+'m':_0x36b8bb+'h';}function formatRelativeTime(_0x2c52db){const _0x5e48b5=a26_0x4872,_0x300fb2=Date[_0x5e48b5(0x11a)]()-_0x2c52db[_0x5e48b5(0x137)](),_0x33c43f=Math[_0x5e48b5(0xf1)](Math[_0x5e48b5(0x136)](_0x300fb2)/0x3e8);if(_0x33c43f<0x3c)return _0x5e48b5(0x112);const _0x558fdd=Math[_0x5e48b5(0xf1)](_0x33c43f/0x3c);if(_0x558fdd<0x3c)return _0x558fdd+_0x5e48b5(0x111);const _0x436454=Math[_0x5e48b5(0xf1)](_0x558fdd/0x3c);if(_0x436454<0x18)return _0x436454+'h\x20ago';const _0x34bece=Math['floor'](_0x436454/0x18);if(_0x34bece<0x1e)return _0x34bece+_0x5e48b5(0x103);return Math[_0x5e48b5(0xf1)](_0x34bece/0x1e)+_0x5e48b5(0x142);}export class JobListCommand extends BaseCommand{[a26_0x5a88bb(0x101)]=a26_0x5a88bb(0x120);[a26_0x5a88bb(0x10b)]='List\x20jobs';async[a26_0x5a88bb(0x140)](_0x2c4f1f){const _0x451ddf=a26_0x5a88bb,{options:_0x1eedcc,tdx:_0x41cdef}=_0x2c4f1f,_0x3f239a=resolveLimit(_0x1eedcc[_0x451ddf(0x147)],DEFAULT_DISPLAY_LIMIT),_0x4cf83b=_0x1eedcc[_0x451ddf(0x144)];_0x1eedcc['verbose']&&(console[_0x451ddf(0x118)](_0x451ddf(0xf5)+_0x3f239a+_0x451ddf(0x10c)),_0x4cf83b&&console[_0x451ddf(0x118)](_0x451ddf(0xfe)+_0x4cf83b));const _0x1ee056=await withSpinner(_0x451ddf(0x11c),()=>_0x41cdef['jobs'][_0x451ddf(0xf8)]({'from':0x0,'to':_0x3f239a-0x1,'status':_0x4cf83b}),{'verbose':_0x1eedcc['verbose']}),_0x46e4ab=_0x1ee056['data'];console['error'](_0x451ddf(0xf2)+_0x46e4ab[_0x451ddf(0x143)]+_0x451ddf(0x13e)+(_0x46e4ab[_0x451ddf(0x143)]!==0x1?'s':''));const _0xe1cb8d=_0x1eedcc[_0x451ddf(0x125)];if(isStructuredFormat(_0x1eedcc)){const _0x2ff7d5=_0x46e4ab['map'](_0x4c7233=>{const _0x4e912e=_0x451ddf;let _0x2e628e;if(_0x4c7233[_0x4e912e(0x11d)]&&_0x4c7233[_0x4e912e(0x13a)]){const _0x102b83=new Date(_0x4c7233['start_at'])['getTime'](),_0x4b5057=new Date(_0x4c7233['end_at'])[_0x4e912e(0x137)]();_0x2e628e=Math['round']((_0x4b5057-_0x102b83)/0x3e8);}return{'job_id':_0x4c7233[_0x4e912e(0x13f)],'type':_0x4c7233['type']===_0x4e912e(0x138)?_0x4e912e(0x13d):_0x4c7233['type'],'status':_0x4c7233[_0x4e912e(0x144)],'user_name':_0x4c7233[_0x4e912e(0x110)],'duration_sec':_0x2e628e,'created_at':_0x4c7233['created_at'],'started_at':_0x4c7233[_0x4e912e(0x11d)],'end_at':_0x4c7233[_0x4e912e(0x13a)]};});await handleSDKOutput(_0x2ff7d5,_0x1eedcc);}else for(const _0x5d320a of _0x46e4ab){const _0x393e6a=_0x5d320a[_0x451ddf(0x144)]===_0x451ddf(0x148)?a26_0x5e74f2[_0x451ddf(0xf4)]:_0x5d320a[_0x451ddf(0x144)]===_0x451ddf(0x118)?a26_0x5e74f2[_0x451ddf(0x11e)]:a26_0x5e74f2[_0x451ddf(0xf6)],_0x328f58=_0x393e6a(_0x5d320a['status']),_0x1689bb=getJobUrl(_0xe1cb8d,_0x5d320a[_0x451ddf(0x13f)]),_0x17aee2=hyperlink(_0x5d320a[_0x451ddf(0x13f)],_0x1689bb),_0x5e469d=a26_0x5e74f2[_0x451ddf(0xf6)](_0x5d320a[_0x451ddf(0x116)]===_0x451ddf(0x138)?_0x451ddf(0x13d):_0x5d320a[_0x451ddf(0x116)]),_0x57222d=[];if(_0x5d320a[_0x451ddf(0x11d)]&&_0x5d320a[_0x451ddf(0x13a)]){const _0x1b7a4e=Math['round']((new Date(_0x5d320a[_0x451ddf(0x13a)])[_0x451ddf(0x137)]()-new Date(_0x5d320a[_0x451ddf(0x11d)])['getTime']())/0x3e8);_0x57222d['push'](formatDuration(_0x1b7a4e));}if(_0x5d320a[_0x451ddf(0x13a)])_0x57222d[_0x451ddf(0x12e)](formatRelativeTime(new Date(_0x5d320a[_0x451ddf(0x13a)])));else _0x5d320a[_0x451ddf(0x11d)]&&_0x57222d[_0x451ddf(0x12e)](formatRelativeTime(new Date(_0x5d320a[_0x451ddf(0x11d)])));const _0x15ee57=_0x57222d[_0x451ddf(0x143)]>0x0?a26_0x5e74f2[_0x451ddf(0xf6)]('\x20'+_0x57222d[_0x451ddf(0x127)](',\x20')):'';console['log']('⚡\x20'+_0x17aee2+'\x20'+_0x5e469d+'\x20'+_0x328f58+_0x15ee57);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0x5a88bb(0x101)]='job:show';['description']='Show\x20job\x20details';[a26_0x5a88bb(0xfd)](_0x478642){const _0x2f03a5=a26_0x5a88bb,_0x986a59=_0x478642[_0x2f03a5(0x12c)][0x0];if(!_0x986a59)return _0x2f03a5(0x10f);return undefined;}async[a26_0x5a88bb(0x140)](_0xb87dd2){const _0x242e51=a26_0x5a88bb,{options:_0x5abf6e,args:_0x1315ba,tdx:_0x6deac}=_0xb87dd2,_0xf403f8=_0x1315ba[0x0],_0x5a3d0a=await withSpinner('Getting\x20job\x20details...',()=>_0x6deac[_0x242e51(0x120)][_0x242e51(0x12b)](_0xf403f8),{'verbose':_0x5abf6e['verbose']}),_0x458191=_0x5a3d0a[_0x242e51(0xfa)];let _0x3b577a;if(_0x458191[_0x242e51(0x11d)]&&_0x458191['end_at']){const _0x488957=new Date(_0x458191[_0x242e51(0x11d)])[_0x242e51(0x137)](),_0x5a4655=new Date(_0x458191[_0x242e51(0x13a)])['getTime']();_0x3b577a=Math[_0x242e51(0x134)]((_0x5a4655-_0x488957)/0x3e8);}const _0x29e680={'job_id':_0x458191[_0x242e51(0x13f)],'type':_0x458191['type'],'status':_0x458191[_0x242e51(0x144)],..._0x458191[_0x242e51(0x110)]&&{'user_name':_0x458191['user_name']},..._0x3b577a!==undefined&&{'duration_sec':_0x3b577a},..._0x458191['created_at']&&{'created_at':_0x458191['created_at']},..._0x458191[_0x242e51(0x11d)]&&{'started_at':_0x458191['start_at']},..._0x458191['end_at']&&{'end_at':_0x458191[_0x242e51(0x13a)]},..._0x458191['database']&&{'database':_0x458191[_0x242e51(0x10d)]},..._0x458191[_0x242e51(0x117)]!==undefined&&{'priority':_0x458191[_0x242e51(0x117)]},..._0x458191[_0x242e51(0x11f)]&&{'url':_0x458191[_0x242e51(0x11f)]},..._0x458191['query']&&{'query':_0x458191[_0x242e51(0x114)]},..._0x458191[_0x242e51(0x104)]&&{'debug':_0x458191['debug']}};return await handleSingleObjectOutput(_0x29e680,_0x5abf6e),0x0;}}export class JobKillCommand extends BaseCommand{[a26_0x5a88bb(0x101)]=a26_0x5a88bb(0xf7);[a26_0x5a88bb(0x10b)]=a26_0x5a88bb(0x113);[a26_0x5a88bb(0xfd)](_0x33338b){const _0x17295b=a26_0x5a88bb,_0x39bce8=_0x33338b[_0x17295b(0x12c)][0x0];if(!_0x39bce8)return _0x17295b(0xff);return undefined;}async[a26_0x5a88bb(0x140)](_0x205dae){const _0x561b36=a26_0x5a88bb,{options:_0x27b369,args:_0x2dcd96,tdx:_0x11da56}=_0x205dae,_0x427ac2=_0x2dcd96[0x0];if(!_0x27b369[_0x561b36(0x105)]){const _0x10bc24=await confirm(_0x561b36(0x12f)+_0x427ac2+'?');if(!_0x10bc24)return console['error']('Cancelled'),0x0;}return await withSpinner(_0x561b36(0xf3),()=>_0x11da56[_0x561b36(0x120)][_0x561b36(0x139)](_0x427ac2),{'verbose':_0x27b369[_0x561b36(0x102)]}),console[_0x561b36(0x118)](_0x561b36(0x131)+_0x427ac2),console['error'](_0x561b36(0xfc)+_0x427ac2+'\x27\x20to\x20verify\x20the\x20job\x20status'),0x0;}}export class JobSubmitCommand extends BaseCommand{['name']=a26_0x5a88bb(0x141);[a26_0x5a88bb(0x10b)]=a26_0x5a88bb(0x146);async[a26_0x5a88bb(0x140)](_0x2205b2){const _0x2b1c69=a26_0x5a88bb,{options:_0x37447d,args:_0x2fbccc,tdx:_0x22a490}=_0x2205b2,_0x30d995=_0x37447d[_0x2b1c69(0x135)]||_0x2b1c69(0x13d),_0x2d2c01=_0x37447d[_0x2b1c69(0xfb)],_0x213c8e=_0x37447d['database']||_0x2b1c69(0x13b),_0x4e46a7=_0x37447d['result'];if(_0x30d995!==_0x2b1c69(0x13d)&&_0x30d995!==_0x2b1c69(0x12d))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2b1c69(0x130));let _0x1f8cc4;if(_0x2d2c01){if(_0x2fbccc[0x0])throw new SDKError(ErrorCode[_0x2b1c69(0x133)],_0x2b1c69(0x13c));const _0x1cf614=readSqlStatementsFromFile(_0x2d2c01);if(_0x1cf614[_0x2b1c69(0x143)]===0x0)throw new SDKError(ErrorCode[_0x2b1c69(0x133)],'No\x20SQL\x20statements\x20found\x20in\x20file');if(_0x1cf614[_0x2b1c69(0x143)]>0x1)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.');_0x1f8cc4=_0x1cf614[0x0];}else{if(!_0x2fbccc[0x0])throw new SDKError(ErrorCode[_0x2b1c69(0x133)],'Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>');_0x1f8cc4=_0x2fbccc[0x0];}_0x37447d['verbose']&&(console['error'](_0x2b1c69(0x10e)+_0x30d995),console[_0x2b1c69(0x118)](_0x2b1c69(0x126)+_0x213c8e),console[_0x2b1c69(0x118)]('Query:\x20'+_0x1f8cc4[_0x2b1c69(0x115)](0x0,0x64)+(_0x1f8cc4[_0x2b1c69(0x143)]>0x64?_0x2b1c69(0x128):'')));const _0x1a2f55=await withSpinner(_0x2b1c69(0x100),()=>_0x22a490['jobs'][_0x2b1c69(0x145)](_0x213c8e,_0x1f8cc4,_0x30d995,_0x4e46a7),{'verbose':_0x37447d[_0x2b1c69(0x102)]}),_0x20f029=_0x1a2f55['data'];return console[_0x2b1c69(0x118)](_0x2b1c69(0x108)),console[_0x2b1c69(0x118)](_0x2b1c69(0x12a)+_0x20f029[_0x2b1c69(0x13f)]),await handleSDKOutput([_0x20f029],_0x37447d),0x0;}}export class JobResultCommand extends BaseCommand{[a26_0x5a88bb(0x101)]='job:result';[a26_0x5a88bb(0x10b)]=a26_0x5a88bb(0x11b);[a26_0x5a88bb(0xfd)](_0x47bdd8){const _0x4ceb1d=a26_0x5a88bb,_0x2b206c=_0x47bdd8[_0x4ceb1d(0x12c)][0x0];if(!_0x2b206c)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>';return undefined;}async[a26_0x5a88bb(0x140)](_0x427c26){const _0x395f46=a26_0x5a88bb,{options:_0x19a6e6,args:_0x55ecf6,tdx:_0x37cf90}=_0x427c26,_0x3c214b=_0x55ecf6[0x0],_0x44bcc5=await withSpinner(_0x395f46(0x123),()=>_0x37cf90[_0x395f46(0x120)][_0x395f46(0xf9)](_0x3c214b),{'verbose':_0x19a6e6[_0x395f46(0x102)]}),_0x2e944a=_0x44bcc5[_0x395f46(0xfa)];return console[_0x395f46(0x118)]('✔\x20Retrieved\x20'+_0x2e944a[_0x395f46(0x143)]+'\x20row'+(_0x2e944a['length']!==0x1?'s':'')),await handleSDKOutput(_0x2e944a,_0x19a6e6),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x31a2c9=a27_0x1778;(function(_0x3134a5,_0x37bfc1){const _0x3ead09=a27_0x1778,_0x5081a7=_0x3134a5();while(!![]){try{const _0x58ed13=-parseInt(_0x3ead09(0x151))/0x1+-parseInt(_0x3ead09(0x99))/0x2+parseInt(_0x3ead09(0x105))/0x3*(parseInt(_0x3ead09(0x103))/0x4)+-parseInt(_0x3ead09(0xa8))/0x5+parseInt(_0x3ead09(0x185))/0x6+parseInt(_0x3ead09(0x143))/0x7+parseInt(_0x3ead09(0x190))/0x8;if(_0x58ed13===_0x37bfc1)break;else _0x5081a7['push'](_0x5081a7['shift']());}catch(_0x3ccd10){_0x5081a7['push'](_0x5081a7['shift']());}}}(a27_0xf59a,0xe6afd));import a27_0x588684 from'chalk';import a27_0x3647f9 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';function a27_0x1778(_0x90b359,_0x5719c9){_0x90b359=_0x90b359-0x65;const _0xf59ad1=a27_0xf59a();let _0x177835=_0xf59ad1[_0x90b359];return _0x177835;}import{getConsoleNextUrl,getWorkflowSessionUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import{hyperlink}from'../sdk/util/formatters.js';function requireNameOrPath(_0x364d47){const _0x544b99=a27_0x1778;return!_0x364d47&&(console[_0x544b99(0xcd)](_0x544b99(0x6c)),console[_0x544b99(0xcd)](_0x544b99(0x129))),!!_0x364d47;}function withJsonFormat(_0x2d804b){const _0x8800d8=a27_0x1778;if(!_0x2d804b['format']&&!_0x2d804b['json']&&!_0x2d804b['jsonl']&&!_0x2d804b[_0x8800d8(0x179)])return{..._0x2d804b,'format':_0x8800d8(0x66),'json':!![]};return _0x2d804b;}function formatJourneyState(_0x42c705){const _0x18de68=a27_0x1778;switch(_0x42c705){case'launched':return a27_0x588684[_0x18de68(0xae)]('(running)');case _0x18de68(0xda):return a27_0x588684['dim']('(draft)');case _0x18de68(0x93):return a27_0x588684[_0x18de68(0xd9)](_0x18de68(0xec));case'completed':return a27_0x588684[_0x18de68(0x146)](_0x18de68(0x18f));case _0x18de68(0x132):return a27_0x588684[_0x18de68(0x189)](_0x18de68(0x75));default:return'('+_0x42c705+')';}}function a27_0xf59a(){const _0x4c0185=['Database:\x20','\x20\x20Name:\x20','buildIdToNameMap','createVersion','1592418yMiBQC','ID:',',\x20version:\x20','web','Error:\x20','pause','parent_segment','\x20\x20Target:\x20','Listing\x20journey\x20versions...','(unnamed)',',\x20schedule:\x20','filter','Target\x20file:\x20','resourceName','sort','no_parent','helpText','folders','Journey\x20name:\x20','journey:version:create','getActivation','get','resume','executeDryRun','conversion','segments','✔\x20Context\x20set:\x20','getJourney','⚠️\x20','journey','exitOrJumpSize','root\x20folder','stages','filePath','listActivationsFlat','segmentName','runAt','connectionId','diff','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','tsv','\x0a[Dry\x20run]\x20Journey\x20workflow\x20was\x20NOT\x20triggered.','State:','\x27\x20not\x20found\x20in\x20','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','resolveJourneyId','\x20\x20←\x20','Activations:','\x20[runs\x20on\x20refresh]','Fetching\x20','Parent\x20segment:\x20','Getting\x20journey\x20details...','6208776EJkIHt','connection','Paused:','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','dim','run','View\x20a\x20specific\x20version\x20of\x20a\x20journey','journey:stats','replace','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','(completed)','13302712KutchD','journey:columns','json','Error:\x20Stage\x20\x22','\x20(rule\x20match)','Creating\x20new\x20version...','isNew','\x20journeys','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','Journey:','\x20\x20Preserving\x20local\x20segment\x20name:\x20','journeyId','journeyBundleId','user','goalSize','INVALID_ARGUMENT','message','(archived)','✔\x20Found\x20','file','Error:\x20Parent\x20segment\x20context\x20required','Available\x20stages:\x20','values','yes','listFolders','hasChanges','rule','Session:','\x0aChanges\x20to\x20\x27','Export\x20journey(s)\x20as\x20YAML\x20files','\x22\x20paused','entries','Error:\x20Version\x20','\x20new\x20files','Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]','\x5c$&','\x20(draft)\x20—\x20\x22','relative','database','\x20->\x20','\x22\x20not\x20found','No\x20traffic\x20data\x20available\x20for\x20journey:\x20','.yml','limit','\x20details...','Getting\x20column\x20mapping...','workflowSessionId','paused','hasPeriod','folderId','List\x20journeys\x20in\x20current\x20context','Parent\x20segment\x20ID:','includeStats','3209790yzjOfX','updatedAt','getStatistics','(none)','/j/da/je','listVersions','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','options','status','enteredSize','verbose','activation','getParentFull','cwd','cyan','6202875gpJGKI','\x20\x20Parent\x20segment:\x20','name','pausedAt','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','Status:','green','activation_','\x20version','...','Fetching\x20journeys\x20and\x20folders...','journeyStages','set','rootFolderId','dryRun','\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser','base','Error:\x20Invalid\x20--type\x20\x22','map','Cancelled','Error:\x20Invalid\x20version\x20number:\x20','journeyBundleName','folderPath','Pause\x20a\x20running\x20journey','tdx.json','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','activationParams','List\x20activations\x20for\x20a\x20journey','Trigger\x20on-demand\x20workflow\x20execution\x20for\x20journey\x20\x22','execute','Resolving\x20version...','reentryMode','\x20@\x20','✔\x20Pulled\x20','push','session','repeat','error','parentName','connection\x20','utf-8','\x20Opening\x20','journey:pull','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20journey','No\x20journeys\x20found','/e/','Listing\x20journey\x20activations...','Warning:\x20Could\x20not\x20resolve\x20activation\x20','yellow','draft','all','\x20=\x20','/app/ps/','then','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','Getting\x20journey\x20traffic\x20data...','nodes','Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)','join','getLatestJourneyId','Fetching\x20journey\x20','\x20segment\x20rule(s)\x20to\x20match\x20for\x20','attributes','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','red','Getting\x20journey\x20statistics...','find','(paused)','none','Resolved\x20YAML\x20file:\x20','size','Fetching\x20users\x20and\x20connections...','state','Target\x20directory:\x20','segment','Getting\x20version\x20','relativePath','Resolving\x20journey...','\x20\x20Journey\x20ID:\x20','history','getTrafficData','runAfterJourneyRefresh','Error:\x20--version\x20option\x20is\x20required','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','has','journeyName','\x20\x20-\x20','\x20versions)','\x0aError:','targetDir','354444sJqcRV','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','42aEpYBQ','Write\x20','data','Show\x20journey\x20details','versionNumber','audienceId','scheduleType','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','Stages:','content','Warning:\x20Could\x20not\x20resolve\x20segment\x20','buildIdToEmailMap','🗺️\x20','Resuming\x20journey...','segmentPushCommand','Triggering\x20journey\x20workflow...','resolveParentId','journey:resume','journeys','type','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)','jsonl','Input:\x20','format','bold','goal','site','Listing\x20journeys...','Show\x20journey\x20table\x20column\x20mapping','Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20AI','connector_config','journey:pause','Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22','add','includeHistory','Resolving\x20parent\x20segment...','Usage:\x20journey\x20<subcommand>\x20<name-or-path>','version','\x20\x20Consolidating\x20duplicate\x20segment:\x20','Table:\x20','journey:list','-\x20no\x20files\x20written','localeCompare','\x20(ID:\x20','Trigger\x20on-demand\x20journey\x20workflow\x20execution','archived','description','\x20files?','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','links','Options:','split','parentSegment','Found\x20','✔\x20Journey\x20\x22','createdAt','Resume\x20a\x20paused\x20journey','Paused\x20at:','journey:versions','(root)','\x20unchanged\x20files','listJourneysFromParentSegment','10112144hwEgVN','toLowerCase','length','blue','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20','\x0a[Dry\x20run]\x20Journey\x20was\x20NOT\x20resumed.','log','from','completionRate'];a27_0xf59a=function(){return _0x4c0185;};return a27_0xf59a();}function formatJourneyItem(_0x21e140,_0x24b544='',_0x180eeb){const _0x56e3bc=a27_0x1778,_0xe346b9=formatJourneyState(_0x21e140[_0x56e3bc(0xf1)]),_0x4c1112=_0x180eeb?hyperlink(_0x21e140[_0x56e3bc(0xbd)],_0x180eeb):_0x21e140[_0x56e3bc(0xbd)];return _0x24b544+_0x56e3bc(0x111)+_0x4c1112+'\x20'+_0xe346b9;}function escapeRegex(_0x34ce72){const _0x160fcf=a27_0x1778;return _0x34ce72[_0x160fcf(0x18d)](/[.*+?^${}()|[\]\\]/g,_0x160fcf(0x87));}function globToRegex(_0x37dafa){const _0x258a17=a27_0x1778,_0x297d05=_0x37dafa[_0x258a17(0x138)]('*')['map'](escapeRegex);return new RegExp(_0x297d05[_0x258a17(0xe3)]('.*'),'i');}function buildRuleToNameMapping(_0x5709df){const _0x4d6f8f=a27_0x1778,_0x3fdd74=new Map();if(_0x5709df[_0x4d6f8f(0x16a)])for(const [_0x4eaae2,_0x6d778e]of Object[_0x4d6f8f(0x83)](_0x5709df[_0x4d6f8f(0x16a)])){if(_0x6d778e[_0x4d6f8f(0x7e)]){const _0xd5f484=serializeRule(_0x6d778e['rule']),_0x3d2381=_0x3fdd74[_0x4d6f8f(0x166)](_0xd5f484);_0x3d2381?_0x3d2381[_0x4d6f8f(0xca)](_0x4eaae2):_0x3fdd74['set'](_0xd5f484,[_0x4eaae2]);}}return _0x3fdd74;}async function resolveJourneyIdFromInput(_0x49bb82,_0x318301,_0xd6abc){const _0x105685=a27_0x1778,_0x214bb6=await resolveJourneyTarget(_0x49bb82,_0x318301[_0x105685(0x139)],_0x318301['verbose']),_0x428565=_0x214bb6[_0x105685(0x139)];if(!_0x428565)throw new SDKError(ErrorCode[_0x105685(0x73)],'Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');const _0x4c235b=await withSpinner(_0x105685(0x128),()=>_0xd6abc['segment'][_0x105685(0x115)](_0x428565),{'verbose':_0x318301[_0x105685(0xa3)]}),_0x5c7ff5=_0x4c235b['data'],_0x5e36af=await withSpinner(_0x105685(0xf6),()=>_0xd6abc[_0x105685(0x16e)][_0x105685(0x17e)](_0x5c7ff5,_0x214bb6['journeyName']),{'verbose':_0x318301[_0x105685(0xa3)]});return{'journeyId':_0x5e36af['data'],'journeyName':_0x214bb6[_0x105685(0xfe)],'parentSegmentId':_0x5c7ff5};}async function resolveJourneyTarget(_0x39404f,_0x439347,_0x398865){const _0x114514=a27_0x1778;if(isYamlFilePath(_0x39404f))try{const _0x4aa218=await resolveYamlFilePath(_0x39404f);return _0x398865&&(console['error'](_0x114514(0xee)+_0x39404f),console['error'](_0x114514(0xa9)+_0x4aa218[_0x114514(0x139)]),console[_0x114514(0xcd)](_0x114514(0x14e)+_0x4aa218['segmentName']),console[_0x114514(0xcd)]('\x20\x20Folder\x20path:\x20'+(_0x4aa218['folderPath']||'(root)'))),{'journeyName':_0x4aa218[_0x114514(0x174)],'parentSegment':_0x4aa218[_0x114514(0x139)],'resolved':_0x4aa218};}catch(_0x289e62){throw new SDKError(ErrorCode[_0x114514(0x73)],_0x114514(0x188)+_0x289e62[_0x114514(0x74)]);}if(!_0x439347)throw new SDKError(ErrorCode[_0x114514(0x73)],_0x114514(0x18e));return{'journeyName':_0x39404f,'parentSegment':_0x439347};}export class JourneyListCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0x12d);['description']=a27_0x31a2c9(0x96);async['execute'](_0x1be3ef){const _0x2c0001=a27_0x31a2c9,{options:_0x40f9d6,args:_0x5809d6,tdx:_0x325f7e}=_0x1be3ef,_0x390009=_0x5809d6[0x0],_0x1d3582=_0x40f9d6[_0x2c0001(0x139)];if(!_0x1d3582)return console[_0x2c0001(0xcd)](_0x2c0001(0x78)),console['error']('Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22'),0x1;const _0x32c764=await withSpinner(_0x2c0001(0x128),()=>_0x325f7e['segment'][_0x2c0001(0x115)](_0x1d3582),{'verbose':_0x40f9d6['verbose']}),_0x518774=_0x32c764[_0x2c0001(0x107)];_0x40f9d6[_0x2c0001(0xa3)]&&(console[_0x2c0001(0xcd)](_0x2c0001(0x183)+_0x1d3582+_0x2c0001(0x130)+_0x518774+')'),_0x390009&&console[_0x2c0001(0xcd)]('Pattern:\x20'+_0x390009));const _0x38c16f=await withSpinner('Fetching\x20parent\x20segment...',()=>_0x325f7e[_0x2c0001(0xf3)][_0x2c0001(0xa5)](_0x518774),{'verbose':_0x40f9d6[_0x2c0001(0xa3)]}),_0x1234ee=_0x38c16f[_0x2c0001(0x107)],_0xaee7c7=_0x1234ee[_0x2c0001(0xb5)],_0x2201e4=await withSpinner(_0x2c0001(0x120),()=>_0x325f7e['journey']['listJourneysWithFolders'](_0x518774,_0xaee7c7),{'verbose':_0x40f9d6[_0x2c0001(0xa3)]});let _0x4bd506=_0x2201e4[_0x2c0001(0x107)][_0x2c0001(0x117)];const _0x41fc5f=_0x2201e4[_0x2c0001(0x107)][_0x2c0001(0x162)],_0x19b728=new Map();for(const _0x3fa925 of _0x41fc5f){_0x19b728[_0x2c0001(0xb4)](_0x3fa925['id'],_0x3fa925[_0x2c0001(0xaa)]);}if(_0x390009){const _0x8c16e5=globToRegex(_0x390009);_0x4bd506=_0x4bd506[_0x2c0001(0x15c)](_0x12edd3=>_0x8c16e5['test'](_0x12edd3[_0x2c0001(0xbd)]));}console[_0x2c0001(0xcd)](_0x2c0001(0x76)+_0x4bd506[_0x2c0001(0x145)]+_0x2c0001(0xd4)+(_0x4bd506['length']!==0x1?'s':''));const _0x3a19d2=_0x508354=>{const _0x395dae=_0x2c0001;return getConsoleNextUrl(_0x40f9d6[_0x395dae(0x11f)],_0x395dae(0xdd)+_0x518774+'/e/'+_0x508354+'/j/da');};if(_0x40f9d6['format']==='table')await handleSDKOutput(_0x4bd506,_0x40f9d6);else{if(_0x40f9d6[_0x2c0001(0x11c)]===_0x2c0001(0x66)){const _0x3a8e39=_0x4bd506[_0x2c0001(0xba)](_0x5bda95=>({..._0x5bda95,'url':_0x3a19d2(_0x5bda95['id'])}));await handleSDKOutput(_0x3a8e39,_0x40f9d6);}else{console[_0x2c0001(0x14a)]('['+_0x1d3582+']');const _0x113dcb=new Map(),_0x573f2a=[];for(const _0x5edecc of _0x4bd506){if(!_0x5edecc[_0x2c0001(0x95)]||_0x5edecc[_0x2c0001(0x95)]===_0xaee7c7)_0x573f2a[_0x2c0001(0xca)](_0x5edecc);else{const _0x487f84=_0x113dcb[_0x2c0001(0x166)](_0x5edecc[_0x2c0001(0x95)])||[];_0x487f84[_0x2c0001(0xca)](_0x5edecc),_0x113dcb[_0x2c0001(0xb4)](_0x5edecc[_0x2c0001(0x95)],_0x487f84);}}const _0x8e2e22=(_0x59e031,_0x5cff76)=>_0x59e031[_0x2c0001(0xbd)][_0x2c0001(0x12f)](_0x5cff76['journeyBundleName'],undefined,{'sensitivity':_0x2c0001(0xb8)});_0x573f2a[_0x2c0001(0x15f)](_0x8e2e22);for(const _0x227907 of _0x573f2a){console[_0x2c0001(0x14a)](formatJourneyItem(_0x227907,'',_0x3a19d2(_0x227907['id'])));}const _0x9dcb8=[..._0x113dcb[_0x2c0001(0x83)]()][_0x2c0001(0x15f)]((_0x5280c2,_0x93977a)=>{const _0x3fdfdf=_0x2c0001,_0x200a3e=_0x19b728[_0x3fdfdf(0x166)](_0x5280c2[0x0])||_0x5280c2[0x0],_0xd91c9e=_0x19b728[_0x3fdfdf(0x166)](_0x93977a[0x0])||_0x93977a[0x0];return _0x200a3e[_0x3fdfdf(0x12f)](_0xd91c9e,undefined,{'sensitivity':_0x3fdfdf(0xb8)});});for(const [_0xeb173b,_0x2e3df0]of _0x9dcb8){const _0x543898=_0x19b728[_0x2c0001(0x166)](_0xeb173b)||_0xeb173b;console[_0x2c0001(0x14a)]('📁\x20'+_0x543898),_0x2e3df0[_0x2c0001(0x15f)](_0x8e2e22);for(const _0x50e8c8 of _0x2e3df0){console[_0x2c0001(0x14a)](formatJourneyItem(_0x50e8c8,'\x20\x20',_0x3a19d2(_0x50e8c8['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]='journey:view';['description']=a27_0x31a2c9(0x108);async[a27_0x31a2c9(0xc5)](_0x322753){const _0x2ff7ec=a27_0x31a2c9,{options:_0x3d2d69,args:_0x8cf3c4,tdx:_0x3a6850}=_0x322753,_0x5a2b5e=_0x8cf3c4[0x0];if(!_0x5a2b5e)return console[_0x2ff7ec(0xcd)]('Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required'),console['error'](_0x2ff7ec(0x86)),console[_0x2ff7ec(0xcd)](_0x2ff7ec(0x137)),console['error'](_0x2ff7ec(0xb7)),0x1;_0x3d2d69[_0x2ff7ec(0xa3)]&&console[_0x2ff7ec(0xcd)](_0x2ff7ec(0x11b)+_0x5a2b5e);const {journeyId:_0x2dd8f1,parentSegmentId:_0x5a845f}=await resolveJourneyIdFromInput(_0x5a2b5e,_0x3d2d69,_0x3a6850);if(_0x3d2d69[_0x2ff7ec(0x154)]){const _0x176c0d=getConsoleNextUrl(_0x3d2d69[_0x2ff7ec(0x11f)],_0x2ff7ec(0xdd)+_0x5a845f+_0x2ff7ec(0xd6)+_0x2dd8f1+'/j/da/je');return console[_0x2ff7ec(0xcd)](a27_0x588684[_0x2ff7ec(0xae)]('✔')+_0x2ff7ec(0xd1)+a27_0x588684[_0x2ff7ec(0xa7)](_0x176c0d)),openBrowser(_0x176c0d),0x0;}const _0x55f863=await withSpinner(_0x2ff7ec(0x184),()=>_0x3a6850[_0x2ff7ec(0x16e)]['getJourney'](_0x2dd8f1),{'verbose':_0x3d2d69['verbose']}),_0x30d127=_0x55f863['data'],_0x68ce27=_0x3d2d69[_0x2ff7ec(0x98)];let _0x5f422d;if(_0x68ce27)try{const _0x48e01b=await withSpinner(_0x2ff7ec(0xea),()=>_0x3a6850[_0x2ff7ec(0x16e)]['getStatistics'](_0x2dd8f1),{'verbose':_0x3d2d69[_0x2ff7ec(0xa3)]});_0x5f422d=_0x48e01b[_0x2ff7ec(0x107)];}catch{_0x3d2d69['verbose']&&console['error']('\x20\x20Statistics\x20not\x20available');}const _0xa109bd=getConsoleNextUrl(_0x3d2d69[_0x2ff7ec(0x11f)],_0x2ff7ec(0xdd)+_0x5a845f+_0x2ff7ec(0xd6)+_0x2dd8f1+_0x2ff7ec(0x9d)),_0xb670e={'id':_0x30d127['id'],'name':_0x30d127['attributes'][_0x2ff7ec(0xaa)],'description':_0x30d127[_0x2ff7ec(0xe7)][_0x2ff7ec(0x133)],'state':_0x30d127[_0x2ff7ec(0xe7)][_0x2ff7ec(0xf1)],'paused':_0x30d127[_0x2ff7ec(0xe7)]['paused'],'reentry_mode':_0x30d127['attributes'][_0x2ff7ec(0xc7)],'stages':_0x30d127[_0x2ff7ec(0xe7)][_0x2ff7ec(0xb3)]?.[_0x2ff7ec(0x145)]||0x0,..._0x30d127['attributes'][_0x2ff7ec(0x11e)]&&{'goal':_0x30d127[_0x2ff7ec(0xe7)][_0x2ff7ec(0x11e)][_0x2ff7ec(0xaa)]},..._0x5f422d&&{'statistics':{'size':_0x5f422d['size'],'entered':_0x5f422d['enteredSize'],'goal_achieved':_0x5f422d[_0x2ff7ec(0x72)],'completion_rate':_0x5f422d[_0x2ff7ec(0x14c)],'exit_or_jump':_0x5f422d['exitOrJumpSize'],'exit_or_jump_rate':_0x5f422d['exitOrJumpRate'],'stages':_0x5f422d[_0x2ff7ec(0x171)]}},'url':_0xa109bd};return await handleSingleObjectOutput(_0xb670e,_0x3d2d69),0x0;}}export class JourneyStatsCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0x18c);['description']='Show\x20journey\x20statistics';async[a27_0x31a2c9(0xc5)](_0x99ca86){const _0x2a5ac1=a27_0x31a2c9,{options:_0x286fd8,args:_0x270a33,tdx:_0x2a4894}=_0x99ca86,_0x561f31=_0x270a33[0x0];if(!requireNameOrPath(_0x561f31))return 0x1;_0x286fd8[_0x2a5ac1(0xa3)]&&console['error'](_0x2a5ac1(0x11b)+_0x561f31);const _0x360975=_0x286fd8,_0x464638=_0x360975[_0x2a5ac1(0x14b)],_0x146478=_0x360975['to'],_0x4928ca=_0x360975[_0x2a5ac1(0x127)],_0x12a828=_0x360975['stage'];_0x4928ca&&!_0x464638&&!_0x146478&&console[_0x2a5ac1(0xcd)](_0x2a5ac1(0xe8));const _0x32da3b=_0x4928ca?withJsonFormat(_0x286fd8):_0x286fd8,{journeyId:_0x1641d5,journeyName:_0x4b5c7f}=await resolveJourneyIdFromInput(_0x561f31,_0x32da3b,_0x2a4894),_0x56b791=_0x464638||_0x146478?{'from':_0x464638,'to':_0x146478}:undefined,_0x4ad80d=await withSpinner('Getting\x20journey\x20statistics...',()=>Promise[_0x2a5ac1(0xdb)]([_0x2a4894['journey'][_0x2a5ac1(0x16c)](_0x1641d5),_0x2a4894[_0x2a5ac1(0x16e)][_0x2a5ac1(0x9b)](_0x1641d5,_0x56b791)]),{'verbose':_0x32da3b[_0x2a5ac1(0xa3)]}),[_0x58b033,_0x5319ae]=_0x4ad80d['data'];if(!_0x5319ae||_0x5319ae['journeyId']===null)return console[_0x2a5ac1(0xcd)]('No\x20statistics\x20available\x20for\x20journey:\x20'+_0x4b5c7f),console['error'](_0x2a5ac1(0xac)),0x0;const _0x2969fa=buildStageNameMap(_0x58b033),_0x309843=!!(_0x56b791&&_0x5319ae[_0x2a5ac1(0xf8)]?.[_0x2a5ac1(0x145)]),_0xbcb1ad={'stageNameMap':_0x2969fa,'hasPeriod':_0x309843,'includeHistory':!!_0x4928ca};if(_0x12a828&&_0x5319ae[_0x2a5ac1(0x171)]){const _0x453b68=_0x5319ae[_0x2a5ac1(0x171)]['find'](_0x7ab230=>{const _0x148bf6=_0x2a5ac1,_0x65d2db=_0x2969fa[_0x148bf6(0x166)](_0x7ab230['id'])??'';return _0x65d2db[_0x148bf6(0x144)]()===_0x12a828['toLowerCase']();});if(_0x453b68)return await handleSingleObjectOutput(formatStageStats(_0x453b68,_0xbcb1ad),_0x32da3b),0x0;const _0x10d204=_0x5319ae[_0x2a5ac1(0x171)][_0x2a5ac1(0xba)](_0x2d3c54=>_0x2969fa[_0x2a5ac1(0x166)](_0x2d3c54['id'])??_0x2d3c54['id']);return console[_0x2a5ac1(0xcd)](_0x2a5ac1(0x67)+_0x12a828+_0x2a5ac1(0x8c)),console['error'](_0x2a5ac1(0x79)+_0x10d204[_0x2a5ac1(0xe3)](',\x20')),0x1;}const _0x47ddc3=_0x5319ae[_0x2a5ac1(0x171)]?.[_0x2a5ac1(0xba)](_0x30ecb8=>formatStageStats(_0x30ecb8,_0xbcb1ad)),_0x55073a=assembleJourneyStats(_0x5319ae,{'from':_0x464638,'to':_0x146478,'includeHistory':_0x4928ca});return await this['renderStats'](_0x55073a,_0x47ddc3??[],_0x32da3b),0x0;}async['renderStats'](_0x51d7bc,_0xbdaba,_0x1d15ca){const _0x4029c8=a27_0x31a2c9,_0x11eb49=_0x1d15ca[_0x4029c8(0x11c)]==='json'||_0x1d15ca['format']==='jsonl'||_0x1d15ca[_0x4029c8(0x66)]||_0x1d15ca[_0x4029c8(0x11a)];if(_0x11eb49){_0x51d7bc[_0x4029c8(0x171)]=_0xbdaba,await handleSingleObjectOutput(_0x51d7bc,_0x1d15ca);return;}await handleSingleObjectOutput(_0x51d7bc,_0x1d15ca);for(const _0x25a082 of _0xbdaba){console['log'](''),console[_0x4029c8(0x14a)](String(a27_0x588684[_0x4029c8(0xa7)]['bold']('['+_0x25a082[_0x4029c8(0xaa)]+']'))+a27_0x588684[_0x4029c8(0x189)]('\x20'+_0x25a082['id']));const {id:_0x3016c4,name:_0x36ada7,..._0x35d84d}=_0x25a082;await handleSingleObjectOutput(_0x35d84d,_0x1d15ca);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]='journey:traffic';[a27_0x31a2c9(0x133)]=a27_0x31a2c9(0xe2);async[a27_0x31a2c9(0xc5)](_0x460f19){const _0x1c3143=a27_0x31a2c9,{options:_0x26afa0,args:_0x362682,tdx:_0x287722}=_0x460f19,_0x2cdf87=_0x362682[0x0];if(!requireNameOrPath(_0x2cdf87))return 0x1;_0x26afa0[_0x1c3143(0xa3)]&&console[_0x1c3143(0xcd)]('Input:\x20'+_0x2cdf87);const _0x419aef=_0x26afa0,_0x14211e=_0x419aef[_0x1c3143(0x118)],_0xf9d33c=_0x419aef[_0x1c3143(0x14b)],_0xca727=_0x419aef['to'],_0x51683a=_0x419aef[_0x1c3143(0x8f)];if(_0x14211e&&_0x14211e!=='conversion'&&_0x14211e!==_0x1c3143(0xa4))return console[_0x1c3143(0xcd)](_0x1c3143(0xb9)+_0x14211e+_0x1c3143(0x104)),0x1;const _0x371cdc=withJsonFormat(_0x26afa0),{journeyId:_0x53b65c,journeyName:_0x41ba46}=await resolveJourneyIdFromInput(_0x2cdf87,_0x371cdc,_0x287722),_0x2ca69e={'type':_0x14211e,'from':_0xf9d33c,'to':_0xca727,'limit':_0x51683a},_0x3e6aab=await withSpinner(_0x1c3143(0xe0),()=>_0x287722[_0x1c3143(0x16e)][_0x1c3143(0xf9)](_0x53b65c,_0x2ca69e),{'verbose':_0x371cdc[_0x1c3143(0xa3)]}),_0x3e4d24=_0x3e6aab[_0x1c3143(0x107)],_0x19f5ba=_0x3e4d24[_0x1c3143(0x169)]&&(_0x3e4d24['conversion'][_0x1c3143(0xe1)][_0x1c3143(0x145)]>0x0||_0x3e4d24[_0x1c3143(0x169)][_0x1c3143(0x136)][_0x1c3143(0x145)]>0x0),_0x51ec37=_0x3e4d24['activation']&&_0x3e4d24['activation'][_0x1c3143(0x145)]>0x0;if(!_0x19f5ba&&!_0x51ec37)return console['error'](_0x1c3143(0x8d)+_0x41ba46),console[_0x1c3143(0xcd)]('Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.'),_0xf9d33c&&_0xca727&&console[_0x1c3143(0xcd)](_0x1c3143(0x17d)),0x0;return await handleSingleObjectOutput(_0x3e4d24,_0x371cdc),0x0;}}function formatStageStats(_0x52b6e9,_0x48c274){const _0x12c966=a27_0x31a2c9,_0x4713f1=_0x48c274['hasPeriod']&&_0x52b6e9['history']?.[_0x12c966(0x145)]?aggregateStageHistory(_0x52b6e9['history']):{'size':_0x52b6e9[_0x12c966(0xef)],'entered':_0x52b6e9[_0x12c966(0xa2)],'milestone':_0x52b6e9['milestoneSize'],'milestone_rate':_0x52b6e9['completeMilestoneRate'],'exit_or_jump':_0x52b6e9[_0x12c966(0x16f)],'exit_or_jump_rate':_0x52b6e9['exitOrJumpRate']},_0x23cfd6={'id':_0x52b6e9['id'],'name':_0x48c274['stageNameMap'][_0x12c966(0x166)](_0x52b6e9['id'])??_0x52b6e9['id'],..._0x4713f1};return _0x48c274[_0x12c966(0x94)]&&_0x48c274[_0x12c966(0x127)]&&_0x52b6e9['history']&&(_0x23cfd6[_0x12c966(0xf8)]=_0x52b6e9['history']),_0x23cfd6;}export class JourneyPauseCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0x124);['description']=a27_0x31a2c9(0xbf);async['execute'](_0x271450){const _0xebfcf6=a27_0x31a2c9,{options:_0x67e3e5,args:_0x18e721,tdx:_0x36b5ca}=_0x271450,_0x2939ef=_0x18e721[0x0];if(!requireNameOrPath(_0x2939ef))return 0x1;_0x67e3e5[_0xebfcf6(0xa3)]&&console['error'](_0xebfcf6(0x11b)+_0x2939ef);const {journeyId:_0x5d0b2c,journeyName:_0x568b24}=await resolveJourneyIdFromInput(_0x2939ef,_0x67e3e5,_0x36b5ca);if(!_0x67e3e5[_0xebfcf6(0x7b)]){const _0x10749e=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22'+_0x568b24+'\x22?');if(!_0x10749e)return console[_0xebfcf6(0xcd)](_0xebfcf6(0xbb)),0x0;}const _0x4107c1=await withSpinner('Pausing\x20journey...',()=>_0x36b5ca[_0xebfcf6(0x16e)][_0xebfcf6(0x156)](_0x5d0b2c),{'verbose':_0x67e3e5[_0xebfcf6(0xa3)]}),_0x5e88f6=_0x4107c1[_0xebfcf6(0x107)];return console[_0xebfcf6(0xcd)](_0xebfcf6(0x13b)+_0x5e88f6[_0xebfcf6(0xe7)][_0xebfcf6(0xaa)]+_0xebfcf6(0x82)),0x0;}}export class JourneyRunCommand extends BaseCommand{['name']='journey:run';['description']=a27_0x31a2c9(0x131);async[a27_0x31a2c9(0xc5)](_0x47e307){const _0x5637fd=a27_0x31a2c9,{options:_0x402c9c,args:_0x3cc298,tdx:_0x461adc}=_0x47e307,_0x382d0b=_0x3cc298[0x0];if(!requireNameOrPath(_0x382d0b))return 0x1;_0x402c9c[_0x5637fd(0xa3)]&&console[_0x5637fd(0xcd)](_0x5637fd(0x11b)+_0x382d0b);const {journeyId:_0x472002,journeyName:_0x521445}=await resolveJourneyIdFromInput(_0x382d0b,_0x402c9c,_0x461adc);if(_0x402c9c[_0x5637fd(0xb6)])return await this[_0x5637fd(0x168)](_0x47e307,_0x472002,_0x521445);if(!_0x402c9c[_0x5637fd(0x7b)]){const _0x216c0e=await confirm(_0x5637fd(0xc4)+_0x521445+'\x22?');if(!_0x216c0e)return console[_0x5637fd(0xcd)](_0x5637fd(0xbb)),0x0;}const _0x51421d=await withSpinner(_0x5637fd(0x114),()=>_0x461adc[_0x5637fd(0x16e)][_0x5637fd(0x18a)](_0x472002),{'verbose':_0x402c9c[_0x5637fd(0xa3)]}),_0x4fc2b1=_0x51421d[_0x5637fd(0x107)],_0x467a3e=getWorkflowSessionUrl(_0x402c9c[_0x5637fd(0x11f)],_0x4fc2b1['workflowId'],_0x4fc2b1[_0x5637fd(0x92)]);return console[_0x5637fd(0xcd)]('\x0a'+a27_0x588684[_0x5637fd(0xae)]('✔')+'\x20Journey\x20workflow\x20started'),console[_0x5637fd(0xcd)]('\x20\x20'+a27_0x588684[_0x5637fd(0x189)]('Journey:')+'\x20'+_0x521445),console[_0x5637fd(0xcd)]('\x20\x20'+a27_0x588684[_0x5637fd(0x189)](_0x5637fd(0xad))+'\x20'+_0x4fc2b1[_0x5637fd(0xa1)]),console[_0x5637fd(0xcd)]('\x20\x20'+a27_0x588684[_0x5637fd(0x189)](_0x5637fd(0x7f))+'\x20'+_0x4fc2b1[_0x5637fd(0x92)]),console['error']('\x20\x20'+_0x467a3e),0x0;}async[a27_0x31a2c9(0x168)](_0x15bb2a,_0x56e2b3,_0x231128){const _0x2a41eb=a27_0x31a2c9,{options:_0x36fa32,tdx:_0x40ca4f}=_0x15bb2a,_0x2d9b35=await withSpinner(_0x2a41eb(0xe5)+_0x231128+_0x2a41eb(0xb1),()=>Promise[_0x2a41eb(0xdb)]([_0x40ca4f[_0x2a41eb(0x16e)]['getJourney'](_0x56e2b3),_0x40ca4f[_0x2a41eb(0x16e)][_0x2a41eb(0x173)](_0x56e2b3)]),{'verbose':_0x36fa32[_0x2a41eb(0xa3)]}),[_0x5a2064,_0x322a01]=_0x2d9b35[_0x2a41eb(0x107)],_0x5a1b93=_0x5a2064[_0x2a41eb(0xe7)],_0x36e7b4=_0x5a1b93[_0x2a41eb(0xb3)];console['log'](a27_0x588684[_0x2a41eb(0x11d)]('Journey:'),_0x5a1b93[_0x2a41eb(0xaa)]),console[_0x2a41eb(0x14a)](a27_0x588684['bold'](_0x2a41eb(0x152)),_0x5a2064['id']),console[_0x2a41eb(0x14a)](a27_0x588684[_0x2a41eb(0x11d)](_0x2a41eb(0x17b)),_0x5a1b93[_0x2a41eb(0xf1)]),console[_0x2a41eb(0x14a)](a27_0x588684['bold'](_0x2a41eb(0x187)),_0x5a1b93[_0x2a41eb(0x93)]?a27_0x588684[_0x2a41eb(0xd9)]('yes'):a27_0x588684[_0x2a41eb(0xae)]('no')),console[_0x2a41eb(0x14a)](a27_0x588684[_0x2a41eb(0x11d)](_0x2a41eb(0x97)),_0x5a1b93[_0x2a41eb(0x10a)]);const _0x33f22d=_0x36e7b4['length']>0x0?'\x20('+_0x36e7b4['map'](_0x4010d3=>_0x4010d3[_0x2a41eb(0xaa)])[_0x2a41eb(0xe3)](',\x20')+')':'';console[_0x2a41eb(0x14a)](a27_0x588684[_0x2a41eb(0x11d)](_0x2a41eb(0x10d)),''+_0x36e7b4[_0x2a41eb(0x145)]+_0x33f22d),console[_0x2a41eb(0x14a)]('');if(_0x322a01[_0x2a41eb(0x145)]===0x0)console[_0x2a41eb(0x14a)](a27_0x588684[_0x2a41eb(0x11d)](_0x2a41eb(0x180)),a27_0x588684[_0x2a41eb(0x189)](_0x2a41eb(0x9c)));else{console[_0x2a41eb(0x14a)](a27_0x588684['bold'](_0x2a41eb(0x180)));for(const _0x1060fb of _0x322a01){const _0x164c77=_0x1060fb[_0x2a41eb(0xaa)]??_0x2a41eb(0x15a),_0x434423=_0x1060fb[_0x2a41eb(0x176)]!=null?_0x2a41eb(0xcf)+_0x1060fb[_0x2a41eb(0x176)]:'no\x20connection',_0x456f2f=_0x1060fb['scheduleType']?''+_0x1060fb['scheduleType']+(_0x1060fb[_0x2a41eb(0x175)]?_0x2a41eb(0xc8)+_0x1060fb[_0x2a41eb(0x175)]:''):_0x2a41eb(0xed),_0x4a875c=_0x1060fb[_0x2a41eb(0xfa)]?_0x2a41eb(0x181):'';console['log']('\x20\x20'+a27_0x588684[_0x2a41eb(0xd9)]('⚠️\x20')+'\x20'+_0x164c77+'\x20\x20←\x20'+_0x434423+_0x2a41eb(0x15b)+_0x456f2f+_0x4a875c);}}return console[_0x2a41eb(0x14a)](a27_0x588684[_0x2a41eb(0xd9)](_0x2a41eb(0x17a))),0x0;}}export class JourneyResumeCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0x116);[a27_0x31a2c9(0x133)]=a27_0x31a2c9(0x13d);async[a27_0x31a2c9(0xc5)](_0x12b92b){const _0x215dfb=a27_0x31a2c9,{options:_0xd4f3ee,args:_0x384d1a,tdx:_0x29911a}=_0x12b92b,_0x20fbc7=_0x384d1a[0x0];if(!requireNameOrPath(_0x20fbc7))return 0x1;_0xd4f3ee[_0x215dfb(0xa3)]&&console['error'](_0x215dfb(0x11b)+_0x20fbc7);const {journeyId:_0xa139a9,journeyName:_0x54d49d}=await resolveJourneyIdFromInput(_0x20fbc7,_0xd4f3ee,_0x29911a);if(_0xd4f3ee[_0x215dfb(0xb6)])return await this[_0x215dfb(0x168)](_0x12b92b,_0xa139a9,_0x54d49d);if(!_0xd4f3ee[_0x215dfb(0x7b)]){const _0x2e623b=await confirm(_0x215dfb(0x125)+_0x54d49d+'\x22?');if(!_0x2e623b)return console[_0x215dfb(0xcd)](_0x215dfb(0xbb)),0x0;}const _0x17d5f2=await withSpinner(_0x215dfb(0x112),()=>_0x29911a['journey'][_0x215dfb(0x167)](_0xa139a9),{'verbose':_0xd4f3ee[_0x215dfb(0xa3)]}),_0x23977d=_0x17d5f2[_0x215dfb(0x107)];return console[_0x215dfb(0xcd)](_0x215dfb(0x13b)+_0x23977d['attributes'][_0x215dfb(0xaa)]+'\x22\x20resumed'),0x0;}async[a27_0x31a2c9(0x168)](_0x5c6443,_0x5f3e9f,_0x30a179){const _0x559063=a27_0x31a2c9,{options:_0x4c1d40,tdx:_0x46c3d2}=_0x5c6443,_0xb8c099=await withSpinner(_0x559063(0xe5)+_0x30a179+'...',()=>Promise['all']([_0x46c3d2[_0x559063(0x16e)]['getJourney'](_0x5f3e9f),_0x46c3d2[_0x559063(0x16e)][_0x559063(0x173)](_0x5f3e9f)]),{'verbose':_0x4c1d40[_0x559063(0xa3)]}),[_0x23f61e,_0x115cbf]=_0xb8c099[_0x559063(0x107)],_0x291de7=_0x23f61e[_0x559063(0xe7)],_0xa3d4c5=_0x291de7[_0x559063(0xb3)];console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)](_0x559063(0x6d)),_0x291de7['name']),console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)]('ID:'),_0x23f61e['id']),console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)](_0x559063(0x17b)),_0x291de7[_0x559063(0xf1)]),console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)]('Paused:'),_0x291de7[_0x559063(0x93)]?a27_0x588684[_0x559063(0xd9)](_0x559063(0x7b)):a27_0x588684[_0x559063(0xae)]('no'));_0x291de7[_0x559063(0xab)]&&console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)](_0x559063(0x13e)),_0x291de7[_0x559063(0xab)]);console[_0x559063(0x14a)](a27_0x588684['bold']('Parent\x20segment\x20ID:'),_0x291de7[_0x559063(0x10a)]);const _0x4bd70f=_0xa3d4c5[_0x559063(0x145)]>0x0?'\x20('+_0xa3d4c5[_0x559063(0xba)](_0x15a274=>_0x15a274[_0x559063(0xaa)])[_0x559063(0xe3)](',\x20')+')':'';console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)](_0x559063(0x10d)),''+_0xa3d4c5[_0x559063(0x145)]+_0x4bd70f),console['log']('');if(_0x115cbf[_0x559063(0x145)]===0x0)console[_0x559063(0x14a)](a27_0x588684['bold']('Activations:'),a27_0x588684[_0x559063(0x189)](_0x559063(0x9c)));else{console[_0x559063(0x14a)](a27_0x588684[_0x559063(0x11d)](_0x559063(0x180)));for(const _0x215a41 of _0x115cbf){const _0x4956f7=_0x215a41['name']??_0x559063(0x15a),_0xfb722c=_0x215a41[_0x559063(0x176)]!=null?_0x559063(0xcf)+_0x215a41[_0x559063(0x176)]:'no\x20connection',_0x2d3a80=_0x215a41[_0x559063(0x10b)]?''+_0x215a41[_0x559063(0x10b)]+(_0x215a41['runAt']?_0x559063(0xc8)+_0x215a41['runAt']:''):_0x559063(0xed),_0x490cb3=_0x215a41[_0x559063(0xfa)]?_0x559063(0x181):'';console['log']('\x20\x20'+a27_0x588684[_0x559063(0xd9)](_0x559063(0x16d))+'\x20'+_0x4956f7+_0x559063(0x17f)+_0xfb722c+_0x559063(0x15b)+_0x2d3a80+_0x490cb3);}}return console[_0x559063(0x14a)](a27_0x588684['yellow'](_0x559063(0x149))),0x0;}}export class JourneyPullCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0xd2);[a27_0x31a2c9(0x133)]=a27_0x31a2c9(0x81);async[a27_0x31a2c9(0xc5)](_0x28a000){const _0x4ff27c=a27_0x31a2c9,{options:_0x1e678f,args:_0x370b4d,tdx:_0x25b323}=_0x28a000,_0x9fb6f5=_0x1e678f,_0x106c49=_0x370b4d[0x0],_0x48ebca=_0x106c49&&isYamlFilePath(_0x106c49),_0x4e9c87=await resolveTarget({'arg':_0x48ebca?_0x106c49:undefined,'contextParent':_0x1e678f[_0x4ff27c(0x139)],'cwd':process[_0x4ff27c(0xa6)]()});if(!isSuccessfulResolution(_0x4e9c87))return _0x4e9c87['errorCode']===_0x4ff27c(0x160)?(console[_0x4ff27c(0xcd)](a27_0x588684['yellow'](_0x4ff27c(0xfc))),console[_0x4ff27c(0xcd)](_0x4ff27c(0x119)),console[_0x4ff27c(0xcd)](_0x4ff27c(0xdf)),console[_0x4ff27c(0xcd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file'),console[_0x4ff27c(0xcd)](_0x4ff27c(0x178))):(console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xe9)](_0x4ff27c(0x155)+_0x4e9c87[_0x4ff27c(0x74)]+'\x0a')),_0x4e9c87[_0x4ff27c(0x161)]&&console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xa7)](_0x4e9c87[_0x4ff27c(0x161)]))),0x1;let _0x12600e=_0x48ebca?undefined:_0x106c49,_0x3faf80,_0x197c10;_0x4e9c87[_0x4ff27c(0x118)]===_0x4ff27c(0x77)&&(_0x12600e=_0x4e9c87[_0x4ff27c(0x15e)],_0x3faf80=_0x4e9c87[_0x4ff27c(0x172)],_0x197c10=_0x4e9c87[_0x4ff27c(0xbe)]);const _0x35e7cc=_0x4e9c87[_0x4ff27c(0xce)],_0x126858=_0x4e9c87[_0x4ff27c(0x102)];_0x9fb6f5[_0x4ff27c(0xa3)]&&(console[_0x4ff27c(0xcd)](_0x4ff27c(0x183)+_0x35e7cc),console[_0x4ff27c(0xcd)](_0x4ff27c(0xf2)+_0x126858),_0x12600e&&console[_0x4ff27c(0xcd)](_0x4ff27c(0x163)+_0x12600e),_0x3faf80&&console[_0x4ff27c(0xcd)](_0x4ff27c(0x15d)+_0x3faf80),_0x197c10&&console['error']('Folder\x20path:\x20'+_0x197c10));const _0x807bf3=await withSpinner(_0x4ff27c(0x128),()=>_0x25b323[_0x4ff27c(0xf3)]['resolveParentId'](_0x35e7cc),{'verbose':_0x1e678f[_0x4ff27c(0xa3)]}),_0x2bb5b2=_0x807bf3[_0x4ff27c(0x107)],{journeys:_0x6a50fb,folders:_0x4ccd0a}=await withSpinner(_0x4ff27c(0xb2),async()=>{const _0x310546=_0x4ff27c,[_0x517797,_0x361738]=await Promise[_0x310546(0xdb)]([_0x25b323[_0x310546(0x16e)][_0x310546(0x142)](_0x2bb5b2,undefined,{'includeAllVersions':!![]}),_0x25b323[_0x310546(0xf3)][_0x310546(0x7c)](_0x2bb5b2)]);return{'journeys':_0x517797,'folders':_0x361738};},{'verbose':_0x1e678f['verbose']})[_0x4ff27c(0xde)](_0x43bd54=>_0x43bd54['data']);let _0x1b3af2=_0x6a50fb;const _0x905020=buildFolderIdToPathMap(_0x4ccd0a);if(_0x12600e){const _0x49dc03=_0x1b3af2[_0x4ff27c(0x15c)](_0x2e5a62=>_0x2e5a62['journeyBundleName'][_0x4ff27c(0x144)]()===_0x12600e[_0x4ff27c(0x144)]());if(_0x49dc03['length']===0x0)return console[_0x4ff27c(0xcd)]('Error:\x20Journey\x20not\x20found:\x20'+_0x12600e),console['error'](_0x4ff27c(0xc1)),0x1;_0x1b3af2=_0x49dc03;}if(_0x197c10!==undefined){const _0x1fb01d=_0x1b3af2['filter'](_0x16bf76=>{const _0x51d85e=_0x4ff27c,_0x43bf35=_0x16bf76[_0x51d85e(0x95)]?_0x905020[_0x51d85e(0x166)](_0x16bf76[_0x51d85e(0x95)])||'':'';return _0x43bf35===_0x197c10;});if(_0x1fb01d['length']===0x0&&_0x1b3af2['length']>0x0){console[_0x4ff27c(0xcd)]('Error:\x20Journey\x20\x27'+_0x12600e+_0x4ff27c(0x17c)+(_0x197c10||_0x4ff27c(0x170))),console[_0x4ff27c(0xcd)](_0x4ff27c(0x10c));for(const _0x2cbf9a of _0x1b3af2){const _0xff6b68=_0x2cbf9a[_0x4ff27c(0x95)]?_0x905020[_0x4ff27c(0x166)](_0x2cbf9a[_0x4ff27c(0x95)])||'':'';console[_0x4ff27c(0xcd)](_0x4ff27c(0xff)+(_0xff6b68||_0x4ff27c(0x140))+'/'+_0x2cbf9a[_0x4ff27c(0xbd)]);}return 0x1;}_0x1b3af2=_0x1fb01d;}if(_0x1b3af2['length']===0x0)return console[_0x4ff27c(0xcd)](_0x4ff27c(0xd5)),0x0;const _0x12d682=new Map();for(const _0x51e44b of _0x1b3af2){const _0x143c00=_0x51e44b['journeyBundleId'];!_0x12d682[_0x4ff27c(0xfd)](_0x143c00)&&_0x12d682['set'](_0x143c00,[]),_0x12d682['get'](_0x143c00)[_0x4ff27c(0xca)](_0x51e44b);}for(const _0x2e29c5 of _0x12d682[_0x4ff27c(0x7a)]()){_0x2e29c5[_0x4ff27c(0x15f)]((_0x53c1c3,_0x33b9df)=>(_0x53c1c3[_0x4ff27c(0x109)]||0x0)-(_0x33b9df[_0x4ff27c(0x109)]||0x0));}const _0x134800=[],{idToEmailMap:_0x1a08c1,connectionIdToNameMap:_0x84a07c}=await withSpinner(_0x4ff27c(0xf0),async()=>{const _0x2ee258=_0x4ff27c,[_0x261bd2,_0x3dc6cf]=await Promise['all']([_0x25b323[_0x2ee258(0x71)][_0x2ee258(0x110)](),_0x25b323[_0x2ee258(0x186)][_0x2ee258(0x14f)]()]);return{'idToEmailMap':_0x261bd2,'connectionIdToNameMap':_0x3dc6cf};},{'verbose':_0x1e678f[_0x4ff27c(0xa3)]})[_0x4ff27c(0xde)](_0x130dd2=>_0x130dd2[_0x4ff27c(0x107)]);for(const _0x461a1c of _0x12d682[_0x4ff27c(0x7a)]()){const _0x5064bd=_0x461a1c[0x0][_0x4ff27c(0xbd)],_0x4182c4=_0x461a1c[0x0]['folderId'],_0x3c6650=_0x4182c4?_0x905020[_0x4ff27c(0x166)](_0x4182c4)||'':'',_0x4ac1f7=_0x3c6650?a27_0x3647f9[_0x4ff27c(0xe3)](_0x126858,_0x3c6650):_0x126858,_0x232362=_0x3faf80||a27_0x3647f9[_0x4ff27c(0xe3)](_0x4ac1f7,sanitizeFileName(_0x5064bd)+'.yml');let _0x59b4d4,_0x570b47;if(existsSync(_0x232362))try{const _0x282fb7=readFileSync(_0x232362,'utf-8'),_0x396327=parseYamlString(_0x282fb7);_0x570b47=_0x396327,_0x59b4d4=buildRuleToNameMapping(_0x396327),_0x9fb6f5[_0x4ff27c(0xa3)]&&_0x59b4d4[_0x4ff27c(0xef)]>0x0&&console[_0x4ff27c(0xcd)](_0x4ff27c(0x13a)+_0x59b4d4[_0x4ff27c(0xef)]+_0x4ff27c(0xe6)+_0x5064bd);}catch(_0x36e30a){_0x9fb6f5['verbose']&&console[_0x4ff27c(0xcd)](_0x4ff27c(0x148)+_0x36e30a[_0x4ff27c(0x74)]);}const _0x20fcdd=[],_0xf4e48a=new Set(),_0x21be69=new Map(),_0x54a02b=new Map(),_0x51a8fe=new Set(),_0x3f4bc0=new Map(),_0x44e5ba=new Map(),_0x16319c=createJumpTargetCache();await withProgressSpinner(_0x4ff27c(0x182)+_0x5064bd+_0x4ff27c(0xb1),async _0x574497=>{const _0x352bc7=_0x4ff27c;for(const _0x50cf7d of _0x461a1c){const _0x3be04f=_0x461a1c[_0x352bc7(0x145)]>0x1?_0x50cf7d['journeyBundleName']+'\x20v'+(_0x50cf7d[_0x352bc7(0x109)]||0x1):_0x50cf7d[_0x352bc7(0xbd)];_0x574497['setPhase'](_0x352bc7(0x182)+_0x3be04f);const _0x445c20=await _0x25b323['journey'][_0x352bc7(0x16c)](_0x50cf7d['id']),_0x102d21=_0x445c20[_0x352bc7(0xe7)]?.['audienceId'],_0x3204cf={'resolveSegment':async _0x30fe72=>{const _0x4c0f29=_0x352bc7;if(!_0x102d21)return{'name':_0x30fe72,'isJourneyLocal':![]};const _0x5349a4=_0x21be69['get'](_0x30fe72);if(_0x5349a4)return _0x5349a4;try{const _0x533193=await _0x25b323['segment']['getSegment'](_0x102d21,_0x30fe72),_0x3a85da=_0x533193['kind']===SEGMENT_KIND_JOURNEY;let _0x5e6acd,_0x2a7759=_0x533193[_0x4c0f29(0xaa)];if(_0x3a85da&&_0x533193['rule']){const _0x4ce6b1=await segmentResponseToDef(_0x533193,{'resolveSegmentName':async _0x1fc0ab=>{const _0x3c7c6e=_0x4c0f29,_0x2b23e2=_0x21be69[_0x3c7c6e(0x166)](_0x1fc0ab);if(_0x2b23e2)return _0x2b23e2[_0x3c7c6e(0xaa)];const _0x307ef6=await _0x3204cf['resolveSegment'](_0x1fc0ab);return _0x307ef6['name'];}}),_0x35b9d4=_0x4ce6b1[_0x4c0f29(0x7e)];_0x5e6acd={'description':_0x533193[_0x4c0f29(0x133)],'rule':_0x35b9d4};const _0x35edc2=serializeRule(_0x35b9d4),_0x30460d=_0x54a02b[_0x4c0f29(0x166)](_0x35edc2);if(_0x30460d)_0x2a7759=_0x30460d,_0x5e6acd=undefined,_0x9fb6f5['verbose']&&console[_0x4c0f29(0xcd)](_0x4c0f29(0x12b)+_0x533193['name']+_0x4c0f29(0x8b)+_0x30460d);else{let _0x1d266b=![];if(_0x59b4d4){const _0x2eef8d=_0x59b4d4[_0x4c0f29(0x166)](_0x35edc2);if(_0x2eef8d){const _0x22a80a=_0x2eef8d[_0x4c0f29(0xeb)](_0x12820a=>!_0xf4e48a[_0x4c0f29(0xfd)](_0x12820a));_0x22a80a&&(_0x2a7759=_0x22a80a,_0xf4e48a[_0x4c0f29(0x126)](_0x22a80a),_0x54a02b[_0x4c0f29(0xb4)](_0x35edc2,_0x22a80a),_0x1d266b=!![],_0x9fb6f5[_0x4c0f29(0xa3)]&&console[_0x4c0f29(0xcd)](_0x4c0f29(0x6e)+_0x22a80a+_0x4c0f29(0x68)));}}if(!_0x1d266b){const _0x4ebf5a=generateJourneyLocalName(_0x533193['name']);_0x4ebf5a&&(_0x2a7759=_0x4ebf5a);let _0x12dc9b=_0x2a7759,_0x444b04=0x2;while(_0xf4e48a['has'](_0x12dc9b)){_0x12dc9b=_0x2a7759+'_'+_0x444b04,_0x444b04++;}_0xf4e48a[_0x4c0f29(0x126)](_0x12dc9b),_0x54a02b['set'](_0x35edc2,_0x12dc9b),_0x2a7759=_0x12dc9b;}}}const _0x536e5b={'name':_0x2a7759,'isJourneyLocal':_0x3a85da,'definition':_0x5e6acd};return _0x21be69[_0x4c0f29(0xb4)](_0x30fe72,_0x536e5b),_0x536e5b;}catch(_0x103bb4){return _0x1e678f[_0x4c0f29(0xa3)]&&console[_0x4c0f29(0xcd)](_0x4c0f29(0x10f)+_0x30fe72+':\x20'+_0x103bb4[_0x4c0f29(0x74)]),{'name':_0x30fe72,'isJourneyLocal':![]};}},'resolveActivation':async _0x3e8749=>{const _0x284efa=_0x352bc7,_0x5b969e=_0x3f4bc0[_0x284efa(0x166)](_0x3e8749);if(_0x5b969e)return _0x5b969e;try{const _0x4db6fb=await _0x25b323[_0x284efa(0x16e)][_0x284efa(0x165)](_0x50cf7d['id'],_0x3e8749),_0x1b04a0=journeyActivationStepToYaml(_0x4db6fb,_0x1a08c1,_0x84a07c),_0x204b24=JSON['stringify']({'name':_0x1b04a0[_0x284efa(0xaa)],'connection':_0x1b04a0[_0x284efa(0x186)],'connector_config':_0x1b04a0[_0x284efa(0x123)]}),_0x571408=_0x44e5ba['get'](_0x204b24);if(_0x571408){const _0x34eefc={'name':_0x571408,'isJourneyLocal':!![],'definition':_0x1b04a0};return _0x3f4bc0[_0x284efa(0xb4)](_0x3e8749,_0x34eefc),_0x34eefc;}const _0x28998c=_0x4db6fb[_0x284efa(0xe7)][_0x284efa(0xc2)][_0x284efa(0xaa)]||_0x3e8749,_0x4253fe=sanitizeYamlKey(_0x28998c)||_0x284efa(0xaf)+_0x3e8749;let _0x497bde=_0x4253fe,_0x228ae0=0x2;while(_0x51a8fe[_0x284efa(0xfd)](_0x497bde)){_0x497bde=_0x4253fe+'_'+_0x228ae0,_0x228ae0++;}_0x51a8fe['add'](_0x497bde),_0x44e5ba['set'](_0x204b24,_0x497bde);const _0x582663={'name':_0x497bde,'isJourneyLocal':!![],'definition':_0x1b04a0};return _0x3f4bc0[_0x284efa(0xb4)](_0x3e8749,_0x582663),_0x582663;}catch(_0x3aab38){return _0x1e678f[_0x284efa(0xa3)]&&console[_0x284efa(0xcd)](_0x284efa(0xd8)+_0x3e8749+':\x20'+_0x3aab38['message']),{'name':_0x3e8749,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0xe711d7,_0x2cd58e)=>{const _0x180260=_0x352bc7;return resolveJumpTarget(_0xe711d7,_0x2cd58e,_0x16319c,_0x1cb37b=>_0x25b323[_0x180260(0x16e)]['getJourney'](_0x1cb37b));}},_0x420213=await journeyResponseToDef(_0x445c20,_0x3204cf);_0x20fcdd[_0x352bc7(0xca)]({'item':_0x50cf7d,'yaml':_0x420213});}},{'verbose':_0x1e678f['verbose']});const _0x377b02=await _0x25b323[_0x4ff27c(0x16e)][_0x4ff27c(0xe4)](_0x461a1c[0x0][_0x4ff27c(0x70)]),_0x30e6d=buildMergedJourneyDef(_0x20fcdd,_0x59b4d4,_0x377b02),_0x12b97f=normalizeJourneyDef(_0x30e6d,_0x570b47),_0x39afbd=toYamlString(_0x12b97f),_0x1ac4bc=_0x3faf80||a27_0x3647f9[_0x4ff27c(0xe3)](_0x4ac1f7,sanitizeFileName(_0x5064bd)+_0x4ff27c(0x8e));!_0x3faf80&&_0x3c6650&&!existsSync(_0x4ac1f7)&&mkdirSync(_0x4ac1f7,{'recursive':!![]});const _0x1814a6=a27_0x3647f9[_0x4ff27c(0x89)](process[_0x4ff27c(0xa6)](),_0x1ac4bc);if(existsSync(_0x1ac4bc)){const _0xc840af=readFileSync(_0x1ac4bc,'utf-8'),_0xf74b86=generateDiff(_0xc840af,_0x39afbd),_0x5ccad2=hasChanges(_0xf74b86);_0x134800[_0x4ff27c(0xca)]({'relativePath':_0x1814a6,'absolutePath':_0x1ac4bc,'content':_0x39afbd,'isNew':![],'hasChanges':_0x5ccad2,'diff':_0x5ccad2?formatDiffWithColors(_0xf74b86):undefined});}else _0x134800['push']({'relativePath':_0x1814a6,'absolutePath':_0x1ac4bc,'content':_0x39afbd,'isNew':!![],'hasChanges':![]});}const _0x13fda2=_0x134800[_0x4ff27c(0x15c)](_0x782156=>_0x782156[_0x4ff27c(0x6a)]),_0x1fb0e9=_0x134800[_0x4ff27c(0x15c)](_0xfa0698=>!_0xfa0698[_0x4ff27c(0x6a)]&&_0xfa0698['hasChanges']),_0x2fbf36=_0x134800['filter'](_0xb870e=>!_0xb870e[_0x4ff27c(0x6a)]&&!_0xb870e[_0x4ff27c(0x7d)]),_0x48c7ac=_0x1b3af2['length'],_0x39647c=_0x12d682[_0x4ff27c(0xef)],_0x20d4f8=_0x48c7ac>_0x39647c?'\x20('+_0x48c7ac+_0x4ff27c(0x100):'';console[_0x4ff27c(0xcd)]('\x0aPull\x20summary:'),console[_0x4ff27c(0xcd)]('\x20\x20'+a27_0x588684['cyan'](_0x39647c+_0x4ff27c(0x6b))+a27_0x588684[_0x4ff27c(0x189)](_0x20d4f8)),console[_0x4ff27c(0xcd)]('\x20\x20'+a27_0x588684[_0x4ff27c(0xae)]('+\x20'+_0x13fda2[_0x4ff27c(0x145)]+_0x4ff27c(0x85))),console[_0x4ff27c(0xcd)]('\x20\x20'+a27_0x588684[_0x4ff27c(0xd9)]('~\x20'+_0x1fb0e9[_0x4ff27c(0x145)]+'\x20changed\x20files')),console[_0x4ff27c(0xcd)]('\x20\x20'+a27_0x588684[_0x4ff27c(0x189)]('=\x20'+_0x2fbf36['length']+_0x4ff27c(0x141))),console[_0x4ff27c(0xcd)](_0x4ff27c(0x158)+a27_0x588684['cyan'](_0x126858)+'\x0a');if(_0x1fb0e9[_0x4ff27c(0x145)]>0x0)for(const _0x4b8dea of _0x1fb0e9){console[_0x4ff27c(0xcd)](_0x4ff27c(0x80)+_0x4b8dea[_0x4ff27c(0xf5)]+'\x27:'),console[_0x4ff27c(0xcd)]('─'['repeat'](0x3c)),console[_0x4ff27c(0xcd)](_0x4b8dea[_0x4ff27c(0x177)]),console[_0x4ff27c(0xcd)]('─'[_0x4ff27c(0xcc)](0x3c));}if(_0x9fb6f5[_0x4ff27c(0xb6)])return console['error'](a27_0x588684[_0x4ff27c(0xd9)](_0x4ff27c(0x135))),0x0;if(_0x13fda2['length']===0x0&&_0x1fb0e9[_0x4ff27c(0x145)]===0x0)return console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xae)]('✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'parent_segment':_0x35e7cc},_0x9fb6f5[_0x4ff27c(0xcb)]),console['error'](a27_0x588684[_0x4ff27c(0xae)](_0x4ff27c(0x16b)+a27_0x588684[_0x4ff27c(0x189)](_0x4ff27c(0x157))+_0x4ff27c(0xdc)+a27_0x588684[_0x4ff27c(0xa7)](_0x35e7cc))),0x0;if(!_0x9fb6f5['yes']&&(_0x13fda2[_0x4ff27c(0x145)]>0x0||_0x1fb0e9[_0x4ff27c(0x145)]>0x0)){if(!isInteractive())return console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xe9)](_0x4ff27c(0x101)),_0x4ff27c(0x9f)),console[_0x4ff27c(0xcd)](a27_0x588684['dim'](_0x4ff27c(0xd3))),0x1;const _0x468b81=await confirmKey(_0x4ff27c(0x106)+(_0x13fda2[_0x4ff27c(0x145)]+_0x1fb0e9[_0x4ff27c(0x145)])+_0x4ff27c(0x134));if(!_0x468b81)return console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xd9)]('Aborted.'),_0x4ff27c(0x12e)),0x1;}!existsSync(_0x126858)&&mkdirSync(_0x126858,{'recursive':!![]});const _0x3435bc=a27_0x3647f9['join'](_0x126858,_0x4ff27c(0xc0));writeFileSync(_0x3435bc,createTdxConfigContent(_0x35e7cc),'utf-8');for(const _0x1dff2b of _0x134800){(_0x1dff2b[_0x4ff27c(0x6a)]||_0x1dff2b[_0x4ff27c(0x7d)])&&writeFileSync(_0x1dff2b['absolutePath'],_0x1dff2b[_0x4ff27c(0x10e)],_0x4ff27c(0xd0));}return console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xae)](_0x4ff27c(0xc9)+(_0x13fda2[_0x4ff27c(0x145)]+_0x1fb0e9['length'])+'\x20journey\x20files\x20to\x20'+_0x126858)),saveSessionContext({'parent_segment':_0x35e7cc},_0x9fb6f5['session']),console[_0x4ff27c(0xcd)](a27_0x588684[_0x4ff27c(0xae)](_0x4ff27c(0x16b)+a27_0x588684[_0x4ff27c(0x189)](_0x4ff27c(0x157))+'\x20=\x20'+a27_0x588684['cyan'](_0x35e7cc))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0x65);[a27_0x31a2c9(0x133)]=a27_0x31a2c9(0x121);async[a27_0x31a2c9(0xc5)](_0x48690f){const _0x51eb0a=a27_0x31a2c9,{options:_0x141bf2,args:_0x566c01,tdx:_0x458255}=_0x48690f,_0x33d31b=_0x566c01[0x0];if(!requireNameOrPath(_0x33d31b))return 0x1;_0x141bf2['verbose']&&console['error']('Input:\x20'+_0x33d31b);const {journeyId:_0x299526}=await resolveJourneyIdFromInput(_0x33d31b,_0x141bf2,_0x458255),_0x3ff366=await withSpinner(_0x51eb0a(0x91),()=>_0x458255[_0x51eb0a(0x16e)]['getColumnMapping'](_0x299526),{'verbose':_0x141bf2['verbose']}),_0x3f0fe2=_0x3ff366[_0x51eb0a(0x107)];return console['log'](_0x51eb0a(0x14d)+_0x3f0fe2[_0x51eb0a(0x8a)]),console[_0x51eb0a(0x14a)](_0x51eb0a(0x12c)+_0x3f0fe2['table']),await handleSDKOutput(_0x3f0fe2['columns'],_0x141bf2),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]='journey:activations';['description']=a27_0x31a2c9(0xc3);async[a27_0x31a2c9(0xc5)](_0x46a0c0){const _0x5b4b97=a27_0x31a2c9,{options:_0x2f8f9c,args:_0x46023f,tdx:_0x4b21d2}=_0x46a0c0,_0x511fa3=_0x46023f[0x0];if(!requireNameOrPath(_0x511fa3))return 0x1;_0x2f8f9c[_0x5b4b97(0xa3)]&&console['error'](_0x5b4b97(0x11b)+_0x511fa3);const {journeyId:_0x1523e1}=await resolveJourneyIdFromInput(_0x511fa3,_0x2f8f9c,_0x4b21d2),_0xe42c8d=await withSpinner(_0x5b4b97(0xd7),()=>_0x4b21d2[_0x5b4b97(0x16e)][_0x5b4b97(0x173)](_0x1523e1),{'verbose':_0x2f8f9c['verbose']}),_0x3b878d=_0xe42c8d[_0x5b4b97(0x107)];return console[_0x5b4b97(0xcd)](_0x5b4b97(0x13a)+_0x3b878d[_0x5b4b97(0x145)]+'\x20activation'+(_0x3b878d[_0x5b4b97(0x145)]!==0x1?'s':'')),await handleSDKOutput(_0x3b878d,_0x2f8f9c),0x0;}}export class JourneyPushCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]='journey:push';['description']=a27_0x31a2c9(0x122);[a27_0x31a2c9(0x113)]=new SegmentPushCommand();async[a27_0x31a2c9(0xc5)](_0x1a1188){const _0xe9225=a27_0x31a2c9,_0x38494f=_0x1a1188['args'][0x0];let _0x4001d9;if(_0x38494f){const _0x5165e3=await resolveTarget({'arg':_0x38494f,'contextParent':_0x1a1188['options'][_0xe9225(0x139)],'cwd':process[_0xe9225(0xa6)]()});isSuccessfulResolution(_0x5165e3)&&_0x5165e3[_0xe9225(0x118)]===_0xe9225(0x77)&&(_0x4001d9=_0x5165e3[_0xe9225(0x172)]);}const _0x46713d={..._0x1a1188,'options':{..._0x1a1188[_0xe9225(0xa0)],'journeysOnly':!![],..._0x4001d9&&{'singleFilePath':_0x4001d9}}};return this[_0xe9225(0x113)][_0xe9225(0xc5)](_0x46713d);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]=a27_0x31a2c9(0x13f);[a27_0x31a2c9(0x133)]='List\x20all\x20versions\x20of\x20a\x20journey';async[a27_0x31a2c9(0xc5)](_0x1b8f92){const _0x591f82=a27_0x31a2c9,{options:_0x48282c,args:_0x10ac51,tdx:_0x1b3202}=_0x1b8f92,_0x30ac8c=_0x10ac51[0x0];if(!requireNameOrPath(_0x30ac8c))return 0x1;if(_0x48282c['verbose'])console['error'](_0x591f82(0x11b)+_0x30ac8c);const {journeyId:_0x2c6d99}=await resolveJourneyIdFromInput(_0x30ac8c,_0x48282c,_0x1b3202),_0x552dd1=await withSpinner(_0x591f82(0x159),()=>_0x1b3202[_0x591f82(0x16e)][_0x591f82(0x9e)](_0x2c6d99),{'verbose':_0x48282c['verbose']}),{bundleName:_0x558b09,versions:_0xc44e0e,latestJourneyId:_0x4a8605}=_0x552dd1[_0x591f82(0x107)];console[_0x591f82(0xcd)](_0x558b09+':\x20'+_0xc44e0e[_0x591f82(0x145)]+_0x591f82(0xb0)+(_0xc44e0e[_0x591f82(0x145)]!==0x1?'s':''));const _0x21e460=_0xc44e0e[_0x591f82(0xba)](_0x31cdea=>({'version':_0x31cdea[_0x591f82(0x109)],'journey_id':_0x31cdea['journeyId'],'name':_0x31cdea[_0x591f82(0xaa)],'state':_0x31cdea['state'],'paused':_0x31cdea[_0x591f82(0x93)],'latest':_0x31cdea[_0x591f82(0x6f)]===_0x4a8605,'created_at':_0x31cdea['createdAt']}));return await handleSDKOutput(_0x21e460,_0x48282c),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{['name']=a27_0x31a2c9(0x164);[a27_0x31a2c9(0x133)]=a27_0x31a2c9(0x147);async[a27_0x31a2c9(0xc5)](_0x1d2c87){const _0x46c924=a27_0x31a2c9,{options:_0x512439,args:_0x7701b6,tdx:_0x260b38}=_0x1d2c87,_0x1afc42=_0x7701b6[0x0];if(!requireNameOrPath(_0x1afc42))return 0x1;if(_0x512439[_0x46c924(0xa3)])console[_0x46c924(0xcd)](_0x46c924(0x11b)+_0x1afc42);const {journeyId:_0x4245bb,journeyName:_0x27b461}=await resolveJourneyIdFromInput(_0x1afc42,_0x512439,_0x260b38);if(!_0x512439[_0x46c924(0x7b)]){const _0x33aaed=await confirm('Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22'+_0x27b461+'\x22?');if(!_0x33aaed)return console[_0x46c924(0xcd)](_0x46c924(0xbb)),0x0;}const _0x2ed1cd=await withSpinner(_0x46c924(0x69),()=>_0x260b38[_0x46c924(0x16e)][_0x46c924(0x150)](_0x4245bb),{'verbose':_0x512439[_0x46c924(0xa3)]}),_0x2d99e3=_0x2ed1cd[_0x46c924(0x107)];return console['error'](a27_0x588684['green']('✔')+'\x20Created\x20v'+_0x2d99e3[_0x46c924(0xe7)][_0x46c924(0x109)]+_0x46c924(0x88)+_0x2d99e3['attributes'][_0x46c924(0xaa)]+'\x22'),console[_0x46c924(0xcd)](_0x46c924(0xf7)+_0x2d99e3['id']),await handleSingleObjectOutput({'id':_0x2d99e3['id'],'name':_0x2d99e3[_0x46c924(0xe7)]['name'],'version':_0x2d99e3[_0x46c924(0xe7)][_0x46c924(0x109)],'state':_0x2d99e3[_0x46c924(0xe7)]['state'],'bundle_id':_0x2d99e3[_0x46c924(0xe7)][_0x46c924(0x70)],'created_at':_0x2d99e3[_0x46c924(0xe7)][_0x46c924(0x13c)]},_0x512439),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{[a27_0x31a2c9(0xaa)]='journey:version:view';[a27_0x31a2c9(0x133)]=a27_0x31a2c9(0x18b);async['execute'](_0x2ff946){const _0x2153a5=a27_0x31a2c9,{options:_0x254593,args:_0x432c9c,tdx:_0x4ccf8a}=_0x2ff946,_0x9de3b5=_0x432c9c[0x0];if(!requireNameOrPath(_0x9de3b5))return 0x1;const _0x302c15=_0x254593[_0x2153a5(0x12a)];if(!_0x302c15)return console[_0x2153a5(0xcd)](_0x2153a5(0xfb)),console[_0x2153a5(0xcd)]('Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N'),0x1;const _0x46dd14=parseInt(_0x302c15,0xa);if(isNaN(_0x46dd14)||_0x46dd14<0x1)return console[_0x2153a5(0xcd)](_0x2153a5(0xbc)+_0x302c15),0x1;if(_0x254593[_0x2153a5(0xa3)])console[_0x2153a5(0xcd)](_0x2153a5(0x11b)+_0x9de3b5+_0x2153a5(0x153)+_0x46dd14);const {journeyId:_0x4c17d7,parentSegmentId:_0x36416e}=await resolveJourneyIdFromInput(_0x9de3b5,_0x254593,_0x4ccf8a),_0xedd998=await withSpinner(_0x2153a5(0xc6),()=>_0x4ccf8a[_0x2153a5(0x16e)]['listVersions'](_0x4c17d7),{'verbose':_0x254593[_0x2153a5(0xa3)]}),{versions:_0x22914c,latestJourneyId:_0x10834b}=_0xedd998[_0x2153a5(0x107)],_0x20d686=_0x22914c[_0x2153a5(0xeb)](_0x4e070a=>_0x4e070a[_0x2153a5(0x109)]===_0x46dd14);if(!_0x20d686){const _0x1ddf9b=_0x22914c[_0x2153a5(0xba)](_0x277cc3=>'v'+_0x277cc3[_0x2153a5(0x109)])[_0x2153a5(0xe3)](',\x20');return console['error'](_0x2153a5(0x84)+_0x46dd14+'\x20not\x20found.\x20Available:\x20'+_0x1ddf9b),0x1;}const _0x45b5b7=await withSpinner(_0x2153a5(0xf4)+_0x46dd14+_0x2153a5(0x90),()=>_0x4ccf8a[_0x2153a5(0x16e)]['getJourney'](_0x20d686[_0x2153a5(0x6f)]),{'verbose':_0x254593[_0x2153a5(0xa3)]}),_0x44f7f9=_0x45b5b7[_0x2153a5(0x107)],_0xa22984=getConsoleNextUrl(_0x254593[_0x2153a5(0x11f)],'/app/ps/'+_0x36416e+'/e/'+_0x20d686[_0x2153a5(0x6f)]+_0x2153a5(0x9d));return await handleSingleObjectOutput({'id':_0x44f7f9['id'],'name':_0x44f7f9[_0x2153a5(0xe7)][_0x2153a5(0xaa)],'version':_0x44f7f9['attributes'][_0x2153a5(0x109)],'description':_0x44f7f9[_0x2153a5(0xe7)][_0x2153a5(0x133)],'state':_0x44f7f9['attributes'][_0x2153a5(0xf1)],'paused':_0x44f7f9[_0x2153a5(0xe7)]['paused'],'reentry_mode':_0x44f7f9[_0x2153a5(0xe7)]['reentryMode'],'stages':_0x44f7f9[_0x2153a5(0xe7)]['journeyStages']?.['length']||0x0,..._0x44f7f9[_0x2153a5(0xe7)][_0x2153a5(0x11e)]&&{'goal':_0x44f7f9[_0x2153a5(0xe7)][_0x2153a5(0x11e)][_0x2153a5(0xaa)]},'latest':_0x20d686[_0x2153a5(0x6f)]===_0x10834b,'created_at':_0x44f7f9['attributes'][_0x2153a5(0x13c)],'updated_at':_0x44f7f9[_0x2153a5(0xe7)][_0x2153a5(0x9a)],'url':_0xa22984},_0x254593),0x0;}}
|
|
1
|
+
const a27_0x3a9c55=a27_0x8c8e;(function(_0x59cccf,_0x2fc9e4){const _0x3d0f75=a27_0x8c8e,_0x17be7a=_0x59cccf();while(!![]){try{const _0x3d6284=-parseInt(_0x3d0f75(0x1e9))/0x1+-parseInt(_0x3d0f75(0x1c7))/0x2+-parseInt(_0x3d0f75(0x265))/0x3+-parseInt(_0x3d0f75(0x254))/0x4+parseInt(_0x3d0f75(0x20a))/0x5*(-parseInt(_0x3d0f75(0x250))/0x6)+-parseInt(_0x3d0f75(0x1f3))/0x7*(parseInt(_0x3d0f75(0x169))/0x8)+parseInt(_0x3d0f75(0x22b))/0x9;if(_0x3d6284===_0x2fc9e4)break;else _0x17be7a['push'](_0x17be7a['shift']());}catch(_0x2a3754){_0x17be7a['push'](_0x17be7a['shift']());}}}(a27_0x40e5,0x6da57));import a27_0x815bcd from'chalk';import a27_0x27ac3f 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';function a27_0x40e5(){const _0x4da2d4=['createVersion','utf-8','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','Getting\x20journey\x20traffic\x20data...','Error:\x20Parent\x20segment\x20context\x20required','journey:activations','pausedAt','Session:','connection','connection\x20','\x20\x20-\x20','resolveParentId','journey:pause','\x20\x20Folder\x20path:\x20','19169055kFTEPc','journeyStages','Show\x20journey\x20table\x20column\x20mapping','✔\x20Context\x20set:\x20','conversion','\x0aError:','enteredSize','Triggering\x20journey\x20workflow...','columns','ID:','all','Export\x20journey(s)\x20as\x20YAML\x20files','completed','attributes','root\x20folder','parent_segment','name','launched','-\x20no\x20files\x20written','web','history','(completed)','Resolving\x20parent\x20segment...','journey:push','Fetching\x20journey\x20','Resolved\x20YAML\x20file:\x20','journey:pull','Show\x20journey\x20details','Error:\x20Journey\x20not\x20found:\x20','includeHistory','limit','repeat','entries','values','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','Error:\x20--version\x20option\x20is\x20required','Warning:\x20Could\x20not\x20resolve\x20activation\x20','18QbfAnK','Parent\x20segment:\x20','Available\x20stages:\x20','log','1882988CrkmDC','execute','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','milestoneSize','No\x20journeys\x20found','set','\x20journey\x20files\x20to\x20','yes','error','journey:stats','Folder\x20path:\x20','listVersions','getStatistics','Target\x20directory:\x20','\x20not\x20found.\x20Available:\x20','find','\x20version','780126bSNXot','executeDryRun','setPhase','getLatestJourneyId','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','Getting\x20journey\x20statistics...','Resuming\x20journey...','listFolders','getColumnMapping','red','stageNameMap','Fetching\x20journeys\x20and\x20folders...',',\x20version:\x20','getTrafficData','\x20\x20Preserving\x20local\x20segment\x20name:\x20','\x20versions)','folderId','json','filePath','\x20journeys','absolutePath','\x20(draft)\x20—\x20\x22','.yml','(draft)','Resume\x20a\x20paused\x20journey','add','INVALID_ARGUMENT','Fetching\x20','user','helpText','Paused\x20at:','segmentPushCommand','content','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','journey:list','journeyBundleName','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','errorCode','Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20AI','options','map','isNew','Paused:','\x20new\x20files','Activations:','verbose','✔\x20Journey\x20\x22','Creating\x20new\x20version...','join','connectionId','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','stages','48lNiHSn','List\x20activations\x20for\x20a\x20journey','\x20\x20Statistics\x20not\x20available','getJourney','Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22','listActivationsFlat','journeyName','args','...','\x20\x20←\x20','pause','tdx.json','\x0a[Dry\x20run]\x20Journey\x20workflow\x20was\x20NOT\x20triggered.','createdAt','rule','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','split','\x20(rule\x20match)','segments','Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','green','paused','Error:\x20Invalid\x20version\x20number:\x20','hasChanges','Getting\x20version\x20','Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N','table','from','parentSegment','get','Trigger\x20on-demand\x20journey\x20workflow\x20execution','(paused)','rootFolderId','\x20details...','session','push','(root)','scheduleType','Error:\x20Stage\x20\x22','cwd','\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser','List\x20journeys\x20in\x20current\x20context','Aborted.','Options:','journey:version:view','journey:traffic','state','(none)','\x20->\x20','\x20\x20Parent\x20segment:\x20','journey:version:create','cyan','version','Getting\x20journey\x20details...','journey:run','✔\x20All\x20files\x20are\x20up\x20to\x20date','Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]','Error:\x20','jsonl','listJourneysWithFolders','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','Resolving\x20journey...','description','Stages:','updatedAt','\x22\x20not\x20found','file','dryRun','base','sort','Show\x20journey\x20statistics','Error:\x20Version\x20','localeCompare','no_parent','versionNumber','data','type','database','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','Parent\x20segment\x20ID:','completeMilestoneRate','\x20journey','⚠️\x20','kind','dim','\x20\x20Name:\x20','size','journey','\x20@\x20','folderPath','List\x20all\x20versions\x20of\x20a\x20journey','activation','yellow','filter','882332wPubTu','\x20unchanged\x20files','journeyBundleId','workflowId','blue','Getting\x20column\x20mapping...','\x20[runs\x20on\x20refresh]','Status:','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','links','\x20changed\x20files','Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22','(running)','segment','Database:\x20','/app/ps/','format','runAfterJourneyRefresh','/j/da/je','renderStats','has','reentryMode','journey:view','hasPeriod','relative','goal','connector_config','journeyId','relativePath','audienceId','Target\x20file:\x20','\x0aChanges\x20to\x20\x27','status','(unnamed)','117953CAyVqe','Fetching\x20parent\x20segment...','Journey:','\x20\x20Consolidating\x20duplicate\x20segment:\x20','\x20Created\x20v','/e/','\x0aPull\x20summary:','includeStats','message','\x5c$&','399315oBNomk','site','none','getParentFull','journey:columns','runAt','no\x20connection','State:','✔\x20Found\x20','Fetching\x20users\x20and\x20connections...','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','test','\x20Opening\x20','Input:\x20','listJourneysFromParentSegment','diff','length','\x20Journey\x20workflow\x20started','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)','\x0a[Dry\x20run]\x20Journey\x20was\x20NOT\x20resumed.','Found\x20','journey:versions','\x22\x20paused','81010tDciuQ','buildIdToNameMap','(archived)','journeys','stringify','stage','exitOrJumpSize','🗺️\x20','then','Warning:\x20Could\x20not\x20resolve\x20segment\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','segmentName','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','Cancelled','bold','toLowerCase','Error:\x20Invalid\x20--type\x20\x22','\x20(ID:\x20','activationParams'];a27_0x40e5=function(){return _0x4da2d4;};return a27_0x40e5();}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(_0x47c187){const _0x1ecfb9=a27_0x8c8e;return!_0x47c187&&(console[_0x1ecfb9(0x25c)](_0x1ecfb9(0x1a5)),console[_0x1ecfb9(0x25c)]('Usage:\x20journey\x20<subcommand>\x20<name-or-path>')),!!_0x47c187;}function withJsonFormat(_0x131383){const _0x2ab4c5=a27_0x8c8e;if(!_0x131383[_0x2ab4c5(0x1d7)]&&!_0x131383[_0x2ab4c5(0x276)]&&!_0x131383[_0x2ab4c5(0x1a3)]&&!_0x131383['tsv'])return{..._0x131383,'format':'json','json':!![]};return _0x131383;}function formatJourneyState(_0x516c62){const _0x3e43a7=a27_0x8c8e;switch(_0x516c62){case _0x3e43a7(0x23c):return a27_0x815bcd[_0x3e43a7(0x17d)](_0x3e43a7(0x1d3));case'draft':return a27_0x815bcd['dim'](_0x3e43a7(0x27c));case _0x3e43a7(0x17e):return a27_0x815bcd['yellow'](_0x3e43a7(0x188));case _0x3e43a7(0x237):return a27_0x815bcd[_0x3e43a7(0x1cb)](_0x3e43a7(0x240));case'archived':return a27_0x815bcd[_0x3e43a7(0x1bd)](_0x3e43a7(0x20c));default:return'('+_0x516c62+')';}}function formatJourneyItem(_0x36877f,_0x42c73c='',_0x320d06){const _0x44ab0d=a27_0x8c8e,_0x1cd13e=formatJourneyState(_0x36877f[_0x44ab0d(0x197)]),_0x36aab1=_0x320d06?hyperlink(_0x36877f[_0x44ab0d(0x288)],_0x320d06):_0x36877f[_0x44ab0d(0x288)];return _0x42c73c+_0x44ab0d(0x211)+_0x36aab1+'\x20'+_0x1cd13e;}function escapeRegex(_0x7e8050){const _0x7ccf53=a27_0x8c8e;return _0x7e8050['replace'](/[.*+?^${}()|[\]\\]/g,_0x7ccf53(0x1f2));}function globToRegex(_0x1962b7){const _0x9a0dc6=a27_0x8c8e,_0x411f18=_0x1962b7[_0x9a0dc6(0x179)]('*')[_0x9a0dc6(0x15c)](escapeRegex);return new RegExp(_0x411f18[_0x9a0dc6(0x164)]('.*'),'i');}function buildRuleToNameMapping(_0x63a42){const _0xd49e07=a27_0x8c8e,_0x38c4e6=new Map();if(_0x63a42[_0xd49e07(0x17b)])for(const [_0x558208,_0x29e1b5]of Object[_0xd49e07(0x24b)](_0x63a42[_0xd49e07(0x17b)])){if(_0x29e1b5[_0xd49e07(0x177)]){const _0x2104f1=serializeRule(_0x29e1b5[_0xd49e07(0x177)]),_0x4a460d=_0x38c4e6[_0xd49e07(0x186)](_0x2104f1);_0x4a460d?_0x4a460d[_0xd49e07(0x18c)](_0x558208):_0x38c4e6[_0xd49e07(0x259)](_0x2104f1,[_0x558208]);}}return _0x38c4e6;}async function resolveJourneyIdFromInput(_0x39c1a1,_0x4d3353,_0x100052){const _0x2c1717=a27_0x8c8e,_0x6a2d36=await resolveJourneyTarget(_0x39c1a1,_0x4d3353['parentSegment'],_0x4d3353[_0x2c1717(0x161)]),_0x567db7=_0x6a2d36['parentSegment'];if(!_0x567db7)throw new SDKError(ErrorCode[_0x2c1717(0x27f)],_0x2c1717(0x167));const _0x27ac8b=await withSpinner('Resolving\x20parent\x20segment...',()=>_0x100052[_0x2c1717(0x1d4)][_0x2c1717(0x228)](_0x567db7),{'verbose':_0x4d3353[_0x2c1717(0x161)]}),_0x34aef7=_0x27ac8b[_0x2c1717(0x1b4)],_0x101fe6=await withSpinner(_0x2c1717(0x1a6),()=>_0x100052[_0x2c1717(0x1c0)]['resolveJourneyId'](_0x34aef7,_0x6a2d36['journeyName']),{'verbose':_0x4d3353[_0x2c1717(0x161)]});return{'journeyId':_0x101fe6['data'],'journeyName':_0x6a2d36[_0x2c1717(0x16f)],'parentSegmentId':_0x34aef7};}function a27_0x8c8e(_0x228282,_0x456b7d){_0x228282=_0x228282-0x159;const _0x40e5dd=a27_0x40e5();let _0x8c8ec3=_0x40e5dd[_0x228282];return _0x8c8ec3;}async function resolveJourneyTarget(_0x462e0b,_0x4c4f0f,_0x326051){const _0xa2b77=a27_0x8c8e;if(isYamlFilePath(_0x462e0b))try{const _0x5f2080=await resolveYamlFilePath(_0x462e0b);return _0x326051&&(console[_0xa2b77(0x25c)](_0xa2b77(0x244)+_0x462e0b),console[_0xa2b77(0x25c)](_0xa2b77(0x19a)+_0x5f2080[_0xa2b77(0x185)]),console['error'](_0xa2b77(0x1be)+_0x5f2080[_0xa2b77(0x215)]),console['error'](_0xa2b77(0x22a)+(_0x5f2080['folderPath']||_0xa2b77(0x18d)))),{'journeyName':_0x5f2080[_0xa2b77(0x215)],'parentSegment':_0x5f2080[_0xa2b77(0x185)],'resolved':_0x5f2080};}catch(_0x221eb5){throw new SDKError(ErrorCode[_0xa2b77(0x27f)],_0xa2b77(0x24d)+_0x221eb5[_0xa2b77(0x1f1)]);}if(!_0x4c4f0f)throw new SDKError(ErrorCode[_0xa2b77(0x27f)],_0xa2b77(0x178));return{'journeyName':_0x462e0b,'parentSegment':_0x4c4f0f};}export class JourneyListCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x287);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x192);async['execute'](_0x18f719){const _0x2473c4=a27_0x3a9c55,{options:_0x4ae8ef,args:_0x4898e1,tdx:_0x9c3822}=_0x18f719,_0xe804a7=_0x4898e1[0x0],_0x57a9c8=_0x4ae8ef['parentSegment'];if(!_0x57a9c8)return console[_0x2473c4(0x25c)](_0x2473c4(0x221)),console['error'](_0x2473c4(0x1d2)),0x1;const _0xa1184f=await withSpinner('Resolving\x20parent\x20segment...',()=>_0x9c3822[_0x2473c4(0x1d4)][_0x2473c4(0x228)](_0x57a9c8),{'verbose':_0x4ae8ef[_0x2473c4(0x161)]}),_0x409033=_0xa1184f[_0x2473c4(0x1b4)];_0x4ae8ef['verbose']&&(console[_0x2473c4(0x25c)](_0x2473c4(0x251)+_0x57a9c8+_0x2473c4(0x21b)+_0x409033+')'),_0xe804a7&&console['error']('Pattern:\x20'+_0xe804a7));const _0x1caa8c=await withSpinner(_0x2473c4(0x1ea),()=>_0x9c3822['segment'][_0x2473c4(0x1f6)](_0x409033),{'verbose':_0x4ae8ef[_0x2473c4(0x161)]}),_0x1f33cc=_0x1caa8c['data'],_0x246875=_0x1f33cc[_0x2473c4(0x189)],_0x476028=await withSpinner('Listing\x20journeys...',()=>_0x9c3822[_0x2473c4(0x1c0)][_0x2473c4(0x1a4)](_0x409033,_0x246875),{'verbose':_0x4ae8ef[_0x2473c4(0x161)]});let _0x21ee4a=_0x476028[_0x2473c4(0x1b4)][_0x2473c4(0x20d)];const _0x33e4ee=_0x476028['data']['folders'],_0xc51dc0=new Map();for(const _0x46ac02 of _0x33e4ee){_0xc51dc0[_0x2473c4(0x259)](_0x46ac02['id'],_0x46ac02[_0x2473c4(0x23b)]);}if(_0xe804a7){const _0x2ce32c=globToRegex(_0xe804a7);_0x21ee4a=_0x21ee4a[_0x2473c4(0x1c6)](_0x57ef13=>_0x2ce32c[_0x2473c4(0x1fe)](_0x57ef13[_0x2473c4(0x288)]));}console[_0x2473c4(0x25c)](_0x2473c4(0x1fb)+_0x21ee4a['length']+_0x2473c4(0x1ba)+(_0x21ee4a[_0x2473c4(0x203)]!==0x1?'s':''));const _0x399759=_0x45e646=>{const _0x39088e=_0x2473c4;return getConsoleNextUrl(_0x4ae8ef['site'],_0x39088e(0x1d6)+_0x409033+_0x39088e(0x1ee)+_0x45e646+'/j/da');};if(_0x4ae8ef[_0x2473c4(0x1d7)]===_0x2473c4(0x183))await handleSDKOutput(_0x21ee4a,_0x4ae8ef);else{if(_0x4ae8ef['format']===_0x2473c4(0x276)){const _0x4b3f8f=_0x21ee4a['map'](_0xc1593d=>({..._0xc1593d,'url':_0x399759(_0xc1593d['id'])}));await handleSDKOutput(_0x4b3f8f,_0x4ae8ef);}else{console['log']('['+_0x57a9c8+']');const _0x22a641=new Map(),_0x3e5d8f=[];for(const _0x9ae6cf of _0x21ee4a){if(!_0x9ae6cf[_0x2473c4(0x275)]||_0x9ae6cf['folderId']===_0x246875)_0x3e5d8f[_0x2473c4(0x18c)](_0x9ae6cf);else{const _0x4683a2=_0x22a641[_0x2473c4(0x186)](_0x9ae6cf['folderId'])||[];_0x4683a2[_0x2473c4(0x18c)](_0x9ae6cf),_0x22a641[_0x2473c4(0x259)](_0x9ae6cf[_0x2473c4(0x275)],_0x4683a2);}}const _0x169783=(_0x1998dd,_0x413c93)=>_0x1998dd[_0x2473c4(0x288)][_0x2473c4(0x1b1)](_0x413c93[_0x2473c4(0x288)],undefined,{'sensitivity':_0x2473c4(0x1ad)});_0x3e5d8f[_0x2473c4(0x1ae)](_0x169783);for(const _0x2734f5 of _0x3e5d8f){console['log'](formatJourneyItem(_0x2734f5,'',_0x399759(_0x2734f5['id'])));}const _0x400fee=[..._0x22a641['entries']()][_0x2473c4(0x1ae)]((_0x46ec35,_0x34e1ae)=>{const _0x30a108=_0x2473c4,_0xe7e3c5=_0xc51dc0['get'](_0x46ec35[0x0])||_0x46ec35[0x0],_0x6d6cdf=_0xc51dc0[_0x30a108(0x186)](_0x34e1ae[0x0])||_0x34e1ae[0x0];return _0xe7e3c5['localeCompare'](_0x6d6cdf,undefined,{'sensitivity':_0x30a108(0x1ad)});});for(const [_0x383465,_0x5ea71c]of _0x400fee){const _0x5ce33a=_0xc51dc0[_0x2473c4(0x186)](_0x383465)||_0x383465;console[_0x2473c4(0x253)]('📁\x20'+_0x5ce33a),_0x5ea71c[_0x2473c4(0x1ae)](_0x169783);for(const _0x286504 of _0x5ea71c){console[_0x2473c4(0x253)](formatJourneyItem(_0x286504,'\x20\x20',_0x399759(_0x286504['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x1dd);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x246);async[a27_0x3a9c55(0x255)](_0x576c4d){const _0x5aded8=a27_0x3a9c55,{options:_0x516031,args:_0x481cb7,tdx:_0x1975d2}=_0x576c4d,_0x26b519=_0x481cb7[0x0];if(!_0x26b519)return console['error'](_0x5aded8(0x1a5)),console['error'](_0x5aded8(0x1a1)),console[_0x5aded8(0x25c)](_0x5aded8(0x194)),console[_0x5aded8(0x25c)](_0x5aded8(0x191)),0x1;_0x516031[_0x5aded8(0x161)]&&console['error']('Input:\x20'+_0x26b519);const {journeyId:_0x577aca,parentSegmentId:_0x58150f}=await resolveJourneyIdFromInput(_0x26b519,_0x516031,_0x1975d2);if(_0x516031[_0x5aded8(0x23e)]){const _0x25707b=getConsoleNextUrl(_0x516031[_0x5aded8(0x1f4)],_0x5aded8(0x1d6)+_0x58150f+_0x5aded8(0x1ee)+_0x577aca+_0x5aded8(0x1d9));return console['error'](a27_0x815bcd[_0x5aded8(0x17d)]('✔')+_0x5aded8(0x1ff)+a27_0x815bcd[_0x5aded8(0x19c)](_0x25707b)),openBrowser(_0x25707b),0x0;}const _0x3a2584=await withSpinner(_0x5aded8(0x19e),()=>_0x1975d2[_0x5aded8(0x1c0)][_0x5aded8(0x16c)](_0x577aca),{'verbose':_0x516031[_0x5aded8(0x161)]}),_0x55df50=_0x3a2584['data'],_0x4d9217=_0x516031[_0x5aded8(0x1f0)];let _0x338d09;if(_0x4d9217)try{const _0x29a8b7=await withSpinner(_0x5aded8(0x26a),()=>_0x1975d2[_0x5aded8(0x1c0)][_0x5aded8(0x260)](_0x577aca),{'verbose':_0x516031[_0x5aded8(0x161)]});_0x338d09=_0x29a8b7['data'];}catch{_0x516031[_0x5aded8(0x161)]&&console[_0x5aded8(0x25c)](_0x5aded8(0x16b));}const _0x30ff4e=getConsoleNextUrl(_0x516031[_0x5aded8(0x1f4)],_0x5aded8(0x1d6)+_0x58150f+_0x5aded8(0x1ee)+_0x577aca+_0x5aded8(0x1d9)),_0x30091d={'id':_0x55df50['id'],'name':_0x55df50[_0x5aded8(0x238)][_0x5aded8(0x23b)],'description':_0x55df50[_0x5aded8(0x238)]['description'],'state':_0x55df50['attributes'][_0x5aded8(0x197)],'paused':_0x55df50[_0x5aded8(0x238)][_0x5aded8(0x17e)],'reentry_mode':_0x55df50[_0x5aded8(0x238)][_0x5aded8(0x1dc)],'stages':_0x55df50[_0x5aded8(0x238)]['journeyStages']?.[_0x5aded8(0x203)]||0x0,..._0x55df50[_0x5aded8(0x238)][_0x5aded8(0x1e0)]&&{'goal':_0x55df50[_0x5aded8(0x238)]['goal'][_0x5aded8(0x23b)]},..._0x338d09&&{'statistics':{'size':_0x338d09[_0x5aded8(0x1bf)],'entered':_0x338d09[_0x5aded8(0x231)],'goal_achieved':_0x338d09['goalSize'],'completion_rate':_0x338d09['completionRate'],'exit_or_jump':_0x338d09[_0x5aded8(0x210)],'exit_or_jump_rate':_0x338d09['exitOrJumpRate'],'stages':_0x338d09[_0x5aded8(0x168)]}},'url':_0x30ff4e};return await handleSingleObjectOutput(_0x30091d,_0x516031),0x0;}}export class JourneyStatsCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x25d);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x1af);async[a27_0x3a9c55(0x255)](_0x4e903a){const _0x559fc8=a27_0x3a9c55,{options:_0x1de29a,args:_0x459e13,tdx:_0xcf3cb8}=_0x4e903a,_0x462f3d=_0x459e13[0x0];if(!requireNameOrPath(_0x462f3d))return 0x1;_0x1de29a[_0x559fc8(0x161)]&&console[_0x559fc8(0x25c)](_0x559fc8(0x200)+_0x462f3d);const _0x3c3058=_0x1de29a,_0xd5bb92=_0x3c3058[_0x559fc8(0x184)],_0x26af95=_0x3c3058['to'],_0x553812=_0x3c3058[_0x559fc8(0x248)],_0x5ba701=_0x3c3058[_0x559fc8(0x20f)];_0x553812&&!_0xd5bb92&&!_0x26af95&&console[_0x559fc8(0x25c)](_0x559fc8(0x166));const _0x572c40=_0x553812?withJsonFormat(_0x1de29a):_0x1de29a,{journeyId:_0x2edff4,journeyName:_0x90bbbb}=await resolveJourneyIdFromInput(_0x462f3d,_0x572c40,_0xcf3cb8),_0x5ce3fd=_0xd5bb92||_0x26af95?{'from':_0xd5bb92,'to':_0x26af95}:undefined,_0x3c0eab=await withSpinner(_0x559fc8(0x26a),()=>Promise[_0x559fc8(0x235)]([_0xcf3cb8[_0x559fc8(0x1c0)][_0x559fc8(0x16c)](_0x2edff4),_0xcf3cb8[_0x559fc8(0x1c0)]['getStatistics'](_0x2edff4,_0x5ce3fd)]),{'verbose':_0x572c40[_0x559fc8(0x161)]}),[_0x4d0f91,_0x5be228]=_0x3c0eab[_0x559fc8(0x1b4)];if(!_0x5be228||_0x5be228[_0x559fc8(0x1e2)]===null)return console[_0x559fc8(0x25c)]('No\x20statistics\x20available\x20for\x20journey:\x20'+_0x90bbbb),console['error'](_0x559fc8(0x1fd)),0x0;const _0xe918a9=buildStageNameMap(_0x4d0f91),_0x1dab46=!!(_0x5ce3fd&&_0x5be228[_0x559fc8(0x23f)]?.[_0x559fc8(0x203)]),_0xddf049={'stageNameMap':_0xe918a9,'hasPeriod':_0x1dab46,'includeHistory':!!_0x553812};if(_0x5ba701&&_0x5be228[_0x559fc8(0x168)]){const _0x6d0692=_0x5be228['stages'][_0x559fc8(0x263)](_0xdb0eee=>{const _0x43bbb8=_0x559fc8,_0x54d82a=_0xe918a9[_0x43bbb8(0x186)](_0xdb0eee['id'])??'';return _0x54d82a[_0x43bbb8(0x219)]()===_0x5ba701[_0x43bbb8(0x219)]();});if(_0x6d0692)return await handleSingleObjectOutput(formatStageStats(_0x6d0692,_0xddf049),_0x572c40),0x0;const _0x1bd1ae=_0x5be228[_0x559fc8(0x168)][_0x559fc8(0x15c)](_0x2d48a2=>_0xe918a9[_0x559fc8(0x186)](_0x2d48a2['id'])??_0x2d48a2['id']);return console[_0x559fc8(0x25c)](_0x559fc8(0x18f)+_0x5ba701+_0x559fc8(0x1aa)),console[_0x559fc8(0x25c)](_0x559fc8(0x252)+_0x1bd1ae[_0x559fc8(0x164)](',\x20')),0x1;}const _0xe2f0ee=_0x5be228[_0x559fc8(0x168)]?.[_0x559fc8(0x15c)](_0x1ceab6=>formatStageStats(_0x1ceab6,_0xddf049)),_0x10987a=assembleJourneyStats(_0x5be228,{'from':_0xd5bb92,'to':_0x26af95,'includeHistory':_0x553812});return await this[_0x559fc8(0x1da)](_0x10987a,_0xe2f0ee??[],_0x572c40),0x0;}async[a27_0x3a9c55(0x1da)](_0x20b15e,_0x3e2387,_0x4a3398){const _0x1a88aa=a27_0x3a9c55,_0x707f49=_0x4a3398[_0x1a88aa(0x1d7)]===_0x1a88aa(0x276)||_0x4a3398[_0x1a88aa(0x1d7)]===_0x1a88aa(0x1a3)||_0x4a3398['json']||_0x4a3398['jsonl'];if(_0x707f49){_0x20b15e[_0x1a88aa(0x168)]=_0x3e2387,await handleSingleObjectOutput(_0x20b15e,_0x4a3398);return;}await handleSingleObjectOutput(_0x20b15e,_0x4a3398);for(const _0x4a82da of _0x3e2387){console[_0x1a88aa(0x253)](''),console[_0x1a88aa(0x253)](String(a27_0x815bcd[_0x1a88aa(0x19c)][_0x1a88aa(0x218)]('['+_0x4a82da[_0x1a88aa(0x23b)]+']'))+a27_0x815bcd[_0x1a88aa(0x1bd)]('\x20'+_0x4a82da['id']));const {id:_0x5b84d7,name:_0x32d526,..._0x3c00a8}=_0x4a82da;await handleSingleObjectOutput(_0x3c00a8,_0x4a3398);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x196);[a27_0x3a9c55(0x1a7)]='Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)';async[a27_0x3a9c55(0x255)](_0x60f456){const _0x244d42=a27_0x3a9c55,{options:_0xe626b5,args:_0xfee007,tdx:_0x1cffa9}=_0x60f456,_0xc7f463=_0xfee007[0x0];if(!requireNameOrPath(_0xc7f463))return 0x1;_0xe626b5[_0x244d42(0x161)]&&console[_0x244d42(0x25c)](_0x244d42(0x200)+_0xc7f463);const _0x5e807e=_0xe626b5,_0x577da7=_0x5e807e[_0x244d42(0x1b5)],_0x22fe52=_0x5e807e[_0x244d42(0x184)],_0x400500=_0x5e807e['to'],_0x5a8e94=_0x5e807e[_0x244d42(0x249)];if(_0x577da7&&_0x577da7!==_0x244d42(0x22f)&&_0x577da7!=='activation')return console[_0x244d42(0x25c)](_0x244d42(0x21a)+_0x577da7+_0x244d42(0x216)),0x1;const _0x510638=withJsonFormat(_0xe626b5),{journeyId:_0x23b74e,journeyName:_0x39dc08}=await resolveJourneyIdFromInput(_0xc7f463,_0x510638,_0x1cffa9),_0x3ea103={'type':_0x577da7,'from':_0x22fe52,'to':_0x400500,'limit':_0x5a8e94},_0x27c84b=await withSpinner(_0x244d42(0x220),()=>_0x1cffa9['journey'][_0x244d42(0x272)](_0x23b74e,_0x3ea103),{'verbose':_0x510638[_0x244d42(0x161)]}),_0x598868=_0x27c84b[_0x244d42(0x1b4)],_0x4a9367=_0x598868[_0x244d42(0x22f)]&&(_0x598868[_0x244d42(0x22f)]['nodes'][_0x244d42(0x203)]>0x0||_0x598868[_0x244d42(0x22f)][_0x244d42(0x1d0)][_0x244d42(0x203)]>0x0),_0x25491c=_0x598868[_0x244d42(0x1c4)]&&_0x598868['activation'][_0x244d42(0x203)]>0x0;if(!_0x4a9367&&!_0x25491c)return console['error']('No\x20traffic\x20data\x20available\x20for\x20journey:\x20'+_0x39dc08),console[_0x244d42(0x25c)](_0x244d42(0x17c)),_0x22fe52&&_0x400500&&console[_0x244d42(0x25c)](_0x244d42(0x269)),0x0;return await handleSingleObjectOutput(_0x598868,_0x510638),0x0;}}function formatStageStats(_0x1e7e67,_0x39fea9){const _0x281f82=a27_0x3a9c55,_0x30f6db=_0x39fea9[_0x281f82(0x1de)]&&_0x1e7e67['history']?.[_0x281f82(0x203)]?aggregateStageHistory(_0x1e7e67[_0x281f82(0x23f)]):{'size':_0x1e7e67[_0x281f82(0x1bf)],'entered':_0x1e7e67[_0x281f82(0x231)],'milestone':_0x1e7e67[_0x281f82(0x257)],'milestone_rate':_0x1e7e67[_0x281f82(0x1b9)],'exit_or_jump':_0x1e7e67['exitOrJumpSize'],'exit_or_jump_rate':_0x1e7e67['exitOrJumpRate']},_0x337fa9={'id':_0x1e7e67['id'],'name':_0x39fea9[_0x281f82(0x26f)]['get'](_0x1e7e67['id'])??_0x1e7e67['id'],..._0x30f6db};return _0x39fea9[_0x281f82(0x1de)]&&_0x39fea9[_0x281f82(0x248)]&&_0x1e7e67['history']&&(_0x337fa9[_0x281f82(0x23f)]=_0x1e7e67[_0x281f82(0x23f)]),_0x337fa9;}export class JourneyPauseCommand extends BaseCommand{['name']=a27_0x3a9c55(0x229);[a27_0x3a9c55(0x1a7)]='Pause\x20a\x20running\x20journey';async[a27_0x3a9c55(0x255)](_0x54b5aa){const _0x49fb06=a27_0x3a9c55,{options:_0x65dcba,args:_0x201080,tdx:_0x26a3b5}=_0x54b5aa,_0x38dced=_0x201080[0x0];if(!requireNameOrPath(_0x38dced))return 0x1;_0x65dcba[_0x49fb06(0x161)]&&console[_0x49fb06(0x25c)](_0x49fb06(0x200)+_0x38dced);const {journeyId:_0x47fbb8,journeyName:_0x328328}=await resolveJourneyIdFromInput(_0x38dced,_0x65dcba,_0x26a3b5);if(!_0x65dcba['yes']){const _0x5264a2=await confirm(_0x49fb06(0x214)+_0x328328+'\x22?');if(!_0x5264a2)return console['error'](_0x49fb06(0x217)),0x0;}const _0x149e1=await withSpinner('Pausing\x20journey...',()=>_0x26a3b5[_0x49fb06(0x1c0)][_0x49fb06(0x173)](_0x47fbb8),{'verbose':_0x65dcba[_0x49fb06(0x161)]}),_0x435203=_0x149e1['data'];return console['error']('✔\x20Journey\x20\x22'+_0x435203[_0x49fb06(0x238)]['name']+_0x49fb06(0x209)),0x0;}}export class JourneyRunCommand extends BaseCommand{['name']=a27_0x3a9c55(0x19f);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x187);async[a27_0x3a9c55(0x255)](_0x2e5f00){const _0x5c1f2e=a27_0x3a9c55,{options:_0x1eed8b,args:_0x5b13c6,tdx:_0x1f0cf3}=_0x2e5f00,_0x1afb97=_0x5b13c6[0x0];if(!requireNameOrPath(_0x1afb97))return 0x1;_0x1eed8b[_0x5c1f2e(0x161)]&&console[_0x5c1f2e(0x25c)](_0x5c1f2e(0x200)+_0x1afb97);const {journeyId:_0x1dcda6,journeyName:_0x5a54c5}=await resolveJourneyIdFromInput(_0x1afb97,_0x1eed8b,_0x1f0cf3);if(_0x1eed8b['dryRun'])return await this[_0x5c1f2e(0x266)](_0x2e5f00,_0x1dcda6,_0x5a54c5);if(!_0x1eed8b[_0x5c1f2e(0x25b)]){const _0x3aa165=await confirm('Trigger\x20on-demand\x20workflow\x20execution\x20for\x20journey\x20\x22'+_0x5a54c5+'\x22?');if(!_0x3aa165)return console[_0x5c1f2e(0x25c)](_0x5c1f2e(0x217)),0x0;}const _0x11279e=await withSpinner(_0x5c1f2e(0x232),()=>_0x1f0cf3[_0x5c1f2e(0x1c0)]['run'](_0x1dcda6),{'verbose':_0x1eed8b[_0x5c1f2e(0x161)]}),_0xcf5ad3=_0x11279e[_0x5c1f2e(0x1b4)],_0x427fef=getWorkflowSessionUrl(_0x1eed8b['site'],_0xcf5ad3[_0x5c1f2e(0x1ca)],_0xcf5ad3['workflowSessionId']);return console[_0x5c1f2e(0x25c)]('\x0a'+a27_0x815bcd['green']('✔')+_0x5c1f2e(0x204)),console[_0x5c1f2e(0x25c)]('\x20\x20'+a27_0x815bcd[_0x5c1f2e(0x1bd)](_0x5c1f2e(0x1eb))+'\x20'+_0x5a54c5),console[_0x5c1f2e(0x25c)]('\x20\x20'+a27_0x815bcd['dim'](_0x5c1f2e(0x1ce))+'\x20'+_0xcf5ad3[_0x5c1f2e(0x1e7)]),console[_0x5c1f2e(0x25c)]('\x20\x20'+a27_0x815bcd[_0x5c1f2e(0x1bd)](_0x5c1f2e(0x224))+'\x20'+_0xcf5ad3['workflowSessionId']),console[_0x5c1f2e(0x25c)]('\x20\x20'+_0x427fef),0x0;}async[a27_0x3a9c55(0x266)](_0x48dcd8,_0x19e3df,_0xb94376){const _0x46cc58=a27_0x3a9c55,{options:_0x11c44a,tdx:_0x4eb75d}=_0x48dcd8,_0x113e46=await withSpinner(_0x46cc58(0x243)+_0xb94376+'...',()=>Promise[_0x46cc58(0x235)]([_0x4eb75d[_0x46cc58(0x1c0)][_0x46cc58(0x16c)](_0x19e3df),_0x4eb75d[_0x46cc58(0x1c0)][_0x46cc58(0x16e)](_0x19e3df)]),{'verbose':_0x11c44a[_0x46cc58(0x161)]}),[_0x4a7e13,_0x53561a]=_0x113e46[_0x46cc58(0x1b4)],_0x16b13f=_0x4a7e13[_0x46cc58(0x238)],_0x1939e7=_0x16b13f['journeyStages'];console[_0x46cc58(0x253)](a27_0x815bcd[_0x46cc58(0x218)](_0x46cc58(0x1eb)),_0x16b13f[_0x46cc58(0x23b)]),console[_0x46cc58(0x253)](a27_0x815bcd[_0x46cc58(0x218)](_0x46cc58(0x234)),_0x4a7e13['id']),console[_0x46cc58(0x253)](a27_0x815bcd[_0x46cc58(0x218)](_0x46cc58(0x1fa)),_0x16b13f['state']),console[_0x46cc58(0x253)](a27_0x815bcd[_0x46cc58(0x218)](_0x46cc58(0x15e)),_0x16b13f[_0x46cc58(0x17e)]?a27_0x815bcd['yellow'](_0x46cc58(0x25b)):a27_0x815bcd[_0x46cc58(0x17d)]('no')),console['log'](a27_0x815bcd['bold'](_0x46cc58(0x1b8)),_0x16b13f[_0x46cc58(0x1e4)]);const _0x4ac01c=_0x1939e7[_0x46cc58(0x203)]>0x0?'\x20('+_0x1939e7[_0x46cc58(0x15c)](_0x4e84cb=>_0x4e84cb[_0x46cc58(0x23b)])['join'](',\x20')+')':'';console['log'](a27_0x815bcd[_0x46cc58(0x218)](_0x46cc58(0x1a8)),''+_0x1939e7['length']+_0x4ac01c),console['log']('');if(_0x53561a[_0x46cc58(0x203)]===0x0)console[_0x46cc58(0x253)](a27_0x815bcd[_0x46cc58(0x218)](_0x46cc58(0x160)),a27_0x815bcd[_0x46cc58(0x1bd)](_0x46cc58(0x198)));else{console[_0x46cc58(0x253)](a27_0x815bcd['bold']('Activations:'));for(const _0x8244ab of _0x53561a){const _0x753a55=_0x8244ab[_0x46cc58(0x23b)]??_0x46cc58(0x1e8),_0x4b6787=_0x8244ab['connectionId']!=null?_0x46cc58(0x226)+_0x8244ab['connectionId']:_0x46cc58(0x1f9),_0x18d42a=_0x8244ab['scheduleType']?''+_0x8244ab['scheduleType']+(_0x8244ab[_0x46cc58(0x1f8)]?'\x20@\x20'+_0x8244ab[_0x46cc58(0x1f8)]:''):_0x46cc58(0x1f5),_0x14808a=_0x8244ab['runAfterJourneyRefresh']?_0x46cc58(0x1cd):'';console[_0x46cc58(0x253)]('\x20\x20'+a27_0x815bcd['yellow'](_0x46cc58(0x1bb))+'\x20'+_0x753a55+_0x46cc58(0x172)+_0x4b6787+',\x20schedule:\x20'+_0x18d42a+_0x14808a);}}return console[_0x46cc58(0x253)](a27_0x815bcd[_0x46cc58(0x1c5)](_0x46cc58(0x175))),0x0;}}export class JourneyResumeCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]='journey:resume';[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x27d);async[a27_0x3a9c55(0x255)](_0x4605e5){const _0x4d6b93=a27_0x3a9c55,{options:_0x10ed60,args:_0x1c7112,tdx:_0x268c4c}=_0x4605e5,_0x59e939=_0x1c7112[0x0];if(!requireNameOrPath(_0x59e939))return 0x1;_0x10ed60[_0x4d6b93(0x161)]&&console['error'](_0x4d6b93(0x200)+_0x59e939);const {journeyId:_0x4ba952,journeyName:_0x3ce8ef}=await resolveJourneyIdFromInput(_0x59e939,_0x10ed60,_0x268c4c);if(_0x10ed60[_0x4d6b93(0x1ac)])return await this[_0x4d6b93(0x266)](_0x4605e5,_0x4ba952,_0x3ce8ef);if(!_0x10ed60[_0x4d6b93(0x25b)]){const _0x4fd028=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22'+_0x3ce8ef+'\x22?');if(!_0x4fd028)return console[_0x4d6b93(0x25c)]('Cancelled'),0x0;}const _0x4bd7b7=await withSpinner(_0x4d6b93(0x26b),()=>_0x268c4c[_0x4d6b93(0x1c0)]['resume'](_0x4ba952),{'verbose':_0x10ed60['verbose']}),_0x47190e=_0x4bd7b7[_0x4d6b93(0x1b4)];return console['error'](_0x4d6b93(0x162)+_0x47190e[_0x4d6b93(0x238)]['name']+'\x22\x20resumed'),0x0;}async[a27_0x3a9c55(0x266)](_0x50f963,_0x4e7727,_0x4cb6c4){const _0x1b5eb0=a27_0x3a9c55,{options:_0x8fc5ae,tdx:_0x493382}=_0x50f963,_0x938800=await withSpinner(_0x1b5eb0(0x243)+_0x4cb6c4+'...',()=>Promise[_0x1b5eb0(0x235)]([_0x493382['journey'][_0x1b5eb0(0x16c)](_0x4e7727),_0x493382[_0x1b5eb0(0x1c0)][_0x1b5eb0(0x16e)](_0x4e7727)]),{'verbose':_0x8fc5ae[_0x1b5eb0(0x161)]}),[_0x345044,_0x4da702]=_0x938800[_0x1b5eb0(0x1b4)],_0x20d745=_0x345044[_0x1b5eb0(0x238)],_0x3aa0dd=_0x20d745[_0x1b5eb0(0x22c)];console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x1eb)),_0x20d745['name']),console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x234)),_0x345044['id']),console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x1fa)),_0x20d745[_0x1b5eb0(0x197)]),console['log'](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x15e)),_0x20d745[_0x1b5eb0(0x17e)]?a27_0x815bcd[_0x1b5eb0(0x1c5)](_0x1b5eb0(0x25b)):a27_0x815bcd[_0x1b5eb0(0x17d)]('no'));_0x20d745[_0x1b5eb0(0x223)]&&console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x283)),_0x20d745['pausedAt']);console[_0x1b5eb0(0x253)](a27_0x815bcd['bold'](_0x1b5eb0(0x1b8)),_0x20d745[_0x1b5eb0(0x1e4)]);const _0x427729=_0x3aa0dd[_0x1b5eb0(0x203)]>0x0?'\x20('+_0x3aa0dd[_0x1b5eb0(0x15c)](_0x39408e=>_0x39408e['name'])['join'](',\x20')+')':'';console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)]('Stages:'),''+_0x3aa0dd[_0x1b5eb0(0x203)]+_0x427729),console[_0x1b5eb0(0x253)]('');if(_0x4da702[_0x1b5eb0(0x203)]===0x0)console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x160)),a27_0x815bcd[_0x1b5eb0(0x1bd)](_0x1b5eb0(0x198)));else{console[_0x1b5eb0(0x253)](a27_0x815bcd[_0x1b5eb0(0x218)](_0x1b5eb0(0x160)));for(const _0x3e1e5e of _0x4da702){const _0x51015b=_0x3e1e5e[_0x1b5eb0(0x23b)]??_0x1b5eb0(0x1e8),_0x420cf2=_0x3e1e5e[_0x1b5eb0(0x165)]!=null?_0x1b5eb0(0x226)+_0x3e1e5e['connectionId']:_0x1b5eb0(0x1f9),_0x981ba5=_0x3e1e5e[_0x1b5eb0(0x18e)]?''+_0x3e1e5e['scheduleType']+(_0x3e1e5e[_0x1b5eb0(0x1f8)]?_0x1b5eb0(0x1c1)+_0x3e1e5e['runAt']:''):_0x1b5eb0(0x1f5),_0x2ed848=_0x3e1e5e[_0x1b5eb0(0x1d8)]?_0x1b5eb0(0x1cd):'';console['log']('\x20\x20'+a27_0x815bcd['yellow']('⚠️\x20')+'\x20'+_0x51015b+'\x20\x20←\x20'+_0x420cf2+',\x20schedule:\x20'+_0x981ba5+_0x2ed848);}}return console['log'](a27_0x815bcd[_0x1b5eb0(0x1c5)](_0x1b5eb0(0x206))),0x0;}}export class JourneyPullCommand extends BaseCommand{['name']=a27_0x3a9c55(0x245);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x236);async[a27_0x3a9c55(0x255)](_0x47b8ef){const _0x43cbc4=a27_0x3a9c55,{options:_0x2b21df,args:_0xc6b131,tdx:_0x5ece17}=_0x47b8ef,_0x5dbacb=_0x2b21df,_0x5c147f=_0xc6b131[0x0],_0x5bc882=_0x5c147f&&isYamlFilePath(_0x5c147f),_0x143e6f=await resolveTarget({'arg':_0x5bc882?_0x5c147f:undefined,'contextParent':_0x2b21df[_0x43cbc4(0x185)],'cwd':process[_0x43cbc4(0x190)]()});if(!isSuccessfulResolution(_0x143e6f))return _0x143e6f[_0x43cbc4(0x159)]===_0x43cbc4(0x1b2)?(console[_0x43cbc4(0x25c)](a27_0x815bcd['yellow'](_0x43cbc4(0x21f))),console[_0x43cbc4(0x25c)](_0x43cbc4(0x205)),console[_0x43cbc4(0x25c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file'),console['error'](_0x43cbc4(0x1b7))):(console['error'](a27_0x815bcd[_0x43cbc4(0x26e)](_0x43cbc4(0x1a2)+_0x143e6f[_0x43cbc4(0x1f1)]+'\x0a')),_0x143e6f[_0x43cbc4(0x282)]&&console['error'](a27_0x815bcd[_0x43cbc4(0x19c)](_0x143e6f[_0x43cbc4(0x282)]))),0x1;let _0x4f59b8=_0x5bc882?undefined:_0x5c147f,_0x472e91,_0x1260c9;_0x143e6f['type']===_0x43cbc4(0x1ab)&&(_0x4f59b8=_0x143e6f['resourceName'],_0x472e91=_0x143e6f['filePath'],_0x1260c9=_0x143e6f[_0x43cbc4(0x1c2)]);const _0x5d1dfb=_0x143e6f['parentName'],_0x3ae8e7=_0x143e6f['targetDir'];_0x5dbacb[_0x43cbc4(0x161)]&&(console[_0x43cbc4(0x25c)](_0x43cbc4(0x251)+_0x5d1dfb),console[_0x43cbc4(0x25c)](_0x43cbc4(0x261)+_0x3ae8e7),_0x4f59b8&&console['error']('Journey\x20name:\x20'+_0x4f59b8),_0x472e91&&console[_0x43cbc4(0x25c)](_0x43cbc4(0x1e5)+_0x472e91),_0x1260c9&&console['error'](_0x43cbc4(0x25e)+_0x1260c9));const _0x49ab25=await withSpinner(_0x43cbc4(0x241),()=>_0x5ece17[_0x43cbc4(0x1d4)][_0x43cbc4(0x228)](_0x5d1dfb),{'verbose':_0x2b21df[_0x43cbc4(0x161)]}),_0x565654=_0x49ab25['data'],{journeys:_0x48972c,folders:_0x33fe68}=await withSpinner(_0x43cbc4(0x270),async()=>{const _0x501d67=_0x43cbc4,[_0x59ea05,_0x8a512d]=await Promise[_0x501d67(0x235)]([_0x5ece17[_0x501d67(0x1c0)][_0x501d67(0x201)](_0x565654,undefined,{'includeAllVersions':!![]}),_0x5ece17['segment'][_0x501d67(0x26c)](_0x565654)]);return{'journeys':_0x59ea05,'folders':_0x8a512d};},{'verbose':_0x2b21df[_0x43cbc4(0x161)]})[_0x43cbc4(0x212)](_0x39fd80=>_0x39fd80[_0x43cbc4(0x1b4)]);let _0xf4d1ea=_0x48972c;const _0x38be97=buildFolderIdToPathMap(_0x33fe68);if(_0x4f59b8){const _0x5719a1=_0xf4d1ea['filter'](_0x4aaeae=>_0x4aaeae[_0x43cbc4(0x288)][_0x43cbc4(0x219)]()===_0x4f59b8[_0x43cbc4(0x219)]());if(_0x5719a1['length']===0x0)return console[_0x43cbc4(0x25c)](_0x43cbc4(0x247)+_0x4f59b8),console[_0x43cbc4(0x25c)]('Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'),0x1;_0xf4d1ea=_0x5719a1;}if(_0x1260c9!==undefined){const _0x47cfed=_0xf4d1ea[_0x43cbc4(0x1c6)](_0x35f3af=>{const _0x587019=_0x43cbc4,_0x120316=_0x35f3af[_0x587019(0x275)]?_0x38be97['get'](_0x35f3af['folderId'])||'':'';return _0x120316===_0x1260c9;});if(_0x47cfed[_0x43cbc4(0x203)]===0x0&&_0xf4d1ea[_0x43cbc4(0x203)]>0x0){console['error']('Error:\x20Journey\x20\x27'+_0x4f59b8+'\x27\x20not\x20found\x20in\x20'+(_0x1260c9||_0x43cbc4(0x239))),console[_0x43cbc4(0x25c)](_0x43cbc4(0x286));for(const _0x4f27e6 of _0xf4d1ea){const _0x1365ef=_0x4f27e6[_0x43cbc4(0x275)]?_0x38be97[_0x43cbc4(0x186)](_0x4f27e6[_0x43cbc4(0x275)])||'':'';console[_0x43cbc4(0x25c)](_0x43cbc4(0x227)+(_0x1365ef||_0x43cbc4(0x18d))+'/'+_0x4f27e6[_0x43cbc4(0x288)]);}return 0x1;}_0xf4d1ea=_0x47cfed;}if(_0xf4d1ea[_0x43cbc4(0x203)]===0x0)return console['error'](_0x43cbc4(0x258)),0x0;const _0xb697c2=new Map();for(const _0x3dacde of _0xf4d1ea){const _0x533c7a=_0x3dacde['journeyBundleId'];!_0xb697c2['has'](_0x533c7a)&&_0xb697c2[_0x43cbc4(0x259)](_0x533c7a,[]),_0xb697c2['get'](_0x533c7a)[_0x43cbc4(0x18c)](_0x3dacde);}for(const _0x11afb4 of _0xb697c2[_0x43cbc4(0x24c)]()){_0x11afb4[_0x43cbc4(0x1ae)]((_0x3ac33d,_0x32f060)=>(_0x3ac33d['versionNumber']||0x0)-(_0x32f060[_0x43cbc4(0x1b3)]||0x0));}const _0x2f4c55=[],{idToEmailMap:_0x471ec7,connectionIdToNameMap:_0x4c48fa}=await withSpinner(_0x43cbc4(0x1fc),async()=>{const _0x4fc16a=_0x43cbc4,[_0x2544cf,_0x498051]=await Promise[_0x4fc16a(0x235)]([_0x5ece17[_0x4fc16a(0x281)]['buildIdToEmailMap'](),_0x5ece17['connection'][_0x4fc16a(0x20b)]()]);return{'idToEmailMap':_0x2544cf,'connectionIdToNameMap':_0x498051};},{'verbose':_0x2b21df[_0x43cbc4(0x161)]})[_0x43cbc4(0x212)](_0x519556=>_0x519556['data']);for(const _0x3fa3ba of _0xb697c2['values']()){const _0x577711=_0x3fa3ba[0x0][_0x43cbc4(0x288)],_0x1640ba=_0x3fa3ba[0x0][_0x43cbc4(0x275)],_0x2c5e44=_0x1640ba?_0x38be97[_0x43cbc4(0x186)](_0x1640ba)||'':'',_0x2bceed=_0x2c5e44?a27_0x27ac3f[_0x43cbc4(0x164)](_0x3ae8e7,_0x2c5e44):_0x3ae8e7,_0x302b0e=_0x472e91||a27_0x27ac3f['join'](_0x2bceed,sanitizeFileName(_0x577711)+_0x43cbc4(0x27b));let _0x454375,_0x1edb00;if(existsSync(_0x302b0e))try{const _0x332e74=readFileSync(_0x302b0e,_0x43cbc4(0x21e)),_0x51f6b4=parseYamlString(_0x332e74);_0x1edb00=_0x51f6b4,_0x454375=buildRuleToNameMapping(_0x51f6b4),_0x5dbacb[_0x43cbc4(0x161)]&&_0x454375['size']>0x0&&console[_0x43cbc4(0x25c)]('Found\x20'+_0x454375['size']+'\x20segment\x20rule(s)\x20to\x20match\x20for\x20'+_0x577711);}catch(_0x156fb8){_0x5dbacb[_0x43cbc4(0x161)]&&console[_0x43cbc4(0x25c)]('Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20'+_0x156fb8[_0x43cbc4(0x1f1)]);}const _0x1d28a2=[],_0x326567=new Set(),_0x202c01=new Map(),_0x47270a=new Map(),_0x4769dd=new Set(),_0x3b234b=new Map(),_0xdbc84a=new Map(),_0x1321cc=createJumpTargetCache();await withProgressSpinner(_0x43cbc4(0x280)+_0x577711+_0x43cbc4(0x171),async _0x133b8a=>{const _0x3dbd94=_0x43cbc4;for(const _0x47efdd of _0x3fa3ba){const _0x48770a=_0x3fa3ba[_0x3dbd94(0x203)]>0x1?_0x47efdd['journeyBundleName']+'\x20v'+(_0x47efdd[_0x3dbd94(0x1b3)]||0x1):_0x47efdd[_0x3dbd94(0x288)];_0x133b8a[_0x3dbd94(0x267)]('Fetching\x20'+_0x48770a);const _0x1a10eb=await _0x5ece17[_0x3dbd94(0x1c0)][_0x3dbd94(0x16c)](_0x47efdd['id']),_0xc8fc28=_0x1a10eb[_0x3dbd94(0x238)]?.['audienceId'],_0x474405={'resolveSegment':async _0x2c3fdd=>{const _0x98415c=_0x3dbd94;if(!_0xc8fc28)return{'name':_0x2c3fdd,'isJourneyLocal':![]};const _0x281ec1=_0x202c01[_0x98415c(0x186)](_0x2c3fdd);if(_0x281ec1)return _0x281ec1;try{const _0x5bab36=await _0x5ece17[_0x98415c(0x1d4)]['getSegment'](_0xc8fc28,_0x2c3fdd),_0x47ce35=_0x5bab36[_0x98415c(0x1bc)]===SEGMENT_KIND_JOURNEY;let _0x1105c0,_0x4e2297=_0x5bab36[_0x98415c(0x23b)];if(_0x47ce35&&_0x5bab36[_0x98415c(0x177)]){const _0x3eb073=await segmentResponseToDef(_0x5bab36,{'resolveSegmentName':async _0xc1c1c0=>{const _0x381ccf=_0x98415c,_0x3bc222=_0x202c01[_0x381ccf(0x186)](_0xc1c1c0);if(_0x3bc222)return _0x3bc222[_0x381ccf(0x23b)];const _0x27166a=await _0x474405['resolveSegment'](_0xc1c1c0);return _0x27166a[_0x381ccf(0x23b)];}}),_0x1b94f5=_0x3eb073[_0x98415c(0x177)];_0x1105c0={'description':_0x5bab36[_0x98415c(0x1a7)],'rule':_0x1b94f5};const _0x48665a=serializeRule(_0x1b94f5),_0x18b1ac=_0x47270a[_0x98415c(0x186)](_0x48665a);if(_0x18b1ac)_0x4e2297=_0x18b1ac,_0x1105c0=undefined,_0x5dbacb[_0x98415c(0x161)]&&console[_0x98415c(0x25c)](_0x98415c(0x1ec)+_0x5bab36[_0x98415c(0x23b)]+_0x98415c(0x199)+_0x18b1ac);else{let _0x4ec137=![];if(_0x454375){const _0x2f37c5=_0x454375['get'](_0x48665a);if(_0x2f37c5){const _0x4102e0=_0x2f37c5[_0x98415c(0x263)](_0x10ba29=>!_0x326567[_0x98415c(0x1db)](_0x10ba29));_0x4102e0&&(_0x4e2297=_0x4102e0,_0x326567[_0x98415c(0x27e)](_0x4102e0),_0x47270a[_0x98415c(0x259)](_0x48665a,_0x4102e0),_0x4ec137=!![],_0x5dbacb['verbose']&&console[_0x98415c(0x25c)](_0x98415c(0x273)+_0x4102e0+_0x98415c(0x17a)));}}if(!_0x4ec137){const _0x31ca07=generateJourneyLocalName(_0x5bab36[_0x98415c(0x23b)]);_0x31ca07&&(_0x4e2297=_0x31ca07);let _0x2f8288=_0x4e2297,_0x5434c4=0x2;while(_0x326567[_0x98415c(0x1db)](_0x2f8288)){_0x2f8288=_0x4e2297+'_'+_0x5434c4,_0x5434c4++;}_0x326567['add'](_0x2f8288),_0x47270a[_0x98415c(0x259)](_0x48665a,_0x2f8288),_0x4e2297=_0x2f8288;}}}const _0x56a33d={'name':_0x4e2297,'isJourneyLocal':_0x47ce35,'definition':_0x1105c0};return _0x202c01[_0x98415c(0x259)](_0x2c3fdd,_0x56a33d),_0x56a33d;}catch(_0x3fad3a){return _0x2b21df[_0x98415c(0x161)]&&console['error'](_0x98415c(0x213)+_0x2c3fdd+':\x20'+_0x3fad3a[_0x98415c(0x1f1)]),{'name':_0x2c3fdd,'isJourneyLocal':![]};}},'resolveActivation':async _0x2a3d33=>{const _0x130c1e=_0x3dbd94,_0x49acd9=_0x3b234b[_0x130c1e(0x186)](_0x2a3d33);if(_0x49acd9)return _0x49acd9;try{const _0xd35191=await _0x5ece17[_0x130c1e(0x1c0)]['getActivation'](_0x47efdd['id'],_0x2a3d33),_0x316ed1=journeyActivationStepToYaml(_0xd35191,_0x471ec7,_0x4c48fa),_0x30781b=JSON[_0x130c1e(0x20e)]({'name':_0x316ed1['name'],'connection':_0x316ed1[_0x130c1e(0x225)],'connector_config':_0x316ed1[_0x130c1e(0x1e1)]}),_0x376129=_0xdbc84a[_0x130c1e(0x186)](_0x30781b);if(_0x376129){const _0xe0158d={'name':_0x376129,'isJourneyLocal':!![],'definition':_0x316ed1};return _0x3b234b[_0x130c1e(0x259)](_0x2a3d33,_0xe0158d),_0xe0158d;}const _0x33d82b=_0xd35191[_0x130c1e(0x238)][_0x130c1e(0x21c)][_0x130c1e(0x23b)]||_0x2a3d33,_0xe6c78a=sanitizeYamlKey(_0x33d82b)||'activation_'+_0x2a3d33;let _0x49e2fb=_0xe6c78a,_0x3d07d3=0x2;while(_0x4769dd[_0x130c1e(0x1db)](_0x49e2fb)){_0x49e2fb=_0xe6c78a+'_'+_0x3d07d3,_0x3d07d3++;}_0x4769dd[_0x130c1e(0x27e)](_0x49e2fb),_0xdbc84a[_0x130c1e(0x259)](_0x30781b,_0x49e2fb);const _0x18b925={'name':_0x49e2fb,'isJourneyLocal':!![],'definition':_0x316ed1};return _0x3b234b[_0x130c1e(0x259)](_0x2a3d33,_0x18b925),_0x18b925;}catch(_0x4b3a8f){return _0x2b21df[_0x130c1e(0x161)]&&console[_0x130c1e(0x25c)](_0x130c1e(0x24f)+_0x2a3d33+':\x20'+_0x4b3a8f[_0x130c1e(0x1f1)]),{'name':_0x2a3d33,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x24d3fb,_0x3ce9aa)=>{const _0x2315fb=_0x3dbd94;return resolveJumpTarget(_0x24d3fb,_0x3ce9aa,_0x1321cc,_0x1038ef=>_0x5ece17[_0x2315fb(0x1c0)]['getJourney'](_0x1038ef));}},_0x40ebc7=await journeyResponseToDef(_0x1a10eb,_0x474405);_0x1d28a2[_0x3dbd94(0x18c)]({'item':_0x47efdd,'yaml':_0x40ebc7});}},{'verbose':_0x2b21df[_0x43cbc4(0x161)]});const _0x1e5204=await _0x5ece17[_0x43cbc4(0x1c0)][_0x43cbc4(0x268)](_0x3fa3ba[0x0]['journeyBundleId']),_0x27e351=buildMergedJourneyDef(_0x1d28a2,_0x454375,_0x1e5204),_0x9cc3cc=normalizeJourneyDef(_0x27e351,_0x1edb00),_0x72d79=toYamlString(_0x9cc3cc),_0x5836e0=_0x472e91||a27_0x27ac3f[_0x43cbc4(0x164)](_0x2bceed,sanitizeFileName(_0x577711)+_0x43cbc4(0x27b));!_0x472e91&&_0x2c5e44&&!existsSync(_0x2bceed)&&mkdirSync(_0x2bceed,{'recursive':!![]});const _0xf2d04c=a27_0x27ac3f[_0x43cbc4(0x1df)](process['cwd'](),_0x5836e0);if(existsSync(_0x5836e0)){const _0xa74b63=readFileSync(_0x5836e0,_0x43cbc4(0x21e)),_0x4dc591=generateDiff(_0xa74b63,_0x72d79),_0x3f60ed=hasChanges(_0x4dc591);_0x2f4c55['push']({'relativePath':_0xf2d04c,'absolutePath':_0x5836e0,'content':_0x72d79,'isNew':![],'hasChanges':_0x3f60ed,'diff':_0x3f60ed?formatDiffWithColors(_0x4dc591):undefined});}else _0x2f4c55[_0x43cbc4(0x18c)]({'relativePath':_0xf2d04c,'absolutePath':_0x5836e0,'content':_0x72d79,'isNew':!![],'hasChanges':![]});}const _0x37fb28=_0x2f4c55[_0x43cbc4(0x1c6)](_0x2eca67=>_0x2eca67[_0x43cbc4(0x15d)]),_0x1b9539=_0x2f4c55[_0x43cbc4(0x1c6)](_0x34ef49=>!_0x34ef49['isNew']&&_0x34ef49[_0x43cbc4(0x180)]),_0x4a9b9e=_0x2f4c55[_0x43cbc4(0x1c6)](_0x448efa=>!_0x448efa['isNew']&&!_0x448efa['hasChanges']),_0x3aad1e=_0xf4d1ea[_0x43cbc4(0x203)],_0x434a73=_0xb697c2[_0x43cbc4(0x1bf)],_0x127a7c=_0x3aad1e>_0x434a73?'\x20('+_0x3aad1e+_0x43cbc4(0x274):'';console[_0x43cbc4(0x25c)](_0x43cbc4(0x1ef)),console[_0x43cbc4(0x25c)]('\x20\x20'+a27_0x815bcd['cyan'](_0x434a73+_0x43cbc4(0x278))+a27_0x815bcd[_0x43cbc4(0x1bd)](_0x127a7c)),console[_0x43cbc4(0x25c)]('\x20\x20'+a27_0x815bcd[_0x43cbc4(0x17d)]('+\x20'+_0x37fb28[_0x43cbc4(0x203)]+_0x43cbc4(0x15f))),console[_0x43cbc4(0x25c)]('\x20\x20'+a27_0x815bcd[_0x43cbc4(0x1c5)]('~\x20'+_0x1b9539[_0x43cbc4(0x203)]+_0x43cbc4(0x1d1))),console[_0x43cbc4(0x25c)]('\x20\x20'+a27_0x815bcd[_0x43cbc4(0x1bd)]('=\x20'+_0x4a9b9e['length']+_0x43cbc4(0x1c8))),console['error']('\x20\x20Target:\x20'+a27_0x815bcd['cyan'](_0x3ae8e7)+'\x0a');if(_0x1b9539['length']>0x0)for(const _0x32c417 of _0x1b9539){console[_0x43cbc4(0x25c)](_0x43cbc4(0x1e6)+_0x32c417[_0x43cbc4(0x1e3)]+'\x27:'),console['error']('─'[_0x43cbc4(0x24a)](0x3c)),console[_0x43cbc4(0x25c)](_0x32c417[_0x43cbc4(0x202)]),console['error']('─'[_0x43cbc4(0x24a)](0x3c));}if(_0x5dbacb['dryRun'])return console[_0x43cbc4(0x25c)](a27_0x815bcd[_0x43cbc4(0x1c5)](_0x43cbc4(0x1cf))),0x0;if(_0x37fb28['length']===0x0&&_0x1b9539[_0x43cbc4(0x203)]===0x0)return console[_0x43cbc4(0x25c)](a27_0x815bcd[_0x43cbc4(0x17d)](_0x43cbc4(0x1a0))),saveSessionContext({'parent_segment':_0x5d1dfb},_0x5dbacb[_0x43cbc4(0x18b)]),console[_0x43cbc4(0x25c)](a27_0x815bcd['green'](_0x43cbc4(0x22e)+a27_0x815bcd[_0x43cbc4(0x1bd)](_0x43cbc4(0x23a))+'\x20=\x20'+a27_0x815bcd[_0x43cbc4(0x19c)](_0x5d1dfb))),0x0;if(!_0x5dbacb[_0x43cbc4(0x25b)]&&(_0x37fb28[_0x43cbc4(0x203)]>0x0||_0x1b9539[_0x43cbc4(0x203)]>0x0)){if(!isInteractive())return console[_0x43cbc4(0x25c)](a27_0x815bcd[_0x43cbc4(0x26e)](_0x43cbc4(0x230)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x43cbc4(0x25c)](a27_0x815bcd[_0x43cbc4(0x1bd)](_0x43cbc4(0x256))),0x1;const _0x3b06f0=await confirmKey('Write\x20'+(_0x37fb28['length']+_0x1b9539[_0x43cbc4(0x203)])+'\x20files?');if(!_0x3b06f0)return console[_0x43cbc4(0x25c)](a27_0x815bcd[_0x43cbc4(0x1c5)](_0x43cbc4(0x193)),_0x43cbc4(0x23d)),0x1;}!existsSync(_0x3ae8e7)&&mkdirSync(_0x3ae8e7,{'recursive':!![]});const _0x827a7d=a27_0x27ac3f[_0x43cbc4(0x164)](_0x3ae8e7,_0x43cbc4(0x174));writeFileSync(_0x827a7d,createTdxConfigContent(_0x5d1dfb),_0x43cbc4(0x21e));for(const _0x37fcca of _0x2f4c55){(_0x37fcca['isNew']||_0x37fcca[_0x43cbc4(0x180)])&&writeFileSync(_0x37fcca[_0x43cbc4(0x279)],_0x37fcca[_0x43cbc4(0x285)],_0x43cbc4(0x21e));}return console[_0x43cbc4(0x25c)](a27_0x815bcd['green']('✔\x20Pulled\x20'+(_0x37fb28[_0x43cbc4(0x203)]+_0x1b9539[_0x43cbc4(0x203)])+_0x43cbc4(0x25a)+_0x3ae8e7)),saveSessionContext({'parent_segment':_0x5d1dfb},_0x5dbacb['session']),console[_0x43cbc4(0x25c)](a27_0x815bcd['green'](_0x43cbc4(0x22e)+a27_0x815bcd[_0x43cbc4(0x1bd)](_0x43cbc4(0x23a))+'\x20=\x20'+a27_0x815bcd[_0x43cbc4(0x19c)](_0x5d1dfb))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x1f7);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x22d);async[a27_0x3a9c55(0x255)](_0x5233c8){const _0x28d62e=a27_0x3a9c55,{options:_0x2bbbad,args:_0x21b05d,tdx:_0x3a1edf}=_0x5233c8,_0x3d4c4f=_0x21b05d[0x0];if(!requireNameOrPath(_0x3d4c4f))return 0x1;_0x2bbbad['verbose']&&console[_0x28d62e(0x25c)]('Input:\x20'+_0x3d4c4f);const {journeyId:_0x6be978}=await resolveJourneyIdFromInput(_0x3d4c4f,_0x2bbbad,_0x3a1edf),_0x6129e8=await withSpinner(_0x28d62e(0x1cc),()=>_0x3a1edf[_0x28d62e(0x1c0)][_0x28d62e(0x26d)](_0x6be978),{'verbose':_0x2bbbad[_0x28d62e(0x161)]}),_0x13fc34=_0x6129e8[_0x28d62e(0x1b4)];return console['log'](_0x28d62e(0x1d5)+_0x13fc34[_0x28d62e(0x1b6)]),console['log']('Table:\x20'+_0x13fc34[_0x28d62e(0x183)]),await handleSDKOutput(_0x13fc34[_0x28d62e(0x233)],_0x2bbbad),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x222);['description']=a27_0x3a9c55(0x16a);async[a27_0x3a9c55(0x255)](_0xbb2a71){const _0x48e19d=a27_0x3a9c55,{options:_0x29cdc1,args:_0x24beac,tdx:_0x3f96f3}=_0xbb2a71,_0x32945e=_0x24beac[0x0];if(!requireNameOrPath(_0x32945e))return 0x1;_0x29cdc1['verbose']&&console[_0x48e19d(0x25c)]('Input:\x20'+_0x32945e);const {journeyId:_0x582a7a}=await resolveJourneyIdFromInput(_0x32945e,_0x29cdc1,_0x3f96f3),_0x4f41cc=await withSpinner('Listing\x20journey\x20activations...',()=>_0x3f96f3[_0x48e19d(0x1c0)]['listActivationsFlat'](_0x582a7a),{'verbose':_0x29cdc1['verbose']}),_0x54e120=_0x4f41cc['data'];return console[_0x48e19d(0x25c)](_0x48e19d(0x207)+_0x54e120[_0x48e19d(0x203)]+'\x20activation'+(_0x54e120['length']!==0x1?'s':'')),await handleSDKOutput(_0x54e120,_0x29cdc1),0x0;}}export class JourneyPushCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x242);['description']=a27_0x3a9c55(0x15a);[a27_0x3a9c55(0x284)]=new SegmentPushCommand();async['execute'](_0x4749fb){const _0x1aa8cb=a27_0x3a9c55,_0x50b733=_0x4749fb[_0x1aa8cb(0x170)][0x0];let _0x141ed7;if(_0x50b733){const _0x5600d6=await resolveTarget({'arg':_0x50b733,'contextParent':_0x4749fb[_0x1aa8cb(0x15b)][_0x1aa8cb(0x185)],'cwd':process[_0x1aa8cb(0x190)]()});isSuccessfulResolution(_0x5600d6)&&_0x5600d6[_0x1aa8cb(0x1b5)]===_0x1aa8cb(0x1ab)&&(_0x141ed7=_0x5600d6[_0x1aa8cb(0x277)]);}const _0x5e5de0={..._0x4749fb,'options':{..._0x4749fb[_0x1aa8cb(0x15b)],'journeysOnly':!![],..._0x141ed7&&{'singleFilePath':_0x141ed7}}};return this['segmentPushCommand']['execute'](_0x5e5de0);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x208);[a27_0x3a9c55(0x1a7)]=a27_0x3a9c55(0x1c3);async[a27_0x3a9c55(0x255)](_0x2e6ccf){const _0x25f6a4=a27_0x3a9c55,{options:_0x4ad0a1,args:_0x396edf,tdx:_0x5746c1}=_0x2e6ccf,_0x245bae=_0x396edf[0x0];if(!requireNameOrPath(_0x245bae))return 0x1;if(_0x4ad0a1[_0x25f6a4(0x161)])console[_0x25f6a4(0x25c)]('Input:\x20'+_0x245bae);const {journeyId:_0x344275}=await resolveJourneyIdFromInput(_0x245bae,_0x4ad0a1,_0x5746c1),_0xba4d39=await withSpinner('Listing\x20journey\x20versions...',()=>_0x5746c1['journey'][_0x25f6a4(0x25f)](_0x344275),{'verbose':_0x4ad0a1['verbose']}),{bundleName:_0x444f2e,versions:_0x5c2370,latestJourneyId:_0x44486b}=_0xba4d39[_0x25f6a4(0x1b4)];console[_0x25f6a4(0x25c)](_0x444f2e+':\x20'+_0x5c2370['length']+_0x25f6a4(0x264)+(_0x5c2370['length']!==0x1?'s':''));const _0x78e33d=_0x5c2370[_0x25f6a4(0x15c)](_0x19d2ef=>({'version':_0x19d2ef[_0x25f6a4(0x1b3)],'journey_id':_0x19d2ef[_0x25f6a4(0x1e2)],'name':_0x19d2ef[_0x25f6a4(0x23b)],'state':_0x19d2ef['state'],'paused':_0x19d2ef['paused'],'latest':_0x19d2ef[_0x25f6a4(0x1e2)]===_0x44486b,'created_at':_0x19d2ef[_0x25f6a4(0x176)]}));return await handleSDKOutput(_0x78e33d,_0x4ad0a1),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{[a27_0x3a9c55(0x23b)]=a27_0x3a9c55(0x19b);['description']=a27_0x3a9c55(0x289);async[a27_0x3a9c55(0x255)](_0x57da23){const _0x21052c=a27_0x3a9c55,{options:_0x3761dd,args:_0x388dba,tdx:_0x1b9909}=_0x57da23,_0x26b376=_0x388dba[0x0];if(!requireNameOrPath(_0x26b376))return 0x1;if(_0x3761dd[_0x21052c(0x161)])console[_0x21052c(0x25c)](_0x21052c(0x200)+_0x26b376);const {journeyId:_0x3a0eba,journeyName:_0x2d6583}=await resolveJourneyIdFromInput(_0x26b376,_0x3761dd,_0x1b9909);if(!_0x3761dd[_0x21052c(0x25b)]){const _0x226249=await confirm(_0x21052c(0x16d)+_0x2d6583+'\x22?');if(!_0x226249)return console[_0x21052c(0x25c)](_0x21052c(0x217)),0x0;}const _0x3a0f80=await withSpinner(_0x21052c(0x163),()=>_0x1b9909[_0x21052c(0x1c0)][_0x21052c(0x21d)](_0x3a0eba),{'verbose':_0x3761dd['verbose']}),_0x198d9d=_0x3a0f80[_0x21052c(0x1b4)];return console[_0x21052c(0x25c)](a27_0x815bcd[_0x21052c(0x17d)]('✔')+_0x21052c(0x1ed)+_0x198d9d['attributes'][_0x21052c(0x1b3)]+_0x21052c(0x27a)+_0x198d9d['attributes'][_0x21052c(0x23b)]+'\x22'),console['error']('\x20\x20Journey\x20ID:\x20'+_0x198d9d['id']),await handleSingleObjectOutput({'id':_0x198d9d['id'],'name':_0x198d9d[_0x21052c(0x238)][_0x21052c(0x23b)],'version':_0x198d9d['attributes'][_0x21052c(0x1b3)],'state':_0x198d9d[_0x21052c(0x238)][_0x21052c(0x197)],'bundle_id':_0x198d9d[_0x21052c(0x238)][_0x21052c(0x1c9)],'created_at':_0x198d9d['attributes'][_0x21052c(0x176)]},_0x3761dd),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{['name']=a27_0x3a9c55(0x195);['description']='View\x20a\x20specific\x20version\x20of\x20a\x20journey';async[a27_0x3a9c55(0x255)](_0x32e9a3){const _0x2dc545=a27_0x3a9c55,{options:_0x50d8db,args:_0x5ab2fd,tdx:_0x270c33}=_0x32e9a3,_0x53d461=_0x5ab2fd[0x0];if(!requireNameOrPath(_0x53d461))return 0x1;const _0x6067cf=_0x50d8db[_0x2dc545(0x19d)];if(!_0x6067cf)return console[_0x2dc545(0x25c)](_0x2dc545(0x24e)),console[_0x2dc545(0x25c)](_0x2dc545(0x182)),0x1;const _0x419c31=parseInt(_0x6067cf,0xa);if(isNaN(_0x419c31)||_0x419c31<0x1)return console[_0x2dc545(0x25c)](_0x2dc545(0x17f)+_0x6067cf),0x1;if(_0x50d8db['verbose'])console['error'](_0x2dc545(0x200)+_0x53d461+_0x2dc545(0x271)+_0x419c31);const {journeyId:_0x6702eb,parentSegmentId:_0xbaea48}=await resolveJourneyIdFromInput(_0x53d461,_0x50d8db,_0x270c33),_0x467ee4=await withSpinner('Resolving\x20version...',()=>_0x270c33[_0x2dc545(0x1c0)][_0x2dc545(0x25f)](_0x6702eb),{'verbose':_0x50d8db[_0x2dc545(0x161)]}),{versions:_0x19ac81,latestJourneyId:_0x5bc090}=_0x467ee4[_0x2dc545(0x1b4)],_0x532ec1=_0x19ac81[_0x2dc545(0x263)](_0x5f1e98=>_0x5f1e98[_0x2dc545(0x1b3)]===_0x419c31);if(!_0x532ec1){const _0x11124c=_0x19ac81[_0x2dc545(0x15c)](_0x5989d=>'v'+_0x5989d['versionNumber'])[_0x2dc545(0x164)](',\x20');return console[_0x2dc545(0x25c)](_0x2dc545(0x1b0)+_0x419c31+_0x2dc545(0x262)+_0x11124c),0x1;}const _0x2983dd=await withSpinner(_0x2dc545(0x181)+_0x419c31+_0x2dc545(0x18a),()=>_0x270c33[_0x2dc545(0x1c0)][_0x2dc545(0x16c)](_0x532ec1[_0x2dc545(0x1e2)]),{'verbose':_0x50d8db[_0x2dc545(0x161)]}),_0x45e459=_0x2983dd[_0x2dc545(0x1b4)],_0x427fd6=getConsoleNextUrl(_0x50d8db['site'],_0x2dc545(0x1d6)+_0xbaea48+_0x2dc545(0x1ee)+_0x532ec1[_0x2dc545(0x1e2)]+'/j/da/je');return await handleSingleObjectOutput({'id':_0x45e459['id'],'name':_0x45e459['attributes'][_0x2dc545(0x23b)],'version':_0x45e459[_0x2dc545(0x238)][_0x2dc545(0x1b3)],'description':_0x45e459['attributes'][_0x2dc545(0x1a7)],'state':_0x45e459['attributes'][_0x2dc545(0x197)],'paused':_0x45e459[_0x2dc545(0x238)][_0x2dc545(0x17e)],'reentry_mode':_0x45e459['attributes'][_0x2dc545(0x1dc)],'stages':_0x45e459[_0x2dc545(0x238)][_0x2dc545(0x22c)]?.['length']||0x0,..._0x45e459[_0x2dc545(0x238)][_0x2dc545(0x1e0)]&&{'goal':_0x45e459['attributes'][_0x2dc545(0x1e0)][_0x2dc545(0x23b)]},'latest':_0x532ec1[_0x2dc545(0x1e2)]===_0x5bc090,'created_at':_0x45e459[_0x2dc545(0x238)]['createdAt'],'updated_at':_0x45e459['attributes'][_0x2dc545(0x1a9)],'url':_0x427fd6},_0x50d8db),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x4284e8=a28_0x7813;(function(_0x537dcc,_0x1fa296){const _0x2c091d=a28_0x7813,_0xb0d7a9=_0x537dcc();while(!![]){try{const _0x49f3c=-parseInt(_0x2c091d(0x13f))/0x1+-parseInt(_0x2c091d(0x134))/0x2*(-parseInt(_0x2c091d(0x15b))/0x3)+-parseInt(_0x2c091d(0x15d))/0x4+parseInt(_0x2c091d(0x13d))/0x5*(-parseInt(_0x2c091d(0x146))/0x6)+-parseInt(_0x2c091d(0x143))/0x7+parseInt(_0x2c091d(0x12d))/0x8*(parseInt(_0x2c091d(0x152))/0x9)+parseInt(_0x2c091d(0x144))/0xa;if(_0x49f3c===_0x1fa296)break;else _0xb0d7a9['push'](_0xb0d7a9['shift']());}catch(_0xdb3ba3){_0xb0d7a9['push'](_0xb0d7a9['shift']());}}}(a28_0x325c,0xd1d60));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a28_0x4c48bf from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a28_0x7813(_0x5e79cc,_0x491695){_0x5e79cc=_0x5e79cc-0x12c;const _0x325ce9=a28_0x325c();let _0x781311=_0x325ce9[_0x5e79cc];return _0x781311;}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class JourneyValidateCommand extends BaseCommand{['name']=a28_0x4284e8(0x153);[a28_0x4284e8(0x12f)]=a28_0x4284e8(0x15c);async['execute'](_0x366528){const _0x4e1ad8=a28_0x4284e8,{options:_0x1f66bb,args:_0x591da7}=_0x366528,_0x49d3b0=_0x1f66bb,_0x24a7d7=await resolveTarget({'arg':_0x591da7[0x0],'contextParent':_0x1f66bb[_0x4e1ad8(0x13b)],'cwd':process[_0x4e1ad8(0x151)]()});if(!isSuccessfulResolution(_0x24a7d7))return _0x24a7d7[_0x4e1ad8(0x154)]===_0x4e1ad8(0x139)?(console['error'](a28_0x4c48bf[_0x4e1ad8(0x12c)](_0x4e1ad8(0x135))),console[_0x4e1ad8(0x130)]('Usage:\x20tdx\x20journey\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x4e1ad8(0x130)]('\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'),console['error'](_0x4e1ad8(0x147))):(console[_0x4e1ad8(0x130)](a28_0x4c48bf['red'](_0x4e1ad8(0x13c)+_0x24a7d7[_0x4e1ad8(0x14d)]+'\x0a')),_0x24a7d7[_0x4e1ad8(0x14f)]&&console[_0x4e1ad8(0x130)](a28_0x4c48bf[_0x4e1ad8(0x131)](_0x24a7d7['helpText']))),0x1;const _0x805db0=_0x24a7d7[_0x4e1ad8(0x138)],_0x1efe18=_0x24a7d7[_0x4e1ad8(0x14b)]===_0x4e1ad8(0x15f)?_0x24a7d7[_0x4e1ad8(0x162)]:undefined;if(!_0x1efe18&&!existsSync(_0x805db0))return console[_0x4e1ad8(0x130)](a28_0x4c48bf['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x805db0+'\x0a')),0x1;let _0x2a1610;if(_0x1efe18){if(!_0x1efe18['endsWith'](_0x4e1ad8(0x164))&&!_0x1efe18[_0x4e1ad8(0x14c)](_0x4e1ad8(0x148)))return console[_0x4e1ad8(0x130)](a28_0x4c48bf[_0x4e1ad8(0x13e)](_0x4e1ad8(0x155)+_0x1efe18+'\x0a')),0x1;_0x2a1610=[_0x1efe18];}else _0x2a1610=findYamlFiles(_0x805db0);if(_0x2a1610['length']===0x0)return console[_0x4e1ad8(0x130)](a28_0x4c48bf['red'](_0x4e1ad8(0x156)+_0x805db0+'\x0a')),0x1;const _0x121664=validateYamlFiles(_0x2a1610,_0x805db0,{'filterType':_0x4e1ad8(0x142)}),_0xdb76b=calculateSummary(_0x121664),_0x3bb021=_0x121664[_0x4e1ad8(0x15e)](isValidationResult);if(_0x3bb021[_0x4e1ad8(0x150)]===0x0)return console['error'](a28_0x4c48bf[_0x4e1ad8(0x12c)](_0x4e1ad8(0x137)+_0x805db0+'\x0a')),_0xdb76b[_0x4e1ad8(0x141)]>0x0&&console['error'](a28_0x4c48bf['dim']('('+_0xdb76b[_0x4e1ad8(0x141)]+'\x20segment\x20file(s)\x20skipped)')),0x0;for(const _0x395183 of _0x121664){if(!isValidationResult(_0x395183)){_0x49d3b0['verbose']&&console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x133)]('-\x20'+_0x395183[_0x4e1ad8(0x14e)]+'\x20(skipped:\x20'+_0x395183['reason']+')'));continue;}const {relativePath:_0x3c1be2,source:_0x443832,result:_0x1d82b5}=_0x395183;if(_0x1d82b5['valid']&&_0x1d82b5[_0x4e1ad8(0x13a)][_0x4e1ad8(0x150)]===0x0)_0x49d3b0[_0x4e1ad8(0x161)]&&console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x163)]('✔\x20'+_0x3c1be2));else _0x1d82b5['valid']?(console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x12c)]('⚠\x20'+_0x3c1be2+':\x20'+_0x1d82b5['warnings'][_0x4e1ad8(0x150)]+_0x4e1ad8(0x132))),console[_0x4e1ad8(0x15a)](formatValidationResult(_0x1d82b5,_0x443832,_0x3c1be2))):(console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x13e)]('✖\x20'+_0x3c1be2+':\x20'+_0x1d82b5[_0x4e1ad8(0x159)][_0x4e1ad8(0x150)]+_0x4e1ad8(0x14a))),console[_0x4e1ad8(0x15a)](formatValidationResult(_0x1d82b5,_0x443832,_0x3c1be2)));}return console[_0x4e1ad8(0x15a)](''),_0xdb76b[_0x4e1ad8(0x160)]?(console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x13e)](_0x4e1ad8(0x12e)+_0xdb76b[_0x4e1ad8(0x157)]+'\x20journey(s)\x20with\x20errors,\x20'+_0xdb76b['validCount']+'\x20valid')),_0xdb76b[_0x4e1ad8(0x158)]>0x0&&console['log'](a28_0x4c48bf[_0x4e1ad8(0x12c)](_0xdb76b[_0x4e1ad8(0x158)]+_0x4e1ad8(0x136))),_0xdb76b[_0x4e1ad8(0x141)]>0x0&&console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x133)](_0xdb76b[_0x4e1ad8(0x141)]+_0x4e1ad8(0x140))),0x1):(console['log'](a28_0x4c48bf[_0x4e1ad8(0x163)](_0x4e1ad8(0x149)+_0xdb76b['validCount']+_0x4e1ad8(0x145))),_0xdb76b[_0x4e1ad8(0x158)]>0x0&&console[_0x4e1ad8(0x15a)](a28_0x4c48bf[_0x4e1ad8(0x12c)](_0xdb76b[_0x4e1ad8(0x158)]+'\x20warning(s)\x20found')),_0xdb76b[_0x4e1ad8(0x141)]>0x0&&console['log'](a28_0x4c48bf['dim'](_0xdb76b[_0x4e1ad8(0x141)]+_0x4e1ad8(0x140))),0x0);}}function a28_0x325c(){const _0x2aba3c=['2347863SMaHWe','Validate\x20journey\x20YAML\x20files','1183540JLIiVJ','filter','file','hasErrors','verbose','filePath','green','.yml','yellow','3527128MyzlAv','Validation\x20failed:\x20','description','error','cyan','\x20warning(s)','dim','2IWsZAo','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20warning(s)\x20found','No\x20journey\x20YAML\x20files\x20found\x20in\x20','targetDir','no_parent','warnings','parentSegment','Error:\x20','5GkpXco','red','813878urmrQX','\x20segment\x20file(s)\x20skipped','skippedCount','journey','5974528ayIDOJ','18897800GKZIdp','\x20journey(s)\x20valid','1743222Tuirpz','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','.yaml','✔\x20All\x20','\x20error(s)','type','endsWith','message','relativePath','helpText','length','cwd','9HLsNmo','journey:validate','errorCode','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','invalidCount','warningCount','errors','log'];a28_0x325c=function(){return _0x2aba3c;};return a28_0x325c();}
|