@treasuredata/tdx 2026.4.6 → 2026.4.7
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.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.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/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x108473=a24_0x54b9;(function(_0xba76d9,_0x44f926){const _0x4ad76b=a24_0x54b9,_0x2e94a3=_0xba76d9();while(!![]){try{const _0x539629=-parseInt(_0x4ad76b(0x123))/0x1*(-parseInt(_0x4ad76b(0x10c))/0x2)+parseInt(_0x4ad76b(0x10a))/0x3+parseInt(_0x4ad76b(0x115))/0x4+-parseInt(_0x4ad76b(0x10e))/0x5*(-parseInt(_0x4ad76b(0x132))/0x6)+parseInt(_0x4ad76b(0xfb))/0x7*(parseInt(_0x4ad76b(0xff))/0x8)+parseInt(_0x4ad76b(0x100))/0x9+-parseInt(_0x4ad76b(0x137))/0xa;if(_0x539629===_0x44f926)break;else _0x2e94a3['push'](_0x2e94a3['shift']());}catch(_0x34d46c){_0x2e94a3['push'](_0x2e94a3['shift']());}}}(a24_0x58dc,0xd17f9));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_0x45d56a from'chalk';import a24_0x15984e from'path';import{discoverAndParseTemplateFiles,parseTemplateFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/template-push.js';function a24_0x54b9(_0x2f28ef,_0x22ad5f){_0x2f28ef=_0x2f28ef-0xf2;const _0x58dc21=a24_0x58dc();let _0x54b963=_0x58dc21[_0x2f28ef];return _0x54b963;}function a24_0x58dc(){const _0x4f2c2f=['\x20templates','config','red','engage_workspace','\x20template\x20files','Pushing\x20templates...','Preparing\x20push\x20to\x20workspace\x20\x27','workspace','results','No\x20template\x20YAML\x20files\x20found\x20in\x20','Aborted.','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','267VYDHva','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','site','message','\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','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','\x0aError:','create','cwd','\x20templates\x20to\x20update:','length','-\x20no\x20changes\x20applied','session','\x20templates?','setPhase','3871830RKVDDx','errors','error','\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)','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','42759730soFkTc','1\x20template\x20file:\x20','\x0aValidation\x20errors\x20in\x20','engage:template:push','verbose','cyan','\x20errors:','warnings','Workspace\x20is\x20required.','engage','✔\x20Updated\x20','path','28882lYMdVa','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','relativePath','\x0aPush\x20summary\x20for\x20workspace\x20\x27','24buOtNW','13942854EFXvtO','dim','\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','def','created','data','\x20\x20\x20\x20','✔\x20Created\x20','templateId','dirname','4293621pDoHFd','action','1638vasYHB','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','10ejoZre','green','name','yellow','description','resolve','filter','2528016ERryDl','dryRun'];a24_0x58dc=function(){return _0x4f2c2f;};return a24_0x58dc();}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_0x108473(0xf2);[a24_0x108473(0x112)]=a24_0x108473(0x10d);async['execute'](_0x291ba5){const _0x1f841b=a24_0x108473,{options:_0x14fbea,args:_0x19acbe,tdx:_0x38f74e}=_0x291ba5,_0xe5deee=_0x14fbea,_0x4c560a=_0x19acbe[0x0],_0x36db52=_0x4c560a?a24_0x15984e[_0x1f841b(0x113)](_0x4c560a):undefined,_0x1e57c5=_0x36db52?isYamlFile(_0x36db52):![];let _0x56137b;if(_0x1e57c5&&_0x36db52)_0x56137b=a24_0x15984e[_0x1f841b(0x109)](_0x36db52);else _0x36db52?_0x56137b=_0x36db52:_0x56137b=process[_0x1f841b(0x12b)]();let _0x474fcb;const _0x56f991=tryFindTdxConfig(_0x56137b);_0x56f991?.[_0x1f841b(0x118)][_0x1f841b(0x11a)]&&(_0x474fcb=_0x56f991[_0x1f841b(0x118)]['engage_workspace'],!_0x1e57c5&&(_0x56137b=_0x56f991['configDir']));_0xe5deee['workspace']&&(_0x474fcb=_0xe5deee[_0x1f841b(0x11e)]);if(!_0x474fcb){const _0x61460c=loadSessionContext(_0xe5deee['session']);_0x61460c?.[_0x1f841b(0x11a)]&&(_0x474fcb=_0x61460c[_0x1f841b(0x11a)]);}if(!_0x474fcb)return console['error'](a24_0x45d56a['yellow'](_0x1f841b(0xf7))),console[_0x1f841b(0x134)](_0x1f841b(0x127)),console[_0x1f841b(0x134)](_0x1f841b(0x135)),console[_0x1f841b(0x134)](_0x1f841b(0x102)),console[_0x1f841b(0x134)](_0x1f841b(0x122)),0x1;let _0x419993;_0x1e57c5&&_0x36db52?_0x419993=[parseTemplateFile(_0x36db52,a24_0x15984e['dirname'](_0x36db52))]:_0x419993=discoverAndParseTemplateFiles(_0x56137b);if(_0x419993[_0x1f841b(0x12d)]===0x0)return console[_0x1f841b(0x134)](a24_0x45d56a['yellow'](_0x1f841b(0x120)+_0x56137b)),console['error'](a24_0x45d56a[_0x1f841b(0x101)]('Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.')),0x1;const _0x2b71da=_0x419993[_0x1f841b(0x12d)]===0x1?_0x1f841b(0x138)+_0x419993[0x0]['def'][_0x1f841b(0x110)]:_0x419993['length']+_0x1f841b(0x11b);console['error']('Found\x20'+a24_0x45d56a[_0x1f841b(0xf4)](_0x2b71da));let _0x1a2ec7=![];for(const _0x52b2a6 of _0x419993){const _0x441fe4=validateTemplateDef(_0x52b2a6[_0x1f841b(0x103)]);if(!_0x441fe4['valid']){_0x1a2ec7=!![],console['error'](a24_0x45d56a['red'](_0x1f841b(0x139)+_0x52b2a6[_0x1f841b(0xfd)]+':'));for(const _0x307631 of _0x441fe4[_0x1f841b(0x133)]){console[_0x1f841b(0x134)]('\x20\x20'+a24_0x45d56a[_0x1f841b(0x119)]('✗')+'\x20'+_0x307631[_0x1f841b(0xfa)]+':\x20'+_0x307631[_0x1f841b(0x126)]);}}for(const _0x2d4ed6 of _0x441fe4[_0x1f841b(0xf6)]){console[_0x1f841b(0x134)]('\x20\x20'+a24_0x45d56a[_0x1f841b(0x111)]('⚠')+'\x20'+_0x2d4ed6['path']+':\x20'+_0x2d4ed6['message']);}}if(_0x1a2ec7)return console[_0x1f841b(0x134)](a24_0x45d56a['red'](_0x1f841b(0x136))),0x1;const _0x26fcbc=await _0x38f74e[_0x1f841b(0xf8)]['resolveWorkspaceId'](_0x474fcb),_0x142c97=await withProgressSpinner(_0x1f841b(0x11d)+_0x474fcb+'\x27...',_0x4b9216=>preparePush({'engage':_0x38f74e[_0x1f841b(0xf8)]},_0x419993,_0x26fcbc,{'progress':{'update':_0x5db3dd=>_0x4b9216[_0x1f841b(0x131)](_0x5db3dd)}}),{'verbose':_0xe5deee[_0x1f841b(0xf3)]}),_0x5147d0=_0x142c97[_0x1f841b(0x105)];await withProgressSpinner('Resolving\x20references...',_0x366341=>resolveAndBuildInputs({'engage':_0x38f74e['engage']},_0x5147d0,_0x26fcbc,{'progress':{'update':_0x20b8a=>_0x366341[_0x1f841b(0x131)](_0x20b8a)}}),{'verbose':_0xe5deee[_0x1f841b(0xf3)]});const _0x1505c5=_0x5147d0[_0x1f841b(0x114)](_0xa26fa=>_0xa26fa[_0x1f841b(0x10b)]===_0x1f841b(0x12a)),_0x4a5072=_0x5147d0['filter'](_0x301731=>_0x301731[_0x1f841b(0x10b)]==='update');console[_0x1f841b(0x134)](_0x1f841b(0xfe)+_0x474fcb+'\x27:');if(_0x1505c5[_0x1f841b(0x12d)]>0x0){console['error']('\x20\x20'+a24_0x45d56a[_0x1f841b(0x10f)]('+\x20'+_0x1505c5[_0x1f841b(0x12d)]+'\x20new\x20templates:'));for(const _0x361a62 of _0x1505c5){console[_0x1f841b(0x134)]('\x20\x20\x20\x20'+a24_0x45d56a[_0x1f841b(0x10f)]('+')+'\x20'+_0x361a62[_0x1f841b(0x103)][_0x1f841b(0x110)]);}}if(_0x4a5072[_0x1f841b(0x12d)]>0x0){console[_0x1f841b(0x134)]('\x20\x20'+a24_0x45d56a[_0x1f841b(0x111)]('~\x20'+_0x4a5072['length']+_0x1f841b(0x12c)));for(const _0x415b8e of _0x4a5072){console[_0x1f841b(0x134)](_0x1f841b(0x106)+a24_0x45d56a[_0x1f841b(0x111)]('~')+'\x20'+_0x415b8e[_0x1f841b(0x103)]['name']);}}if(_0x1505c5[_0x1f841b(0x12d)]===0x0&&_0x4a5072[_0x1f841b(0x12d)]===0x0)return console[_0x1f841b(0x134)](a24_0x45d56a[_0x1f841b(0x10f)]('✔\x20All\x20templates\x20are\x20up\x20to\x20date')),0x0;if(_0xe5deee[_0x1f841b(0x116)])return console[_0x1f841b(0x134)](a24_0x45d56a[_0x1f841b(0x111)](_0x1f841b(0x128))),0x0;if(!_0xe5deee['yes']){if(!isInteractive())return console[_0x1f841b(0x134)](a24_0x45d56a[_0x1f841b(0x119)](_0x1f841b(0x129)),_0x1f841b(0xfc)),console[_0x1f841b(0x134)](a24_0x45d56a['dim'](_0x1f841b(0x124))),0x1;const _0x5cedff=await confirmKey('Push\x20'+(_0x1505c5[_0x1f841b(0x12d)]+_0x4a5072[_0x1f841b(0x12d)])+_0x1f841b(0x130));if(!_0x5cedff)return console[_0x1f841b(0x134)](a24_0x45d56a[_0x1f841b(0x111)](_0x1f841b(0x121)),_0x1f841b(0x12e)),0x1;}const _0x25dae9=await withProgressSpinner(_0x1f841b(0x11c),_0x4bffab=>executePush({'engage':_0x38f74e[_0x1f841b(0xf8)]},_0x5147d0,{'progress':{'update':_0x19198b=>_0x4bffab[_0x1f841b(0x131)](_0x19198b)}}),{'verbose':_0xe5deee['verbose']}),_0x189f00=_0x25dae9['data'];for(const _0x54110d of _0x189f00[_0x1f841b(0x11f)]){if(_0x54110d[_0x1f841b(0x108)]&&(_0x54110d[_0x1f841b(0x10b)]==='created'||_0x54110d[_0x1f841b(0x10b)]==='updated')){const _0x2aab56=getTemplateUrl(_0xe5deee[_0x1f841b(0x125)],_0x26fcbc,_0x54110d[_0x1f841b(0x108)]),_0x215dcd=_0x54110d[_0x1f841b(0x10b)]===_0x1f841b(0x104)?'+':'~',_0x44ff83=_0x54110d[_0x1f841b(0x10b)]===_0x1f841b(0x104)?a24_0x45d56a[_0x1f841b(0x10f)](_0x215dcd):a24_0x45d56a[_0x1f841b(0x111)](_0x215dcd);console[_0x1f841b(0x134)]('\x20\x20'+_0x44ff83+'\x20'+hyperlink(_0x54110d[_0x1f841b(0x110)],_0x2aab56)+'\x20'+a24_0x45d56a[_0x1f841b(0x101)](_0x2aab56));}}_0x189f00[_0x1f841b(0x104)]>0x0&&console['error'](a24_0x45d56a[_0x1f841b(0x10f)](_0x1f841b(0x107)+_0x189f00[_0x1f841b(0x104)]+_0x1f841b(0x117)));_0x189f00['updated']>0x0&&console[_0x1f841b(0x134)](a24_0x45d56a[_0x1f841b(0x10f)](_0x1f841b(0xf9)+_0x189f00['updated']+_0x1f841b(0x117)));if(_0x189f00['errors'][_0x1f841b(0x12d)]>0x0){console[_0x1f841b(0x134)](a24_0x45d56a[_0x1f841b(0x119)]('✘\x20'+_0x189f00['errors'][_0x1f841b(0x12d)]+_0x1f841b(0xf5)));for(const _0xfae8cd of _0x189f00['errors']){console[_0x1f841b(0x134)]('\x20\x20'+a24_0x45d56a[_0x1f841b(0x119)](_0xfae8cd['name'])+':\x20'+_0xfae8cd[_0x1f841b(0x134)]);}}return saveSessionContext({'engage_workspace':_0x474fcb},_0xe5deee[_0x1f841b(0x12f)]),_0x189f00[_0x1f841b(0x133)][_0x1f841b(0x12d)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a24_0x56546c=a24_0x3ebf;(function(_0x136c30,_0x3e9975){const _0x28caf4=a24_0x3ebf,_0xbb59a1=_0x136c30();while(!![]){try{const _0x423322=-parseInt(_0x28caf4(0x140))/0x1*(parseInt(_0x28caf4(0x17a))/0x2)+parseInt(_0x28caf4(0x161))/0x3+-parseInt(_0x28caf4(0x159))/0x4*(parseInt(_0x28caf4(0x17e))/0x5)+-parseInt(_0x28caf4(0x143))/0x6*(-parseInt(_0x28caf4(0x138))/0x7)+parseInt(_0x28caf4(0x172))/0x8*(-parseInt(_0x28caf4(0x13b))/0x9)+parseInt(_0x28caf4(0x162))/0xa*(parseInt(_0x28caf4(0x147))/0xb)+parseInt(_0x28caf4(0x164))/0xc*(parseInt(_0x28caf4(0x155))/0xd);if(_0x423322===_0x3e9975)break;else _0xbb59a1['push'](_0xbb59a1['shift']());}catch(_0x9e98c0){_0xbb59a1['push'](_0xbb59a1['shift']());}}}(a24_0x4644,0xca359));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';function a24_0x3ebf(_0x451771,_0x4421f7){_0x451771=_0x451771-0x134;const _0x4644f6=a24_0x4644();let _0x3ebf1e=_0x4644f6[_0x451771];return _0x3ebf1e;}import a24_0x3d15b1 from'chalk';import a24_0x131880 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_0x56546c(0x14d)]=a24_0x56546c(0x13d);[a24_0x56546c(0x13f)]=a24_0x56546c(0x17d);async['execute'](_0x5c60e6){const _0x2b67a0=a24_0x56546c,{options:_0x300857,args:_0x2b51fb,tdx:_0x3a7eef}=_0x5c60e6,_0x4a27b9=_0x300857,_0x185155=_0x2b51fb[0x0],_0x38f952=_0x185155?a24_0x131880[_0x2b67a0(0x17b)](_0x185155):undefined,_0x337df5=_0x38f952?isYamlFile(_0x38f952):![];let _0x1e2eb1;if(_0x337df5&&_0x38f952)_0x1e2eb1=a24_0x131880[_0x2b67a0(0x13a)](_0x38f952);else _0x38f952?_0x1e2eb1=_0x38f952:_0x1e2eb1=process[_0x2b67a0(0x14c)]();let _0x341496;const _0x1c43d6=tryFindTdxConfig(_0x1e2eb1);_0x1c43d6?.[_0x2b67a0(0x154)]['engage_workspace']&&(_0x341496=_0x1c43d6[_0x2b67a0(0x154)][_0x2b67a0(0x156)],!_0x337df5&&(_0x1e2eb1=_0x1c43d6['configDir']));_0x4a27b9['workspace']&&(_0x341496=_0x4a27b9['workspace']);if(!_0x341496){const _0xb75eee=loadSessionContext(_0x4a27b9[_0x2b67a0(0x14a)]);_0xb75eee?.[_0x2b67a0(0x156)]&&(_0x341496=_0xb75eee[_0x2b67a0(0x156)]);}if(!_0x341496)return console['error'](a24_0x3d15b1['yellow'](_0x2b67a0(0x174))),console['error'](_0x2b67a0(0x142)),console[_0x2b67a0(0x171)]('\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)'),console[_0x2b67a0(0x171)](_0x2b67a0(0x13e)),console[_0x2b67a0(0x171)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;let _0x1451a1;_0x337df5&&_0x38f952?_0x1451a1=[parseTemplateFile(_0x38f952,a24_0x131880['dirname'](_0x38f952))]:_0x1451a1=discoverAndParseTemplateFiles(_0x1e2eb1);if(_0x1451a1[_0x2b67a0(0x175)]===0x0)return console['error'](a24_0x3d15b1[_0x2b67a0(0x15f)](_0x2b67a0(0x167)+_0x1e2eb1)),console['error'](a24_0x3d15b1[_0x2b67a0(0x157)](_0x2b67a0(0x151))),0x1;const _0xea5cf7=_0x1451a1['length']===0x1?'1\x20template\x20file:\x20'+_0x1451a1[0x0][_0x2b67a0(0x165)]['name']:_0x1451a1[_0x2b67a0(0x175)]+'\x20template\x20files';console['error'](_0x2b67a0(0x14f)+a24_0x3d15b1[_0x2b67a0(0x144)](_0xea5cf7));let _0x56130f=![];for(const _0x3e5cc7 of _0x1451a1){const _0x11ad5d=validateTemplateDef(_0x3e5cc7[_0x2b67a0(0x165)]);if(!_0x11ad5d['valid']){_0x56130f=!![],console['error'](a24_0x3d15b1['red'](_0x2b67a0(0x134)+_0x3e5cc7[_0x2b67a0(0x15d)]+':'));for(const _0x7695ab of _0x11ad5d[_0x2b67a0(0x163)]){console[_0x2b67a0(0x171)]('\x20\x20'+a24_0x3d15b1[_0x2b67a0(0x170)]('✗')+'\x20'+_0x7695ab[_0x2b67a0(0x14b)]+':\x20'+_0x7695ab[_0x2b67a0(0x15c)]);}}for(const _0x5c6cae of _0x11ad5d[_0x2b67a0(0x169)]){console['error']('\x20\x20'+a24_0x3d15b1[_0x2b67a0(0x15f)]('⚠')+'\x20'+_0x5c6cae[_0x2b67a0(0x14b)]+':\x20'+_0x5c6cae[_0x2b67a0(0x15c)]);}}if(_0x56130f)return console[_0x2b67a0(0x171)](a24_0x3d15b1['red'](_0x2b67a0(0x14e))),0x1;const _0x247156=await _0x3a7eef[_0x2b67a0(0x16d)][_0x2b67a0(0x146)](_0x341496),_0x154b62=await withProgressSpinner(_0x2b67a0(0x17c)+_0x341496+_0x2b67a0(0x15e),_0x1614b5=>preparePush({'engage':_0x3a7eef[_0x2b67a0(0x16d)]},_0x1451a1,_0x247156,{'progress':{'update':_0x13332d=>_0x1614b5['setPhase'](_0x13332d)}}),{'verbose':_0x4a27b9[_0x2b67a0(0x137)]}),_0x15a842=_0x154b62['data'];await withProgressSpinner(_0x2b67a0(0x179),_0x3a8bf3=>resolveAndBuildInputs({'engage':_0x3a7eef[_0x2b67a0(0x16d)]},_0x15a842,_0x247156,{'progress':{'update':_0x3f7374=>_0x3a8bf3['setPhase'](_0x3f7374)}}),{'verbose':_0x4a27b9[_0x2b67a0(0x137)]});const _0x4bba34=_0x15a842[_0x2b67a0(0x16f)](_0x18c6b2=>_0x18c6b2[_0x2b67a0(0x152)]===_0x2b67a0(0x168)),_0x1f3547=_0x15a842['filter'](_0x454c22=>_0x454c22['action']===_0x2b67a0(0x173));console[_0x2b67a0(0x171)](_0x2b67a0(0x153)+_0x341496+'\x27:');if(_0x4bba34['length']>0x0){console['error']('\x20\x20'+a24_0x3d15b1[_0x2b67a0(0x149)]('+\x20'+_0x4bba34[_0x2b67a0(0x175)]+_0x2b67a0(0x13c)));for(const _0x5ecb91 of _0x4bba34){console['error']('\x20\x20\x20\x20'+a24_0x3d15b1[_0x2b67a0(0x149)]('+')+'\x20'+_0x5ecb91[_0x2b67a0(0x165)][_0x2b67a0(0x14d)]);}}if(_0x1f3547[_0x2b67a0(0x175)]>0x0){console[_0x2b67a0(0x171)]('\x20\x20'+a24_0x3d15b1[_0x2b67a0(0x15f)]('~\x20'+_0x1f3547['length']+'\x20templates\x20to\x20update:'));for(const _0x239edb of _0x1f3547){console[_0x2b67a0(0x171)](_0x2b67a0(0x15a)+a24_0x3d15b1[_0x2b67a0(0x15f)]('~')+'\x20'+_0x239edb['def'][_0x2b67a0(0x14d)]);}}if(_0x4bba34[_0x2b67a0(0x175)]===0x0&&_0x1f3547[_0x2b67a0(0x175)]===0x0)return console[_0x2b67a0(0x171)](a24_0x3d15b1['green'](_0x2b67a0(0x15b))),0x0;if(_0x4a27b9[_0x2b67a0(0x16c)])return console[_0x2b67a0(0x171)](a24_0x3d15b1['yellow']('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(!_0x4a27b9['yes']){if(!isInteractive())return console[_0x2b67a0(0x171)](a24_0x3d15b1['red'](_0x2b67a0(0x139)),_0x2b67a0(0x178)),console['error'](a24_0x3d15b1[_0x2b67a0(0x157)](_0x2b67a0(0x16e))),0x1;const _0x5b39e0=await confirmKey(_0x2b67a0(0x158)+(_0x4bba34[_0x2b67a0(0x175)]+_0x1f3547[_0x2b67a0(0x175)])+'\x20templates?');if(!_0x5b39e0)return console[_0x2b67a0(0x171)](a24_0x3d15b1[_0x2b67a0(0x15f)](_0x2b67a0(0x16b)),_0x2b67a0(0x166)),0x1;}const _0x554a25=await withProgressSpinner(_0x2b67a0(0x177),_0x22cb89=>executePush({'engage':_0x3a7eef['engage']},_0x15a842,{'progress':{'update':_0x21f1d9=>_0x22cb89['setPhase'](_0x21f1d9)}}),{'verbose':_0x4a27b9[_0x2b67a0(0x137)]}),_0x543871=_0x554a25[_0x2b67a0(0x150)];for(const _0x3f823a of _0x543871[_0x2b67a0(0x141)]){if(_0x3f823a[_0x2b67a0(0x148)]&&(_0x3f823a[_0x2b67a0(0x152)]===_0x2b67a0(0x16a)||_0x3f823a[_0x2b67a0(0x152)]===_0x2b67a0(0x136))){const _0x35ac03=getTemplateUrl(_0x4a27b9[_0x2b67a0(0x176)],_0x247156,_0x3f823a[_0x2b67a0(0x148)]),_0x3d92b9=_0x3f823a['action']===_0x2b67a0(0x16a)?'+':'~',_0x3d0bf4=_0x3f823a['action']===_0x2b67a0(0x16a)?a24_0x3d15b1[_0x2b67a0(0x149)](_0x3d92b9):a24_0x3d15b1[_0x2b67a0(0x15f)](_0x3d92b9);console[_0x2b67a0(0x171)]('\x20\x20'+_0x3d0bf4+'\x20'+hyperlink(_0x3f823a[_0x2b67a0(0x14d)],_0x35ac03)+'\x20'+a24_0x3d15b1['dim'](_0x35ac03));}}_0x543871[_0x2b67a0(0x16a)]>0x0&&console[_0x2b67a0(0x171)](a24_0x3d15b1['green']('✔\x20Created\x20'+_0x543871[_0x2b67a0(0x16a)]+_0x2b67a0(0x135)));_0x543871[_0x2b67a0(0x136)]>0x0&&console[_0x2b67a0(0x171)](a24_0x3d15b1[_0x2b67a0(0x149)](_0x2b67a0(0x145)+_0x543871[_0x2b67a0(0x136)]+'\x20templates'));if(_0x543871[_0x2b67a0(0x163)][_0x2b67a0(0x175)]>0x0){console['error'](a24_0x3d15b1[_0x2b67a0(0x170)]('✘\x20'+_0x543871[_0x2b67a0(0x163)][_0x2b67a0(0x175)]+_0x2b67a0(0x160)));for(const _0x35bf29 of _0x543871[_0x2b67a0(0x163)]){console[_0x2b67a0(0x171)]('\x20\x20'+a24_0x3d15b1[_0x2b67a0(0x170)](_0x35bf29[_0x2b67a0(0x14d)])+':\x20'+_0x35bf29[_0x2b67a0(0x171)]);}}return saveSessionContext({'engage_workspace':_0x341496},_0x4a27b9[_0x2b67a0(0x14a)]),_0x543871['errors'][_0x2b67a0(0x175)]>0x0?0x1:0x0;}}function a24_0x4644(){const _0x5afdfe=['resolveWorkspaceId','121hiyRYu','templateId','green','session','path','cwd','name','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','Found\x20','data','Template\x20YAML\x20files\x20must\x20have\x20type:\x20template\x20in\x20their\x20definition.','action','\x0aPush\x20summary\x20for\x20workspace\x20\x27','config','100061VlIRht','engage_workspace','dim','Push\x20','20LandJW','\x20\x20\x20\x20','✔\x20All\x20templates\x20are\x20up\x20to\x20date','message','relativePath','\x27...','yellow','\x20errors:','2962317lMPUWL','647030mDIKIh','errors','528fXXbif','def','-\x20no\x20changes\x20applied','No\x20template\x20YAML\x20files\x20found\x20in\x20','create','warnings','created','Aborted.','dryRun','engage','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','filter','red','error','144syPGHa','update','Workspace\x20is\x20required.','length','site','Pushing\x20templates...','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Resolving\x20references...','10FKTihe','resolve','Preparing\x20push\x20to\x20workspace\x20\x27','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20templates','1509665jsYRvl','\x0aValidation\x20errors\x20in\x20','\x20templates','updated','verbose','12845ohYFuT','\x0aError:','dirname','54783MeKyPw','\x20new\x20templates:','engage:template:push','\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','description','21933gypaJM','results','\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','1698XOfIfG','cyan','✔\x20Updated\x20'];a24_0x4644=function(){return _0x5afdfe;};return a24_0x4644();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x364dfe=a25_0x4a39;(function(_0x27224d,_0x23a26a){const _0x169017=a25_0x4a39,_0x51d24b=_0x27224d();while(!![]){try{const _0x155fa3=-parseInt(_0x169017(0xea))/0x1+parseInt(_0x169017(0x101))/0x2*(parseInt(_0x169017(0x105))/0x3)+-parseInt(_0x169017(0xee))/0x4+parseInt(_0x169017(0xe3))/0x5*(-parseInt(_0x169017(0xf9))/0x6)+parseInt(_0x169017(0x10f))/0x7+-parseInt(_0x169017(0x104))/0x8+-parseInt(_0x169017(0xf4))/0x9*(-parseInt(_0x169017(0xed))/0xa);if(_0x155fa3===_0x23a26a)break;else _0x51d24b['push'](_0x51d24b['shift']());}catch(_0x3a9fa8){_0x51d24b['push'](_0x51d24b['shift']());}}}(a25_0x5d6a,0x225e3));import{BaseCommand}from'./command.js';function a25_0x4a39(_0x2808de,_0x225c40){_0x2808de=_0x2808de-0xe0;const _0x5d6a57=a25_0x5d6a();let _0x4a3940=_0x5d6a57[_0x2808de];return _0x4a3940;}import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a25_0xc223c8 from'chalk';import a25_0x5c1c46 from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a25_0x5d6a(){const _0x16ed71=['\x20warning(s)\x20found','invalidCount','\x20non-template\x20file(s)\x20skipped','green','resolve','\x20non-template\x20file(s)\x20skipped)','warnings','validCount','1109710pyyvMo','description','template','relativePath','✔\x20All\x20','error','yellow','skippedCount','filter','45jGwPic','Error:\x20Directory\x20not\x20found:\x20','\x20warning(s)','.yml','Validate\x20template\x20YAML\x20files','\x20template(s)\x20valid','name','134461ECgkoz','.yaml','warningCount','6259370ijHEfx','829652FgiTaN','engage:template:validate','\x20(skipped:\x20','Validation\x20failed:\x20','No\x20template\x20YAML\x20files\x20found\x20in\x20','errors','9VvGcyg','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','valid','\x20template(s)\x20with\x20errors,\x20','verbose','182964OOpuCX','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20valid','endsWith','reason','red','length','dim','166256mVbBxT','log','\x20error(s)','2214080fAXURa','9spRqgm','cwd'];a25_0x5d6a=function(){return _0x16ed71;};return a25_0x5d6a();}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageTemplateValidateCommand extends BaseCommand{[a25_0x364dfe(0xe9)]=a25_0x364dfe(0xef);[a25_0x364dfe(0x110)]=a25_0x364dfe(0xe7);async['execute'](_0x3d9417){const _0x2297bf=a25_0x364dfe,{options:_0x4fd727,args:_0x2cb635}=_0x3d9417,_0x17b1f2=_0x4fd727,_0x3ab05e=_0x2cb635[0x0],_0x459592=_0x3ab05e?a25_0x5c1c46[_0x2297bf(0x10b)](_0x3ab05e):undefined,_0x1c523c=_0x459592?isYamlFile(_0x459592):![];let _0x2df53e,_0xd9f0c5;if(_0x1c523c&&_0x459592)_0x2df53e=a25_0x5c1c46['dirname'](_0x459592),_0xd9f0c5=_0x459592;else _0x459592?_0x2df53e=_0x459592:_0x2df53e=process[_0x2297bf(0x106)]();if(!_0xd9f0c5&&!existsSync(_0x2df53e))return console[_0x2297bf(0x114)](a25_0xc223c8[_0x2297bf(0xfe)](_0x2297bf(0xe4)+_0x2df53e+'\x0a')),0x1;let _0x32e3ad;if(_0xd9f0c5){if(!_0xd9f0c5[_0x2297bf(0xfc)](_0x2297bf(0xe6))&&!_0xd9f0c5[_0x2297bf(0xfc)](_0x2297bf(0xeb)))return console[_0x2297bf(0x114)](a25_0xc223c8['red'](_0x2297bf(0xf5)+_0xd9f0c5+'\x0a')),0x1;_0x32e3ad=[_0xd9f0c5];}else _0x32e3ad=findYamlFiles(_0x2df53e);if(_0x32e3ad[_0x2297bf(0xff)]===0x0)return console[_0x2297bf(0x114)](a25_0xc223c8[_0x2297bf(0xfe)](_0x2297bf(0xfa)+_0x2df53e+'\x0a')),0x1;const _0x2d21aa=validateYamlFiles(_0x32e3ad,_0x2df53e,{'filterType':_0x2297bf(0x111)}),_0x11a413=calculateSummary(_0x2d21aa),_0x1d7c1c=_0x2d21aa[_0x2297bf(0xe2)](isValidationResult);if(_0x1d7c1c[_0x2297bf(0xff)]===0x0)return console[_0x2297bf(0x114)](a25_0xc223c8[_0x2297bf(0xe0)](_0x2297bf(0xf2)+_0x2df53e+'\x0a')),_0x11a413[_0x2297bf(0xe1)]>0x0&&console[_0x2297bf(0x114)](a25_0xc223c8[_0x2297bf(0x100)]('('+_0x11a413[_0x2297bf(0xe1)]+_0x2297bf(0x10c))),0x0;for(const _0x32baec of _0x2d21aa){if(!isValidationResult(_0x32baec)){_0x17b1f2[_0x2297bf(0xf8)]&&console[_0x2297bf(0x102)](a25_0xc223c8[_0x2297bf(0x100)]('-\x20'+_0x32baec[_0x2297bf(0x112)]+_0x2297bf(0xf0)+_0x32baec[_0x2297bf(0xfd)]+')'));continue;}const {relativePath:_0x32895d,source:_0x3d9daa,result:_0x196c0b}=_0x32baec;if(_0x196c0b['valid']&&_0x196c0b[_0x2297bf(0x10d)]['length']===0x0)_0x17b1f2['verbose']&&console[_0x2297bf(0x102)](a25_0xc223c8[_0x2297bf(0x10a)]('✔\x20'+_0x32895d));else _0x196c0b[_0x2297bf(0xf6)]?(console['log'](a25_0xc223c8[_0x2297bf(0xe0)]('⚠\x20'+_0x32895d+':\x20'+_0x196c0b[_0x2297bf(0x10d)][_0x2297bf(0xff)]+_0x2297bf(0xe5))),console[_0x2297bf(0x102)](formatValidationResult(_0x196c0b,_0x3d9daa,_0x32895d))):(console['log'](a25_0xc223c8[_0x2297bf(0xfe)]('✖\x20'+_0x32895d+':\x20'+_0x196c0b[_0x2297bf(0xf3)]['length']+_0x2297bf(0x103))),console[_0x2297bf(0x102)](formatValidationResult(_0x196c0b,_0x3d9daa,_0x32895d)));}return console['log'](''),_0x11a413['hasErrors']?(console[_0x2297bf(0x102)](a25_0xc223c8[_0x2297bf(0xfe)](_0x2297bf(0xf1)+_0x11a413[_0x2297bf(0x108)]+_0x2297bf(0xf7)+_0x11a413[_0x2297bf(0x10e)]+_0x2297bf(0xfb))),_0x11a413[_0x2297bf(0xec)]>0x0&&console[_0x2297bf(0x102)](a25_0xc223c8[_0x2297bf(0xe0)](_0x11a413['warningCount']+_0x2297bf(0x107))),_0x11a413['skippedCount']>0x0&&console[_0x2297bf(0x102)](a25_0xc223c8[_0x2297bf(0x100)](_0x11a413[_0x2297bf(0xe1)]+_0x2297bf(0x109))),0x1):(console[_0x2297bf(0x102)](a25_0xc223c8['green'](_0x2297bf(0x113)+_0x11a413['validCount']+_0x2297bf(0xe8))),_0x11a413[_0x2297bf(0xec)]>0x0&&console[_0x2297bf(0x102)](a25_0xc223c8['yellow'](_0x11a413[_0x2297bf(0xec)]+_0x2297bf(0x107))),_0x11a413['skippedCount']>0x0&&console[_0x2297bf(0x102)](a25_0xc223c8[_0x2297bf(0x100)](_0x11a413['skippedCount']+_0x2297bf(0x109))),0x0);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x5b859c=a26_0x16f7;function a26_0x16f7(_0x3b2ffc,_0x21a413){_0x3b2ffc=_0x3b2ffc-0xdf;const _0x6e1e71=a26_0x6e1e();let _0x16f71a=_0x6e1e71[_0x3b2ffc];return _0x16f71a;}(function(_0x2b816a,_0x32bc3d){const _0xf2ea05=a26_0x16f7,_0x117021=_0x2b816a();while(!![]){try{const _0x3717c4=-parseInt(_0xf2ea05(0x104))/0x1+-parseInt(_0xf2ea05(0xe2))/0x2+-parseInt(_0xf2ea05(0x12f))/0x3*(-parseInt(_0xf2ea05(0x135))/0x4)+-parseInt(_0xf2ea05(0xeb))/0x5*(parseInt(_0xf2ea05(0x12a))/0x6)+-parseInt(_0xf2ea05(0x12d))/0x7+-parseInt(_0xf2ea05(0xe1))/0x8+-parseInt(_0xf2ea05(0xf8))/0x9*(-parseInt(_0xf2ea05(0x100))/0xa);if(_0x3717c4===_0x32bc3d)break;else _0x117021['push'](_0x117021['shift']());}catch(_0x3989a2){_0x117021['push'](_0x117021['shift']());}}}(a26_0x6e1e,0x267f5));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_0x52866b from'chalk';function formatDuration(_0x548300){const _0x44cb69=a26_0x16f7;if(_0x548300<0x3c)return _0x548300+'s';if(_0x548300<0xe10)return Math['floor'](_0x548300/0x3c)+'m\x20'+_0x548300%0x3c+'s';const _0x6f2bc8=Math[_0x44cb69(0x11a)](_0x548300/0xe10),_0x379b3c=Math[_0x44cb69(0x11a)](_0x548300%0xe10/0x3c);return _0x379b3c>0x0?_0x6f2bc8+'h\x20'+_0x379b3c+'m':_0x6f2bc8+'h';}function formatRelativeTime(_0x2ccffa){const _0x2492c9=a26_0x16f7,_0x72b96e=Date[_0x2492c9(0x131)]()-_0x2ccffa[_0x2492c9(0x120)](),_0x317b02=Math[_0x2492c9(0x11a)](Math[_0x2492c9(0xec)](_0x72b96e)/0x3e8);if(_0x317b02<0x3c)return'just\x20now';const _0x72ea67=Math[_0x2492c9(0x11a)](_0x317b02/0x3c);if(_0x72ea67<0x3c)return _0x72ea67+_0x2492c9(0x12b);const _0x2c5b48=Math['floor'](_0x72ea67/0x3c);if(_0x2c5b48<0x18)return _0x2c5b48+_0x2492c9(0xf4);const _0x1d6d51=Math[_0x2492c9(0x11a)](_0x2c5b48/0x18);if(_0x1d6d51<0x1e)return _0x1d6d51+'d\x20ago';return Math['floor'](_0x1d6d51/0x1e)+_0x2492c9(0x10b);}function a26_0x6e1e(){const _0x30c295=['Show\x20job\x20details','submit','user_name','Query:\x20','List\x20jobs','Status\x20filter:\x20','url','success','database','floor','presto','description','end_at','Job\x20type:\x20','name','getTime','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>','\x20jobs','substring','created_at','INVALID_ARGUMENT','Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','Submitting\x20job...','args','length','6XjwXNV','m\x20ago','Listing\x20jobs...','812602ooJtMq','\x27\x20to\x20verify\x20the\x20job\x20status','831CUCkHK','debug','now','log','trino','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','988vxbilb','Submit\x20a\x20job','job:submit','job_id','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','563632jQNDKP','386282ExrBPF','start_at','show','type','\x20\x20Job\x20ID:\x20','priority','\x20row','...','validate','63620DtbuqK','abs','Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','query','Cancelled','jobType','hive','yes','list','h\x20ago','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>','join','error','7045353BYyEVA','✔\x20Job\x20submitted','status','dim','push','execute','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>','green','10KgwGqp','✔\x20Retrieved\x20','round','Database:\x20','301146rQSouK','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','result','map','red','verbose','data','mo\x20ago','jobs','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','\x20job','No\x20SQL\x20statements\x20found\x20in\x20file','Submitting\x20kill\x20request...'];a26_0x6e1e=function(){return _0x30c295;};return a26_0x6e1e();}export class JobListCommand extends BaseCommand{[a26_0x5b859c(0x11f)]='jobs';[a26_0x5b859c(0x11c)]=a26_0x5b859c(0x115);async[a26_0x5b859c(0xfd)](_0x202da3){const _0x1eb112=a26_0x5b859c,{options:_0x3ab080,tdx:_0x5c1cef}=_0x202da3,_0x283e75=resolveLimit(_0x3ab080['limit'],DEFAULT_DISPLAY_LIMIT),_0x4cadff=_0x3ab080[_0x1eb112(0xfa)];_0x3ab080[_0x1eb112(0x109)]&&(console['error']('Limit:\x20'+_0x283e75+_0x1eb112(0x122)),_0x4cadff&&console['error'](_0x1eb112(0x116)+_0x4cadff));const _0xf50347=await withSpinner(_0x1eb112(0x12c),()=>_0x5c1cef[_0x1eb112(0x10c)][_0x1eb112(0xf3)]({'from':0x0,'to':_0x283e75-0x1,'status':_0x4cadff}),{'verbose':_0x3ab080[_0x1eb112(0x109)]}),_0x1c8ba0=_0xf50347[_0x1eb112(0x10a)];console[_0x1eb112(0xf7)]('✔\x20Found\x20'+_0x1c8ba0[_0x1eb112(0x129)]+_0x1eb112(0x10e)+(_0x1c8ba0[_0x1eb112(0x129)]!==0x1?'s':''));const _0xe91e04=_0x3ab080['site'];if(isStructuredFormat(_0x3ab080)){const _0x5a4c4b=_0x1c8ba0[_0x1eb112(0x107)](_0x4d679d=>{const _0x352cc9=_0x1eb112;let _0x38ae34;if(_0x4d679d['start_at']&&_0x4d679d[_0x352cc9(0x11d)]){const _0x3b7a76=new Date(_0x4d679d[_0x352cc9(0xe3)])[_0x352cc9(0x120)](),_0x72964c=new Date(_0x4d679d['end_at'])[_0x352cc9(0x120)]();_0x38ae34=Math[_0x352cc9(0x102)]((_0x72964c-_0x3b7a76)/0x3e8);}return{'job_id':_0x4d679d[_0x352cc9(0xdf)],'type':_0x4d679d[_0x352cc9(0xe5)]===_0x352cc9(0x11b)?_0x352cc9(0x133):_0x4d679d[_0x352cc9(0xe5)],'status':_0x4d679d['status'],'user_name':_0x4d679d[_0x352cc9(0x113)],'duration_sec':_0x38ae34,'created_at':_0x4d679d[_0x352cc9(0x124)],'started_at':_0x4d679d[_0x352cc9(0xe3)],'end_at':_0x4d679d['end_at']};});await handleSDKOutput(_0x5a4c4b,_0x3ab080);}else for(const _0x5adbb7 of _0x1c8ba0){const _0x573832=_0x5adbb7[_0x1eb112(0xfa)]===_0x1eb112(0x118)?a26_0x52866b[_0x1eb112(0xff)]:_0x5adbb7[_0x1eb112(0xfa)]===_0x1eb112(0xf7)?a26_0x52866b[_0x1eb112(0x108)]:a26_0x52866b[_0x1eb112(0xfb)],_0x2e0ea1=_0x573832(_0x5adbb7['status']),_0x16a35d=getJobUrl(_0xe91e04,_0x5adbb7['job_id']),_0x3e99a6=hyperlink(_0x5adbb7[_0x1eb112(0xdf)],_0x16a35d),_0x2bceef=a26_0x52866b[_0x1eb112(0xfb)](_0x5adbb7[_0x1eb112(0xe5)]===_0x1eb112(0x11b)?_0x1eb112(0x133):_0x5adbb7[_0x1eb112(0xe5)]),_0x480cb1=[];if(_0x5adbb7[_0x1eb112(0xe3)]&&_0x5adbb7[_0x1eb112(0x11d)]){const _0x4832ba=Math[_0x1eb112(0x102)]((new Date(_0x5adbb7[_0x1eb112(0x11d)])[_0x1eb112(0x120)]()-new Date(_0x5adbb7[_0x1eb112(0xe3)])['getTime']())/0x3e8);_0x480cb1[_0x1eb112(0xfc)](formatDuration(_0x4832ba));}if(_0x5adbb7[_0x1eb112(0x11d)])_0x480cb1[_0x1eb112(0xfc)](formatRelativeTime(new Date(_0x5adbb7[_0x1eb112(0x11d)])));else _0x5adbb7[_0x1eb112(0xe3)]&&_0x480cb1[_0x1eb112(0xfc)](formatRelativeTime(new Date(_0x5adbb7[_0x1eb112(0xe3)])));const _0x2efdc7=_0x480cb1[_0x1eb112(0x129)]>0x0?a26_0x52866b[_0x1eb112(0xfb)]('\x20'+_0x480cb1[_0x1eb112(0xf6)](',\x20')):'';console[_0x1eb112(0x132)]('⚡\x20'+_0x3e99a6+'\x20'+_0x2bceef+'\x20'+_0x2e0ea1+_0x2efdc7);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0x5b859c(0x11f)]='job:show';[a26_0x5b859c(0x11c)]=a26_0x5b859c(0x111);['validate'](_0x510ecf){const _0x288580=a26_0x5b859c,_0xefad2d=_0x510ecf[_0x288580(0x128)][0x0];if(!_0xefad2d)return _0x288580(0x121);return undefined;}async[a26_0x5b859c(0xfd)](_0x2ae2e5){const _0x331a34=a26_0x5b859c,{options:_0x96b0e0,args:_0x5cc81e,tdx:_0x3270a0}=_0x2ae2e5,_0x2cd554=_0x5cc81e[0x0],_0x36f9c9=await withSpinner('Getting\x20job\x20details...',()=>_0x3270a0[_0x331a34(0x10c)][_0x331a34(0xe4)](_0x2cd554),{'verbose':_0x96b0e0[_0x331a34(0x109)]}),_0x484ffe=_0x36f9c9[_0x331a34(0x10a)];let _0x255c6f;if(_0x484ffe[_0x331a34(0xe3)]&&_0x484ffe[_0x331a34(0x11d)]){const _0x3aa28c=new Date(_0x484ffe[_0x331a34(0xe3)])[_0x331a34(0x120)](),_0x573b16=new Date(_0x484ffe['end_at'])['getTime']();_0x255c6f=Math[_0x331a34(0x102)]((_0x573b16-_0x3aa28c)/0x3e8);}const _0x500be8={'job_id':_0x484ffe[_0x331a34(0xdf)],'type':_0x484ffe[_0x331a34(0xe5)],'status':_0x484ffe[_0x331a34(0xfa)],..._0x484ffe['user_name']&&{'user_name':_0x484ffe['user_name']},..._0x255c6f!==undefined&&{'duration_sec':_0x255c6f},..._0x484ffe[_0x331a34(0x124)]&&{'created_at':_0x484ffe[_0x331a34(0x124)]},..._0x484ffe[_0x331a34(0xe3)]&&{'started_at':_0x484ffe[_0x331a34(0xe3)]},..._0x484ffe[_0x331a34(0x11d)]&&{'end_at':_0x484ffe[_0x331a34(0x11d)]},..._0x484ffe[_0x331a34(0x119)]&&{'database':_0x484ffe[_0x331a34(0x119)]},..._0x484ffe['priority']!==undefined&&{'priority':_0x484ffe[_0x331a34(0xe7)]},..._0x484ffe[_0x331a34(0x117)]&&{'url':_0x484ffe['url']},..._0x484ffe['query']&&{'query':_0x484ffe[_0x331a34(0xee)]},..._0x484ffe[_0x331a34(0x130)]&&{'debug':_0x484ffe[_0x331a34(0x130)]}};return await handleSingleObjectOutput(_0x500be8,_0x96b0e0),0x0;}}export class JobKillCommand extends BaseCommand{[a26_0x5b859c(0x11f)]='job:kill';['description']='Kill\x20a\x20job';[a26_0x5b859c(0xea)](_0x4f98b2){const _0x17686e=a26_0x5b859c,_0x529cdb=_0x4f98b2[_0x17686e(0x128)][0x0];if(!_0x529cdb)return _0x17686e(0xfe);return undefined;}async[a26_0x5b859c(0xfd)](_0x6943f7){const _0x532dce=a26_0x5b859c,{options:_0x4a3817,args:_0xf4942e,tdx:_0x507a5c}=_0x6943f7,_0x1b3c38=_0xf4942e[0x0];if(!_0x4a3817[_0x532dce(0xf2)]){const _0x282f56=await confirm(_0x532dce(0x10d)+_0x1b3c38+'?');if(!_0x282f56)return console[_0x532dce(0xf7)](_0x532dce(0xef)),0x0;}return await withSpinner(_0x532dce(0x110),()=>_0x507a5c[_0x532dce(0x10c)]['kill'](_0x1b3c38),{'verbose':_0x4a3817[_0x532dce(0x109)]}),console[_0x532dce(0xf7)]('✔\x20Kill\x20request\x20submitted\x20for\x20job\x20'+_0x1b3c38),console[_0x532dce(0xf7)](_0x532dce(0x105)+_0x1b3c38+_0x532dce(0x12e)),0x0;}}export class JobSubmitCommand extends BaseCommand{[a26_0x5b859c(0x11f)]=a26_0x5b859c(0x137);[a26_0x5b859c(0x11c)]=a26_0x5b859c(0x136);async[a26_0x5b859c(0xfd)](_0x213c91){const _0x49fe42=a26_0x5b859c,{options:_0x3dc60e,args:_0x497f20,tdx:_0x2a09a9}=_0x213c91,_0x4021f4=_0x3dc60e[_0x49fe42(0xf0)]||_0x49fe42(0x133),_0xdecc49=_0x3dc60e['file'],_0x11df86=_0x3dc60e[_0x49fe42(0x119)]||'information_schema',_0x262390=_0x3dc60e[_0x49fe42(0x106)];if(_0x4021f4!==_0x49fe42(0x133)&&_0x4021f4!==_0x49fe42(0xf1))throw new SDKError(ErrorCode[_0x49fe42(0x125)],_0x49fe42(0x134));let _0x32e702;if(_0xdecc49){if(_0x497f20[0x0])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x49fe42(0xe0));const _0x2166b6=readSqlStatementsFromFile(_0xdecc49);if(_0x2166b6[_0x49fe42(0x129)]===0x0)throw new SDKError(ErrorCode[_0x49fe42(0x125)],_0x49fe42(0x10f));if(_0x2166b6['length']>0x1)throw new SDKError(ErrorCode[_0x49fe42(0x125)],_0x49fe42(0xed));_0x32e702=_0x2166b6[0x0];}else{if(!_0x497f20[0x0])throw new SDKError(ErrorCode[_0x49fe42(0x125)],_0x49fe42(0x126));_0x32e702=_0x497f20[0x0];}_0x3dc60e[_0x49fe42(0x109)]&&(console[_0x49fe42(0xf7)](_0x49fe42(0x11e)+_0x4021f4),console['error'](_0x49fe42(0x103)+_0x11df86),console[_0x49fe42(0xf7)](_0x49fe42(0x114)+_0x32e702[_0x49fe42(0x123)](0x0,0x64)+(_0x32e702[_0x49fe42(0x129)]>0x64?_0x49fe42(0xe9):'')));const _0x261cb7=await withSpinner(_0x49fe42(0x127),()=>_0x2a09a9[_0x49fe42(0x10c)][_0x49fe42(0x112)](_0x11df86,_0x32e702,_0x4021f4,_0x262390),{'verbose':_0x3dc60e['verbose']}),_0x5abae6=_0x261cb7['data'];return console[_0x49fe42(0xf7)](_0x49fe42(0xf9)),console['error'](_0x49fe42(0xe6)+_0x5abae6[_0x49fe42(0xdf)]),await handleSDKOutput([_0x5abae6],_0x3dc60e),0x0;}}export class JobResultCommand extends BaseCommand{['name']='job:result';[a26_0x5b859c(0x11c)]='Get\x20job\x20results';[a26_0x5b859c(0xea)](_0x1a2d7d){const _0xdb7d38=a26_0x5b859c,_0xf085db=_0x1a2d7d['args'][0x0];if(!_0xf085db)return _0xdb7d38(0xf5);return undefined;}async[a26_0x5b859c(0xfd)](_0x40e663){const _0xba7381=a26_0x5b859c,{options:_0x57f007,args:_0x11a246,tdx:_0xd5e66e}=_0x40e663,_0x1a18d9=_0x11a246[0x0],_0x4047f2=await withSpinner('Getting\x20job\x20results...',()=>_0xd5e66e['jobs'][_0xba7381(0x106)](_0x1a18d9),{'verbose':_0x57f007['verbose']}),_0x2d61f9=_0x4047f2[_0xba7381(0x10a)];return console[_0xba7381(0xf7)](_0xba7381(0x101)+_0x2d61f9[_0xba7381(0x129)]+_0xba7381(0xe8)+(_0x2d61f9[_0xba7381(0x129)]!==0x1?'s':'')),await handleSDKOutput(_0x2d61f9,_0x57f007),0x0;}}
|
|
1
|
+
const a26_0xbf4631=a26_0x161d;(function(_0x6069e4,_0x512e7d){const _0x48ef06=a26_0x161d,_0x5ab66e=_0x6069e4();while(!![]){try{const _0x40fec4=parseInt(_0x48ef06(0x18e))/0x1+parseInt(_0x48ef06(0x1a0))/0x2*(parseInt(_0x48ef06(0x1c3))/0x3)+parseInt(_0x48ef06(0x1b5))/0x4*(-parseInt(_0x48ef06(0x1a3))/0x5)+-parseInt(_0x48ef06(0x18f))/0x6*(-parseInt(_0x48ef06(0x1d2))/0x7)+-parseInt(_0x48ef06(0x1c0))/0x8*(-parseInt(_0x48ef06(0x1a9))/0x9)+-parseInt(_0x48ef06(0x180))/0xa*(parseInt(_0x48ef06(0x1b2))/0xb)+-parseInt(_0x48ef06(0x196))/0xc*(parseInt(_0x48ef06(0x19e))/0xd);if(_0x40fec4===_0x512e7d)break;else _0x5ab66e['push'](_0x5ab66e['shift']());}catch(_0x377fbe){_0x5ab66e['push'](_0x5ab66e['shift']());}}}(a26_0x3253,0xd6802));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';function a26_0x3253(){const _0x115919=['Show\x20job\x20details','url','kill','Getting\x20job\x20details...','user_name','List\x20jobs','execute','hive','11lkdbLS','error','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','4xetUHH','Query\x20is\x20required\x0aUsage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','jobType','Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','trino','type','Database:\x20','database','just\x20now','Getting\x20job\x20results...','yes','32ZSXaMq','\x27\x20to\x20verify\x20the\x20job\x20status','floor','3014733lAHRnJ','file','Listing\x20jobs...','--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','now','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20result\x20<job-id>','map','No\x20SQL\x20statements\x20found\x20in\x20file','log','args','verbose','created_at','Cancelled','site','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20kill\x20<job-id>','8308839vSBMPB','result','\x20row','end_at','getTime','✔\x20Job\x20submitted','query','Query:\x20','Submitting\x20job...','data','job_id','Kill\x20a\x20job','length','push','priority','h\x20ago','6244510gjQzte','Status\x20filter:\x20','\x20jobs','mo\x20ago','...','jobs','Submit\x20a\x20job','submit','name','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','INVALID_ARGUMENT','show','start_at','round','775185PwkwAM','6xVUJaD','abs','\x20job','job:submit','✔\x20Found\x20','debug','status','22745748jKIJUN','Submitting\x20kill\x20request...','presto','Job\x20type:\x20','Job\x20ID\x20is\x20required\x0aUsage:\x20job\x20show\x20<job-id>','red','description','join','13HmlkOF','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','2lTEQmw','job:result','Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','1779185mbUUdk','substring','validate','Limit:\x20','dim','limit','1771398zwcGOd'];a26_0x3253=function(){return _0x115919;};return a26_0x3253();}import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../sdk/query/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a26_0x161d(_0x46234b,_0x3c43ad){_0x46234b=_0x46234b-0x179;const _0x325318=a26_0x3253();let _0x161ddb=_0x325318[_0x46234b];return _0x161ddb;}import{getJobUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a26_0x46d3ab from'chalk';function formatDuration(_0x1926f7){const _0x4e8c73=a26_0x161d;if(_0x1926f7<0x3c)return _0x1926f7+'s';if(_0x1926f7<0xe10)return Math['floor'](_0x1926f7/0x3c)+'m\x20'+_0x1926f7%0x3c+'s';const _0x3e4697=Math[_0x4e8c73(0x1c2)](_0x1926f7/0xe10),_0x7ba71a=Math[_0x4e8c73(0x1c2)](_0x1926f7%0xe10/0x3c);return _0x7ba71a>0x0?_0x3e4697+'h\x20'+_0x7ba71a+'m':_0x3e4697+'h';}function formatRelativeTime(_0xd6a20d){const _0xf54111=a26_0x161d,_0x3033b7=Date[_0xf54111(0x1c7)]()-_0xd6a20d[_0xf54111(0x1d6)](),_0x37d489=Math['floor'](Math[_0xf54111(0x190)](_0x3033b7)/0x3e8);if(_0x37d489<0x3c)return _0xf54111(0x1bd);const _0x28fa24=Math[_0xf54111(0x1c2)](_0x37d489/0x3c);if(_0x28fa24<0x3c)return _0x28fa24+'m\x20ago';const _0x705900=Math[_0xf54111(0x1c2)](_0x28fa24/0x3c);if(_0x705900<0x18)return _0x705900+_0xf54111(0x17f);const _0x375aae=Math[_0xf54111(0x1c2)](_0x705900/0x18);if(_0x375aae<0x1e)return _0x375aae+'d\x20ago';return Math[_0xf54111(0x1c2)](_0x375aae/0x1e)+_0xf54111(0x183);}export class JobListCommand extends BaseCommand{[a26_0xbf4631(0x188)]='jobs';[a26_0xbf4631(0x19c)]=a26_0xbf4631(0x1af);async[a26_0xbf4631(0x1b0)](_0x5241ff){const _0x4a45d1=a26_0xbf4631,{options:_0x10aa16,tdx:_0x4ff72e}=_0x5241ff,_0x4ef32d=resolveLimit(_0x10aa16[_0x4a45d1(0x1a8)],DEFAULT_DISPLAY_LIMIT),_0x148e17=_0x10aa16[_0x4a45d1(0x195)];_0x10aa16['verbose']&&(console['error'](_0x4a45d1(0x1a6)+_0x4ef32d+_0x4a45d1(0x182)),_0x148e17&&console[_0x4a45d1(0x1b3)](_0x4a45d1(0x181)+_0x148e17));const _0x2842d2=await withSpinner(_0x4a45d1(0x1c5),()=>_0x4ff72e[_0x4a45d1(0x185)]['list']({'from':0x0,'to':_0x4ef32d-0x1,'status':_0x148e17}),{'verbose':_0x10aa16[_0x4a45d1(0x1cd)]}),_0x559055=_0x2842d2['data'];console[_0x4a45d1(0x1b3)](_0x4a45d1(0x193)+_0x559055[_0x4a45d1(0x17c)]+_0x4a45d1(0x191)+(_0x559055[_0x4a45d1(0x17c)]!==0x1?'s':''));const _0x2d5537=_0x10aa16[_0x4a45d1(0x1d0)];if(isStructuredFormat(_0x10aa16)){const _0x5ce3ad=_0x559055[_0x4a45d1(0x1c9)](_0x27c946=>{const _0x456363=_0x4a45d1;let _0x49f25f;if(_0x27c946[_0x456363(0x18c)]&&_0x27c946[_0x456363(0x1d5)]){const _0x4ab9c1=new Date(_0x27c946['start_at'])[_0x456363(0x1d6)](),_0x1dc06f=new Date(_0x27c946[_0x456363(0x1d5)])['getTime']();_0x49f25f=Math[_0x456363(0x18d)]((_0x1dc06f-_0x4ab9c1)/0x3e8);}return{'job_id':_0x27c946[_0x456363(0x17a)],'type':_0x27c946[_0x456363(0x1ba)]===_0x456363(0x198)?_0x456363(0x1b9):_0x27c946['type'],'status':_0x27c946['status'],'user_name':_0x27c946[_0x456363(0x1ae)],'duration_sec':_0x49f25f,'created_at':_0x27c946['created_at'],'started_at':_0x27c946[_0x456363(0x18c)],'end_at':_0x27c946[_0x456363(0x1d5)]};});await handleSDKOutput(_0x5ce3ad,_0x10aa16);}else for(const _0x1da066 of _0x559055){const _0x20ddfd=_0x1da066[_0x4a45d1(0x195)]==='success'?a26_0x46d3ab['green']:_0x1da066[_0x4a45d1(0x195)]==='error'?a26_0x46d3ab[_0x4a45d1(0x19b)]:a26_0x46d3ab['dim'],_0x1bcd7b=_0x20ddfd(_0x1da066[_0x4a45d1(0x195)]),_0x3e363b=getJobUrl(_0x2d5537,_0x1da066[_0x4a45d1(0x17a)]),_0x44d179=hyperlink(_0x1da066[_0x4a45d1(0x17a)],_0x3e363b),_0x4632f4=a26_0x46d3ab[_0x4a45d1(0x1a7)](_0x1da066[_0x4a45d1(0x1ba)]===_0x4a45d1(0x198)?_0x4a45d1(0x1b9):_0x1da066['type']),_0x41809f=[];if(_0x1da066[_0x4a45d1(0x18c)]&&_0x1da066[_0x4a45d1(0x1d5)]){const _0x629820=Math[_0x4a45d1(0x18d)]((new Date(_0x1da066[_0x4a45d1(0x1d5)])[_0x4a45d1(0x1d6)]()-new Date(_0x1da066[_0x4a45d1(0x18c)])[_0x4a45d1(0x1d6)]())/0x3e8);_0x41809f[_0x4a45d1(0x17d)](formatDuration(_0x629820));}if(_0x1da066[_0x4a45d1(0x1d5)])_0x41809f[_0x4a45d1(0x17d)](formatRelativeTime(new Date(_0x1da066[_0x4a45d1(0x1d5)])));else _0x1da066[_0x4a45d1(0x18c)]&&_0x41809f[_0x4a45d1(0x17d)](formatRelativeTime(new Date(_0x1da066[_0x4a45d1(0x18c)])));const _0xa19224=_0x41809f[_0x4a45d1(0x17c)]>0x0?a26_0x46d3ab[_0x4a45d1(0x1a7)]('\x20'+_0x41809f[_0x4a45d1(0x19d)](',\x20')):'';console[_0x4a45d1(0x1cb)]('⚡\x20'+_0x44d179+'\x20'+_0x4632f4+'\x20'+_0x1bcd7b+_0xa19224);}return 0x0;}}export class JobShowCommand extends BaseCommand{[a26_0xbf4631(0x188)]='job:show';['description']=a26_0xbf4631(0x1aa);[a26_0xbf4631(0x1a5)](_0x4a1a5c){const _0x3e2ad2=a26_0xbf4631,_0xad1900=_0x4a1a5c[_0x3e2ad2(0x1cc)][0x0];if(!_0xad1900)return _0x3e2ad2(0x19a);return undefined;}async[a26_0xbf4631(0x1b0)](_0x1f8db2){const _0x31fc3f=a26_0xbf4631,{options:_0x2835d8,args:_0x5e59b6,tdx:_0x253b98}=_0x1f8db2,_0x4aea2a=_0x5e59b6[0x0],_0x56dbf0=await withSpinner(_0x31fc3f(0x1ad),()=>_0x253b98[_0x31fc3f(0x185)][_0x31fc3f(0x18b)](_0x4aea2a),{'verbose':_0x2835d8[_0x31fc3f(0x1cd)]}),_0x238d53=_0x56dbf0[_0x31fc3f(0x179)];let _0x233a64;if(_0x238d53[_0x31fc3f(0x18c)]&&_0x238d53[_0x31fc3f(0x1d5)]){const _0x46082d=new Date(_0x238d53[_0x31fc3f(0x18c)])[_0x31fc3f(0x1d6)](),_0x5370d7=new Date(_0x238d53[_0x31fc3f(0x1d5)])[_0x31fc3f(0x1d6)]();_0x233a64=Math[_0x31fc3f(0x18d)]((_0x5370d7-_0x46082d)/0x3e8);}const _0xa8447a={'job_id':_0x238d53[_0x31fc3f(0x17a)],'type':_0x238d53['type'],'status':_0x238d53['status'],..._0x238d53[_0x31fc3f(0x1ae)]&&{'user_name':_0x238d53[_0x31fc3f(0x1ae)]},..._0x233a64!==undefined&&{'duration_sec':_0x233a64},..._0x238d53[_0x31fc3f(0x1ce)]&&{'created_at':_0x238d53['created_at']},..._0x238d53[_0x31fc3f(0x18c)]&&{'started_at':_0x238d53[_0x31fc3f(0x18c)]},..._0x238d53[_0x31fc3f(0x1d5)]&&{'end_at':_0x238d53[_0x31fc3f(0x1d5)]},..._0x238d53[_0x31fc3f(0x1bc)]&&{'database':_0x238d53[_0x31fc3f(0x1bc)]},..._0x238d53[_0x31fc3f(0x17e)]!==undefined&&{'priority':_0x238d53[_0x31fc3f(0x17e)]},..._0x238d53[_0x31fc3f(0x1ab)]&&{'url':_0x238d53['url']},..._0x238d53['query']&&{'query':_0x238d53[_0x31fc3f(0x1d8)]},..._0x238d53[_0x31fc3f(0x194)]&&{'debug':_0x238d53['debug']}};return await handleSingleObjectOutput(_0xa8447a,_0x2835d8),0x0;}}export class JobKillCommand extends BaseCommand{[a26_0xbf4631(0x188)]='job:kill';[a26_0xbf4631(0x19c)]=a26_0xbf4631(0x17b);[a26_0xbf4631(0x1a5)](_0x4fbda8){const _0x315b9a=a26_0xbf4631,_0x19f719=_0x4fbda8[_0x315b9a(0x1cc)][0x0];if(!_0x19f719)return _0x315b9a(0x1d1);return undefined;}async[a26_0xbf4631(0x1b0)](_0x4c18aa){const _0x2eb680=a26_0xbf4631,{options:_0x47dcff,args:_0xe61619,tdx:_0x2d608f}=_0x4c18aa,_0x4567eb=_0xe61619[0x0];if(!_0x47dcff[_0x2eb680(0x1bf)]){const _0x2bee90=await confirm(_0x2eb680(0x189)+_0x4567eb+'?');if(!_0x2bee90)return console['error'](_0x2eb680(0x1cf)),0x0;}return await withSpinner(_0x2eb680(0x197),()=>_0x2d608f['jobs'][_0x2eb680(0x1ac)](_0x4567eb),{'verbose':_0x47dcff[_0x2eb680(0x1cd)]}),console['error'](_0x2eb680(0x1b4)+_0x4567eb),console[_0x2eb680(0x1b3)](_0x2eb680(0x19f)+_0x4567eb+_0x2eb680(0x1c1)),0x0;}}export class JobSubmitCommand extends BaseCommand{['name']=a26_0xbf4631(0x192);['description']=a26_0xbf4631(0x186);async[a26_0xbf4631(0x1b0)](_0x385d2c){const _0x47f361=a26_0xbf4631,{options:_0xf7b5c8,args:_0x58a7fa,tdx:_0x48ddb4}=_0x385d2c,_0x40eb4c=_0xf7b5c8[_0x47f361(0x1b7)]||_0x47f361(0x1b9),_0x5c6d1b=_0xf7b5c8[_0x47f361(0x1c4)],_0x439cd0=_0xf7b5c8[_0x47f361(0x1bc)]||'information_schema',_0x2c9214=_0xf7b5c8[_0x47f361(0x1d3)];if(_0x40eb4c!==_0x47f361(0x1b9)&&_0x40eb4c!==_0x47f361(0x1b1))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x47f361(0x1c6));let _0x3ee933;if(_0x5c6d1b){if(_0x58a7fa[0x0])throw new SDKError(ErrorCode[_0x47f361(0x18a)],_0x47f361(0x1a2));const _0x29dd93=readSqlStatementsFromFile(_0x5c6d1b);if(_0x29dd93['length']===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x47f361(0x1ca));if(_0x29dd93['length']>0x1)throw new SDKError(ErrorCode[_0x47f361(0x18a)],_0x47f361(0x1b8));_0x3ee933=_0x29dd93[0x0];}else{if(!_0x58a7fa[0x0])throw new SDKError(ErrorCode[_0x47f361(0x18a)],_0x47f361(0x1b6));_0x3ee933=_0x58a7fa[0x0];}_0xf7b5c8[_0x47f361(0x1cd)]&&(console[_0x47f361(0x1b3)](_0x47f361(0x199)+_0x40eb4c),console[_0x47f361(0x1b3)](_0x47f361(0x1bb)+_0x439cd0),console[_0x47f361(0x1b3)](_0x47f361(0x1d9)+_0x3ee933[_0x47f361(0x1a4)](0x0,0x64)+(_0x3ee933[_0x47f361(0x17c)]>0x64?_0x47f361(0x184):'')));const _0xc71531=await withSpinner(_0x47f361(0x1da),()=>_0x48ddb4[_0x47f361(0x185)][_0x47f361(0x187)](_0x439cd0,_0x3ee933,_0x40eb4c,_0x2c9214),{'verbose':_0xf7b5c8[_0x47f361(0x1cd)]}),_0x4c1807=_0xc71531[_0x47f361(0x179)];return console[_0x47f361(0x1b3)](_0x47f361(0x1d7)),console[_0x47f361(0x1b3)]('\x20\x20Job\x20ID:\x20'+_0x4c1807[_0x47f361(0x17a)]),await handleSDKOutput([_0x4c1807],_0xf7b5c8),0x0;}}export class JobResultCommand extends BaseCommand{[a26_0xbf4631(0x188)]=a26_0xbf4631(0x1a1);['description']='Get\x20job\x20results';['validate'](_0x2554a0){const _0x4c7db5=a26_0xbf4631,_0x272bf8=_0x2554a0['args'][0x0];if(!_0x272bf8)return _0x4c7db5(0x1c8);return undefined;}async['execute'](_0x13d587){const _0x37b97f=a26_0xbf4631,{options:_0x538f33,args:_0x1a6ca6,tdx:_0x43ce14}=_0x13d587,_0x3ec72c=_0x1a6ca6[0x0],_0x37cf02=await withSpinner(_0x37b97f(0x1be),()=>_0x43ce14[_0x37b97f(0x185)][_0x37b97f(0x1d3)](_0x3ec72c),{'verbose':_0x538f33[_0x37b97f(0x1cd)]}),_0x4a7b22=_0x37cf02[_0x37b97f(0x179)];return console[_0x37b97f(0x1b3)]('✔\x20Retrieved\x20'+_0x4a7b22['length']+_0x37b97f(0x1d4)+(_0x4a7b22[_0x37b97f(0x17c)]!==0x1?'s':'')),await handleSDKOutput(_0x4a7b22,_0x538f33),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x4766e6=a27_0x5cd9;(function(_0xbccb2,_0x4b6cb3){const _0x2823d8=a27_0x5cd9,_0x3301eb=_0xbccb2();while(!![]){try{const _0x514a98=parseInt(_0x2823d8(0x290))/0x1+parseInt(_0x2823d8(0x230))/0x2*(-parseInt(_0x2823d8(0x1da))/0x3)+parseInt(_0x2823d8(0x22b))/0x4+parseInt(_0x2823d8(0x257))/0x5+-parseInt(_0x2823d8(0x19b))/0x6*(-parseInt(_0x2823d8(0x262))/0x7)+parseInt(_0x2823d8(0x1d5))/0x8+-parseInt(_0x2823d8(0x247))/0x9;if(_0x514a98===_0x4b6cb3)break;else _0x3301eb['push'](_0x3301eb['shift']());}catch(_0xa10dab){_0x3301eb['push'](_0x3301eb['shift']());}}}(a27_0x1352,0x78c2c));import a27_0x176760 from'chalk';import a27_0x5c2765 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_0x5cd9(_0x433408,_0xd584da){_0x433408=_0x433408-0x191;const _0x135270=a27_0x1352();let _0x5cd9d7=_0x135270[_0x433408];return _0x5cd9d7;}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(_0x2ebdf8){const _0x282e68=a27_0x5cd9;return!_0x2ebdf8&&(console['error'](_0x282e68(0x1b5)),console[_0x282e68(0x1e8)]('Usage:\x20journey\x20<subcommand>\x20<name-or-path>')),!!_0x2ebdf8;}function withJsonFormat(_0x290073){const _0x2742c2=a27_0x5cd9;if(!_0x290073['format']&&!_0x290073[_0x2742c2(0x217)]&&!_0x290073[_0x2742c2(0x215)]&&!_0x290073['tsv'])return{..._0x290073,'format':'json','json':!![]};return _0x290073;}function formatJourneyState(_0xb1b708){const _0x574647=a27_0x5cd9;switch(_0xb1b708){case _0x574647(0x1a7):return a27_0x176760[_0x574647(0x1fa)](_0x574647(0x227));case'draft':return a27_0x176760[_0x574647(0x1f2)](_0x574647(0x1e0));case _0x574647(0x29b):return a27_0x176760[_0x574647(0x20a)]('(paused)');case _0x574647(0x293):return a27_0x176760[_0x574647(0x1ae)]('(completed)');case _0x574647(0x1c7):return a27_0x176760['dim'](_0x574647(0x27f));default:return'('+_0xb1b708+')';}}function formatJourneyItem(_0x13a2ed,_0x2e051b='',_0x46e479){const _0x2a79f8=a27_0x5cd9,_0x28aa97=formatJourneyState(_0x13a2ed[_0x2a79f8(0x1ec)]),_0x3578ac=_0x46e479?hyperlink(_0x13a2ed['journeyBundleName'],_0x46e479):_0x13a2ed[_0x2a79f8(0x214)];return _0x2e051b+_0x2a79f8(0x1a8)+_0x3578ac+'\x20'+_0x28aa97;}function escapeRegex(_0x4f075c){const _0x4720af=a27_0x5cd9;return _0x4f075c[_0x4720af(0x266)](/[.*+?^${}()|[\]\\]/g,_0x4720af(0x1c5));}function globToRegex(_0x230218){const _0x54520b=a27_0x5cd9,_0x894d6b=_0x230218[_0x54520b(0x201)]('*')[_0x54520b(0x249)](escapeRegex);return new RegExp(_0x894d6b[_0x54520b(0x218)]('.*'),'i');}function buildRuleToNameMapping(_0x57783a){const _0x13e7cf=a27_0x5cd9,_0x559e6d=new Map();if(_0x57783a[_0x13e7cf(0x203)])for(const [_0x16cf9,_0x45693d]of Object[_0x13e7cf(0x1c2)](_0x57783a[_0x13e7cf(0x203)])){if(_0x45693d['rule']){const _0x1bb33a=serializeRule(_0x45693d[_0x13e7cf(0x1e3)]),_0x44d5b8=_0x559e6d[_0x13e7cf(0x213)](_0x1bb33a);_0x44d5b8?_0x44d5b8[_0x13e7cf(0x191)](_0x16cf9):_0x559e6d[_0x13e7cf(0x208)](_0x1bb33a,[_0x16cf9]);}}return _0x559e6d;}async function resolveJourneyIdFromInput(_0x4827a6,_0x5f478c,_0x5e2e4f){const _0x440eba=a27_0x5cd9,_0x2f385e=await resolveJourneyTarget(_0x4827a6,_0x5f478c[_0x440eba(0x21f)],_0x5f478c[_0x440eba(0x21e)]),_0x18550c=_0x2f385e['parentSegment'];if(!_0x18550c)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x440eba(0x279));const _0x288763=await withSpinner(_0x440eba(0x194),()=>_0x5e2e4f[_0x440eba(0x1c4)][_0x440eba(0x256)](_0x18550c),{'verbose':_0x5f478c[_0x440eba(0x21e)]}),_0x29a29e=_0x288763[_0x440eba(0x272)],_0x3c14cb=await withSpinner(_0x440eba(0x1ce),()=>_0x5e2e4f[_0x440eba(0x24f)][_0x440eba(0x1d8)](_0x29a29e,_0x2f385e[_0x440eba(0x263)]),{'verbose':_0x5f478c[_0x440eba(0x21e)]});return{'journeyId':_0x3c14cb[_0x440eba(0x272)],'journeyName':_0x2f385e[_0x440eba(0x263)],'parentSegmentId':_0x29a29e};}async function resolveJourneyTarget(_0x47d5e8,_0x5e0f18,_0x16c5ee){const _0x352666=a27_0x5cd9;if(isYamlFilePath(_0x47d5e8))try{const _0x2ae38a=await resolveYamlFilePath(_0x47d5e8);return _0x16c5ee&&(console['error']('Resolved\x20YAML\x20file:\x20'+_0x47d5e8),console[_0x352666(0x1e8)]('\x20\x20Parent\x20segment:\x20'+_0x2ae38a[_0x352666(0x21f)]),console[_0x352666(0x1e8)](_0x352666(0x1d1)+_0x2ae38a['segmentName']),console['error'](_0x352666(0x267)+(_0x2ae38a[_0x352666(0x1f4)]||'(root)'))),{'journeyName':_0x2ae38a[_0x352666(0x288)],'parentSegment':_0x2ae38a[_0x352666(0x21f)],'resolved':_0x2ae38a};}catch(_0x1e6840){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x352666(0x28f)+_0x1e6840[_0x352666(0x1d0)]);}if(!_0x5e0f18)throw new SDKError(ErrorCode[_0x352666(0x264)],'No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');return{'journeyName':_0x47d5e8,'parentSegment':_0x5e0f18};}export class JourneyListCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x261);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x195);async[a27_0x4766e6(0x250)](_0x4793f2){const _0xace63=a27_0x4766e6,{options:_0x3bb832,args:_0x4c2c41,tdx:_0x52ad36}=_0x4793f2,_0x3f7cd5=_0x4c2c41[0x0],_0x35b2d3=_0x3bb832[_0xace63(0x21f)];if(!_0x35b2d3)return console[_0xace63(0x1e8)](_0xace63(0x243)),console[_0xace63(0x1e8)](_0xace63(0x197)),0x1;const _0x5a3b28=await withSpinner(_0xace63(0x194),()=>_0x52ad36['segment'][_0xace63(0x256)](_0x35b2d3),{'verbose':_0x3bb832[_0xace63(0x21e)]}),_0x3ac269=_0x5a3b28[_0xace63(0x272)];_0x3bb832[_0xace63(0x21e)]&&(console[_0xace63(0x1e8)](_0xace63(0x199)+_0x35b2d3+_0xace63(0x1f7)+_0x3ac269+')'),_0x3f7cd5&&console[_0xace63(0x1e8)]('Pattern:\x20'+_0x3f7cd5));const _0x226108=await withSpinner(_0xace63(0x1bc),()=>_0x52ad36['segment']['getParentFull'](_0x3ac269),{'verbose':_0x3bb832[_0xace63(0x21e)]}),_0x2cad14=_0x226108['data'],_0x292c8b=_0x2cad14[_0xace63(0x1a4)],_0x198db3=await withSpinner(_0xace63(0x241),()=>_0x52ad36[_0xace63(0x24f)]['listJourneysWithFolders'](_0x3ac269,_0x292c8b),{'verbose':_0x3bb832[_0xace63(0x21e)]});let _0x41241e=_0x198db3[_0xace63(0x272)]['journeys'];const _0x4ec14f=_0x198db3[_0xace63(0x272)][_0xace63(0x1f6)],_0x25a14b=new Map();for(const _0x188543 of _0x4ec14f){_0x25a14b[_0xace63(0x208)](_0x188543['id'],_0x188543[_0xace63(0x198)]);}if(_0x3f7cd5){const _0xcf3826=globToRegex(_0x3f7cd5);_0x41241e=_0x41241e[_0xace63(0x233)](_0x4a507c=>_0xcf3826[_0xace63(0x1f8)](_0x4a507c[_0xace63(0x214)]));}console[_0xace63(0x1e8)](_0xace63(0x251)+_0x41241e[_0xace63(0x1b7)]+_0xace63(0x1e1)+(_0x41241e[_0xace63(0x1b7)]!==0x1?'s':''));const _0x2586a9=_0x8a42a8=>{const _0xad1a95=_0xace63;return getConsoleNextUrl(_0x3bb832[_0xad1a95(0x1d9)],_0xad1a95(0x1ba)+_0x3ac269+_0xad1a95(0x20f)+_0x8a42a8+_0xad1a95(0x1eb));};if(_0x3bb832[_0xace63(0x22c)]==='table')await handleSDKOutput(_0x41241e,_0x3bb832);else{if(_0x3bb832['format']===_0xace63(0x217)){const _0x189912=_0x41241e[_0xace63(0x249)](_0x1f6700=>({..._0x1f6700,'url':_0x2586a9(_0x1f6700['id'])}));await handleSDKOutput(_0x189912,_0x3bb832);}else{console[_0xace63(0x1f9)]('['+_0x35b2d3+']');const _0x5c2dec=new Map(),_0x413f04=[];for(const _0x1f4054 of _0x41241e){if(!_0x1f4054['folderId']||_0x1f4054[_0xace63(0x25a)]===_0x292c8b)_0x413f04[_0xace63(0x191)](_0x1f4054);else{const _0x2d1d51=_0x5c2dec[_0xace63(0x213)](_0x1f4054[_0xace63(0x25a)])||[];_0x2d1d51['push'](_0x1f4054),_0x5c2dec[_0xace63(0x208)](_0x1f4054[_0xace63(0x25a)],_0x2d1d51);}}const _0x16b64e=(_0x163242,_0x5ccef7)=>_0x163242[_0xace63(0x214)][_0xace63(0x244)](_0x5ccef7[_0xace63(0x214)],undefined,{'sensitivity':_0xace63(0x1b9)});_0x413f04[_0xace63(0x1cc)](_0x16b64e);for(const _0x34d124 of _0x413f04){console[_0xace63(0x1f9)](formatJourneyItem(_0x34d124,'',_0x2586a9(_0x34d124['id'])));}const _0x4f0f9=[..._0x5c2dec[_0xace63(0x1c2)]()][_0xace63(0x1cc)]((_0x5a3766,_0x13c3ff)=>{const _0x310096=_0xace63,_0x500d19=_0x25a14b['get'](_0x5a3766[0x0])||_0x5a3766[0x0],_0x1bcc3e=_0x25a14b[_0x310096(0x213)](_0x13c3ff[0x0])||_0x13c3ff[0x0];return _0x500d19['localeCompare'](_0x1bcc3e,undefined,{'sensitivity':_0x310096(0x1b9)});});for(const [_0x5b7d27,_0x3ba522]of _0x4f0f9){const _0x3ac2bc=_0x25a14b[_0xace63(0x213)](_0x5b7d27)||_0x5b7d27;console['log']('📁\x20'+_0x3ac2bc),_0x3ba522[_0xace63(0x1cc)](_0x16b64e);for(const _0x2dc8c2 of _0x3ba522){console['log'](formatJourneyItem(_0x2dc8c2,'\x20\x20',_0x2586a9(_0x2dc8c2['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x1e4);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x239);async[a27_0x4766e6(0x250)](_0x282093){const _0x51c3f2=a27_0x4766e6,{options:_0x204816,args:_0x18ec29,tdx:_0x11c259}=_0x282093,_0x3d76df=_0x18ec29[0x0];if(!_0x3d76df)return console[_0x51c3f2(0x1e8)]('Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required'),console[_0x51c3f2(0x1e8)](_0x51c3f2(0x28b)),console['error'](_0x51c3f2(0x285)),console['error'](_0x51c3f2(0x21d)),0x1;_0x204816[_0x51c3f2(0x21e)]&&console['error']('Input:\x20'+_0x3d76df);const {journeyId:_0x3a5743,parentSegmentId:_0x1a775a}=await resolveJourneyIdFromInput(_0x3d76df,_0x204816,_0x11c259);if(_0x204816[_0x51c3f2(0x246)]){const _0x1167c9=getConsoleNextUrl(_0x204816[_0x51c3f2(0x1d9)],_0x51c3f2(0x1ba)+_0x1a775a+'/e/'+_0x3a5743+_0x51c3f2(0x235));return console['error'](a27_0x176760[_0x51c3f2(0x1fa)]('✔')+_0x51c3f2(0x1d4)+a27_0x176760['cyan'](_0x1167c9)),openBrowser(_0x1167c9),0x0;}const _0x549cee=await withSpinner('Getting\x20journey\x20details...',()=>_0x11c259[_0x51c3f2(0x24f)][_0x51c3f2(0x229)](_0x3a5743),{'verbose':_0x204816['verbose']}),_0x185cf3=_0x549cee[_0x51c3f2(0x272)],_0x29632a=_0x204816[_0x51c3f2(0x1a1)];let _0x1100dc;if(_0x29632a)try{const _0x4f751a=await withSpinner(_0x51c3f2(0x1e2),()=>_0x11c259[_0x51c3f2(0x24f)][_0x51c3f2(0x1ed)](_0x3a5743),{'verbose':_0x204816['verbose']});_0x1100dc=_0x4f751a[_0x51c3f2(0x272)];}catch{_0x204816[_0x51c3f2(0x21e)]&&console['error'](_0x51c3f2(0x29a));}const _0x4337ef=getConsoleNextUrl(_0x204816['site'],_0x51c3f2(0x1ba)+_0x1a775a+'/e/'+_0x3a5743+_0x51c3f2(0x235)),_0x55c762={'id':_0x185cf3['id'],'name':_0x185cf3[_0x51c3f2(0x27a)][_0x51c3f2(0x198)],'description':_0x185cf3[_0x51c3f2(0x27a)][_0x51c3f2(0x1b2)],'state':_0x185cf3[_0x51c3f2(0x27a)][_0x51c3f2(0x1ec)],'paused':_0x185cf3['attributes'][_0x51c3f2(0x29b)],'reentry_mode':_0x185cf3['attributes']['reentryMode'],'stages':_0x185cf3[_0x51c3f2(0x27a)][_0x51c3f2(0x1d3)]?.[_0x51c3f2(0x1b7)]||0x0,..._0x185cf3[_0x51c3f2(0x27a)][_0x51c3f2(0x24e)]&&{'goal':_0x185cf3[_0x51c3f2(0x27a)]['goal'][_0x51c3f2(0x198)]},..._0x1100dc&&{'statistics':{'size':_0x1100dc[_0x51c3f2(0x1fe)],'entered':_0x1100dc[_0x51c3f2(0x27e)],'goal_achieved':_0x1100dc['goalSize'],'completion_rate':_0x1100dc[_0x51c3f2(0x259)],'exit_or_jump':_0x1100dc[_0x51c3f2(0x274)],'exit_or_jump_rate':_0x1100dc[_0x51c3f2(0x296)],'stages':_0x1100dc['stages']}},'url':_0x4337ef};return await handleSingleObjectOutput(_0x55c762,_0x204816),0x0;}}function a27_0x1352(){const _0x3dd580=['length','Show\x20journey\x20statistics','base','/app/ps/','List\x20activations\x20for\x20a\x20journey','Fetching\x20parent\x20segment...','type','journey:activations','listJourneysFromParentSegment','\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','tdx.json','entries','Export\x20journey(s)\x20as\x20YAML\x20files','segment','\x5c$&','conversion','archived','\x20\x20Target:\x20','completeMilestoneRate','relativePath','Warning:\x20Could\x20not\x20resolve\x20segment\x20','sort','\x27\x20not\x20found\x20in\x20','Resolving\x20journey...','Resolving\x20version...','message','\x20\x20Name:\x20','bold','journeyStages','\x20Opening\x20','4313656imMyYu','Getting\x20column\x20mapping...','parent_segment','resolveJourneyId','site','57yzUANe','find','Pausing\x20journey...','Resume\x20a\x20paused\x20journey','toLowerCase','journey:versions','(draft)','\x20journey','Getting\x20journey\x20statistics...','rule','journey:view','Cancelled','links','✔\x20Journey\x20\x22','error','\x20\x20Journey\x20ID:\x20','createdAt','/j/da','state','getStatistics','milestoneSize','Error:\x20Stage\x20\x22','No\x20journeys\x20found','from','dim','Getting\x20version\x20','folderPath','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','folders','\x20(ID:\x20','test','log','green','Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','Write\x20','all','size','No\x20statistics\x20available\x20for\x20journey:\x20','-\x20no\x20files\x20written','split','includeHistory','segments','parentName','\x20\x20Consolidating\x20duplicate\x20segment:\x20','kind','No\x20traffic\x20data\x20available\x20for\x20journey:\x20','set','yes','yellow','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','Found\x20','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','Fetching\x20journeys\x20and\x20folders...','/e/','journey:pause','\x20journeys','\x20(rule\x20match)','get','journeyBundleName','jsonl','\x0aPull\x20summary:','json','join','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file','Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20','journey:columns','columns','\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser','verbose','parentSegment','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','(root)','listActivationsFlat','createVersion','Target\x20file:\x20','limit','\x20\x20Preserving\x20local\x20segment\x20name:\x20','(running)','Journey\x20name:\x20','getJourney','journey:version:view','3919312cMTFTH','format','Listing\x20journey\x20versions...','getColumnMapping','root\x20folder','706VhwAyr','helpText','buildIdToEmailMap','filter','Creating\x20new\x20version...','/j/da/je','journey:version:create','versionNumber','✔\x20Context\x20set:\x20','Show\x20journey\x20details','no_parent','listVersions','...','Database:\x20','reentryMode','Resuming\x20journey...','table','Listing\x20journeys...','getTrafficData','Error:\x20Parent\x20segment\x20context\x20required','localeCompare','List\x20all\x20versions\x20of\x20a\x20journey','web','15654600dMgtAE','journeyBundleId','map','user','\x20\x20-\x20','getSegment','connection','goal','journey','execute','✔\x20Found\x20','version','Warning:\x20Could\x20not\x20resolve\x20activation\x20','\x20=\x20','\x20Created\x20v','resolveParentId','1611460vZUAGt','content','completionRate','folderId','\x20details...','Pause\x20a\x20running\x20journey','Error:\x20Journey\x20not\x20found:\x20','buildIdToNameMap','cwd','getActivation','journey:list','3787dbslbn','journeyName','INVALID_ARGUMENT','red','replace','\x20\x20Folder\x20path:\x20','activation','args','add','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','stages','resume','stringify','journeyId','journey:pull','\x20versions)','data','values','exitOrJumpSize','stageNameMap','Error:\x20Invalid\x20--type\x20\x22','✔\x20All\x20files\x20are\x20up\x20to\x20date','renderStats','Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','attributes','utf-8','Error:\x20--version\x20option\x20is\x20required','audienceId','enteredSize','(archived)','cyan','session','Error:\x20Invalid\x20version\x20number:\x20','connector_config','setPhase','Options:','Input:\x20','nodes','segmentName','View\x20a\x20specific\x20version\x20of\x20a\x20journey','hasChanges','Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]','\x20unchanged\x20files','\x22\x20paused','\x22\x20resumed','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','391842WIWESr','Available\x20stages:\x20','\x20activation','completed','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','Fetching\x20','exitOrJumpRate','Listing\x20journey\x20activations...','repeat','Error:\x20Version\x20','\x20\x20Statistics\x20not\x20available','paused','Getting\x20journey\x20traffic\x20data...','push','Fetching\x20users\x20and\x20connections...','Error:\x20Journey\x20\x27','Resolving\x20parent\x20segment...','List\x20journeys\x20in\x20current\x20context','isNew','Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22','name','Parent\x20segment:\x20','Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22','84ihcfiT','updatedAt','Show\x20journey\x20table\x20column\x20mapping','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','\x20segment\x20rule(s)\x20to\x20match\x20for\x20','\x20files?','includeStats','journey:resume','has','rootFolderId','\x0aError:','\x20journey\x20files\x20to\x20','launched','🗺️\x20','database','targetDir','history','Table:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22','blue','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','Target\x20directory:\x20','then','description','file','diff','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','journey:stats'];a27_0x1352=function(){return _0x3dd580;};return a27_0x1352();}export class JourneyStatsCommand extends BaseCommand{['name']=a27_0x4766e6(0x1b6);['description']=a27_0x4766e6(0x1b8);async[a27_0x4766e6(0x250)](_0x57dc73){const _0x140416=a27_0x4766e6,{options:_0x244169,args:_0x55a685,tdx:_0x21c1b2}=_0x57dc73,_0x33ecd9=_0x55a685[0x0];if(!requireNameOrPath(_0x33ecd9))return 0x1;_0x244169[_0x140416(0x21e)]&&console[_0x140416(0x1e8)](_0x140416(0x286)+_0x33ecd9);const _0x2bef0d=_0x244169,_0xbb5b82=_0x2bef0d[_0x140416(0x1f1)],_0x21bb9c=_0x2bef0d['to'],_0x583f76=_0x2bef0d[_0x140416(0x202)],_0x26b5c8=_0x2bef0d['stage'];_0x583f76&&!_0xbb5b82&&!_0x21bb9c&&console[_0x140416(0x1e8)](_0x140416(0x220));const _0x5abd80=_0x583f76?withJsonFormat(_0x244169):_0x244169,{journeyId:_0x2d86d2,journeyName:_0x1164c3}=await resolveJourneyIdFromInput(_0x33ecd9,_0x5abd80,_0x21c1b2),_0x3393ad=_0xbb5b82||_0x21bb9c?{'from':_0xbb5b82,'to':_0x21bb9c}:undefined,_0x454919=await withSpinner(_0x140416(0x1e2),()=>Promise[_0x140416(0x1fd)]([_0x21c1b2[_0x140416(0x24f)][_0x140416(0x229)](_0x2d86d2),_0x21c1b2[_0x140416(0x24f)][_0x140416(0x1ed)](_0x2d86d2,_0x3393ad)]),{'verbose':_0x5abd80['verbose']}),[_0x4fcb0c,_0x1c8152]=_0x454919[_0x140416(0x272)];if(!_0x1c8152||_0x1c8152['journeyId']===null)return console[_0x140416(0x1e8)](_0x140416(0x1ff)+_0x1164c3),console['error']('Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.'),0x0;const _0x5a88eb=buildStageNameMap(_0x4fcb0c),_0x1c03be=!!(_0x3393ad&&_0x1c8152[_0x140416(0x1ab)]?.[_0x140416(0x1b7)]),_0x51bcf6={'stageNameMap':_0x5a88eb,'hasPeriod':_0x1c03be,'includeHistory':!!_0x583f76};if(_0x26b5c8&&_0x1c8152['stages']){const _0xf2a1d4=_0x1c8152[_0x140416(0x26c)]['find'](_0x508288=>{const _0x18a8a8=_0x140416,_0x127ff4=_0x5a88eb[_0x18a8a8(0x213)](_0x508288['id'])??'';return _0x127ff4['toLowerCase']()===_0x26b5c8[_0x18a8a8(0x1de)]();});if(_0xf2a1d4)return await handleSingleObjectOutput(formatStageStats(_0xf2a1d4,_0x51bcf6),_0x5abd80),0x0;const _0x1c8079=_0x1c8152[_0x140416(0x26c)][_0x140416(0x249)](_0x352638=>_0x5a88eb[_0x140416(0x213)](_0x352638['id'])??_0x352638['id']);return console[_0x140416(0x1e8)](_0x140416(0x1ef)+_0x26b5c8+'\x22\x20not\x20found'),console[_0x140416(0x1e8)](_0x140416(0x291)+_0x1c8079[_0x140416(0x218)](',\x20')),0x1;}const _0x4f6f19=_0x1c8152['stages']?.['map'](_0x6c74aa=>formatStageStats(_0x6c74aa,_0x51bcf6)),_0x43e1e2=assembleJourneyStats(_0x1c8152,{'from':_0xbb5b82,'to':_0x21bb9c,'includeHistory':_0x583f76});return await this[_0x140416(0x278)](_0x43e1e2,_0x4f6f19??[],_0x5abd80),0x0;}async['renderStats'](_0x429bb6,_0x55e03d,_0x14d480){const _0x514585=a27_0x4766e6,_0x3edb79=_0x14d480[_0x514585(0x22c)]===_0x514585(0x217)||_0x14d480[_0x514585(0x22c)]===_0x514585(0x215)||_0x14d480[_0x514585(0x217)]||_0x14d480[_0x514585(0x215)];if(_0x3edb79){_0x429bb6[_0x514585(0x26c)]=_0x55e03d,await handleSingleObjectOutput(_0x429bb6,_0x14d480);return;}await handleSingleObjectOutput(_0x429bb6,_0x14d480);for(const _0xdcf45f of _0x55e03d){console[_0x514585(0x1f9)](''),console['log'](String(a27_0x176760[_0x514585(0x280)][_0x514585(0x1d2)]('['+_0xdcf45f[_0x514585(0x198)]+']'))+a27_0x176760[_0x514585(0x1f2)]('\x20'+_0xdcf45f['id']));const {id:_0xdc7b20,name:_0x19404d,..._0x201ffd}=_0xdcf45f;await handleSingleObjectOutput(_0x201ffd,_0x14d480);}}}export class JourneyTrafficCommand extends BaseCommand{['name']='journey:traffic';[a27_0x4766e6(0x1b2)]='Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)';async[a27_0x4766e6(0x250)](_0x519dd8){const _0x1de91d=a27_0x4766e6,{options:_0x32c62f,args:_0x5ac595,tdx:_0x4a972f}=_0x519dd8,_0x5d1acc=_0x5ac595[0x0];if(!requireNameOrPath(_0x5d1acc))return 0x1;_0x32c62f[_0x1de91d(0x21e)]&&console[_0x1de91d(0x1e8)]('Input:\x20'+_0x5d1acc);const _0xc25bba=_0x32c62f,_0x1ce1e5=_0xc25bba[_0x1de91d(0x1bd)],_0x2a7d5a=_0xc25bba[_0x1de91d(0x1f1)],_0xc76f2a=_0xc25bba['to'],_0x16e81b=_0xc25bba[_0x1de91d(0x225)];if(_0x1ce1e5&&_0x1ce1e5!==_0x1de91d(0x1c6)&&_0x1ce1e5!==_0x1de91d(0x268))return console['error'](_0x1de91d(0x276)+_0x1ce1e5+_0x1de91d(0x26b)),0x1;const _0x52dfaf=withJsonFormat(_0x32c62f),{journeyId:_0x24372d,journeyName:_0x203c20}=await resolveJourneyIdFromInput(_0x5d1acc,_0x52dfaf,_0x4a972f),_0x276aa4={'type':_0x1ce1e5,'from':_0x2a7d5a,'to':_0xc76f2a,'limit':_0x16e81b},_0x3be589=await withSpinner(_0x1de91d(0x29c),()=>_0x4a972f[_0x1de91d(0x24f)][_0x1de91d(0x242)](_0x24372d,_0x276aa4),{'verbose':_0x52dfaf[_0x1de91d(0x21e)]}),_0x193e84=_0x3be589[_0x1de91d(0x272)],_0x42c974=_0x193e84['conversion']&&(_0x193e84[_0x1de91d(0x1c6)][_0x1de91d(0x287)]['length']>0x0||_0x193e84[_0x1de91d(0x1c6)][_0x1de91d(0x1e6)][_0x1de91d(0x1b7)]>0x0),_0x23093d=_0x193e84[_0x1de91d(0x268)]&&_0x193e84[_0x1de91d(0x268)][_0x1de91d(0x1b7)]>0x0;if(!_0x42c974&&!_0x23093d)return console[_0x1de91d(0x1e8)](_0x1de91d(0x207)+_0x203c20),console[_0x1de91d(0x1e8)](_0x1de91d(0x1fb)),_0x2a7d5a&&_0xc76f2a&&console['error']('If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).'),0x0;return await handleSingleObjectOutput(_0x193e84,_0x52dfaf),0x0;}}function formatStageStats(_0x1c00d8,_0x519d2e){const _0x5d78f2=a27_0x4766e6,_0x59d3af=_0x519d2e['hasPeriod']&&_0x1c00d8[_0x5d78f2(0x1ab)]?.[_0x5d78f2(0x1b7)]?aggregateStageHistory(_0x1c00d8[_0x5d78f2(0x1ab)]):{'size':_0x1c00d8[_0x5d78f2(0x1fe)],'entered':_0x1c00d8['enteredSize'],'milestone':_0x1c00d8[_0x5d78f2(0x1ee)],'milestone_rate':_0x1c00d8[_0x5d78f2(0x1c9)],'exit_or_jump':_0x1c00d8[_0x5d78f2(0x274)],'exit_or_jump_rate':_0x1c00d8[_0x5d78f2(0x296)]},_0x1a8055={'id':_0x1c00d8['id'],'name':_0x519d2e[_0x5d78f2(0x275)][_0x5d78f2(0x213)](_0x1c00d8['id'])??_0x1c00d8['id'],..._0x59d3af};return _0x519d2e['hasPeriod']&&_0x519d2e[_0x5d78f2(0x202)]&&_0x1c00d8[_0x5d78f2(0x1ab)]&&(_0x1a8055[_0x5d78f2(0x1ab)]=_0x1c00d8[_0x5d78f2(0x1ab)]),_0x1a8055;}export class JourneyPauseCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x210);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x25c);async['execute'](_0x4ada59){const _0x3c210b=a27_0x4766e6,{options:_0x319ced,args:_0x7e67ea,tdx:_0x9434a2}=_0x4ada59,_0x4fc6c6=_0x7e67ea[0x0];if(!requireNameOrPath(_0x4fc6c6))return 0x1;_0x319ced[_0x3c210b(0x21e)]&&console[_0x3c210b(0x1e8)]('Input:\x20'+_0x4fc6c6);const {journeyId:_0x182d5a,journeyName:_0x9204c2}=await resolveJourneyIdFromInput(_0x4fc6c6,_0x319ced,_0x9434a2);if(!_0x319ced[_0x3c210b(0x209)]){const _0x2cbc7d=await confirm(_0x3c210b(0x294)+_0x9204c2+'\x22?');if(!_0x2cbc7d)return console[_0x3c210b(0x1e8)](_0x3c210b(0x1e5)),0x0;}const _0xb0b1af=await withSpinner(_0x3c210b(0x1dc),()=>_0x9434a2[_0x3c210b(0x24f)]['pause'](_0x182d5a),{'verbose':_0x319ced['verbose']}),_0x548b3e=_0xb0b1af[_0x3c210b(0x272)];return console[_0x3c210b(0x1e8)](_0x3c210b(0x1e7)+_0x548b3e[_0x3c210b(0x27a)][_0x3c210b(0x198)]+_0x3c210b(0x28d)),0x0;}}export class JourneyResumeCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x1a2);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x1dd);async[a27_0x4766e6(0x250)](_0x518d98){const _0x5992ef=a27_0x4766e6,{options:_0x587f49,args:_0x35a040,tdx:_0x6434e0}=_0x518d98,_0x4b03e4=_0x35a040[0x0];if(!requireNameOrPath(_0x4b03e4))return 0x1;_0x587f49[_0x5992ef(0x21e)]&&console[_0x5992ef(0x1e8)](_0x5992ef(0x286)+_0x4b03e4);const {journeyId:_0x217065,journeyName:_0x13379f}=await resolveJourneyIdFromInput(_0x4b03e4,_0x587f49,_0x6434e0);if(!_0x587f49[_0x5992ef(0x209)]){const _0x5cfcc5=await confirm(_0x5992ef(0x1ad)+_0x13379f+'\x22?');if(!_0x5cfcc5)return console[_0x5992ef(0x1e8)]('Cancelled'),0x0;}const _0x48a98f=await withSpinner(_0x5992ef(0x23f),()=>_0x6434e0[_0x5992ef(0x24f)][_0x5992ef(0x26d)](_0x217065),{'verbose':_0x587f49[_0x5992ef(0x21e)]}),_0xedcbcf=_0x48a98f[_0x5992ef(0x272)];return console[_0x5992ef(0x1e8)](_0x5992ef(0x1e7)+_0xedcbcf[_0x5992ef(0x27a)][_0x5992ef(0x198)]+_0x5992ef(0x28e)),0x0;}}export class JourneyPullCommand extends BaseCommand{['name']=a27_0x4766e6(0x270);['description']=a27_0x4766e6(0x1c3);async['execute'](_0x271edf){const _0x3ef584=a27_0x4766e6,{options:_0x5ec324,args:_0x3852c0,tdx:_0x5d05ce}=_0x271edf,_0x260c3b=_0x5ec324,_0x5bfefe=_0x3852c0[0x0],_0xe34355=_0x5bfefe&&isYamlFilePath(_0x5bfefe),_0x29d126=await resolveTarget({'arg':_0xe34355?_0x5bfefe:undefined,'contextParent':_0x5ec324[_0x3ef584(0x21f)],'cwd':process[_0x3ef584(0x25f)]()});if(!isSuccessfulResolution(_0x29d126))return _0x29d126['errorCode']===_0x3ef584(0x23a)?(console[_0x3ef584(0x1e8)](a27_0x176760[_0x3ef584(0x20a)](_0x3ef584(0x20b))),console['error']('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[_0x3ef584(0x1e8)](_0x3ef584(0x19e)),console['error'](_0x3ef584(0x219)),console[_0x3ef584(0x1e8)](_0x3ef584(0x1c0))):(console[_0x3ef584(0x1e8)](a27_0x176760[_0x3ef584(0x265)]('Error:\x20'+_0x29d126[_0x3ef584(0x1d0)]+'\x0a')),_0x29d126[_0x3ef584(0x231)]&&console[_0x3ef584(0x1e8)](a27_0x176760['cyan'](_0x29d126[_0x3ef584(0x231)]))),0x1;let _0x324bdd=_0xe34355?undefined:_0x5bfefe,_0x43c7be,_0x3c8276;_0x29d126[_0x3ef584(0x1bd)]===_0x3ef584(0x1b3)&&(_0x324bdd=_0x29d126['resourceName'],_0x43c7be=_0x29d126['filePath'],_0x3c8276=_0x29d126[_0x3ef584(0x1f4)]);const _0x52938f=_0x29d126[_0x3ef584(0x204)],_0x5a33e9=_0x29d126[_0x3ef584(0x1aa)];_0x260c3b[_0x3ef584(0x21e)]&&(console[_0x3ef584(0x1e8)]('Parent\x20segment:\x20'+_0x52938f),console[_0x3ef584(0x1e8)](_0x3ef584(0x1b0)+_0x5a33e9),_0x324bdd&&console[_0x3ef584(0x1e8)](_0x3ef584(0x228)+_0x324bdd),_0x43c7be&&console[_0x3ef584(0x1e8)](_0x3ef584(0x224)+_0x43c7be),_0x3c8276&&console[_0x3ef584(0x1e8)]('Folder\x20path:\x20'+_0x3c8276));const _0x61091e=await withSpinner('Resolving\x20parent\x20segment...',()=>_0x5d05ce[_0x3ef584(0x1c4)][_0x3ef584(0x256)](_0x52938f),{'verbose':_0x5ec324[_0x3ef584(0x21e)]}),_0x1ed03f=_0x61091e[_0x3ef584(0x272)],{journeys:_0x416a1a,folders:_0x37fc65}=await withSpinner(_0x3ef584(0x20e),async()=>{const _0x403b19=_0x3ef584,[_0x25c30d,_0x3fc694]=await Promise[_0x403b19(0x1fd)]([_0x5d05ce[_0x403b19(0x24f)][_0x403b19(0x1bf)](_0x1ed03f,undefined,{'includeAllVersions':!![]}),_0x5d05ce['segment']['listFolders'](_0x1ed03f)]);return{'journeys':_0x25c30d,'folders':_0x3fc694};},{'verbose':_0x5ec324['verbose']})[_0x3ef584(0x1b1)](_0xb30e96=>_0xb30e96[_0x3ef584(0x272)]);let _0x55f15f=_0x416a1a;const _0x13f0c4=buildFolderIdToPathMap(_0x37fc65);if(_0x324bdd){const _0x3318bb=_0x55f15f[_0x3ef584(0x233)](_0x2755df=>_0x2755df[_0x3ef584(0x214)]['toLowerCase']()===_0x324bdd['toLowerCase']());if(_0x3318bb[_0x3ef584(0x1b7)]===0x0)return console[_0x3ef584(0x1e8)](_0x3ef584(0x25d)+_0x324bdd),console[_0x3ef584(0x1e8)](_0x3ef584(0x1af)),0x1;_0x55f15f=_0x3318bb;}if(_0x3c8276!==undefined){const _0x530cc9=_0x55f15f['filter'](_0xb87e85=>{const _0x1efe3a=_0x3ef584,_0x4ef27e=_0xb87e85[_0x1efe3a(0x25a)]?_0x13f0c4[_0x1efe3a(0x213)](_0xb87e85[_0x1efe3a(0x25a)])||'':'';return _0x4ef27e===_0x3c8276;});if(_0x530cc9[_0x3ef584(0x1b7)]===0x0&&_0x55f15f[_0x3ef584(0x1b7)]>0x0){console[_0x3ef584(0x1e8)](_0x3ef584(0x193)+_0x324bdd+_0x3ef584(0x1cd)+(_0x3c8276||_0x3ef584(0x22f))),console[_0x3ef584(0x1e8)](_0x3ef584(0x20d));for(const _0x1cfdc1 of _0x55f15f){const _0x3cdf6e=_0x1cfdc1['folderId']?_0x13f0c4[_0x3ef584(0x213)](_0x1cfdc1[_0x3ef584(0x25a)])||'':'';console[_0x3ef584(0x1e8)](_0x3ef584(0x24b)+(_0x3cdf6e||_0x3ef584(0x221))+'/'+_0x1cfdc1['journeyBundleName']);}return 0x1;}_0x55f15f=_0x530cc9;}if(_0x55f15f[_0x3ef584(0x1b7)]===0x0)return console[_0x3ef584(0x1e8)](_0x3ef584(0x1f0)),0x0;const _0x1b5176=new Map();for(const _0x4b0a96 of _0x55f15f){const _0x3996b4=_0x4b0a96[_0x3ef584(0x248)];!_0x1b5176['has'](_0x3996b4)&&_0x1b5176['set'](_0x3996b4,[]),_0x1b5176[_0x3ef584(0x213)](_0x3996b4)[_0x3ef584(0x191)](_0x4b0a96);}for(const _0x29f296 of _0x1b5176[_0x3ef584(0x273)]()){_0x29f296[_0x3ef584(0x1cc)]((_0x4dfdba,_0x37e4d9)=>(_0x4dfdba[_0x3ef584(0x237)]||0x0)-(_0x37e4d9['versionNumber']||0x0));}const _0x424c86=[],{idToEmailMap:_0x3f0246,connectionIdToNameMap:_0x34edf5}=await withSpinner(_0x3ef584(0x192),async()=>{const _0x140899=_0x3ef584,[_0x59a552,_0x203bcc]=await Promise[_0x140899(0x1fd)]([_0x5d05ce[_0x140899(0x24a)][_0x140899(0x232)](),_0x5d05ce[_0x140899(0x24d)][_0x140899(0x25e)]()]);return{'idToEmailMap':_0x59a552,'connectionIdToNameMap':_0x203bcc};},{'verbose':_0x5ec324[_0x3ef584(0x21e)]})['then'](_0x18d427=>_0x18d427[_0x3ef584(0x272)]);for(const _0x5d9421 of _0x1b5176[_0x3ef584(0x273)]()){const _0x165be7=_0x5d9421[0x0][_0x3ef584(0x214)],_0x200b69=_0x5d9421[0x0][_0x3ef584(0x25a)],_0x316b0b=_0x200b69?_0x13f0c4[_0x3ef584(0x213)](_0x200b69)||'':'',_0x1b8d0a=_0x316b0b?a27_0x5c2765[_0x3ef584(0x218)](_0x5a33e9,_0x316b0b):_0x5a33e9,_0x423811=_0x43c7be||a27_0x5c2765[_0x3ef584(0x218)](_0x1b8d0a,sanitizeFileName(_0x165be7)+'.yml');let _0x2c97a7,_0x10c6a6;if(existsSync(_0x423811))try{const _0x3b77ca=readFileSync(_0x423811,'utf-8'),_0x127ec7=parseYamlString(_0x3b77ca);_0x10c6a6=_0x127ec7,_0x2c97a7=buildRuleToNameMapping(_0x127ec7),_0x260c3b[_0x3ef584(0x21e)]&&_0x2c97a7[_0x3ef584(0x1fe)]>0x0&&console[_0x3ef584(0x1e8)]('Found\x20'+_0x2c97a7[_0x3ef584(0x1fe)]+_0x3ef584(0x19f)+_0x165be7);}catch(_0x18b2bd){_0x260c3b[_0x3ef584(0x21e)]&&console[_0x3ef584(0x1e8)](_0x3ef584(0x21a)+_0x18b2bd[_0x3ef584(0x1d0)]);}const _0x43183e=[],_0x1e6e17=new Set(),_0x3507f5=new Map(),_0x372c63=new Map(),_0x5a64f3=new Set(),_0x20f46d=new Map(),_0x2d01c9=new Map(),_0x428b0a=createJumpTargetCache();await withProgressSpinner(_0x3ef584(0x295)+_0x165be7+_0x3ef584(0x23c),async _0x206869=>{const _0x56852d=_0x3ef584;for(const _0x34a843 of _0x5d9421){const _0xb2d3d2=_0x5d9421[_0x56852d(0x1b7)]>0x1?_0x34a843[_0x56852d(0x214)]+'\x20v'+(_0x34a843[_0x56852d(0x237)]||0x1):_0x34a843[_0x56852d(0x214)];_0x206869[_0x56852d(0x284)](_0x56852d(0x295)+_0xb2d3d2);const _0x1512bf=await _0x5d05ce['journey'][_0x56852d(0x229)](_0x34a843['id']),_0x2723b7=_0x1512bf['attributes']?.[_0x56852d(0x27d)],_0x459595={'resolveSegment':async _0x2c04dd=>{const _0x39006f=_0x56852d;if(!_0x2723b7)return{'name':_0x2c04dd,'isJourneyLocal':![]};const _0x40bca1=_0x3507f5[_0x39006f(0x213)](_0x2c04dd);if(_0x40bca1)return _0x40bca1;try{const _0x1886e6=await _0x5d05ce[_0x39006f(0x1c4)][_0x39006f(0x24c)](_0x2723b7,_0x2c04dd),_0x19e8ad=_0x1886e6[_0x39006f(0x206)]===SEGMENT_KIND_JOURNEY;let _0x2052c4,_0x765e42=_0x1886e6['name'];if(_0x19e8ad&&_0x1886e6[_0x39006f(0x1e3)]){const _0x5b541a=await segmentResponseToDef(_0x1886e6,{'resolveSegmentName':async _0x46261f=>{const _0x206acc=_0x39006f,_0x388d74=_0x3507f5[_0x206acc(0x213)](_0x46261f);if(_0x388d74)return _0x388d74[_0x206acc(0x198)];const _0x5978e4=await _0x459595['resolveSegment'](_0x46261f);return _0x5978e4['name'];}}),_0x3f2068=_0x5b541a['rule'];_0x2052c4={'description':_0x1886e6[_0x39006f(0x1b2)],'rule':_0x3f2068};const _0xa6842c=serializeRule(_0x3f2068),_0x3106c5=_0x372c63[_0x39006f(0x213)](_0xa6842c);if(_0x3106c5)_0x765e42=_0x3106c5,_0x2052c4=undefined,_0x260c3b['verbose']&&console[_0x39006f(0x1e8)](_0x39006f(0x205)+_0x1886e6[_0x39006f(0x198)]+'\x20->\x20'+_0x3106c5);else{let _0x58b9fd=![];if(_0x2c97a7){const _0x46de9c=_0x2c97a7[_0x39006f(0x213)](_0xa6842c);if(_0x46de9c){const _0x4f2785=_0x46de9c[_0x39006f(0x1db)](_0x69b437=>!_0x1e6e17[_0x39006f(0x1a3)](_0x69b437));_0x4f2785&&(_0x765e42=_0x4f2785,_0x1e6e17[_0x39006f(0x26a)](_0x4f2785),_0x372c63[_0x39006f(0x208)](_0xa6842c,_0x4f2785),_0x58b9fd=!![],_0x260c3b[_0x39006f(0x21e)]&&console['error'](_0x39006f(0x226)+_0x4f2785+_0x39006f(0x212)));}}if(!_0x58b9fd){const _0x5eaca8=generateJourneyLocalName(_0x1886e6[_0x39006f(0x198)]);_0x5eaca8&&(_0x765e42=_0x5eaca8);let _0x5d4020=_0x765e42,_0x2d827f=0x2;while(_0x1e6e17['has'](_0x5d4020)){_0x5d4020=_0x765e42+'_'+_0x2d827f,_0x2d827f++;}_0x1e6e17[_0x39006f(0x26a)](_0x5d4020),_0x372c63['set'](_0xa6842c,_0x5d4020),_0x765e42=_0x5d4020;}}}const _0x18f634={'name':_0x765e42,'isJourneyLocal':_0x19e8ad,'definition':_0x2052c4};return _0x3507f5[_0x39006f(0x208)](_0x2c04dd,_0x18f634),_0x18f634;}catch(_0x5117da){return _0x5ec324[_0x39006f(0x21e)]&&console[_0x39006f(0x1e8)](_0x39006f(0x1cb)+_0x2c04dd+':\x20'+_0x5117da[_0x39006f(0x1d0)]),{'name':_0x2c04dd,'isJourneyLocal':![]};}},'resolveActivation':async _0x24e1f0=>{const _0x1370f9=_0x56852d,_0x29cdd5=_0x20f46d[_0x1370f9(0x213)](_0x24e1f0);if(_0x29cdd5)return _0x29cdd5;try{const _0x17dda7=await _0x5d05ce['journey'][_0x1370f9(0x260)](_0x34a843['id'],_0x24e1f0),_0x44ed1e=journeyActivationStepToYaml(_0x17dda7,_0x3f0246,_0x34edf5),_0x1e32c0=JSON[_0x1370f9(0x26e)]({'name':_0x44ed1e[_0x1370f9(0x198)],'connection':_0x44ed1e[_0x1370f9(0x24d)],'connector_config':_0x44ed1e[_0x1370f9(0x283)]}),_0x3ba965=_0x2d01c9[_0x1370f9(0x213)](_0x1e32c0);if(_0x3ba965){const _0x3c0664={'name':_0x3ba965,'isJourneyLocal':!![],'definition':_0x44ed1e};return _0x20f46d[_0x1370f9(0x208)](_0x24e1f0,_0x3c0664),_0x3c0664;}const _0x172029=_0x17dda7['attributes']['activationParams'][_0x1370f9(0x198)]||_0x24e1f0,_0x78f947=sanitizeYamlKey(_0x172029)||'activation_'+_0x24e1f0;let _0xf03e07=_0x78f947,_0xc3b812=0x2;while(_0x5a64f3[_0x1370f9(0x1a3)](_0xf03e07)){_0xf03e07=_0x78f947+'_'+_0xc3b812,_0xc3b812++;}_0x5a64f3[_0x1370f9(0x26a)](_0xf03e07),_0x2d01c9['set'](_0x1e32c0,_0xf03e07);const _0x798081={'name':_0xf03e07,'isJourneyLocal':!![],'definition':_0x44ed1e};return _0x20f46d['set'](_0x24e1f0,_0x798081),_0x798081;}catch(_0x1d1b5e){return _0x5ec324[_0x1370f9(0x21e)]&&console[_0x1370f9(0x1e8)](_0x1370f9(0x253)+_0x24e1f0+':\x20'+_0x1d1b5e[_0x1370f9(0x1d0)]),{'name':_0x24e1f0,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x3f62ad,_0x4416f7)=>{const _0x545f14=_0x56852d;return resolveJumpTarget(_0x3f62ad,_0x4416f7,_0x428b0a,_0x3e49a7=>_0x5d05ce[_0x545f14(0x24f)]['getJourney'](_0x3e49a7));}},_0x59b898=await journeyResponseToDef(_0x1512bf,_0x459595);_0x43183e[_0x56852d(0x191)]({'item':_0x34a843,'yaml':_0x59b898});}},{'verbose':_0x5ec324[_0x3ef584(0x21e)]});const _0x3a2420=await _0x5d05ce['journey']['getLatestJourneyId'](_0x5d9421[0x0][_0x3ef584(0x248)]),_0x54a6ab=buildMergedJourneyDef(_0x43183e,_0x2c97a7,_0x3a2420),_0x149f17=normalizeJourneyDef(_0x54a6ab,_0x10c6a6),_0x130642=toYamlString(_0x149f17),_0x38d24c=_0x43c7be||a27_0x5c2765[_0x3ef584(0x218)](_0x1b8d0a,sanitizeFileName(_0x165be7)+'.yml');!_0x43c7be&&_0x316b0b&&!existsSync(_0x1b8d0a)&&mkdirSync(_0x1b8d0a,{'recursive':!![]});const _0x1a3302=a27_0x5c2765['relative'](process['cwd'](),_0x38d24c);if(existsSync(_0x38d24c)){const _0x14e9b6=readFileSync(_0x38d24c,_0x3ef584(0x27b)),_0x5bc336=generateDiff(_0x14e9b6,_0x130642),_0x45a4a6=hasChanges(_0x5bc336);_0x424c86['push']({'relativePath':_0x1a3302,'absolutePath':_0x38d24c,'content':_0x130642,'isNew':![],'hasChanges':_0x45a4a6,'diff':_0x45a4a6?formatDiffWithColors(_0x5bc336):undefined});}else _0x424c86['push']({'relativePath':_0x1a3302,'absolutePath':_0x38d24c,'content':_0x130642,'isNew':!![],'hasChanges':![]});}const _0x503cde=_0x424c86[_0x3ef584(0x233)](_0x1a36aa=>_0x1a36aa[_0x3ef584(0x196)]),_0x177709=_0x424c86[_0x3ef584(0x233)](_0x9bcb44=>!_0x9bcb44['isNew']&&_0x9bcb44[_0x3ef584(0x28a)]),_0x24e0c6=_0x424c86[_0x3ef584(0x233)](_0x29e109=>!_0x29e109[_0x3ef584(0x196)]&&!_0x29e109[_0x3ef584(0x28a)]),_0x2935da=_0x55f15f[_0x3ef584(0x1b7)],_0x594723=_0x1b5176[_0x3ef584(0x1fe)],_0x390a98=_0x2935da>_0x594723?'\x20('+_0x2935da+_0x3ef584(0x271):'';console[_0x3ef584(0x1e8)](_0x3ef584(0x216)),console[_0x3ef584(0x1e8)]('\x20\x20'+a27_0x176760['cyan'](_0x594723+_0x3ef584(0x211))+a27_0x176760[_0x3ef584(0x1f2)](_0x390a98)),console[_0x3ef584(0x1e8)]('\x20\x20'+a27_0x176760[_0x3ef584(0x1fa)]('+\x20'+_0x503cde[_0x3ef584(0x1b7)]+'\x20new\x20files')),console[_0x3ef584(0x1e8)]('\x20\x20'+a27_0x176760[_0x3ef584(0x20a)]('~\x20'+_0x177709[_0x3ef584(0x1b7)]+'\x20changed\x20files')),console['error']('\x20\x20'+a27_0x176760[_0x3ef584(0x1f2)]('=\x20'+_0x24e0c6[_0x3ef584(0x1b7)]+_0x3ef584(0x28c))),console[_0x3ef584(0x1e8)](_0x3ef584(0x1c8)+a27_0x176760[_0x3ef584(0x280)](_0x5a33e9)+'\x0a');if(_0x177709['length']>0x0)for(const _0x1bca56 of _0x177709){console[_0x3ef584(0x1e8)]('\x0aChanges\x20to\x20\x27'+_0x1bca56[_0x3ef584(0x1ca)]+'\x27:'),console[_0x3ef584(0x1e8)]('─'[_0x3ef584(0x298)](0x3c)),console['error'](_0x1bca56[_0x3ef584(0x1b4)]),console[_0x3ef584(0x1e8)]('─'[_0x3ef584(0x298)](0x3c));}if(_0x260c3b['dryRun'])return console['error'](a27_0x176760[_0x3ef584(0x20a)](_0x3ef584(0x1f5))),0x0;if(_0x503cde[_0x3ef584(0x1b7)]===0x0&&_0x177709['length']===0x0)return console['error'](a27_0x176760['green'](_0x3ef584(0x277))),saveSessionContext({'parent_segment':_0x52938f},_0x260c3b[_0x3ef584(0x281)]),console[_0x3ef584(0x1e8)](a27_0x176760[_0x3ef584(0x1fa)]('✔\x20Context\x20set:\x20'+a27_0x176760[_0x3ef584(0x1f2)](_0x3ef584(0x1d7))+_0x3ef584(0x254)+a27_0x176760[_0x3ef584(0x280)](_0x52938f))),0x0;if(!_0x260c3b['yes']&&(_0x503cde[_0x3ef584(0x1b7)]>0x0||_0x177709['length']>0x0)){if(!isInteractive())return console[_0x3ef584(0x1e8)](a27_0x176760['red'](_0x3ef584(0x1a5)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3ef584(0x1e8)](a27_0x176760[_0x3ef584(0x1f2)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x10e301=await confirmKey(_0x3ef584(0x1fc)+(_0x503cde[_0x3ef584(0x1b7)]+_0x177709['length'])+_0x3ef584(0x1a0));if(!_0x10e301)return console[_0x3ef584(0x1e8)](a27_0x176760[_0x3ef584(0x20a)]('Aborted.'),_0x3ef584(0x200)),0x1;}!existsSync(_0x5a33e9)&&mkdirSync(_0x5a33e9,{'recursive':!![]});const _0x41021e=a27_0x5c2765[_0x3ef584(0x218)](_0x5a33e9,_0x3ef584(0x1c1));writeFileSync(_0x41021e,createTdxConfigContent(_0x52938f),'utf-8');for(const _0x2123e6 of _0x424c86){(_0x2123e6[_0x3ef584(0x196)]||_0x2123e6[_0x3ef584(0x28a)])&&writeFileSync(_0x2123e6['absolutePath'],_0x2123e6[_0x3ef584(0x258)],_0x3ef584(0x27b));}return console[_0x3ef584(0x1e8)](a27_0x176760['green']('✔\x20Pulled\x20'+(_0x503cde[_0x3ef584(0x1b7)]+_0x177709['length'])+_0x3ef584(0x1a6)+_0x5a33e9)),saveSessionContext({'parent_segment':_0x52938f},_0x260c3b[_0x3ef584(0x281)]),console[_0x3ef584(0x1e8)](a27_0x176760['green'](_0x3ef584(0x238)+a27_0x176760[_0x3ef584(0x1f2)](_0x3ef584(0x1d7))+_0x3ef584(0x254)+a27_0x176760[_0x3ef584(0x280)](_0x52938f))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{['name']=a27_0x4766e6(0x21b);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x19d);async[a27_0x4766e6(0x250)](_0x1d7c56){const _0x4c45c6=a27_0x4766e6,{options:_0x37b6ca,args:_0x112eb7,tdx:_0x574178}=_0x1d7c56,_0xca11d=_0x112eb7[0x0];if(!requireNameOrPath(_0xca11d))return 0x1;_0x37b6ca[_0x4c45c6(0x21e)]&&console[_0x4c45c6(0x1e8)](_0x4c45c6(0x286)+_0xca11d);const {journeyId:_0x3a4d41}=await resolveJourneyIdFromInput(_0xca11d,_0x37b6ca,_0x574178),_0x5560ab=await withSpinner(_0x4c45c6(0x1d6),()=>_0x574178[_0x4c45c6(0x24f)][_0x4c45c6(0x22e)](_0x3a4d41),{'verbose':_0x37b6ca[_0x4c45c6(0x21e)]}),_0x2b7119=_0x5560ab['data'];return console[_0x4c45c6(0x1f9)](_0x4c45c6(0x23d)+_0x2b7119[_0x4c45c6(0x1a9)]),console['log'](_0x4c45c6(0x1ac)+_0x2b7119[_0x4c45c6(0x240)]),await handleSDKOutput(_0x2b7119[_0x4c45c6(0x21c)],_0x37b6ca),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x1be);['description']=a27_0x4766e6(0x1bb);async[a27_0x4766e6(0x250)](_0x140fe0){const _0x529c8c=a27_0x4766e6,{options:_0x22c9a4,args:_0x3e025a,tdx:_0xc87404}=_0x140fe0,_0x7df0d3=_0x3e025a[0x0];if(!requireNameOrPath(_0x7df0d3))return 0x1;_0x22c9a4[_0x529c8c(0x21e)]&&console[_0x529c8c(0x1e8)]('Input:\x20'+_0x7df0d3);const {journeyId:_0x4f9d8b}=await resolveJourneyIdFromInput(_0x7df0d3,_0x22c9a4,_0xc87404),_0x286e94=await withSpinner(_0x529c8c(0x297),()=>_0xc87404['journey'][_0x529c8c(0x222)](_0x4f9d8b),{'verbose':_0x22c9a4[_0x529c8c(0x21e)]}),_0x475c1f=_0x286e94[_0x529c8c(0x272)];return console[_0x529c8c(0x1e8)](_0x529c8c(0x20c)+_0x475c1f['length']+_0x529c8c(0x292)+(_0x475c1f['length']!==0x1?'s':'')),await handleSDKOutput(_0x475c1f,_0x22c9a4),0x0;}}export class JourneyPushCommand extends BaseCommand{[a27_0x4766e6(0x198)]='journey:push';['description']='Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20Data';['segmentPushCommand']=new SegmentPushCommand();async[a27_0x4766e6(0x250)](_0x28fc43){const _0x50649b=a27_0x4766e6,_0x13a890=_0x28fc43[_0x50649b(0x269)][0x0];let _0x3676cd;if(_0x13a890){const _0x4665cd=await resolveTarget({'arg':_0x13a890,'contextParent':_0x28fc43['options'][_0x50649b(0x21f)],'cwd':process[_0x50649b(0x25f)]()});isSuccessfulResolution(_0x4665cd)&&_0x4665cd['type']===_0x50649b(0x1b3)&&(_0x3676cd=_0x4665cd['filePath']);}const _0x4e2174={..._0x28fc43,'options':{..._0x28fc43['options'],'journeysOnly':!![],..._0x3676cd&&{'singleFilePath':_0x3676cd}}};return this['segmentPushCommand']['execute'](_0x4e2174);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x1df);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x245);async[a27_0x4766e6(0x250)](_0x5ce670){const _0x4196e7=a27_0x4766e6,{options:_0x465c43,args:_0x56bebc,tdx:_0x5d2866}=_0x5ce670,_0x1bbaec=_0x56bebc[0x0];if(!requireNameOrPath(_0x1bbaec))return 0x1;if(_0x465c43['verbose'])console[_0x4196e7(0x1e8)](_0x4196e7(0x286)+_0x1bbaec);const {journeyId:_0x48fa75}=await resolveJourneyIdFromInput(_0x1bbaec,_0x465c43,_0x5d2866),_0x41f6e7=await withSpinner(_0x4196e7(0x22d),()=>_0x5d2866[_0x4196e7(0x24f)][_0x4196e7(0x23b)](_0x48fa75),{'verbose':_0x465c43[_0x4196e7(0x21e)]}),{bundleName:_0x3b20e1,versions:_0x84e5fe,latestJourneyId:_0xfb74cc}=_0x41f6e7[_0x4196e7(0x272)];console[_0x4196e7(0x1e8)](_0x3b20e1+':\x20'+_0x84e5fe[_0x4196e7(0x1b7)]+'\x20version'+(_0x84e5fe['length']!==0x1?'s':''));const _0x444d91=_0x84e5fe['map'](_0x3dcde8=>({'version':_0x3dcde8['versionNumber'],'journey_id':_0x3dcde8[_0x4196e7(0x26f)],'name':_0x3dcde8[_0x4196e7(0x198)],'state':_0x3dcde8[_0x4196e7(0x1ec)],'paused':_0x3dcde8[_0x4196e7(0x29b)],'latest':_0x3dcde8[_0x4196e7(0x26f)]===_0xfb74cc,'created_at':_0x3dcde8[_0x4196e7(0x1ea)]}));return await handleSDKOutput(_0x444d91,_0x465c43),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{['name']=a27_0x4766e6(0x236);['description']='Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey';async[a27_0x4766e6(0x250)](_0x596406){const _0x532707=a27_0x4766e6,{options:_0x15ed45,args:_0x15af61,tdx:_0x1f9000}=_0x596406,_0x3914e4=_0x15af61[0x0];if(!requireNameOrPath(_0x3914e4))return 0x1;if(_0x15ed45['verbose'])console[_0x532707(0x1e8)](_0x532707(0x286)+_0x3914e4);const {journeyId:_0x59d15f,journeyName:_0x3f7d60}=await resolveJourneyIdFromInput(_0x3914e4,_0x15ed45,_0x1f9000);if(!_0x15ed45['yes']){const _0x5dd90d=await confirm(_0x532707(0x19a)+_0x3f7d60+'\x22?');if(!_0x5dd90d)return console[_0x532707(0x1e8)](_0x532707(0x1e5)),0x0;}const _0x14070d=await withSpinner(_0x532707(0x234),()=>_0x1f9000[_0x532707(0x24f)][_0x532707(0x223)](_0x59d15f),{'verbose':_0x15ed45[_0x532707(0x21e)]}),_0x4b94c9=_0x14070d[_0x532707(0x272)];return console['error'](a27_0x176760[_0x532707(0x1fa)]('✔')+_0x532707(0x255)+_0x4b94c9[_0x532707(0x27a)]['versionNumber']+'\x20(draft)\x20—\x20\x22'+_0x4b94c9[_0x532707(0x27a)][_0x532707(0x198)]+'\x22'),console['error'](_0x532707(0x1e9)+_0x4b94c9['id']),await handleSingleObjectOutput({'id':_0x4b94c9['id'],'name':_0x4b94c9['attributes'][_0x532707(0x198)],'version':_0x4b94c9['attributes'][_0x532707(0x237)],'state':_0x4b94c9['attributes'][_0x532707(0x1ec)],'bundle_id':_0x4b94c9[_0x532707(0x27a)][_0x532707(0x248)],'created_at':_0x4b94c9[_0x532707(0x27a)][_0x532707(0x1ea)]},_0x15ed45),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{[a27_0x4766e6(0x198)]=a27_0x4766e6(0x22a);[a27_0x4766e6(0x1b2)]=a27_0x4766e6(0x289);async[a27_0x4766e6(0x250)](_0x281804){const _0xf9f9e6=a27_0x4766e6,{options:_0x77495,args:_0xcca5e5,tdx:_0x12f866}=_0x281804,_0x28aab1=_0xcca5e5[0x0];if(!requireNameOrPath(_0x28aab1))return 0x1;const _0x5bf512=_0x77495[_0xf9f9e6(0x252)];if(!_0x5bf512)return console[_0xf9f9e6(0x1e8)](_0xf9f9e6(0x27c)),console[_0xf9f9e6(0x1e8)]('Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N'),0x1;const _0x2f6f81=parseInt(_0x5bf512,0xa);if(isNaN(_0x2f6f81)||_0x2f6f81<0x1)return console['error'](_0xf9f9e6(0x282)+_0x5bf512),0x1;if(_0x77495[_0xf9f9e6(0x21e)])console[_0xf9f9e6(0x1e8)](_0xf9f9e6(0x286)+_0x28aab1+',\x20version:\x20'+_0x2f6f81);const {journeyId:_0x4fcf6f,parentSegmentId:_0x33cbe8}=await resolveJourneyIdFromInput(_0x28aab1,_0x77495,_0x12f866),_0x5c580f=await withSpinner(_0xf9f9e6(0x1cf),()=>_0x12f866['journey'][_0xf9f9e6(0x23b)](_0x4fcf6f),{'verbose':_0x77495[_0xf9f9e6(0x21e)]}),{versions:_0x194bf6,latestJourneyId:_0x177de0}=_0x5c580f[_0xf9f9e6(0x272)],_0x1bf13a=_0x194bf6[_0xf9f9e6(0x1db)](_0x11615e=>_0x11615e[_0xf9f9e6(0x237)]===_0x2f6f81);if(!_0x1bf13a){const _0x28a2e3=_0x194bf6[_0xf9f9e6(0x249)](_0xee23f3=>'v'+_0xee23f3['versionNumber'])[_0xf9f9e6(0x218)](',\x20');return console[_0xf9f9e6(0x1e8)](_0xf9f9e6(0x299)+_0x2f6f81+'\x20not\x20found.\x20Available:\x20'+_0x28a2e3),0x1;}const _0x4c6b51=await withSpinner(_0xf9f9e6(0x1f3)+_0x2f6f81+_0xf9f9e6(0x25b),()=>_0x12f866['journey']['getJourney'](_0x1bf13a[_0xf9f9e6(0x26f)]),{'verbose':_0x77495['verbose']}),_0x25d857=_0x4c6b51[_0xf9f9e6(0x272)],_0x27a9ac=getConsoleNextUrl(_0x77495['site'],'/app/ps/'+_0x33cbe8+_0xf9f9e6(0x20f)+_0x1bf13a[_0xf9f9e6(0x26f)]+_0xf9f9e6(0x235));return await handleSingleObjectOutput({'id':_0x25d857['id'],'name':_0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x198)],'version':_0x25d857['attributes']['versionNumber'],'description':_0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x1b2)],'state':_0x25d857['attributes'][_0xf9f9e6(0x1ec)],'paused':_0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x29b)],'reentry_mode':_0x25d857['attributes'][_0xf9f9e6(0x23e)],'stages':_0x25d857[_0xf9f9e6(0x27a)]['journeyStages']?.['length']||0x0,..._0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x24e)]&&{'goal':_0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x24e)]['name']},'latest':_0x1bf13a[_0xf9f9e6(0x26f)]===_0x177de0,'created_at':_0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x1ea)],'updated_at':_0x25d857[_0xf9f9e6(0x27a)][_0xf9f9e6(0x19c)],'url':_0x27a9ac},_0x77495),0x0;}}
|
|
1
|
+
const a27_0x3d26ae=a27_0x2150;(function(_0xacad7c,_0x36d645){const _0x431c28=a27_0x2150,_0xd7a9fb=_0xacad7c();while(!![]){try{const _0x37b6c3=parseInt(_0x431c28(0x13d))/0x1*(-parseInt(_0x431c28(0x1af))/0x2)+parseInt(_0x431c28(0x1a5))/0x3+parseInt(_0x431c28(0x17e))/0x4*(-parseInt(_0x431c28(0x154))/0x5)+-parseInt(_0x431c28(0x18f))/0x6*(-parseInt(_0x431c28(0x1d4))/0x7)+parseInt(_0x431c28(0x144))/0x8+-parseInt(_0x431c28(0x164))/0x9*(-parseInt(_0x431c28(0x153))/0xa)+parseInt(_0x431c28(0x17b))/0xb;if(_0x37b6c3===_0x36d645)break;else _0xd7a9fb['push'](_0xd7a9fb['shift']());}catch(_0x6e1afe){_0xd7a9fb['push'](_0xd7a9fb['shift']());}}}(a27_0x117b,0xcc54d));import a27_0x36bf62 from'chalk';import a27_0x745048 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';function a27_0x2150(_0x1fdd06,_0x3e5995){_0x1fdd06=_0x1fdd06-0xfb;const _0x117b3b=a27_0x117b();let _0x215037=_0x117b3b[_0x1fdd06];return _0x215037;}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 requireNameOrPath(_0x1d031b){const _0x18c68=a27_0x2150;return!_0x1d031b&&(console[_0x18c68(0x14b)](_0x18c68(0x19e)),console['error']('Usage:\x20journey\x20<subcommand>\x20<name-or-path>')),!!_0x1d031b;}function withJsonFormat(_0x2da335){const _0x31e27f=a27_0x2150;if(!_0x2da335[_0x31e27f(0x143)]&&!_0x2da335[_0x31e27f(0x1b7)]&&!_0x2da335[_0x31e27f(0x148)]&&!_0x2da335[_0x31e27f(0x108)])return{..._0x2da335,'format':_0x31e27f(0x1b7),'json':!![]};return _0x2da335;}function formatJourneyState(_0x42b868){const _0x538b2f=a27_0x2150;switch(_0x42b868){case _0x538b2f(0x188):return a27_0x36bf62[_0x538b2f(0x1f5)]('(running)');case _0x538b2f(0x171):return a27_0x36bf62[_0x538b2f(0x10c)](_0x538b2f(0x1bc));case'paused':return a27_0x36bf62[_0x538b2f(0x18c)](_0x538b2f(0x109));case _0x538b2f(0x13b):return a27_0x36bf62['blue'](_0x538b2f(0x1a0));case _0x538b2f(0x166):return a27_0x36bf62[_0x538b2f(0x10c)]('(archived)');default:return'('+_0x42b868+')';}}function formatJourneyItem(_0xd8f4de,_0x1124ee='',_0x1e62af){const _0x569873=a27_0x2150,_0x181566=formatJourneyState(_0xd8f4de[_0x569873(0x1f0)]),_0x306138=_0x1e62af?hyperlink(_0xd8f4de[_0x569873(0x17d)],_0x1e62af):_0xd8f4de[_0x569873(0x17d)];return _0x1124ee+_0x569873(0x111)+_0x306138+'\x20'+_0x181566;}function escapeRegex(_0x2d9e46){const _0x3ff062=a27_0x2150;return _0x2d9e46['replace'](/[.*+?^${}()|[\]\\]/g,_0x3ff062(0x14c));}function globToRegex(_0x50b613){const _0x22e416=a27_0x2150,_0x569685=_0x50b613['split']('*')[_0x22e416(0x150)](escapeRegex);return new RegExp(_0x569685[_0x22e416(0x134)]('.*'),'i');}function buildRuleToNameMapping(_0x151a9a){const _0x143c0d=a27_0x2150,_0x4d3efd=new Map();if(_0x151a9a[_0x143c0d(0x1c9)])for(const [_0x23b083,_0x32908a]of Object['entries'](_0x151a9a[_0x143c0d(0x1c9)])){if(_0x32908a['rule']){const _0x86e96=serializeRule(_0x32908a['rule']),_0x12f6ad=_0x4d3efd[_0x143c0d(0x173)](_0x86e96);_0x12f6ad?_0x12f6ad['push'](_0x23b083):_0x4d3efd['set'](_0x86e96,[_0x23b083]);}}return _0x4d3efd;}async function resolveJourneyIdFromInput(_0x11dee6,_0x477e70,_0x119ce0){const _0x38e224=a27_0x2150,_0x256615=await resolveJourneyTarget(_0x11dee6,_0x477e70[_0x38e224(0x1ec)],_0x477e70[_0x38e224(0x1e3)]),_0x4f39a2=_0x256615[_0x38e224(0x1ec)];if(!_0x4f39a2)throw new SDKError(ErrorCode[_0x38e224(0x1db)],_0x38e224(0x162));const _0x1cff55=await withSpinner(_0x38e224(0x1e2),()=>_0x119ce0[_0x38e224(0x1aa)][_0x38e224(0x13a)](_0x4f39a2),{'verbose':_0x477e70[_0x38e224(0x1e3)]}),_0x5ac3ca=_0x1cff55['data'],_0x57dd5b=await withSpinner(_0x38e224(0x1c3),()=>_0x119ce0[_0x38e224(0x15c)][_0x38e224(0x106)](_0x5ac3ca,_0x256615[_0x38e224(0x189)]),{'verbose':_0x477e70[_0x38e224(0x1e3)]});return{'journeyId':_0x57dd5b['data'],'journeyName':_0x256615[_0x38e224(0x189)],'parentSegmentId':_0x5ac3ca};}async function resolveJourneyTarget(_0x17f8fb,_0x1a432d,_0x3c6bd9){const _0x505ba2=a27_0x2150;if(isYamlFilePath(_0x17f8fb))try{const _0x455614=await resolveYamlFilePath(_0x17f8fb);return _0x3c6bd9&&(console[_0x505ba2(0x14b)](_0x505ba2(0x1fc)+_0x17f8fb),console[_0x505ba2(0x14b)](_0x505ba2(0x198)+_0x455614[_0x505ba2(0x1ec)]),console[_0x505ba2(0x14b)](_0x505ba2(0x176)+_0x455614[_0x505ba2(0x205)]),console['error']('\x20\x20Folder\x20path:\x20'+(_0x455614[_0x505ba2(0x104)]||_0x505ba2(0x137)))),{'journeyName':_0x455614[_0x505ba2(0x205)],'parentSegment':_0x455614['parentSegment'],'resolved':_0x455614};}catch(_0x4d220d){throw new SDKError(ErrorCode[_0x505ba2(0x1db)],'Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20'+_0x4d220d[_0x505ba2(0x1a6)]);}if(!_0x1a432d)throw new SDKError(ErrorCode[_0x505ba2(0x1db)],'No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');return{'journeyName':_0x17f8fb,'parentSegment':_0x1a432d};}function a27_0x117b(){const _0x534858=['96022xMFrXa','journey:traffic','Getting\x20column\x20mapping...','Statistics\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','Cancelled','\x20\x20Preserving\x20local\x20segment\x20name:\x20','format','6590976RzjGSM','stageNameMap','Usage:\x20journey\x20view\x20<name-or-path>\x20[-w]','args','jsonl','Database:\x20','relative','error','\x5c$&','Show\x20journey\x20table\x20column\x20mapping','Error:\x20Journey\x20\x27','file','map','stringify','then','10ALVIwU','220lRxOel','no_parent','resolveSegment','yes','session','values','utf-8','Parent\x20segment:\x20','journey','Warning:\x20Could\x20not\x20resolve\x20segment\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20--parent-segment\x20<name>\x20\x20#\x20Specify\x20parent\x20segment','journeyStages','kind','Resuming\x20journey...','Could\x20not\x20resolve\x20parent\x20segment.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','find','4778523afuWIe','\x22.\x20Must\x20be\x20\x22conversion\x22\x20or\x20\x22activation\x22.','archived','createdAt','Error:\x20','hasChanges','journey:version:create','getJourney','buildIdToEmailMap','✔\x20Journey\x20\x22','\x0aError:','cwd','\x20(ID:\x20','draft','/app/ps/','get','version','set','\x20\x20Name:\x20','Usage:\x20journey\x20version\x20view\x20<name-or-path>\x20--version\x20N','listJourneysFromParentSegment','folderId','\x20Opening\x20','7212667DSZldB','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)','journeyBundleName','93344frLlDp','✔\x20Found\x20','Error:\x20Version\x20','Input:\x20','Creating\x20new\x20version...','Found\x20','base','buildIdToNameMap','localeCompare','description','launched','journeyName','No\x20journeys\x20found','Warning:\x20Could\x20not\x20parse\x20existing\x20file\x20for\x20segment\x20name\x20preservation:\x20','yellow','Error:\x20Stage\x20\x22','pause','1734168hRiFSW','web','size','/j/da/je','activation','journey:version:view','\x27\x20not\x20found\x20in\x20','getTrafficData','Pattern:\x20','\x20\x20Parent\x20segment:\x20','Fetching\x20journeys\x20and\x20folders...','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20pull\x20path/to/journey.yml\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20journey\x20by\x20file','resume','Available\x20stages:\x20','journey:pause','Error:\x20Journey\x20name,\x20path,\x20or\x20YAML\x20file\x20is\x20required','Write\x20','(completed)','\x22\x20resumed','conversion','targetDir','completionRate','2149335kPIqKz','message','journey:columns','limit','rule','segment','reentryMode','site','journey:push','listActivationsFlat','24TxuEnS','includeHistory','resourceName','✔\x20Pulled\x20','\x20segment\x20rule(s)\x20to\x20match\x20for\x20','database','\x20=\x20','content','json','Traffic\x20data\x20may\x20not\x20be\x20available\x20for\x20draft\x20or\x20newly\x20created\x20journeys.','options','paused','Show\x20journey\x20details','(draft)','all','\x20version','/e/','\x20versions)','journey:activations','\x20Created\x20v','Resolving\x20journey...','journeyId','push','attributes','cyan','tdx.json','segments','Push\x20journey\x20YAML\x20files\x20to\x20Treasure\x20Data','\x20not\x20found.\x20Available:\x20','rootFolderId','has','Show\x20journey\x20statistics','enteredSize','sort','helpText','Folder\x20path:\x20','Getting\x20journey\x20details...','7sToDMa','Warning:\x20--include-history\x20without\x20--from/--to\x20may\x20return\x20all-time\x20history','listJourneysWithFolders','segmentPushCommand','List\x20journeys\x20in\x20current\x20context','repeat','versionNumber','INVALID_ARGUMENT','No\x20traffic\x20data\x20available\x20for\x20journey:\x20','red','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','relativePath','journey:versions','from','Resolving\x20parent\x20segment...','verbose','folders','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','goalSize','entries','\x20details...','\x20journeys','\x0aChanges\x20to\x20\x27','\x20\x20-w,\x20--web\x20\x20Open\x20journey\x20in\x20web\x20browser','parentSegment','List\x20activations\x20for\x20a\x20journey','renderStats','Fetching\x20','state','updatedAt','If\x20the\x20journey\x20is\x20active,\x20the\x20date\x20range\x20may\x20be\x20too\x20wide.\x20Try\x20a\x20shorter\x20period\x20(max\x20~90\x20days).','getActivation',',\x20version:\x20','green','bold','Warning:\x20Could\x20not\x20resolve\x20activation\x20','Listing\x20journey\x20activations...','journey:view','/j/da','stages','Resolved\x20YAML\x20file:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20pause\x20journey\x20\x22','createVersion','listFolders','Error:\x20Invalid\x20version\x20number:\x20','goal','Found\x20journeys\x20with\x20this\x20name\x20in\x20other\x20folders:','Target\x20directory:\x20','journeyBundleId','segmentName','Options:','Getting\x20journey\x20traffic\x20data...','\x20\x20Consolidating\x20duplicate\x20segment:\x20','name','columns','links','milestoneSize','Error:\x20Invalid\x20--type\x20\x22','getSegment','type','execute','history','folderPath','-\x20no\x20files\x20written','resolveJourneyId','\x20\x20Target:\x20','tsv','(paused)','absolutePath','\x20activation','dim','exitOrJumpRate','dryRun','isNew','Getting\x20journey\x20statistics...','🗺️\x20','parent_segment','getLatestJourneyId','Resume\x20a\x20paused\x20journey','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Pause\x20a\x20running\x20journey','toLowerCase','Error:\x20Journey\x20not\x20found:\x20','data','filter','journey:resume','connection','\x20(draft)\x20—\x20\x22','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','Target\x20file:\x20','Get\x20journey\x20traffic\x20data\x20(Sankey\x20charts)','\x20(rule\x20match)','Fetching\x20parent\x20segment...','✔\x20Context\x20set:\x20','user','includeStats','connector_config','table','add','root\x20folder','length','test','listVersions','No\x20statistics\x20available\x20for\x20journey:\x20','.yml','\x20\x20-\x20','log','journeys','Create\x20a\x20new\x20draft\x20version\x20of\x20a\x20journey','View\x20a\x20specific\x20version\x20of\x20a\x20journey','join','\x22\x20not\x20found','Journey\x20name:\x20','(root)','getColumnMapping','getStatistics','resolveParentId','completed','hasPeriod'];a27_0x117b=function(){return _0x534858;};return a27_0x117b();}export class JourneyListCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]='journey:list';[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x1d8);async['execute'](_0x54a925){const _0xb4119c=a27_0x3d26ae,{options:_0x5d8dfa,args:_0xaf4adb,tdx:_0x2c3e23}=_0x54a925,_0x3d2ae7=_0xaf4adb[0x0],_0x5beb08=_0x5d8dfa[_0xb4119c(0x1ec)];if(!_0x5beb08)return console[_0xb4119c(0x14b)]('Error:\x20Parent\x20segment\x20context\x20required'),console['error']('Use\x20--parent-segment\x20or\x20set\x20context\x20with\x20\x22tdx\x20sg\x20use\x22'),0x1;const _0x3a4fd3=await withSpinner(_0xb4119c(0x1e2),()=>_0x2c3e23[_0xb4119c(0x1aa)][_0xb4119c(0x13a)](_0x5beb08),{'verbose':_0x5d8dfa[_0xb4119c(0x1e3)]}),_0x48376c=_0x3a4fd3[_0xb4119c(0x119)];_0x5d8dfa[_0xb4119c(0x1e3)]&&(console[_0xb4119c(0x14b)](_0xb4119c(0x15b)+_0x5beb08+_0xb4119c(0x170)+_0x48376c+')'),_0x3d2ae7&&console[_0xb4119c(0x14b)](_0xb4119c(0x197)+_0x3d2ae7));const _0x816aa0=await withSpinner(_0xb4119c(0x122),()=>_0x2c3e23[_0xb4119c(0x1aa)]['getParentFull'](_0x48376c),{'verbose':_0x5d8dfa['verbose']}),_0x121518=_0x816aa0[_0xb4119c(0x119)],_0x5a80a5=_0x121518[_0xb4119c(0x1cc)],_0x4adcf4=await withSpinner('Listing\x20journeys...',()=>_0x2c3e23[_0xb4119c(0x15c)][_0xb4119c(0x1d6)](_0x48376c,_0x5a80a5),{'verbose':_0x5d8dfa[_0xb4119c(0x1e3)]});let _0x3c745e=_0x4adcf4[_0xb4119c(0x119)][_0xb4119c(0x131)];const _0x16882b=_0x4adcf4['data'][_0xb4119c(0x1e4)],_0x50808b=new Map();for(const _0x278723 of _0x16882b){_0x50808b[_0xb4119c(0x175)](_0x278723['id'],_0x278723[_0xb4119c(0xfb)]);}if(_0x3d2ae7){const _0x59dd67=globToRegex(_0x3d2ae7);_0x3c745e=_0x3c745e[_0xb4119c(0x11a)](_0x543638=>_0x59dd67[_0xb4119c(0x12b)](_0x543638['journeyBundleName']));}console['error'](_0xb4119c(0x17f)+_0x3c745e['length']+'\x20journey'+(_0x3c745e['length']!==0x1?'s':''));const _0x2f9d08=_0x1182f1=>{const _0x4ea209=_0xb4119c;return getConsoleNextUrl(_0x5d8dfa['site'],'/app/ps/'+_0x48376c+_0x4ea209(0x1bf)+_0x1182f1+_0x4ea209(0x1fa));};if(_0x5d8dfa['format']===_0xb4119c(0x127))await handleSDKOutput(_0x3c745e,_0x5d8dfa);else{if(_0x5d8dfa[_0xb4119c(0x143)]===_0xb4119c(0x1b7)){const _0x3dc36c=_0x3c745e['map'](_0x409eff=>({..._0x409eff,'url':_0x2f9d08(_0x409eff['id'])}));await handleSDKOutput(_0x3dc36c,_0x5d8dfa);}else{console[_0xb4119c(0x130)]('['+_0x5beb08+']');const _0x4e8cc6=new Map(),_0x41598b=[];for(const _0x4a4b99 of _0x3c745e){if(!_0x4a4b99['folderId']||_0x4a4b99['folderId']===_0x5a80a5)_0x41598b[_0xb4119c(0x1c5)](_0x4a4b99);else{const _0x324cda=_0x4e8cc6['get'](_0x4a4b99['folderId'])||[];_0x324cda[_0xb4119c(0x1c5)](_0x4a4b99),_0x4e8cc6[_0xb4119c(0x175)](_0x4a4b99['folderId'],_0x324cda);}}const _0x31d707=(_0x5edf5e,_0x6aafb8)=>_0x5edf5e['journeyBundleName']['localeCompare'](_0x6aafb8[_0xb4119c(0x17d)],undefined,{'sensitivity':_0xb4119c(0x184)});_0x41598b[_0xb4119c(0x1d0)](_0x31d707);for(const _0x42159a of _0x41598b){console[_0xb4119c(0x130)](formatJourneyItem(_0x42159a,'',_0x2f9d08(_0x42159a['id'])));}const _0x223a05=[..._0x4e8cc6[_0xb4119c(0x1e7)]()][_0xb4119c(0x1d0)]((_0x9458f7,_0x1c2bf0)=>{const _0x198f93=_0xb4119c,_0x35f641=_0x50808b['get'](_0x9458f7[0x0])||_0x9458f7[0x0],_0x44378e=_0x50808b[_0x198f93(0x173)](_0x1c2bf0[0x0])||_0x1c2bf0[0x0];return _0x35f641[_0x198f93(0x186)](_0x44378e,undefined,{'sensitivity':_0x198f93(0x184)});});for(const [_0x35f46a,_0x1e87f5]of _0x223a05){const _0x53614f=_0x50808b[_0xb4119c(0x173)](_0x35f46a)||_0x35f46a;console[_0xb4119c(0x130)]('📁\x20'+_0x53614f),_0x1e87f5[_0xb4119c(0x1d0)](_0x31d707);for(const _0x3b3a02 of _0x1e87f5){console['log'](formatJourneyItem(_0x3b3a02,'\x20\x20',_0x2f9d08(_0x3b3a02['id'])));}}}}return 0x0;}}export class JourneyViewCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x1f9);['description']=a27_0x3d26ae(0x1bb);async[a27_0x3d26ae(0x102)](_0x30b336){const _0x6350a2=a27_0x3d26ae,{options:_0x129434,args:_0x26658b,tdx:_0x73e9cb}=_0x30b336,_0x6b77c8=_0x26658b[0x0];if(!_0x6b77c8)return console[_0x6350a2(0x14b)](_0x6350a2(0x19e)),console['error'](_0x6350a2(0x146)),console[_0x6350a2(0x14b)](_0x6350a2(0x206)),console[_0x6350a2(0x14b)](_0x6350a2(0x1eb)),0x1;_0x129434[_0x6350a2(0x1e3)]&&console[_0x6350a2(0x14b)](_0x6350a2(0x181)+_0x6b77c8);const {journeyId:_0x55c476,parentSegmentId:_0xac8857}=await resolveJourneyIdFromInput(_0x6b77c8,_0x129434,_0x73e9cb);if(_0x129434[_0x6350a2(0x190)]){const _0x1906e7=getConsoleNextUrl(_0x129434['site'],_0x6350a2(0x172)+_0xac8857+_0x6350a2(0x1bf)+_0x55c476+'/j/da/je');return console[_0x6350a2(0x14b)](a27_0x36bf62['green']('✔')+_0x6350a2(0x17a)+a27_0x36bf62[_0x6350a2(0x1c7)](_0x1906e7)),openBrowser(_0x1906e7),0x0;}const _0x3fd26d=await withSpinner(_0x6350a2(0x1d3),()=>_0x73e9cb[_0x6350a2(0x15c)][_0x6350a2(0x16b)](_0x55c476),{'verbose':_0x129434['verbose']}),_0x19ec39=_0x3fd26d[_0x6350a2(0x119)],_0x75071=_0x129434[_0x6350a2(0x125)];let _0x209027;if(_0x75071)try{const _0x5b0449=await withSpinner(_0x6350a2(0x110),()=>_0x73e9cb['journey']['getStatistics'](_0x55c476),{'verbose':_0x129434[_0x6350a2(0x1e3)]});_0x209027=_0x5b0449[_0x6350a2(0x119)];}catch{_0x129434['verbose']&&console[_0x6350a2(0x14b)]('\x20\x20Statistics\x20not\x20available');}const _0x15620b=getConsoleNextUrl(_0x129434[_0x6350a2(0x1ac)],_0x6350a2(0x172)+_0xac8857+_0x6350a2(0x1bf)+_0x55c476+_0x6350a2(0x192)),_0x503585={'id':_0x19ec39['id'],'name':_0x19ec39[_0x6350a2(0x1c6)][_0x6350a2(0xfb)],'description':_0x19ec39[_0x6350a2(0x1c6)][_0x6350a2(0x187)],'state':_0x19ec39['attributes'][_0x6350a2(0x1f0)],'paused':_0x19ec39[_0x6350a2(0x1c6)][_0x6350a2(0x1ba)],'reentry_mode':_0x19ec39['attributes'][_0x6350a2(0x1ab)],'stages':_0x19ec39[_0x6350a2(0x1c6)][_0x6350a2(0x15f)]?.[_0x6350a2(0x12a)]||0x0,..._0x19ec39[_0x6350a2(0x1c6)][_0x6350a2(0x201)]&&{'goal':_0x19ec39['attributes'][_0x6350a2(0x201)]['name']},..._0x209027&&{'statistics':{'size':_0x209027[_0x6350a2(0x191)],'entered':_0x209027[_0x6350a2(0x1cf)],'goal_achieved':_0x209027[_0x6350a2(0x1e6)],'completion_rate':_0x209027[_0x6350a2(0x1a4)],'exit_or_jump':_0x209027['exitOrJumpSize'],'exit_or_jump_rate':_0x209027[_0x6350a2(0x10d)],'stages':_0x209027['stages']}},'url':_0x15620b};return await handleSingleObjectOutput(_0x503585,_0x129434),0x0;}}export class JourneyStatsCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]='journey:stats';['description']=a27_0x3d26ae(0x1ce);async[a27_0x3d26ae(0x102)](_0x31a7f9){const _0x16ed56=a27_0x3d26ae,{options:_0x1fd87b,args:_0x28bc6b,tdx:_0x2d9afe}=_0x31a7f9,_0x2ec8c1=_0x28bc6b[0x0];if(!requireNameOrPath(_0x2ec8c1))return 0x1;_0x1fd87b[_0x16ed56(0x1e3)]&&console['error'](_0x16ed56(0x181)+_0x2ec8c1);const _0x43187e=_0x1fd87b,_0x3d6120=_0x43187e[_0x16ed56(0x1e1)],_0x5d5f7d=_0x43187e['to'],_0x46c04e=_0x43187e[_0x16ed56(0x1b0)],_0x4debfb=_0x43187e['stage'];_0x46c04e&&!_0x3d6120&&!_0x5d5f7d&&console[_0x16ed56(0x14b)](_0x16ed56(0x1d5));const _0x326bd3=_0x46c04e?withJsonFormat(_0x1fd87b):_0x1fd87b,{journeyId:_0x2a1007,journeyName:_0x3263e1}=await resolveJourneyIdFromInput(_0x2ec8c1,_0x326bd3,_0x2d9afe),_0x47a473=_0x3d6120||_0x5d5f7d?{'from':_0x3d6120,'to':_0x5d5f7d}:undefined,_0x5df003=await withSpinner(_0x16ed56(0x110),()=>Promise[_0x16ed56(0x1bd)]([_0x2d9afe[_0x16ed56(0x15c)][_0x16ed56(0x16b)](_0x2a1007),_0x2d9afe['journey'][_0x16ed56(0x139)](_0x2a1007,_0x47a473)]),{'verbose':_0x326bd3['verbose']}),[_0x49ac73,_0x20d9a1]=_0x5df003[_0x16ed56(0x119)];if(!_0x20d9a1||_0x20d9a1[_0x16ed56(0x1c4)]===null)return console[_0x16ed56(0x14b)](_0x16ed56(0x12d)+_0x3263e1),console[_0x16ed56(0x14b)](_0x16ed56(0x140)),0x0;const _0x4bf2f9=buildStageNameMap(_0x49ac73),_0x3a4f94=!!(_0x47a473&&_0x20d9a1['history']?.[_0x16ed56(0x12a)]),_0x461d80={'stageNameMap':_0x4bf2f9,'hasPeriod':_0x3a4f94,'includeHistory':!!_0x46c04e};if(_0x4debfb&&_0x20d9a1['stages']){const _0x1e65d2=_0x20d9a1['stages'][_0x16ed56(0x163)](_0x41f8cd=>{const _0x2d67fc=_0x16ed56,_0x11239d=_0x4bf2f9['get'](_0x41f8cd['id'])??'';return _0x11239d[_0x2d67fc(0x117)]()===_0x4debfb[_0x2d67fc(0x117)]();});if(_0x1e65d2)return await handleSingleObjectOutput(formatStageStats(_0x1e65d2,_0x461d80),_0x326bd3),0x0;const _0x2aa95d=_0x20d9a1[_0x16ed56(0x1fb)][_0x16ed56(0x150)](_0x3033d7=>_0x4bf2f9['get'](_0x3033d7['id'])??_0x3033d7['id']);return console[_0x16ed56(0x14b)](_0x16ed56(0x18d)+_0x4debfb+_0x16ed56(0x135)),console[_0x16ed56(0x14b)](_0x16ed56(0x19c)+_0x2aa95d[_0x16ed56(0x134)](',\x20')),0x1;}const _0x53b581=_0x20d9a1[_0x16ed56(0x1fb)]?.[_0x16ed56(0x150)](_0x170ea2=>formatStageStats(_0x170ea2,_0x461d80)),_0x46fa3a=assembleJourneyStats(_0x20d9a1,{'from':_0x3d6120,'to':_0x5d5f7d,'includeHistory':_0x46c04e});return await this[_0x16ed56(0x1ee)](_0x46fa3a,_0x53b581??[],_0x326bd3),0x0;}async[a27_0x3d26ae(0x1ee)](_0x532c58,_0x5168e1,_0x5c5f81){const _0x2de5b2=a27_0x3d26ae,_0x15abb6=_0x5c5f81[_0x2de5b2(0x143)]===_0x2de5b2(0x1b7)||_0x5c5f81[_0x2de5b2(0x143)]===_0x2de5b2(0x148)||_0x5c5f81[_0x2de5b2(0x1b7)]||_0x5c5f81[_0x2de5b2(0x148)];if(_0x15abb6){_0x532c58[_0x2de5b2(0x1fb)]=_0x5168e1,await handleSingleObjectOutput(_0x532c58,_0x5c5f81);return;}await handleSingleObjectOutput(_0x532c58,_0x5c5f81);for(const _0x53f0de of _0x5168e1){console['log'](''),console[_0x2de5b2(0x130)](String(a27_0x36bf62[_0x2de5b2(0x1c7)][_0x2de5b2(0x1f6)]('['+_0x53f0de['name']+']'))+a27_0x36bf62[_0x2de5b2(0x10c)]('\x20'+_0x53f0de['id']));const {id:_0x281ea9,name:_0x276b94,..._0x49d5df}=_0x53f0de;await handleSingleObjectOutput(_0x49d5df,_0x5c5f81);}}}export class JourneyTrafficCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x13e);['description']=a27_0x3d26ae(0x120);async['execute'](_0x34ec9f){const _0x10a549=a27_0x3d26ae,{options:_0xfe6344,args:_0x40abf7,tdx:_0x310f69}=_0x34ec9f,_0x2b3110=_0x40abf7[0x0];if(!requireNameOrPath(_0x2b3110))return 0x1;_0xfe6344['verbose']&&console[_0x10a549(0x14b)](_0x10a549(0x181)+_0x2b3110);const _0x49dc6f=_0xfe6344,_0x320e65=_0x49dc6f['type'],_0x315ef6=_0x49dc6f[_0x10a549(0x1e1)],_0x26d548=_0x49dc6f['to'],_0x55d7ce=_0x49dc6f[_0x10a549(0x1a8)];if(_0x320e65&&_0x320e65!==_0x10a549(0x1a2)&&_0x320e65!==_0x10a549(0x193))return console[_0x10a549(0x14b)](_0x10a549(0xff)+_0x320e65+_0x10a549(0x165)),0x1;const _0x4e5f22=withJsonFormat(_0xfe6344),{journeyId:_0x45676d,journeyName:_0x147b5f}=await resolveJourneyIdFromInput(_0x2b3110,_0x4e5f22,_0x310f69),_0x9f702d={'type':_0x320e65,'from':_0x315ef6,'to':_0x26d548,'limit':_0x55d7ce},_0x32c187=await withSpinner(_0x10a549(0x207),()=>_0x310f69[_0x10a549(0x15c)][_0x10a549(0x196)](_0x45676d,_0x9f702d),{'verbose':_0x4e5f22['verbose']}),_0x5316f2=_0x32c187[_0x10a549(0x119)],_0x542e56=_0x5316f2[_0x10a549(0x1a2)]&&(_0x5316f2[_0x10a549(0x1a2)]['nodes'][_0x10a549(0x12a)]>0x0||_0x5316f2[_0x10a549(0x1a2)][_0x10a549(0xfd)][_0x10a549(0x12a)]>0x0),_0x4183e5=_0x5316f2[_0x10a549(0x193)]&&_0x5316f2[_0x10a549(0x193)][_0x10a549(0x12a)]>0x0;if(!_0x542e56&&!_0x4183e5)return console[_0x10a549(0x14b)](_0x10a549(0x1dc)+_0x147b5f),console[_0x10a549(0x14b)](_0x10a549(0x1b8)),_0x315ef6&&_0x26d548&&console[_0x10a549(0x14b)](_0x10a549(0x1f2)),0x0;return await handleSingleObjectOutput(_0x5316f2,_0x4e5f22),0x0;}}function formatStageStats(_0x5df9f2,_0x1adda5){const _0x19e205=a27_0x3d26ae,_0x5db753=_0x1adda5[_0x19e205(0x13c)]&&_0x5df9f2[_0x19e205(0x103)]?.[_0x19e205(0x12a)]?aggregateStageHistory(_0x5df9f2['history']):{'size':_0x5df9f2['size'],'entered':_0x5df9f2[_0x19e205(0x1cf)],'milestone':_0x5df9f2[_0x19e205(0xfe)],'milestone_rate':_0x5df9f2['completeMilestoneRate'],'exit_or_jump':_0x5df9f2['exitOrJumpSize'],'exit_or_jump_rate':_0x5df9f2[_0x19e205(0x10d)]},_0x33f5e0={'id':_0x5df9f2['id'],'name':_0x1adda5[_0x19e205(0x145)][_0x19e205(0x173)](_0x5df9f2['id'])??_0x5df9f2['id'],..._0x5db753};return _0x1adda5['hasPeriod']&&_0x1adda5[_0x19e205(0x1b0)]&&_0x5df9f2[_0x19e205(0x103)]&&(_0x33f5e0[_0x19e205(0x103)]=_0x5df9f2['history']),_0x33f5e0;}export class JourneyPauseCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x19d);[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x116);async[a27_0x3d26ae(0x102)](_0xecf025){const _0x75872b=a27_0x3d26ae,{options:_0x1f8202,args:_0x53d939,tdx:_0x241383}=_0xecf025,_0x438777=_0x53d939[0x0];if(!requireNameOrPath(_0x438777))return 0x1;_0x1f8202['verbose']&&console[_0x75872b(0x14b)]('Input:\x20'+_0x438777);const {journeyId:_0xd2e6fc,journeyName:_0x2cce55}=await resolveJourneyIdFromInput(_0x438777,_0x1f8202,_0x241383);if(!_0x1f8202[_0x75872b(0x157)]){const _0x22793d=await confirm(_0x75872b(0x1fd)+_0x2cce55+'\x22?');if(!_0x22793d)return console[_0x75872b(0x14b)](_0x75872b(0x141)),0x0;}const _0x172fa6=await withSpinner('Pausing\x20journey...',()=>_0x241383[_0x75872b(0x15c)][_0x75872b(0x18e)](_0xd2e6fc),{'verbose':_0x1f8202['verbose']}),_0x197667=_0x172fa6[_0x75872b(0x119)];return console[_0x75872b(0x14b)]('✔\x20Journey\x20\x22'+_0x197667[_0x75872b(0x1c6)][_0x75872b(0xfb)]+'\x22\x20paused'),0x0;}}export class JourneyResumeCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x11b);[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x114);async[a27_0x3d26ae(0x102)](_0x383b1a){const _0x226b44=a27_0x3d26ae,{options:_0x267535,args:_0x59f9c1,tdx:_0x25fa27}=_0x383b1a,_0x4a2c23=_0x59f9c1[0x0];if(!requireNameOrPath(_0x4a2c23))return 0x1;_0x267535['verbose']&&console[_0x226b44(0x14b)](_0x226b44(0x181)+_0x4a2c23);const {journeyId:_0x18d4e6,journeyName:_0x5d9447}=await resolveJourneyIdFromInput(_0x4a2c23,_0x267535,_0x25fa27);if(!_0x267535[_0x226b44(0x157)]){const _0x1787af=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20resume\x20journey\x20\x22'+_0x5d9447+'\x22?');if(!_0x1787af)return console[_0x226b44(0x14b)](_0x226b44(0x141)),0x0;}const _0x79a60f=await withSpinner(_0x226b44(0x161),()=>_0x25fa27[_0x226b44(0x15c)][_0x226b44(0x19b)](_0x18d4e6),{'verbose':_0x267535[_0x226b44(0x1e3)]}),_0x51366b=_0x79a60f[_0x226b44(0x119)];return console[_0x226b44(0x14b)](_0x226b44(0x16d)+_0x51366b[_0x226b44(0x1c6)][_0x226b44(0xfb)]+_0x226b44(0x1a1)),0x0;}}export class JourneyPullCommand extends BaseCommand{['name']='journey:pull';['description']='Export\x20journey(s)\x20as\x20YAML\x20files';async[a27_0x3d26ae(0x102)](_0x171988){const _0x202a22=a27_0x3d26ae,{options:_0x44d3f9,args:_0x3306c7,tdx:_0x493a32}=_0x171988,_0x5388fd=_0x44d3f9,_0x56e4da=_0x3306c7[0x0],_0x383751=_0x56e4da&&isYamlFilePath(_0x56e4da),_0x317bbc=await resolveTarget({'arg':_0x383751?_0x56e4da:undefined,'contextParent':_0x44d3f9[_0x202a22(0x1ec)],'cwd':process[_0x202a22(0x16f)]()});if(!isSuccessfulResolution(_0x317bbc))return _0x317bbc['errorCode']===_0x202a22(0x155)?(console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x18c)](_0x202a22(0x1e5))),console[_0x202a22(0x14b)](_0x202a22(0x17c)),console['error'](_0x202a22(0x15e)),console[_0x202a22(0x14b)](_0x202a22(0x19a)),console['error']('\x0aTip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')):(console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x1dd)](_0x202a22(0x168)+_0x317bbc[_0x202a22(0x1a6)]+'\x0a')),_0x317bbc['helpText']&&console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x1c7)](_0x317bbc[_0x202a22(0x1d1)]))),0x1;let _0x542ebf=_0x383751?undefined:_0x56e4da,_0x215eaa,_0x239464;_0x317bbc['type']===_0x202a22(0x14f)&&(_0x542ebf=_0x317bbc[_0x202a22(0x1b1)],_0x215eaa=_0x317bbc['filePath'],_0x239464=_0x317bbc[_0x202a22(0x104)]);const _0x54d989=_0x317bbc['parentName'],_0x58ee80=_0x317bbc[_0x202a22(0x1a3)];_0x5388fd[_0x202a22(0x1e3)]&&(console[_0x202a22(0x14b)](_0x202a22(0x15b)+_0x54d989),console[_0x202a22(0x14b)](_0x202a22(0x203)+_0x58ee80),_0x542ebf&&console[_0x202a22(0x14b)](_0x202a22(0x136)+_0x542ebf),_0x215eaa&&console[_0x202a22(0x14b)](_0x202a22(0x11f)+_0x215eaa),_0x239464&&console['error'](_0x202a22(0x1d2)+_0x239464));const _0xc0a784=await withSpinner(_0x202a22(0x1e2),()=>_0x493a32[_0x202a22(0x1aa)][_0x202a22(0x13a)](_0x54d989),{'verbose':_0x44d3f9[_0x202a22(0x1e3)]}),_0x9eb97e=_0xc0a784['data'],{journeys:_0x2313bb,folders:_0x58322d}=await withSpinner(_0x202a22(0x199),async()=>{const _0xc53e7f=_0x202a22,[_0x5d9bdd,_0x21b8c6]=await Promise[_0xc53e7f(0x1bd)]([_0x493a32[_0xc53e7f(0x15c)][_0xc53e7f(0x178)](_0x9eb97e,undefined,{'includeAllVersions':!![]}),_0x493a32[_0xc53e7f(0x1aa)][_0xc53e7f(0x1ff)](_0x9eb97e)]);return{'journeys':_0x5d9bdd,'folders':_0x21b8c6};},{'verbose':_0x44d3f9['verbose']})[_0x202a22(0x152)](_0x57a5ac=>_0x57a5ac['data']);let _0x6ff93d=_0x2313bb;const _0x4f85e7=buildFolderIdToPathMap(_0x58322d);if(_0x542ebf){const _0x662f9d=_0x6ff93d[_0x202a22(0x11a)](_0x353ea6=>_0x353ea6[_0x202a22(0x17d)][_0x202a22(0x117)]()===_0x542ebf['toLowerCase']());if(_0x662f9d[_0x202a22(0x12a)]===0x0)return console['error'](_0x202a22(0x118)+_0x542ebf),console['error'](_0x202a22(0x1de)),0x1;_0x6ff93d=_0x662f9d;}if(_0x239464!==undefined){const _0xfd0be6=_0x6ff93d[_0x202a22(0x11a)](_0x5576c3=>{const _0x35a68e=_0x202a22,_0x439617=_0x5576c3['folderId']?_0x4f85e7[_0x35a68e(0x173)](_0x5576c3['folderId'])||'':'';return _0x439617===_0x239464;});if(_0xfd0be6[_0x202a22(0x12a)]===0x0&&_0x6ff93d['length']>0x0){console['error'](_0x202a22(0x14e)+_0x542ebf+_0x202a22(0x195)+(_0x239464||_0x202a22(0x129))),console[_0x202a22(0x14b)](_0x202a22(0x202));for(const _0x114d9e of _0x6ff93d){const _0x36751b=_0x114d9e[_0x202a22(0x179)]?_0x4f85e7['get'](_0x114d9e[_0x202a22(0x179)])||'':'';console[_0x202a22(0x14b)](_0x202a22(0x12f)+(_0x36751b||_0x202a22(0x137))+'/'+_0x114d9e[_0x202a22(0x17d)]);}return 0x1;}_0x6ff93d=_0xfd0be6;}if(_0x6ff93d[_0x202a22(0x12a)]===0x0)return console['error'](_0x202a22(0x18a)),0x0;const _0x1b588e=new Map();for(const _0x2f090d of _0x6ff93d){const _0x304d98=_0x2f090d['journeyBundleId'];!_0x1b588e[_0x202a22(0x1cd)](_0x304d98)&&_0x1b588e['set'](_0x304d98,[]),_0x1b588e[_0x202a22(0x173)](_0x304d98)[_0x202a22(0x1c5)](_0x2f090d);}for(const _0x3adc2b of _0x1b588e[_0x202a22(0x159)]()){_0x3adc2b['sort']((_0x3fae87,_0x528c39)=>(_0x3fae87[_0x202a22(0x1da)]||0x0)-(_0x528c39[_0x202a22(0x1da)]||0x0));}const _0x4fe3a7=[],{idToEmailMap:_0x222b45,connectionIdToNameMap:_0x14267b}=await withSpinner('Fetching\x20users\x20and\x20connections...',async()=>{const _0x1eb7a4=_0x202a22,[_0x3794ae,_0x3df635]=await Promise['all']([_0x493a32[_0x1eb7a4(0x124)][_0x1eb7a4(0x16c)](),_0x493a32['connection'][_0x1eb7a4(0x185)]()]);return{'idToEmailMap':_0x3794ae,'connectionIdToNameMap':_0x3df635};},{'verbose':_0x44d3f9[_0x202a22(0x1e3)]})['then'](_0x2d8020=>_0x2d8020[_0x202a22(0x119)]);for(const _0x4617bc of _0x1b588e[_0x202a22(0x159)]()){const _0x5ce9bb=_0x4617bc[0x0][_0x202a22(0x17d)],_0x346a5a=_0x4617bc[0x0][_0x202a22(0x179)],_0x1a48b1=_0x346a5a?_0x4f85e7[_0x202a22(0x173)](_0x346a5a)||'':'',_0x3694f8=_0x1a48b1?a27_0x745048[_0x202a22(0x134)](_0x58ee80,_0x1a48b1):_0x58ee80,_0x52fc24=_0x215eaa||a27_0x745048[_0x202a22(0x134)](_0x3694f8,sanitizeFileName(_0x5ce9bb)+_0x202a22(0x12e));let _0x35f346,_0x3caeec;if(existsSync(_0x52fc24))try{const _0x224651=readFileSync(_0x52fc24,_0x202a22(0x15a)),_0x1a2b38=parseYamlString(_0x224651);_0x3caeec=_0x1a2b38,_0x35f346=buildRuleToNameMapping(_0x1a2b38),_0x5388fd[_0x202a22(0x1e3)]&&_0x35f346[_0x202a22(0x191)]>0x0&&console[_0x202a22(0x14b)](_0x202a22(0x183)+_0x35f346[_0x202a22(0x191)]+_0x202a22(0x1b3)+_0x5ce9bb);}catch(_0x568b10){_0x5388fd[_0x202a22(0x1e3)]&&console[_0x202a22(0x14b)](_0x202a22(0x18b)+_0x568b10['message']);}const _0x2ec686=[],_0x5ec7dd=new Set(),_0x28ef57=new Map(),_0x9ed35f=new Map(),_0x32678d=new Set(),_0x2f0a3a=new Map(),_0x309a3c=new Map(),_0x21e78a=createJumpTargetCache();await withProgressSpinner(_0x202a22(0x1ef)+_0x5ce9bb+'...',async _0x100eac=>{const _0x477e1e=_0x202a22;for(const _0x368817 of _0x4617bc){const _0x182465=_0x4617bc[_0x477e1e(0x12a)]>0x1?_0x368817[_0x477e1e(0x17d)]+'\x20v'+(_0x368817[_0x477e1e(0x1da)]||0x1):_0x368817['journeyBundleName'];_0x100eac['setPhase']('Fetching\x20'+_0x182465);const _0x39b67b=await _0x493a32[_0x477e1e(0x15c)][_0x477e1e(0x16b)](_0x368817['id']),_0x1d6954=_0x39b67b[_0x477e1e(0x1c6)]?.['audienceId'],_0x53942={'resolveSegment':async _0x27758c=>{const _0x2b4136=_0x477e1e;if(!_0x1d6954)return{'name':_0x27758c,'isJourneyLocal':![]};const _0x5785bf=_0x28ef57[_0x2b4136(0x173)](_0x27758c);if(_0x5785bf)return _0x5785bf;try{const _0xa13c2b=await _0x493a32['segment'][_0x2b4136(0x100)](_0x1d6954,_0x27758c),_0x2495c1=_0xa13c2b[_0x2b4136(0x160)]===SEGMENT_KIND_JOURNEY;let _0x5ceeb9,_0x7a208f=_0xa13c2b['name'];if(_0x2495c1&&_0xa13c2b[_0x2b4136(0x1a9)]){const _0x748c84=await segmentResponseToDef(_0xa13c2b,{'resolveSegmentName':async _0x1b6030=>{const _0x2e0b7f=_0x2b4136,_0x4a6398=_0x28ef57['get'](_0x1b6030);if(_0x4a6398)return _0x4a6398['name'];const _0x34b275=await _0x53942[_0x2e0b7f(0x156)](_0x1b6030);return _0x34b275[_0x2e0b7f(0xfb)];}}),_0x51abfe=_0x748c84[_0x2b4136(0x1a9)];_0x5ceeb9={'description':_0xa13c2b[_0x2b4136(0x187)],'rule':_0x51abfe};const _0x14f686=serializeRule(_0x51abfe),_0x403e27=_0x9ed35f['get'](_0x14f686);if(_0x403e27)_0x7a208f=_0x403e27,_0x5ceeb9=undefined,_0x5388fd['verbose']&&console[_0x2b4136(0x14b)](_0x2b4136(0x208)+_0xa13c2b['name']+'\x20->\x20'+_0x403e27);else{let _0x2d0ae7=![];if(_0x35f346){const _0x341905=_0x35f346[_0x2b4136(0x173)](_0x14f686);if(_0x341905){const _0xe2544a=_0x341905[_0x2b4136(0x163)](_0x41d7e2=>!_0x5ec7dd[_0x2b4136(0x1cd)](_0x41d7e2));_0xe2544a&&(_0x7a208f=_0xe2544a,_0x5ec7dd[_0x2b4136(0x128)](_0xe2544a),_0x9ed35f[_0x2b4136(0x175)](_0x14f686,_0xe2544a),_0x2d0ae7=!![],_0x5388fd[_0x2b4136(0x1e3)]&&console['error'](_0x2b4136(0x142)+_0xe2544a+_0x2b4136(0x121)));}}if(!_0x2d0ae7){const _0x18a73e=generateJourneyLocalName(_0xa13c2b[_0x2b4136(0xfb)]);_0x18a73e&&(_0x7a208f=_0x18a73e);let _0x8f02a5=_0x7a208f,_0x49d1bb=0x2;while(_0x5ec7dd[_0x2b4136(0x1cd)](_0x8f02a5)){_0x8f02a5=_0x7a208f+'_'+_0x49d1bb,_0x49d1bb++;}_0x5ec7dd[_0x2b4136(0x128)](_0x8f02a5),_0x9ed35f['set'](_0x14f686,_0x8f02a5),_0x7a208f=_0x8f02a5;}}}const _0x3c5ef8={'name':_0x7a208f,'isJourneyLocal':_0x2495c1,'definition':_0x5ceeb9};return _0x28ef57[_0x2b4136(0x175)](_0x27758c,_0x3c5ef8),_0x3c5ef8;}catch(_0x184f10){return _0x44d3f9['verbose']&&console[_0x2b4136(0x14b)](_0x2b4136(0x15d)+_0x27758c+':\x20'+_0x184f10[_0x2b4136(0x1a6)]),{'name':_0x27758c,'isJourneyLocal':![]};}},'resolveActivation':async _0x268bb3=>{const _0x3eb2f4=_0x477e1e,_0xef0042=_0x2f0a3a[_0x3eb2f4(0x173)](_0x268bb3);if(_0xef0042)return _0xef0042;try{const _0x319133=await _0x493a32[_0x3eb2f4(0x15c)][_0x3eb2f4(0x1f3)](_0x368817['id'],_0x268bb3),_0x1c5dd3=journeyActivationStepToYaml(_0x319133,_0x222b45,_0x14267b),_0x103c45=JSON[_0x3eb2f4(0x151)]({'name':_0x1c5dd3['name'],'connection':_0x1c5dd3[_0x3eb2f4(0x11c)],'connector_config':_0x1c5dd3[_0x3eb2f4(0x126)]}),_0xfa73c3=_0x309a3c[_0x3eb2f4(0x173)](_0x103c45);if(_0xfa73c3){const _0x1e2db2={'name':_0xfa73c3,'isJourneyLocal':!![],'definition':_0x1c5dd3};return _0x2f0a3a['set'](_0x268bb3,_0x1e2db2),_0x1e2db2;}const _0x24b252=_0x319133[_0x3eb2f4(0x1c6)]['activationParams']['name']||_0x268bb3,_0x1426af=sanitizeYamlKey(_0x24b252)||'activation_'+_0x268bb3;let _0x2c58bd=_0x1426af,_0x568fd6=0x2;while(_0x32678d[_0x3eb2f4(0x1cd)](_0x2c58bd)){_0x2c58bd=_0x1426af+'_'+_0x568fd6,_0x568fd6++;}_0x32678d['add'](_0x2c58bd),_0x309a3c[_0x3eb2f4(0x175)](_0x103c45,_0x2c58bd);const _0x33b93e={'name':_0x2c58bd,'isJourneyLocal':!![],'definition':_0x1c5dd3};return _0x2f0a3a[_0x3eb2f4(0x175)](_0x268bb3,_0x33b93e),_0x33b93e;}catch(_0x5c5c97){return _0x44d3f9['verbose']&&console[_0x3eb2f4(0x14b)](_0x3eb2f4(0x1f7)+_0x268bb3+':\x20'+_0x5c5c97[_0x3eb2f4(0x1a6)]),{'name':_0x268bb3,'isJourneyLocal':![]};}},'resolveJumpTarget':async(_0x58d386,_0x3ddfcd)=>{const _0x4b3b7d=_0x477e1e;return resolveJumpTarget(_0x58d386,_0x3ddfcd,_0x21e78a,_0x344ed1=>_0x493a32[_0x4b3b7d(0x15c)][_0x4b3b7d(0x16b)](_0x344ed1));}},_0x455806=await journeyResponseToDef(_0x39b67b,_0x53942);_0x2ec686['push']({'item':_0x368817,'yaml':_0x455806});}},{'verbose':_0x44d3f9[_0x202a22(0x1e3)]});const _0x505a63=await _0x493a32[_0x202a22(0x15c)][_0x202a22(0x113)](_0x4617bc[0x0][_0x202a22(0x204)]),_0x312380=buildMergedJourneyDef(_0x2ec686,_0x35f346,_0x505a63),_0x32dd16=normalizeJourneyDef(_0x312380,_0x3caeec),_0x51a7de=toYamlString(_0x32dd16),_0x17e8b5=_0x215eaa||a27_0x745048[_0x202a22(0x134)](_0x3694f8,sanitizeFileName(_0x5ce9bb)+_0x202a22(0x12e));!_0x215eaa&&_0x1a48b1&&!existsSync(_0x3694f8)&&mkdirSync(_0x3694f8,{'recursive':!![]});const _0x5ec409=a27_0x745048[_0x202a22(0x14a)](process[_0x202a22(0x16f)](),_0x17e8b5);if(existsSync(_0x17e8b5)){const _0x4bf217=readFileSync(_0x17e8b5,'utf-8'),_0x141ef0=generateDiff(_0x4bf217,_0x51a7de),_0x18e41e=hasChanges(_0x141ef0);_0x4fe3a7[_0x202a22(0x1c5)]({'relativePath':_0x5ec409,'absolutePath':_0x17e8b5,'content':_0x51a7de,'isNew':![],'hasChanges':_0x18e41e,'diff':_0x18e41e?formatDiffWithColors(_0x141ef0):undefined});}else _0x4fe3a7[_0x202a22(0x1c5)]({'relativePath':_0x5ec409,'absolutePath':_0x17e8b5,'content':_0x51a7de,'isNew':!![],'hasChanges':![]});}const _0x582f9f=_0x4fe3a7[_0x202a22(0x11a)](_0x26d7d2=>_0x26d7d2['isNew']),_0x21dc21=_0x4fe3a7[_0x202a22(0x11a)](_0x2cd640=>!_0x2cd640[_0x202a22(0x10f)]&&_0x2cd640[_0x202a22(0x169)]),_0x4d3b43=_0x4fe3a7[_0x202a22(0x11a)](_0x59e8aa=>!_0x59e8aa[_0x202a22(0x10f)]&&!_0x59e8aa[_0x202a22(0x169)]),_0x318b27=_0x6ff93d[_0x202a22(0x12a)],_0x4e31c3=_0x1b588e[_0x202a22(0x191)],_0x1a92f8=_0x318b27>_0x4e31c3?'\x20('+_0x318b27+_0x202a22(0x1c0):'';console[_0x202a22(0x14b)]('\x0aPull\x20summary:'),console[_0x202a22(0x14b)]('\x20\x20'+a27_0x36bf62[_0x202a22(0x1c7)](_0x4e31c3+_0x202a22(0x1e9))+a27_0x36bf62[_0x202a22(0x10c)](_0x1a92f8)),console[_0x202a22(0x14b)]('\x20\x20'+a27_0x36bf62[_0x202a22(0x1f5)]('+\x20'+_0x582f9f['length']+'\x20new\x20files')),console[_0x202a22(0x14b)]('\x20\x20'+a27_0x36bf62[_0x202a22(0x18c)]('~\x20'+_0x21dc21[_0x202a22(0x12a)]+'\x20changed\x20files')),console[_0x202a22(0x14b)]('\x20\x20'+a27_0x36bf62['dim']('=\x20'+_0x4d3b43[_0x202a22(0x12a)]+'\x20unchanged\x20files')),console[_0x202a22(0x14b)](_0x202a22(0x107)+a27_0x36bf62[_0x202a22(0x1c7)](_0x58ee80)+'\x0a');if(_0x21dc21['length']>0x0)for(const _0x11ece4 of _0x21dc21){console[_0x202a22(0x14b)](_0x202a22(0x1ea)+_0x11ece4[_0x202a22(0x1df)]+'\x27:'),console[_0x202a22(0x14b)]('─'[_0x202a22(0x1d9)](0x3c)),console['error'](_0x11ece4['diff']),console[_0x202a22(0x14b)]('─'[_0x202a22(0x1d9)](0x3c));}if(_0x5388fd[_0x202a22(0x10e)])return console[_0x202a22(0x14b)](a27_0x36bf62['yellow'](_0x202a22(0x11e))),0x0;if(_0x582f9f['length']===0x0&&_0x21dc21['length']===0x0)return console[_0x202a22(0x14b)](a27_0x36bf62['green']('✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'parent_segment':_0x54d989},_0x5388fd[_0x202a22(0x158)]),console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x1f5)]('✔\x20Context\x20set:\x20'+a27_0x36bf62[_0x202a22(0x10c)](_0x202a22(0x112))+_0x202a22(0x1b5)+a27_0x36bf62[_0x202a22(0x1c7)](_0x54d989))),0x0;if(!_0x5388fd[_0x202a22(0x157)]&&(_0x582f9f[_0x202a22(0x12a)]>0x0||_0x21dc21[_0x202a22(0x12a)]>0x0)){if(!isInteractive())return console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x1dd)](_0x202a22(0x16e)),_0x202a22(0x115)),console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x10c)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x13d86e=await confirmKey(_0x202a22(0x19f)+(_0x582f9f[_0x202a22(0x12a)]+_0x21dc21[_0x202a22(0x12a)])+'\x20files?');if(!_0x13d86e)return console['error'](a27_0x36bf62[_0x202a22(0x18c)]('Aborted.'),_0x202a22(0x105)),0x1;}!existsSync(_0x58ee80)&&mkdirSync(_0x58ee80,{'recursive':!![]});const _0x15a2b9=a27_0x745048[_0x202a22(0x134)](_0x58ee80,_0x202a22(0x1c8));writeFileSync(_0x15a2b9,createTdxConfigContent(_0x54d989),_0x202a22(0x15a));for(const _0x5b67aa of _0x4fe3a7){(_0x5b67aa[_0x202a22(0x10f)]||_0x5b67aa[_0x202a22(0x169)])&&writeFileSync(_0x5b67aa[_0x202a22(0x10a)],_0x5b67aa[_0x202a22(0x1b6)],_0x202a22(0x15a));}return console['error'](a27_0x36bf62[_0x202a22(0x1f5)](_0x202a22(0x1b2)+(_0x582f9f[_0x202a22(0x12a)]+_0x21dc21['length'])+'\x20journey\x20files\x20to\x20'+_0x58ee80)),saveSessionContext({'parent_segment':_0x54d989},_0x5388fd[_0x202a22(0x158)]),console[_0x202a22(0x14b)](a27_0x36bf62[_0x202a22(0x1f5)](_0x202a22(0x123)+a27_0x36bf62['dim']('parent_segment')+_0x202a22(0x1b5)+a27_0x36bf62[_0x202a22(0x1c7)](_0x54d989))),0x0;}}export class JourneyColumnsCommand extends BaseCommand{['name']=a27_0x3d26ae(0x1a7);[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x14d);async[a27_0x3d26ae(0x102)](_0x2d93ca){const _0x5b0790=a27_0x3d26ae,{options:_0x4837bd,args:_0x50582f,tdx:_0x3dcd2c}=_0x2d93ca,_0x3e02fa=_0x50582f[0x0];if(!requireNameOrPath(_0x3e02fa))return 0x1;_0x4837bd[_0x5b0790(0x1e3)]&&console[_0x5b0790(0x14b)](_0x5b0790(0x181)+_0x3e02fa);const {journeyId:_0x5dfa38}=await resolveJourneyIdFromInput(_0x3e02fa,_0x4837bd,_0x3dcd2c),_0x48bdd1=await withSpinner(_0x5b0790(0x13f),()=>_0x3dcd2c[_0x5b0790(0x15c)][_0x5b0790(0x138)](_0x5dfa38),{'verbose':_0x4837bd[_0x5b0790(0x1e3)]}),_0x4e4911=_0x48bdd1[_0x5b0790(0x119)];return console[_0x5b0790(0x130)](_0x5b0790(0x149)+_0x4e4911[_0x5b0790(0x1b4)]),console[_0x5b0790(0x130)]('Table:\x20'+_0x4e4911[_0x5b0790(0x127)]),await handleSDKOutput(_0x4e4911[_0x5b0790(0xfc)],_0x4837bd),0x0;}}export class JourneyActivationsCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x1c1);[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x1ed);async[a27_0x3d26ae(0x102)](_0x567c98){const _0x438b00=a27_0x3d26ae,{options:_0x3ab812,args:_0x2469b2,tdx:_0x243abf}=_0x567c98,_0x3ebec2=_0x2469b2[0x0];if(!requireNameOrPath(_0x3ebec2))return 0x1;_0x3ab812[_0x438b00(0x1e3)]&&console[_0x438b00(0x14b)]('Input:\x20'+_0x3ebec2);const {journeyId:_0x360b0f}=await resolveJourneyIdFromInput(_0x3ebec2,_0x3ab812,_0x243abf),_0x5abd7c=await withSpinner(_0x438b00(0x1f8),()=>_0x243abf[_0x438b00(0x15c)][_0x438b00(0x1ae)](_0x360b0f),{'verbose':_0x3ab812['verbose']}),_0xfcd1ce=_0x5abd7c[_0x438b00(0x119)];return console[_0x438b00(0x14b)]('Found\x20'+_0xfcd1ce[_0x438b00(0x12a)]+_0x438b00(0x10b)+(_0xfcd1ce[_0x438b00(0x12a)]!==0x1?'s':'')),await handleSDKOutput(_0xfcd1ce,_0x3ab812),0x0;}}export class JourneyPushCommand extends BaseCommand{['name']=a27_0x3d26ae(0x1ad);[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x1ca);[a27_0x3d26ae(0x1d7)]=new SegmentPushCommand();async[a27_0x3d26ae(0x102)](_0x3b087f){const _0x5d080d=a27_0x3d26ae,_0x5af19d=_0x3b087f[_0x5d080d(0x147)][0x0];let _0x1419e9;if(_0x5af19d){const _0x1c1bbb=await resolveTarget({'arg':_0x5af19d,'contextParent':_0x3b087f[_0x5d080d(0x1b9)]['parentSegment'],'cwd':process[_0x5d080d(0x16f)]()});isSuccessfulResolution(_0x1c1bbb)&&_0x1c1bbb[_0x5d080d(0x101)]===_0x5d080d(0x14f)&&(_0x1419e9=_0x1c1bbb['filePath']);}const _0x2f31a2={..._0x3b087f,'options':{..._0x3b087f[_0x5d080d(0x1b9)],'journeysOnly':!![],..._0x1419e9&&{'singleFilePath':_0x1419e9}}};return this[_0x5d080d(0x1d7)][_0x5d080d(0x102)](_0x2f31a2);}}export class JourneyVersionsCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x1e0);[a27_0x3d26ae(0x187)]='List\x20all\x20versions\x20of\x20a\x20journey';async[a27_0x3d26ae(0x102)](_0x1372e8){const _0x272940=a27_0x3d26ae,{options:_0x49fe25,args:_0x10c2c2,tdx:_0xabeb00}=_0x1372e8,_0xc8f7a3=_0x10c2c2[0x0];if(!requireNameOrPath(_0xc8f7a3))return 0x1;if(_0x49fe25['verbose'])console[_0x272940(0x14b)](_0x272940(0x181)+_0xc8f7a3);const {journeyId:_0x54f819}=await resolveJourneyIdFromInput(_0xc8f7a3,_0x49fe25,_0xabeb00),_0x457a7b=await withSpinner('Listing\x20journey\x20versions...',()=>_0xabeb00[_0x272940(0x15c)][_0x272940(0x12c)](_0x54f819),{'verbose':_0x49fe25[_0x272940(0x1e3)]}),{bundleName:_0x58f1af,versions:_0x15f742,latestJourneyId:_0x590a2f}=_0x457a7b['data'];console[_0x272940(0x14b)](_0x58f1af+':\x20'+_0x15f742[_0x272940(0x12a)]+_0x272940(0x1be)+(_0x15f742[_0x272940(0x12a)]!==0x1?'s':''));const _0x1918d7=_0x15f742[_0x272940(0x150)](_0xe1f991=>({'version':_0xe1f991[_0x272940(0x1da)],'journey_id':_0xe1f991['journeyId'],'name':_0xe1f991['name'],'state':_0xe1f991[_0x272940(0x1f0)],'paused':_0xe1f991['paused'],'latest':_0xe1f991[_0x272940(0x1c4)]===_0x590a2f,'created_at':_0xe1f991[_0x272940(0x167)]}));return await handleSDKOutput(_0x1918d7,_0x49fe25),0x0;}}export class JourneyVersionCreateCommand extends BaseCommand{['name']=a27_0x3d26ae(0x16a);[a27_0x3d26ae(0x187)]=a27_0x3d26ae(0x132);async[a27_0x3d26ae(0x102)](_0x3af4fc){const _0x33ecd1=a27_0x3d26ae,{options:_0xb071d0,args:_0x42d78d,tdx:_0x13c57c}=_0x3af4fc,_0x44057e=_0x42d78d[0x0];if(!requireNameOrPath(_0x44057e))return 0x1;if(_0xb071d0[_0x33ecd1(0x1e3)])console[_0x33ecd1(0x14b)](_0x33ecd1(0x181)+_0x44057e);const {journeyId:_0x1bc1b5,journeyName:_0x11c946}=await resolveJourneyIdFromInput(_0x44057e,_0xb071d0,_0x13c57c);if(!_0xb071d0[_0x33ecd1(0x157)]){const _0x27af06=await confirm('Create\x20a\x20new\x20draft\x20version\x20of\x20journey\x20\x22'+_0x11c946+'\x22?');if(!_0x27af06)return console[_0x33ecd1(0x14b)](_0x33ecd1(0x141)),0x0;}const _0x597021=await withSpinner(_0x33ecd1(0x182),()=>_0x13c57c[_0x33ecd1(0x15c)][_0x33ecd1(0x1fe)](_0x1bc1b5),{'verbose':_0xb071d0[_0x33ecd1(0x1e3)]}),_0x30ddf9=_0x597021['data'];return console[_0x33ecd1(0x14b)](a27_0x36bf62[_0x33ecd1(0x1f5)]('✔')+_0x33ecd1(0x1c2)+_0x30ddf9['attributes'][_0x33ecd1(0x1da)]+_0x33ecd1(0x11d)+_0x30ddf9[_0x33ecd1(0x1c6)][_0x33ecd1(0xfb)]+'\x22'),console[_0x33ecd1(0x14b)]('\x20\x20Journey\x20ID:\x20'+_0x30ddf9['id']),await handleSingleObjectOutput({'id':_0x30ddf9['id'],'name':_0x30ddf9[_0x33ecd1(0x1c6)][_0x33ecd1(0xfb)],'version':_0x30ddf9['attributes'][_0x33ecd1(0x1da)],'state':_0x30ddf9[_0x33ecd1(0x1c6)][_0x33ecd1(0x1f0)],'bundle_id':_0x30ddf9['attributes']['journeyBundleId'],'created_at':_0x30ddf9[_0x33ecd1(0x1c6)][_0x33ecd1(0x167)]},_0xb071d0),0x0;}}export class JourneyVersionViewCommand extends BaseCommand{[a27_0x3d26ae(0xfb)]=a27_0x3d26ae(0x194);['description']=a27_0x3d26ae(0x133);async[a27_0x3d26ae(0x102)](_0x469b24){const _0x5f0894=a27_0x3d26ae,{options:_0x563b67,args:_0x16954b,tdx:_0xd02701}=_0x469b24,_0x213827=_0x16954b[0x0];if(!requireNameOrPath(_0x213827))return 0x1;const _0x4182e7=_0x563b67[_0x5f0894(0x174)];if(!_0x4182e7)return console['error']('Error:\x20--version\x20option\x20is\x20required'),console[_0x5f0894(0x14b)](_0x5f0894(0x177)),0x1;const _0x129636=parseInt(_0x4182e7,0xa);if(isNaN(_0x129636)||_0x129636<0x1)return console[_0x5f0894(0x14b)](_0x5f0894(0x200)+_0x4182e7),0x1;if(_0x563b67['verbose'])console[_0x5f0894(0x14b)]('Input:\x20'+_0x213827+_0x5f0894(0x1f4)+_0x129636);const {journeyId:_0x238217,parentSegmentId:_0x4d5fd8}=await resolveJourneyIdFromInput(_0x213827,_0x563b67,_0xd02701),_0x6a14ee=await withSpinner('Resolving\x20version...',()=>_0xd02701[_0x5f0894(0x15c)][_0x5f0894(0x12c)](_0x238217),{'verbose':_0x563b67[_0x5f0894(0x1e3)]}),{versions:_0x37faa3,latestJourneyId:_0x5a0ad4}=_0x6a14ee['data'],_0x1a2c0a=_0x37faa3[_0x5f0894(0x163)](_0x5c366f=>_0x5c366f[_0x5f0894(0x1da)]===_0x129636);if(!_0x1a2c0a){const _0x2646eb=_0x37faa3[_0x5f0894(0x150)](_0x10b49b=>'v'+_0x10b49b['versionNumber'])[_0x5f0894(0x134)](',\x20');return console[_0x5f0894(0x14b)](_0x5f0894(0x180)+_0x129636+_0x5f0894(0x1cb)+_0x2646eb),0x1;}const _0x454b1a=await withSpinner('Getting\x20version\x20'+_0x129636+_0x5f0894(0x1e8),()=>_0xd02701[_0x5f0894(0x15c)][_0x5f0894(0x16b)](_0x1a2c0a[_0x5f0894(0x1c4)]),{'verbose':_0x563b67[_0x5f0894(0x1e3)]}),_0xdfc86=_0x454b1a[_0x5f0894(0x119)],_0x1b974d=getConsoleNextUrl(_0x563b67['site'],_0x5f0894(0x172)+_0x4d5fd8+'/e/'+_0x1a2c0a[_0x5f0894(0x1c4)]+'/j/da/je');return await handleSingleObjectOutput({'id':_0xdfc86['id'],'name':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0xfb)],'version':_0xdfc86['attributes'][_0x5f0894(0x1da)],'description':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x187)],'state':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x1f0)],'paused':_0xdfc86[_0x5f0894(0x1c6)]['paused'],'reentry_mode':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x1ab)],'stages':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x15f)]?.[_0x5f0894(0x12a)]||0x0,..._0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x201)]&&{'goal':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x201)]['name']},'latest':_0x1a2c0a[_0x5f0894(0x1c4)]===_0x5a0ad4,'created_at':_0xdfc86[_0x5f0894(0x1c6)]['createdAt'],'updated_at':_0xdfc86[_0x5f0894(0x1c6)][_0x5f0894(0x1f1)],'url':_0x1b974d},_0x563b67),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0x39a4(_0xe3671d,_0x22e0c6){_0xe3671d=_0xe3671d-0x76;const _0x4a84fb=a28_0x4a84();let _0x39a469=_0x4a84fb[_0xe3671d];return _0x39a469;}function a28_0x4a84(){const _0x5991e2=['2682WKwxCT','Usage:\x20tdx\x20journey\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','3320MBuhWt','\x20\x20\x20\x20\x20\x20\x20tdx\x20journey\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','\x20(skipped:\x20','\x20segment\x20file(s)\x20skipped)','warningCount','skippedCount','2190gFHCCd','18oewlHp','\x20segment\x20file(s)\x20skipped','targetDir','parentSegment','red','length','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','hasErrors','1382695DmeaaQ','error','filter','No\x20journey\x20YAML\x20files\x20found\x20in\x20','dim','invalidCount','\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','validCount','log','53505ALhJBP','journey','execute','warnings','53027SLfJiN','yellow','errors','helpText','Error:\x20','Validation\x20failed:\x20','journey:validate','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20warning(s)\x20found','.yml','861kwWoso','file','\x20warning(s)','name','\x20error(s)','1416MkYxtA','reason','12972663zdchql','\x20journey(s)\x20with\x20errors,\x20','green','cwd','cyan','\x20valid','4092PUMiMb','verbose','3303UHnbjy','filePath','Validate\x20journey\x20YAML\x20files','9170jTCqiR','\x20journey(s)\x20valid','errorCode'];a28_0x4a84=function(){return _0x5991e2;};return a28_0x4a84();}const a28_0x1bc89a=a28_0x39a4;(function(_0x3f6a51,_0x79e127){const _0x9983c8=a28_0x39a4,_0x214695=_0x3f6a51();while(!![]){try{const _0x34d51c=parseInt(_0x9983c8(0xa4))/0x1*(parseInt(_0x9983c8(0x7c))/0x2)+-parseInt(_0x9983c8(0x76))/0x3*(-parseInt(_0x9983c8(0xb1))/0x4)+parseInt(_0x9983c8(0x8d))/0x5*(parseInt(_0x9983c8(0x85))/0x6)+-parseInt(_0x9983c8(0x79))/0x7*(-parseInt(_0x9983c8(0x7e))/0x8)+-parseInt(_0x9983c8(0x96))/0x9*(parseInt(_0x9983c8(0x84))/0xa)+-parseInt(_0x9983c8(0xab))/0xb+-parseInt(_0x9983c8(0xa9))/0xc*(parseInt(_0x9983c8(0x9a))/0xd);if(_0x34d51c===_0x79e127)break;else _0x214695['push'](_0x214695['shift']());}catch(_0x17d715){_0x214695['push'](_0x214695['shift']());}}}(a28_0x4a84,0xa8d7d));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_0x263e70 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class JourneyValidateCommand extends BaseCommand{[a28_0x1bc89a(0xa7)]=a28_0x1bc89a(0xa0);['description']=a28_0x1bc89a(0x78);async[a28_0x1bc89a(0x98)](_0x193bd6){const _0x3ae007=a28_0x1bc89a,{options:_0x5d54cc,args:_0x9214ae}=_0x193bd6,_0x3cd71e=_0x5d54cc,_0x2e317e=await resolveTarget({'arg':_0x9214ae[0x0],'contextParent':_0x5d54cc[_0x3ae007(0x88)],'cwd':process[_0x3ae007(0xae)]()});if(!isSuccessfulResolution(_0x2e317e))return _0x2e317e[_0x3ae007(0x7b)]==='no_parent'?(console[_0x3ae007(0x8e)](a28_0x263e70['yellow'](_0x3ae007(0x8b))),console[_0x3ae007(0x8e)](_0x3ae007(0x7d)),console[_0x3ae007(0x8e)](_0x3ae007(0x93)),console['error'](_0x3ae007(0x7f))):(console[_0x3ae007(0x8e)](a28_0x263e70[_0x3ae007(0x89)](_0x3ae007(0x9e)+_0x2e317e['message']+'\x0a')),_0x2e317e[_0x3ae007(0x9d)]&&console['error'](a28_0x263e70[_0x3ae007(0xaf)](_0x2e317e['helpText']))),0x1;const _0x85b5bc=_0x2e317e[_0x3ae007(0x87)],_0x6b3c76=_0x2e317e['type']===_0x3ae007(0xa5)?_0x2e317e[_0x3ae007(0x77)]:undefined;if(!_0x6b3c76&&!existsSync(_0x85b5bc))return console[_0x3ae007(0x8e)](a28_0x263e70[_0x3ae007(0x89)]('Error:\x20Directory\x20not\x20found:\x20'+_0x85b5bc+'\x0a')),0x1;let _0x4f8d9;if(_0x6b3c76){if(!_0x6b3c76['endsWith'](_0x3ae007(0xa3))&&!_0x6b3c76['endsWith']('.yaml'))return console['error'](a28_0x263e70[_0x3ae007(0x89)](_0x3ae007(0xa1)+_0x6b3c76+'\x0a')),0x1;_0x4f8d9=[_0x6b3c76];}else _0x4f8d9=findYamlFiles(_0x85b5bc);if(_0x4f8d9[_0x3ae007(0x8a)]===0x0)return console['error'](a28_0x263e70[_0x3ae007(0x89)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x85b5bc+'\x0a')),0x1;const _0x58d48d=validateYamlFiles(_0x4f8d9,_0x85b5bc,{'filterType':_0x3ae007(0x97)}),_0x8f8291=calculateSummary(_0x58d48d),_0x79e420=_0x58d48d[_0x3ae007(0x8f)](isValidationResult);if(_0x79e420[_0x3ae007(0x8a)]===0x0)return console['error'](a28_0x263e70[_0x3ae007(0x9b)](_0x3ae007(0x90)+_0x85b5bc+'\x0a')),_0x8f8291[_0x3ae007(0x83)]>0x0&&console[_0x3ae007(0x8e)](a28_0x263e70[_0x3ae007(0x91)]('('+_0x8f8291[_0x3ae007(0x83)]+_0x3ae007(0x81))),0x0;for(const _0x46593f of _0x58d48d){if(!isValidationResult(_0x46593f)){_0x3cd71e[_0x3ae007(0xb2)]&&console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0x91)]('-\x20'+_0x46593f['relativePath']+_0x3ae007(0x80)+_0x46593f[_0x3ae007(0xaa)]+')'));continue;}const {relativePath:_0x395415,source:_0x2c369c,result:_0x541950}=_0x46593f;if(_0x541950['valid']&&_0x541950['warnings']['length']===0x0)_0x3cd71e['verbose']&&console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0xad)]('✔\x20'+_0x395415));else _0x541950['valid']?(console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0x9b)]('⚠\x20'+_0x395415+':\x20'+_0x541950[_0x3ae007(0x99)][_0x3ae007(0x8a)]+_0x3ae007(0xa6))),console[_0x3ae007(0x95)](formatValidationResult(_0x541950,_0x2c369c,_0x395415))):(console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0x89)]('✖\x20'+_0x395415+':\x20'+_0x541950[_0x3ae007(0x9c)][_0x3ae007(0x8a)]+_0x3ae007(0xa8))),console['log'](formatValidationResult(_0x541950,_0x2c369c,_0x395415)));}return console[_0x3ae007(0x95)](''),_0x8f8291[_0x3ae007(0x8c)]?(console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0x89)](_0x3ae007(0x9f)+_0x8f8291[_0x3ae007(0x92)]+_0x3ae007(0xac)+_0x8f8291[_0x3ae007(0x94)]+_0x3ae007(0xb0))),_0x8f8291[_0x3ae007(0x82)]>0x0&&console['log'](a28_0x263e70[_0x3ae007(0x9b)](_0x8f8291['warningCount']+_0x3ae007(0xa2))),_0x8f8291[_0x3ae007(0x83)]>0x0&&console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0x91)](_0x8f8291[_0x3ae007(0x83)]+_0x3ae007(0x86))),0x1):(console['log'](a28_0x263e70['green']('✔\x20All\x20'+_0x8f8291['validCount']+_0x3ae007(0x7a))),_0x8f8291[_0x3ae007(0x82)]>0x0&&console['log'](a28_0x263e70[_0x3ae007(0x9b)](_0x8f8291[_0x3ae007(0x82)]+_0x3ae007(0xa2))),_0x8f8291[_0x3ae007(0x83)]>0x0&&console[_0x3ae007(0x95)](a28_0x263e70[_0x3ae007(0x91)](_0x8f8291[_0x3ae007(0x83)]+_0x3ae007(0x86))),0x0);}}
|