@treasuredata/tdx 0.10.0 → 0.10.1

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.
Files changed (135) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/api-command.js +1 -1
  8. package/dist/commands/auth-command.js +1 -1
  9. package/dist/commands/chat-command.js +1 -1
  10. package/dist/commands/claude-command.js +1 -1
  11. package/dist/commands/claude-statusline-command.js +1 -1
  12. package/dist/commands/claude-usage-command.js +1 -1
  13. package/dist/commands/command.js +1 -1
  14. package/dist/commands/connection-command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/llm-proxy.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profiles-command.js +1 -1
  26. package/dist/commands/query-command.js +1 -1
  27. package/dist/commands/segment-command.js +1 -1
  28. package/dist/commands/segment-create-command.js +1 -1
  29. package/dist/commands/segment-fields-command.js +1 -1
  30. package/dist/commands/segment-pull-command.js +1 -1
  31. package/dist/commands/segment-push-command.js +1 -1
  32. package/dist/commands/segment-update-command.js +1 -1
  33. package/dist/commands/segment-use-command.js +1 -1
  34. package/dist/commands/segment-validate-command.js +1 -1
  35. package/dist/commands/segments.js +1 -1
  36. package/dist/commands/show.js +1 -1
  37. package/dist/commands/tables.js +1 -1
  38. package/dist/commands/use-command.js +1 -1
  39. package/dist/commands/user-command.js +1 -1
  40. package/dist/commands/workflow-command.js +1 -1
  41. package/dist/core/auth.js +1 -1
  42. package/dist/core/command-output.js +1 -1
  43. package/dist/core/config.js +1 -1
  44. package/dist/core/connection-cache.js +1 -1
  45. package/dist/core/constants.js +1 -1
  46. package/dist/core/credential-cache.js +1 -1
  47. package/dist/core/global-context.js +1 -1
  48. package/dist/core/keychain.js +1 -1
  49. package/dist/core/profile.js +1 -1
  50. package/dist/core/project-config.js +1 -1
  51. package/dist/core/session.js +1 -1
  52. package/dist/core/user-cache.js +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/proxy/anthropic-adapter.js +1 -1
  55. package/dist/proxy/claude-usage-tracker.js +1 -1
  56. package/dist/proxy/context-signature.js +1 -1
  57. package/dist/proxy/conversation-utils.js +1 -1
  58. package/dist/proxy/server.js +1 -1
  59. package/dist/proxy/session-cache.js +1 -1
  60. package/dist/sdk/agent/agent-config.js +1 -1
  61. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  62. package/dist/sdk/agent/agent-yaml.js +1 -1
  63. package/dist/sdk/api.js +1 -1
  64. package/dist/sdk/client/cdp-api-client.js +1 -1
  65. package/dist/sdk/client/endpoints.js +1 -1
  66. package/dist/sdk/client/engage-api-client.js +1 -1
  67. package/dist/sdk/client/http-client.js +1 -1
  68. package/dist/sdk/client/llm-api-client.js +1 -1
  69. package/dist/sdk/client/rate-limiter.js +1 -1
  70. package/dist/sdk/client/td-api-client.js +1 -1
  71. package/dist/sdk/client/trino-api-client.js +1 -1
  72. package/dist/sdk/client/workflow-client.js +1 -1
  73. package/dist/sdk/connection-validator.js +1 -1
  74. package/dist/sdk/connection.js +1 -1
  75. package/dist/sdk/engage.js +1 -1
  76. package/dist/sdk/errors.js +1 -1
  77. package/dist/sdk/index.js +1 -1
  78. package/dist/sdk/io/index.js +1 -1
  79. package/dist/sdk/io/node-filesystem.js +1 -1
  80. package/dist/sdk/job.js +1 -1
  81. package/dist/sdk/journey.js +1 -1
  82. package/dist/sdk/llm/chat-cache.js +1 -1
  83. package/dist/sdk/llm/index.js +1 -1
  84. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  85. package/dist/sdk/llm/model-aliases.js +1 -1
  86. package/dist/sdk/llm/model-factors.js +1 -1
  87. package/dist/sdk/query/index.js +1 -1
  88. package/dist/sdk/query/sql-parser.js +1 -1
  89. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  90. package/dist/sdk/segment/fields-display.js +1 -1
  91. package/dist/sdk/segment/file-discovery.js +1 -1
  92. package/dist/sdk/segment/journey-utils.js +1 -1
  93. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  94. package/dist/sdk/segment/journey-yaml.js +1 -1
  95. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  96. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  97. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  98. package/dist/sdk/segment/pull-workflow.js +1 -1
  99. package/dist/sdk/segment/push-workflow.js +1 -1
  100. package/dist/sdk/segment/push-workflow.js.map +1 -1
  101. package/dist/sdk/segment/resolution-context.js +1 -1
  102. package/dist/sdk/segment/segment-path-parser.js +1 -1
  103. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  104. package/dist/sdk/segment/target-resolution.js +1 -1
  105. package/dist/sdk/segment/tdx-config.js +1 -1
  106. package/dist/sdk/segment/validate-files.js +1 -1
  107. package/dist/sdk/segment/yaml-validator.js +1 -1
  108. package/dist/sdk/segment.js +1 -1
  109. package/dist/sdk/types/cdp.d.ts +5 -2
  110. package/dist/sdk/types/cdp.d.ts.map +1 -1
  111. package/dist/sdk/types/index.js +1 -1
  112. package/dist/sdk/types/progress.js +1 -1
  113. package/dist/sdk/user.js +1 -1
  114. package/dist/sdk/util/format-detector.js +1 -1
  115. package/dist/sdk/util/formatters.js +1 -1
  116. package/dist/sdk/util/index.js +1 -1
  117. package/dist/sdk/util/tree-formatter.js +1 -1
  118. package/dist/sdk/workflow/index.js +1 -1
  119. package/dist/sdk/workflow/workflow-utils.js +1 -1
  120. package/dist/utils/async.js +1 -1
  121. package/dist/utils/colors.js +1 -1
  122. package/dist/utils/diff.js +1 -1
  123. package/dist/utils/file-permissions.js +1 -1
  124. package/dist/utils/json-loader.js +1 -1
  125. package/dist/utils/option-validation.js +1 -1
  126. package/dist/utils/port.js +1 -1
  127. package/dist/utils/process.js +1 -1
  128. package/dist/utils/prompt.js +1 -1
  129. package/dist/utils/spinner.js +1 -1
  130. package/dist/utils/sse-parser.js +1 -1
  131. package/dist/utils/string-utils.js +1 -1
  132. package/dist/utils/table-ref-parser.js +1 -1
  133. package/dist/utils/tdx-logger.js +1 -1
  134. package/dist/utils/version-check.js +1 -1
  135. package/package.json +1 -1
@@ -1 +1 @@
1
- const a27_0x143650=a27_0x5574;(function(_0x2e43ee,_0x203427){const _0x3cc696=a27_0x5574,_0x4ae89f=_0x2e43ee();while(!![]){try{const _0x14fe6e=-parseInt(_0x3cc696(0x121))/0x1*(parseInt(_0x3cc696(0x10a))/0x2)+parseInt(_0x3cc696(0x116))/0x3*(-parseInt(_0x3cc696(0x11e))/0x4)+parseInt(_0x3cc696(0x120))/0x5*(-parseInt(_0x3cc696(0x10c))/0x6)+parseInt(_0x3cc696(0x117))/0x7*(-parseInt(_0x3cc696(0x107))/0x8)+parseInt(_0x3cc696(0x105))/0x9+-parseInt(_0x3cc696(0x104))/0xa+-parseInt(_0x3cc696(0x108))/0xb*(-parseInt(_0x3cc696(0x10e))/0xc);if(_0x14fe6e===_0x203427)break;else _0x4ae89f['push'](_0x4ae89f['shift']());}catch(_0x4e4b27){_0x4ae89f['push'](_0x4ae89f['shift']());}}}(a27_0xa2fd,0x26139));import{BaseCommand}from'./command.js';function a27_0xa2fd(){const _0xb7df10=['Parent\x20segment:\x20','843nTfTSs','10171MIGjXH','error','listFields','List\x20available\x20fields\x20for\x20segmentation','\x27...','\x20field','Error:\x20Parent\x20segment\x20name\x20is\x20required','2284coMOzt','verbose','1000GXnEpc','246607iRHppr','2261180himdTa','1178748OkQdEC','✔\x20Found\x20','664DUbjSK','11iePTdV','site','2PplZIb','parentSegment','3702gvCkGv','execute','10825968vRUetx','Site:\x20','segment','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','json','length','Listing\x20fields\x20for\x20\x27'];a27_0xa2fd=function(){return _0xb7df10;};return a27_0xa2fd();}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a27_0x5574(_0x44d161,_0x37ddaf){_0x44d161=_0x44d161-0x104;const _0xa2fd6a=a27_0xa2fd();let _0x557445=_0xa2fd6a[_0x44d161];return _0x557445;}import{displayFieldsHumanReadable}from'../sdk/segment/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{['name']='segment:fields';['description']=a27_0x143650(0x11a);async[a27_0x143650(0x10d)](_0x19340d){const _0x33af55=a27_0x143650,{options:_0x2b7ea5,args:_0x88c20,tdx:_0x2509e4}=_0x19340d,_0x2f9dae=_0x88c20[0x0]||_0x2b7ea5[_0x33af55(0x10b)];if(!_0x2f9dae)return console[_0x33af55(0x118)](_0x33af55(0x11d)),console[_0x33af55(0x118)](_0x33af55(0x111)),console['error']('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;_0x2b7ea5['verbose']&&(console['error'](_0x33af55(0x10f)+_0x2b7ea5[_0x33af55(0x109)]),console[_0x33af55(0x118)](_0x33af55(0x115)+_0x2f9dae));const _0x5e92db=await withSpinner(_0x33af55(0x114)+_0x2f9dae+_0x33af55(0x11b),()=>_0x2509e4[_0x33af55(0x110)][_0x33af55(0x119)](_0x2f9dae),{'verbose':_0x2b7ea5[_0x33af55(0x11f)]}),_0x4eeab5=_0x5e92db['data'];console[_0x33af55(0x118)](_0x33af55(0x106)+_0x4eeab5[_0x33af55(0x113)]+_0x33af55(0x11c)+(_0x4eeab5['length']!==0x1?'s':''));if(_0x2b7ea5[_0x33af55(0x112)]||_0x2b7ea5['jsonl'])return await handleSDKOutput(_0x4eeab5,_0x2b7ea5),0x0;return displayFieldsHumanReadable(_0x4eeab5,_0x2f9dae),0x0;}}
1
+ const a27_0x12c87b=a27_0x5daf;function a27_0x5daf(_0x2f83cd,_0xe6117){_0x2f83cd=_0x2f83cd-0x1c9;const _0x23c53e=a27_0x23c5();let _0x5daf88=_0x23c53e[_0x2f83cd];return _0x5daf88;}(function(_0x50c78c,_0x4179b4){const _0x17e306=a27_0x5daf,_0x5140e9=_0x50c78c();while(!![]){try{const _0x3041c3=-parseInt(_0x17e306(0x1d4))/0x1+-parseInt(_0x17e306(0x1dc))/0x2*(-parseInt(_0x17e306(0x1ca))/0x3)+parseInt(_0x17e306(0x1d8))/0x4*(parseInt(_0x17e306(0x1ce))/0x5)+parseInt(_0x17e306(0x1db))/0x6+parseInt(_0x17e306(0x1d6))/0x7+parseInt(_0x17e306(0x1d7))/0x8*(-parseInt(_0x17e306(0x1de))/0x9)+-parseInt(_0x17e306(0x1e5))/0xa*(parseInt(_0x17e306(0x1cf))/0xb);if(_0x3041c3===_0x4179b4)break;else _0x5140e9['push'](_0x5140e9['shift']());}catch(_0x5a28fc){_0x5140e9['push'](_0x5140e9['shift']());}}}(a27_0x23c5,0x8cfd1));import{BaseCommand}from'./command.js';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{[a27_0x12c87b(0x1d5)]=a27_0x12c87b(0x1df);['description']=a27_0x12c87b(0x1dd);async[a27_0x12c87b(0x1d1)](_0x6fce5f){const _0x5bec54=a27_0x12c87b,{options:_0x2a65d7,args:_0x5a0a64,tdx:_0x454815}=_0x6fce5f,_0x508cc4=_0x5a0a64[0x0]||_0x2a65d7[_0x5bec54(0x1e2)];if(!_0x508cc4)return console['error'](_0x5bec54(0x1d0)),console[_0x5bec54(0x1e1)]('Usage:\x20tdx\x20segment\x20fields\x20<parent_name>'),console['error'](_0x5bec54(0x1cc)),0x1;_0x2a65d7[_0x5bec54(0x1d2)]&&(console['error']('Site:\x20'+_0x2a65d7[_0x5bec54(0x1e4)]),console[_0x5bec54(0x1e1)](_0x5bec54(0x1cd)+_0x508cc4));const _0x307a68=await withSpinner(_0x5bec54(0x1d3)+_0x508cc4+_0x5bec54(0x1cb),()=>_0x454815['segment'][_0x5bec54(0x1d9)](_0x508cc4),{'verbose':_0x2a65d7[_0x5bec54(0x1d2)]}),_0x75c5dd=_0x307a68[_0x5bec54(0x1e0)];console[_0x5bec54(0x1e1)]('✔\x20Found\x20'+_0x75c5dd[_0x5bec54(0x1da)]+'\x20field'+(_0x75c5dd['length']!==0x1?'s':''));if(_0x2a65d7[_0x5bec54(0x1c9)]||_0x2a65d7[_0x5bec54(0x1e3)])return await handleSDKOutput(_0x75c5dd,_0x2a65d7),0x0;return displayFieldsHumanReadable(_0x75c5dd,_0x508cc4),0x0;}}function a27_0x23c5(){const _0x24b73f=['verbose','Listing\x20fields\x20for\x20\x27','1219AIKlQw','name','2990645EEBjez','285976HjWijC','3236SetTjv','listFields','length','3958710AoABoe','2HNeqGT','List\x20available\x20fields\x20for\x20segmentation','261xnlTSc','segment:fields','data','error','parentSegment','jsonl','site','501820kNSfKA','json','2398530fGVBDT','\x27...','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','Parent\x20segment:\x20','185OuQgNv','66StBarg','Error:\x20Parent\x20segment\x20name\x20is\x20required','execute'];a27_0x23c5=function(){return _0x24b73f;};return a27_0x23c5();}
@@ -1 +1 @@
1
- const a28_0x1e5bd1=a28_0x1ea9;(function(_0x21bf6f,_0x34c529){const _0x3053ba=a28_0x1ea9,_0x2c4dd3=_0x21bf6f();while(!![]){try{const _0x1b3686=parseInt(_0x3053ba(0xaf))/0x1*(-parseInt(_0x3053ba(0xa7))/0x2)+parseInt(_0x3053ba(0xa1))/0x3*(parseInt(_0x3053ba(0xd1))/0x4)+parseInt(_0x3053ba(0xe2))/0x5+parseInt(_0x3053ba(0xc4))/0x6+-parseInt(_0x3053ba(0xb8))/0x7*(-parseInt(_0x3053ba(0xc8))/0x8)+-parseInt(_0x3053ba(0xb6))/0x9+-parseInt(_0x3053ba(0xda))/0xa;if(_0x1b3686===_0x34c529)break;else _0x2c4dd3['push'](_0x2c4dd3['shift']());}catch(_0x4f624e){_0x2c4dd3['push'](_0x2c4dd3['shift']());}}}(a28_0x2ba9,0x5580d));function a28_0x2ba9(){const _0xc465cb=['journeys','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','no_parent','dim','error','activations','green','files','2390826JFnbFw','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','\x20journeys','\x20segments','296yNtpXm','description','\x0aPull\x20summary\x20for\x20\x27','filter','red','absolutePath','\x20unchanged\x20files','segment:pull','dirname','1135628dlCxWZ','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','content','errorCode','\x20\x20🎯\x20','diff','name','\x20changed\x20files','journeyVersions','3031980HOlfce','relativePath','isNew','pullSegments','session','✔\x20All\x20files\x20are\x20up\x20to\x20date','segment','message','2043555kDYGap','data','\x20versions)','Pulling\x20segments\x20from\x20\x27','\x20files?','length','3KYwVyI','\x20new\x20files','\x27...','verbose','targetDir','\x0aChanges\x20to\x20\x27','2rnuazG','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','execute','\x20files\x20to\x20','parentName','dryRun','✔\x20Context\x20set:\x20','\x20\x20Target:\x20','616079MJJmTF','Error:\x20','segments','counts','hasChanges','cyan','yellow','851526ZXAstI','parentSegment','51653lWcKsi','\x20=\x20','repeat','yes'];a28_0x2ba9=function(){return _0xc465cb;};return a28_0x2ba9();}import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';import a28_0x377f4f from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a28_0x580ad5 from'path';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';export{buildFolderIdToPathMap as buildFolderPathMap}from'../sdk/segment/resolution-context.js';function a28_0x1ea9(_0x192814,_0x1ac698){_0x192814=_0x192814-0xa0;const _0x2ba985=a28_0x2ba9();let _0x1ea916=_0x2ba985[_0x192814];return _0x1ea916;}export class SegmentPullCommand extends BaseCommand{[a28_0x1e5bd1(0xd7)]=a28_0x1e5bd1(0xcf);[a28_0x1e5bd1(0xc9)]=a28_0x1e5bd1(0xa8);async[a28_0x1e5bd1(0xa9)](_0x338185){const _0x373029=a28_0x1e5bd1,{options:_0x289179,args:_0x2c7f31,tdx:_0x107477}=_0x338185,_0x44ac55=_0x289179,_0x54edbb=await resolveTarget({'arg':_0x2c7f31[0x0],'contextParent':_0x289179[_0x373029(0xb7)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x54edbb))return _0x54edbb[_0x373029(0xd4)]===_0x373029(0xbe)?(console[_0x373029(0xc0)](a28_0x377f4f[_0x373029(0xb5)](_0x373029(0xbd))),console[_0x373029(0xc0)]('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)'),console[_0x373029(0xc0)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent'),console[_0x373029(0xc0)](_0x373029(0xd2))):(console[_0x373029(0xc0)](a28_0x377f4f[_0x373029(0xcc)](_0x373029(0xb0)+_0x54edbb[_0x373029(0xe1)]+'\x0a')),_0x54edbb['helpText']&&console[_0x373029(0xc0)](a28_0x377f4f[_0x373029(0xb4)](_0x54edbb['helpText']))),0x1;const _0x160176=_0x54edbb['parentName'],_0xbe2184=_0x54edbb[_0x373029(0xa5)];_0x44ac55[_0x373029(0xa4)]&&(console[_0x373029(0xc0)]('Site:\x20'+_0x44ac55['site']),console[_0x373029(0xc0)]('Parent\x20segment:\x20'+_0x160176));const _0x4fd566=await withProgressSpinner(_0x373029(0xe5)+_0x160176+_0x373029(0xa3),_0x405f51=>_0x107477[_0x373029(0xe0)][_0x373029(0xdd)](_0x160176,{'targetDir':_0xbe2184,'verbose':_0x44ac55[_0x373029(0xa4)],'progress':{'update':_0x2d9de5=>{const _0x3c7aae=_0x373029;_0x405f51['setPhase'](_0x2d9de5),_0x44ac55[_0x3c7aae(0xa4)]&&console[_0x3c7aae(0xc0)]('\x20\x20'+_0x2d9de5);}}}),{'verbose':_0x44ac55[_0x373029(0xa4)]}),_0x5baea9=_0x4fd566[_0x373029(0xe3)];if(_0x5baea9[_0x373029(0xb2)][_0x373029(0xb1)]===0x0&&_0x5baea9[_0x373029(0xb2)][_0x373029(0xbc)]===0x0)return console[_0x373029(0xc0)](a28_0x377f4f[_0x373029(0xb5)]('No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27'+_0x5baea9[_0x373029(0xab)]+'\x27')),0x0;const _0x527aaa=_0x5baea9[_0x373029(0xc3)][_0x373029(0xcb)](_0x22d1c9=>_0x22d1c9[_0x373029(0xdc)]),_0xcae220=_0x5baea9[_0x373029(0xc3)][_0x373029(0xcb)](_0x57ff84=>!_0x57ff84[_0x373029(0xdc)]&&_0x57ff84[_0x373029(0xb3)]),_0x3b449c=_0x5baea9[_0x373029(0xc3)]['filter'](_0xd51b59=>!_0xd51b59['isNew']&&!_0xd51b59[_0x373029(0xb3)]);console[_0x373029(0xc0)](_0x373029(0xca)+_0x5baea9[_0x373029(0xab)]+'\x27:'),console['error'](_0x373029(0xd5)+a28_0x377f4f[_0x373029(0xb4)](_0x5baea9['counts'][_0x373029(0xb1)]+_0x373029(0xc7))+'\x20with\x20'+a28_0x377f4f['cyan'](_0x5baea9[_0x373029(0xb2)][_0x373029(0xc1)]+'\x20activations'));if(_0x5baea9[_0x373029(0xb2)][_0x373029(0xbc)]>0x0){const _0xc1d9a=_0x5baea9[_0x373029(0xb2)][_0x373029(0xd9)]>_0x5baea9[_0x373029(0xb2)]['journeys']?'\x20('+_0x5baea9[_0x373029(0xb2)][_0x373029(0xd9)]+_0x373029(0xe4):'';console['error']('\x20\x20🗺️\x20\x20'+a28_0x377f4f[_0x373029(0xb4)](_0x5baea9[_0x373029(0xb2)][_0x373029(0xbc)]+_0x373029(0xc6))+a28_0x377f4f['dim'](_0xc1d9a));}console[_0x373029(0xc0)]('\x20\x20'+a28_0x377f4f['green']('+\x20'+_0x527aaa[_0x373029(0xa0)]+_0x373029(0xa2))),console['error']('\x20\x20'+a28_0x377f4f[_0x373029(0xb5)]('~\x20'+_0xcae220[_0x373029(0xa0)]+_0x373029(0xd8))),console['error']('\x20\x20'+a28_0x377f4f[_0x373029(0xbf)]('=\x20'+_0x3b449c[_0x373029(0xa0)]+_0x373029(0xce))),console[_0x373029(0xc0)](_0x373029(0xae)+a28_0x377f4f[_0x373029(0xb4)](_0x5baea9[_0x373029(0xa5)])+'\x0a');if(_0xcae220['length']>0x0)for(const _0x14574f of _0xcae220){console[_0x373029(0xc0)](_0x373029(0xa6)+_0x14574f[_0x373029(0xdb)]+'\x27:'),console[_0x373029(0xc0)]('─'[_0x373029(0xba)](0x3c)),console['error'](_0x14574f[_0x373029(0xd6)]),console[_0x373029(0xc0)]('─'[_0x373029(0xba)](0x3c));}if(_0x44ac55[_0x373029(0xac)])return console['error'](a28_0x377f4f[_0x373029(0xb5)](_0x373029(0xc5))),0x0;if(_0x527aaa['length']===0x0&&_0xcae220['length']===0x0)return console[_0x373029(0xc0)](a28_0x377f4f[_0x373029(0xc2)](_0x373029(0xdf))),saveSessionContext({'parent_segment':_0x5baea9[_0x373029(0xab)]},_0x44ac55[_0x373029(0xde)]),console['error'](a28_0x377f4f['green'](_0x373029(0xad)+a28_0x377f4f[_0x373029(0xbf)]('parent_segment')+_0x373029(0xb9)+a28_0x377f4f[_0x373029(0xb4)](_0x5baea9[_0x373029(0xab)]))),0x0;if(!_0x44ac55[_0x373029(0xbb)]){const _0x2c8572=await confirmKey('Write\x20'+(_0x527aaa[_0x373029(0xa0)]+_0xcae220[_0x373029(0xa0)])+_0x373029(0xe6));if(!_0x2c8572)return console[_0x373029(0xc0)]('Aborted.'),0x1;}for(const _0x483f28 of _0x5baea9[_0x373029(0xc3)]){if(_0x483f28['isNew']||_0x483f28[_0x373029(0xb3)]){const _0x1f8844=a28_0x580ad5[_0x373029(0xd0)](_0x483f28[_0x373029(0xcd)]);!existsSync(_0x1f8844)&&mkdirSync(_0x1f8844,{'recursive':!![]}),writeFileSync(_0x483f28[_0x373029(0xcd)],_0x483f28[_0x373029(0xd3)],'utf-8');}}return console[_0x373029(0xc0)](a28_0x377f4f[_0x373029(0xc2)]('✔\x20Pulled\x20'+(_0x527aaa[_0x373029(0xa0)]+_0xcae220[_0x373029(0xa0)])+_0x373029(0xaa)+_0x5baea9[_0x373029(0xa5)])),saveSessionContext({'parent_segment':_0x5baea9[_0x373029(0xab)]},_0x44ac55[_0x373029(0xde)]),console[_0x373029(0xc0)](a28_0x377f4f['green']('✔\x20Context\x20set:\x20'+a28_0x377f4f[_0x373029(0xbf)]('parent_segment')+_0x373029(0xb9)+a28_0x377f4f[_0x373029(0xb4)](_0x5baea9[_0x373029(0xab)]))),0x0;}}
1
+ const a28_0x4d4d15=a28_0x18cc;(function(_0x387515,_0x1f6913){const _0x212c3f=a28_0x18cc,_0x3ccb9d=_0x387515();while(!![]){try{const _0xb3d27b=-parseInt(_0x212c3f(0x102))/0x1+parseInt(_0x212c3f(0xf7))/0x2+parseInt(_0x212c3f(0x134))/0x3+parseInt(_0x212c3f(0x126))/0x4*(-parseInt(_0x212c3f(0x13b))/0x5)+-parseInt(_0x212c3f(0xf8))/0x6*(parseInt(_0x212c3f(0xfb))/0x7)+parseInt(_0x212c3f(0x10e))/0x8*(-parseInt(_0x212c3f(0x106))/0x9)+parseInt(_0x212c3f(0x116))/0xa;if(_0xb3d27b===_0x1f6913)break;else _0x3ccb9d['push'](_0x3ccb9d['shift']());}catch(_0x13989c){_0x3ccb9d['push'](_0x3ccb9d['shift']());}}}(a28_0x27de,0xd555e));import{BaseCommand}from'./command.js';function a28_0x27de(){const _0x195294=['name','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)','segments','\x20files\x20to\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','length','8oSXSiw','cyan','Error:\x20','parent_segment','Pulling\x20segments\x20from\x20\x27','✔\x20Context\x20set:\x20','✔\x20All\x20files\x20are\x20up\x20to\x20date','✔\x20Pulled\x20','18789670kXCTmG','journeyVersions','session','\x20=\x20','\x27...','dryRun','journeys','hasChanges','site','files','utf-8','error','\x0aPull\x20summary\x20for\x20\x27','absolutePath','filter','description','3357476ImVgER','errorCode','segment','green','isNew','activations','No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27','yellow','dim','Parent\x20segment:\x20','helpText','Write\x20','\x20\x20🎯\x20','\x20segments','3410718LlIvRH','Aborted.','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','Site:\x20','diff','parentName','\x20with\x20','5AxqjUS','data','\x20new\x20files','yes','\x20files?','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent','targetDir','2111498rLtnBm','229974oncZIR','content','repeat','266bTYvOh','setPhase','red','counts','message','\x20unchanged\x20files','\x0aChanges\x20to\x20\x27','672571WmZxZu','dirname','\x20versions)','\x20activations','2064222LSIGTZ','verbose'];a28_0x27de=function(){return _0x195294;};return a28_0x27de();}import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';import a28_0x4d638f from'chalk';function a28_0x18cc(_0x542b3f,_0xda7c8c){_0x542b3f=_0x542b3f-0xf6;const _0x27de33=a28_0x27de();let _0x18cc23=_0x27de33[_0x542b3f];return _0x18cc23;}import{existsSync,mkdirSync,writeFileSync}from'fs';import a28_0x135f3d from'path';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';export{buildFolderIdToPathMap as buildFolderPathMap}from'../sdk/segment/resolution-context.js';export class SegmentPullCommand extends BaseCommand{[a28_0x4d4d15(0x108)]='segment:pull';[a28_0x4d4d15(0x125)]='Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files';async['execute'](_0x38f0e2){const _0xba7040=a28_0x4d4d15,{options:_0x1952ff,args:_0x5c4851,tdx:_0x53edc0}=_0x38f0e2,_0x3777c7=_0x1952ff,_0x34cbc1=await resolveTarget({'arg':_0x5c4851[0x0],'contextParent':_0x1952ff['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x34cbc1))return _0x34cbc1[_0xba7040(0x127)]==='no_parent'?(console[_0xba7040(0x121)](a28_0x4d638f[_0xba7040(0x12d)](_0xba7040(0x10c))),console[_0xba7040(0x121)](_0xba7040(0x109)),console['error'](_0xba7040(0x140)),console[_0xba7040(0x121)](_0xba7040(0x136))):(console['error'](a28_0x4d638f[_0xba7040(0xfd)](_0xba7040(0x110)+_0x34cbc1[_0xba7040(0xff)]+'\x0a')),_0x34cbc1[_0xba7040(0x130)]&&console[_0xba7040(0x121)](a28_0x4d638f[_0xba7040(0x10f)](_0x34cbc1[_0xba7040(0x130)]))),0x1;const _0x478a88=_0x34cbc1['parentName'],_0x3eb549=_0x34cbc1[_0xba7040(0xf6)];_0x3777c7[_0xba7040(0x107)]&&(console[_0xba7040(0x121)](_0xba7040(0x137)+_0x3777c7[_0xba7040(0x11e)]),console['error'](_0xba7040(0x12f)+_0x478a88));const _0x517eac=await withProgressSpinner(_0xba7040(0x112)+_0x478a88+_0xba7040(0x11a),_0x1cc4b4=>_0x53edc0[_0xba7040(0x128)]['pullSegments'](_0x478a88,{'targetDir':_0x3eb549,'verbose':_0x3777c7['verbose'],'progress':{'update':_0x1b2f2a=>{const _0xc656e6=_0xba7040;_0x1cc4b4[_0xc656e6(0xfc)](_0x1b2f2a),_0x3777c7[_0xc656e6(0x107)]&&console[_0xc656e6(0x121)]('\x20\x20'+_0x1b2f2a);}}}),{'verbose':_0x3777c7[_0xba7040(0x107)]}),_0x2e1b9d=_0x517eac[_0xba7040(0x13c)];if(_0x2e1b9d[_0xba7040(0xfe)][_0xba7040(0x10a)]===0x0&&_0x2e1b9d['counts'][_0xba7040(0x11c)]===0x0)return console[_0xba7040(0x121)](a28_0x4d638f[_0xba7040(0x12d)](_0xba7040(0x12c)+_0x2e1b9d[_0xba7040(0x139)]+'\x27')),0x0;const _0x136f37=_0x2e1b9d[_0xba7040(0x11f)][_0xba7040(0x124)](_0x3b5bd7=>_0x3b5bd7[_0xba7040(0x12a)]),_0x5c58a2=_0x2e1b9d['files'][_0xba7040(0x124)](_0x4c8288=>!_0x4c8288[_0xba7040(0x12a)]&&_0x4c8288[_0xba7040(0x11d)]),_0x213392=_0x2e1b9d[_0xba7040(0x11f)][_0xba7040(0x124)](_0x443665=>!_0x443665[_0xba7040(0x12a)]&&!_0x443665[_0xba7040(0x11d)]);console['error'](_0xba7040(0x122)+_0x2e1b9d[_0xba7040(0x139)]+'\x27:'),console[_0xba7040(0x121)](_0xba7040(0x132)+a28_0x4d638f['cyan'](_0x2e1b9d['counts']['segments']+_0xba7040(0x133))+_0xba7040(0x13a)+a28_0x4d638f[_0xba7040(0x10f)](_0x2e1b9d['counts'][_0xba7040(0x12b)]+_0xba7040(0x105)));if(_0x2e1b9d[_0xba7040(0xfe)][_0xba7040(0x11c)]>0x0){const _0x3c5086=_0x2e1b9d[_0xba7040(0xfe)][_0xba7040(0x117)]>_0x2e1b9d['counts']['journeys']?'\x20('+_0x2e1b9d[_0xba7040(0xfe)][_0xba7040(0x117)]+_0xba7040(0x104):'';console[_0xba7040(0x121)]('\x20\x20🗺️\x20\x20'+a28_0x4d638f[_0xba7040(0x10f)](_0x2e1b9d[_0xba7040(0xfe)][_0xba7040(0x11c)]+'\x20journeys')+a28_0x4d638f['dim'](_0x3c5086));}console[_0xba7040(0x121)]('\x20\x20'+a28_0x4d638f['green']('+\x20'+_0x136f37[_0xba7040(0x10d)]+_0xba7040(0x13d))),console[_0xba7040(0x121)]('\x20\x20'+a28_0x4d638f[_0xba7040(0x12d)]('~\x20'+_0x5c58a2[_0xba7040(0x10d)]+'\x20changed\x20files')),console[_0xba7040(0x121)]('\x20\x20'+a28_0x4d638f[_0xba7040(0x12e)]('=\x20'+_0x213392[_0xba7040(0x10d)]+_0xba7040(0x100))),console[_0xba7040(0x121)]('\x20\x20Target:\x20'+a28_0x4d638f['cyan'](_0x2e1b9d['targetDir'])+'\x0a');if(_0x5c58a2[_0xba7040(0x10d)]>0x0)for(const _0x3a2c19 of _0x5c58a2){console[_0xba7040(0x121)](_0xba7040(0x101)+_0x3a2c19['relativePath']+'\x27:'),console[_0xba7040(0x121)]('─'[_0xba7040(0xfa)](0x3c)),console['error'](_0x3a2c19[_0xba7040(0x138)]),console['error']('─'[_0xba7040(0xfa)](0x3c));}if(_0x3777c7[_0xba7040(0x11b)])return console['error'](a28_0x4d638f[_0xba7040(0x12d)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x136f37[_0xba7040(0x10d)]===0x0&&_0x5c58a2[_0xba7040(0x10d)]===0x0)return console[_0xba7040(0x121)](a28_0x4d638f[_0xba7040(0x129)](_0xba7040(0x114))),saveSessionContext({'parent_segment':_0x2e1b9d['parentName']},_0x3777c7[_0xba7040(0x118)]),console[_0xba7040(0x121)](a28_0x4d638f[_0xba7040(0x129)]('✔\x20Context\x20set:\x20'+a28_0x4d638f[_0xba7040(0x12e)](_0xba7040(0x111))+_0xba7040(0x119)+a28_0x4d638f[_0xba7040(0x10f)](_0x2e1b9d[_0xba7040(0x139)]))),0x0;if(!_0x3777c7[_0xba7040(0x13e)]){const _0x2b6b24=await confirmKey(_0xba7040(0x131)+(_0x136f37[_0xba7040(0x10d)]+_0x5c58a2[_0xba7040(0x10d)])+_0xba7040(0x13f));if(!_0x2b6b24)return console[_0xba7040(0x121)](_0xba7040(0x135)),0x1;}for(const _0x388829 of _0x2e1b9d[_0xba7040(0x11f)]){if(_0x388829[_0xba7040(0x12a)]||_0x388829[_0xba7040(0x11d)]){const _0x5087ef=a28_0x135f3d[_0xba7040(0x103)](_0x388829[_0xba7040(0x123)]);!existsSync(_0x5087ef)&&mkdirSync(_0x5087ef,{'recursive':!![]}),writeFileSync(_0x388829[_0xba7040(0x123)],_0x388829[_0xba7040(0xf9)],_0xba7040(0x120));}}return console['error'](a28_0x4d638f[_0xba7040(0x129)](_0xba7040(0x115)+(_0x136f37[_0xba7040(0x10d)]+_0x5c58a2[_0xba7040(0x10d)])+_0xba7040(0x10b)+_0x2e1b9d[_0xba7040(0xf6)])),saveSessionContext({'parent_segment':_0x2e1b9d['parentName']},_0x3777c7[_0xba7040(0x118)]),console[_0xba7040(0x121)](a28_0x4d638f[_0xba7040(0x129)](_0xba7040(0x113)+a28_0x4d638f['dim'](_0xba7040(0x111))+_0xba7040(0x119)+a28_0x4d638f[_0xba7040(0x10f)](_0x2e1b9d['parentName']))),0x0;}}
@@ -1 +1 @@
1
- const a29_0x224275=a29_0x31eb;(function(_0x36fcbd,_0x4ad8c6){const _0x41d92e=a29_0x31eb,_0x5cbb5a=_0x36fcbd();while(!![]){try{const _0x5f324e=-parseInt(_0x41d92e(0xde))/0x1+-parseInt(_0x41d92e(0x11c))/0x2*(-parseInt(_0x41d92e(0xbe))/0x3)+parseInt(_0x41d92e(0x122))/0x4*(parseInt(_0x41d92e(0xed))/0x5)+parseInt(_0x41d92e(0x145))/0x6+-parseInt(_0x41d92e(0xf1))/0x7*(-parseInt(_0x41d92e(0x112))/0x8)+parseInt(_0x41d92e(0xd5))/0x9+-parseInt(_0x41d92e(0x146))/0xa;if(_0x5f324e===_0x4ad8c6)break;else _0x5cbb5a['push'](_0x5cbb5a['shift']());}catch(_0xda9581){_0x5cbb5a['push'](_0x5cbb5a['shift']());}}}(a29_0x42c0,0xc470a));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';function a29_0x31eb(_0x401b65,_0x11fb11){_0x401b65=_0x401b65-0xb9;const _0x42c09a=a29_0x42c0();let _0x31ebac=_0x42c09a[_0x401b65];return _0x31ebac;}import{confirmKey}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a29_0x1ee904 from'chalk';import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';function a29_0x42c0(){const _0x62e091=['Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','attributes','audienceId','helpText','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','Error:\x20Directory\x20not\x20found:\x20','Fetching\x20parent\x20segment\x20details...','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','deleted','buildUserMaps','delete','8276553IcYkzH','endsWith','error','verbose','/j/da/je','toCreate','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','No\x20','1491994iNzPHx','journeysOnly','getParent','\x20changes?','type','add','\x20\x20\x20\x20','journeys','push','join','setPhase','connection','nameToType','relationships','journeyBundleName','30085ItfhLe','(Journey\x20will\x20be\x20deleted)','\x20created','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','63aoPGrA','description','segment:push','Delete\x20segment:','toDelete','paused','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','\x20to\x20delete','\x20activations]','\x20deleted','isNew','\x20unchanged','cyan','listSegments','scopedFolderPath','folderPath','data','\x20to\x20update','folders','Changes\x20to\x20journey:','set','listFolders','site','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','/e/','message','journey','Site:\x20','red','green','Push\x20','updatedAt','list','1224904RKKXBz','\x27...','blue','map','\x20\x20📊\x20Segments:','createdSegmentIds','journeyId','yes','versionNumber','execute','3984laHubB','.yml','\x20\x20Source:\x20','segment','\x20updated','changed','392gVHUNb','Fetching\x20existing\x20journeys...','/app/ps/','user','toString','filePath','segment\x20or\x20journey','\x20\x20Activations:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20\x20Activations:\x20','\x20folders\x20to\x20create','\x20changed','unchanged','dim','\x20\x20🗺️\x20\x20Journeys:','Folders\x20to\x20create:','idToName','parent_name','Parent\x20segment:\x20','📁\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Delete\x20journey:','listActivations','name','updated','segmentFolderId','yamlConfig','Scoped\x20to\x20folder:\x20','existingJourney','parentSegment','.yaml','diff','journeyBundleId','\x20new','created','1356060xoJTRZ','15079220cmrcGe','results','yellow','all','getOutputSchemaWithCache','then','errorCode','length','folderId','filter','New\x20journey:','segments','1041AdjZtX','Source\x20directory:\x20','Fetching\x20existing\x20segments...','nameToId','getJourney','New\x20segment:','get','\x20\x20Segments:\x20','cwd','repeat','activations','✔\x20All\x20journeys\x20are\x20up\x20to\x20date'];a29_0x42c0=function(){return _0x62e091;};return a29_0x42c0();}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{[a29_0x224275(0x139)]=a29_0x224275(0xf3);['description']=a29_0x224275(0x108);async[a29_0x224275(0x11b)](_0x46c5a0){const _0x443d5e=a29_0x224275,{options:_0x46ae5e,args:_0x2b5c4f,tdx:_0x32104d}=_0x46c5a0,_0x561725=_0x46ae5e,_0x18c0f7=await resolveTarget({'arg':_0x2b5c4f[0x0],'contextParent':_0x46ae5e[_0x443d5e(0x13f)],'cwd':process[_0x443d5e(0xc6)]()});if(!isSuccessfulResolution(_0x18c0f7))return _0x18c0f7[_0x443d5e(0x14c)]==='no_parent'?(console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x148)](_0x443d5e(0x12a))),console['error']('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)'),console[_0x443d5e(0xd7)](_0x443d5e(0xd1)),console[_0x443d5e(0xd7)](_0x443d5e(0xdb))):(console['error'](a29_0x1ee904[_0x443d5e(0x10d)]('Error:\x20'+_0x18c0f7[_0x443d5e(0x10a)]+'\x0a')),_0x18c0f7[_0x443d5e(0xcd)]&&console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0xfd)](_0x18c0f7['helpText']))),0x1;if(_0x18c0f7['type']===_0x443d5e(0x133))return console['error'](a29_0x1ee904[_0x443d5e(0x10d)](_0x443d5e(0xcf)+_0x18c0f7['targetDir']+'\x0a')),console['error'](a29_0x1ee904[_0x443d5e(0xfd)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;const _0x4ee266=_0x18c0f7['parentName'],_0x596fed=_0x18c0f7['targetDir'],_0x58d384=_0x18c0f7[_0x443d5e(0xe2)]==='file'?_0x18c0f7[_0x443d5e(0x127)]:undefined,_0x42a9cc=getScopedDetails(_0x18c0f7),_0x286ade=_0x42a9cc?.['isScoped']??![],_0x30a371=_0x42a9cc?.[_0x443d5e(0xff)]??'';if(!existsSync(_0x596fed))return console['error'](a29_0x1ee904['red'](_0x443d5e(0xcf)+_0x596fed+'\x0a')),console['error'](a29_0x1ee904['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;_0x561725[_0x443d5e(0xd8)]&&(console[_0x443d5e(0xd7)](_0x443d5e(0x10c)+_0x561725[_0x443d5e(0x107)]),console[_0x443d5e(0xd7)](_0x443d5e(0x134)+_0x4ee266),console[_0x443d5e(0xd7)](_0x443d5e(0xbf)+_0x596fed),_0x286ade&&console[_0x443d5e(0xd7)](_0x443d5e(0x13d)+_0x30a371));const _0x2003ab=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4ee266+_0x443d5e(0x113),()=>_0x32104d[_0x443d5e(0x11f)]['resolveParentId'](_0x4ee266),{'verbose':_0x561725[_0x443d5e(0xd8)]}),_0x4852f3=_0x2003ab[_0x443d5e(0x101)],[_0x1dffa0,_0x587398,_0x41918e,_0x49d82b,_0x9fe65c]=await Promise[_0x443d5e(0x149)]([withSpinner(_0x443d5e(0xd0),()=>_0x32104d[_0x443d5e(0x11f)][_0x443d5e(0xe0)](_0x4852f3),{'verbose':_0x561725[_0x443d5e(0xd8)]}),withSpinner(_0x443d5e(0xc0),()=>_0x32104d[_0x443d5e(0x11f)][_0x443d5e(0xfe)](_0x4852f3),{'verbose':_0x561725['verbose']}),withSpinner('Fetching\x20existing\x20folders...',()=>_0x32104d[_0x443d5e(0x11f)][_0x443d5e(0x106)](_0x4852f3),{'verbose':_0x561725[_0x443d5e(0xd8)]}),withSpinner(_0x443d5e(0x123),()=>_0x32104d[_0x443d5e(0x10b)]['listJourneysWithDetailsFromParentSegment'](_0x4852f3),{'verbose':_0x561725['verbose']}),withSpinner('Fetching\x20users\x20for\x20email\x20resolution...',()=>_0x32104d[_0x443d5e(0x125)][_0x443d5e(0xd3)](),{'verbose':_0x561725[_0x443d5e(0xd8)]})[_0x443d5e(0x14b)](_0x3ffbf=>_0x3ffbf[_0x443d5e(0x101)])]),_0x5205af=_0x1dffa0[_0x443d5e(0x101)],_0x458502=extractRootFolderId(_0x5205af),_0x67ff74=_0x587398[_0x443d5e(0x101)],_0x3371a1=_0x41918e[_0x443d5e(0x101)],{journeys:_0x527e45,activationStepsById:_0x2f51f4}=_0x49d82b[_0x443d5e(0x101)],_0x287e3e=new Map(_0x527e45[_0x443d5e(0x115)](_0x35e342=>[_0x35e342['id'],_0x35e342])),_0x367032=_0x527e45[_0x443d5e(0x115)](_0x5257aa=>({'id':_0x5257aa['id'],'name':_0x5257aa[_0x443d5e(0xcb)][_0x443d5e(0x139)],'journeyBundleName':_0x5257aa['attributes']['journeyBundleName']||'','journeyBundleId':_0x5257aa[_0x443d5e(0xcb)][_0x443d5e(0x142)]||'','versionNumber':_0x5257aa['attributes'][_0x443d5e(0x11a)],'description':_0x5257aa[_0x443d5e(0xcb)][_0x443d5e(0xf2)],'state':_0x5257aa['attributes']['state'],'paused':_0x5257aa[_0x443d5e(0xcb)][_0x443d5e(0xf6)],'audienceId':_0x5257aa[_0x443d5e(0xcb)][_0x443d5e(0xcc)],'folderId':_0x5257aa[_0x443d5e(0xeb)]?.['parentFolder']?.[_0x443d5e(0x101)]?.['id'],'createdAt':_0x5257aa[_0x443d5e(0xcb)]['createdAt'],'updatedAt':_0x5257aa[_0x443d5e(0xcb)][_0x443d5e(0x110)]})),{emailToId:_0x4faa42,idToEmail:_0x41fbb1}=_0x9fe65c,_0x588868=await withSpinner('Fetching\x20connections\x20for\x20name\x20resolution...',async()=>{const _0x4e8687=_0x443d5e,_0x4dd0b5=await _0x32104d[_0x4e8687(0xe9)][_0x4e8687(0x111)]();return buildConnectionMaps(_0x4dd0b5);},{'verbose':_0x561725['verbose']})[_0x443d5e(0x14b)](_0x27d4a0=>_0x27d4a0[_0x443d5e(0x101)]),_0xc2efe4=_0x588868[_0x443d5e(0xc1)],_0x1a659c=_0x588868[_0x443d5e(0x132)],_0x151025=_0x588868[_0x443d5e(0xea)],_0x4e28df={'emailToIdMap':_0x4faa42,'connectionNameToIdMap':_0xc2efe4,'connectionNameToTypeMap':_0x151025,'getSchema':_0x14ca79=>_0x32104d[_0x443d5e(0xe9)][_0x443d5e(0x14a)](_0x14ca79)};let {pathToId:_0x26e8a4,idToPath:_0x84cb0b}=buildFolderMaps(_0x3371a1);const _0x4433a2=buildSegmentLookupMap(_0x67ff74,_0x84cb0b),_0x1b138d=buildSegmentNameToIdMap(_0x67ff74),_0x53ae61=buildJourneyBundleLookupMap(_0x367032,_0x84cb0b);let _0x1b44bd;if(_0x58d384){if(!_0x58d384[_0x443d5e(0xd6)](_0x443d5e(0x11d))&&!_0x58d384[_0x443d5e(0xd6)](_0x443d5e(0x140)))return console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10d)](_0x443d5e(0xca)+_0x58d384+'\x0a')),0x1;_0x1b44bd=[_0x58d384];}else _0x1b44bd=findYamlFiles(_0x596fed);if(_0x1b44bd[_0x443d5e(0xb9)]===0x0)return console['error'](a29_0x1ee904[_0x443d5e(0x10d)](_0x443d5e(0x136)+_0x596fed+'\x0a')),console[_0x443d5e(0xd7)](a29_0x1ee904['cyan'](_0x443d5e(0xf7))),0x1;let _0x10f72e,_0x1b9f88;try{const _0x12d644=parseAndClassifyYamlFiles(_0x1b44bd,_0x596fed,{'skipSegments':_0x561725['journeysOnly']});_0x10f72e=_0x12d644[_0x443d5e(0xbd)],_0x1b9f88=_0x12d644[_0x443d5e(0xe5)];const _0xa1be24=validateParsedFiles(_0x12d644,_0x596fed);if(_0xa1be24[_0x443d5e(0xb9)]>0x0)return console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10d)]('\x0aValidation\x20failed:')),console[_0x443d5e(0xd7)](formatValidationErrors(_0xa1be24)),console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x148)](_0x443d5e(0xf0))),0x1;}catch(_0x2ebe94){return console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10d)]('Error\x20parsing\x20YAML:\x20'+(_0x2ebe94 instanceof Error?_0x2ebe94[_0x443d5e(0x10a)]:_0x2ebe94))),0x1;}if(_0x10f72e[_0x443d5e(0xb9)]===0x0&&_0x1b9f88['length']===0x0){const _0x3ca4f4=_0x561725[_0x443d5e(0xdf)]?_0x443d5e(0x10b):_0x443d5e(0x128);return console['error'](a29_0x1ee904['yellow'](_0x443d5e(0xdd)+_0x3ca4f4+'\x20YAML\x20files\x20found')),0x0;}const _0x5b1b7e=new Map();_0x67ff74[_0x443d5e(0xb9)]>0x0&&!_0x561725['journeysOnly']&&await withSpinner('Fetching\x20existing\x20activations...',async()=>{await batchAsync(_0x67ff74,async _0x59957e=>{const _0x457735=a29_0x31eb,_0x12d53c=await _0x32104d[_0x457735(0x11f)][_0x457735(0x138)](_0x4852f3,_0x59957e['id']);_0x5b1b7e['set'](_0x59957e['id'],_0x12d53c);});},{'verbose':_0x561725['verbose']});const {segmentFiles:_0x55cb0f,foldersToCreate:_0x47efe2}=await prepareSegmentFiles(_0x10f72e,{'segmentByFolderAndName':_0x4433a2,'activationsBySegmentId':_0x5b1b7e,'folderPathToId':_0x26e8a4,'idToEmailMap':_0x41fbb1,'connectionIdToNameMap':_0x1a659c},_0x4e28df,_0x286ade,_0x30a371),_0x3385cd=_0x58d384?[]:findSegmentsToDelete(_0x67ff74,_0x10f72e[_0x443d5e(0x115)](({yamlConfig:_0xbf9f92,folderPath:_0x4b97e2})=>({'yamlConfig':_0xbf9f92,'folderPath':resolveTDFolderPath(_0x4b97e2,_0x286ade,_0x30a371)})),_0x84cb0b,_0x30a371,_0x286ade),{journeyFiles:_0x2e678c,foldersToCreate:_0x37c96b}=await withProgressSpinner('Preparing\x20journeys...',async _0x4b34a6=>prepareJourneyFiles(_0x1b9f88,{'fetchJourney':async _0x4b8cfb=>_0x32104d[_0x443d5e(0x10b)][_0x443d5e(0xc2)](_0x4b8cfb['journeyId']),'journeyBundlesByFolderAndName':_0x53ae61,'folderPathToId':_0x26e8a4,'idToEmailMap':_0x41fbb1,'connectionIdToNameMap':_0x1a659c,'existingSegments':_0x67ff74,'parentId':_0x4852f3,'deps':_0x32104d,'progress':{'update':_0x9effac=>{const _0x57bb96=_0x443d5e;_0x4b34a6[_0x57bb96(0xe8)](_0x9effac),_0x561725[_0x57bb96(0xd8)]&&console[_0x57bb96(0xd7)]('\x20\x20'+_0x9effac);}},'journeyById':_0x287e3e,'activationStepsById':_0x2f51f4},_0x286ade,_0x30a371),{'verbose':_0x561725[_0x443d5e(0xd8)]})[_0x443d5e(0x14b)](_0x4d83bc=>_0x4d83bc[_0x443d5e(0x101)]);for(const _0x2d364d of _0x37c96b){_0x47efe2[_0x443d5e(0xe3)](_0x2d364d);}const _0x355565=_0x58d384?[]:findJourneysToDelete(_0x367032,_0x1b9f88['map'](({yamlConfig:_0x62be77,folderPath:_0x3c09cc})=>({'yamlConfig':_0x62be77,'folderPath':resolveTDFolderPath(_0x3c09cc,_0x286ade,_0x30a371)})),_0x84cb0b,_0x30a371,_0x286ade),_0x1701a9=calculatePushStats(_0x55cb0f,_0x2e678c,_0x47efe2,_0x3385cd,_0x355565,!!_0x561725['delete'],!!_0x561725[_0x443d5e(0xdf)]),_0x364054=_0x1701a9[_0x443d5e(0xbd)]['new'],_0x3f7c50=_0x1701a9[_0x443d5e(0xbd)][_0x443d5e(0x121)],_0x59042a=_0x1701a9[_0x443d5e(0xbd)][_0x443d5e(0x12e)],_0x1d00ee=_0x1701a9[_0x443d5e(0xbd)][_0x443d5e(0xf5)],_0xc22e9a=_0x1701a9[_0x443d5e(0x103)][_0x443d5e(0xda)],_0xdc9185=_0x1701a9['journeys']['new'],_0x1f6254=_0x1701a9[_0x443d5e(0xe5)][_0x443d5e(0x121)],_0x27d73a=_0x1701a9[_0x443d5e(0xe5)][_0x443d5e(0x12e)],_0x51d62a=_0x1701a9['journeys'][_0x443d5e(0xf5)],_0x1a8129=_0x1701a9['activations'][_0x443d5e(0x149)],_0x51d7ff=_0x1701a9[_0x443d5e(0xc8)][_0x443d5e(0xda)],_0x320ff7=_0x1701a9[_0x443d5e(0xc8)]['toUpdate'],_0x17e44c=_0x1701a9['activations'][_0x443d5e(0xf5)];console['error']('\x0aPush\x20summary\x20for\x20\x27'+_0x4ee266+'\x27:');_0xc22e9a[_0x443d5e(0xb9)]>0x0&&console['error']('\x20\x20'+a29_0x1ee904[_0x443d5e(0x114)](_0x443d5e(0x135)+_0xc22e9a[_0x443d5e(0xb9)]+_0x443d5e(0x12c)));if(!_0x561725[_0x443d5e(0xdf)]){console['error'](_0x443d5e(0x116)),console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904['green']('+\x20'+_0x364054['length']+'\x20new')),console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x148)]('~\x20'+_0x3f7c50[_0x443d5e(0xb9)]+_0x443d5e(0x12d)));if(_0x1d00ee[_0x443d5e(0xb9)]>0x0)console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x10d)]('-\x20'+_0x1d00ee[_0x443d5e(0xb9)]+_0x443d5e(0xf8)));else _0x3385cd[_0x443d5e(0xb9)]>0x0&&!_0x561725['delete']&&console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x12f)](_0x3385cd[_0x443d5e(0xb9)]+'\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)'));console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x12f)]('=\x20'+_0x59042a[_0x443d5e(0xb9)]+_0x443d5e(0xfc)));}if(_0x2e678c[_0x443d5e(0xb9)]>0x0||_0x355565['length']>0x0){console['error'](_0x443d5e(0x130)),console[_0x443d5e(0xd7)]('\x20\x20\x20\x20'+a29_0x1ee904[_0x443d5e(0x10e)]('+\x20'+_0xdc9185[_0x443d5e(0xb9)]+_0x443d5e(0x143))),console[_0x443d5e(0xd7)]('\x20\x20\x20\x20'+a29_0x1ee904[_0x443d5e(0x148)]('~\x20'+_0x1f6254[_0x443d5e(0xb9)]+_0x443d5e(0x12d)));if(_0x51d62a[_0x443d5e(0xb9)]>0x0)console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904['red']('-\x20'+_0x51d62a[_0x443d5e(0xb9)]+_0x443d5e(0xf8)));else _0x355565['length']>0x0&&!_0x561725[_0x443d5e(0xd4)]&&console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x12f)](_0x355565['length']+_0x443d5e(0xce)));console[_0x443d5e(0xd7)]('\x20\x20\x20\x20'+a29_0x1ee904[_0x443d5e(0x12f)]('=\x20'+_0x27d73a[_0x443d5e(0xb9)]+_0x443d5e(0xfc)));}_0x1a8129[_0x443d5e(0xb9)]>0x0&&!_0x561725['journeysOnly']&&(console[_0x443d5e(0xd7)](''),console[_0x443d5e(0xd7)](_0x443d5e(0x129)),_0x51d7ff[_0x443d5e(0xb9)]>0x0&&console['error'](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x10e)]('+\x20'+_0x51d7ff[_0x443d5e(0xb9)]+'\x20to\x20create')),_0x320ff7[_0x443d5e(0xb9)]>0x0&&console['error']('\x20\x20\x20\x20'+a29_0x1ee904[_0x443d5e(0x148)]('~\x20'+_0x320ff7[_0x443d5e(0xb9)]+_0x443d5e(0x102))),_0x17e44c[_0x443d5e(0xb9)]>0x0&&console[_0x443d5e(0xd7)](_0x443d5e(0xe4)+a29_0x1ee904[_0x443d5e(0x10d)]('-\x20'+_0x17e44c['length']+_0x443d5e(0xf8))));console[_0x443d5e(0xd7)](_0x443d5e(0x11e)+a29_0x1ee904['cyan'](_0x596fed)+'\x0a');if(_0xc22e9a[_0x443d5e(0xb9)]>0x0){console[_0x443d5e(0xd7)](_0x443d5e(0x131));for(const _0x102359 of _0xc22e9a){console['error']('\x20\x20'+a29_0x1ee904[_0x443d5e(0x114)]('+')+'\x20'+_0x102359);}console[_0x443d5e(0xd7)]('');}if(_0x364054[_0x443d5e(0xb9)]>0x0&&!_0x561725[_0x443d5e(0xdf)])for(const _0x1a8eb1 of _0x364054){const _0x46755f=_0x1a8eb1[_0x443d5e(0x100)]?_0x1a8eb1['folderPath']+'/'+_0x1a8eb1[_0x443d5e(0x13c)]['name']:_0x1a8eb1[_0x443d5e(0x13c)][_0x443d5e(0x139)],_0x1bf140=_0x1a8eb1['yamlConfig'][_0x443d5e(0xc8)]?.['length']||0x0,_0x43e09c=_0x1bf140>0x0?a29_0x1ee904[_0x443d5e(0x12f)]('\x20['+_0x1bf140+'\x20activations]'):'';console[_0x443d5e(0xd7)]('\x0a'+a29_0x1ee904[_0x443d5e(0x10e)](_0x443d5e(0xc3))+'\x20'+_0x46755f+_0x43e09c),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c)),_0x1a8eb1[_0x443d5e(0x141)]&&console[_0x443d5e(0xd7)](_0x1a8eb1[_0x443d5e(0x141)]),console[_0x443d5e(0xd7)]('─'['repeat'](0x3c));}if(_0x1d00ee['length']>0x0&&!_0x561725['journeysOnly'])for(const _0x42ad12 of _0x1d00ee){const _0x4dee8a=_0x42ad12['segmentFolderId']?_0x84cb0b[_0x443d5e(0xc4)](_0x42ad12[_0x443d5e(0x13b)][_0x443d5e(0x126)]())||'':'',_0x36bfe0=_0x4dee8a?_0x4dee8a+'/'+_0x42ad12[_0x443d5e(0x139)]:_0x42ad12[_0x443d5e(0x139)],_0x32cd59=_0x5b1b7e[_0x443d5e(0xc4)](_0x42ad12['id'])||[],_0x172534=_0x32cd59[_0x443d5e(0xb9)]>0x0?a29_0x1ee904[_0x443d5e(0x12f)]('\x20['+_0x32cd59[_0x443d5e(0xb9)]+_0x443d5e(0xf9)):'';console['error']('\x0a'+a29_0x1ee904[_0x443d5e(0x10d)](_0x443d5e(0xf4))+'\x20'+_0x36bfe0+_0x172534),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c));const _0x4ca73d=segmentWithActivationsToYaml(_0x42ad12,_0x32cd59,undefined,_0x41fbb1,_0x1a659c),_0x150cf6=segmentToYamlString(_0x4ca73d),_0x2a5994=generateDiff(_0x150cf6,'');console[_0x443d5e(0xd7)](formatDiffWithColors(_0x2a5994)),console[_0x443d5e(0xd7)]('─'['repeat'](0x3c));}const _0x5a4489=_0x55cb0f[_0x443d5e(0xbb)](_0x53032a=>!_0x53032a[_0x443d5e(0xfb)]&&_0x53032a['diff']);if(_0x5a4489[_0x443d5e(0xb9)]>0x0&&!_0x561725[_0x443d5e(0xdf)])for(const _0x674153 of _0x5a4489){const _0x29c4b3=_0x674153[_0x443d5e(0x100)]?_0x674153[_0x443d5e(0x100)]+'/'+_0x674153[_0x443d5e(0x13c)][_0x443d5e(0x139)]:_0x674153[_0x443d5e(0x13c)][_0x443d5e(0x139)];console[_0x443d5e(0xd7)]('\x0a'+a29_0x1ee904[_0x443d5e(0x148)]('Changes\x20to:')+'\x20'+_0x29c4b3),console['error']('─'['repeat'](0x3c)),console[_0x443d5e(0xd7)](_0x674153[_0x443d5e(0x141)]),console[_0x443d5e(0xd7)]('─'['repeat'](0x3c));}if(_0xdc9185[_0x443d5e(0xb9)]>0x0)for(const _0xdc6bcf of _0xdc9185){const _0x3ae037=_0xdc6bcf[_0x443d5e(0x100)]?_0xdc6bcf[_0x443d5e(0x100)]+'/'+_0xdc6bcf[_0x443d5e(0x13c)][_0x443d5e(0x139)]:_0xdc6bcf[_0x443d5e(0x13c)][_0x443d5e(0x139)];console[_0x443d5e(0xd7)]('\x0a'+a29_0x1ee904['green'](_0x443d5e(0xbc))+'\x20'+_0x3ae037),console['error']('─'[_0x443d5e(0xc7)](0x3c)),_0xdc6bcf[_0x443d5e(0x141)]&&console['error'](_0xdc6bcf[_0x443d5e(0x141)]),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c));}const _0x402305=_0x2e678c[_0x443d5e(0xbb)](_0x39452b=>!_0x39452b[_0x443d5e(0xfb)]&&_0x39452b[_0x443d5e(0x141)]);if(_0x402305[_0x443d5e(0xb9)]>0x0)for(const _0x50b296 of _0x402305){const _0x331ef6=_0x50b296[_0x443d5e(0x100)]?_0x50b296[_0x443d5e(0x100)]+'/'+_0x50b296[_0x443d5e(0x13c)][_0x443d5e(0x139)]:_0x50b296[_0x443d5e(0x13c)][_0x443d5e(0x139)];console[_0x443d5e(0xd7)]('\x0a'+a29_0x1ee904[_0x443d5e(0x148)](_0x443d5e(0x104))+'\x20'+_0x331ef6),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c)),console[_0x443d5e(0xd7)](_0x50b296[_0x443d5e(0x141)]),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c));}if(_0x51d62a[_0x443d5e(0xb9)]>0x0)for(const _0x58a9e9 of _0x51d62a){const _0x3d3e72=_0x58a9e9[_0x443d5e(0xba)]?_0x84cb0b[_0x443d5e(0xc4)](_0x58a9e9[_0x443d5e(0xba)])||'':'',_0x3787e5=_0x3d3e72?_0x3d3e72+'/'+_0x58a9e9[_0x443d5e(0xec)]:_0x58a9e9[_0x443d5e(0xec)];console[_0x443d5e(0xd7)]('\x0a'+a29_0x1ee904[_0x443d5e(0x10d)](_0x443d5e(0x137))+'\x20'+_0x3787e5),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c)),console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10d)](_0x443d5e(0xee))),console[_0x443d5e(0xd7)]('─'[_0x443d5e(0xc7)](0x3c));}if(_0x561725['dryRun'])return console[_0x443d5e(0xd7)](a29_0x1ee904['yellow'](_0x443d5e(0xdc))),0x0;const _0x55eac6=_0x561725[_0x443d5e(0xdf)]?![]:_0x364054[_0x443d5e(0xb9)]>0x0||_0x3f7c50[_0x443d5e(0xb9)]>0x0||_0x1d00ee[_0x443d5e(0xb9)]>0x0,_0x401f1d=_0xdc9185['length']>0x0||_0x1f6254[_0x443d5e(0xb9)]>0x0||_0x51d62a[_0x443d5e(0xb9)]>0x0,_0x2debdc=_0x561725[_0x443d5e(0xdf)]?![]:_0x1a8129['length']>0x0,_0x4948bf=_0xc22e9a['length']>0x0;if(!_0x55eac6&&!_0x401f1d&&!_0x2debdc&&!_0x4948bf){const _0x288bc9=_0x561725['journeysOnly']?_0x443d5e(0xc9):'✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date';console['error'](a29_0x1ee904[_0x443d5e(0x10e)](_0x288bc9));if(_0x58d384&&_0x27d73a[_0x443d5e(0xb9)]===0x1){const _0x1800b8=_0x27d73a[0x0];if(_0x1800b8[_0x443d5e(0x13e)]?.['id']){const _0x56d802=getConsoleNextUrl(_0x561725[_0x443d5e(0x107)],'/app/ps/'+_0x4852f3+_0x443d5e(0x109)+_0x1800b8['existingJourney']['id']+_0x443d5e(0xd9));console[_0x443d5e(0xd7)]('\x20\x20'+a29_0x1ee904[_0x443d5e(0xfd)](_0x56d802));}}return 0x0;}const _0x521ea5=_0x561725['journeysOnly']?_0xdc9185['length']+_0x1f6254['length']+_0x51d62a[_0x443d5e(0xb9)]+_0xc22e9a['length']:_0x364054[_0x443d5e(0xb9)]+_0x3f7c50[_0x443d5e(0xb9)]+_0x1d00ee[_0x443d5e(0xb9)]+_0xdc9185['length']+_0x1f6254[_0x443d5e(0xb9)]+_0x51d62a[_0x443d5e(0xb9)]+_0xc22e9a[_0x443d5e(0xb9)]+_0x1a8129[_0x443d5e(0xb9)];if(!_0x561725[_0x443d5e(0x119)]&&_0x521ea5>0x0){const _0x2792e0=await confirmKey(_0x443d5e(0x10f)+_0x521ea5+_0x443d5e(0xe1));if(!_0x2792e0)return console['error']('Aborted.'),0x1;}const _0x2db905={'withProgress':async(_0x459a21,_0x3a15a5)=>{const _0x794d97=_0x443d5e,_0x1bbe70=await withSpinner(_0x459a21,_0x3a15a5,{'verbose':_0x561725[_0x794d97(0xd8)]});return{'data':_0x1bbe70['data']};},'logInfo':_0x4ae2e7=>console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x114)]('✔\x20'+_0x4ae2e7)),'logSuccess':_0x5e7253=>console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10e)]('✔\x20'+_0x5e7253)),'logWarning':_0x2b372d=>console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x148)]('⚠\x20'+_0x2b372d)),'logDeleted':_0x17264b=>console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10d)]('✔\x20'+_0x17264b))},_0x523491={'segment':_0x32104d[_0x443d5e(0x11f)],'journey':_0x32104d[_0x443d5e(0x10b)],'user':_0x32104d[_0x443d5e(0x125)],'connection':_0x32104d['connection']};_0xc22e9a[_0x443d5e(0xb9)]>0x0&&(_0x26e8a4=await executePushFolders(_0x523491,_0xc22e9a,_0x26e8a4,{'parentId':_0x4852f3},_0x2db905));const _0x2daf56={'rootFolderId':_0x458502,'folderPathToId':_0x26e8a4,'folderIdToPath':_0x84cb0b,'segmentNameToId':_0x1b138d,'activationsBySegmentId':_0x5b1b7e,'emailToIdMap':_0x4faa42,'idToEmailMap':_0x41fbb1,'connectionNameToIdMap':_0x588868[_0x443d5e(0xc1)],'connectionIdToNameMap':_0x588868[_0x443d5e(0x132)],'connectionNameToTypeMap':_0x151025},_0x1da5c1=await executePushSegments(_0x523491,_0x561725[_0x443d5e(0xdf)]?[]:_0x55cb0f,_0x2daf56,{'parentId':_0x4852f3},_0x2db905),_0x3a54b3=_0x1da5c1[_0x443d5e(0x144)],_0x1ba48f=_0x1da5c1['updated'],_0x1924c3=_0x1da5c1[_0x443d5e(0xc8)][_0x443d5e(0x144)],_0x4e1bd4=_0x1da5c1[_0x443d5e(0xc8)][_0x443d5e(0x13a)],_0x450530=_0x1da5c1[_0x443d5e(0xc8)][_0x443d5e(0xd2)],_0x9f9388=await executePushSegmentDeletions(_0x523491,_0x561725['journeysOnly']?[]:_0x1d00ee,_0x2db905);let _0x52a757=0x0,_0x201fed=0x0,_0x293e5f=0x0;const _0xa2b9d0=new Map(_0x1b138d);for(const [_0x170ced,_0xbea17d]of _0x1da5c1[_0x443d5e(0x117)]){_0xa2b9d0[_0x443d5e(0x105)](_0x170ced,_0xbea17d);}if(_0x2e678c[_0x443d5e(0xb9)]>0x0){const _0x327a24={..._0x2daf56,'segmentNameToId':_0xa2b9d0,'existingSegments':_0x67ff74,'activationContext':_0x4e28df},_0x561634=await executePushJourneys(_0x523491,_0x2e678c,_0x327a24,{'parentId':_0x4852f3,'rootFolderId':_0x458502,'verbose':_0x561725[_0x443d5e(0xd8)]},_0x2db905);_0x52a757=_0x561634[_0x443d5e(0x144)],_0x201fed=_0x561634[_0x443d5e(0x13a)];if(_0x58d384&&_0x561634[_0x443d5e(0x147)][_0x443d5e(0xb9)]===0x1){const _0x3ae097=_0x561634[_0x443d5e(0x147)][0x0];if(_0x3ae097[_0x443d5e(0x118)]){const _0x53b32d=getConsoleNextUrl(_0x561725[_0x443d5e(0x107)],_0x443d5e(0x124)+_0x4852f3+'/e/'+_0x3ae097['journeyId']+'/j/da/je');console[_0x443d5e(0xd7)]('\x20\x20'+a29_0x1ee904['cyan'](_0x53b32d));}}}for(const _0x5f0321 of _0x51d62a){console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x148)]('⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x5f0321['journeyBundleName'])),_0x293e5f++;}const _0x53c243=[];if(_0x3a54b3>0x0)_0x53c243[_0x443d5e(0xe6)](_0x3a54b3+_0x443d5e(0xef));if(_0x1ba48f>0x0)_0x53c243[_0x443d5e(0xe6)](_0x1ba48f+'\x20updated');if(_0x9f9388>0x0)_0x53c243[_0x443d5e(0xe6)](_0x9f9388+_0x443d5e(0xfa));const _0x19c35b=[];if(_0x52a757>0x0)_0x19c35b[_0x443d5e(0xe6)](_0x52a757+_0x443d5e(0xef));if(_0x201fed>0x0)_0x19c35b[_0x443d5e(0xe6)](_0x201fed+_0x443d5e(0x120));if(_0x293e5f>0x0)_0x19c35b[_0x443d5e(0xe6)](_0x293e5f+'\x20deleted');const _0x5521df=[];if(_0x1924c3>0x0)_0x5521df['push'](_0x1924c3+_0x443d5e(0xef));if(_0x4e1bd4>0x0)_0x5521df[_0x443d5e(0xe6)](_0x4e1bd4+_0x443d5e(0x120));if(_0x450530>0x0)_0x5521df[_0x443d5e(0xe6)](_0x450530+_0x443d5e(0xfa));return console[_0x443d5e(0xd7)](a29_0x1ee904[_0x443d5e(0x10e)]('\x0a✔\x20Push\x20complete')),_0x53c243[_0x443d5e(0xb9)]>0x0&&!_0x561725[_0x443d5e(0xdf)]&&console[_0x443d5e(0xd7)](_0x443d5e(0xc5)+_0x53c243['join'](',\x20')),_0x19c35b[_0x443d5e(0xb9)]>0x0&&console[_0x443d5e(0xd7)]('\x20\x20Journeys:\x20'+_0x19c35b[_0x443d5e(0xe7)](',\x20')),_0x5521df[_0x443d5e(0xb9)]>0x0&&!_0x561725[_0x443d5e(0xdf)]&&console[_0x443d5e(0xd7)](_0x443d5e(0x12b)+_0x5521df[_0x443d5e(0xe7)](',\x20')),0x0;}}
1
+ const a29_0x1d6f4d=a29_0x3b91;(function(_0x5bf461,_0x4012d1){const _0x1cd15c=a29_0x3b91,_0x1c6da0=_0x5bf461();while(!![]){try{const _0x299cb1=parseInt(_0x1cd15c(0xfd))/0x1*(-parseInt(_0x1cd15c(0xf5))/0x2)+parseInt(_0x1cd15c(0x10c))/0x3*(-parseInt(_0x1cd15c(0xfe))/0x4)+parseInt(_0x1cd15c(0xfb))/0x5+parseInt(_0x1cd15c(0x16c))/0x6*(-parseInt(_0x1cd15c(0xff))/0x7)+-parseInt(_0x1cd15c(0x104))/0x8+parseInt(_0x1cd15c(0xf4))/0x9*(-parseInt(_0x1cd15c(0xe3))/0xa)+parseInt(_0x1cd15c(0x135))/0xb*(parseInt(_0x1cd15c(0x167))/0xc);if(_0x299cb1===_0x4012d1)break;else _0x1c6da0['push'](_0x1c6da0['shift']());}catch(_0x2535d2){_0x1c6da0['push'](_0x1c6da0['shift']());}}}(a29_0x501c,0x8a62e));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';function a29_0x3b91(_0x37c75b,_0x5c3fa1){_0x37c75b=_0x37c75b-0xd5;const _0x501c59=a29_0x501c();let _0x3b918c=_0x501c59[_0x37c75b];return _0x3b918c;}import{confirmKey}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a29_0x2028c8 from'chalk';import{existsSync}from'fs';function a29_0x501c(){const _0x48b2a9=['updated','segments','\x20changed','yellow','Aborted.','getJourney','36QpNVdb','📁\x20','/j/da/je','cyan','/app/ps/','4878660cOYeQR','verbose','targetDir','getParent','deleted','scopedFolderPath','red','Delete\x20journey:','existingJourney','isScoped','length','audienceId','Folders\x20to\x20create:','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','list','attributes','state','user','green','map','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)','push','10yDcGOQ','Fetching\x20existing\x20journeys...','\x20created','created','\x20\x20📊\x20Segments:','\x20activations]','Resolving\x20parent\x20segment\x20\x27','name','Fetching\x20connections\x20for\x20name\x20resolution...','folderId','.yaml','Error\x20parsing\x20YAML:\x20','parentFolder','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','paused','segment','\x20unchanged','9324837KaiFzZ','8uFWOAY','file','relationships','journeyBundleName','versionNumber','yes','577190VoxMsw','filePath','100690kZVtpN','1311752wjORjy','7LtTAZg','toCreate','listActivations','parent_name','toUpdate','4947592ZvStyo','get','join','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','Delete\x20segment:','no_parent','\x0aValidation\x20failed:','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','9TSOcYt','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','new','journeysOnly','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','\x20changes?','journeys','listFolders','Preparing\x20journeys...','filter','connection','updatedAt','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','Fetching\x20parent\x20segment\x20details...','Source\x20directory:\x20','No\x20','site','\x20to\x20delete','toString','listSegments','Error:\x20','.yml','\x27...','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','idToName','data','activations','New\x20segment:','cwd','dryRun','errorCode','Fetching\x20existing\x20activations...','description','nameToId','\x20YAML\x20files\x20found','diff','\x20\x20Journeys:\x20','set','type','changed','15787266DpTUIw','journeyId','message','\x20to\x20update','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','\x20new','Parent\x20segment:\x20','parentSegment','\x20to\x20create','execute','delete','\x20folders\x20to\x20create','segmentFolderId','folders','blue','helpText','Push\x20','\x20updated','results','/e/','Error:\x20Directory\x20not\x20found:\x20','folderPath','all','toDelete','error','\x0a✔\x20Push\x20complete','setPhase','yamlConfig','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','isNew','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','Changes\x20to:','\x20\x20Activations:','\x20\x20Segments:\x20','unchanged','journey','\x20\x20\x20\x20','then','Changes\x20to\x20journey:','listJourneysWithDetailsFromParentSegment','\x20\x20Activations:\x20','\x20deleted','segment\x20or\x20journey','repeat'];a29_0x501c=function(){return _0x48b2a9;};return a29_0x501c();}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{['name']='segment:push';[a29_0x1d6f4d(0x12d)]=a29_0x1d6f4d(0x153);async[a29_0x1d6f4d(0x13e)](_0x25a124){const _0x492f60=a29_0x1d6f4d,{options:_0x37018f,args:_0x129e3e,tdx:_0x50cccb}=_0x25a124,_0x35b8ff=_0x37018f,_0x243e46=await resolveTarget({'arg':_0x129e3e[0x0],'contextParent':_0x37018f[_0x492f60(0x13c)],'cwd':process[_0x492f60(0x129)]()});if(!isSuccessfulResolution(_0x243e46))return _0x243e46[_0x492f60(0x12b)]===_0x492f60(0x109)?(console['error'](a29_0x2028c8[_0x492f60(0x164)](_0x492f60(0x107))),console['error'](_0x492f60(0xe1)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent'),console[_0x492f60(0x14d)](_0x492f60(0x119))):(console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x172)](_0x492f60(0x121)+_0x243e46['message']+'\x0a')),_0x243e46[_0x492f60(0x144)]&&console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x16a)](_0x243e46[_0x492f60(0x144)]))),0x1;if(_0x243e46['type']===_0x492f60(0x102))return console[_0x492f60(0x14d)](a29_0x2028c8['red'](_0x492f60(0x149)+_0x243e46[_0x492f60(0x16e)]+'\x0a')),console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x16a)](_0x492f60(0xf0))),0x1;const _0x4faf0a=_0x243e46['parentName'],_0x2efe3b=_0x243e46['targetDir'],_0x319d3c=_0x243e46[_0x492f60(0x133)]===_0x492f60(0xf6)?_0x243e46[_0x492f60(0xfc)]:undefined,_0x402a4a=getScopedDetails(_0x243e46),_0x27e136=_0x402a4a?.[_0x492f60(0xd6)]??![],_0x209355=_0x402a4a?.[_0x492f60(0x171)]??'';if(!existsSync(_0x2efe3b))return console['error'](a29_0x2028c8['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x2efe3b+'\x0a')),console[_0x492f60(0x14d)](a29_0x2028c8['cyan'](_0x492f60(0xf0))),0x1;_0x35b8ff[_0x492f60(0x16d)]&&(console[_0x492f60(0x14d)]('Site:\x20'+_0x35b8ff[_0x492f60(0x11d)]),console['error'](_0x492f60(0x13b)+_0x4faf0a),console[_0x492f60(0x14d)](_0x492f60(0x11b)+_0x2efe3b),_0x27e136&&console[_0x492f60(0x14d)]('Scoped\x20to\x20folder:\x20'+_0x209355));const _0x1079bb=await withSpinner(_0x492f60(0xe9)+_0x4faf0a+_0x492f60(0x123),()=>_0x50cccb[_0x492f60(0xf2)]['resolveParentId'](_0x4faf0a),{'verbose':_0x35b8ff[_0x492f60(0x16d)]}),_0x56bb69=_0x1079bb['data'],[_0x146d13,_0xca46e2,_0x29db1e,_0x274365,_0x1fd654]=await Promise[_0x492f60(0x14b)]([withSpinner(_0x492f60(0x11a),()=>_0x50cccb['segment'][_0x492f60(0x16f)](_0x56bb69),{'verbose':_0x35b8ff[_0x492f60(0x16d)]}),withSpinner('Fetching\x20existing\x20segments...',()=>_0x50cccb[_0x492f60(0xf2)][_0x492f60(0x120)](_0x56bb69),{'verbose':_0x35b8ff[_0x492f60(0x16d)]}),withSpinner('Fetching\x20existing\x20folders...',()=>_0x50cccb[_0x492f60(0xf2)][_0x492f60(0x113)](_0x56bb69),{'verbose':_0x35b8ff[_0x492f60(0x16d)]}),withSpinner(_0x492f60(0xe4),()=>_0x50cccb['journey'][_0x492f60(0x15c)](_0x56bb69),{'verbose':_0x35b8ff['verbose']}),withSpinner('Fetching\x20users\x20for\x20email\x20resolution...',()=>_0x50cccb['user']['buildUserMaps'](),{'verbose':_0x35b8ff[_0x492f60(0x16d)]})[_0x492f60(0x15a)](_0x594681=>_0x594681['data'])]),_0x451e54=_0x146d13[_0x492f60(0x126)],_0x295548=extractRootFolderId(_0x451e54),_0x462117=_0xca46e2[_0x492f60(0x126)],_0x388d96=_0x29db1e[_0x492f60(0x126)],{journeys:_0x5d6356,activationStepsById:_0x362b6c}=_0x274365[_0x492f60(0x126)],_0x2bd04c=new Map(_0x5d6356['map'](_0x40b9f1=>[_0x40b9f1['id'],_0x40b9f1])),_0x2f1155=_0x5d6356[_0x492f60(0xe0)](_0x26be4e=>({'id':_0x26be4e['id'],'name':_0x26be4e[_0x492f60(0xdc)][_0x492f60(0xea)],'journeyBundleName':_0x26be4e[_0x492f60(0xdc)][_0x492f60(0xf8)]||'','journeyBundleId':_0x26be4e[_0x492f60(0xdc)]['journeyBundleId']||'','versionNumber':_0x26be4e['attributes'][_0x492f60(0xf9)],'description':_0x26be4e[_0x492f60(0xdc)][_0x492f60(0x12d)],'state':_0x26be4e[_0x492f60(0xdc)][_0x492f60(0xdd)],'paused':_0x26be4e['attributes'][_0x492f60(0xf1)],'audienceId':_0x26be4e[_0x492f60(0xdc)][_0x492f60(0xd8)],'folderId':_0x26be4e[_0x492f60(0xf7)]?.[_0x492f60(0xef)]?.[_0x492f60(0x126)]?.['id'],'createdAt':_0x26be4e[_0x492f60(0xdc)]['createdAt'],'updatedAt':_0x26be4e[_0x492f60(0xdc)][_0x492f60(0x117)]})),{emailToId:_0x56de51,idToEmail:_0x35c743}=_0x1fd654,_0x193e7d=await withSpinner(_0x492f60(0xeb),async()=>{const _0x3cad44=_0x492f60,_0x1149b6=await _0x50cccb['connection'][_0x3cad44(0xdb)]();return buildConnectionMaps(_0x1149b6);},{'verbose':_0x35b8ff[_0x492f60(0x16d)]})[_0x492f60(0x15a)](_0x22cbb3=>_0x22cbb3['data']),_0x3b8bd4=_0x193e7d[_0x492f60(0x12e)],_0x4daa4c=_0x193e7d[_0x492f60(0x125)],_0x3cd568=_0x193e7d['nameToType'],_0x10088c={'emailToIdMap':_0x56de51,'connectionNameToIdMap':_0x3b8bd4,'connectionNameToTypeMap':_0x3cd568,'getSchema':_0xb71c8e=>_0x50cccb['connection']['getOutputSchemaWithCache'](_0xb71c8e)};let {pathToId:_0x3c00bf,idToPath:_0xd93894}=buildFolderMaps(_0x388d96);const _0x516bbf=buildSegmentLookupMap(_0x462117,_0xd93894),_0xe1dad7=buildSegmentNameToIdMap(_0x462117),_0x4f5f42=buildJourneyBundleLookupMap(_0x2f1155,_0xd93894);let _0x5c7b07;if(_0x319d3c){if(!_0x319d3c['endsWith'](_0x492f60(0x122))&&!_0x319d3c['endsWith'](_0x492f60(0xed)))return console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x172)](_0x492f60(0x151)+_0x319d3c+'\x0a')),0x1;_0x5c7b07=[_0x319d3c];}else _0x5c7b07=findYamlFiles(_0x2efe3b);if(_0x5c7b07[_0x492f60(0xd7)]===0x0)return console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x172)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x2efe3b+'\x0a')),console['error'](a29_0x2028c8[_0x492f60(0x16a)](_0x492f60(0x10b))),0x1;let _0x49c26d,_0x4d34d8;try{const _0x41dca1=parseAndClassifyYamlFiles(_0x5c7b07,_0x2efe3b,{'skipSegments':_0x35b8ff['journeysOnly']});_0x49c26d=_0x41dca1[_0x492f60(0x162)],_0x4d34d8=_0x41dca1[_0x492f60(0x112)];const _0x5e4392=validateParsedFiles(_0x41dca1,_0x2efe3b);if(_0x5e4392[_0x492f60(0xd7)]>0x0)return console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x172)](_0x492f60(0x10a))),console[_0x492f60(0x14d)](formatValidationErrors(_0x5e4392)),console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x164)](_0x492f60(0x10d))),0x1;}catch(_0x398e3e){return console[_0x492f60(0x14d)](a29_0x2028c8['red'](_0x492f60(0xee)+(_0x398e3e instanceof Error?_0x398e3e[_0x492f60(0x137)]:_0x398e3e))),0x1;}if(_0x49c26d[_0x492f60(0xd7)]===0x0&&_0x4d34d8[_0x492f60(0xd7)]===0x0){const _0x424a49=_0x35b8ff[_0x492f60(0x10f)]?'journey':_0x492f60(0x15f);return console['error'](a29_0x2028c8[_0x492f60(0x164)](_0x492f60(0x11c)+_0x424a49+_0x492f60(0x12f))),0x0;}const _0x1515d2=new Map();_0x462117[_0x492f60(0xd7)]>0x0&&!_0x35b8ff[_0x492f60(0x10f)]&&await withSpinner(_0x492f60(0x12c),async()=>{await batchAsync(_0x462117,async _0x21cf19=>{const _0x45cfec=a29_0x3b91,_0x1f0e40=await _0x50cccb[_0x45cfec(0xf2)][_0x45cfec(0x101)](_0x56bb69,_0x21cf19['id']);_0x1515d2[_0x45cfec(0x132)](_0x21cf19['id'],_0x1f0e40);});},{'verbose':_0x35b8ff['verbose']});const {segmentFiles:_0xade78e,foldersToCreate:_0x509a14}=await prepareSegmentFiles(_0x49c26d,{'segmentByFolderAndName':_0x516bbf,'activationsBySegmentId':_0x1515d2,'folderPathToId':_0x3c00bf,'idToEmailMap':_0x35c743,'connectionIdToNameMap':_0x4daa4c},_0x10088c,_0x27e136,_0x209355),_0x5ecc6d=_0x319d3c?[]:findSegmentsToDelete(_0x462117,_0x49c26d[_0x492f60(0xe0)](({yamlConfig:_0xd4f418,folderPath:_0x35e935})=>({'yamlConfig':_0xd4f418,'folderPath':resolveTDFolderPath(_0x35e935,_0x27e136,_0x209355)})),_0xd93894,_0x209355,_0x27e136),{journeyFiles:_0x298512,foldersToCreate:_0x2b5535}=await withProgressSpinner(_0x492f60(0x114),async _0xecb6de=>prepareJourneyFiles(_0x4d34d8,{'fetchJourney':async _0x466ecf=>_0x50cccb[_0x492f60(0x158)][_0x492f60(0x166)](_0x466ecf[_0x492f60(0x136)]),'journeyBundlesByFolderAndName':_0x4f5f42,'folderPathToId':_0x3c00bf,'idToEmailMap':_0x35c743,'connectionIdToNameMap':_0x4daa4c,'existingSegments':_0x462117,'parentId':_0x56bb69,'deps':_0x50cccb,'progress':{'update':_0x37152c=>{const _0xb01103=_0x492f60;_0xecb6de[_0xb01103(0x14f)](_0x37152c),_0x35b8ff[_0xb01103(0x16d)]&&console['error']('\x20\x20'+_0x37152c);}},'journeyById':_0x2bd04c,'activationStepsById':_0x362b6c},_0x27e136,_0x209355),{'verbose':_0x35b8ff[_0x492f60(0x16d)]})[_0x492f60(0x15a)](_0x6daca3=>_0x6daca3['data']);for(const _0x1e5d6c of _0x2b5535){_0x509a14['add'](_0x1e5d6c);}const _0x277963=_0x319d3c?[]:findJourneysToDelete(_0x2f1155,_0x4d34d8[_0x492f60(0xe0)](({yamlConfig:_0x56f913,folderPath:_0x339101})=>({'yamlConfig':_0x56f913,'folderPath':resolveTDFolderPath(_0x339101,_0x27e136,_0x209355)})),_0xd93894,_0x209355,_0x27e136),_0x4bebad=calculatePushStats(_0xade78e,_0x298512,_0x509a14,_0x5ecc6d,_0x277963,!!_0x35b8ff[_0x492f60(0x13f)],!!_0x35b8ff[_0x492f60(0x10f)]),_0x3e0636=_0x4bebad['segments'][_0x492f60(0x10e)],_0x22b3df=_0x4bebad[_0x492f60(0x162)]['changed'],_0x4257b4=_0x4bebad['segments'][_0x492f60(0x157)],_0x5ea866=_0x4bebad[_0x492f60(0x162)][_0x492f60(0x14c)],_0x4773a7=_0x4bebad[_0x492f60(0x142)][_0x492f60(0x100)],_0x15ba81=_0x4bebad[_0x492f60(0x112)][_0x492f60(0x10e)],_0x48e00d=_0x4bebad[_0x492f60(0x112)][_0x492f60(0x134)],_0x4029a5=_0x4bebad[_0x492f60(0x112)][_0x492f60(0x157)],_0x272d42=_0x4bebad['journeys'][_0x492f60(0x14c)],_0x65d64d=_0x4bebad[_0x492f60(0x127)][_0x492f60(0x14b)],_0x4a5c05=_0x4bebad[_0x492f60(0x127)][_0x492f60(0x100)],_0x284ce1=_0x4bebad['activations'][_0x492f60(0x103)],_0x25f722=_0x4bebad[_0x492f60(0x127)][_0x492f60(0x14c)];console[_0x492f60(0x14d)]('\x0aPush\x20summary\x20for\x20\x27'+_0x4faf0a+'\x27:');_0x4773a7['length']>0x0&&console[_0x492f60(0x14d)]('\x20\x20'+a29_0x2028c8[_0x492f60(0x143)](_0x492f60(0x168)+_0x4773a7[_0x492f60(0xd7)]+_0x492f60(0x140)));if(!_0x35b8ff[_0x492f60(0x10f)]){console['error'](_0x492f60(0xe7)),console[_0x492f60(0x14d)]('\x20\x20\x20\x20'+a29_0x2028c8[_0x492f60(0xdf)]('+\x20'+_0x3e0636[_0x492f60(0xd7)]+'\x20new')),console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x164)]('~\x20'+_0x22b3df[_0x492f60(0xd7)]+'\x20changed'));if(_0x5ea866[_0x492f60(0xd7)]>0x0)console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x172)]('-\x20'+_0x5ea866[_0x492f60(0xd7)]+_0x492f60(0x11e)));else _0x5ecc6d[_0x492f60(0xd7)]>0x0&&!_0x35b8ff['delete']&&console[_0x492f60(0x14d)]('\x20\x20\x20\x20'+a29_0x2028c8[_0x492f60(0x118)](_0x5ecc6d['length']+_0x492f60(0x139)));console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x118)]('=\x20'+_0x4257b4['length']+_0x492f60(0xf3)));}if(_0x298512['length']>0x0||_0x277963[_0x492f60(0xd7)]>0x0){console[_0x492f60(0x14d)]('\x20\x20🗺️\x20\x20Journeys:'),console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0xdf)]('+\x20'+_0x15ba81['length']+_0x492f60(0x13a))),console['error'](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x164)]('~\x20'+_0x48e00d['length']+_0x492f60(0x163)));if(_0x272d42[_0x492f60(0xd7)]>0x0)console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x172)]('-\x20'+_0x272d42[_0x492f60(0xd7)]+_0x492f60(0x11e)));else _0x277963[_0x492f60(0xd7)]>0x0&&!_0x35b8ff[_0x492f60(0x13f)]&&console['error'](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x118)](_0x277963[_0x492f60(0xd7)]+_0x492f60(0x139)));console['error']('\x20\x20\x20\x20'+a29_0x2028c8[_0x492f60(0x118)]('=\x20'+_0x4029a5[_0x492f60(0xd7)]+_0x492f60(0xf3)));}_0x65d64d[_0x492f60(0xd7)]>0x0&&!_0x35b8ff['journeysOnly']&&(console[_0x492f60(0x14d)](''),console[_0x492f60(0x14d)](_0x492f60(0x155)),_0x4a5c05[_0x492f60(0xd7)]>0x0&&console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0xdf)]('+\x20'+_0x4a5c05[_0x492f60(0xd7)]+_0x492f60(0x13d))),_0x284ce1[_0x492f60(0xd7)]>0x0&&console['error'](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x164)]('~\x20'+_0x284ce1['length']+_0x492f60(0x138))),_0x25f722['length']>0x0&&console[_0x492f60(0x14d)](_0x492f60(0x159)+a29_0x2028c8[_0x492f60(0x172)]('-\x20'+_0x25f722[_0x492f60(0xd7)]+_0x492f60(0x11e))));console[_0x492f60(0x14d)]('\x20\x20Source:\x20'+a29_0x2028c8[_0x492f60(0x16a)](_0x2efe3b)+'\x0a');if(_0x4773a7['length']>0x0){console['error'](_0x492f60(0xd9));for(const _0x56d959 of _0x4773a7){console[_0x492f60(0x14d)]('\x20\x20'+a29_0x2028c8[_0x492f60(0x143)]('+')+'\x20'+_0x56d959);}console[_0x492f60(0x14d)]('');}if(_0x3e0636[_0x492f60(0xd7)]>0x0&&!_0x35b8ff['journeysOnly'])for(const _0x1d3a46 of _0x3e0636){const _0x2ff341=_0x1d3a46[_0x492f60(0x14a)]?_0x1d3a46[_0x492f60(0x14a)]+'/'+_0x1d3a46['yamlConfig'][_0x492f60(0xea)]:_0x1d3a46[_0x492f60(0x150)][_0x492f60(0xea)],_0xf2d8da=_0x1d3a46[_0x492f60(0x150)][_0x492f60(0x127)]?.[_0x492f60(0xd7)]||0x0,_0x15b169=_0xf2d8da>0x0?a29_0x2028c8['dim']('\x20['+_0xf2d8da+'\x20activations]'):'';console[_0x492f60(0x14d)]('\x0a'+a29_0x2028c8[_0x492f60(0xdf)](_0x492f60(0x128))+'\x20'+_0x2ff341+_0x15b169),console[_0x492f60(0x14d)]('─'['repeat'](0x3c)),_0x1d3a46[_0x492f60(0x130)]&&console[_0x492f60(0x14d)](_0x1d3a46['diff']),console[_0x492f60(0x14d)]('─'[_0x492f60(0x160)](0x3c));}if(_0x5ea866[_0x492f60(0xd7)]>0x0&&!_0x35b8ff[_0x492f60(0x10f)])for(const _0x1bb1fd of _0x5ea866){const _0x2afecb=_0x1bb1fd[_0x492f60(0x141)]?_0xd93894[_0x492f60(0x105)](_0x1bb1fd[_0x492f60(0x141)][_0x492f60(0x11f)]())||'':'',_0x207362=_0x2afecb?_0x2afecb+'/'+_0x1bb1fd[_0x492f60(0xea)]:_0x1bb1fd['name'],_0x2b7ef3=_0x1515d2[_0x492f60(0x105)](_0x1bb1fd['id'])||[],_0x37eb3a=_0x2b7ef3[_0x492f60(0xd7)]>0x0?a29_0x2028c8[_0x492f60(0x118)]('\x20['+_0x2b7ef3[_0x492f60(0xd7)]+_0x492f60(0xe8)):'';console['error']('\x0a'+a29_0x2028c8['red'](_0x492f60(0x108))+'\x20'+_0x207362+_0x37eb3a),console[_0x492f60(0x14d)]('─'[_0x492f60(0x160)](0x3c));const _0x18e8b5=segmentWithActivationsToYaml(_0x1bb1fd,_0x2b7ef3,undefined,_0x35c743,_0x4daa4c),_0xc7f83b=segmentToYamlString(_0x18e8b5),_0xca14f6=generateDiff(_0xc7f83b,'');console[_0x492f60(0x14d)](formatDiffWithColors(_0xca14f6)),console['error']('─'['repeat'](0x3c));}const _0xb7bc82=_0xade78e[_0x492f60(0x115)](_0x255f3d=>!_0x255f3d['isNew']&&_0x255f3d[_0x492f60(0x130)]);if(_0xb7bc82[_0x492f60(0xd7)]>0x0&&!_0x35b8ff[_0x492f60(0x10f)])for(const _0x5c0f73 of _0xb7bc82){const _0x3c5cf6=_0x5c0f73[_0x492f60(0x14a)]?_0x5c0f73['folderPath']+'/'+_0x5c0f73[_0x492f60(0x150)][_0x492f60(0xea)]:_0x5c0f73['yamlConfig'][_0x492f60(0xea)];console['error']('\x0a'+a29_0x2028c8[_0x492f60(0x164)](_0x492f60(0x154))+'\x20'+_0x3c5cf6),console[_0x492f60(0x14d)]('─'[_0x492f60(0x160)](0x3c)),console[_0x492f60(0x14d)](_0x5c0f73[_0x492f60(0x130)]),console[_0x492f60(0x14d)]('─'['repeat'](0x3c));}if(_0x15ba81[_0x492f60(0xd7)]>0x0)for(const _0x145958 of _0x15ba81){const _0x1ce4ae=_0x145958[_0x492f60(0x14a)]?_0x145958[_0x492f60(0x14a)]+'/'+_0x145958['yamlConfig'][_0x492f60(0xea)]:_0x145958[_0x492f60(0x150)]['name'];console['error']('\x0a'+a29_0x2028c8[_0x492f60(0xdf)]('New\x20journey:')+'\x20'+_0x1ce4ae),console[_0x492f60(0x14d)]('─'[_0x492f60(0x160)](0x3c)),_0x145958[_0x492f60(0x130)]&&console[_0x492f60(0x14d)](_0x145958[_0x492f60(0x130)]),console[_0x492f60(0x14d)]('─'[_0x492f60(0x160)](0x3c));}const _0x11c54d=_0x298512[_0x492f60(0x115)](_0x2e10b6=>!_0x2e10b6[_0x492f60(0x152)]&&_0x2e10b6['diff']);if(_0x11c54d['length']>0x0)for(const _0x1a1b0f of _0x11c54d){const _0x262a0d=_0x1a1b0f[_0x492f60(0x14a)]?_0x1a1b0f['folderPath']+'/'+_0x1a1b0f[_0x492f60(0x150)][_0x492f60(0xea)]:_0x1a1b0f[_0x492f60(0x150)]['name'];console[_0x492f60(0x14d)]('\x0a'+a29_0x2028c8[_0x492f60(0x164)](_0x492f60(0x15b))+'\x20'+_0x262a0d),console['error']('─'['repeat'](0x3c)),console[_0x492f60(0x14d)](_0x1a1b0f[_0x492f60(0x130)]),console[_0x492f60(0x14d)]('─'['repeat'](0x3c));}if(_0x272d42['length']>0x0)for(const _0x101d45 of _0x272d42){const _0x11ae8f=_0x101d45[_0x492f60(0xec)]?_0xd93894[_0x492f60(0x105)](_0x101d45[_0x492f60(0xec)])||'':'',_0x48a9cb=_0x11ae8f?_0x11ae8f+'/'+_0x101d45[_0x492f60(0xf8)]:_0x101d45['journeyBundleName'];console[_0x492f60(0x14d)]('\x0a'+a29_0x2028c8[_0x492f60(0x172)](_0x492f60(0x173))+'\x20'+_0x48a9cb),console[_0x492f60(0x14d)]('─'[_0x492f60(0x160)](0x3c)),console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x172)]('(Journey\x20will\x20be\x20deleted)')),console['error']('─'[_0x492f60(0x160)](0x3c));}if(_0x35b8ff[_0x492f60(0x12a)])return console['error'](a29_0x2028c8[_0x492f60(0x164)](_0x492f60(0x124))),0x0;const _0xe5ad8f=_0x35b8ff[_0x492f60(0x10f)]?![]:_0x3e0636['length']>0x0||_0x22b3df['length']>0x0||_0x5ea866[_0x492f60(0xd7)]>0x0,_0x562c24=_0x15ba81[_0x492f60(0xd7)]>0x0||_0x48e00d[_0x492f60(0xd7)]>0x0||_0x272d42[_0x492f60(0xd7)]>0x0,_0x779c81=_0x35b8ff[_0x492f60(0x10f)]?![]:_0x65d64d[_0x492f60(0xd7)]>0x0,_0x4426bf=_0x4773a7[_0x492f60(0xd7)]>0x0;if(!_0xe5ad8f&&!_0x562c24&&!_0x779c81&&!_0x4426bf){const _0x181f29=_0x35b8ff['journeysOnly']?_0x492f60(0xda):_0x492f60(0x110);console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0xdf)](_0x181f29));if(_0x319d3c&&_0x4029a5['length']===0x1){const _0x53ac3b=_0x4029a5[0x0];if(_0x53ac3b[_0x492f60(0xd5)]?.['id']){const _0x115f93=getConsoleNextUrl(_0x35b8ff[_0x492f60(0x11d)],_0x492f60(0x16b)+_0x56bb69+_0x492f60(0x148)+_0x53ac3b[_0x492f60(0xd5)]['id']+_0x492f60(0x169));console['error']('\x20\x20'+a29_0x2028c8[_0x492f60(0x16a)](_0x115f93));}}return 0x0;}const _0x276b14=_0x35b8ff[_0x492f60(0x10f)]?_0x15ba81[_0x492f60(0xd7)]+_0x48e00d[_0x492f60(0xd7)]+_0x272d42['length']+_0x4773a7[_0x492f60(0xd7)]:_0x3e0636['length']+_0x22b3df[_0x492f60(0xd7)]+_0x5ea866[_0x492f60(0xd7)]+_0x15ba81[_0x492f60(0xd7)]+_0x48e00d[_0x492f60(0xd7)]+_0x272d42['length']+_0x4773a7[_0x492f60(0xd7)]+_0x65d64d[_0x492f60(0xd7)];if(!_0x35b8ff[_0x492f60(0xfa)]&&_0x276b14>0x0){const _0x13026f=await confirmKey(_0x492f60(0x145)+_0x276b14+_0x492f60(0x111));if(!_0x13026f)return console[_0x492f60(0x14d)](_0x492f60(0x165)),0x1;}const _0x5f1df5={'withProgress':async(_0xe017cf,_0x252b35)=>{const _0x3a43a7=_0x492f60,_0x2e7962=await withSpinner(_0xe017cf,_0x252b35,{'verbose':_0x35b8ff[_0x3a43a7(0x16d)]});return{'data':_0x2e7962[_0x3a43a7(0x126)]};},'logInfo':_0x475dc8=>console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x143)]('✔\x20'+_0x475dc8)),'logSuccess':_0x42b638=>console[_0x492f60(0x14d)](a29_0x2028c8['green']('✔\x20'+_0x42b638)),'logWarning':_0x126016=>console['error'](a29_0x2028c8[_0x492f60(0x164)]('⚠\x20'+_0x126016)),'logDeleted':_0x5363b3=>console['error'](a29_0x2028c8[_0x492f60(0x172)]('✔\x20'+_0x5363b3))},_0x88e782={'segment':_0x50cccb[_0x492f60(0xf2)],'journey':_0x50cccb[_0x492f60(0x158)],'user':_0x50cccb[_0x492f60(0xde)],'connection':_0x50cccb[_0x492f60(0x116)]};_0x4773a7['length']>0x0&&(_0x3c00bf=await executePushFolders(_0x88e782,_0x4773a7,_0x3c00bf,{'parentId':_0x56bb69},_0x5f1df5));const _0x1ff9e4={'rootFolderId':_0x295548,'folderPathToId':_0x3c00bf,'folderIdToPath':_0xd93894,'segmentNameToId':_0xe1dad7,'activationsBySegmentId':_0x1515d2,'emailToIdMap':_0x56de51,'idToEmailMap':_0x35c743,'connectionNameToIdMap':_0x193e7d['nameToId'],'connectionIdToNameMap':_0x193e7d['idToName'],'connectionNameToTypeMap':_0x3cd568},_0xd2bae0=await executePushSegments(_0x88e782,_0x35b8ff['journeysOnly']?[]:_0xade78e,_0x1ff9e4,{'parentId':_0x56bb69},_0x5f1df5),_0x586193=_0xd2bae0[_0x492f60(0xe6)],_0x5efb2f=_0xd2bae0[_0x492f60(0x161)],_0x17fe50=_0xd2bae0[_0x492f60(0x127)][_0x492f60(0xe6)],_0x3ba658=_0xd2bae0[_0x492f60(0x127)][_0x492f60(0x161)],_0x819822=_0xd2bae0[_0x492f60(0x127)][_0x492f60(0x170)],_0x1bcfaf=await executePushSegmentDeletions(_0x88e782,_0x35b8ff[_0x492f60(0x10f)]?[]:_0x5ea866,_0x5f1df5);let _0xdd8b72=0x0,_0x1cc254=0x0,_0x1a17ea=0x0;const _0x1c455c=new Map(_0xe1dad7);for(const [_0x4fd1d5,_0x38992c]of _0xd2bae0['createdSegmentIds']){_0x1c455c[_0x492f60(0x132)](_0x4fd1d5,_0x38992c);}if(_0x298512[_0x492f60(0xd7)]>0x0){const _0x28a0a4={..._0x1ff9e4,'segmentNameToId':_0x1c455c,'existingSegments':_0x462117,'activationContext':_0x10088c},_0x46602a=await executePushJourneys(_0x88e782,_0x298512,_0x28a0a4,{'parentId':_0x56bb69,'rootFolderId':_0x295548,'verbose':_0x35b8ff[_0x492f60(0x16d)]},_0x5f1df5);_0xdd8b72=_0x46602a['created'],_0x1cc254=_0x46602a['updated'];if(_0x319d3c&&_0x46602a[_0x492f60(0x147)]['length']===0x1){const _0x42d86b=_0x46602a[_0x492f60(0x147)][0x0];if(_0x42d86b[_0x492f60(0x136)]){const _0x2ba6a3=getConsoleNextUrl(_0x35b8ff[_0x492f60(0x11d)],_0x492f60(0x16b)+_0x56bb69+_0x492f60(0x148)+_0x42d86b[_0x492f60(0x136)]+_0x492f60(0x169));console['error']('\x20\x20'+a29_0x2028c8[_0x492f60(0x16a)](_0x2ba6a3));}}}for(const _0x4ee97d of _0x272d42){console[_0x492f60(0x14d)](a29_0x2028c8[_0x492f60(0x164)]('⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x4ee97d['journeyBundleName'])),_0x1a17ea++;}const _0x2bf6f6=[];if(_0x586193>0x0)_0x2bf6f6[_0x492f60(0xe2)](_0x586193+_0x492f60(0xe5));if(_0x5efb2f>0x0)_0x2bf6f6[_0x492f60(0xe2)](_0x5efb2f+_0x492f60(0x146));if(_0x1bcfaf>0x0)_0x2bf6f6[_0x492f60(0xe2)](_0x1bcfaf+_0x492f60(0x15e));const _0x85adcd=[];if(_0xdd8b72>0x0)_0x85adcd['push'](_0xdd8b72+_0x492f60(0xe5));if(_0x1cc254>0x0)_0x85adcd[_0x492f60(0xe2)](_0x1cc254+'\x20updated');if(_0x1a17ea>0x0)_0x85adcd['push'](_0x1a17ea+_0x492f60(0x15e));const _0x240023=[];if(_0x17fe50>0x0)_0x240023[_0x492f60(0xe2)](_0x17fe50+_0x492f60(0xe5));if(_0x3ba658>0x0)_0x240023[_0x492f60(0xe2)](_0x3ba658+_0x492f60(0x146));if(_0x819822>0x0)_0x240023[_0x492f60(0xe2)](_0x819822+_0x492f60(0x15e));return console['error'](a29_0x2028c8[_0x492f60(0xdf)](_0x492f60(0x14e))),_0x2bf6f6[_0x492f60(0xd7)]>0x0&&!_0x35b8ff[_0x492f60(0x10f)]&&console[_0x492f60(0x14d)](_0x492f60(0x156)+_0x2bf6f6[_0x492f60(0x106)](',\x20')),_0x85adcd[_0x492f60(0xd7)]>0x0&&console[_0x492f60(0x14d)](_0x492f60(0x131)+_0x85adcd[_0x492f60(0x106)](',\x20')),_0x240023[_0x492f60(0xd7)]>0x0&&!_0x35b8ff[_0x492f60(0x10f)]&&console[_0x492f60(0x14d)](_0x492f60(0x15d)+_0x240023[_0x492f60(0x106)](',\x20')),0x0;}}
@@ -1 +1 @@
1
- const a30_0x1f7e9f=a30_0x31c0;(function(_0x4a64d5,_0x177812){const _0x47206e=a30_0x31c0,_0x2e05c4=_0x4a64d5();while(!![]){try{const _0x2fe897=-parseInt(_0x47206e(0x96))/0x1+parseInt(_0x47206e(0x8f))/0x2*(-parseInt(_0x47206e(0x95))/0x3)+parseInt(_0x47206e(0x8d))/0x4+-parseInt(_0x47206e(0x74))/0x5*(parseInt(_0x47206e(0x85))/0x6)+-parseInt(_0x47206e(0x7c))/0x7+parseInt(_0x47206e(0x70))/0x8*(parseInt(_0x47206e(0x9d))/0x9)+parseInt(_0x47206e(0x8a))/0xa;if(_0x2fe897===_0x177812)break;else _0x2e05c4['push'](_0x2e05c4['shift']());}catch(_0x24c28e){_0x2e05c4['push'](_0x2e05c4['shift']());}}}(a30_0x17db,0xebf5b));function a30_0x17db(){const _0x1affdd=['type','description','11931185YJqKRc','updateSegmentById','folder','INTERNAL','Update\x20existing\x20child\x20segment','Resolved\x20folder\x20ID:\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segment','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','6NZThrb','verbose','parentId','\x20\x20\x20Path:\x20','resolvePathToResource','19285910pPrTiO','segment:update','data','6325972hwMGbh','kind','52tyIHyk','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','includes','ruleFile','Segment\x20ID:\x20','Resolved\x20relative\x20path\x20to:\x20','7962fWVPpR','1141079FAWbjF','Error:\x20Cannot\x20update\x20','\x27...','length','✔\x20Updated\x20segment\x20\x27','segmentId','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','81kIwHsQ','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','resolveFolderId','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Updating\x20segment\x20\x27','1670392VJxYSz','segmentName','segmentPath','Parent\x20ID:\x20','7541230znQHJX','yellow','name','Resolved\x20type:\x20','error','Resolving\x20path\x20\x27'];a30_0x17db=function(){return _0x1affdd;};return a30_0x17db();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a30_0x31c0(_0x32a528,_0x186f5b){_0x32a528=_0x32a528-0x6c;const _0x17dbc1=a30_0x17db();let _0x31c053=_0x17dbc1[_0x32a528];return _0x31c053;}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a30_0x560042 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a30_0x1f7e9f(0x76)]=a30_0x1f7e9f(0x8b);[a30_0x1f7e9f(0x7b)]=a30_0x1f7e9f(0x80);async['execute'](_0x1a072e){const _0x517122=a30_0x1f7e9f;console['error'](a30_0x560042['yellow'](_0x517122(0x9c))),console[_0x517122(0x78)](a30_0x560042[_0x517122(0x75)]('\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a'));const {options:_0xfb4f98,args:_0x49dfab,tdx:_0x4fb311}=_0x1a072e,_0x53d6d9=_0xfb4f98;if(_0x49dfab[_0x517122(0x99)]===0x0)return console[_0x517122(0x78)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x517122(0x78)](_0x517122(0x6c)),console[_0x517122(0x78)]('Examples:'),console[_0x517122(0x78)](_0x517122(0x82)),console[_0x517122(0x78)](_0x517122(0x90)),0x1;const _0x4fb46e=_0x49dfab[0x0],_0x2d1935=_0xfb4f98[_0x517122(0x72)];let _0x4feff3=_0x4fb46e;_0x2d1935&&!_0x4fb46e[_0x517122(0x91)]('/')&&(_0x4feff3=_0x2d1935+'/'+_0x4fb46e,_0x53d6d9[_0x517122(0x86)]&&console[_0x517122(0x78)](_0x517122(0x94)+_0x4feff3));const _0xba7dd7=await withSpinner(_0x517122(0x79)+_0x4feff3+_0x517122(0x98),()=>_0x4fb311['segment'][_0x517122(0x89)](_0x4feff3),{'verbose':_0x53d6d9[_0x517122(0x86)]}),_0x58d81b=_0xba7dd7[_0x517122(0x8c)];_0x53d6d9[_0x517122(0x86)]&&console[_0x517122(0x78)](_0x517122(0x77)+_0x58d81b[_0x517122(0x7a)]);if(_0x58d81b[_0x517122(0x7a)]!==_0x517122(0x83))return console[_0x517122(0x78)](_0x517122(0x97)+_0x58d81b[_0x517122(0x7a)]+_0x517122(0x84)),console[_0x517122(0x78)](_0x517122(0x6e)),0x1;if(!_0x58d81b[_0x517122(0x9b)])throw new SDKError(ErrorCode[_0x517122(0x7f)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x51cfe1=_0x58d81b[_0x517122(0x87)],_0x1c92a4=_0x58d81b[_0x517122(0x9b)];_0x53d6d9[_0x517122(0x86)]&&(console[_0x517122(0x78)](_0x517122(0x73)+_0x51cfe1),console[_0x517122(0x78)](_0x517122(0x93)+_0x1c92a4));let _0x279377;if(_0x53d6d9[_0x517122(0x7e)]){const _0x509b7b=_0x53d6d9[_0x517122(0x7e)],_0x2b796b=await withSpinner('Resolving\x20folder\x20\x27'+_0x509b7b+'\x27...',()=>_0x4fb311['segment'][_0x517122(0x6d)](_0x51cfe1,_0x509b7b),{'verbose':_0x53d6d9[_0x517122(0x86)]});_0x279377=parseInt(_0x2b796b[_0x517122(0x8c)],0xa),_0x53d6d9[_0x517122(0x86)]&&console[_0x517122(0x78)](_0x517122(0x81)+_0x279377);}const _0x3bdda8=await loadJSONFromOptions(_0x53d6d9['rule'],_0x53d6d9[_0x517122(0x92)]),_0x50240b={'name':_0x53d6d9[_0x517122(0x76)],'description':_0x53d6d9[_0x517122(0x7b)],'rule':_0x3bdda8,'kind':_0x53d6d9['kind']!==undefined?parseInt(_0x53d6d9[_0x517122(0x8e)],0xa):undefined,'segmentFolderId':_0x279377},_0x16e5db=await withSpinner(_0x517122(0x6f)+_0x58d81b[_0x517122(0x71)]+_0x517122(0x98),()=>_0x4fb311[_0x517122(0x83)][_0x517122(0x7d)](_0x51cfe1,_0x1c92a4,_0x50240b),{'verbose':_0x53d6d9[_0x517122(0x86)]}),_0x396400=_0x16e5db['data'];return console[_0x517122(0x78)](_0x517122(0x9a)+_0x396400['name']+'\x27'),_0x4feff3!==_0x4fb46e&&console[_0x517122(0x78)](_0x517122(0x88)+_0x4feff3),await handleSDKOutput([_0x396400],_0x53d6d9),0x0;}}
1
+ function a30_0x3d5b(_0x377c3b,_0x3de442){_0x377c3b=_0x377c3b-0x11a;const _0xa3e351=a30_0xa3e3();let _0x3d5b0f=_0xa3e351[_0x377c3b];return _0x3d5b0f;}const a30_0x2204dc=a30_0x3d5b;(function(_0x9782d5,_0x541013){const _0x50463f=a30_0x3d5b,_0x3c0a10=_0x9782d5();while(!![]){try{const _0x4e507c=parseInt(_0x50463f(0x12b))/0x1+parseInt(_0x50463f(0x121))/0x2+-parseInt(_0x50463f(0x137))/0x3*(parseInt(_0x50463f(0x124))/0x4)+-parseInt(_0x50463f(0x13f))/0x5+parseInt(_0x50463f(0x140))/0x6*(parseInt(_0x50463f(0x11f))/0x7)+parseInt(_0x50463f(0x127))/0x8*(parseInt(_0x50463f(0x12a))/0x9)+-parseInt(_0x50463f(0x13a))/0xa*(parseInt(_0x50463f(0x146))/0xb);if(_0x4e507c===_0x541013)break;else _0x3c0a10['push'](_0x3c0a10['shift']());}catch(_0x2a7455){_0x3c0a10['push'](_0x3c0a10['shift']());}}}(a30_0xa3e3,0xc5a65));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 a30_0x2032dd from'chalk';function a30_0xa3e3(){const _0x1a57a9=['Resolving\x20path\x20\x27','name','length','execute','6930435DIMCqt','12ZwGTjm','data','ruleFile','\x20\x20\x20Path:\x20','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','folder','4735599EyuEnR','description','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolved\x20relative\x20path\x20to:\x20','\x27...','INTERNAL','982877iffsWG','segmentPath','1324462okMkOK','Segment\x20ID:\x20','segment:update','334132rfoNxm','segmentId','resolvePathToResource','12769504bigQBa','yellow','Updating\x20segment\x20\x27','9aVlAUs','253994PWbDPP','type','includes','resolveFolderId','verbose','error','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Resolved\x20folder\x20ID:\x20','kind','Error:\x20Cannot\x20update\x20','parentId','segment','6RcalrT','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Update\x20existing\x20child\x20segment','10pwjbmc'];a30_0xa3e3=function(){return _0x1a57a9;};return a30_0xa3e3();}export class SegmentUpdateCommand extends BaseCommand{['name']=a30_0x2204dc(0x123);[a30_0x2204dc(0x11a)]=a30_0x2204dc(0x139);async[a30_0x2204dc(0x13e)](_0x45142e){const _0x3020be=a30_0x2204dc;console[_0x3020be(0x130)](a30_0x2032dd[_0x3020be(0x128)](_0x3020be(0x131))),console[_0x3020be(0x130)](a30_0x2032dd[_0x3020be(0x128)]('\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a'));const {options:_0x182a80,args:_0x6058f9,tdx:_0x3fe7a2}=_0x45142e,_0x19fc1e=_0x182a80;if(_0x6058f9[_0x3020be(0x13d)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x3020be(0x130)](_0x3020be(0x144)),console[_0x3020be(0x130)]('Examples:'),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x3020be(0x130)](_0x3020be(0x138)),0x1;const _0x4e3718=_0x6058f9[0x0],_0x2459d3=_0x182a80[_0x3020be(0x120)];let _0x3502b5=_0x4e3718;_0x2459d3&&!_0x4e3718[_0x3020be(0x12d)]('/')&&(_0x3502b5=_0x2459d3+'/'+_0x4e3718,_0x19fc1e[_0x3020be(0x12f)]&&console[_0x3020be(0x130)](_0x3020be(0x11c)+_0x3502b5));const _0x4567de=await withSpinner(_0x3020be(0x13b)+_0x3502b5+_0x3020be(0x11d),()=>_0x3fe7a2['segment'][_0x3020be(0x126)](_0x3502b5),{'verbose':_0x19fc1e[_0x3020be(0x12f)]}),_0x35a6cc=_0x4567de[_0x3020be(0x141)];_0x19fc1e[_0x3020be(0x12f)]&&console['error']('Resolved\x20type:\x20'+_0x35a6cc[_0x3020be(0x12c)]);if(_0x35a6cc['type']!==_0x3020be(0x136))return console['error'](_0x3020be(0x134)+_0x35a6cc[_0x3020be(0x12c)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x3020be(0x130)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x35a6cc[_0x3020be(0x125)])throw new SDKError(ErrorCode[_0x3020be(0x11e)],_0x3020be(0x11b));const _0x6686f5=_0x35a6cc[_0x3020be(0x135)],_0x38561c=_0x35a6cc[_0x3020be(0x125)];_0x19fc1e['verbose']&&(console['error']('Parent\x20ID:\x20'+_0x6686f5),console[_0x3020be(0x130)](_0x3020be(0x122)+_0x38561c));let _0x5ac495;if(_0x19fc1e[_0x3020be(0x145)]){const _0x4767ff=_0x19fc1e['folder'],_0x312547=await withSpinner('Resolving\x20folder\x20\x27'+_0x4767ff+_0x3020be(0x11d),()=>_0x3fe7a2['segment'][_0x3020be(0x12e)](_0x6686f5,_0x4767ff),{'verbose':_0x19fc1e[_0x3020be(0x12f)]});_0x5ac495=parseInt(_0x312547[_0x3020be(0x141)],0xa),_0x19fc1e[_0x3020be(0x12f)]&&console[_0x3020be(0x130)](_0x3020be(0x132)+_0x5ac495);}const _0x5e00df=await loadJSONFromOptions(_0x19fc1e['rule'],_0x19fc1e[_0x3020be(0x142)]),_0x492039={'name':_0x19fc1e['name'],'description':_0x19fc1e[_0x3020be(0x11a)],'rule':_0x5e00df,'kind':_0x19fc1e[_0x3020be(0x133)]!==undefined?parseInt(_0x19fc1e[_0x3020be(0x133)],0xa):undefined,'segmentFolderId':_0x5ac495},_0x4f5de0=await withSpinner(_0x3020be(0x129)+_0x35a6cc['segmentName']+_0x3020be(0x11d),()=>_0x3fe7a2['segment']['updateSegmentById'](_0x6686f5,_0x38561c,_0x492039),{'verbose':_0x19fc1e[_0x3020be(0x12f)]}),_0x51ab25=_0x4f5de0[_0x3020be(0x141)];return console['error']('✔\x20Updated\x20segment\x20\x27'+_0x51ab25[_0x3020be(0x13c)]+'\x27'),_0x3502b5!==_0x4e3718&&console[_0x3020be(0x130)](_0x3020be(0x143)+_0x3502b5),await handleSDKOutput([_0x51ab25],_0x19fc1e),0x0;}}
@@ -1 +1 @@
1
- const a31_0x4cac36=a31_0x24e5;(function(_0x3191a3,_0x140fa4){const _0x3533ef=a31_0x24e5,_0x252970=_0x3191a3();while(!![]){try{const _0x43ba76=-parseInt(_0x3533ef(0xe4))/0x1+-parseInt(_0x3533ef(0xfa))/0x2*(-parseInt(_0x3533ef(0xe3))/0x3)+-parseInt(_0x3533ef(0xe7))/0x4+parseInt(_0x3533ef(0xe2))/0x5*(parseInt(_0x3533ef(0x113))/0x6)+-parseInt(_0x3533ef(0xf5))/0x7+parseInt(_0x3533ef(0xeb))/0x8+-parseInt(_0x3533ef(0xe5))/0x9*(-parseInt(_0x3533ef(0xde))/0xa);if(_0x43ba76===_0x140fa4)break;else _0x252970['push'](_0x252970['shift']());}catch(_0x44ef4c){_0x252970['push'](_0x252970['shift']());}}}(a31_0xda6a,0x83d00));import{existsSync,statSync}from'fs';function a31_0xda6a(){const _0x29be5a=['verbose','split','parentName','5668824zwsDMR','execute','fullPath','\x27...','Site:\x20','join','cyan','name','description','Use:\x20tdx\x20segment\x20use\x20','5019693VhoguK','folderPath','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','parent_segment','resolvePathToResource','2RLtxud','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','segmentPath','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','data','length','dim','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','segment','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','segments','✔\x20Context\x20set\x20to:\x20','type','Error:\x20Path\x20is\x20required\x0a','Usage:\x20tdx\x20segment\x20use\x20<path>','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','folderId','log','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','isDirectory','config','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','red','24oBrQtH','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','green','Resolved\x20path\x20type:\x20','session','Target\x20path:\x20','error','140dDXlDt','isAbsolute','Parent\x20ID:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','1349340cAKBpv','820503wjJdHU','1047113gsiXNa','186453eAYQWM','Resolved\x20relative\x20path\x20to:\x20','189992cAdDsN'];a31_0xda6a=function(){return _0x29be5a;};return a31_0xda6a();}import a31_0x1af6ca from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a31_0x24e5(_0x28f5e0,_0x582c79){_0x28f5e0=_0x28f5e0-0xd9;const _0xda6a5c=a31_0xda6a();let _0x24e5f6=_0xda6a5c[_0x28f5e0];return _0x24e5f6;}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{[a31_0x4cac36(0xf2)]='segment:use';[a31_0x4cac36(0xf3)]=a31_0x4cac36(0x10a);async[a31_0x4cac36(0xec)](_0x33770b){const _0x2c1af8=a31_0x4cac36,{options:_0x4cf4d4,args:_0x292575,tdx:_0x160fce}=_0x33770b;if(_0x292575['length']===0x0)return console[_0x2c1af8(0xdd)](a31_0x1af6ca[_0x2c1af8(0x112)](_0x2c1af8(0x108))),console[_0x2c1af8(0xdd)](_0x2c1af8(0x109)),console[_0x2c1af8(0xdd)]('Examples:'),console[_0x2c1af8(0xdd)](_0x2c1af8(0x111)),console[_0x2c1af8(0xdd)](_0x2c1af8(0xf7)),console['error']('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x2c1af8(0xdd)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0xe25f43=_0x292575[0x0],_0x31f84e=_0x4cf4d4[_0x2c1af8(0xdb)];try{if(_0xe25f43==='/')return saveSessionContext({'segment_path':undefined},_0x31f84e),console[_0x2c1af8(0x10d)](a31_0x1af6ca[_0x2c1af8(0xd9)](_0x2c1af8(0x104))),0x0;if(existsSync(_0xe25f43)&&statSync(_0xe25f43)[_0x2c1af8(0x10f)]()){let _0x1f08a7;try{_0x1f08a7=findTdxConfig(_0xe25f43);}catch{return console[_0x2c1af8(0xdd)](a31_0x1af6ca[_0x2c1af8(0x112)](_0x2c1af8(0x114)+_0xe25f43)),console[_0x2c1af8(0xdd)](a31_0x1af6ca['cyan'](_0x2c1af8(0x10e))),0x1;}const _0x4898da=_0x1f08a7[_0x2c1af8(0x110)][_0x2c1af8(0xf8)];return saveSessionContext({'segment_path':_0x4898da,'parent_segment':_0x4898da},_0x31f84e),console[_0x2c1af8(0x10d)](a31_0x1af6ca[_0x2c1af8(0xd9)](_0x2c1af8(0x106)+a31_0x1af6ca[_0x2c1af8(0xf1)](_0x4898da))),0x0;}const _0x3cecb4=_0x4cf4d4[_0x2c1af8(0xfc)];let _0x160fd0=_0xe25f43;const _0x5009de=parsePath(_0xe25f43);if(!_0x5009de[_0x2c1af8(0xdf)]){if(!_0x3cecb4)return console[_0x2c1af8(0xdd)](a31_0x1af6ca[_0x2c1af8(0x112)](_0x2c1af8(0x10b))),console['error'](a31_0x1af6ca[_0x2c1af8(0xf1)](_0x2c1af8(0xfb))),0x1;if(_0xe25f43==='..'){const _0x5e8382=_0x3cecb4[_0x2c1af8(0xe9)]('/')['slice'](0x0,-0x1)[_0x2c1af8(0xf0)]('/');_0x160fd0=_0x5e8382||'/';}else _0xe25f43==='.'?_0x160fd0=_0x3cecb4:_0x160fd0=_0x3cecb4+'/'+_0xe25f43;_0x4cf4d4[_0x2c1af8(0xe8)]&&console['error'](_0x2c1af8(0xe6)+_0x160fd0);}if(_0x160fd0==='/'||_0x160fd0==='')return saveSessionContext({'segment_path':undefined},_0x31f84e),console[_0x2c1af8(0x10d)](a31_0x1af6ca[_0x2c1af8(0xd9)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x160fd0=normalizePath(_0x160fd0);const _0x36a562=parsePath(_0x160fd0)[_0x2c1af8(0x105)];if(_0x36a562[_0x2c1af8(0xff)]===0x0)return saveSessionContext({'segment_path':undefined},_0x31f84e),console[_0x2c1af8(0x10d)](a31_0x1af6ca[_0x2c1af8(0xd9)](_0x2c1af8(0x104))),0x0;_0x4cf4d4[_0x2c1af8(0xe8)]&&(console['error'](_0x2c1af8(0xef)+_0x4cf4d4['site']),console[_0x2c1af8(0xdd)](_0x2c1af8(0xdc)+_0x160fd0));const _0x2fcf00=await withSpinner('Resolving\x20path\x20\x27'+_0x160fd0+_0x2c1af8(0xee),()=>_0x160fce['segment'][_0x2c1af8(0xf9)](_0x160fd0),{'verbose':_0x4cf4d4[_0x2c1af8(0xe8)]}),_0x5246a8=_0x2fcf00[_0x2c1af8(0xfe)];_0x4cf4d4['verbose']&&(console['error'](_0x2c1af8(0xda)+_0x5246a8['type']),console[_0x2c1af8(0xdd)](_0x2c1af8(0xe0)+_0x5246a8['parentId']),_0x5246a8[_0x2c1af8(0x10c)]&&console[_0x2c1af8(0xdd)]('Folder\x20ID:\x20'+_0x5246a8[_0x2c1af8(0x10c)]));if(_0x5246a8[_0x2c1af8(0x107)]===_0x2c1af8(0x103))return console['error'](a31_0x1af6ca[_0x2c1af8(0x112)](_0x2c1af8(0xe1))),console[_0x2c1af8(0xdd)](_0x2c1af8(0x102)),console[_0x2c1af8(0xdd)](a31_0x1af6ca[_0x2c1af8(0xf1)](_0x2c1af8(0xf4)+_0x5246a8[_0x2c1af8(0xea)]+(_0x5246a8[_0x2c1af8(0xf6)]?'/'+_0x5246a8['folderPath'][_0x2c1af8(0xf0)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x5246a8[_0x2c1af8(0xed)],'parent_segment':_0x5246a8[_0x2c1af8(0xea)]},_0x31f84e),console['log'](a31_0x1af6ca['green'](_0x2c1af8(0x106)+a31_0x1af6ca[_0x2c1af8(0xf1)](_0x5246a8[_0x2c1af8(0xed)]))),_0x4cf4d4[_0x2c1af8(0xe8)]&&(console[_0x2c1af8(0xdd)](a31_0x1af6ca[_0x2c1af8(0x100)](_0x2c1af8(0xfd))),console['error'](a31_0x1af6ca[_0x2c1af8(0x100)](_0x2c1af8(0x101)))),0x0;}catch(_0x3dd42c){throw _0x3dd42c;}}}
1
+ const a31_0x374530=a31_0x1119;(function(_0x5c826d,_0x2155f8){const _0x44d132=a31_0x1119,_0x460dfc=_0x5c826d();while(!![]){try{const _0x41bd0b=parseInt(_0x44d132(0xbf))/0x1+-parseInt(_0x44d132(0xd2))/0x2*(-parseInt(_0x44d132(0xda))/0x3)+parseInt(_0x44d132(0xfe))/0x4+-parseInt(_0x44d132(0xc5))/0x5*(-parseInt(_0x44d132(0xd5))/0x6)+parseInt(_0x44d132(0xec))/0x7+parseInt(_0x44d132(0xee))/0x8*(-parseInt(_0x44d132(0xd9))/0x9)+parseInt(_0x44d132(0xf9))/0xa*(-parseInt(_0x44d132(0xc8))/0xb);if(_0x41bd0b===_0x2155f8)break;else _0x460dfc['push'](_0x460dfc['shift']());}catch(_0x2b2cb2){_0x460dfc['push'](_0x460dfc['shift']());}}}(a31_0x3a2e,0x1c5e2));import{existsSync,statSync}from'fs';import a31_0x344c89 from'chalk';import{BaseCommand}from'./command.js';function a31_0x3a2e(){const _0x39e65a=['8vnbpAZ','Examples:','Resolved\x20relative\x20path\x20to:\x20','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','site','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','segment:use','fullPath','\x27...','folderId','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','5490uaWJFs','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','✔\x20Context\x20set\x20to:\x20','Resolved\x20path\x20type:\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','155584XngvVf','execute','segments','186885mknnIr','log','segment','verbose','parentId','parent_segment','45BimldE','Site:\x20','session','7183vceteh','data','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','isDirectory','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','cyan','Folder\x20ID:\x20','slice','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','81882mcdetr','name','Resolving\x20path\x20\x27','154482poZOeO','red','description','config','1013490zTWBKS','3RXfkSX','Target\x20path:\x20','error','isAbsolute','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','segmentPath','dim','Usage:\x20tdx\x20segment\x20use\x20<path>','length','parentName','Use:\x20tdx\x20segment\x20use\x20','resolvePathToResource','join','split','green','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Error:\x20Path\x20is\x20required\x0a','type','621992oUGhhR','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'];a31_0x3a2e=function(){return _0x39e65a;};return a31_0x3a2e();}function a31_0x1119(_0x3918d2,_0x4764b2){_0x3918d2=_0x3918d2-0xbe;const _0x3a2e5d=a31_0x3a2e();let _0x11196f=_0x3a2e5d[_0x3918d2];return _0x11196f;}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{[a31_0x374530(0xd3)]=a31_0x374530(0xf4);[a31_0x374530(0xd7)]=a31_0x374530(0xcd);async[a31_0x374530(0xff)](_0x1af869){const _0x1de466=a31_0x374530,{options:_0x43f0ea,args:_0x36c07a,tdx:_0x588243}=_0x1af869;if(_0x36c07a[_0x1de466(0xe2)]===0x0)return console['error'](a31_0x344c89['red'](_0x1de466(0xea))),console[_0x1de466(0xdc)](_0x1de466(0xe1)),console[_0x1de466(0xdc)](_0x1de466(0xef)),console[_0x1de466(0xdc)](_0x1de466(0xed)),console[_0x1de466(0xdc)](_0x1de466(0xcc)),console[_0x1de466(0xdc)](_0x1de466(0xd1)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x197d29=_0x36c07a[0x0],_0x24862f=_0x43f0ea[_0x1de466(0xc7)];try{if(_0x197d29==='/')return saveSessionContext({'segment_path':undefined},_0x24862f),console['log'](a31_0x344c89[_0x1de466(0xe8)](_0x1de466(0xca))),0x0;if(existsSync(_0x197d29)&&statSync(_0x197d29)[_0x1de466(0xcb)]()){let _0x1aa1f5;try{_0x1aa1f5=findTdxConfig(_0x197d29);}catch{return console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xd6)](_0x1de466(0xfd)+_0x197d29)),console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xce)](_0x1de466(0xf1))),0x1;}const _0x41fa26=_0x1aa1f5[_0x1de466(0xd8)][_0x1de466(0xc4)];return saveSessionContext({'segment_path':_0x41fa26,'parent_segment':_0x41fa26},_0x24862f),console[_0x1de466(0xc0)](a31_0x344c89[_0x1de466(0xe8)](_0x1de466(0xfb)+a31_0x344c89[_0x1de466(0xce)](_0x41fa26))),0x0;}const _0x14dac7=_0x43f0ea[_0x1de466(0xdf)];let _0xeee92=_0x197d29;const _0x1d377c=parsePath(_0x197d29);if(!_0x1d377c[_0x1de466(0xdd)]){if(!_0x14dac7)return console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xd6)](_0x1de466(0xf8))),console[_0x1de466(0xdc)](a31_0x344c89['cyan'](_0x1de466(0xde))),0x1;if(_0x197d29==='..'){const _0x1f9c0b=_0x14dac7[_0x1de466(0xe7)]('/')[_0x1de466(0xd0)](0x0,-0x1)[_0x1de466(0xe6)]('/');_0xeee92=_0x1f9c0b||'/';}else _0x197d29==='.'?_0xeee92=_0x14dac7:_0xeee92=_0x14dac7+'/'+_0x197d29;_0x43f0ea[_0x1de466(0xc2)]&&console['error'](_0x1de466(0xf0)+_0xeee92);}if(_0xeee92==='/'||_0xeee92==='')return saveSessionContext({'segment_path':undefined},_0x24862f),console['log'](a31_0x344c89[_0x1de466(0xe8)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0xeee92=normalizePath(_0xeee92);const _0x3c3243=parsePath(_0xeee92)[_0x1de466(0xbe)];if(_0x3c3243['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x24862f),console[_0x1de466(0xc0)](a31_0x344c89[_0x1de466(0xe8)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x43f0ea['verbose']&&(console[_0x1de466(0xdc)](_0x1de466(0xc6)+_0x43f0ea[_0x1de466(0xf2)]),console[_0x1de466(0xdc)](_0x1de466(0xdb)+_0xeee92));const _0x3f4241=await withSpinner(_0x1de466(0xd4)+_0xeee92+_0x1de466(0xf6),()=>_0x588243[_0x1de466(0xc1)][_0x1de466(0xe5)](_0xeee92),{'verbose':_0x43f0ea[_0x1de466(0xc2)]}),_0x2cea89=_0x3f4241[_0x1de466(0xc9)];_0x43f0ea[_0x1de466(0xc2)]&&(console[_0x1de466(0xdc)](_0x1de466(0xfc)+_0x2cea89[_0x1de466(0xeb)]),console['error']('Parent\x20ID:\x20'+_0x2cea89[_0x1de466(0xc3)]),_0x2cea89[_0x1de466(0xf7)]&&console[_0x1de466(0xdc)](_0x1de466(0xcf)+_0x2cea89[_0x1de466(0xf7)]));if(_0x2cea89[_0x1de466(0xeb)]===_0x1de466(0xc1))return console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xd6)](_0x1de466(0xf3))),console['error'](_0x1de466(0xfa)),console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xce)](_0x1de466(0xe4)+_0x2cea89[_0x1de466(0xe3)]+(_0x2cea89['folderPath']?'/'+_0x2cea89['folderPath']['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x2cea89[_0x1de466(0xf5)],'parent_segment':_0x2cea89[_0x1de466(0xe3)]},_0x24862f),console[_0x1de466(0xc0)](a31_0x344c89[_0x1de466(0xe8)](_0x1de466(0xfb)+a31_0x344c89[_0x1de466(0xce)](_0x2cea89['fullPath']))),_0x43f0ea['verbose']&&(console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xe0)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console[_0x1de466(0xdc)](a31_0x344c89[_0x1de466(0xe0)](_0x1de466(0xe9)))),0x0;}catch(_0x71c085){throw _0x71c085;}}}
@@ -1 +1 @@
1
- function a32_0x8eb8(){const _0x1d61fb=['errorCode','):\x20','valid','description','1251AgPVeY','\x20warning(s)\x20found','targetDir','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','execute','.yml','\x20warning(s)','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','705617rZLkNv','message','89817rPWSnn','\x20valid','277IQsLgQ','invalidCount','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','Validation\x20failed:\x20','2698kUIUyL','yellow','4dNFMuS','✔\x20All\x20','red','warnings','258824TWqklp','helpText','type','green','segment:validate','Error:\x20','240wDyAvF','verbose','475405EaJxwY','errors','log','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','Validate\x20segment\x20and\x20journey\x20YAML\x20files','error','\x20file(s)\x20valid','.yaml','cwd','3472JTdxCm','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','dim','warningCount','no_parent','filePath','37670AaWmCi','\x20file(s)\x20with\x20errors,\x20','hasErrors','length','\x20error(s)'];a32_0x8eb8=function(){return _0x1d61fb;};return a32_0x8eb8();}const a32_0x48a328=a32_0x5623;(function(_0x30089f,_0x5d4db4){const _0x32eeaa=a32_0x5623,_0x3da860=_0x30089f();while(!![]){try{const _0x37067b=parseInt(_0x32eeaa(0x173))/0x1*(-parseInt(_0x32eeaa(0x177))/0x2)+parseInt(_0x32eeaa(0x171))/0x3+parseInt(_0x32eeaa(0x179))/0x4*(parseInt(_0x32eeaa(0x185))/0x5)+-parseInt(_0x32eeaa(0x183))/0x6*(-parseInt(_0x32eeaa(0x18e))/0x7)+-parseInt(_0x32eeaa(0x17d))/0x8+parseInt(_0x32eeaa(0x167))/0x9*(parseInt(_0x32eeaa(0x194))/0xa)+parseInt(_0x32eeaa(0x16f))/0xb;if(_0x37067b===_0x5d4db4)break;else _0x3da860['push'](_0x3da860['shift']());}catch(_0x4953c5){_0x3da860['push'](_0x3da860['shift']());}}}(a32_0x8eb8,0x4fbc2));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a32_0x5623(_0x3211f1,_0x34fd14){_0x3211f1=_0x3211f1-0x167;const _0x8eb870=a32_0x8eb8();let _0x562397=_0x8eb870[_0x3211f1];return _0x562397;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a32_0xa12fde from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{['name']=a32_0x48a328(0x181);[a32_0x48a328(0x19c)]=a32_0x48a328(0x189);async[a32_0x48a328(0x16b)](_0x5890db){const _0x2e740f=a32_0x48a328,{options:_0x10adfd,args:_0xc94b08}=_0x5890db,_0x21d1e7=_0x10adfd,_0x2f122e=await resolveTarget({'arg':_0xc94b08[0x0],'contextParent':_0x10adfd['parentSegment'],'cwd':process[_0x2e740f(0x18d)]()});if(!isSuccessfulResolution(_0x2f122e))return _0x2f122e[_0x2e740f(0x199)]===_0x2e740f(0x192)?(console[_0x2e740f(0x18a)](a32_0xa12fde[_0x2e740f(0x178)](_0x2e740f(0x18f))),console[_0x2e740f(0x18a)](_0x2e740f(0x188)),console[_0x2e740f(0x18a)](_0x2e740f(0x16a)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x2e740f(0x18a)](a32_0xa12fde[_0x2e740f(0x17b)](_0x2e740f(0x182)+_0x2f122e[_0x2e740f(0x170)]+'\x0a')),_0x2f122e[_0x2e740f(0x17e)]&&console[_0x2e740f(0x18a)](a32_0xa12fde['cyan'](_0x2f122e[_0x2e740f(0x17e)]))),0x1;const _0x53e02f=_0x2f122e[_0x2e740f(0x169)],_0x2474be=_0x2f122e[_0x2e740f(0x17f)]==='file'?_0x2f122e[_0x2e740f(0x193)]:undefined;if(!_0x2474be&&!existsSync(_0x53e02f))return console[_0x2e740f(0x18a)](a32_0xa12fde[_0x2e740f(0x17b)]('Error:\x20Directory\x20not\x20found:\x20'+_0x53e02f+'\x0a')),0x1;let _0x55d316;if(_0x2474be){if(!_0x2474be['endsWith'](_0x2e740f(0x16c))&&!_0x2474be['endsWith'](_0x2e740f(0x18c)))return console[_0x2e740f(0x18a)](a32_0xa12fde[_0x2e740f(0x17b)](_0x2e740f(0x175)+_0x2474be+'\x0a')),0x1;_0x55d316=[_0x2474be];}else _0x55d316=findYamlFiles(_0x53e02f);if(_0x55d316[_0x2e740f(0x197)]===0x0)return console[_0x2e740f(0x18a)](a32_0xa12fde[_0x2e740f(0x17b)](_0x2e740f(0x16e)+_0x53e02f+'\x0a')),0x1;const _0x1aca3f=validateYamlFiles(_0x55d316,_0x53e02f),_0x3f0d43=calculateSummary(_0x1aca3f);for(const _0x9f4a0e of _0x1aca3f){if(!isValidationResult(_0x9f4a0e))continue;const {relativePath:_0x1786ca,source:_0x1e0b73,result:_0x4475ee,fileType:_0x56bfec}=_0x9f4a0e,_0x70c786=_0x56bfec;if(_0x4475ee[_0x2e740f(0x19b)]&&_0x4475ee['warnings']['length']===0x0)_0x21d1e7[_0x2e740f(0x184)]&&console[_0x2e740f(0x187)](a32_0xa12fde[_0x2e740f(0x180)]('✔\x20'+_0x1786ca)+a32_0xa12fde['dim']('\x20('+_0x70c786+')'));else _0x4475ee[_0x2e740f(0x19b)]?(console[_0x2e740f(0x187)](a32_0xa12fde[_0x2e740f(0x178)]('⚠\x20'+_0x1786ca)+a32_0xa12fde[_0x2e740f(0x190)]('\x20('+_0x70c786+_0x2e740f(0x19a)+_0x4475ee[_0x2e740f(0x17c)][_0x2e740f(0x197)]+_0x2e740f(0x16d))),console[_0x2e740f(0x187)](formatValidationResult(_0x4475ee,_0x1e0b73,_0x1786ca))):(console[_0x2e740f(0x187)](a32_0xa12fde[_0x2e740f(0x17b)]('✖\x20'+_0x1786ca)+a32_0xa12fde['dim']('\x20('+_0x70c786+_0x2e740f(0x19a)+_0x4475ee[_0x2e740f(0x186)][_0x2e740f(0x197)]+_0x2e740f(0x198))),console[_0x2e740f(0x187)](formatValidationResult(_0x4475ee,_0x1e0b73,_0x1786ca)));}return console[_0x2e740f(0x187)](''),_0x3f0d43[_0x2e740f(0x196)]?(console[_0x2e740f(0x187)](a32_0xa12fde[_0x2e740f(0x17b)](_0x2e740f(0x176)+_0x3f0d43[_0x2e740f(0x174)]+_0x2e740f(0x195)+_0x3f0d43['validCount']+_0x2e740f(0x172))),_0x3f0d43[_0x2e740f(0x191)]>0x0&&console[_0x2e740f(0x187)](a32_0xa12fde['yellow'](_0x3f0d43[_0x2e740f(0x191)]+_0x2e740f(0x168))),0x1):(console[_0x2e740f(0x187)](a32_0xa12fde[_0x2e740f(0x180)](_0x2e740f(0x17a)+_0x3f0d43['validCount']+_0x2e740f(0x18b))),_0x3f0d43[_0x2e740f(0x191)]>0x0&&console[_0x2e740f(0x187)](a32_0xa12fde[_0x2e740f(0x178)](_0x3f0d43[_0x2e740f(0x191)]+_0x2e740f(0x168))),0x0);}}
1
+ function a32_0x1461(_0x5a36ef,_0x3a6ab7){_0x5a36ef=_0x5a36ef-0xcb;const _0x1db915=a32_0x1db9();let _0x14618d=_0x1db915[_0x5a36ef];return _0x14618d;}const a32_0x20372f=a32_0x1461;(function(_0xa1b88a,_0x5e7cd8){const _0x164991=a32_0x1461,_0x98ede7=_0xa1b88a();while(!![]){try{const _0x5bc447=-parseInt(_0x164991(0xe9))/0x1*(parseInt(_0x164991(0xdb))/0x2)+-parseInt(_0x164991(0xcd))/0x3*(-parseInt(_0x164991(0xef))/0x4)+parseInt(_0x164991(0xd4))/0x5+-parseInt(_0x164991(0xdf))/0x6*(-parseInt(_0x164991(0xd0))/0x7)+parseInt(_0x164991(0xd5))/0x8+parseInt(_0x164991(0xd8))/0x9*(parseInt(_0x164991(0xd1))/0xa)+parseInt(_0x164991(0xcf))/0xb*(-parseInt(_0x164991(0xe7))/0xc);if(_0x5bc447===_0x5e7cd8)break;else _0x98ede7['push'](_0x98ede7['shift']());}catch(_0x2d588e){_0x98ede7['push'](_0x98ede7['shift']());}}}(a32_0x1db9,0x4fb88));function a32_0x1db9(){const _0x130a3d=['errorCode','targetDir','file','helpText','log','name','\x20warning(s)\x20found','✔\x20All\x20','yellow','type','execute','verbose','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','length','parentSegment','red','3PTDYvk','hasErrors','1654576UnWZtt','7WXAOTY','5280ddfWcJ','cyan','Error:\x20Directory\x20not\x20found:\x20','1847770pyrUAD','957632KPhdGH','Error:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','7893CoQNIG','dim','error','2cUICpr','warnings','validCount','green','1257894EDooBq','segment:validate','\x20file(s)\x20with\x20errors,\x20','warningCount','Validate\x20segment\x20and\x20journey\x20YAML\x20files','cwd','Validation\x20failed:\x20','.yml','108nKamge','errors','113951DCUfBR','\x20file(s)\x20valid','valid','\x20valid','endsWith','):\x20','2529072WXoiJI'];a32_0x1db9=function(){return _0x130a3d;};return a32_0x1db9();}import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a32_0x3669d5 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a32_0x20372f(0xf5)]=a32_0x20372f(0xe0);['description']=a32_0x20372f(0xe3);async[a32_0x20372f(0xfa)](_0x157f77){const _0x3a7c1f=a32_0x20372f,{options:_0xf09d77,args:_0x47528a}=_0x157f77,_0x4d05da=_0xf09d77,_0x36b89b=await resolveTarget({'arg':_0x47528a[0x0],'contextParent':_0xf09d77[_0x3a7c1f(0xcb)],'cwd':process[_0x3a7c1f(0xe4)]()});if(!isSuccessfulResolution(_0x36b89b))return _0x36b89b[_0x3a7c1f(0xf0)]==='no_parent'?(console[_0x3a7c1f(0xda)](a32_0x3669d5['yellow']('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x3a7c1f(0xda)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x3a7c1f(0xda)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory'),console[_0x3a7c1f(0xda)](_0x3a7c1f(0xd7))):(console[_0x3a7c1f(0xda)](a32_0x3669d5['red'](_0x3a7c1f(0xd6)+_0x36b89b['message']+'\x0a')),_0x36b89b[_0x3a7c1f(0xf3)]&&console[_0x3a7c1f(0xda)](a32_0x3669d5[_0x3a7c1f(0xd2)](_0x36b89b[_0x3a7c1f(0xf3)]))),0x1;const _0x18592e=_0x36b89b[_0x3a7c1f(0xf1)],_0x5bce2c=_0x36b89b[_0x3a7c1f(0xf9)]===_0x3a7c1f(0xf2)?_0x36b89b['filePath']:undefined;if(!_0x5bce2c&&!existsSync(_0x18592e))return console['error'](a32_0x3669d5[_0x3a7c1f(0xcc)](_0x3a7c1f(0xd3)+_0x18592e+'\x0a')),0x1;let _0x123017;if(_0x5bce2c){if(!_0x5bce2c[_0x3a7c1f(0xed)](_0x3a7c1f(0xe6))&&!_0x5bce2c[_0x3a7c1f(0xed)]('.yaml'))return console[_0x3a7c1f(0xda)](a32_0x3669d5['red'](_0x3a7c1f(0xfc)+_0x5bce2c+'\x0a')),0x1;_0x123017=[_0x5bce2c];}else _0x123017=findYamlFiles(_0x18592e);if(_0x123017[_0x3a7c1f(0xfd)]===0x0)return console[_0x3a7c1f(0xda)](a32_0x3669d5[_0x3a7c1f(0xcc)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x18592e+'\x0a')),0x1;const _0x10290a=validateYamlFiles(_0x123017,_0x18592e),_0x5640ab=calculateSummary(_0x10290a);for(const _0xb8aa66 of _0x10290a){if(!isValidationResult(_0xb8aa66))continue;const {relativePath:_0x310ccc,source:_0x3b766b,result:_0x2d7110,fileType:_0x195236}=_0xb8aa66,_0x3feeda=_0x195236;if(_0x2d7110[_0x3a7c1f(0xeb)]&&_0x2d7110[_0x3a7c1f(0xdc)][_0x3a7c1f(0xfd)]===0x0)_0x4d05da[_0x3a7c1f(0xfb)]&&console['log'](a32_0x3669d5[_0x3a7c1f(0xde)]('✔\x20'+_0x310ccc)+a32_0x3669d5[_0x3a7c1f(0xd9)]('\x20('+_0x3feeda+')'));else _0x2d7110[_0x3a7c1f(0xeb)]?(console[_0x3a7c1f(0xf4)](a32_0x3669d5[_0x3a7c1f(0xf8)]('⚠\x20'+_0x310ccc)+a32_0x3669d5[_0x3a7c1f(0xd9)]('\x20('+_0x3feeda+_0x3a7c1f(0xee)+_0x2d7110[_0x3a7c1f(0xdc)][_0x3a7c1f(0xfd)]+'\x20warning(s)')),console['log'](formatValidationResult(_0x2d7110,_0x3b766b,_0x310ccc))):(console[_0x3a7c1f(0xf4)](a32_0x3669d5['red']('✖\x20'+_0x310ccc)+a32_0x3669d5[_0x3a7c1f(0xd9)]('\x20('+_0x3feeda+'):\x20'+_0x2d7110[_0x3a7c1f(0xe8)][_0x3a7c1f(0xfd)]+'\x20error(s)')),console[_0x3a7c1f(0xf4)](formatValidationResult(_0x2d7110,_0x3b766b,_0x310ccc)));}return console['log'](''),_0x5640ab[_0x3a7c1f(0xce)]?(console['log'](a32_0x3669d5[_0x3a7c1f(0xcc)](_0x3a7c1f(0xe5)+_0x5640ab['invalidCount']+_0x3a7c1f(0xe1)+_0x5640ab[_0x3a7c1f(0xdd)]+_0x3a7c1f(0xec))),_0x5640ab[_0x3a7c1f(0xe2)]>0x0&&console['log'](a32_0x3669d5['yellow'](_0x5640ab[_0x3a7c1f(0xe2)]+_0x3a7c1f(0xf6))),0x1):(console[_0x3a7c1f(0xf4)](a32_0x3669d5[_0x3a7c1f(0xde)](_0x3a7c1f(0xf7)+_0x5640ab[_0x3a7c1f(0xdd)]+_0x3a7c1f(0xea))),_0x5640ab[_0x3a7c1f(0xe2)]>0x0&&console[_0x3a7c1f(0xf4)](a32_0x3669d5[_0x3a7c1f(0xf8)](_0x5640ab[_0x3a7c1f(0xe2)]+_0x3a7c1f(0xf6))),0x0);}}
@@ -1 +1 @@
1
- function a33_0x37ea(_0x17b8b8,_0x2cf846){_0x17b8b8=_0x17b8b8-0x1cd;const _0x12029f=a33_0x1202();let _0x37ea05=_0x12029f[_0x17b8b8];return _0x37ea05;}const a33_0x46dd7d=a33_0x37ea;(function(_0x1cca35,_0xc095f5){const _0x3266c0=a33_0x37ea,_0x37689b=_0x1cca35();while(!![]){try{const _0x368dbf=parseInt(_0x3266c0(0x1d5))/0x1*(-parseInt(_0x3266c0(0x1e0))/0x2)+parseInt(_0x3266c0(0x20a))/0x3*(-parseInt(_0x3266c0(0x1e8))/0x4)+parseInt(_0x3266c0(0x1e5))/0x5+parseInt(_0x3266c0(0x217))/0x6*(-parseInt(_0x3266c0(0x1fc))/0x7)+-parseInt(_0x3266c0(0x1e1))/0x8*(parseInt(_0x3266c0(0x1fd))/0x9)+-parseInt(_0x3266c0(0x205))/0xa+parseInt(_0x3266c0(0x1dd))/0xb;if(_0x368dbf===_0xc095f5)break;else _0x37689b['push'](_0x37689b['shift']());}catch(_0x4e0b0d){_0x37689b['push'](_0x37689b['shift']());}}}(a33_0x1202,0x28330));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';function a33_0x1202(){const _0xa731d8=['(empty)','journeyBundleName','filter','format','dim','listRecursive','10079564khPkeF','execute','includes','8702uZbgBb','73168XvIxkI','\x5c$&','\x20folder','localeCompare','1643945ePuqku','resolvePathToResource','/app/ps/','4vHTsXN','jsonl','name','No\x20items\x20match\x20pattern:\x20','journey','site','error','(not\x20set)','Folder\x20ID:\x20','description','\x20\x20Cause:\x20','log','Parent\x20ID:\x20','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','parentId','✔\x20Found\x20','Parent\x20segment\x20context:\x20','Resolving\x20path\x20\x27','listJourneysFromParentSegment','\x20journey','1561TEYEFV','126HbfIAX','Set\x20a\x20parent\x20segment\x20context\x20first:','segments','cause','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','Folder/pattern\x20arg:\x20','verbose','Error:\x20','2712400fataJs','segment','web','replace','sort','824493zwvmKG','listUnified','length','folder','\x27...','recursive','\x20segment','Recursive\x20mode:\x20enabled',',\x20and\x20','/e/','folderId',']\x20matching\x20\x27','test','4026oqlYPM','\x20matching\x20\x27','data','json','Resolving\x20parent\x20segment\x20\x27','Site:\x20','all','listWithPattern','Error:\x20No\x20parent\x20segment\x20context\x20set.','59pVcsBr','map'];a33_0x1202=function(){return _0xa731d8;};return a33_0x1202();}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a33_0x42f4a4 from'chalk';export class SegmentsCommand extends BaseCommand{[a33_0x46dd7d(0x1ea)]=a33_0x46dd7d(0x1ff);[a33_0x46dd7d(0x1f1)]='List\x20folders\x20and\x20child\x20segments';async[a33_0x46dd7d(0x1de)](_0x5b0569){const _0x41edc2=a33_0x46dd7d,{options:_0x20ee1d,args:_0x1fc3bc}=_0x5b0569,_0x57eefc=_0x20ee1d[_0x41edc2(0x20f)],_0x22a9f8=_0x1fc3bc[0x0];try{const _0x33d9f1=_0x20ee1d['parentSegment'];_0x20ee1d['verbose']&&(console['error'](_0x41edc2(0x1d1)+_0x20ee1d['site']),console['error'](_0x41edc2(0x1f8)+(_0x33d9f1||_0x41edc2(0x1ef))),_0x22a9f8&&console['error'](_0x41edc2(0x202)+_0x22a9f8),_0x57eefc&&console[_0x41edc2(0x1ee)](_0x41edc2(0x211)));if(!_0x33d9f1)return console['error'](_0x41edc2(0x1d4)),console[_0x41edc2(0x1ee)](''),console['error'](_0x41edc2(0x1fe)),console[_0x41edc2(0x1ee)](_0x41edc2(0x201)),console['error'](_0x41edc2(0x1f5)),console[_0x41edc2(0x1ee)](''),console[_0x41edc2(0x1ee)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x2e4bbc=_0x22a9f8&&(_0x22a9f8['includes']('*')||_0x22a9f8[_0x41edc2(0x1df)]('?'));if(_0x2e4bbc)return await this[_0x41edc2(0x1d3)](_0x5b0569,_0x33d9f1,_0x22a9f8);const _0x721471=_0x22a9f8?_0x33d9f1+'/'+_0x22a9f8:_0x33d9f1;return _0x57eefc?await this[_0x41edc2(0x1dc)](_0x5b0569,_0x721471):await this[_0x41edc2(0x20b)](_0x5b0569,_0x721471);}catch(_0xab8a71){if(_0xab8a71 instanceof SDKError)return console['error'](_0x41edc2(0x204)+_0xab8a71['message']),_0xab8a71[_0x41edc2(0x200)]&&console['error'](_0x41edc2(0x1f2)+_0xab8a71['cause']),0x1;throw _0xab8a71;}}async[a33_0x46dd7d(0x1d3)](_0x1c62c9,_0xb815e8,_0x1afb19){const _0x4b0fab=a33_0x46dd7d,{options:_0x496d67,tdx:_0xe99f2b}=_0x1c62c9,_0x390e21=_0x496d67[_0x4b0fab(0x207)],_0x174284=await withSpinner(_0x4b0fab(0x1d0)+_0xb815e8+_0x4b0fab(0x20e),()=>_0xe99f2b[_0x4b0fab(0x206)][_0x4b0fab(0x1e6)](_0xb815e8),{'verbose':_0x496d67[_0x4b0fab(0x203)]}),_0x1ad6f8=_0x174284[_0x4b0fab(0x1ce)],_0x29c19a=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>Promise[_0x4b0fab(0x1d2)]([_0xe99f2b[_0x4b0fab(0x206)][_0x4b0fab(0x20b)](_0x1ad6f8['parentId'],_0x1ad6f8[_0x4b0fab(0x214)]),_0xe99f2b[_0x4b0fab(0x1ec)][_0x4b0fab(0x1fa)](_0x1ad6f8['parentId'])]),{'verbose':_0x496d67[_0x4b0fab(0x203)]}),[_0x18fdd0,_0x1732d1]=_0x29c19a[_0x4b0fab(0x1ce)],{folders:_0x445aa8,segments:_0x16b572}=_0x18fdd0,_0x57d66e=_0x1afb19[_0x4b0fab(0x208)](/[.+^${}()|[\]\\]/g,_0x4b0fab(0x1e2))[_0x4b0fab(0x208)](/\*/g,'.*')[_0x4b0fab(0x208)](/\?/g,'.'),_0x1281cd=new RegExp('^'+_0x57d66e+'$','i'),_0x57c528=_0x445aa8[_0x4b0fab(0x1d9)](_0x35e6d5=>_0x1281cd[_0x4b0fab(0x216)](_0x35e6d5[_0x4b0fab(0x1ea)])),_0x3c2b48=_0x16b572[_0x4b0fab(0x1d9)](_0x53f175=>_0x1281cd[_0x4b0fab(0x216)](_0x53f175[_0x4b0fab(0x1ea)])),_0x503fdf=_0x1732d1[_0x4b0fab(0x1d9)](_0x173a09=>_0x1281cd[_0x4b0fab(0x216)](_0x173a09[_0x4b0fab(0x1d8)])),_0x28b9f2=_0x57c528[_0x4b0fab(0x20c)]+_0x3c2b48[_0x4b0fab(0x20c)]+_0x503fdf[_0x4b0fab(0x20c)];console['error']('✔\x20Found\x20'+_0x57c528[_0x4b0fab(0x20c)]+_0x4b0fab(0x1e3)+(_0x57c528[_0x4b0fab(0x20c)]!==0x1?'s':'')+',\x20'+_0x3c2b48['length']+_0x4b0fab(0x210)+(_0x3c2b48['length']!==0x1?'s':'')+_0x4b0fab(0x212)+_0x503fdf[_0x4b0fab(0x20c)]+_0x4b0fab(0x1fb)+(_0x503fdf[_0x4b0fab(0x20c)]!==0x1?'s':'')+_0x4b0fab(0x1cd)+_0x1afb19+'\x27');const _0x5b4b78=_0x447b2a=>{const _0x15d0c9=_0x4b0fab;return getConsoleNextUrl(_0x496d67[_0x15d0c9(0x1ed)],_0x15d0c9(0x1e7)+_0x1ad6f8[_0x15d0c9(0x1f6)]+'/e/'+_0x447b2a);},_0x545eea=_0x496d67[_0x4b0fab(0x1da)]===_0x4b0fab(0x1cf)||_0x496d67[_0x4b0fab(0x1da)]==='jsonl';if(_0x545eea){const _0x51381e=[..._0x57c528[_0x4b0fab(0x1d6)](_0x48083d=>({..._0x48083d,'type':_0x4b0fab(0x20d)})),..._0x3c2b48[_0x4b0fab(0x1d6)](_0x5f0e29=>({..._0x5f0e29,'type':_0x4b0fab(0x206),'url':_0x5b4b78(_0x5f0e29['id'])})),..._0x503fdf['map'](_0x170af2=>({..._0x170af2,'name':_0x170af2[_0x4b0fab(0x1d8)],'type':_0x4b0fab(0x1ec)}))][_0x4b0fab(0x209)]((_0x3d9a2b,_0x24a05f)=>_0x3d9a2b[_0x4b0fab(0x1ea)][_0x4b0fab(0x1e4)](_0x24a05f['name']));await handleSDKOutput(_0x51381e,_0x496d67);}else{if(_0x28b9f2===0x0)console[_0x4b0fab(0x1f3)](_0x4b0fab(0x1eb)+_0x1afb19);else{console['log'](a33_0x42f4a4['dim']('['+_0xb815e8+_0x4b0fab(0x215)+_0x1afb19+'\x27'));const _0x12ebec=formatFlatList(_0x57c528,_0x3c2b48,{'showMetadata':!![],'showUrl':_0x390e21,'getSegmentUrl':_0x5b4b78},_0x503fdf);console['log'](_0x12ebec);}}return 0x0;}async[a33_0x46dd7d(0x20b)](_0x5783df,_0x34bc6f){const _0x573e8f=a33_0x46dd7d,{options:_0x1c435e,tdx:_0x2001da}=_0x5783df,_0x3b7f94=_0x1c435e[_0x573e8f(0x207)],_0xd19193=await withSpinner(_0x573e8f(0x1f9)+_0x34bc6f+'\x27...',()=>_0x2001da[_0x573e8f(0x206)][_0x573e8f(0x1e6)](_0x34bc6f),{'verbose':_0x1c435e['verbose']}),_0xb3c5f6=_0xd19193[_0x573e8f(0x1ce)];_0x1c435e['verbose']&&(console[_0x573e8f(0x1ee)](_0x573e8f(0x1f4)+_0xb3c5f6[_0x573e8f(0x1f6)]),_0xb3c5f6[_0x573e8f(0x214)]&&console[_0x573e8f(0x1ee)](_0x573e8f(0x1f0)+_0xb3c5f6[_0x573e8f(0x214)]));const _0x454574=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>Promise[_0x573e8f(0x1d2)]([_0x2001da['segment'][_0x573e8f(0x20b)](_0xb3c5f6[_0x573e8f(0x1f6)],_0xb3c5f6[_0x573e8f(0x214)]),_0x2001da[_0x573e8f(0x1ec)][_0x573e8f(0x1fa)](_0xb3c5f6[_0x573e8f(0x1f6)])]),{'verbose':_0x1c435e[_0x573e8f(0x203)]}),[_0x3ab871,_0xcde9af]=_0x454574['data'],{folders:_0x4f2841,segments:_0x4190e0}=_0x3ab871,_0x537e00=_0x4f2841[_0x573e8f(0x20c)]+_0x4190e0['length']+_0xcde9af['length'];console[_0x573e8f(0x1ee)](_0x573e8f(0x1f7)+_0x4f2841[_0x573e8f(0x20c)]+_0x573e8f(0x1e3)+(_0x4f2841[_0x573e8f(0x20c)]!==0x1?'s':'')+',\x20'+_0x4190e0[_0x573e8f(0x20c)]+_0x573e8f(0x210)+(_0x4190e0[_0x573e8f(0x20c)]!==0x1?'s':'')+_0x573e8f(0x212)+_0xcde9af[_0x573e8f(0x20c)]+_0x573e8f(0x1fb)+(_0xcde9af[_0x573e8f(0x20c)]!==0x1?'s':''));const _0x50d25f=_0x30abe5=>{const _0x5512f6=_0x573e8f;return getConsoleNextUrl(_0x1c435e[_0x5512f6(0x1ed)],_0x5512f6(0x1e7)+_0xb3c5f6[_0x5512f6(0x1f6)]+_0x5512f6(0x213)+_0x30abe5);},_0x365618=_0x59a369=>{const _0x2ca38c=_0x573e8f;return getConsoleNextUrl(_0x1c435e[_0x2ca38c(0x1ed)],_0x2ca38c(0x1e7)+_0xb3c5f6[_0x2ca38c(0x1f6)]+_0x2ca38c(0x213)+_0x59a369+'/j/da');},_0x45e7e0=_0x1c435e[_0x573e8f(0x1da)]==='json'||_0x1c435e[_0x573e8f(0x1da)]==='jsonl';if(_0x45e7e0){const _0x1ff487=[..._0x4f2841[_0x573e8f(0x1d6)](_0x1b4065=>({..._0x1b4065,'type':_0x573e8f(0x20d)})),..._0x4190e0[_0x573e8f(0x1d6)](_0xebdf92=>({..._0xebdf92,'type':_0x573e8f(0x206),'url':_0x50d25f(_0xebdf92['id'])})),..._0xcde9af[_0x573e8f(0x1d6)](_0x6ef9f3=>({..._0x6ef9f3,'name':_0x6ef9f3[_0x573e8f(0x1d8)],'type':_0x573e8f(0x1ec),'url':_0x365618(_0x6ef9f3['id'])}))]['sort']((_0x37de75,_0x5d4eba)=>_0x37de75['name'][_0x573e8f(0x1e4)](_0x5d4eba[_0x573e8f(0x1ea)]));await handleSDKOutput(_0x1ff487,_0x1c435e);}else{if(_0x537e00===0x0)console['log'](a33_0x42f4a4[_0x573e8f(0x1db)]('['+_0x34bc6f+']')),console[_0x573e8f(0x1f3)](_0x573e8f(0x1d7));else{console[_0x573e8f(0x1f3)](a33_0x42f4a4[_0x573e8f(0x1db)]('['+_0x34bc6f+']'));const _0x4a96cd=formatFlatList(_0x4f2841,_0x4190e0,{'showMetadata':!![],'showUrl':_0x3b7f94,'getSegmentUrl':_0x50d25f,'getJourneyUrl':_0x365618},_0xcde9af);console[_0x573e8f(0x1f3)](_0x4a96cd);}}return 0x0;}async[a33_0x46dd7d(0x1dc)](_0x226d4d,_0x1c9f86){const _0x55ff48=a33_0x46dd7d,{options:_0x27fbc7,tdx:_0x3f0cec}=_0x226d4d,_0x3dd23b=_0x27fbc7[_0x55ff48(0x207)],_0x19b3a8=await withSpinner(_0x55ff48(0x1f9)+_0x1c9f86+_0x55ff48(0x20e),()=>_0x3f0cec[_0x55ff48(0x206)][_0x55ff48(0x1e6)](_0x1c9f86),{'verbose':_0x27fbc7[_0x55ff48(0x203)]}),_0x38d32d=_0x19b3a8[_0x55ff48(0x1ce)];_0x27fbc7[_0x55ff48(0x203)]&&(console[_0x55ff48(0x1ee)](_0x55ff48(0x1f4)+_0x38d32d['parentId']),_0x38d32d['folderId']&&console[_0x55ff48(0x1ee)]('Folder\x20ID:\x20'+_0x38d32d['folderId']));const _0x4dc5b5=_0x27fbc7['maxDepth']||0xa,_0x15c95c=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x3f0cec['segment']['listRecursive'](_0x38d32d['parentId'],_0x38d32d[_0x55ff48(0x214)],0x0,_0x4dc5b5),{'verbose':_0x27fbc7[_0x55ff48(0x203)]}),_0x1a9fab=_0x15c95c[_0x55ff48(0x1ce)];console['error']('✔\x20Built\x20tree\x20with\x20'+_0x1a9fab[_0x55ff48(0x20c)]+'\x20top-level\x20items');const _0x4def12=_0x20916c=>{const _0x4dbd7c=_0x55ff48;return getConsoleNextUrl(_0x27fbc7[_0x4dbd7c(0x1ed)],_0x4dbd7c(0x1e7)+_0x38d32d[_0x4dbd7c(0x1f6)]+_0x4dbd7c(0x213)+_0x20916c);};if(_0x27fbc7[_0x55ff48(0x1da)]===_0x55ff48(0x1cf)||_0x27fbc7[_0x55ff48(0x1da)]===_0x55ff48(0x1e9))await handleSDKOutput(_0x1a9fab,_0x27fbc7);else{console[_0x55ff48(0x1f3)](a33_0x42f4a4[_0x55ff48(0x1db)]('['+_0x1c9f86+']'));const _0x30bfe6=formatTree(_0x1a9fab,{'showMetadata':!![],'showUrl':_0x3dd23b,'getSegmentUrl':_0x4def12});console[_0x55ff48(0x1f3)](_0x30bfe6);}return 0x0;}}
1
+ const a33_0x43bd7b=a33_0x42ad;(function(_0x115ac9,_0x6ec417){const _0x2ce629=a33_0x42ad,_0x581a53=_0x115ac9();while(!![]){try{const _0x243cb0=parseInt(_0x2ce629(0xea))/0x1+parseInt(_0x2ce629(0x111))/0x2*(parseInt(_0x2ce629(0x110))/0x3)+parseInt(_0x2ce629(0x112))/0x4*(-parseInt(_0x2ce629(0xf9))/0x5)+-parseInt(_0x2ce629(0xec))/0x6*(-parseInt(_0x2ce629(0xf5))/0x7)+-parseInt(_0x2ce629(0x118))/0x8*(parseInt(_0x2ce629(0xfa))/0x9)+parseInt(_0x2ce629(0xe0))/0xa*(parseInt(_0x2ce629(0x105))/0xb)+-parseInt(_0x2ce629(0xe1))/0xc;if(_0x243cb0===_0x6ec417)break;else _0x581a53['push'](_0x581a53['shift']());}catch(_0x118be9){_0x581a53['push'](_0x581a53['shift']());}}}(a33_0x3042,0x8169c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a33_0x48c522 from'chalk';export class SegmentsCommand extends BaseCommand{[a33_0x43bd7b(0xda)]=a33_0x43bd7b(0xd8);[a33_0x43bd7b(0xfb)]=a33_0x43bd7b(0xe4);async[a33_0x43bd7b(0xd9)](_0x55367a){const _0x403045=a33_0x43bd7b,{options:_0x5e3ccf,args:_0x144eba}=_0x55367a,_0x36f839=_0x5e3ccf[_0x403045(0xf2)],_0x3c7e4f=_0x144eba[0x0];try{const _0x27880c=_0x5e3ccf[_0x403045(0xe7)];_0x5e3ccf[_0x403045(0xfd)]&&(console['error']('Site:\x20'+_0x5e3ccf[_0x403045(0x11a)]),console[_0x403045(0x11d)]('Parent\x20segment\x20context:\x20'+(_0x27880c||'(not\x20set)')),_0x3c7e4f&&console[_0x403045(0x11d)](_0x403045(0xd7)+_0x3c7e4f),_0x36f839&&console[_0x403045(0x11d)](_0x403045(0x104)));if(!_0x27880c)return console[_0x403045(0x11d)]('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console[_0x403045(0x11d)](''),console[_0x403045(0x11d)](_0x403045(0xf0)),console[_0x403045(0x11d)](_0x403045(0xe3)),console[_0x403045(0x11d)](_0x403045(0xfe)),console[_0x403045(0x11d)](''),console[_0x403045(0x11d)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x16db8f=_0x3c7e4f&&(_0x3c7e4f[_0x403045(0x10c)]('*')||_0x3c7e4f['includes']('?'));if(_0x16db8f)return await this[_0x403045(0xf3)](_0x55367a,_0x27880c,_0x3c7e4f);const _0x5e81a1=_0x3c7e4f?_0x27880c+'/'+_0x3c7e4f:_0x27880c;return _0x36f839?await this[_0x403045(0xdb)](_0x55367a,_0x5e81a1):await this[_0x403045(0xe9)](_0x55367a,_0x5e81a1);}catch(_0x5073a7){if(_0x5073a7 instanceof SDKError)return console[_0x403045(0x11d)](_0x403045(0x119)+_0x5073a7[_0x403045(0xd4)]),_0x5073a7[_0x403045(0x10a)]&&console[_0x403045(0x11d)](_0x403045(0xee)+_0x5073a7['cause']),0x1;throw _0x5073a7;}}async[a33_0x43bd7b(0xf3)](_0xd9f344,_0x24125d,_0x3b806d){const _0x355283=a33_0x43bd7b,{options:_0x498290,tdx:_0x3fcff1}=_0xd9f344,_0x5da3dc=_0x498290[_0x355283(0x114)],_0x54aff5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x24125d+_0x355283(0x11b),()=>_0x3fcff1[_0x355283(0xdf)][_0x355283(0x101)](_0x24125d),{'verbose':_0x498290[_0x355283(0xfd)]}),_0x187af9=_0x54aff5[_0x355283(0x117)],_0x1254c5=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>Promise[_0x355283(0xf1)]([_0x3fcff1[_0x355283(0xdf)][_0x355283(0xe9)](_0x187af9[_0x355283(0x116)],_0x187af9[_0x355283(0xd5)]),_0x3fcff1['journey'][_0x355283(0xe8)](_0x187af9[_0x355283(0x116)])]),{'verbose':_0x498290[_0x355283(0xfd)]}),[_0x330803,_0x1e7706]=_0x1254c5[_0x355283(0x117)],{folders:_0x57dbcf,segments:_0x8652c1}=_0x330803,_0x4716ed=_0x3b806d[_0x355283(0x10f)](/[.+^${}()|[\]\\]/g,_0x355283(0x11e))[_0x355283(0x10f)](/\*/g,'.*')[_0x355283(0x10f)](/\?/g,'.'),_0xd663ef=new RegExp('^'+_0x4716ed+'$','i'),_0xd9c0ed=_0x57dbcf[_0x355283(0xed)](_0x27fc15=>_0xd663ef[_0x355283(0x108)](_0x27fc15['name'])),_0x37e928=_0x8652c1[_0x355283(0xed)](_0x225c94=>_0xd663ef[_0x355283(0x108)](_0x225c94[_0x355283(0xda)])),_0x41be44=_0x1e7706['filter'](_0x335508=>_0xd663ef[_0x355283(0x108)](_0x335508[_0x355283(0x10d)])),_0x6fd8f7=_0xd9c0ed['length']+_0x37e928[_0x355283(0xf4)]+_0x41be44['length'];console[_0x355283(0x11d)](_0x355283(0xde)+_0xd9c0ed['length']+_0x355283(0xf8)+(_0xd9c0ed['length']!==0x1?'s':'')+',\x20'+_0x37e928['length']+_0x355283(0x107)+(_0x37e928[_0x355283(0xf4)]!==0x1?'s':'')+_0x355283(0x11c)+_0x41be44['length']+'\x20journey'+(_0x41be44[_0x355283(0xf4)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x3b806d+'\x27');const _0x24202e=_0x1abde5=>{const _0x1d1aeb=_0x355283;return getConsoleNextUrl(_0x498290[_0x1d1aeb(0x11a)],_0x1d1aeb(0xf7)+_0x187af9[_0x1d1aeb(0x116)]+'/e/'+_0x1abde5);},_0x344fd2=_0x498290[_0x355283(0x10b)]===_0x355283(0xfc)||_0x498290[_0x355283(0x10b)]===_0x355283(0x106);if(_0x344fd2){const _0x48f567=[..._0xd9c0ed[_0x355283(0x109)](_0xbe2c9e=>({..._0xbe2c9e,'type':_0x355283(0x113)})),..._0x37e928[_0x355283(0x109)](_0x277b89=>({..._0x277b89,'type':_0x355283(0xdf),'url':_0x24202e(_0x277b89['id'])})),..._0x41be44[_0x355283(0x109)](_0x575156=>({..._0x575156,'name':_0x575156[_0x355283(0x10d)],'type':'journey'}))][_0x355283(0xff)]((_0x40644e,_0x1a446a)=>_0x40644e['name'][_0x355283(0xef)](_0x1a446a[_0x355283(0xda)]));await handleSDKOutput(_0x48f567,_0x498290);}else{if(_0x6fd8f7===0x0)console['log'](_0x355283(0x100)+_0x3b806d);else{console[_0x355283(0xd6)](a33_0x48c522[_0x355283(0x10e)]('['+_0x24125d+']\x20matching\x20\x27'+_0x3b806d+'\x27'));const _0x11a9f9=formatFlatList(_0xd9c0ed,_0x37e928,{'showMetadata':!![],'showUrl':_0x5da3dc,'getSegmentUrl':_0x24202e},_0x41be44);console['log'](_0x11a9f9);}}return 0x0;}async['listUnified'](_0x762b00,_0x59f570){const _0x49ce98=a33_0x43bd7b,{options:_0x6a2964,tdx:_0x217a53}=_0x762b00,_0x3a337d=_0x6a2964['web'],_0x139e9f=await withSpinner(_0x49ce98(0x102)+_0x59f570+_0x49ce98(0x11b),()=>_0x217a53['segment'][_0x49ce98(0x101)](_0x59f570),{'verbose':_0x6a2964[_0x49ce98(0xfd)]}),_0x555d20=_0x139e9f[_0x49ce98(0x117)];_0x6a2964[_0x49ce98(0xfd)]&&(console[_0x49ce98(0x11d)](_0x49ce98(0xdd)+_0x555d20[_0x49ce98(0x116)]),_0x555d20['folderId']&&console[_0x49ce98(0x11d)](_0x49ce98(0x115)+_0x555d20['folderId']));const _0x51bc01=await withSpinner(_0x49ce98(0x103),()=>Promise['all']([_0x217a53['segment'][_0x49ce98(0xe9)](_0x555d20['parentId'],_0x555d20[_0x49ce98(0xd5)]),_0x217a53['journey'][_0x49ce98(0xe8)](_0x555d20[_0x49ce98(0x116)])]),{'verbose':_0x6a2964[_0x49ce98(0xfd)]}),[_0x46de3e,_0xdcdda4]=_0x51bc01[_0x49ce98(0x117)],{folders:_0x32bbcd,segments:_0x5cb925}=_0x46de3e,_0x8a1eda=_0x32bbcd[_0x49ce98(0xf4)]+_0x5cb925['length']+_0xdcdda4[_0x49ce98(0xf4)];console[_0x49ce98(0x11d)](_0x49ce98(0xde)+_0x32bbcd[_0x49ce98(0xf4)]+_0x49ce98(0xf8)+(_0x32bbcd[_0x49ce98(0xf4)]!==0x1?'s':'')+',\x20'+_0x5cb925['length']+_0x49ce98(0x107)+(_0x5cb925[_0x49ce98(0xf4)]!==0x1?'s':'')+',\x20and\x20'+_0xdcdda4[_0x49ce98(0xf4)]+_0x49ce98(0xdc)+(_0xdcdda4['length']!==0x1?'s':''));const _0x1059ea=_0x4d8c39=>{const _0x58a64c=_0x49ce98;return getConsoleNextUrl(_0x6a2964[_0x58a64c(0x11a)],_0x58a64c(0xf7)+_0x555d20['parentId']+_0x58a64c(0xe2)+_0x4d8c39);},_0x372aeb=_0x1d3c70=>{const _0x3cc6cb=_0x49ce98;return getConsoleNextUrl(_0x6a2964[_0x3cc6cb(0x11a)],_0x3cc6cb(0xf7)+_0x555d20['parentId']+_0x3cc6cb(0xe2)+_0x1d3c70+'/j/da');},_0x4e5873=_0x6a2964['format']===_0x49ce98(0xfc)||_0x6a2964[_0x49ce98(0x10b)]===_0x49ce98(0x106);if(_0x4e5873){const _0x5822cb=[..._0x32bbcd['map'](_0x271370=>({..._0x271370,'type':_0x49ce98(0x113)})),..._0x5cb925[_0x49ce98(0x109)](_0x327888=>({..._0x327888,'type':_0x49ce98(0xdf),'url':_0x1059ea(_0x327888['id'])})),..._0xdcdda4[_0x49ce98(0x109)](_0x3eab1c=>({..._0x3eab1c,'name':_0x3eab1c[_0x49ce98(0x10d)],'type':'journey','url':_0x372aeb(_0x3eab1c['id'])}))][_0x49ce98(0xff)]((_0xeb772b,_0x5855b7)=>_0xeb772b[_0x49ce98(0xda)][_0x49ce98(0xef)](_0x5855b7[_0x49ce98(0xda)]));await handleSDKOutput(_0x5822cb,_0x6a2964);}else{if(_0x8a1eda===0x0)console[_0x49ce98(0xd6)](a33_0x48c522['dim']('['+_0x59f570+']')),console['log'](_0x49ce98(0xe5));else{console[_0x49ce98(0xd6)](a33_0x48c522[_0x49ce98(0x10e)]('['+_0x59f570+']'));const _0x49ac0e=formatFlatList(_0x32bbcd,_0x5cb925,{'showMetadata':!![],'showUrl':_0x3a337d,'getSegmentUrl':_0x1059ea,'getJourneyUrl':_0x372aeb},_0xdcdda4);console['log'](_0x49ac0e);}}return 0x0;}async['listRecursive'](_0x301548,_0x7d4139){const _0x393c1b=a33_0x43bd7b,{options:_0x1567e4,tdx:_0x9e9acd}=_0x301548,_0x3ce4cf=_0x1567e4[_0x393c1b(0x114)],_0x530998=await withSpinner(_0x393c1b(0x102)+_0x7d4139+'\x27...',()=>_0x9e9acd[_0x393c1b(0xdf)][_0x393c1b(0x101)](_0x7d4139),{'verbose':_0x1567e4[_0x393c1b(0xfd)]}),_0x884d7c=_0x530998[_0x393c1b(0x117)];_0x1567e4[_0x393c1b(0xfd)]&&(console[_0x393c1b(0x11d)](_0x393c1b(0xdd)+_0x884d7c[_0x393c1b(0x116)]),_0x884d7c[_0x393c1b(0xd5)]&&console[_0x393c1b(0x11d)]('Folder\x20ID:\x20'+_0x884d7c[_0x393c1b(0xd5)]));const _0x14aa49=_0x1567e4[_0x393c1b(0xe6)]||0xa,_0x1d4b75=await withSpinner(_0x393c1b(0xeb),()=>_0x9e9acd['segment'][_0x393c1b(0xdb)](_0x884d7c[_0x393c1b(0x116)],_0x884d7c['folderId'],0x0,_0x14aa49),{'verbose':_0x1567e4[_0x393c1b(0xfd)]}),_0x548381=_0x1d4b75[_0x393c1b(0x117)];console[_0x393c1b(0x11d)](_0x393c1b(0xf6)+_0x548381['length']+'\x20top-level\x20items');const _0x312fd9=_0x381a05=>{const _0x4cd638=_0x393c1b;return getConsoleNextUrl(_0x1567e4['site'],_0x4cd638(0xf7)+_0x884d7c[_0x4cd638(0x116)]+_0x4cd638(0xe2)+_0x381a05);};if(_0x1567e4[_0x393c1b(0x10b)]===_0x393c1b(0xfc)||_0x1567e4[_0x393c1b(0x10b)]==='jsonl')await handleSDKOutput(_0x548381,_0x1567e4);else{console[_0x393c1b(0xd6)](a33_0x48c522[_0x393c1b(0x10e)]('['+_0x7d4139+']'));const _0x5059c0=formatTree(_0x548381,{'showMetadata':!![],'showUrl':_0x3ce4cf,'getSegmentUrl':_0x312fd9});console['log'](_0x5059c0);}return 0x0;}}function a33_0x42ad(_0x42a001,_0x574c4b){_0x42a001=_0x42a001-0xd4;const _0x3042aa=a33_0x3042();let _0x42ad6b=_0x3042aa[_0x42a001];return _0x42ad6b;}function a33_0x3042(){const _0x5c2791=['site','\x27...',',\x20and\x20','error','\x5c$&','message','folderId','log','Folder/pattern\x20arg:\x20','segments','execute','name','listRecursive','\x20journey','Parent\x20ID:\x20','✔\x20Found\x20','segment','47980CQtqfm','26830992UguZrf','/e/','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','List\x20folders\x20and\x20child\x20segments','(empty)','maxDepth','parentSegment','listJourneysFromParentSegment','listUnified','1007048pPiCma','Building\x20hierarchy\x20tree...','4434RfuObJ','filter','\x20\x20Cause:\x20','localeCompare','Set\x20a\x20parent\x20segment\x20context\x20first:','all','recursive','listWithPattern','length','9989WdAPAO','✔\x20Built\x20tree\x20with\x20','/app/ps/','\x20folder','1550255nbiQIf','9xTSbKP','description','json','verbose','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','sort','No\x20items\x20match\x20pattern:\x20','resolvePathToResource','Resolving\x20path\x20\x27','Listing\x20folders,\x20segments,\x20and\x20journeys...','Recursive\x20mode:\x20enabled','1694mREIWu','jsonl','\x20segment','test','map','cause','format','includes','journeyBundleName','dim','replace','534753aPLHHo','10udoPRE','4DoFvdy','folder','web','Folder\x20ID:\x20','parentId','data','4925640CKFkXu','Error:\x20'];a33_0x3042=function(){return _0x5c2791;};return a33_0x3042();}
@@ -1 +1 @@
1
- const a34_0x321470=a34_0x237f;(function(_0x4ad5c2,_0x29820f){const _0x1650ef=a34_0x237f,_0x5afc34=_0x4ad5c2();while(!![]){try{const _0xc004da=-parseInt(_0x1650ef(0x163))/0x1*(-parseInt(_0x1650ef(0x16b))/0x2)+-parseInt(_0x1650ef(0x17d))/0x3*(-parseInt(_0x1650ef(0x172))/0x4)+-parseInt(_0x1650ef(0x16f))/0x5+-parseInt(_0x1650ef(0x158))/0x6*(parseInt(_0x1650ef(0x177))/0x7)+-parseInt(_0x1650ef(0x159))/0x8*(parseInt(_0x1650ef(0x16e))/0x9)+-parseInt(_0x1650ef(0x162))/0xa+parseInt(_0x1650ef(0x181))/0xb*(parseInt(_0x1650ef(0x17c))/0xc);if(_0xc004da===_0x29820f)break;else _0x5afc34['push'](_0x5afc34['shift']());}catch(_0x57048b){_0x5afc34['push'](_0x5afc34['shift']());}}}(a34_0x1f06,0x59693));import{BaseCommand}from'./command.js';function a34_0x1f06(){const _0xd67b2b=['430990VEJQmd','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Error:\x20','61335XZFoUI','8150gWslwm','args','message','108NrMSfF','limit','Database:\x20','show','✔\x20Retrieved\x20','105KEHyxn','...','cause','query','error','492132ARPbRh','54165hgiGHZ','length','Usage:\x20tdx\x20show\x20<database.table>','validate','143ufeUSL','17550GzAiWX','648bcmnIt','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','\x20from\x20','Table:\x20','name','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Show\x20table\x20contents','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20\x20Cause:\x20','7033660rcbIrH','3ZgcAqF','description','catalog','showTable','verbose','database','\x20row','data'];a34_0x1f06=function(){return _0xd67b2b;};return a34_0x1f06();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a34_0x237f(_0x11f772,_0x533e6c){_0x11f772=_0x11f772-0x158;const _0x1f0632=a34_0x1f06();let _0x237f19=_0x1f0632[_0x11f772];return _0x237f19;}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a34_0x321470(0x15d)]=a34_0x321470(0x175);[a34_0x321470(0x164)]=a34_0x321470(0x15f);async['execute'](_0x1ca930){const _0x43cb89=a34_0x321470;return this[_0x43cb89(0x166)](_0x1ca930);}async['showTable'](_0x5452ef){const _0x5f29db=a34_0x321470,{options:_0x5d3702,args:_0x79325e,tdx:_0x3e0a26}=_0x5452ef;let _0x5994ba;try{_0x5994ba=parseTableReference(_0x79325e[0x0]);const _0x2d7386=_0x5d3702[_0x5f29db(0x168)];!_0x5994ba[_0x5f29db(0x168)]&&_0x2d7386&&(_0x5994ba[_0x5f29db(0x168)]=_0x2d7386);const _0x3a592d=validateTableDescribeReference(_0x5994ba);if(_0x3a592d)return console[_0x5f29db(0x17b)]('Error:\x20'+_0x3a592d),console[_0x5f29db(0x17b)](_0x5f29db(0x17f)),console[_0x5f29db(0x17b)](_0x5f29db(0x160)),console[_0x5f29db(0x17b)](_0x5f29db(0x15e)),0x1;}catch(_0x29188c){return console[_0x5f29db(0x17b)]('Error:\x20'+_0x29188c[_0x5f29db(0x171)]),console['error']('Usage:\x20tdx\x20show\x20<database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x5f29db(0x17b)](_0x5f29db(0x15e)),0x1;}const _0x1fd361=_0x5994ba[_0x5f29db(0x165)],_0x341305=_0x5994ba[_0x5f29db(0x168)],_0x12a82e=_0x5994ba['table'],_0x260d2c=resolveLimit(_0x5d3702[_0x5f29db(0x173)],DEFAULT_DISPLAY_LIMIT);try{_0x5d3702[_0x5f29db(0x167)]&&(console['error']('Site:\x20'+_0x5d3702['site']),_0x1fd361&&console['error']('Catalog:\x20'+_0x1fd361),console[_0x5f29db(0x17b)](_0x5f29db(0x174)+_0x341305),console[_0x5f29db(0x17b)](_0x5f29db(0x15c)+_0x12a82e),console[_0x5f29db(0x17b)]('Limit:\x20'+_0x260d2c));const _0x440986=_0x1fd361?_0x1fd361+'.'+_0x341305+'.'+_0x12a82e:_0x341305+'.'+_0x12a82e,_0x5774e3=await withSpinner('Querying\x20'+_0x440986+_0x5f29db(0x178),()=>_0x3e0a26[_0x5f29db(0x17a)]['showTable'](_0x341305,_0x12a82e,_0x260d2c,_0x1fd361),{'verbose':_0x5d3702[_0x5f29db(0x167)]}),_0x3b23cd=_0x5774e3[_0x5f29db(0x16a)],_0x21ff36=_0x3b23cd['data'];return _0x21ff36[_0x5f29db(0x17e)]===0x0?console[_0x5f29db(0x17b)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x5f29db(0x17b)](_0x5f29db(0x176)+_0x21ff36[_0x5f29db(0x17e)]+_0x5f29db(0x169)+(_0x21ff36[_0x5f29db(0x17e)]!==0x1?'s':'')+_0x5f29db(0x15b)+_0x440986),await handleSDKOutput(_0x21ff36,_0x5d3702),0x0;}catch(_0x539dc2){if(_0x539dc2 instanceof SDKError)return console[_0x5f29db(0x17b)](_0x5f29db(0x16d)+_0x539dc2['message']),_0x539dc2[_0x5f29db(0x179)]&&console[_0x5f29db(0x17b)](_0x5f29db(0x161)+_0x539dc2[_0x5f29db(0x179)]),0x1;throw _0x539dc2;}}[a34_0x321470(0x180)](_0x5004aa){const _0x4fb67e=a34_0x321470;if(_0x5004aa[_0x4fb67e(0x170)][_0x4fb67e(0x17e)]===0x0)return _0x4fb67e(0x15a);if(_0x5004aa[_0x4fb67e(0x170)][_0x4fb67e(0x17e)]>0x1)return _0x4fb67e(0x16c);return undefined;}}
1
+ const a34_0x39098a=a34_0x1d96;(function(_0x26633e,_0x1d458b){const _0x575493=a34_0x1d96,_0x51bc1d=_0x26633e();while(!![]){try{const _0x1398bd=parseInt(_0x575493(0x1cb))/0x1*(parseInt(_0x575493(0x1e7))/0x2)+parseInt(_0x575493(0x1e1))/0x3+-parseInt(_0x575493(0x1cc))/0x4*(parseInt(_0x575493(0x1c3))/0x5)+parseInt(_0x575493(0x1d1))/0x6+parseInt(_0x575493(0x1ea))/0x7*(-parseInt(_0x575493(0x1e9))/0x8)+-parseInt(_0x575493(0x1d3))/0x9+parseInt(_0x575493(0x1c6))/0xa;if(_0x1398bd===_0x1d458b)break;else _0x51bc1d['push'](_0x51bc1d['shift']());}catch(_0x4d9d68){_0x51bc1d['push'](_0x51bc1d['shift']());}}}(a34_0x40f2,0x9c11b));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a34_0x1d96(_0x5791ce,_0x182f11){_0x5791ce=_0x5791ce-0x1c3;const _0x40f235=a34_0x40f2();let _0x1d9632=_0x40f235[_0x5791ce];return _0x1d9632;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a34_0x39098a(0x1da)]=a34_0x39098a(0x1d4);['description']=a34_0x39098a(0x1c7);async[a34_0x39098a(0x1eb)](_0x4208d5){const _0x2e3663=a34_0x39098a;return this[_0x2e3663(0x1e0)](_0x4208d5);}async['showTable'](_0x3c368d){const _0x6d6c22=a34_0x39098a,{options:_0x44cee8,args:_0x52982f,tdx:_0x374d11}=_0x3c368d;let _0x5cc777;try{_0x5cc777=parseTableReference(_0x52982f[0x0]);const _0x182fcc=_0x44cee8[_0x6d6c22(0x1ca)];!_0x5cc777[_0x6d6c22(0x1ca)]&&_0x182fcc&&(_0x5cc777[_0x6d6c22(0x1ca)]=_0x182fcc);const _0x32d797=validateTableDescribeReference(_0x5cc777);if(_0x32d797)return console[_0x6d6c22(0x1de)]('Error:\x20'+_0x32d797),console[_0x6d6c22(0x1de)](_0x6d6c22(0x1c4)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x6d6c22(0x1de)](_0x6d6c22(0x1df)),0x1;}catch(_0x133797){return console[_0x6d6c22(0x1de)](_0x6d6c22(0x1c5)+_0x133797[_0x6d6c22(0x1e6)]),console[_0x6d6c22(0x1de)](_0x6d6c22(0x1c4)),console[_0x6d6c22(0x1de)](_0x6d6c22(0x1cf)),console['error'](_0x6d6c22(0x1df)),0x1;}const _0x126ab0=_0x5cc777['catalog'],_0x3bfba2=_0x5cc777[_0x6d6c22(0x1ca)],_0x4b34a3=_0x5cc777[_0x6d6c22(0x1ec)],_0x12ec41=resolveLimit(_0x44cee8[_0x6d6c22(0x1ed)],DEFAULT_DISPLAY_LIMIT);try{_0x44cee8[_0x6d6c22(0x1dd)]&&(console[_0x6d6c22(0x1de)](_0x6d6c22(0x1ce)+_0x44cee8[_0x6d6c22(0x1e4)]),_0x126ab0&&console['error'](_0x6d6c22(0x1e2)+_0x126ab0),console[_0x6d6c22(0x1de)](_0x6d6c22(0x1e5)+_0x3bfba2),console[_0x6d6c22(0x1de)]('Table:\x20'+_0x4b34a3),console['error'](_0x6d6c22(0x1e3)+_0x12ec41));const _0x5ce9cb=_0x126ab0?_0x126ab0+'.'+_0x3bfba2+'.'+_0x4b34a3:_0x3bfba2+'.'+_0x4b34a3,_0x178752=await withSpinner('Querying\x20'+_0x5ce9cb+_0x6d6c22(0x1d7),()=>_0x374d11[_0x6d6c22(0x1cd)][_0x6d6c22(0x1e0)](_0x3bfba2,_0x4b34a3,_0x12ec41,_0x126ab0),{'verbose':_0x44cee8['verbose']}),_0x1414fa=_0x178752[_0x6d6c22(0x1d9)],_0x412496=_0x1414fa[_0x6d6c22(0x1d9)];return _0x412496[_0x6d6c22(0x1e8)]===0x0?console[_0x6d6c22(0x1de)](_0x6d6c22(0x1d6)):console['error'](_0x6d6c22(0x1dc)+_0x412496[_0x6d6c22(0x1e8)]+_0x6d6c22(0x1c8)+(_0x412496[_0x6d6c22(0x1e8)]!==0x1?'s':'')+_0x6d6c22(0x1d8)+_0x5ce9cb),await handleSDKOutput(_0x412496,_0x44cee8),0x0;}catch(_0x20a36f){if(_0x20a36f instanceof SDKError)return console[_0x6d6c22(0x1de)](_0x6d6c22(0x1c5)+_0x20a36f[_0x6d6c22(0x1e6)]),_0x20a36f['cause']&&console[_0x6d6c22(0x1de)](_0x6d6c22(0x1d0)+_0x20a36f[_0x6d6c22(0x1d2)]),0x1;throw _0x20a36f;}}[a34_0x39098a(0x1db)](_0xdbfa9d){const _0x4f5832=a34_0x39098a;if(_0xdbfa9d['args']['length']===0x0)return _0x4f5832(0x1d5);if(_0xdbfa9d[_0x4f5832(0x1c9)][_0x4f5832(0x1e8)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}function a34_0x40f2(){const _0x4c1cb7=['5mFEagQ','Usage:\x20tdx\x20show\x20<database.table>','Error:\x20','16973970bgneFH','Show\x20table\x20contents','\x20row','args','database','6Vkgkmr','4698276fEsXiY','query','Site:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20\x20Cause:\x20','2600922ubXhrv','cause','5375700bOytOh','show','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','...','\x20from\x20','data','name','validate','✔\x20Retrieved\x20','verbose','error','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','showTable','850518iKOyNi','Catalog:\x20','Limit:\x20','site','Database:\x20','message','46378AwVTMH','length','776AQJOaO','10276PKNzdE','execute','table','limit'];a34_0x40f2=function(){return _0x4c1cb7;};return a34_0x40f2();}
@@ -1 +1 @@
1
- const a35_0x43f32c=a35_0x1a1a;function a35_0x25c3(){const _0x2eaa5d=['8qpEsma','Note:\x20\x27','3541365lgWohW','execute','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Database:\x20','data','2402133HoMxJZ','validate','Or\x20use\x20--in\x20flag:','message','✖\x20No\x20tables\x20found','5UrmWGA','table','Database\x20\x27','length','cause','description','2671641yZUQZZ','Site:\x20','verbose','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Database\x20pattern:\x20','listTables','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','23790mKntCK','Error:\x20Pattern\x20\x27','Database:\x20all','186569xIfkbR','Table\x20pattern:\x20','database','2UTszSH','name','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','3927vgbfyu','.*\x22','\x27\x20is\x20ambiguous.','498944UcBaYK','List\x20tables\x20in\x20a\x20database','1200960cJBmGD','includes','tables','error','\x20table'];a35_0x25c3=function(){return _0x2eaa5d;};return a35_0x25c3();}(function(_0x43e14d,_0x528078){const _0x2885d8=a35_0x1a1a,_0x122656=_0x43e14d();while(!![]){try{const _0x118c46=parseInt(_0x2885d8(0xc5))/0x1+-parseInt(_0x2885d8(0xc8))/0x2*(-parseInt(_0x2885d8(0xaf))/0x3)+parseInt(_0x2885d8(0xcf))/0x4*(-parseInt(_0x2885d8(0xb4))/0x5)+parseInt(_0x2885d8(0xd1))/0x6+parseInt(_0x2885d8(0xba))/0x7+-parseInt(_0x2885d8(0xa8))/0x8*(-parseInt(_0x2885d8(0xaa))/0x9)+parseInt(_0x2885d8(0xc2))/0xa*(-parseInt(_0x2885d8(0xcc))/0xb);if(_0x118c46===_0x528078)break;else _0x122656['push'](_0x122656['shift']());}catch(_0x34d9b0){_0x122656['push'](_0x122656['shift']());}}}(a35_0x25c3,0xf1585));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a35_0x1a1a(_0x533585,_0x3a103a){_0x533585=_0x533585-0xa5;const _0x25c3d8=a35_0x25c3();let _0x1a1a45=_0x25c3d8[_0x533585];return _0x1a1a45;}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a35_0x43f32c(0xc9)]=a35_0x43f32c(0xa5);[a35_0x43f32c(0xb9)]=a35_0x43f32c(0xd0);async[a35_0x43f32c(0xab)](_0x4d7466){const _0x37fb3c=a35_0x43f32c,{options:_0x3f801d,args:_0x376799,tdx:_0xe4b8b5}=_0x4d7466;let _0x26e693;if(_0x376799['length']===0x0)_0x26e693={'database':undefined,'table':undefined,'original':''};else{if(_0x376799[_0x37fb3c(0xb7)]===0x1)try{_0x26e693=parseTableReference(_0x376799[0x0]);if(_0x26e693[_0x37fb3c(0xb5)]&&!_0x26e693['database']&&!_0x26e693[_0x37fb3c(0xb5)][_0x37fb3c(0xd2)]('*')&&!_0x26e693[_0x37fb3c(0xb5)]['includes']('?'))return console[_0x37fb3c(0xa6)](_0x37fb3c(0xc3)+_0x376799[0x0]+_0x37fb3c(0xce)),console[_0x37fb3c(0xa6)](_0x37fb3c(0xca)+_0x26e693['table']+'\x27?'),console['error'](_0x37fb3c(0xc0)+_0x26e693[_0x37fb3c(0xb5)]+_0x37fb3c(0xcd)),console[_0x37fb3c(0xa6)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x26e693['table']),console[_0x37fb3c(0xa6)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x26e693[_0x37fb3c(0xb5)]),console[_0x37fb3c(0xa6)](''),console['error'](_0x37fb3c(0xa9)+_0x376799[0x0]+_0x37fb3c(0xac)+_0x26e693['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x4485ee){return console[_0x37fb3c(0xa6)]('Error:\x20'+_0x4485ee[_0x37fb3c(0xb2)]),0x1;}else return console[_0x37fb3c(0xa6)](_0x37fb3c(0xcb)),console[_0x37fb3c(0xa6)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x37fb3c(0xa6)](_0x37fb3c(0xbd)),console[_0x37fb3c(0xa6)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error']('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x37fb3c(0xa6)](_0x37fb3c(0xb1)),console[_0x37fb3c(0xa6)](_0x37fb3c(0xc1)),0x1;}const _0x13db32=_0x3f801d['database'];!_0x26e693[_0x37fb3c(0xc7)]&&_0x13db32&&(_0x26e693[_0x37fb3c(0xc7)]=_0x13db32);try{const _0x58cf35=_0x2097c7=>_0x2097c7&&(_0x2097c7[_0x37fb3c(0xd2)]('*')||_0x2097c7['includes']('?')),_0x11bce7=_0x58cf35(_0x26e693[_0x37fb3c(0xc7)]);_0x3f801d[_0x37fb3c(0xbc)]&&(console[_0x37fb3c(0xa6)](_0x37fb3c(0xbb)+_0x3f801d['site']),_0x26e693[_0x37fb3c(0xc7)]?_0x11bce7?console['error'](_0x37fb3c(0xbe)+_0x26e693[_0x37fb3c(0xc7)]):console[_0x37fb3c(0xa6)](_0x37fb3c(0xad)+_0x26e693['database']):console['error'](_0x37fb3c(0xc4)),_0x26e693['table']&&console[_0x37fb3c(0xa6)](_0x37fb3c(0xc6)+_0x26e693[_0x37fb3c(0xb5)]));const _0x281a29=_0x26e693[_0x37fb3c(0xc7)]&&!_0x11bce7?_0x26e693[_0x37fb3c(0xc7)]:undefined,_0x31a9bd=_0x11bce7?_0x26e693['database']:undefined,_0xc6d2ba=_0x26e693[_0x37fb3c(0xb5)],_0x5a54bc=resolveLimit(_0x3f801d['limit'],DEFAULT_LISTING_LIMIT),_0x3fd95a=await withSpinner('Listing\x20tables...',()=>_0xe4b8b5['query'][_0x37fb3c(0xbf)](_0x281a29,_0xc6d2ba,_0x31a9bd,_0x5a54bc),{'verbose':_0x3f801d['verbose']}),_0x46471f=_0x3fd95a[_0x37fb3c(0xae)];if(_0x46471f['length']===0x0&&_0x26e693[_0x37fb3c(0xc7)]&&!_0x11bce7)return console[_0x37fb3c(0xa6)](_0x37fb3c(0xb3)),console[_0x37fb3c(0xa6)](_0x37fb3c(0xb6)+_0x26e693[_0x37fb3c(0xc7)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x37fb3c(0xa6)]('✔\x20Found\x20'+_0x46471f['length']+_0x37fb3c(0xa7)+(_0x46471f[_0x37fb3c(0xb7)]!==0x1?'s':'')),await handleSDKOutput(_0x46471f,{..._0x3f801d,'limit':_0x5a54bc}),0x0;}catch(_0x13bc0b){if(_0x13bc0b instanceof SDKError)return console[_0x37fb3c(0xa6)]('Error:\x20'+_0x13bc0b[_0x37fb3c(0xb2)]),_0x13bc0b[_0x37fb3c(0xb8)]&&console[_0x37fb3c(0xa6)]('\x20\x20Cause:\x20'+_0x13bc0b[_0x37fb3c(0xb8)]),0x1;throw _0x13bc0b;}}[a35_0x43f32c(0xb0)](_0x23076f){return undefined;}}
1
+ const a35_0x512c59=a35_0x5c2d;(function(_0x28d6d1,_0x80a05e){const _0x3b507e=a35_0x5c2d,_0x363466=_0x28d6d1();while(!![]){try{const _0x5dee59=parseInt(_0x3b507e(0xdc))/0x1+parseInt(_0x3b507e(0xcf))/0x2+-parseInt(_0x3b507e(0xdd))/0x3+parseInt(_0x3b507e(0xed))/0x4*(-parseInt(_0x3b507e(0xf3))/0x5)+-parseInt(_0x3b507e(0xf8))/0x6*(parseInt(_0x3b507e(0xd1))/0x7)+parseInt(_0x3b507e(0xe0))/0x8*(-parseInt(_0x3b507e(0xe6))/0x9)+-parseInt(_0x3b507e(0xd4))/0xa*(-parseInt(_0x3b507e(0xd6))/0xb);if(_0x5dee59===_0x80a05e)break;else _0x363466['push'](_0x363466['shift']());}catch(_0x184e7e){_0x363466['push'](_0x363466['shift']());}}}(a35_0x43bd,0xc921f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a35_0x5c2d(_0x3cf2f8,_0xd37385){_0x3cf2f8=_0x3cf2f8-0xcc;const _0x43bd47=a35_0x43bd();let _0x5c2dd0=_0x43bd47[_0x3cf2f8];return _0x5c2dd0;}import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a35_0x43bd(){const _0x221f2f=['Error:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','includes','\x27\x20across\x20all\x20databases.','Database\x20\x27','331299vSEaeS','4126662cJqJgq','Table\x20pattern:\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','208zhMzlB','listTables','error','Error:\x20Pattern\x20\x27','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','table','190899FgXRCj','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x27\x20is\x20ambiguous.','database','\x20\x20Use:\x20tdx\x20tables\x20\x22','✖\x20No\x20tables\x20found','tables','2651756KHgUwT','name','length','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','description','site','5xWsiaA','query','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','verbose','Database\x20pattern:\x20','461550TVZRrn','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','message','341366hdFEtx','cause','49JynXFD','Listing\x20tables...','\x20\x20Cause:\x20','10LBkKWV','execute','37953421yQpKfv'];a35_0x43bd=function(){return _0x221f2f;};return a35_0x43bd();}export class TablesCommand extends BaseCommand{[a35_0x512c59(0xee)]=a35_0x512c59(0xec);[a35_0x512c59(0xf1)]='List\x20tables\x20in\x20a\x20database';async[a35_0x512c59(0xd5)](_0x1b5c13){const _0xfc0d8=a35_0x512c59,{options:_0x97f4a3,args:_0x2e7185,tdx:_0x12ef86}=_0x1b5c13;let _0x517f53;if(_0x2e7185['length']===0x0)_0x517f53={'database':undefined,'table':undefined,'original':''};else{if(_0x2e7185['length']===0x1)try{_0x517f53=parseTableReference(_0x2e7185[0x0]);if(_0x517f53[_0xfc0d8(0xe5)]&&!_0x517f53[_0xfc0d8(0xe9)]&&!_0x517f53[_0xfc0d8(0xe5)][_0xfc0d8(0xd9)]('*')&&!_0x517f53[_0xfc0d8(0xe5)][_0xfc0d8(0xd9)]('?'))return console[_0xfc0d8(0xe2)](_0xfc0d8(0xe3)+_0x2e7185[0x0]+_0xfc0d8(0xe8)),console[_0xfc0d8(0xe2)](_0xfc0d8(0xe7)+_0x517f53[_0xfc0d8(0xe5)]+'\x27?'),console[_0xfc0d8(0xe2)](_0xfc0d8(0xea)+_0x517f53['table']+'.*\x22'),console[_0xfc0d8(0xe2)](_0xfc0d8(0xcc)+_0x517f53[_0xfc0d8(0xe5)]),console[_0xfc0d8(0xe2)](_0xfc0d8(0xd8)+_0x517f53['table']),console['error'](''),console[_0xfc0d8(0xe2)]('Note:\x20\x27'+_0x2e7185[0x0]+_0xfc0d8(0xe4)+_0x517f53[_0xfc0d8(0xe5)]+_0xfc0d8(0xda)),0x1;}catch(_0x6701f9){return console['error'](_0xfc0d8(0xd7)+_0x6701f9[_0xfc0d8(0xce)]),0x1;}else return console[_0xfc0d8(0xe2)](_0xfc0d8(0xf5)),console['error'](_0xfc0d8(0xdf)),console[_0xfc0d8(0xe2)](_0xfc0d8(0xf0)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0xfc0d8(0xe2)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0xfc0d8(0xe2)]('Or\x20use\x20--in\x20flag:'),console[_0xfc0d8(0xe2)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x2fcf42=_0x97f4a3[_0xfc0d8(0xe9)];!_0x517f53[_0xfc0d8(0xe9)]&&_0x2fcf42&&(_0x517f53[_0xfc0d8(0xe9)]=_0x2fcf42);try{const _0x55827c=_0x3d69ea=>_0x3d69ea&&(_0x3d69ea[_0xfc0d8(0xd9)]('*')||_0x3d69ea[_0xfc0d8(0xd9)]('?')),_0x413a98=_0x55827c(_0x517f53[_0xfc0d8(0xe9)]);_0x97f4a3[_0xfc0d8(0xf6)]&&(console['error']('Site:\x20'+_0x97f4a3[_0xfc0d8(0xf2)]),_0x517f53[_0xfc0d8(0xe9)]?_0x413a98?console['error'](_0xfc0d8(0xf7)+_0x517f53[_0xfc0d8(0xe9)]):console[_0xfc0d8(0xe2)]('Database:\x20'+_0x517f53['database']):console[_0xfc0d8(0xe2)]('Database:\x20all'),_0x517f53[_0xfc0d8(0xe5)]&&console[_0xfc0d8(0xe2)](_0xfc0d8(0xde)+_0x517f53[_0xfc0d8(0xe5)]));const _0x65d038=_0x517f53['database']&&!_0x413a98?_0x517f53['database']:undefined,_0x29e594=_0x413a98?_0x517f53['database']:undefined,_0x18b7e6=_0x517f53[_0xfc0d8(0xe5)],_0x19cae6=resolveLimit(_0x97f4a3['limit'],DEFAULT_LISTING_LIMIT),_0x3b891c=await withSpinner(_0xfc0d8(0xd2),()=>_0x12ef86[_0xfc0d8(0xf4)][_0xfc0d8(0xe1)](_0x65d038,_0x18b7e6,_0x29e594,_0x19cae6),{'verbose':_0x97f4a3['verbose']}),_0x4c4d10=_0x3b891c['data'];if(_0x4c4d10[_0xfc0d8(0xef)]===0x0&&_0x517f53[_0xfc0d8(0xe9)]&&!_0x413a98)return console['error'](_0xfc0d8(0xeb)),console[_0xfc0d8(0xe2)](_0xfc0d8(0xdb)+_0x517f53[_0xfc0d8(0xe9)]+_0xfc0d8(0xcd)),0x1;return console[_0xfc0d8(0xe2)]('✔\x20Found\x20'+_0x4c4d10['length']+'\x20table'+(_0x4c4d10[_0xfc0d8(0xef)]!==0x1?'s':'')),await handleSDKOutput(_0x4c4d10,{..._0x97f4a3,'limit':_0x19cae6}),0x0;}catch(_0x5baf8a){if(_0x5baf8a instanceof SDKError)return console[_0xfc0d8(0xe2)](_0xfc0d8(0xd7)+_0x5baf8a[_0xfc0d8(0xce)]),_0x5baf8a['cause']&&console[_0xfc0d8(0xe2)](_0xfc0d8(0xd3)+_0x5baf8a[_0xfc0d8(0xd0)]),0x1;throw _0x5baf8a;}}['validate'](_0x498712){return undefined;}}