@treasuredata/tdx 2026.9.2 → 2026.10.0

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 (319) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/ai-usage-command-base.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.d.ts.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-journey-command.d.ts +34 -0
  17. package/dist/commands/cas-journey-command.d.ts.map +1 -0
  18. package/dist/commands/cas-journey-command.js +1 -0
  19. package/dist/commands/cas-journey-command.js.map +1 -0
  20. package/dist/commands/cas-segment-command.js +1 -1
  21. package/dist/commands/chat-command.js +1 -1
  22. package/dist/commands/claude-command.d.ts +11 -0
  23. package/dist/commands/claude-command.d.ts.map +1 -1
  24. package/dist/commands/claude-command.js +1 -1
  25. package/dist/commands/claude-command.js.map +1 -1
  26. package/dist/commands/claude-statusline-command.js +1 -1
  27. package/dist/commands/claude-usage-command.js +1 -1
  28. package/dist/commands/codex-command.d.ts.map +1 -1
  29. package/dist/commands/codex-command.js +1 -1
  30. package/dist/commands/codex-command.js.map +1 -1
  31. package/dist/commands/command.js +1 -1
  32. package/dist/commands/connection-command.js +1 -1
  33. package/dist/commands/databases.js +1 -1
  34. package/dist/commands/delivery-command.js +1 -1
  35. package/dist/commands/describe.js +1 -1
  36. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  37. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  38. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  39. package/dist/commands/engage-campaign-pull-command.js +1 -1
  40. package/dist/commands/engage-campaign-push-command.js +1 -1
  41. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  42. package/dist/commands/engage-campaign-validate-command.js +1 -1
  43. package/dist/commands/engage-command.js +1 -1
  44. package/dist/commands/engage-in-browser-message-command.js +1 -1
  45. package/dist/commands/engage-landing-page-command.js +1 -1
  46. package/dist/commands/engage-template-pull-command.js +1 -1
  47. package/dist/commands/engage-template-push-command.js +1 -1
  48. package/dist/commands/engage-template-validate-command.js +1 -1
  49. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  50. package/dist/commands/job-command.js +1 -1
  51. package/dist/commands/journey-command.d.ts +46 -0
  52. package/dist/commands/journey-command.d.ts.map +1 -1
  53. package/dist/commands/journey-command.js +1 -1
  54. package/dist/commands/journey-command.js.map +1 -1
  55. package/dist/commands/journey-validate-command.js +1 -1
  56. package/dist/commands/llm-command.js +1 -1
  57. package/dist/commands/mcp-command.js +1 -1
  58. package/dist/commands/opencode-command.d.ts +25 -0
  59. package/dist/commands/opencode-command.d.ts.map +1 -1
  60. package/dist/commands/opencode-command.js +1 -1
  61. package/dist/commands/opencode-command.js.map +1 -1
  62. package/dist/commands/opencode-usage-command.js +1 -1
  63. package/dist/commands/p13n-command.js +1 -1
  64. package/dist/commands/parent-segment-command.js +1 -1
  65. package/dist/commands/policy-command.js +1 -1
  66. package/dist/commands/profile-command.js +1 -1
  67. package/dist/commands/profiles-command.js +1 -1
  68. package/dist/commands/query-command.js +1 -1
  69. package/dist/commands/schedule-command.js +1 -1
  70. package/dist/commands/segment-command.js +1 -1
  71. package/dist/commands/segment-create-command.js +1 -1
  72. package/dist/commands/segment-fields-command.js +1 -1
  73. package/dist/commands/segment-move-command.js +1 -1
  74. package/dist/commands/segment-pull-command.js +1 -1
  75. package/dist/commands/segment-push-command.js +1 -1
  76. package/dist/commands/segment-update-command.js +1 -1
  77. package/dist/commands/segment-use-command.js +1 -1
  78. package/dist/commands/segment-validate-command.js +1 -1
  79. package/dist/commands/segments.js +1 -1
  80. package/dist/commands/show.js +1 -1
  81. package/dist/commands/status-command.js +1 -1
  82. package/dist/commands/table-deleted.js +1 -1
  83. package/dist/commands/tables.js +1 -1
  84. package/dist/commands/unset-command.js +1 -1
  85. package/dist/commands/upgrade-command.js +1 -1
  86. package/dist/commands/use-command.js +1 -1
  87. package/dist/commands/user-command.js +1 -1
  88. package/dist/commands/work-command.js +1 -1
  89. package/dist/commands/workflow-command.js +1 -1
  90. package/dist/core/auth.d.ts +10 -1
  91. package/dist/core/auth.d.ts.map +1 -1
  92. package/dist/core/auth.js +1 -1
  93. package/dist/core/auth.js.map +1 -1
  94. package/dist/core/command-output.js +1 -1
  95. package/dist/core/config.js +1 -1
  96. package/dist/core/connection-cache.js +1 -1
  97. package/dist/core/constants.js +1 -1
  98. package/dist/core/credential-cache.js +1 -1
  99. package/dist/core/global-context.js +1 -1
  100. package/dist/core/keychain.js +1 -1
  101. package/dist/core/oauth-keychain.js +1 -1
  102. package/dist/core/oauth.js +1 -1
  103. package/dist/core/profile.js +1 -1
  104. package/dist/core/project-config.js +1 -1
  105. package/dist/core/session.js +1 -1
  106. package/dist/core/site-mismatch.js +1 -1
  107. package/dist/core/user-cache.js +1 -1
  108. package/dist/core/version.js +1 -1
  109. package/dist/index.js +1 -1
  110. package/dist/mcp/server.js +1 -1
  111. package/dist/mcp/tools/index.js +1 -1
  112. package/dist/mcp/tools/tdx-run.js +1 -1
  113. package/dist/mcp/tools/tdx-search.js +1 -1
  114. package/dist/mcp/tools/work-create-item.js +1 -1
  115. package/dist/mcp/utils.js +1 -1
  116. package/dist/proxy/claude-usage-tracker.d.ts +1 -0
  117. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  118. package/dist/proxy/claude-usage-tracker.js +1 -1
  119. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  120. package/dist/proxy/passthrough-server.d.ts +2 -0
  121. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  122. package/dist/proxy/passthrough-server.js +1 -1
  123. package/dist/proxy/passthrough-server.js.map +1 -1
  124. package/dist/proxy/sse-usage-parser.d.ts +2 -0
  125. package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
  126. package/dist/proxy/sse-usage-parser.js +1 -1
  127. package/dist/proxy/sse-usage-parser.js.map +1 -1
  128. package/dist/sdk/agent/agent-config.js +1 -1
  129. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  130. package/dist/sdk/agent/agent-yaml.js +1 -1
  131. package/dist/sdk/agent/test/evaluator.js +1 -1
  132. package/dist/sdk/agent/test/executor.js +1 -1
  133. package/dist/sdk/agent/test/index.js +1 -1
  134. package/dist/sdk/agent/test/output.js +1 -1
  135. package/dist/sdk/agent/test/parser.js +1 -1
  136. package/dist/sdk/agent/tool-target-registry.js +1 -1
  137. package/dist/sdk/api.js +1 -1
  138. package/dist/sdk/auth-token.js +1 -1
  139. package/dist/sdk/cas/audience-context.d.ts +33 -0
  140. package/dist/sdk/cas/audience-context.d.ts.map +1 -0
  141. package/dist/sdk/cas/audience-context.js +1 -0
  142. package/dist/sdk/cas/audience-context.js.map +1 -0
  143. package/dist/sdk/cas/cas-api-client.js +1 -1
  144. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  145. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  146. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  147. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  148. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  149. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  150. package/dist/sdk/cas/index.d.ts +8 -0
  151. package/dist/sdk/cas/index.d.ts.map +1 -1
  152. package/dist/sdk/cas/index.js +1 -1
  153. package/dist/sdk/cas/index.js.map +1 -1
  154. package/dist/sdk/cas/pull-workflow.js +1 -1
  155. package/dist/sdk/cas/push-workflow.js +1 -1
  156. package/dist/sdk/cas/validate-files.js +1 -1
  157. package/dist/sdk/client/cdp-api-client.js +1 -1
  158. package/dist/sdk/client/delivery-api-client.js +1 -1
  159. package/dist/sdk/client/endpoints.js +1 -1
  160. package/dist/sdk/client/engage-api-client.js +1 -1
  161. package/dist/sdk/client/http-client.js +1 -1
  162. package/dist/sdk/client/llm-api-client.js +1 -1
  163. package/dist/sdk/client/oauth-refresh.js +1 -1
  164. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  165. package/dist/sdk/client/rate-limiter.js +1 -1
  166. package/dist/sdk/client/td-api-client.js +1 -1
  167. package/dist/sdk/client/trino-api-client.js +1 -1
  168. package/dist/sdk/client/workflow-client.js +1 -1
  169. package/dist/sdk/connection-validator.js +1 -1
  170. package/dist/sdk/connection.js +1 -1
  171. package/dist/sdk/delivery.js +1 -1
  172. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  173. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  174. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  175. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  176. package/dist/sdk/engage/campaign-pull.js +1 -1
  177. package/dist/sdk/engage/campaign-push.js +1 -1
  178. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  179. package/dist/sdk/engage/campaign-readiness.js +1 -1
  180. package/dist/sdk/engage/campaign-validator.js +1 -1
  181. package/dist/sdk/engage/campaign-yaml.js +1 -1
  182. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  183. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  184. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  185. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  186. package/dist/sdk/engage/landing-page-init.js +1 -1
  187. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  188. package/dist/sdk/engage/landing-page-pull.js +1 -1
  189. package/dist/sdk/engage/landing-page-push.js +1 -1
  190. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  191. package/dist/sdk/engage/landing-page-validator.js +1 -1
  192. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  193. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  194. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  195. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  196. package/dist/sdk/engage/template-pull.js +1 -1
  197. package/dist/sdk/engage/template-push.js +1 -1
  198. package/dist/sdk/engage/template-validator.js +1 -1
  199. package/dist/sdk/engage/template-yaml.js +1 -1
  200. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  201. package/dist/sdk/engage/types/campaign-def.js +1 -1
  202. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  203. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  204. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  205. package/dist/sdk/engage/types/template-schema.js +1 -1
  206. package/dist/sdk/engage/workspace-assignments.js +1 -1
  207. package/dist/sdk/engage.js +1 -1
  208. package/dist/sdk/errors.js +1 -1
  209. package/dist/sdk/index.js +1 -1
  210. package/dist/sdk/io/index.js +1 -1
  211. package/dist/sdk/io/node-filesystem.js +1 -1
  212. package/dist/sdk/job.js +1 -1
  213. package/dist/sdk/journey.d.ts +4 -1
  214. package/dist/sdk/journey.d.ts.map +1 -1
  215. package/dist/sdk/journey.js +1 -1
  216. package/dist/sdk/journey.js.map +1 -1
  217. package/dist/sdk/llm/chat-cache.js +1 -1
  218. package/dist/sdk/llm/index.js +1 -1
  219. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  220. package/dist/sdk/llm/model-factors.d.ts +5 -3
  221. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  222. package/dist/sdk/llm/model-factors.js +1 -1
  223. package/dist/sdk/llm/model-factors.js.map +1 -1
  224. package/dist/sdk/llm/user-settings.js +1 -1
  225. package/dist/sdk/p13n-studio-errors.js +1 -1
  226. package/dist/sdk/p13n-studio.js +1 -1
  227. package/dist/sdk/personalization.js +1 -1
  228. package/dist/sdk/policy.js +1 -1
  229. package/dist/sdk/query/deleted-table-validation.js +1 -1
  230. package/dist/sdk/query/index.js +1 -1
  231. package/dist/sdk/query/sql-parser.js +1 -1
  232. package/dist/sdk/realtime.js +1 -1
  233. package/dist/sdk/schedule.js +1 -1
  234. package/dist/sdk/segment/audience-context.js +1 -1
  235. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  236. package/dist/sdk/segment/fields-display.js +1 -1
  237. package/dist/sdk/segment/file-discovery.js +1 -1
  238. package/dist/sdk/segment/journey-utils.js +1 -1
  239. package/dist/sdk/segment/journey-validator.js +1 -1
  240. package/dist/sdk/segment/journey-yaml.js +1 -1
  241. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  242. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  243. package/dist/sdk/segment/pull-workflow.js +1 -1
  244. package/dist/sdk/segment/push-recovery.js +1 -1
  245. package/dist/sdk/segment/push-workflow.js +1 -1
  246. package/dist/sdk/segment/resolution-context.js +1 -1
  247. package/dist/sdk/segment/segment-path-parser.js +1 -1
  248. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  249. package/dist/sdk/segment/segment-validator.js +1 -1
  250. package/dist/sdk/segment/target-resolution.js +1 -1
  251. package/dist/sdk/segment/tdx-config.js +1 -1
  252. package/dist/sdk/segment/types/activation-schema.js +1 -1
  253. package/dist/sdk/segment/types/journey-def.js +1 -1
  254. package/dist/sdk/segment/types/journey-schema.js +1 -1
  255. package/dist/sdk/segment/types/segment-def.js +1 -1
  256. package/dist/sdk/segment/types/segment-schema.js +1 -1
  257. package/dist/sdk/segment/validate-files.js +1 -1
  258. package/dist/sdk/segment/yaml-validator.js +1 -1
  259. package/dist/sdk/segment.js +1 -1
  260. package/dist/sdk/types/index.js +1 -1
  261. package/dist/sdk/types/progress.js +1 -1
  262. package/dist/sdk/types/workspace.js +1 -1
  263. package/dist/sdk/user.js +1 -1
  264. package/dist/sdk/util/format-detector.js +1 -1
  265. package/dist/sdk/util/formatters.js +1 -1
  266. package/dist/sdk/util/index.js +1 -1
  267. package/dist/sdk/util/paginate.js +1 -1
  268. package/dist/sdk/util/tree-formatter.js +1 -1
  269. package/dist/sdk/util/tree-search.js +1 -1
  270. package/dist/sdk/workflow/archive-validation.js +1 -1
  271. package/dist/sdk/workflow/clone-workflow.js +1 -1
  272. package/dist/sdk/workflow/index.js +1 -1
  273. package/dist/sdk/workflow/pull-workflow.js +1 -1
  274. package/dist/sdk/workflow/push-workflow.js +1 -1
  275. package/dist/sdk/workflow/task-graph.js +1 -1
  276. package/dist/sdk/workflow/tdx-config.js +1 -1
  277. package/dist/sdk/workflow/workflow-utils.js +1 -1
  278. package/dist/sdk/workspace/access-tracker.js +1 -1
  279. package/dist/sdk/workspace/frontmatter.js +1 -1
  280. package/dist/sdk/workspace/git.js +1 -1
  281. package/dist/sdk/workspace/index.js +1 -1
  282. package/dist/sdk/workspace/templates.js +1 -1
  283. package/dist/sdk/workspace/weekly.js +1 -1
  284. package/dist/sdk/workspace/wikilinks.js +1 -1
  285. package/dist/test-utils/command-runner.js +1 -1
  286. package/dist/test-utils/factories.js +1 -1
  287. package/dist/test-utils/fixtures.js +1 -1
  288. package/dist/test-utils/http-mock.js +1 -1
  289. package/dist/test-utils/index.js +1 -1
  290. package/dist/utils/async.js +1 -1
  291. package/dist/utils/claude-code-state.js +1 -1
  292. package/dist/utils/colors.js +1 -1
  293. package/dist/utils/diff.js +1 -1
  294. package/dist/utils/file-permissions.js +1 -1
  295. package/dist/utils/file-reader.js +1 -1
  296. package/dist/utils/github-releases.js +1 -1
  297. package/dist/utils/global-cache.js +1 -1
  298. package/dist/utils/json-loader.js +1 -1
  299. package/dist/utils/local-cache.js +1 -1
  300. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  301. package/dist/utils/logger/formatters/index.js +1 -1
  302. package/dist/utils/logger/handlers/console-handler.js +1 -1
  303. package/dist/utils/logger/handlers/file-handler.js +1 -1
  304. package/dist/utils/logger/handlers/index.js +1 -1
  305. package/dist/utils/logger/handlers/null-handler.js +1 -1
  306. package/dist/utils/logger/index.js +1 -1
  307. package/dist/utils/logger/logger.js +1 -1
  308. package/dist/utils/logger/types.js +1 -1
  309. package/dist/utils/option-validation.js +1 -1
  310. package/dist/utils/process.js +1 -1
  311. package/dist/utils/prompt.js +1 -1
  312. package/dist/utils/proxy-fetch.js +1 -1
  313. package/dist/utils/spinner.js +1 -1
  314. package/dist/utils/sse-parser.js +1 -1
  315. package/dist/utils/string-utils.js +1 -1
  316. package/dist/utils/table-ref-parser.js +1 -1
  317. package/dist/utils/tdx-logger.js +1 -1
  318. package/dist/utils/version-check.js +1 -1
  319. package/package.json +2 -1
@@ -1 +1 @@
1
- const a19_0x249e4e=a19_0x3a46;(function(_0x2055fd,_0x2b284b){const _0x3b476b=a19_0x3a46,_0x2bbc6a=_0x2055fd();while(!![]){try{const _0xa98029=parseInt(_0x3b476b(0xbe))/0x1*(-parseInt(_0x3b476b(0xb7))/0x2)+parseInt(_0x3b476b(0xc4))/0x3+parseInt(_0x3b476b(0xc6))/0x4+-parseInt(_0x3b476b(0xbb))/0x5+parseInt(_0x3b476b(0xb8))/0x6*(parseInt(_0x3b476b(0xbd))/0x7)+parseInt(_0x3b476b(0xc1))/0x8+parseInt(_0x3b476b(0xbf))/0x9;if(_0xa98029===_0x2b284b)break;else _0x2bbc6a['push'](_0x2bbc6a['shift']());}catch(_0x47ddfb){_0x2bbc6a['push'](_0x2bbc6a['shift']());}}}(a19_0x7ee6,0xe92c1));function a19_0x3a46(_0x10a0e4,_0x5f3704){_0x10a0e4=_0x10a0e4-0xb4;const _0x7ee6ef=a19_0x7ee6();let _0x3a46a5=_0x7ee6ef[_0x10a0e4];return _0x3a46a5;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{resolveWorkspaceIdFromOptions}from'./engage-command.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../core/constants.js';export class DeliveryEmailSendersCommand extends BaseCommand{[a19_0x249e4e(0xb9)]=a19_0x249e4e(0xbc);['description']=a19_0x249e4e(0xb6);async[a19_0x249e4e(0xc2)](_0x2d2a7f){const _0x46b25a=a19_0x249e4e,{options:_0x330a3f,args:_0x1a8745,tdx:_0x30d543}=_0x2d2a7f,_0x19e312=_0x1a8745[0x0],_0x8b78c5=resolveLimit(_0x330a3f[_0x46b25a(0xc5)],DEFAULT_LLM_LIMIT),_0x4f561b=_0x330a3f,_0x5a011a=await resolveWorkspaceIdFromOptions(_0x4f561b,_0x30d543),_0x1fccae=await withSpinner(_0x46b25a(0xc7),()=>_0x30d543[_0x46b25a(0xb4)][_0x46b25a(0xb5)]({'workspaceId':_0x5a011a,'limit':_0x8b78c5}),{'verbose':_0x330a3f[_0x46b25a(0xba)]});let _0x2c3077=_0x1fccae[_0x46b25a(0xc3)];return _0x19e312&&(_0x2c3077=_0x1fccae[_0x46b25a(0xc3)][_0x46b25a(0xc0)](_0x1963fa=>matchGlobPattern(_0x1963fa[_0x46b25a(0xb9)],_0x19e312))),await handleSDKOutput(_0x2c3077,_0x330a3f),0x0;}}function a19_0x7ee6(){const _0x377949=['execute','data','2139672vLNOIp','limit','7567504sMYjyd','Fetching\x20email\x20senders...','delivery','listEmailSenders','List\x20email\x20senders','2ByTBuI','6NurWAU','name','verbose','9515805AKRDjU','delivery:senders','1855210upTczM','324961YpvpBA','1079406gklREM','filter','1545048eeHKpg'];a19_0x7ee6=function(){return _0x377949;};return a19_0x7ee6();}
1
+ const a20_0x545d94=a20_0x4500;(function(_0x569881,_0x532a95){const _0x218dea=a20_0x4500,_0x71c265=_0x569881();while(!![]){try{const _0x15cb6b=-parseInt(_0x218dea(0xe1))/0x1*(-parseInt(_0x218dea(0xf0))/0x2)+parseInt(_0x218dea(0xe2))/0x3*(parseInt(_0x218dea(0xe3))/0x4)+parseInt(_0x218dea(0xdf))/0x5*(parseInt(_0x218dea(0xdd))/0x6)+-parseInt(_0x218dea(0xde))/0x7+-parseInt(_0x218dea(0xe5))/0x8+-parseInt(_0x218dea(0xeb))/0x9+parseInt(_0x218dea(0xea))/0xa*(-parseInt(_0x218dea(0xf1))/0xb);if(_0x15cb6b===_0x532a95)break;else _0x71c265['push'](_0x71c265['shift']());}catch(_0x3d11a0){_0x71c265['push'](_0x71c265['shift']());}}}(a20_0xfc53,0x4cece));import{BaseCommand}from'./command.js';function a20_0x4500(_0x16ec45,_0x17dfbd){_0x16ec45=_0x16ec45-0xdd;const _0xfc53c=a20_0xfc53();let _0x450054=_0xfc53c[_0x16ec45];return _0x450054;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';function a20_0xfc53(){const _0x31beb2=['14172IVltAY','data','1535952FYpnjy','name','description','delivery','filter','1030520RvfKIV','2373552yJswFm','execute','verbose','Fetching\x20email\x20senders...','limit','4VhEYIi','11lYOXzE','12lGcDLn','3640637jIJjTM','512780nWAlVh','List\x20email\x20senders','298579PEvMFm','501cMZfgW'];a20_0xfc53=function(){return _0x31beb2;};return a20_0xfc53();}import{resolveWorkspaceIdFromOptions}from'./engage-command.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../core/constants.js';export class DeliveryEmailSendersCommand extends BaseCommand{[a20_0x545d94(0xe6)]='delivery:senders';[a20_0x545d94(0xe7)]=a20_0x545d94(0xe0);async[a20_0x545d94(0xec)](_0xed4f89){const _0x421fec=a20_0x545d94,{options:_0x1d3317,args:_0x61d8b7,tdx:_0x43cc2b}=_0xed4f89,_0x98c97d=_0x61d8b7[0x0],_0x50c83c=resolveLimit(_0x1d3317[_0x421fec(0xef)],DEFAULT_LLM_LIMIT),_0x1db7a5=_0x1d3317,_0x379729=await resolveWorkspaceIdFromOptions(_0x1db7a5,_0x43cc2b),_0x3e05f8=await withSpinner(_0x421fec(0xee),()=>_0x43cc2b[_0x421fec(0xe8)]['listEmailSenders']({'workspaceId':_0x379729,'limit':_0x50c83c}),{'verbose':_0x1d3317[_0x421fec(0xed)]});let _0x22f430=_0x3e05f8['data'];return _0x98c97d&&(_0x22f430=_0x3e05f8[_0x421fec(0xe4)][_0x421fec(0xe9)](_0x1fd17c=>matchGlobPattern(_0x1fd17c['name'],_0x98c97d))),await handleSDKOutput(_0x22f430,_0x1d3317),0x0;}}
@@ -1 +1 @@
1
- function a20_0x5083(){const _0x48efc4=['8jmaLHr','some','Database:\x20','\x20column','1136535KyrDMk','Table:\x20','162QAvFAn','verbose','11099eIuYjJ','query','Error:\x20','✔\x20Found\x20','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','\x20in\x20','describe','map','database','message','describeTable','error','8992490MMenmo','cause','28HftgKm','Describe\x20table\x20schema','✖\x20Table\x20not\x20found','233365GoTpGX','Table\x20\x27','180944hSiJha','site','659846qLtTbf','validate','description','Site:\x20','length','125574KJdIMz','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','name','...','\x20\x20Cause:\x20','args'];a20_0x5083=function(){return _0x48efc4;};return a20_0x5083();}function a20_0x2ca3(_0x424068,_0x973d70){_0x424068=_0x424068-0x125;const _0x508396=a20_0x5083();let _0x2ca32b=_0x508396[_0x424068];return _0x2ca32b;}const a20_0x122592=a20_0x2ca3;(function(_0xad6eec,_0x551af0){const _0x1182ae=a20_0x2ca3,_0x47b1ba=_0xad6eec();while(!![]){try{const _0x608747=parseInt(_0x1182ae(0x13d))/0x1+parseInt(_0x1182ae(0x12a))/0x2+parseInt(_0x1182ae(0x139))/0x3+-parseInt(_0x1182ae(0x135))/0x4*(parseInt(_0x1182ae(0x126))/0x5)+-parseInt(_0x1182ae(0x12f))/0x6*(-parseInt(_0x1182ae(0x14b))/0x7)+parseInt(_0x1182ae(0x128))/0x8*(parseInt(_0x1182ae(0x13b))/0x9)+-parseInt(_0x1182ae(0x149))/0xa;if(_0x608747===_0x551af0)break;else _0x47b1ba['push'](_0x47b1ba['shift']());}catch(_0x2212de){_0x47b1ba['push'](_0x47b1ba['shift']());}}}(a20_0x5083,0x35400));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,resolveOutputOptions}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export function hideEmptyDescriptions(_0x581079){const _0x2c3b81=a20_0x2ca3;if(_0x581079[_0x2c3b81(0x136)](_0x57aa22=>_0x57aa22['description']))return _0x581079;return _0x581079[_0x2c3b81(0x144)](({description:_0x48ae66,..._0x484ce0})=>_0x484ce0);}export class DescribeCommand extends BaseCommand{[a20_0x122592(0x131)]=a20_0x122592(0x143);[a20_0x122592(0x12c)]=a20_0x122592(0x14c);async['execute'](_0x191810){const _0x169702=a20_0x122592;return this[_0x169702(0x147)](_0x191810);}async[a20_0x122592(0x147)](_0x30ef9f){const _0x370f55=a20_0x122592,{options:_0x28ebd0,args:_0x1abb84,tdx:_0x2349df}=_0x30ef9f;let _0x4b89e0;try{_0x4b89e0=parseTableReference(_0x1abb84[0x0]);const _0x53dfac=_0x28ebd0[_0x370f55(0x145)];!_0x4b89e0[_0x370f55(0x145)]&&_0x53dfac&&(_0x4b89e0['database']=_0x53dfac);const _0x21ab97=validateTableDescribeReference(_0x4b89e0);if(_0x21ab97)return console['error'](_0x370f55(0x13f)+_0x21ab97),0x1;}catch(_0x1f8b88){return console[_0x370f55(0x148)](_0x370f55(0x13f)+_0x1f8b88[_0x370f55(0x146)]),0x1;}const _0x1cdd93=_0x4b89e0['database'],_0x6f1e41=_0x4b89e0['table'];try{_0x28ebd0[_0x370f55(0x13c)]&&(console[_0x370f55(0x148)](_0x370f55(0x12d)+_0x28ebd0[_0x370f55(0x129)]),console[_0x370f55(0x148)](_0x370f55(0x137)+_0x1cdd93),console[_0x370f55(0x148)](_0x370f55(0x13a)+_0x6f1e41));const _0x5821d1=await withSpinner('Describing\x20table\x20'+_0x1cdd93+'.'+_0x6f1e41+_0x370f55(0x132),()=>_0x2349df[_0x370f55(0x13e)][_0x370f55(0x147)](_0x1cdd93,_0x6f1e41),{'verbose':_0x28ebd0[_0x370f55(0x13c)]}),_0x4b1782=_0x5821d1['data'];if(_0x4b1782[_0x370f55(0x12e)]===0x0)return console['error'](_0x370f55(0x125)),console['error'](_0x370f55(0x127)+_0x1cdd93+'.'+_0x6f1e41+'\x27\x20does\x20not\x20exist'),0x1;console[_0x370f55(0x148)](_0x370f55(0x140)+_0x4b1782[_0x370f55(0x12e)]+_0x370f55(0x138)+(_0x4b1782[_0x370f55(0x12e)]!==0x1?'s':'')+_0x370f55(0x142)+_0x1cdd93+'.'+_0x6f1e41);const {format:_0xf5b580}=resolveOutputOptions(_0x28ebd0);return await handleSDKOutput(_0xf5b580==='table'?hideEmptyDescriptions(_0x4b1782):_0x4b1782,_0x28ebd0),0x0;}catch(_0x5d8835){if(_0x5d8835 instanceof SDKError)return console['error'](_0x370f55(0x13f)+_0x5d8835[_0x370f55(0x146)]),_0x5d8835[_0x370f55(0x14a)]&&console[_0x370f55(0x148)](_0x370f55(0x133)+_0x5d8835['cause']),0x1;throw _0x5d8835;}}[a20_0x122592(0x12b)](_0x29bcaf){const _0x36d0e3=a20_0x122592;if(_0x29bcaf[_0x36d0e3(0x134)]['length']===0x0)return _0x36d0e3(0x141);if(_0x29bcaf[_0x36d0e3(0x134)][_0x36d0e3(0x12e)]>0x1)return _0x36d0e3(0x130);return undefined;}}
1
+ const a21_0x2cfd4d=a21_0x5536;(function(_0x4ff5d6,_0xbae4b0){const _0x3067ca=a21_0x5536,_0x4b821e=_0x4ff5d6();while(!![]){try{const _0x419222=-parseInt(_0x3067ca(0xf3))/0x1*(parseInt(_0x3067ca(0x102))/0x2)+parseInt(_0x3067ca(0x10d))/0x3+-parseInt(_0x3067ca(0xfa))/0x4+parseInt(_0x3067ca(0x110))/0x5+-parseInt(_0x3067ca(0x113))/0x6*(parseInt(_0x3067ca(0x115))/0x7)+parseInt(_0x3067ca(0x106))/0x8*(-parseInt(_0x3067ca(0xff))/0x9)+-parseInt(_0x3067ca(0x112))/0xa*(-parseInt(_0x3067ca(0xf8))/0xb);if(_0x419222===_0xbae4b0)break;else _0x4b821e['push'](_0x4b821e['shift']());}catch(_0xc4349a){_0x4b821e['push'](_0x4b821e['shift']());}}}(a21_0x1362,0x3aa4c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,resolveOutputOptions}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a21_0x5536(_0x32846c,_0xde5d56){_0x32846c=_0x32846c-0xef;const _0x1362e7=a21_0x1362();let _0x55367a=_0x1362e7[_0x32846c];return _0x55367a;}import{withSpinner}from'../utils/spinner.js';function a21_0x1362(){const _0x2338dd=['...','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','\x20\x20Cause:\x20','error','2037429CbxWMV','describe','validate','118lNoBbW','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','description','Describe\x20table\x20schema','8vEQVdF','Error:\x20','\x27\x20does\x20not\x20exist','message','\x20column','table','some','540591dtRgqD','describeTable','Table:\x20','155145XmIvlZ','Describing\x20table\x20','30kVmXwQ','5766BVnhHn','✖\x20Table\x20not\x20found','1799PBefTl','data','query','args','\x20in\x20','name','5734pcxweP','site','length','database','verbose','4164611eTiPFX','execute','1180644brIbMk'];a21_0x1362=function(){return _0x2338dd;};return a21_0x1362();}export function hideEmptyDescriptions(_0x3cb7bd){const _0x26fed2=a21_0x5536;if(_0x3cb7bd[_0x26fed2(0x10c)](_0x42acdc=>_0x42acdc[_0x26fed2(0x104)]))return _0x3cb7bd;return _0x3cb7bd['map'](({description:_0x454834,..._0x262ed6})=>_0x262ed6);}export class DescribeCommand extends BaseCommand{[a21_0x2cfd4d(0xf2)]=a21_0x2cfd4d(0x100);[a21_0x2cfd4d(0x104)]=a21_0x2cfd4d(0x105);async[a21_0x2cfd4d(0xf9)](_0x5d19dc){const _0x45e9f9=a21_0x2cfd4d;return this[_0x45e9f9(0x10e)](_0x5d19dc);}async[a21_0x2cfd4d(0x10e)](_0x2caaea){const _0x2414d3=a21_0x2cfd4d,{options:_0x51db75,args:_0x1dfa19,tdx:_0xbb4a0a}=_0x2caaea;let _0x36e119;try{_0x36e119=parseTableReference(_0x1dfa19[0x0]);const _0x3f11e2=_0x51db75[_0x2414d3(0xf6)];!_0x36e119[_0x2414d3(0xf6)]&&_0x3f11e2&&(_0x36e119[_0x2414d3(0xf6)]=_0x3f11e2);const _0x3fbe84=validateTableDescribeReference(_0x36e119);if(_0x3fbe84)return console[_0x2414d3(0xfe)](_0x2414d3(0x107)+_0x3fbe84),0x1;}catch(_0x43b831){return console['error'](_0x2414d3(0x107)+_0x43b831[_0x2414d3(0x109)]),0x1;}const _0x7deda2=_0x36e119[_0x2414d3(0xf6)],_0x1e23ce=_0x36e119[_0x2414d3(0x10b)];try{_0x51db75[_0x2414d3(0xf7)]&&(console['error']('Site:\x20'+_0x51db75[_0x2414d3(0xf4)]),console[_0x2414d3(0xfe)]('Database:\x20'+_0x7deda2),console[_0x2414d3(0xfe)](_0x2414d3(0x10f)+_0x1e23ce));const _0x3c7aa8=await withSpinner(_0x2414d3(0x111)+_0x7deda2+'.'+_0x1e23ce+_0x2414d3(0xfb),()=>_0xbb4a0a[_0x2414d3(0xef)][_0x2414d3(0x10e)](_0x7deda2,_0x1e23ce),{'verbose':_0x51db75[_0x2414d3(0xf7)]}),_0x391e65=_0x3c7aa8[_0x2414d3(0x116)];if(_0x391e65[_0x2414d3(0xf5)]===0x0)return console[_0x2414d3(0xfe)](_0x2414d3(0x114)),console[_0x2414d3(0xfe)]('Table\x20\x27'+_0x7deda2+'.'+_0x1e23ce+_0x2414d3(0x108)),0x1;console['error']('✔\x20Found\x20'+_0x391e65[_0x2414d3(0xf5)]+_0x2414d3(0x10a)+(_0x391e65[_0x2414d3(0xf5)]!==0x1?'s':'')+_0x2414d3(0xf1)+_0x7deda2+'.'+_0x1e23ce);const {format:_0x3b7e12}=resolveOutputOptions(_0x51db75);return await handleSDKOutput(_0x3b7e12===_0x2414d3(0x10b)?hideEmptyDescriptions(_0x391e65):_0x391e65,_0x51db75),0x0;}catch(_0x1ff050){if(_0x1ff050 instanceof SDKError)return console[_0x2414d3(0xfe)]('Error:\x20'+_0x1ff050['message']),_0x1ff050['cause']&&console[_0x2414d3(0xfe)](_0x2414d3(0xfd)+_0x1ff050['cause']),0x1;throw _0x1ff050;}}[a21_0x2cfd4d(0x101)](_0x2af38a){const _0x209c94=a21_0x2cfd4d;if(_0x2af38a[_0x209c94(0xf0)][_0x209c94(0xf5)]===0x0)return _0x209c94(0xfc);if(_0x2af38a[_0x209c94(0xf0)][_0x209c94(0xf5)]>0x1)return _0x209c94(0x103);return undefined;}}
@@ -1 +1 @@
1
- const a21_0x17fc0d=a21_0x33a4;(function(_0x18d0aa,_0x51fd07){const _0x2b611a=a21_0x33a4,_0x54ee94=_0x18d0aa();while(!![]){try{const _0x3cabf1=-parseInt(_0x2b611a(0x9c))/0x1*(parseInt(_0x2b611a(0x75))/0x2)+-parseInt(_0x2b611a(0x7b))/0x3+-parseInt(_0x2b611a(0x99))/0x4+parseInt(_0x2b611a(0x8a))/0x5+parseInt(_0x2b611a(0x88))/0x6*(parseInt(_0x2b611a(0x76))/0x7)+parseInt(_0x2b611a(0xa7))/0x8*(-parseInt(_0x2b611a(0xa8))/0x9)+parseInt(_0x2b611a(0xb7))/0xa;if(_0x3cabf1===_0x51fd07)break;else _0x54ee94['push'](_0x54ee94['shift']());}catch(_0x54d490){_0x54ee94['push'](_0x54ee94['shift']());}}}(a21_0x2167,0x7d979));function a21_0x33a4(_0x472027,_0x3b65e3){_0x472027=_0x472027-0x75;const _0x216753=a21_0x2167();let _0x33a405=_0x216753[_0x472027];return _0x33a405;}import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';function a21_0x2167(){const _0x3bb555=['125397YNTzuK','Resolving\x20workspace\x20\x27','counts','red','\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20pull\x20<workspace-name>','content','engage','engage_workspace','\x20always-on\x20campaign(s)','execute','length','cwd','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','dirname','22432680gVFcZn','Aborted.','yellow','config','green','850UfWPjG','14rYCwju','\x20files\x20to\x20','\x20changed\x20files','diff','\x20files?','1968225SswMmg','isNew','hasChanges','session','data','relativePath','campaigns','yes','workspace','error','\x20\x20Target:\x20','type','\x20new\x20files','738762IMPKnI','dim','1381540RZCOHp','targetDir','dryRun','\x20=\x20','\x27...','Pulling\x20always-on\x20campaigns\x20from\x20\x27','absolutePath','setPhase','verbose','name','repeat','Write\x20','No\x20always-on\x20campaigns\x20found\x20in\x20workspace\x20\x27','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','description','3677776ENKsxC','engage:always-on-campaign:pull','✔\x20All\x20files\x20are\x20up\x20to\x20date','1033CNyoik','Workspace\x20is\x20required.','cyan','\x0aChanges\x20to\x20\x27','files','\x0aError:','workspaceName','filter','\x0aPull\x20summary\x20for\x20workspace\x20\x27','utf-8','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','136IKnPEz'];a21_0x2167=function(){return _0x3bb555;};return a21_0x2167();}import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a21_0x5d6768 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a21_0x2988f4 from'path';import{pullAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-pull.js';export class EngageAlwaysOnCampaignPullCommand extends BaseCommand{['name']=a21_0x17fc0d(0x9a);[a21_0x17fc0d(0x98)]='Pull\x20always-on\x20campaigns\x20to\x20YAML\x20files';async[a21_0x17fc0d(0xb1)](_0x378a4d){const _0x207ff5=a21_0x17fc0d,{options:_0x189d49,args:_0x3d6537,tdx:_0x41a530}=_0x378a4d,_0x3ff4a3=_0x189d49,_0x4ea3b7=await resolveWorkspaceName(_0x3d6537[0x0],_0x3ff4a3);if(!_0x4ea3b7)return console[_0x207ff5(0x84)](a21_0x5d6768[_0x207ff5(0xb9)](_0x207ff5(0x9d))),console[_0x207ff5(0x84)](_0x207ff5(0xac)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20pull\x20--workspace\x20<name>'),console[_0x207ff5(0x84)](_0x207ff5(0x97)),0x1;const _0x4686e0=await withProgressSpinner(_0x207ff5(0xa9)+_0x4ea3b7+_0x207ff5(0x8e),()=>_0x41a530[_0x207ff5(0xae)]['resolveWorkspaceId'](_0x4ea3b7),{'verbose':_0x3ff4a3[_0x207ff5(0x92)]}),_0x5cbef8=_0x4686e0['data'],_0x36d6a0=await withProgressSpinner(_0x207ff5(0x8f)+_0x4ea3b7+_0x207ff5(0x8e),_0x33733d=>pullAlwaysOnCampaigns(_0x5cbef8,_0x4ea3b7,{'engage':_0x41a530['engage']},{'campaignName':_0x3ff4a3[_0x207ff5(0x93)],'campaignType':_0x3ff4a3[_0x207ff5(0x86)],'progress':{'update':_0x2d9c8c=>{const _0x56266a=_0x207ff5;_0x33733d[_0x56266a(0x91)](_0x2d9c8c);}}}),{'verbose':_0x3ff4a3[_0x207ff5(0x92)]}),_0x5961cd=_0x36d6a0[_0x207ff5(0x7f)];if(_0x5961cd[_0x207ff5(0xaa)][_0x207ff5(0x81)]===0x0)return console['error'](a21_0x5d6768[_0x207ff5(0xb9)](_0x207ff5(0x96)+_0x5961cd[_0x207ff5(0xa2)]+'\x27')),0x0;const _0x5576fa=_0x5961cd['files'][_0x207ff5(0xa3)](_0x49b2d8=>_0x49b2d8[_0x207ff5(0x7c)]),_0x389a34=_0x5961cd[_0x207ff5(0xa0)][_0x207ff5(0xa3)](_0x13c8f9=>!_0x13c8f9[_0x207ff5(0x7c)]&&_0x13c8f9[_0x207ff5(0x7d)]),_0x5d1d10=_0x5961cd[_0x207ff5(0xa0)][_0x207ff5(0xa3)](_0x21bc74=>!_0x21bc74[_0x207ff5(0x7c)]&&!_0x21bc74[_0x207ff5(0x7d)]);console[_0x207ff5(0x84)](_0x207ff5(0xa4)+_0x5961cd[_0x207ff5(0xa2)]+'\x27:'),console[_0x207ff5(0x84)]('\x20\x20'+a21_0x5d6768[_0x207ff5(0x9e)](_0x5961cd['counts'][_0x207ff5(0x81)]+_0x207ff5(0xb0))),console[_0x207ff5(0x84)]('\x20\x20'+a21_0x5d6768['green']('+\x20'+_0x5576fa[_0x207ff5(0xb2)]+_0x207ff5(0x87))),console['error']('\x20\x20'+a21_0x5d6768[_0x207ff5(0xb9)]('~\x20'+_0x389a34[_0x207ff5(0xb2)]+_0x207ff5(0x78))),console[_0x207ff5(0x84)]('\x20\x20'+a21_0x5d6768[_0x207ff5(0x89)]('=\x20'+_0x5d1d10[_0x207ff5(0xb2)]+'\x20unchanged\x20files')),console[_0x207ff5(0x84)](_0x207ff5(0x85)+a21_0x5d6768['cyan'](_0x5961cd[_0x207ff5(0x8b)])+'\x0a');if(_0x389a34[_0x207ff5(0xb2)]>0x0)for(const _0xb800b2 of _0x389a34){console[_0x207ff5(0x84)](_0x207ff5(0x9f)+_0xb800b2[_0x207ff5(0x80)]+'\x27:'),console[_0x207ff5(0x84)]('─'[_0x207ff5(0x94)](0x3c)),console[_0x207ff5(0x84)](_0xb800b2[_0x207ff5(0x79)]),console[_0x207ff5(0x84)]('─'[_0x207ff5(0x94)](0x3c));}if(_0x3ff4a3[_0x207ff5(0x8c)])return console[_0x207ff5(0x84)](a21_0x5d6768[_0x207ff5(0xb9)](_0x207ff5(0xa6))),0x0;if(_0x5576fa['length']===0x0&&_0x389a34[_0x207ff5(0xb2)]===0x0)return console[_0x207ff5(0x84)](a21_0x5d6768['green'](_0x207ff5(0x9b))),saveSessionContext({'engage_workspace':_0x5961cd[_0x207ff5(0xa2)]},_0x3ff4a3[_0x207ff5(0x7e)]),0x0;if(!_0x3ff4a3[_0x207ff5(0x82)]){if(!isInteractive())return console[_0x207ff5(0x84)](a21_0x5d6768[_0x207ff5(0xab)](_0x207ff5(0xa1)),_0x207ff5(0xb5)),console[_0x207ff5(0x84)](a21_0x5d6768[_0x207ff5(0x89)](_0x207ff5(0xb4))),0x1;const _0x15dee6=await confirmKey(_0x207ff5(0x95)+(_0x5576fa[_0x207ff5(0xb2)]+_0x389a34[_0x207ff5(0xb2)])+_0x207ff5(0x7a));if(!_0x15dee6)return console[_0x207ff5(0x84)](a21_0x5d6768[_0x207ff5(0xb9)](_0x207ff5(0xb8)),'-\x20no\x20files\x20written'),0x1;}for(const _0x2d5b4c of _0x5961cd[_0x207ff5(0xa0)]){if(_0x2d5b4c[_0x207ff5(0x7c)]||_0x2d5b4c[_0x207ff5(0x7d)]){const _0x3ce3ce=a21_0x2988f4[_0x207ff5(0xb6)](_0x2d5b4c['absolutePath']);!existsSync(_0x3ce3ce)&&mkdirSync(_0x3ce3ce,{'recursive':!![]}),writeFileSync(_0x2d5b4c[_0x207ff5(0x90)],_0x2d5b4c[_0x207ff5(0xad)],_0x207ff5(0xa5));}}return console[_0x207ff5(0x84)](a21_0x5d6768[_0x207ff5(0xbb)]('✔\x20Pulled\x20'+(_0x5576fa[_0x207ff5(0xb2)]+_0x389a34[_0x207ff5(0xb2)])+_0x207ff5(0x77)+_0x5961cd[_0x207ff5(0x8b)])),saveSessionContext({'engage_workspace':_0x5961cd[_0x207ff5(0xa2)]},_0x3ff4a3[_0x207ff5(0x7e)]),console['error'](a21_0x5d6768[_0x207ff5(0xbb)]('✔\x20Context\x20set:\x20'+a21_0x5d6768[_0x207ff5(0x89)](_0x207ff5(0xaf))+_0x207ff5(0x8d)+a21_0x5d6768[_0x207ff5(0x9e)](_0x5961cd[_0x207ff5(0xa2)]))),0x0;}}async function resolveWorkspaceName(_0x4a825f,_0x293ec9){const _0x1f98af=a21_0x17fc0d;if(_0x4a825f)return _0x4a825f;if(_0x293ec9['workspace'])return _0x293ec9[_0x1f98af(0x83)];const _0x429918=tryFindTdxConfig(process[_0x1f98af(0xb3)]());if(_0x429918?.[_0x1f98af(0xba)]['engage_workspace'])return _0x429918[_0x1f98af(0xba)][_0x1f98af(0xaf)];const _0x19a34d=loadSessionContext(_0x293ec9[_0x1f98af(0x7e)]);if(_0x19a34d?.[_0x1f98af(0xaf)])return _0x19a34d['engage_workspace'];return undefined;}
1
+ const a22_0x41ac62=a22_0x4654;(function(_0x13f47b,_0x2455ca){const _0x5d8e2f=a22_0x4654,_0x42cf93=_0x13f47b();while(!![]){try{const _0x53b801=-parseInt(_0x5d8e2f(0xb1))/0x1+-parseInt(_0x5d8e2f(0xcc))/0x2+parseInt(_0x5d8e2f(0xc5))/0x3*(parseInt(_0x5d8e2f(0xca))/0x4)+parseInt(_0x5d8e2f(0xbc))/0x5*(parseInt(_0x5d8e2f(0x9a))/0x6)+-parseInt(_0x5d8e2f(0xb7))/0x7*(-parseInt(_0x5d8e2f(0x9f))/0x8)+parseInt(_0x5d8e2f(0xc3))/0x9+-parseInt(_0x5d8e2f(0xd7))/0xa;if(_0x53b801===_0x2455ca)break;else _0x42cf93['push'](_0x42cf93['shift']());}catch(_0x4cbb71){_0x42cf93['push'](_0x42cf93['shift']());}}}(a22_0x44da,0x6a52e));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';function a22_0x44da(){const _0x2d6cf7=['\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','114450cUXxXI','\x27...','repeat','green','Pull\x20always-on\x20campaigns\x20to\x20YAML\x20files','type','\x0aChanges\x20to\x20\x27','4938Ipmaaq','error','data','dryRun','isNew','8vrwcNM','content','engage:always-on-campaign:pull','hasChanges','length','\x0aError:','absolutePath','execute','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20pull\x20--workspace\x20<name>','workspace','targetDir','No\x20always-on\x20campaigns\x20found\x20in\x20workspace\x20\x27','-\x20no\x20files\x20written','resolveWorkspaceId','description','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','files','693666wxZVzu','engage','session','yellow','\x0aPull\x20summary\x20for\x20workspace\x20\x27','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','745598VdOWvK','✔\x20Pulled\x20','filter','config','campaigns','3845gSYSPI','✔\x20All\x20files\x20are\x20up\x20to\x20date','✔\x20Context\x20set:\x20','setPhase','dim','Pulling\x20always-on\x20campaigns\x20from\x20\x27','workspaceName','4379904cKaCRD','Aborted.','50223lgjjKf','engage_workspace','counts','\x20unchanged\x20files','cyan','20OnEhkN','dirname','338298gKPLaG','verbose','yes','name','Resolving\x20workspace\x20\x27','\x20files\x20to\x20','\x20new\x20files','cwd','utf-8','\x20changed\x20files'];a22_0x44da=function(){return _0x2d6cf7;};return a22_0x44da();}import a22_0x58bb9e from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';function a22_0x4654(_0x35d1fc,_0x476958){_0x35d1fc=_0x35d1fc-0x96;const _0x44da6c=a22_0x44da();let _0x465436=_0x44da6c[_0x35d1fc];return _0x465436;}import a22_0x42348c from'path';import{pullAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-pull.js';export class EngageAlwaysOnCampaignPullCommand extends BaseCommand{['name']=a22_0x41ac62(0xa1);[a22_0x41ac62(0xad)]=a22_0x41ac62(0x97);async[a22_0x41ac62(0xa6)](_0x546cdb){const _0x40e709=a22_0x41ac62,{options:_0x5d2ff7,args:_0x56f783,tdx:_0xefb592}=_0x546cdb,_0xa4f1f9=_0x5d2ff7,_0x430bf5=await resolveWorkspaceName(_0x56f783[0x0],_0xa4f1f9);if(!_0x430bf5)return console['error'](a22_0x58bb9e[_0x40e709(0xb4)]('Workspace\x20is\x20required.')),console['error']('\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20pull\x20<workspace-name>'),console[_0x40e709(0x9b)](_0x40e709(0xa7)),console[_0x40e709(0x9b)](_0x40e709(0xb6)),0x1;const _0x14681f=await withProgressSpinner(_0x40e709(0xd0)+_0x430bf5+_0x40e709(0xd8),()=>_0xefb592[_0x40e709(0xb2)][_0x40e709(0xac)](_0x430bf5),{'verbose':_0xa4f1f9[_0x40e709(0xcd)]}),_0x21136e=_0x14681f[_0x40e709(0x9c)],_0x4f39b1=await withProgressSpinner(_0x40e709(0xc1)+_0x430bf5+_0x40e709(0xd8),_0x11d119=>pullAlwaysOnCampaigns(_0x21136e,_0x430bf5,{'engage':_0xefb592[_0x40e709(0xb2)]},{'campaignName':_0xa4f1f9[_0x40e709(0xcf)],'campaignType':_0xa4f1f9[_0x40e709(0x98)],'progress':{'update':_0x2f827e=>{const _0x53f54d=_0x40e709;_0x11d119[_0x53f54d(0xbf)](_0x2f827e);}}}),{'verbose':_0xa4f1f9[_0x40e709(0xcd)]}),_0xded802=_0x4f39b1[_0x40e709(0x9c)];if(_0xded802['counts'][_0x40e709(0xbb)]===0x0)return console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0xb4)](_0x40e709(0xaa)+_0xded802[_0x40e709(0xc2)]+'\x27')),0x0;const _0x450978=_0xded802['files'][_0x40e709(0xb9)](_0x56c83e=>_0x56c83e[_0x40e709(0x9e)]),_0x3b4d36=_0xded802[_0x40e709(0xb0)]['filter'](_0x64a66=>!_0x64a66['isNew']&&_0x64a66[_0x40e709(0xa2)]),_0x5bbe55=_0xded802[_0x40e709(0xb0)][_0x40e709(0xb9)](_0x2b4e3a=>!_0x2b4e3a[_0x40e709(0x9e)]&&!_0x2b4e3a['hasChanges']);console[_0x40e709(0x9b)](_0x40e709(0xb5)+_0xded802[_0x40e709(0xc2)]+'\x27:'),console[_0x40e709(0x9b)]('\x20\x20'+a22_0x58bb9e[_0x40e709(0xc9)](_0xded802[_0x40e709(0xc7)][_0x40e709(0xbb)]+'\x20always-on\x20campaign(s)')),console[_0x40e709(0x9b)]('\x20\x20'+a22_0x58bb9e[_0x40e709(0x96)]('+\x20'+_0x450978[_0x40e709(0xa3)]+_0x40e709(0xd2))),console[_0x40e709(0x9b)]('\x20\x20'+a22_0x58bb9e[_0x40e709(0xb4)]('~\x20'+_0x3b4d36[_0x40e709(0xa3)]+_0x40e709(0xd5))),console['error']('\x20\x20'+a22_0x58bb9e[_0x40e709(0xc0)]('=\x20'+_0x5bbe55['length']+_0x40e709(0xc8))),console[_0x40e709(0x9b)]('\x20\x20Target:\x20'+a22_0x58bb9e[_0x40e709(0xc9)](_0xded802[_0x40e709(0xa9)])+'\x0a');if(_0x3b4d36[_0x40e709(0xa3)]>0x0)for(const _0x3e648b of _0x3b4d36){console['error'](_0x40e709(0x99)+_0x3e648b['relativePath']+'\x27:'),console[_0x40e709(0x9b)]('─'['repeat'](0x3c)),console[_0x40e709(0x9b)](_0x3e648b['diff']),console[_0x40e709(0x9b)]('─'[_0x40e709(0xd9)](0x3c));}if(_0xa4f1f9[_0x40e709(0x9d)])return console[_0x40e709(0x9b)](a22_0x58bb9e['yellow'](_0x40e709(0xd6))),0x0;if(_0x450978[_0x40e709(0xa3)]===0x0&&_0x3b4d36[_0x40e709(0xa3)]===0x0)return console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0x96)](_0x40e709(0xbd))),saveSessionContext({'engage_workspace':_0xded802[_0x40e709(0xc2)]},_0xa4f1f9[_0x40e709(0xb3)]),0x0;if(!_0xa4f1f9[_0x40e709(0xce)]){if(!isInteractive())return console['error'](a22_0x58bb9e['red'](_0x40e709(0xa4)),_0x40e709(0xae)),console[_0x40e709(0x9b)](a22_0x58bb9e['dim'](_0x40e709(0xaf))),0x1;const _0x16ee62=await confirmKey('Write\x20'+(_0x450978['length']+_0x3b4d36[_0x40e709(0xa3)])+'\x20files?');if(!_0x16ee62)return console['error'](a22_0x58bb9e[_0x40e709(0xb4)](_0x40e709(0xc4)),_0x40e709(0xab)),0x1;}for(const _0x5ad0df of _0xded802[_0x40e709(0xb0)]){if(_0x5ad0df[_0x40e709(0x9e)]||_0x5ad0df[_0x40e709(0xa2)]){const _0x495f00=a22_0x42348c[_0x40e709(0xcb)](_0x5ad0df[_0x40e709(0xa5)]);!existsSync(_0x495f00)&&mkdirSync(_0x495f00,{'recursive':!![]}),writeFileSync(_0x5ad0df[_0x40e709(0xa5)],_0x5ad0df[_0x40e709(0xa0)],_0x40e709(0xd4));}}return console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0x96)](_0x40e709(0xb8)+(_0x450978[_0x40e709(0xa3)]+_0x3b4d36['length'])+_0x40e709(0xd1)+_0xded802['targetDir'])),saveSessionContext({'engage_workspace':_0xded802['workspaceName']},_0xa4f1f9['session']),console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0x96)](_0x40e709(0xbe)+a22_0x58bb9e['dim'](_0x40e709(0xc6))+'\x20=\x20'+a22_0x58bb9e[_0x40e709(0xc9)](_0xded802[_0x40e709(0xc2)]))),0x0;}}async function resolveWorkspaceName(_0x12c645,_0x13434b){const _0x425a7d=a22_0x41ac62;if(_0x12c645)return _0x12c645;if(_0x13434b[_0x425a7d(0xa8)])return _0x13434b['workspace'];const _0x2dfb5d=tryFindTdxConfig(process[_0x425a7d(0xd3)]());if(_0x2dfb5d?.[_0x425a7d(0xba)][_0x425a7d(0xc6)])return _0x2dfb5d[_0x425a7d(0xba)][_0x425a7d(0xc6)];const _0x58961d=loadSessionContext(_0x13434b[_0x425a7d(0xb3)]);if(_0x58961d?.[_0x425a7d(0xc6)])return _0x58961d['engage_workspace'];return undefined;}
@@ -1 +1 @@
1
- const a22_0x8af067=a22_0x403b;(function(_0x2896ba,_0x27908c){const _0x4969b4=a22_0x403b,_0x4e41cc=_0x2896ba();while(!![]){try{const _0xae1098=parseInt(_0x4969b4(0x147))/0x1+parseInt(_0x4969b4(0x152))/0x2*(parseInt(_0x4969b4(0x134))/0x3)+-parseInt(_0x4969b4(0x15b))/0x4*(-parseInt(_0x4969b4(0x13d))/0x5)+-parseInt(_0x4969b4(0x15a))/0x6*(-parseInt(_0x4969b4(0x14e))/0x7)+-parseInt(_0x4969b4(0x149))/0x8+-parseInt(_0x4969b4(0x14f))/0x9*(-parseInt(_0x4969b4(0x140))/0xa)+-parseInt(_0x4969b4(0x155))/0xb*(parseInt(_0x4969b4(0x135))/0xc);if(_0xae1098===_0x27908c)break;else _0x4e41cc['push'](_0x4e41cc['shift']());}catch(_0x5b4146){_0x4e41cc['push'](_0x4e41cc['shift']());}}}(a22_0x33e0,0x98b0e));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';function a22_0x33e0(){const _0x21c7e7=['117AXgNqr','\x0aPush\x20summary\x20for\x20workspace\x20\x27','dim','2ErrVjr','\x20=\x20','engage_workspace','861982oVsjOR','errors','\x0aErrors:','✔\x20Pushed\x20','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','54FfTbJe','18056cJAJmu','config','length','name','endsWith','\x20campaign(s)\x20updated','execute','resolveWorkspaceId','red','cwd','\x27...','\x20campaign(s)\x20created','verbose','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20always-on\x20campaigns','cyan','engage','495309tEyOMd','144QUjDTm','Pushing\x20always-on\x20campaigns\x20to\x20\x27','\x20campaign(s)\x20unchanged','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','data','created','engage:always-on-campaign:push','Workspace\x20is\x20required.','10eqjxEI','sep','\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20push\x20<dir-or-file>','853030rfyscL','green','dryRun','.yaml','segment','session','unchanged','659813QniHTx','yellow','3347920mAmlbO','updated','workspace','error','includes','32179ARcURb'];a22_0x33e0=function(){return _0x21c7e7;};return a22_0x33e0();}import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a22_0x415609 from'chalk';import a22_0x462174 from'path';import{pushAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-push.js';function a22_0x403b(_0x14c740,_0xd0a9fd){_0x14c740=_0x14c740-0x12c;const _0x33e0d0=a22_0x33e0();let _0x403bc3=_0x33e0d0[_0x14c740];return _0x403bc3;}export class EngageAlwaysOnCampaignPushCommand extends BaseCommand{[a22_0x8af067(0x15e)]=a22_0x8af067(0x13b);['description']=a22_0x8af067(0x131);async[a22_0x8af067(0x161)](_0xe04412){const _0x4900ab=a22_0x8af067,{options:_0x3d49bd,args:_0x119915,tdx:_0x45498f}=_0xe04412,_0x319d2e=_0x3d49bd,_0x40073a=_0x119915[0x0],_0x4b1153=_0x40073a?a22_0x462174['resolve'](_0x40073a):process['cwd'](),_0x4718b3=await resolveWorkspaceName(_0x40073a,_0x319d2e);if(!_0x4718b3)return console[_0x4900ab(0x14c)](a22_0x415609['yellow'](_0x4900ab(0x13c))),console[_0x4900ab(0x14c)](_0x4900ab(0x13f)),console[_0x4900ab(0x14c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20push\x20--workspace\x20<name>'),console[_0x4900ab(0x14c)](_0x4900ab(0x138)),0x1;const _0x540b54=await withProgressSpinner('Resolving\x20workspace\x20\x27'+_0x4718b3+_0x4900ab(0x12e),()=>_0x45498f['engage'][_0x4900ab(0x162)](_0x4718b3),{'verbose':_0x319d2e[_0x4900ab(0x130)]}),_0x4753b6=_0x540b54['data'],_0x5f4f32=await withProgressSpinner(_0x4900ab(0x136)+_0x4718b3+_0x4900ab(0x12e),_0x20bace=>pushAlwaysOnCampaigns(_0x4b1153,_0x4753b6,{'engage':_0x45498f[_0x4900ab(0x133)],'segment':_0x45498f[_0x4900ab(0x144)]},{'dryRun':_0x319d2e[_0x4900ab(0x142)],'progress':{'update':_0x1015f3=>{_0x20bace['setPhase'](_0x1015f3);}}}),{'verbose':_0x319d2e[_0x4900ab(0x130)]}),_0x482df4=_0x5f4f32[_0x4900ab(0x139)];if(_0x482df4[_0x4900ab(0x156)]['length']>0x0){console[_0x4900ab(0x14c)](a22_0x415609['red'](_0x4900ab(0x157)));for(const _0xa20892 of _0x482df4[_0x4900ab(0x156)]){console[_0x4900ab(0x14c)]('\x20\x20'+a22_0x415609[_0x4900ab(0x12c)]('✗')+'\x20'+_0xa20892[_0x4900ab(0x15e)]+':\x20'+_0xa20892[_0x4900ab(0x14c)]);}}console['error'](_0x4900ab(0x150)+_0x4718b3+'\x27:'),console['error']('\x20\x20'+a22_0x415609[_0x4900ab(0x141)]('+\x20'+_0x482df4[_0x4900ab(0x13a)]+_0x4900ab(0x12f))),console[_0x4900ab(0x14c)]('\x20\x20'+a22_0x415609[_0x4900ab(0x148)]('~\x20'+_0x482df4[_0x4900ab(0x14a)]+_0x4900ab(0x160))),console[_0x4900ab(0x14c)]('\x20\x20'+a22_0x415609[_0x4900ab(0x151)]('=\x20'+_0x482df4[_0x4900ab(0x146)]+_0x4900ab(0x137)));if(_0x319d2e[_0x4900ab(0x142)])return console[_0x4900ab(0x14c)](a22_0x415609[_0x4900ab(0x148)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(_0x482df4['created']===0x0&&_0x482df4[_0x4900ab(0x14a)]===0x0)return console[_0x4900ab(0x14c)](a22_0x415609[_0x4900ab(0x141)](_0x4900ab(0x159))),saveSessionContext({'engage_workspace':_0x4718b3},_0x319d2e['session']),_0x482df4['errors'][_0x4900ab(0x15d)]>0x0?0x1:0x0;return console[_0x4900ab(0x14c)](a22_0x415609[_0x4900ab(0x141)](_0x4900ab(0x158)+(_0x482df4[_0x4900ab(0x13a)]+_0x482df4[_0x4900ab(0x14a)])+'\x20always-on\x20campaign(s)')),saveSessionContext({'engage_workspace':_0x4718b3},_0x319d2e[_0x4900ab(0x145)]),console[_0x4900ab(0x14c)](a22_0x415609['green']('✔\x20Context\x20set:\x20'+a22_0x415609['dim'](_0x4900ab(0x154))+_0x4900ab(0x153)+a22_0x415609[_0x4900ab(0x132)](_0x4718b3))),_0x482df4[_0x4900ab(0x156)][_0x4900ab(0x15d)]>0x0?0x1:0x0;}}async function resolveWorkspaceName(_0x2ac85b,_0x1273b9){const _0x609203=a22_0x8af067;if(_0x2ac85b&&!_0x2ac85b[_0x609203(0x14d)](a22_0x462174[_0x609203(0x13e)])&&!_0x2ac85b['endsWith'](_0x609203(0x143)))return _0x2ac85b;if(_0x1273b9[_0x609203(0x14b)])return _0x1273b9['workspace'];const _0x49eba6=_0x2ac85b&&(_0x2ac85b['includes'](a22_0x462174[_0x609203(0x13e)])||_0x2ac85b[_0x609203(0x15f)](_0x609203(0x143)))?a22_0x462174['resolve'](_0x2ac85b):process[_0x609203(0x12d)](),_0x78c288=tryFindTdxConfig(_0x49eba6);if(_0x78c288?.[_0x609203(0x15c)][_0x609203(0x154)])return _0x78c288[_0x609203(0x15c)]['engage_workspace'];const _0x28b312=loadSessionContext(_0x1273b9[_0x609203(0x145)]);if(_0x28b312?.[_0x609203(0x154)])return _0x28b312[_0x609203(0x154)];return undefined;}
1
+ const a23_0x319fa2=a23_0x3669;(function(_0x44b33f,_0x11c382){const _0x5de1b3=a23_0x3669,_0x461369=_0x44b33f();while(!![]){try{const _0x1846db=-parseInt(_0x5de1b3(0x215))/0x1+parseInt(_0x5de1b3(0x200))/0x2*(-parseInt(_0x5de1b3(0x1fa))/0x3)+-parseInt(_0x5de1b3(0x1f8))/0x4+-parseInt(_0x5de1b3(0x214))/0x5*(parseInt(_0x5de1b3(0x203))/0x6)+parseInt(_0x5de1b3(0x1fd))/0x7*(parseInt(_0x5de1b3(0x210))/0x8)+parseInt(_0x5de1b3(0x20f))/0x9*(-parseInt(_0x5de1b3(0x20e))/0xa)+parseInt(_0x5de1b3(0x20c))/0xb*(parseInt(_0x5de1b3(0x1f1))/0xc);if(_0x1846db===_0x11c382)break;else _0x461369['push'](_0x461369['shift']());}catch(_0x32e9ce){_0x461369['push'](_0x461369['shift']());}}}(a23_0x1709,0xaf051));import{BaseCommand}from'./command.js';function a23_0x1709(){const _0x488924=['\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','\x20=\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20push\x20--workspace\x20<name>','dim','resolveWorkspaceId','name','cyan','\x27...','red','updated','config','segment','green','52196316ecwirQ','\x20campaign(s)\x20updated','workspace','data','session','cwd','yellow','4136160VHuBYB','execute','9virWrB','engage_workspace','errors','7728826lOrFqD','endsWith','description','926996byrmEL','sep','includes','3006LxqHQW','engage','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','resolve','\x20campaign(s)\x20created','engage:always-on-campaign:push','length','\x0aPush\x20summary\x20for\x20workspace\x20\x27','dryRun','11FCNMQQ','verbose','490sTqKMl','28818ZEsuXr','8yYzkEz','✔\x20Pushed\x20','\x0aErrors:','.yaml','9455XEinwx','1208107QCxHew','error','created','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20always-on\x20campaigns'];a23_0x1709=function(){return _0x488924;};return a23_0x1709();}import{withProgressSpinner}from'../utils/spinner.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a23_0x457dad from'chalk';function a23_0x3669(_0xa2a165,_0x519b51){_0xa2a165=_0xa2a165-0x1e4;const _0x170973=a23_0x1709();let _0x366990=_0x170973[_0xa2a165];return _0x366990;}import a23_0x44d3aa from'path';import{pushAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-push.js';export class EngageAlwaysOnCampaignPushCommand extends BaseCommand{[a23_0x319fa2(0x1e9)]=a23_0x319fa2(0x208);[a23_0x319fa2(0x1ff)]=a23_0x319fa2(0x218);async[a23_0x319fa2(0x1f9)](_0x517507){const _0x50998f=a23_0x319fa2,{options:_0xdbdf2d,args:_0x48bb0e,tdx:_0xf0f112}=_0x517507,_0x3a1d8e=_0xdbdf2d,_0x484d5d=_0x48bb0e[0x0],_0x5d1936=_0x484d5d?a23_0x44d3aa[_0x50998f(0x206)](_0x484d5d):process[_0x50998f(0x1f6)](),_0xf5dace=await resolveWorkspaceName(_0x484d5d,_0x3a1d8e);if(!_0xf5dace)return console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f7)]('Workspace\x20is\x20required.')),console[_0x50998f(0x216)]('\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20push\x20<dir-or-file>'),console[_0x50998f(0x216)](_0x50998f(0x1e6)),console[_0x50998f(0x216)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;const _0x3a1a83=await withProgressSpinner('Resolving\x20workspace\x20\x27'+_0xf5dace+_0x50998f(0x1eb),()=>_0xf0f112[_0x50998f(0x204)][_0x50998f(0x1e8)](_0xf5dace),{'verbose':_0x3a1d8e[_0x50998f(0x20d)]}),_0x79d8e6=_0x3a1a83[_0x50998f(0x1f4)],_0x8d6849=await withProgressSpinner('Pushing\x20always-on\x20campaigns\x20to\x20\x27'+_0xf5dace+'\x27...',_0x561dd1=>pushAlwaysOnCampaigns(_0x5d1936,_0x79d8e6,{'engage':_0xf0f112[_0x50998f(0x204)],'segment':_0xf0f112[_0x50998f(0x1ef)]},{'dryRun':_0x3a1d8e[_0x50998f(0x20b)],'progress':{'update':_0x2ee822=>{_0x561dd1['setPhase'](_0x2ee822);}}}),{'verbose':_0x3a1d8e[_0x50998f(0x20d)]}),_0x349fa9=_0x8d6849[_0x50998f(0x1f4)];if(_0x349fa9[_0x50998f(0x1fc)]['length']>0x0){console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1ec)](_0x50998f(0x212)));for(const _0x5d095a of _0x349fa9[_0x50998f(0x1fc)]){console[_0x50998f(0x216)]('\x20\x20'+a23_0x457dad[_0x50998f(0x1ec)]('✗')+'\x20'+_0x5d095a[_0x50998f(0x1e9)]+':\x20'+_0x5d095a['error']);}}console[_0x50998f(0x216)](_0x50998f(0x20a)+_0xf5dace+'\x27:'),console[_0x50998f(0x216)]('\x20\x20'+a23_0x457dad[_0x50998f(0x1f0)]('+\x20'+_0x349fa9[_0x50998f(0x217)]+_0x50998f(0x207))),console[_0x50998f(0x216)]('\x20\x20'+a23_0x457dad[_0x50998f(0x1f7)]('~\x20'+_0x349fa9['updated']+_0x50998f(0x1f2))),console['error']('\x20\x20'+a23_0x457dad[_0x50998f(0x1e7)]('=\x20'+_0x349fa9['unchanged']+'\x20campaign(s)\x20unchanged'));if(_0x3a1d8e[_0x50998f(0x20b)])return console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f7)](_0x50998f(0x1e4))),0x0;if(_0x349fa9['created']===0x0&&_0x349fa9['updated']===0x0)return console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f0)](_0x50998f(0x205))),saveSessionContext({'engage_workspace':_0xf5dace},_0x3a1d8e[_0x50998f(0x1f5)]),_0x349fa9[_0x50998f(0x1fc)][_0x50998f(0x209)]>0x0?0x1:0x0;return console['error'](a23_0x457dad['green'](_0x50998f(0x211)+(_0x349fa9[_0x50998f(0x217)]+_0x349fa9[_0x50998f(0x1ed)])+'\x20always-on\x20campaign(s)')),saveSessionContext({'engage_workspace':_0xf5dace},_0x3a1d8e[_0x50998f(0x1f5)]),console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f0)]('✔\x20Context\x20set:\x20'+a23_0x457dad[_0x50998f(0x1e7)](_0x50998f(0x1fb))+_0x50998f(0x1e5)+a23_0x457dad[_0x50998f(0x1ea)](_0xf5dace))),_0x349fa9[_0x50998f(0x1fc)][_0x50998f(0x209)]>0x0?0x1:0x0;}}async function resolveWorkspaceName(_0x1e853b,_0x2ad59f){const _0x2645f2=a23_0x319fa2;if(_0x1e853b&&!_0x1e853b[_0x2645f2(0x202)](a23_0x44d3aa[_0x2645f2(0x201)])&&!_0x1e853b[_0x2645f2(0x1fe)](_0x2645f2(0x213)))return _0x1e853b;if(_0x2ad59f[_0x2645f2(0x1f3)])return _0x2ad59f[_0x2645f2(0x1f3)];const _0x1fe4af=_0x1e853b&&(_0x1e853b['includes'](a23_0x44d3aa['sep'])||_0x1e853b['endsWith'](_0x2645f2(0x213)))?a23_0x44d3aa[_0x2645f2(0x206)](_0x1e853b):process[_0x2645f2(0x1f6)](),_0x19bff6=tryFindTdxConfig(_0x1fe4af);if(_0x19bff6?.['config'][_0x2645f2(0x1fb)])return _0x19bff6[_0x2645f2(0x1ee)][_0x2645f2(0x1fb)];const _0x29441b=loadSessionContext(_0x2ad59f[_0x2645f2(0x1f5)]);if(_0x29441b?.[_0x2645f2(0x1fb)])return _0x29441b[_0x2645f2(0x1fb)];return undefined;}
@@ -1 +1 @@
1
- function a23_0x4bf1(_0xd993e7,_0x5b004f){_0xd993e7=_0xd993e7-0xfd;const _0x2e1f3d=a23_0x2e1f();let _0x4bf17f=_0x2e1f3d[_0xd993e7];return _0x4bf17f;}function a23_0x2e1f(){const _0x467c46=['7jSfnuG','length','red','418CgBpkd','error','log','bold','1474696Iaxcno','2KdAWQi','222XbVBNh','\x20valid,\x20','\x20error(s)','warn','4379645IQodcg','yellow','message','always_on_campaign','valid','45532UVRexI','type','path','\x20invalid','map','Failed\x20to\x20parse','2973170wiHcRb','code','\x20\x20[','935437CfCeFe','utf-8','errors','details','No\x20YAML\x20files\x20found','forEach','Validation\x20complete:\x20','18nqFZgM','push','4889640woChYO','green','execute','warnings','407832bKxMGH','verbose'];a23_0x2e1f=function(){return _0x467c46;};return a23_0x2e1f();}const a23_0xda8776=a23_0x4bf1;(function(_0x4ed23e,_0x10a1d7){const _0x1f3646=a23_0x4bf1,_0x4681ce=_0x4ed23e();while(!![]){try{const _0x3a41ef=parseInt(_0x1f3646(0x111))/0x1*(-parseInt(_0x1f3646(0xfe))/0x2)+-parseInt(_0x1f3646(0xff))/0x3*(-parseInt(_0x1f3646(0x108))/0x4)+parseInt(_0x1f3646(0x103))/0x5+-parseInt(_0x1f3646(0x11a))/0x6+-parseInt(_0x1f3646(0x120))/0x7*(parseInt(_0x1f3646(0xfd))/0x8)+parseInt(_0x1f3646(0x118))/0x9*(-parseInt(_0x1f3646(0x10e))/0xa)+parseInt(_0x1f3646(0x123))/0xb*(parseInt(_0x1f3646(0x11e))/0xc);if(_0x3a41ef===_0x10a1d7)break;else _0x4681ce['push'](_0x4681ce['shift']());}catch(_0x2801f8){_0x4681ce['push'](_0x4681ce['shift']());}}}(a23_0x2e1f,0x75487));import{BaseCommand}from'./command.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{readFileSync}from'fs';import a23_0x20aa3a from'chalk';import{validateAlwaysOnCampaignDef}from'../sdk/engage/always-on-campaign-validator.js';import{parseYamlString}from'../sdk/engage/always-on-campaign-yaml.js';export class EngageAlwaysOnCampaignValidateCommand extends BaseCommand{['name']='EngageAlwaysOnCampaignValidate';['description']='Validate\x20always-on\x20campaign\x20YAML\x20files';async[a23_0xda8776(0x11c)](_0x169279){const _0x58f664=a23_0xda8776,{options:_0x28e88f,args:_0x4c411b}=_0x169279,_0x2da9e5=_0x4c411b[0x0]||'.',_0x4d2142=_0x28e88f[_0x58f664(0x11f)]??![],_0xd774ec=await findYamlFiles(_0x2da9e5);if(_0xd774ec[_0x58f664(0x121)]===0x0)return console[_0x58f664(0x124)](a23_0x20aa3a[_0x58f664(0x104)](_0x58f664(0x115))),0x0;let _0x16a9cb=0x0,_0x53a844=0x0;const _0x46b6a8=[];for(const _0x14e562 of _0xd774ec){try{const _0x429bc5=readFileSync(_0x14e562,_0x58f664(0x112)),_0x95eb9=parseYamlString(_0x429bc5);if(_0x95eb9[_0x58f664(0x109)]!==_0x58f664(0x106))continue;const _0x1cf79a=validateAlwaysOnCampaignDef(_0x95eb9);if(_0x1cf79a[_0x58f664(0x107)])_0x16a9cb++,_0x4d2142&&console[_0x58f664(0x125)](a23_0x20aa3a[_0x58f664(0x11b)]('✓\x20'+_0x14e562));else{_0x53a844++;const _0x16fb7f=_0x1cf79a[_0x58f664(0x113)][_0x58f664(0x10c)](_0x4f8f5b=>_0x58f664(0x110)+_0x4f8f5b[_0x58f664(0x10f)]+']\x20'+_0x4f8f5b[_0x58f664(0x10a)]+':\x20'+_0x4f8f5b[_0x58f664(0x105)]);_0x46b6a8[_0x58f664(0x119)]({'file':_0x14e562,'message':_0x1cf79a[_0x58f664(0x113)][_0x58f664(0x121)]+'\x20error(s)','details':_0x16fb7f}),console['error'](a23_0x20aa3a[_0x58f664(0x122)]('✗\x20'+_0x14e562+':\x20'+_0x1cf79a[_0x58f664(0x113)]['length']+_0x58f664(0x101)));}_0x1cf79a[_0x58f664(0x11d)]['length']>0x0&&_0x1cf79a['warnings']['forEach'](_0x40e797=>{const _0x3beddf=_0x58f664;console[_0x3beddf(0x102)](a23_0x20aa3a[_0x3beddf(0x104)]('\x20\x20[WARNING]\x20'+_0x40e797['path']+':\x20'+_0x40e797[_0x3beddf(0x105)]));});}catch(_0x14e2c5){_0x53a844++;const _0x57d326=_0x14e2c5 instanceof Error?_0x14e2c5['message']:String(_0x14e2c5);_0x46b6a8[_0x58f664(0x119)]({'file':_0x14e562,'message':_0x58f664(0x10d),'details':[_0x57d326]}),console[_0x58f664(0x124)](a23_0x20aa3a[_0x58f664(0x122)]('✗\x20'+_0x14e562+':\x20'+_0x57d326));}}return console['error'](''),console[_0x58f664(0x124)](a23_0x20aa3a[_0x58f664(0x126)](_0x58f664(0x117)+a23_0x20aa3a['green'](_0x16a9cb)+_0x58f664(0x100)+a23_0x20aa3a[_0x58f664(0x122)](_0x53a844)+_0x58f664(0x10b))),_0x46b6a8[_0x58f664(0x121)]>0x0&&_0x4d2142&&(console[_0x58f664(0x124)](''),_0x46b6a8[_0x58f664(0x116)](_0xcf2b53=>{const _0x4b8f34=_0x58f664;console[_0x4b8f34(0x124)](a23_0x20aa3a[_0x4b8f34(0x122)](_0xcf2b53['file']+':')),_0xcf2b53[_0x4b8f34(0x114)][_0x4b8f34(0x116)](_0x35de8a=>console[_0x4b8f34(0x124)](_0x35de8a));})),_0x53a844>0x0?0x1:0x0;}}
1
+ const a24_0x4b10c1=a24_0x225d;(function(_0x211cd8,_0x15fbe5){const _0x5ae5b2=a24_0x225d,_0x48a104=_0x211cd8();while(!![]){try{const _0x545172=-parseInt(_0x5ae5b2(0x15d))/0x1+-parseInt(_0x5ae5b2(0x15f))/0x2*(parseInt(_0x5ae5b2(0x181))/0x3)+-parseInt(_0x5ae5b2(0x174))/0x4+parseInt(_0x5ae5b2(0x17e))/0x5*(parseInt(_0x5ae5b2(0x177))/0x6)+parseInt(_0x5ae5b2(0x180))/0x7*(-parseInt(_0x5ae5b2(0x17c))/0x8)+-parseInt(_0x5ae5b2(0x16a))/0x9*(-parseInt(_0x5ae5b2(0x168))/0xa)+-parseInt(_0x5ae5b2(0x171))/0xb*(-parseInt(_0x5ae5b2(0x184))/0xc);if(_0x545172===_0x15fbe5)break;else _0x48a104['push'](_0x48a104['shift']());}catch(_0x1b0d57){_0x48a104['push'](_0x48a104['shift']());}}}(a24_0x548d,0x5e92b));import{BaseCommand}from'./command.js';function a24_0x225d(_0x1f49e6,_0x574c67){_0x1f49e6=_0x1f49e6-0x15a;const _0x548d98=a24_0x548d();let _0x225d55=_0x548d98[_0x1f49e6];return _0x225d55;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{readFileSync}from'fs';function a24_0x548d(){const _0x455a69=['Validate\x20always-on\x20campaign\x20YAML\x20files','\x20invalid','warn','code','bold','warnings','utf-8','860OOOzxG','length','53478cYGniM','file','message','yellow','\x20\x20[','Failed\x20to\x20parse','\x20error(s)','11LgMNEP','error','green','2128592rZOsts','valid','red','531282OTxVhS','forEach','path','description','map','2218088yegjfQ','EngageAlwaysOnCampaignValidate','20dTLyfm','always_on_campaign','14YhuTcu','3966hPBTMB','No\x20YAML\x20files\x20found','type','10018668ThIkIv','execute','log','Validation\x20complete:\x20','9240gDhaHh','errors','328wTEpNg','push'];a24_0x548d=function(){return _0x455a69;};return a24_0x548d();}import a24_0x253b27 from'chalk';import{validateAlwaysOnCampaignDef}from'../sdk/engage/always-on-campaign-validator.js';import{parseYamlString}from'../sdk/engage/always-on-campaign-yaml.js';export class EngageAlwaysOnCampaignValidateCommand extends BaseCommand{['name']=a24_0x4b10c1(0x17d);[a24_0x4b10c1(0x17a)]=a24_0x4b10c1(0x161);async[a24_0x4b10c1(0x15a)](_0x2efe82){const _0x8055fc=a24_0x4b10c1,{options:_0x3e269c,args:_0x65d0d3}=_0x2efe82,_0x293911=_0x65d0d3[0x0]||'.',_0x2631fd=_0x3e269c['verbose']??![],_0x15fb03=await findYamlFiles(_0x293911);if(_0x15fb03[_0x8055fc(0x169)]===0x0)return console[_0x8055fc(0x172)](a24_0x253b27[_0x8055fc(0x16d)](_0x8055fc(0x182))),0x0;let _0x555a65=0x0,_0x1eb24a=0x0;const _0x598e7c=[];for(const _0x417738 of _0x15fb03){try{const _0xf2c37a=readFileSync(_0x417738,_0x8055fc(0x167)),_0xac4846=parseYamlString(_0xf2c37a);if(_0xac4846[_0x8055fc(0x183)]!==_0x8055fc(0x17f))continue;const _0x2f65f3=validateAlwaysOnCampaignDef(_0xac4846);if(_0x2f65f3[_0x8055fc(0x175)])_0x555a65++,_0x2631fd&&console[_0x8055fc(0x15b)](a24_0x253b27[_0x8055fc(0x173)]('✓\x20'+_0x417738));else{_0x1eb24a++;const _0x108464=_0x2f65f3['errors'][_0x8055fc(0x17b)](_0x145ee7=>_0x8055fc(0x16e)+_0x145ee7[_0x8055fc(0x164)]+']\x20'+_0x145ee7[_0x8055fc(0x179)]+':\x20'+_0x145ee7[_0x8055fc(0x16c)]);_0x598e7c['push']({'file':_0x417738,'message':_0x2f65f3[_0x8055fc(0x15e)][_0x8055fc(0x169)]+_0x8055fc(0x170),'details':_0x108464}),console['error'](a24_0x253b27['red']('✗\x20'+_0x417738+':\x20'+_0x2f65f3['errors'][_0x8055fc(0x169)]+'\x20error(s)'));}_0x2f65f3[_0x8055fc(0x166)][_0x8055fc(0x169)]>0x0&&_0x2f65f3[_0x8055fc(0x166)][_0x8055fc(0x178)](_0x102e06=>{const _0x2a186e=_0x8055fc;console[_0x2a186e(0x163)](a24_0x253b27[_0x2a186e(0x16d)]('\x20\x20[WARNING]\x20'+_0x102e06[_0x2a186e(0x179)]+':\x20'+_0x102e06['message']));});}catch(_0x1a6af7){_0x1eb24a++;const _0x55e9a8=_0x1a6af7 instanceof Error?_0x1a6af7[_0x8055fc(0x16c)]:String(_0x1a6af7);_0x598e7c[_0x8055fc(0x160)]({'file':_0x417738,'message':_0x8055fc(0x16f),'details':[_0x55e9a8]}),console[_0x8055fc(0x172)](a24_0x253b27[_0x8055fc(0x176)]('✗\x20'+_0x417738+':\x20'+_0x55e9a8));}}return console[_0x8055fc(0x172)](''),console[_0x8055fc(0x172)](a24_0x253b27[_0x8055fc(0x165)](_0x8055fc(0x15c)+a24_0x253b27[_0x8055fc(0x173)](_0x555a65)+'\x20valid,\x20'+a24_0x253b27['red'](_0x1eb24a)+_0x8055fc(0x162))),_0x598e7c['length']>0x0&&_0x2631fd&&(console['error'](''),_0x598e7c[_0x8055fc(0x178)](_0x5cdf93=>{const _0x207fb4=_0x8055fc;console[_0x207fb4(0x172)](a24_0x253b27['red'](_0x5cdf93[_0x207fb4(0x16b)]+':')),_0x5cdf93['details']['forEach'](_0x2d8ab0=>console[_0x207fb4(0x172)](_0x2d8ab0));})),_0x1eb24a>0x0?0x1:0x0;}}
@@ -1 +1 @@
1
- const a24_0x85df3f=a24_0x1e6a;(function(_0xbd8a52,_0xe2227a){const _0x39393f=a24_0x1e6a,_0x551252=_0xbd8a52();while(!![]){try{const _0x3b2656=parseInt(_0x39393f(0xd0))/0x1+-parseInt(_0x39393f(0xe8))/0x2*(parseInt(_0x39393f(0xcc))/0x3)+parseInt(_0x39393f(0xf4))/0x4*(parseInt(_0x39393f(0xbf))/0x5)+-parseInt(_0x39393f(0xe6))/0x6*(-parseInt(_0x39393f(0xe5))/0x7)+parseInt(_0x39393f(0xc3))/0x8+-parseInt(_0x39393f(0xfb))/0x9+-parseInt(_0x39393f(0xdf))/0xa;if(_0x3b2656===_0xe2227a)break;else _0x551252['push'](_0x551252['shift']());}catch(_0x34bf5a){_0x551252['push'](_0x551252['shift']());}}}(a24_0x1ea3,0x765df));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';function a24_0x1ea3(){const _0xc3b4b1=['5634860imlfIe','\x27...','green','campaigns','isNew','cwd','71351MlJwbh','534tzmIPf','engage:campaign:pull','1780462Jprkxp','workspace','config','Write\x20','dirname','execute','filter','red','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','\x20files\x20to\x20','No\x20campaigns\x20found\x20in\x20workspace\x20\x27','\x0aError:','1230496rARKtu','absolutePath','verbose','diff','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','dim','✔\x20Pulled\x20','3015981pwnleB','engage_workspace','workspaceName','✔\x20Context\x20set:\x20','type','10ClTVsu','setPhase','targetDir','repeat','394384ryCauo','Aborted.','yellow','name','yes','-\x20no\x20files\x20written','length','description','error','3tzHoZx','\x0aChanges\x20to\x20\x27','files','\x20=\x20','701934gAhJAw','hasChanges','session','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','data','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','✔\x20All\x20files\x20are\x20up\x20to\x20date','cyan','\x20unchanged\x20files','\x20new\x20files','\x20changed\x20files','content','Pulling\x20campaigns\x20from\x20\x27','\x0aPull\x20summary\x20for\x20workspace\x20\x27'];a24_0x1ea3=function(){return _0xc3b4b1;};return a24_0x1ea3();}import a24_0x146a63 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';function a24_0x1e6a(_0x193a54,_0x5e6b25){_0x193a54=_0x193a54-0xbf;const _0x1ea337=a24_0x1ea3();let _0x1e6aec=_0x1ea337[_0x193a54];return _0x1e6aec;}import a24_0x37f176 from'path';import{pullCampaigns}from'../sdk/engage/campaign-pull.js';export class EngageCampaignPullCommand extends BaseCommand{['name']=a24_0x85df3f(0xe7);[a24_0x85df3f(0xca)]='Pull\x20campaigns\x20to\x20YAML\x20files';async[a24_0x85df3f(0xed)](_0x318571){const _0x1ca907=a24_0x85df3f,{options:_0x5cdea8,args:_0x3fbd4f,tdx:_0x10435b}=_0x318571,_0x2ffc2f=_0x5cdea8,_0x288e3c=await resolveWorkspaceName(_0x3fbd4f[0x0],_0x2ffc2f);if(!_0x288e3c)return console[_0x1ca907(0xcb)](a24_0x146a63[_0x1ca907(0xc5)]('Workspace\x20is\x20required.')),console[_0x1ca907(0xcb)]('\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>'),console[_0x1ca907(0xcb)](_0x1ca907(0xf0)),console['error'](_0x1ca907(0xd3)),0x1;const _0x3c3551=await withProgressSpinner(_0x1ca907(0xdd)+_0x288e3c+_0x1ca907(0xe0),_0x10fabf=>pullCampaigns({'engage':_0x10435b['engage'],'segment':_0x10435b['segment']},_0x288e3c,{'campaignName':_0x2ffc2f[_0x1ca907(0xc6)],'campaignType':_0x2ffc2f[_0x1ca907(0xff)],'progress':{'update':_0x444b33=>{const _0xc30f95=_0x1ca907;_0x10fabf[_0xc30f95(0xc0)](_0x444b33);}}}),{'verbose':_0x2ffc2f[_0x1ca907(0xf6)]}),_0x489124=_0x3c3551[_0x1ca907(0xd5)];if(_0x489124['counts'][_0x1ca907(0xe2)]===0x0)return console['error'](a24_0x146a63['yellow'](_0x1ca907(0xf2)+_0x489124[_0x1ca907(0xfd)]+'\x27')),0x0;const _0x262c55=_0x489124[_0x1ca907(0xce)][_0x1ca907(0xee)](_0x5879d3=>_0x5879d3[_0x1ca907(0xe3)]),_0x11618d=_0x489124[_0x1ca907(0xce)][_0x1ca907(0xee)](_0x4909b9=>!_0x4909b9[_0x1ca907(0xe3)]&&_0x4909b9[_0x1ca907(0xd1)]),_0x11f770=_0x489124[_0x1ca907(0xce)][_0x1ca907(0xee)](_0x441a2d=>!_0x441a2d['isNew']&&!_0x441a2d['hasChanges']);console['error'](_0x1ca907(0xde)+_0x489124['workspaceName']+'\x27:'),console[_0x1ca907(0xcb)]('\x20\x20'+a24_0x146a63[_0x1ca907(0xd8)](_0x489124['counts'][_0x1ca907(0xe2)]+'\x20campaigns')),console[_0x1ca907(0xcb)]('\x20\x20'+a24_0x146a63[_0x1ca907(0xe1)]('+\x20'+_0x262c55[_0x1ca907(0xc9)]+_0x1ca907(0xda))),console[_0x1ca907(0xcb)]('\x20\x20'+a24_0x146a63[_0x1ca907(0xc5)]('~\x20'+_0x11618d[_0x1ca907(0xc9)]+_0x1ca907(0xdb))),console['error']('\x20\x20'+a24_0x146a63['dim']('=\x20'+_0x11f770['length']+_0x1ca907(0xd9))),console[_0x1ca907(0xcb)]('\x20\x20Target:\x20'+a24_0x146a63['cyan'](_0x489124[_0x1ca907(0xc1)])+'\x0a');if(_0x11618d['length']>0x0)for(const _0xce97aa of _0x11618d){console[_0x1ca907(0xcb)](_0x1ca907(0xcd)+_0xce97aa['relativePath']+'\x27:'),console[_0x1ca907(0xcb)]('\u2500'['repeat'](0x3c)),console['error'](_0xce97aa[_0x1ca907(0xf7)]),console[_0x1ca907(0xcb)]('\u2500'[_0x1ca907(0xc2)](0x3c));}if(_0x2ffc2f['dryRun'])return console[_0x1ca907(0xcb)](a24_0x146a63[_0x1ca907(0xc5)](_0x1ca907(0xd4))),0x0;if(_0x262c55[_0x1ca907(0xc9)]===0x0&&_0x11618d[_0x1ca907(0xc9)]===0x0)return console['error'](a24_0x146a63[_0x1ca907(0xe1)](_0x1ca907(0xd7))),saveSessionContext({'engage_workspace':_0x489124[_0x1ca907(0xfd)]},_0x2ffc2f[_0x1ca907(0xd2)]),0x0;if(!_0x2ffc2f[_0x1ca907(0xc7)]){if(!isInteractive())return console['error'](a24_0x146a63[_0x1ca907(0xef)](_0x1ca907(0xf3)),_0x1ca907(0xf8)),console['error'](a24_0x146a63[_0x1ca907(0xf9)](_0x1ca907(0xd6))),0x1;const _0x3d1b40=await confirmKey(_0x1ca907(0xeb)+(_0x262c55[_0x1ca907(0xc9)]+_0x11618d['length'])+'\x20files?');if(!_0x3d1b40)return console['error'](a24_0x146a63[_0x1ca907(0xc5)](_0x1ca907(0xc4)),_0x1ca907(0xc8)),0x1;}for(const _0x159fc3 of _0x489124[_0x1ca907(0xce)]){if(_0x159fc3[_0x1ca907(0xe3)]||_0x159fc3[_0x1ca907(0xd1)]){const _0x4f3c81=a24_0x37f176[_0x1ca907(0xec)](_0x159fc3[_0x1ca907(0xf5)]);!existsSync(_0x4f3c81)&&mkdirSync(_0x4f3c81,{'recursive':!![]}),writeFileSync(_0x159fc3[_0x1ca907(0xf5)],_0x159fc3[_0x1ca907(0xdc)],'utf-8');}}return console['error'](a24_0x146a63[_0x1ca907(0xe1)](_0x1ca907(0xfa)+(_0x262c55[_0x1ca907(0xc9)]+_0x11618d[_0x1ca907(0xc9)])+_0x1ca907(0xf1)+_0x489124[_0x1ca907(0xc1)])),saveSessionContext({'engage_workspace':_0x489124[_0x1ca907(0xfd)]},_0x2ffc2f['session']),console[_0x1ca907(0xcb)](a24_0x146a63['green'](_0x1ca907(0xfe)+a24_0x146a63[_0x1ca907(0xf9)]('engage_workspace')+_0x1ca907(0xcf)+a24_0x146a63[_0x1ca907(0xd8)](_0x489124[_0x1ca907(0xfd)]))),0x0;}}async function resolveWorkspaceName(_0x4c8705,_0x5c8193){const _0x2a7050=a24_0x85df3f;if(_0x4c8705)return _0x4c8705;if(_0x5c8193[_0x2a7050(0xe9)])return _0x5c8193[_0x2a7050(0xe9)];const _0x4b293c=tryFindTdxConfig(process[_0x2a7050(0xe4)]());if(_0x4b293c?.[_0x2a7050(0xea)]['engage_workspace'])return _0x4b293c[_0x2a7050(0xea)][_0x2a7050(0xfc)];const _0x13d712=loadSessionContext(_0x5c8193[_0x2a7050(0xd2)]);if(_0x13d712?.['engage_workspace'])return _0x13d712[_0x2a7050(0xfc)];return undefined;}
1
+ const a25_0xaca583=a25_0x59bc;(function(_0x3463f9,_0x4bdb23){const _0x496157=a25_0x59bc,_0x2b2841=_0x3463f9();while(!![]){try{const _0x1ca3fc=parseInt(_0x496157(0xdf))/0x1*(parseInt(_0x496157(0xce))/0x2)+parseInt(_0x496157(0xae))/0x3*(parseInt(_0x496157(0x9b))/0x4)+-parseInt(_0x496157(0x9f))/0x5+-parseInt(_0x496157(0xa9))/0x6*(parseInt(_0x496157(0xc9))/0x7)+parseInt(_0x496157(0xb0))/0x8*(parseInt(_0x496157(0xb6))/0x9)+parseInt(_0x496157(0xe0))/0xa*(parseInt(_0x496157(0xc7))/0xb)+-parseInt(_0x496157(0xb3))/0xc;if(_0x1ca3fc===_0x4bdb23)break;else _0x2b2841['push'](_0x2b2841['shift']());}catch(_0x2413f5){_0x2b2841['push'](_0x2b2841['shift']());}}}(a25_0x54bb,0xa7d9d));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a25_0x1532c4 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a25_0x5c2c15 from'path';function a25_0x54bb(){const _0x9bef80=['diff','error','27xacZKo','72070zWDbbn','files','setPhase','284EWepmW','name','\x20=\x20','cwd','3310385qWnWza','green','\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>','type','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','Pulling\x20campaigns\x20from\x20\x27','engage:campaign:pull','repeat','\x20files\x20to\x20','✔\x20Pulled\x20','6QDDxZD','\x20new\x20files','data','\x0aChanges\x20to\x20\x27','No\x20campaigns\x20found\x20in\x20workspace\x20\x27','2883mdOoEH','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','5056RpBkrU','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','\x27...','4903980wIQPmM','\x20unchanged\x20files','campaigns','15903wkkLsu','verbose','hasChanges','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','\x20files?','Workspace\x20is\x20required.','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','segment','✔\x20Context\x20set:\x20','session','dim','yellow','dirname','\x0aError:','description','filter','counts','605xbMOct','\x20\x20Target:\x20','1159361RIltYu','Write\x20','config','engage_workspace','red','25372TejHHR','workspaceName','cyan','targetDir','\x20campaigns','dryRun','length','✔\x20All\x20files\x20are\x20up\x20to\x20date','\x0aPull\x20summary\x20for\x20workspace\x20\x27','Pull\x20campaigns\x20to\x20YAML\x20files','-\x20no\x20files\x20written','isNew','workspace','absolutePath','yes'];a25_0x54bb=function(){return _0x9bef80;};return a25_0x54bb();}import{pullCampaigns}from'../sdk/engage/campaign-pull.js';function a25_0x59bc(_0x1224fe,_0x59df34){_0x1224fe=_0x1224fe-0x9b;const _0x54bb40=a25_0x54bb();let _0x59bc02=_0x54bb40[_0x1224fe];return _0x59bc02;}export class EngageCampaignPullCommand extends BaseCommand{[a25_0xaca583(0x9c)]=a25_0xaca583(0xa5);[a25_0xaca583(0xc4)]=a25_0xaca583(0xd7);async['execute'](_0x183714){const _0x572d7c=a25_0xaca583,{options:_0x1bd344,args:_0xddceb3,tdx:_0x3b0e56}=_0x183714,_0x32c17d=_0x1bd344,_0x3b1469=await resolveWorkspaceName(_0xddceb3[0x0],_0x32c17d);if(!_0x3b1469)return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc1)](_0x572d7c(0xbb))),console[_0x572d7c(0xde)](_0x572d7c(0xa1)),console['error'](_0x572d7c(0xb9)),console[_0x572d7c(0xde)](_0x572d7c(0xb1)),0x1;const _0x22aa34=await withProgressSpinner(_0x572d7c(0xa4)+_0x3b1469+_0x572d7c(0xb2),_0x4cb469=>pullCampaigns({'engage':_0x3b0e56['engage'],'segment':_0x3b0e56[_0x572d7c(0xbd)]},_0x3b1469,{'campaignName':_0x32c17d[_0x572d7c(0x9c)],'campaignType':_0x32c17d[_0x572d7c(0xa2)],'progress':{'update':_0x346368=>{const _0x50a3cf=_0x572d7c;_0x4cb469[_0x50a3cf(0xe2)](_0x346368);}}}),{'verbose':_0x32c17d[_0x572d7c(0xb7)]}),_0x252d8a=_0x22aa34[_0x572d7c(0xab)];if(_0x252d8a[_0x572d7c(0xc6)][_0x572d7c(0xb5)]===0x0)return console[_0x572d7c(0xde)](a25_0x1532c4['yellow'](_0x572d7c(0xad)+_0x252d8a[_0x572d7c(0xcf)]+'\x27')),0x0;const _0x335f80=_0x252d8a[_0x572d7c(0xe1)][_0x572d7c(0xc5)](_0x53d0e0=>_0x53d0e0[_0x572d7c(0xd9)]),_0x8f7839=_0x252d8a[_0x572d7c(0xe1)][_0x572d7c(0xc5)](_0x1f9461=>!_0x1f9461['isNew']&&_0x1f9461[_0x572d7c(0xb8)]),_0x3a5edd=_0x252d8a[_0x572d7c(0xe1)][_0x572d7c(0xc5)](_0x277b94=>!_0x277b94[_0x572d7c(0xd9)]&&!_0x277b94[_0x572d7c(0xb8)]);console[_0x572d7c(0xde)](_0x572d7c(0xd6)+_0x252d8a[_0x572d7c(0xcf)]+'\x27:'),console['error']('\x20\x20'+a25_0x1532c4[_0x572d7c(0xd0)](_0x252d8a[_0x572d7c(0xc6)][_0x572d7c(0xb5)]+_0x572d7c(0xd2))),console[_0x572d7c(0xde)]('\x20\x20'+a25_0x1532c4[_0x572d7c(0xa0)]('+\x20'+_0x335f80[_0x572d7c(0xd4)]+_0x572d7c(0xaa))),console[_0x572d7c(0xde)]('\x20\x20'+a25_0x1532c4[_0x572d7c(0xc1)]('~\x20'+_0x8f7839[_0x572d7c(0xd4)]+'\x20changed\x20files')),console['error']('\x20\x20'+a25_0x1532c4[_0x572d7c(0xc0)]('=\x20'+_0x3a5edd[_0x572d7c(0xd4)]+_0x572d7c(0xb4))),console[_0x572d7c(0xde)](_0x572d7c(0xc8)+a25_0x1532c4[_0x572d7c(0xd0)](_0x252d8a[_0x572d7c(0xd1)])+'\x0a');if(_0x8f7839['length']>0x0)for(const _0x153b15 of _0x8f7839){console[_0x572d7c(0xde)](_0x572d7c(0xac)+_0x153b15['relativePath']+'\x27:'),console[_0x572d7c(0xde)]('\u2500'[_0x572d7c(0xa6)](0x3c)),console[_0x572d7c(0xde)](_0x153b15[_0x572d7c(0xdd)]),console['error']('\u2500'[_0x572d7c(0xa6)](0x3c));}if(_0x32c17d[_0x572d7c(0xd3)])return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc1)](_0x572d7c(0xa3))),0x0;if(_0x335f80[_0x572d7c(0xd4)]===0x0&&_0x8f7839['length']===0x0)return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xa0)](_0x572d7c(0xd5))),saveSessionContext({'engage_workspace':_0x252d8a[_0x572d7c(0xcf)]},_0x32c17d[_0x572d7c(0xbf)]),0x0;if(!_0x32c17d[_0x572d7c(0xdc)]){if(!isInteractive())return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xcd)](_0x572d7c(0xc3)),_0x572d7c(0xaf)),console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc0)](_0x572d7c(0xbc))),0x1;const _0x35d844=await confirmKey(_0x572d7c(0xca)+(_0x335f80[_0x572d7c(0xd4)]+_0x8f7839[_0x572d7c(0xd4)])+_0x572d7c(0xba));if(!_0x35d844)return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc1)]('Aborted.'),_0x572d7c(0xd8)),0x1;}for(const _0x141906 of _0x252d8a[_0x572d7c(0xe1)]){if(_0x141906[_0x572d7c(0xd9)]||_0x141906[_0x572d7c(0xb8)]){const _0x4d5923=a25_0x5c2c15[_0x572d7c(0xc2)](_0x141906[_0x572d7c(0xdb)]);!existsSync(_0x4d5923)&&mkdirSync(_0x4d5923,{'recursive':!![]}),writeFileSync(_0x141906[_0x572d7c(0xdb)],_0x141906['content'],'utf-8');}}return console['error'](a25_0x1532c4['green'](_0x572d7c(0xa8)+(_0x335f80['length']+_0x8f7839['length'])+_0x572d7c(0xa7)+_0x252d8a[_0x572d7c(0xd1)])),saveSessionContext({'engage_workspace':_0x252d8a[_0x572d7c(0xcf)]},_0x32c17d[_0x572d7c(0xbf)]),console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xa0)](_0x572d7c(0xbe)+a25_0x1532c4[_0x572d7c(0xc0)](_0x572d7c(0xcc))+_0x572d7c(0x9d)+a25_0x1532c4['cyan'](_0x252d8a[_0x572d7c(0xcf)]))),0x0;}}async function resolveWorkspaceName(_0x36548a,_0x42c693){const _0x3acc1d=a25_0xaca583;if(_0x36548a)return _0x36548a;if(_0x42c693['workspace'])return _0x42c693[_0x3acc1d(0xda)];const _0x508a5e=tryFindTdxConfig(process[_0x3acc1d(0x9e)]());if(_0x508a5e?.[_0x3acc1d(0xcb)][_0x3acc1d(0xcc)])return _0x508a5e['config'][_0x3acc1d(0xcc)];const _0x15d4ec=loadSessionContext(_0x42c693[_0x3acc1d(0xbf)]);if(_0x15d4ec?.[_0x3acc1d(0xcc)])return _0x15d4ec['engage_workspace'];return undefined;}
@@ -1 +1 @@
1
- const a25_0x1a1eab=a25_0x4607;function a25_0x4607(_0x32b29a,_0x3364d1){_0x32b29a=_0x32b29a-0x18b;const _0x23bcee=a25_0x23bc();let _0x460715=_0x23bcee[_0x32b29a];return _0x460715;}(function(_0x449608,_0x563f8f){const _0x49d09b=a25_0x4607,_0x140c00=_0x449608();while(!![]){try{const _0x26c7f2=parseInt(_0x49d09b(0x1e0))/0x1+parseInt(_0x49d09b(0x1b5))/0x2*(-parseInt(_0x49d09b(0x1c0))/0x3)+-parseInt(_0x49d09b(0x1cd))/0x4*(parseInt(_0x49d09b(0x196))/0x5)+parseInt(_0x49d09b(0x1c4))/0x6*(parseInt(_0x49d09b(0x1e1))/0x7)+parseInt(_0x49d09b(0x1a8))/0x8+-parseInt(_0x49d09b(0x18c))/0x9*(-parseInt(_0x49d09b(0x1aa))/0xa)+-parseInt(_0x49d09b(0x1ad))/0xb*(parseInt(_0x49d09b(0x1ce))/0xc);if(_0x26c7f2===_0x563f8f)break;else _0x140c00['push'](_0x140c00['shift']());}catch(_0x32112a){_0x140c00['push'](_0x140c00['shift']());}}}(a25_0x23bc,0x6910c));function a25_0x23bc(){const _0x4ddbd6=['dryRun','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','setPhase','cyan','site','execute','494170zAOBLh','8239SPAGbM','✔\x20Updated\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20(requires\x20tdx.json)','name','engage_workspace','applyListCampaignPushes','\x20new\x20campaigns:','Use\x20-y\x20or\x20--yes\x20to\x20apply\x20the\x20ListCampaign\x20draft\x20changes','\x0aUsage:\x20tdx\x20engage\x20campaign\x20push\x20<file.yaml>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20single\x20file','\x0aValidation\x20errors\x20in\x20','400869DwxFGN','\x0aError:\x20Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20campaigns','warnings','filter','Applying\x20ListCampaign\x20changes...','engage','results','segment','\x0aPush\x20summary\x20for\x20workspace\x20\x27','1024305VPaxGn','data','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','errors','ListCampaign\x20files\x20must\x20have\x20type:\x20list_campaign.','Preparing\x20push\x20to\x20workspace\x20\x27','prepareListCampaignPushes','\x20ListCampaign\x20draft','workspace','✔\x20Created\x20','valid','red','engage:campaign:push','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','input','dirname','dim','status','6133336HXOzGk','description','50stDnKr','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','created','13841267IZuYTa','session','campaign','\x20campaign\x20files','resolve','message','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','Pushing\x20campaigns...','411214udAIpO','campaignId','\x0aListCampaign\x20push\x20summary\x20for\x20workspace\x20\x27','action','Workspace\x20is\x20required.','length','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','config','Resolving\x20references...','error','green','3UhxqSS','\x27...','create','\x20campaigns\x20to\x20update:','3138jYqxmJ','Aborted.','verbose','path','update','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','Push\x20','updated','pushListCampaignFiles','4xvBzRK','12tZoZOS','Found\x20','\x20\x20\x20\x20','resolveWorkspaceId','def','\x20DRAFT\x20ListCampaigns\x20to\x20update:','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','yes','map','campaign_type','yellow','-\x20no\x20changes\x20applied'];a25_0x23bc=function(){return _0x4ddbd6;};return a25_0x23bc();}import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a25_0x2cb212 from'chalk';import a25_0x149dd8 from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';import{validateCampaignDef}from'../sdk/engage/campaign-validator.js';import{discoverListCampaignFiles}from'../sdk/engage/list-campaign-yaml.js';import{getCampaignUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{[a25_0x1a1eab(0x1e4)]=a25_0x1a1eab(0x1a2);[a25_0x1a1eab(0x1a9)]=a25_0x1a1eab(0x1b3);async[a25_0x1a1eab(0x1df)](_0x4442ce){const _0x31b0b6=a25_0x1a1eab,{options:_0x264908,args:_0x15ec1b,tdx:_0x23f67c}=_0x4442ce,_0x55fbef=_0x264908,_0x5d4b92=_0x15ec1b[0x0],_0x2c74c2=_0x5d4b92?a25_0x149dd8[_0x31b0b6(0x1b1)](_0x5d4b92):undefined,_0x1a163c=_0x2c74c2?isYamlFile(_0x2c74c2):![];let _0x11b49f;if(_0x1a163c&&_0x2c74c2)_0x11b49f=a25_0x149dd8[_0x31b0b6(0x1a5)](_0x2c74c2);else _0x2c74c2?_0x11b49f=_0x2c74c2:_0x11b49f=process['cwd']();let _0x21f9fc;const _0x2c85ce=tryFindTdxConfig(_0x11b49f);_0x2c85ce?.['config'][_0x31b0b6(0x1e5)]&&(_0x21f9fc=_0x2c85ce[_0x31b0b6(0x1bc)][_0x31b0b6(0x1e5)],!_0x1a163c&&(_0x11b49f=_0x2c85ce['configDir']));_0x55fbef[_0x31b0b6(0x19e)]&&(_0x21f9fc=_0x55fbef[_0x31b0b6(0x19e)]);if(!_0x21f9fc){const _0x11b45d=loadSessionContext(_0x55fbef[_0x31b0b6(0x1ae)]);_0x11b45d?.[_0x31b0b6(0x1e5)]&&(_0x21f9fc=_0x11b45d['engage_workspace']);}if(!_0x21f9fc)return console[_0x31b0b6(0x1be)](a25_0x2cb212['yellow'](_0x31b0b6(0x1b9))),console[_0x31b0b6(0x1be)](_0x31b0b6(0x1e9)),console[_0x31b0b6(0x1be)](_0x31b0b6(0x1e3)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20push\x20--workspace\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20with\x20explicit\x20workspace'),console[_0x31b0b6(0x1be)](_0x31b0b6(0x1bb)),0x1;const _0x4100df=_0x55fbef['campaignType']??_0x31b0b6(0x1af);if(_0x4100df==='list-campaign')return await this[_0x31b0b6(0x1cc)](_0x4442ce,_0x21f9fc,_0x11b49f,_0x2c74c2,_0x1a163c);if(_0x4100df!==_0x31b0b6(0x1af))return console[_0x31b0b6(0x1be)]('Error:\x20Invalid\x20campaign\x20type\x20\x22'+_0x4100df+_0x31b0b6(0x1db)),0x1;let _0x23759a;_0x1a163c&&_0x2c74c2?_0x23759a=[_0x2c74c2]:_0x23759a=discoverCampaignFiles(_0x11b49f);if(_0x23759a[_0x31b0b6(0x1ba)]===0x0)return console['error'](a25_0x2cb212[_0x31b0b6(0x1d8)](_0x31b0b6(0x1a3)+_0x11b49f)),console[_0x31b0b6(0x1be)](a25_0x2cb212[_0x31b0b6(0x1a6)]('Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.')),0x1;const _0x2e9af4=_0x23759a[_0x31b0b6(0x1d6)](_0x117449=>parseCampaignFile(_0x117449,a25_0x149dd8[_0x31b0b6(0x1a5)](_0x117449))),_0x53e795=_0x2e9af4[_0x31b0b6(0x1ba)]===0x1?'1\x20campaign\x20file:\x20'+_0x2e9af4[0x0][_0x31b0b6(0x1d2)][_0x31b0b6(0x1e4)]:_0x2e9af4[_0x31b0b6(0x1ba)]+_0x31b0b6(0x1b0);console[_0x31b0b6(0x1be)](_0x31b0b6(0x1cf)+a25_0x2cb212[_0x31b0b6(0x1dd)](_0x53e795));let _0x3e4d43=![];for(const _0x32f9da of _0x2e9af4){const _0x6f798e=validateCampaignDef(_0x32f9da['def']);if(!_0x6f798e[_0x31b0b6(0x1a0)]){_0x3e4d43=!![],console[_0x31b0b6(0x1be)](a25_0x2cb212['red'](_0x31b0b6(0x18b)+_0x32f9da['relativePath']+':'));for(const _0x596dca of _0x6f798e[_0x31b0b6(0x199)]){console['error']('\x20\x20'+a25_0x2cb212[_0x31b0b6(0x1a1)]('✗')+'\x20'+_0x596dca[_0x31b0b6(0x1c7)]+':\x20'+_0x596dca[_0x31b0b6(0x1b2)]);}}for(const _0x3633af of _0x6f798e[_0x31b0b6(0x18f)]){console[_0x31b0b6(0x1be)]('\x20\x20'+a25_0x2cb212[_0x31b0b6(0x1d8)]('⚠')+'\x20'+_0x3633af[_0x31b0b6(0x1c7)]+':\x20'+_0x3633af[_0x31b0b6(0x1b2)]);}}if(_0x3e4d43)return console['error'](a25_0x2cb212['red'](_0x31b0b6(0x1d4))),0x1;const _0x3fca03=await _0x23f67c['engage'][_0x31b0b6(0x1d1)](_0x21f9fc),_0x539415=await withProgressSpinner(_0x31b0b6(0x19b)+_0x21f9fc+_0x31b0b6(0x1c1),_0x5216ba=>preparePush({'engage':_0x23f67c[_0x31b0b6(0x192)],'segment':_0x23f67c[_0x31b0b6(0x194)]},_0x2e9af4,_0x3fca03,{'progress':{'update':_0x114ebd=>_0x5216ba[_0x31b0b6(0x1dc)](_0x114ebd)}}),{'verbose':_0x55fbef['verbose']}),_0x597199=_0x539415[_0x31b0b6(0x197)];await withProgressSpinner(_0x31b0b6(0x1bd),_0x390bff=>resolveAndBuildInputs({'engage':_0x23f67c[_0x31b0b6(0x192)],'segment':_0x23f67c[_0x31b0b6(0x194)]},_0x597199,_0x3fca03,{'progress':{'update':_0x10db46=>_0x390bff[_0x31b0b6(0x1dc)](_0x10db46)}}),{'verbose':_0x55fbef[_0x31b0b6(0x1c6)]});const _0x5b79b2=_0x597199['filter'](_0xac4252=>_0xac4252[_0x31b0b6(0x1b8)]===_0x31b0b6(0x1c2)),_0x45e26c=_0x597199[_0x31b0b6(0x190)](_0x4438f8=>_0x4438f8[_0x31b0b6(0x1b8)]==='update');console[_0x31b0b6(0x1be)](_0x31b0b6(0x195)+_0x21f9fc+'\x27:');if(_0x5b79b2[_0x31b0b6(0x1ba)]>0x0){console[_0x31b0b6(0x1be)]('\x20\x20'+a25_0x2cb212[_0x31b0b6(0x1bf)]('+\x20'+_0x5b79b2[_0x31b0b6(0x1ba)]+_0x31b0b6(0x1e7)));for(const _0x37657d of _0x5b79b2){console[_0x31b0b6(0x1be)](_0x31b0b6(0x1d0)+a25_0x2cb212[_0x31b0b6(0x1bf)]('+')+'\x20'+_0x37657d['def']['name']+'\x20('+_0x37657d[_0x31b0b6(0x1d2)][_0x31b0b6(0x1d7)]+')');}}if(_0x45e26c['length']>0x0){console[_0x31b0b6(0x1be)]('\x20\x20'+a25_0x2cb212[_0x31b0b6(0x1d8)]('~\x20'+_0x45e26c[_0x31b0b6(0x1ba)]+_0x31b0b6(0x1c3)));for(const _0x474f46 of _0x45e26c){console[_0x31b0b6(0x1be)](_0x31b0b6(0x1d0)+a25_0x2cb212[_0x31b0b6(0x1d8)]('~')+'\x20'+_0x474f46[_0x31b0b6(0x1d2)]['name']+'\x20('+_0x474f46[_0x31b0b6(0x1d2)][_0x31b0b6(0x1d7)]+')');}}if(_0x5b79b2[_0x31b0b6(0x1ba)]===0x0&&_0x45e26c[_0x31b0b6(0x1ba)]===0x0)return console[_0x31b0b6(0x1be)](a25_0x2cb212[_0x31b0b6(0x1bf)]('\u2714\x20All\x20campaigns\x20are\x20up\x20to\x20date')),0x0;if(_0x55fbef[_0x31b0b6(0x1da)])return console[_0x31b0b6(0x1be)](a25_0x2cb212[_0x31b0b6(0x1d8)](_0x31b0b6(0x1c9))),0x0;if(!_0x55fbef[_0x31b0b6(0x1d5)]){if(!isInteractive())return console['error'](a25_0x2cb212[_0x31b0b6(0x1a1)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x31b0b6(0x1be)](a25_0x2cb212['dim'](_0x31b0b6(0x198))),0x1;const _0x10ffb3=await confirmKey(_0x31b0b6(0x1ca)+(_0x5b79b2[_0x31b0b6(0x1ba)]+_0x45e26c[_0x31b0b6(0x1ba)])+'\x20campaigns?');if(!_0x10ffb3)return console['error'](a25_0x2cb212['yellow'](_0x31b0b6(0x1c5)),_0x31b0b6(0x1d9)),0x1;}const _0x4a37df=await withProgressSpinner(_0x31b0b6(0x1b4),_0x1586e5=>executePush({'engage':_0x23f67c[_0x31b0b6(0x192)],'segment':_0x23f67c[_0x31b0b6(0x194)]},_0x597199,{'progress':{'update':_0x5205bf=>_0x1586e5['setPhase'](_0x5205bf)}}),{'verbose':_0x55fbef[_0x31b0b6(0x1c6)]}),_0x5604a4=_0x4a37df['data'];for(const _0x1822fb of _0x5604a4[_0x31b0b6(0x193)]){if(_0x1822fb[_0x31b0b6(0x1b6)]&&(_0x1822fb[_0x31b0b6(0x1b8)]===_0x31b0b6(0x1ac)||_0x1822fb['action']===_0x31b0b6(0x1cb))){const _0x5ad23a=getCampaignUrl(_0x55fbef[_0x31b0b6(0x1de)],_0x3fca03,_0x1822fb[_0x31b0b6(0x1b6)]),_0x2dd139=_0x1822fb[_0x31b0b6(0x1b8)]===_0x31b0b6(0x1ac)?'+':'~',_0x2a3d9a=_0x1822fb[_0x31b0b6(0x1b8)]==='created'?a25_0x2cb212[_0x31b0b6(0x1bf)](_0x2dd139):a25_0x2cb212[_0x31b0b6(0x1d8)](_0x2dd139);console[_0x31b0b6(0x1be)]('\x20\x20'+_0x2a3d9a+'\x20'+hyperlink(_0x1822fb[_0x31b0b6(0x1e4)],_0x5ad23a)+'\x20'+a25_0x2cb212[_0x31b0b6(0x1a6)](_0x5ad23a));}}_0x5604a4[_0x31b0b6(0x1ac)]>0x0&&console[_0x31b0b6(0x1be)](a25_0x2cb212['green'](_0x31b0b6(0x19f)+_0x5604a4[_0x31b0b6(0x1ac)]+_0x31b0b6(0x18e)));_0x5604a4[_0x31b0b6(0x1cb)]>0x0&&console['error'](a25_0x2cb212[_0x31b0b6(0x1bf)](_0x31b0b6(0x1e2)+_0x5604a4[_0x31b0b6(0x1cb)]+'\x20campaigns'));if(_0x5604a4['errors'][_0x31b0b6(0x1ba)]>0x0){console[_0x31b0b6(0x1be)](a25_0x2cb212[_0x31b0b6(0x1a1)]('✘\x20'+_0x5604a4['errors'][_0x31b0b6(0x1ba)]+'\x20errors:'));for(const _0x28cc25 of _0x5604a4[_0x31b0b6(0x199)]){console[_0x31b0b6(0x1be)]('\x20\x20'+a25_0x2cb212[_0x31b0b6(0x1a1)](_0x28cc25[_0x31b0b6(0x1e4)])+':\x20'+_0x28cc25[_0x31b0b6(0x1be)]);}}return saveSessionContext({'engage_workspace':_0x21f9fc},_0x55fbef[_0x31b0b6(0x1ae)]),_0x5604a4[_0x31b0b6(0x199)][_0x31b0b6(0x1ba)]>0x0?0x1:0x0;}async[a25_0x1a1eab(0x1cc)](_0x46bcde,_0x17cd5f,_0x2aef48,_0x1ab30c,_0x5cf181){const _0xe824b=a25_0x1a1eab,{options:_0xc79ceb,tdx:_0x6b32a8}=_0x46bcde,_0x428dd7=_0xc79ceb,_0x3db6f6=_0x5cf181&&_0x1ab30c?[_0x1ab30c]:discoverListCampaignFiles(_0x2aef48);if(_0x3db6f6[_0xe824b(0x1ba)]===0x0)return console['error'](a25_0x2cb212['yellow'](_0xe824b(0x1ab)+_0x2aef48)),console['error'](a25_0x2cb212[_0xe824b(0x1a6)](_0xe824b(0x19a))),0x1;const _0x3f69ad=await _0x6b32a8[_0xe824b(0x192)]['resolveWorkspaceId'](_0x17cd5f),_0x9aeb7a=await withProgressSpinner('Preparing\x20ListCampaign\x20push...',()=>_0x6b32a8[_0xe824b(0x192)][_0xe824b(0x19c)](_0x3f69ad,_0x3db6f6),{'verbose':_0xc79ceb[_0xe824b(0x1c6)]}),_0x3222f9=_0x9aeb7a['data'],_0x2db61e=_0x3222f9[_0xe824b(0x190)](_0x4c0314=>_0x4c0314[_0xe824b(0x1b8)]===_0xe824b(0x1c2)),_0xf1c704=_0x3222f9[_0xe824b(0x190)](_0x27020b=>_0x27020b[_0xe824b(0x1b8)]===_0xe824b(0x1c8));console['error'](_0xe824b(0x1b7)+_0x17cd5f+'\x27:');if(_0x2db61e[_0xe824b(0x1ba)]>0x0){console['error']('\x20\x20'+a25_0x2cb212['green']('+\x20'+_0x2db61e[_0xe824b(0x1ba)]+'\x20new\x20ListCampaigns:'));for(const _0xce2a27 of _0x2db61e)console['error'](_0xe824b(0x1d0)+a25_0x2cb212['green']('+')+'\x20'+_0xce2a27[_0xe824b(0x1a4)][_0xe824b(0x1e4)]);}if(_0xf1c704[_0xe824b(0x1ba)]>0x0){console[_0xe824b(0x1be)]('\x20\x20'+a25_0x2cb212[_0xe824b(0x1d8)]('~\x20'+_0xf1c704[_0xe824b(0x1ba)]+_0xe824b(0x1d3)));for(const _0x5deffa of _0xf1c704)console[_0xe824b(0x1be)](_0xe824b(0x1d0)+a25_0x2cb212[_0xe824b(0x1d8)]('~')+'\x20'+_0x5deffa[_0xe824b(0x1a4)]['name']);}if(_0x428dd7[_0xe824b(0x1da)])return console[_0xe824b(0x1be)](a25_0x2cb212[_0xe824b(0x1d8)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(!_0x428dd7[_0xe824b(0x1d5)]){if(!isInteractive())return console[_0xe824b(0x1be)](a25_0x2cb212[_0xe824b(0x1a1)](_0xe824b(0x18d))),console[_0xe824b(0x1be)](a25_0x2cb212['dim'](_0xe824b(0x1e8))),0x1;const _0x450a52=await confirmKey(_0xe824b(0x1ca)+_0x3222f9[_0xe824b(0x1ba)]+_0xe824b(0x19d)+(_0x3222f9[_0xe824b(0x1ba)]===0x1?'':'s')+'?');if(!_0x450a52)return console[_0xe824b(0x1be)](a25_0x2cb212[_0xe824b(0x1d8)](_0xe824b(0x1c5)),_0xe824b(0x1d9)),0x1;}const _0x1624f3=await withProgressSpinner(_0xe824b(0x191),()=>_0x6b32a8['engage'][_0xe824b(0x1e6)](_0x3222f9),{'verbose':_0xc79ceb['verbose']});for(const _0x393faf of _0x1624f3['data']){const _0x31fcd7=_0x393faf[_0xe824b(0x1b8)]==='created'?a25_0x2cb212['green']('+'):a25_0x2cb212[_0xe824b(0x1d8)]('~');console[_0xe824b(0x1be)]('\x20\x20'+_0x31fcd7+'\x20'+_0x393faf['campaign'][_0xe824b(0x1e4)]+'\x20('+_0x393faf[_0xe824b(0x1af)][_0xe824b(0x1a7)]+')');}return saveSessionContext({'engage_workspace':_0x17cd5f},_0xc79ceb[_0xe824b(0x1ae)]),0x0;}}
1
+ const a26_0x26c3c3=a26_0x37a2;(function(_0x450f0c,_0x295a31){const _0x1cfc98=a26_0x37a2,_0x15c7c0=_0x450f0c();while(!![]){try{const _0x267a08=parseInt(_0x1cfc98(0x81))/0x1+-parseInt(_0x1cfc98(0x74))/0x2*(-parseInt(_0x1cfc98(0xa6))/0x3)+parseInt(_0x1cfc98(0xaa))/0x4+parseInt(_0x1cfc98(0xb5))/0x5*(-parseInt(_0x1cfc98(0x80))/0x6)+parseInt(_0x1cfc98(0x8a))/0x7+-parseInt(_0x1cfc98(0x7d))/0x8*(-parseInt(_0x1cfc98(0xc3))/0x9)+-parseInt(_0x1cfc98(0x87))/0xa;if(_0x267a08===_0x295a31)break;else _0x15c7c0['push'](_0x15c7c0['shift']());}catch(_0x9dd63){_0x15c7c0['push'](_0x15c7c0['shift']());}}}(a26_0x3020,0x65eff));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';function a26_0x3020(){const _0x3b9a23=['✔\x20Updated\x20','dirname','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','green','5652YeDIIu','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','yes','engage','workspace','applyListCampaignPushes','✔\x20Created\x20','created','create','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','execute','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','engage_workspace','resolve','setPhase','Found\x20','232012jTbZJY','\x20new\x20ListCampaigns:','status','filter','\x0aError:\x20Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20(requires\x20tdx.json)','name','results','1704EYSLhr','dryRun','\x20campaigns\x20to\x20update:','1035732EspKKV','533904YeAxak','campaign','\x0aListCampaign\x20push\x20summary\x20for\x20workspace\x20\x27','Error:\x20Invalid\x20campaign\x20type\x20\x22','\x20campaigns?','campaign_type','13055480mobMBv','Resolving\x20references...','Use\x20-y\x20or\x20--yes\x20to\x20apply\x20the\x20ListCampaign\x20draft\x20changes','2980145GjnSHu','message','engage:campaign:push','\x20\x20\x20\x20','path','yellow','ListCampaign\x20files\x20must\x20have\x20type:\x20list_campaign.','verbose','Pushing\x20campaigns...','dim','data','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','action','\x0aPush\x20summary\x20for\x20workspace\x20\x27','\x0aValidation\x20errors\x20in\x20','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','Applying\x20ListCampaign\x20changes...','\x20campaign\x20files','pushListCampaignFiles','cyan','map','warnings','\x27...','def','configDir','update','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','\x20ListCampaign\x20draft','18FEaolI','updated','\x20campaigns','-\x20no\x20changes\x20applied','1115552fIoTFE','site','campaignType','Aborted.','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','red','length','resolveWorkspaceId','description','Push\x20','input','10yPGQMs','prepareListCampaignPushes','campaignId','error','Preparing\x20push\x20to\x20workspace\x20\x27','Workspace\x20is\x20required.','config','session','errors','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns'];a26_0x3020=function(){return _0x3b9a23;};return a26_0x3020();}import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';function a26_0x37a2(_0x462998,_0xd84254){_0x462998=_0x462998-0x6c;const _0x302085=a26_0x3020();let _0x37a232=_0x302085[_0x462998];return _0x37a232;}import{isYamlFile}from'../sdk/segment/file-discovery.js';import a26_0x41292d from'chalk';import a26_0x3cf4d0 from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';import{validateCampaignDef}from'../sdk/engage/campaign-validator.js';import{discoverListCampaignFiles}from'../sdk/engage/list-campaign-yaml.js';import{getCampaignUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{['name']=a26_0x26c3c3(0x8c);[a26_0x26c3c3(0xb2)]=a26_0x26c3c3(0xbe);async[a26_0x26c3c3(0x6e)](_0x4e9242){const _0x5d389b=a26_0x26c3c3,{options:_0x13396b,args:_0x327515,tdx:_0x5f450c}=_0x4e9242,_0x1e25de=_0x13396b,_0x402942=_0x327515[0x0],_0x150a7e=_0x402942?a26_0x3cf4d0[_0x5d389b(0x71)](_0x402942):undefined,_0x1ee217=_0x150a7e?isYamlFile(_0x150a7e):![];let _0x591f40;if(_0x1ee217&&_0x150a7e)_0x591f40=a26_0x3cf4d0['dirname'](_0x150a7e);else _0x150a7e?_0x591f40=_0x150a7e:_0x591f40=process['cwd']();let _0x372f64;const _0x11f8b4=tryFindTdxConfig(_0x591f40);_0x11f8b4?.[_0x5d389b(0xbb)][_0x5d389b(0x70)]&&(_0x372f64=_0x11f8b4[_0x5d389b(0xbb)]['engage_workspace'],!_0x1ee217&&(_0x591f40=_0x11f8b4[_0x5d389b(0xa2)]));_0x1e25de['workspace']&&(_0x372f64=_0x1e25de[_0x5d389b(0xc7)]);if(!_0x372f64){const _0xfe07a8=loadSessionContext(_0x1e25de[_0x5d389b(0xbc)]);_0xfe07a8?.['engage_workspace']&&(_0x372f64=_0xfe07a8[_0x5d389b(0x70)]);}if(!_0x372f64)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0x8f)](_0x5d389b(0xba))),console[_0x5d389b(0xb8)]('\x0aUsage:\x20tdx\x20engage\x20campaign\x20push\x20<file.yaml>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20single\x20file'),console[_0x5d389b(0xb8)](_0x5d389b(0x7a)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20push\x20--workspace\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20with\x20explicit\x20workspace'),console[_0x5d389b(0xb8)](_0x5d389b(0xae)),0x1;const _0x38af5e=_0x1e25de[_0x5d389b(0xac)]??_0x5d389b(0x82);if(_0x38af5e==='list-campaign')return await this['pushListCampaignFiles'](_0x4e9242,_0x372f64,_0x591f40,_0x150a7e,_0x1ee217);if(_0x38af5e!==_0x5d389b(0x82))return console[_0x5d389b(0xb8)](_0x5d389b(0x84)+_0x38af5e+_0x5d389b(0xc1)),0x1;let _0x365350;_0x1ee217&&_0x150a7e?_0x365350=[_0x150a7e]:_0x365350=discoverCampaignFiles(_0x591f40);if(_0x365350[_0x5d389b(0xb0)]===0x0)return console['error'](a26_0x41292d[_0x5d389b(0x8f)](_0x5d389b(0x6c)+_0x591f40)),console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0x93)](_0x5d389b(0x6f))),0x1;const _0x1bf41c=_0x365350[_0x5d389b(0x9e)](_0x1d2434=>parseCampaignFile(_0x1d2434,a26_0x3cf4d0[_0x5d389b(0xc0)](_0x1d2434))),_0x55a55e=_0x1bf41c[_0x5d389b(0xb0)]===0x1?'1\x20campaign\x20file:\x20'+_0x1bf41c[0x0][_0x5d389b(0xa1)][_0x5d389b(0x7b)]:_0x1bf41c[_0x5d389b(0xb0)]+_0x5d389b(0x9b);console['error'](_0x5d389b(0x73)+a26_0x41292d[_0x5d389b(0x9d)](_0x55a55e));let _0x4c1f33=![];for(const _0x1a4852 of _0x1bf41c){const _0x49c838=validateCampaignDef(_0x1a4852[_0x5d389b(0xa1)]);if(!_0x49c838['valid']){_0x4c1f33=!![],console['error'](a26_0x41292d[_0x5d389b(0xaf)](_0x5d389b(0x98)+_0x1a4852['relativePath']+':'));for(const _0x11e77d of _0x49c838[_0x5d389b(0xbd)]){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d['red']('✗')+'\x20'+_0x11e77d[_0x5d389b(0x8e)]+':\x20'+_0x11e77d[_0x5d389b(0x8b)]);}}for(const _0x50b055 of _0x49c838[_0x5d389b(0x9f)]){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d['yellow']('⚠')+'\x20'+_0x50b055[_0x5d389b(0x8e)]+':\x20'+_0x50b055['message']);}}if(_0x4c1f33)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xaf)](_0x5d389b(0xc4))),0x1;const _0x297bb8=await _0x5f450c['engage'][_0x5d389b(0xb1)](_0x372f64),_0x477aae=await withProgressSpinner(_0x5d389b(0xb9)+_0x372f64+_0x5d389b(0xa0),_0x91cfd2=>preparePush({'engage':_0x5f450c[_0x5d389b(0xc6)],'segment':_0x5f450c[_0x5d389b(0x79)]},_0x1bf41c,_0x297bb8,{'progress':{'update':_0xb6f06b=>_0x91cfd2[_0x5d389b(0x72)](_0xb6f06b)}}),{'verbose':_0x1e25de[_0x5d389b(0x91)]}),_0x7bd696=_0x477aae[_0x5d389b(0x94)];await withProgressSpinner(_0x5d389b(0x88),_0x25d58a=>resolveAndBuildInputs({'engage':_0x5f450c['engage'],'segment':_0x5f450c[_0x5d389b(0x79)]},_0x7bd696,_0x297bb8,{'progress':{'update':_0x9f284f=>_0x25d58a[_0x5d389b(0x72)](_0x9f284f)}}),{'verbose':_0x1e25de[_0x5d389b(0x91)]});const _0x3e885d=_0x7bd696['filter'](_0x139cd5=>_0x139cd5['action']===_0x5d389b(0xcb)),_0x4096ac=_0x7bd696[_0x5d389b(0x77)](_0x227ac6=>_0x227ac6['action']===_0x5d389b(0xa3));console['error'](_0x5d389b(0x97)+_0x372f64+'\x27:');if(_0x3e885d[_0x5d389b(0xb0)]>0x0){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d[_0x5d389b(0xc2)]('+\x20'+_0x3e885d[_0x5d389b(0xb0)]+'\x20new\x20campaigns:'));for(const _0x43db5c of _0x3e885d){console[_0x5d389b(0xb8)](_0x5d389b(0x8d)+a26_0x41292d[_0x5d389b(0xc2)]('+')+'\x20'+_0x43db5c[_0x5d389b(0xa1)][_0x5d389b(0x7b)]+'\x20('+_0x43db5c[_0x5d389b(0xa1)][_0x5d389b(0x86)]+')');}}if(_0x4096ac[_0x5d389b(0xb0)]>0x0){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d[_0x5d389b(0x8f)]('~\x20'+_0x4096ac['length']+_0x5d389b(0x7f)));for(const _0x1888c4 of _0x4096ac){console[_0x5d389b(0xb8)](_0x5d389b(0x8d)+a26_0x41292d['yellow']('~')+'\x20'+_0x1888c4[_0x5d389b(0xa1)][_0x5d389b(0x7b)]+'\x20('+_0x1888c4['def'][_0x5d389b(0x86)]+')');}}if(_0x3e885d[_0x5d389b(0xb0)]===0x0&&_0x4096ac[_0x5d389b(0xb0)]===0x0)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xc2)](_0x5d389b(0xa4))),0x0;if(_0x1e25de[_0x5d389b(0x7e)])return console[_0x5d389b(0xb8)](a26_0x41292d['yellow'](_0x5d389b(0x99))),0x0;if(!_0x1e25de[_0x5d389b(0xc5)]){if(!isInteractive())return console[_0x5d389b(0xb8)](a26_0x41292d['red']('\x0aError:'),_0x5d389b(0x95)),console[_0x5d389b(0xb8)](a26_0x41292d['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1568eb=await confirmKey(_0x5d389b(0xb3)+(_0x3e885d[_0x5d389b(0xb0)]+_0x4096ac['length'])+_0x5d389b(0x85));if(!_0x1568eb)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0x8f)](_0x5d389b(0xad)),_0x5d389b(0xa9)),0x1;}const _0x1f6b97=await withProgressSpinner(_0x5d389b(0x92),_0x491130=>executePush({'engage':_0x5f450c[_0x5d389b(0xc6)],'segment':_0x5f450c[_0x5d389b(0x79)]},_0x7bd696,{'progress':{'update':_0x202e5e=>_0x491130['setPhase'](_0x202e5e)}}),{'verbose':_0x1e25de[_0x5d389b(0x91)]}),_0x5a0508=_0x1f6b97[_0x5d389b(0x94)];for(const _0x15691d of _0x5a0508[_0x5d389b(0x7c)]){if(_0x15691d[_0x5d389b(0xb7)]&&(_0x15691d[_0x5d389b(0x96)]===_0x5d389b(0xca)||_0x15691d[_0x5d389b(0x96)]===_0x5d389b(0xa7))){const _0x4a26da=getCampaignUrl(_0x1e25de[_0x5d389b(0xab)],_0x297bb8,_0x15691d['campaignId']),_0x498c29=_0x15691d['action']===_0x5d389b(0xca)?'+':'~',_0x49e8ba=_0x15691d['action']===_0x5d389b(0xca)?a26_0x41292d[_0x5d389b(0xc2)](_0x498c29):a26_0x41292d[_0x5d389b(0x8f)](_0x498c29);console[_0x5d389b(0xb8)]('\x20\x20'+_0x49e8ba+'\x20'+hyperlink(_0x15691d[_0x5d389b(0x7b)],_0x4a26da)+'\x20'+a26_0x41292d[_0x5d389b(0x93)](_0x4a26da));}}_0x5a0508[_0x5d389b(0xca)]>0x0&&console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xc2)](_0x5d389b(0xc9)+_0x5a0508[_0x5d389b(0xca)]+_0x5d389b(0xa8)));_0x5a0508[_0x5d389b(0xa7)]>0x0&&console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xc2)](_0x5d389b(0xbf)+_0x5a0508[_0x5d389b(0xa7)]+_0x5d389b(0xa8)));if(_0x5a0508[_0x5d389b(0xbd)]['length']>0x0){console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xaf)]('✘\x20'+_0x5a0508[_0x5d389b(0xbd)][_0x5d389b(0xb0)]+'\x20errors:'));for(const _0x45fea7 of _0x5a0508['errors']){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d[_0x5d389b(0xaf)](_0x45fea7[_0x5d389b(0x7b)])+':\x20'+_0x45fea7[_0x5d389b(0xb8)]);}}return saveSessionContext({'engage_workspace':_0x372f64},_0x1e25de['session']),_0x5a0508['errors'][_0x5d389b(0xb0)]>0x0?0x1:0x0;}async[a26_0x26c3c3(0x9c)](_0x3c8c3a,_0xc2d916,_0x40d095,_0x324f8b,_0x1dcc8f){const _0x13fe0c=a26_0x26c3c3,{options:_0x310691,tdx:_0x3778f6}=_0x3c8c3a,_0x33182f=_0x310691,_0x4532e3=_0x1dcc8f&&_0x324f8b?[_0x324f8b]:discoverListCampaignFiles(_0x40d095);if(_0x4532e3[_0x13fe0c(0xb0)]===0x0)return console['error'](a26_0x41292d[_0x13fe0c(0x8f)](_0x13fe0c(0x6d)+_0x40d095)),console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0x93)](_0x13fe0c(0x90))),0x1;const _0x4137e6=await _0x3778f6[_0x13fe0c(0xc6)]['resolveWorkspaceId'](_0xc2d916),_0x4330c=await withProgressSpinner('Preparing\x20ListCampaign\x20push...',()=>_0x3778f6[_0x13fe0c(0xc6)][_0x13fe0c(0xb6)](_0x4137e6,_0x4532e3),{'verbose':_0x310691[_0x13fe0c(0x91)]}),_0x55f68a=_0x4330c[_0x13fe0c(0x94)],_0x1a920b=_0x55f68a['filter'](_0x28cdf9=>_0x28cdf9['action']===_0x13fe0c(0xcb)),_0x5b48c4=_0x55f68a[_0x13fe0c(0x77)](_0x6fa87b=>_0x6fa87b['action']===_0x13fe0c(0xa3));console[_0x13fe0c(0xb8)](_0x13fe0c(0x83)+_0xc2d916+'\x27:');if(_0x1a920b[_0x13fe0c(0xb0)]>0x0){console['error']('\x20\x20'+a26_0x41292d[_0x13fe0c(0xc2)]('+\x20'+_0x1a920b['length']+_0x13fe0c(0x75)));for(const _0x11220e of _0x1a920b)console[_0x13fe0c(0xb8)](_0x13fe0c(0x8d)+a26_0x41292d[_0x13fe0c(0xc2)]('+')+'\x20'+_0x11220e['input'][_0x13fe0c(0x7b)]);}if(_0x5b48c4[_0x13fe0c(0xb0)]>0x0){console[_0x13fe0c(0xb8)]('\x20\x20'+a26_0x41292d['yellow']('~\x20'+_0x5b48c4[_0x13fe0c(0xb0)]+'\x20DRAFT\x20ListCampaigns\x20to\x20update:'));for(const _0x1e858f of _0x5b48c4)console[_0x13fe0c(0xb8)]('\x20\x20\x20\x20'+a26_0x41292d[_0x13fe0c(0x8f)]('~')+'\x20'+_0x1e858f[_0x13fe0c(0xb4)][_0x13fe0c(0x7b)]);}if(_0x33182f[_0x13fe0c(0x7e)])return console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0x8f)](_0x13fe0c(0x99))),0x0;if(!_0x33182f[_0x13fe0c(0xc5)]){if(!isInteractive())return console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0xaf)](_0x13fe0c(0x78))),console['error'](a26_0x41292d[_0x13fe0c(0x93)](_0x13fe0c(0x89))),0x1;const _0x4d0b94=await confirmKey('Push\x20'+_0x55f68a[_0x13fe0c(0xb0)]+_0x13fe0c(0xa5)+(_0x55f68a[_0x13fe0c(0xb0)]===0x1?'':'s')+'?');if(!_0x4d0b94)return console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0x8f)](_0x13fe0c(0xad)),_0x13fe0c(0xa9)),0x1;}const _0x2775d4=await withProgressSpinner(_0x13fe0c(0x9a),()=>_0x3778f6[_0x13fe0c(0xc6)][_0x13fe0c(0xc8)](_0x55f68a),{'verbose':_0x310691[_0x13fe0c(0x91)]});for(const _0x2193b8 of _0x2775d4[_0x13fe0c(0x94)]){const _0x2a8f8a=_0x2193b8[_0x13fe0c(0x96)]===_0x13fe0c(0xca)?a26_0x41292d[_0x13fe0c(0xc2)]('+'):a26_0x41292d[_0x13fe0c(0x8f)]('~');console[_0x13fe0c(0xb8)]('\x20\x20'+_0x2a8f8a+'\x20'+_0x2193b8['campaign'][_0x13fe0c(0x7b)]+'\x20('+_0x2193b8[_0x13fe0c(0x82)][_0x13fe0c(0x76)]+')');}return saveSessionContext({'engage_workspace':_0xc2d916},_0x310691[_0x13fe0c(0xbc)]),0x0;}}
@@ -1 +1 @@
1
- const a26_0x10eeb9=a26_0x1e5d;function a26_0x1e5d(_0x469475,_0x493036){_0x469475=_0x469475-0x17c;const _0x18f97d=a26_0x18f9();let _0x1e5ddd=_0x18f97d[_0x469475];return _0x1e5ddd;}(function(_0x4295d0,_0x5ca2ab){const _0x392fef=a26_0x1e5d,_0x5ca4aa=_0x4295d0();while(!![]){try{const _0x3cb4ce=-parseInt(_0x392fef(0x17c))/0x1*(parseInt(_0x392fef(0x18d))/0x2)+parseInt(_0x392fef(0x1a1))/0x3*(-parseInt(_0x392fef(0x17f))/0x4)+-parseInt(_0x392fef(0x181))/0x5+-parseInt(_0x392fef(0x18f))/0x6+parseInt(_0x392fef(0x186))/0x7+parseInt(_0x392fef(0x19d))/0x8*(-parseInt(_0x392fef(0x18b))/0x9)+parseInt(_0x392fef(0x197))/0xa;if(_0x3cb4ce===_0x5ca2ab)break;else _0x5ca4aa['push'](_0x5ca4aa['shift']());}catch(_0x2039a2){_0x5ca4aa['push'](_0x5ca4aa['shift']());}}}(a26_0x18f9,0xdff0a));function a26_0x18f9(){const _0xe502f8=['9CEtOuR','source','2CIlarK','toUpperCase','3152178ANCwOu','\x20not\x20applicable','campaignName','output','ready','description','relativePath','summary','44363150jlaESd','execute','\x20ready,\x20','dim','engage:campaign:readiness','Check\x20email\x20campaign\x20readiness\x20against\x20workspace\x20delivery\x20config','2394656wLpgFe','session','log','\x20(skipped:\x20','2463YdsgPD','Checking\x20campaign\x20readiness...','exitCode','yellow','513647QrBiuq','verbose','status','6836OEoXxq','validation','4750615QZDVMM','red','skipReason','message','delivery','1207479hDyUbW','checks','warnings','green','length'];a26_0x18f9=function(){return _0xe502f8;};return a26_0x18f9();}import a26_0x3c3ad2 from'chalk';import{handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{BaseCommand}from'./command.js';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{runCampaignReadiness,toStructuredCampaignReadinessReport}from'../sdk/engage/campaign-readiness-workflow.js';import{withSpinner}from'../utils/spinner.js';export class EngageCampaignReadinessCommand extends BaseCommand{['name']=a26_0x10eeb9(0x19b);[a26_0x10eeb9(0x194)]=a26_0x10eeb9(0x19c);async[a26_0x10eeb9(0x198)](_0xf566cb){const _0x3defe6=a26_0x10eeb9,{options:_0x592799,args:_0x5c4127,tdx:_0x29e2a3}=_0xf566cb,_0x2375dc=_0x592799,{data:_0x13d59f}=await withSpinner(_0x3defe6(0x1a2),()=>runCampaignReadiness({'engage':_0x29e2a3['engage'],'delivery':_0x29e2a3[_0x3defe6(0x185)]},{'target':_0x5c4127[0x0],'workspace':_0x2375dc['workspace'],'session':_0x592799[_0x3defe6(0x19e)]}),{'verbose':_0x592799[_0x3defe6(0x17d)]});if(isStructuredFormat(_0x592799)||_0x592799[_0x3defe6(0x192)]){const _0x50f483=toStructuredCampaignReadinessReport(_0x13d59f);return await handleSingleObjectOutput(_0x50f483,_0x592799),_0x13d59f['exitCode'];}if(_0x13d59f[_0x3defe6(0x184)])console[_0x3defe6(0x19f)](a26_0x3c3ad2[_0x3defe6(0x1a4)](_0x13d59f['message']));for(const _0x4cf126 of _0x13d59f['results']){if(_0x4cf126[_0x3defe6(0x17e)]==='skipped'){_0x592799[_0x3defe6(0x17d)]&&console[_0x3defe6(0x19f)](a26_0x3c3ad2[_0x3defe6(0x19a)]('–\x20'+_0x4cf126[_0x3defe6(0x195)]+_0x3defe6(0x1a0)+_0x4cf126[_0x3defe6(0x183)]+')'));continue;}const _0x376dd7=_0x4cf126[_0x3defe6(0x17e)]==='ready'?a26_0x3c3ad2['green']('✔'):_0x4cf126[_0x3defe6(0x17e)]==='blocked'?a26_0x3c3ad2[_0x3defe6(0x182)]('✖'):a26_0x3c3ad2[_0x3defe6(0x19a)]('–'),_0x98e46a=_0x4cf126['campaignName']?_0x4cf126[_0x3defe6(0x191)]+':\x20':'';console[_0x3defe6(0x19f)](_0x376dd7+'\x20'+_0x4cf126[_0x3defe6(0x195)]+':\x20'+_0x98e46a+_0x4cf126[_0x3defe6(0x17e)][_0x3defe6(0x18e)]());_0x4cf126[_0x3defe6(0x180)]&&(!_0x4cf126[_0x3defe6(0x180)]['valid']||_0x4cf126[_0x3defe6(0x180)][_0x3defe6(0x188)][_0x3defe6(0x18a)]>0x0)&&console[_0x3defe6(0x19f)](formatValidationResult(_0x4cf126['validation'],_0x4cf126[_0x3defe6(0x18c)]??'',_0x4cf126[_0x3defe6(0x195)]));for(const _0x20fae0 of _0x4cf126[_0x3defe6(0x187)]){const _0x45346f=_0x20fae0[_0x3defe6(0x17e)]===_0x3defe6(0x193)?a26_0x3c3ad2[_0x3defe6(0x189)]('✔'):_0x20fae0[_0x3defe6(0x17e)]==='blocked'?a26_0x3c3ad2[_0x3defe6(0x182)]('✖'):a26_0x3c3ad2['dim']('–');console['log']('\x20\x20'+_0x45346f+'\x20'+_0x20fae0['name']+':\x20'+_0x20fae0[_0x3defe6(0x184)]);}}const {readyCount:_0x51984d,blockedCount:_0x170165,notApplicableCount:_0x2e109b,skippedCount:_0x52f8ef}=_0x13d59f[_0x3defe6(0x196)],_0x4a8c17='Readiness:\x20'+_0x51984d+_0x3defe6(0x199)+_0x170165+'\x20blocked,\x20'+_0x2e109b+_0x3defe6(0x190)+(_0x52f8ef?',\x20'+_0x52f8ef+'\x20skipped':'');return console[_0x3defe6(0x19f)](_0x170165>0x0?a26_0x3c3ad2[_0x3defe6(0x182)](_0x4a8c17):a26_0x3c3ad2[_0x3defe6(0x189)](_0x4a8c17)),_0x13d59f[_0x3defe6(0x1a3)];}}
1
+ const a27_0x197b99=a27_0x12e2;(function(_0x15e9d4,_0x15e6b6){const _0x517066=a27_0x12e2,_0xb595d1=_0x15e9d4();while(!![]){try{const _0x57e2e9=parseInt(_0x517066(0x126))/0x1*(-parseInt(_0x517066(0x12e))/0x2)+parseInt(_0x517066(0x10b))/0x3*(-parseInt(_0x517066(0x114))/0x4)+-parseInt(_0x517066(0x10f))/0x5+-parseInt(_0x517066(0x111))/0x6+parseInt(_0x517066(0x11e))/0x7+parseInt(_0x517066(0x121))/0x8*(parseInt(_0x517066(0x125))/0x9)+-parseInt(_0x517066(0x117))/0xa*(-parseInt(_0x517066(0x10e))/0xb);if(_0x57e2e9===_0x15e6b6)break;else _0xb595d1['push'](_0xb595d1['shift']());}catch(_0x83d2d5){_0xb595d1['push'](_0xb595d1['shift']());}}}(a27_0x4ef6,0x547b5));import a27_0x649d6a from'chalk';function a27_0x4ef6(){const _0x58e166=['exitCode','valid','blocked','message','warnings','1217713MPNaDw','results','\x20ready,\x20','7064UKKCCs','dim','output','delivery','6057QBghlv','3bxqVxd','checks','relativePath','engage','workspace','description','session','status','127234mnwAFj','summary','engage:campaign:readiness','Check\x20email\x20campaign\x20readiness\x20against\x20workspace\x20delivery\x20config','\x20not\x20applicable','verbose','log','14169CCZUMi','validation','red','1826eUjOTw','685680owMAWZ','green','3733494zCUnKq','ready','name','212nhVGWY','\x20skipped','\x20(skipped:\x20','46890jxrXFu','skipReason'];a27_0x4ef6=function(){return _0x58e166;};return a27_0x4ef6();}import{handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{BaseCommand}from'./command.js';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a27_0x12e2(_0x2b6757,_0x526a6a){_0x2b6757=_0x2b6757-0x109;const _0x4ef6d7=a27_0x4ef6();let _0x12e27c=_0x4ef6d7[_0x2b6757];return _0x12e27c;}import{runCampaignReadiness,toStructuredCampaignReadinessReport}from'../sdk/engage/campaign-readiness-workflow.js';import{withSpinner}from'../utils/spinner.js';export class EngageCampaignReadinessCommand extends BaseCommand{['name']=a27_0x197b99(0x130);[a27_0x197b99(0x12b)]=a27_0x197b99(0x131);async['execute'](_0x13e424){const _0x13531b=a27_0x197b99,{options:_0x229365,args:_0x290703,tdx:_0x2e5122}=_0x13e424,_0x1b2f7a=_0x229365,{data:_0x47afb3}=await withSpinner('Checking\x20campaign\x20readiness...',()=>runCampaignReadiness({'engage':_0x2e5122[_0x13531b(0x129)],'delivery':_0x2e5122[_0x13531b(0x124)]},{'target':_0x290703[0x0],'workspace':_0x1b2f7a[_0x13531b(0x12a)],'session':_0x229365[_0x13531b(0x12c)]}),{'verbose':_0x229365['verbose']});if(isStructuredFormat(_0x229365)||_0x229365[_0x13531b(0x123)]){const _0x5a4110=toStructuredCampaignReadinessReport(_0x47afb3);return await handleSingleObjectOutput(_0x5a4110,_0x229365),_0x47afb3[_0x13531b(0x119)];}if(_0x47afb3[_0x13531b(0x11c)])console[_0x13531b(0x10a)](a27_0x649d6a['yellow'](_0x47afb3[_0x13531b(0x11c)]));for(const _0x10a9ee of _0x47afb3[_0x13531b(0x11f)]){if(_0x10a9ee[_0x13531b(0x12d)]==='skipped'){_0x229365[_0x13531b(0x109)]&&console['log'](a27_0x649d6a[_0x13531b(0x122)]('–\x20'+_0x10a9ee['relativePath']+_0x13531b(0x116)+_0x10a9ee[_0x13531b(0x118)]+')'));continue;}const _0x13117e=_0x10a9ee[_0x13531b(0x12d)]===_0x13531b(0x112)?a27_0x649d6a[_0x13531b(0x110)]('✔'):_0x10a9ee[_0x13531b(0x12d)]===_0x13531b(0x11b)?a27_0x649d6a[_0x13531b(0x10d)]('✖'):a27_0x649d6a[_0x13531b(0x122)]('–'),_0x20c62e=_0x10a9ee['campaignName']?_0x10a9ee['campaignName']+':\x20':'';console['log'](_0x13117e+'\x20'+_0x10a9ee[_0x13531b(0x128)]+':\x20'+_0x20c62e+_0x10a9ee['status']['toUpperCase']());_0x10a9ee[_0x13531b(0x10c)]&&(!_0x10a9ee['validation'][_0x13531b(0x11a)]||_0x10a9ee[_0x13531b(0x10c)][_0x13531b(0x11d)]['length']>0x0)&&console[_0x13531b(0x10a)](formatValidationResult(_0x10a9ee[_0x13531b(0x10c)],_0x10a9ee['source']??'',_0x10a9ee['relativePath']));for(const _0x3bcffa of _0x10a9ee[_0x13531b(0x127)]){const _0x14578c=_0x3bcffa[_0x13531b(0x12d)]===_0x13531b(0x112)?a27_0x649d6a['green']('✔'):_0x3bcffa[_0x13531b(0x12d)]===_0x13531b(0x11b)?a27_0x649d6a[_0x13531b(0x10d)]('✖'):a27_0x649d6a[_0x13531b(0x122)]('–');console['log']('\x20\x20'+_0x14578c+'\x20'+_0x3bcffa[_0x13531b(0x113)]+':\x20'+_0x3bcffa[_0x13531b(0x11c)]);}}const {readyCount:_0x545a45,blockedCount:_0xf8a116,notApplicableCount:_0x4500c2,skippedCount:_0x3fb536}=_0x47afb3[_0x13531b(0x12f)],_0x23dc12='Readiness:\x20'+_0x545a45+_0x13531b(0x120)+_0xf8a116+'\x20blocked,\x20'+_0x4500c2+_0x13531b(0x132)+(_0x3fb536?',\x20'+_0x3fb536+_0x13531b(0x115):'');return console[_0x13531b(0x10a)](_0xf8a116>0x0?a27_0x649d6a[_0x13531b(0x10d)](_0x23dc12):a27_0x649d6a['green'](_0x23dc12)),_0x47afb3['exitCode'];}}
@@ -1 +1 @@
1
- const a27_0x2f25dc=a27_0x23ca;(function(_0x1481d1,_0x5b2dd3){const _0x3956e2=a27_0x23ca,_0x19fef4=_0x1481d1();while(!![]){try{const _0x3758f9=-parseInt(_0x3956e2(0x1c7))/0x1*(-parseInt(_0x3956e2(0x1ab))/0x2)+parseInt(_0x3956e2(0x1ba))/0x3+-parseInt(_0x3956e2(0x1cb))/0x4*(-parseInt(_0x3956e2(0x1b1))/0x5)+-parseInt(_0x3956e2(0x1c0))/0x6*(-parseInt(_0x3956e2(0x1bf))/0x7)+parseInt(_0x3956e2(0x1d9))/0x8+parseInt(_0x3956e2(0x1aa))/0x9+-parseInt(_0x3956e2(0x1b0))/0xa*(parseInt(_0x3956e2(0x1cf))/0xb);if(_0x3758f9===_0x5b2dd3)break;else _0x19fef4['push'](_0x19fef4['shift']());}catch(_0x520421){_0x19fef4['push'](_0x19fef4['shift']());}}}(a27_0xdd00,0x7771b));function a27_0xdd00(){const _0x59c5ae=['8jWcKhO','\x20ListCampaign\x20YAML\x20file(s)\x20valid','error','warnings','warningCount','10267070TuenKM','30fMRrrE','\x20non-campaign\x20file(s)\x20skipped)','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','skippedCount','message','invalidCount','\x20warning(s)','hasErrors','reason','1873722envomV','length','errors','\x20warning(s)\x20found','red','42jTQLwm','372396tdnhTU','Validation\x20failed:\x20','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','validCount','Validate\x20campaign\x20YAML\x20files','verbose','yellow','3847FXbVtM','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Error:\x20Directory\x20not\x20found:\x20','Error:\x20Invalid\x20campaign\x20type\x20\x22','329628MtqxqM','green','campaign','utf8','22YxoAlO','validateListCampaignFiles','relativePath','endsWith','description','resolve','relative','path','valid','log','6419136uMCUmH','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','dirname','\x20valid','\x20(skipped:\x20','.yml','filter','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','dim','\x20error(s)','campaignType','2101185NoYtjR'];a27_0xdd00=function(){return _0x59c5ae;};return a27_0xdd00();}import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{discoverListCampaignFiles,validateListCampaignYaml}from'../sdk/engage/list-campaign-yaml.js';import{existsSync,readFileSync}from'fs';import a27_0x831bf from'chalk';import a27_0x127ce3 from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a27_0x23ca(_0x599e6a,_0x57e859){_0x599e6a=_0x599e6a-0x1a8;const _0xdd00ae=a27_0xdd00();let _0x23ca21=_0xdd00ae[_0x599e6a];return _0x23ca21;}export class EngageCampaignValidateCommand extends BaseCommand{['name']='engage:campaign:validate';[a27_0x2f25dc(0x1d3)]=a27_0x2f25dc(0x1c4);async['execute'](_0x5b5cd7){const _0x38391c=a27_0x2f25dc,{options:_0x505bf8,args:_0x19d1e9}=_0x5b5cd7,_0x5069ac=_0x505bf8,_0xc80adf=_0x5069ac[_0x38391c(0x1a9)]??_0x38391c(0x1cd);if(_0xc80adf==='list-campaign')return this[_0x38391c(0x1d0)](_0x19d1e9[0x0],_0x5069ac[_0x38391c(0x1c5)]);if(_0xc80adf!==_0x38391c(0x1cd))return console[_0x38391c(0x1ad)](_0x38391c(0x1ca)+_0xc80adf+_0x38391c(0x1c2)),0x1;const _0xe288af=_0x19d1e9[0x0],_0x5b6a39=_0xe288af?a27_0x127ce3[_0x38391c(0x1d4)](_0xe288af):undefined,_0x59ed67=_0x5b6a39?isYamlFile(_0x5b6a39):![];let _0x338169,_0x3a6e2a;if(_0x59ed67&&_0x5b6a39)_0x338169=a27_0x127ce3['dirname'](_0x5b6a39),_0x3a6e2a=_0x5b6a39;else _0x5b6a39?_0x338169=_0x5b6a39:_0x338169=process['cwd']();if(!_0x3a6e2a&&!existsSync(_0x338169))return console[_0x38391c(0x1ad)](a27_0x831bf[_0x38391c(0x1be)](_0x38391c(0x1c9)+_0x338169+'\x0a')),0x1;let _0x869e56;if(_0x3a6e2a){if(!_0x3a6e2a['endsWith'](_0x38391c(0x1de))&&!_0x3a6e2a[_0x38391c(0x1d2)]('.yaml'))return console[_0x38391c(0x1ad)](a27_0x831bf[_0x38391c(0x1be)](_0x38391c(0x1e0)+_0x3a6e2a+'\x0a')),0x1;_0x869e56=[_0x3a6e2a];}else _0x869e56=findYamlFiles(_0x338169);if(_0x869e56[_0x38391c(0x1bb)]===0x0)return console[_0x38391c(0x1ad)](a27_0x831bf[_0x38391c(0x1be)](_0x38391c(0x1c8)+_0x338169+'\x0a')),0x1;const _0x572775=validateYamlFiles(_0x869e56,_0x338169,{'filterType':_0x38391c(0x1cd)}),_0x2d13c6=calculateSummary(_0x572775),_0x5dec68=_0x572775[_0x38391c(0x1df)](isValidationResult);if(_0x5dec68[_0x38391c(0x1bb)]===0x0)return console[_0x38391c(0x1ad)](a27_0x831bf[_0x38391c(0x1c6)](_0x38391c(0x1b3)+_0x338169+'\x0a')),_0x2d13c6['skippedCount']>0x0&&console[_0x38391c(0x1ad)](a27_0x831bf[_0x38391c(0x1e1)]('('+_0x2d13c6['skippedCount']+_0x38391c(0x1b2))),0x0;for(const _0x426546 of _0x572775){if(!isValidationResult(_0x426546)){_0x5069ac['verbose']&&console[_0x38391c(0x1d8)](a27_0x831bf[_0x38391c(0x1e1)]('-\x20'+_0x426546[_0x38391c(0x1d1)]+_0x38391c(0x1dd)+_0x426546[_0x38391c(0x1b9)]+')'));continue;}const {relativePath:_0x26c84c,source:_0x521502,result:_0xbc5600}=_0x426546;if(_0xbc5600[_0x38391c(0x1d7)]&&_0xbc5600[_0x38391c(0x1ae)][_0x38391c(0x1bb)]===0x0)_0x5069ac[_0x38391c(0x1c5)]&&console[_0x38391c(0x1d8)](a27_0x831bf[_0x38391c(0x1cc)]('✔\x20'+_0x26c84c));else _0xbc5600[_0x38391c(0x1d7)]?(console['log'](a27_0x831bf['yellow']('⚠\x20'+_0x26c84c+':\x20'+_0xbc5600[_0x38391c(0x1ae)][_0x38391c(0x1bb)]+_0x38391c(0x1b7))),console[_0x38391c(0x1d8)](formatValidationResult(_0xbc5600,_0x521502,_0x26c84c))):(console['log'](a27_0x831bf['red']('✖\x20'+_0x26c84c+':\x20'+_0xbc5600[_0x38391c(0x1bc)][_0x38391c(0x1bb)]+_0x38391c(0x1a8))),console[_0x38391c(0x1d8)](formatValidationResult(_0xbc5600,_0x521502,_0x26c84c)));}return console[_0x38391c(0x1d8)](''),_0x2d13c6[_0x38391c(0x1b8)]?(console[_0x38391c(0x1d8)](a27_0x831bf['red']('Validation\x20failed:\x20'+_0x2d13c6[_0x38391c(0x1b6)]+'\x20campaign(s)\x20with\x20errors,\x20'+_0x2d13c6[_0x38391c(0x1c3)]+_0x38391c(0x1dc))),_0x2d13c6[_0x38391c(0x1af)]>0x0&&console[_0x38391c(0x1d8)](a27_0x831bf[_0x38391c(0x1c6)](_0x2d13c6[_0x38391c(0x1af)]+'\x20warning(s)\x20found')),_0x2d13c6['skippedCount']>0x0&&console[_0x38391c(0x1d8)](a27_0x831bf[_0x38391c(0x1e1)](_0x2d13c6[_0x38391c(0x1b4)]+'\x20non-campaign\x20file(s)\x20skipped')),0x1):(console['log'](a27_0x831bf['green']('✔\x20All\x20'+_0x2d13c6[_0x38391c(0x1c3)]+'\x20campaign(s)\x20valid')),_0x2d13c6[_0x38391c(0x1af)]>0x0&&console[_0x38391c(0x1d8)](a27_0x831bf[_0x38391c(0x1c6)](_0x2d13c6[_0x38391c(0x1af)]+_0x38391c(0x1bd))),_0x2d13c6['skippedCount']>0x0&&console[_0x38391c(0x1d8)](a27_0x831bf[_0x38391c(0x1e1)](_0x2d13c6['skippedCount']+'\x20non-campaign\x20file(s)\x20skipped')),0x0);}[a27_0x2f25dc(0x1d0)](_0x43b8ec,_0x2e66cb){const _0x5c816e=a27_0x2f25dc,_0x132cd1=_0x43b8ec?a27_0x127ce3[_0x5c816e(0x1d4)](_0x43b8ec):undefined,_0x51a0c1=_0x132cd1?isYamlFile(_0x132cd1):![],_0x2eb779=_0x51a0c1&&_0x132cd1?a27_0x127ce3[_0x5c816e(0x1db)](_0x132cd1):_0x132cd1??process['cwd']();if(!_0x51a0c1&&!existsSync(_0x2eb779))return console[_0x5c816e(0x1ad)](a27_0x831bf[_0x5c816e(0x1be)](_0x5c816e(0x1c9)+_0x2eb779)),0x1;const _0xb622c5=_0x51a0c1&&_0x132cd1?[_0x132cd1]:discoverListCampaignFiles(_0x2eb779);if(_0xb622c5[_0x5c816e(0x1bb)]===0x0)return console[_0x5c816e(0x1ad)](a27_0x831bf[_0x5c816e(0x1c6)](_0x5c816e(0x1da)+_0x2eb779)),0x1;let _0x15e892=0x0;for(const _0xc464cf of _0xb622c5){const _0x50aca6=validateListCampaignYaml(readFileSync(_0xc464cf,_0x5c816e(0x1ce)));if(_0x50aca6[_0x5c816e(0x1d7)]){if(_0x2e66cb)console['log'](a27_0x831bf[_0x5c816e(0x1cc)]('✔\x20'+a27_0x127ce3[_0x5c816e(0x1d5)](_0x2eb779,_0xc464cf)));continue;}_0x15e892+=_0x50aca6[_0x5c816e(0x1bc)]['length'],console[_0x5c816e(0x1ad)](a27_0x831bf[_0x5c816e(0x1be)]('✖\x20'+a27_0x127ce3[_0x5c816e(0x1d5)](_0x2eb779,_0xc464cf)));for(const _0x1b4329 of _0x50aca6[_0x5c816e(0x1bc)]){const _0x22910b=_0x1b4329[_0x5c816e(0x1d6)]?_0x1b4329[_0x5c816e(0x1d6)]+':\x20':'';console[_0x5c816e(0x1ad)]('\x20\x20'+a27_0x831bf[_0x5c816e(0x1be)]('✗')+'\x20'+_0x22910b+_0x1b4329[_0x5c816e(0x1b5)]);}}if(_0x15e892>0x0)return console[_0x5c816e(0x1ad)](a27_0x831bf['red'](_0x5c816e(0x1c1)+_0x15e892+'\x20ListCampaign\x20error(s)')),0x1;return console['log'](a27_0x831bf[_0x5c816e(0x1cc)]('✔\x20All\x20'+_0xb622c5[_0x5c816e(0x1bb)]+_0x5c816e(0x1ac))),0x0;}}
1
+ const a28_0x4255a6=a28_0x13d9;(function(_0x20e48a,_0x65eb4a){const _0x2202f0=a28_0x13d9,_0x78ddab=_0x20e48a();while(!![]){try{const _0x12fad2=parseInt(_0x2202f0(0xca))/0x1*(-parseInt(_0x2202f0(0xd7))/0x2)+-parseInt(_0x2202f0(0xc9))/0x3+-parseInt(_0x2202f0(0xc6))/0x4+parseInt(_0x2202f0(0xcf))/0x5*(parseInt(_0x2202f0(0xa2))/0x6)+-parseInt(_0x2202f0(0xb6))/0x7+-parseInt(_0x2202f0(0x9f))/0x8*(-parseInt(_0x2202f0(0xc8))/0x9)+parseInt(_0x2202f0(0xb1))/0xa;if(_0x12fad2===_0x65eb4a)break;else _0x78ddab['push'](_0x78ddab['shift']());}catch(_0x526d0f){_0x78ddab['push'](_0x78ddab['shift']());}}}(a28_0x44cc,0xc327b));function a28_0x44cc(){const _0x2f2057=['246536FEshhm','length','Validate\x20campaign\x20YAML\x20files','319692XuunGb','red','filter','validCount','\x20ListCampaign\x20error(s)','green','\x20error(s)','\x20valid','name','endsWith','description','\x20campaign(s)\x20valid','errors','Error:\x20Directory\x20not\x20found:\x20','warningCount','32855620RamEyf','path','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','execute','dim','6265462HhlFGy','utf8','.yaml','campaign','error','valid','✔\x20All\x20','verbose','\x20non-campaign\x20file(s)\x20skipped','resolve','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','skippedCount','engage:campaign:validate','yellow','cwd','message','4580980FjREpH','\x20warning(s)\x20found','279vhoHoT','4504200WOAPpU','55RUepLp','validateListCampaignFiles','invalidCount','relative','log','55ZkzsRl','Validation\x20failed:\x20','\x20(skipped:\x20','\x20campaign(s)\x20with\x20errors,\x20','\x20ListCampaign\x20YAML\x20file(s)\x20valid','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','warnings','list-campaign','17670cmcRmV','campaignType'];a28_0x44cc=function(){return _0x2f2057;};return a28_0x44cc();}import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{discoverListCampaignFiles,validateListCampaignYaml}from'../sdk/engage/list-campaign-yaml.js';import{existsSync,readFileSync}from'fs';import a28_0x305554 from'chalk';import a28_0x31f597 from'path';function a28_0x13d9(_0x244974,_0x497aa9){_0x244974=_0x244974-0x9f;const _0x44cca9=a28_0x44cc();let _0x13d941=_0x44cca9[_0x244974];return _0x13d941;}import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageCampaignValidateCommand extends BaseCommand{[a28_0x4255a6(0xaa)]=a28_0x4255a6(0xc2);[a28_0x4255a6(0xac)]=a28_0x4255a6(0xa1);async[a28_0x4255a6(0xb4)](_0x2c72e8){const _0x2faea3=a28_0x4255a6,{options:_0x3e66aa,args:_0x5232ec}=_0x2c72e8,_0x2d2d53=_0x3e66aa,_0x27867c=_0x2d2d53[_0x2faea3(0xd8)]??'campaign';if(_0x27867c===_0x2faea3(0xd6))return this[_0x2faea3(0xcb)](_0x5232ec[0x0],_0x2d2d53[_0x2faea3(0xbd)]);if(_0x27867c!=='campaign')return console['error']('Error:\x20Invalid\x20campaign\x20type\x20\x22'+_0x27867c+_0x2faea3(0xb3)),0x1;const _0x2f32b4=_0x5232ec[0x0],_0x177254=_0x2f32b4?a28_0x31f597[_0x2faea3(0xbf)](_0x2f32b4):undefined,_0x1c015c=_0x177254?isYamlFile(_0x177254):![];let _0x116c89,_0x367996;if(_0x1c015c&&_0x177254)_0x116c89=a28_0x31f597['dirname'](_0x177254),_0x367996=_0x177254;else _0x177254?_0x116c89=_0x177254:_0x116c89=process[_0x2faea3(0xc4)]();if(!_0x367996&&!existsSync(_0x116c89))return console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xa3)](_0x2faea3(0xaf)+_0x116c89+'\x0a')),0x1;let _0x3ce57b;if(_0x367996){if(!_0x367996[_0x2faea3(0xab)]('.yml')&&!_0x367996['endsWith'](_0x2faea3(0xb8)))return console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xa3)](_0x2faea3(0xd4)+_0x367996+'\x0a')),0x1;_0x3ce57b=[_0x367996];}else _0x3ce57b=findYamlFiles(_0x116c89);if(_0x3ce57b[_0x2faea3(0xa0)]===0x0)return console['error'](a28_0x305554[_0x2faea3(0xa3)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x116c89+'\x0a')),0x1;const _0x37202e=validateYamlFiles(_0x3ce57b,_0x116c89,{'filterType':_0x2faea3(0xb9)}),_0x517ea1=calculateSummary(_0x37202e),_0x21249b=_0x37202e[_0x2faea3(0xa4)](isValidationResult);if(_0x21249b['length']===0x0)return console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xc3)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x116c89+'\x0a')),_0x517ea1[_0x2faea3(0xc1)]>0x0&&console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xb5)]('('+_0x517ea1[_0x2faea3(0xc1)]+'\x20non-campaign\x20file(s)\x20skipped)')),0x0;for(const _0xd34fab of _0x37202e){if(!isValidationResult(_0xd34fab)){_0x2d2d53[_0x2faea3(0xbd)]&&console['log'](a28_0x305554[_0x2faea3(0xb5)]('-\x20'+_0xd34fab['relativePath']+_0x2faea3(0xd1)+_0xd34fab['reason']+')'));continue;}const {relativePath:_0x29a6ac,source:_0x19bfad,result:_0x36099a}=_0xd34fab;if(_0x36099a[_0x2faea3(0xbb)]&&_0x36099a['warnings'][_0x2faea3(0xa0)]===0x0)_0x2d2d53[_0x2faea3(0xbd)]&&console[_0x2faea3(0xce)](a28_0x305554['green']('✔\x20'+_0x29a6ac));else _0x36099a[_0x2faea3(0xbb)]?(console[_0x2faea3(0xce)](a28_0x305554[_0x2faea3(0xc3)]('⚠\x20'+_0x29a6ac+':\x20'+_0x36099a[_0x2faea3(0xd5)][_0x2faea3(0xa0)]+'\x20warning(s)')),console['log'](formatValidationResult(_0x36099a,_0x19bfad,_0x29a6ac))):(console[_0x2faea3(0xce)](a28_0x305554['red']('✖\x20'+_0x29a6ac+':\x20'+_0x36099a[_0x2faea3(0xae)][_0x2faea3(0xa0)]+_0x2faea3(0xa8))),console[_0x2faea3(0xce)](formatValidationResult(_0x36099a,_0x19bfad,_0x29a6ac)));}return console[_0x2faea3(0xce)](''),_0x517ea1['hasErrors']?(console['log'](a28_0x305554[_0x2faea3(0xa3)](_0x2faea3(0xd0)+_0x517ea1[_0x2faea3(0xcc)]+_0x2faea3(0xd2)+_0x517ea1[_0x2faea3(0xa5)]+_0x2faea3(0xa9))),_0x517ea1[_0x2faea3(0xb0)]>0x0&&console['log'](a28_0x305554['yellow'](_0x517ea1[_0x2faea3(0xb0)]+'\x20warning(s)\x20found')),_0x517ea1[_0x2faea3(0xc1)]>0x0&&console['log'](a28_0x305554[_0x2faea3(0xb5)](_0x517ea1[_0x2faea3(0xc1)]+_0x2faea3(0xbe))),0x1):(console[_0x2faea3(0xce)](a28_0x305554[_0x2faea3(0xa7)](_0x2faea3(0xbc)+_0x517ea1[_0x2faea3(0xa5)]+_0x2faea3(0xad))),_0x517ea1['warningCount']>0x0&&console[_0x2faea3(0xce)](a28_0x305554[_0x2faea3(0xc3)](_0x517ea1['warningCount']+_0x2faea3(0xc7))),_0x517ea1[_0x2faea3(0xc1)]>0x0&&console['log'](a28_0x305554[_0x2faea3(0xb5)](_0x517ea1[_0x2faea3(0xc1)]+_0x2faea3(0xbe))),0x0);}[a28_0x4255a6(0xcb)](_0x1ab8b0,_0x2616c8){const _0x139aac=a28_0x4255a6,_0x139f79=_0x1ab8b0?a28_0x31f597[_0x139aac(0xbf)](_0x1ab8b0):undefined,_0x41182a=_0x139f79?isYamlFile(_0x139f79):![],_0x344fc=_0x41182a&&_0x139f79?a28_0x31f597['dirname'](_0x139f79):_0x139f79??process[_0x139aac(0xc4)]();if(!_0x41182a&&!existsSync(_0x344fc))return console[_0x139aac(0xba)](a28_0x305554[_0x139aac(0xa3)]('Error:\x20Directory\x20not\x20found:\x20'+_0x344fc)),0x1;const _0x899167=_0x41182a&&_0x139f79?[_0x139f79]:discoverListCampaignFiles(_0x344fc);if(_0x899167[_0x139aac(0xa0)]===0x0)return console[_0x139aac(0xba)](a28_0x305554[_0x139aac(0xc3)](_0x139aac(0xc0)+_0x344fc)),0x1;let _0x38bfcc=0x0;for(const _0x454636 of _0x899167){const _0x57bd05=validateListCampaignYaml(readFileSync(_0x454636,_0x139aac(0xb7)));if(_0x57bd05[_0x139aac(0xbb)]){if(_0x2616c8)console['log'](a28_0x305554[_0x139aac(0xa7)]('✔\x20'+a28_0x31f597[_0x139aac(0xcd)](_0x344fc,_0x454636)));continue;}_0x38bfcc+=_0x57bd05[_0x139aac(0xae)][_0x139aac(0xa0)],console['error'](a28_0x305554['red']('✖\x20'+a28_0x31f597[_0x139aac(0xcd)](_0x344fc,_0x454636)));for(const _0x228662 of _0x57bd05[_0x139aac(0xae)]){const _0x217c74=_0x228662[_0x139aac(0xb2)]?_0x228662['path']+':\x20':'';console[_0x139aac(0xba)]('\x20\x20'+a28_0x305554[_0x139aac(0xa3)]('✗')+'\x20'+_0x217c74+_0x228662[_0x139aac(0xc5)]);}}if(_0x38bfcc>0x0)return console[_0x139aac(0xba)](a28_0x305554[_0x139aac(0xa3)](_0x139aac(0xd0)+_0x38bfcc+_0x139aac(0xa6))),0x1;return console[_0x139aac(0xce)](a28_0x305554[_0x139aac(0xa7)](_0x139aac(0xbc)+_0x899167[_0x139aac(0xa0)]+_0x139aac(0xd3))),0x0;}}