@treasuredata/tdx 0.16.13 → 0.16.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/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/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.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/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/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-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.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-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-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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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/port.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 a27_0x3805cc=a27_0x2522;(function(_0x181dd9,_0x14b232){const _0x143d69=a27_0x2522,_0x4f3b0b=_0x181dd9();while(!![]){try{const _0x50e669=parseInt(_0x143d69(0x10f))/0x1+parseInt(_0x143d69(0xbb))/0x2*(-parseInt(_0x143d69(0xd0))/0x3)+parseInt(_0x143d69(0xfc))/0x4*(-parseInt(_0x143d69(0xbc))/0x5)+-parseInt(_0x143d69(0xd5))/0x6+-parseInt(_0x143d69(0xf5))/0x7+parseInt(_0x143d69(0x11a))/0x8+parseInt(_0x143d69(0xf1))/0x9*(parseInt(_0x143d69(0x11d))/0xa);if(_0x50e669===_0x14b232)break;else _0x4f3b0b['push'](_0x4f3b0b['shift']());}catch(_0x495e7c){_0x4f3b0b['push'](_0x4f3b0b['shift']());}}}(a27_0x26cb,0x20010));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{executeSchemaQuery}from'../sdk/segment/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';function a27_0x2522(_0x20ca03,_0x422a0b){_0x20ca03=_0x20ca03-0x90;const _0x26cbbf=a27_0x26cb();let _0x25223f=_0x26cbbf[_0x20ca03];return _0x25223f;}function a27_0x26cb(){const _0x23581c=['Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required','Fetching\x20SQL\x20for\x20segment...','processedRows','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','segment:show','✔\x20Created\x20folder\x20\x27','SEGMENT_FOLDER_NOT_FOUND','Usage:\x20tdx\x20sg\x20desc\x20<name>','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','Fetching\x20parent\x20segment\x20details...','site','Fetching\x20folder\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>','getFolder','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','SEGMENT_NOT_FOUND','type','data','Listing\x20folders\x20for\x20parent\x20\x27','folderId','Folder\x20ID:\x20','segment:folder:list','/app/ps/','segment','(root)','Use:\x20tdx\x20ps\x20show','15687CNNcOi','segment:folder:create','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20<path/to/segment.yml>','1734306xjUWen','cause','listFolders','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Resolving\x20parent\x20folder\x20\x27','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','log','804mgfwhw','trim','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','test','\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22','Usage:\x20tdx\x20sg\x20sql\x20<name>','Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.','\x20Opening\x20','length','message','Folder\x20name:\x20','Parent\x20ID:\x20','segment:desc','folder','Resolving\x20parent\x20segment\x20\x27','information_schema','setJobId','segmentPath','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','187377okSsfi','Executing\x20segment\x20query...','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','Options:','Create\x20segment\x20folder\x20for\x20organization','execute','url','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Get\x20SQL\x20query\x20for\x20child\x20segment','segmentName','segmentId','1198936bnqDyy','replace','code','1310VAPLUq','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','name','toLocaleString','jobId','\x20\x20Parent\x20segment:\x20','Creating\x20folder\x20\x27','fullPath','segment:folder:show','✔\x20Found\x20','Show\x20segment\x20or\x20folder\x20details','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','parentSegment','/e/','verbose','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','elapsedTimeMillis','segment:sql','jsonl','green','query','Use:\x20tdx\x20ps\x20view\x20-w','parentFolder','folderPath','getParent','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','Segment\x20ID\x20missing\x20from\x20resolved\x20path','description','parent','includes','SQL\x20query:\x0a','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Resolving\x20folder\x20\x27','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Resolved\x20parent\x20ID:\x20','Resolved\x20parent\x20folder\x20ID:\x20','Folder\x20ID\x20missing\x20from\x20resolved\x20path','getSegmentSQL','Fetching\x20segment\x20details...','\x20\x20Segment\x20name:\x20','Examples:','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','✔\x20Query\x20completed:\x20Processed\x20','\x20[Job\x20ID:\x20','Error:\x20Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.','INVALID_ARGUMENT','segment:view','\x27\x20with\x20ID:\x20','Segment\x20ID:\x20','Site:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','limit','Use:\x20tdx\x20ps\x20view','resolvePathToResource','Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.','SELECT\x20*\x20FROM\x20(\x0a','createFolder','2eNdtPI','2505ewUlUV','Resolved\x20relative\x20path\x20to:\x20','\x20\x20Cause:\x20','parentId','Resolving\x20\x27','resolveParentId','getSegment','Resolved\x20YAML\x20file:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]','format','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','\x27...','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser','stats','Resolved\x20type:\x20','error','Parent\x20name:\x20','Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results','105711YTasHi','Show\x20segment\x20folder\x20details','Error:\x20','Usage:\x20tdx\x20sg\x20show\x20<name>','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','304758EvlCxg','resolveFolderId'];a27_0x26cb=function(){return _0x23581c;};return a27_0x26cb();}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import a27_0x4f0969 from'chalk';async function resolveSegmentTarget(_0x391b63,_0x36656b,_0xfb5d6){const _0x174a9f=a27_0x2522;if(isYamlFilePath(_0x391b63))try{const _0x47093c=await resolveYamlFilePath(_0x391b63);return _0xfb5d6&&(console[_0x174a9f(0xcd)](_0x174a9f(0xc3)+_0x391b63),console[_0x174a9f(0xcd)](_0x174a9f(0x122)+_0x47093c[_0x174a9f(0x129)]),console[_0x174a9f(0xcd)](_0x174a9f(0xa9)+_0x47093c[_0x174a9f(0x118)]),console['error']('\x20\x20Folder\x20path:\x20'+(_0x47093c[_0x174a9f(0x98)]||_0x174a9f(0xef))),console[_0x174a9f(0xcd)]('\x20\x20Full\x20path:\x20'+_0x47093c[_0x174a9f(0x124)])),_0x47093c['fullPath'];}catch(_0x44eab9){throw new SDKError(ErrorCode[_0x174a9f(0xaf)],_0x174a9f(0xab)+_0x44eab9[_0x174a9f(0x105)]);}if(!_0x36656b)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x174a9f(0xfa));return _0x36656b+'/'+_0x391b63;}export class SegmentDescribeCommand extends BaseCommand{[a27_0x3805cc(0x11f)]='segment:describe';[a27_0x3805cc(0x9d)]=a27_0x3805cc(0x127);async['execute'](_0x48ecb5){const _0x7915e3=a27_0x3805cc,{options:_0x564ec1,args:_0x4c7055,tdx:_0x2445e8}=_0x48ecb5,_0x58b613=_0x4c7055[0x0],_0x591b0e=!_0x58b613&&!!_0x564ec1['parentSegment'],_0x5f4f4f=_0x58b613||_0x564ec1[_0x7915e3(0x129)];if(!_0x5f4f4f)return console[_0x7915e3(0xcd)]('Error:\x20Path\x20or\x20name\x20is\x20required'),console[_0x7915e3(0xcd)]('Usage:\x20tdx\x20segment\x20describe\x20<path>'),console['error'](_0x7915e3(0xaa)),console['error'](_0x7915e3(0x128)),console[_0x7915e3(0xcd)](_0x7915e3(0xc4)),console[_0x7915e3(0xcd)](_0x7915e3(0xa1)),console['error'](_0x7915e3(0xda)),0x1;try{const _0xdf3b9c=_0x564ec1[_0x7915e3(0x10d)];let _0x2f30e8=_0x5f4f4f;!_0x591b0e&&_0xdf3b9c&&!_0x5f4f4f[_0x7915e3(0x9f)]('/')&&(_0x2f30e8=_0xdf3b9c+'/'+_0x5f4f4f,_0x564ec1['verbose']&&console[_0x7915e3(0xcd)](_0x7915e3(0xbd)+_0x2f30e8));const _0x5dcca5=await withSpinner('Resolving\x20path\x20\x27'+_0x2f30e8+_0x7915e3(0xc9),()=>_0x2445e8[_0x7915e3(0xee)][_0x7915e3(0xb7)](_0x2f30e8),{'verbose':_0x564ec1['verbose']}),_0xbfa14=_0x5dcca5['data'];_0x564ec1[_0x7915e3(0x12b)]&&(console[_0x7915e3(0xcd)](_0x7915e3(0xcc)+_0xbfa14[_0x7915e3(0xe7)]),console[_0x7915e3(0xcd)](_0x7915e3(0x107)+_0xbfa14[_0x7915e3(0xbf)]),_0xbfa14[_0x7915e3(0xea)]&&console[_0x7915e3(0xcd)](_0x7915e3(0xeb)+_0xbfa14[_0x7915e3(0xea)]),_0xbfa14[_0x7915e3(0x119)]&&console[_0x7915e3(0xcd)](_0x7915e3(0xb2)+_0xbfa14[_0x7915e3(0x119)]));if(_0xbfa14[_0x7915e3(0xe7)]===_0x7915e3(0x9e)){const _0x5d8ded=await withSpinner(_0x7915e3(0xe0),()=>_0x2445e8[_0x7915e3(0xee)][_0x7915e3(0x99)](_0xbfa14[_0x7915e3(0xbf)]),{'verbose':_0x564ec1[_0x7915e3(0x12b)]});await handleSingleObjectOutput(_0x5d8ded[_0x7915e3(0xe8)],_0x564ec1);}else{if(_0xbfa14[_0x7915e3(0xe7)]===_0x7915e3(0x109)){if(!_0xbfa14[_0x7915e3(0xea)])throw new SDKError(ErrorCode[_0x7915e3(0xdd)],_0x7915e3(0xa6));const _0x5259d2=await withSpinner('Fetching\x20folder\x20details...',()=>_0x2445e8[_0x7915e3(0xee)][_0x7915e3(0xe4)](_0xbfa14[_0x7915e3(0xea)]),{'verbose':_0x564ec1[_0x7915e3(0x12b)]});await handleSingleObjectOutput(_0x5259d2[_0x7915e3(0xe8)],_0x564ec1);}else{if(_0xbfa14[_0x7915e3(0xe7)]===_0x7915e3(0xee)){if(!_0xbfa14[_0x7915e3(0x119)])throw new SDKError(ErrorCode[_0x7915e3(0xe6)],_0x7915e3(0x9c));const _0x4da538=await withSpinner(_0x7915e3(0xa8),()=>_0x2445e8[_0x7915e3(0xee)][_0x7915e3(0xc2)](_0xbfa14[_0x7915e3(0xbf)],_0xbfa14['segmentId']),{'verbose':_0x564ec1[_0x7915e3(0x12b)]});await handleSingleObjectOutput(_0x4da538[_0x7915e3(0xe8)],_0x564ec1);}}}return 0x0;}catch(_0x250c57){if(_0x250c57 instanceof SDKError)return console[_0x7915e3(0xcd)]('Error:\x20'+_0x250c57[_0x7915e3(0x105)]),_0x250c57[_0x7915e3(0xf6)]&&console[_0x7915e3(0xcd)](_0x7915e3(0xbe)+_0x250c57[_0x7915e3(0xf6)]),0x1;throw _0x250c57;}}}export class SegmentShowCommand extends BaseCommand{[a27_0x3805cc(0x11f)]=a27_0x3805cc(0xdb);['description']=a27_0x3805cc(0xcf);async[a27_0x3805cc(0x114)](_0x5adc87){const _0x190b8f=a27_0x3805cc,{options:_0x4cc1f8,args:_0x3faaf5,tdx:_0x4b4cbe}=_0x5adc87,_0x162a2f=_0x3faaf5[0x0];if(!_0x162a2f)return console[_0x190b8f(0xcd)](_0x190b8f(0x10e)),console[_0x190b8f(0xcd)](_0x190b8f(0xd3)),console[_0x190b8f(0xcd)](_0x190b8f(0xe3)),console[_0x190b8f(0xcd)](_0x190b8f(0xaa)),console[_0x190b8f(0xcd)]('\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22'),console[_0x190b8f(0xcd)]('\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x2454df=_0x4cc1f8['parentSegment'],_0x1931c4=await resolveSegmentTarget(_0x162a2f,_0x2454df,_0x4cc1f8['verbose']);_0x4cc1f8[_0x190b8f(0x12b)]&&console[_0x190b8f(0xcd)](_0x190b8f(0xc7)+_0x1931c4);const _0x5dba15=await withSpinner(_0x190b8f(0xc0)+_0x162a2f+_0x190b8f(0xc9),()=>_0x4b4cbe[_0x190b8f(0xee)]['resolvePathToResource'](_0x1931c4),{'verbose':_0x4cc1f8['verbose']}),_0x1e5a26=_0x5dba15[_0x190b8f(0xe8)];_0x4cc1f8[_0x190b8f(0x12b)]&&(console[_0x190b8f(0xcd)]('Resolved\x20type:\x20'+_0x1e5a26[_0x190b8f(0xe7)]),console['error'](_0x190b8f(0x107)+_0x1e5a26[_0x190b8f(0xbf)]));if(_0x1e5a26[_0x190b8f(0xe7)]===_0x190b8f(0x109))return console[_0x190b8f(0xcd)](_0x190b8f(0xdf)),console['error'](_0x190b8f(0xe5)),0x1;if(_0x1e5a26[_0x190b8f(0xe7)]==='parent')return console[_0x190b8f(0xcd)](_0x190b8f(0x102)),console[_0x190b8f(0xcd)](_0x190b8f(0xf0)),0x1;if(!_0x1e5a26['segmentId'])throw new SDKError(ErrorCode[_0x190b8f(0xe6)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x10e1ae=await withSpinner(_0x190b8f(0xd8),()=>_0x4b4cbe[_0x190b8f(0xee)][_0x190b8f(0xa7)](_0x1e5a26['parentId'],_0x1e5a26[_0x190b8f(0x119)]),{'verbose':_0x4cc1f8['verbose']});let _0x468270=_0x10e1ae['data'];const _0x4a60c4=resolveLimit(_0x4cc1f8[_0x190b8f(0xb5)],DEFAULT_DISPLAY_LIMIT),_0x2d3d73=/\bLIMIT\s+\d+/i[_0x190b8f(0xff)](_0x468270);!_0x2d3d73&&(_0x468270=_0x468270[_0x190b8f(0xfd)]()[_0x190b8f(0x11b)](/;+$/,''),_0x468270=_0x190b8f(0xb9)+_0x468270+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x4a60c4);_0x4cc1f8[_0x190b8f(0x12b)]&&console[_0x190b8f(0xcd)](_0x190b8f(0xa0)+_0x468270);const _0x52a610=await withProgressSpinner(_0x190b8f(0x110),async _0x111909=>{const _0x559af6=_0x190b8f,_0x42326d=await _0x4b4cbe[_0x559af6(0x95)][_0x559af6(0x114)](_0x468270,{'catalog':'td','schema':_0x559af6(0x10b),'onJobId':_0x19ae95=>{const _0x5a598e=_0x559af6;_0x111909[_0x5a598e(0x10c)](_0x19ae95);}});return _0x42326d;},{'verbose':_0x4cc1f8['verbose']}),_0x4fb20e=_0x52a610[_0x190b8f(0xe8)],_0x34841b=_0x4fb20e[_0x190b8f(0x121)]?_0x190b8f(0xad)+_0x4fb20e[_0x190b8f(0x121)]+']':'';return console[_0x190b8f(0xcd)](_0x190b8f(0xac)+_0x4fb20e[_0x190b8f(0xcb)][_0x190b8f(0xd9)][_0x190b8f(0x120)]()+'\x20rows\x20'+('in\x20'+formatElapsed(_0x4fb20e['stats'][_0x190b8f(0x91)])+_0x34841b)),await handleQueryOutput(_0x4fb20e,_0x4cc1f8),0x0;}catch(_0x18e43b){if(_0x18e43b instanceof SDKError)return console[_0x190b8f(0xcd)]('✖\x20Query\x20failed\x20['+_0x18e43b[_0x190b8f(0x11c)]+']'),console[_0x190b8f(0xcd)]('\x0a'+_0x18e43b['message']),0x1;throw _0x18e43b;}}}export class SegmentFolderListCommand extends BaseCommand{[a27_0x3805cc(0x11f)]=a27_0x3805cc(0xec);[a27_0x3805cc(0x9d)]=a27_0x3805cc(0x90);async['execute'](_0x12ce43){const _0x44e2dd=a27_0x3805cc,{options:_0x5d3b39,args:_0x59aabe,tdx:_0x145fea}=_0x12ce43;if(_0x59aabe['length']===0x0)return console[_0x44e2dd(0xcd)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x44e2dd(0xcd)](_0x44e2dd(0xc8)),0x1;const _0x21ef2e=_0x59aabe[0x0];try{_0x5d3b39['verbose']&&(console[_0x44e2dd(0xcd)](_0x44e2dd(0xb3)+_0x5d3b39['site']),console[_0x44e2dd(0xcd)](_0x44e2dd(0xce)+_0x21ef2e));const _0x33e6d9=await withSpinner(_0x44e2dd(0x10a)+_0x21ef2e+_0x44e2dd(0xc9),()=>_0x145fea[_0x44e2dd(0xee)]['resolveParentId'](_0x21ef2e),{'verbose':_0x5d3b39[_0x44e2dd(0x12b)]}),_0x3af434=_0x33e6d9['data'];_0x5d3b39[_0x44e2dd(0x12b)]&&console[_0x44e2dd(0xcd)](_0x44e2dd(0xa4)+_0x3af434);const _0xc40687=await withSpinner(_0x44e2dd(0xe9)+_0x21ef2e+_0x44e2dd(0xc9),()=>_0x145fea[_0x44e2dd(0xee)][_0x44e2dd(0xf7)](_0x3af434),{'verbose':_0x5d3b39[_0x44e2dd(0x12b)]}),_0x626b40=_0xc40687[_0x44e2dd(0xe8)];return console[_0x44e2dd(0xcd)](_0x44e2dd(0x126)+_0x626b40['length']+'\x20folder'+(_0x626b40[_0x44e2dd(0x104)]!==0x1?'s':'')),await handleSDKOutput(_0x626b40,_0x5d3b39),0x0;}catch(_0x3efcb5){if(_0x3efcb5 instanceof SDKError)return console['error']('Error:\x20'+_0x3efcb5[_0x44e2dd(0x105)]),_0x3efcb5[_0x44e2dd(0xf6)]&&console[_0x44e2dd(0xcd)](_0x44e2dd(0xbe)+_0x3efcb5[_0x44e2dd(0xf6)]),0x1;throw _0x3efcb5;}}}export class SegmentFolderShowCommand extends BaseCommand{[a27_0x3805cc(0x11f)]=a27_0x3805cc(0x125);[a27_0x3805cc(0x9d)]=a27_0x3805cc(0xd1);async['execute'](_0x5348e3){const _0x51c506=a27_0x3805cc,{options:_0x5d0b86,args:_0x40b4db,tdx:_0x262108}=_0x5348e3;if(_0x40b4db[_0x51c506(0x104)]===0x0)return console[_0x51c506(0xcd)]('Error:\x20Folder\x20reference\x20is\x20required'),console['error']('Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>'),0x1;try{const {parentId:_0xe6beee,childId:_0x5309ac}=parseSegmentRef(_0x40b4db[0x0]);_0x5d0b86[_0x51c506(0x12b)]&&(console[_0x51c506(0xcd)](_0x51c506(0xb3)+_0x5d0b86[_0x51c506(0xe1)]),console[_0x51c506(0xcd)](_0x51c506(0xce)+_0xe6beee),_0x5309ac&&console['error'](_0x51c506(0x106)+_0x5309ac));if(!_0x5309ac)return console[_0x51c506(0xcd)](_0x51c506(0x116)),0x1;const _0x28da7a=await withSpinner(_0x51c506(0x10a)+_0xe6beee+_0x51c506(0xc9),()=>_0x262108[_0x51c506(0xee)][_0x51c506(0xc1)](_0xe6beee),{'verbose':_0x5d0b86[_0x51c506(0x12b)]}),_0x5ac9b6=_0x28da7a['data'];_0x5d0b86[_0x51c506(0x12b)]&&console[_0x51c506(0xcd)](_0x51c506(0xa4)+_0x5ac9b6);const _0x10d20a=await withSpinner(_0x51c506(0xa2)+_0x5309ac+_0x51c506(0xc9),()=>_0x262108[_0x51c506(0xee)][_0x51c506(0xd6)](_0x5ac9b6,_0x5309ac),{'verbose':_0x5d0b86[_0x51c506(0x12b)]}),_0x315787=_0x10d20a['data'];_0x5d0b86[_0x51c506(0x12b)]&&console[_0x51c506(0xcd)]('Resolved\x20folder\x20ID:\x20'+_0x315787);const _0x3e920d=await withSpinner(_0x51c506(0xe2)+_0x5309ac+_0x51c506(0xc9),()=>_0x262108[_0x51c506(0xee)][_0x51c506(0xe4)](_0x315787),{'verbose':_0x5d0b86[_0x51c506(0x12b)]});return await handleSDKOutput([_0x3e920d[_0x51c506(0xe8)]],_0x5d0b86),0x0;}catch(_0x64c85c){if(_0x64c85c instanceof SDKError)return console[_0x51c506(0xcd)](_0x51c506(0xd2)+_0x64c85c[_0x51c506(0x105)]),_0x64c85c[_0x51c506(0xf6)]&&console[_0x51c506(0xcd)]('\x20\x20Cause:\x20'+_0x64c85c['cause']),0x1;throw _0x64c85c;}}}export class SegmentSQLCommand extends BaseCommand{['name']=a27_0x3805cc(0x92);[a27_0x3805cc(0x9d)]=a27_0x3805cc(0x117);async[a27_0x3805cc(0x114)](_0x291dab){const _0x4767a7=a27_0x3805cc,{options:_0x198bf3,args:_0x39618a,tdx:_0x519884}=_0x291dab,_0x599a5a=_0x39618a[0x0];if(!_0x599a5a)return console[_0x4767a7(0xcd)](_0x4767a7(0x10e)),console[_0x4767a7(0xcd)](_0x4767a7(0x101)),console[_0x4767a7(0xcd)](_0x4767a7(0xf4)),console[_0x4767a7(0xcd)](_0x4767a7(0xaa)),console['error'](_0x4767a7(0x100)),console['error']('\x20\x20tdx\x20sg\x20sql\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x1169aa=_0x198bf3['parentSegment'],_0x484d1b=await resolveSegmentTarget(_0x599a5a,_0x1169aa,_0x198bf3['verbose']);_0x198bf3[_0x4767a7(0x12b)]&&console[_0x4767a7(0xcd)](_0x4767a7(0xc7)+_0x484d1b);const _0x465f97=await withSpinner(_0x4767a7(0xc0)+_0x599a5a+_0x4767a7(0xc9),()=>_0x519884[_0x4767a7(0xee)][_0x4767a7(0xb7)](_0x484d1b),{'verbose':_0x198bf3[_0x4767a7(0x12b)]}),_0x2db8a9=_0x465f97[_0x4767a7(0xe8)];_0x198bf3[_0x4767a7(0x12b)]&&(console[_0x4767a7(0xcd)](_0x4767a7(0xcc)+_0x2db8a9['type']),console['error']('Parent\x20ID:\x20'+_0x2db8a9['parentId']));if(_0x2db8a9['type']===_0x4767a7(0x109))return console[_0x4767a7(0xcd)](_0x4767a7(0xa3)),console[_0x4767a7(0xcd)](_0x4767a7(0xd4)),0x1;if(_0x2db8a9['type']===_0x4767a7(0x9e))return console[_0x4767a7(0xcd)](_0x4767a7(0xae)),console['error']('Use:\x20tdx\x20ps\x20sql'),0x1;if(!_0x2db8a9['segmentId'])throw new SDKError(ErrorCode[_0x4767a7(0xe6)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x35214e=await withSpinner(_0x4767a7(0xd8),()=>_0x519884[_0x4767a7(0xee)][_0x4767a7(0xa7)](_0x2db8a9[_0x4767a7(0xbf)],_0x2db8a9[_0x4767a7(0x119)]),{'verbose':_0x198bf3['verbose']}),_0x461d6a=_0x35214e[_0x4767a7(0xe8)];return _0x198bf3[_0x4767a7(0xc6)]==='json'||_0x198bf3[_0x4767a7(0xc6)]===_0x4767a7(0x93)?await handleSDKOutput([{'sql':_0x461d6a}],_0x198bf3):console[_0x4767a7(0xfb)](_0x461d6a),0x0;}catch(_0x265dd5){if(_0x265dd5 instanceof SDKError)return console[_0x4767a7(0xcd)]('Error:\x20'+_0x265dd5[_0x4767a7(0x105)]),_0x265dd5['cause']&&console[_0x4767a7(0xcd)](_0x4767a7(0xbe)+_0x265dd5[_0x4767a7(0xf6)]),0x1;throw _0x265dd5;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a27_0x3805cc(0x11f)]=a27_0x3805cc(0xf2);[a27_0x3805cc(0x9d)]=a27_0x3805cc(0x113);async['execute'](_0x39f00f){const _0x518733=a27_0x3805cc,{options:_0x327b79,args:_0x5e2f2d,tdx:_0xab3ff9}=_0x39f00f,_0x213fe9=_0x327b79;if(_0x5e2f2d[_0x518733(0x104)]<0x2)return console[_0x518733(0xcd)](_0x518733(0xf8)),console[_0x518733(0xcd)](_0x518733(0x11e)),0x1;const _0x594447=_0x5e2f2d[0x0],_0x65903=_0x5e2f2d[0x1];_0x213fe9['verbose']&&(console[_0x518733(0xcd)](_0x518733(0xb3)+_0x213fe9[_0x518733(0xe1)]),console['error']('Parent\x20segment:\x20'+_0x594447),console['error'](_0x518733(0x106)+_0x65903));let _0x5649ae;if(_0x213fe9[_0x518733(0x97)]){const _0x25c471=_0x213fe9[_0x518733(0x97)],_0x45bfcb=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x594447+'\x27...',()=>_0xab3ff9[_0x518733(0xee)][_0x518733(0xc1)](_0x594447),{'verbose':_0x213fe9[_0x518733(0x12b)]}),_0x5c8fb0=_0x45bfcb[_0x518733(0xe8)],_0x347ccd=await withSpinner(_0x518733(0xf9)+_0x25c471+_0x518733(0xc9),()=>_0xab3ff9['segment'][_0x518733(0xd6)](_0x5c8fb0,_0x25c471),{'verbose':_0x213fe9[_0x518733(0x12b)]});_0x5649ae=_0x347ccd[_0x518733(0xe8)],_0x213fe9[_0x518733(0x12b)]&&console[_0x518733(0xcd)](_0x518733(0xa5)+_0x5649ae);}const _0x1bed71={'name':_0x65903,'description':_0x213fe9[_0x518733(0x9d)],'parentFolderId':_0x5649ae},_0x5ac9ea=await withSpinner(_0x518733(0x123)+_0x65903+'\x27...',()=>_0xab3ff9[_0x518733(0xee)][_0x518733(0xba)](_0x594447,_0x1bed71),{'verbose':_0x213fe9[_0x518733(0x12b)]}),_0x3f451b=_0x5ac9ea[_0x518733(0xe8)];return console[_0x518733(0xcd)](_0x518733(0xdc)+_0x3f451b[_0x518733(0x11f)]+_0x518733(0xb1)+_0x3f451b['id']),await handleSDKOutput([_0x3f451b],_0x213fe9),0x0;}}export class SegmentViewCommand extends BaseCommand{[a27_0x3805cc(0x11f)]=a27_0x3805cc(0xb0);[a27_0x3805cc(0x9d)]='Show\x20folder\x20or\x20child\x20segment\x20details';async['execute'](_0x3c3fa2){const _0x3c4e59=a27_0x3805cc,{options:_0x1e040f,args:_0x4c04bd,tdx:_0x4fc70b}=_0x3c3fa2,_0x384d5f=_0x4c04bd[0x0];if(!_0x384d5f)return console['error'](_0x3c4e59(0xd7)),console[_0x3c4e59(0xcd)](_0x3c4e59(0xc5)),console[_0x3c4e59(0xcd)](_0x3c4e59(0xb4)),console[_0x3c4e59(0xcd)](_0x3c4e59(0x112)),console['error'](_0x3c4e59(0xf3)),console[_0x3c4e59(0xcd)](_0x3c4e59(0xaa)),console[_0x3c4e59(0xcd)]('\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details'),console['error'](_0x3c4e59(0x111)),console[_0x3c4e59(0xcd)](_0x3c4e59(0xca)),console[_0x3c4e59(0xcd)]('\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x2d22da=_0x1e040f['parentSegment'],_0x15042e=await resolveSegmentTarget(_0x384d5f,_0x2d22da,_0x1e040f[_0x3c4e59(0x12b)]);_0x1e040f[_0x3c4e59(0x12b)]&&console[_0x3c4e59(0xcd)](_0x3c4e59(0xc7)+_0x15042e);const _0x685e41=await withSpinner('Resolving\x20\x27'+_0x384d5f+_0x3c4e59(0xc9),()=>_0x4fc70b[_0x3c4e59(0xee)]['resolvePathToResource'](_0x15042e),{'verbose':_0x1e040f[_0x3c4e59(0x12b)]}),_0x436e6=_0x685e41['data'];_0x1e040f[_0x3c4e59(0x12b)]&&(console['error'](_0x3c4e59(0xcc)+_0x436e6[_0x3c4e59(0xe7)]),console[_0x3c4e59(0xcd)](_0x3c4e59(0x107)+_0x436e6['parentId']),_0x436e6[_0x3c4e59(0xea)]&&console[_0x3c4e59(0xcd)](_0x3c4e59(0xeb)+_0x436e6[_0x3c4e59(0xea)]),_0x436e6[_0x3c4e59(0x119)]&&console[_0x3c4e59(0xcd)]('Segment\x20ID:\x20'+_0x436e6[_0x3c4e59(0x119)]));if(_0x1e040f['web']){if(_0x436e6[_0x3c4e59(0xe7)]===_0x3c4e59(0x109))return console[_0x3c4e59(0xcd)](_0x3c4e59(0xfe)),0x1;if(_0x436e6[_0x3c4e59(0xe7)]==='parent')return console[_0x3c4e59(0xcd)](_0x3c4e59(0x9a)),console[_0x3c4e59(0xcd)](_0x3c4e59(0x96)),0x1;if(!_0x436e6['segmentId'])throw new SDKError(ErrorCode[_0x3c4e59(0xe6)],_0x3c4e59(0x9c));const _0x461acc=getConsoleNextUrl(_0x1e040f['site'],_0x3c4e59(0xed)+_0x436e6['parentId']+_0x3c4e59(0x12a)+_0x436e6['segmentId']);return console[_0x3c4e59(0xcd)](a27_0x4f0969[_0x3c4e59(0x94)]('✔')+_0x3c4e59(0x103)+a27_0x4f0969['cyan'](_0x461acc)),openBrowser(_0x461acc),0x0;}if(_0x436e6[_0x3c4e59(0xe7)]==='folder'){if(!_0x436e6['folderId'])throw new SDKError(ErrorCode[_0x3c4e59(0xdd)],_0x3c4e59(0xa6));const _0x9900e1=await withSpinner('Fetching\x20folder\x20details...',()=>_0x4fc70b[_0x3c4e59(0xee)]['getFolder'](_0x436e6['folderId']),{'verbose':_0x1e040f[_0x3c4e59(0x12b)]});await handleSingleObjectOutput(_0x9900e1['data'],_0x1e040f);}else{if(_0x436e6[_0x3c4e59(0xe7)]===_0x3c4e59(0xee)){if(!_0x436e6[_0x3c4e59(0x119)])throw new SDKError(ErrorCode[_0x3c4e59(0xe6)],_0x3c4e59(0x9c));const _0x296616=await withSpinner(_0x3c4e59(0xa8),()=>_0x4fc70b['segment']['getSegment'](_0x436e6[_0x3c4e59(0xbf)],_0x436e6[_0x3c4e59(0x119)]),{'verbose':_0x1e040f[_0x3c4e59(0x12b)]}),_0x5a9919=getConsoleNextUrl(_0x1e040f[_0x3c4e59(0xe1)],_0x3c4e59(0xed)+_0x436e6[_0x3c4e59(0xbf)]+_0x3c4e59(0x12a)+_0x436e6[_0x3c4e59(0x119)]),_0x33c8ab=_0x296616[_0x3c4e59(0xe8)];_0x33c8ab[_0x3c4e59(0x115)]=_0x5a9919,await handleSingleObjectOutput(_0x33c8ab,_0x1e040f);}else return console[_0x3c4e59(0xcd)](_0x3c4e59(0x9b)),console[_0x3c4e59(0xcd)](_0x3c4e59(0xb6)),0x1;}return 0x0;}catch(_0x5bb80b){if(_0x5bb80b instanceof SDKError)return console[_0x3c4e59(0xcd)](_0x3c4e59(0xd2)+_0x5bb80b[_0x3c4e59(0x105)]),_0x5bb80b[_0x3c4e59(0xf6)]&&console[_0x3c4e59(0xcd)](_0x3c4e59(0xbe)+_0x5bb80b[_0x3c4e59(0xf6)]),0x1;throw _0x5bb80b;}}}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{[a27_0x3805cc(0x11f)]=a27_0x3805cc(0x108);[a27_0x3805cc(0x9d)]='Show\x20child\x20segment\x20schema\x20(column\x20types)';async[a27_0x3805cc(0x114)](_0x310859){const _0x299957=a27_0x3805cc,{options:_0xc8bfc4,args:_0x43c6c9,tdx:_0x5ae309}=_0x310859,_0x2254f1=_0x43c6c9[0x0];if(!_0x2254f1)return console[_0x299957(0xcd)](_0x299957(0x10e)),console[_0x299957(0xcd)](_0x299957(0xde)),console[_0x299957(0xcd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>'),console[_0x299957(0xcd)](_0x299957(0xaa)),console[_0x299957(0xcd)]('\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22'),console[_0x299957(0xcd)]('\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x5d1c3a=_0xc8bfc4['parentSegment'],_0x9aa186=await resolveSegmentTarget(_0x2254f1,_0x5d1c3a,_0xc8bfc4[_0x299957(0x12b)]);_0xc8bfc4[_0x299957(0x12b)]&&console['error'](_0x299957(0xc7)+_0x9aa186);const _0x59028f=await withSpinner(_0x299957(0xc0)+_0x2254f1+_0x299957(0xc9),()=>_0x5ae309[_0x299957(0xee)][_0x299957(0xb7)](_0x9aa186),{'verbose':_0xc8bfc4[_0x299957(0x12b)]}),_0x38a069=_0x59028f['data'];_0xc8bfc4['verbose']&&(console[_0x299957(0xcd)](_0x299957(0xcc)+_0x38a069[_0x299957(0xe7)]),console[_0x299957(0xcd)](_0x299957(0x107)+_0x38a069[_0x299957(0xbf)]));if(_0x38a069['type']===_0x299957(0x109))return console[_0x299957(0xcd)]('Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.'),console['error']('Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.'),0x1;if(_0x38a069[_0x299957(0xe7)]===_0x299957(0x9e))return console[_0x299957(0xcd)](_0x299957(0xb8)),console['error']('Use:\x20tdx\x20ps\x20desc'),0x1;if(!_0x38a069[_0x299957(0x119)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x542154=await withSpinner(_0x299957(0xd8),()=>_0x5ae309[_0x299957(0xee)][_0x299957(0xa7)](_0x38a069[_0x299957(0xbf)],_0x38a069[_0x299957(0x119)]),{'verbose':_0xc8bfc4['verbose']}),_0xe35e3=_0x542154['data'],_0x3555de=await executeSchemaQuery(_0xe35e3,_0x5ae309,_0xc8bfc4);return await handleQueryOutput(_0x3555de,_0xc8bfc4),0x0;}catch(_0x230cc1){if(_0x230cc1 instanceof SDKError)return console[_0x299957(0xcd)](_0x299957(0xd2)+_0x230cc1[_0x299957(0x105)]),_0x230cc1[_0x299957(0xf6)]&&console[_0x299957(0xcd)](_0x299957(0xbe)+_0x230cc1[_0x299957(0xf6)]),0x1;throw _0x230cc1;}}}
|
|
1
|
+
const a27_0x33d221=a27_0xed69;(function(_0xb65240,_0x32ad91){const _0x2808b9=a27_0xed69,_0x65d2fc=_0xb65240();while(!![]){try{const _0xca96ea=-parseInt(_0x2808b9(0x174))/0x1+parseInt(_0x2808b9(0x181))/0x2+-parseInt(_0x2808b9(0x1f1))/0x3*(parseInt(_0x2808b9(0x179))/0x4)+parseInt(_0x2808b9(0x1c9))/0x5*(-parseInt(_0x2808b9(0x18a))/0x6)+parseInt(_0x2808b9(0x189))/0x7*(-parseInt(_0x2808b9(0x1d4))/0x8)+-parseInt(_0x2808b9(0x1db))/0x9+-parseInt(_0x2808b9(0x1e1))/0xa*(-parseInt(_0x2808b9(0x1eb))/0xb);if(_0xca96ea===_0x32ad91)break;else _0x65d2fc['push'](_0x65d2fc['shift']());}catch(_0x3ed31c){_0x65d2fc['push'](_0x65d2fc['shift']());}}}(a27_0x3fb5,0x92bfa));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{executeSchemaQuery}from'../sdk/segment/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';function a27_0xed69(_0x59252e,_0x52c6f1){_0x59252e=_0x59252e-0x160;const _0x3fb502=a27_0x3fb5();let _0xed6902=_0x3fb502[_0x59252e];return _0xed6902;}function a27_0x3fb5(){const _0x32a170=['10oOoBGF','\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','fullPath','resolveFolderId','segment:sql','✔\x20Found\x20','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','resolvePathToResource','\x20\x20Segment\x20name:\x20','29775163FnbfJK','SEGMENT_FOLDER_NOT_FOUND','getSegment','jobId','Resolved\x20YAML\x20file:\x20','Fetching\x20folder\x20\x27','8259ZDheES','Error:\x20Path\x20or\x20name\x20is\x20required','site','Target\x20path:\x20','Resolving\x20parent\x20segment\x20\x27','processedRows','Usage:\x20tdx\x20segment\x20describe\x20<path>','description','folder','length','Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]','code','\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','Resolving\x20\x27','getParent','segmentName','query','in\x20','\x20\x20Parent\x20segment:\x20','Show\x20segment\x20or\x20folder\x20details','includes','folderPath','segmentId','stats','INVALID_ARGUMENT','information_schema','toLocaleString','Resolving\x20parent\x20folder\x20\x27','\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details','Create\x20segment\x20folder\x20for\x20organization','Fetching\x20SQL\x20for\x20segment...','/e/','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Show\x20segment\x20folder\x20details','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','115346wKImen','segment:describe','segment:folder:create','\x20Opening\x20','jsonl','1508fnWbvB','test','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','Parent\x20segment:\x20','Resolved\x20relative\x20path\x20to:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser','Parent\x20name:\x20','(root)','1077966goOynX','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','segment:desc','segment','message','SEGMENT_NOT_FOUND','Parent\x20ID:\x20','Folder\x20name:\x20','385IpUUJu','1785300JIYTmm','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','type','\x27...','Get\x20SQL\x20query\x20for\x20child\x20segment','getFolder','setJobId','\x20\x20tdx\x20sg\x20sql\x20segments/my-audience/premium-users.yml','Resolved\x20folder\x20ID:\x20','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','limit','verbose','Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required','format','Segment\x20ID\x20missing\x20from\x20resolved\x20path','data','cyan','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','getSegmentSQL','Segment\x20ID:\x20','Error:\x20Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.','log','Usage:\x20tdx\x20sg\x20desc\x20<name>','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.','web','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','\x20\x20Full\x20path:\x20','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Show\x20folder\x20or\x20child\x20segment\x20details','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','Executing\x20segment\x20query...','folderId','\x20[Job\x20ID:\x20','Site:\x20','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','execute','green','Error:\x20Folder\x20reference\x20is\x20required','segment:view','Resolving\x20folder\x20\x27','/app/ps/','Error:\x20','Resolved\x20parent\x20folder\x20ID:\x20','Options:','Resolved\x20type:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>','json','Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results','✖\x20Query\x20failed\x20[','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','Creating\x20folder\x20\x27','error','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','Usage:\x20tdx\x20sg\x20sql\x20<name>','parentSegment','Examples:','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22','Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.','resolveParentId','\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22','5ZwiCgc','Fetching\x20parent\x20segment\x20details...','cause','\x20\x20Cause:\x20','Folder\x20ID:\x20','replace','segment:folder:list','\x27\x20with\x20ID:\x20','Fetching\x20segment\x20details...','Fetching\x20folder\x20details...','listFolders','100744jmVfDs','name','parentFolder','Resolved\x20parent\x20ID:\x20','\x20folder','Usage:\x20tdx\x20sg\x20show\x20<name>','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','4512078NfCBAC','parentId','✔\x20Created\x20folder\x20\x27','parent','Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.','Listing\x20folders\x20for\x20parent\x20\x27'];a27_0x3fb5=function(){return _0x32a170;};return a27_0x3fb5();}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import a27_0x2106e2 from'chalk';async function resolveSegmentTarget(_0x276954,_0x125287,_0x4ccda7){const _0x19aaa1=a27_0xed69;if(isYamlFilePath(_0x276954))try{const _0x2778f7=await resolveYamlFilePath(_0x276954);return _0x4ccda7&&(console[_0x19aaa1(0x1bf)](_0x19aaa1(0x1ef)+_0x276954),console[_0x19aaa1(0x1bf)](_0x19aaa1(0x163)+_0x2778f7[_0x19aaa1(0x1c2)]),console[_0x19aaa1(0x1bf)](_0x19aaa1(0x1ea)+_0x2778f7[_0x19aaa1(0x160)]),console[_0x19aaa1(0x1bf)]('\x20\x20Folder\x20path:\x20'+(_0x2778f7[_0x19aaa1(0x166)]||_0x19aaa1(0x180))),console['error'](_0x19aaa1(0x1a6)+_0x2778f7[_0x19aaa1(0x1e4)])),_0x2778f7[_0x19aaa1(0x1e4)];}catch(_0x179a9){throw new SDKError(ErrorCode[_0x19aaa1(0x169)],_0x19aaa1(0x1c0)+_0x179a9[_0x19aaa1(0x185)]);}if(!_0x125287)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x19aaa1(0x1a9));return _0x125287+'/'+_0x276954;}export class SegmentDescribeCommand extends BaseCommand{['name']=a27_0x33d221(0x175);[a27_0x33d221(0x1f8)]=a27_0x33d221(0x164);async[a27_0x33d221(0x1af)](_0x51b4a2){const _0x204968=a27_0x33d221,{options:_0x5961b4,args:_0x31f03f,tdx:_0x1a97c4}=_0x51b4a2,_0x581cc1=_0x31f03f[0x0],_0x3feb3d=!_0x581cc1&&!!_0x5961b4[_0x204968(0x1c2)],_0x260b0a=_0x581cc1||_0x5961b4['parentSegment'];if(!_0x260b0a)return console[_0x204968(0x1bf)](_0x204968(0x1f2)),console['error'](_0x204968(0x1f7)),console['error'](_0x204968(0x1c3)),console[_0x204968(0x1bf)](_0x204968(0x1da)),console['error']('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x204968(0x1bf)](_0x204968(0x1a5)),console['error'](_0x204968(0x1a4)),0x1;try{const _0x4b04dd=_0x5961b4['segmentPath'];let _0x291723=_0x260b0a;!_0x3feb3d&&_0x4b04dd&&!_0x260b0a[_0x204968(0x165)]('/')&&(_0x291723=_0x4b04dd+'/'+_0x260b0a,_0x5961b4['verbose']&&console[_0x204968(0x1bf)](_0x204968(0x17d)+_0x291723));const _0x129a47=await withSpinner('Resolving\x20path\x20\x27'+_0x291723+_0x204968(0x18d),()=>_0x1a97c4[_0x204968(0x184)][_0x204968(0x1e9)](_0x291723),{'verbose':_0x5961b4[_0x204968(0x195)]}),_0x48e624=_0x129a47[_0x204968(0x199)];_0x5961b4[_0x204968(0x195)]&&(console[_0x204968(0x1bf)](_0x204968(0x1b8)+_0x48e624[_0x204968(0x18c)]),console[_0x204968(0x1bf)](_0x204968(0x187)+_0x48e624[_0x204968(0x1dc)]),_0x48e624[_0x204968(0x1ab)]&&console['error'](_0x204968(0x1cd)+_0x48e624[_0x204968(0x1ab)]),_0x48e624[_0x204968(0x167)]&&console[_0x204968(0x1bf)](_0x204968(0x19d)+_0x48e624[_0x204968(0x167)]));if(_0x48e624[_0x204968(0x18c)]===_0x204968(0x1de)){const _0x36fd16=await withSpinner(_0x204968(0x1ca),()=>_0x1a97c4[_0x204968(0x184)][_0x204968(0x200)](_0x48e624['parentId']),{'verbose':_0x5961b4['verbose']});await handleSingleObjectOutput(_0x36fd16[_0x204968(0x199)],_0x5961b4);}else{if(_0x48e624['type']===_0x204968(0x1f9)){if(!_0x48e624['folderId'])throw new SDKError(ErrorCode['SEGMENT_FOLDER_NOT_FOUND'],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x58830f=await withSpinner(_0x204968(0x1d2),()=>_0x1a97c4[_0x204968(0x184)][_0x204968(0x18f)](_0x48e624[_0x204968(0x1ab)]),{'verbose':_0x5961b4['verbose']});await handleSingleObjectOutput(_0x58830f[_0x204968(0x199)],_0x5961b4);}else{if(_0x48e624[_0x204968(0x18c)]===_0x204968(0x184)){if(!_0x48e624[_0x204968(0x167)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x204968(0x198));const _0x1885cb=await withSpinner(_0x204968(0x1d1),()=>_0x1a97c4['segment'][_0x204968(0x1ed)](_0x48e624[_0x204968(0x1dc)],_0x48e624['segmentId']),{'verbose':_0x5961b4[_0x204968(0x195)]});await handleSingleObjectOutput(_0x1885cb[_0x204968(0x199)],_0x5961b4);}}}return 0x0;}catch(_0x224e60){if(_0x224e60 instanceof SDKError)return console[_0x204968(0x1bf)](_0x204968(0x1b5)+_0x224e60[_0x204968(0x185)]),_0x224e60[_0x204968(0x1cb)]&&console[_0x204968(0x1bf)]('\x20\x20Cause:\x20'+_0x224e60[_0x204968(0x1cb)]),0x1;throw _0x224e60;}}}export class SegmentShowCommand extends BaseCommand{[a27_0x33d221(0x1d5)]='segment:show';[a27_0x33d221(0x1f8)]=a27_0x33d221(0x1bb);async[a27_0x33d221(0x1af)](_0x4b59c6){const _0x4736f1=a27_0x33d221,{options:_0x59c524,args:_0x3bbf1e,tdx:_0x5434c8}=_0x4b59c6,_0x21459e=_0x3bbf1e[0x0];if(!_0x21459e)return console[_0x4736f1(0x1bf)](_0x4736f1(0x18b)),console[_0x4736f1(0x1bf)](_0x4736f1(0x1d9)),console[_0x4736f1(0x1bf)](_0x4736f1(0x1b9)),console[_0x4736f1(0x1bf)]('Examples:'),console[_0x4736f1(0x1bf)](_0x4736f1(0x1ae)),console[_0x4736f1(0x1bf)](_0x4736f1(0x1fd)),0x1;try{const _0x5e8dba=_0x59c524[_0x4736f1(0x1c2)],_0x22eb9c=await resolveSegmentTarget(_0x21459e,_0x5e8dba,_0x59c524[_0x4736f1(0x195)]);_0x59c524[_0x4736f1(0x195)]&&console[_0x4736f1(0x1bf)](_0x4736f1(0x1f4)+_0x22eb9c);const _0x518853=await withSpinner('Resolving\x20\x27'+_0x21459e+_0x4736f1(0x18d),()=>_0x5434c8[_0x4736f1(0x184)]['resolvePathToResource'](_0x22eb9c),{'verbose':_0x59c524[_0x4736f1(0x195)]}),_0x8fdc96=_0x518853[_0x4736f1(0x199)];_0x59c524[_0x4736f1(0x195)]&&(console[_0x4736f1(0x1bf)]('Resolved\x20type:\x20'+_0x8fdc96['type']),console['error'](_0x4736f1(0x187)+_0x8fdc96[_0x4736f1(0x1dc)]));if(_0x8fdc96[_0x4736f1(0x18c)]===_0x4736f1(0x1f9))return console[_0x4736f1(0x1bf)](_0x4736f1(0x1e8)),console[_0x4736f1(0x1bf)](_0x4736f1(0x173)),0x1;if(_0x8fdc96[_0x4736f1(0x18c)]===_0x4736f1(0x1de))return console[_0x4736f1(0x1bf)](_0x4736f1(0x1c6)),console['error']('Use:\x20tdx\x20ps\x20show'),0x1;if(!_0x8fdc96['segmentId'])throw new SDKError(ErrorCode[_0x4736f1(0x186)],_0x4736f1(0x198));const _0x1a9672=await withSpinner(_0x4736f1(0x16f),()=>_0x5434c8[_0x4736f1(0x184)][_0x4736f1(0x19c)](_0x8fdc96[_0x4736f1(0x1dc)],_0x8fdc96[_0x4736f1(0x167)]),{'verbose':_0x59c524[_0x4736f1(0x195)]});let _0xa2f2ad=_0x1a9672['data'];const _0x5f0e7b=resolveLimit(_0x59c524[_0x4736f1(0x194)],DEFAULT_DISPLAY_LIMIT),_0x5ddbfe=/\bLIMIT\s+\d+/i[_0x4736f1(0x17a)](_0xa2f2ad);!_0x5ddbfe&&(_0xa2f2ad=_0xa2f2ad['trim']()[_0x4736f1(0x1ce)](/;+$/,''),_0xa2f2ad='SELECT\x20*\x20FROM\x20(\x0a'+_0xa2f2ad+_0x4736f1(0x193)+_0x5f0e7b);_0x59c524[_0x4736f1(0x195)]&&console[_0x4736f1(0x1bf)]('SQL\x20query:\x0a'+_0xa2f2ad);const _0x299a75=await withProgressSpinner(_0x4736f1(0x1aa),async _0xd92ea7=>{const _0x50ba95=_0x4736f1,_0x554ff7=await _0x5434c8[_0x50ba95(0x161)]['execute'](_0xa2f2ad,{'catalog':'td','schema':_0x50ba95(0x16a),'onJobId':_0x561ce4=>{const _0x52cb00=_0x50ba95;_0xd92ea7[_0x52cb00(0x190)](_0x561ce4);}});return _0x554ff7;},{'verbose':_0x59c524[_0x4736f1(0x195)]}),_0x3fb9d4=_0x299a75[_0x4736f1(0x199)],_0x3202db=_0x3fb9d4['jobId']?_0x4736f1(0x1ac)+_0x3fb9d4[_0x4736f1(0x1ee)]+']':'';return console[_0x4736f1(0x1bf)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x3fb9d4[_0x4736f1(0x168)][_0x4736f1(0x1f6)][_0x4736f1(0x16b)]()+'\x20rows\x20'+(_0x4736f1(0x162)+formatElapsed(_0x3fb9d4[_0x4736f1(0x168)]['elapsedTimeMillis'])+_0x3202db)),await handleQueryOutput(_0x3fb9d4,_0x59c524),0x0;}catch(_0x2a9dbd){if(_0x2a9dbd instanceof SDKError)return console[_0x4736f1(0x1bf)](_0x4736f1(0x1bc)+_0x2a9dbd[_0x4736f1(0x1fc)]+']'),console[_0x4736f1(0x1bf)]('\x0a'+_0x2a9dbd[_0x4736f1(0x185)]),0x1;throw _0x2a9dbd;}}}export class SegmentFolderListCommand extends BaseCommand{[a27_0x33d221(0x1d5)]=a27_0x33d221(0x1cf);[a27_0x33d221(0x1f8)]='List\x20segment\x20folders\x20under\x20a\x20parent\x20segment';async[a27_0x33d221(0x1af)](_0xb775f7){const _0x568a2d=a27_0x33d221,{options:_0x4968f6,args:_0x523130,tdx:_0x5f5a99}=_0xb775f7;if(_0x523130[_0x568a2d(0x1fa)]===0x0)return console['error']('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console['error'](_0x568a2d(0x182)),0x1;const _0x354b4d=_0x523130[0x0];try{_0x4968f6[_0x568a2d(0x195)]&&(console['error'](_0x568a2d(0x1ad)+_0x4968f6[_0x568a2d(0x1f3)]),console[_0x568a2d(0x1bf)](_0x568a2d(0x17f)+_0x354b4d));const _0x2f93c9=await withSpinner(_0x568a2d(0x1f5)+_0x354b4d+_0x568a2d(0x18d),()=>_0x5f5a99[_0x568a2d(0x184)][_0x568a2d(0x1c7)](_0x354b4d),{'verbose':_0x4968f6['verbose']}),_0x4b716e=_0x2f93c9[_0x568a2d(0x199)];_0x4968f6[_0x568a2d(0x195)]&&console['error'](_0x568a2d(0x1d7)+_0x4b716e);const _0x574c1c=await withSpinner(_0x568a2d(0x1e0)+_0x354b4d+_0x568a2d(0x18d),()=>_0x5f5a99[_0x568a2d(0x184)][_0x568a2d(0x1d3)](_0x4b716e),{'verbose':_0x4968f6[_0x568a2d(0x195)]}),_0x448864=_0x574c1c[_0x568a2d(0x199)];return console[_0x568a2d(0x1bf)](_0x568a2d(0x1e7)+_0x448864[_0x568a2d(0x1fa)]+_0x568a2d(0x1d8)+(_0x448864[_0x568a2d(0x1fa)]!==0x1?'s':'')),await handleSDKOutput(_0x448864,_0x4968f6),0x0;}catch(_0x54e0dc){if(_0x54e0dc instanceof SDKError)return console[_0x568a2d(0x1bf)](_0x568a2d(0x1b5)+_0x54e0dc[_0x568a2d(0x185)]),_0x54e0dc[_0x568a2d(0x1cb)]&&console[_0x568a2d(0x1bf)]('\x20\x20Cause:\x20'+_0x54e0dc[_0x568a2d(0x1cb)]),0x1;throw _0x54e0dc;}}}export class SegmentFolderShowCommand extends BaseCommand{['name']='segment:folder:show';[a27_0x33d221(0x1f8)]=a27_0x33d221(0x172);async[a27_0x33d221(0x1af)](_0x37e69c){const _0x2b6d2e=a27_0x33d221,{options:_0x4a3fa9,args:_0xde411b,tdx:_0x2cd722}=_0x37e69c;if(_0xde411b[_0x2b6d2e(0x1fa)]===0x0)return console[_0x2b6d2e(0x1bf)](_0x2b6d2e(0x1b1)),console['error'](_0x2b6d2e(0x1e3)),0x1;try{const {parentId:_0x3303df,childId:_0x474ba3}=parseSegmentRef(_0xde411b[0x0]);_0x4a3fa9[_0x2b6d2e(0x195)]&&(console[_0x2b6d2e(0x1bf)](_0x2b6d2e(0x1ad)+_0x4a3fa9['site']),console[_0x2b6d2e(0x1bf)]('Parent\x20name:\x20'+_0x3303df),_0x474ba3&&console[_0x2b6d2e(0x1bf)](_0x2b6d2e(0x188)+_0x474ba3));if(!_0x474ba3)return console[_0x2b6d2e(0x1bf)]('Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)'),0x1;const _0x2c857d=await withSpinner(_0x2b6d2e(0x1f5)+_0x3303df+_0x2b6d2e(0x18d),()=>_0x2cd722[_0x2b6d2e(0x184)][_0x2b6d2e(0x1c7)](_0x3303df),{'verbose':_0x4a3fa9[_0x2b6d2e(0x195)]}),_0x3d79ff=_0x2c857d[_0x2b6d2e(0x199)];_0x4a3fa9[_0x2b6d2e(0x195)]&&console[_0x2b6d2e(0x1bf)](_0x2b6d2e(0x1d7)+_0x3d79ff);const _0x365c34=await withSpinner(_0x2b6d2e(0x1b3)+_0x474ba3+_0x2b6d2e(0x18d),()=>_0x2cd722[_0x2b6d2e(0x184)]['resolveFolderId'](_0x3d79ff,_0x474ba3),{'verbose':_0x4a3fa9[_0x2b6d2e(0x195)]}),_0x691909=_0x365c34[_0x2b6d2e(0x199)];_0x4a3fa9[_0x2b6d2e(0x195)]&&console[_0x2b6d2e(0x1bf)](_0x2b6d2e(0x192)+_0x691909);const _0x31c9c4=await withSpinner(_0x2b6d2e(0x1f0)+_0x474ba3+_0x2b6d2e(0x18d),()=>_0x2cd722[_0x2b6d2e(0x184)][_0x2b6d2e(0x18f)](_0x691909),{'verbose':_0x4a3fa9[_0x2b6d2e(0x195)]});return await handleSDKOutput([_0x31c9c4[_0x2b6d2e(0x199)]],_0x4a3fa9),0x0;}catch(_0x5ce4e1){if(_0x5ce4e1 instanceof SDKError)return console['error'](_0x2b6d2e(0x1b5)+_0x5ce4e1[_0x2b6d2e(0x185)]),_0x5ce4e1['cause']&&console['error']('\x20\x20Cause:\x20'+_0x5ce4e1['cause']),0x1;throw _0x5ce4e1;}}}export class SegmentSQLCommand extends BaseCommand{[a27_0x33d221(0x1d5)]=a27_0x33d221(0x1e6);[a27_0x33d221(0x1f8)]=a27_0x33d221(0x18e);async[a27_0x33d221(0x1af)](_0x1dfa9e){const _0x3148a0=a27_0x33d221,{options:_0x1baae2,args:_0x1f9b86,tdx:_0x584342}=_0x1dfa9e,_0x1dc011=_0x1f9b86[0x0];if(!_0x1dc011)return console['error'](_0x3148a0(0x18b)),console[_0x3148a0(0x1bf)](_0x3148a0(0x1c1)),console[_0x3148a0(0x1bf)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20<path/to/segment.yml>'),console[_0x3148a0(0x1bf)]('Examples:'),console[_0x3148a0(0x1bf)](_0x3148a0(0x1c8)),console[_0x3148a0(0x1bf)](_0x3148a0(0x191)),0x1;try{const _0x2d5b08=_0x1baae2['parentSegment'],_0x507762=await resolveSegmentTarget(_0x1dc011,_0x2d5b08,_0x1baae2[_0x3148a0(0x195)]);_0x1baae2[_0x3148a0(0x195)]&&console[_0x3148a0(0x1bf)](_0x3148a0(0x1f4)+_0x507762);const _0xe38a21=await withSpinner('Resolving\x20\x27'+_0x1dc011+_0x3148a0(0x18d),()=>_0x584342[_0x3148a0(0x184)]['resolvePathToResource'](_0x507762),{'verbose':_0x1baae2['verbose']}),_0x2d724e=_0xe38a21['data'];_0x1baae2[_0x3148a0(0x195)]&&(console['error'](_0x3148a0(0x1b8)+_0x2d724e['type']),console[_0x3148a0(0x1bf)]('Parent\x20ID:\x20'+_0x2d724e[_0x3148a0(0x1dc)]));if(_0x2d724e['type']===_0x3148a0(0x1f9))return console['error'](_0x3148a0(0x171)),console['error']('Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.'),0x1;if(_0x2d724e[_0x3148a0(0x18c)]===_0x3148a0(0x1de))return console['error'](_0x3148a0(0x19e)),console[_0x3148a0(0x1bf)]('Use:\x20tdx\x20ps\x20sql'),0x1;if(!_0x2d724e[_0x3148a0(0x167)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x3148a0(0x198));const _0x1b1802=await withSpinner(_0x3148a0(0x16f),()=>_0x584342[_0x3148a0(0x184)][_0x3148a0(0x19c)](_0x2d724e[_0x3148a0(0x1dc)],_0x2d724e['segmentId']),{'verbose':_0x1baae2[_0x3148a0(0x195)]}),_0xefed20=_0x1b1802[_0x3148a0(0x199)];return _0x1baae2['format']===_0x3148a0(0x1ba)||_0x1baae2[_0x3148a0(0x197)]===_0x3148a0(0x178)?await handleSDKOutput([{'sql':_0xefed20}],_0x1baae2):console[_0x3148a0(0x19f)](_0xefed20),0x0;}catch(_0x61d0b5){if(_0x61d0b5 instanceof SDKError)return console[_0x3148a0(0x1bf)](_0x3148a0(0x1b5)+_0x61d0b5[_0x3148a0(0x185)]),_0x61d0b5[_0x3148a0(0x1cb)]&&console[_0x3148a0(0x1bf)](_0x3148a0(0x1cc)+_0x61d0b5[_0x3148a0(0x1cb)]),0x1;throw _0x61d0b5;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a27_0x33d221(0x1d5)]=a27_0x33d221(0x176);[a27_0x33d221(0x1f8)]=a27_0x33d221(0x16e);async[a27_0x33d221(0x1af)](_0x3c01a8){const _0x23198c=a27_0x33d221,{options:_0x9e7344,args:_0xc74325,tdx:_0x3f52ee}=_0x3c01a8,_0x115488=_0x9e7344;if(_0xc74325['length']<0x2)return console[_0x23198c(0x1bf)](_0x23198c(0x1a7)),console['error']('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0x3882ab=_0xc74325[0x0],_0x38d61c=_0xc74325[0x1];_0x115488[_0x23198c(0x195)]&&(console[_0x23198c(0x1bf)]('Site:\x20'+_0x115488[_0x23198c(0x1f3)]),console[_0x23198c(0x1bf)](_0x23198c(0x17c)+_0x3882ab),console[_0x23198c(0x1bf)]('Folder\x20name:\x20'+_0x38d61c));let _0x10de23;if(_0x115488[_0x23198c(0x1d6)]){const _0x2e0913=_0x115488[_0x23198c(0x1d6)],_0x2046e9=await withSpinner(_0x23198c(0x1f5)+_0x3882ab+_0x23198c(0x18d),()=>_0x3f52ee['segment']['resolveParentId'](_0x3882ab),{'verbose':_0x115488[_0x23198c(0x195)]}),_0x5055d5=_0x2046e9[_0x23198c(0x199)],_0x2b4c26=await withSpinner(_0x23198c(0x16c)+_0x2e0913+_0x23198c(0x18d),()=>_0x3f52ee['segment'][_0x23198c(0x1e5)](_0x5055d5,_0x2e0913),{'verbose':_0x115488[_0x23198c(0x195)]});_0x10de23=_0x2b4c26[_0x23198c(0x199)],_0x115488['verbose']&&console[_0x23198c(0x1bf)](_0x23198c(0x1b6)+_0x10de23);}const _0x41e1f5={'name':_0x38d61c,'description':_0x115488['description'],'parentFolderId':_0x10de23},_0x52bf80=await withSpinner(_0x23198c(0x1be)+_0x38d61c+_0x23198c(0x18d),()=>_0x3f52ee[_0x23198c(0x184)]['createFolder'](_0x3882ab,_0x41e1f5),{'verbose':_0x115488[_0x23198c(0x195)]}),_0x53650c=_0x52bf80[_0x23198c(0x199)];return console[_0x23198c(0x1bf)](_0x23198c(0x1dd)+_0x53650c['name']+_0x23198c(0x1d0)+_0x53650c['id']),await handleSDKOutput([_0x53650c],_0x115488),0x0;}}export class SegmentViewCommand extends BaseCommand{[a27_0x33d221(0x1d5)]=a27_0x33d221(0x1b2);[a27_0x33d221(0x1f8)]=a27_0x33d221(0x1a8);async[a27_0x33d221(0x1af)](_0x5d62ce){const _0x4c5596=a27_0x33d221,{options:_0x4cfb30,args:_0x11130e,tdx:_0x98ca9b}=_0x5d62ce,_0x4b87e2=_0x11130e[0x0];if(!_0x4b87e2)return console[_0x4c5596(0x1bf)](_0x4c5596(0x196)),console[_0x4c5596(0x1bf)](_0x4c5596(0x1fb)),console[_0x4c5596(0x1bf)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>'),console[_0x4c5596(0x1bf)](_0x4c5596(0x1b7)),console[_0x4c5596(0x1bf)]('\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser'),console[_0x4c5596(0x1bf)](_0x4c5596(0x1c3)),console[_0x4c5596(0x1bf)](_0x4c5596(0x16d)),console['error'](_0x4c5596(0x1a1)),console['error'](_0x4c5596(0x17e)),console[_0x4c5596(0x1bf)](_0x4c5596(0x1e2)),0x1;try{const _0x2340bb=_0x4cfb30['parentSegment'],_0x2eb22d=await resolveSegmentTarget(_0x4b87e2,_0x2340bb,_0x4cfb30['verbose']);_0x4cfb30[_0x4c5596(0x195)]&&console[_0x4c5596(0x1bf)](_0x4c5596(0x1f4)+_0x2eb22d);const _0xb3c967=await withSpinner(_0x4c5596(0x1ff)+_0x4b87e2+'\x27...',()=>_0x98ca9b[_0x4c5596(0x184)]['resolvePathToResource'](_0x2eb22d),{'verbose':_0x4cfb30['verbose']}),_0x553af8=_0xb3c967[_0x4c5596(0x199)];_0x4cfb30[_0x4c5596(0x195)]&&(console[_0x4c5596(0x1bf)](_0x4c5596(0x1b8)+_0x553af8[_0x4c5596(0x18c)]),console[_0x4c5596(0x1bf)](_0x4c5596(0x187)+_0x553af8[_0x4c5596(0x1dc)]),_0x553af8[_0x4c5596(0x1ab)]&&console[_0x4c5596(0x1bf)](_0x4c5596(0x1cd)+_0x553af8[_0x4c5596(0x1ab)]),_0x553af8[_0x4c5596(0x167)]&&console[_0x4c5596(0x1bf)](_0x4c5596(0x19d)+_0x553af8['segmentId']));if(_0x4cfb30[_0x4c5596(0x1a3)]){if(_0x553af8[_0x4c5596(0x18c)]===_0x4c5596(0x1f9))return console[_0x4c5596(0x1bf)](_0x4c5596(0x1bd)),0x1;if(_0x553af8[_0x4c5596(0x18c)]===_0x4c5596(0x1de))return console[_0x4c5596(0x1bf)](_0x4c5596(0x1fe)),console[_0x4c5596(0x1bf)]('Use:\x20tdx\x20ps\x20view\x20-w'),0x1;if(!_0x553af8['segmentId'])throw new SDKError(ErrorCode[_0x4c5596(0x186)],_0x4c5596(0x198));const _0x1c37af=getConsoleNextUrl(_0x4cfb30[_0x4c5596(0x1f3)],_0x4c5596(0x1b4)+_0x553af8[_0x4c5596(0x1dc)]+_0x4c5596(0x170)+_0x553af8[_0x4c5596(0x167)]);return console['error'](a27_0x2106e2[_0x4c5596(0x1b0)]('✔')+_0x4c5596(0x177)+a27_0x2106e2[_0x4c5596(0x19a)](_0x1c37af)),openBrowser(_0x1c37af),0x0;}if(_0x553af8['type']===_0x4c5596(0x1f9)){if(!_0x553af8[_0x4c5596(0x1ab)])throw new SDKError(ErrorCode[_0x4c5596(0x1ec)],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x74dfda=await withSpinner(_0x4c5596(0x1d2),()=>_0x98ca9b['segment'][_0x4c5596(0x18f)](_0x553af8[_0x4c5596(0x1ab)]),{'verbose':_0x4cfb30[_0x4c5596(0x195)]});await handleSingleObjectOutput(_0x74dfda['data'],_0x4cfb30);}else{if(_0x553af8['type']===_0x4c5596(0x184)){if(!_0x553af8[_0x4c5596(0x167)])throw new SDKError(ErrorCode[_0x4c5596(0x186)],_0x4c5596(0x198));const _0x31ac84=await withSpinner(_0x4c5596(0x1d1),()=>_0x98ca9b[_0x4c5596(0x184)][_0x4c5596(0x1ed)](_0x553af8[_0x4c5596(0x1dc)],_0x553af8['segmentId']),{'verbose':_0x4cfb30[_0x4c5596(0x195)]}),_0x2e2cc7=getConsoleNextUrl(_0x4cfb30[_0x4c5596(0x1f3)],'/app/ps/'+_0x553af8[_0x4c5596(0x1dc)]+_0x4c5596(0x170)+_0x553af8[_0x4c5596(0x167)]),_0x4f8472=_0x31ac84[_0x4c5596(0x199)];_0x4f8472['url']=_0x2e2cc7,await handleSingleObjectOutput(_0x4f8472,_0x4cfb30);}else return console[_0x4c5596(0x1bf)](_0x4c5596(0x1c4)),console['error']('Use:\x20tdx\x20ps\x20view'),0x1;}return 0x0;}catch(_0x305b99){if(_0x305b99 instanceof SDKError)return console['error'](_0x4c5596(0x1b5)+_0x305b99['message']),_0x305b99[_0x4c5596(0x1cb)]&&console[_0x4c5596(0x1bf)](_0x4c5596(0x1cc)+_0x305b99['cause']),0x1;throw _0x305b99;}}}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{['name']=a27_0x33d221(0x183);[a27_0x33d221(0x1f8)]='Show\x20child\x20segment\x20schema\x20(column\x20types)';async[a27_0x33d221(0x1af)](_0x3806fa){const _0x3fc7da=a27_0x33d221,{options:_0x14e0a6,args:_0x3de85c,tdx:_0x27895c}=_0x3806fa,_0x4c9151=_0x3de85c[0x0];if(!_0x4c9151)return console[_0x3fc7da(0x1bf)](_0x3fc7da(0x18b)),console[_0x3fc7da(0x1bf)](_0x3fc7da(0x1a0)),console[_0x3fc7da(0x1bf)](_0x3fc7da(0x17b)),console[_0x3fc7da(0x1bf)]('Examples:'),console[_0x3fc7da(0x1bf)](_0x3fc7da(0x1c5)),console[_0x3fc7da(0x1bf)]('\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x4c21ee=_0x14e0a6[_0x3fc7da(0x1c2)],_0xfee2c0=await resolveSegmentTarget(_0x4c9151,_0x4c21ee,_0x14e0a6[_0x3fc7da(0x195)]);_0x14e0a6[_0x3fc7da(0x195)]&&console[_0x3fc7da(0x1bf)](_0x3fc7da(0x1f4)+_0xfee2c0);const _0x2d20c2=await withSpinner(_0x3fc7da(0x1ff)+_0x4c9151+_0x3fc7da(0x18d),()=>_0x27895c[_0x3fc7da(0x184)][_0x3fc7da(0x1e9)](_0xfee2c0),{'verbose':_0x14e0a6[_0x3fc7da(0x195)]}),_0x2b1e14=_0x2d20c2[_0x3fc7da(0x199)];_0x14e0a6['verbose']&&(console['error']('Resolved\x20type:\x20'+_0x2b1e14[_0x3fc7da(0x18c)]),console[_0x3fc7da(0x1bf)]('Parent\x20ID:\x20'+_0x2b1e14['parentId']));if(_0x2b1e14[_0x3fc7da(0x18c)]===_0x3fc7da(0x1f9))return console['error'](_0x3fc7da(0x1df)),console['error'](_0x3fc7da(0x19b)),0x1;if(_0x2b1e14[_0x3fc7da(0x18c)]===_0x3fc7da(0x1de))return console['error'](_0x3fc7da(0x1a2)),console['error']('Use:\x20tdx\x20ps\x20desc'),0x1;if(!_0x2b1e14[_0x3fc7da(0x167)])throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x39ddfa=await withSpinner(_0x3fc7da(0x16f),()=>_0x27895c[_0x3fc7da(0x184)][_0x3fc7da(0x19c)](_0x2b1e14[_0x3fc7da(0x1dc)],_0x2b1e14['segmentId']),{'verbose':_0x14e0a6[_0x3fc7da(0x195)]}),_0x19e16b=_0x39ddfa[_0x3fc7da(0x199)],_0x17c826=await executeSchemaQuery(_0x19e16b,_0x27895c,_0x14e0a6);return await handleQueryOutput(_0x17c826,_0x14e0a6),0x0;}catch(_0x58f8cd){if(_0x58f8cd instanceof SDKError)return console['error']('Error:\x20'+_0x58f8cd[_0x3fc7da(0x185)]),_0x58f8cd['cause']&&console[_0x3fc7da(0x1bf)](_0x3fc7da(0x1cc)+_0x58f8cd[_0x3fc7da(0x1cb)]),0x1;throw _0x58f8cd;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a28_0x5371(_0x1b1ddb,_0x558c90){_0x1b1ddb=_0x1b1ddb-0x1be;const _0x3e5865=a28_0x3e58();let _0x53710e=_0x3e5865[_0x1b1ddb];return _0x53710e;}const a28_0x202747=a28_0x5371;(function(_0x15d785,_0x2be972){const _0x2fdb3e=a28_0x5371,_0x395c48=_0x15d785();while(!![]){try{const _0x2886a7=-parseInt(_0x2fdb3e(0x1d9))/0x1+-parseInt(_0x2fdb3e(0x1e4))/0x2+parseInt(_0x2fdb3e(0x1d2))/0x3+-parseInt(_0x2fdb3e(0x1c8))/0x4*(-parseInt(_0x2fdb3e(0x1d7))/0x5)+parseInt(_0x2fdb3e(0x1d6))/0x6+-parseInt(_0x2fdb3e(0x1c7))/0x7*(parseInt(_0x2fdb3e(0x1f3))/0x8)+parseInt(_0x2fdb3e(0x1cc))/0x9;if(_0x2886a7===_0x2be972)break;else _0x395c48['push'](_0x395c48['shift']());}catch(_0x12afb6){_0x395c48['push'](_0x395c48['shift']());}}}(a28_0x3e58,0x9fea2));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a28_0x3e58(){const _0x3c816f=['11168NVmwft','resolveFolderId','Create\x20child\x20segment\x20with\x20filtering\x20rules','resolvePathToResource','11476503qrwxys','segment:create','Segment\x20name:\x20','data','Target\x20path:\x20','invisible','2848662fBgGiP','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','segment','1687428BZrwjd','2285mBtuEO','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','924361LKNyCZ','resolveParentId','createSegment','folder','site','error','type','Resolved\x20relative\x20path\x20to:\x20','✔\x20Created\x20segment\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','yellow','2070490tuqroA','noCountPopulation','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','\x27...','Resolving\x20folder\x20\x27','execute','verbose','Resolving\x20parent\x20segment\x20\x27','Examples:','Resolved\x20folder\x20ID:\x20','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','ruleFile','description','10648nHZgPS','includes','kind','segments','\x27\x20with\x20ID:\x20','parent','Site:\x20','⚠\x20Deprecation\x20warning:\x20`segment\x20create`\x20is\x20deprecated.','rule','length','6139JuCXFR'];a28_0x3e58=function(){return _0x3c816f;};return a28_0x3e58();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../sdk/segment/segment-path-parser.js';import a28_0x4cd7f1 from'chalk';export class SegmentCreateCommand extends BaseCommand{['name']=a28_0x202747(0x1cd);[a28_0x202747(0x1f2)]=a28_0x202747(0x1ca);async[a28_0x202747(0x1ea)](_0x3806f6){const _0x5eccc2=a28_0x202747;console['error'](a28_0x4cd7f1[_0x5eccc2(0x1e3)](_0x5eccc2(0x1c4))),console[_0x5eccc2(0x1de)](a28_0x4cd7f1[_0x5eccc2(0x1e3)](_0x5eccc2(0x1e6)));const {options:_0x2dd219,args:_0x2bad61,tdx:_0x42dd47}=_0x3806f6,_0x4093f7=_0x2dd219;if(_0x2bad61[_0x5eccc2(0x1c6)]===0x0)return console[_0x5eccc2(0x1de)](_0x5eccc2(0x1e2)),console[_0x5eccc2(0x1de)](_0x5eccc2(0x1f0)),console['error'](_0x5eccc2(0x1ed)),console[_0x5eccc2(0x1de)](_0x5eccc2(0x1d3)),console['error'](_0x5eccc2(0x1ef)),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x2dcfb8=_0x2bad61[0x0],_0x3c7c28=_0x2dd219['segmentPath'];let _0x73253d=_0x2dcfb8;_0x3c7c28&&!_0x2dcfb8[_0x5eccc2(0x1be)]('/')&&(_0x73253d=_0x3c7c28+'/'+_0x2dcfb8,_0x4093f7['verbose']&&console['error'](_0x5eccc2(0x1e0)+_0x73253d));const _0x4ea8a7=parsePath(_0x73253d);if(_0x4ea8a7['segments'][_0x5eccc2(0x1c6)]<0x2)return console[_0x5eccc2(0x1de)](_0x5eccc2(0x1e7)),console['error'](_0x5eccc2(0x1d4)),0x1;const _0x2b5d47=_0x4ea8a7[_0x5eccc2(0x1c0)][0x0],_0x384b1f=getBaseName(_0x73253d),_0x159a22=getParentPath(_0x73253d);_0x4093f7[_0x5eccc2(0x1eb)]&&(console[_0x5eccc2(0x1de)](_0x5eccc2(0x1c3)+_0x4093f7[_0x5eccc2(0x1dd)]),console[_0x5eccc2(0x1de)](_0x5eccc2(0x1d0)+_0x73253d),console['error']('Parent:\x20'+_0x2b5d47),console['error'](_0x5eccc2(0x1ce)+_0x384b1f),console[_0x5eccc2(0x1de)]('Parent\x20path:\x20'+_0x159a22));const _0x3b9e0a=await withSpinner(_0x5eccc2(0x1ec)+_0x2b5d47+_0x5eccc2(0x1e8),()=>_0x42dd47[_0x5eccc2(0x1d5)][_0x5eccc2(0x1da)](_0x2b5d47),{'verbose':_0x4093f7[_0x5eccc2(0x1eb)]}),_0x90df81=_0x3b9e0a[_0x5eccc2(0x1cf)];let _0x50fd00;if(_0x4ea8a7[_0x5eccc2(0x1c0)][_0x5eccc2(0x1c6)]>0x2){const _0x218fad=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x159a22+_0x5eccc2(0x1e8),()=>_0x42dd47['segment'][_0x5eccc2(0x1cb)](_0x159a22),{'verbose':_0x4093f7[_0x5eccc2(0x1eb)]}),_0x149397=_0x218fad[_0x5eccc2(0x1cf)];if(_0x149397[_0x5eccc2(0x1df)]!==_0x5eccc2(0x1dc)&&_0x149397[_0x5eccc2(0x1df)]!==_0x5eccc2(0x1c2))return console[_0x5eccc2(0x1de)](_0x5eccc2(0x1d8)),0x1;_0x50fd00=_0x149397['folderId'];}else{if(_0x4093f7[_0x5eccc2(0x1dc)]){const _0x443354=await withSpinner(_0x5eccc2(0x1e9)+_0x4093f7[_0x5eccc2(0x1dc)]+_0x5eccc2(0x1e8),()=>_0x42dd47[_0x5eccc2(0x1d5)][_0x5eccc2(0x1c9)](_0x90df81,_0x4093f7['folder']),{'verbose':_0x4093f7[_0x5eccc2(0x1eb)]});_0x50fd00=_0x443354[_0x5eccc2(0x1cf)];}}_0x4093f7[_0x5eccc2(0x1eb)]&&_0x50fd00&&console['error'](_0x5eccc2(0x1ee)+_0x50fd00);const _0x4824f5=await loadJSONFromOptions(_0x4093f7[_0x5eccc2(0x1c5)],_0x4093f7[_0x5eccc2(0x1f1)]),_0x4667b3={'name':_0x384b1f,'description':_0x4093f7[_0x5eccc2(0x1f2)],'rule':_0x4824f5,'kind':_0x4093f7[_0x5eccc2(0x1bf)]!==undefined?parseInt(_0x4093f7[_0x5eccc2(0x1bf)],0xa):undefined,'isVisible':_0x4093f7[_0x5eccc2(0x1d1)]?![]:undefined,'segmentFolderId':_0x50fd00,'countPopulation':_0x4093f7[_0x5eccc2(0x1e5)]?![]:undefined},_0x37e55c=await withSpinner('Creating\x20segment\x20\x27'+_0x384b1f+_0x5eccc2(0x1e8),()=>_0x42dd47['segment'][_0x5eccc2(0x1db)](_0x90df81,_0x4667b3),{'verbose':_0x4093f7['verbose']}),_0x161add=_0x37e55c[_0x5eccc2(0x1cf)];return console[_0x5eccc2(0x1de)](_0x5eccc2(0x1e1)+_0x161add['name']+_0x5eccc2(0x1c1)+_0x161add['id']),_0x73253d!==_0x2dcfb8&&console[_0x5eccc2(0x1de)]('\x20\x20\x20Path:\x20'+_0x73253d),await handleSDKOutput([_0x161add],_0x4093f7),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x11df32=a29_0x240c;(function(_0x53113c,_0x32e43d){const _0x328d67=a29_0x240c,_0x24ca0c=_0x53113c();while(!![]){try{const _0x451b75=parseInt(_0x328d67(0x1bc))/0x1*(parseInt(_0x328d67(0x1b1))/0x2)+-parseInt(_0x328d67(0x1c6))/0x3+-parseInt(_0x328d67(0x1b6))/0x4+parseInt(_0x328d67(0x1b0))/0x5*(-parseInt(_0x328d67(0x1b2))/0x6)+-parseInt(_0x328d67(0x1c5))/0x7*(-parseInt(_0x328d67(0x1cc))/0x8)+parseInt(_0x328d67(0x1b9))/0x9+parseInt(_0x328d67(0x1bd))/0xa*(parseInt(_0x328d67(0x1cd))/0xb);if(_0x451b75===_0x32e43d)break;else _0x24ca0c['push'](_0x24ca0c['shift']());}catch(_0x39f156){_0x24ca0c['push'](_0x24ca0c['shift']());}}}(a29_0x25fd,0xa535e));import{BaseCommand}from'./command.js';function a29_0x25fd(){const _0x126bcb=['Parent\x20segment:\x20','Listing\x20fields\x20for\x20\x27','15SBbzNT','8420eOfpLo','site','\x27...','jsonl','parentSegment','segment','Site:\x20','listFields','441ebGFXr','2354088SYOdwr','description','✔\x20Found\x20','data','length','List\x20available\x20fields\x20for\x20segmentation','68584qGRZvo','12661bCFgLA','verbose','error','295ZurTyG','118906GPgLnv','93606vYRnMz','segment:fields','Error:\x20Parent\x20segment\x20name\x20is\x20required','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','1638992JQTRAx','\x20field','name','3515121QvoUTx'];a29_0x25fd=function(){return _0x126bcb;};return a29_0x25fd();}function a29_0x240c(_0x6fc903,_0x5579a2){_0x6fc903=_0x6fc903-0x1b0;const _0x25fd5b=a29_0x25fd();let _0x240ca8=_0x25fd5b[_0x6fc903];return _0x240ca8;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{displayFieldsHumanReadable}from'../sdk/segment/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{[a29_0x11df32(0x1b8)]=a29_0x11df32(0x1b3);[a29_0x11df32(0x1c7)]=a29_0x11df32(0x1cb);async['execute'](_0x123b21){const _0x42bb80=a29_0x11df32,{options:_0x5b51bb,args:_0x3d54be,tdx:_0xa72ad7}=_0x123b21,_0xf9ab25=_0x3d54be[0x0]||_0x5b51bb[_0x42bb80(0x1c1)];if(!_0xf9ab25)return console[_0x42bb80(0x1cf)](_0x42bb80(0x1b4)),console[_0x42bb80(0x1cf)](_0x42bb80(0x1b5)),console[_0x42bb80(0x1cf)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;_0x5b51bb['verbose']&&(console[_0x42bb80(0x1cf)](_0x42bb80(0x1c3)+_0x5b51bb[_0x42bb80(0x1be)]),console['error'](_0x42bb80(0x1ba)+_0xf9ab25));const _0x1ba228=await withSpinner(_0x42bb80(0x1bb)+_0xf9ab25+_0x42bb80(0x1bf),()=>_0xa72ad7[_0x42bb80(0x1c2)][_0x42bb80(0x1c4)](_0xf9ab25),{'verbose':_0x5b51bb[_0x42bb80(0x1ce)]}),_0x836aa9=_0x1ba228[_0x42bb80(0x1c9)];console[_0x42bb80(0x1cf)](_0x42bb80(0x1c8)+_0x836aa9[_0x42bb80(0x1ca)]+_0x42bb80(0x1b7)+(_0x836aa9[_0x42bb80(0x1ca)]!==0x1?'s':''));if(_0x5b51bb['json']||_0x5b51bb[_0x42bb80(0x1c0)])return await handleSDKOutput(_0x836aa9,_0x5b51bb),0x0;return displayFieldsHumanReadable(_0x836aa9,_0xf9ab25),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x18b1ca=a30_0x4770;(function(_0x3e0dc3,_0x38c783){const _0x243865=a30_0x4770,_0x93ed76=_0x3e0dc3();while(!![]){try{const _0x56347a=parseInt(_0x243865(0x105))/0x1+-parseInt(_0x243865(0xfe))/0x2+-parseInt(_0x243865(0xdf))/0x3+-parseInt(_0x243865(0x115))/0x4+parseInt(_0x243865(0xf4))/0x5*(-parseInt(_0x243865(0xd2))/0x6)+parseInt(_0x243865(0xd9))/0x7+parseInt(_0x243865(0x10c))/0x8*(parseInt(_0x243865(0xe9))/0x9);if(_0x56347a===_0x38c783)break;else _0x93ed76['push'](_0x93ed76['shift']());}catch(_0x2de4c5){_0x93ed76['push'](_0x93ed76['shift']());}}}(a30_0x2110,0x36a78));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a30_0x2110(){const _0x244872=['Aborted.','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','journeys','\x20=\x20','12498keyzQb','\x20\x20🗺️\x20\x20','\x20segments','parent_segment','\x20activations','cyan','site','150878DGGYgT','green','resourceName','dim','content','length','991563XeVIpv','\x20unchanged\x20files','\x20with\x20','\x0aChanges\x20to\x20\x27','\x0aPull\x20summary\x20for\x20\x27','\x20new\x20files','✔\x20Context\x20set:\x20','parentSegment','✔\x20All\x20files\x20are\x20up\x20to\x20date','segment:pull','4261833RhjTpX','segment','yellow','file','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','\x20journeys','Write\x20','message','targetDir','Pulling\x20segments\x20from\x20\x27','\x20files\x20to\x20','130hHhDQa','Error:\x20','description','verbose','red','filter','type','✔\x20Pulled\x20','\x27...','hasChanges','521854ADDXDk','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20changed\x20files','journeyVersions','\x20files?','error','287759kAzggF','counts','data','Target\x20resource:\x20','relativePath','Usage:\x20tdx\x20sg\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20(requires\x20context\x20or\x20tdx.json)','errorCode','16kbRhot','files','segments','\x20versions)','repeat','utf-8','cwd','dryRun','diff','1547668XYpuBn','execute','isNew','session','parentName','no_parent','helpText'];a30_0x2110=function(){return _0x244872;};return a30_0x2110();}import{confirmKey}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';import a30_0x2f6916 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a30_0x33d12c from'path';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a30_0x4770(_0x793112,_0x3d4e13){_0x793112=_0x793112-0xcb;const _0x211057=a30_0x2110();let _0x47706c=_0x211057[_0x793112];return _0x47706c;}export{buildFolderIdToPathMap as buildFolderPathMap}from'../sdk/segment/resolution-context.js';export class SegmentPullCommand extends BaseCommand{['name']=a30_0x18b1ca(0xe8);[a30_0x18b1ca(0xf6)]=a30_0x18b1ca(0xcf);async[a30_0x18b1ca(0x116)](_0x3ff699){const _0x1c02ca=a30_0x18b1ca,{options:_0xf32bbd,args:_0x556ccd,tdx:_0x4afdab}=_0x3ff699,_0x2326b0=_0xf32bbd,_0x26a836=await resolveTarget({'arg':_0x556ccd[0x0],'contextParent':_0xf32bbd[_0x1c02ca(0xe6)],'cwd':process[_0x1c02ca(0x112)]()});if(!isSuccessfulResolution(_0x26a836))return _0x26a836[_0x1c02ca(0x10b)]===_0x1c02ca(0xcc)?(console['error'](a30_0x2f6916['yellow'](_0x1c02ca(0x100))),console['error'](_0x1c02ca(0x10a)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent'),console['error'](_0x1c02ca(0xed))):(console['error'](a30_0x2f6916[_0x1c02ca(0xf8)](_0x1c02ca(0xf5)+_0x26a836[_0x1c02ca(0xf0)]+'\x0a')),_0x26a836[_0x1c02ca(0xcd)]&&console[_0x1c02ca(0x104)](a30_0x2f6916['cyan'](_0x26a836[_0x1c02ca(0xcd)]))),0x1;const _0x3749fe=_0x26a836['parentName'],_0x102922=_0x26a836[_0x1c02ca(0xf1)],_0xe4cb09=_0x26a836[_0x1c02ca(0xfa)]===_0x1c02ca(0xec)?_0x26a836[_0x1c02ca(0xdb)]:undefined;_0x2326b0['verbose']&&(console[_0x1c02ca(0x104)]('Site:\x20'+_0x2326b0[_0x1c02ca(0xd8)]),console[_0x1c02ca(0x104)]('Parent\x20segment:\x20'+_0x3749fe),_0xe4cb09&&console[_0x1c02ca(0x104)](_0x1c02ca(0x108)+_0xe4cb09));const _0x20d432=await withProgressSpinner(_0x1c02ca(0xf2)+_0x3749fe+_0x1c02ca(0xfc),_0x229800=>_0x4afdab[_0x1c02ca(0xea)]['pullSegments'](_0x3749fe,{'targetDir':_0x102922,'targetResourceName':_0xe4cb09,'verbose':_0x2326b0[_0x1c02ca(0xf7)],'progress':{'update':_0x648463=>{const _0x5839f8=_0x1c02ca;_0x229800['setPhase'](_0x648463),_0x2326b0[_0x5839f8(0xf7)]&&console[_0x5839f8(0x104)]('\x20\x20'+_0x648463);}}}),{'verbose':_0x2326b0[_0x1c02ca(0xf7)]}),_0x16a6b2=_0x20d432[_0x1c02ca(0x107)];if(_0x16a6b2[_0x1c02ca(0x106)]['segments']===0x0&&_0x16a6b2[_0x1c02ca(0x106)][_0x1c02ca(0xd0)]===0x0)return console[_0x1c02ca(0x104)](a30_0x2f6916[_0x1c02ca(0xeb)]('No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27'+_0x16a6b2[_0x1c02ca(0xcb)]+'\x27')),0x0;const _0x597f7c=_0x16a6b2['files'][_0x1c02ca(0xf9)](_0x1761cf=>_0x1761cf[_0x1c02ca(0x117)]),_0x48dbfd=_0x16a6b2[_0x1c02ca(0x10d)][_0x1c02ca(0xf9)](_0x299cb7=>!_0x299cb7[_0x1c02ca(0x117)]&&_0x299cb7[_0x1c02ca(0xfd)]),_0x48153a=_0x16a6b2[_0x1c02ca(0x10d)]['filter'](_0x619f89=>!_0x619f89[_0x1c02ca(0x117)]&&!_0x619f89[_0x1c02ca(0xfd)]);console[_0x1c02ca(0x104)](_0x1c02ca(0xe3)+_0x16a6b2[_0x1c02ca(0xcb)]+'\x27:'),console[_0x1c02ca(0x104)]('\x20\x20🎯\x20'+a30_0x2f6916['cyan'](_0x16a6b2['counts'][_0x1c02ca(0x10e)]+_0x1c02ca(0xd4))+_0x1c02ca(0xe1)+a30_0x2f6916['cyan'](_0x16a6b2[_0x1c02ca(0x106)]['activations']+_0x1c02ca(0xd6)));if(_0x16a6b2[_0x1c02ca(0x106)]['journeys']>0x0){const _0x5f2cb0=_0x16a6b2[_0x1c02ca(0x106)][_0x1c02ca(0x102)]>_0x16a6b2[_0x1c02ca(0x106)]['journeys']?'\x20('+_0x16a6b2['counts']['journeyVersions']+_0x1c02ca(0x10f):'';console[_0x1c02ca(0x104)](_0x1c02ca(0xd3)+a30_0x2f6916[_0x1c02ca(0xd7)](_0x16a6b2[_0x1c02ca(0x106)][_0x1c02ca(0xd0)]+_0x1c02ca(0xee))+a30_0x2f6916[_0x1c02ca(0xdc)](_0x5f2cb0));}console[_0x1c02ca(0x104)]('\x20\x20'+a30_0x2f6916[_0x1c02ca(0xda)]('+\x20'+_0x597f7c[_0x1c02ca(0xde)]+_0x1c02ca(0xe4))),console['error']('\x20\x20'+a30_0x2f6916['yellow']('~\x20'+_0x48dbfd['length']+_0x1c02ca(0x101))),console[_0x1c02ca(0x104)]('\x20\x20'+a30_0x2f6916['dim']('=\x20'+_0x48153a[_0x1c02ca(0xde)]+_0x1c02ca(0xe0))),console[_0x1c02ca(0x104)]('\x20\x20Target:\x20'+a30_0x2f6916[_0x1c02ca(0xd7)](_0x16a6b2[_0x1c02ca(0xf1)])+'\x0a');if(_0x48dbfd['length']>0x0)for(const _0x4d28de of _0x48dbfd){console[_0x1c02ca(0x104)](_0x1c02ca(0xe2)+_0x4d28de[_0x1c02ca(0x109)]+'\x27:'),console[_0x1c02ca(0x104)]('─'[_0x1c02ca(0x110)](0x3c)),console[_0x1c02ca(0x104)](_0x4d28de[_0x1c02ca(0x114)]),console[_0x1c02ca(0x104)]('─'[_0x1c02ca(0x110)](0x3c));}if(_0x2326b0[_0x1c02ca(0x113)])return console[_0x1c02ca(0x104)](a30_0x2f6916[_0x1c02ca(0xeb)](_0x1c02ca(0xff))),0x0;if(_0x597f7c[_0x1c02ca(0xde)]===0x0&&_0x48dbfd[_0x1c02ca(0xde)]===0x0)return console[_0x1c02ca(0x104)](a30_0x2f6916['green'](_0x1c02ca(0xe7))),saveSessionContext({'parent_segment':_0x16a6b2['parentName']},_0x2326b0[_0x1c02ca(0x118)]),console[_0x1c02ca(0x104)](a30_0x2f6916[_0x1c02ca(0xda)](_0x1c02ca(0xe5)+a30_0x2f6916[_0x1c02ca(0xdc)](_0x1c02ca(0xd5))+_0x1c02ca(0xd1)+a30_0x2f6916['cyan'](_0x16a6b2['parentName']))),0x0;if(!_0x2326b0['yes']){const _0x1bac63=await confirmKey(_0x1c02ca(0xef)+(_0x597f7c[_0x1c02ca(0xde)]+_0x48dbfd[_0x1c02ca(0xde)])+_0x1c02ca(0x103));if(!_0x1bac63)return console[_0x1c02ca(0x104)](_0x1c02ca(0xce)),0x1;}for(const _0x589b53 of _0x16a6b2[_0x1c02ca(0x10d)]){if(_0x589b53[_0x1c02ca(0x117)]||_0x589b53[_0x1c02ca(0xfd)]){const _0x938d69=a30_0x33d12c['dirname'](_0x589b53['absolutePath']);!existsSync(_0x938d69)&&mkdirSync(_0x938d69,{'recursive':!![]}),writeFileSync(_0x589b53['absolutePath'],_0x589b53[_0x1c02ca(0xdd)],_0x1c02ca(0x111));}}return console['error'](a30_0x2f6916[_0x1c02ca(0xda)](_0x1c02ca(0xfb)+(_0x597f7c['length']+_0x48dbfd[_0x1c02ca(0xde)])+_0x1c02ca(0xf3)+_0x16a6b2[_0x1c02ca(0xf1)])),saveSessionContext({'parent_segment':_0x16a6b2[_0x1c02ca(0xcb)]},_0x2326b0[_0x1c02ca(0x118)]),console[_0x1c02ca(0x104)](a30_0x2f6916['green'](_0x1c02ca(0xe5)+a30_0x2f6916[_0x1c02ca(0xdc)](_0x1c02ca(0xd5))+_0x1c02ca(0xd1)+a30_0x2f6916[_0x1c02ca(0xd7)](_0x16a6b2[_0x1c02ca(0xcb)]))),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x5ee0bc=a31_0x44e8;(function(_0x2e90b7,_0x856997){const _0x5a7ce4=a31_0x44e8,_0x46fbd7=_0x2e90b7();while(!![]){try{const _0x560c55=-parseInt(_0x5a7ce4(0x19f))/0x1*(parseInt(_0x5a7ce4(0x14a))/0x2)+parseInt(_0x5a7ce4(0x139))/0x3+-parseInt(_0x5a7ce4(0x151))/0x4+parseInt(_0x5a7ce4(0x119))/0x5*(parseInt(_0x5a7ce4(0x11a))/0x6)+-parseInt(_0x5a7ce4(0x160))/0x7+parseInt(_0x5a7ce4(0x113))/0x8+-parseInt(_0x5a7ce4(0x196))/0x9;if(_0x560c55===_0x856997)break;else _0x46fbd7['push'](_0x46fbd7['shift']());}catch(_0x1b8acf){_0x46fbd7['push'](_0x46fbd7['shift']());}}}(a31_0xbd6d,0x88485));function a31_0x44e8(_0x30308f,_0x35f2e4){_0x30308f=_0x30308f-0x104;const _0xbd6d42=a31_0xbd6d();let _0x44e881=_0xbd6d42[_0x30308f];return _0x44e881;}import{BaseCommand}from'./command.js';function a31_0xbd6d(){const _0x38f556=['relationships','add','/app/ps/','errorCode','file','verbose','state','Fetching\x20existing\x20activations...','Usage:\x20tdx\x20sg\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20(requires\x20context)','map','message','toUpdate','segments','\x20\x20Source:\x20','activations','\x0aPush\x20summary\x20for\x20\x27','push','changed','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','endsWith','isNew','site','red','2119056ItrZRJ','buildUserMaps','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','get','connection','journeyBundleId','listActivations','then','.yaml','updated','(Journey\x20will\x20be\x20deleted)','getJourney','cwd','yes','all','\x0a✔\x20Push\x20complete','set','7828tkHigG','.yml','Fetching\x20parent\x20segment\x20details...','Error:\x20Directory\x20not\x20found:\x20','no_parent','diff','createdSegmentIds','3215368yrarDF','Source\x20directory:\x20','createdAt','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','\x20activations]','\x20updated','listFolders','getOutputSchemaWithCache','journeys','repeat','isScoped','toDelete','Push\x20','attributes','\x20\x20\x20\x20','1586963bmcQEG','length','segment','delete','\x20to\x20create','targetDir','\x20changed','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','\x20\x20Activations:\x20','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','updatedAt','new','scopedFolderPath','name','\x20YAML\x20files\x20found','\x20deleted','Fetching\x20existing\x20journeys...','cyan','yamlConfig','journey','green','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','\x20to\x20update','\x20\x20🗺️\x20\x20Journeys:','journeyBundleName','/e/','resolveParentId','parentName','nameToId','helpText','Changes\x20to:','New\x20journey:','filePath','\x20folders\x20to\x20create','Changes\x20to\x20journey:','type','data','folderId','filter','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','deleted','segmentFolderId','dryRun','description','idToName','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20unchanged','unchanged','blue','audienceId','setPhase','\x20changes?','3041613sWRTUG','error','\x20new','New\x20segment:','getParent','list','toString','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','📁\x20','66xohtAf','dim','results','parentFolder','yellow','parent_name','\x20\x20Segments:\x20','folderPath','created','parentSegment','listSegments','Fetching\x20connections\x20for\x20name\x20resolution...','journeyId','\x20created','user','journeysOnly','3821456afyqlP','toCreate','join','\x20to\x20delete','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','No\x20','265RZDmrR','113322ZPXFhi','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','Folders\x20to\x20create:','\x20\x20Activations:','existingJourney','Aborted.','/j/da/je','\x0aValidation\x20failed:'];a31_0xbd6d=function(){return _0x38f556;};return a31_0xbd6d();}import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a31_0x373ca4 from'chalk';import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{[a31_0x5ee0bc(0x16e)]='segment:push';[a31_0x5ee0bc(0x18d)]=a31_0x5ee0bc(0x154);async['execute'](_0x2230d9){const _0x22bf78=a31_0x5ee0bc,{options:_0x32036b,args:_0x57b215,tdx:_0x280edf}=_0x2230d9,_0x517492=_0x32036b,_0x471e76=await resolveTarget({'arg':_0x57b215[0x0],'contextParent':_0x32036b[_0x22bf78(0x10c)],'cwd':process[_0x22bf78(0x145)]()});if(!isSuccessfulResolution(_0x471e76))return _0x471e76[_0x22bf78(0x125)]===_0x22bf78(0x14e)?(console['error'](a31_0x373ca4[_0x22bf78(0x107)](_0x22bf78(0x134))),console[_0x22bf78(0x197)](_0x22bf78(0x12a)),console['error'](_0x22bf78(0x177)),console[_0x22bf78(0x197)](_0x22bf78(0x19d))):(console[_0x22bf78(0x197)](a31_0x373ca4['red']('Error:\x20'+_0x471e76[_0x22bf78(0x12c)]+'\x0a')),_0x471e76['helpText']&&console['error'](a31_0x373ca4['cyan'](_0x471e76[_0x22bf78(0x17f)]))),0x1;if(_0x471e76[_0x22bf78(0x185)]===_0x22bf78(0x108))return console['error'](a31_0x373ca4['red'](_0x22bf78(0x14d)+_0x471e76[_0x22bf78(0x165)]+'\x0a')),console[_0x22bf78(0x197)](a31_0x373ca4[_0x22bf78(0x172)](_0x22bf78(0x169))),0x1;const _0x29ea07=_0x471e76[_0x22bf78(0x17d)],_0xfcab42=_0x471e76[_0x22bf78(0x165)],_0x590ed7=_0x471e76[_0x22bf78(0x185)]===_0x22bf78(0x126)?_0x471e76[_0x22bf78(0x182)]:undefined,_0x1d6b64=getScopedDetails(_0x471e76),_0x3d9057=_0x1d6b64?.[_0x22bf78(0x15b)]??![],_0x5d8bac=_0x1d6b64?.[_0x22bf78(0x16d)]??'';if(!existsSync(_0xfcab42))return console['error'](a31_0x373ca4['red'](_0x22bf78(0x14d)+_0xfcab42+'\x0a')),console[_0x22bf78(0x197)](a31_0x373ca4['cyan'](_0x22bf78(0x169))),0x1;_0x517492['verbose']&&(console['error']('Site:\x20'+_0x517492[_0x22bf78(0x137)]),console[_0x22bf78(0x197)]('Parent\x20segment:\x20'+_0x29ea07),console[_0x22bf78(0x197)](_0x22bf78(0x152)+_0xfcab42),_0x3d9057&&console[_0x22bf78(0x197)]('Scoped\x20to\x20folder:\x20'+_0x5d8bac));const _0x378945=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x29ea07+'\x27...',()=>_0x280edf[_0x22bf78(0x162)][_0x22bf78(0x17c)](_0x29ea07),{'verbose':_0x517492[_0x22bf78(0x127)]}),_0x1be089=_0x378945[_0x22bf78(0x186)],[_0x5e532e,_0x246f79,_0x1e6f16,_0x4853f2,_0x17ca47]=await Promise[_0x22bf78(0x147)]([withSpinner(_0x22bf78(0x14c),()=>_0x280edf[_0x22bf78(0x162)][_0x22bf78(0x19a)](_0x1be089),{'verbose':_0x517492['verbose']}),withSpinner('Fetching\x20existing\x20segments...',()=>_0x280edf[_0x22bf78(0x162)][_0x22bf78(0x10d)](_0x1be089),{'verbose':_0x517492[_0x22bf78(0x127)]}),withSpinner('Fetching\x20existing\x20folders...',()=>_0x280edf['segment'][_0x22bf78(0x157)](_0x1be089),{'verbose':_0x517492[_0x22bf78(0x127)]}),withSpinner(_0x22bf78(0x171),()=>_0x280edf[_0x22bf78(0x174)]['listJourneysWithDetailsFromParentSegment'](_0x1be089,{'includeAllVersions':!![]}),{'verbose':_0x517492['verbose']}),withSpinner('Fetching\x20users\x20for\x20email\x20resolution...',()=>_0x280edf[_0x22bf78(0x111)][_0x22bf78(0x13a)](),{'verbose':_0x517492['verbose']})[_0x22bf78(0x140)](_0x48b45e=>_0x48b45e[_0x22bf78(0x186)])]),_0x2bff3b=_0x5e532e[_0x22bf78(0x186)],_0x42d128=extractRootFolderId(_0x2bff3b),_0x3b22d9=_0x246f79[_0x22bf78(0x186)],_0x496dfd=_0x1e6f16[_0x22bf78(0x186)],{journeys:_0x240785,activationStepsById:_0x23179f}=_0x4853f2[_0x22bf78(0x186)],_0x3fbc3c=new Map(_0x240785[_0x22bf78(0x12b)](_0x34aa60=>[_0x34aa60['id'],_0x34aa60])),_0x2fcee6=_0x240785[_0x22bf78(0x12b)](_0x1ca18a=>({'id':_0x1ca18a['id'],'name':_0x1ca18a[_0x22bf78(0x15e)][_0x22bf78(0x16e)],'journeyBundleName':_0x1ca18a[_0x22bf78(0x15e)][_0x22bf78(0x17a)]||'','journeyBundleId':_0x1ca18a[_0x22bf78(0x15e)][_0x22bf78(0x13e)]||'','versionNumber':_0x1ca18a[_0x22bf78(0x15e)]['versionNumber'],'description':_0x1ca18a[_0x22bf78(0x15e)]['description'],'state':_0x1ca18a[_0x22bf78(0x15e)][_0x22bf78(0x128)],'paused':_0x1ca18a[_0x22bf78(0x15e)]['paused'],'audienceId':_0x1ca18a['attributes'][_0x22bf78(0x193)],'folderId':_0x1ca18a[_0x22bf78(0x122)]?.[_0x22bf78(0x106)]?.[_0x22bf78(0x186)]?.['id'],'createdAt':_0x1ca18a[_0x22bf78(0x15e)][_0x22bf78(0x153)],'updatedAt':_0x1ca18a[_0x22bf78(0x15e)][_0x22bf78(0x16b)]})),{emailToId:_0x52f814,idToEmail:_0x362f17}=_0x17ca47,_0x89774c=await withSpinner(_0x22bf78(0x10e),async()=>{const _0xc0d07d=_0x22bf78,_0x105fee=await _0x280edf[_0xc0d07d(0x13d)][_0xc0d07d(0x19b)]();return buildConnectionMaps(_0x105fee);},{'verbose':_0x517492[_0x22bf78(0x127)]})['then'](_0x33fe21=>_0x33fe21['data']),_0x3a0280=_0x89774c[_0x22bf78(0x17e)],_0x449143=_0x89774c['idToName'],_0xf92b8d=_0x89774c['nameToType'],_0x1d194c={'emailToIdMap':_0x52f814,'connectionNameToIdMap':_0x3a0280,'connectionNameToTypeMap':_0xf92b8d,'getSchema':_0x576bd6=>_0x280edf[_0x22bf78(0x13d)][_0x22bf78(0x158)](_0x576bd6)};let {pathToId:_0x3883e6,idToPath:_0x26af44}=buildFolderMaps(_0x496dfd);const _0x20f7c0=buildSegmentLookupMap(_0x3b22d9,_0x26af44),_0x518ed1=buildSegmentNameToIdMap(_0x3b22d9),_0x5071bd=buildJourneyBundleLookupMap(_0x2fcee6,_0x26af44);let _0x2b0be7;if(_0x590ed7){if(!_0x590ed7[_0x22bf78(0x135)](_0x22bf78(0x14b))&&!_0x590ed7[_0x22bf78(0x135)](_0x22bf78(0x141)))return console[_0x22bf78(0x197)](a31_0x373ca4[_0x22bf78(0x138)](_0x22bf78(0x18f)+_0x590ed7+'\x0a')),0x1;_0x2b0be7=[_0x590ed7];}else _0x2b0be7=findYamlFiles(_0xfcab42);if(_0x2b0be7[_0x22bf78(0x161)]===0x0)return console[_0x22bf78(0x197)](a31_0x373ca4['red'](_0x22bf78(0x13b)+_0xfcab42+'\x0a')),console['error'](a31_0x373ca4['cyan'](_0x22bf78(0x16a))),0x1;let _0x3e52e0,_0x2dafc3;try{const _0x2fced8=parseAndClassifyYamlFiles(_0x2b0be7,_0xfcab42,{'skipSegments':_0x517492[_0x22bf78(0x112)]});_0x3e52e0=_0x2fced8['segments'],_0x2dafc3=_0x2fced8[_0x22bf78(0x159)];const _0xebbebb=validateParsedFiles(_0x2fced8,_0xfcab42);if(_0xebbebb['length']>0x0)return console[_0x22bf78(0x197)](a31_0x373ca4['red'](_0x22bf78(0x121))),console[_0x22bf78(0x197)](formatValidationErrors(_0xebbebb)),console[_0x22bf78(0x197)](a31_0x373ca4['yellow'](_0x22bf78(0x167))),0x1;}catch(_0x492745){return console['error'](a31_0x373ca4[_0x22bf78(0x138)]('Error\x20parsing\x20YAML:\x20'+(_0x492745 instanceof Error?_0x492745[_0x22bf78(0x12c)]:_0x492745))),0x1;}if(_0x3e52e0['length']===0x0&&_0x2dafc3[_0x22bf78(0x161)]===0x0){const _0x11efc3=_0x517492[_0x22bf78(0x112)]?_0x22bf78(0x174):'segment\x20or\x20journey';return console[_0x22bf78(0x197)](a31_0x373ca4[_0x22bf78(0x107)](_0x22bf78(0x118)+_0x11efc3+_0x22bf78(0x16f))),0x0;}const _0x31aabf=new Map();_0x3b22d9[_0x22bf78(0x161)]>0x0&&!_0x517492[_0x22bf78(0x112)]&&await withSpinner(_0x22bf78(0x129),async()=>{await batchAsync(_0x3b22d9,async _0x39ac9d=>{const _0x45f7e2=a31_0x44e8,_0x890a2=await _0x280edf[_0x45f7e2(0x162)][_0x45f7e2(0x13f)](_0x1be089,_0x39ac9d['id']);_0x31aabf[_0x45f7e2(0x149)](_0x39ac9d['id'],_0x890a2);});},{'verbose':_0x517492[_0x22bf78(0x127)]});const {segmentFiles:_0x420a70,foldersToCreate:_0x3dcf63}=await prepareSegmentFiles(_0x3e52e0,{'segmentByFolderAndName':_0x20f7c0,'activationsBySegmentId':_0x31aabf,'folderPathToId':_0x3883e6,'idToEmailMap':_0x362f17,'connectionIdToNameMap':_0x449143},_0x1d194c,_0x3d9057,_0x5d8bac),_0x561d59=_0x590ed7?[]:findSegmentsToDelete(_0x3b22d9,_0x3e52e0[_0x22bf78(0x12b)](({yamlConfig:_0x461ee0,folderPath:_0x5abc54})=>({'yamlConfig':_0x461ee0,'folderPath':resolveTDFolderPath(_0x5abc54,_0x3d9057,_0x5d8bac)})),_0x26af44,_0x5d8bac,_0x3d9057),{journeyFiles:_0x68c325,foldersToCreate:_0x5b36d8}=await withProgressSpinner('Preparing\x20journeys...',async _0x8cbdcd=>prepareJourneyFiles(_0x2dafc3,{'fetchJourney':async _0x472cb0=>_0x280edf['journey'][_0x22bf78(0x144)](_0x472cb0[_0x22bf78(0x10f)]),'journeyBundlesByFolderAndName':_0x5071bd,'folderPathToId':_0x3883e6,'idToEmailMap':_0x362f17,'connectionIdToNameMap':_0x449143,'existingSegments':_0x3b22d9,'parentId':_0x1be089,'deps':_0x280edf,'progress':{'update':_0x2ed902=>{const _0xd0afb4=_0x22bf78;_0x8cbdcd[_0xd0afb4(0x194)](_0x2ed902),_0x517492[_0xd0afb4(0x127)]&&console[_0xd0afb4(0x197)]('\x20\x20'+_0x2ed902);}},'journeyById':_0x3fbc3c,'activationStepsById':_0x23179f},_0x3d9057,_0x5d8bac),{'verbose':_0x517492[_0x22bf78(0x127)]})[_0x22bf78(0x140)](_0x1201c4=>_0x1201c4[_0x22bf78(0x186)]);for(const _0x273629 of _0x5b36d8){_0x3dcf63[_0x22bf78(0x123)](_0x273629);}const _0x490fb4=_0x590ed7?[]:findJourneysToDelete(_0x2fcee6,_0x2dafc3[_0x22bf78(0x12b)](({yamlConfig:_0x3aa248,folderPath:_0x401694})=>({'yamlConfig':_0x3aa248,'folderPath':resolveTDFolderPath(_0x401694,_0x3d9057,_0x5d8bac)})),_0x26af44,_0x5d8bac,_0x3d9057),_0x5d44ea=calculatePushStats(_0x420a70,_0x68c325,_0x3dcf63,_0x561d59,_0x490fb4,!!_0x517492[_0x22bf78(0x163)],!!_0x517492[_0x22bf78(0x112)]),_0x49e9aa=_0x5d44ea[_0x22bf78(0x12e)][_0x22bf78(0x16c)],_0x574c76=_0x5d44ea[_0x22bf78(0x12e)][_0x22bf78(0x133)],_0x9784da=_0x5d44ea[_0x22bf78(0x12e)][_0x22bf78(0x191)],_0x7701e5=_0x5d44ea[_0x22bf78(0x12e)][_0x22bf78(0x15c)],_0x49ba7b=_0x5d44ea['folders'][_0x22bf78(0x114)],_0x872ff1=_0x5d44ea[_0x22bf78(0x159)][_0x22bf78(0x16c)],_0x57661a=_0x5d44ea[_0x22bf78(0x159)][_0x22bf78(0x133)],_0x2ea0c3=_0x5d44ea[_0x22bf78(0x159)][_0x22bf78(0x191)],_0x51d55c=_0x5d44ea[_0x22bf78(0x159)][_0x22bf78(0x15c)],_0x415d57=_0x5d44ea[_0x22bf78(0x130)][_0x22bf78(0x147)],_0x40e9dd=_0x5d44ea[_0x22bf78(0x130)][_0x22bf78(0x114)],_0x588046=_0x5d44ea['activations'][_0x22bf78(0x12d)],_0xf884ec=_0x5d44ea['activations']['toDelete'];console['error'](_0x22bf78(0x131)+_0x29ea07+'\x27:');_0x49ba7b['length']>0x0&&console[_0x22bf78(0x197)]('\x20\x20'+a31_0x373ca4[_0x22bf78(0x192)](_0x22bf78(0x19e)+_0x49ba7b[_0x22bf78(0x161)]+_0x22bf78(0x183)));if(!_0x517492[_0x22bf78(0x112)]){console[_0x22bf78(0x197)]('\x20\x20📊\x20Segments:'),console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x175)]('+\x20'+_0x49e9aa[_0x22bf78(0x161)]+_0x22bf78(0x198))),console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x107)]('~\x20'+_0x574c76['length']+_0x22bf78(0x166)));if(_0x7701e5[_0x22bf78(0x161)]>0x0)console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x138)]('-\x20'+_0x7701e5[_0x22bf78(0x161)]+_0x22bf78(0x116)));else _0x561d59[_0x22bf78(0x161)]>0x0&&!_0x517492['delete']&&console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x104)](_0x561d59[_0x22bf78(0x161)]+_0x22bf78(0x176)));console[_0x22bf78(0x197)]('\x20\x20\x20\x20'+a31_0x373ca4[_0x22bf78(0x104)]('=\x20'+_0x9784da['length']+_0x22bf78(0x190)));}if(_0x68c325[_0x22bf78(0x161)]>0x0||_0x490fb4[_0x22bf78(0x161)]>0x0){console[_0x22bf78(0x197)](_0x22bf78(0x179)),console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x175)]('+\x20'+_0x872ff1['length']+'\x20new')),console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x107)]('~\x20'+_0x57661a[_0x22bf78(0x161)]+_0x22bf78(0x166)));if(_0x51d55c[_0x22bf78(0x161)]>0x0)console['error'](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x138)]('-\x20'+_0x51d55c[_0x22bf78(0x161)]+_0x22bf78(0x116)));else _0x490fb4[_0x22bf78(0x161)]>0x0&&!_0x517492[_0x22bf78(0x163)]&&console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4['dim'](_0x490fb4[_0x22bf78(0x161)]+_0x22bf78(0x176)));console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4['dim']('=\x20'+_0x2ea0c3['length']+_0x22bf78(0x190)));}_0x415d57['length']>0x0&&!_0x517492[_0x22bf78(0x112)]&&(console[_0x22bf78(0x197)](''),console['error'](_0x22bf78(0x11d)),_0x40e9dd[_0x22bf78(0x161)]>0x0&&console[_0x22bf78(0x197)]('\x20\x20\x20\x20'+a31_0x373ca4[_0x22bf78(0x175)]('+\x20'+_0x40e9dd['length']+_0x22bf78(0x164))),_0x588046['length']>0x0&&console[_0x22bf78(0x197)]('\x20\x20\x20\x20'+a31_0x373ca4['yellow']('~\x20'+_0x588046[_0x22bf78(0x161)]+_0x22bf78(0x178))),_0xf884ec[_0x22bf78(0x161)]>0x0&&console[_0x22bf78(0x197)](_0x22bf78(0x15f)+a31_0x373ca4[_0x22bf78(0x138)]('-\x20'+_0xf884ec[_0x22bf78(0x161)]+_0x22bf78(0x116))));console[_0x22bf78(0x197)](_0x22bf78(0x12f)+a31_0x373ca4['cyan'](_0xfcab42)+'\x0a');if(_0x49ba7b['length']>0x0){console[_0x22bf78(0x197)](_0x22bf78(0x11c));for(const _0x41040f of _0x49ba7b){console[_0x22bf78(0x197)]('\x20\x20'+a31_0x373ca4[_0x22bf78(0x192)]('+')+'\x20'+_0x41040f);}console[_0x22bf78(0x197)]('');}if(_0x49e9aa['length']>0x0&&!_0x517492[_0x22bf78(0x112)])for(const _0x5e849c of _0x49e9aa){const _0x110114=_0x5e849c[_0x22bf78(0x10a)]?_0x5e849c[_0x22bf78(0x10a)]+'/'+_0x5e849c[_0x22bf78(0x173)][_0x22bf78(0x16e)]:_0x5e849c['yamlConfig'][_0x22bf78(0x16e)],_0x29205f=_0x5e849c[_0x22bf78(0x173)]['activations']?.[_0x22bf78(0x161)]||0x0,_0x3531ce=_0x29205f>0x0?a31_0x373ca4[_0x22bf78(0x104)]('\x20['+_0x29205f+'\x20activations]'):'';console['error']('\x0a'+a31_0x373ca4[_0x22bf78(0x175)](_0x22bf78(0x199))+'\x20'+_0x110114+_0x3531ce),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c)),_0x5e849c[_0x22bf78(0x14f)]&&console['error'](_0x5e849c[_0x22bf78(0x14f)]),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c));}if(_0x7701e5[_0x22bf78(0x161)]>0x0&&!_0x517492[_0x22bf78(0x112)])for(const _0x5283c8 of _0x7701e5){const _0x480800=_0x5283c8[_0x22bf78(0x18b)]?_0x26af44['get'](_0x5283c8[_0x22bf78(0x18b)][_0x22bf78(0x19c)]())||'':'',_0x47635d=_0x480800?_0x480800+'/'+_0x5283c8[_0x22bf78(0x16e)]:_0x5283c8[_0x22bf78(0x16e)],_0x1d51ab=_0x31aabf[_0x22bf78(0x13c)](_0x5283c8['id'])||[],_0x109e2d=_0x1d51ab['length']>0x0?a31_0x373ca4[_0x22bf78(0x104)]('\x20['+_0x1d51ab['length']+_0x22bf78(0x155)):'';console['error']('\x0a'+a31_0x373ca4[_0x22bf78(0x138)]('Delete\x20segment:')+'\x20'+_0x47635d+_0x109e2d),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c));const _0x49ab65=segmentWithActivationsToYaml(_0x5283c8,_0x1d51ab,undefined,_0x362f17,_0x449143),_0x431d7f=segmentToYamlString(_0x49ab65),_0x1425aa=generateDiff(_0x431d7f,'');console[_0x22bf78(0x197)](formatDiffWithColors(_0x1425aa)),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c));}const _0x164eba=_0x420a70[_0x22bf78(0x188)](_0x38674e=>!_0x38674e[_0x22bf78(0x136)]&&_0x38674e['diff']);if(_0x164eba['length']>0x0&&!_0x517492['journeysOnly'])for(const _0x3db53a of _0x164eba){const _0x16eff3=_0x3db53a[_0x22bf78(0x10a)]?_0x3db53a['folderPath']+'/'+_0x3db53a[_0x22bf78(0x173)][_0x22bf78(0x16e)]:_0x3db53a[_0x22bf78(0x173)][_0x22bf78(0x16e)];console[_0x22bf78(0x197)]('\x0a'+a31_0x373ca4[_0x22bf78(0x107)](_0x22bf78(0x180))+'\x20'+_0x16eff3),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c)),console[_0x22bf78(0x197)](_0x3db53a[_0x22bf78(0x14f)]),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c));}if(_0x872ff1[_0x22bf78(0x161)]>0x0)for(const _0x49205f of _0x872ff1){const _0x9be2e8=_0x49205f[_0x22bf78(0x10a)]?_0x49205f['folderPath']+'/'+_0x49205f[_0x22bf78(0x173)]['name']:_0x49205f[_0x22bf78(0x173)][_0x22bf78(0x16e)];console['error']('\x0a'+a31_0x373ca4['green'](_0x22bf78(0x181))+'\x20'+_0x9be2e8),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c)),_0x49205f[_0x22bf78(0x14f)]&&console[_0x22bf78(0x197)](_0x49205f[_0x22bf78(0x14f)]),console[_0x22bf78(0x197)]('─'['repeat'](0x3c));}const _0x202d8d=_0x68c325[_0x22bf78(0x188)](_0x4250ac=>!_0x4250ac[_0x22bf78(0x136)]&&_0x4250ac[_0x22bf78(0x14f)]);if(_0x202d8d[_0x22bf78(0x161)]>0x0)for(const _0x47941a of _0x202d8d){const _0xc4dc53=_0x47941a['folderPath']?_0x47941a[_0x22bf78(0x10a)]+'/'+_0x47941a['yamlConfig']['name']:_0x47941a[_0x22bf78(0x173)][_0x22bf78(0x16e)];console['error']('\x0a'+a31_0x373ca4[_0x22bf78(0x107)](_0x22bf78(0x184))+'\x20'+_0xc4dc53),console[_0x22bf78(0x197)]('─'['repeat'](0x3c)),console[_0x22bf78(0x197)](_0x47941a['diff']),console['error']('─'['repeat'](0x3c));}if(_0x51d55c[_0x22bf78(0x161)]>0x0)for(const _0x1a553f of _0x51d55c){const _0x54ddd4=_0x1a553f[_0x22bf78(0x187)]?_0x26af44[_0x22bf78(0x13c)](_0x1a553f[_0x22bf78(0x187)])||'':'',_0x5b4151=_0x54ddd4?_0x54ddd4+'/'+_0x1a553f[_0x22bf78(0x17a)]:_0x1a553f[_0x22bf78(0x17a)];console[_0x22bf78(0x197)]('\x0a'+a31_0x373ca4[_0x22bf78(0x138)]('Delete\x20journey:')+'\x20'+_0x5b4151),console[_0x22bf78(0x197)]('─'[_0x22bf78(0x15a)](0x3c)),console[_0x22bf78(0x197)](a31_0x373ca4['red'](_0x22bf78(0x143))),console['error']('─'[_0x22bf78(0x15a)](0x3c));}if(_0x517492[_0x22bf78(0x18c)])return console[_0x22bf78(0x197)](a31_0x373ca4['yellow'](_0x22bf78(0x11b))),0x0;const _0x1f91ae=_0x517492[_0x22bf78(0x112)]?![]:_0x49e9aa[_0x22bf78(0x161)]>0x0||_0x574c76[_0x22bf78(0x161)]>0x0||_0x7701e5['length']>0x0,_0x2f81ce=_0x872ff1[_0x22bf78(0x161)]>0x0||_0x57661a[_0x22bf78(0x161)]>0x0||_0x51d55c[_0x22bf78(0x161)]>0x0,_0x6c3fd5=_0x517492[_0x22bf78(0x112)]?![]:_0x415d57['length']>0x0,_0x363b88=_0x49ba7b[_0x22bf78(0x161)]>0x0;if(!_0x1f91ae&&!_0x2f81ce&&!_0x6c3fd5&&!_0x363b88){const _0x81682d=_0x517492[_0x22bf78(0x112)]?_0x22bf78(0x117):_0x22bf78(0x189);console['error'](a31_0x373ca4[_0x22bf78(0x175)](_0x81682d));if(_0x590ed7&&_0x2ea0c3[_0x22bf78(0x161)]===0x1){const _0x1af21e=_0x2ea0c3[0x0];if(_0x1af21e['existingJourney']?.['id']){const _0x5591f4=getConsoleNextUrl(_0x517492[_0x22bf78(0x137)],_0x22bf78(0x124)+_0x1be089+_0x22bf78(0x17b)+_0x1af21e[_0x22bf78(0x11e)]['id']+_0x22bf78(0x120));console[_0x22bf78(0x197)]('\x20\x20'+a31_0x373ca4['cyan'](_0x5591f4));}}return 0x0;}const _0x1ea475=_0x517492[_0x22bf78(0x112)]?_0x872ff1[_0x22bf78(0x161)]+_0x57661a[_0x22bf78(0x161)]+_0x51d55c[_0x22bf78(0x161)]+_0x49ba7b[_0x22bf78(0x161)]:_0x49e9aa[_0x22bf78(0x161)]+_0x574c76['length']+_0x7701e5[_0x22bf78(0x161)]+_0x872ff1[_0x22bf78(0x161)]+_0x57661a[_0x22bf78(0x161)]+_0x51d55c['length']+_0x49ba7b['length']+_0x415d57[_0x22bf78(0x161)];if(!_0x517492[_0x22bf78(0x146)]&&_0x1ea475>0x0){const _0x554a96=await confirmKey(_0x22bf78(0x15d)+_0x1ea475+_0x22bf78(0x195));if(!_0x554a96)return console[_0x22bf78(0x197)](_0x22bf78(0x11f)),0x1;}const _0x4387bb={'withProgress':async(_0x36a84e,_0x447e88)=>{const _0x386e25=_0x22bf78,_0x47b212=await withSpinner(_0x36a84e,_0x447e88,{'verbose':_0x517492[_0x386e25(0x127)]});return{'data':_0x47b212[_0x386e25(0x186)]};},'logInfo':_0x4e3247=>console[_0x22bf78(0x197)](a31_0x373ca4['blue']('✔\x20'+_0x4e3247)),'logSuccess':_0x23397c=>console[_0x22bf78(0x197)](a31_0x373ca4[_0x22bf78(0x175)]('✔\x20'+_0x23397c)),'logWarning':_0x1226f5=>console[_0x22bf78(0x197)](a31_0x373ca4[_0x22bf78(0x107)]('⚠\x20'+_0x1226f5)),'logDeleted':_0x3dabdb=>console['error'](a31_0x373ca4['red']('✔\x20'+_0x3dabdb))},_0x41366f={'segment':_0x280edf['segment'],'journey':_0x280edf[_0x22bf78(0x174)],'user':_0x280edf[_0x22bf78(0x111)],'connection':_0x280edf['connection']};_0x49ba7b[_0x22bf78(0x161)]>0x0&&(_0x3883e6=await executePushFolders(_0x41366f,_0x49ba7b,_0x3883e6,{'parentId':_0x1be089},_0x4387bb));const _0x5e78b1={'rootFolderId':_0x42d128,'folderPathToId':_0x3883e6,'folderIdToPath':_0x26af44,'segmentNameToId':_0x518ed1,'activationsBySegmentId':_0x31aabf,'emailToIdMap':_0x52f814,'idToEmailMap':_0x362f17,'connectionNameToIdMap':_0x89774c[_0x22bf78(0x17e)],'connectionIdToNameMap':_0x89774c[_0x22bf78(0x18e)],'connectionNameToTypeMap':_0xf92b8d},_0x23ee5c=await executePushSegments(_0x41366f,_0x517492[_0x22bf78(0x112)]?[]:_0x420a70,_0x5e78b1,{'parentId':_0x1be089},_0x4387bb),_0x113175=_0x23ee5c[_0x22bf78(0x10b)],_0x334a0e=_0x23ee5c[_0x22bf78(0x142)],_0x2147f4=_0x23ee5c['activations']['created'],_0x2863ed=_0x23ee5c[_0x22bf78(0x130)][_0x22bf78(0x142)],_0x338974=_0x23ee5c[_0x22bf78(0x130)][_0x22bf78(0x18a)],_0x3b51e2=await executePushSegmentDeletions(_0x41366f,_0x517492[_0x22bf78(0x112)]?[]:_0x7701e5,_0x4387bb);let _0x3afaf8=0x0,_0x426a20=0x0,_0x840c21=0x0;const _0x12dbc8=new Map(_0x518ed1);for(const [_0x5e4dc2,_0x75d652]of _0x23ee5c[_0x22bf78(0x150)]){_0x12dbc8[_0x22bf78(0x149)](_0x5e4dc2,_0x75d652);}if(_0x68c325[_0x22bf78(0x161)]>0x0){const _0x5e883c={..._0x5e78b1,'segmentNameToId':_0x12dbc8,'existingSegments':_0x3b22d9,'activationContext':_0x1d194c},_0x407025=await executePushJourneys(_0x41366f,_0x68c325,_0x5e883c,{'parentId':_0x1be089,'rootFolderId':_0x42d128,'verbose':_0x517492['verbose']},_0x4387bb);_0x3afaf8=_0x407025[_0x22bf78(0x10b)],_0x426a20=_0x407025[_0x22bf78(0x142)];if(_0x590ed7&&_0x407025[_0x22bf78(0x105)][_0x22bf78(0x161)]===0x1){const _0x237bd3=_0x407025['results'][0x0];if(_0x237bd3[_0x22bf78(0x10f)]){const _0x5afd2c=getConsoleNextUrl(_0x517492[_0x22bf78(0x137)],'/app/ps/'+_0x1be089+'/e/'+_0x237bd3[_0x22bf78(0x10f)]+_0x22bf78(0x120));console[_0x22bf78(0x197)]('\x20\x20'+a31_0x373ca4[_0x22bf78(0x172)](_0x5afd2c));}}}for(const _0x586af1 of _0x51d55c){console[_0x22bf78(0x197)](a31_0x373ca4[_0x22bf78(0x107)]('⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x586af1[_0x22bf78(0x17a)])),_0x840c21++;}const _0xe6e6d1=[];if(_0x113175>0x0)_0xe6e6d1[_0x22bf78(0x132)](_0x113175+'\x20created');if(_0x334a0e>0x0)_0xe6e6d1[_0x22bf78(0x132)](_0x334a0e+_0x22bf78(0x156));if(_0x3b51e2>0x0)_0xe6e6d1[_0x22bf78(0x132)](_0x3b51e2+_0x22bf78(0x170));const _0x1fea8f=[];if(_0x3afaf8>0x0)_0x1fea8f[_0x22bf78(0x132)](_0x3afaf8+'\x20created');if(_0x426a20>0x0)_0x1fea8f[_0x22bf78(0x132)](_0x426a20+_0x22bf78(0x156));if(_0x840c21>0x0)_0x1fea8f[_0x22bf78(0x132)](_0x840c21+_0x22bf78(0x170));const _0x4a0a4b=[];if(_0x2147f4>0x0)_0x4a0a4b[_0x22bf78(0x132)](_0x2147f4+_0x22bf78(0x110));if(_0x2863ed>0x0)_0x4a0a4b[_0x22bf78(0x132)](_0x2863ed+'\x20updated');if(_0x338974>0x0)_0x4a0a4b[_0x22bf78(0x132)](_0x338974+'\x20deleted');return console['error'](a31_0x373ca4[_0x22bf78(0x175)](_0x22bf78(0x148))),_0xe6e6d1[_0x22bf78(0x161)]>0x0&&!_0x517492[_0x22bf78(0x112)]&&console[_0x22bf78(0x197)](_0x22bf78(0x109)+_0xe6e6d1[_0x22bf78(0x115)](',\x20')),_0x1fea8f[_0x22bf78(0x161)]>0x0&&console[_0x22bf78(0x197)]('\x20\x20Journeys:\x20'+_0x1fea8f['join'](',\x20')),_0x4a0a4b[_0x22bf78(0x161)]>0x0&&!_0x517492['journeysOnly']&&console[_0x22bf78(0x197)](_0x22bf78(0x168)+_0x4a0a4b[_0x22bf78(0x115)](',\x20')),0x0;}}
|
|
1
|
+
const a31_0x4e0b4a=a31_0x5963;(function(_0x57c843,_0x200e91){const _0x4ae28d=a31_0x5963,_0x598287=_0x57c843();while(!![]){try{const _0x2da2cc=parseInt(_0x4ae28d(0x213))/0x1+-parseInt(_0x4ae28d(0x24f))/0x2*(parseInt(_0x4ae28d(0x260))/0x3)+parseInt(_0x4ae28d(0x240))/0x4*(-parseInt(_0x4ae28d(0x26b))/0x5)+parseInt(_0x4ae28d(0x1f5))/0x6*(parseInt(_0x4ae28d(0x20b))/0x7)+parseInt(_0x4ae28d(0x27f))/0x8+parseInt(_0x4ae28d(0x208))/0x9+-parseInt(_0x4ae28d(0x251))/0xa*(parseInt(_0x4ae28d(0x24c))/0xb);if(_0x2da2cc===_0x200e91)break;else _0x598287['push'](_0x598287['shift']());}catch(_0x481153){_0x598287['push'](_0x598287['shift']());}}}(a31_0x5b68,0x59728));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';function a31_0x5b68(){const _0x10b0ba=['green','message','New\x20segment:','parentName','getJourney','\x20changed','type','\x0aValidation\x20failed:','getOutputSchemaWithCache','/e/','journeyBundleName','segment\x20or\x20journey','add','segment:push','dim','Fetching\x20existing\x20segments...','\x20new','helpText','listSegments','\x20\x20\x20\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Scoped\x20to\x20folder:\x20','user','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','\x20unchanged','listJourneysWithDetailsFromParentSegment','Source\x20directory:\x20','push','1212IAEvqE','\x20\x20Source:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','isNew','journeys','\x20to\x20update','Error:\x20','yellow','toUpdate','\x20created','description','11QIJfdU','scopedFolderPath','\x27...','156602qFRDnI','parent_name','8227410ZTyfSG','repeat','journeyId','diff','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','segments','\x20activations]','Delete\x20segment:','delete','\x0a✔\x20Push\x20complete','toDelete','createdAt','No\x20','changed','relationships','15XeEavR','\x20folders\x20to\x20create','idToName','setPhase','updated','\x20\x20🗺️\x20\x20Journeys:','\x20\x20Journeys:\x20','site','/app/ps/','\x20\x20📊\x20Segments:','updatedAt','2250bCWHfI','filter','\x20deleted','paused','journeysOnly','\x0aPush\x20summary\x20for\x20\x27','.yaml','New\x20journey:','⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20','connection','journey','Changes\x20to\x20journey:','attributes','filePath','parentSegment','created','\x20to\x20delete','state','Aborted.','createdSegmentIds','4167488wMRTtq','activations','(Journey\x20will\x20be\x20deleted)','nameToId','cwd','\x20YAML\x20files\x20found','get','map','folderId','all','journeyBundleId','toCreate','red','/j/da/je','Usage:\x20tdx\x20sg\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20(requires\x20context)','segmentFolderId','versionNumber','segment','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','resolveParentId','1354542seRuIS','Changes\x20to:','parentFolder','\x20updated','error','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','unchanged','blue','set','cyan','folderPath','Fetching\x20existing\x20folders...','yamlConfig','audienceId','listActivations','deleted','data','Site:\x20','\x20changes?','4238766XxNokS','Error:\x20Directory\x20not\x20found:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','21snHdGl','execute','dryRun','\x20\x20Segments:\x20','Fetching\x20existing\x20activations...','length','join','Delete\x20journey:','47791jDxcsm','verbose','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','then','Push\x20','name','results','📁\x20','file','endsWith','Fetching\x20connections\x20for\x20name\x20resolution...','Fetching\x20existing\x20journeys...','\x20\x20Activations:\x20','Parent\x20segment:\x20','existingJourney','new','Folders\x20to\x20create:'];a31_0x5b68=function(){return _0x10b0ba;};return a31_0x5b68();}import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a31_0x97bf0b from'chalk';import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a31_0x5963(_0x59a5bf,_0x34e278){_0x59a5bf=_0x59a5bf-0x1ea;const _0x5b68bf=a31_0x5b68();let _0x596319=_0x5b68bf[_0x59a5bf];return _0x596319;}import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{['name']=a31_0x4e0b4a(0x231);[a31_0x4e0b4a(0x24b)]='Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments';async[a31_0x4e0b4a(0x20c)](_0x40c54e){const _0x24b640=a31_0x4e0b4a,{options:_0x55867d,args:_0x21c093,tdx:_0x5a56f1}=_0x40c54e,_0x2184bb=_0x55867d,_0x2b1d98=await resolveTarget({'arg':_0x21c093[0x0],'contextParent':_0x55867d[_0x24b640(0x279)],'cwd':process[_0x24b640(0x283)]()});if(!isSuccessfulResolution(_0x2b1d98))return _0x2b1d98['errorCode']==='no_parent'?(console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x248)](_0x24b640(0x20a))),console[_0x24b640(0x1f9)](_0x24b640(0x1ef)),console[_0x24b640(0x1f9)](_0x24b640(0x242)),console[_0x24b640(0x1f9)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file')):(console['error'](a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x247)+_0x2b1d98[_0x24b640(0x225)]+'\x0a')),_0x2b1d98[_0x24b640(0x235)]&&console['error'](a31_0x97bf0b[_0x24b640(0x1fe)](_0x2b1d98[_0x24b640(0x235)]))),0x1;if(_0x2b1d98[_0x24b640(0x22a)]===_0x24b640(0x250))return console['error'](a31_0x97bf0b['red'](_0x24b640(0x209)+_0x2b1d98['targetDir']+'\x0a')),console['error'](a31_0x97bf0b[_0x24b640(0x1fe)](_0x24b640(0x243))),0x1;const _0x57ee2a=_0x2b1d98[_0x24b640(0x227)],_0x57ab18=_0x2b1d98['targetDir'],_0x5d349a=_0x2b1d98[_0x24b640(0x22a)]===_0x24b640(0x21b)?_0x2b1d98[_0x24b640(0x278)]:undefined,_0x3ac4b4=getScopedDetails(_0x2b1d98),_0x57cd93=_0x3ac4b4?.['isScoped']??![],_0x296661=_0x3ac4b4?.[_0x24b640(0x24d)]??'';if(!existsSync(_0x57ab18))return console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x209)+_0x57ab18+'\x0a')),console['error'](a31_0x97bf0b[_0x24b640(0x1fe)](_0x24b640(0x243))),0x1;_0x2184bb[_0x24b640(0x214)]&&(console[_0x24b640(0x1f9)](_0x24b640(0x206)+_0x2184bb['site']),console[_0x24b640(0x1f9)](_0x24b640(0x220)+_0x57ee2a),console[_0x24b640(0x1f9)](_0x24b640(0x23e)+_0x57ab18),_0x57cd93&&console[_0x24b640(0x1f9)](_0x24b640(0x239)+_0x296661));const _0x2859da=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x57ee2a+_0x24b640(0x24e),()=>_0x5a56f1['segment'][_0x24b640(0x1f4)](_0x57ee2a),{'verbose':_0x2184bb[_0x24b640(0x214)]}),_0x250f1f=_0x2859da[_0x24b640(0x205)],[_0x305b8d,_0x4eb93,_0x3eb3ee,_0x312d51,_0x4490f2]=await Promise[_0x24b640(0x1ea)]([withSpinner('Fetching\x20parent\x20segment\x20details...',()=>_0x5a56f1[_0x24b640(0x1f2)]['getParent'](_0x250f1f),{'verbose':_0x2184bb[_0x24b640(0x214)]}),withSpinner(_0x24b640(0x233),()=>_0x5a56f1[_0x24b640(0x1f2)][_0x24b640(0x236)](_0x250f1f),{'verbose':_0x2184bb['verbose']}),withSpinner(_0x24b640(0x200),()=>_0x5a56f1[_0x24b640(0x1f2)]['listFolders'](_0x250f1f),{'verbose':_0x2184bb[_0x24b640(0x214)]}),withSpinner(_0x24b640(0x21e),()=>_0x5a56f1['journey'][_0x24b640(0x23d)](_0x250f1f,{'includeAllVersions':!![]}),{'verbose':_0x2184bb['verbose']}),withSpinner('Fetching\x20users\x20for\x20email\x20resolution...',()=>_0x5a56f1[_0x24b640(0x23a)]['buildUserMaps'](),{'verbose':_0x2184bb[_0x24b640(0x214)]})[_0x24b640(0x216)](_0x5ee5ec=>_0x5ee5ec['data'])]),_0x10fc99=_0x305b8d[_0x24b640(0x205)],_0x4caf9e=extractRootFolderId(_0x10fc99),_0x217d68=_0x4eb93[_0x24b640(0x205)],_0x1f14e2=_0x3eb3ee[_0x24b640(0x205)],{journeys:_0x40a963,activationStepsById:_0x35e9b8}=_0x312d51[_0x24b640(0x205)],_0x8c2e5=new Map(_0x40a963[_0x24b640(0x286)](_0x202b31=>[_0x202b31['id'],_0x202b31])),_0x3929d1=_0x40a963[_0x24b640(0x286)](_0x15fe2f=>({'id':_0x15fe2f['id'],'name':_0x15fe2f[_0x24b640(0x277)][_0x24b640(0x218)],'journeyBundleName':_0x15fe2f['attributes'][_0x24b640(0x22e)]||'','journeyBundleId':_0x15fe2f[_0x24b640(0x277)][_0x24b640(0x1eb)]||'','versionNumber':_0x15fe2f[_0x24b640(0x277)][_0x24b640(0x1f1)],'description':_0x15fe2f[_0x24b640(0x277)]['description'],'state':_0x15fe2f['attributes'][_0x24b640(0x27c)],'paused':_0x15fe2f[_0x24b640(0x277)][_0x24b640(0x26e)],'audienceId':_0x15fe2f['attributes'][_0x24b640(0x202)],'folderId':_0x15fe2f[_0x24b640(0x25f)]?.[_0x24b640(0x1f7)]?.[_0x24b640(0x205)]?.['id'],'createdAt':_0x15fe2f[_0x24b640(0x277)][_0x24b640(0x25c)],'updatedAt':_0x15fe2f[_0x24b640(0x277)][_0x24b640(0x26a)]})),{emailToId:_0x2fc3e1,idToEmail:_0x391be0}=_0x4490f2,_0x278866=await withSpinner(_0x24b640(0x21d),async()=>{const _0x437764=_0x24b640,_0x294a61=await _0x5a56f1[_0x437764(0x274)]['list']();return buildConnectionMaps(_0x294a61);},{'verbose':_0x2184bb['verbose']})[_0x24b640(0x216)](_0x2aac84=>_0x2aac84['data']),_0x2ee8c0=_0x278866[_0x24b640(0x282)],_0x2c5b34=_0x278866[_0x24b640(0x262)],_0x2ec2ca=_0x278866['nameToType'],_0x25b742={'emailToIdMap':_0x2fc3e1,'connectionNameToIdMap':_0x2ee8c0,'connectionNameToTypeMap':_0x2ec2ca,'getSchema':_0x19ee43=>_0x5a56f1['connection'][_0x24b640(0x22c)](_0x19ee43)};let {pathToId:_0x41334f,idToPath:_0x5eb291}=buildFolderMaps(_0x1f14e2);const _0x3e7dec=buildSegmentLookupMap(_0x217d68,_0x5eb291),_0x22135b=buildSegmentNameToIdMap(_0x217d68),_0x42d843=buildJourneyBundleLookupMap(_0x3929d1,_0x5eb291);let _0x404589;if(_0x5d349a){if(!_0x5d349a[_0x24b640(0x21c)]('.yml')&&!_0x5d349a[_0x24b640(0x21c)](_0x24b640(0x271)))return console['error'](a31_0x97bf0b[_0x24b640(0x1ed)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x5d349a+'\x0a')),0x1;_0x404589=[_0x5d349a];}else _0x404589=findYamlFiles(_0x57ab18);if(_0x404589[_0x24b640(0x210)]===0x0)return console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x238)+_0x57ab18+'\x0a')),console['error'](a31_0x97bf0b[_0x24b640(0x1fe)](_0x24b640(0x215))),0x1;let _0x2729e6,_0x30c5a7;try{const _0x4e179c=parseAndClassifyYamlFiles(_0x404589,_0x57ab18,{'skipSegments':_0x2184bb['journeysOnly']});_0x2729e6=_0x4e179c[_0x24b640(0x256)],_0x30c5a7=_0x4e179c[_0x24b640(0x245)];const _0x5b549=validateParsedFiles(_0x4e179c,_0x57ab18);if(_0x5b549[_0x24b640(0x210)]>0x0)return console['error'](a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x22b))),console[_0x24b640(0x1f9)](formatValidationErrors(_0x5b549)),console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x248)](_0x24b640(0x1f3))),0x1;}catch(_0x3d1c5f){return console[_0x24b640(0x1f9)](a31_0x97bf0b['red']('Error\x20parsing\x20YAML:\x20'+(_0x3d1c5f instanceof Error?_0x3d1c5f[_0x24b640(0x225)]:_0x3d1c5f))),0x1;}if(_0x2729e6[_0x24b640(0x210)]===0x0&&_0x30c5a7[_0x24b640(0x210)]===0x0){const _0x4cb721=_0x2184bb[_0x24b640(0x26f)]?_0x24b640(0x275):_0x24b640(0x22f);return console[_0x24b640(0x1f9)](a31_0x97bf0b['yellow'](_0x24b640(0x25d)+_0x4cb721+_0x24b640(0x284))),0x0;}const _0x459da0=new Map();_0x217d68['length']>0x0&&!_0x2184bb['journeysOnly']&&await withSpinner(_0x24b640(0x20f),async()=>{await batchAsync(_0x217d68,async _0x2d55c6=>{const _0x274e89=a31_0x5963,_0x1a399b=await _0x5a56f1[_0x274e89(0x1f2)][_0x274e89(0x203)](_0x250f1f,_0x2d55c6['id']);_0x459da0[_0x274e89(0x1fd)](_0x2d55c6['id'],_0x1a399b);});},{'verbose':_0x2184bb['verbose']});const {segmentFiles:_0x1abbc2,foldersToCreate:_0x40563d}=await prepareSegmentFiles(_0x2729e6,{'segmentByFolderAndName':_0x3e7dec,'activationsBySegmentId':_0x459da0,'folderPathToId':_0x41334f,'idToEmailMap':_0x391be0,'connectionIdToNameMap':_0x2c5b34},_0x25b742,_0x57cd93,_0x296661),_0x6346e4=_0x5d349a?[]:findSegmentsToDelete(_0x217d68,_0x2729e6['map'](({yamlConfig:_0xb671ff,folderPath:_0x4b6b2e})=>({'yamlConfig':_0xb671ff,'folderPath':resolveTDFolderPath(_0x4b6b2e,_0x57cd93,_0x296661)})),_0x5eb291,_0x296661,_0x57cd93),{journeyFiles:_0x1f61e9,foldersToCreate:_0x5cabfa}=await withProgressSpinner('Preparing\x20journeys...',async _0x1baa3e=>prepareJourneyFiles(_0x30c5a7,{'fetchJourney':async _0x89612d=>_0x5a56f1[_0x24b640(0x275)][_0x24b640(0x228)](_0x89612d[_0x24b640(0x253)]),'journeyBundlesByFolderAndName':_0x42d843,'folderPathToId':_0x41334f,'idToEmailMap':_0x391be0,'connectionIdToNameMap':_0x2c5b34,'existingSegments':_0x217d68,'parentId':_0x250f1f,'deps':_0x5a56f1,'progress':{'update':_0xf9308e=>{const _0x50a0f1=_0x24b640;_0x1baa3e[_0x50a0f1(0x263)](_0xf9308e),_0x2184bb[_0x50a0f1(0x214)]&&console[_0x50a0f1(0x1f9)]('\x20\x20'+_0xf9308e);}},'journeyById':_0x8c2e5,'activationStepsById':_0x35e9b8},_0x57cd93,_0x296661),{'verbose':_0x2184bb['verbose']})[_0x24b640(0x216)](_0x56a1f9=>_0x56a1f9[_0x24b640(0x205)]);for(const _0x3c7d1d of _0x5cabfa){_0x40563d[_0x24b640(0x230)](_0x3c7d1d);}const _0x51abf5=_0x5d349a?[]:findJourneysToDelete(_0x3929d1,_0x30c5a7['map'](({yamlConfig:_0x1e858b,folderPath:_0xfd264e})=>({'yamlConfig':_0x1e858b,'folderPath':resolveTDFolderPath(_0xfd264e,_0x57cd93,_0x296661)})),_0x5eb291,_0x296661,_0x57cd93),_0x374ca4=calculatePushStats(_0x1abbc2,_0x1f61e9,_0x40563d,_0x6346e4,_0x51abf5,!!_0x2184bb[_0x24b640(0x259)],!!_0x2184bb[_0x24b640(0x26f)]),_0x2be90e=_0x374ca4[_0x24b640(0x256)][_0x24b640(0x222)],_0x440147=_0x374ca4[_0x24b640(0x256)][_0x24b640(0x25e)],_0x4634e6=_0x374ca4[_0x24b640(0x256)][_0x24b640(0x1fb)],_0x26a892=_0x374ca4[_0x24b640(0x256)][_0x24b640(0x25b)],_0x205845=_0x374ca4['folders'][_0x24b640(0x1ec)],_0x443ae6=_0x374ca4[_0x24b640(0x245)]['new'],_0x58e8d5=_0x374ca4[_0x24b640(0x245)][_0x24b640(0x25e)],_0x3943ce=_0x374ca4[_0x24b640(0x245)]['unchanged'],_0x5e56d8=_0x374ca4[_0x24b640(0x245)][_0x24b640(0x25b)],_0x4907e4=_0x374ca4[_0x24b640(0x280)][_0x24b640(0x1ea)],_0x15378d=_0x374ca4[_0x24b640(0x280)]['toCreate'],_0x1d7524=_0x374ca4[_0x24b640(0x280)][_0x24b640(0x249)],_0x1b8255=_0x374ca4[_0x24b640(0x280)][_0x24b640(0x25b)];console[_0x24b640(0x1f9)](_0x24b640(0x270)+_0x57ee2a+'\x27:');_0x205845[_0x24b640(0x210)]>0x0&&console['error']('\x20\x20'+a31_0x97bf0b[_0x24b640(0x1fc)](_0x24b640(0x21a)+_0x205845[_0x24b640(0x210)]+_0x24b640(0x261)));if(!_0x2184bb[_0x24b640(0x26f)]){console[_0x24b640(0x1f9)](_0x24b640(0x269)),console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b['green']('+\x20'+_0x2be90e[_0x24b640(0x210)]+'\x20new')),console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b[_0x24b640(0x248)]('~\x20'+_0x440147[_0x24b640(0x210)]+'\x20changed'));if(_0x26a892[_0x24b640(0x210)]>0x0)console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b['red']('-\x20'+_0x26a892['length']+_0x24b640(0x27b)));else _0x6346e4[_0x24b640(0x210)]>0x0&&!_0x2184bb[_0x24b640(0x259)]&&console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b[_0x24b640(0x232)](_0x6346e4[_0x24b640(0x210)]+'\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)'));console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b[_0x24b640(0x232)]('=\x20'+_0x4634e6[_0x24b640(0x210)]+'\x20unchanged'));}if(_0x1f61e9[_0x24b640(0x210)]>0x0||_0x51abf5[_0x24b640(0x210)]>0x0){console[_0x24b640(0x1f9)](_0x24b640(0x265)),console['error'](_0x24b640(0x237)+a31_0x97bf0b['green']('+\x20'+_0x443ae6[_0x24b640(0x210)]+_0x24b640(0x234))),console[_0x24b640(0x1f9)]('\x20\x20\x20\x20'+a31_0x97bf0b['yellow']('~\x20'+_0x58e8d5[_0x24b640(0x210)]+_0x24b640(0x229)));if(_0x5e56d8['length']>0x0)console[_0x24b640(0x1f9)]('\x20\x20\x20\x20'+a31_0x97bf0b[_0x24b640(0x1ed)]('-\x20'+_0x5e56d8['length']+'\x20to\x20delete'));else _0x51abf5['length']>0x0&&!_0x2184bb['delete']&&console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b['dim'](_0x51abf5[_0x24b640(0x210)]+_0x24b640(0x23b)));console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b['dim']('=\x20'+_0x3943ce[_0x24b640(0x210)]+_0x24b640(0x23c)));}_0x4907e4[_0x24b640(0x210)]>0x0&&!_0x2184bb['journeysOnly']&&(console['error'](''),console[_0x24b640(0x1f9)]('\x20\x20Activations:'),_0x15378d[_0x24b640(0x210)]>0x0&&console[_0x24b640(0x1f9)](_0x24b640(0x237)+a31_0x97bf0b[_0x24b640(0x224)]('+\x20'+_0x15378d[_0x24b640(0x210)]+'\x20to\x20create')),_0x1d7524['length']>0x0&&console['error'](_0x24b640(0x237)+a31_0x97bf0b[_0x24b640(0x248)]('~\x20'+_0x1d7524[_0x24b640(0x210)]+_0x24b640(0x246))),_0x1b8255[_0x24b640(0x210)]>0x0&&console['error']('\x20\x20\x20\x20'+a31_0x97bf0b[_0x24b640(0x1ed)]('-\x20'+_0x1b8255[_0x24b640(0x210)]+_0x24b640(0x27b))));console['error'](_0x24b640(0x241)+a31_0x97bf0b['cyan'](_0x57ab18)+'\x0a');if(_0x205845['length']>0x0){console[_0x24b640(0x1f9)](_0x24b640(0x223));for(const _0x35f9e6 of _0x205845){console[_0x24b640(0x1f9)]('\x20\x20'+a31_0x97bf0b['blue']('+')+'\x20'+_0x35f9e6);}console[_0x24b640(0x1f9)]('');}if(_0x2be90e['length']>0x0&&!_0x2184bb['journeysOnly'])for(const _0x57ea59 of _0x2be90e){const _0x20422d=_0x57ea59[_0x24b640(0x1ff)]?_0x57ea59[_0x24b640(0x1ff)]+'/'+_0x57ea59[_0x24b640(0x201)]['name']:_0x57ea59['yamlConfig']['name'],_0x2ee3a1=_0x57ea59['yamlConfig'][_0x24b640(0x280)]?.[_0x24b640(0x210)]||0x0,_0x3beeb4=_0x2ee3a1>0x0?a31_0x97bf0b[_0x24b640(0x232)]('\x20['+_0x2ee3a1+_0x24b640(0x257)):'';console[_0x24b640(0x1f9)]('\x0a'+a31_0x97bf0b[_0x24b640(0x224)](_0x24b640(0x226))+'\x20'+_0x20422d+_0x3beeb4),console[_0x24b640(0x1f9)]('─'[_0x24b640(0x252)](0x3c)),_0x57ea59['diff']&&console[_0x24b640(0x1f9)](_0x57ea59[_0x24b640(0x254)]),console[_0x24b640(0x1f9)]('─'['repeat'](0x3c));}if(_0x26a892[_0x24b640(0x210)]>0x0&&!_0x2184bb[_0x24b640(0x26f)])for(const _0x2b55e1 of _0x26a892){const _0x45d7b8=_0x2b55e1[_0x24b640(0x1f0)]?_0x5eb291['get'](_0x2b55e1[_0x24b640(0x1f0)]['toString']())||'':'',_0x570fae=_0x45d7b8?_0x45d7b8+'/'+_0x2b55e1[_0x24b640(0x218)]:_0x2b55e1[_0x24b640(0x218)],_0x5bd5ea=_0x459da0['get'](_0x2b55e1['id'])||[],_0x3077b9=_0x5bd5ea[_0x24b640(0x210)]>0x0?a31_0x97bf0b[_0x24b640(0x232)]('\x20['+_0x5bd5ea['length']+_0x24b640(0x257)):'';console[_0x24b640(0x1f9)]('\x0a'+a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x258))+'\x20'+_0x570fae+_0x3077b9),console[_0x24b640(0x1f9)]('─'[_0x24b640(0x252)](0x3c));const _0x1ba5bd=segmentWithActivationsToYaml(_0x2b55e1,_0x5bd5ea,undefined,_0x391be0,_0x2c5b34),_0x31aba4=segmentToYamlString(_0x1ba5bd),_0x41a1bf=generateDiff(_0x31aba4,'');console[_0x24b640(0x1f9)](formatDiffWithColors(_0x41a1bf)),console[_0x24b640(0x1f9)]('─'[_0x24b640(0x252)](0x3c));}const _0x47b54f=_0x1abbc2['filter'](_0x13069f=>!_0x13069f[_0x24b640(0x244)]&&_0x13069f['diff']);if(_0x47b54f[_0x24b640(0x210)]>0x0&&!_0x2184bb[_0x24b640(0x26f)])for(const _0x4dfe8c of _0x47b54f){const _0x4a6c4e=_0x4dfe8c['folderPath']?_0x4dfe8c[_0x24b640(0x1ff)]+'/'+_0x4dfe8c[_0x24b640(0x201)]['name']:_0x4dfe8c[_0x24b640(0x201)][_0x24b640(0x218)];console[_0x24b640(0x1f9)]('\x0a'+a31_0x97bf0b[_0x24b640(0x248)](_0x24b640(0x1f6))+'\x20'+_0x4a6c4e),console['error']('─'['repeat'](0x3c)),console['error'](_0x4dfe8c[_0x24b640(0x254)]),console[_0x24b640(0x1f9)]('─'[_0x24b640(0x252)](0x3c));}if(_0x443ae6['length']>0x0)for(const _0x586cad of _0x443ae6){const _0x238c5b=_0x586cad['folderPath']?_0x586cad['folderPath']+'/'+_0x586cad['yamlConfig'][_0x24b640(0x218)]:_0x586cad[_0x24b640(0x201)][_0x24b640(0x218)];console[_0x24b640(0x1f9)]('\x0a'+a31_0x97bf0b[_0x24b640(0x224)](_0x24b640(0x272))+'\x20'+_0x238c5b),console[_0x24b640(0x1f9)]('─'['repeat'](0x3c)),_0x586cad['diff']&&console[_0x24b640(0x1f9)](_0x586cad[_0x24b640(0x254)]),console['error']('─'[_0x24b640(0x252)](0x3c));}const _0x59e488=_0x1f61e9[_0x24b640(0x26c)](_0x559ea2=>!_0x559ea2[_0x24b640(0x244)]&&_0x559ea2[_0x24b640(0x254)]);if(_0x59e488[_0x24b640(0x210)]>0x0)for(const _0x36259e of _0x59e488){const _0x30c6cb=_0x36259e[_0x24b640(0x1ff)]?_0x36259e['folderPath']+'/'+_0x36259e['yamlConfig'][_0x24b640(0x218)]:_0x36259e[_0x24b640(0x201)][_0x24b640(0x218)];console[_0x24b640(0x1f9)]('\x0a'+a31_0x97bf0b[_0x24b640(0x248)](_0x24b640(0x276))+'\x20'+_0x30c6cb),console['error']('─'['repeat'](0x3c)),console[_0x24b640(0x1f9)](_0x36259e[_0x24b640(0x254)]),console[_0x24b640(0x1f9)]('─'['repeat'](0x3c));}if(_0x5e56d8[_0x24b640(0x210)]>0x0)for(const _0x5e4c00 of _0x5e56d8){const _0x539bbd=_0x5e4c00[_0x24b640(0x287)]?_0x5eb291[_0x24b640(0x285)](_0x5e4c00[_0x24b640(0x287)])||'':'',_0xd00b7e=_0x539bbd?_0x539bbd+'/'+_0x5e4c00[_0x24b640(0x22e)]:_0x5e4c00[_0x24b640(0x22e)];console['error']('\x0a'+a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x212))+'\x20'+_0xd00b7e),console[_0x24b640(0x1f9)]('─'[_0x24b640(0x252)](0x3c)),console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x1ed)](_0x24b640(0x281))),console['error']('─'[_0x24b640(0x252)](0x3c));}if(_0x2184bb[_0x24b640(0x20d)])return console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x248)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made')),0x0;const _0x1da18c=_0x2184bb[_0x24b640(0x26f)]?![]:_0x2be90e[_0x24b640(0x210)]>0x0||_0x440147[_0x24b640(0x210)]>0x0||_0x26a892[_0x24b640(0x210)]>0x0,_0x4db4c3=_0x443ae6['length']>0x0||_0x58e8d5[_0x24b640(0x210)]>0x0||_0x5e56d8[_0x24b640(0x210)]>0x0,_0xcbbed7=_0x2184bb[_0x24b640(0x26f)]?![]:_0x4907e4[_0x24b640(0x210)]>0x0,_0x329e79=_0x205845[_0x24b640(0x210)]>0x0;if(!_0x1da18c&&!_0x4db4c3&&!_0xcbbed7&&!_0x329e79){const _0x5e17bd=_0x2184bb['journeysOnly']?_0x24b640(0x1fa):_0x24b640(0x255);console['error'](a31_0x97bf0b[_0x24b640(0x224)](_0x5e17bd));if(_0x5d349a&&_0x3943ce[_0x24b640(0x210)]===0x1){const _0x53a614=_0x3943ce[0x0];if(_0x53a614['existingJourney']?.['id']){const _0x3ab0a9=getConsoleNextUrl(_0x2184bb[_0x24b640(0x267)],_0x24b640(0x268)+_0x250f1f+_0x24b640(0x22d)+_0x53a614[_0x24b640(0x221)]['id']+_0x24b640(0x1ee));console[_0x24b640(0x1f9)]('\x20\x20'+a31_0x97bf0b['cyan'](_0x3ab0a9));}}return 0x0;}const _0x5a6723=_0x2184bb[_0x24b640(0x26f)]?_0x443ae6['length']+_0x58e8d5['length']+_0x5e56d8[_0x24b640(0x210)]+_0x205845['length']:_0x2be90e[_0x24b640(0x210)]+_0x440147[_0x24b640(0x210)]+_0x26a892['length']+_0x443ae6[_0x24b640(0x210)]+_0x58e8d5[_0x24b640(0x210)]+_0x5e56d8[_0x24b640(0x210)]+_0x205845[_0x24b640(0x210)]+_0x4907e4[_0x24b640(0x210)];if(!_0x2184bb['yes']&&_0x5a6723>0x0){const _0x4dcaf0=await confirmKey(_0x24b640(0x217)+_0x5a6723+_0x24b640(0x207));if(!_0x4dcaf0)return console['error'](_0x24b640(0x27d)),0x1;}const _0x5846de={'withProgress':async(_0x1f0528,_0x7731e7)=>{const _0x429101=_0x24b640,_0x266a13=await withSpinner(_0x1f0528,_0x7731e7,{'verbose':_0x2184bb[_0x429101(0x214)]});return{'data':_0x266a13[_0x429101(0x205)]};},'logInfo':_0x1c6792=>console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x1fc)]('✔\x20'+_0x1c6792)),'logSuccess':_0x3f4c9c=>console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x224)]('✔\x20'+_0x3f4c9c)),'logWarning':_0xc386a0=>console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x248)]('⚠\x20'+_0xc386a0)),'logDeleted':_0x41b938=>console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x1ed)]('✔\x20'+_0x41b938))},_0xc5de76={'segment':_0x5a56f1[_0x24b640(0x1f2)],'journey':_0x5a56f1[_0x24b640(0x275)],'user':_0x5a56f1['user'],'connection':_0x5a56f1[_0x24b640(0x274)]};_0x205845['length']>0x0&&(_0x41334f=await executePushFolders(_0xc5de76,_0x205845,_0x41334f,{'parentId':_0x250f1f},_0x5846de));const _0x27547e={'rootFolderId':_0x4caf9e,'folderPathToId':_0x41334f,'folderIdToPath':_0x5eb291,'segmentNameToId':_0x22135b,'activationsBySegmentId':_0x459da0,'emailToIdMap':_0x2fc3e1,'idToEmailMap':_0x391be0,'connectionNameToIdMap':_0x278866[_0x24b640(0x282)],'connectionIdToNameMap':_0x278866[_0x24b640(0x262)],'connectionNameToTypeMap':_0x2ec2ca},_0x257c5e=await executePushSegments(_0xc5de76,_0x2184bb['journeysOnly']?[]:_0x1abbc2,_0x27547e,{'parentId':_0x250f1f},_0x5846de),_0x127416=_0x257c5e[_0x24b640(0x27a)],_0x5dc374=_0x257c5e[_0x24b640(0x264)],_0x141c09=_0x257c5e[_0x24b640(0x280)][_0x24b640(0x27a)],_0x3d9400=_0x257c5e[_0x24b640(0x280)][_0x24b640(0x264)],_0x174c88=_0x257c5e[_0x24b640(0x280)][_0x24b640(0x204)],_0x324126=await executePushSegmentDeletions(_0xc5de76,_0x2184bb[_0x24b640(0x26f)]?[]:_0x26a892,_0x5846de);let _0x3c7fd0=0x0,_0x262bb2=0x0,_0x26bc98=0x0;const _0x1bdcbb=new Map(_0x22135b);for(const [_0x25a009,_0xa05e99]of _0x257c5e[_0x24b640(0x27e)]){_0x1bdcbb['set'](_0x25a009,_0xa05e99);}if(_0x1f61e9[_0x24b640(0x210)]>0x0){const _0x2661c0={..._0x27547e,'segmentNameToId':_0x1bdcbb,'existingSegments':_0x217d68,'activationContext':_0x25b742},_0x459da3=await executePushJourneys(_0xc5de76,_0x1f61e9,_0x2661c0,{'parentId':_0x250f1f,'rootFolderId':_0x4caf9e,'verbose':_0x2184bb[_0x24b640(0x214)]},_0x5846de);_0x3c7fd0=_0x459da3['created'],_0x262bb2=_0x459da3[_0x24b640(0x264)];if(_0x5d349a&&_0x459da3[_0x24b640(0x219)][_0x24b640(0x210)]===0x1){const _0x5958eb=_0x459da3['results'][0x0];if(_0x5958eb[_0x24b640(0x253)]){const _0x1ff992=getConsoleNextUrl(_0x2184bb[_0x24b640(0x267)],'/app/ps/'+_0x250f1f+_0x24b640(0x22d)+_0x5958eb[_0x24b640(0x253)]+_0x24b640(0x1ee));console[_0x24b640(0x1f9)]('\x20\x20'+a31_0x97bf0b[_0x24b640(0x1fe)](_0x1ff992));}}}for(const _0x3ac954 of _0x5e56d8){console['error'](a31_0x97bf0b['yellow'](_0x24b640(0x273)+_0x3ac954[_0x24b640(0x22e)])),_0x26bc98++;}const _0x31324d=[];if(_0x127416>0x0)_0x31324d[_0x24b640(0x23f)](_0x127416+'\x20created');if(_0x5dc374>0x0)_0x31324d[_0x24b640(0x23f)](_0x5dc374+_0x24b640(0x1f8));if(_0x324126>0x0)_0x31324d['push'](_0x324126+_0x24b640(0x26d));const _0x2b481d=[];if(_0x3c7fd0>0x0)_0x2b481d['push'](_0x3c7fd0+_0x24b640(0x24a));if(_0x262bb2>0x0)_0x2b481d[_0x24b640(0x23f)](_0x262bb2+'\x20updated');if(_0x26bc98>0x0)_0x2b481d[_0x24b640(0x23f)](_0x26bc98+_0x24b640(0x26d));const _0x3a51f8=[];if(_0x141c09>0x0)_0x3a51f8[_0x24b640(0x23f)](_0x141c09+_0x24b640(0x24a));if(_0x3d9400>0x0)_0x3a51f8[_0x24b640(0x23f)](_0x3d9400+_0x24b640(0x1f8));if(_0x174c88>0x0)_0x3a51f8[_0x24b640(0x23f)](_0x174c88+_0x24b640(0x26d));return console[_0x24b640(0x1f9)](a31_0x97bf0b[_0x24b640(0x224)](_0x24b640(0x25a))),_0x31324d['length']>0x0&&!_0x2184bb[_0x24b640(0x26f)]&&console[_0x24b640(0x1f9)](_0x24b640(0x20e)+_0x31324d[_0x24b640(0x211)](',\x20')),_0x2b481d[_0x24b640(0x210)]>0x0&&console['error'](_0x24b640(0x266)+_0x2b481d['join'](',\x20')),_0x3a51f8[_0x24b640(0x210)]>0x0&&!_0x2184bb[_0x24b640(0x26f)]&&console[_0x24b640(0x1f9)](_0x24b640(0x21f)+_0x3a51f8['join'](',\x20')),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a32_0x584c(_0x178e4c,_0x27d26f){_0x178e4c=_0x178e4c-0x180;const _0x4d18ea=a32_0x4d18();let _0x584c1d=_0x4d18ea[_0x178e4c];return _0x584c1d;}function a32_0x4d18(){const _0x36d0ef=['execute','✔\x20Updated\x20segment\x20\x27','Examples:','kind','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','rule','yellow','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','folder','segment','segmentName','segmentId','\x20\x20\x20Path:\x20','Parent\x20ID:\x20','2IzvEIp','1222719EAlomR','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','INTERNAL','Resolving\x20folder\x20\x27','119hoGlYf','Updating\x20segment\x20\x27','data','resolveFolderId','description','Error:\x20Cannot\x20update\x20','1869120EguBUY','4308140thZBxD','error','includes','312511apVejf','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Segment\x20ID\x20missing\x20from\x20resolved\x20path','verbose','updateSegmentById','Resolved\x20relative\x20path\x20to:\x20','name','154776kxFlWa','Resolved\x20folder\x20ID:\x20','segment:update','1344640fRWjEZ','124422YeRSrK','\x27...','type','35fjsnqb','Resolved\x20type:\x20'];a32_0x4d18=function(){return _0x36d0ef;};return a32_0x4d18();}const a32_0x306c28=a32_0x584c;(function(_0x314fd6,_0x33d0e7){const _0x316758=a32_0x584c,_0x35cfc1=_0x314fd6();while(!![]){try{const _0x197dd6=parseInt(_0x316758(0x18a))/0x1+-parseInt(_0x316758(0x1a8))/0x2*(parseInt(_0x316758(0x1a9))/0x3)+-parseInt(_0x316758(0x191))/0x4*(-parseInt(_0x316758(0x198))/0x5)+parseInt(_0x316758(0x195))/0x6*(-parseInt(_0x316758(0x180))/0x7)+parseInt(_0x316758(0x194))/0x8+-parseInt(_0x316758(0x186))/0x9+parseInt(_0x316758(0x187))/0xa;if(_0x197dd6===_0x33d0e7)break;else _0x35cfc1['push'](_0x35cfc1['shift']());}catch(_0x5a43b1){_0x35cfc1['push'](_0x35cfc1['shift']());}}}(a32_0x4d18,0x345d1));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x97844e from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']=a32_0x306c28(0x193);[a32_0x306c28(0x184)]='Update\x20existing\x20child\x20segment';async[a32_0x306c28(0x19a)](_0x55d677){const _0x28b38a=a32_0x306c28;console['error'](a32_0x97844e[_0x28b38a(0x1a0)](_0x28b38a(0x19e))),console[_0x28b38a(0x188)](a32_0x97844e[_0x28b38a(0x1a0)](_0x28b38a(0x1a1)));const {options:_0x409280,args:_0x1df43f,tdx:_0x453b5f}=_0x55d677,_0x4354e9=_0x409280;if(_0x1df43f['length']===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x28b38a(0x188)](_0x28b38a(0x19c)),console[_0x28b38a(0x188)]('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x28b38a(0x188)](_0x28b38a(0x18b)),0x1;const _0xeee98e=_0x1df43f[0x0],_0x3df904=_0x409280['segmentPath'];let _0x336f17=_0xeee98e;_0x3df904&&!_0xeee98e[_0x28b38a(0x189)]('/')&&(_0x336f17=_0x3df904+'/'+_0xeee98e,_0x4354e9[_0x28b38a(0x18d)]&&console[_0x28b38a(0x188)](_0x28b38a(0x18f)+_0x336f17));const _0x5d23fb=await withSpinner('Resolving\x20path\x20\x27'+_0x336f17+_0x28b38a(0x196),()=>_0x453b5f[_0x28b38a(0x1a3)]['resolvePathToResource'](_0x336f17),{'verbose':_0x4354e9[_0x28b38a(0x18d)]}),_0x19a9e8=_0x5d23fb[_0x28b38a(0x182)];_0x4354e9[_0x28b38a(0x18d)]&&console['error'](_0x28b38a(0x199)+_0x19a9e8[_0x28b38a(0x197)]);if(_0x19a9e8[_0x28b38a(0x197)]!=='segment')return console[_0x28b38a(0x188)](_0x28b38a(0x185)+_0x19a9e8['type']+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x28b38a(0x188)](_0x28b38a(0x1aa)),0x1;if(!_0x19a9e8[_0x28b38a(0x1a5)])throw new SDKError(ErrorCode[_0x28b38a(0x1ab)],_0x28b38a(0x18c));const _0x4655f4=_0x19a9e8['parentId'],_0x1cb945=_0x19a9e8[_0x28b38a(0x1a5)];_0x4354e9[_0x28b38a(0x18d)]&&(console['error'](_0x28b38a(0x1a7)+_0x4655f4),console[_0x28b38a(0x188)]('Segment\x20ID:\x20'+_0x1cb945));let _0x4ab93b;if(_0x4354e9['folder']){const _0x556aa1=_0x4354e9[_0x28b38a(0x1a2)],_0x20c6b7=await withSpinner(_0x28b38a(0x1ac)+_0x556aa1+_0x28b38a(0x196),()=>_0x453b5f['segment'][_0x28b38a(0x183)](_0x4655f4,_0x556aa1),{'verbose':_0x4354e9[_0x28b38a(0x18d)]});_0x4ab93b=parseInt(_0x20c6b7[_0x28b38a(0x182)],0xa),_0x4354e9[_0x28b38a(0x18d)]&&console['error'](_0x28b38a(0x192)+_0x4ab93b);}const _0x5c35e5=await loadJSONFromOptions(_0x4354e9[_0x28b38a(0x19f)],_0x4354e9['ruleFile']),_0x3e4908={'name':_0x4354e9[_0x28b38a(0x190)],'description':_0x4354e9[_0x28b38a(0x184)],'rule':_0x5c35e5,'kind':_0x4354e9['kind']!==undefined?parseInt(_0x4354e9[_0x28b38a(0x19d)],0xa):undefined,'segmentFolderId':_0x4ab93b},_0x56b5ca=await withSpinner(_0x28b38a(0x181)+_0x19a9e8[_0x28b38a(0x1a4)]+_0x28b38a(0x196),()=>_0x453b5f[_0x28b38a(0x1a3)][_0x28b38a(0x18e)](_0x4655f4,_0x1cb945,_0x3e4908),{'verbose':_0x4354e9[_0x28b38a(0x18d)]}),_0x1ef469=_0x56b5ca[_0x28b38a(0x182)];return console['error'](_0x28b38a(0x19b)+_0x1ef469['name']+'\x27'),_0x336f17!==_0xeee98e&&console[_0x28b38a(0x188)](_0x28b38a(0x1a6)+_0x336f17),await handleSDKOutput([_0x1ef469],_0x4354e9),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a33_0x1564(){const _0x44b836=['✔\x20Context\x20set\x20to:\x20','5140923BTUviu','1626528wLFMEk','Target\x20path:\x20','length','green','parentId','isAbsolute','Parent\x20ID:\x20','red','Usage:\x20tdx\x20segment\x20use\x20<path>','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','1351305EtLeeO','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','description','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','dim','isDirectory','data','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','error','\x27...','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','site','Site:\x20','56098970jWayth','config','split','Examples:','segment','folderId','138721soABls','log','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','12buiYyp','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','parentName','segments','14ZaQjnB','Error:\x20Path\x20is\x20required\x0a','type','Use:\x20tdx\x20segment\x20use\x20','session','Resolving\x20path\x20\x27','fullPath','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','22hMkNFZ','cyan','resolvePathToResource','segmentPath','verbose','2294964VmyuRb','join','execute','Resolved\x20relative\x20path\x20to:\x20','Folder\x20ID:\x20','folderPath','11286168yKiUDg'];a33_0x1564=function(){return _0x44b836;};return a33_0x1564();}const a33_0xa7228c=a33_0x136f;(function(_0x337a2f,_0x84e205){const _0x4a8963=a33_0x136f,_0x5bdac0=_0x337a2f();while(!![]){try{const _0x533946=parseInt(_0x4a8963(0xf6))/0x1*(parseInt(_0x4a8963(0x106))/0x2)+parseInt(_0x4a8963(0xd6))/0x3+-parseInt(_0x4a8963(0xf9))/0x4*(-parseInt(_0x4a8963(0xe2))/0x5)+parseInt(_0x4a8963(0xd4))/0x6+parseInt(_0x4a8963(0xfe))/0x7*(parseInt(_0x4a8963(0xd7))/0x8)+parseInt(_0x4a8963(0xce))/0x9+-parseInt(_0x4a8963(0xf0))/0xa;if(_0x533946===_0x84e205)break;else _0x5bdac0['push'](_0x5bdac0['shift']());}catch(_0x3bc292){_0x5bdac0['push'](_0x5bdac0['shift']());}}}(a33_0x1564,0xf004a));import{existsSync,statSync}from'fs';import a33_0x2dc66e from'chalk';import{BaseCommand}from'./command.js';function a33_0x136f(_0x137a25,_0x2e1ab6){_0x137a25=_0x137a25-0xce;const _0x1564d3=a33_0x1564();let _0x136f2b=_0x1564d3[_0x137a25];return _0x136f2b;}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';[a33_0xa7228c(0xe5)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a33_0xa7228c(0xd0)](_0x68beff){const _0x5c54e8=a33_0xa7228c,{options:_0x3c8e01,args:_0x4c6c06,tdx:_0x1a0a32}=_0x68beff;if(_0x4c6c06[_0x5c54e8(0xd9)]===0x0)return console['error'](a33_0x2dc66e['red'](_0x5c54e8(0xff))),console[_0x5c54e8(0xeb)](_0x5c54e8(0xdf)),console[_0x5c54e8(0xeb)](_0x5c54e8(0xf3)),console[_0x5c54e8(0xeb)](_0x5c54e8(0xea)),console[_0x5c54e8(0xeb)](_0x5c54e8(0x105)),console[_0x5c54e8(0xeb)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console['error'](_0x5c54e8(0xe0)),0x1;const _0x291873=_0x4c6c06[0x0],_0x13c663=_0x3c8e01[_0x5c54e8(0x102)];try{if(_0x291873==='/')return saveSessionContext({'segment_path':undefined},_0x13c663),console['log'](a33_0x2dc66e['green'](_0x5c54e8(0xfa))),0x0;if(existsSync(_0x291873)&&statSync(_0x291873)[_0x5c54e8(0xe8)]()){let _0x1e2b16;try{_0x1e2b16=findTdxConfig(_0x291873);}catch{return console['error'](a33_0x2dc66e[_0x5c54e8(0xde)](_0x5c54e8(0xe1)+_0x291873)),console[_0x5c54e8(0xeb)](a33_0x2dc66e['cyan'](_0x5c54e8(0xe4))),0x1;}const _0xe1961a=_0x1e2b16[_0x5c54e8(0xf1)]['parent_segment'];return saveSessionContext({'segment_path':_0xe1961a,'parent_segment':_0xe1961a},_0x13c663),console['log'](a33_0x2dc66e[_0x5c54e8(0xda)](_0x5c54e8(0xd5)+a33_0x2dc66e[_0x5c54e8(0x107)](_0xe1961a))),0x0;}const _0x1a7ede=_0x3c8e01[_0x5c54e8(0x109)];let _0x41fc26=_0x291873;const _0x26509b=parsePath(_0x291873);if(!_0x26509b[_0x5c54e8(0xdc)]){if(!_0x1a7ede)return console[_0x5c54e8(0xeb)](a33_0x2dc66e[_0x5c54e8(0xde)](_0x5c54e8(0xe3))),console[_0x5c54e8(0xeb)](a33_0x2dc66e[_0x5c54e8(0x107)](_0x5c54e8(0xe6))),0x1;if(_0x291873==='..'){const _0x19f74d=_0x1a7ede[_0x5c54e8(0xf2)]('/')['slice'](0x0,-0x1)[_0x5c54e8(0xcf)]('/');_0x41fc26=_0x19f74d||'/';}else _0x291873==='.'?_0x41fc26=_0x1a7ede:_0x41fc26=_0x1a7ede+'/'+_0x291873;_0x3c8e01[_0x5c54e8(0x10a)]&&console[_0x5c54e8(0xeb)](_0x5c54e8(0xd1)+_0x41fc26);}if(_0x41fc26==='/'||_0x41fc26==='')return saveSessionContext({'segment_path':undefined},_0x13c663),console[_0x5c54e8(0xf7)](a33_0x2dc66e['green'](_0x5c54e8(0xfa))),0x0;_0x41fc26=normalizePath(_0x41fc26);const _0x3cdd27=parsePath(_0x41fc26)[_0x5c54e8(0xfd)];if(_0x3cdd27['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x13c663),console[_0x5c54e8(0xf7)](a33_0x2dc66e[_0x5c54e8(0xda)](_0x5c54e8(0xfa))),0x0;_0x3c8e01['verbose']&&(console['error'](_0x5c54e8(0xef)+_0x3c8e01[_0x5c54e8(0xee)]),console[_0x5c54e8(0xeb)](_0x5c54e8(0xd8)+_0x41fc26));const _0x17b69e=await withSpinner(_0x5c54e8(0x103)+_0x41fc26+_0x5c54e8(0xec),()=>_0x1a0a32[_0x5c54e8(0xf4)][_0x5c54e8(0x108)](_0x41fc26),{'verbose':_0x3c8e01[_0x5c54e8(0x10a)]}),_0x323910=_0x17b69e[_0x5c54e8(0xe9)];_0x3c8e01[_0x5c54e8(0x10a)]&&(console[_0x5c54e8(0xeb)]('Resolved\x20path\x20type:\x20'+_0x323910[_0x5c54e8(0x100)]),console[_0x5c54e8(0xeb)](_0x5c54e8(0xdd)+_0x323910[_0x5c54e8(0xdb)]),_0x323910['folderId']&&console['error'](_0x5c54e8(0xd2)+_0x323910[_0x5c54e8(0xf5)]));if(_0x323910['type']===_0x5c54e8(0xf4))return console[_0x5c54e8(0xeb)](a33_0x2dc66e['red'](_0x5c54e8(0xf8))),console[_0x5c54e8(0xeb)](_0x5c54e8(0xfb)),console[_0x5c54e8(0xeb)](a33_0x2dc66e['cyan'](_0x5c54e8(0x101)+_0x323910[_0x5c54e8(0xfc)]+(_0x323910['folderPath']?'/'+_0x323910[_0x5c54e8(0xd3)][_0x5c54e8(0xcf)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x323910[_0x5c54e8(0x104)],'parent_segment':_0x323910[_0x5c54e8(0xfc)]},_0x13c663),console[_0x5c54e8(0xf7)](a33_0x2dc66e[_0x5c54e8(0xda)](_0x5c54e8(0xd5)+a33_0x2dc66e[_0x5c54e8(0x107)](_0x323910['fullPath']))),_0x3c8e01['verbose']&&(console[_0x5c54e8(0xeb)](a33_0x2dc66e[_0x5c54e8(0xe7)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console[_0x5c54e8(0xeb)](a33_0x2dc66e['dim'](_0x5c54e8(0xed)))),0x0;}catch(_0x37b3b0){throw _0x37b3b0;}}}
|