@treasuredata/tdx 2026.3.50 → 2026.3.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/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.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +1 -0
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.d.ts +21 -4
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.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/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/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/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.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_0x17519a=a24_0x1a77;(function(_0x5a4245,_0x234d55){const _0x5e8d6c=a24_0x1a77,_0x1d59f6=_0x5a4245();while(!![]){try{const _0x3c0fc6=-parseInt(_0x5e8d6c(0xde))/0x1+parseInt(_0x5e8d6c(0xd1))/0x2+-parseInt(_0x5e8d6c(0xf7))/0x3*(parseInt(_0x5e8d6c(0xf3))/0x4)+-parseInt(_0x5e8d6c(0xbe))/0x5*(parseInt(_0x5e8d6c(0xeb))/0x6)+parseInt(_0x5e8d6c(0xda))/0x7+parseInt(_0x5e8d6c(0xd7))/0x8+-parseInt(_0x5e8d6c(0xe1))/0x9;if(_0x3c0fc6===_0x234d55)break;else _0x1d59f6['push'](_0x1d59f6['shift']());}catch(_0x4f8dd4){_0x1d59f6['push'](_0x1d59f6['shift']());}}}(a24_0x39f4,0xc0603));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a24_0x1a77(_0x5726a6,_0x447537){_0x5726a6=_0x5726a6-0xbe;const _0x39f40f=a24_0x39f4();let _0x1a77d2=_0x39f40f[_0x5726a6];return _0x1a77d2;}import{confirmKey,isInteractive}from'../utils/prompt.js';function a24_0x39f4(){const _0x3a44e7=['created','Workspace\x20is\x20required.','1239470eZUfvE','\x20templates?','\x0aValidation\x20errors\x20in\x20','update','\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','✔\x20All\x20templates\x20are\x20up\x20to\x20date','11497760BHuEaM','errors','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','10822735gdbaFR','Preparing\x20push\x20to\x20workspace\x20\x27','warnings','\x27...','515246UAlKWr','site','def','17604657BDsqTC','verbose','dim','Aborted.','resolve','action','config','create','\x20\x20\x20\x20','✔\x20Created\x20','342khVWly','updated','dirname','length','engage_workspace','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','name','\x20new\x20templates:','12LnqdAa','\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)','Push\x20','red','303357XeJJUX','setPhase','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','session','Resolving\x20references...','✔\x20Updated\x20','1\x20template\x20file:\x20','execute','resolveWorkspaceId','engage:template:push','message','yellow','cyan','data','\x0aPush\x20summary\x20for\x20workspace\x20\x27','3545IxgIhW','configDir','green','workspace','error','dryRun','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','-\x20no\x20changes\x20applied','\x0aError:','Pushing\x20templates...','path','Found\x20','\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','engage','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','filter','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'];a24_0x39f4=function(){return _0x3a44e7;};return a24_0x39f4();}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_0x4878b3 from'chalk';import a24_0xcdd1a1 from'path';import{discoverAndParseTemplateFiles,parseTemplateFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/template-push.js';import{validateTemplateDef}from'../sdk/engage/template-validator.js';import{getTemplateUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageTemplatePushCommand extends BaseCommand{['name']=a24_0x17519a(0x100);['description']=a24_0x17519a(0xf0);async[a24_0x17519a(0xfe)](_0x2697e9){const _0x42089b=a24_0x17519a,{options:_0x462f9c,args:_0x418bd5,tdx:_0x36d816}=_0x2697e9,_0x85d44=_0x462f9c,_0x3bd31b=_0x418bd5[0x0],_0x22be78=_0x3bd31b?a24_0xcdd1a1[_0x42089b(0xe5)](_0x3bd31b):undefined,_0x32e87b=_0x22be78?isYamlFile(_0x22be78):![];let _0x5451af;if(_0x32e87b&&_0x22be78)_0x5451af=a24_0xcdd1a1[_0x42089b(0xed)](_0x22be78);else _0x22be78?_0x5451af=_0x22be78:_0x5451af=process['cwd']();let _0x2219db;const _0x14c54d=tryFindTdxConfig(_0x5451af);_0x14c54d?.['config'][_0x42089b(0xef)]&&(_0x2219db=_0x14c54d[_0x42089b(0xe7)][_0x42089b(0xef)],!_0x32e87b&&(_0x5451af=_0x14c54d[_0x42089b(0xbf)]));_0x85d44['workspace']&&(_0x2219db=_0x85d44[_0x42089b(0xc1)]);if(!_0x2219db){const _0x50d4f7=loadSessionContext(_0x85d44[_0x42089b(0xfa)]);_0x50d4f7?.[_0x42089b(0xef)]&&(_0x2219db=_0x50d4f7['engage_workspace']);}if(!_0x2219db)return console['error'](a24_0x4878b3[_0x42089b(0x102)](_0x42089b(0xd0))),console['error'](_0x42089b(0xca)),console['error'](_0x42089b(0xf4)),console[_0x42089b(0xc2)](_0x42089b(0xd5)),console['error'](_0x42089b(0xc4)),0x1;let _0x287465;_0x32e87b&&_0x22be78?_0x287465=[parseTemplateFile(_0x22be78,a24_0xcdd1a1[_0x42089b(0xed)](_0x22be78))]:_0x287465=discoverAndParseTemplateFiles(_0x5451af);if(_0x287465[_0x42089b(0xee)]===0x0)return console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0x102)]('No\x20template\x20YAML\x20files\x20found\x20in\x20'+_0x5451af)),console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0xe3)](_0x42089b(0xf9))),0x1;const _0xbbdb9f=_0x287465['length']===0x1?_0x42089b(0xfd)+_0x287465[0x0][_0x42089b(0xe0)][_0x42089b(0xf1)]:_0x287465[_0x42089b(0xee)]+'\x20template\x20files';console['error'](_0x42089b(0xc9)+a24_0x4878b3[_0x42089b(0x103)](_0xbbdb9f));let _0x3eb2fd=![];for(const _0x1547bd of _0x287465){const _0x1f03f8=validateTemplateDef(_0x1547bd[_0x42089b(0xe0)]);if(!_0x1f03f8['valid']){_0x3eb2fd=!![],console['error'](a24_0x4878b3[_0x42089b(0xf6)](_0x42089b(0xd3)+_0x1547bd['relativePath']+':'));for(const _0x22575a of _0x1f03f8[_0x42089b(0xd8)]){console[_0x42089b(0xc2)]('\x20\x20'+a24_0x4878b3['red']('✗')+'\x20'+_0x22575a[_0x42089b(0xc8)]+':\x20'+_0x22575a[_0x42089b(0x101)]);}}for(const _0x18ce18 of _0x1f03f8[_0x42089b(0xdc)]){console[_0x42089b(0xc2)]('\x20\x20'+a24_0x4878b3[_0x42089b(0x102)]('⚠')+'\x20'+_0x18ce18[_0x42089b(0xc8)]+':\x20'+_0x18ce18[_0x42089b(0x101)]);}}if(_0x3eb2fd)return console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0xf6)]('\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.')),0x1;const _0x19cbc4=await _0x36d816[_0x42089b(0xcb)][_0x42089b(0xff)](_0x2219db),_0x15ac14=await withProgressSpinner(_0x42089b(0xdb)+_0x2219db+_0x42089b(0xdd),_0x4b25c5=>preparePush({'engage':_0x36d816[_0x42089b(0xcb)]},_0x287465,_0x19cbc4,{'progress':{'update':_0x547e7c=>_0x4b25c5[_0x42089b(0xf8)](_0x547e7c)}}),{'verbose':_0x85d44['verbose']}),_0x30cbbf=_0x15ac14['data'];await withProgressSpinner(_0x42089b(0xfb),_0x4d4756=>resolveAndBuildInputs({'engage':_0x36d816[_0x42089b(0xcb)]},_0x30cbbf,_0x19cbc4,{'progress':{'update':_0x5c2496=>_0x4d4756[_0x42089b(0xf8)](_0x5c2496)}}),{'verbose':_0x85d44[_0x42089b(0xe2)]});const _0x523d11=_0x30cbbf[_0x42089b(0xcd)](_0x27b6cd=>_0x27b6cd[_0x42089b(0xe6)]===_0x42089b(0xe8)),_0x4c5327=_0x30cbbf[_0x42089b(0xcd)](_0x2605b0=>_0x2605b0[_0x42089b(0xe6)]===_0x42089b(0xd4));console['error'](_0x42089b(0x105)+_0x2219db+'\x27:');if(_0x523d11[_0x42089b(0xee)]>0x0){console[_0x42089b(0xc2)]('\x20\x20'+a24_0x4878b3[_0x42089b(0xc0)]('+\x20'+_0x523d11[_0x42089b(0xee)]+_0x42089b(0xf2)));for(const _0x8043c1 of _0x523d11){console[_0x42089b(0xc2)]('\x20\x20\x20\x20'+a24_0x4878b3['green']('+')+'\x20'+_0x8043c1['def']['name']);}}if(_0x4c5327[_0x42089b(0xee)]>0x0){console[_0x42089b(0xc2)]('\x20\x20'+a24_0x4878b3[_0x42089b(0x102)]('~\x20'+_0x4c5327['length']+'\x20templates\x20to\x20update:'));for(const _0x1ab358 of _0x4c5327){console[_0x42089b(0xc2)](_0x42089b(0xe9)+a24_0x4878b3[_0x42089b(0x102)]('~')+'\x20'+_0x1ab358[_0x42089b(0xe0)][_0x42089b(0xf1)]);}}if(_0x523d11[_0x42089b(0xee)]===0x0&&_0x4c5327[_0x42089b(0xee)]===0x0)return console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0xc0)](_0x42089b(0xd6))),0x0;if(_0x85d44[_0x42089b(0xc3)])return console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0x102)](_0x42089b(0xcc))),0x0;if(!_0x85d44['yes']){if(!isInteractive())return console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0xf6)](_0x42089b(0xc6)),_0x42089b(0xce)),console[_0x42089b(0xc2)](a24_0x4878b3['dim'](_0x42089b(0xd9))),0x1;const _0x38cd46=await confirmKey(_0x42089b(0xf5)+(_0x523d11[_0x42089b(0xee)]+_0x4c5327[_0x42089b(0xee)])+_0x42089b(0xd2));if(!_0x38cd46)return console['error'](a24_0x4878b3[_0x42089b(0x102)](_0x42089b(0xe4)),_0x42089b(0xc5)),0x1;}const _0x4fbe8f=await withProgressSpinner(_0x42089b(0xc7),_0x30f7d8=>executePush({'engage':_0x36d816['engage']},_0x30cbbf,{'progress':{'update':_0x7562bf=>_0x30f7d8[_0x42089b(0xf8)](_0x7562bf)}}),{'verbose':_0x85d44[_0x42089b(0xe2)]}),_0x2c7b9d=_0x4fbe8f[_0x42089b(0x104)];for(const _0x42cb03 of _0x2c7b9d['results']){if(_0x42cb03['templateId']&&(_0x42cb03[_0x42089b(0xe6)]===_0x42089b(0xcf)||_0x42cb03[_0x42089b(0xe6)]===_0x42089b(0xec))){const _0x106e44=getTemplateUrl(_0x85d44[_0x42089b(0xdf)],_0x19cbc4,_0x42cb03['templateId']),_0xbec0cf=_0x42cb03[_0x42089b(0xe6)]==='created'?'+':'~',_0x9dfb42=_0x42cb03[_0x42089b(0xe6)]===_0x42089b(0xcf)?a24_0x4878b3['green'](_0xbec0cf):a24_0x4878b3[_0x42089b(0x102)](_0xbec0cf);console[_0x42089b(0xc2)]('\x20\x20'+_0x9dfb42+'\x20'+hyperlink(_0x42cb03[_0x42089b(0xf1)],_0x106e44)+'\x20'+a24_0x4878b3[_0x42089b(0xe3)](_0x106e44));}}_0x2c7b9d[_0x42089b(0xcf)]>0x0&&console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0xc0)](_0x42089b(0xea)+_0x2c7b9d[_0x42089b(0xcf)]+'\x20templates'));_0x2c7b9d['updated']>0x0&&console[_0x42089b(0xc2)](a24_0x4878b3[_0x42089b(0xc0)](_0x42089b(0xfc)+_0x2c7b9d['updated']+'\x20templates'));if(_0x2c7b9d[_0x42089b(0xd8)]['length']>0x0){console[_0x42089b(0xc2)](a24_0x4878b3['red']('✘\x20'+_0x2c7b9d['errors']['length']+'\x20errors:'));for(const _0x10e117 of _0x2c7b9d[_0x42089b(0xd8)]){console[_0x42089b(0xc2)]('\x20\x20'+a24_0x4878b3[_0x42089b(0xf6)](_0x10e117[_0x42089b(0xf1)])+':\x20'+_0x10e117[_0x42089b(0xc2)]);}}return saveSessionContext({'engage_workspace':_0x2219db},_0x85d44[_0x42089b(0xfa)]),_0x2c7b9d[_0x42089b(0xd8)]['length']>0x0?0x1:0x0;}}
|
|
1
|
+
const a24_0x153e62=a24_0x56a3;function a24_0x56a3(_0x596862,_0x3ff65d){_0x596862=_0x596862-0x11c;const _0x53747a=a24_0x5374();let _0x56a3b3=_0x53747a[_0x596862];return _0x56a3b3;}(function(_0x1db931,_0x26bb31){const _0x2c7e3f=a24_0x56a3,_0x44713f=_0x1db931();while(!![]){try{const _0x20f80c=parseInt(_0x2c7e3f(0x129))/0x1*(parseInt(_0x2c7e3f(0x12d))/0x2)+-parseInt(_0x2c7e3f(0x11f))/0x3+-parseInt(_0x2c7e3f(0x13f))/0x4+parseInt(_0x2c7e3f(0x131))/0x5+parseInt(_0x2c7e3f(0x137))/0x6*(-parseInt(_0x2c7e3f(0x158))/0x7)+parseInt(_0x2c7e3f(0x162))/0x8*(parseInt(_0x2c7e3f(0x164))/0x9)+-parseInt(_0x2c7e3f(0x160))/0xa*(parseInt(_0x2c7e3f(0x144))/0xb);if(_0x20f80c===_0x26bb31)break;else _0x44713f['push'](_0x44713f['shift']());}catch(_0x51a742){_0x44713f['push'](_0x44713f['shift']());}}}(a24_0x5374,0x4ae73));function a24_0x5374(){const _0x30aa87=['execute','action','cwd','resolve','88SsZTJY','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','config','\x27...','engage','\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)','Workspace\x20is\x20required.','def','site','\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','workspace','Aborted.','setPhase','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','update','No\x20template\x20YAML\x20files\x20found\x20in\x20','\x20templates\x20to\x20update:','length','templateId','676165gyXwxC','✔\x20Updated\x20','name','dirname','\x20template\x20files','\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','filter','path','580910mbbqwb','\x0aError:','8qsryub','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','5130828pRszoG','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','engage_workspace','✔\x20All\x20templates\x20are\x20up\x20to\x20date','\x20new\x20templates:','errors','valid','\x20templates','168477JgIWzI','verbose','yellow','data','created','results','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20\x20\x20\x20','\x20errors:','relativePath','1tzoSbD','session','Pushing\x20templates...','message','147514SuQEkR','error','\x0aPush\x20summary\x20for\x20workspace\x20\x27','updated','2626745YgYnZt','configDir','green','red','description','cyan','6spShDe','dryRun','resolveWorkspaceId','Push\x20','engage:template:push','dim','\x20templates?','✔\x20Created\x20','979652wtangx'];a24_0x5374=function(){return _0x30aa87;};return a24_0x5374();}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_0x139ec0 from'chalk';import a24_0x4ac8b9 from'path';import{discoverAndParseTemplateFiles,parseTemplateFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/template-push.js';import{validateTemplateDef}from'../sdk/engage/template-validator.js';import{getTemplateUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageTemplatePushCommand extends BaseCommand{[a24_0x153e62(0x15a)]=a24_0x153e62(0x13b);[a24_0x153e62(0x135)]=a24_0x153e62(0x146);async[a24_0x153e62(0x140)](_0x4f614b){const _0x48caa6=a24_0x153e62,{options:_0x131f36,args:_0x9bbc9,tdx:_0xf7bb0e}=_0x4f614b,_0x759940=_0x131f36,_0x633fda=_0x9bbc9[0x0],_0x4aede7=_0x633fda?a24_0x4ac8b9[_0x48caa6(0x143)](_0x633fda):undefined,_0x2a9709=_0x4aede7?isYamlFile(_0x4aede7):![];let _0x4db051;if(_0x2a9709&&_0x4aede7)_0x4db051=a24_0x4ac8b9[_0x48caa6(0x15b)](_0x4aede7);else _0x4aede7?_0x4db051=_0x4aede7:_0x4db051=process[_0x48caa6(0x142)]();let _0x397db6;const _0xd6cb8e=tryFindTdxConfig(_0x4db051);_0xd6cb8e?.[_0x48caa6(0x147)][_0x48caa6(0x166)]&&(_0x397db6=_0xd6cb8e[_0x48caa6(0x147)][_0x48caa6(0x166)],!_0x2a9709&&(_0x4db051=_0xd6cb8e[_0x48caa6(0x132)]));_0x759940[_0x48caa6(0x14f)]&&(_0x397db6=_0x759940[_0x48caa6(0x14f)]);if(!_0x397db6){const _0x1bc700=loadSessionContext(_0x759940[_0x48caa6(0x12a)]);_0x1bc700?.[_0x48caa6(0x166)]&&(_0x397db6=_0x1bc700[_0x48caa6(0x166)]);}if(!_0x397db6)return console['error'](a24_0x139ec0[_0x48caa6(0x121)](_0x48caa6(0x14b))),console[_0x48caa6(0x12e)](_0x48caa6(0x14e)),console[_0x48caa6(0x12e)](_0x48caa6(0x14a)),console[_0x48caa6(0x12e)](_0x48caa6(0x15d)),console[_0x48caa6(0x12e)](_0x48caa6(0x163)),0x1;let _0x437096;_0x2a9709&&_0x4aede7?_0x437096=[parseTemplateFile(_0x4aede7,a24_0x4ac8b9['dirname'](_0x4aede7))]:_0x437096=discoverAndParseTemplateFiles(_0x4db051);if(_0x437096['length']===0x0)return console['error'](a24_0x139ec0['yellow'](_0x48caa6(0x154)+_0x4db051)),console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x13c)](_0x48caa6(0x165))),0x1;const _0x2b1fbd=_0x437096[_0x48caa6(0x156)]===0x1?'1\x20template\x20file:\x20'+_0x437096[0x0]['def'][_0x48caa6(0x15a)]:_0x437096['length']+_0x48caa6(0x15c);console['error']('Found\x20'+a24_0x139ec0[_0x48caa6(0x136)](_0x2b1fbd));let _0x5f390e=![];for(const _0x2e4135 of _0x437096){const _0x29790d=validateTemplateDef(_0x2e4135[_0x48caa6(0x14c)]);if(!_0x29790d[_0x48caa6(0x11d)]){_0x5f390e=!![],console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x134)]('\x0aValidation\x20errors\x20in\x20'+_0x2e4135[_0x48caa6(0x128)]+':'));for(const _0x4903da of _0x29790d[_0x48caa6(0x11c)]){console[_0x48caa6(0x12e)]('\x20\x20'+a24_0x139ec0[_0x48caa6(0x134)]('✗')+'\x20'+_0x4903da['path']+':\x20'+_0x4903da[_0x48caa6(0x12c)]);}}for(const _0x9a3c67 of _0x29790d['warnings']){console['error']('\x20\x20'+a24_0x139ec0[_0x48caa6(0x121)]('⚠')+'\x20'+_0x9a3c67[_0x48caa6(0x15f)]+':\x20'+_0x9a3c67[_0x48caa6(0x12c)]);}}if(_0x5f390e)return console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x134)](_0x48caa6(0x152))),0x1;const _0x2f32ea=await _0xf7bb0e[_0x48caa6(0x149)][_0x48caa6(0x139)](_0x397db6),_0x2acbfd=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x397db6+_0x48caa6(0x148),_0x5b8eda=>preparePush({'engage':_0xf7bb0e[_0x48caa6(0x149)]},_0x437096,_0x2f32ea,{'progress':{'update':_0x760c76=>_0x5b8eda[_0x48caa6(0x151)](_0x760c76)}}),{'verbose':_0x759940[_0x48caa6(0x120)]}),_0x321b79=_0x2acbfd[_0x48caa6(0x122)];await withProgressSpinner('Resolving\x20references...',_0x5a02a4=>resolveAndBuildInputs({'engage':_0xf7bb0e[_0x48caa6(0x149)]},_0x321b79,_0x2f32ea,{'progress':{'update':_0x57a535=>_0x5a02a4[_0x48caa6(0x151)](_0x57a535)}}),{'verbose':_0x759940['verbose']});const _0x47ca90=_0x321b79[_0x48caa6(0x15e)](_0x5870a5=>_0x5870a5['action']==='create'),_0x170934=_0x321b79[_0x48caa6(0x15e)](_0x4f0a9e=>_0x4f0a9e[_0x48caa6(0x141)]===_0x48caa6(0x153));console['error'](_0x48caa6(0x12f)+_0x397db6+'\x27:');if(_0x47ca90[_0x48caa6(0x156)]>0x0){console[_0x48caa6(0x12e)]('\x20\x20'+a24_0x139ec0[_0x48caa6(0x133)]('+\x20'+_0x47ca90['length']+_0x48caa6(0x168)));for(const _0x5977ec of _0x47ca90){console[_0x48caa6(0x12e)](_0x48caa6(0x126)+a24_0x139ec0[_0x48caa6(0x133)]('+')+'\x20'+_0x5977ec[_0x48caa6(0x14c)]['name']);}}if(_0x170934[_0x48caa6(0x156)]>0x0){console[_0x48caa6(0x12e)]('\x20\x20'+a24_0x139ec0[_0x48caa6(0x121)]('~\x20'+_0x170934[_0x48caa6(0x156)]+_0x48caa6(0x155)));for(const _0xfa5891 of _0x170934){console[_0x48caa6(0x12e)](_0x48caa6(0x126)+a24_0x139ec0[_0x48caa6(0x121)]('~')+'\x20'+_0xfa5891[_0x48caa6(0x14c)][_0x48caa6(0x15a)]);}}if(_0x47ca90[_0x48caa6(0x156)]===0x0&&_0x170934['length']===0x0)return console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x133)](_0x48caa6(0x167))),0x0;if(_0x759940[_0x48caa6(0x138)])return console[_0x48caa6(0x12e)](a24_0x139ec0['yellow'](_0x48caa6(0x145))),0x0;if(!_0x759940['yes']){if(!isInteractive())return console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x134)](_0x48caa6(0x161)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x48caa6(0x12e)](a24_0x139ec0['dim'](_0x48caa6(0x125))),0x1;const _0x2169e2=await confirmKey(_0x48caa6(0x13a)+(_0x47ca90[_0x48caa6(0x156)]+_0x170934[_0x48caa6(0x156)])+_0x48caa6(0x13d));if(!_0x2169e2)return console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x121)](_0x48caa6(0x150)),'-\x20no\x20changes\x20applied'),0x1;}const _0x42b486=await withProgressSpinner(_0x48caa6(0x12b),_0x3f124b=>executePush({'engage':_0xf7bb0e[_0x48caa6(0x149)]},_0x321b79,{'progress':{'update':_0x1cfd44=>_0x3f124b[_0x48caa6(0x151)](_0x1cfd44)}}),{'verbose':_0x759940['verbose']}),_0x26afc8=_0x42b486[_0x48caa6(0x122)];for(const _0x24b776 of _0x26afc8[_0x48caa6(0x124)]){if(_0x24b776[_0x48caa6(0x157)]&&(_0x24b776[_0x48caa6(0x141)]===_0x48caa6(0x123)||_0x24b776[_0x48caa6(0x141)]==='updated')){const _0x58288f=getTemplateUrl(_0x759940[_0x48caa6(0x14d)],_0x2f32ea,_0x24b776[_0x48caa6(0x157)]),_0x1fe76d=_0x24b776[_0x48caa6(0x141)]===_0x48caa6(0x123)?'+':'~',_0x5ce58e=_0x24b776[_0x48caa6(0x141)]==='created'?a24_0x139ec0[_0x48caa6(0x133)](_0x1fe76d):a24_0x139ec0[_0x48caa6(0x121)](_0x1fe76d);console[_0x48caa6(0x12e)]('\x20\x20'+_0x5ce58e+'\x20'+hyperlink(_0x24b776[_0x48caa6(0x15a)],_0x58288f)+'\x20'+a24_0x139ec0[_0x48caa6(0x13c)](_0x58288f));}}_0x26afc8[_0x48caa6(0x123)]>0x0&&console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x133)](_0x48caa6(0x13e)+_0x26afc8[_0x48caa6(0x123)]+_0x48caa6(0x11e)));_0x26afc8[_0x48caa6(0x130)]>0x0&&console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x133)](_0x48caa6(0x159)+_0x26afc8[_0x48caa6(0x130)]+_0x48caa6(0x11e)));if(_0x26afc8['errors'][_0x48caa6(0x156)]>0x0){console[_0x48caa6(0x12e)](a24_0x139ec0[_0x48caa6(0x134)]('✘\x20'+_0x26afc8[_0x48caa6(0x11c)]['length']+_0x48caa6(0x127)));for(const _0x40375c of _0x26afc8['errors']){console[_0x48caa6(0x12e)]('\x20\x20'+a24_0x139ec0[_0x48caa6(0x134)](_0x40375c[_0x48caa6(0x15a)])+':\x20'+_0x40375c['error']);}}return saveSessionContext({'engage_workspace':_0x397db6},_0x759940[_0x48caa6(0x12a)]),_0x26afc8[_0x48caa6(0x11c)][_0x48caa6(0x156)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x5045d1=a25_0x5b3e;(function(_0xf68558,_0x4380f6){const _0x3c0363=a25_0x5b3e,_0x84ba=_0xf68558();while(!![]){try{const _0x17370d=parseInt(_0x3c0363(0x1cf))/0x1*(-parseInt(_0x3c0363(0x1bf))/0x2)+-parseInt(_0x3c0363(0x1e6))/0x3+parseInt(_0x3c0363(0x1d8))/0x4+-parseInt(_0x3c0363(0x1e0))/0x5*(-parseInt(_0x3c0363(0x1ce))/0x6)+parseInt(_0x3c0363(0x1ba))/0x7*(parseInt(_0x3c0363(0x1c4))/0x8)+parseInt(_0x3c0363(0x1c6))/0x9+parseInt(_0x3c0363(0x1d4))/0xa*(parseInt(_0x3c0363(0x1da))/0xb);if(_0x17370d===_0x4380f6)break;else _0x84ba['push'](_0x84ba['shift']());}catch(_0x40167d){_0x84ba['push'](_0x84ba['shift']());}}}(a25_0x2fb9,0xead9b));import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a25_0x91c37e from'chalk';import a25_0x5b73a6 from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a25_0x5b3e(_0x19d38c,_0x4bcf01){_0x19d38c=_0x19d38c-0x1b5;const _0x2fb95a=a25_0x2fb9();let _0x5b3ef7=_0x2fb95a[_0x19d38c];return _0x5b3ef7;}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageTemplateValidateCommand extends BaseCommand{[a25_0x5045d1(0x1bd)]=a25_0x5045d1(0x1d1);[a25_0x5045d1(0x1de)]=a25_0x5045d1(0x1cd);async['execute'](_0x516a63){const _0x433509=a25_0x5045d1,{options:_0x245713,args:_0x32451d}=_0x516a63,_0x28316d=_0x245713,_0x567b07=_0x32451d[0x0],_0x46fa95=_0x567b07?a25_0x5b73a6[_0x433509(0x1b6)](_0x567b07):undefined,_0x15a3fc=_0x46fa95?isYamlFile(_0x46fa95):![];let _0x398777,_0x2a2057;if(_0x15a3fc&&_0x46fa95)_0x398777=a25_0x5b73a6['dirname'](_0x46fa95),_0x2a2057=_0x46fa95;else _0x46fa95?_0x398777=_0x46fa95:_0x398777=process[_0x433509(0x1d2)]();if(!_0x2a2057&&!existsSync(_0x398777))return console['error'](a25_0x91c37e['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x398777+'\x0a')),0x1;let _0x5c8be9;if(_0x2a2057){if(!_0x2a2057[_0x433509(0x1cb)](_0x433509(0x1b8))&&!_0x2a2057['endsWith'](_0x433509(0x1e8)))return console['error'](a25_0x91c37e[_0x433509(0x1dc)](_0x433509(0x1bc)+_0x2a2057+'\x0a')),0x1;_0x5c8be9=[_0x2a2057];}else _0x5c8be9=findYamlFiles(_0x398777);if(_0x5c8be9[_0x433509(0x1d3)]===0x0)return console[_0x433509(0x1b7)](a25_0x91c37e[_0x433509(0x1dc)](_0x433509(0x1d6)+_0x398777+'\x0a')),0x1;const _0xeca87d=validateYamlFiles(_0x5c8be9,_0x398777,{'filterType':'template'}),_0x9d3832=calculateSummary(_0xeca87d),_0x5e399f=_0xeca87d[_0x433509(0x1e4)](isValidationResult);if(_0x5e399f[_0x433509(0x1d3)]===0x0)return console['error'](a25_0x91c37e[_0x433509(0x1e2)](_0x433509(0x1bb)+_0x398777+'\x0a')),_0x9d3832[_0x433509(0x1c1)]>0x0&&console[_0x433509(0x1b7)](a25_0x91c37e[_0x433509(0x1e9)]('('+_0x9d3832[_0x433509(0x1c1)]+_0x433509(0x1d9))),0x0;for(const _0x3bb13b of _0xeca87d){if(!isValidationResult(_0x3bb13b)){_0x28316d[_0x433509(0x1c2)]&&console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1e9)]('-\x20'+_0x3bb13b[_0x433509(0x1cc)]+_0x433509(0x1c7)+_0x3bb13b[_0x433509(0x1c0)]+')'));continue;}const {relativePath:_0x5914a1,source:_0x1b5791,result:_0x2503bf}=_0x3bb13b;if(_0x2503bf['valid']&&_0x2503bf[_0x433509(0x1df)][_0x433509(0x1d3)]===0x0)_0x28316d[_0x433509(0x1c2)]&&console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1c5)]('✔\x20'+_0x5914a1));else _0x2503bf[_0x433509(0x1e3)]?(console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1e2)]('⚠\x20'+_0x5914a1+':\x20'+_0x2503bf[_0x433509(0x1df)][_0x433509(0x1d3)]+_0x433509(0x1b9))),console[_0x433509(0x1d0)](formatValidationResult(_0x2503bf,_0x1b5791,_0x5914a1))):(console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1dc)]('✖\x20'+_0x5914a1+':\x20'+_0x2503bf[_0x433509(0x1d5)][_0x433509(0x1d3)]+_0x433509(0x1db))),console[_0x433509(0x1d0)](formatValidationResult(_0x2503bf,_0x1b5791,_0x5914a1)));}return console[_0x433509(0x1d0)](''),_0x9d3832[_0x433509(0x1c8)]?(console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1dc)](_0x433509(0x1ca)+_0x9d3832[_0x433509(0x1dd)]+_0x433509(0x1e7)+_0x9d3832[_0x433509(0x1e5)]+_0x433509(0x1c3))),_0x9d3832[_0x433509(0x1d7)]>0x0&&console[_0x433509(0x1d0)](a25_0x91c37e['yellow'](_0x9d3832[_0x433509(0x1d7)]+_0x433509(0x1e1))),_0x9d3832[_0x433509(0x1c1)]>0x0&&console[_0x433509(0x1d0)](a25_0x91c37e['dim'](_0x9d3832['skippedCount']+_0x433509(0x1be))),0x1):(console['log'](a25_0x91c37e[_0x433509(0x1c5)](_0x433509(0x1c9)+_0x9d3832[_0x433509(0x1e5)]+_0x433509(0x1b5))),_0x9d3832[_0x433509(0x1d7)]>0x0&&console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1e2)](_0x9d3832[_0x433509(0x1d7)]+_0x433509(0x1e1))),_0x9d3832[_0x433509(0x1c1)]>0x0&&console[_0x433509(0x1d0)](a25_0x91c37e[_0x433509(0x1e9)](_0x9d3832[_0x433509(0x1c1)]+_0x433509(0x1be))),0x0);}}function a25_0x2fb9(){const _0x4f8002=['dim','\x20template(s)\x20valid','resolve','error','.yml','\x20warning(s)','28HqHeLN','No\x20template\x20YAML\x20files\x20found\x20in\x20','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','name','\x20non-template\x20file(s)\x20skipped','4JshdtT','reason','skippedCount','verbose','\x20valid','1021024eDLsQs','green','539694ApBeHG','\x20(skipped:\x20','hasErrors','✔\x20All\x20','Validation\x20failed:\x20','endsWith','relativePath','Validate\x20template\x20YAML\x20files','498dnrozD','827809OtHwQQ','log','engage:template:validate','cwd','length','12887830KnCPvV','errors','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','warningCount','5556888RmENYT','\x20non-template\x20file(s)\x20skipped)','11nkXYDm','\x20error(s)','red','invalidCount','description','warnings','53035pTuhEb','\x20warning(s)\x20found','yellow','valid','filter','validCount','4533897ZcCvSm','\x20template(s)\x20with\x20errors,\x20','.yaml'];a25_0x2fb9=function(){return _0x4f8002;};return a25_0x2fb9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0xfd6530=a26_0x4f30;(function(_0x5782d6,_0x34a635){const _0xd5ec08=a26_0x4f30,_0x506880=_0x5782d6();while(!![]){try{const _0x3a6947=parseInt(_0xd5ec08(0xba))/0x1+parseInt(_0xd5ec08(0xf1))/0x2+parseInt(_0xd5ec08(0xe5))/0x3*(-parseInt(_0xd5ec08(0xf2))/0x4)+-parseInt(_0xd5ec08(0xf3))/0x5*(parseInt(_0xd5ec08(0xca))/0x6)+parseInt(_0xd5ec08(0x110))/0x7+-parseInt(_0xd5ec08(0xc3))/0x8+parseInt(_0xd5ec08(0xda))/0x9;if(_0x3a6947===_0x34a635)break;else _0x506880['push'](_0x506880['shift']());}catch(_0x1b4fb8){_0x506880['push'](_0x506880['shift']());}}}(a26_0x3c31,0xd3469));function a26_0x4f30(_0x36b707,_0x14b112){_0x36b707=_0x36b707-0xb7;const _0x3c3116=a26_0x3c31();let _0x4f3008=_0x3c3116[_0x36b707];return _0x4f3008;}import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../sdk/query/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{getJobUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a26_0x48eed4 from'chalk';function formatDuration(_0x9b2736){const _0x5b168e=a26_0x4f30;if(_0x9b2736<0x3c)return _0x9b2736+'s';if(_0x9b2736<0xe10)return Math[_0x5b168e(0x10f)](_0x9b2736/0x3c)+'m\x20'+_0x9b2736%0x3c+'s';const _0x368f32=Math[_0x5b168e(0x10f)](_0x9b2736/0xe10),_0x9eeb14=Math[_0x5b168e(0x10f)](_0x9b2736%0xe10/0x3c);return _0x9eeb14>0x0?_0x368f32+'h\x20'+_0x9eeb14+'m':_0x368f32+'h';}function formatRelativeTime(_0x5ac7ed){const _0x516be8=a26_0x4f30,_0x1ebefc=Date[_0x516be8(0x100)]()-_0x5ac7ed[_0x516be8(0xf0)](),_0x4cbfc1=Math['floor'](Math[_0x516be8(0x105)](_0x1ebefc)/0x3e8);if(_0x4cbfc1<0x3c)return _0x516be8(0x104);const _0x19c1c4=Math[_0x516be8(0x10f)](_0x4cbfc1/0x3c);if(_0x19c1c4<0x3c)return _0x19c1c4+_0x516be8(0xe8);const _0x2454d8=Math[_0x516be8(0x10f)](_0x19c1c4/0x3c);if(_0x2454d8<0x18)return _0x2454d8+_0x516be8(0xbe);const _0x3ad262=Math['floor'](_0x2454d8/0x18);if(_0x3ad262<0x1e)return _0x3ad262+'d\x20ago';return Math[_0x516be8(0x10f)](_0x3ad262/0x1e)+_0x516be8(0x107);}export class JobListCommand extends BaseCommand{[a26_0xfd6530(0xc2)]='jobs';['description']=a26_0xfd6530(0xfb);async[a26_0xfd6530(0xde)](_0x1ad5fd){const _0x8f683b=a26_0xfd6530,{options:_0x5bd447,tdx:_0x4c8eef}=_0x1ad5fd,_0x333b09=resolveLimit(_0x5bd447[_0x8f683b(0xb9)],DEFAULT_DISPLAY_LIMIT),_0x47e60c=_0x5bd447['status'];_0x5bd447[_0x8f683b(0xd4)]&&(console[_0x8f683b(0xf7)](_0x8f683b(0xbb)+_0x333b09+_0x8f683b(0xd6)),_0x47e60c&&console['error'](_0x8f683b(0xd2)+_0x47e60c));const _0x5cbc5a=await withSpinner(_0x8f683b(0x101),()=>_0x4c8eef['jobs'][_0x8f683b(0xc1)]({'from':0x0,'to':_0x333b09-0x1,'status':_0x47e60c}),{'verbose':_0x5bd447[_0x8f683b(0xd4)]}),_0xa32d79=_0x5cbc5a[_0x8f683b(0x10d)];console['error']('✔\x20Found\x20'+_0xa32d79['length']+'\x20job'+(_0xa32d79['length']!==0x1?'s':''));const _0x54d61c=_0x5bd447[_0x8f683b(0xdf)];if(isStructuredFormat(_0x5bd447)){const _0x8b7c3=_0xa32d79[_0x8f683b(0xdb)](_0x12aefa=>{const _0x107de2=_0x8f683b;let _0x233e8d;if(_0x12aefa[_0x107de2(0x10c)]&&_0x12aefa[_0x107de2(0xf5)]){const _0x2368d3=new Date(_0x12aefa['start_at'])[_0x107de2(0xf0)](),_0x1a9a68=new Date(_0x12aefa['end_at'])['getTime']();_0x233e8d=Math[_0x107de2(0xe3)]((_0x1a9a68-_0x2368d3)/0x3e8);}return{'job_id':_0x12aefa[_0x107de2(0xed)],'type':_0x12aefa[_0x107de2(0xe6)]===_0x107de2(0xc6)?_0x107de2(0xf4):_0x12aefa[_0x107de2(0xe6)],'status':_0x12aefa[_0x107de2(0xbc)],'user_name':_0x12aefa[_0x107de2(0xe1)],'duration_sec':_0x233e8d,'created_at':_0x12aefa[_0x107de2(0x10b)],'started_at':_0x12aefa['start_at'],'end_at':_0x12aefa[_0x107de2(0xf5)]};});await handleSDKOutput(_0x8b7c3,_0x5bd447);}else for(const _0x1a2816 of _0xa32d79){const _0x219a2f=_0x1a2816[_0x8f683b(0xbc)]===_0x8f683b(0xd0)?a26_0x48eed4['green']:_0x1a2816[_0x8f683b(0xbc)]==='error'?a26_0x48eed4[_0x8f683b(0xfd)]:a26_0x48eed4[_0x8f683b(0xc4)],_0x1aa982=_0x219a2f(_0x1a2816[_0x8f683b(0xbc)]),_0x511013=getJobUrl(_0x54d61c,_0x1a2816['job_id']),_0x1e5538=hyperlink(_0x1a2816[_0x8f683b(0xed)],_0x511013),_0x19518e=a26_0x48eed4[_0x8f683b(0xc4)](_0x1a2816[_0x8f683b(0xe6)]===_0x8f683b(0xc6)?_0x8f683b(0xf4):_0x1a2816['type']),_0x420e57=[];if(_0x1a2816[_0x8f683b(0x10c)]&&_0x1a2816['end_at']){const _0x2ca8ff=Math['round']((new Date(_0x1a2816[_0x8f683b(0xf5)])['getTime']()-new Date(_0x1a2816[_0x8f683b(0x10c)])[_0x8f683b(0xf0)]())/0x3e8);_0x420e57[_0x8f683b(0x102)](formatDuration(_0x2ca8ff));}if(_0x1a2816[_0x8f683b(0xf5)])_0x420e57[_0x8f683b(0x102)](formatRelativeTime(new Date(_0x1a2816[_0x8f683b(0xf5)])));else _0x1a2816['start_at']&&_0x420e57[_0x8f683b(0x102)](formatRelativeTime(new Date(_0x1a2816[_0x8f683b(0x10c)])));const _0x4680ec=_0x420e57[_0x8f683b(0xd3)]>0x0?a26_0x48eed4['dim']('\x20'+_0x420e57['join'](',\x20')):'';console['log']('⚡\x20'+_0x1e5538+'\x20'+_0x19518e+'\x20'+_0x1aa982+_0x4680ec);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0xfd6530(0xc2)]=a26_0xfd6530(0xcc);[a26_0xfd6530(0xd7)]=a26_0xfd6530(0xf9);['validate'](_0x334a69){const _0x807646=_0x334a69['args'][0x0];if(!_0x807646)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>';return undefined;}async[a26_0xfd6530(0xde)](_0x31283a){const _0x2ac926=a26_0xfd6530,{options:_0x13f703,args:_0x58ae09,tdx:_0x154f5d}=_0x31283a,_0x2e2d02=_0x58ae09[0x0],_0x4e476b=await withSpinner(_0x2ac926(0xcf),()=>_0x154f5d[_0x2ac926(0xc7)][_0x2ac926(0x10a)](_0x2e2d02),{'verbose':_0x13f703[_0x2ac926(0xd4)]}),_0x3d5aa6=_0x4e476b[_0x2ac926(0x10d)];let _0x190c1c;if(_0x3d5aa6[_0x2ac926(0x10c)]&&_0x3d5aa6[_0x2ac926(0xf5)]){const _0x475e96=new Date(_0x3d5aa6[_0x2ac926(0x10c)])[_0x2ac926(0xf0)](),_0x24fd64=new Date(_0x3d5aa6[_0x2ac926(0xf5)])[_0x2ac926(0xf0)]();_0x190c1c=Math[_0x2ac926(0xe3)]((_0x24fd64-_0x475e96)/0x3e8);}const _0x13ebb4={'job_id':_0x3d5aa6[_0x2ac926(0xed)],'type':_0x3d5aa6[_0x2ac926(0xe6)],'status':_0x3d5aa6['status'],..._0x3d5aa6[_0x2ac926(0xe1)]&&{'user_name':_0x3d5aa6['user_name']},..._0x190c1c!==undefined&&{'duration_sec':_0x190c1c},..._0x3d5aa6['created_at']&&{'created_at':_0x3d5aa6[_0x2ac926(0x10b)]},..._0x3d5aa6['start_at']&&{'started_at':_0x3d5aa6[_0x2ac926(0x10c)]},..._0x3d5aa6[_0x2ac926(0xf5)]&&{'end_at':_0x3d5aa6[_0x2ac926(0xf5)]},..._0x3d5aa6['database']&&{'database':_0x3d5aa6[_0x2ac926(0xdd)]},..._0x3d5aa6[_0x2ac926(0xd8)]!==undefined&&{'priority':_0x3d5aa6[_0x2ac926(0xd8)]},..._0x3d5aa6[_0x2ac926(0xfa)]&&{'url':_0x3d5aa6['url']},..._0x3d5aa6[_0x2ac926(0xcb)]&&{'query':_0x3d5aa6[_0x2ac926(0xcb)]},..._0x3d5aa6['debug']&&{'debug':_0x3d5aa6[_0x2ac926(0xc0)]}};return await handleSingleObjectOutput(_0x13ebb4,_0x13f703),0x0;}}export class JobKillCommand extends BaseCommand{[a26_0xfd6530(0xc2)]=a26_0xfd6530(0xe7);[a26_0xfd6530(0xd7)]=a26_0xfd6530(0xef);[a26_0xfd6530(0xbf)](_0x1d7713){const _0x26d013=a26_0xfd6530,_0xa248c4=_0x1d7713[_0x26d013(0xf8)][0x0];if(!_0xa248c4)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>';return undefined;}async[a26_0xfd6530(0xde)](_0x3b364e){const _0xb4a0d4=a26_0xfd6530,{options:_0x45d2da,args:_0x1dd2c0,tdx:_0x514aa4}=_0x3b364e,_0x58de36=_0x1dd2c0[0x0];if(!_0x45d2da[_0xb4a0d4(0xb8)]){const _0x58697d=await confirm(_0xb4a0d4(0xcd)+_0x58de36+'?');if(!_0x58697d)return console[_0xb4a0d4(0xf7)](_0xb4a0d4(0xd9)),0x0;}return await withSpinner(_0xb4a0d4(0xc8),()=>_0x514aa4[_0xb4a0d4(0xc7)]['kill'](_0x58de36),{'verbose':_0x45d2da[_0xb4a0d4(0xd4)]}),console[_0xb4a0d4(0xf7)](_0xb4a0d4(0xd5)+_0x58de36),console['error']('\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20'+_0x58de36+'\x27\x20to\x20verify\x20the\x20job\x20status'),0x0;}}export class JobSubmitCommand extends BaseCommand{[a26_0xfd6530(0xc2)]=a26_0xfd6530(0xea);[a26_0xfd6530(0xd7)]=a26_0xfd6530(0x108);async['execute'](_0x585734){const _0x5017e0=a26_0xfd6530,{options:_0x5c0015,args:_0x5d66f2,tdx:_0x4bf261}=_0x585734,_0x3044f9=_0x5c0015[_0x5017e0(0xc9)]||_0x5017e0(0xf4),_0x451fa2=_0x5c0015[_0x5017e0(0xbd)],_0x3eb99f=_0x5c0015[_0x5017e0(0xdd)]||'information_schema',_0x3897c4=_0x5c0015[_0x5017e0(0xec)];if(_0x3044f9!==_0x5017e0(0xf4)&&_0x3044f9!==_0x5017e0(0xb7))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5017e0(0xee));let _0x47bd99;if(_0x451fa2){if(_0x5d66f2[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5017e0(0xc5));const _0x399954=readSqlStatementsFromFile(_0x451fa2);if(_0x399954[_0x5017e0(0xd3)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5017e0(0xdc));if(_0x399954[_0x5017e0(0xd3)]>0x1)throw new SDKError(ErrorCode[_0x5017e0(0xfe)],_0x5017e0(0x103));_0x47bd99=_0x399954[0x0];}else{if(!_0x5d66f2[0x0])throw new SDKError(ErrorCode[_0x5017e0(0xfe)],_0x5017e0(0x10e));_0x47bd99=_0x5d66f2[0x0];}_0x5c0015[_0x5017e0(0xd4)]&&(console[_0x5017e0(0xf7)](_0x5017e0(0x106)+_0x3044f9),console['error'](_0x5017e0(0xfc)+_0x3eb99f),console['error'](_0x5017e0(0x109)+_0x47bd99['substring'](0x0,0x64)+(_0x47bd99[_0x5017e0(0xd3)]>0x64?_0x5017e0(0xe0):'')));const _0x8f772f=await withSpinner(_0x5017e0(0xeb),()=>_0x4bf261[_0x5017e0(0xc7)][_0x5017e0(0xe2)](_0x3eb99f,_0x47bd99,_0x3044f9,_0x3897c4),{'verbose':_0x5c0015['verbose']}),_0xde28af=_0x8f772f[_0x5017e0(0x10d)];return console['error'](_0x5017e0(0xff)),console[_0x5017e0(0xf7)]('\x20\x20Job\x20ID:\x20'+_0xde28af[_0x5017e0(0xed)]),await handleSDKOutput([_0xde28af],_0x5c0015),0x0;}}function a26_0x3c31(){const _0x3a8777=['h\x20ago','validate','debug','list','name','10905520JrTMLV','dim','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','presto','jobs','Submitting\x20kill\x20request...','jobType','12PYoSFx','query','job:show','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','Get\x20job\x20results','Getting\x20job\x20details...','success','job:result','Status\x20filter:\x20','length','verbose','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','\x20jobs','description','priority','Cancelled','20998116CEvZxG','map','No\x20SQL\x20statements\x20found\x20in\x20file','database','execute','site','...','user_name','submit','round','✔\x20Retrieved\x20','3982008JxAQzn','type','job:kill','m\x20ago','\x20row','job:submit','Submitting\x20job...','result','job_id','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','Kill\x20a\x20job','getTime','2543866bYhCEN','4kmioOe','3859105TUqOnr','trino','end_at','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>','error','args','Show\x20job\x20details','url','List\x20jobs','Database:\x20','red','INVALID_ARGUMENT','✔\x20Job\x20submitted','now','Listing\x20jobs...','push','Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','just\x20now','abs','Job\x20type:\x20','mo\x20ago','Submit\x20a\x20job','Query:\x20','show','created_at','start_at','data','Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','floor','9543030vLaZVH','hive','yes','limit','131206Hkcczk','Limit:\x20','status','file'];a26_0x3c31=function(){return _0x3a8777;};return a26_0x3c31();}export class JobResultCommand extends BaseCommand{[a26_0xfd6530(0xc2)]=a26_0xfd6530(0xd1);['description']=a26_0xfd6530(0xce);[a26_0xfd6530(0xbf)](_0x37b155){const _0x4d7b0b=a26_0xfd6530,_0x411fcc=_0x37b155['args'][0x0];if(!_0x411fcc)return _0x4d7b0b(0xf6);return undefined;}async['execute'](_0x1d5a35){const _0x36618b=a26_0xfd6530,{options:_0x3a99a3,args:_0x547c27,tdx:_0x47b068}=_0x1d5a35,_0x1fb310=_0x547c27[0x0],_0xd3abe4=await withSpinner('Getting\x20job\x20results...',()=>_0x47b068[_0x36618b(0xc7)][_0x36618b(0xec)](_0x1fb310),{'verbose':_0x3a99a3['verbose']}),_0x40b8b2=_0xd3abe4[_0x36618b(0x10d)];return console[_0x36618b(0xf7)](_0x36618b(0xe4)+_0x40b8b2['length']+_0x36618b(0xe9)+(_0x40b8b2[_0x36618b(0xd3)]!==0x1?'s':'')),await handleSDKOutput(_0x40b8b2,_0x3a99a3),0x0;}}
|
|
1
|
+
const a26_0x4c3af7=a26_0x321c;(function(_0x531f02,_0x116dba){const _0x5e918d=a26_0x321c,_0x378325=_0x531f02();while(!![]){try{const _0x4be647=-parseInt(_0x5e918d(0x97))/0x1+parseInt(_0x5e918d(0x99))/0x2*(-parseInt(_0x5e918d(0xc0))/0x3)+parseInt(_0x5e918d(0xd2))/0x4+parseInt(_0x5e918d(0xcf))/0x5+-parseInt(_0x5e918d(0xcb))/0x6+-parseInt(_0x5e918d(0xc7))/0x7*(-parseInt(_0x5e918d(0xe4))/0x8)+parseInt(_0x5e918d(0xc1))/0x9*(parseInt(_0x5e918d(0xc8))/0xa);if(_0x4be647===_0x116dba)break;else _0x378325['push'](_0x378325['shift']());}catch(_0x442324){_0x378325['push'](_0x378325['shift']());}}}(a26_0x3362,0x52c04));import{BaseCommand}from'./command.js';function a26_0x321c(_0xe6572f,_0xb6690a){_0xe6572f=_0xe6572f-0x8d;const _0x33627a=a26_0x3362();let _0x321c4c=_0x33627a[_0xe6572f];return _0x321c4c;}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';function a26_0x3362(){const _0x4ff633=['end_at','Kill\x20a\x20job','...','dim','type','query','hive','164908lMDGXQ','d\x20ago','212EWxeJJ','jobType','job:kill','args','jobs','Database:\x20','status','round','\x27\x20to\x20verify\x20the\x20job\x20status','Listing\x20jobs...','INVALID_ARGUMENT','execute','List\x20jobs','floor','created_at','job:submit','push','information_schema','Limit:\x20','debug','Show\x20job\x20details','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>','red','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','Get\x20job\x20results','kill','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','Status\x20filter:\x20','description','name','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','length','green','limit','Query:\x20','getTime','m\x20ago','start_at','trino','7023enkUto','4707XSqmEg','data','Cancelled','\x20\x20Job\x20ID:\x20','abs','url','2275dNGWdr','12130JykeZW','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','3277122flhmYx','error','job_id','substring','983675DgRxzd','presto','user_name','1023220oLnqFr','file','priority','database','show','No\x20SQL\x20statements\x20found\x20in\x20file','job:show','mo\x20ago','verbose','Submitting\x20job...','Submit\x20a\x20job','list','\x20job','Job\x20type:\x20','validate','site','submit','h\x20ago','5200GMPdxl','result','success','Submitting\x20kill\x20request...','✔\x20Job\x20submitted','just\x20now','job:result'];a26_0x3362=function(){return _0x4ff633;};return a26_0x3362();}import{hyperlink}from'../sdk/util/formatters.js';import a26_0x11c1a2 from'chalk';function formatDuration(_0x2e35b3){const _0x1f1c8b=a26_0x321c;if(_0x2e35b3<0x3c)return _0x2e35b3+'s';if(_0x2e35b3<0xe10)return Math[_0x1f1c8b(0xa6)](_0x2e35b3/0x3c)+'m\x20'+_0x2e35b3%0x3c+'s';const _0x1c9f39=Math[_0x1f1c8b(0xa6)](_0x2e35b3/0xe10),_0x517c8f=Math[_0x1f1c8b(0xa6)](_0x2e35b3%0xe10/0x3c);return _0x517c8f>0x0?_0x1c9f39+'h\x20'+_0x517c8f+'m':_0x1c9f39+'h';}function formatRelativeTime(_0x3a3166){const _0xaf6077=a26_0x321c,_0x4aec9f=Date['now']()-_0x3a3166[_0xaf6077(0xbc)](),_0x36e16c=Math[_0xaf6077(0xa6)](Math[_0xaf6077(0xc5)](_0x4aec9f)/0x3e8);if(_0x36e16c<0x3c)return _0xaf6077(0x8e);const _0x231088=Math[_0xaf6077(0xa6)](_0x36e16c/0x3c);if(_0x231088<0x3c)return _0x231088+_0xaf6077(0xbd);const _0x348ce8=Math[_0xaf6077(0xa6)](_0x231088/0x3c);if(_0x348ce8<0x18)return _0x348ce8+_0xaf6077(0xe3);const _0x531b1f=Math[_0xaf6077(0xa6)](_0x348ce8/0x18);if(_0x531b1f<0x1e)return _0x531b1f+_0xaf6077(0x98);return Math[_0xaf6077(0xa6)](_0x531b1f/0x1e)+_0xaf6077(0xd9);}export class JobListCommand extends BaseCommand{[a26_0x4c3af7(0xb6)]=a26_0x4c3af7(0x9d);[a26_0x4c3af7(0xb5)]=a26_0x4c3af7(0xa5);async[a26_0x4c3af7(0xa4)](_0x4f2295){const _0x3ebeba=a26_0x4c3af7,{options:_0xd84eac,tdx:_0x5035ae}=_0x4f2295,_0x49755f=resolveLimit(_0xd84eac[_0x3ebeba(0xba)],DEFAULT_DISPLAY_LIMIT),_0x5d9023=_0xd84eac[_0x3ebeba(0x9f)];_0xd84eac['verbose']&&(console[_0x3ebeba(0xcc)](_0x3ebeba(0xab)+_0x49755f+'\x20jobs'),_0x5d9023&&console[_0x3ebeba(0xcc)](_0x3ebeba(0xb4)+_0x5d9023));const _0x394bb8=await withSpinner(_0x3ebeba(0xa2),()=>_0x5035ae['jobs'][_0x3ebeba(0xdd)]({'from':0x0,'to':_0x49755f-0x1,'status':_0x5d9023}),{'verbose':_0xd84eac[_0x3ebeba(0xda)]}),_0x3eecd0=_0x394bb8[_0x3ebeba(0xc2)];console[_0x3ebeba(0xcc)]('✔\x20Found\x20'+_0x3eecd0['length']+_0x3ebeba(0xde)+(_0x3eecd0[_0x3ebeba(0xb8)]!==0x1?'s':''));const _0x53560d=_0xd84eac[_0x3ebeba(0xe1)];if(isStructuredFormat(_0xd84eac)){const _0x4c1272=_0x3eecd0['map'](_0x245f09=>{const _0x246010=_0x3ebeba;let _0x1fae13;if(_0x245f09['start_at']&&_0x245f09[_0x246010(0x90)]){const _0x3416c3=new Date(_0x245f09['start_at'])[_0x246010(0xbc)](),_0x3c9aeb=new Date(_0x245f09[_0x246010(0x90)])[_0x246010(0xbc)]();_0x1fae13=Math[_0x246010(0xa0)]((_0x3c9aeb-_0x3416c3)/0x3e8);}return{'job_id':_0x245f09[_0x246010(0xcd)],'type':_0x245f09[_0x246010(0x94)]===_0x246010(0xd0)?_0x246010(0xbf):_0x245f09[_0x246010(0x94)],'status':_0x245f09['status'],'user_name':_0x245f09[_0x246010(0xd1)],'duration_sec':_0x1fae13,'created_at':_0x245f09['created_at'],'started_at':_0x245f09['start_at'],'end_at':_0x245f09[_0x246010(0x90)]};});await handleSDKOutput(_0x4c1272,_0xd84eac);}else for(const _0x18be5f of _0x3eecd0){const _0x5e0a4d=_0x18be5f['status']===_0x3ebeba(0xe6)?a26_0x11c1a2[_0x3ebeba(0xb9)]:_0x18be5f['status']===_0x3ebeba(0xcc)?a26_0x11c1a2[_0x3ebeba(0xaf)]:a26_0x11c1a2[_0x3ebeba(0x93)],_0x3c95cb=_0x5e0a4d(_0x18be5f[_0x3ebeba(0x9f)]),_0x3d14fe=getJobUrl(_0x53560d,_0x18be5f[_0x3ebeba(0xcd)]),_0x5325e3=hyperlink(_0x18be5f[_0x3ebeba(0xcd)],_0x3d14fe),_0xf4b364=a26_0x11c1a2[_0x3ebeba(0x93)](_0x18be5f[_0x3ebeba(0x94)]==='presto'?_0x3ebeba(0xbf):_0x18be5f[_0x3ebeba(0x94)]),_0x114ed0=[];if(_0x18be5f[_0x3ebeba(0xbe)]&&_0x18be5f[_0x3ebeba(0x90)]){const _0x1641d5=Math['round']((new Date(_0x18be5f[_0x3ebeba(0x90)])[_0x3ebeba(0xbc)]()-new Date(_0x18be5f['start_at'])[_0x3ebeba(0xbc)]())/0x3e8);_0x114ed0['push'](formatDuration(_0x1641d5));}if(_0x18be5f[_0x3ebeba(0x90)])_0x114ed0['push'](formatRelativeTime(new Date(_0x18be5f[_0x3ebeba(0x90)])));else _0x18be5f['start_at']&&_0x114ed0[_0x3ebeba(0xa9)](formatRelativeTime(new Date(_0x18be5f[_0x3ebeba(0xbe)])));const _0xb57f9e=_0x114ed0[_0x3ebeba(0xb8)]>0x0?a26_0x11c1a2[_0x3ebeba(0x93)]('\x20'+_0x114ed0['join'](',\x20')):'';console['log']('⚡\x20'+_0x5325e3+'\x20'+_0xf4b364+'\x20'+_0x3c95cb+_0xb57f9e);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0x4c3af7(0xb6)]=a26_0x4c3af7(0xd8);['description']=a26_0x4c3af7(0xad);[a26_0x4c3af7(0xe0)](_0x147544){const _0x4ced70=_0x147544['args'][0x0];if(!_0x4ced70)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>';return undefined;}async['execute'](_0x162c32){const _0x399cbf=a26_0x4c3af7,{options:_0x13bac8,args:_0x370aec,tdx:_0x19e35f}=_0x162c32,_0x1b444c=_0x370aec[0x0],_0x2d0029=await withSpinner('Getting\x20job\x20details...',()=>_0x19e35f[_0x399cbf(0x9d)][_0x399cbf(0xd6)](_0x1b444c),{'verbose':_0x13bac8[_0x399cbf(0xda)]}),_0x3ed59c=_0x2d0029[_0x399cbf(0xc2)];let _0x59baa3;if(_0x3ed59c['start_at']&&_0x3ed59c[_0x399cbf(0x90)]){const _0x4a8d93=new Date(_0x3ed59c[_0x399cbf(0xbe)])[_0x399cbf(0xbc)](),_0x3f3357=new Date(_0x3ed59c[_0x399cbf(0x90)])[_0x399cbf(0xbc)]();_0x59baa3=Math[_0x399cbf(0xa0)]((_0x3f3357-_0x4a8d93)/0x3e8);}const _0x416dba={'job_id':_0x3ed59c[_0x399cbf(0xcd)],'type':_0x3ed59c[_0x399cbf(0x94)],'status':_0x3ed59c[_0x399cbf(0x9f)],..._0x3ed59c['user_name']&&{'user_name':_0x3ed59c[_0x399cbf(0xd1)]},..._0x59baa3!==undefined&&{'duration_sec':_0x59baa3},..._0x3ed59c[_0x399cbf(0xa7)]&&{'created_at':_0x3ed59c[_0x399cbf(0xa7)]},..._0x3ed59c[_0x399cbf(0xbe)]&&{'started_at':_0x3ed59c[_0x399cbf(0xbe)]},..._0x3ed59c[_0x399cbf(0x90)]&&{'end_at':_0x3ed59c[_0x399cbf(0x90)]},..._0x3ed59c[_0x399cbf(0xd5)]&&{'database':_0x3ed59c[_0x399cbf(0xd5)]},..._0x3ed59c['priority']!==undefined&&{'priority':_0x3ed59c[_0x399cbf(0xd4)]},..._0x3ed59c['url']&&{'url':_0x3ed59c[_0x399cbf(0xc6)]},..._0x3ed59c[_0x399cbf(0x95)]&&{'query':_0x3ed59c[_0x399cbf(0x95)]},..._0x3ed59c['debug']&&{'debug':_0x3ed59c[_0x399cbf(0xac)]}};return await handleSingleObjectOutput(_0x416dba,_0x13bac8),0x0;}}export class JobKillCommand extends BaseCommand{['name']=a26_0x4c3af7(0x9b);[a26_0x4c3af7(0xb5)]=a26_0x4c3af7(0x91);[a26_0x4c3af7(0xe0)](_0x117ed3){const _0x421026=a26_0x4c3af7,_0x100957=_0x117ed3[_0x421026(0x9c)][0x0];if(!_0x100957)return _0x421026(0xae);return undefined;}async['execute'](_0x458b56){const _0x2fa75d=a26_0x4c3af7,{options:_0x255185,args:_0x2eee91,tdx:_0x888e92}=_0x458b56,_0x2f078d=_0x2eee91[0x0];if(!_0x255185['yes']){const _0x45469c=await confirm(_0x2fa75d(0xb0)+_0x2f078d+'?');if(!_0x45469c)return console[_0x2fa75d(0xcc)](_0x2fa75d(0xc3)),0x0;}return await withSpinner(_0x2fa75d(0xe7),()=>_0x888e92[_0x2fa75d(0x9d)][_0x2fa75d(0xb2)](_0x2f078d),{'verbose':_0x255185[_0x2fa75d(0xda)]}),console[_0x2fa75d(0xcc)](_0x2fa75d(0xb7)+_0x2f078d),console['error'](_0x2fa75d(0xb3)+_0x2f078d+_0x2fa75d(0xa1)),0x0;}}export class JobSubmitCommand extends BaseCommand{[a26_0x4c3af7(0xb6)]=a26_0x4c3af7(0xa8);['description']=a26_0x4c3af7(0xdc);async[a26_0x4c3af7(0xa4)](_0x3a10b8){const _0x4b62c7=a26_0x4c3af7,{options:_0x482ffe,args:_0x2420af,tdx:_0x5d9c09}=_0x3a10b8,_0x510ecf=_0x482ffe[_0x4b62c7(0x9a)]||_0x4b62c7(0xbf),_0x2fbf61=_0x482ffe[_0x4b62c7(0xd3)],_0x549d60=_0x482ffe[_0x4b62c7(0xd5)]||_0x4b62c7(0xaa),_0x242d19=_0x482ffe['result'];if(_0x510ecf!==_0x4b62c7(0xbf)&&_0x510ecf!==_0x4b62c7(0x96))throw new SDKError(ErrorCode[_0x4b62c7(0xa3)],_0x4b62c7(0xc9));let _0x4d6d5e;if(_0x2fbf61){if(_0x2420af[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4b62c7(0xca));const _0x1314d2=readSqlStatementsFromFile(_0x2fbf61);if(_0x1314d2[_0x4b62c7(0xb8)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4b62c7(0xd7));if(_0x1314d2['length']>0x1)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.');_0x4d6d5e=_0x1314d2[0x0];}else{if(!_0x2420af[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>');_0x4d6d5e=_0x2420af[0x0];}_0x482ffe[_0x4b62c7(0xda)]&&(console['error'](_0x4b62c7(0xdf)+_0x510ecf),console[_0x4b62c7(0xcc)](_0x4b62c7(0x9e)+_0x549d60),console[_0x4b62c7(0xcc)](_0x4b62c7(0xbb)+_0x4d6d5e[_0x4b62c7(0xce)](0x0,0x64)+(_0x4d6d5e[_0x4b62c7(0xb8)]>0x64?_0x4b62c7(0x92):'')));const _0x5a8e7d=await withSpinner(_0x4b62c7(0xdb),()=>_0x5d9c09[_0x4b62c7(0x9d)][_0x4b62c7(0xe2)](_0x549d60,_0x4d6d5e,_0x510ecf,_0x242d19),{'verbose':_0x482ffe[_0x4b62c7(0xda)]}),_0x1a876b=_0x5a8e7d[_0x4b62c7(0xc2)];return console[_0x4b62c7(0xcc)](_0x4b62c7(0x8d)),console[_0x4b62c7(0xcc)](_0x4b62c7(0xc4)+_0x1a876b['job_id']),await handleSDKOutput([_0x1a876b],_0x482ffe),0x0;}}export class JobResultCommand extends BaseCommand{[a26_0x4c3af7(0xb6)]=a26_0x4c3af7(0x8f);[a26_0x4c3af7(0xb5)]=a26_0x4c3af7(0xb1);[a26_0x4c3af7(0xe0)](_0x5d0d00){const _0x3752c8=_0x5d0d00['args'][0x0];if(!_0x3752c8)return'Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>';return undefined;}async[a26_0x4c3af7(0xa4)](_0x24ebaa){const _0x241d3d=a26_0x4c3af7,{options:_0xcd665c,args:_0x4e8a98,tdx:_0x4cb774}=_0x24ebaa,_0x18ba1e=_0x4e8a98[0x0],_0x43b66b=await withSpinner('Getting\x20job\x20results...',()=>_0x4cb774['jobs'][_0x241d3d(0xe5)](_0x18ba1e),{'verbose':_0xcd665c[_0x241d3d(0xda)]}),_0x440a5a=_0x43b66b[_0x241d3d(0xc2)];return console[_0x241d3d(0xcc)]('✔\x20Retrieved\x20'+_0x440a5a[_0x241d3d(0xb8)]+'\x20row'+(_0x440a5a['length']!==0x1?'s':'')),await handleSDKOutput(_0x440a5a,_0xcd665c),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x1ccf16=a27_0x2962;(function(_0x12b7bd,_0x546a2a){const _0x54589e=a27_0x2962,_0x238c39=_0x12b7bd();while(!![]){try{const _0xa8e116=-parseInt(_0x54589e(0x25e))/0x1*(-parseInt(_0x54589e(0x265))/0x2)+-parseInt(_0x54589e(0x1c7))/0x3+-parseInt(_0x54589e(0x1bb))/0x4*(-parseInt(_0x54589e(0x1fd))/0x5)+parseInt(_0x54589e(0x16b))/0x6*(-parseInt(_0x54589e(0x20c))/0x7)+-parseInt(_0x54589e(0x1d2))/0x8+-parseInt(_0x54589e(0x17b))/0x9*(-parseInt(_0x54589e(0x1f2))/0xa)+-parseInt(_0x54589e(0x1b9))/0xb*(-parseInt(_0x54589e(0x21d))/0xc);if(_0xa8e116===_0x546a2a)break;else _0x238c39['push'](_0x238c39['shift']());}catch(_0x5e0158){_0x238c39['push'](_0x238c39['shift']());}}}(a27_0x2192,0x4b5c0));import a27_0x3af12a from'chalk';import a27_0xce06a6 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';function a27_0x2192(){const _0x134e07=['conversion','find','.yml','listFolders','No\x20statistics\x20available\x20for\x20journey:\x20','hasChanges','Fetching\x20parent\x20segment...','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','listJourneysFromParentSegment','INVALID_ARGUMENT','✔\x20Pulled\x20','-\x20no\x20files\x20written','file','3090HMiVKd','connector_config','\x20journey','Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22','site','segment','getParentFull','type','history','Resuming\x20journey...','buildIdToNameMap','...','folderPath','/app/ps/','map','Getting\x20version\x20','1084833zvIsDx','relative','Write\x20','includeStats','limit','database','all','completionRate','journeyName','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file','resolveJourneyId','length','\x20\x20Preserving\x20local\x20segment\x20name:\x20','state','getActivation','\x22\x20paused','Resolved\x20YAML\x20file:\x20','json','Resolving\x20parent\x20segment...','versionNumber','List\x20activations\x20for\x20a\x20journey','\x22\x20resumed','(draft)','📁\x20','values','journey:list','Cancelled','Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22','\x20not\x20found.\x20Available:\x20','journey:view','getSegment','isNew','execute','session','Journey\x20name:\x20','rule','repeat','\x20\x20Statistics\x20not\x20available','archived','/e/','hasPeriod','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','Error:\x20Version\x20','getTrafficData','helpText','Parent\x20segment:\x20','connection','(running)','\x20version','split','utf-8','table','paused','\x20\x20Journey\x20ID:\x20','\x20\x20Name:\x20','args','red','journeyBundleId','\x20files?','Error:\x20Journey\x20not\x20found:\x20','(root)','\x5c$&','11NyNykZ','push','1046396dRcsRU','format','parentSegment','Warning:\x20Could\x20not\x20resolve\x20segment\x20','size','\x20Created\x20v','log','Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20Data','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','draft','\x22\x20not\x20found','\x20journey\x20files\x20to\x20','570198WRAwyW','message','listVersions','get','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','Export\x20journey(s)\x20as\x20YAML\x20files','bold','(archived)','root\x20folder','✔\x20Context\x20set:\x20','\x20\x20-\x20','3296448brgzqF','\x27\x20not\x20found\x20in\x20','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','\x20\x20Target:\x20','segmentPushCommand','toLowerCase','options','listJourneysWithFolders','reentryMode','journeys','\x20segment\x20rule(s)\x20to\x20match\x20for\x20','links','goal','goalSize','Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)','Resolving\x20journey...','localeCompare','\x20activation','Target\x20directory:\x20','exitOrJumpRate','journeyId','data','/j/da/je','relativePath','Resolving\x20version...','stages','includeHistory','has','Pattern:\x20','pause','updatedAt','getJourney','10nYacbk','renderStats','Fetching\x20journeys\x20and\x20folders...','then','journey:stats','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','/j/da','Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20','buildIdToEmailMap','green','5UtebjW','Pause\x20a\x20running\x20journey','\x20Opening\x20','Error:\x20Journey\x20\x27','getStatistics','List\x20journeys\x20in\x20current\x20context','Error:\x20Stage\x20\x22','\x20new\x20files','filter','Pausing\x20journey...','journeyStages','audienceId','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','Aborted.','error','3143qMKiDM','completeMilestoneRate','Listing\x20journeys...','resourceName','rootFolderId','\x20\x20Folder\x20path:\x20','filePath','absolutePath','kind','createVersion','\x20\x20Consolidating\x20duplicate\x20segment:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','journey','join','attributes','Listing\x20journey\x20versions...','✔\x20Journey\x20\x22','8290428aagmMu','web','yellow','resolveSegment','\x20versions)','List\x20all\x20versions\x20of\x20a\x20journey','resolveParentId','\x20\x20Parent\x20segment:\x20','exitOrJumpSize','Found\x20','version','\x20(ID:\x20','Show\x20journey\x20details','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','\x20changed\x20files','user','Database:\x20','jsonl','Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','activation_','Getting\x20journey\x20traffic\x20data...','base','\x20(draft)\x20—\x20\x22','journey:version:view','Getting\x20journey\x20statistics...','replace','Show\x20journey\x20table\x20column\x20mapping','yes','stringify','tdx.json','nodes','description','enteredSize','activationParams','stage','journeyBundleName','cwd','dryRun','cyan','dim','completed','\x20->\x20','Show\x20journey\x20statistics','Getting\x20column\x20mapping...','folderId','Target\x20file:\x20','getLatestJourneyId','journey:versions','Error:\x20Invalid\x20version\x20number:\x20','set','createdAt','\x0aChanges\x20to\x20\x27','resume','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','journey:columns','tsv','Listing\x20journey\x20activations...','sort','listActivationsFlat','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','journey:pull','add','\x20journeys','Input:\x20','milestoneSize','3gAajRm','Error:\x20--version\x20option\x20is\x20required','Options:','✔\x20All\x20files\x20are\x20up\x20to\x20date','diff','\x20(rule\x20match)','test','46016wRnANY','name','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','verbose','(completed)','activation','journey:version:create','Fetching\x20','content','\x0aPull\x20summary:','parent_segment'];a27_0x2192=function(){return _0x134e07;};return a27_0x2192();}import{segmentResponseToDef,journeyActivationStepToYaml,serializeRule}from'../sdk/segment/child-segment-yaml.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';import{SegmentPushCommand}from'./segment-push-command.js';import{buildFolderIdToPathMap}from'../sdk/segment/resolution-context.js';import{createTdxConfigContent}from'../sdk/segment/tdx-config.js';import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyDef,createJumpTargetCache,resolveJumpTarget}from'../sdk/segment/journey-utils.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import{hyperlink}from'../sdk/util/formatters.js';function a27_0x2962(_0x43642b,_0x6a7baf){_0x43642b=_0x43642b-0x163;const _0x21925=a27_0x2192();let _0x296223=_0x21925[_0x43642b];return _0x296223;}function requireNameOrPath(_0x136887){const _0xf40ea8=a27_0x2962;return!_0x136887&&(console[_0xf40ea8(0x20b)](_0xf40ea8(0x1cb)),console[_0xf40ea8(0x20b)]('Usage:\x20journey\x20<subcommand>\x20<name-or-path>')),!!_0x136887;}function withJsonFormat(_0x45cfbb){const _0x3779e7=a27_0x2962;if(!_0x45cfbb['format']&&!_0x45cfbb[_0x3779e7(0x18c)]&&!_0x45cfbb[_0x3779e7(0x22e)]&&!_0x45cfbb[_0x3779e7(0x254)])return{..._0x45cfbb,'format':'json','json':!![]};return _0x45cfbb;}function formatJourneyState(_0x3688a3){const _0x2a4e7d=a27_0x2962;switch(_0x3688a3){case'launched':return a27_0x3af12a['green'](_0x2a4e7d(0x1aa));case _0x2a4e7d(0x1c4):return a27_0x3af12a[_0x2a4e7d(0x244)](_0x2a4e7d(0x191));case _0x2a4e7d(0x1af):return a27_0x3af12a[_0x2a4e7d(0x21f)]('(paused)');case _0x2a4e7d(0x245):return a27_0x3af12a['blue'](_0x2a4e7d(0x269));case _0x2a4e7d(0x1a1):return a27_0x3af12a['dim'](_0x2a4e7d(0x1ce));default:return'('+_0x3688a3+')';}}function formatJourneyItem(_0x5c10bb,_0x3c8324='',_0xc43f9){const _0x13b4df=a27_0x2962,_0x3085aa=formatJourneyState(_0x5c10bb[_0x13b4df(0x188)]),_0x175564=_0xc43f9?hyperlink(_0x5c10bb[_0x13b4df(0x240)],_0xc43f9):_0x5c10bb[_0x13b4df(0x240)];return _0x3c8324+'🗺️\x20'+_0x175564+'\x20'+_0x3085aa;}function escapeRegex(_0x1faebb){const _0x481ee1=a27_0x2962;return _0x1faebb[_0x481ee1(0x236)](/[.*+?^${}()|[\]\\]/g,_0x481ee1(0x1b8));}function globToRegex(_0x3d09eb){const _0x504724=a27_0x2962,_0x12e44c=_0x3d09eb[_0x504724(0x1ac)]('*')[_0x504724(0x179)](escapeRegex);return new RegExp(_0x12e44c[_0x504724(0x219)]('.*'),'i');}function buildRuleToNameMapping(_0x1dc046){const _0x597968=a27_0x2962,_0x2697c6=new Map();if(_0x1dc046['segments'])for(const [_0x57f7af,_0x57ec19]of Object['entries'](_0x1dc046['segments'])){if(_0x57ec19[_0x597968(0x19e)]){const _0x5cf85d=serializeRule(_0x57ec19['rule']),_0xab8c1b=_0x2697c6['get'](_0x5cf85d);_0xab8c1b?_0xab8c1b[_0x597968(0x1ba)](_0x57f7af):_0x2697c6[_0x597968(0x24e)](_0x5cf85d,[_0x57f7af]);}}return _0x2697c6;}async function resolveJourneyIdFromInput(_0x13230a,_0x5e23ce,_0xfa87b5){const _0xd7e3f3=a27_0x2962,_0x2e0e99=await resolveJourneyTarget(_0x13230a,_0x5e23ce[_0xd7e3f3(0x1bd)],_0x5e23ce['verbose']),_0x46b2c8=_0x2e0e99[_0xd7e3f3(0x1bd)];if(!_0x46b2c8)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');const _0x58ddd9=await withSpinner(_0xd7e3f3(0x18d),()=>_0xfa87b5[_0xd7e3f3(0x170)][_0xd7e3f3(0x223)](_0x46b2c8),{'verbose':_0x5e23ce[_0xd7e3f3(0x268)]}),_0x26a0d1=_0x58ddd9[_0xd7e3f3(0x1e7)],_0x4e3c71=await withSpinner(_0xd7e3f3(0x1e1),()=>_0xfa87b5[_0xd7e3f3(0x218)][_0xd7e3f3(0x185)](_0x26a0d1,_0x2e0e99['journeyName']),{'verbose':_0x5e23ce[_0xd7e3f3(0x268)]});return{'journeyId':_0x4e3c71[_0xd7e3f3(0x1e7)],'journeyName':_0x2e0e99[_0xd7e3f3(0x183)],'parentSegmentId':_0x26a0d1};}async function resolveJourneyTarget(_0x187fa7,_0x44259b,_0x49f575){const _0x17d064=a27_0x2962;if(isYamlFilePath(_0x187fa7))try{const _0x22bb28=await resolveYamlFilePath(_0x187fa7);return _0x49f575&&(console[_0x17d064(0x20b)](_0x17d064(0x18b)+_0x187fa7),console[_0x17d064(0x20b)](_0x17d064(0x224)+_0x22bb28[_0x17d064(0x1bd)]),console['error'](_0x17d064(0x1b1)+_0x22bb28['segmentName']),console[_0x17d064(0x20b)](_0x17d064(0x211)+(_0x22bb28['folderPath']||_0x17d064(0x1b7)))),{'journeyName':_0x22bb28['segmentName'],'parentSegment':_0x22bb28['parentSegment'],'resolved':_0x22bb28};}catch(_0x1f2301){throw new SDKError(ErrorCode[_0x17d064(0x167)],_0x17d064(0x1a4)+_0x1f2301['message']);}if(!_0x44259b)throw new SDKError(ErrorCode[_0x17d064(0x167)],'No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');return{'journeyName':_0x187fa7,'parentSegment':_0x44259b};}export class JourneyListCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x194);[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x202);async[a27_0x1ccf16(0x19b)](_0x3f5543){const _0x1b56fc=a27_0x1ccf16,{options:_0x5ec603,args:_0x555bf9,tdx:_0x518729}=_0x3f5543,_0x55f44f=_0x555bf9[0x0],_0x1dd0ef=_0x5ec603[_0x1b56fc(0x1bd)];if(!_0x1dd0ef)return console[_0x1b56fc(0x20b)]('Error:\x20Parent\x20segment\x20context\x20required'),console[_0x1b56fc(0x20b)](_0x1b56fc(0x196)),0x1;const _0x10caaa=await withSpinner(_0x1b56fc(0x18d),()=>_0x518729[_0x1b56fc(0x170)][_0x1b56fc(0x223)](_0x1dd0ef),{'verbose':_0x5ec603[_0x1b56fc(0x268)]}),_0x1cb0ac=_0x10caaa[_0x1b56fc(0x1e7)];_0x5ec603[_0x1b56fc(0x268)]&&(console['error'](_0x1b56fc(0x1a8)+_0x1dd0ef+_0x1b56fc(0x228)+_0x1cb0ac+')'),_0x55f44f&&console[_0x1b56fc(0x20b)](_0x1b56fc(0x1ee)+_0x55f44f));const _0x424443=await withSpinner(_0x1b56fc(0x164),()=>_0x518729['segment'][_0x1b56fc(0x171)](_0x1cb0ac),{'verbose':_0x5ec603[_0x1b56fc(0x268)]}),_0xd8d71c=_0x424443[_0x1b56fc(0x1e7)],_0x509ce1=_0xd8d71c[_0x1b56fc(0x210)],_0x521aa4=await withSpinner(_0x1b56fc(0x20e),()=>_0x518729['journey'][_0x1b56fc(0x1d9)](_0x1cb0ac,_0x509ce1),{'verbose':_0x5ec603['verbose']});let _0x199500=_0x521aa4[_0x1b56fc(0x1e7)][_0x1b56fc(0x1db)];const _0x9acd1a=_0x521aa4['data']['folders'],_0x3857e2=new Map();for(const _0xf121ec of _0x9acd1a){_0x3857e2['set'](_0xf121ec['id'],_0xf121ec['name']);}if(_0x55f44f){const _0x40595a=globToRegex(_0x55f44f);_0x199500=_0x199500[_0x1b56fc(0x205)](_0x1af7b2=>_0x40595a[_0x1b56fc(0x264)](_0x1af7b2[_0x1b56fc(0x240)]));}console[_0x1b56fc(0x20b)]('✔\x20Found\x20'+_0x199500[_0x1b56fc(0x186)]+_0x1b56fc(0x16d)+(_0x199500[_0x1b56fc(0x186)]!==0x1?'s':''));const _0x5847a6=_0xedc9a7=>{const _0x4aa18e=_0x1b56fc;return getConsoleNextUrl(_0x5ec603['site'],_0x4aa18e(0x178)+_0x1cb0ac+'/e/'+_0xedc9a7+_0x4aa18e(0x1f9));};if(_0x5ec603['format']===_0x1b56fc(0x1ae))await handleSDKOutput(_0x199500,_0x5ec603);else{if(_0x5ec603[_0x1b56fc(0x1bc)]==='json'){const _0x237d27=_0x199500['map'](_0x342e96=>({..._0x342e96,'url':_0x5847a6(_0x342e96['id'])}));await handleSDKOutput(_0x237d27,_0x5ec603);}else{console[_0x1b56fc(0x1c1)]('['+_0x1dd0ef+']');const _0x187e51=new Map(),_0x3a0bef=[];for(const _0x2c2f65 of _0x199500){if(!_0x2c2f65[_0x1b56fc(0x249)]||_0x2c2f65[_0x1b56fc(0x249)]===_0x509ce1)_0x3a0bef[_0x1b56fc(0x1ba)](_0x2c2f65);else{const _0x58c058=_0x187e51[_0x1b56fc(0x1ca)](_0x2c2f65[_0x1b56fc(0x249)])||[];_0x58c058[_0x1b56fc(0x1ba)](_0x2c2f65),_0x187e51['set'](_0x2c2f65[_0x1b56fc(0x249)],_0x58c058);}}const _0xe5e82a=(_0x1275cf,_0x215803)=>_0x1275cf[_0x1b56fc(0x240)][_0x1b56fc(0x1e2)](_0x215803[_0x1b56fc(0x240)],undefined,{'sensitivity':_0x1b56fc(0x232)});_0x3a0bef[_0x1b56fc(0x256)](_0xe5e82a);for(const _0x3f0a18 of _0x3a0bef){console[_0x1b56fc(0x1c1)](formatJourneyItem(_0x3f0a18,'',_0x5847a6(_0x3f0a18['id'])));}const _0x43cb6a=[..._0x187e51['entries']()][_0x1b56fc(0x256)]((_0x2122ad,_0x56dace)=>{const _0x2df5cd=_0x1b56fc,_0x3a2a19=_0x3857e2[_0x2df5cd(0x1ca)](_0x2122ad[0x0])||_0x2122ad[0x0],_0x4e9f42=_0x3857e2['get'](_0x56dace[0x0])||_0x56dace[0x0];return _0x3a2a19['localeCompare'](_0x4e9f42,undefined,{'sensitivity':_0x2df5cd(0x232)});});for(const [_0x51d493,_0x2185be]of _0x43cb6a){const _0x42dab2=_0x3857e2[_0x1b56fc(0x1ca)](_0x51d493)||_0x51d493;console[_0x1b56fc(0x1c1)](_0x1b56fc(0x192)+_0x42dab2),_0x2185be[_0x1b56fc(0x256)](_0xe5e82a);for(const _0x359f09 of _0x2185be){console[_0x1b56fc(0x1c1)](formatJourneyItem(_0x359f09,'\x20\x20',_0x5847a6(_0x359f09['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x198);[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x229);async['execute'](_0x2e229c){const _0x42704c=a27_0x1ccf16,{options:_0x4588bf,args:_0x55badf,tdx:_0x581457}=_0x2e229c,_0x3dd03d=_0x55badf[0x0];if(!_0x3dd03d)return console[_0x42704c(0x20b)](_0x42704c(0x1cb)),console['error']('Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]'),console['error'](_0x42704c(0x260)),console[_0x42704c(0x20b)]('\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser'),0x1;_0x4588bf[_0x42704c(0x268)]&&console['error'](_0x42704c(0x25c)+_0x3dd03d);const {journeyId:_0x1cb613,parentSegmentId:_0x2f3852}=await resolveJourneyIdFromInput(_0x3dd03d,_0x4588bf,_0x581457);if(_0x4588bf[_0x42704c(0x21e)]){const _0x1dc79b=getConsoleNextUrl(_0x4588bf[_0x42704c(0x16f)],_0x42704c(0x178)+_0x2f3852+_0x42704c(0x1a2)+_0x1cb613+_0x42704c(0x1e8));return console[_0x42704c(0x20b)](a27_0x3af12a[_0x42704c(0x1fc)]('✔')+_0x42704c(0x1ff)+a27_0x3af12a[_0x42704c(0x243)](_0x1dc79b)),openBrowser(_0x1dc79b),0x0;}const _0x1770e2=await withSpinner('Getting\x20journey\x20details...',()=>_0x581457[_0x42704c(0x218)][_0x42704c(0x1f1)](_0x1cb613),{'verbose':_0x4588bf[_0x42704c(0x268)]}),_0x1d5912=_0x1770e2['data'],_0x3fe569=_0x4588bf[_0x42704c(0x17e)];let _0x33885e;if(_0x3fe569)try{const _0x5f1e8e=await withSpinner('Getting\x20journey\x20statistics...',()=>_0x581457[_0x42704c(0x218)][_0x42704c(0x201)](_0x1cb613),{'verbose':_0x4588bf[_0x42704c(0x268)]});_0x33885e=_0x5f1e8e['data'];}catch{_0x4588bf[_0x42704c(0x268)]&&console[_0x42704c(0x20b)](_0x42704c(0x1a0));}const _0x45f2b7=getConsoleNextUrl(_0x4588bf[_0x42704c(0x16f)],_0x42704c(0x178)+_0x2f3852+_0x42704c(0x1a2)+_0x1cb613+_0x42704c(0x1e8)),_0xffe0f2={'id':_0x1d5912['id'],'name':_0x1d5912[_0x42704c(0x21a)][_0x42704c(0x266)],'description':_0x1d5912[_0x42704c(0x21a)]['description'],'state':_0x1d5912[_0x42704c(0x21a)][_0x42704c(0x188)],'paused':_0x1d5912[_0x42704c(0x21a)]['paused'],'reentry_mode':_0x1d5912[_0x42704c(0x21a)][_0x42704c(0x1da)],'stages':_0x1d5912['attributes'][_0x42704c(0x207)]?.[_0x42704c(0x186)]||0x0,..._0x1d5912['attributes'][_0x42704c(0x1de)]&&{'goal':_0x1d5912[_0x42704c(0x21a)][_0x42704c(0x1de)][_0x42704c(0x266)]},..._0x33885e&&{'statistics':{'size':_0x33885e[_0x42704c(0x1bf)],'entered':_0x33885e['enteredSize'],'goal_achieved':_0x33885e[_0x42704c(0x1df)],'completion_rate':_0x33885e[_0x42704c(0x182)],'exit_or_jump':_0x33885e[_0x42704c(0x225)],'exit_or_jump_rate':_0x33885e[_0x42704c(0x1e5)],'stages':_0x33885e['stages']}},'url':_0x45f2b7};return await handleSingleObjectOutput(_0xffe0f2,_0x4588bf),0x0;}}export class JourneyStatsCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x1f6);[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x247);async[a27_0x1ccf16(0x19b)](_0x1099c9){const _0x4c0475=a27_0x1ccf16,{options:_0x292ab9,args:_0x5c07d3,tdx:_0x3af272}=_0x1099c9,_0x57c7e4=_0x5c07d3[0x0];if(!requireNameOrPath(_0x57c7e4))return 0x1;_0x292ab9[_0x4c0475(0x268)]&&console[_0x4c0475(0x20b)](_0x4c0475(0x25c)+_0x57c7e4);const _0x30735e=_0x292ab9,_0x451f6a=_0x30735e['from'],_0x147da8=_0x30735e['to'],_0xc6937b=_0x30735e['includeHistory'],_0x20ccdf=_0x30735e[_0x4c0475(0x23f)];_0xc6937b&&!_0x451f6a&&!_0x147da8&&console[_0x4c0475(0x20b)](_0x4c0475(0x1d4));const _0x3ea899=_0xc6937b?withJsonFormat(_0x292ab9):_0x292ab9,{journeyId:_0x317344,journeyName:_0x974b46}=await resolveJourneyIdFromInput(_0x57c7e4,_0x3ea899,_0x3af272),_0x2ae7bf=_0x451f6a||_0x147da8?{'from':_0x451f6a,'to':_0x147da8}:undefined,_0x2ab1a8=await withSpinner(_0x4c0475(0x235),()=>Promise[_0x4c0475(0x181)]([_0x3af272[_0x4c0475(0x218)][_0x4c0475(0x1f1)](_0x317344),_0x3af272[_0x4c0475(0x218)][_0x4c0475(0x201)](_0x317344,_0x2ae7bf)]),{'verbose':_0x3ea899[_0x4c0475(0x268)]}),[_0x4a58b7,_0x1787fc]=_0x2ab1a8[_0x4c0475(0x1e7)];if(!_0x1787fc||_0x1787fc[_0x4c0475(0x1e6)]===null)return console[_0x4c0475(0x20b)](_0x4c0475(0x274)+_0x974b46),console[_0x4c0475(0x20b)](_0x4c0475(0x252)),0x0;const _0x194cbb=buildStageNameMap(_0x4a58b7),_0x17d1a5=!!(_0x2ae7bf&&_0x1787fc[_0x4c0475(0x173)]?.[_0x4c0475(0x186)]),_0xd6cb84={'stageNameMap':_0x194cbb,'hasPeriod':_0x17d1a5,'includeHistory':!!_0xc6937b};if(_0x20ccdf&&_0x1787fc[_0x4c0475(0x1eb)]){const _0x4a4376=_0x1787fc[_0x4c0475(0x1eb)][_0x4c0475(0x271)](_0x3c7f57=>{const _0x39fec1=_0x4c0475,_0x2f7058=_0x194cbb['get'](_0x3c7f57['id'])??'';return _0x2f7058[_0x39fec1(0x1d7)]()===_0x20ccdf[_0x39fec1(0x1d7)]();});if(_0x4a4376)return await handleSingleObjectOutput(formatStageStats(_0x4a4376,_0xd6cb84),_0x3ea899),0x0;const _0x315540=_0x1787fc[_0x4c0475(0x1eb)][_0x4c0475(0x179)](_0x479b16=>_0x194cbb[_0x4c0475(0x1ca)](_0x479b16['id'])??_0x479b16['id']);return console[_0x4c0475(0x20b)](_0x4c0475(0x203)+_0x20ccdf+_0x4c0475(0x1c5)),console[_0x4c0475(0x20b)]('Available\x20stages:\x20'+_0x315540['join'](',\x20')),0x1;}const _0x4a6cff=_0x1787fc[_0x4c0475(0x1eb)]?.[_0x4c0475(0x179)](_0x24b5d7=>formatStageStats(_0x24b5d7,_0xd6cb84)),_0x372a68=assembleJourneyStats(_0x1787fc,{'from':_0x451f6a,'to':_0x147da8,'includeHistory':_0xc6937b});return await this[_0x4c0475(0x1f3)](_0x372a68,_0x4a6cff??[],_0x3ea899),0x0;}async[a27_0x1ccf16(0x1f3)](_0x7e3278,_0x1cf6f0,_0x311af3){const _0x5447b7=a27_0x1ccf16,_0x5e071f=_0x311af3[_0x5447b7(0x1bc)]==='json'||_0x311af3[_0x5447b7(0x1bc)]===_0x5447b7(0x22e)||_0x311af3['json']||_0x311af3[_0x5447b7(0x22e)];if(_0x5e071f){_0x7e3278[_0x5447b7(0x1eb)]=_0x1cf6f0,await handleSingleObjectOutput(_0x7e3278,_0x311af3);return;}await handleSingleObjectOutput(_0x7e3278,_0x311af3);for(const _0x204586 of _0x1cf6f0){console[_0x5447b7(0x1c1)](''),console[_0x5447b7(0x1c1)](String(a27_0x3af12a['cyan'][_0x5447b7(0x1cd)]('['+_0x204586[_0x5447b7(0x266)]+']'))+a27_0x3af12a[_0x5447b7(0x244)]('\x20'+_0x204586['id']));const {id:_0x40decd,name:_0x4726c5,..._0x5a45d8}=_0x204586;await handleSingleObjectOutput(_0x5a45d8,_0x311af3);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x1ccf16(0x266)]='journey:traffic';[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x1e0);async[a27_0x1ccf16(0x19b)](_0x3054e1){const _0x583db7=a27_0x1ccf16,{options:_0x5b9583,args:_0x4f1e82,tdx:_0x841391}=_0x3054e1,_0x13cb27=_0x4f1e82[0x0];if(!requireNameOrPath(_0x13cb27))return 0x1;_0x5b9583[_0x583db7(0x268)]&&console[_0x583db7(0x20b)](_0x583db7(0x25c)+_0x13cb27);const _0x1a09d5=_0x5b9583,_0x446bc=_0x1a09d5[_0x583db7(0x172)],_0x587e23=_0x1a09d5['from'],_0x29edd9=_0x1a09d5['to'],_0x4d730b=_0x1a09d5[_0x583db7(0x17f)];if(_0x446bc&&_0x446bc!=='conversion'&&_0x446bc!==_0x583db7(0x26a))return console['error']('Error:\x20Invalid\x20--type\x20\x22'+_0x446bc+_0x583db7(0x1f7)),0x1;const _0x1beafc=withJsonFormat(_0x5b9583),{journeyId:_0x48ab43,journeyName:_0x2dfa19}=await resolveJourneyIdFromInput(_0x13cb27,_0x1beafc,_0x841391),_0x5d90c8={'type':_0x446bc,'from':_0x587e23,'to':_0x29edd9,'limit':_0x4d730b},_0x3d011b=await withSpinner(_0x583db7(0x231),()=>_0x841391['journey'][_0x583db7(0x1a6)](_0x48ab43,_0x5d90c8),{'verbose':_0x1beafc[_0x583db7(0x268)]}),_0x395efa=_0x3d011b[_0x583db7(0x1e7)],_0xf17a36=_0x395efa['conversion']&&(_0x395efa[_0x583db7(0x270)][_0x583db7(0x23b)]['length']>0x0||_0x395efa[_0x583db7(0x270)][_0x583db7(0x1dd)][_0x583db7(0x186)]>0x0),_0x40cb73=_0x395efa['activation']&&_0x395efa[_0x583db7(0x26a)][_0x583db7(0x186)]>0x0;if(!_0xf17a36&&!_0x40cb73)return console[_0x583db7(0x20b)]('No\x20traffic\x20data\x20available\x20for\x20journey:\x20'+_0x2dfa19),console[_0x583db7(0x20b)](_0x583db7(0x22f)),_0x587e23&&_0x29edd9&&console[_0x583db7(0x20b)](_0x583db7(0x258)),0x0;return await handleSingleObjectOutput(_0x395efa,_0x1beafc),0x0;}}function formatStageStats(_0x3cc5e5,_0x2cb2ab){const _0x6ee351=a27_0x1ccf16,_0x5041bf=_0x2cb2ab[_0x6ee351(0x1a3)]&&_0x3cc5e5[_0x6ee351(0x173)]?.['length']?aggregateStageHistory(_0x3cc5e5[_0x6ee351(0x173)]):{'size':_0x3cc5e5[_0x6ee351(0x1bf)],'entered':_0x3cc5e5[_0x6ee351(0x23d)],'milestone':_0x3cc5e5[_0x6ee351(0x25d)],'milestone_rate':_0x3cc5e5[_0x6ee351(0x20d)],'exit_or_jump':_0x3cc5e5[_0x6ee351(0x225)],'exit_or_jump_rate':_0x3cc5e5[_0x6ee351(0x1e5)]},_0x5b2932={'id':_0x3cc5e5['id'],'name':_0x2cb2ab['stageNameMap']['get'](_0x3cc5e5['id'])??_0x3cc5e5['id'],..._0x5041bf};return _0x2cb2ab[_0x6ee351(0x1a3)]&&_0x2cb2ab[_0x6ee351(0x1ec)]&&_0x3cc5e5[_0x6ee351(0x173)]&&(_0x5b2932[_0x6ee351(0x173)]=_0x3cc5e5[_0x6ee351(0x173)]),_0x5b2932;}export class JourneyPauseCommand extends BaseCommand{[a27_0x1ccf16(0x266)]='journey:pause';[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x1fe);async['execute'](_0x2cf13e){const _0x53e8c3=a27_0x1ccf16,{options:_0x542a5a,args:_0x2d8b36,tdx:_0x268e8f}=_0x2cf13e,_0x24fa2f=_0x2d8b36[0x0];if(!requireNameOrPath(_0x24fa2f))return 0x1;_0x542a5a[_0x53e8c3(0x268)]&&console[_0x53e8c3(0x20b)](_0x53e8c3(0x25c)+_0x24fa2f);const {journeyId:_0x542161,journeyName:_0x23a5b1}=await resolveJourneyIdFromInput(_0x24fa2f,_0x542a5a,_0x268e8f);if(!_0x542a5a['yes']){const _0x23fd03=await confirm(_0x53e8c3(0x165)+_0x23a5b1+'\x22?');if(!_0x23fd03)return console['error'](_0x53e8c3(0x195)),0x0;}const _0x52450c=await withSpinner(_0x53e8c3(0x206),()=>_0x268e8f['journey'][_0x53e8c3(0x1ef)](_0x542161),{'verbose':_0x542a5a['verbose']}),_0x796eaf=_0x52450c[_0x53e8c3(0x1e7)];return console[_0x53e8c3(0x20b)]('✔\x20Journey\x20\x22'+_0x796eaf[_0x53e8c3(0x21a)]['name']+_0x53e8c3(0x18a)),0x0;}}export class JourneyResumeCommand extends BaseCommand{['name']='journey:resume';[a27_0x1ccf16(0x23c)]='Resume\x20a\x20paused\x20journey';async[a27_0x1ccf16(0x19b)](_0x273e7c){const _0xda1118=a27_0x1ccf16,{options:_0x34e368,args:_0x3e5b4e,tdx:_0x4b2317}=_0x273e7c,_0x48d903=_0x3e5b4e[0x0];if(!requireNameOrPath(_0x48d903))return 0x1;_0x34e368[_0xda1118(0x268)]&&console['error'](_0xda1118(0x25c)+_0x48d903);const {journeyId:_0x2a76d0,journeyName:_0x4ab31b}=await resolveJourneyIdFromInput(_0x48d903,_0x34e368,_0x4b2317);if(!_0x34e368['yes']){const _0xd581c3=await confirm(_0xda1118(0x16e)+_0x4ab31b+'\x22?');if(!_0xd581c3)return console[_0xda1118(0x20b)](_0xda1118(0x195)),0x0;}const _0x282db1=await withSpinner(_0xda1118(0x174),()=>_0x4b2317['journey'][_0xda1118(0x251)](_0x2a76d0),{'verbose':_0x34e368[_0xda1118(0x268)]}),_0x3a5912=_0x282db1[_0xda1118(0x1e7)];return console[_0xda1118(0x20b)](_0xda1118(0x21c)+_0x3a5912[_0xda1118(0x21a)][_0xda1118(0x266)]+_0xda1118(0x190)),0x0;}}export class JourneyPullCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x259);[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x1cc);async[a27_0x1ccf16(0x19b)](_0x1b0d51){const _0x2cec1b=a27_0x1ccf16,{options:_0x40b81a,args:_0x4260be,tdx:_0x18a23f}=_0x1b0d51,_0x3bc085=_0x40b81a,_0x525b7c=_0x4260be[0x0],_0x111d36=_0x525b7c&&isYamlFilePath(_0x525b7c),_0x4e37c2=await resolveTarget({'arg':_0x111d36?_0x525b7c:undefined,'contextParent':_0x40b81a[_0x2cec1b(0x1bd)],'cwd':process[_0x2cec1b(0x241)]()});if(!isSuccessfulResolution(_0x4e37c2))return _0x4e37c2['errorCode']==='no_parent'?(console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x21f)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x2cec1b(0x20b)]('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)'),console[_0x2cec1b(0x20b)](_0x2cec1b(0x217)),console[_0x2cec1b(0x20b)](_0x2cec1b(0x184)),console[_0x2cec1b(0x20b)](_0x2cec1b(0x22a))):(console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x1b3)]('Error:\x20'+_0x4e37c2[_0x2cec1b(0x1c8)]+'\x0a')),_0x4e37c2[_0x2cec1b(0x1a7)]&&console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x243)](_0x4e37c2[_0x2cec1b(0x1a7)]))),0x1;let _0x5ce94f=_0x111d36?undefined:_0x525b7c,_0x5c680e,_0x128294;_0x4e37c2[_0x2cec1b(0x172)]===_0x2cec1b(0x16a)&&(_0x5ce94f=_0x4e37c2[_0x2cec1b(0x20f)],_0x5c680e=_0x4e37c2[_0x2cec1b(0x212)],_0x128294=_0x4e37c2[_0x2cec1b(0x177)]);const _0x4f89a7=_0x4e37c2['parentName'],_0x244bd1=_0x4e37c2['targetDir'];_0x3bc085[_0x2cec1b(0x268)]&&(console['error']('Parent\x20segment:\x20'+_0x4f89a7),console[_0x2cec1b(0x20b)](_0x2cec1b(0x1e4)+_0x244bd1),_0x5ce94f&&console[_0x2cec1b(0x20b)](_0x2cec1b(0x19d)+_0x5ce94f),_0x5c680e&&console[_0x2cec1b(0x20b)](_0x2cec1b(0x24a)+_0x5c680e),_0x128294&&console['error']('Folder\x20path:\x20'+_0x128294));const _0x31bbe0=await withSpinner(_0x2cec1b(0x18d),()=>_0x18a23f[_0x2cec1b(0x170)][_0x2cec1b(0x223)](_0x4f89a7),{'verbose':_0x40b81a[_0x2cec1b(0x268)]}),_0x21cb82=_0x31bbe0[_0x2cec1b(0x1e7)],{journeys:_0x57b2fc,folders:_0x3c528f}=await withSpinner(_0x2cec1b(0x1f4),async()=>{const _0x490cba=_0x2cec1b,[_0x21f263,_0x393be5]=await Promise[_0x490cba(0x181)]([_0x18a23f[_0x490cba(0x218)][_0x490cba(0x166)](_0x21cb82,undefined,{'includeAllVersions':!![]}),_0x18a23f[_0x490cba(0x170)][_0x490cba(0x273)](_0x21cb82)]);return{'journeys':_0x21f263,'folders':_0x393be5};},{'verbose':_0x40b81a['verbose']})[_0x2cec1b(0x1f5)](_0x1fd049=>_0x1fd049[_0x2cec1b(0x1e7)]);let _0x2299ed=_0x57b2fc;const _0x5dc01a=buildFolderIdToPathMap(_0x3c528f);if(_0x5ce94f){const _0x3fd073=_0x2299ed[_0x2cec1b(0x205)](_0x4a65a4=>_0x4a65a4[_0x2cec1b(0x240)]['toLowerCase']()===_0x5ce94f[_0x2cec1b(0x1d7)]());if(_0x3fd073[_0x2cec1b(0x186)]===0x0)return console['error'](_0x2cec1b(0x1b6)+_0x5ce94f),console['error']('Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'),0x1;_0x2299ed=_0x3fd073;}if(_0x128294!==undefined){const _0x417d9f=_0x2299ed[_0x2cec1b(0x205)](_0x4813c7=>{const _0x2b0210=_0x2cec1b,_0x34a3ce=_0x4813c7[_0x2b0210(0x249)]?_0x5dc01a[_0x2b0210(0x1ca)](_0x4813c7[_0x2b0210(0x249)])||'':'';return _0x34a3ce===_0x128294;});if(_0x417d9f['length']===0x0&&_0x2299ed[_0x2cec1b(0x186)]>0x0){console[_0x2cec1b(0x20b)](_0x2cec1b(0x200)+_0x5ce94f+_0x2cec1b(0x1d3)+(_0x128294||_0x2cec1b(0x1cf))),console['error']('Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:');for(const _0x5e2e78 of _0x2299ed){const _0x21b547=_0x5e2e78['folderId']?_0x5dc01a[_0x2cec1b(0x1ca)](_0x5e2e78[_0x2cec1b(0x249)])||'':'';console['error'](_0x2cec1b(0x1d1)+(_0x21b547||_0x2cec1b(0x1b7))+'/'+_0x5e2e78[_0x2cec1b(0x240)]);}return 0x1;}_0x2299ed=_0x417d9f;}if(_0x2299ed['length']===0x0)return console[_0x2cec1b(0x20b)]('No\x20journeys\x20found'),0x0;const _0x517166=new Map();for(const _0x3c467b of _0x2299ed){const _0x4b145f=_0x3c467b[_0x2cec1b(0x1b4)];!_0x517166[_0x2cec1b(0x1ed)](_0x4b145f)&&_0x517166['set'](_0x4b145f,[]),_0x517166['get'](_0x4b145f)[_0x2cec1b(0x1ba)](_0x3c467b);}for(const _0x56b5db of _0x517166[_0x2cec1b(0x193)]()){_0x56b5db['sort']((_0x38f03f,_0x5a3fff)=>(_0x38f03f[_0x2cec1b(0x18e)]||0x0)-(_0x5a3fff[_0x2cec1b(0x18e)]||0x0));}const _0x7dd3dc=[],{idToEmailMap:_0x4fbb9c,connectionIdToNameMap:_0x366725}=await withSpinner('Fetching\x20users\x20and\x20connections...',async()=>{const _0x17e9bd=_0x2cec1b,[_0x340fe8,_0x21fd49]=await Promise[_0x17e9bd(0x181)]([_0x18a23f[_0x17e9bd(0x22c)][_0x17e9bd(0x1fb)](),_0x18a23f[_0x17e9bd(0x1a9)][_0x17e9bd(0x175)]()]);return{'idToEmailMap':_0x340fe8,'connectionIdToNameMap':_0x21fd49};},{'verbose':_0x40b81a[_0x2cec1b(0x268)]})['then'](_0x2fa4e0=>_0x2fa4e0['data']);for(const _0x106c73 of _0x517166[_0x2cec1b(0x193)]()){const _0x3584ee=_0x106c73[0x0][_0x2cec1b(0x240)],_0x451b74=_0x106c73[0x0][_0x2cec1b(0x249)],_0x65c59d=_0x451b74?_0x5dc01a[_0x2cec1b(0x1ca)](_0x451b74)||'':'',_0x3b52d3=_0x65c59d?a27_0xce06a6[_0x2cec1b(0x219)](_0x244bd1,_0x65c59d):_0x244bd1,_0x4093b4=_0x5c680e||a27_0xce06a6['join'](_0x3b52d3,sanitizeFileName(_0x3584ee)+_0x2cec1b(0x272));let _0x2486cf,_0x35e479;if(existsSync(_0x4093b4))try{const _0x373220=readFileSync(_0x4093b4,'utf-8'),_0x5024d8=parseYamlString(_0x373220);_0x35e479=_0x5024d8,_0x2486cf=buildRuleToNameMapping(_0x5024d8),_0x3bc085[_0x2cec1b(0x268)]&&_0x2486cf[_0x2cec1b(0x1bf)]>0x0&&console[_0x2cec1b(0x20b)]('Found\x20'+_0x2486cf[_0x2cec1b(0x1bf)]+_0x2cec1b(0x1dc)+_0x3584ee);}catch(_0x374622){_0x3bc085['verbose']&&console['error'](_0x2cec1b(0x1fa)+_0x374622[_0x2cec1b(0x1c8)]);}const _0x243929=[],_0x47ff4e=new Set(),_0xf0f2b7=new Map(),_0x4ee185=new Map(),_0x2734e3=new Set(),_0x3d9794=new Map(),_0x59f730=new Map(),_0x16f5a8=createJumpTargetCache();await withProgressSpinner(_0x2cec1b(0x26c)+_0x3584ee+_0x2cec1b(0x176),async _0x2f981a=>{const _0x543df1=_0x2cec1b;for(const _0x50939e of _0x106c73){const _0x1bb2f3=_0x106c73[_0x543df1(0x186)]>0x1?_0x50939e[_0x543df1(0x240)]+'\x20v'+(_0x50939e[_0x543df1(0x18e)]||0x1):_0x50939e[_0x543df1(0x240)];_0x2f981a['setPhase'](_0x543df1(0x26c)+_0x1bb2f3);const _0xc1e69b=await _0x18a23f['journey'][_0x543df1(0x1f1)](_0x50939e['id']),_0x1c7eee=_0xc1e69b[_0x543df1(0x21a)]?.[_0x543df1(0x208)],_0x53bb26={'resolveSegment':async _0x3f6d45=>{const _0x470815=_0x543df1;if(!_0x1c7eee)return{'name':_0x3f6d45,'isJourneyLocal':![]};const _0x1850c1=_0xf0f2b7[_0x470815(0x1ca)](_0x3f6d45);if(_0x1850c1)return _0x1850c1;try{const _0x9867e=await _0x18a23f[_0x470815(0x170)][_0x470815(0x199)](_0x1c7eee,_0x3f6d45),_0x53c0ec=_0x9867e[_0x470815(0x214)]===SEGMENT_KIND_JOURNEY;let _0x32222d,_0x307a6d=_0x9867e[_0x470815(0x266)];if(_0x53c0ec&&_0x9867e['rule']){const _0x4197c6=await segmentResponseToDef(_0x9867e,{'resolveSegmentName':async _0x26b749=>{const _0x39c8d3=_0x470815,_0x10c12d=_0xf0f2b7[_0x39c8d3(0x1ca)](_0x26b749);if(_0x10c12d)return _0x10c12d[_0x39c8d3(0x266)];const _0x18866e=await _0x53bb26[_0x39c8d3(0x220)](_0x26b749);return _0x18866e[_0x39c8d3(0x266)];}}),_0x59b7cd=_0x4197c6[_0x470815(0x19e)];_0x32222d={'description':_0x9867e[_0x470815(0x23c)],'rule':_0x59b7cd};const _0x13cabd=serializeRule(_0x59b7cd),_0x443254=_0x4ee185[_0x470815(0x1ca)](_0x13cabd);if(_0x443254)_0x307a6d=_0x443254,_0x32222d=undefined,_0x3bc085['verbose']&&console['error'](_0x470815(0x216)+_0x9867e[_0x470815(0x266)]+_0x470815(0x246)+_0x443254);else{let _0x349896=![];if(_0x2486cf){const _0x515e34=_0x2486cf[_0x470815(0x1ca)](_0x13cabd);if(_0x515e34){const _0x1eb8fa=_0x515e34[_0x470815(0x271)](_0x2cc8b6=>!_0x47ff4e[_0x470815(0x1ed)](_0x2cc8b6));_0x1eb8fa&&(_0x307a6d=_0x1eb8fa,_0x47ff4e[_0x470815(0x25a)](_0x1eb8fa),_0x4ee185[_0x470815(0x24e)](_0x13cabd,_0x1eb8fa),_0x349896=!![],_0x3bc085[_0x470815(0x268)]&&console['error'](_0x470815(0x187)+_0x1eb8fa+_0x470815(0x263)));}}if(!_0x349896){const _0x3c5eb2=generateJourneyLocalName(_0x9867e[_0x470815(0x266)]);_0x3c5eb2&&(_0x307a6d=_0x3c5eb2);let _0x50ec88=_0x307a6d,_0x45345a=0x2;while(_0x47ff4e[_0x470815(0x1ed)](_0x50ec88)){_0x50ec88=_0x307a6d+'_'+_0x45345a,_0x45345a++;}_0x47ff4e[_0x470815(0x25a)](_0x50ec88),_0x4ee185[_0x470815(0x24e)](_0x13cabd,_0x50ec88),_0x307a6d=_0x50ec88;}}}const _0x46ff63={'name':_0x307a6d,'isJourneyLocal':_0x53c0ec,'definition':_0x32222d};return _0xf0f2b7[_0x470815(0x24e)](_0x3f6d45,_0x46ff63),_0x46ff63;}catch(_0x119cbe){return _0x40b81a[_0x470815(0x268)]&&console[_0x470815(0x20b)](_0x470815(0x1be)+_0x3f6d45+':\x20'+_0x119cbe['message']),{'name':_0x3f6d45,'isJourneyLocal':![]};}},'resolveActivation':async _0x2c350c=>{const _0x26ba79=_0x543df1,_0x11daf7=_0x3d9794[_0x26ba79(0x1ca)](_0x2c350c);if(_0x11daf7)return _0x11daf7;try{const _0x525559=await _0x18a23f[_0x26ba79(0x218)][_0x26ba79(0x189)](_0x50939e['id'],_0x2c350c),_0x171121=journeyActivationStepToYaml(_0x525559,_0x4fbb9c,_0x366725),_0xf049a=JSON[_0x26ba79(0x239)]({'name':_0x171121[_0x26ba79(0x266)],'connection':_0x171121[_0x26ba79(0x1a9)],'connector_config':_0x171121[_0x26ba79(0x16c)]}),_0x3f4cab=_0x59f730['get'](_0xf049a);if(_0x3f4cab){const _0x409bbc={'name':_0x3f4cab,'isJourneyLocal':!![],'definition':_0x171121};return _0x3d9794[_0x26ba79(0x24e)](_0x2c350c,_0x409bbc),_0x409bbc;}const _0xd2a45f=_0x525559[_0x26ba79(0x21a)][_0x26ba79(0x23e)][_0x26ba79(0x266)]||_0x2c350c,_0x1a7fad=sanitizeYamlKey(_0xd2a45f)||_0x26ba79(0x230)+_0x2c350c;let _0xc746e3=_0x1a7fad,_0xfbaa5f=0x2;while(_0x2734e3[_0x26ba79(0x1ed)](_0xc746e3)){_0xc746e3=_0x1a7fad+'_'+_0xfbaa5f,_0xfbaa5f++;}_0x2734e3['add'](_0xc746e3),_0x59f730[_0x26ba79(0x24e)](_0xf049a,_0xc746e3);const _0x3b8761={'name':_0xc746e3,'isJourneyLocal':!![],'definition':_0x171121};return _0x3d9794['set'](_0x2c350c,_0x3b8761),_0x3b8761;}catch(_0x2523d8){return _0x40b81a[_0x26ba79(0x268)]&&console[_0x26ba79(0x20b)]('Warning:\x20Could\x20not\x20resolve\x20activation\x20'+_0x2c350c+':\x20'+_0x2523d8['message']),{'name':_0x2c350c,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x1be8d6,_0x181fa9)=>{const _0x376518=_0x543df1;return resolveJumpTarget(_0x1be8d6,_0x181fa9,_0x16f5a8,_0xc77bad=>_0x18a23f[_0x376518(0x218)][_0x376518(0x1f1)](_0xc77bad));}},_0x5a4380=await journeyResponseToDef(_0xc1e69b,_0x53bb26);_0x243929[_0x543df1(0x1ba)]({'item':_0x50939e,'yaml':_0x5a4380});}},{'verbose':_0x40b81a['verbose']});const _0x29d030=await _0x18a23f['journey'][_0x2cec1b(0x24b)](_0x106c73[0x0][_0x2cec1b(0x1b4)]),_0xace144=buildMergedJourneyDef(_0x243929,_0x2486cf,_0x29d030),_0xfc2783=normalizeJourneyDef(_0xace144,_0x35e479),_0x35ecb7=toYamlString(_0xfc2783),_0x20f798=_0x5c680e||a27_0xce06a6[_0x2cec1b(0x219)](_0x3b52d3,sanitizeFileName(_0x3584ee)+'.yml');!_0x5c680e&&_0x65c59d&&!existsSync(_0x3b52d3)&&mkdirSync(_0x3b52d3,{'recursive':!![]});const _0x379f49=a27_0xce06a6[_0x2cec1b(0x17c)](process[_0x2cec1b(0x241)](),_0x20f798);if(existsSync(_0x20f798)){const _0x11aaeb=readFileSync(_0x20f798,_0x2cec1b(0x1ad)),_0x4c7a31=generateDiff(_0x11aaeb,_0x35ecb7),_0x3a1cc0=hasChanges(_0x4c7a31);_0x7dd3dc[_0x2cec1b(0x1ba)]({'relativePath':_0x379f49,'absolutePath':_0x20f798,'content':_0x35ecb7,'isNew':![],'hasChanges':_0x3a1cc0,'diff':_0x3a1cc0?formatDiffWithColors(_0x4c7a31):undefined});}else _0x7dd3dc[_0x2cec1b(0x1ba)]({'relativePath':_0x379f49,'absolutePath':_0x20f798,'content':_0x35ecb7,'isNew':!![],'hasChanges':![]});}const _0x7eeb18=_0x7dd3dc['filter'](_0x322ab8=>_0x322ab8[_0x2cec1b(0x19a)]),_0x17d771=_0x7dd3dc[_0x2cec1b(0x205)](_0x48133d=>!_0x48133d['isNew']&&_0x48133d[_0x2cec1b(0x163)]),_0x158f6e=_0x7dd3dc[_0x2cec1b(0x205)](_0x500430=>!_0x500430[_0x2cec1b(0x19a)]&&!_0x500430[_0x2cec1b(0x163)]),_0x3ed5ff=_0x2299ed[_0x2cec1b(0x186)],_0x16e130=_0x517166[_0x2cec1b(0x1bf)],_0x128151=_0x3ed5ff>_0x16e130?'\x20('+_0x3ed5ff+_0x2cec1b(0x221):'';console['error'](_0x2cec1b(0x26e)),console['error']('\x20\x20'+a27_0x3af12a[_0x2cec1b(0x243)](_0x16e130+_0x2cec1b(0x25b))+a27_0x3af12a[_0x2cec1b(0x244)](_0x128151)),console[_0x2cec1b(0x20b)]('\x20\x20'+a27_0x3af12a[_0x2cec1b(0x1fc)]('+\x20'+_0x7eeb18[_0x2cec1b(0x186)]+_0x2cec1b(0x204))),console[_0x2cec1b(0x20b)]('\x20\x20'+a27_0x3af12a[_0x2cec1b(0x21f)]('~\x20'+_0x17d771[_0x2cec1b(0x186)]+_0x2cec1b(0x22b))),console[_0x2cec1b(0x20b)]('\x20\x20'+a27_0x3af12a[_0x2cec1b(0x244)]('=\x20'+_0x158f6e[_0x2cec1b(0x186)]+'\x20unchanged\x20files')),console[_0x2cec1b(0x20b)](_0x2cec1b(0x1d5)+a27_0x3af12a['cyan'](_0x244bd1)+'\x0a');if(_0x17d771[_0x2cec1b(0x186)]>0x0)for(const _0x51a6c6 of _0x17d771){console[_0x2cec1b(0x20b)](_0x2cec1b(0x250)+_0x51a6c6[_0x2cec1b(0x1e9)]+'\x27:'),console[_0x2cec1b(0x20b)]('─'[_0x2cec1b(0x19f)](0x3c)),console['error'](_0x51a6c6[_0x2cec1b(0x262)]),console[_0x2cec1b(0x20b)]('─'[_0x2cec1b(0x19f)](0x3c));}if(_0x3bc085[_0x2cec1b(0x242)])return console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x21f)](_0x2cec1b(0x1f8))),0x0;if(_0x7eeb18['length']===0x0&&_0x17d771[_0x2cec1b(0x186)]===0x0)return console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x1fc)](_0x2cec1b(0x261))),saveSessionContext({'parent_segment':_0x4f89a7},_0x3bc085[_0x2cec1b(0x19c)]),console['error'](a27_0x3af12a[_0x2cec1b(0x1fc)](_0x2cec1b(0x1d0)+a27_0x3af12a[_0x2cec1b(0x244)](_0x2cec1b(0x26f))+'\x20=\x20'+a27_0x3af12a[_0x2cec1b(0x243)](_0x4f89a7))),0x0;if(!_0x3bc085[_0x2cec1b(0x238)]&&(_0x7eeb18[_0x2cec1b(0x186)]>0x0||_0x17d771[_0x2cec1b(0x186)]>0x0)){if(!isInteractive())return console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x1b3)]('\x0aError:'),_0x2cec1b(0x1c3)),console['error'](a27_0x3af12a[_0x2cec1b(0x244)](_0x2cec1b(0x267))),0x1;const _0x4ef287=await confirmKey(_0x2cec1b(0x17d)+(_0x7eeb18[_0x2cec1b(0x186)]+_0x17d771[_0x2cec1b(0x186)])+_0x2cec1b(0x1b5));if(!_0x4ef287)return console['error'](a27_0x3af12a[_0x2cec1b(0x21f)](_0x2cec1b(0x20a)),_0x2cec1b(0x169)),0x1;}!existsSync(_0x244bd1)&&mkdirSync(_0x244bd1,{'recursive':!![]});const _0x6f744f=a27_0xce06a6[_0x2cec1b(0x219)](_0x244bd1,_0x2cec1b(0x23a));writeFileSync(_0x6f744f,createTdxConfigContent(_0x4f89a7),'utf-8');for(const _0x49bc79 of _0x7dd3dc){(_0x49bc79['isNew']||_0x49bc79['hasChanges'])&&writeFileSync(_0x49bc79[_0x2cec1b(0x213)],_0x49bc79[_0x2cec1b(0x26d)],'utf-8');}return console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x1fc)](_0x2cec1b(0x168)+(_0x7eeb18['length']+_0x17d771[_0x2cec1b(0x186)])+_0x2cec1b(0x1c6)+_0x244bd1)),saveSessionContext({'parent_segment':_0x4f89a7},_0x3bc085[_0x2cec1b(0x19c)]),console[_0x2cec1b(0x20b)](a27_0x3af12a[_0x2cec1b(0x1fc)](_0x2cec1b(0x1d0)+a27_0x3af12a[_0x2cec1b(0x244)](_0x2cec1b(0x26f))+'\x20=\x20'+a27_0x3af12a[_0x2cec1b(0x243)](_0x4f89a7))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x253);['description']=a27_0x1ccf16(0x237);async['execute'](_0x199e68){const _0x34a8fb=a27_0x1ccf16,{options:_0x46e4fc,args:_0xbc6adf,tdx:_0xff338a}=_0x199e68,_0x5d6669=_0xbc6adf[0x0];if(!requireNameOrPath(_0x5d6669))return 0x1;_0x46e4fc[_0x34a8fb(0x268)]&&console[_0x34a8fb(0x20b)](_0x34a8fb(0x25c)+_0x5d6669);const {journeyId:_0x45ee17}=await resolveJourneyIdFromInput(_0x5d6669,_0x46e4fc,_0xff338a),_0x216de1=await withSpinner(_0x34a8fb(0x248),()=>_0xff338a[_0x34a8fb(0x218)]['getColumnMapping'](_0x45ee17),{'verbose':_0x46e4fc[_0x34a8fb(0x268)]}),_0x53d33b=_0x216de1[_0x34a8fb(0x1e7)];return console[_0x34a8fb(0x1c1)](_0x34a8fb(0x22d)+_0x53d33b[_0x34a8fb(0x180)]),console[_0x34a8fb(0x1c1)]('Table:\x20'+_0x53d33b['table']),await handleSDKOutput(_0x53d33b['columns'],_0x46e4fc),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x1ccf16(0x266)]='journey:activations';['description']=a27_0x1ccf16(0x18f);async[a27_0x1ccf16(0x19b)](_0x62fc1d){const _0x548375=a27_0x1ccf16,{options:_0x26f4b0,args:_0x3a08b6,tdx:_0x4631b4}=_0x62fc1d,_0x331680=_0x3a08b6[0x0];if(!requireNameOrPath(_0x331680))return 0x1;_0x26f4b0[_0x548375(0x268)]&&console[_0x548375(0x20b)](_0x548375(0x25c)+_0x331680);const {journeyId:_0x1b3ae4}=await resolveJourneyIdFromInput(_0x331680,_0x26f4b0,_0x4631b4),_0x5c2bd2=await withSpinner(_0x548375(0x255),()=>_0x4631b4[_0x548375(0x218)][_0x548375(0x257)](_0x1b3ae4),{'verbose':_0x26f4b0['verbose']}),_0x537b8f=_0x5c2bd2[_0x548375(0x1e7)];return console[_0x548375(0x20b)](_0x548375(0x226)+_0x537b8f[_0x548375(0x186)]+_0x548375(0x1e3)+(_0x537b8f['length']!==0x1?'s':'')),await handleSDKOutput(_0x537b8f,_0x26f4b0),0x0;}}export class JourneyPushCommand extends BaseCommand{[a27_0x1ccf16(0x266)]='journey:push';[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x1c2);[a27_0x1ccf16(0x1d6)]=new SegmentPushCommand();async[a27_0x1ccf16(0x19b)](_0x3ab978){const _0x1c1ecf=a27_0x1ccf16,_0x57f02e=_0x3ab978[_0x1c1ecf(0x1b2)][0x0];let _0x526f97;if(_0x57f02e){const _0xd25d91=await resolveTarget({'arg':_0x57f02e,'contextParent':_0x3ab978['options'][_0x1c1ecf(0x1bd)],'cwd':process[_0x1c1ecf(0x241)]()});isSuccessfulResolution(_0xd25d91)&&_0xd25d91['type']==='file'&&(_0x526f97=_0xd25d91['filePath']);}const _0x252a1e={..._0x3ab978,'options':{..._0x3ab978[_0x1c1ecf(0x1d8)],'journeysOnly':!![],..._0x526f97&&{'singleFilePath':_0x526f97}}};return this[_0x1c1ecf(0x1d6)]['execute'](_0x252a1e);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x24c);[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x222);async[a27_0x1ccf16(0x19b)](_0xcd8057){const _0x5b4cc1=a27_0x1ccf16,{options:_0x3279c1,args:_0x308aaf,tdx:_0x47ee44}=_0xcd8057,_0x51a1ce=_0x308aaf[0x0];if(!requireNameOrPath(_0x51a1ce))return 0x1;if(_0x3279c1['verbose'])console[_0x5b4cc1(0x20b)]('Input:\x20'+_0x51a1ce);const {journeyId:_0x1aa475}=await resolveJourneyIdFromInput(_0x51a1ce,_0x3279c1,_0x47ee44),_0x586651=await withSpinner(_0x5b4cc1(0x21b),()=>_0x47ee44[_0x5b4cc1(0x218)][_0x5b4cc1(0x1c9)](_0x1aa475),{'verbose':_0x3279c1[_0x5b4cc1(0x268)]}),{bundleName:_0xdff4cc,versions:_0x26a0a3,latestJourneyId:_0x430f13}=_0x586651['data'];console['error'](_0xdff4cc+':\x20'+_0x26a0a3[_0x5b4cc1(0x186)]+_0x5b4cc1(0x1ab)+(_0x26a0a3[_0x5b4cc1(0x186)]!==0x1?'s':''));const _0x1e87fd=_0x26a0a3[_0x5b4cc1(0x179)](_0x521541=>({'version':_0x521541['versionNumber'],'journey_id':_0x521541[_0x5b4cc1(0x1e6)],'name':_0x521541[_0x5b4cc1(0x266)],'state':_0x521541[_0x5b4cc1(0x188)],'paused':_0x521541[_0x5b4cc1(0x1af)],'latest':_0x521541[_0x5b4cc1(0x1e6)]===_0x430f13,'created_at':_0x521541[_0x5b4cc1(0x24f)]}));return await handleSDKOutput(_0x1e87fd,_0x3279c1),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x26b);[a27_0x1ccf16(0x23c)]=a27_0x1ccf16(0x209);async[a27_0x1ccf16(0x19b)](_0x39dcb0){const _0x5236b3=a27_0x1ccf16,{options:_0x48cf9a,args:_0x22646b,tdx:_0x12e9c3}=_0x39dcb0,_0x14a655=_0x22646b[0x0];if(!requireNameOrPath(_0x14a655))return 0x1;if(_0x48cf9a[_0x5236b3(0x268)])console[_0x5236b3(0x20b)](_0x5236b3(0x25c)+_0x14a655);const {journeyId:_0x2513f9,journeyName:_0x317d12}=await resolveJourneyIdFromInput(_0x14a655,_0x48cf9a,_0x12e9c3);if(!_0x48cf9a[_0x5236b3(0x238)]){const _0x5ca3e8=await confirm('Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22'+_0x317d12+'\x22?');if(!_0x5ca3e8)return console[_0x5236b3(0x20b)](_0x5236b3(0x195)),0x0;}const _0x47b542=await withSpinner('Creating\x20new\x20version...',()=>_0x12e9c3[_0x5236b3(0x218)][_0x5236b3(0x215)](_0x2513f9),{'verbose':_0x48cf9a[_0x5236b3(0x268)]}),_0x41858f=_0x47b542['data'];return console[_0x5236b3(0x20b)](a27_0x3af12a['green']('✔')+_0x5236b3(0x1c0)+_0x41858f[_0x5236b3(0x21a)][_0x5236b3(0x18e)]+_0x5236b3(0x233)+_0x41858f['attributes']['name']+'\x22'),console[_0x5236b3(0x20b)](_0x5236b3(0x1b0)+_0x41858f['id']),await handleSingleObjectOutput({'id':_0x41858f['id'],'name':_0x41858f[_0x5236b3(0x21a)][_0x5236b3(0x266)],'version':_0x41858f['attributes'][_0x5236b3(0x18e)],'state':_0x41858f['attributes']['state'],'bundle_id':_0x41858f[_0x5236b3(0x21a)][_0x5236b3(0x1b4)],'created_at':_0x41858f[_0x5236b3(0x21a)][_0x5236b3(0x24f)]},_0x48cf9a),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{[a27_0x1ccf16(0x266)]=a27_0x1ccf16(0x234);[a27_0x1ccf16(0x23c)]='View\x20a\x20specific\x20version\x20of\x20a\x20journey';async[a27_0x1ccf16(0x19b)](_0x504d28){const _0xacfd05=a27_0x1ccf16,{options:_0x218434,args:_0x5549b0,tdx:_0x358b65}=_0x504d28,_0x40c271=_0x5549b0[0x0];if(!requireNameOrPath(_0x40c271))return 0x1;const _0x133b82=_0x218434[_0xacfd05(0x227)];if(!_0x133b82)return console[_0xacfd05(0x20b)](_0xacfd05(0x25f)),console[_0xacfd05(0x20b)]('Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N'),0x1;const _0xc0834e=parseInt(_0x133b82,0xa);if(isNaN(_0xc0834e)||_0xc0834e<0x1)return console['error'](_0xacfd05(0x24d)+_0x133b82),0x1;if(_0x218434['verbose'])console[_0xacfd05(0x20b)]('Input:\x20'+_0x40c271+',\x20version:\x20'+_0xc0834e);const {journeyId:_0x1224cc,parentSegmentId:_0x1ed227}=await resolveJourneyIdFromInput(_0x40c271,_0x218434,_0x358b65),_0x37068a=await withSpinner(_0xacfd05(0x1ea),()=>_0x358b65['journey'][_0xacfd05(0x1c9)](_0x1224cc),{'verbose':_0x218434[_0xacfd05(0x268)]}),{versions:_0x403c5d,latestJourneyId:_0x48bef6}=_0x37068a[_0xacfd05(0x1e7)],_0x865b72=_0x403c5d['find'](_0x5587d2=>_0x5587d2[_0xacfd05(0x18e)]===_0xc0834e);if(!_0x865b72){const _0x4d4b09=_0x403c5d[_0xacfd05(0x179)](_0x48c4f6=>'v'+_0x48c4f6[_0xacfd05(0x18e)])[_0xacfd05(0x219)](',\x20');return console[_0xacfd05(0x20b)](_0xacfd05(0x1a5)+_0xc0834e+_0xacfd05(0x197)+_0x4d4b09),0x1;}const _0x14e00f=await withSpinner(_0xacfd05(0x17a)+_0xc0834e+'\x20details...',()=>_0x358b65[_0xacfd05(0x218)][_0xacfd05(0x1f1)](_0x865b72[_0xacfd05(0x1e6)]),{'verbose':_0x218434[_0xacfd05(0x268)]}),_0x24e900=_0x14e00f[_0xacfd05(0x1e7)],_0x40a517=getConsoleNextUrl(_0x218434['site'],_0xacfd05(0x178)+_0x1ed227+_0xacfd05(0x1a2)+_0x865b72[_0xacfd05(0x1e6)]+_0xacfd05(0x1e8));return await handleSingleObjectOutput({'id':_0x24e900['id'],'name':_0x24e900[_0xacfd05(0x21a)][_0xacfd05(0x266)],'version':_0x24e900[_0xacfd05(0x21a)][_0xacfd05(0x18e)],'description':_0x24e900[_0xacfd05(0x21a)][_0xacfd05(0x23c)],'state':_0x24e900['attributes'][_0xacfd05(0x188)],'paused':_0x24e900['attributes'][_0xacfd05(0x1af)],'reentry_mode':_0x24e900[_0xacfd05(0x21a)]['reentryMode'],'stages':_0x24e900['attributes'][_0xacfd05(0x207)]?.[_0xacfd05(0x186)]||0x0,..._0x24e900[_0xacfd05(0x21a)]['goal']&&{'goal':_0x24e900['attributes'][_0xacfd05(0x1de)][_0xacfd05(0x266)]},'latest':_0x865b72[_0xacfd05(0x1e6)]===_0x48bef6,'created_at':_0x24e900[_0xacfd05(0x21a)][_0xacfd05(0x24f)],'updated_at':_0x24e900[_0xacfd05(0x21a)][_0xacfd05(0x1f0)],'url':_0x40a517},_0x218434),0x0;}}
|
|
1
|
+
const a27_0x3b18da=a27_0x2cba;(function(_0xa99db5,_0x20813f){const _0x5cd0f6=a27_0x2cba,_0x20e6cc=_0xa99db5();while(!![]){try{const _0x145023=-parseInt(_0x5cd0f6(0x1aa))/0x1*(-parseInt(_0x5cd0f6(0x1c8))/0x2)+parseInt(_0x5cd0f6(0x2a6))/0x3+parseInt(_0x5cd0f6(0x299))/0x4+-parseInt(_0x5cd0f6(0x207))/0x5+-parseInt(_0x5cd0f6(0x1dd))/0x6*(parseInt(_0x5cd0f6(0x272))/0x7)+parseInt(_0x5cd0f6(0x1e5))/0x8+parseInt(_0x5cd0f6(0x1a8))/0x9*(-parseInt(_0x5cd0f6(0x200))/0xa);if(_0x145023===_0x20813f)break;else _0x20e6cc['push'](_0x20e6cc['shift']());}catch(_0x126e3d){_0x20e6cc['push'](_0x20e6cc['shift']());}}}(a27_0x11f7,0x52bfe));import a27_0x1c02f5 from'chalk';import a27_0x37f8b8 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';function a27_0x11f7(){const _0x57d148=['map','pause','\x20Opening\x20','resolveSegment','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Found\x20','segmentName','\x5c$&','journey:stats','all','listFolders','✔\x20Journey\x20\x22','Parent\x20segment:\x20','/e/','renderStats','Journey\x20name:\x20','options','data','journeyId','No\x20traffic\x20data\x20available\x20for\x20journey:\x20','Write\x20','Listing\x20journey\x20versions...','Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)','args','listJourneysWithFolders','log','\x20->\x20','conversion','absolutePath','✔\x20Pulled\x20','Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22','description','journeyBundleId','journey:activations','\x0aChanges\x20to\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file','Listing\x20journeys...','audienceId','getColumnMapping','Error:\x20Journey\x20\x27','(draft)','\x20\x20Folder\x20path:\x20','(paused)','\x20journeys','getActivation','includeStats','stage','INVALID_ARGUMENT','dryRun','getLatestJourneyId','relative','\x20versions)','name','(root)','7ZYQcOB','activation','cyan','Resuming\x20journey...','\x20\x20Target:\x20','journey:version:view','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','parent_segment','\x20\x20Journey\x20ID:\x20','-\x20no\x20files\x20written','✔\x20All\x20files\x20are\x20up\x20to\x20date','filter','hasChanges','Error:\x20Invalid\x20version\x20number:\x20','helpText','journey:push','journeys','json','\x20(ID:\x20','type','Listing\x20journey\x20activations...','targetDir','message','connector_config','Show\x20journey\x20details','getJourney','Error:\x20Journey\x20not\x20found:\x20','journey:columns','test','tdx.json','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','rootFolderId','Getting\x20journey\x20traffic\x20data...','Error:\x20Invalid\x20--type\x20\x22','yes','get','repeat','\x20version','(running)','1607712VanPDq','completeMilestoneRate','set','\x20changed\x20files','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','limit','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','\x20Created\x20v','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','folders','rule','push','\x0aError:','870531DNqetI','base','session','\x22\x20not\x20found','Fetching\x20journeys\x20and\x20folders...','includeHistory','Fetching\x20','journey','Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','reentryMode','Getting\x20journey\x20details...','updatedAt','Getting\x20column\x20mapping...','Fetching\x20users\x20and\x20connections...','...','Resolving\x20version...','Resume\x20a\x20paused\x20journey','journeyName','Error:\x20Version\x20','setPhase','completionRate','🗺️\x20','localeCompare','resolveJourneyId','resolveParentId','journeyBundleName','Database:\x20','folderId','List\x20journeys\x20in\x20current\x20context','Aborted.','2493xkDSMc','Error:\x20','274471qhqaqs','draft','stageNameMap','Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','View\x20a\x20specific\x20version\x20of\x20a\x20journey','isNew','database','List\x20activations\x20for\x20a\x20journey','file','(archived)','parentName','Resolving\x20parent\x20segment...','(completed)','segment','entries','then','Fetching\x20parent\x20segment...','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','no_parent','\x20details...','Usage:\x20journey\x20<subcommand>\x20<name-or-path>','size','\x20activation','\x20not\x20found.\x20Available:\x20','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','has','\x20unchanged\x20files','Target\x20directory:\x20','Show\x20journey\x20table\x20column\x20mapping','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','4MmfxQr','\x20(rule\x20match)','nodes','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','user','journey:pause','stages','red','✔\x20Context\x20set:\x20','\x20new\x20files','utf-8','listVersions','completed','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','web','Getting\x20version\x20','diff','state','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','journey:pull','journeyStages','2273358NZGQlX','Input:\x20','length','columns','📁\x20','Getting\x20journey\x20statistics...','errorCode','connection','2146200fOLLKn','relativePath','Pattern:\x20','Usage:\x20tdx\x20journey\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Inside\x20a\x20segment\x20folder\x20(with\x20tdx.json)','Cancelled','root\x20folder','enteredSize','cwd','version','launched','milestoneSize','Pausing\x20journey...','Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22','split','createVersion','history','/j/da','add','\x20files?','versionNumber','\x20\x20Name:\x20','hasPeriod','\x20\x20Consolidating\x20duplicate\x20segment:\x20','join','\x20\x20Preserving\x20local\x20segment\x20name:\x20','verbose','\x20journey\x20files\x20to\x20','15340gIdzxR','createdAt','exitOrJumpRate','getSegment','\x22\x20paused','attributes',',\x20version:\x20','1832845nLZnXH','Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22','from','journey:list','exitOrJumpSize','\x20=\x20','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','values','.yml','Pause\x20a\x20running\x20journey','error','site','Show\x20journey\x20statistics','\x27\x20not\x20found\x20in\x20','\x20(draft)\x20—\x20\x22','/j/da/je','bold','execute','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','journey:view','getTrafficData','jsonl','Table:\x20','List\x20all\x20versions\x20of\x20a\x20journey','/app/ps/','No\x20statistics\x20available\x20for\x20journey:\x20','Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N','listActivationsFlat','No\x20journeys\x20found','sort','activationParams','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','green','toLowerCase','Options:','segmentPushCommand','Warning:\x20Could\x20not\x20resolve\x20segment\x20','format','activation_','segments','paused','\x20journey','\x0aPull\x20summary:','goal','parentSegment','yellow','find','buildIdToNameMap','Error:\x20Parent\x20segment\x20context\x20required','Folder\x20path:\x20','dim','Resolving\x20journey...','filePath'];a27_0x11f7=function(){return _0x57d148;};return a27_0x11f7();}import{SEGMENT_KIND_JOURNEY,generateJourneyLocalName,sanitizeYamlKey,buildMergedJourneyDef,createJumpTargetCache,resolveJumpTarget}from'../sdk/segment/journey-utils.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import{hyperlink}from'../sdk/util/formatters.js';function requireNameOrPath(_0x1b57f7){const _0xbe92f4=a27_0x2cba;return!_0x1b57f7&&(console['error'](_0xbe92f4(0x226)),console[_0xbe92f4(0x211)](_0xbe92f4(0x1be))),!!_0x1b57f7;}function withJsonFormat(_0xd6fae){const _0x3f5e5b=a27_0x2cba;if(!_0xd6fae[_0x3f5e5b(0x22c)]&&!_0xd6fae['json']&&!_0xd6fae[_0x3f5e5b(0x21c)]&&!_0xd6fae['tsv'])return{..._0xd6fae,'format':_0x3f5e5b(0x283),'json':!![]};return _0xd6fae;}function formatJourneyState(_0x3f18ce){const _0x6b1b0b=a27_0x2cba;switch(_0x3f18ce){case _0x6b1b0b(0x1ee):return a27_0x1c02f5['green'](_0x6b1b0b(0x298));case _0x6b1b0b(0x1ab):return a27_0x1c02f5['dim'](_0x6b1b0b(0x264));case _0x6b1b0b(0x22f):return a27_0x1c02f5['yellow'](_0x6b1b0b(0x266));case _0x6b1b0b(0x1d4):return a27_0x1c02f5['blue'](_0x6b1b0b(0x1b6));case'archived':return a27_0x1c02f5[_0x6b1b0b(0x239)](_0x6b1b0b(0x1b3));default:return'('+_0x3f18ce+')';}}function formatJourneyItem(_0x5e8f80,_0x540a43='',_0x5995b1){const _0x4671fd=a27_0x2cba,_0xc408be=formatJourneyState(_0x5e8f80[_0x4671fd(0x1d9)]),_0xa1fd45=_0x5995b1?hyperlink(_0x5e8f80[_0x4671fd(0x1a3)],_0x5995b1):_0x5e8f80['journeyBundleName'];return _0x540a43+_0x4671fd(0x19f)+_0xa1fd45+'\x20'+_0xc408be;}function escapeRegex(_0xb0f916){const _0x7f52=a27_0x2cba;return _0xb0f916['replace'](/[.*+?^${}()|[\]\\]/g,_0x7f52(0x243));}function globToRegex(_0x2c941f){const _0x432241=a27_0x2cba,_0x12352a=_0x2c941f[_0x432241(0x1f2)]('*')['map'](escapeRegex);return new RegExp(_0x12352a[_0x432241(0x1fc)]('.*'),'i');}function buildRuleToNameMapping(_0x128473){const _0x5c170d=a27_0x2cba,_0x314ec8=new Map();if(_0x128473[_0x5c170d(0x22e)])for(const [_0x538ecf,_0x3bf746]of Object[_0x5c170d(0x1b8)](_0x128473[_0x5c170d(0x22e)])){if(_0x3bf746[_0x5c170d(0x2a3)]){const _0x581fb6=serializeRule(_0x3bf746[_0x5c170d(0x2a3)]),_0x551ef1=_0x314ec8[_0x5c170d(0x295)](_0x581fb6);_0x551ef1?_0x551ef1[_0x5c170d(0x2a4)](_0x538ecf):_0x314ec8[_0x5c170d(0x29b)](_0x581fb6,[_0x538ecf]);}}return _0x314ec8;}async function resolveJourneyIdFromInput(_0x3106a4,_0x261f6c,_0x14f35c){const _0x58b683=a27_0x2cba,_0x4127df=await resolveJourneyTarget(_0x3106a4,_0x261f6c[_0x58b683(0x233)],_0x261f6c[_0x58b683(0x1fe)]),_0x3a1724=_0x4127df[_0x58b683(0x233)];if(!_0x3a1724)throw new SDKError(ErrorCode[_0x58b683(0x26b)],_0x58b683(0x192));const _0x1fe628=await withSpinner(_0x58b683(0x1b5),()=>_0x14f35c[_0x58b683(0x1b7)]['resolveParentId'](_0x3a1724),{'verbose':_0x261f6c[_0x58b683(0x1fe)]}),_0x2eb57f=_0x1fe628[_0x58b683(0x24d)],_0x55c60c=await withSpinner(_0x58b683(0x23a),()=>_0x14f35c[_0x58b683(0x191)][_0x58b683(0x1a1)](_0x2eb57f,_0x4127df[_0x58b683(0x19b)]),{'verbose':_0x261f6c[_0x58b683(0x1fe)]});return{'journeyId':_0x55c60c[_0x58b683(0x24d)],'journeyName':_0x4127df[_0x58b683(0x19b)],'parentSegmentId':_0x2eb57f};}async function resolveJourneyTarget(_0x887e30,_0x297697,_0xe01545){const _0x2e4034=a27_0x2cba;if(isYamlFilePath(_0x887e30))try{const _0x15a14e=await resolveYamlFilePath(_0x887e30);return _0xe01545&&(console[_0x2e4034(0x211)]('Resolved\x20YAML\x20file:\x20'+_0x887e30),console[_0x2e4034(0x211)]('\x20\x20Parent\x20segment:\x20'+_0x15a14e[_0x2e4034(0x233)]),console[_0x2e4034(0x211)](_0x2e4034(0x1f9)+_0x15a14e[_0x2e4034(0x242)]),console['error'](_0x2e4034(0x265)+(_0x15a14e['folderPath']||_0x2e4034(0x271)))),{'journeyName':_0x15a14e['segmentName'],'parentSegment':_0x15a14e[_0x2e4034(0x233)],'resolved':_0x15a14e};}catch(_0x1c4c59){throw new SDKError(ErrorCode[_0x2e4034(0x26b)],'Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20'+_0x1c4c59[_0x2e4034(0x288)]);}if(!_0x297697)throw new SDKError(ErrorCode[_0x2e4034(0x26b)],_0x2e4034(0x1c2));return{'journeyName':_0x887e30,'parentSegment':_0x297697};}export class JourneyListCommand extends BaseCommand{['name']=a27_0x3b18da(0x20a);['description']=a27_0x3b18da(0x1a6);async['execute'](_0x123b13){const _0x5d0ec5=a27_0x3b18da,{options:_0x358043,args:_0x201168,tdx:_0x40d69b}=_0x123b13,_0x56f67e=_0x201168[0x0],_0x2e3264=_0x358043[_0x5d0ec5(0x233)];if(!_0x2e3264)return console[_0x5d0ec5(0x211)](_0x5d0ec5(0x237)),console[_0x5d0ec5(0x211)](_0x5d0ec5(0x25a)),0x1;const _0x453626=await withSpinner(_0x5d0ec5(0x1b5),()=>_0x40d69b['segment']['resolveParentId'](_0x2e3264),{'verbose':_0x358043[_0x5d0ec5(0x1fe)]}),_0x27f8f7=_0x453626['data'];_0x358043[_0x5d0ec5(0x1fe)]&&(console[_0x5d0ec5(0x211)](_0x5d0ec5(0x248)+_0x2e3264+_0x5d0ec5(0x284)+_0x27f8f7+')'),_0x56f67e&&console[_0x5d0ec5(0x211)](_0x5d0ec5(0x1e7)+_0x56f67e));const _0x3e2032=await withSpinner(_0x5d0ec5(0x1ba),()=>_0x40d69b[_0x5d0ec5(0x1b7)]['getParentFull'](_0x27f8f7),{'verbose':_0x358043[_0x5d0ec5(0x1fe)]}),_0x1935c2=_0x3e2032[_0x5d0ec5(0x24d)],_0x56e3d0=_0x1935c2[_0x5d0ec5(0x291)],_0xac3719=await withSpinner(_0x5d0ec5(0x260),()=>_0x40d69b[_0x5d0ec5(0x191)][_0x5d0ec5(0x254)](_0x27f8f7,_0x56e3d0),{'verbose':_0x358043['verbose']});let _0x49a1b5=_0xac3719[_0x5d0ec5(0x24d)][_0x5d0ec5(0x282)];const _0x8f401f=_0xac3719[_0x5d0ec5(0x24d)][_0x5d0ec5(0x2a2)],_0xfbbab1=new Map();for(const _0x523022 of _0x8f401f){_0xfbbab1[_0x5d0ec5(0x29b)](_0x523022['id'],_0x523022['name']);}if(_0x56f67e){const _0x15aaa7=globToRegex(_0x56f67e);_0x49a1b5=_0x49a1b5['filter'](_0xcac620=>_0x15aaa7[_0x5d0ec5(0x28e)](_0xcac620[_0x5d0ec5(0x1a3)]));}console[_0x5d0ec5(0x211)]('✔\x20Found\x20'+_0x49a1b5[_0x5d0ec5(0x1df)]+_0x5d0ec5(0x230)+(_0x49a1b5[_0x5d0ec5(0x1df)]!==0x1?'s':''));const _0x3cc9a6=_0x436aa4=>{const _0x2c329c=_0x5d0ec5;return getConsoleNextUrl(_0x358043['site'],_0x2c329c(0x21f)+_0x27f8f7+_0x2c329c(0x249)+_0x436aa4+_0x2c329c(0x1f5));};if(_0x358043[_0x5d0ec5(0x22c)]==='table')await handleSDKOutput(_0x49a1b5,_0x358043);else{if(_0x358043[_0x5d0ec5(0x22c)]===_0x5d0ec5(0x283)){const _0x2e39aa=_0x49a1b5[_0x5d0ec5(0x23c)](_0x4fde3a=>({..._0x4fde3a,'url':_0x3cc9a6(_0x4fde3a['id'])}));await handleSDKOutput(_0x2e39aa,_0x358043);}else{console['log']('['+_0x2e3264+']');const _0x4b1961=new Map(),_0x5c0cfc=[];for(const _0x417e62 of _0x49a1b5){if(!_0x417e62['folderId']||_0x417e62[_0x5d0ec5(0x1a5)]===_0x56e3d0)_0x5c0cfc[_0x5d0ec5(0x2a4)](_0x417e62);else{const _0x5d6e14=_0x4b1961[_0x5d0ec5(0x295)](_0x417e62[_0x5d0ec5(0x1a5)])||[];_0x5d6e14[_0x5d0ec5(0x2a4)](_0x417e62),_0x4b1961['set'](_0x417e62['folderId'],_0x5d6e14);}}const _0x39e9e3=(_0x3c3934,_0x15174e)=>_0x3c3934[_0x5d0ec5(0x1a3)]['localeCompare'](_0x15174e['journeyBundleName'],undefined,{'sensitivity':_0x5d0ec5(0x2a7)});_0x5c0cfc['sort'](_0x39e9e3);for(const _0x434d57 of _0x5c0cfc){console[_0x5d0ec5(0x255)](formatJourneyItem(_0x434d57,'',_0x3cc9a6(_0x434d57['id'])));}const _0x521d19=[..._0x4b1961[_0x5d0ec5(0x1b8)]()][_0x5d0ec5(0x224)]((_0x5f3366,_0x28acbc)=>{const _0x46aedf=_0x5d0ec5,_0x4e68de=_0xfbbab1[_0x46aedf(0x295)](_0x5f3366[0x0])||_0x5f3366[0x0],_0x5b0091=_0xfbbab1[_0x46aedf(0x295)](_0x28acbc[0x0])||_0x28acbc[0x0];return _0x4e68de[_0x46aedf(0x1a0)](_0x5b0091,undefined,{'sensitivity':_0x46aedf(0x2a7)});});for(const [_0x40e559,_0x50c0a7]of _0x521d19){const _0x33b347=_0xfbbab1['get'](_0x40e559)||_0x40e559;console[_0x5d0ec5(0x255)](_0x5d0ec5(0x1e1)+_0x33b347),_0x50c0a7[_0x5d0ec5(0x224)](_0x39e9e3);for(const _0x2531dc of _0x50c0a7){console['log'](formatJourneyItem(_0x2531dc,'\x20\x20',_0x3cc9a6(_0x2531dc['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x3b18da(0x270)]=a27_0x3b18da(0x21a);['description']=a27_0x3b18da(0x28a);async['execute'](_0x592594){const _0x4574f9=a27_0x3b18da,{options:_0x25aed1,args:_0x5ebaf4,tdx:_0x5d4770}=_0x592594,_0x1e85e3=_0x5ebaf4[0x0];if(!_0x1e85e3)return console[_0x4574f9(0x211)](_0x4574f9(0x226)),console[_0x4574f9(0x211)]('Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]'),console[_0x4574f9(0x211)](_0x4574f9(0x229)),console['error']('\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser'),0x1;_0x25aed1['verbose']&&console[_0x4574f9(0x211)](_0x4574f9(0x1de)+_0x1e85e3);const {journeyId:_0x2ec1f4,parentSegmentId:_0x462444}=await resolveJourneyIdFromInput(_0x1e85e3,_0x25aed1,_0x5d4770);if(_0x25aed1[_0x4574f9(0x1d6)]){const _0x42d8bd=getConsoleNextUrl(_0x25aed1['site'],_0x4574f9(0x21f)+_0x462444+'/e/'+_0x2ec1f4+_0x4574f9(0x216));return console[_0x4574f9(0x211)](a27_0x1c02f5[_0x4574f9(0x227)]('✔')+_0x4574f9(0x23e)+a27_0x1c02f5[_0x4574f9(0x274)](_0x42d8bd)),openBrowser(_0x42d8bd),0x0;}const _0x38a968=await withSpinner(_0x4574f9(0x194),()=>_0x5d4770[_0x4574f9(0x191)][_0x4574f9(0x28b)](_0x2ec1f4),{'verbose':_0x25aed1[_0x4574f9(0x1fe)]}),_0x43883b=_0x38a968[_0x4574f9(0x24d)],_0x50098b=_0x25aed1[_0x4574f9(0x269)];let _0x204382;if(_0x50098b)try{const _0x2424ce=await withSpinner(_0x4574f9(0x1e2),()=>_0x5d4770['journey']['getStatistics'](_0x2ec1f4),{'verbose':_0x25aed1['verbose']});_0x204382=_0x2424ce[_0x4574f9(0x24d)];}catch{_0x25aed1[_0x4574f9(0x1fe)]&&console[_0x4574f9(0x211)]('\x20\x20Statistics\x20not\x20available');}const _0x5a6878=getConsoleNextUrl(_0x25aed1[_0x4574f9(0x212)],'/app/ps/'+_0x462444+_0x4574f9(0x249)+_0x2ec1f4+'/j/da/je'),_0x6d5fd0={'id':_0x43883b['id'],'name':_0x43883b['attributes'][_0x4574f9(0x270)],'description':_0x43883b[_0x4574f9(0x205)][_0x4574f9(0x25b)],'state':_0x43883b[_0x4574f9(0x205)][_0x4574f9(0x1d9)],'paused':_0x43883b[_0x4574f9(0x205)][_0x4574f9(0x22f)],'reentry_mode':_0x43883b['attributes']['reentryMode'],'stages':_0x43883b[_0x4574f9(0x205)][_0x4574f9(0x1dc)]?.[_0x4574f9(0x1df)]||0x0,..._0x43883b[_0x4574f9(0x205)]['goal']&&{'goal':_0x43883b['attributes']['goal'][_0x4574f9(0x270)]},..._0x204382&&{'statistics':{'size':_0x204382[_0x4574f9(0x1bf)],'entered':_0x204382['enteredSize'],'goal_achieved':_0x204382['goalSize'],'completion_rate':_0x204382[_0x4574f9(0x19e)],'exit_or_jump':_0x204382['exitOrJumpSize'],'exit_or_jump_rate':_0x204382[_0x4574f9(0x202)],'stages':_0x204382['stages']}},'url':_0x5a6878};return await handleSingleObjectOutput(_0x6d5fd0,_0x25aed1),0x0;}}export class JourneyStatsCommand extends BaseCommand{['name']=a27_0x3b18da(0x244);[a27_0x3b18da(0x25b)]=a27_0x3b18da(0x213);async[a27_0x3b18da(0x218)](_0x384823){const _0x1047f5=a27_0x3b18da,{options:_0xa0ffac,args:_0x4e73a7,tdx:_0x3b476f}=_0x384823,_0x5a33e4=_0x4e73a7[0x0];if(!requireNameOrPath(_0x5a33e4))return 0x1;_0xa0ffac[_0x1047f5(0x1fe)]&&console[_0x1047f5(0x211)](_0x1047f5(0x1de)+_0x5a33e4);const _0xc616c1=_0xa0ffac,_0x10d2bc=_0xc616c1[_0x1047f5(0x209)],_0x32cf9d=_0xc616c1['to'],_0x5831ba=_0xc616c1[_0x1047f5(0x18f)],_0x3e7462=_0xc616c1[_0x1047f5(0x26a)];_0x5831ba&&!_0x10d2bc&&!_0x32cf9d&&console[_0x1047f5(0x211)]('Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history');const _0x40eab8=_0x5831ba?withJsonFormat(_0xa0ffac):_0xa0ffac,{journeyId:_0x32c9f6,journeyName:_0x3c8be2}=await resolveJourneyIdFromInput(_0x5a33e4,_0x40eab8,_0x3b476f),_0x4465ed=_0x10d2bc||_0x32cf9d?{'from':_0x10d2bc,'to':_0x32cf9d}:undefined,_0x43d362=await withSpinner('Getting\x20journey\x20statistics...',()=>Promise[_0x1047f5(0x245)]([_0x3b476f[_0x1047f5(0x191)]['getJourney'](_0x32c9f6),_0x3b476f[_0x1047f5(0x191)]['getStatistics'](_0x32c9f6,_0x4465ed)]),{'verbose':_0x40eab8[_0x1047f5(0x1fe)]}),[_0x583406,_0x1e6a78]=_0x43d362[_0x1047f5(0x24d)];if(!_0x1e6a78||_0x1e6a78['journeyId']===null)return console['error'](_0x1047f5(0x220)+_0x3c8be2),console['error'](_0x1047f5(0x1da)),0x0;const _0x2f0a37=buildStageNameMap(_0x583406),_0x5ac976=!!(_0x4465ed&&_0x1e6a78[_0x1047f5(0x1f4)]?.['length']),_0x13a13f={'stageNameMap':_0x2f0a37,'hasPeriod':_0x5ac976,'includeHistory':!!_0x5831ba};if(_0x3e7462&&_0x1e6a78[_0x1047f5(0x1ce)]){const _0x1e6636=_0x1e6a78[_0x1047f5(0x1ce)][_0x1047f5(0x235)](_0x4153f6=>{const _0x3b6aed=_0x1047f5,_0x4ed8a7=_0x2f0a37[_0x3b6aed(0x295)](_0x4153f6['id'])??'';return _0x4ed8a7['toLowerCase']()===_0x3e7462[_0x3b6aed(0x228)]();});if(_0x1e6636)return await handleSingleObjectOutput(formatStageStats(_0x1e6636,_0x13a13f),_0x40eab8),0x0;const _0x37b113=_0x1e6a78[_0x1047f5(0x1ce)][_0x1047f5(0x23c)](_0x33aa29=>_0x2f0a37[_0x1047f5(0x295)](_0x33aa29['id'])??_0x33aa29['id']);return console[_0x1047f5(0x211)]('Error:\x20Stage\x20\x22'+_0x3e7462+_0x1047f5(0x2a9)),console[_0x1047f5(0x211)]('Available\x20stages:\x20'+_0x37b113[_0x1047f5(0x1fc)](',\x20')),0x1;}const _0x4d8ccb=_0x1e6a78['stages']?.[_0x1047f5(0x23c)](_0x4719c7=>formatStageStats(_0x4719c7,_0x13a13f)),_0x6e6f1f=assembleJourneyStats(_0x1e6a78,{'from':_0x10d2bc,'to':_0x32cf9d,'includeHistory':_0x5831ba});return await this['renderStats'](_0x6e6f1f,_0x4d8ccb??[],_0x40eab8),0x0;}async[a27_0x3b18da(0x24a)](_0xcc69f9,_0x4ebe4c,_0x1603be){const _0x5712ff=a27_0x3b18da,_0x52a142=_0x1603be[_0x5712ff(0x22c)]===_0x5712ff(0x283)||_0x1603be['format']===_0x5712ff(0x21c)||_0x1603be['json']||_0x1603be['jsonl'];if(_0x52a142){_0xcc69f9[_0x5712ff(0x1ce)]=_0x4ebe4c,await handleSingleObjectOutput(_0xcc69f9,_0x1603be);return;}await handleSingleObjectOutput(_0xcc69f9,_0x1603be);for(const _0x298226 of _0x4ebe4c){console[_0x5712ff(0x255)](''),console['log'](String(a27_0x1c02f5[_0x5712ff(0x274)][_0x5712ff(0x217)]('['+_0x298226['name']+']'))+a27_0x1c02f5[_0x5712ff(0x239)]('\x20'+_0x298226['id']));const {id:_0x59e89a,name:_0x31e5a9,..._0x1a1388}=_0x298226;await handleSingleObjectOutput(_0x1a1388,_0x1603be);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x3b18da(0x270)]='journey:traffic';[a27_0x3b18da(0x25b)]=a27_0x3b18da(0x252);async['execute'](_0x48b80c){const _0x30f6ca=a27_0x3b18da,{options:_0x2d7206,args:_0x411982,tdx:_0xf17738}=_0x48b80c,_0x400c5f=_0x411982[0x0];if(!requireNameOrPath(_0x400c5f))return 0x1;_0x2d7206[_0x30f6ca(0x1fe)]&&console[_0x30f6ca(0x211)](_0x30f6ca(0x1de)+_0x400c5f);const _0x40f46c=_0x2d7206,_0x21313b=_0x40f46c[_0x30f6ca(0x285)],_0x471824=_0x40f46c[_0x30f6ca(0x209)],_0x4636e6=_0x40f46c['to'],_0x2ddf4f=_0x40f46c[_0x30f6ca(0x29e)];if(_0x21313b&&_0x21313b!==_0x30f6ca(0x257)&&_0x21313b!==_0x30f6ca(0x273))return console['error'](_0x30f6ca(0x293)+_0x21313b+_0x30f6ca(0x2a1)),0x1;const _0x23e758=withJsonFormat(_0x2d7206),{journeyId:_0x634194,journeyName:_0x549748}=await resolveJourneyIdFromInput(_0x400c5f,_0x23e758,_0xf17738),_0x5410b3={'type':_0x21313b,'from':_0x471824,'to':_0x4636e6,'limit':_0x2ddf4f},_0x3aaaa5=await withSpinner(_0x30f6ca(0x292),()=>_0xf17738['journey'][_0x30f6ca(0x21b)](_0x634194,_0x5410b3),{'verbose':_0x23e758[_0x30f6ca(0x1fe)]}),_0x2c3d20=_0x3aaaa5[_0x30f6ca(0x24d)],_0x5391a7=_0x2c3d20[_0x30f6ca(0x257)]&&(_0x2c3d20['conversion'][_0x30f6ca(0x1ca)][_0x30f6ca(0x1df)]>0x0||_0x2c3d20[_0x30f6ca(0x257)]['links'][_0x30f6ca(0x1df)]>0x0),_0x16e426=_0x2c3d20[_0x30f6ca(0x273)]&&_0x2c3d20[_0x30f6ca(0x273)][_0x30f6ca(0x1df)]>0x0;if(!_0x5391a7&&!_0x16e426)return console[_0x30f6ca(0x211)](_0x30f6ca(0x24f)+_0x549748),console['error'](_0x30f6ca(0x1ad)),_0x471824&&_0x4636e6&&console[_0x30f6ca(0x211)](_0x30f6ca(0x1cb)),0x0;return await handleSingleObjectOutput(_0x2c3d20,_0x23e758),0x0;}}function formatStageStats(_0x538549,_0x1d17b3){const _0x4d4786=a27_0x3b18da,_0x3d6613=_0x1d17b3['hasPeriod']&&_0x538549[_0x4d4786(0x1f4)]?.[_0x4d4786(0x1df)]?aggregateStageHistory(_0x538549[_0x4d4786(0x1f4)]):{'size':_0x538549['size'],'entered':_0x538549[_0x4d4786(0x1eb)],'milestone':_0x538549[_0x4d4786(0x1ef)],'milestone_rate':_0x538549[_0x4d4786(0x29a)],'exit_or_jump':_0x538549[_0x4d4786(0x20b)],'exit_or_jump_rate':_0x538549[_0x4d4786(0x202)]},_0x3ae9a0={'id':_0x538549['id'],'name':_0x1d17b3[_0x4d4786(0x1ac)][_0x4d4786(0x295)](_0x538549['id'])??_0x538549['id'],..._0x3d6613};return _0x1d17b3[_0x4d4786(0x1fa)]&&_0x1d17b3['includeHistory']&&_0x538549[_0x4d4786(0x1f4)]&&(_0x3ae9a0['history']=_0x538549[_0x4d4786(0x1f4)]),_0x3ae9a0;}export class JourneyPauseCommand extends BaseCommand{[a27_0x3b18da(0x270)]=a27_0x3b18da(0x1cd);['description']=a27_0x3b18da(0x210);async[a27_0x3b18da(0x218)](_0xd98da9){const _0x264df1=a27_0x3b18da,{options:_0x450d83,args:_0x3313de,tdx:_0x44ad69}=_0xd98da9,_0x40e1ac=_0x3313de[0x0];if(!requireNameOrPath(_0x40e1ac))return 0x1;_0x450d83['verbose']&&console['error']('Input:\x20'+_0x40e1ac);const {journeyId:_0x40c91f,journeyName:_0x4559ed}=await resolveJourneyIdFromInput(_0x40e1ac,_0x450d83,_0x44ad69);if(!_0x450d83[_0x264df1(0x294)]){const _0x357f31=await confirm(_0x264df1(0x1bb)+_0x4559ed+'\x22?');if(!_0x357f31)return console[_0x264df1(0x211)](_0x264df1(0x1e9)),0x0;}const _0x4642ac=await withSpinner(_0x264df1(0x1f0),()=>_0x44ad69[_0x264df1(0x191)][_0x264df1(0x23d)](_0x40c91f),{'verbose':_0x450d83[_0x264df1(0x1fe)]}),_0x577c3a=_0x4642ac[_0x264df1(0x24d)];return console[_0x264df1(0x211)](_0x264df1(0x247)+_0x577c3a['attributes'][_0x264df1(0x270)]+_0x264df1(0x204)),0x0;}}function a27_0x2cba(_0x423bcb,_0x24f085){_0x423bcb=_0x423bcb-0x18f;const _0x11f76f=a27_0x11f7();let _0x2cbac1=_0x11f76f[_0x423bcb];return _0x2cbac1;}export class JourneyResumeCommand extends BaseCommand{[a27_0x3b18da(0x270)]='journey:resume';[a27_0x3b18da(0x25b)]=a27_0x3b18da(0x19a);async[a27_0x3b18da(0x218)](_0x2ad8a5){const _0x3aa84f=a27_0x3b18da,{options:_0x216a1a,args:_0x39e797,tdx:_0x571b0e}=_0x2ad8a5,_0x124e20=_0x39e797[0x0];if(!requireNameOrPath(_0x124e20))return 0x1;_0x216a1a['verbose']&&console[_0x3aa84f(0x211)](_0x3aa84f(0x1de)+_0x124e20);const {journeyId:_0x50aa58,journeyName:_0x191cc5}=await resolveJourneyIdFromInput(_0x124e20,_0x216a1a,_0x571b0e);if(!_0x216a1a['yes']){const _0x529c69=await confirm(_0x3aa84f(0x1f1)+_0x191cc5+'\x22?');if(!_0x529c69)return console[_0x3aa84f(0x211)](_0x3aa84f(0x1e9)),0x0;}const _0x3bc46e=await withSpinner(_0x3aa84f(0x275),()=>_0x571b0e[_0x3aa84f(0x191)]['resume'](_0x50aa58),{'verbose':_0x216a1a[_0x3aa84f(0x1fe)]}),_0x5c4445=_0x3bc46e[_0x3aa84f(0x24d)];return console['error']('✔\x20Journey\x20\x22'+_0x5c4445[_0x3aa84f(0x205)][_0x3aa84f(0x270)]+'\x22\x20resumed'),0x0;}}export class JourneyPullCommand extends BaseCommand{['name']=a27_0x3b18da(0x1db);[a27_0x3b18da(0x25b)]='Export\x20journey(s)\x20as\x20YAML\x20files';async[a27_0x3b18da(0x218)](_0x311960){const _0x183199=a27_0x3b18da,{options:_0x4cf6ba,args:_0x1b355f,tdx:_0xa754a9}=_0x311960,_0x330ab6=_0x4cf6ba,_0x5ddaf5=_0x1b355f[0x0],_0x323d7e=_0x5ddaf5&&isYamlFilePath(_0x5ddaf5),_0x865661=await resolveTarget({'arg':_0x323d7e?_0x5ddaf5:undefined,'contextParent':_0x4cf6ba[_0x183199(0x233)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x865661))return _0x865661[_0x183199(0x1e3)]===_0x183199(0x1bc)?(console[_0x183199(0x211)](a27_0x1c02f5['yellow'](_0x183199(0x29d))),console['error'](_0x183199(0x1e8)),console[_0x183199(0x211)](_0x183199(0x290)),console[_0x183199(0x211)](_0x183199(0x25f)),console[_0x183199(0x211)](_0x183199(0x278))):(console[_0x183199(0x211)](a27_0x1c02f5['red'](_0x183199(0x1a9)+_0x865661['message']+'\x0a')),_0x865661['helpText']&&console[_0x183199(0x211)](a27_0x1c02f5[_0x183199(0x274)](_0x865661[_0x183199(0x280)]))),0x1;let _0x9968f3=_0x323d7e?undefined:_0x5ddaf5,_0xfc1d30,_0xb84994;_0x865661[_0x183199(0x285)]===_0x183199(0x1b2)&&(_0x9968f3=_0x865661['resourceName'],_0xfc1d30=_0x865661[_0x183199(0x23b)],_0xb84994=_0x865661['folderPath']);const _0x11dafb=_0x865661[_0x183199(0x1b4)],_0x370d01=_0x865661[_0x183199(0x287)];_0x330ab6[_0x183199(0x1fe)]&&(console[_0x183199(0x211)](_0x183199(0x248)+_0x11dafb),console[_0x183199(0x211)](_0x183199(0x1c5)+_0x370d01),_0x9968f3&&console[_0x183199(0x211)](_0x183199(0x24b)+_0x9968f3),_0xfc1d30&&console['error']('Target\x20file:\x20'+_0xfc1d30),_0xb84994&&console[_0x183199(0x211)](_0x183199(0x238)+_0xb84994));const _0x226300=await withSpinner(_0x183199(0x1b5),()=>_0xa754a9['segment'][_0x183199(0x1a2)](_0x11dafb),{'verbose':_0x4cf6ba[_0x183199(0x1fe)]}),_0x27792e=_0x226300[_0x183199(0x24d)],{journeys:_0xdc9043,folders:_0x18f80e}=await withSpinner(_0x183199(0x2aa),async()=>{const _0x4281b0=_0x183199,[_0x36f808,_0x4ab375]=await Promise[_0x4281b0(0x245)]([_0xa754a9['journey']['listJourneysFromParentSegment'](_0x27792e,undefined,{'includeAllVersions':!![]}),_0xa754a9[_0x4281b0(0x1b7)][_0x4281b0(0x246)](_0x27792e)]);return{'journeys':_0x36f808,'folders':_0x4ab375};},{'verbose':_0x4cf6ba[_0x183199(0x1fe)]})[_0x183199(0x1b9)](_0x13a9c1=>_0x13a9c1['data']);let _0x1200e7=_0xdc9043;const _0x54e5ee=buildFolderIdToPathMap(_0x18f80e);if(_0x9968f3){const _0x8ca481=_0x1200e7[_0x183199(0x27d)](_0x236c1e=>_0x236c1e['journeyBundleName'][_0x183199(0x228)]()===_0x9968f3['toLowerCase']());if(_0x8ca481[_0x183199(0x1df)]===0x0)return console[_0x183199(0x211)](_0x183199(0x28c)+_0x9968f3),console[_0x183199(0x211)](_0x183199(0x1d5)),0x1;_0x1200e7=_0x8ca481;}if(_0xb84994!==undefined){const _0x35a26c=_0x1200e7['filter'](_0x498e32=>{const _0x119892=_0x183199,_0x29f89b=_0x498e32[_0x119892(0x1a5)]?_0x54e5ee['get'](_0x498e32[_0x119892(0x1a5)])||'':'';return _0x29f89b===_0xb84994;});if(_0x35a26c[_0x183199(0x1df)]===0x0&&_0x1200e7[_0x183199(0x1df)]>0x0){console[_0x183199(0x211)](_0x183199(0x263)+_0x9968f3+_0x183199(0x214)+(_0xb84994||_0x183199(0x1ea))),console[_0x183199(0x211)](_0x183199(0x219));for(const _0x344238 of _0x1200e7){const _0x1f4c9e=_0x344238[_0x183199(0x1a5)]?_0x54e5ee[_0x183199(0x295)](_0x344238[_0x183199(0x1a5)])||'':'';console['error']('\x20\x20-\x20'+(_0x1f4c9e||_0x183199(0x271))+'/'+_0x344238[_0x183199(0x1a3)]);}return 0x1;}_0x1200e7=_0x35a26c;}if(_0x1200e7[_0x183199(0x1df)]===0x0)return console[_0x183199(0x211)](_0x183199(0x223)),0x0;const _0x247d6e=new Map();for(const _0x5d89a5 of _0x1200e7){const _0x5a7d00=_0x5d89a5[_0x183199(0x25c)];!_0x247d6e[_0x183199(0x1c3)](_0x5a7d00)&&_0x247d6e[_0x183199(0x29b)](_0x5a7d00,[]),_0x247d6e['get'](_0x5a7d00)[_0x183199(0x2a4)](_0x5d89a5);}for(const _0xaf191c of _0x247d6e[_0x183199(0x20e)]()){_0xaf191c[_0x183199(0x224)]((_0x1af6d2,_0x3fe15d)=>(_0x1af6d2[_0x183199(0x1f8)]||0x0)-(_0x3fe15d[_0x183199(0x1f8)]||0x0));}const _0x4aa881=[],{idToEmailMap:_0x58a638,connectionIdToNameMap:_0x15bcc1}=await withSpinner(_0x183199(0x197),async()=>{const _0x340d4b=_0x183199,[_0x41a694,_0x4129ed]=await Promise['all']([_0xa754a9[_0x340d4b(0x1cc)]['buildIdToEmailMap'](),_0xa754a9[_0x340d4b(0x1e4)][_0x340d4b(0x236)]()]);return{'idToEmailMap':_0x41a694,'connectionIdToNameMap':_0x4129ed};},{'verbose':_0x4cf6ba['verbose']})[_0x183199(0x1b9)](_0x23a30d=>_0x23a30d[_0x183199(0x24d)]);for(const _0x547378 of _0x247d6e['values']()){const _0x2906be=_0x547378[0x0][_0x183199(0x1a3)],_0x213a27=_0x547378[0x0]['folderId'],_0x15ae43=_0x213a27?_0x54e5ee[_0x183199(0x295)](_0x213a27)||'':'',_0x46568e=_0x15ae43?a27_0x37f8b8[_0x183199(0x1fc)](_0x370d01,_0x15ae43):_0x370d01,_0x4b4496=_0xfc1d30||a27_0x37f8b8[_0x183199(0x1fc)](_0x46568e,sanitizeFileName(_0x2906be)+_0x183199(0x20f));let _0x58874e,_0x3334e6;if(existsSync(_0x4b4496))try{const _0xc71f1e=readFileSync(_0x4b4496,'utf-8'),_0x1e3178=parseYamlString(_0xc71f1e);_0x3334e6=_0x1e3178,_0x58874e=buildRuleToNameMapping(_0x1e3178),_0x330ab6['verbose']&&_0x58874e[_0x183199(0x1bf)]>0x0&&console[_0x183199(0x211)](_0x183199(0x241)+_0x58874e[_0x183199(0x1bf)]+'\x20segment\x20rule(s)\x20to\x20match\x20for\x20'+_0x2906be);}catch(_0x3425ec){_0x330ab6[_0x183199(0x1fe)]&&console[_0x183199(0x211)]('Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20'+_0x3425ec[_0x183199(0x288)]);}const _0x27a1ae=[],_0x1fc0f1=new Set(),_0x532371=new Map(),_0x44e00a=new Map(),_0x3691f8=new Set(),_0x3e5429=new Map(),_0x5353a4=new Map(),_0x7c3336=createJumpTargetCache();await withProgressSpinner(_0x183199(0x190)+_0x2906be+_0x183199(0x198),async _0x4d4a8b=>{const _0x137775=_0x183199;for(const _0x48fa81 of _0x547378){const _0xc708de=_0x547378[_0x137775(0x1df)]>0x1?_0x48fa81[_0x137775(0x1a3)]+'\x20v'+(_0x48fa81[_0x137775(0x1f8)]||0x1):_0x48fa81[_0x137775(0x1a3)];_0x4d4a8b[_0x137775(0x19d)](_0x137775(0x190)+_0xc708de);const _0xa8c37f=await _0xa754a9[_0x137775(0x191)]['getJourney'](_0x48fa81['id']),_0x354c0f=_0xa8c37f[_0x137775(0x205)]?.[_0x137775(0x261)],_0x167c92={'resolveSegment':async _0x32b60c=>{const _0x1eee60=_0x137775;if(!_0x354c0f)return{'name':_0x32b60c,'isJourneyLocal':![]};const _0x3e9087=_0x532371[_0x1eee60(0x295)](_0x32b60c);if(_0x3e9087)return _0x3e9087;try{const _0x56c2e0=await _0xa754a9['segment'][_0x1eee60(0x203)](_0x354c0f,_0x32b60c),_0x4b4e11=_0x56c2e0['kind']===SEGMENT_KIND_JOURNEY;let _0x3b7114,_0x4b830d=_0x56c2e0['name'];if(_0x4b4e11&&_0x56c2e0[_0x1eee60(0x2a3)]){const _0x448ed7=await segmentResponseToDef(_0x56c2e0,{'resolveSegmentName':async _0x522248=>{const _0x3b413b=_0x1eee60,_0x101643=_0x532371[_0x3b413b(0x295)](_0x522248);if(_0x101643)return _0x101643[_0x3b413b(0x270)];const _0x53fe59=await _0x167c92[_0x3b413b(0x23f)](_0x522248);return _0x53fe59[_0x3b413b(0x270)];}}),_0x406cca=_0x448ed7['rule'];_0x3b7114={'description':_0x56c2e0[_0x1eee60(0x25b)],'rule':_0x406cca};const _0x52d46d=serializeRule(_0x406cca),_0x31b688=_0x44e00a[_0x1eee60(0x295)](_0x52d46d);if(_0x31b688)_0x4b830d=_0x31b688,_0x3b7114=undefined,_0x330ab6['verbose']&&console['error'](_0x1eee60(0x1fb)+_0x56c2e0[_0x1eee60(0x270)]+_0x1eee60(0x256)+_0x31b688);else{let _0x3fefda=![];if(_0x58874e){const _0x555e03=_0x58874e[_0x1eee60(0x295)](_0x52d46d);if(_0x555e03){const _0x2d5110=_0x555e03[_0x1eee60(0x235)](_0x2302e6=>!_0x1fc0f1[_0x1eee60(0x1c3)](_0x2302e6));_0x2d5110&&(_0x4b830d=_0x2d5110,_0x1fc0f1[_0x1eee60(0x1f6)](_0x2d5110),_0x44e00a[_0x1eee60(0x29b)](_0x52d46d,_0x2d5110),_0x3fefda=!![],_0x330ab6[_0x1eee60(0x1fe)]&&console[_0x1eee60(0x211)](_0x1eee60(0x1fd)+_0x2d5110+_0x1eee60(0x1c9)));}}if(!_0x3fefda){const _0x2d62ff=generateJourneyLocalName(_0x56c2e0[_0x1eee60(0x270)]);_0x2d62ff&&(_0x4b830d=_0x2d62ff);let _0x1b46c9=_0x4b830d,_0x523caa=0x2;while(_0x1fc0f1[_0x1eee60(0x1c3)](_0x1b46c9)){_0x1b46c9=_0x4b830d+'_'+_0x523caa,_0x523caa++;}_0x1fc0f1[_0x1eee60(0x1f6)](_0x1b46c9),_0x44e00a[_0x1eee60(0x29b)](_0x52d46d,_0x1b46c9),_0x4b830d=_0x1b46c9;}}}const _0x111b85={'name':_0x4b830d,'isJourneyLocal':_0x4b4e11,'definition':_0x3b7114};return _0x532371[_0x1eee60(0x29b)](_0x32b60c,_0x111b85),_0x111b85;}catch(_0x56603e){return _0x4cf6ba[_0x1eee60(0x1fe)]&&console['error'](_0x1eee60(0x22b)+_0x32b60c+':\x20'+_0x56603e[_0x1eee60(0x288)]),{'name':_0x32b60c,'isJourneyLocal':![]};}},'resolveActivation':async _0xb2beb4=>{const _0x4930e9=_0x137775,_0x294eb7=_0x3e5429[_0x4930e9(0x295)](_0xb2beb4);if(_0x294eb7)return _0x294eb7;try{const _0x2d3b3d=await _0xa754a9[_0x4930e9(0x191)][_0x4930e9(0x268)](_0x48fa81['id'],_0xb2beb4),_0x64dac7=journeyActivationStepToYaml(_0x2d3b3d,_0x58a638,_0x15bcc1),_0x565dae=JSON['stringify']({'name':_0x64dac7[_0x4930e9(0x270)],'connection':_0x64dac7[_0x4930e9(0x1e4)],'connector_config':_0x64dac7[_0x4930e9(0x289)]}),_0x160855=_0x5353a4[_0x4930e9(0x295)](_0x565dae);if(_0x160855){const _0x4536e7={'name':_0x160855,'isJourneyLocal':!![],'definition':_0x64dac7};return _0x3e5429[_0x4930e9(0x29b)](_0xb2beb4,_0x4536e7),_0x4536e7;}const _0xaf29b6=_0x2d3b3d[_0x4930e9(0x205)][_0x4930e9(0x225)][_0x4930e9(0x270)]||_0xb2beb4,_0x406873=sanitizeYamlKey(_0xaf29b6)||_0x4930e9(0x22d)+_0xb2beb4;let _0x158a03=_0x406873,_0x587434=0x2;while(_0x3691f8[_0x4930e9(0x1c3)](_0x158a03)){_0x158a03=_0x406873+'_'+_0x587434,_0x587434++;}_0x3691f8['add'](_0x158a03),_0x5353a4[_0x4930e9(0x29b)](_0x565dae,_0x158a03);const _0x3f6528={'name':_0x158a03,'isJourneyLocal':!![],'definition':_0x64dac7};return _0x3e5429[_0x4930e9(0x29b)](_0xb2beb4,_0x3f6528),_0x3f6528;}catch(_0x4755f4){return _0x4cf6ba[_0x4930e9(0x1fe)]&&console[_0x4930e9(0x211)]('Warning:\x20Could\x20not\x20resolve\x20activation\x20'+_0xb2beb4+':\x20'+_0x4755f4[_0x4930e9(0x288)]),{'name':_0xb2beb4,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x2a5cf6,_0xa90ad8)=>{const _0x267210=_0x137775;return resolveJumpTarget(_0x2a5cf6,_0xa90ad8,_0x7c3336,_0x18a19f=>_0xa754a9[_0x267210(0x191)][_0x267210(0x28b)](_0x18a19f));}},_0x51a154=await journeyResponseToDef(_0xa8c37f,_0x167c92);_0x27a1ae[_0x137775(0x2a4)]({'item':_0x48fa81,'yaml':_0x51a154});}},{'verbose':_0x4cf6ba[_0x183199(0x1fe)]});const _0x3da944=await _0xa754a9['journey'][_0x183199(0x26d)](_0x547378[0x0][_0x183199(0x25c)]),_0x8c78f6=buildMergedJourneyDef(_0x27a1ae,_0x58874e,_0x3da944),_0x3913fd=normalizeJourneyDef(_0x8c78f6,_0x3334e6),_0x3f0e16=toYamlString(_0x3913fd),_0x1915b7=_0xfc1d30||a27_0x37f8b8[_0x183199(0x1fc)](_0x46568e,sanitizeFileName(_0x2906be)+'.yml');!_0xfc1d30&&_0x15ae43&&!existsSync(_0x46568e)&&mkdirSync(_0x46568e,{'recursive':!![]});const _0x21ceb8=a27_0x37f8b8[_0x183199(0x26e)](process[_0x183199(0x1ec)](),_0x1915b7);if(existsSync(_0x1915b7)){const _0xcf84cb=readFileSync(_0x1915b7,'utf-8'),_0x4d72db=generateDiff(_0xcf84cb,_0x3f0e16),_0x283240=hasChanges(_0x4d72db);_0x4aa881[_0x183199(0x2a4)]({'relativePath':_0x21ceb8,'absolutePath':_0x1915b7,'content':_0x3f0e16,'isNew':![],'hasChanges':_0x283240,'diff':_0x283240?formatDiffWithColors(_0x4d72db):undefined});}else _0x4aa881[_0x183199(0x2a4)]({'relativePath':_0x21ceb8,'absolutePath':_0x1915b7,'content':_0x3f0e16,'isNew':!![],'hasChanges':![]});}const _0x264516=_0x4aa881[_0x183199(0x27d)](_0x4cc817=>_0x4cc817[_0x183199(0x1af)]),_0x1b2724=_0x4aa881[_0x183199(0x27d)](_0xd0c13a=>!_0xd0c13a[_0x183199(0x1af)]&&_0xd0c13a['hasChanges']),_0x3b08f5=_0x4aa881['filter'](_0x3618a8=>!_0x3618a8[_0x183199(0x1af)]&&!_0x3618a8['hasChanges']),_0x409317=_0x1200e7['length'],_0x4424d4=_0x247d6e[_0x183199(0x1bf)],_0x36d736=_0x409317>_0x4424d4?'\x20('+_0x409317+_0x183199(0x26f):'';console[_0x183199(0x211)](_0x183199(0x231)),console[_0x183199(0x211)]('\x20\x20'+a27_0x1c02f5[_0x183199(0x274)](_0x4424d4+_0x183199(0x267))+a27_0x1c02f5[_0x183199(0x239)](_0x36d736)),console[_0x183199(0x211)]('\x20\x20'+a27_0x1c02f5[_0x183199(0x227)]('+\x20'+_0x264516[_0x183199(0x1df)]+_0x183199(0x1d1))),console[_0x183199(0x211)]('\x20\x20'+a27_0x1c02f5[_0x183199(0x234)]('~\x20'+_0x1b2724[_0x183199(0x1df)]+_0x183199(0x29c))),console[_0x183199(0x211)]('\x20\x20'+a27_0x1c02f5[_0x183199(0x239)]('=\x20'+_0x3b08f5[_0x183199(0x1df)]+_0x183199(0x1c4))),console[_0x183199(0x211)](_0x183199(0x276)+a27_0x1c02f5[_0x183199(0x274)](_0x370d01)+'\x0a');if(_0x1b2724[_0x183199(0x1df)]>0x0)for(const _0x1084a9 of _0x1b2724){console[_0x183199(0x211)](_0x183199(0x25e)+_0x1084a9[_0x183199(0x1e6)]+'\x27:'),console[_0x183199(0x211)]('─'['repeat'](0x3c)),console['error'](_0x1084a9[_0x183199(0x1d8)]),console[_0x183199(0x211)]('─'[_0x183199(0x296)](0x3c));}if(_0x330ab6[_0x183199(0x26c)])return console[_0x183199(0x211)](a27_0x1c02f5['yellow'](_0x183199(0x29f))),0x0;if(_0x264516[_0x183199(0x1df)]===0x0&&_0x1b2724[_0x183199(0x1df)]===0x0)return console[_0x183199(0x211)](a27_0x1c02f5[_0x183199(0x227)](_0x183199(0x27c))),saveSessionContext({'parent_segment':_0x11dafb},_0x330ab6[_0x183199(0x2a8)]),console[_0x183199(0x211)](a27_0x1c02f5[_0x183199(0x227)]('✔\x20Context\x20set:\x20'+a27_0x1c02f5[_0x183199(0x239)](_0x183199(0x279))+_0x183199(0x20c)+a27_0x1c02f5[_0x183199(0x274)](_0x11dafb))),0x0;if(!_0x330ab6['yes']&&(_0x264516[_0x183199(0x1df)]>0x0||_0x1b2724[_0x183199(0x1df)]>0x0)){if(!isInteractive())return console[_0x183199(0x211)](a27_0x1c02f5[_0x183199(0x1cf)](_0x183199(0x2a5)),_0x183199(0x240)),console[_0x183199(0x211)](a27_0x1c02f5[_0x183199(0x239)](_0x183199(0x1c7))),0x1;const _0x26c5a0=await confirmKey(_0x183199(0x250)+(_0x264516[_0x183199(0x1df)]+_0x1b2724[_0x183199(0x1df)])+_0x183199(0x1f7));if(!_0x26c5a0)return console['error'](a27_0x1c02f5[_0x183199(0x234)](_0x183199(0x1a7)),_0x183199(0x27b)),0x1;}!existsSync(_0x370d01)&&mkdirSync(_0x370d01,{'recursive':!![]});const _0x100dd9=a27_0x37f8b8['join'](_0x370d01,_0x183199(0x28f));writeFileSync(_0x100dd9,createTdxConfigContent(_0x11dafb),'utf-8');for(const _0x1fde6e of _0x4aa881){(_0x1fde6e[_0x183199(0x1af)]||_0x1fde6e[_0x183199(0x27e)])&&writeFileSync(_0x1fde6e[_0x183199(0x258)],_0x1fde6e['content'],_0x183199(0x1d2));}return console['error'](a27_0x1c02f5[_0x183199(0x227)](_0x183199(0x259)+(_0x264516[_0x183199(0x1df)]+_0x1b2724[_0x183199(0x1df)])+_0x183199(0x1ff)+_0x370d01)),saveSessionContext({'parent_segment':_0x11dafb},_0x330ab6[_0x183199(0x2a8)]),console['error'](a27_0x1c02f5['green'](_0x183199(0x1d0)+a27_0x1c02f5[_0x183199(0x239)](_0x183199(0x279))+_0x183199(0x20c)+a27_0x1c02f5[_0x183199(0x274)](_0x11dafb))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{['name']=a27_0x3b18da(0x28d);['description']=a27_0x3b18da(0x1c6);async[a27_0x3b18da(0x218)](_0x52aad9){const _0x53e380=a27_0x3b18da,{options:_0x22ff0e,args:_0x375de9,tdx:_0x3f8560}=_0x52aad9,_0xe1852b=_0x375de9[0x0];if(!requireNameOrPath(_0xe1852b))return 0x1;_0x22ff0e[_0x53e380(0x1fe)]&&console[_0x53e380(0x211)](_0x53e380(0x1de)+_0xe1852b);const {journeyId:_0x19506b}=await resolveJourneyIdFromInput(_0xe1852b,_0x22ff0e,_0x3f8560),_0x36632b=await withSpinner(_0x53e380(0x196),()=>_0x3f8560[_0x53e380(0x191)][_0x53e380(0x262)](_0x19506b),{'verbose':_0x22ff0e[_0x53e380(0x1fe)]}),_0x2ef8b1=_0x36632b['data'];return console[_0x53e380(0x255)](_0x53e380(0x1a4)+_0x2ef8b1[_0x53e380(0x1b0)]),console[_0x53e380(0x255)](_0x53e380(0x21d)+_0x2ef8b1['table']),await handleSDKOutput(_0x2ef8b1[_0x53e380(0x1e0)],_0x22ff0e),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x3b18da(0x270)]=a27_0x3b18da(0x25d);[a27_0x3b18da(0x25b)]=a27_0x3b18da(0x1b1);async[a27_0x3b18da(0x218)](_0x44c0a4){const _0x46517f=a27_0x3b18da,{options:_0x4a69ca,args:_0x555524,tdx:_0x231b68}=_0x44c0a4,_0x2f8861=_0x555524[0x0];if(!requireNameOrPath(_0x2f8861))return 0x1;_0x4a69ca[_0x46517f(0x1fe)]&&console[_0x46517f(0x211)](_0x46517f(0x1de)+_0x2f8861);const {journeyId:_0x56b474}=await resolveJourneyIdFromInput(_0x2f8861,_0x4a69ca,_0x231b68),_0x216a63=await withSpinner(_0x46517f(0x286),()=>_0x231b68[_0x46517f(0x191)][_0x46517f(0x222)](_0x56b474),{'verbose':_0x4a69ca[_0x46517f(0x1fe)]}),_0x19c38e=_0x216a63[_0x46517f(0x24d)];return console[_0x46517f(0x211)](_0x46517f(0x241)+_0x19c38e['length']+_0x46517f(0x1c0)+(_0x19c38e[_0x46517f(0x1df)]!==0x1?'s':'')),await handleSDKOutput(_0x19c38e,_0x4a69ca),0x0;}}export class JourneyPushCommand extends BaseCommand{[a27_0x3b18da(0x270)]=a27_0x3b18da(0x281);['description']='Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20Data';[a27_0x3b18da(0x22a)]=new SegmentPushCommand();async[a27_0x3b18da(0x218)](_0x56cee9){const _0x29790c=a27_0x3b18da,_0x5b365c=_0x56cee9[_0x29790c(0x253)][0x0];let _0x117c35;if(_0x5b365c){const _0x5bf06b=await resolveTarget({'arg':_0x5b365c,'contextParent':_0x56cee9[_0x29790c(0x24c)][_0x29790c(0x233)],'cwd':process['cwd']()});isSuccessfulResolution(_0x5bf06b)&&_0x5bf06b[_0x29790c(0x285)]===_0x29790c(0x1b2)&&(_0x117c35=_0x5bf06b['filePath']);}const _0x3af275={..._0x56cee9,'options':{..._0x56cee9['options'],'journeysOnly':!![],..._0x117c35&&{'singleFilePath':_0x117c35}}};return this[_0x29790c(0x22a)][_0x29790c(0x218)](_0x3af275);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x3b18da(0x270)]='journey:versions';['description']=a27_0x3b18da(0x21e);async[a27_0x3b18da(0x218)](_0x272628){const _0x2a961c=a27_0x3b18da,{options:_0x8ba835,args:_0x3ba612,tdx:_0x308258}=_0x272628,_0xfc122f=_0x3ba612[0x0];if(!requireNameOrPath(_0xfc122f))return 0x1;if(_0x8ba835[_0x2a961c(0x1fe)])console[_0x2a961c(0x211)]('Input:\x20'+_0xfc122f);const {journeyId:_0x4df460}=await resolveJourneyIdFromInput(_0xfc122f,_0x8ba835,_0x308258),_0x454b4a=await withSpinner(_0x2a961c(0x251),()=>_0x308258[_0x2a961c(0x191)][_0x2a961c(0x1d3)](_0x4df460),{'verbose':_0x8ba835[_0x2a961c(0x1fe)]}),{bundleName:_0x256838,versions:_0x2cb376,latestJourneyId:_0x175006}=_0x454b4a[_0x2a961c(0x24d)];console[_0x2a961c(0x211)](_0x256838+':\x20'+_0x2cb376['length']+_0x2a961c(0x297)+(_0x2cb376['length']!==0x1?'s':''));const _0x3c093e=_0x2cb376[_0x2a961c(0x23c)](_0x47325e=>({'version':_0x47325e[_0x2a961c(0x1f8)],'journey_id':_0x47325e[_0x2a961c(0x24e)],'name':_0x47325e[_0x2a961c(0x270)],'state':_0x47325e[_0x2a961c(0x1d9)],'paused':_0x47325e[_0x2a961c(0x22f)],'latest':_0x47325e['journeyId']===_0x175006,'created_at':_0x47325e[_0x2a961c(0x201)]}));return await handleSDKOutput(_0x3c093e,_0x8ba835),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{[a27_0x3b18da(0x270)]='journey:version:create';[a27_0x3b18da(0x25b)]=a27_0x3b18da(0x20d);async['execute'](_0x5ed350){const _0x58c5cf=a27_0x3b18da,{options:_0x572eda,args:_0x4c78bb,tdx:_0x488ebe}=_0x5ed350,_0x1631ca=_0x4c78bb[0x0];if(!requireNameOrPath(_0x1631ca))return 0x1;if(_0x572eda[_0x58c5cf(0x1fe)])console[_0x58c5cf(0x211)](_0x58c5cf(0x1de)+_0x1631ca);const {journeyId:_0x3ffd85,journeyName:_0x163039}=await resolveJourneyIdFromInput(_0x1631ca,_0x572eda,_0x488ebe);if(!_0x572eda[_0x58c5cf(0x294)]){const _0x437ef2=await confirm(_0x58c5cf(0x208)+_0x163039+'\x22?');if(!_0x437ef2)return console['error'](_0x58c5cf(0x1e9)),0x0;}const _0x26c174=await withSpinner('Creating\x20new\x20version...',()=>_0x488ebe[_0x58c5cf(0x191)][_0x58c5cf(0x1f3)](_0x3ffd85),{'verbose':_0x572eda[_0x58c5cf(0x1fe)]}),_0x4d8fa1=_0x26c174['data'];return console[_0x58c5cf(0x211)](a27_0x1c02f5['green']('✔')+_0x58c5cf(0x2a0)+_0x4d8fa1[_0x58c5cf(0x205)][_0x58c5cf(0x1f8)]+_0x58c5cf(0x215)+_0x4d8fa1[_0x58c5cf(0x205)][_0x58c5cf(0x270)]+'\x22'),console[_0x58c5cf(0x211)](_0x58c5cf(0x27a)+_0x4d8fa1['id']),await handleSingleObjectOutput({'id':_0x4d8fa1['id'],'name':_0x4d8fa1[_0x58c5cf(0x205)][_0x58c5cf(0x270)],'version':_0x4d8fa1['attributes'][_0x58c5cf(0x1f8)],'state':_0x4d8fa1[_0x58c5cf(0x205)][_0x58c5cf(0x1d9)],'bundle_id':_0x4d8fa1[_0x58c5cf(0x205)][_0x58c5cf(0x25c)],'created_at':_0x4d8fa1['attributes'][_0x58c5cf(0x201)]},_0x572eda),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{[a27_0x3b18da(0x270)]=a27_0x3b18da(0x277);['description']=a27_0x3b18da(0x1ae);async[a27_0x3b18da(0x218)](_0x401c1f){const _0x5991c5=a27_0x3b18da,{options:_0x4d3043,args:_0x43989d,tdx:_0x50969a}=_0x401c1f,_0x5ef595=_0x43989d[0x0];if(!requireNameOrPath(_0x5ef595))return 0x1;const _0x2e40b3=_0x4d3043[_0x5991c5(0x1ed)];if(!_0x2e40b3)return console[_0x5991c5(0x211)]('Error:\x20--version\x20option\x20is\x20required'),console[_0x5991c5(0x211)](_0x5991c5(0x221)),0x1;const _0x174564=parseInt(_0x2e40b3,0xa);if(isNaN(_0x174564)||_0x174564<0x1)return console[_0x5991c5(0x211)](_0x5991c5(0x27f)+_0x2e40b3),0x1;if(_0x4d3043['verbose'])console[_0x5991c5(0x211)](_0x5991c5(0x1de)+_0x5ef595+_0x5991c5(0x206)+_0x174564);const {journeyId:_0x347d69,parentSegmentId:_0x121b71}=await resolveJourneyIdFromInput(_0x5ef595,_0x4d3043,_0x50969a),_0x2e9a5a=await withSpinner(_0x5991c5(0x199),()=>_0x50969a['journey'][_0x5991c5(0x1d3)](_0x347d69),{'verbose':_0x4d3043[_0x5991c5(0x1fe)]}),{versions:_0x25b1bf,latestJourneyId:_0x322764}=_0x2e9a5a[_0x5991c5(0x24d)],_0x48b1c7=_0x25b1bf[_0x5991c5(0x235)](_0x2f7d21=>_0x2f7d21[_0x5991c5(0x1f8)]===_0x174564);if(!_0x48b1c7){const _0x17e41b=_0x25b1bf[_0x5991c5(0x23c)](_0x2e3336=>'v'+_0x2e3336[_0x5991c5(0x1f8)])[_0x5991c5(0x1fc)](',\x20');return console['error'](_0x5991c5(0x19c)+_0x174564+_0x5991c5(0x1c1)+_0x17e41b),0x1;}const _0x442690=await withSpinner(_0x5991c5(0x1d7)+_0x174564+_0x5991c5(0x1bd),()=>_0x50969a[_0x5991c5(0x191)][_0x5991c5(0x28b)](_0x48b1c7[_0x5991c5(0x24e)]),{'verbose':_0x4d3043[_0x5991c5(0x1fe)]}),_0x18fb43=_0x442690[_0x5991c5(0x24d)],_0xcc11d0=getConsoleNextUrl(_0x4d3043['site'],_0x5991c5(0x21f)+_0x121b71+_0x5991c5(0x249)+_0x48b1c7['journeyId']+_0x5991c5(0x216));return await handleSingleObjectOutput({'id':_0x18fb43['id'],'name':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x270)],'version':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x1f8)],'description':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x25b)],'state':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x1d9)],'paused':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x22f)],'reentry_mode':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x193)],'stages':_0x18fb43['attributes']['journeyStages']?.[_0x5991c5(0x1df)]||0x0,..._0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x232)]&&{'goal':_0x18fb43[_0x5991c5(0x205)]['goal'][_0x5991c5(0x270)]},'latest':_0x48b1c7[_0x5991c5(0x24e)]===_0x322764,'created_at':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x201)],'updated_at':_0x18fb43[_0x5991c5(0x205)][_0x5991c5(0x195)],'url':_0xcc11d0},_0x4d3043),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a28_0x212480=a28_0x2792;(function(_0x56d274,_0x41f716){const _0x491fcf=a28_0x2792,_0xf3033=_0x56d274();while(!![]){try{const _0x261c23=parseInt(_0x491fcf(0x8d))/0x1*(-parseInt(_0x491fcf(0x98))/0x2)+parseInt(_0x491fcf(0xb6))/0x3+-parseInt(_0x491fcf(0xbb))/0x4+-parseInt(_0x491fcf(0xa3))/0x5*(parseInt(_0x491fcf(0xc5))/0x6)+-parseInt(_0x491fcf(0x9f))/0x7*(parseInt(_0x491fcf(0xb9))/0x8)+-parseInt(_0x491fcf(0x9a))/0x9+parseInt(_0x491fcf(0x91))/0xa*(parseInt(_0x491fcf(0x95))/0xb);if(_0x261c23===_0x41f716)break;else _0xf3033['push'](_0xf3033['shift']());}catch(_0x5d175f){_0xf3033['push'](_0xf3033['shift']());}}}(a28_0x5ea9,0x258c4));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_0x4d8846 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a28_0x5ea9(){const _0x21a8cc=['parentSegment','19785tWGkkp','log','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','8NSVowe','.yaml','345284DLbFGr','error','filePath','dim','green','yellow','Validate\x20journey\x20YAML\x20files','helpText','validCount','\x20error(s)','294HomIMl','1KXhvIV','cwd','Validation\x20failed:\x20','\x20segment\x20file(s)\x20skipped)','372770FUwYJp','message','\x20(skipped:\x20','invalidCount','275WKixjg','description','journey:validate','578784ddVHVp','✔\x20All\x20','2631501XqesZZ','hasErrors','execute','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20journey(s)\x20with\x20errors,\x20','178031zUcGZC','\x20warning(s)','\x20segment\x20file(s)\x20skipped','warnings','9305eiZRfE','cyan','Usage:\x20tdx\x20journey\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','verbose','\x20warning(s)\x20found','journey','length','skippedCount','relativePath','\x20valid','red','Error:\x20Directory\x20not\x20found:\x20','valid','Error:\x20','warningCount','filter','file','errors'];a28_0x5ea9=function(){return _0x21a8cc;};return a28_0x5ea9();}function a28_0x2792(_0x340679,_0x4be371){_0x340679=_0x340679-0x8d;const _0x5ea903=a28_0x5ea9();let _0x279208=_0x5ea903[_0x340679];return _0x279208;}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class JourneyValidateCommand extends BaseCommand{['name']=a28_0x212480(0x97);[a28_0x212480(0x96)]=a28_0x212480(0xc1);async[a28_0x212480(0x9c)](_0xe6534b){const _0x5e0b6f=a28_0x212480,{options:_0x3ce7fe,args:_0x3d65e7}=_0xe6534b,_0x352d45=_0x3ce7fe,_0x25737b=await resolveTarget({'arg':_0x3d65e7[0x0],'contextParent':_0x3ce7fe[_0x5e0b6f(0xb5)],'cwd':process[_0x5e0b6f(0x8e)]()});if(!isSuccessfulResolution(_0x25737b))return _0x25737b['errorCode']==='no_parent'?(console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xc0)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x5e0b6f(0xbc)](_0x5e0b6f(0xa5)),console['error']('\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[_0x5e0b6f(0xbc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xad)](_0x5e0b6f(0xb0)+_0x25737b[_0x5e0b6f(0x92)]+'\x0a')),_0x25737b[_0x5e0b6f(0xc2)]&&console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xa4)](_0x25737b[_0x5e0b6f(0xc2)]))),0x1;const _0x5d3147=_0x25737b['targetDir'],_0x104248=_0x25737b['type']===_0x5e0b6f(0xb3)?_0x25737b[_0x5e0b6f(0xbd)]:undefined;if(!_0x104248&&!existsSync(_0x5d3147))return console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xad)](_0x5e0b6f(0xae)+_0x5d3147+'\x0a')),0x1;let _0xe75152;if(_0x104248){if(!_0x104248['endsWith']('.yml')&&!_0x104248['endsWith'](_0x5e0b6f(0xba)))return console[_0x5e0b6f(0xbc)](a28_0x4d8846['red'](_0x5e0b6f(0x9d)+_0x104248+'\x0a')),0x1;_0xe75152=[_0x104248];}else _0xe75152=findYamlFiles(_0x5d3147);if(_0xe75152['length']===0x0)return console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xad)](_0x5e0b6f(0xb8)+_0x5d3147+'\x0a')),0x1;const _0x213584=validateYamlFiles(_0xe75152,_0x5d3147,{'filterType':_0x5e0b6f(0xa8)}),_0x116c29=calculateSummary(_0x213584),_0x301f5a=_0x213584[_0x5e0b6f(0xb2)](isValidationResult);if(_0x301f5a[_0x5e0b6f(0xa9)]===0x0)return console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xc0)]('No\x20journey\x20YAML\x20files\x20found\x20in\x20'+_0x5d3147+'\x0a')),_0x116c29[_0x5e0b6f(0xaa)]>0x0&&console[_0x5e0b6f(0xbc)](a28_0x4d8846[_0x5e0b6f(0xbe)]('('+_0x116c29[_0x5e0b6f(0xaa)]+_0x5e0b6f(0x90))),0x0;for(const _0x43476c of _0x213584){if(!isValidationResult(_0x43476c)){_0x352d45[_0x5e0b6f(0xa6)]&&console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xbe)]('-\x20'+_0x43476c[_0x5e0b6f(0xab)]+_0x5e0b6f(0x93)+_0x43476c['reason']+')'));continue;}const {relativePath:_0x528a1,source:_0x38247e,result:_0x19894e}=_0x43476c;if(_0x19894e[_0x5e0b6f(0xaf)]&&_0x19894e[_0x5e0b6f(0xa2)]['length']===0x0)_0x352d45[_0x5e0b6f(0xa6)]&&console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xbf)]('✔\x20'+_0x528a1));else _0x19894e[_0x5e0b6f(0xaf)]?(console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xc0)]('⚠\x20'+_0x528a1+':\x20'+_0x19894e[_0x5e0b6f(0xa2)][_0x5e0b6f(0xa9)]+_0x5e0b6f(0xa0))),console[_0x5e0b6f(0xb7)](formatValidationResult(_0x19894e,_0x38247e,_0x528a1))):(console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xad)]('✖\x20'+_0x528a1+':\x20'+_0x19894e[_0x5e0b6f(0xb4)][_0x5e0b6f(0xa9)]+_0x5e0b6f(0xc4))),console['log'](formatValidationResult(_0x19894e,_0x38247e,_0x528a1)));}return console['log'](''),_0x116c29[_0x5e0b6f(0x9b)]?(console['log'](a28_0x4d8846[_0x5e0b6f(0xad)](_0x5e0b6f(0x8f)+_0x116c29[_0x5e0b6f(0x94)]+_0x5e0b6f(0x9e)+_0x116c29[_0x5e0b6f(0xc3)]+_0x5e0b6f(0xac))),_0x116c29['warningCount']>0x0&&console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xc0)](_0x116c29['warningCount']+_0x5e0b6f(0xa7))),_0x116c29[_0x5e0b6f(0xaa)]>0x0&&console['log'](a28_0x4d8846['dim'](_0x116c29[_0x5e0b6f(0xaa)]+_0x5e0b6f(0xa1))),0x1):(console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xbf)](_0x5e0b6f(0x99)+_0x116c29[_0x5e0b6f(0xc3)]+'\x20journey(s)\x20valid')),_0x116c29[_0x5e0b6f(0xb1)]>0x0&&console[_0x5e0b6f(0xb7)](a28_0x4d8846[_0x5e0b6f(0xc0)](_0x116c29['warningCount']+_0x5e0b6f(0xa7))),_0x116c29[_0x5e0b6f(0xaa)]>0x0&&console[_0x5e0b6f(0xb7)](a28_0x4d8846['dim'](_0x116c29[_0x5e0b6f(0xaa)]+_0x5e0b6f(0xa1))),0x0);}}
|