@treasuredata/tdx 2026.10.0 → 2026.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 (326) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/agent-command.js +1 -1
  11. package/dist/commands/agent-test-command.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/cas-command.js +1 -1
  15. package/dist/commands/cas-journey-command.js +1 -1
  16. package/dist/commands/cas-segment-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.d.ts.map +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-command.js.map +1 -1
  21. package/dist/commands/claude-statusline-command.d.ts.map +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-statusline-command.js.map +1 -1
  24. package/dist/commands/codex-command.d.ts.map +1 -1
  25. package/dist/commands/codex-command.js +1 -1
  26. package/dist/commands/codex-command.js.map +1 -1
  27. package/dist/commands/command.js +1 -1
  28. package/dist/commands/connection-command.js +1 -1
  29. package/dist/commands/databases.js +1 -1
  30. package/dist/commands/delivery-command.js +1 -1
  31. package/dist/commands/describe.js +1 -1
  32. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  33. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  34. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-campaign-pull-command.js +1 -1
  36. package/dist/commands/engage-campaign-push-command.js +1 -1
  37. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  38. package/dist/commands/engage-campaign-validate-command.js +1 -1
  39. package/dist/commands/engage-command.js +1 -1
  40. package/dist/commands/engage-in-browser-message-command.js +1 -1
  41. package/dist/commands/engage-landing-page-command.js +1 -1
  42. package/dist/commands/engage-template-pull-command.js +1 -1
  43. package/dist/commands/engage-template-push-command.js +1 -1
  44. package/dist/commands/engage-template-validate-command.js +1 -1
  45. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  46. package/dist/commands/job-command.js +1 -1
  47. package/dist/commands/journey-command.js +1 -1
  48. package/dist/commands/journey-validate-command.js +1 -1
  49. package/dist/commands/llm-command.js +1 -1
  50. package/dist/commands/mcp-command.js +1 -1
  51. package/dist/commands/opencode-command.d.ts +10 -3
  52. package/dist/commands/opencode-command.d.ts.map +1 -1
  53. package/dist/commands/opencode-command.js +1 -1
  54. package/dist/commands/opencode-command.js.map +1 -1
  55. package/dist/commands/p13n-command.js +1 -1
  56. package/dist/commands/parent-segment-command.js +1 -1
  57. package/dist/commands/policy-command.js +1 -1
  58. package/dist/commands/profile-command.js +1 -1
  59. package/dist/commands/profiles-command.d.ts.map +1 -1
  60. package/dist/commands/profiles-command.js +1 -1
  61. package/dist/commands/profiles-command.js.map +1 -1
  62. package/dist/commands/query-command.js +1 -1
  63. package/dist/commands/schedule-command.js +1 -1
  64. package/dist/commands/segment-command.js +1 -1
  65. package/dist/commands/segment-create-command.js +1 -1
  66. package/dist/commands/segment-fields-command.js +1 -1
  67. package/dist/commands/segment-move-command.js +1 -1
  68. package/dist/commands/segment-pull-command.js +1 -1
  69. package/dist/commands/segment-push-command.js +1 -1
  70. package/dist/commands/segment-update-command.js +1 -1
  71. package/dist/commands/segment-use-command.js +1 -1
  72. package/dist/commands/segment-validate-command.js +1 -1
  73. package/dist/commands/segments.js +1 -1
  74. package/dist/commands/show.js +1 -1
  75. package/dist/commands/status-command.js +1 -1
  76. package/dist/commands/table-deleted.js +1 -1
  77. package/dist/commands/tables.js +1 -1
  78. package/dist/commands/unset-command.js +1 -1
  79. package/dist/commands/upgrade-command.js +1 -1
  80. package/dist/commands/usage-command.d.ts +10 -0
  81. package/dist/commands/usage-command.d.ts.map +1 -0
  82. package/dist/commands/usage-command.js +1 -0
  83. package/dist/commands/usage-command.js.map +1 -0
  84. package/dist/commands/use-command.js +1 -1
  85. package/dist/commands/user-command.js +1 -1
  86. package/dist/commands/work-command.js +1 -1
  87. package/dist/commands/workflow-command.js +1 -1
  88. package/dist/core/auth.js +1 -1
  89. package/dist/core/command-output.js +1 -1
  90. package/dist/core/config.d.ts +2 -1
  91. package/dist/core/config.d.ts.map +1 -1
  92. package/dist/core/config.js +1 -1
  93. package/dist/core/config.js.map +1 -1
  94. package/dist/core/connection-cache.js +1 -1
  95. package/dist/core/constants.js +1 -1
  96. package/dist/core/credential-cache.js +1 -1
  97. package/dist/core/global-context.js +1 -1
  98. package/dist/core/keychain.js +1 -1
  99. package/dist/core/oauth-keychain.js +1 -1
  100. package/dist/core/oauth.js +1 -1
  101. package/dist/core/profile.d.ts +1 -0
  102. package/dist/core/profile.d.ts.map +1 -1
  103. package/dist/core/profile.js +1 -1
  104. package/dist/core/profile.js.map +1 -1
  105. package/dist/core/project-config.js +1 -1
  106. package/dist/core/session.js +1 -1
  107. package/dist/core/site-mismatch.js +1 -1
  108. package/dist/core/user-cache.js +1 -1
  109. package/dist/core/version.js +1 -1
  110. package/dist/index.js +1 -1
  111. package/dist/mcp/server.js +1 -1
  112. package/dist/mcp/tools/index.js +1 -1
  113. package/dist/mcp/tools/tdx-run.js +1 -1
  114. package/dist/mcp/tools/tdx-search.js +1 -1
  115. package/dist/mcp/tools/work-create-item.js +1 -1
  116. package/dist/mcp/utils.js +1 -1
  117. package/dist/proxy/claude-usage-tracker.d.ts +5 -4
  118. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  119. package/dist/proxy/claude-usage-tracker.js +1 -1
  120. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  121. package/dist/proxy/passthrough-server.js +1 -1
  122. package/dist/proxy/sse-usage-parser.js +1 -1
  123. package/dist/sdk/agent/agent-config.js +1 -1
  124. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  125. package/dist/sdk/agent/agent-yaml.js +1 -1
  126. package/dist/sdk/agent/test/evaluator.js +1 -1
  127. package/dist/sdk/agent/test/executor.js +1 -1
  128. package/dist/sdk/agent/test/index.js +1 -1
  129. package/dist/sdk/agent/test/output.js +1 -1
  130. package/dist/sdk/agent/test/parser.js +1 -1
  131. package/dist/sdk/agent/tool-target-registry.js +1 -1
  132. package/dist/sdk/api.js +1 -1
  133. package/dist/sdk/auth-token.js +1 -1
  134. package/dist/sdk/cas/audience-context.js +1 -1
  135. package/dist/sdk/cas/cas-api-client.js +1 -1
  136. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  137. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  138. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  139. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  140. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  141. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  142. package/dist/sdk/cas/index.js +1 -1
  143. package/dist/sdk/cas/pull-workflow.js +1 -1
  144. package/dist/sdk/cas/push-workflow.js +1 -1
  145. package/dist/sdk/cas/validate-files.js +1 -1
  146. package/dist/sdk/client/cdp-api-client.js +1 -1
  147. package/dist/sdk/client/delivery-api-client.js +1 -1
  148. package/dist/sdk/client/endpoints.js +1 -1
  149. package/dist/sdk/client/engage-api-client.js +1 -1
  150. package/dist/sdk/client/http-client.js +1 -1
  151. package/dist/sdk/client/llm-api-client.js +1 -1
  152. package/dist/sdk/client/oauth-refresh.js +1 -1
  153. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  154. package/dist/sdk/client/rate-limiter.js +1 -1
  155. package/dist/sdk/client/td-api-client.js +1 -1
  156. package/dist/sdk/client/trino-api-client.js +1 -1
  157. package/dist/sdk/client/workflow-client.js +1 -1
  158. package/dist/sdk/connection-validator.js +1 -1
  159. package/dist/sdk/connection.js +1 -1
  160. package/dist/sdk/delivery.js +1 -1
  161. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  162. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  163. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  164. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  165. package/dist/sdk/engage/campaign-pull.js +1 -1
  166. package/dist/sdk/engage/campaign-push.js +1 -1
  167. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  168. package/dist/sdk/engage/campaign-readiness.js +1 -1
  169. package/dist/sdk/engage/campaign-validator.js +1 -1
  170. package/dist/sdk/engage/campaign-yaml.js +1 -1
  171. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  172. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  173. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  174. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  175. package/dist/sdk/engage/landing-page-init.js +1 -1
  176. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  177. package/dist/sdk/engage/landing-page-pull.js +1 -1
  178. package/dist/sdk/engage/landing-page-push.js +1 -1
  179. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  180. package/dist/sdk/engage/landing-page-validator.js +1 -1
  181. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  182. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  183. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  184. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  185. package/dist/sdk/engage/template-pull.js +1 -1
  186. package/dist/sdk/engage/template-push.js +1 -1
  187. package/dist/sdk/engage/template-validator.js +1 -1
  188. package/dist/sdk/engage/template-yaml.js +1 -1
  189. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  190. package/dist/sdk/engage/types/campaign-def.js +1 -1
  191. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  192. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  193. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  194. package/dist/sdk/engage/types/template-schema.js +1 -1
  195. package/dist/sdk/engage/workspace-assignments.js +1 -1
  196. package/dist/sdk/engage.js +1 -1
  197. package/dist/sdk/errors.js +1 -1
  198. package/dist/sdk/index.js +1 -1
  199. package/dist/sdk/io/index.js +1 -1
  200. package/dist/sdk/io/node-filesystem.js +1 -1
  201. package/dist/sdk/job.js +1 -1
  202. package/dist/sdk/journey.js +1 -1
  203. package/dist/sdk/llm/chat-cache.js +1 -1
  204. package/dist/sdk/llm/codex-usage.d.ts +13 -0
  205. package/dist/sdk/llm/codex-usage.d.ts.map +1 -0
  206. package/dist/sdk/llm/codex-usage.js +1 -0
  207. package/dist/sdk/llm/codex-usage.js.map +1 -0
  208. package/dist/sdk/llm/index.js +1 -1
  209. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  210. package/dist/sdk/llm/model-factors.js +1 -1
  211. package/dist/sdk/llm/user-settings.js +1 -1
  212. package/dist/sdk/llm/work-models.d.ts +52 -0
  213. package/dist/sdk/llm/work-models.d.ts.map +1 -0
  214. package/dist/sdk/llm/work-models.js +1 -0
  215. package/dist/sdk/llm/work-models.js.map +1 -0
  216. package/dist/sdk/p13n-studio-errors.js +1 -1
  217. package/dist/sdk/p13n-studio.js +1 -1
  218. package/dist/sdk/personalization.js +1 -1
  219. package/dist/sdk/policy.js +1 -1
  220. package/dist/sdk/query/deleted-table-validation.js +1 -1
  221. package/dist/sdk/query/index.js +1 -1
  222. package/dist/sdk/query/sql-parser.js +1 -1
  223. package/dist/sdk/realtime.js +1 -1
  224. package/dist/sdk/schedule.js +1 -1
  225. package/dist/sdk/segment/audience-context.js +1 -1
  226. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  227. package/dist/sdk/segment/fields-display.js +1 -1
  228. package/dist/sdk/segment/file-discovery.js +1 -1
  229. package/dist/sdk/segment/journey-utils.js +1 -1
  230. package/dist/sdk/segment/journey-validator.js +1 -1
  231. package/dist/sdk/segment/journey-yaml.js +1 -1
  232. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  233. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  234. package/dist/sdk/segment/pull-workflow.js +1 -1
  235. package/dist/sdk/segment/push-recovery.js +1 -1
  236. package/dist/sdk/segment/push-workflow.js +1 -1
  237. package/dist/sdk/segment/resolution-context.js +1 -1
  238. package/dist/sdk/segment/segment-path-parser.js +1 -1
  239. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  240. package/dist/sdk/segment/segment-validator.js +1 -1
  241. package/dist/sdk/segment/target-resolution.js +1 -1
  242. package/dist/sdk/segment/tdx-config.js +1 -1
  243. package/dist/sdk/segment/types/activation-schema.js +1 -1
  244. package/dist/sdk/segment/types/journey-def.js +1 -1
  245. package/dist/sdk/segment/types/journey-schema.js +1 -1
  246. package/dist/sdk/segment/types/segment-def.js +1 -1
  247. package/dist/sdk/segment/types/segment-schema.js +1 -1
  248. package/dist/sdk/segment/validate-files.js +1 -1
  249. package/dist/sdk/segment/yaml-validator.js +1 -1
  250. package/dist/sdk/segment.js +1 -1
  251. package/dist/sdk/types/index.js +1 -1
  252. package/dist/sdk/types/progress.js +1 -1
  253. package/dist/sdk/types/workspace.js +1 -1
  254. package/dist/sdk/user.js +1 -1
  255. package/dist/sdk/util/format-detector.js +1 -1
  256. package/dist/sdk/util/formatters.js +1 -1
  257. package/dist/sdk/util/index.js +1 -1
  258. package/dist/sdk/util/paginate.js +1 -1
  259. package/dist/sdk/util/tree-formatter.js +1 -1
  260. package/dist/sdk/util/tree-search.js +1 -1
  261. package/dist/sdk/workflow/archive-validation.js +1 -1
  262. package/dist/sdk/workflow/clone-workflow.js +1 -1
  263. package/dist/sdk/workflow/index.js +1 -1
  264. package/dist/sdk/workflow/pull-workflow.js +1 -1
  265. package/dist/sdk/workflow/push-workflow.js +1 -1
  266. package/dist/sdk/workflow/task-graph.js +1 -1
  267. package/dist/sdk/workflow/tdx-config.js +1 -1
  268. package/dist/sdk/workflow/workflow-utils.js +1 -1
  269. package/dist/sdk/workspace/access-tracker.js +1 -1
  270. package/dist/sdk/workspace/frontmatter.js +1 -1
  271. package/dist/sdk/workspace/git.js +1 -1
  272. package/dist/sdk/workspace/index.js +1 -1
  273. package/dist/sdk/workspace/templates.js +1 -1
  274. package/dist/sdk/workspace/weekly.js +1 -1
  275. package/dist/sdk/workspace/wikilinks.js +1 -1
  276. package/dist/test-utils/command-runner.js +1 -1
  277. package/dist/test-utils/factories.js +1 -1
  278. package/dist/test-utils/fixtures.js +1 -1
  279. package/dist/test-utils/http-mock.js +1 -1
  280. package/dist/test-utils/index.js +1 -1
  281. package/dist/utils/async.js +1 -1
  282. package/dist/utils/claude-code-state.js +1 -1
  283. package/dist/utils/colors.js +1 -1
  284. package/dist/utils/diff.js +1 -1
  285. package/dist/utils/file-permissions.js +1 -1
  286. package/dist/utils/file-reader.js +1 -1
  287. package/dist/utils/github-releases.js +1 -1
  288. package/dist/utils/global-cache.js +1 -1
  289. package/dist/utils/json-loader.js +1 -1
  290. package/dist/utils/local-cache.js +1 -1
  291. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  292. package/dist/utils/logger/formatters/index.js +1 -1
  293. package/dist/utils/logger/handlers/console-handler.js +1 -1
  294. package/dist/utils/logger/handlers/file-handler.js +1 -1
  295. package/dist/utils/logger/handlers/index.js +1 -1
  296. package/dist/utils/logger/handlers/null-handler.js +1 -1
  297. package/dist/utils/logger/index.js +1 -1
  298. package/dist/utils/logger/logger.js +1 -1
  299. package/dist/utils/logger/types.js +1 -1
  300. package/dist/utils/option-validation.js +1 -1
  301. package/dist/utils/process.js +1 -1
  302. package/dist/utils/prompt.js +1 -1
  303. package/dist/utils/proxy-fetch.js +1 -1
  304. package/dist/utils/spinner.js +1 -1
  305. package/dist/utils/sse-parser.js +1 -1
  306. package/dist/utils/string-utils.js +1 -1
  307. package/dist/utils/table-ref-parser.js +1 -1
  308. package/dist/utils/td-user.d.ts +3 -0
  309. package/dist/utils/td-user.d.ts.map +1 -0
  310. package/dist/utils/td-user.js +1 -0
  311. package/dist/utils/td-user.js.map +1 -0
  312. package/dist/utils/tdx-logger.js +1 -1
  313. package/dist/utils/version-check.js +1 -1
  314. package/package.json +1 -1
  315. package/dist/commands/ai-usage-command-base.d.ts +0 -26
  316. package/dist/commands/ai-usage-command-base.d.ts.map +0 -1
  317. package/dist/commands/ai-usage-command-base.js +0 -1
  318. package/dist/commands/ai-usage-command-base.js.map +0 -1
  319. package/dist/commands/claude-usage-command.d.ts +0 -19
  320. package/dist/commands/claude-usage-command.d.ts.map +0 -1
  321. package/dist/commands/claude-usage-command.js +0 -1
  322. package/dist/commands/claude-usage-command.js.map +0 -1
  323. package/dist/commands/opencode-usage-command.d.ts +0 -19
  324. package/dist/commands/opencode-usage-command.d.ts.map +0 -1
  325. package/dist/commands/opencode-usage-command.js +0 -1
  326. package/dist/commands/opencode-usage-command.js.map +0 -1
@@ -1 +1 @@
1
- const a52_0x13b99d=a52_0x9b8e;function a52_0x4d1e(){const _0x480002=['950caRFTZ','✔\x20Found\x20','error','8764rivyWw','Listing\x20fields\x20for\x20\x27','86625gULGXf','Parent\x20segment:\x20','jsonl','data','77476656vrtmQp','List\x20available\x20fields\x20for\x20segmentation','2517clUicE','11244lLyYas','8985408gRCRzP','985EAfEEX','\x20field','execute','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','length','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','9FjOLBK','verbose','segment:fields','962jsFzEx','Error:\x20Parent\x20segment\x20name\x20is\x20required','179795iIpcuO','5068ShRVnT','segment'];a52_0x4d1e=function(){return _0x480002;};return a52_0x4d1e();}(function(_0x42fabc,_0x3aa0b9){const _0x538199=a52_0x9b8e,_0xa7576e=_0x42fabc();while(!![]){try{const _0x510d8e=parseInt(_0x538199(0x1ec))/0x1*(-parseInt(_0x538199(0x1f8))/0x2)+parseInt(_0x538199(0x1e6))/0x3+parseInt(_0x538199(0x1e4))/0x4*(-parseInt(_0x538199(0x1ef))/0x5)+parseInt(_0x538199(0x1ed))/0x6*(-parseInt(_0x538199(0x1df))/0x7)+parseInt(_0x538199(0x1ee))/0x8*(-parseInt(_0x538199(0x1f5))/0x9)+parseInt(_0x538199(0x1e1))/0xa*(-parseInt(_0x538199(0x1de))/0xb)+parseInt(_0x538199(0x1ea))/0xc;if(_0x510d8e===_0x3aa0b9)break;else _0xa7576e['push'](_0xa7576e['shift']());}catch(_0x20c2f7){_0xa7576e['push'](_0xa7576e['shift']());}}}(a52_0x4d1e,0xc5cf8));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a52_0x9b8e(_0x2c51df,_0x56d1e5){_0x2c51df=_0x2c51df-0x1de;const _0x4d1eef=a52_0x4d1e();let _0x9b8eb4=_0x4d1eef[_0x2c51df];return _0x9b8eb4;}import{displayFieldsHumanReadable}from'../sdk/segment/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{['name']=a52_0x13b99d(0x1f7);['description']=a52_0x13b99d(0x1eb);async[a52_0x13b99d(0x1f1)](_0x39c49d){const _0xe564d9=a52_0x13b99d,{options:_0x44f0d8,args:_0x39313a,tdx:_0x3e0a59}=_0x39c49d,_0x4113d1=_0x39313a[0x0]||_0x44f0d8['parentSegment'];if(!_0x4113d1)return console[_0xe564d9(0x1e3)](_0xe564d9(0x1f9)),console[_0xe564d9(0x1e3)](_0xe564d9(0x1f2)),console['error'](_0xe564d9(0x1f4)),0x1;_0x44f0d8[_0xe564d9(0x1f6)]&&(console['error']('Site:\x20'+_0x44f0d8['site']),console[_0xe564d9(0x1e3)](_0xe564d9(0x1e7)+_0x4113d1));const _0x289f56=await withSpinner(_0xe564d9(0x1e5)+_0x4113d1+'\x27...',()=>_0x3e0a59[_0xe564d9(0x1e0)]['listFields'](_0x4113d1),{'verbose':_0x44f0d8[_0xe564d9(0x1f6)]}),_0x4da547=_0x289f56[_0xe564d9(0x1e9)];console['error'](_0xe564d9(0x1e2)+_0x4da547[_0xe564d9(0x1f3)]+_0xe564d9(0x1f0)+(_0x4da547[_0xe564d9(0x1f3)]!==0x1?'s':''));if(_0x44f0d8['json']||_0x44f0d8[_0xe564d9(0x1e8)])return await handleSDKOutput(_0x4da547,_0x44f0d8),0x0;return displayFieldsHumanReadable(_0x4da547,_0x4113d1),0x0;}}
1
+ const a49_0x5d3c5f=a49_0x3a5b;(function(_0x5ce0f2,_0x4cce63){const _0x1fddb1=a49_0x3a5b,_0x2ccb18=_0x5ce0f2();while(!![]){try{const _0x5db888=-parseInt(_0x1fddb1(0x1e7))/0x1*(-parseInt(_0x1fddb1(0x1eb))/0x2)+parseInt(_0x1fddb1(0x1d4))/0x3*(-parseInt(_0x1fddb1(0x1de))/0x4)+-parseInt(_0x1fddb1(0x1d7))/0x5+parseInt(_0x1fddb1(0x1d9))/0x6*(-parseInt(_0x1fddb1(0x1df))/0x7)+-parseInt(_0x1fddb1(0x1dd))/0x8*(parseInt(_0x1fddb1(0x1ea))/0x9)+parseInt(_0x1fddb1(0x1e4))/0xa*(parseInt(_0x1fddb1(0x1e9))/0xb)+parseInt(_0x1fddb1(0x1ee))/0xc;if(_0x5db888===_0x4cce63)break;else _0x2ccb18['push'](_0x2ccb18['shift']());}catch(_0x1887c3){_0x2ccb18['push'](_0x2ccb18['shift']());}}}(a49_0x55d2,0x606c0));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a49_0x3a5b(_0x1b42bc,_0x1a4d00){_0x1b42bc=_0x1b42bc-0x1d0;const _0x55d217=a49_0x55d2();let _0x3a5b73=_0x55d217[_0x1b42bc];return _0x3a5b73;}import{withSpinner}from'../utils/spinner.js';function a49_0x55d2(){const _0x2a981b=['\x20field','segment:fields','85049Vrjsik','error','33pZxtkO','2547uBliMf','8KlAmVH','description','segment','18903372LwRKnX','name','jsonl','Error:\x20Parent\x20segment\x20name\x20is\x20required','List\x20available\x20fields\x20for\x20segmentation','Parent\x20segment:\x20','\x27...','3muXJGY','Listing\x20fields\x20for\x20\x27','verbose','2902665NRubGL','Site:\x20','48jLNyAe','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','data','json','1544dvTWpb','2930132SYRBad','546413FcMeGq','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','length','parentSegment','site','1572080bLAsUo'];a49_0x55d2=function(){return _0x2a981b;};return a49_0x55d2();}import{displayFieldsHumanReadable}from'../sdk/segment/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{[a49_0x5d3c5f(0x1ef)]=a49_0x5d3c5f(0x1e6);[a49_0x5d3c5f(0x1ec)]=a49_0x5d3c5f(0x1d1);async['execute'](_0x28a174){const _0xf1057c=a49_0x5d3c5f,{options:_0x4f7a42,args:_0x1b090f,tdx:_0x2d8d8c}=_0x28a174,_0x1cd2ef=_0x1b090f[0x0]||_0x4f7a42[_0xf1057c(0x1e2)];if(!_0x1cd2ef)return console[_0xf1057c(0x1e8)](_0xf1057c(0x1d0)),console['error'](_0xf1057c(0x1e0)),console['error'](_0xf1057c(0x1da)),0x1;_0x4f7a42['verbose']&&(console[_0xf1057c(0x1e8)](_0xf1057c(0x1d8)+_0x4f7a42[_0xf1057c(0x1e3)]),console['error'](_0xf1057c(0x1d2)+_0x1cd2ef));const _0x188d4a=await withSpinner(_0xf1057c(0x1d5)+_0x1cd2ef+_0xf1057c(0x1d3),()=>_0x2d8d8c[_0xf1057c(0x1ed)]['listFields'](_0x1cd2ef),{'verbose':_0x4f7a42[_0xf1057c(0x1d6)]}),_0x30e0c8=_0x188d4a[_0xf1057c(0x1db)];console[_0xf1057c(0x1e8)]('✔\x20Found\x20'+_0x30e0c8['length']+_0xf1057c(0x1e5)+(_0x30e0c8[_0xf1057c(0x1e1)]!==0x1?'s':''));if(_0x4f7a42[_0xf1057c(0x1dc)]||_0x4f7a42[_0xf1057c(0x1f0)])return await handleSDKOutput(_0x30e0c8,_0x4f7a42),0x0;return displayFieldsHumanReadable(_0x30e0c8,_0x1cd2ef),0x0;}}
@@ -1 +1 @@
1
- const a53_0x5aa459=a53_0x5329;function a53_0x5329(_0x344b8a,_0x342e59){_0x344b8a=_0x344b8a-0xd8;const _0x175899=a53_0x1758();let _0x532964=_0x175899[_0x344b8a];return _0x532964;}(function(_0x5f2dc0,_0x8fe142){const _0x2428ab=a53_0x5329,_0xe09f17=_0x5f2dc0();while(!![]){try{const _0x5a5332=parseInt(_0x2428ab(0xf6))/0x1+-parseInt(_0x2428ab(0xfb))/0x2*(-parseInt(_0x2428ab(0xf7))/0x3)+-parseInt(_0x2428ab(0xec))/0x4+-parseInt(_0x2428ab(0xfc))/0x5*(parseInt(_0x2428ab(0xee))/0x6)+parseInt(_0x2428ab(0xf0))/0x7*(-parseInt(_0x2428ab(0xed))/0x8)+parseInt(_0x2428ab(0xe8))/0x9+parseInt(_0x2428ab(0xfe))/0xa;if(_0x5a5332===_0x8fe142)break;else _0xe09f17['push'](_0xe09f17['shift']());}catch(_0x3b6f88){_0xe09f17['push'](_0xe09f17['shift']());}}}(a53_0x1758,0x97ad8));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a53_0x1758(){const _0x19d3e4=['type','\x20\x20(id\x20','\x20folder\x20\x27','712962oqGnrY','9ShSOIw','\x27\x20—\x20','explainAmbiguousName','slot','184564DEGXHx','375AQzCZz','red','2912420DrCPqG','includes','parentSegment','length','Moving','moveSegments','Error:\x20at\x20least\x20one\x20<segment>\x20and\x20--folder\x20<folder>\x20are\x20required\x0a','for\x20move\x20to','Examples:','resolveEntitiesInParent','\x27\x20matches\x20','join','•\x20[dry-run]\x20Would\x20move\x20segment\x20\x27','code','\x20\x20tdx\x20segment\x20move\x201603887\x201603888\x201603889\x20--folder\x208299501','segment','✔\x20Moved\x20segment\x20\x27','name','\x20segment','\x27,\x20\x27','\x27...','preserved:','yellow','\x27\x20to\x20folder\x20\x27','\x20(verified\x20by\x20re-read)','error','segmentFolderId','toLowerCase','execute','\x0aTip:\x20run\x20`tdx\x20segment\x20list\x20-r`\x20to\x20find\x20segment\x20and\x20folder\x20names/IDs.','Searching\x20the\x20tree...','Target\x20folder:\x20','set','folder','filter','Checking','Or\x20use\x20IDs:\x20\x20\x20\x20tdx\x20sg\x20list\x20-r\x20--json\x20\x20(then\x20pass\x20the\x20numeric\x20ids)','[dry-run]\x20No\x20changes\x20made.\x20','push','green','data','path','test','Move\x20one\x20or\x20more\x20segments\x20to\x20a\x20different\x20folder','get','Re-run\x20`tdx\x20sg\x20move`\x20with\x20that\x20full\x20path\x20(or\x20the\x20id).','\x20condition','forEach','\x20segments\x20moved,\x20all\x20rules\x20verified\x20intact','\x20\x20•\x20','\x20→\x20','8827830dyYCNY','Usage:\x20tdx\x20segment\x20move\x20<segment...>\x20--folder\x20<folder>','Error:\x20\x27','listRecursive','3168212PQtSJk','833832erOhfC','26196cHKlud','some','35JipnZS','verbose','\x27\x20isn\x27t\x20at\x20the\x20top\x20level\x20—\x20it\x27s\x20nested\x20at:'];a53_0x1758=function(){return _0x19d3e4;};return a53_0x1758();}import{searchTreeByName}from'../sdk/util/tree-search.js';import a53_0x502345 from'chalk';export class SegmentMoveCommand extends BaseCommand{[a53_0x5aa459(0x10f)]='segment:move';['description']=a53_0x5aa459(0xe0);async[a53_0x5aa459(0x11a)](_0x5cf3a6){const _0x34e57d=a53_0x5aa459,{options:_0x17ebff,args:_0x9447b9,tdx:_0xa98b4b}=_0x5cf3a6,_0x4712dd=_0x9447b9,_0x18c0a3=_0x17ebff[_0x34e57d(0x11f)];if(_0x4712dd['length']===0x0||!_0x18c0a3)return console[_0x34e57d(0x117)](a53_0x502345[_0x34e57d(0xfd)](_0x34e57d(0x104))),console[_0x34e57d(0x117)](_0x34e57d(0xe9)),console['error'](_0x34e57d(0x106)),console[_0x34e57d(0x117)]('\x20\x20tdx\x20segment\x20move\x201603887\x20--folder\x208299501'),console[_0x34e57d(0x117)](_0x34e57d(0x10c)),console[_0x34e57d(0x117)]('\x20\x20tdx\x20segment\x20move\x20\x22VIP\x20Customers\x22\x20--folder\x20\x22Archive\x22\x20\x20\x20#\x20by\x20name\x20(needs\x20parent\x20context)'),console[_0x34e57d(0x117)](_0x34e57d(0x11b)),0x1;_0x17ebff[_0x34e57d(0xf1)]&&(console[_0x34e57d(0x117)]('Segments:\x20'+_0x4712dd[_0x34e57d(0x109)](',\x20')),console[_0x34e57d(0x117)](_0x34e57d(0x11d)+_0x18c0a3));const _0x151449=[...new Set(_0x4712dd)];_0x151449[_0x34e57d(0x101)]<_0x4712dd[_0x34e57d(0x101)]&&console['error'](a53_0x502345[_0x34e57d(0x114)]('Duplicate\x20segments\x20removed\x20('+_0x4712dd[_0x34e57d(0x101)]+_0x34e57d(0xe7)+_0x151449[_0x34e57d(0x101)]+').'));const _0x510b62=/^\d+$/,_0xff9793=_0x17ebff[_0x34e57d(0x100)],_0x28aab8=[..._0x151449,_0x18c0a3][_0x34e57d(0xef)](_0x3cc8be=>!_0x510b62['test'](_0x3cc8be));if(_0x28aab8&&!_0xff9793)return console['error'](a53_0x502345[_0x34e57d(0xfd)]('Error:\x20no\x20parent\x20segment\x20context\x20—\x20moving\x20by\x20name\x20needs\x20one.\x0a')),console['error']('Set\x20context:\x20\x20\x20tdx\x20use\x20parent_segment\x20\x22<name>\x22'),console[_0x34e57d(0x117)]('Or\x20pass\x20flag:\x20\x20--parent-segment\x20\x22<name>\x22'),console[_0x34e57d(0x117)](_0x34e57d(0xd9)),0x1;const _0x216136=_0x151449[_0x34e57d(0x101)],_0x557f3d=_0x17ebff['dryRun']===!![];let _0x5544a7;try{const _0x545f98=await withSpinner((_0x557f3d?_0x34e57d(0xd8):_0x34e57d(0x102))+'\x20'+_0x216136+_0x34e57d(0x110)+(_0x216136===0x1?'':'s')+'\x20'+((_0x557f3d?_0x34e57d(0x105):'to')+_0x34e57d(0xf5)+_0x18c0a3+_0x34e57d(0x112)),async()=>{const _0x3eb99d=_0x34e57d,_0x2324e0=[];_0x151449[_0x3eb99d(0xe4)]((_0x7a5401,_0x594e8b)=>{const _0x55a9b8=_0x3eb99d;if(!_0x510b62['test'](_0x7a5401))_0x2324e0[_0x55a9b8(0xdb)]({'name':_0x7a5401,'expectType':_0x55a9b8(0x10d),'slot':_0x594e8b});});if(!_0x510b62['test'](_0x18c0a3))_0x2324e0[_0x3eb99d(0xdb)]({'name':_0x18c0a3,'expectType':_0x3eb99d(0x11f),'slot':-0x1});const _0xcb1dd9=new Map();if(_0x2324e0[_0x3eb99d(0x101)]>0x0){const _0x2d1882=await _0xa98b4b['segment'][_0x3eb99d(0x107)](_0xff9793,_0x2324e0['map'](({name:_0x370629,expectType:_0x180944})=>({'name':_0x370629,'expectType':_0x180944})));_0x2d1882['forEach']((_0x1b9caa,_0x33cff1)=>_0xcb1dd9[_0x3eb99d(0x11e)](_0x2324e0[_0x33cff1][_0x3eb99d(0xfa)],_0x1b9caa['id']));}const _0x17bf20=_0x151449['map']((_0x370a45,_0x4019d4)=>_0x510b62[_0x3eb99d(0xdf)](_0x370a45)?_0x370a45:_0xcb1dd9[_0x3eb99d(0xe1)](_0x4019d4)),_0xd612a4=_0x510b62[_0x3eb99d(0xdf)](_0x18c0a3)?_0x18c0a3:_0xcb1dd9[_0x3eb99d(0xe1)](-0x1);return _0xa98b4b[_0x3eb99d(0x10d)][_0x3eb99d(0x103)](_0x17bf20,_0xd612a4,_0x557f3d);},{'verbose':_0x17ebff[_0x34e57d(0xf1)]});_0x5544a7=_0x545f98[_0x34e57d(0xdd)];}catch(_0x2bb840){if(_0x2bb840 instanceof SDKError&&_0x2bb840[_0x34e57d(0x10b)]===ErrorCode['SEGMENT_NOT_FOUND']&&_0xff9793)try{if(await this[_0x34e57d(0xf9)](_0xa98b4b,_0xff9793,_0x151449,_0x17ebff))return 0x1;}catch{}throw _0x2bb840;}for(const _0x1666f7 of _0x5544a7){const _0x45a7ff=_0x1666f7['ruleConditionCount'],_0x2bdd08='rule\x20'+(_0x557f3d?'has':_0x34e57d(0x113))+'\x20'+_0x45a7ff+_0x34e57d(0xe3)+(_0x45a7ff===0x1?'':'s');console[_0x34e57d(0x117)](_0x557f3d?a53_0x502345['cyan'](_0x34e57d(0x10a)+_0x1666f7['id']+_0x34e57d(0x115)+_0x1666f7[_0x34e57d(0x118)]+'\x27\x20—\x20'+_0x2bdd08):a53_0x502345[_0x34e57d(0xdc)](_0x34e57d(0x10e)+_0x1666f7['id']+_0x34e57d(0x115)+_0x1666f7['segmentFolderId']+_0x34e57d(0xf8)+_0x2bdd08+_0x34e57d(0x116)));}if(_0x557f3d)console[_0x34e57d(0x117)](a53_0x502345['cyan'](_0x34e57d(0xda)+_0x216136+'\x20segment(s)\x20would\x20be\x20moved.'));else _0x5544a7[_0x34e57d(0x101)]>0x1&&console[_0x34e57d(0x117)](a53_0x502345[_0x34e57d(0xdc)]('✔\x20'+_0x5544a7[_0x34e57d(0x101)]+_0x34e57d(0xe5)));return await handleSDKOutput(_0x5544a7,_0x17ebff),0x0;}async['explainAmbiguousName'](_0x195738,_0x45d5d1,_0x13157f,_0x1fed17){const _0x32530d=a53_0x5aa459,_0x5a273c=_0x13157f[_0x32530d(0x120)](_0x2f9199=>!/^\d+$/['test'](_0x2f9199)&&!_0x2f9199[_0x32530d(0xff)]('/'));if(_0x5a273c[_0x32530d(0x101)]===0x0)return![];const _0x309178=await withSpinner('Searching\x20folders\x20for\x20\x27'+_0x5a273c['join'](_0x32530d(0x111))+'\x27...',()=>_0x195738[_0x32530d(0x10d)]['resolvePathToResource'](_0x45d5d1),{'verbose':_0x1fed17[_0x32530d(0xf1)]}),_0x2946fa=(await withSpinner(_0x32530d(0x11c),()=>_0x195738[_0x32530d(0x10d)][_0x32530d(0xeb)](_0x309178[_0x32530d(0xdd)]['parentId'],_0x309178[_0x32530d(0xdd)]['folderId'],0x0,0xa),{'verbose':_0x1fed17[_0x32530d(0xf1)]}))[_0x32530d(0xdd)];let _0x159fe9=![];for(const _0x4c9d61 of _0x5a273c){const _0x537e3f=searchTreeByName(_0x2946fa,_0x4c9d61)[_0x32530d(0x120)](_0x5dd12c=>_0x5dd12c[_0x32530d(0xf3)]===_0x32530d(0x10d)&&_0x5dd12c[_0x32530d(0x10f)][_0x32530d(0x119)]()===_0x4c9d61['toLowerCase']());if(_0x537e3f[_0x32530d(0x101)]>0x1){_0x159fe9=!![],console[_0x32530d(0x117)](a53_0x502345['red']('Error:\x20\x27'+_0x4c9d61+_0x32530d(0x108)+_0x537e3f['length']+'\x20segments\x20—\x20refusing\x20to\x20guess.\x20Pass\x20the\x20full\x20path\x20(or\x20id)\x20of\x20the\x20one\x20you\x20mean:'));for(const _0xfa2b92 of _0x537e3f)console[_0x32530d(0x117)](_0x32530d(0xe6)+_0xfa2b92[_0x32530d(0xde)]+'\x20\x20(id\x20'+_0xfa2b92['id']+')');}else _0x537e3f['length']===0x1&&(_0x159fe9=!![],console[_0x32530d(0x117)](a53_0x502345[_0x32530d(0xfd)](_0x32530d(0xea)+_0x4c9d61+_0x32530d(0xf2))),console[_0x32530d(0x117)]('\x20\x20'+_0x537e3f[0x0]['path']+_0x32530d(0xf4)+_0x537e3f[0x0]['id']+')'),console['error'](_0x32530d(0xe2)));}return _0x159fe9;}}
1
+ function a50_0x3cee(){const _0x4a4be8=['verbose','24YNkAga','\x0aTip:\x20run\x20`tdx\x20segment\x20list\x20-r`\x20to\x20find\x20segment\x20and\x20folder\x20names/IDs.','✔\x20Moved\x20segment\x20\x27','\x20segments\x20moved,\x20all\x20rules\x20verified\x20intact','path','22UPOrvR','data','filter','Duplicate\x20segments\x20removed\x20(','370928BWrNnd','Set\x20context:\x20\x20\x20tdx\x20use\x20parent_segment\x20\x22<name>\x22','dryRun','toLowerCase','execute','15BqvfwU','folder','explainAmbiguousName','Re-run\x20`tdx\x20sg\x20move`\x20with\x20that\x20full\x20path\x20(or\x20the\x20id).','45mITsDI','parentSegment','code','\x20→\x20','\x27\x20—\x20','cyan','Searching\x20the\x20tree...','for\x20move\x20to','ruleConditionCount','map','Examples:','Checking','961137lJHuQF','SEGMENT_NOT_FOUND','14898552GEBFlU','\x20\x20(id\x20','Or\x20pass\x20flag:\x20\x20--parent-segment\x20\x22<name>\x22','Searching\x20folders\x20for\x20\x27','resolvePathToResource','name','\x20\x20tdx\x20segment\x20move\x201603887\x20--folder\x208299501','push','preserved:','\x20segments\x20—\x20refusing\x20to\x20guess.\x20Pass\x20the\x20full\x20path\x20(or\x20id)\x20of\x20the\x20one\x20you\x20mean:','segmentFolderId','has','8595180KxAmQO','\x27\x20to\x20folder\x20\x27','Move\x20one\x20or\x20more\x20segments\x20to\x20a\x20different\x20folder','length','description','rule\x20','red','383432lzxcmt','join','test','error','\x27\x20matches\x20','segment','1949577ghIjXY','\x20segment','includes','Error:\x20\x27','Or\x20use\x20IDs:\x20\x20\x20\x20tdx\x20sg\x20list\x20-r\x20--json\x20\x20(then\x20pass\x20the\x20numeric\x20ids)','3ziwjhL','1566148TJOBah','\x20\x20tdx\x20segment\x20move\x20\x22VIP\x20Customers\x22\x20--folder\x20\x22Archive\x22\x20\x20\x20#\x20by\x20name\x20(needs\x20parent\x20context)','[dry-run]\x20No\x20changes\x20made.\x20','\x20condition','green','\x27\x20isn\x27t\x20at\x20the\x20top\x20level\x20—\x20it\x27s\x20nested\x20at:','\x27,\x20\x27','\x20segment(s)\x20would\x20be\x20moved.','\x27...'];a50_0x3cee=function(){return _0x4a4be8;};return a50_0x3cee();}const a50_0x4c8de4=a50_0x5cad;(function(_0x2149d1,_0x1fba06){const _0x529943=a50_0x5cad,_0x57a5db=_0x2149d1();while(!![]){try{const _0x195d65=parseInt(_0x529943(0x170))/0x1*(-parseInt(_0x529943(0x165))/0x2)+parseInt(_0x529943(0x150))/0x3+-parseInt(_0x529943(0x171))/0x4*(-parseInt(_0x529943(0x189))/0x5)+-parseInt(_0x529943(0x17b))/0x6*(-parseInt(_0x529943(0x16b))/0x7)+-parseInt(_0x529943(0x184))/0x8*(-parseInt(_0x529943(0x18d))/0x9)+parseInt(_0x529943(0x15e))/0xa+-parseInt(_0x529943(0x180))/0xb*(parseInt(_0x529943(0x152))/0xc);if(_0x195d65===_0x1fba06)break;else _0x57a5db['push'](_0x57a5db['shift']());}catch(_0x1812ad){_0x57a5db['push'](_0x57a5db['shift']());}}}(a50_0x3cee,0x9cc5e));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{searchTreeByName}from'../sdk/util/tree-search.js';import a50_0x18811d from'chalk';function a50_0x5cad(_0x48b301,_0x63c5a2){_0x48b301=_0x48b301-0x14f;const _0x3ceec6=a50_0x3cee();let _0x5cadba=_0x3ceec6[_0x48b301];return _0x5cadba;}export class SegmentMoveCommand extends BaseCommand{['name']='segment:move';[a50_0x4c8de4(0x162)]=a50_0x4c8de4(0x160);async[a50_0x4c8de4(0x188)](_0x39ee6f){const _0x156d5d=a50_0x4c8de4,{options:_0x5aecf6,args:_0x5de513,tdx:_0xeb18df}=_0x39ee6f,_0xad13ce=_0x5de513,_0x30fbe1=_0x5aecf6[_0x156d5d(0x18a)];if(_0xad13ce[_0x156d5d(0x161)]===0x0||!_0x30fbe1)return console[_0x156d5d(0x168)](a50_0x18811d[_0x156d5d(0x164)]('Error:\x20at\x20least\x20one\x20<segment>\x20and\x20--folder\x20<folder>\x20are\x20required\x0a')),console[_0x156d5d(0x168)]('Usage:\x20tdx\x20segment\x20move\x20<segment...>\x20--folder\x20<folder>'),console['error'](_0x156d5d(0x197)),console[_0x156d5d(0x168)](_0x156d5d(0x158)),console[_0x156d5d(0x168)]('\x20\x20tdx\x20segment\x20move\x201603887\x201603888\x201603889\x20--folder\x208299501'),console[_0x156d5d(0x168)](_0x156d5d(0x172)),console[_0x156d5d(0x168)](_0x156d5d(0x17c)),0x1;_0x5aecf6['verbose']&&(console[_0x156d5d(0x168)]('Segments:\x20'+_0xad13ce[_0x156d5d(0x166)](',\x20')),console['error']('Target\x20folder:\x20'+_0x30fbe1));const _0x55d8b3=[...new Set(_0xad13ce)];_0x55d8b3[_0x156d5d(0x161)]<_0xad13ce[_0x156d5d(0x161)]&&console['error'](a50_0x18811d['yellow'](_0x156d5d(0x183)+_0xad13ce['length']+_0x156d5d(0x190)+_0x55d8b3[_0x156d5d(0x161)]+').'));const _0x352bcf=/^\d+$/,_0x5f3833=_0x5aecf6[_0x156d5d(0x18e)],_0x211dab=[..._0x55d8b3,_0x30fbe1]['some'](_0xa36def=>!_0x352bcf[_0x156d5d(0x167)](_0xa36def));if(_0x211dab&&!_0x5f3833)return console[_0x156d5d(0x168)](a50_0x18811d[_0x156d5d(0x164)]('Error:\x20no\x20parent\x20segment\x20context\x20—\x20moving\x20by\x20name\x20needs\x20one.\x0a')),console[_0x156d5d(0x168)](_0x156d5d(0x185)),console['error'](_0x156d5d(0x154)),console[_0x156d5d(0x168)](_0x156d5d(0x16f)),0x1;const _0x365297=_0x55d8b3['length'],_0x4236a5=_0x5aecf6[_0x156d5d(0x186)]===!![];let _0x10924f;try{const _0x2b4128=await withSpinner((_0x4236a5?_0x156d5d(0x14f):'Moving')+'\x20'+_0x365297+_0x156d5d(0x16c)+(_0x365297===0x1?'':'s')+'\x20'+((_0x4236a5?_0x156d5d(0x194):'to')+'\x20folder\x20\x27'+_0x30fbe1+'\x27...'),async()=>{const _0x4b0395=_0x156d5d,_0x1423e6=[];_0x55d8b3['forEach']((_0x4d180d,_0x363fda)=>{const _0x543bd4=a50_0x5cad;if(!_0x352bcf['test'](_0x4d180d))_0x1423e6[_0x543bd4(0x159)]({'name':_0x4d180d,'expectType':_0x543bd4(0x16a),'slot':_0x363fda});});if(!_0x352bcf[_0x4b0395(0x167)](_0x30fbe1))_0x1423e6[_0x4b0395(0x159)]({'name':_0x30fbe1,'expectType':_0x4b0395(0x18a),'slot':-0x1});const _0x3e3c3e=new Map();if(_0x1423e6['length']>0x0){const _0x12bc84=await _0xeb18df[_0x4b0395(0x16a)]['resolveEntitiesInParent'](_0x5f3833,_0x1423e6[_0x4b0395(0x196)](({name:_0x147ca1,expectType:_0x47c839})=>({'name':_0x147ca1,'expectType':_0x47c839})));_0x12bc84['forEach']((_0x543a89,_0x2db63b)=>_0x3e3c3e['set'](_0x1423e6[_0x2db63b]['slot'],_0x543a89['id']));}const _0x57bc36=_0x55d8b3[_0x4b0395(0x196)]((_0x538152,_0x38df84)=>_0x352bcf[_0x4b0395(0x167)](_0x538152)?_0x538152:_0x3e3c3e['get'](_0x38df84)),_0x25f494=_0x352bcf[_0x4b0395(0x167)](_0x30fbe1)?_0x30fbe1:_0x3e3c3e['get'](-0x1);return _0xeb18df['segment']['moveSegments'](_0x57bc36,_0x25f494,_0x4236a5);},{'verbose':_0x5aecf6[_0x156d5d(0x17a)]});_0x10924f=_0x2b4128[_0x156d5d(0x181)];}catch(_0x2f7241){if(_0x2f7241 instanceof SDKError&&_0x2f7241[_0x156d5d(0x18f)]===ErrorCode[_0x156d5d(0x151)]&&_0x5f3833)try{if(await this['explainAmbiguousName'](_0xeb18df,_0x5f3833,_0x55d8b3,_0x5aecf6))return 0x1;}catch{}throw _0x2f7241;}for(const _0x40a80b of _0x10924f){const _0x1fe831=_0x40a80b[_0x156d5d(0x195)],_0x13fa20=_0x156d5d(0x163)+(_0x4236a5?_0x156d5d(0x15d):_0x156d5d(0x15a))+'\x20'+_0x1fe831+_0x156d5d(0x174)+(_0x1fe831===0x1?'':'s');console[_0x156d5d(0x168)](_0x4236a5?a50_0x18811d[_0x156d5d(0x192)]('•\x20[dry-run]\x20Would\x20move\x20segment\x20\x27'+_0x40a80b['id']+_0x156d5d(0x15f)+_0x40a80b[_0x156d5d(0x15c)]+_0x156d5d(0x191)+_0x13fa20):a50_0x18811d[_0x156d5d(0x175)](_0x156d5d(0x17d)+_0x40a80b['id']+_0x156d5d(0x15f)+_0x40a80b[_0x156d5d(0x15c)]+_0x156d5d(0x191)+_0x13fa20+'\x20(verified\x20by\x20re-read)'));}if(_0x4236a5)console[_0x156d5d(0x168)](a50_0x18811d['cyan'](_0x156d5d(0x173)+_0x365297+_0x156d5d(0x178)));else _0x10924f[_0x156d5d(0x161)]>0x1&&console[_0x156d5d(0x168)](a50_0x18811d[_0x156d5d(0x175)]('✔\x20'+_0x10924f[_0x156d5d(0x161)]+_0x156d5d(0x17e)));return await handleSDKOutput(_0x10924f,_0x5aecf6),0x0;}async[a50_0x4c8de4(0x18b)](_0x3c5582,_0x183a0a,_0x5c2e1f,_0x12f6f7){const _0x49d35d=a50_0x4c8de4,_0x45d332=_0x5c2e1f[_0x49d35d(0x182)](_0x118ab2=>!/^\d+$/[_0x49d35d(0x167)](_0x118ab2)&&!_0x118ab2[_0x49d35d(0x16d)]('/'));if(_0x45d332[_0x49d35d(0x161)]===0x0)return![];const _0x407199=await withSpinner(_0x49d35d(0x155)+_0x45d332[_0x49d35d(0x166)](_0x49d35d(0x177))+_0x49d35d(0x179),()=>_0x3c5582['segment'][_0x49d35d(0x156)](_0x183a0a),{'verbose':_0x12f6f7['verbose']}),_0x369150=(await withSpinner(_0x49d35d(0x193),()=>_0x3c5582['segment']['listRecursive'](_0x407199['data']['parentId'],_0x407199['data']['folderId'],0x0,0xa),{'verbose':_0x12f6f7['verbose']}))[_0x49d35d(0x181)];let _0x9695b9=![];for(const _0x3e8b0f of _0x45d332){const _0x138879=searchTreeByName(_0x369150,_0x3e8b0f)[_0x49d35d(0x182)](_0x34475f=>_0x34475f['type']===_0x49d35d(0x16a)&&_0x34475f[_0x49d35d(0x157)][_0x49d35d(0x187)]()===_0x3e8b0f[_0x49d35d(0x187)]());if(_0x138879['length']>0x1){_0x9695b9=!![],console[_0x49d35d(0x168)](a50_0x18811d[_0x49d35d(0x164)](_0x49d35d(0x16e)+_0x3e8b0f+_0x49d35d(0x169)+_0x138879['length']+_0x49d35d(0x15b)));for(const _0x587027 of _0x138879)console[_0x49d35d(0x168)]('\x20\x20•\x20'+_0x587027['path']+'\x20\x20(id\x20'+_0x587027['id']+')');}else _0x138879[_0x49d35d(0x161)]===0x1&&(_0x9695b9=!![],console[_0x49d35d(0x168)](a50_0x18811d[_0x49d35d(0x164)](_0x49d35d(0x16e)+_0x3e8b0f+_0x49d35d(0x176))),console[_0x49d35d(0x168)]('\x20\x20'+_0x138879[0x0][_0x49d35d(0x17f)]+_0x49d35d(0x153)+_0x138879[0x0]['id']+')'),console['error'](_0x49d35d(0x18c)));}return _0x9695b9;}}
@@ -1 +1 @@
1
- const a54_0xa278a4=a54_0x89ba;(function(_0x286194,_0x3cbbe9){const _0x86d5b7=a54_0x89ba,_0x1f8f3a=_0x286194();while(!![]){try{const _0x659916=-parseInt(_0x86d5b7(0x16d))/0x1+-parseInt(_0x86d5b7(0x15b))/0x2+parseInt(_0x86d5b7(0x148))/0x3*(parseInt(_0x86d5b7(0x16e))/0x4)+parseInt(_0x86d5b7(0x168))/0x5+parseInt(_0x86d5b7(0x135))/0x6*(-parseInt(_0x86d5b7(0x15a))/0x7)+-parseInt(_0x86d5b7(0x141))/0x8+parseInt(_0x86d5b7(0x163))/0x9;if(_0x659916===_0x3cbbe9)break;else _0x1f8f3a['push'](_0x1f8f3a['shift']());}catch(_0x29ba0d){_0x1f8f3a['push'](_0x1f8f3a['shift']());}}}(a54_0x2330,0xdac70));function a54_0x2330(){const _0x4fdeaf=['filter','site','name','\x20files?','\x20files\x20to\x20','setPhase','no_parent','✔\x20Pulled\x20','segment:pull','Error:\x20','\x27...','\x20\x20🗺️\x20\x20','counts','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent','targetDir','\x20=\x20','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)','732571yvPrjb','1008872VdGrQx','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','\x20\x20🎯\x20','-\x20no\x20files\x20written','diff','activations','\x20with\x20','\x0aPull\x20summary\x20for\x20\x27','7568631qaEABb','isNew','parent_segment','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','file','5630875vqWtxc','verbose','\x20changed\x20files','\x20journeys','yellow','287310qJhnVS','2324TwJiLN','repeat','journeyVersions','Write\x20','dim','description','✔\x20All\x20files\x20are\x20up\x20to\x20date','No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27','cwd','execute','cyan','Pulling\x20segments\x20from\x20\x27','message','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','✔\x20Context\x20set:\x20','absolutePath','relativePath','data','journeys','Aborted.','24IqQeqh','green','\x20new\x20files','parentName','length','dryRun','type','error','\x20activations','\x0aError:','Parent\x20segment:\x20','yes','10640104mBFWLT','dirname','segments','hasChanges','\x20versions)','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','session','7587jRodYq'];a54_0x2330=function(){return _0x4fdeaf;};return a54_0x2330();}import{BaseCommand}from'./command.js';function a54_0x89ba(_0x2ec288,_0xbf0b47){_0x2ec288=_0x2ec288-0x132;const _0x23301a=a54_0x2330();let _0x89baff=_0x23301a[_0x2ec288];return _0x89baff;}import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';import a54_0x11ea59 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a54_0x3e92e7 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{[a54_0xa278a4(0x14b)]=a54_0xa278a4(0x151);[a54_0xa278a4(0x173)]=a54_0xa278a4(0x17b);async[a54_0xa278a4(0x177)](_0x4f0824){const _0x2f5d51=a54_0xa278a4,{options:_0xade8fc,args:_0xccc4a9,tdx:_0x33f232}=_0x4f0824,_0x74299=_0xade8fc,_0x3be4c0=await resolveTarget({'arg':_0xccc4a9[0x0],'contextParent':_0xade8fc['parentSegment'],'cwd':process[_0x2f5d51(0x176)]()});if(!isSuccessfulResolution(_0x3be4c0))return _0x3be4c0['errorCode']===_0x2f5d51(0x14f)?(console[_0x2f5d51(0x13c)](a54_0x11ea59[_0x2f5d51(0x16c)](_0x2f5d51(0x146))),console[_0x2f5d51(0x13c)](_0x2f5d51(0x159)),console['error'](_0x2f5d51(0x156)),console['error'](_0x2f5d51(0x15c))):(console[_0x2f5d51(0x13c)](a54_0x11ea59['red'](_0x2f5d51(0x152)+_0x3be4c0[_0x2f5d51(0x17a)]+'\x0a')),_0x3be4c0['helpText']&&console[_0x2f5d51(0x13c)](a54_0x11ea59[_0x2f5d51(0x178)](_0x3be4c0['helpText']))),0x1;const _0x4b2a0e=_0x3be4c0['parentName'],_0x2468bc=_0x3be4c0[_0x2f5d51(0x157)],_0x1bd8cc=_0x3be4c0[_0x2f5d51(0x13b)]===_0x2f5d51(0x167)?_0x3be4c0['resourceName']:undefined;_0x74299[_0x2f5d51(0x169)]&&(console[_0x2f5d51(0x13c)]('Site:\x20'+_0x74299[_0x2f5d51(0x14a)]),console[_0x2f5d51(0x13c)](_0x2f5d51(0x13f)+_0x4b2a0e),_0x1bd8cc&&console[_0x2f5d51(0x13c)]('Target\x20resource:\x20'+_0x1bd8cc));const _0x29cc97=await withProgressSpinner(_0x2f5d51(0x179)+_0x4b2a0e+_0x2f5d51(0x153),_0x40a480=>_0x33f232['segment']['pullSegments'](_0x4b2a0e,{'targetDir':_0x2468bc,'targetResourceName':_0x1bd8cc,'verbose':_0x74299[_0x2f5d51(0x169)],'progress':{'update':_0x4b4994=>{const _0x35cd11=_0x2f5d51;_0x40a480[_0x35cd11(0x14e)](_0x4b4994),_0x74299[_0x35cd11(0x169)]&&console['error']('\x20\x20'+_0x4b4994);}}}),{'verbose':_0x74299[_0x2f5d51(0x169)]}),_0x53dc39=_0x29cc97[_0x2f5d51(0x132)];if(_0x53dc39[_0x2f5d51(0x155)]['segments']===0x0&&_0x53dc39[_0x2f5d51(0x155)][_0x2f5d51(0x133)]===0x0)return console['error'](a54_0x11ea59[_0x2f5d51(0x16c)](_0x2f5d51(0x175)+_0x53dc39[_0x2f5d51(0x138)]+'\x27')),0x0;const _0x4ec405=_0x53dc39['files']['filter'](_0x5bc380=>_0x5bc380[_0x2f5d51(0x164)]),_0x3bc756=_0x53dc39['files'][_0x2f5d51(0x149)](_0x174cd5=>!_0x174cd5[_0x2f5d51(0x164)]&&_0x174cd5[_0x2f5d51(0x144)]),_0x6feef=_0x53dc39['files']['filter'](_0xf2d4b9=>!_0xf2d4b9['isNew']&&!_0xf2d4b9['hasChanges']);console['error'](_0x2f5d51(0x162)+_0x53dc39[_0x2f5d51(0x138)]+'\x27:'),console['error'](_0x2f5d51(0x15d)+a54_0x11ea59[_0x2f5d51(0x178)](_0x53dc39['counts'][_0x2f5d51(0x143)]+'\x20segments')+_0x2f5d51(0x161)+a54_0x11ea59[_0x2f5d51(0x178)](_0x53dc39[_0x2f5d51(0x155)][_0x2f5d51(0x160)]+_0x2f5d51(0x13d)));if(_0x53dc39['counts'][_0x2f5d51(0x133)]>0x0){const _0x3fb00f=_0x53dc39[_0x2f5d51(0x155)][_0x2f5d51(0x170)]>_0x53dc39['counts'][_0x2f5d51(0x133)]?'\x20('+_0x53dc39['counts'][_0x2f5d51(0x170)]+_0x2f5d51(0x145):'';console[_0x2f5d51(0x13c)](_0x2f5d51(0x154)+a54_0x11ea59['cyan'](_0x53dc39['counts'][_0x2f5d51(0x133)]+_0x2f5d51(0x16b))+a54_0x11ea59[_0x2f5d51(0x172)](_0x3fb00f));}console['error']('\x20\x20'+a54_0x11ea59[_0x2f5d51(0x136)]('+\x20'+_0x4ec405[_0x2f5d51(0x139)]+_0x2f5d51(0x137))),console[_0x2f5d51(0x13c)]('\x20\x20'+a54_0x11ea59[_0x2f5d51(0x16c)]('~\x20'+_0x3bc756[_0x2f5d51(0x139)]+_0x2f5d51(0x16a))),console['error']('\x20\x20'+a54_0x11ea59['dim']('=\x20'+_0x6feef[_0x2f5d51(0x139)]+'\x20unchanged\x20files')),console[_0x2f5d51(0x13c)]('\x20\x20Target:\x20'+a54_0x11ea59[_0x2f5d51(0x178)](_0x53dc39[_0x2f5d51(0x157)])+'\x0a');if(_0x3bc756[_0x2f5d51(0x139)]>0x0)for(const _0x5d0905 of _0x3bc756){console['error']('\x0aChanges\x20to\x20\x27'+_0x5d0905[_0x2f5d51(0x17e)]+'\x27:'),console[_0x2f5d51(0x13c)]('─'[_0x2f5d51(0x16f)](0x3c)),console[_0x2f5d51(0x13c)](_0x5d0905[_0x2f5d51(0x15f)]),console['error']('─'[_0x2f5d51(0x16f)](0x3c));}if(_0x74299[_0x2f5d51(0x13a)])return console['error'](a54_0x11ea59[_0x2f5d51(0x16c)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x4ec405[_0x2f5d51(0x139)]===0x0&&_0x3bc756[_0x2f5d51(0x139)]===0x0)return console[_0x2f5d51(0x13c)](a54_0x11ea59[_0x2f5d51(0x136)](_0x2f5d51(0x174))),saveSessionContext({'parent_segment':_0x53dc39[_0x2f5d51(0x138)]},_0x74299[_0x2f5d51(0x147)]),console[_0x2f5d51(0x13c)](a54_0x11ea59[_0x2f5d51(0x136)](_0x2f5d51(0x17c)+a54_0x11ea59[_0x2f5d51(0x172)](_0x2f5d51(0x165))+_0x2f5d51(0x158)+a54_0x11ea59[_0x2f5d51(0x178)](_0x53dc39[_0x2f5d51(0x138)]))),0x0;if(!_0x74299[_0x2f5d51(0x140)]){if(!isInteractive())return console['error'](a54_0x11ea59['red'](_0x2f5d51(0x13e)),_0x2f5d51(0x166)),console['error'](a54_0x11ea59['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x21dc8b=await confirmKey(_0x2f5d51(0x171)+(_0x4ec405[_0x2f5d51(0x139)]+_0x3bc756['length'])+_0x2f5d51(0x14c));if(!_0x21dc8b)return console[_0x2f5d51(0x13c)](a54_0x11ea59[_0x2f5d51(0x16c)](_0x2f5d51(0x134)),_0x2f5d51(0x15e)),0x1;}for(const _0x293935 of _0x53dc39['files']){if(_0x293935[_0x2f5d51(0x164)]||_0x293935[_0x2f5d51(0x144)]){const _0x3a5d9b=a54_0x3e92e7[_0x2f5d51(0x142)](_0x293935['absolutePath']);!existsSync(_0x3a5d9b)&&mkdirSync(_0x3a5d9b,{'recursive':!![]}),writeFileSync(_0x293935[_0x2f5d51(0x17d)],_0x293935['content'],'utf-8');}}return console['error'](a54_0x11ea59['green'](_0x2f5d51(0x150)+(_0x4ec405[_0x2f5d51(0x139)]+_0x3bc756[_0x2f5d51(0x139)])+_0x2f5d51(0x14d)+_0x53dc39['targetDir'])),saveSessionContext({'parent_segment':_0x53dc39[_0x2f5d51(0x138)]},_0x74299['session']),console['error'](a54_0x11ea59['green'](_0x2f5d51(0x17c)+a54_0x11ea59[_0x2f5d51(0x172)](_0x2f5d51(0x165))+'\x20=\x20'+a54_0x11ea59['cyan'](_0x53dc39['parentName']))),0x0;}}
1
+ const a51_0x50a383=a51_0x2f5c;(function(_0x43ad3f,_0xc012aa){const _0x20ecd8=a51_0x2f5c,_0x502810=_0x43ad3f();while(!![]){try{const _0xb65e34=parseInt(_0x20ecd8(0xd1))/0x1+-parseInt(_0x20ecd8(0xb7))/0x2*(parseInt(_0x20ecd8(0xbe))/0x3)+parseInt(_0x20ecd8(0xd5))/0x4+parseInt(_0x20ecd8(0xa5))/0x5+parseInt(_0x20ecd8(0xe4))/0x6+parseInt(_0x20ecd8(0xee))/0x7+parseInt(_0x20ecd8(0xb9))/0x8*(-parseInt(_0x20ecd8(0xd8))/0x9);if(_0xb65e34===_0xc012aa)break;else _0x502810['push'](_0x502810['shift']());}catch(_0x183e1e){_0x502810['push'](_0x502810['shift']());}}}(a51_0x5967,0xa48ed));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';import a51_0x25db3c from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a51_0x11dec9 from'path';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a51_0x2f5c(_0x3aa5ea,_0x404453){_0x3aa5ea=_0x3aa5ea-0x9f;const _0x596755=a51_0x5967();let _0x2f5c0d=_0x596755[_0x3aa5ea];return _0x2f5c0d;}export{buildFolderIdToPathMap as buildFolderPathMap}from'../sdk/segment/resolution-context.js';function a51_0x5967(){const _0xd0813a=['helpText','error','counts','parent_segment','relativePath','\x20files?','utf-8','cwd','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','journeys','session','errorCode','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','yes','file','site','description','files','2446FYwAML','\x20segments','isNew','\x20unchanged\x20files','2248696VrBRXw','name','\x20=\x20','84879cJmlji','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','diff','red','\x0aError:','Site:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent','length','Error:\x20','\x27...','dirname','type','3606072FKmirq','✔\x20All\x20files\x20are\x20up\x20to\x20date','\x20\x20🎯\x20','resourceName','hasChanges','segment','targetDir','message','dryRun','\x20changed\x20files','1791937OlbRYl','journeyVersions','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)','\x20files\x20to\x20','\x0aPull\x20summary\x20for\x20\x27','dim','Write\x20','filter','4345755KDvGiL','\x20versions)','\x20journeys','✔\x20Context\x20set:\x20','No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27','cyan','segments','data','✔\x20Pulled\x20','setPhase','Aborted.','segment:pull','green','\x20\x20Target:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x0aChanges\x20to\x20\x27','parentName','verbose','122IkyFiA','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','752lECRje','yellow','absolutePath','Target\x20resource:\x20','\x20\x20🗺️\x20\x20','35913fGsiae'];a51_0x5967=function(){return _0xd0813a;};return a51_0x5967();}export class SegmentPullCommand extends BaseCommand{[a51_0x50a383(0xd6)]=a51_0x50a383(0xb0);[a51_0x50a383(0xcf)]=a51_0x50a383(0xb8);async['execute'](_0x142e55){const _0x4ecb6a=a51_0x50a383,{options:_0x442903,args:_0x28ecd4,tdx:_0x28a1b5}=_0x142e55,_0x275a7c=_0x442903,_0x15ffda=await resolveTarget({'arg':_0x28ecd4[0x0],'contextParent':_0x442903['parentSegment'],'cwd':process[_0x4ecb6a(0xc6)]()});if(!isSuccessfulResolution(_0x15ffda))return _0x15ffda[_0x4ecb6a(0xca)]==='no_parent'?(console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xba)](_0x4ecb6a(0xb3))),console[_0x4ecb6a(0xc0)](_0x4ecb6a(0x9f)),console['error'](_0x4ecb6a(0xde)),console[_0x4ecb6a(0xc0)](_0x4ecb6a(0xd9))):(console['error'](a51_0x25db3c[_0x4ecb6a(0xdb)](_0x4ecb6a(0xe0)+_0x15ffda[_0x4ecb6a(0xeb)]+'\x0a')),_0x15ffda[_0x4ecb6a(0xbf)]&&console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xaa)](_0x15ffda[_0x4ecb6a(0xbf)]))),0x1;const _0x5de2b2=_0x15ffda[_0x4ecb6a(0xb5)],_0x47d74b=_0x15ffda[_0x4ecb6a(0xea)],_0x40215f=_0x15ffda[_0x4ecb6a(0xe3)]===_0x4ecb6a(0xcd)?_0x15ffda[_0x4ecb6a(0xe7)]:undefined;_0x275a7c['verbose']&&(console[_0x4ecb6a(0xc0)](_0x4ecb6a(0xdd)+_0x275a7c[_0x4ecb6a(0xce)]),console[_0x4ecb6a(0xc0)]('Parent\x20segment:\x20'+_0x5de2b2),_0x40215f&&console['error'](_0x4ecb6a(0xbc)+_0x40215f));const _0x4a64b8=await withProgressSpinner('Pulling\x20segments\x20from\x20\x27'+_0x5de2b2+_0x4ecb6a(0xe1),_0x5c6a52=>_0x28a1b5[_0x4ecb6a(0xe9)]['pullSegments'](_0x5de2b2,{'targetDir':_0x47d74b,'targetResourceName':_0x40215f,'verbose':_0x275a7c[_0x4ecb6a(0xb6)],'progress':{'update':_0x5e77c7=>{const _0x317611=_0x4ecb6a;_0x5c6a52[_0x317611(0xae)](_0x5e77c7),_0x275a7c['verbose']&&console[_0x317611(0xc0)]('\x20\x20'+_0x5e77c7);}}}),{'verbose':_0x275a7c[_0x4ecb6a(0xb6)]}),_0x395600=_0x4a64b8[_0x4ecb6a(0xac)];if(_0x395600[_0x4ecb6a(0xc1)]['segments']===0x0&&_0x395600[_0x4ecb6a(0xc1)][_0x4ecb6a(0xc8)]===0x0)return console['error'](a51_0x25db3c['yellow'](_0x4ecb6a(0xa9)+_0x395600[_0x4ecb6a(0xb5)]+'\x27')),0x0;const _0x16d966=_0x395600[_0x4ecb6a(0xd0)][_0x4ecb6a(0xa4)](_0x1f4ca2=>_0x1f4ca2[_0x4ecb6a(0xd3)]),_0x5e5028=_0x395600[_0x4ecb6a(0xd0)][_0x4ecb6a(0xa4)](_0x1e4484=>!_0x1e4484[_0x4ecb6a(0xd3)]&&_0x1e4484['hasChanges']),_0x1d9649=_0x395600['files'][_0x4ecb6a(0xa4)](_0x45a530=>!_0x45a530[_0x4ecb6a(0xd3)]&&!_0x45a530[_0x4ecb6a(0xe8)]);console[_0x4ecb6a(0xc0)](_0x4ecb6a(0xa1)+_0x395600['parentName']+'\x27:'),console['error'](_0x4ecb6a(0xe6)+a51_0x25db3c[_0x4ecb6a(0xaa)](_0x395600[_0x4ecb6a(0xc1)][_0x4ecb6a(0xab)]+_0x4ecb6a(0xd2))+'\x20with\x20'+a51_0x25db3c[_0x4ecb6a(0xaa)](_0x395600['counts']['activations']+'\x20activations'));if(_0x395600[_0x4ecb6a(0xc1)][_0x4ecb6a(0xc8)]>0x0){const _0x259603=_0x395600[_0x4ecb6a(0xc1)][_0x4ecb6a(0xef)]>_0x395600['counts'][_0x4ecb6a(0xc8)]?'\x20('+_0x395600[_0x4ecb6a(0xc1)][_0x4ecb6a(0xef)]+_0x4ecb6a(0xa6):'';console[_0x4ecb6a(0xc0)](_0x4ecb6a(0xbd)+a51_0x25db3c['cyan'](_0x395600[_0x4ecb6a(0xc1)][_0x4ecb6a(0xc8)]+_0x4ecb6a(0xa7))+a51_0x25db3c[_0x4ecb6a(0xa2)](_0x259603));}console['error']('\x20\x20'+a51_0x25db3c['green']('+\x20'+_0x16d966['length']+'\x20new\x20files')),console[_0x4ecb6a(0xc0)]('\x20\x20'+a51_0x25db3c['yellow']('~\x20'+_0x5e5028[_0x4ecb6a(0xdf)]+_0x4ecb6a(0xed))),console[_0x4ecb6a(0xc0)]('\x20\x20'+a51_0x25db3c[_0x4ecb6a(0xa2)]('=\x20'+_0x1d9649[_0x4ecb6a(0xdf)]+_0x4ecb6a(0xd4))),console['error'](_0x4ecb6a(0xb2)+a51_0x25db3c[_0x4ecb6a(0xaa)](_0x395600[_0x4ecb6a(0xea)])+'\x0a');if(_0x5e5028[_0x4ecb6a(0xdf)]>0x0)for(const _0x552b5b of _0x5e5028){console[_0x4ecb6a(0xc0)](_0x4ecb6a(0xb4)+_0x552b5b[_0x4ecb6a(0xc3)]+'\x27:'),console['error']('─'['repeat'](0x3c)),console[_0x4ecb6a(0xc0)](_0x552b5b[_0x4ecb6a(0xda)]),console[_0x4ecb6a(0xc0)]('─'['repeat'](0x3c));}if(_0x275a7c[_0x4ecb6a(0xec)])return console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xba)](_0x4ecb6a(0xcb))),0x0;if(_0x16d966['length']===0x0&&_0x5e5028[_0x4ecb6a(0xdf)]===0x0)return console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xb1)](_0x4ecb6a(0xe5))),saveSessionContext({'parent_segment':_0x395600['parentName']},_0x275a7c[_0x4ecb6a(0xc9)]),console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xb1)](_0x4ecb6a(0xa8)+a51_0x25db3c[_0x4ecb6a(0xa2)]('parent_segment')+_0x4ecb6a(0xd7)+a51_0x25db3c[_0x4ecb6a(0xaa)](_0x395600['parentName']))),0x0;if(!_0x275a7c[_0x4ecb6a(0xcc)]){if(!isInteractive())return console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xdb)](_0x4ecb6a(0xdc)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4ecb6a(0xc0)](a51_0x25db3c[_0x4ecb6a(0xa2)](_0x4ecb6a(0xc7))),0x1;const _0x3bf221=await confirmKey(_0x4ecb6a(0xa3)+(_0x16d966[_0x4ecb6a(0xdf)]+_0x5e5028[_0x4ecb6a(0xdf)])+_0x4ecb6a(0xc4));if(!_0x3bf221)return console['error'](a51_0x25db3c[_0x4ecb6a(0xba)](_0x4ecb6a(0xaf)),'-\x20no\x20files\x20written'),0x1;}for(const _0x5a7da2 of _0x395600['files']){if(_0x5a7da2[_0x4ecb6a(0xd3)]||_0x5a7da2[_0x4ecb6a(0xe8)]){const _0x3657e8=a51_0x11dec9[_0x4ecb6a(0xe2)](_0x5a7da2[_0x4ecb6a(0xbb)]);!existsSync(_0x3657e8)&&mkdirSync(_0x3657e8,{'recursive':!![]}),writeFileSync(_0x5a7da2['absolutePath'],_0x5a7da2['content'],_0x4ecb6a(0xc5));}}return console[_0x4ecb6a(0xc0)](a51_0x25db3c['green'](_0x4ecb6a(0xad)+(_0x16d966[_0x4ecb6a(0xdf)]+_0x5e5028['length'])+_0x4ecb6a(0xa0)+_0x395600[_0x4ecb6a(0xea)])),saveSessionContext({'parent_segment':_0x395600[_0x4ecb6a(0xb5)]},_0x275a7c[_0x4ecb6a(0xc9)]),console[_0x4ecb6a(0xc0)](a51_0x25db3c['green'](_0x4ecb6a(0xa8)+a51_0x25db3c[_0x4ecb6a(0xa2)](_0x4ecb6a(0xc2))+_0x4ecb6a(0xd7)+a51_0x25db3c[_0x4ecb6a(0xaa)](_0x395600[_0x4ecb6a(0xb5)]))),0x0;}}
@@ -1 +1 @@
1
- const a55_0x7b511b=a55_0x55d1;(function(_0x1bbab1,_0x43bd4c){const _0x38e27f=a55_0x55d1,_0x59826d=_0x1bbab1();while(!![]){try{const _0x163870=parseInt(_0x38e27f(0x21b))/0x1*(parseInt(_0x38e27f(0x211))/0x2)+parseInt(_0x38e27f(0x216))/0x3+parseInt(_0x38e27f(0x265))/0x4*(-parseInt(_0x38e27f(0x1f6))/0x5)+parseInt(_0x38e27f(0x205))/0x6+parseInt(_0x38e27f(0x20a))/0x7+parseInt(_0x38e27f(0x1df))/0x8*(parseInt(_0x38e27f(0x22a))/0x9)+parseInt(_0x38e27f(0x25e))/0xa*(-parseInt(_0x38e27f(0x209))/0xb);if(_0x163870===_0x43bd4c)break;else _0x59826d['push'](_0x59826d['shift']());}catch(_0x53b23e){_0x59826d['push'](_0x59826d['shift']());}}}(a55_0x317c,0xf145c));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a55_0x12f718 from'chalk';import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';function a55_0x55d1(_0xe3c7cb,_0xa44853){_0xe3c7cb=_0xe3c7cb-0x1dc;const _0x317c15=a55_0x317c();let _0x55d12a=_0x317c15[_0xe3c7cb];return _0x55d12a;}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{[a55_0x7b511b(0x271)]=a55_0x7b511b(0x253);[a55_0x7b511b(0x266)]=a55_0x7b511b(0x1e0);async['execute'](_0x5a67b8){const _0x175024=a55_0x7b511b,{options:_0x311947,args:_0x45b816,tdx:_0x5804c8}=_0x5a67b8,_0x143a9d=_0x311947,_0x2eddf4=await resolveTarget({'arg':_0x45b816[0x0],'contextParent':_0x311947[_0x175024(0x21c)],'cwd':process[_0x175024(0x21e)]()});if(!isSuccessfulResolution(_0x2eddf4))return _0x2eddf4[_0x175024(0x1f4)]===_0x175024(0x202)?(console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x218)](_0x175024(0x22c))),console[_0x175024(0x1e8)](_0x175024(0x245)),console[_0x175024(0x1e8)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent'),console['error'](_0x175024(0x21f))):(console['error'](a55_0x12f718['red'](_0x175024(0x1e5)+_0x2eddf4[_0x175024(0x1fa)]+'\x0a')),_0x2eddf4[_0x175024(0x206)]&&console[_0x175024(0x1e8)](a55_0x12f718['cyan'](_0x2eddf4['helpText']))),0x1;if(_0x2eddf4['type']===_0x175024(0x270))return console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x23b)]('Error:\x20Directory\x20not\x20found:\x20'+_0x2eddf4[_0x175024(0x1ef)]+'\x0a')),console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x20b)](_0x175024(0x210))),0x1;const _0x2869be=_0x2eddf4['parentName'],_0x3b0006=_0x2eddf4[_0x175024(0x1ef)],_0x26316a=_0x2eddf4[_0x175024(0x1e1)]===_0x175024(0x260)?_0x2eddf4[_0x175024(0x26f)]:undefined,_0x409104=getScopedDetails(_0x2eddf4),_0x21102b=_0x409104?.[_0x175024(0x24a)]??![],_0x43e80c=_0x409104?.[_0x175024(0x249)]??'';if(!existsSync(_0x3b0006))return console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x23b)]('Error:\x20Directory\x20not\x20found:\x20'+_0x3b0006+'\x0a')),console['error'](a55_0x12f718['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;_0x143a9d[_0x175024(0x1e2)]&&(console[_0x175024(0x1e8)](_0x175024(0x1e7)+_0x143a9d['site']),console[_0x175024(0x1e8)]('Parent\x20segment:\x20'+_0x2869be),console[_0x175024(0x1e8)](_0x175024(0x238)+_0x3b0006),_0x21102b&&console[_0x175024(0x1e8)](_0x175024(0x26a)+_0x43e80c));const _0x53127a=await withSpinner(_0x175024(0x1fc)+_0x2869be+_0x175024(0x25f),()=>_0x5804c8[_0x175024(0x262)]['resolveParentId'](_0x2869be),{'verbose':_0x143a9d[_0x175024(0x1e2)]}),_0x25a2cd=_0x53127a[_0x175024(0x277)],{parentSegmentResult:_0x3c8040,segmentsResult:_0x498db8,foldersResult:_0x3c48dc,journeysWithDetailsResult:_0x4ec7c1,userMaps:_0x3173d3}=await withSpinner('Fetching\x20existing\x20data...',async()=>{const _0x286eb0=_0x175024,[_0xb82e5a,_0x82b754,_0x317f06,_0x54062d,_0x37f0ba]=await Promise[_0x286eb0(0x23f)]([_0x5804c8[_0x286eb0(0x262)][_0x286eb0(0x200)](_0x25a2cd),_0x5804c8['segment']['listSegments'](_0x25a2cd),_0x5804c8[_0x286eb0(0x262)][_0x286eb0(0x208)](_0x25a2cd),_0x5804c8[_0x286eb0(0x234)][_0x286eb0(0x214)](_0x25a2cd,{'includeAllVersions':!![]}),_0x5804c8[_0x286eb0(0x22f)][_0x286eb0(0x25d)]()]);return{'parentSegmentResult':_0xb82e5a,'segmentsResult':_0x82b754,'foldersResult':_0x317f06,'journeysWithDetailsResult':_0x54062d,'userMaps':_0x37f0ba};},{'verbose':_0x143a9d['verbose']})[_0x175024(0x272)](_0x1d0198=>_0x1d0198[_0x175024(0x277)]),_0x11d20d=_0x3c8040,_0x1c92a9=extractRootFolderId(_0x11d20d),_0x5af5bd=_0x498db8,_0x1cb598=_0x3c48dc,{journeys:_0x217888,activationStepsById:_0x14c417}=_0x4ec7c1,_0x4118f8=new Map(_0x217888['map'](_0x1ecff2=>[_0x1ecff2['id'],_0x1ecff2])),_0x2e9f11=_0x217888[_0x175024(0x212)](_0x3f3e98=>({'id':_0x3f3e98['id'],'name':_0x3f3e98['attributes']['name'],'journeyBundleName':_0x3f3e98[_0x175024(0x268)][_0x175024(0x1f3)]||'','journeyBundleId':_0x3f3e98[_0x175024(0x268)][_0x175024(0x25b)]||'','versionNumber':_0x3f3e98[_0x175024(0x268)]['versionNumber'],'description':_0x3f3e98[_0x175024(0x268)][_0x175024(0x266)],'state':_0x3f3e98[_0x175024(0x268)][_0x175024(0x1eb)],'paused':_0x3f3e98[_0x175024(0x268)][_0x175024(0x25c)],'audienceId':_0x3f3e98[_0x175024(0x268)][_0x175024(0x215)],'folderId':_0x3f3e98[_0x175024(0x246)]?.[_0x175024(0x222)]?.['data']?.['id'],'createdAt':_0x3f3e98['attributes']['createdAt'],'updatedAt':_0x3f3e98[_0x175024(0x268)][_0x175024(0x226)]})),{emailToId:_0x275c87,idToEmail:_0x131eff}=_0x3173d3,_0x50dec2=await withSpinner(_0x175024(0x225),async()=>{const _0x441a0d=_0x175024,_0x238d07=await _0x5804c8[_0x441a0d(0x23a)][_0x441a0d(0x263)]();return buildConnectionMaps(_0x238d07);},{'verbose':_0x143a9d[_0x175024(0x1e2)]})['then'](_0x38ad30=>_0x38ad30['data']),_0x479330=_0x50dec2[_0x175024(0x269)],_0x3d4431=_0x50dec2[_0x175024(0x1de)],_0x352f11=_0x50dec2[_0x175024(0x228)],_0x20ab22={'emailToIdMap':_0x275c87,'connectionNameToIdMap':_0x479330,'connectionNameToTypeMap':_0x352f11,'getSchema':_0x1bd4a9=>_0x5804c8[_0x175024(0x23a)][_0x175024(0x24b)](_0x1bd4a9),'getMetadata':_0x21f16c=>_0x5804c8['connection']['getMetadataWithCache'](_0x21f16c)};let {pathToId:_0x1d475f,idToPath:_0x2a8e8e}=buildFolderMaps(_0x1cb598);const _0x28c596=buildSegmentLookupMap(_0x5af5bd,_0x2a8e8e),_0x538d21=buildSegmentNameToIdMap(_0x5af5bd),_0x1fa2ac=buildJourneyBundleLookupMap(_0x2e9f11,_0x2a8e8e);let _0x2fb20b;if(_0x26316a){if(!_0x26316a['endsWith'](_0x175024(0x221))&&!_0x26316a[_0x175024(0x240)](_0x175024(0x213)))return console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x23b)](_0x175024(0x248)+_0x26316a+'\x0a')),0x1;_0x2fb20b=[_0x26316a];}else _0x2fb20b=findYamlFiles(_0x3b0006);if(_0x2fb20b['length']===0x0)return console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x23b)](_0x175024(0x267)+_0x3b0006+'\x0a')),console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x20b)](_0x175024(0x279))),0x1;let _0x518cb6,_0x26a88c;try{const _0x3fe462=parseAndClassifyYamlFiles(_0x2fb20b,_0x3b0006,{'skipSegments':_0x143a9d[_0x175024(0x237)]});_0x518cb6=_0x3fe462[_0x175024(0x235)],_0x26a88c=_0x3fe462[_0x175024(0x1dc)];const _0x1a5311=validateParsedFiles(_0x3fe462,_0x3b0006);if(_0x1a5311[_0x175024(0x224)]>0x0)return console[_0x175024(0x1e8)](a55_0x12f718['red']('\x0aValidation\x20failed:')),console[_0x175024(0x1e8)](formatValidationErrors(_0x1a5311)),console[_0x175024(0x1e8)](a55_0x12f718['yellow'](_0x175024(0x1e9))),0x1;}catch(_0x3ebff1){return console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x23b)](_0x175024(0x274)+(_0x3ebff1 instanceof Error?_0x3ebff1[_0x175024(0x1fa)]:_0x3ebff1))),0x1;}if(_0x518cb6['length']===0x0&&_0x26a88c[_0x175024(0x224)]===0x0){const _0x34ca38=_0x143a9d['journeysOnly']?'journey':_0x175024(0x252);return console[_0x175024(0x1e8)](a55_0x12f718['yellow'](_0x175024(0x1ed)+_0x34ca38+_0x175024(0x26d))),0x0;}const _0x36692c=new Map();_0x5af5bd[_0x175024(0x224)]>0x0&&!_0x143a9d['journeysOnly']&&await withSpinner(_0x175024(0x1fe),async()=>{await batchAsync(_0x5af5bd,async _0x1e66ca=>{const _0x305e0f=a55_0x55d1,_0x50e098=await _0x5804c8['segment'][_0x305e0f(0x22e)](_0x25a2cd,_0x1e66ca['id']);_0x36692c['set'](_0x1e66ca['id'],_0x50e098);});},{'verbose':_0x143a9d[_0x175024(0x1e2)]});const {segmentFiles:_0xea7a00,foldersToCreate:_0x2b549e}=await prepareSegmentFiles(_0x518cb6,{'segmentByFolderAndName':_0x28c596,'activationsBySegmentId':_0x36692c,'folderPathToId':_0x1d475f,'idToEmailMap':_0x131eff,'connectionIdToNameMap':_0x3d4431},_0x20ab22,_0x21102b,_0x43e80c),_0x46c021=_0x26316a?[]:findSegmentsToDelete(_0x5af5bd,_0x518cb6[_0x175024(0x212)](({yamlConfig:_0x3bcc3c,folderPath:_0x4ec712})=>({'yamlConfig':_0x3bcc3c,'folderPath':resolveTDFolderPath(_0x4ec712,_0x21102b,_0x43e80c)})),_0x2a8e8e,_0x43e80c,_0x21102b),{journeyFiles:_0x4d4d95,foldersToCreate:_0x530955}=await withProgressSpinner(_0x175024(0x26c),async _0xa92db8=>prepareJourneyFiles(_0x26a88c,{'fetchJourney':async _0x1249fe=>_0x5804c8[_0x175024(0x234)][_0x175024(0x23d)](_0x1249fe[_0x175024(0x244)]),'journeyBundlesByFolderAndName':_0x1fa2ac,'folderPathToId':_0x1d475f,'idToEmailMap':_0x131eff,'connectionIdToNameMap':_0x3d4431,'existingSegments':_0x5af5bd,'parentId':_0x25a2cd,'deps':_0x5804c8,'progress':{'update':_0x87fcbb=>{const _0x22e9db=_0x175024;_0xa92db8[_0x22e9db(0x258)](_0x87fcbb),_0x143a9d[_0x22e9db(0x1e2)]&&console[_0x22e9db(0x1e8)]('\x20\x20'+_0x87fcbb);}},'journeyById':_0x4118f8,'activationStepsById':_0x14c417},_0x21102b,_0x43e80c),{'verbose':_0x143a9d[_0x175024(0x1e2)]})[_0x175024(0x272)](_0x7cb77b=>_0x7cb77b['data']);for(const _0x522882 of _0x530955){_0x2b549e['add'](_0x522882);}const _0x512ea5=_0x26316a?[]:findJourneysToDelete(_0x2e9f11,_0x26a88c[_0x175024(0x212)](({yamlConfig:_0x596043,folderPath:_0x483271})=>({'yamlConfig':_0x596043,'folderPath':resolveTDFolderPath(_0x483271,_0x21102b,_0x43e80c)})),_0x2a8e8e,_0x43e80c,_0x21102b),_0x340315=calculatePushStats(_0xea7a00,_0x4d4d95,_0x2b549e,_0x46c021,_0x512ea5,!!_0x143a9d[_0x175024(0x257)],!!_0x143a9d[_0x175024(0x237)]),_0x33353f=_0x340315[_0x175024(0x235)][_0x175024(0x250)],_0x1ae4d4=_0x340315['segments']['changed'],_0x51e345=_0x340315[_0x175024(0x235)][_0x175024(0x223)],_0x112f69=_0x340315['segments']['toDelete'],_0x5bad2a=_0x340315[_0x175024(0x25a)][_0x175024(0x204)],_0x56a825=_0x340315[_0x175024(0x1dc)][_0x175024(0x250)],_0x3f1c9e=_0x340315[_0x175024(0x1dc)]['changed'],_0x1dfe8e=_0x340315['journeys'][_0x175024(0x223)],_0x59ec30=_0x340315[_0x175024(0x1dc)][_0x175024(0x20c)],_0x27f159=_0x340315[_0x175024(0x276)][_0x175024(0x23f)],_0x457b25=_0x340315[_0x175024(0x276)][_0x175024(0x204)],_0x3accea=_0x340315[_0x175024(0x276)][_0x175024(0x278)],_0x33fc28=_0x340315['activations']['toDelete'];console[_0x175024(0x1e8)](_0x175024(0x247)+_0x2869be+'\x27:');_0x5bad2a[_0x175024(0x224)]>0x0&&console[_0x175024(0x1e8)]('\x20\x20'+a55_0x12f718[_0x175024(0x256)](_0x175024(0x275)+_0x5bad2a[_0x175024(0x224)]+_0x175024(0x22d)));if(!_0x143a9d['journeysOnly']){console['error']('\x20\x20📊\x20Segments:'),console['error'](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x264)]('+\x20'+_0x33353f[_0x175024(0x224)]+_0x175024(0x24f))),console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x218)]('~\x20'+_0x1ae4d4[_0x175024(0x224)]+_0x175024(0x1f1)));if(_0x112f69[_0x175024(0x224)]>0x0)console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x23b)]('-\x20'+_0x112f69[_0x175024(0x224)]+_0x175024(0x24c)));else _0x46c021[_0x175024(0x224)]>0x0&&!_0x143a9d[_0x175024(0x257)]&&console['error'](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x1f5)](_0x46c021['length']+_0x175024(0x236)));console['error'](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x1f5)]('=\x20'+_0x51e345[_0x175024(0x224)]+_0x175024(0x26e)));}if(_0x4d4d95[_0x175024(0x224)]>0x0||_0x512ea5[_0x175024(0x224)]>0x0){console[_0x175024(0x1e8)](_0x175024(0x1fb)),console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718['green']('+\x20'+_0x56a825[_0x175024(0x224)]+'\x20new')),console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x218)]('~\x20'+_0x3f1c9e[_0x175024(0x224)]+_0x175024(0x1f1)));if(_0x59ec30['length']>0x0)console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x23b)]('-\x20'+_0x59ec30['length']+_0x175024(0x24c)));else _0x512ea5[_0x175024(0x224)]>0x0&&!_0x143a9d[_0x175024(0x257)]&&console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x1f5)](_0x512ea5[_0x175024(0x224)]+'\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)'));console['error'](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x1f5)]('=\x20'+_0x1dfe8e['length']+_0x175024(0x26e)));}_0x27f159[_0x175024(0x224)]>0x0&&!_0x143a9d[_0x175024(0x237)]&&(console[_0x175024(0x1e8)](''),console[_0x175024(0x1e8)]('\x20\x20Activations:'),_0x457b25[_0x175024(0x224)]>0x0&&console['error'](_0x175024(0x1f8)+a55_0x12f718[_0x175024(0x264)]('+\x20'+_0x457b25[_0x175024(0x224)]+'\x20to\x20create')),_0x3accea[_0x175024(0x224)]>0x0&&console[_0x175024(0x1e8)]('\x20\x20\x20\x20'+a55_0x12f718[_0x175024(0x218)]('~\x20'+_0x3accea[_0x175024(0x224)]+_0x175024(0x21a))),_0x33fc28[_0x175024(0x224)]>0x0&&console[_0x175024(0x1e8)](_0x175024(0x1f8)+a55_0x12f718['red']('-\x20'+_0x33fc28[_0x175024(0x224)]+_0x175024(0x24c))));console[_0x175024(0x1e8)](_0x175024(0x261)+a55_0x12f718['cyan'](_0x3b0006)+'\x0a');if(_0x5bad2a[_0x175024(0x224)]>0x0){console['error'](_0x175024(0x243));for(const _0x5262f6 of _0x5bad2a){console['error']('\x20\x20'+a55_0x12f718['blue']('+')+'\x20'+_0x5262f6);}console[_0x175024(0x1e8)]('');}if(_0x33353f[_0x175024(0x224)]>0x0&&!_0x143a9d[_0x175024(0x237)])for(const _0x29437d of _0x33353f){const _0x2f11b7=_0x29437d['folderPath']?_0x29437d[_0x175024(0x1ee)]+'/'+_0x29437d[_0x175024(0x273)][_0x175024(0x271)]:_0x29437d[_0x175024(0x273)][_0x175024(0x271)],_0x144c02=_0x29437d[_0x175024(0x273)][_0x175024(0x276)]?.[_0x175024(0x224)]||0x0,_0x208b1c=_0x144c02>0x0?a55_0x12f718[_0x175024(0x1f5)]('\x20['+_0x144c02+_0x175024(0x233)):'';console[_0x175024(0x1e8)]('\x0a'+a55_0x12f718[_0x175024(0x264)]('New\x20segment:')+'\x20'+_0x2f11b7+_0x208b1c),console[_0x175024(0x1e8)]('─'[_0x175024(0x217)](0x3c)),_0x29437d['diff']&&console[_0x175024(0x1e8)](_0x29437d[_0x175024(0x1f0)]),console['error']('─'[_0x175024(0x217)](0x3c));}if(_0x112f69[_0x175024(0x224)]>0x0&&!_0x143a9d[_0x175024(0x237)])for(const _0x69485c of _0x112f69){const _0x1acc2f=_0x69485c['segmentFolderId']?_0x2a8e8e['get'](_0x69485c['segmentFolderId'][_0x175024(0x1e6)]())||'':'',_0x444e47=_0x1acc2f?_0x1acc2f+'/'+_0x69485c['name']:_0x69485c[_0x175024(0x271)],_0x4be3a2=_0x36692c['get'](_0x69485c['id'])||[],_0x1d3fee=_0x4be3a2['length']>0x0?a55_0x12f718[_0x175024(0x1f5)]('\x20['+_0x4be3a2[_0x175024(0x224)]+_0x175024(0x233)):'';console['error']('\x0a'+a55_0x12f718[_0x175024(0x23b)](_0x175024(0x1ff))+'\x20'+_0x444e47+_0x1d3fee),console[_0x175024(0x1e8)]('─'[_0x175024(0x217)](0x3c));const _0x4ea129=segmentWithActivationsToYaml(_0x69485c,_0x4be3a2,undefined,_0x131eff,_0x3d4431),_0x422e4c=segmentToYamlString(_0x4ea129),_0x3b0fb9=generateDiff(_0x422e4c,'');console['error'](formatDiffWithColors(_0x3b0fb9)),console['error']('─'[_0x175024(0x217)](0x3c));}const _0x2502d8=_0xea7a00[_0x175024(0x1e3)](_0x1981ce=>!_0x1981ce[_0x175024(0x23c)]&&_0x1981ce[_0x175024(0x1f0)]);if(_0x2502d8['length']>0x0&&!_0x143a9d['journeysOnly'])for(const _0x4b269e of _0x2502d8){const _0x35f883=_0x4b269e[_0x175024(0x1ee)]?_0x4b269e['folderPath']+'/'+_0x4b269e[_0x175024(0x273)][_0x175024(0x271)]:_0x4b269e['yamlConfig'][_0x175024(0x271)];console['error']('\x0a'+a55_0x12f718[_0x175024(0x218)]('Changes\x20to:')+'\x20'+_0x35f883),console[_0x175024(0x1e8)]('─'['repeat'](0x3c)),console[_0x175024(0x1e8)](_0x4b269e[_0x175024(0x1f0)]),console['error']('─'['repeat'](0x3c));}if(_0x56a825[_0x175024(0x224)]>0x0)for(const _0x3ccddb of _0x56a825){const _0x553304=_0x3ccddb[_0x175024(0x1ee)]?_0x3ccddb['folderPath']+'/'+_0x3ccddb[_0x175024(0x273)][_0x175024(0x271)]:_0x3ccddb[_0x175024(0x273)][_0x175024(0x271)];console['error']('\x0a'+a55_0x12f718[_0x175024(0x264)]('New\x20journey:')+'\x20'+_0x553304),console['error']('─'[_0x175024(0x217)](0x3c)),_0x3ccddb[_0x175024(0x1f0)]&&console[_0x175024(0x1e8)](_0x3ccddb['diff']),console[_0x175024(0x1e8)]('─'[_0x175024(0x217)](0x3c));}const _0x307189=_0x4d4d95[_0x175024(0x1e3)](_0x42f744=>!_0x42f744['isNew']&&_0x42f744[_0x175024(0x1f0)]);if(_0x307189[_0x175024(0x224)]>0x0)for(const _0x3e4f9a of _0x307189){const _0x2f8dfc=_0x3e4f9a[_0x175024(0x1ee)]?_0x3e4f9a['folderPath']+'/'+_0x3e4f9a[_0x175024(0x273)][_0x175024(0x271)]:_0x3e4f9a[_0x175024(0x273)][_0x175024(0x271)];console['error']('\x0a'+a55_0x12f718['yellow']('Changes\x20to\x20journey:')+'\x20'+_0x2f8dfc),console[_0x175024(0x1e8)]('─'[_0x175024(0x217)](0x3c)),console[_0x175024(0x1e8)](_0x3e4f9a[_0x175024(0x1f0)]),console['error']('─'[_0x175024(0x217)](0x3c));}if(_0x59ec30[_0x175024(0x224)]>0x0)for(const _0x19f586 of _0x59ec30){const _0x2889ae=_0x19f586[_0x175024(0x230)]?_0x2a8e8e['get'](_0x19f586[_0x175024(0x230)])||'':'',_0x19cd28=_0x2889ae?_0x2889ae+'/'+_0x19f586[_0x175024(0x1f3)]:_0x19f586[_0x175024(0x1f3)];console[_0x175024(0x1e8)]('\x0a'+a55_0x12f718[_0x175024(0x23b)](_0x175024(0x22b))+'\x20'+_0x19cd28),console[_0x175024(0x1e8)]('─'['repeat'](0x3c)),console['error'](a55_0x12f718[_0x175024(0x23b)](_0x175024(0x239))),console[_0x175024(0x1e8)]('─'[_0x175024(0x217)](0x3c));}if(_0x143a9d['dryRun'])return console['error'](a55_0x12f718[_0x175024(0x218)](_0x175024(0x1ea))),0x0;const _0x1ad57d=_0x143a9d[_0x175024(0x237)]?![]:_0x33353f[_0x175024(0x224)]>0x0||_0x1ae4d4[_0x175024(0x224)]>0x0||_0x112f69[_0x175024(0x224)]>0x0,_0x186d27=_0x56a825[_0x175024(0x224)]>0x0||_0x3f1c9e['length']>0x0||_0x59ec30[_0x175024(0x224)]>0x0,_0x213a5a=_0x143a9d[_0x175024(0x237)]?![]:_0x27f159[_0x175024(0x224)]>0x0,_0x438dfc=_0x5bad2a[_0x175024(0x224)]>0x0;if(!_0x1ad57d&&!_0x186d27&&!_0x213a5a&&!_0x438dfc){const _0x376d22=_0x143a9d[_0x175024(0x237)]?_0x175024(0x1ec):'✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date';console[_0x175024(0x1e8)](a55_0x12f718['green'](_0x376d22));if(_0x26316a&&_0x51e345[_0x175024(0x224)]===0x1){const _0x5505da=_0x51e345[0x0];if(_0x5505da[_0x175024(0x231)]?.['id']){const _0xe7dcdb=getConsoleNextUrl(_0x143a9d['site'],_0x175024(0x207)+_0x25a2cd+'/e/'+_0x5505da[_0x175024(0x231)]['id']+'/sb/da/esr');console[_0x175024(0x1e8)](_0x175024(0x20d)+a55_0x12f718['cyan'](_0xe7dcdb));}}if(_0x26316a&&_0x1dfe8e['length']===0x1){const _0x586182=_0x1dfe8e[0x0];if(_0x586182[_0x175024(0x1dd)]?.['id']){const _0x324b02=getConsoleNextUrl(_0x143a9d[_0x175024(0x26b)],_0x175024(0x207)+_0x25a2cd+_0x175024(0x227)+_0x586182['existingJourney']['id']+'/j/da/je');console[_0x175024(0x1e8)]('\x20\x20'+a55_0x12f718[_0x175024(0x20b)](_0x324b02));}}return 0x0;}const _0x3df1c4=_0x143a9d['journeysOnly']?_0x56a825[_0x175024(0x224)]+_0x3f1c9e['length']+_0x59ec30[_0x175024(0x224)]+_0x5bad2a[_0x175024(0x224)]:_0x33353f[_0x175024(0x224)]+_0x1ae4d4[_0x175024(0x224)]+_0x112f69[_0x175024(0x224)]+_0x56a825[_0x175024(0x224)]+_0x3f1c9e[_0x175024(0x224)]+_0x59ec30['length']+_0x5bad2a['length']+_0x27f159[_0x175024(0x224)];if(!_0x143a9d[_0x175024(0x1e4)]&&_0x3df1c4>0x0){if(!isInteractive())return console['error'](a55_0x12f718['red'](_0x175024(0x1f7)),_0x175024(0x254)),console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x1f5)](_0x175024(0x203))),0x1;const _0x4d6500=await confirmKey(_0x175024(0x255)+_0x3df1c4+_0x175024(0x20f));if(!_0x4d6500)return console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x218)](_0x175024(0x232))),0x1;}const _0x4da282={'withProgress':async(_0x458c2e,_0x18a846)=>{const _0x438627=_0x175024,_0x1ec54a=await withSpinner(_0x458c2e,_0x18a846,{'verbose':_0x143a9d[_0x438627(0x1e2)]});return{'data':_0x1ec54a[_0x438627(0x277)]};},'logInfo':_0x5544f3=>console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x256)]('✔\x20'+_0x5544f3)),'logSuccess':_0xdd8d3=>console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x264)]('✔\x20'+_0xdd8d3)),'logWarning':_0x3446d4=>console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x218)]('⚠\x20'+_0x3446d4)),'logDeleted':_0xdf8d09=>console[_0x175024(0x1e8)](a55_0x12f718[_0x175024(0x23b)]('✔\x20'+_0xdf8d09))},_0x256056={'segment':_0x5804c8[_0x175024(0x262)],'journey':_0x5804c8['journey'],'user':_0x5804c8[_0x175024(0x22f)],'connection':_0x5804c8[_0x175024(0x23a)]};_0x5bad2a[_0x175024(0x224)]>0x0&&(_0x1d475f=await executePushFolders(_0x256056,_0x5bad2a,_0x1d475f,{'parentId':_0x25a2cd},_0x4da282));const _0x102cd2={'rootFolderId':_0x1c92a9,'folderPathToId':_0x1d475f,'folderIdToPath':_0x2a8e8e,'segmentNameToId':_0x538d21,'activationsBySegmentId':_0x36692c,'emailToIdMap':_0x275c87,'idToEmailMap':_0x131eff,'connectionNameToIdMap':_0x50dec2[_0x175024(0x269)],'connectionIdToNameMap':_0x50dec2[_0x175024(0x1de)],'connectionNameToTypeMap':_0x352f11},_0x27ddd9=await executePushSegments(_0x256056,_0x143a9d[_0x175024(0x237)]?[]:_0xea7a00,_0x102cd2,{'parentId':_0x25a2cd},_0x4da282),_0x8452fb=_0x27ddd9[_0x175024(0x21d)],_0x2d5ef2=_0x27ddd9['updated'],_0x57c9f3=_0x27ddd9[_0x175024(0x276)][_0x175024(0x21d)],_0x2df9fe=_0x27ddd9[_0x175024(0x276)]['updated'],_0x32e30=_0x27ddd9[_0x175024(0x276)]['deleted'];let _0x798477;if(_0x26316a&&_0xea7a00[_0x175024(0x224)]===0x1){const _0x1c25d2=_0xea7a00[0x0];_0x798477=_0x1c25d2[_0x175024(0x231)]?.['id']??_0x27ddd9[_0x175024(0x1f9)]['get'](_0x1c25d2[_0x175024(0x273)][_0x175024(0x271)]);}const _0x277885=await executePushSegmentDeletions(_0x256056,_0x143a9d[_0x175024(0x237)]?[]:_0x112f69,_0x4da282);let _0x42cca3=0x0,_0xb7a30=0x0,_0x45a9a1=0x0;const _0x1eaf22=new Map(_0x538d21);for(const [_0x375e92,_0xb6895f]of _0x27ddd9[_0x175024(0x1f9)]){_0x1eaf22[_0x175024(0x241)](_0x375e92,_0xb6895f);}if(_0x4d4d95[_0x175024(0x224)]>0x0){const _0x396309={..._0x102cd2,'segmentNameToId':_0x1eaf22,'existingSegments':_0x5af5bd,'activationContext':_0x20ab22},_0x5bd1b2=await executePushJourneys(_0x256056,_0x4d4d95,_0x396309,{'parentId':_0x25a2cd,'rootFolderId':_0x1c92a9,'verbose':_0x143a9d['verbose']},_0x4da282);_0x42cca3=_0x5bd1b2[_0x175024(0x21d)],_0xb7a30=_0x5bd1b2[_0x175024(0x242)];if(_0x26316a&&_0x5bd1b2[_0x175024(0x229)][_0x175024(0x224)]===0x1){const _0x4c454f=_0x5bd1b2['results'][0x0];if(_0x4c454f[_0x175024(0x244)]){const _0xd867eb=getConsoleNextUrl(_0x143a9d[_0x175024(0x26b)],_0x175024(0x207)+_0x25a2cd+'/e/'+_0x4c454f[_0x175024(0x244)]+_0x175024(0x259));console[_0x175024(0x1e8)]('\x20\x20'+a55_0x12f718[_0x175024(0x20b)](_0xd867eb));}}}for(const _0x49541a of _0x59ec30){console['error'](a55_0x12f718['yellow'](_0x175024(0x251)+_0x49541a['journeyBundleName'])),_0x45a9a1++;}const _0x2d7b64=[];if(_0x8452fb>0x0)_0x2d7b64[_0x175024(0x20e)](_0x8452fb+_0x175024(0x220));if(_0x2d5ef2>0x0)_0x2d7b64[_0x175024(0x20e)](_0x2d5ef2+'\x20updated');if(_0x277885>0x0)_0x2d7b64[_0x175024(0x20e)](_0x277885+_0x175024(0x1fd));const _0x49f934=[];if(_0x42cca3>0x0)_0x49f934[_0x175024(0x20e)](_0x42cca3+'\x20created');if(_0xb7a30>0x0)_0x49f934[_0x175024(0x20e)](_0xb7a30+_0x175024(0x1f2));if(_0x45a9a1>0x0)_0x49f934['push'](_0x45a9a1+_0x175024(0x1fd));const _0x223a97=[];if(_0x57c9f3>0x0)_0x223a97[_0x175024(0x20e)](_0x57c9f3+'\x20created');if(_0x2df9fe>0x0)_0x223a97[_0x175024(0x20e)](_0x2df9fe+'\x20updated');if(_0x32e30>0x0)_0x223a97['push'](_0x32e30+_0x175024(0x1fd));console['error'](a55_0x12f718[_0x175024(0x264)](_0x175024(0x24e)));_0x2d7b64[_0x175024(0x224)]>0x0&&!_0x143a9d[_0x175024(0x237)]&&console[_0x175024(0x1e8)]('\x20\x20Segments:\x20'+_0x2d7b64[_0x175024(0x24d)](',\x20'));_0x49f934[_0x175024(0x224)]>0x0&&console[_0x175024(0x1e8)](_0x175024(0x201)+_0x49f934['join'](',\x20'));_0x223a97['length']>0x0&&!_0x143a9d[_0x175024(0x237)]&&console[_0x175024(0x1e8)](_0x175024(0x219)+_0x223a97['join'](',\x20'));if(_0x798477){const _0x2c7b10=getConsoleNextUrl(_0x143a9d[_0x175024(0x26b)],_0x175024(0x207)+_0x25a2cd+_0x175024(0x227)+_0x798477+_0x175024(0x23e));console[_0x175024(0x1e8)](_0x175024(0x20d)+a55_0x12f718[_0x175024(0x20b)](_0x2c7b10));}return 0x0;}}function a55_0x317c(){const _0x47a14f=['listJourneysWithDetailsFromParentSegment','audienceId','4497522wVrjXn','repeat','yellow','\x20\x20Activations:\x20','\x20to\x20update','3254CfYVBu','parentSegment','created','cwd','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','\x20created','.yml','parentFolder','unchanged','length','Fetching\x20connections\x20for\x20name\x20resolution...','updatedAt','/e/','nameToType','results','63wzyYhY','Delete\x20journey:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20folders\x20to\x20create','listActivations','user','folderId','existingSegment','Aborted.','\x20activations]','journey','segments','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','journeysOnly','Source\x20directory:\x20','(Journey\x20will\x20be\x20deleted)','connection','red','isNew','getJourney','/sb/da/esr','all','endsWith','set','updated','Folders\x20to\x20create:','journeyId','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)','relationships','\x0aPush\x20summary\x20for\x20\x27','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','scopedFolderPath','isScoped','getOutputSchemaWithCache','\x20to\x20delete','join','\x0a✔\x20Push\x20complete','\x20new','new','⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20','segment\x20or\x20journey','segment:push','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Push\x20','blue','delete','setPhase','/j/da/je','folders','journeyBundleId','paused','buildUserMaps','17482610SqubPD','\x27...','file','\x20\x20Source:\x20','segment','list','green','834512ShKHpl','description','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','attributes','nameToId','Scoped\x20to\x20folder:\x20','site','Preparing\x20journeys...','\x20YAML\x20files\x20found','\x20unchanged','filePath','parent_name','name','then','yamlConfig','Error\x20parsing\x20YAML:\x20','📁\x20','activations','data','toUpdate','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','journeys','existingJourney','idToName','1630744IGrqNi','Push\x20YAML\x20files\x20to\x20Treasure\x20AI\x20as\x20child\x20segments','type','verbose','filter','yes','Error:\x20','toString','Site:\x20','error','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','state','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','No\x20','folderPath','targetDir','diff','\x20changed','\x20updated','journeyBundleName','errorCode','dim','25fVzADu','\x0aError:','\x20\x20\x20\x20','createdSegmentIds','message','\x20\x20🗺️\x20\x20Journeys:','Resolving\x20parent\x20segment\x20\x27','\x20deleted','Fetching\x20existing\x20activations...','Delete\x20segment:','getParent','\x20\x20Journeys:\x20','no_parent','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','toCreate','4817358YstzLa','helpText','/app/ps/','listFolders','33WGixKj','13373115WUOEVu','cyan','toDelete','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','push','\x20changes?','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','1006gBWeaH','map','.yaml'];a55_0x317c=function(){return _0x47a14f;};return a55_0x317c();}
1
+ const a52_0x4946d0=a52_0x3930;(function(_0x44cac5,_0x13bfc3){const _0x761298=a52_0x3930,_0xe3a8b2=_0x44cac5();while(!![]){try{const _0x325e02=parseInt(_0x761298(0x23c))/0x1+parseInt(_0x761298(0x1f3))/0x2*(parseInt(_0x761298(0x1ea))/0x3)+-parseInt(_0x761298(0x216))/0x4+parseInt(_0x761298(0x204))/0x5*(-parseInt(_0x761298(0x1f9))/0x6)+-parseInt(_0x761298(0x1ff))/0x7+-parseInt(_0x761298(0x261))/0x8*(parseInt(_0x761298(0x200))/0x9)+parseInt(_0x761298(0x1f6))/0xa;if(_0x325e02===_0x13bfc3)break;else _0xe3a8b2['push'](_0xe3a8b2['shift']());}catch(_0x37eed4){_0xe3a8b2['push'](_0xe3a8b2['shift']());}}}(a52_0x25e0,0xc92e8));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';function a52_0x25e0(){const _0x567a5a=['segment','cwd','folderPath','message','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','existingJourney','join','verbose','Folders\x20to\x20create:','targetDir','Site:\x20','all','\x0aError:','dryRun','journeyId','452790eKhwxF','(Journey\x20will\x20be\x20deleted)','journeysOnly','file','journey','\x20\x20Segments:\x20','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','\x20to\x20update','journeyBundleName','Changes\x20to:','\x20updated','Push\x20YAML\x20files\x20to\x20Treasure\x20AI\x20as\x20child\x20segments','\x20to\x20create','helpText','\x20created','get','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','connection','New\x20segment:','/app/ps/','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','diff','\x20new','\x20YAML\x20files\x20found','type','parentSegment','/sb/da/esr','then','listJourneysWithDetailsFromParentSegment','segments','isScoped','segmentFolderId','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','yellow','toDelete','\x20\x20\x20\x20','\x20deleted','40YpUfNC','filePath','\x20unchanged','versionNumber','attributes','yamlConfig','Error:\x20','delete','map','push','Push\x20','updated','deleted','isNew','updatedAt','Fetching\x20connections\x20for\x20name\x20resolution...','/j/da/je','created','Source\x20directory:\x20','site','data','\x20\x20Source:\x20','yes','journeys','red','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','changed','Error:\x20Directory\x20not\x20found:\x20','cyan','filter','blue','unchanged','3nwcIor','/e/','.yaml','buildUserMaps','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','errorCode','createdSegmentIds','new','\x20activations]','1675502EcJVWK','listFolders','repeat','26455660lplRET','execute','user','1806Cxyubl','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','parentFolder','Scoped\x20to\x20folder:\x20','set','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','5292231BjotYc','1236033gmDgye','idToName','no_parent','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','5150JpBeZG','No\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','📁\x20','dim','setPhase','name','\x0a✔\x20Push\x20complete','length','segment\x20or\x20journey','\x20to\x20delete','nameToId','green','Delete\x20segment:','add','folderId','Fetching\x20existing\x20data...','Preparing\x20journeys...','5437276LsmdMN','\x20changes?','segment:push','existingSegment','resolveParentId','activations','error','description','toUpdate','New\x20journey:','getJourney','\x20changed','toCreate','Resolving\x20parent\x20segment\x20\x27','⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20','\x20\x20🗺️\x20\x20Journeys:','parentName','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','scopedFolderPath','\x20\x20Journeys:\x20','getOutputSchemaWithCache','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)','toString'];a52_0x25e0=function(){return _0x567a5a;};return a52_0x25e0();}import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';function a52_0x3930(_0x4729a5,_0xb3b4a3){_0x4729a5=_0x4729a5-0x1e5;const _0x25e078=a52_0x25e0();let _0x39306e=_0x25e078[_0x4729a5];return _0x39306e;}import a52_0x2f8db5 from'chalk';import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{[a52_0x4946d0(0x20a)]=a52_0x4946d0(0x218);[a52_0x4946d0(0x21d)]=a52_0x4946d0(0x247);async[a52_0x4946d0(0x1f7)](_0x3cd72c){const _0x33d88c=a52_0x4946d0,{options:_0x750770,args:_0x42f9cb,tdx:_0x50e418}=_0x3cd72c,_0x345596=_0x750770,_0x2c4385=await resolveTarget({'arg':_0x42f9cb[0x0],'contextParent':_0x750770[_0x33d88c(0x255)],'cwd':process[_0x33d88c(0x22e)]()});if(!isSuccessfulResolution(_0x2c4385))return _0x2c4385[_0x33d88c(0x1ef)]===_0x33d88c(0x202)?(console['error'](a52_0x2f8db5[_0x33d88c(0x25d)](_0x33d88c(0x206))),console['error'](_0x33d88c(0x22b)),console['error'](_0x33d88c(0x203)),console[_0x33d88c(0x21c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file')):(console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x279)](_0x33d88c(0x267)+_0x2c4385[_0x33d88c(0x230)]+'\x0a')),_0x2c4385[_0x33d88c(0x249)]&&console['error'](a52_0x2f8db5[_0x33d88c(0x1e6)](_0x2c4385['helpText']))),0x1;if(_0x2c4385[_0x33d88c(0x254)]==='parent_name')return console['error'](a52_0x2f8db5[_0x33d88c(0x279)]('Error:\x20Directory\x20not\x20found:\x20'+_0x2c4385[_0x33d88c(0x236)]+'\x0a')),console['error'](a52_0x2f8db5[_0x33d88c(0x1e6)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;const _0x4306ba=_0x2c4385[_0x33d88c(0x226)],_0x5afb57=_0x2c4385[_0x33d88c(0x236)],_0x3a9731=_0x2c4385[_0x33d88c(0x254)]===_0x33d88c(0x23f)?_0x2c4385[_0x33d88c(0x262)]:undefined,_0xb593b6=getScopedDetails(_0x2c4385),_0x4b3aba=_0xb593b6?.[_0x33d88c(0x25a)]??![],_0x3fbcdc=_0xb593b6?.[_0x33d88c(0x228)]??'';if(!existsSync(_0x5afb57))return console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x279)](_0x33d88c(0x1e5)+_0x5afb57+'\x0a')),console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x1e6)](_0x33d88c(0x231))),0x1;_0x345596[_0x33d88c(0x234)]&&(console[_0x33d88c(0x21c)](_0x33d88c(0x237)+_0x345596['site']),console['error']('Parent\x20segment:\x20'+_0x4306ba),console[_0x33d88c(0x21c)](_0x33d88c(0x273)+_0x5afb57),_0x4b3aba&&console[_0x33d88c(0x21c)](_0x33d88c(0x1fc)+_0x3fbcdc));const _0x9a14=await withSpinner(_0x33d88c(0x223)+_0x4306ba+'\x27...',()=>_0x50e418[_0x33d88c(0x22d)][_0x33d88c(0x21a)](_0x4306ba),{'verbose':_0x345596['verbose']}),_0x532d8d=_0x9a14[_0x33d88c(0x275)],{parentSegmentResult:_0x5da3ae,segmentsResult:_0x376257,foldersResult:_0x2254e1,journeysWithDetailsResult:_0x302630,userMaps:_0x1af188}=await withSpinner(_0x33d88c(0x214),async()=>{const _0x4cdca2=_0x33d88c,[_0x2817be,_0x578dfb,_0x5318cc,_0x1cf41d,_0x4e2eb9]=await Promise[_0x4cdca2(0x238)]([_0x50e418[_0x4cdca2(0x22d)]['getParent'](_0x532d8d),_0x50e418['segment']['listSegments'](_0x532d8d),_0x50e418[_0x4cdca2(0x22d)][_0x4cdca2(0x1f4)](_0x532d8d),_0x50e418[_0x4cdca2(0x240)][_0x4cdca2(0x258)](_0x532d8d,{'includeAllVersions':!![]}),_0x50e418[_0x4cdca2(0x1f8)][_0x4cdca2(0x1ed)]()]);return{'parentSegmentResult':_0x2817be,'segmentsResult':_0x578dfb,'foldersResult':_0x5318cc,'journeysWithDetailsResult':_0x1cf41d,'userMaps':_0x4e2eb9};},{'verbose':_0x345596['verbose']})['then'](_0x94ce82=>_0x94ce82[_0x33d88c(0x275)]),_0xcfafb9=_0x5da3ae,_0x5618a3=extractRootFolderId(_0xcfafb9),_0x93f52e=_0x376257,_0x3b84d4=_0x2254e1,{journeys:_0x696c9a,activationStepsById:_0x4fce47}=_0x302630,_0x316acc=new Map(_0x696c9a['map'](_0x37eaf0=>[_0x37eaf0['id'],_0x37eaf0])),_0x723458=_0x696c9a[_0x33d88c(0x269)](_0x473565=>({'id':_0x473565['id'],'name':_0x473565[_0x33d88c(0x265)][_0x33d88c(0x20a)],'journeyBundleName':_0x473565[_0x33d88c(0x265)][_0x33d88c(0x244)]||'','journeyBundleId':_0x473565['attributes']['journeyBundleId']||'','versionNumber':_0x473565[_0x33d88c(0x265)][_0x33d88c(0x264)],'description':_0x473565[_0x33d88c(0x265)][_0x33d88c(0x21d)],'state':_0x473565[_0x33d88c(0x265)]['state'],'paused':_0x473565['attributes']['paused'],'audienceId':_0x473565['attributes']['audienceId'],'folderId':_0x473565['relationships']?.[_0x33d88c(0x1fb)]?.[_0x33d88c(0x275)]?.['id'],'createdAt':_0x473565[_0x33d88c(0x265)]['createdAt'],'updatedAt':_0x473565[_0x33d88c(0x265)][_0x33d88c(0x26f)]})),{emailToId:_0x3e96b3,idToEmail:_0x3c280e}=_0x1af188,_0x398a92=await withSpinner(_0x33d88c(0x270),async()=>{const _0x326e7a=_0x33d88c,_0x347430=await _0x50e418[_0x326e7a(0x24d)]['list']();return buildConnectionMaps(_0x347430);},{'verbose':_0x345596['verbose']})[_0x33d88c(0x257)](_0x59a9af=>_0x59a9af[_0x33d88c(0x275)]),_0x1ef5f6=_0x398a92[_0x33d88c(0x20f)],_0x23b1f1=_0x398a92[_0x33d88c(0x201)],_0x3976a5=_0x398a92['nameToType'],_0x16ad55={'emailToIdMap':_0x3e96b3,'connectionNameToIdMap':_0x1ef5f6,'connectionNameToTypeMap':_0x3976a5,'getSchema':_0x31b791=>_0x50e418[_0x33d88c(0x24d)][_0x33d88c(0x22a)](_0x31b791),'getMetadata':_0xfeb156=>_0x50e418[_0x33d88c(0x24d)]['getMetadataWithCache'](_0xfeb156)};let {pathToId:_0x1c0b3c,idToPath:_0x4d3994}=buildFolderMaps(_0x3b84d4);const _0x369375=buildSegmentLookupMap(_0x93f52e,_0x4d3994),_0x3bb902=buildSegmentNameToIdMap(_0x93f52e),_0x20bd45=buildJourneyBundleLookupMap(_0x723458,_0x4d3994);let _0xa2b9fe;if(_0x3a9731){if(!_0x3a9731['endsWith']('.yml')&&!_0x3a9731['endsWith'](_0x33d88c(0x1ec)))return console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x279)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x3a9731+'\x0a')),0x1;_0xa2b9fe=[_0x3a9731];}else _0xa2b9fe=findYamlFiles(_0x5afb57);if(_0xa2b9fe[_0x33d88c(0x20c)]===0x0)return console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x279)](_0x33d88c(0x27a)+_0x5afb57+'\x0a')),console[_0x33d88c(0x21c)](a52_0x2f8db5['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files')),0x1;let _0x3b9c75,_0x1cb4f9;try{const _0xe89228=parseAndClassifyYamlFiles(_0xa2b9fe,_0x5afb57,{'skipSegments':_0x345596[_0x33d88c(0x23e)]});_0x3b9c75=_0xe89228[_0x33d88c(0x259)],_0x1cb4f9=_0xe89228['journeys'];const _0x20c936=validateParsedFiles(_0xe89228,_0x5afb57);if(_0x20c936[_0x33d88c(0x20c)]>0x0)return console['error'](a52_0x2f8db5[_0x33d88c(0x279)]('\x0aValidation\x20failed:')),console[_0x33d88c(0x21c)](formatValidationErrors(_0x20c936)),console[_0x33d88c(0x21c)](a52_0x2f8db5['yellow'](_0x33d88c(0x242))),0x1;}catch(_0x57a649){return console['error'](a52_0x2f8db5[_0x33d88c(0x279)]('Error\x20parsing\x20YAML:\x20'+(_0x57a649 instanceof Error?_0x57a649[_0x33d88c(0x230)]:_0x57a649))),0x1;}if(_0x3b9c75[_0x33d88c(0x20c)]===0x0&&_0x1cb4f9['length']===0x0){const _0x3764e2=_0x345596[_0x33d88c(0x23e)]?_0x33d88c(0x240):_0x33d88c(0x20d);return console[_0x33d88c(0x21c)](a52_0x2f8db5['yellow'](_0x33d88c(0x205)+_0x3764e2+_0x33d88c(0x253))),0x0;}const _0x38264e=new Map();_0x93f52e['length']>0x0&&!_0x345596[_0x33d88c(0x23e)]&&await withSpinner('Fetching\x20existing\x20activations...',async()=>{await batchAsync(_0x93f52e,async _0x301a0b=>{const _0x152356=a52_0x3930,_0x5ab760=await _0x50e418[_0x152356(0x22d)]['listActivations'](_0x532d8d,_0x301a0b['id']);_0x38264e['set'](_0x301a0b['id'],_0x5ab760);});},{'verbose':_0x345596[_0x33d88c(0x234)]});const {segmentFiles:_0x59e85e,foldersToCreate:_0x5128dc}=await prepareSegmentFiles(_0x3b9c75,{'segmentByFolderAndName':_0x369375,'activationsBySegmentId':_0x38264e,'folderPathToId':_0x1c0b3c,'idToEmailMap':_0x3c280e,'connectionIdToNameMap':_0x23b1f1},_0x16ad55,_0x4b3aba,_0x3fbcdc),_0x3634bf=_0x3a9731?[]:findSegmentsToDelete(_0x93f52e,_0x3b9c75[_0x33d88c(0x269)](({yamlConfig:_0x4bcff8,folderPath:_0x22137d})=>({'yamlConfig':_0x4bcff8,'folderPath':resolveTDFolderPath(_0x22137d,_0x4b3aba,_0x3fbcdc)})),_0x4d3994,_0x3fbcdc,_0x4b3aba),{journeyFiles:_0x294c1c,foldersToCreate:_0x11dbb3}=await withProgressSpinner(_0x33d88c(0x215),async _0x39a656=>prepareJourneyFiles(_0x1cb4f9,{'fetchJourney':async _0x220173=>_0x50e418['journey'][_0x33d88c(0x220)](_0x220173[_0x33d88c(0x23b)]),'journeyBundlesByFolderAndName':_0x20bd45,'folderPathToId':_0x1c0b3c,'idToEmailMap':_0x3c280e,'connectionIdToNameMap':_0x23b1f1,'existingSegments':_0x93f52e,'parentId':_0x532d8d,'deps':_0x50e418,'progress':{'update':_0x1d3da3=>{const _0x287524=_0x33d88c;_0x39a656[_0x287524(0x209)](_0x1d3da3),_0x345596[_0x287524(0x234)]&&console[_0x287524(0x21c)]('\x20\x20'+_0x1d3da3);}},'journeyById':_0x316acc,'activationStepsById':_0x4fce47},_0x4b3aba,_0x3fbcdc),{'verbose':_0x345596[_0x33d88c(0x234)]})[_0x33d88c(0x257)](_0x4c62aa=>_0x4c62aa[_0x33d88c(0x275)]);for(const _0x36321e of _0x11dbb3){_0x5128dc[_0x33d88c(0x212)](_0x36321e);}const _0x3a052c=_0x3a9731?[]:findJourneysToDelete(_0x723458,_0x1cb4f9[_0x33d88c(0x269)](({yamlConfig:_0x16bdc6,folderPath:_0x404072})=>({'yamlConfig':_0x16bdc6,'folderPath':resolveTDFolderPath(_0x404072,_0x4b3aba,_0x3fbcdc)})),_0x4d3994,_0x3fbcdc,_0x4b3aba),_0xac2713=calculatePushStats(_0x59e85e,_0x294c1c,_0x5128dc,_0x3634bf,_0x3a052c,!!_0x345596[_0x33d88c(0x268)],!!_0x345596[_0x33d88c(0x23e)]),_0x25221a=_0xac2713[_0x33d88c(0x259)]['new'],_0x5e80fb=_0xac2713[_0x33d88c(0x259)][_0x33d88c(0x27b)],_0x43b0b1=_0xac2713['segments'][_0x33d88c(0x1e9)],_0x15dc6f=_0xac2713[_0x33d88c(0x259)][_0x33d88c(0x25e)],_0xbcc080=_0xac2713['folders'][_0x33d88c(0x222)],_0xa690e4=_0xac2713['journeys'][_0x33d88c(0x1f1)],_0x985060=_0xac2713[_0x33d88c(0x278)]['changed'],_0x10ce27=_0xac2713[_0x33d88c(0x278)][_0x33d88c(0x1e9)],_0x410797=_0xac2713[_0x33d88c(0x278)]['toDelete'],_0x3b236c=_0xac2713[_0x33d88c(0x21b)][_0x33d88c(0x238)],_0x39ac69=_0xac2713[_0x33d88c(0x21b)][_0x33d88c(0x222)],_0x4edf32=_0xac2713[_0x33d88c(0x21b)][_0x33d88c(0x21e)],_0x4d09a1=_0xac2713[_0x33d88c(0x21b)][_0x33d88c(0x25e)];console[_0x33d88c(0x21c)]('\x0aPush\x20summary\x20for\x20\x27'+_0x4306ba+'\x27:');_0xbcc080[_0x33d88c(0x20c)]>0x0&&console[_0x33d88c(0x21c)]('\x20\x20'+a52_0x2f8db5['blue'](_0x33d88c(0x207)+_0xbcc080[_0x33d88c(0x20c)]+'\x20folders\x20to\x20create'));if(!_0x345596[_0x33d88c(0x23e)]){console[_0x33d88c(0x21c)]('\x20\x20📊\x20Segments:'),console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x210)]('+\x20'+_0x25221a[_0x33d88c(0x20c)]+_0x33d88c(0x252))),console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x25d)]('~\x20'+_0x5e80fb[_0x33d88c(0x20c)]+_0x33d88c(0x221)));if(_0x15dc6f[_0x33d88c(0x20c)]>0x0)console['error']('\x20\x20\x20\x20'+a52_0x2f8db5[_0x33d88c(0x279)]('-\x20'+_0x15dc6f[_0x33d88c(0x20c)]+_0x33d88c(0x20e)));else _0x3634bf[_0x33d88c(0x20c)]>0x0&&!_0x345596[_0x33d88c(0x268)]&&console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x208)](_0x3634bf[_0x33d88c(0x20c)]+_0x33d88c(0x1fa)));console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x208)]('=\x20'+_0x43b0b1[_0x33d88c(0x20c)]+_0x33d88c(0x263)));}if(_0x294c1c[_0x33d88c(0x20c)]>0x0||_0x3a052c[_0x33d88c(0x20c)]>0x0){console[_0x33d88c(0x21c)](_0x33d88c(0x225)),console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x210)]('+\x20'+_0xa690e4['length']+_0x33d88c(0x252))),console[_0x33d88c(0x21c)]('\x20\x20\x20\x20'+a52_0x2f8db5[_0x33d88c(0x25d)]('~\x20'+_0x985060['length']+_0x33d88c(0x221)));if(_0x410797[_0x33d88c(0x20c)]>0x0)console[_0x33d88c(0x21c)]('\x20\x20\x20\x20'+a52_0x2f8db5[_0x33d88c(0x279)]('-\x20'+_0x410797[_0x33d88c(0x20c)]+_0x33d88c(0x20e)));else _0x3a052c[_0x33d88c(0x20c)]>0x0&&!_0x345596[_0x33d88c(0x268)]&&console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x208)](_0x3a052c[_0x33d88c(0x20c)]+_0x33d88c(0x1fa)));console['error'](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x208)]('=\x20'+_0x10ce27[_0x33d88c(0x20c)]+'\x20unchanged'));}_0x3b236c[_0x33d88c(0x20c)]>0x0&&!_0x345596['journeysOnly']&&(console[_0x33d88c(0x21c)](''),console[_0x33d88c(0x21c)]('\x20\x20Activations:'),_0x39ac69[_0x33d88c(0x20c)]>0x0&&console[_0x33d88c(0x21c)](_0x33d88c(0x25f)+a52_0x2f8db5[_0x33d88c(0x210)]('+\x20'+_0x39ac69[_0x33d88c(0x20c)]+_0x33d88c(0x248))),_0x4edf32['length']>0x0&&console[_0x33d88c(0x21c)]('\x20\x20\x20\x20'+a52_0x2f8db5[_0x33d88c(0x25d)]('~\x20'+_0x4edf32[_0x33d88c(0x20c)]+_0x33d88c(0x243))),_0x4d09a1['length']>0x0&&console['error'](_0x33d88c(0x25f)+a52_0x2f8db5['red']('-\x20'+_0x4d09a1[_0x33d88c(0x20c)]+_0x33d88c(0x20e))));console['error'](_0x33d88c(0x276)+a52_0x2f8db5[_0x33d88c(0x1e6)](_0x5afb57)+'\x0a');if(_0xbcc080[_0x33d88c(0x20c)]>0x0){console['error'](_0x33d88c(0x235));for(const _0x138724 of _0xbcc080){console[_0x33d88c(0x21c)]('\x20\x20'+a52_0x2f8db5[_0x33d88c(0x1e8)]('+')+'\x20'+_0x138724);}console['error']('');}if(_0x25221a['length']>0x0&&!_0x345596[_0x33d88c(0x23e)])for(const _0x3f1df9 of _0x25221a){const _0x558c1a=_0x3f1df9[_0x33d88c(0x22f)]?_0x3f1df9[_0x33d88c(0x22f)]+'/'+_0x3f1df9[_0x33d88c(0x266)]['name']:_0x3f1df9[_0x33d88c(0x266)][_0x33d88c(0x20a)],_0x20af3a=_0x3f1df9[_0x33d88c(0x266)][_0x33d88c(0x21b)]?.[_0x33d88c(0x20c)]||0x0,_0x3ad460=_0x20af3a>0x0?a52_0x2f8db5['dim']('\x20['+_0x20af3a+_0x33d88c(0x1f2)):'';console[_0x33d88c(0x21c)]('\x0a'+a52_0x2f8db5[_0x33d88c(0x210)](_0x33d88c(0x24e))+'\x20'+_0x558c1a+_0x3ad460),console['error']('─'[_0x33d88c(0x1f5)](0x3c)),_0x3f1df9[_0x33d88c(0x251)]&&console[_0x33d88c(0x21c)](_0x3f1df9[_0x33d88c(0x251)]),console[_0x33d88c(0x21c)]('─'[_0x33d88c(0x1f5)](0x3c));}if(_0x15dc6f[_0x33d88c(0x20c)]>0x0&&!_0x345596[_0x33d88c(0x23e)])for(const _0x2e56ec of _0x15dc6f){const _0x18e699=_0x2e56ec[_0x33d88c(0x25b)]?_0x4d3994['get'](_0x2e56ec['segmentFolderId'][_0x33d88c(0x22c)]())||'':'',_0x58e2e4=_0x18e699?_0x18e699+'/'+_0x2e56ec[_0x33d88c(0x20a)]:_0x2e56ec[_0x33d88c(0x20a)],_0x4712ec=_0x38264e[_0x33d88c(0x24b)](_0x2e56ec['id'])||[],_0x1d313d=_0x4712ec[_0x33d88c(0x20c)]>0x0?a52_0x2f8db5[_0x33d88c(0x208)]('\x20['+_0x4712ec[_0x33d88c(0x20c)]+_0x33d88c(0x1f2)):'';console[_0x33d88c(0x21c)]('\x0a'+a52_0x2f8db5['red'](_0x33d88c(0x211))+'\x20'+_0x58e2e4+_0x1d313d),console['error']('─'[_0x33d88c(0x1f5)](0x3c));const _0x12c1cb=segmentWithActivationsToYaml(_0x2e56ec,_0x4712ec,undefined,_0x3c280e,_0x23b1f1),_0x50e7aa=segmentToYamlString(_0x12c1cb),_0x52fac7=generateDiff(_0x50e7aa,'');console[_0x33d88c(0x21c)](formatDiffWithColors(_0x52fac7)),console[_0x33d88c(0x21c)]('─'['repeat'](0x3c));}const _0x544d29=_0x59e85e[_0x33d88c(0x1e7)](_0x137843=>!_0x137843[_0x33d88c(0x26e)]&&_0x137843[_0x33d88c(0x251)]);if(_0x544d29[_0x33d88c(0x20c)]>0x0&&!_0x345596['journeysOnly'])for(const _0x5a922f of _0x544d29){const _0x42066c=_0x5a922f['folderPath']?_0x5a922f[_0x33d88c(0x22f)]+'/'+_0x5a922f['yamlConfig'][_0x33d88c(0x20a)]:_0x5a922f[_0x33d88c(0x266)][_0x33d88c(0x20a)];console[_0x33d88c(0x21c)]('\x0a'+a52_0x2f8db5[_0x33d88c(0x25d)](_0x33d88c(0x245))+'\x20'+_0x42066c),console[_0x33d88c(0x21c)]('─'['repeat'](0x3c)),console['error'](_0x5a922f[_0x33d88c(0x251)]),console[_0x33d88c(0x21c)]('─'[_0x33d88c(0x1f5)](0x3c));}if(_0xa690e4[_0x33d88c(0x20c)]>0x0)for(const _0x30eeba of _0xa690e4){const _0xbf6815=_0x30eeba['folderPath']?_0x30eeba[_0x33d88c(0x22f)]+'/'+_0x30eeba[_0x33d88c(0x266)][_0x33d88c(0x20a)]:_0x30eeba[_0x33d88c(0x266)][_0x33d88c(0x20a)];console[_0x33d88c(0x21c)]('\x0a'+a52_0x2f8db5[_0x33d88c(0x210)](_0x33d88c(0x21f))+'\x20'+_0xbf6815),console['error']('─'[_0x33d88c(0x1f5)](0x3c)),_0x30eeba[_0x33d88c(0x251)]&&console['error'](_0x30eeba[_0x33d88c(0x251)]),console[_0x33d88c(0x21c)]('─'['repeat'](0x3c));}const _0x353aec=_0x294c1c[_0x33d88c(0x1e7)](_0x211754=>!_0x211754[_0x33d88c(0x26e)]&&_0x211754[_0x33d88c(0x251)]);if(_0x353aec[_0x33d88c(0x20c)]>0x0)for(const _0x1e9694 of _0x353aec){const _0x1981b6=_0x1e9694[_0x33d88c(0x22f)]?_0x1e9694[_0x33d88c(0x22f)]+'/'+_0x1e9694['yamlConfig'][_0x33d88c(0x20a)]:_0x1e9694[_0x33d88c(0x266)][_0x33d88c(0x20a)];console[_0x33d88c(0x21c)]('\x0a'+a52_0x2f8db5[_0x33d88c(0x25d)]('Changes\x20to\x20journey:')+'\x20'+_0x1981b6),console['error']('─'[_0x33d88c(0x1f5)](0x3c)),console[_0x33d88c(0x21c)](_0x1e9694[_0x33d88c(0x251)]),console[_0x33d88c(0x21c)]('─'['repeat'](0x3c));}if(_0x410797[_0x33d88c(0x20c)]>0x0)for(const _0x30fa35 of _0x410797){const _0x355218=_0x30fa35[_0x33d88c(0x213)]?_0x4d3994[_0x33d88c(0x24b)](_0x30fa35[_0x33d88c(0x213)])||'':'',_0x1148c0=_0x355218?_0x355218+'/'+_0x30fa35['journeyBundleName']:_0x30fa35[_0x33d88c(0x244)];console[_0x33d88c(0x21c)]('\x0a'+a52_0x2f8db5[_0x33d88c(0x279)]('Delete\x20journey:')+'\x20'+_0x1148c0),console[_0x33d88c(0x21c)]('─'[_0x33d88c(0x1f5)](0x3c)),console[_0x33d88c(0x21c)](a52_0x2f8db5['red'](_0x33d88c(0x23d))),console[_0x33d88c(0x21c)]('─'[_0x33d88c(0x1f5)](0x3c));}if(_0x345596[_0x33d88c(0x23a)])return console['error'](a52_0x2f8db5['yellow'](_0x33d88c(0x24c))),0x0;const _0x45bb66=_0x345596[_0x33d88c(0x23e)]?![]:_0x25221a[_0x33d88c(0x20c)]>0x0||_0x5e80fb[_0x33d88c(0x20c)]>0x0||_0x15dc6f['length']>0x0,_0x2ec3ec=_0xa690e4['length']>0x0||_0x985060[_0x33d88c(0x20c)]>0x0||_0x410797[_0x33d88c(0x20c)]>0x0,_0x308eef=_0x345596[_0x33d88c(0x23e)]?![]:_0x3b236c['length']>0x0,_0x2add8c=_0xbcc080[_0x33d88c(0x20c)]>0x0;if(!_0x45bb66&&!_0x2ec3ec&&!_0x308eef&&!_0x2add8c){const _0x3a4744=_0x345596[_0x33d88c(0x23e)]?_0x33d88c(0x227):_0x33d88c(0x1fe);console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x210)](_0x3a4744));if(_0x3a9731&&_0x43b0b1['length']===0x1){const _0x16bac3=_0x43b0b1[0x0];if(_0x16bac3[_0x33d88c(0x219)]?.['id']){const _0x41935c=getConsoleNextUrl(_0x345596[_0x33d88c(0x274)],_0x33d88c(0x24f)+_0x532d8d+_0x33d88c(0x1eb)+_0x16bac3[_0x33d88c(0x219)]['id']+_0x33d88c(0x256));console['error'](_0x33d88c(0x1ee)+a52_0x2f8db5['cyan'](_0x41935c));}}if(_0x3a9731&&_0x10ce27[_0x33d88c(0x20c)]===0x1){const _0x218973=_0x10ce27[0x0];if(_0x218973[_0x33d88c(0x232)]?.['id']){const _0x30d807=getConsoleNextUrl(_0x345596[_0x33d88c(0x274)],_0x33d88c(0x24f)+_0x532d8d+_0x33d88c(0x1eb)+_0x218973[_0x33d88c(0x232)]['id']+_0x33d88c(0x271));console[_0x33d88c(0x21c)]('\x20\x20'+a52_0x2f8db5[_0x33d88c(0x1e6)](_0x30d807));}}return 0x0;}const _0x3b4bd5=_0x345596['journeysOnly']?_0xa690e4[_0x33d88c(0x20c)]+_0x985060[_0x33d88c(0x20c)]+_0x410797[_0x33d88c(0x20c)]+_0xbcc080['length']:_0x25221a[_0x33d88c(0x20c)]+_0x5e80fb[_0x33d88c(0x20c)]+_0x15dc6f[_0x33d88c(0x20c)]+_0xa690e4[_0x33d88c(0x20c)]+_0x985060[_0x33d88c(0x20c)]+_0x410797[_0x33d88c(0x20c)]+_0xbcc080['length']+_0x3b236c[_0x33d88c(0x20c)];if(!_0x345596[_0x33d88c(0x277)]&&_0x3b4bd5>0x0){if(!isInteractive())return console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x279)](_0x33d88c(0x239)),_0x33d88c(0x25c)),console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x208)](_0x33d88c(0x250))),0x1;const _0x1cedfd=await confirmKey(_0x33d88c(0x26b)+_0x3b4bd5+_0x33d88c(0x217));if(!_0x1cedfd)return console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x25d)]('Aborted.')),0x1;}const _0x3b20c8={'withProgress':async(_0x53b249,_0xf31476)=>{const _0x862fb0=_0x33d88c,_0x8dcae1=await withSpinner(_0x53b249,_0xf31476,{'verbose':_0x345596[_0x862fb0(0x234)]});return{'data':_0x8dcae1['data']};},'logInfo':_0x3c5cba=>console[_0x33d88c(0x21c)](a52_0x2f8db5['blue']('✔\x20'+_0x3c5cba)),'logSuccess':_0x4d0fb2=>console['error'](a52_0x2f8db5[_0x33d88c(0x210)]('✔\x20'+_0x4d0fb2)),'logWarning':_0x406dd1=>console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x25d)]('⚠\x20'+_0x406dd1)),'logDeleted':_0x2cbf79=>console['error'](a52_0x2f8db5[_0x33d88c(0x279)]('✔\x20'+_0x2cbf79))},_0x159917={'segment':_0x50e418[_0x33d88c(0x22d)],'journey':_0x50e418[_0x33d88c(0x240)],'user':_0x50e418[_0x33d88c(0x1f8)],'connection':_0x50e418[_0x33d88c(0x24d)]};_0xbcc080[_0x33d88c(0x20c)]>0x0&&(_0x1c0b3c=await executePushFolders(_0x159917,_0xbcc080,_0x1c0b3c,{'parentId':_0x532d8d},_0x3b20c8));const _0x34cff9={'rootFolderId':_0x5618a3,'folderPathToId':_0x1c0b3c,'folderIdToPath':_0x4d3994,'segmentNameToId':_0x3bb902,'activationsBySegmentId':_0x38264e,'emailToIdMap':_0x3e96b3,'idToEmailMap':_0x3c280e,'connectionNameToIdMap':_0x398a92['nameToId'],'connectionIdToNameMap':_0x398a92[_0x33d88c(0x201)],'connectionNameToTypeMap':_0x3976a5},_0x9a18cb=await executePushSegments(_0x159917,_0x345596['journeysOnly']?[]:_0x59e85e,_0x34cff9,{'parentId':_0x532d8d},_0x3b20c8),_0xce9450=_0x9a18cb[_0x33d88c(0x272)],_0x1b3bc9=_0x9a18cb[_0x33d88c(0x26c)],_0x2dd46d=_0x9a18cb[_0x33d88c(0x21b)][_0x33d88c(0x272)],_0x1ac6e4=_0x9a18cb[_0x33d88c(0x21b)]['updated'],_0x12193b=_0x9a18cb[_0x33d88c(0x21b)][_0x33d88c(0x26d)];let _0x5d0b49;if(_0x3a9731&&_0x59e85e[_0x33d88c(0x20c)]===0x1){const _0x49a798=_0x59e85e[0x0];_0x5d0b49=_0x49a798[_0x33d88c(0x219)]?.['id']??_0x9a18cb[_0x33d88c(0x1f0)][_0x33d88c(0x24b)](_0x49a798[_0x33d88c(0x266)][_0x33d88c(0x20a)]);}const _0x4db1f2=await executePushSegmentDeletions(_0x159917,_0x345596[_0x33d88c(0x23e)]?[]:_0x15dc6f,_0x3b20c8);let _0x2c0ff2=0x0,_0x27e786=0x0,_0x28cd17=0x0;const _0x4c52b7=new Map(_0x3bb902);for(const [_0x44543f,_0x1ef501]of _0x9a18cb[_0x33d88c(0x1f0)]){_0x4c52b7[_0x33d88c(0x1fd)](_0x44543f,_0x1ef501);}if(_0x294c1c[_0x33d88c(0x20c)]>0x0){const _0x293711={..._0x34cff9,'segmentNameToId':_0x4c52b7,'existingSegments':_0x93f52e,'activationContext':_0x16ad55},_0x5a4985=await executePushJourneys(_0x159917,_0x294c1c,_0x293711,{'parentId':_0x532d8d,'rootFolderId':_0x5618a3,'verbose':_0x345596[_0x33d88c(0x234)]},_0x3b20c8);_0x2c0ff2=_0x5a4985[_0x33d88c(0x272)],_0x27e786=_0x5a4985['updated'];if(_0x3a9731&&_0x5a4985['results'][_0x33d88c(0x20c)]===0x1){const _0x261997=_0x5a4985['results'][0x0];if(_0x261997[_0x33d88c(0x23b)]){const _0x151765=getConsoleNextUrl(_0x345596[_0x33d88c(0x274)],_0x33d88c(0x24f)+_0x532d8d+_0x33d88c(0x1eb)+_0x261997['journeyId']+_0x33d88c(0x271));console[_0x33d88c(0x21c)]('\x20\x20'+a52_0x2f8db5['cyan'](_0x151765));}}}for(const _0x330a29 of _0x410797){console['error'](a52_0x2f8db5[_0x33d88c(0x25d)](_0x33d88c(0x224)+_0x330a29[_0x33d88c(0x244)])),_0x28cd17++;}const _0x2d3234=[];if(_0xce9450>0x0)_0x2d3234['push'](_0xce9450+_0x33d88c(0x24a));if(_0x1b3bc9>0x0)_0x2d3234[_0x33d88c(0x26a)](_0x1b3bc9+_0x33d88c(0x246));if(_0x4db1f2>0x0)_0x2d3234[_0x33d88c(0x26a)](_0x4db1f2+_0x33d88c(0x260));const _0x5afd74=[];if(_0x2c0ff2>0x0)_0x5afd74[_0x33d88c(0x26a)](_0x2c0ff2+'\x20created');if(_0x27e786>0x0)_0x5afd74[_0x33d88c(0x26a)](_0x27e786+_0x33d88c(0x246));if(_0x28cd17>0x0)_0x5afd74[_0x33d88c(0x26a)](_0x28cd17+_0x33d88c(0x260));const _0x2d17c6=[];if(_0x2dd46d>0x0)_0x2d17c6[_0x33d88c(0x26a)](_0x2dd46d+_0x33d88c(0x24a));if(_0x1ac6e4>0x0)_0x2d17c6[_0x33d88c(0x26a)](_0x1ac6e4+'\x20updated');if(_0x12193b>0x0)_0x2d17c6[_0x33d88c(0x26a)](_0x12193b+'\x20deleted');console[_0x33d88c(0x21c)](a52_0x2f8db5[_0x33d88c(0x210)](_0x33d88c(0x20b)));_0x2d3234['length']>0x0&&!_0x345596[_0x33d88c(0x23e)]&&console[_0x33d88c(0x21c)](_0x33d88c(0x241)+_0x2d3234[_0x33d88c(0x233)](',\x20'));_0x5afd74['length']>0x0&&console[_0x33d88c(0x21c)](_0x33d88c(0x229)+_0x5afd74['join'](',\x20'));_0x2d17c6[_0x33d88c(0x20c)]>0x0&&!_0x345596[_0x33d88c(0x23e)]&&console[_0x33d88c(0x21c)]('\x20\x20Activations:\x20'+_0x2d17c6['join'](',\x20'));if(_0x5d0b49){const _0x42a55b=getConsoleNextUrl(_0x345596[_0x33d88c(0x274)],_0x33d88c(0x24f)+_0x532d8d+_0x33d88c(0x1eb)+_0x5d0b49+'/sb/da/esr');console['error'](_0x33d88c(0x1ee)+a52_0x2f8db5[_0x33d88c(0x1e6)](_0x42a55b));}return 0x0;}}
@@ -1 +1 @@
1
- (function(_0x33f997,_0x451bbe){const _0x4c0384=a56_0x522e,_0xf0c9ed=_0x33f997();while(!![]){try{const _0x247b68=-parseInt(_0x4c0384(0x1b6))/0x1+-parseInt(_0x4c0384(0x1c5))/0x2+-parseInt(_0x4c0384(0x1a7))/0x3*(parseInt(_0x4c0384(0x1c3))/0x4)+-parseInt(_0x4c0384(0x1b9))/0x5*(parseInt(_0x4c0384(0x1a4))/0x6)+-parseInt(_0x4c0384(0x1a0))/0x7*(-parseInt(_0x4c0384(0x1a1))/0x8)+-parseInt(_0x4c0384(0x1b4))/0x9*(parseInt(_0x4c0384(0x1b7))/0xa)+parseInt(_0x4c0384(0x1b2))/0xb;if(_0x247b68===_0x451bbe)break;else _0xf0c9ed['push'](_0xf0c9ed['shift']());}catch(_0x167bf8){_0xf0c9ed['push'](_0xf0c9ed['shift']());}}}(a56_0x2c99,0x5ba77));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a56_0x2c99(){const _0x98ec5c=['resolveFolderId','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','kind','15782415nYuVtm','verbose','7551YrnFLd','error','429184GNRbLB','6680iUvDgG','Error:\x20Cannot\x20update\x20','75vwUnYT','ruleFile','segmentName','data','parentId','rule','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Parent\x20ID:\x20','INTERNAL','resolvePathToResource','34284oBivWk','Resolved\x20folder\x20ID:\x20','113716zheVdI','type','Updating\x20segment\x20\x27','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','segmentId','segment','updateSegmentById','Resolved\x20relative\x20path\x20to:\x20','folder','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','Segment\x20ID:\x20','66311gSWARv','536TYFQhp','Examples:','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','97884rpIHVU','\x27...','yellow','141WRhxQq','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','name','Resolving\x20path\x20\x27','\x20\x20\x20Path:\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','length'];a56_0x2c99=function(){return _0x98ec5c;};return a56_0x2c99();}import{withSpinner}from'../utils/spinner.js';function a56_0x522e(_0x5300ea,_0x10c74c){_0x5300ea=_0x5300ea-0x196;const _0x2c99ac=a56_0x2c99();let _0x522e01=_0x2c99ac[_0x5300ea];return _0x522e01;}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a56_0x2f9604 from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';['description']='Update\x20existing\x20child\x20segment';async['execute'](_0x5f5881){const _0x59d913=a56_0x522e;console[_0x59d913(0x1b5)](a56_0x2f9604[_0x59d913(0x1a6)](_0x59d913(0x1a3))),console['error'](a56_0x2f9604[_0x59d913(0x1a6)](_0x59d913(0x198)));const {options:_0x2ab580,args:_0xee356d,tdx:_0x3d19dd}=_0x5f5881,_0x44a97d=_0x2ab580;if(_0xee356d[_0x59d913(0x1ae)]===0x0)return console[_0x59d913(0x1b5)](_0x59d913(0x1bf)),console[_0x59d913(0x1b5)](_0x59d913(0x19e)),console[_0x59d913(0x1b5)](_0x59d913(0x1a2)),console[_0x59d913(0x1b5)](_0x59d913(0x1ad)),console[_0x59d913(0x1b5)](_0x59d913(0x1b0)),0x1;const _0x312f65=_0xee356d[0x0],_0x3118e1=_0x2ab580['segmentPath'];let _0x1bc475=_0x312f65;_0x3118e1&&!_0x312f65['includes']('/')&&(_0x1bc475=_0x3118e1+'/'+_0x312f65,_0x44a97d[_0x59d913(0x1b3)]&&console[_0x59d913(0x1b5)](_0x59d913(0x19c)+_0x1bc475));const _0x498e1f=await withSpinner(_0x59d913(0x1ab)+_0x1bc475+_0x59d913(0x1a5),()=>_0x3d19dd[_0x59d913(0x19a)][_0x59d913(0x1c2)](_0x1bc475),{'verbose':_0x44a97d['verbose']}),_0x4c6195=_0x498e1f[_0x59d913(0x1bc)];_0x44a97d[_0x59d913(0x1b3)]&&console['error']('Resolved\x20type:\x20'+_0x4c6195[_0x59d913(0x196)]);if(_0x4c6195[_0x59d913(0x196)]!==_0x59d913(0x19a))return console[_0x59d913(0x1b5)](_0x59d913(0x1b8)+_0x4c6195[_0x59d913(0x196)]+_0x59d913(0x1a8)),console['error'](_0x59d913(0x1a9)),0x1;if(!_0x4c6195[_0x59d913(0x199)])throw new SDKError(ErrorCode[_0x59d913(0x1c1)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x5123e1=_0x4c6195[_0x59d913(0x1bd)],_0x5b54db=_0x4c6195[_0x59d913(0x199)];_0x44a97d[_0x59d913(0x1b3)]&&(console['error'](_0x59d913(0x1c0)+_0x5123e1),console['error'](_0x59d913(0x19f)+_0x5b54db));let _0x3c3730;if(_0x44a97d['folder']){const _0x1e446a=_0x44a97d[_0x59d913(0x19d)],_0x11f7d3=await withSpinner('Resolving\x20folder\x20\x27'+_0x1e446a+'\x27...',()=>_0x3d19dd[_0x59d913(0x19a)][_0x59d913(0x1af)](_0x5123e1,_0x1e446a),{'verbose':_0x44a97d[_0x59d913(0x1b3)]});_0x3c3730=parseInt(_0x11f7d3['data'],0xa),_0x44a97d[_0x59d913(0x1b3)]&&console[_0x59d913(0x1b5)](_0x59d913(0x1c4)+_0x3c3730);}const _0x5baf19=await loadJSONFromOptions(_0x44a97d[_0x59d913(0x1be)],_0x44a97d[_0x59d913(0x1ba)]),_0x2bceab={'name':_0x44a97d[_0x59d913(0x1aa)],'description':_0x44a97d['description'],'rule':_0x5baf19,'kind':_0x44a97d['kind']!==undefined?parseInt(_0x44a97d[_0x59d913(0x1b1)],0xa):undefined,'segmentFolderId':_0x3c3730},_0xc97c83=await withSpinner(_0x59d913(0x197)+_0x4c6195[_0x59d913(0x1bb)]+_0x59d913(0x1a5),()=>_0x3d19dd['segment'][_0x59d913(0x19b)](_0x5123e1,_0x5b54db,_0x2bceab),{'verbose':_0x44a97d[_0x59d913(0x1b3)]}),_0x3d7d20=_0xc97c83[_0x59d913(0x1bc)];return console[_0x59d913(0x1b5)]('✔\x20Updated\x20segment\x20\x27'+_0x3d7d20[_0x59d913(0x1aa)]+'\x27'),_0x1bc475!==_0x312f65&&console['error'](_0x59d913(0x1ac)+_0x1bc475),await handleSDKOutput([_0x3d7d20],_0x44a97d),0x0;}}
1
+ const a53_0x2e71a3=a53_0x2c8d;(function(_0x3ec85b,_0x84d790){const _0x412788=a53_0x2c8d,_0x26d877=_0x3ec85b();while(!![]){try{const _0xdbc3da=-parseInt(_0x412788(0xd7))/0x1+parseInt(_0x412788(0xd3))/0x2*(parseInt(_0x412788(0xea))/0x3)+-parseInt(_0x412788(0xe2))/0x4+parseInt(_0x412788(0xcf))/0x5*(parseInt(_0x412788(0xdf))/0x6)+-parseInt(_0x412788(0xdc))/0x7+-parseInt(_0x412788(0xc3))/0x8*(parseInt(_0x412788(0xd4))/0x9)+-parseInt(_0x412788(0xc1))/0xa*(-parseInt(_0x412788(0xd2))/0xb);if(_0xdbc3da===_0x84d790)break;else _0x26d877['push'](_0x26d877['shift']());}catch(_0x1ac7b7){_0x26d877['push'](_0x26d877['shift']());}}}(a53_0x2e43,0x1fc27));function a53_0x2e43(){const _0x14ff28=['data','type','INTERNAL','kind','30omegcE','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','472FyUnUr','Parent\x20ID:\x20','error','Updating\x20segment\x20\x27','verbose','Examples:','\x20\x20\x20Path:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segmentId','updateSegmentById','name','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','5XzFBJi','description','Segment\x20ID\x20missing\x20from\x20resolved\x20path','2222011OkzBuA','36402CxSweP','29862QvgIAf','segment','yellow','152611zcNkar','parentId','Resolving\x20path\x20\x27','length','segment:update','1225427lpUQEl','Resolving\x20folder\x20\x27','includes','140478kVoxAI','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','rule','922836bNQvcP','✔\x20Updated\x20segment\x20\x27','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Update\x20existing\x20child\x20segment','execute','\x27...','Resolved\x20type:\x20','Segment\x20ID:\x20','42iRoHWn','folder','resolvePathToResource'];a53_0x2e43=function(){return _0x14ff28;};return a53_0x2e43();}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 a53_0x3b9fa9 from'chalk';function a53_0x2c8d(_0x53c09d,_0x30a70b){_0x53c09d=_0x53c09d-0xbd;const _0x2e4366=a53_0x2e43();let _0x2c8dd3=_0x2e4366[_0x53c09d];return _0x2c8dd3;}export class SegmentUpdateCommand extends BaseCommand{[a53_0x2e71a3(0xcd)]=a53_0x2e71a3(0xdb);['description']=a53_0x2e71a3(0xe5);async[a53_0x2e71a3(0xe6)](_0x4cc1c9){const _0x30f6a1=a53_0x2e71a3;console['error'](a53_0x3b9fa9[_0x30f6a1(0xd6)]('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console[_0x30f6a1(0xc5)](a53_0x3b9fa9[_0x30f6a1(0xd6)](_0x30f6a1(0xc2)));const {options:_0x447f13,args:_0x4e18b8,tdx:_0x250304}=_0x4cc1c9,_0xb556b6=_0x447f13;if(_0x4e18b8[_0x30f6a1(0xda)]===0x0)return console[_0x30f6a1(0xc5)](_0x30f6a1(0xca)),console[_0x30f6a1(0xc5)](_0x30f6a1(0xe0)),console[_0x30f6a1(0xc5)](_0x30f6a1(0xc8)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x30f6a1(0xc5)](_0x30f6a1(0xe4)),0x1;const _0xb23e26=_0x4e18b8[0x0],_0x506543=_0x447f13['segmentPath'];let _0x3427b5=_0xb23e26;_0x506543&&!_0xb23e26[_0x30f6a1(0xde)]('/')&&(_0x3427b5=_0x506543+'/'+_0xb23e26,_0xb556b6[_0x30f6a1(0xc7)]&&console[_0x30f6a1(0xc5)]('Resolved\x20relative\x20path\x20to:\x20'+_0x3427b5));const _0x33ae6b=await withSpinner(_0x30f6a1(0xd9)+_0x3427b5+'\x27...',()=>_0x250304[_0x30f6a1(0xd5)][_0x30f6a1(0xec)](_0x3427b5),{'verbose':_0xb556b6[_0x30f6a1(0xc7)]}),_0x3c0168=_0x33ae6b[_0x30f6a1(0xbd)];_0xb556b6[_0x30f6a1(0xc7)]&&console[_0x30f6a1(0xc5)](_0x30f6a1(0xe8)+_0x3c0168[_0x30f6a1(0xbe)]);if(_0x3c0168[_0x30f6a1(0xbe)]!==_0x30f6a1(0xd5))return console[_0x30f6a1(0xc5)]('Error:\x20Cannot\x20update\x20'+_0x3c0168[_0x30f6a1(0xbe)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x30f6a1(0xc5)](_0x30f6a1(0xce)),0x1;if(!_0x3c0168[_0x30f6a1(0xcb)])throw new SDKError(ErrorCode[_0x30f6a1(0xbf)],_0x30f6a1(0xd1));const _0x3e6de7=_0x3c0168[_0x30f6a1(0xd8)],_0x367998=_0x3c0168[_0x30f6a1(0xcb)];_0xb556b6['verbose']&&(console[_0x30f6a1(0xc5)](_0x30f6a1(0xc4)+_0x3e6de7),console[_0x30f6a1(0xc5)](_0x30f6a1(0xe9)+_0x367998));let _0x1b55e8;if(_0xb556b6[_0x30f6a1(0xeb)]){const _0x593581=_0xb556b6[_0x30f6a1(0xeb)],_0x38fce2=await withSpinner(_0x30f6a1(0xdd)+_0x593581+_0x30f6a1(0xe7),()=>_0x250304[_0x30f6a1(0xd5)]['resolveFolderId'](_0x3e6de7,_0x593581),{'verbose':_0xb556b6['verbose']});_0x1b55e8=parseInt(_0x38fce2[_0x30f6a1(0xbd)],0xa),_0xb556b6[_0x30f6a1(0xc7)]&&console['error']('Resolved\x20folder\x20ID:\x20'+_0x1b55e8);}const _0x3203de=await loadJSONFromOptions(_0xb556b6[_0x30f6a1(0xe1)],_0xb556b6['ruleFile']),_0x4f738a={'name':_0xb556b6[_0x30f6a1(0xcd)],'description':_0xb556b6[_0x30f6a1(0xd0)],'rule':_0x3203de,'kind':_0xb556b6['kind']!==undefined?parseInt(_0xb556b6[_0x30f6a1(0xc0)],0xa):undefined,'segmentFolderId':_0x1b55e8},_0x3d0908=await withSpinner(_0x30f6a1(0xc6)+_0x3c0168['segmentName']+'\x27...',()=>_0x250304[_0x30f6a1(0xd5)][_0x30f6a1(0xcc)](_0x3e6de7,_0x367998,_0x4f738a),{'verbose':_0xb556b6[_0x30f6a1(0xc7)]}),_0x1643bf=_0x3d0908['data'];return console[_0x30f6a1(0xc5)](_0x30f6a1(0xe3)+_0x1643bf[_0x30f6a1(0xcd)]+'\x27'),_0x3427b5!==_0xb23e26&&console[_0x30f6a1(0xc5)](_0x30f6a1(0xc9)+_0x3427b5),await handleSDKOutput([_0x1643bf],_0xb556b6),0x0;}}
@@ -1 +1 @@
1
- const a57_0x35ee14=a57_0x370b;(function(_0x224bf5,_0x158fd6){const _0x3585f2=a57_0x370b,_0x212780=_0x224bf5();while(!![]){try{const _0x536ab6=-parseInt(_0x3585f2(0x15d))/0x1+-parseInt(_0x3585f2(0x136))/0x2+parseInt(_0x3585f2(0x129))/0x3+-parseInt(_0x3585f2(0x130))/0x4+parseInt(_0x3585f2(0x149))/0x5*(parseInt(_0x3585f2(0x14c))/0x6)+parseInt(_0x3585f2(0x147))/0x7+parseInt(_0x3585f2(0x12e))/0x8*(parseInt(_0x3585f2(0x148))/0x9);if(_0x536ab6===_0x158fd6)break;else _0x212780['push'](_0x212780['shift']());}catch(_0x598735){_0x212780['push'](_0x212780['shift']());}}}(a57_0x32c6,0x4fb90));function a57_0x32c6(){const _0x56a0ea=['parentId','Examples:','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Site:\x20','isAbsolute','cyan','Resolved\x20relative\x20path\x20to:\x20','session','✔\x20Context\x20set\x20to:\x20','2495752fbRSCY','467469MFEBYI','412630JVVSwF','Use:\x20tdx\x20segment\x20use\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','6lPLiZC','green','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','log','segment','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','join','error','site','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Parent\x20ID:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Resolving\x20path\x20\x27','folderId','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','description','581039sglpMt','name','red','738873BVfpwN','type','isDirectory','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','dim','128KgmPRx','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','1227476xGEbup','folderPath','parentName','verbose','execute','Target\x20path:\x20','603914MtnclA','fullPath','length','config','Folder\x20ID:\x20','Error:\x20Path\x20is\x20required\x0a','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','segments'];a57_0x32c6=function(){return _0x56a0ea;};return a57_0x32c6();}import{existsSync,statSync}from'fs';import a57_0x459131 from'chalk';import{BaseCommand}from'./command.js';function a57_0x370b(_0x530574,_0x57f400){_0x530574=_0x530574-0x128;const _0x32c62d=a57_0x32c6();let _0x370bec=_0x32c62d[_0x530574];return _0x370bec;}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{[a57_0x35ee14(0x15e)]='segment:use';[a57_0x35ee14(0x15c)]=a57_0x35ee14(0x15b);async[a57_0x35ee14(0x134)](_0x3a7677){const _0x2d222e=a57_0x35ee14,{options:_0x4d2c90,args:_0x2500c6,tdx:_0x845aef}=_0x3a7677;if(_0x2500c6[_0x2d222e(0x138)]===0x0)return console['error'](a57_0x459131[_0x2d222e(0x128)](_0x2d222e(0x13b))),console[_0x2d222e(0x153)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console['error'](_0x2d222e(0x13f)),console[_0x2d222e(0x153)](_0x2d222e(0x12c)),console[_0x2d222e(0x153)](_0x2d222e(0x14e)),console[_0x2d222e(0x153)](_0x2d222e(0x155)),console[_0x2d222e(0x153)]('\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 _0x10f6d2=_0x2500c6[0x0],_0xcdc774=_0x4d2c90[_0x2d222e(0x145)];try{if(_0x10f6d2==='/')return saveSessionContext({'segment_path':undefined},_0xcdc774),console[_0x2d222e(0x14f)](a57_0x459131[_0x2d222e(0x14d)](_0x2d222e(0x15a))),0x0;if(existsSync(_0x10f6d2)&&statSync(_0x10f6d2)[_0x2d222e(0x12b)]()){let _0x260bb8;try{_0x260bb8=findTdxConfig(_0x10f6d2);}catch{return console[_0x2d222e(0x153)](a57_0x459131[_0x2d222e(0x128)](_0x2d222e(0x14b)+_0x10f6d2)),console[_0x2d222e(0x153)](a57_0x459131['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x4bb641=_0x260bb8[_0x2d222e(0x139)]['parent_segment'];return saveSessionContext({'segment_path':_0x4bb641,'parent_segment':_0x4bb641},_0xcdc774),console[_0x2d222e(0x14f)](a57_0x459131[_0x2d222e(0x14d)](_0x2d222e(0x146)+a57_0x459131[_0x2d222e(0x143)](_0x4bb641))),0x0;}const _0x181f6c=_0x4d2c90['segmentPath'];let _0xad83ef=_0x10f6d2;const _0x401b20=parsePath(_0x10f6d2);if(!_0x401b20[_0x2d222e(0x142)]){if(!_0x181f6c)return console['error'](a57_0x459131[_0x2d222e(0x128)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console[_0x2d222e(0x153)](a57_0x459131[_0x2d222e(0x143)](_0x2d222e(0x151))),0x1;if(_0x10f6d2==='..'){const _0x5cdea0=_0x181f6c['split']('/')['slice'](0x0,-0x1)[_0x2d222e(0x152)]('/');_0xad83ef=_0x5cdea0||'/';}else _0x10f6d2==='.'?_0xad83ef=_0x181f6c:_0xad83ef=_0x181f6c+'/'+_0x10f6d2;_0x4d2c90['verbose']&&console[_0x2d222e(0x153)](_0x2d222e(0x144)+_0xad83ef);}if(_0xad83ef==='/'||_0xad83ef==='')return saveSessionContext({'segment_path':undefined},_0xcdc774),console['log'](a57_0x459131[_0x2d222e(0x14d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0xad83ef=normalizePath(_0xad83ef);const _0x273688=parsePath(_0xad83ef)[_0x2d222e(0x13d)];if(_0x273688['length']===0x0)return saveSessionContext({'segment_path':undefined},_0xcdc774),console[_0x2d222e(0x14f)](a57_0x459131[_0x2d222e(0x14d)](_0x2d222e(0x15a))),0x0;_0x4d2c90[_0x2d222e(0x133)]&&(console[_0x2d222e(0x153)](_0x2d222e(0x141)+_0x4d2c90[_0x2d222e(0x154)]),console[_0x2d222e(0x153)](_0x2d222e(0x135)+_0xad83ef));const _0x176025=await withSpinner(_0x2d222e(0x158)+_0xad83ef+'\x27...',()=>_0x845aef[_0x2d222e(0x150)]['resolvePathToResource'](_0xad83ef),{'verbose':_0x4d2c90[_0x2d222e(0x133)]}),_0x177c79=_0x176025['data'];_0x4d2c90[_0x2d222e(0x133)]&&(console[_0x2d222e(0x153)]('Resolved\x20path\x20type:\x20'+_0x177c79[_0x2d222e(0x12a)]),console[_0x2d222e(0x153)](_0x2d222e(0x156)+_0x177c79[_0x2d222e(0x13e)]),_0x177c79[_0x2d222e(0x159)]&&console[_0x2d222e(0x153)](_0x2d222e(0x13a)+_0x177c79[_0x2d222e(0x159)]));if(_0x177c79['type']==='segment')return console['error'](a57_0x459131[_0x2d222e(0x128)](_0x2d222e(0x157))),console['error'](_0x2d222e(0x12f)),console['error'](a57_0x459131['cyan'](_0x2d222e(0x14a)+_0x177c79[_0x2d222e(0x132)]+(_0x177c79[_0x2d222e(0x131)]?'/'+_0x177c79[_0x2d222e(0x131)][_0x2d222e(0x152)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x177c79[_0x2d222e(0x137)],'parent_segment':_0x177c79[_0x2d222e(0x132)]},_0xcdc774),console[_0x2d222e(0x14f)](a57_0x459131[_0x2d222e(0x14d)](_0x2d222e(0x146)+a57_0x459131[_0x2d222e(0x143)](_0x177c79[_0x2d222e(0x137)]))),_0x4d2c90[_0x2d222e(0x133)]&&(console[_0x2d222e(0x153)](a57_0x459131[_0x2d222e(0x12d)](_0x2d222e(0x140))),console['error'](a57_0x459131[_0x2d222e(0x12d)](_0x2d222e(0x13c)))),0x0;}catch(_0x4b1bdf){throw _0x4b1bdf;}}}
1
+ const a54_0x2df8ac=a54_0x248c;(function(_0x26e63f,_0x43f854){const _0x5d22ab=a54_0x248c,_0x4dd8ac=_0x26e63f();while(!![]){try{const _0x59de39=parseInt(_0x5d22ab(0x164))/0x1*(parseInt(_0x5d22ab(0x182))/0x2)+-parseInt(_0x5d22ab(0x191))/0x3*(-parseInt(_0x5d22ab(0x169))/0x4)+-parseInt(_0x5d22ab(0x15e))/0x5*(parseInt(_0x5d22ab(0x170))/0x6)+parseInt(_0x5d22ab(0x18a))/0x7*(parseInt(_0x5d22ab(0x163))/0x8)+parseInt(_0x5d22ab(0x174))/0x9*(parseInt(_0x5d22ab(0x18d))/0xa)+parseInt(_0x5d22ab(0x189))/0xb*(parseInt(_0x5d22ab(0x178))/0xc)+parseInt(_0x5d22ab(0x188))/0xd*(-parseInt(_0x5d22ab(0x18b))/0xe);if(_0x59de39===_0x43f854)break;else _0x4dd8ac['push'](_0x4dd8ac['shift']());}catch(_0x477f91){_0x4dd8ac['push'](_0x4dd8ac['shift']());}}}(a54_0x9283,0x6a955));import{existsSync,statSync}from'fs';import a54_0x46a573 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a54_0x248c(_0x2d3532,_0x5b1791){_0x2d3532=_0x2d3532-0x159;const _0x9283c9=a54_0x9283();let _0x248cda=_0x9283c9[_0x2d3532];return _0x248cda;}function a54_0x9283(){const _0x42c4ce=['Error:\x20Path\x20is\x20required\x0a','segmentPath','parent_segment','split','segments','folderId','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Resolved\x20relative\x20path\x20to:\x20','dim','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','resolvePathToResource','2101655fXYvEJ','cyan','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','Resolving\x20path\x20\x27','session','24SEFdXp','3FBhGsw','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','fullPath','Target\x20path:\x20','4uKqkFg','type','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','segment:use','segment','Resolved\x20path\x20type:\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','12tMfdzt','isAbsolute','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','9qtRtag','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','35172QDZUDq','name','length','config','Use:\x20tdx\x20segment\x20use\x20','red','error','execute','✔\x20Context\x20set\x20to:\x20','parentName','545074dKkeRv','log','isDirectory','description','Usage:\x20tdx\x20segment\x20use\x20<path>','join','7551154uBQHiF','891xRiSfL','1197707uKZGoQ','14WwtMoD','parentId','1764460rereGR','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x27...','site','339942PPKlhm','verbose','Parent\x20ID:\x20','green'];a54_0x9283=function(){return _0x42c4ce;};return a54_0x9283();}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a54_0x2df8ac(0x179)]=a54_0x2df8ac(0x16c);[a54_0x2df8ac(0x185)]=a54_0x2df8ac(0x159);async[a54_0x2df8ac(0x17f)](_0x540461){const _0x4d92b4=a54_0x2df8ac,{options:_0x277ab0,args:_0x92b3a1,tdx:_0x14fa67}=_0x540461;if(_0x92b3a1[_0x4d92b4(0x17a)]===0x0)return console[_0x4d92b4(0x17e)](a54_0x46a573['red'](_0x4d92b4(0x195))),console[_0x4d92b4(0x17e)](_0x4d92b4(0x186)),console[_0x4d92b4(0x17e)]('Examples:'),console[_0x4d92b4(0x17e)](_0x4d92b4(0x16b)),console['error'](_0x4d92b4(0x165)),console['error'](_0x4d92b4(0x15c)),console[_0x4d92b4(0x17e)](_0x4d92b4(0x176)),0x1;const _0x171045=_0x92b3a1[0x0],_0x24432f=_0x277ab0[_0x4d92b4(0x162)];try{if(_0x171045==='/')return saveSessionContext({'segment_path':undefined},_0x24432f),console[_0x4d92b4(0x183)](a54_0x46a573[_0x4d92b4(0x194)](_0x4d92b4(0x173))),0x0;if(existsSync(_0x171045)&&statSync(_0x171045)[_0x4d92b4(0x184)]()){let _0x5808ce;try{_0x5808ce=findTdxConfig(_0x171045);}catch{return console['error'](a54_0x46a573[_0x4d92b4(0x17d)](_0x4d92b4(0x16f)+_0x171045)),console['error'](a54_0x46a573[_0x4d92b4(0x15f)](_0x4d92b4(0x166))),0x1;}const _0x396722=_0x5808ce[_0x4d92b4(0x17b)][_0x4d92b4(0x197)];return saveSessionContext({'segment_path':_0x396722,'parent_segment':_0x396722},_0x24432f),console[_0x4d92b4(0x183)](a54_0x46a573[_0x4d92b4(0x194)](_0x4d92b4(0x180)+a54_0x46a573[_0x4d92b4(0x15f)](_0x396722))),0x0;}const _0x5733f5=_0x277ab0[_0x4d92b4(0x196)];let _0x1103f2=_0x171045;const _0x3711d3=parsePath(_0x171045);if(!_0x3711d3[_0x4d92b4(0x171)]){if(!_0x5733f5)return console[_0x4d92b4(0x17e)](a54_0x46a573[_0x4d92b4(0x17d)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console[_0x4d92b4(0x17e)](a54_0x46a573[_0x4d92b4(0x15f)](_0x4d92b4(0x175))),0x1;if(_0x171045==='..'){const _0x396df5=_0x5733f5[_0x4d92b4(0x198)]('/')['slice'](0x0,-0x1)[_0x4d92b4(0x187)]('/');_0x1103f2=_0x396df5||'/';}else _0x171045==='.'?_0x1103f2=_0x5733f5:_0x1103f2=_0x5733f5+'/'+_0x171045;_0x277ab0['verbose']&&console['error'](_0x4d92b4(0x15a)+_0x1103f2);}if(_0x1103f2==='/'||_0x1103f2==='')return saveSessionContext({'segment_path':undefined},_0x24432f),console[_0x4d92b4(0x183)](a54_0x46a573[_0x4d92b4(0x194)](_0x4d92b4(0x173))),0x0;_0x1103f2=normalizePath(_0x1103f2);const _0x2444bb=parsePath(_0x1103f2)[_0x4d92b4(0x199)];if(_0x2444bb[_0x4d92b4(0x17a)]===0x0)return saveSessionContext({'segment_path':undefined},_0x24432f),console[_0x4d92b4(0x183)](a54_0x46a573['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x277ab0[_0x4d92b4(0x192)]&&(console[_0x4d92b4(0x17e)]('Site:\x20'+_0x277ab0[_0x4d92b4(0x190)]),console[_0x4d92b4(0x17e)](_0x4d92b4(0x168)+_0x1103f2));const _0xef0600=await withSpinner(_0x4d92b4(0x161)+_0x1103f2+_0x4d92b4(0x18f),()=>_0x14fa67[_0x4d92b4(0x16d)][_0x4d92b4(0x15d)](_0x1103f2),{'verbose':_0x277ab0[_0x4d92b4(0x192)]}),_0x266617=_0xef0600['data'];_0x277ab0[_0x4d92b4(0x192)]&&(console[_0x4d92b4(0x17e)](_0x4d92b4(0x16e)+_0x266617['type']),console['error'](_0x4d92b4(0x193)+_0x266617[_0x4d92b4(0x18c)]),_0x266617[_0x4d92b4(0x19a)]&&console['error']('Folder\x20ID:\x20'+_0x266617['folderId']));if(_0x266617[_0x4d92b4(0x16a)]===_0x4d92b4(0x16d))return console[_0x4d92b4(0x17e)](a54_0x46a573['red'](_0x4d92b4(0x172))),console['error'](_0x4d92b4(0x18e)),console[_0x4d92b4(0x17e)](a54_0x46a573[_0x4d92b4(0x15f)](_0x4d92b4(0x17c)+_0x266617[_0x4d92b4(0x181)]+(_0x266617['folderPath']?'/'+_0x266617['folderPath']['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x266617['fullPath'],'parent_segment':_0x266617[_0x4d92b4(0x181)]},_0x24432f),console[_0x4d92b4(0x183)](a54_0x46a573[_0x4d92b4(0x194)](_0x4d92b4(0x180)+a54_0x46a573[_0x4d92b4(0x15f)](_0x266617[_0x4d92b4(0x167)]))),_0x277ab0['verbose']&&(console[_0x4d92b4(0x17e)](a54_0x46a573[_0x4d92b4(0x15b)](_0x4d92b4(0x177))),console['error'](a54_0x46a573[_0x4d92b4(0x15b)](_0x4d92b4(0x160)))),0x0;}catch(_0xf56432){throw _0xf56432;}}}
@@ -1 +1 @@
1
- const a58_0x1d4496=a58_0x178b;(function(_0x481321,_0x595f64){const _0x29a450=a58_0x178b,_0x13863a=_0x481321();while(!![]){try{const _0x3e9b83=-parseInt(_0x29a450(0x7b))/0x1*(-parseInt(_0x29a450(0x76))/0x2)+parseInt(_0x29a450(0x77))/0x3*(-parseInt(_0x29a450(0x9b))/0x4)+-parseInt(_0x29a450(0x7f))/0x5*(-parseInt(_0x29a450(0xa3))/0x6)+parseInt(_0x29a450(0x72))/0x7+parseInt(_0x29a450(0x8f))/0x8+-parseInt(_0x29a450(0x98))/0x9*(parseInt(_0x29a450(0x9e))/0xa)+-parseInt(_0x29a450(0x73))/0xb*(parseInt(_0x29a450(0x6d))/0xc);if(_0x3e9b83===_0x595f64)break;else _0x13863a['push'](_0x13863a['shift']());}catch(_0x1e3bf5){_0x13863a['push'](_0x13863a['shift']());}}}(a58_0xb0b0,0x82987));import{BaseCommand}from'./command.js';function a58_0x178b(_0x4d0d75,_0x122151){_0x4d0d75=_0x4d0d75-0x6b;const _0xb0b074=a58_0xb0b0();let _0x178b4a=_0xb0b074[_0x4d0d75];return _0x178b4a;}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a58_0x1fdcf8 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a58_0xb0b0(){const _0xd4723d=['name','execute','\x20file(s)\x20with\x20errors,\x20','1807946OeViQE','132dIqzhi','red','length','10bvxvAo','777774dxKega','helpText','Error:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','170908ypnHLD','.yml','Error:\x20Directory\x20not\x20found:\x20','):\x20','654565BSLwLL','\x20valid','warnings','verbose','.yaml','errorCode','yellow','type','filePath','file','cyan','endsWith','no_parent','Validate\x20segment\x20and\x20journey\x20YAML\x20files','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','parentSegment','7802824WZFXCk','Validation\x20failed:\x20','hasErrors','targetDir','warningCount','validCount','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','✔\x20All\x20','segment:validate','23202oLDETW','\x20file(s)\x20valid','valid','4CgwtUB','\x20warning(s)','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','390ixdLlM','dim','\x20error(s)','message','log','24ckGaTN','error','\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','1717104nrgzPa','green'];a58_0xb0b0=function(){return _0xd4723d;};return a58_0xb0b0();}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a58_0x1d4496(0x6f)]=a58_0x1d4496(0x97);['description']=a58_0x1d4496(0x8c);async[a58_0x1d4496(0x70)](_0x193c1a){const _0x33f539=a58_0x1d4496,{options:_0x182683,args:_0xee0c6b}=_0x193c1a,_0x17a208=_0x182683,_0x58d42d=await resolveTarget({'arg':_0xee0c6b[0x0],'contextParent':_0x182683[_0x33f539(0x8e)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x58d42d))return _0x58d42d[_0x33f539(0x84)]===_0x33f539(0x8b)?(console[_0x33f539(0x6b)](a58_0x1fdcf8[_0x33f539(0x85)](_0x33f539(0x7a))),console[_0x33f539(0x6b)](_0x33f539(0x95)),console[_0x33f539(0x6b)](_0x33f539(0x6c)),console[_0x33f539(0x6b)](_0x33f539(0x9d))):(console[_0x33f539(0x6b)](a58_0x1fdcf8['red'](_0x33f539(0x79)+_0x58d42d[_0x33f539(0xa1)]+'\x0a')),_0x58d42d[_0x33f539(0x78)]&&console[_0x33f539(0x6b)](a58_0x1fdcf8[_0x33f539(0x89)](_0x58d42d[_0x33f539(0x78)]))),0x1;const _0x5791fa=_0x58d42d[_0x33f539(0x92)],_0x1eb7d0=_0x58d42d[_0x33f539(0x86)]===_0x33f539(0x88)?_0x58d42d[_0x33f539(0x87)]:undefined;if(!_0x1eb7d0&&!existsSync(_0x5791fa))return console[_0x33f539(0x6b)](a58_0x1fdcf8[_0x33f539(0x74)](_0x33f539(0x7d)+_0x5791fa+'\x0a')),0x1;let _0x303314;if(_0x1eb7d0){if(!_0x1eb7d0[_0x33f539(0x8a)](_0x33f539(0x7c))&&!_0x1eb7d0[_0x33f539(0x8a)](_0x33f539(0x83)))return console[_0x33f539(0x6b)](a58_0x1fdcf8['red']('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x1eb7d0+'\x0a')),0x1;_0x303314=[_0x1eb7d0];}else _0x303314=findYamlFiles(_0x5791fa);if(_0x303314[_0x33f539(0x75)]===0x0)return console['error'](a58_0x1fdcf8[_0x33f539(0x74)](_0x33f539(0x8d)+_0x5791fa+'\x0a')),0x1;const _0x525c94=validateYamlFiles(_0x303314,_0x5791fa),_0x2f6aff=calculateSummary(_0x525c94);for(const _0x4a5156 of _0x525c94){if(!isValidationResult(_0x4a5156))continue;const {relativePath:_0x4bbd9d,source:_0x514a68,result:_0xac56d0,fileType:_0x4c8f64}=_0x4a5156,_0x49917c=_0x4c8f64;if(_0xac56d0['valid']&&_0xac56d0[_0x33f539(0x81)][_0x33f539(0x75)]===0x0)_0x17a208[_0x33f539(0x82)]&&console[_0x33f539(0xa2)](a58_0x1fdcf8[_0x33f539(0x6e)]('✔\x20'+_0x4bbd9d)+a58_0x1fdcf8['dim']('\x20('+_0x49917c+')'));else _0xac56d0[_0x33f539(0x9a)]?(console['log'](a58_0x1fdcf8[_0x33f539(0x85)]('⚠\x20'+_0x4bbd9d)+a58_0x1fdcf8[_0x33f539(0x9f)]('\x20('+_0x49917c+_0x33f539(0x7e)+_0xac56d0[_0x33f539(0x81)][_0x33f539(0x75)]+_0x33f539(0x9c))),console[_0x33f539(0xa2)](formatValidationResult(_0xac56d0,_0x514a68,_0x4bbd9d))):(console[_0x33f539(0xa2)](a58_0x1fdcf8['red']('✖\x20'+_0x4bbd9d)+a58_0x1fdcf8[_0x33f539(0x9f)]('\x20('+_0x49917c+'):\x20'+_0xac56d0['errors'][_0x33f539(0x75)]+_0x33f539(0xa0))),console[_0x33f539(0xa2)](formatValidationResult(_0xac56d0,_0x514a68,_0x4bbd9d)));}return console[_0x33f539(0xa2)](''),_0x2f6aff[_0x33f539(0x91)]?(console['log'](a58_0x1fdcf8[_0x33f539(0x74)](_0x33f539(0x90)+_0x2f6aff['invalidCount']+_0x33f539(0x71)+_0x2f6aff[_0x33f539(0x94)]+_0x33f539(0x80))),_0x2f6aff[_0x33f539(0x93)]>0x0&&console[_0x33f539(0xa2)](a58_0x1fdcf8[_0x33f539(0x85)](_0x2f6aff[_0x33f539(0x93)]+'\x20warning(s)\x20found')),0x1):(console['log'](a58_0x1fdcf8[_0x33f539(0x6e)](_0x33f539(0x96)+_0x2f6aff[_0x33f539(0x94)]+_0x33f539(0x99))),_0x2f6aff[_0x33f539(0x93)]>0x0&&console[_0x33f539(0xa2)](a58_0x1fdcf8['yellow'](_0x2f6aff['warningCount']+'\x20warning(s)\x20found')),0x0);}}
1
+ const a55_0x5a6cb2=a55_0x850b;(function(_0x469258,_0x41463c){const _0x45e898=a55_0x850b,_0x44d730=_0x469258();while(!![]){try{const _0x502acf=parseInt(_0x45e898(0xfa))/0x1+parseInt(_0x45e898(0x11d))/0x2*(-parseInt(_0x45e898(0x10a))/0x3)+parseInt(_0x45e898(0x116))/0x4+parseInt(_0x45e898(0x121))/0x5+parseInt(_0x45e898(0x109))/0x6*(parseInt(_0x45e898(0xfd))/0x7)+-parseInt(_0x45e898(0x11c))/0x8*(-parseInt(_0x45e898(0xfe))/0x9)+-parseInt(_0x45e898(0x10f))/0xa;if(_0x502acf===_0x41463c)break;else _0x44d730['push'](_0x44d730['shift']());}catch(_0x13ad8e){_0x44d730['push'](_0x44d730['shift']());}}}(a55_0x4fe2,0xc87c3));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a55_0x4fe2(){const _0x3c9abc=['filePath','valid','helpText','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20error(s)','message','description','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Error:\x20Directory\x20not\x20found:\x20','file','1597842RBzBlW','yellow','\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','11465657sEgYaK','502794JhJBab','errorCode','\x20warning(s)','\x20warning(s)\x20found','endsWith','type','verbose','):\x20','log','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','✔\x20All\x20','6KEtfgM','3hgipDN','dim','green','\x20file(s)\x20with\x20errors,\x20','error','35088170mFhKcT','warningCount','hasErrors','red','\x20valid','.yml','length','4037604GGAgTg','.yaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','warnings','segment:validate','208DOIqls','2983406pCqGPz','Validate\x20segment\x20and\x20journey\x20YAML\x20files','Error:\x20','Validation\x20failed:\x20','619985vTFcSj','targetDir'];a55_0x4fe2=function(){return _0x3c9abc;};return a55_0x4fe2();}import{existsSync}from'fs';import a55_0x383acf from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a55_0x850b(_0xd3474e,_0x36bd37){_0xd3474e=_0xd3474e-0xf1;const _0x4fe2fc=a55_0x4fe2();let _0x850b94=_0x4fe2fc[_0xd3474e];return _0x850b94;}export class SegmentValidateCommand extends BaseCommand{['name']=a55_0x5a6cb2(0x11b);[a55_0x5a6cb2(0xf6)]=a55_0x5a6cb2(0x11e);async['execute'](_0x1abf12){const _0x52cb6b=a55_0x5a6cb2,{options:_0x58d35c,args:_0x4a0e48}=_0x1abf12,_0x442da2=_0x58d35c,_0x27633a=await resolveTarget({'arg':_0x4a0e48[0x0],'contextParent':_0x58d35c['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x27633a))return _0x27633a[_0x52cb6b(0xff)]==='no_parent'?(console[_0x52cb6b(0x10e)](a55_0x383acf['yellow'](_0x52cb6b(0x119))),console['error'](_0x52cb6b(0x107)),console['error'](_0x52cb6b(0xfc)),console[_0x52cb6b(0x10e)](_0x52cb6b(0x118))):(console[_0x52cb6b(0x10e)](a55_0x383acf['red'](_0x52cb6b(0x11f)+_0x27633a[_0x52cb6b(0xf5)]+'\x0a')),_0x27633a[_0x52cb6b(0xf2)]&&console[_0x52cb6b(0x10e)](a55_0x383acf['cyan'](_0x27633a[_0x52cb6b(0xf2)]))),0x1;const _0xc77f71=_0x27633a[_0x52cb6b(0x122)],_0x332b5f=_0x27633a[_0x52cb6b(0x103)]===_0x52cb6b(0xf9)?_0x27633a[_0x52cb6b(0x123)]:undefined;if(!_0x332b5f&&!existsSync(_0xc77f71))return console[_0x52cb6b(0x10e)](a55_0x383acf['red'](_0x52cb6b(0xf8)+_0xc77f71+'\x0a')),0x1;let _0x2f8121;if(_0x332b5f){if(!_0x332b5f[_0x52cb6b(0x102)](_0x52cb6b(0x114))&&!_0x332b5f[_0x52cb6b(0x102)](_0x52cb6b(0x117)))return console[_0x52cb6b(0x10e)](a55_0x383acf[_0x52cb6b(0x112)](_0x52cb6b(0xf3)+_0x332b5f+'\x0a')),0x1;_0x2f8121=[_0x332b5f];}else _0x2f8121=findYamlFiles(_0xc77f71);if(_0x2f8121[_0x52cb6b(0x115)]===0x0)return console[_0x52cb6b(0x10e)](a55_0x383acf['red'](_0x52cb6b(0xf7)+_0xc77f71+'\x0a')),0x1;const _0x51fe19=validateYamlFiles(_0x2f8121,_0xc77f71),_0x2f6101=calculateSummary(_0x51fe19);for(const _0x566358 of _0x51fe19){if(!isValidationResult(_0x566358))continue;const {relativePath:_0x63f714,source:_0x30e4a3,result:_0x1460b1,fileType:_0x3965c9}=_0x566358,_0x23d9e2=_0x3965c9;if(_0x1460b1[_0x52cb6b(0xf1)]&&_0x1460b1[_0x52cb6b(0x11a)][_0x52cb6b(0x115)]===0x0)_0x442da2[_0x52cb6b(0x104)]&&console['log'](a55_0x383acf[_0x52cb6b(0x10c)]('✔\x20'+_0x63f714)+a55_0x383acf[_0x52cb6b(0x10b)]('\x20('+_0x23d9e2+')'));else _0x1460b1[_0x52cb6b(0xf1)]?(console[_0x52cb6b(0x106)](a55_0x383acf['yellow']('⚠\x20'+_0x63f714)+a55_0x383acf['dim']('\x20('+_0x23d9e2+'):\x20'+_0x1460b1[_0x52cb6b(0x11a)][_0x52cb6b(0x115)]+_0x52cb6b(0x100))),console[_0x52cb6b(0x106)](formatValidationResult(_0x1460b1,_0x30e4a3,_0x63f714))):(console[_0x52cb6b(0x106)](a55_0x383acf['red']('✖\x20'+_0x63f714)+a55_0x383acf[_0x52cb6b(0x10b)]('\x20('+_0x23d9e2+_0x52cb6b(0x105)+_0x1460b1['errors'][_0x52cb6b(0x115)]+_0x52cb6b(0xf4))),console['log'](formatValidationResult(_0x1460b1,_0x30e4a3,_0x63f714)));}return console[_0x52cb6b(0x106)](''),_0x2f6101[_0x52cb6b(0x111)]?(console[_0x52cb6b(0x106)](a55_0x383acf[_0x52cb6b(0x112)](_0x52cb6b(0x120)+_0x2f6101['invalidCount']+_0x52cb6b(0x10d)+_0x2f6101['validCount']+_0x52cb6b(0x113))),_0x2f6101['warningCount']>0x0&&console[_0x52cb6b(0x106)](a55_0x383acf[_0x52cb6b(0xfb)](_0x2f6101[_0x52cb6b(0x110)]+_0x52cb6b(0x101))),0x1):(console[_0x52cb6b(0x106)](a55_0x383acf[_0x52cb6b(0x10c)](_0x52cb6b(0x108)+_0x2f6101['validCount']+'\x20file(s)\x20valid')),_0x2f6101[_0x52cb6b(0x110)]>0x0&&console[_0x52cb6b(0x106)](a55_0x383acf[_0x52cb6b(0xfb)](_0x2f6101[_0x52cb6b(0x110)]+_0x52cb6b(0x101))),0x0);}}