@treasuredata/tdx 2026.10.0 → 2026.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.d.ts +1 -1
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli-categories.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +1 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/agent-command.js +1 -1
  11. package/dist/commands/agent-test-command.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/cas-command.js +1 -1
  15. package/dist/commands/cas-journey-command.js +1 -1
  16. package/dist/commands/cas-segment-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.d.ts.map +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-command.js.map +1 -1
  21. package/dist/commands/claude-statusline-command.d.ts.map +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-statusline-command.js.map +1 -1
  24. package/dist/commands/codex-command.d.ts.map +1 -1
  25. package/dist/commands/codex-command.js +1 -1
  26. package/dist/commands/codex-command.js.map +1 -1
  27. package/dist/commands/command.js +1 -1
  28. package/dist/commands/connection-command.js +1 -1
  29. package/dist/commands/databases.js +1 -1
  30. package/dist/commands/delivery-command.js +1 -1
  31. package/dist/commands/describe.js +1 -1
  32. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  33. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  34. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-campaign-pull-command.js +1 -1
  36. package/dist/commands/engage-campaign-push-command.js +1 -1
  37. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  38. package/dist/commands/engage-campaign-validate-command.js +1 -1
  39. package/dist/commands/engage-command.js +1 -1
  40. package/dist/commands/engage-in-browser-message-command.js +1 -1
  41. package/dist/commands/engage-landing-page-command.js +1 -1
  42. package/dist/commands/engage-template-pull-command.js +1 -1
  43. package/dist/commands/engage-template-push-command.js +1 -1
  44. package/dist/commands/engage-template-validate-command.js +1 -1
  45. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  46. package/dist/commands/job-command.js +1 -1
  47. package/dist/commands/journey-command.js +1 -1
  48. package/dist/commands/journey-validate-command.js +1 -1
  49. package/dist/commands/llm-command.js +1 -1
  50. package/dist/commands/mcp-command.js +1 -1
  51. package/dist/commands/opencode-command.d.ts +10 -3
  52. package/dist/commands/opencode-command.d.ts.map +1 -1
  53. package/dist/commands/opencode-command.js +1 -1
  54. package/dist/commands/opencode-command.js.map +1 -1
  55. package/dist/commands/p13n-command.js +1 -1
  56. package/dist/commands/parent-segment-command.js +1 -1
  57. package/dist/commands/policy-command.js +1 -1
  58. package/dist/commands/profile-command.js +1 -1
  59. package/dist/commands/profiles-command.d.ts.map +1 -1
  60. package/dist/commands/profiles-command.js +1 -1
  61. package/dist/commands/profiles-command.js.map +1 -1
  62. package/dist/commands/query-command.js +1 -1
  63. package/dist/commands/schedule-command.js +1 -1
  64. package/dist/commands/segment-command.js +1 -1
  65. package/dist/commands/segment-create-command.js +1 -1
  66. package/dist/commands/segment-fields-command.js +1 -1
  67. package/dist/commands/segment-move-command.js +1 -1
  68. package/dist/commands/segment-pull-command.js +1 -1
  69. package/dist/commands/segment-push-command.js +1 -1
  70. package/dist/commands/segment-update-command.js +1 -1
  71. package/dist/commands/segment-use-command.js +1 -1
  72. package/dist/commands/segment-validate-command.js +1 -1
  73. package/dist/commands/segments.js +1 -1
  74. package/dist/commands/show.js +1 -1
  75. package/dist/commands/status-command.js +1 -1
  76. package/dist/commands/table-deleted.js +1 -1
  77. package/dist/commands/tables.js +1 -1
  78. package/dist/commands/unset-command.js +1 -1
  79. package/dist/commands/upgrade-command.js +1 -1
  80. package/dist/commands/usage-command.d.ts +10 -0
  81. package/dist/commands/usage-command.d.ts.map +1 -0
  82. package/dist/commands/usage-command.js +1 -0
  83. package/dist/commands/usage-command.js.map +1 -0
  84. package/dist/commands/use-command.js +1 -1
  85. package/dist/commands/user-command.js +1 -1
  86. package/dist/commands/work-command.js +1 -1
  87. package/dist/commands/workflow-command.js +1 -1
  88. package/dist/core/auth.js +1 -1
  89. package/dist/core/command-output.js +1 -1
  90. package/dist/core/config.d.ts +2 -1
  91. package/dist/core/config.d.ts.map +1 -1
  92. package/dist/core/config.js +1 -1
  93. package/dist/core/config.js.map +1 -1
  94. package/dist/core/connection-cache.js +1 -1
  95. package/dist/core/constants.js +1 -1
  96. package/dist/core/credential-cache.js +1 -1
  97. package/dist/core/global-context.js +1 -1
  98. package/dist/core/keychain.js +1 -1
  99. package/dist/core/oauth-keychain.js +1 -1
  100. package/dist/core/oauth.js +1 -1
  101. package/dist/core/profile.d.ts +1 -0
  102. package/dist/core/profile.d.ts.map +1 -1
  103. package/dist/core/profile.js +1 -1
  104. package/dist/core/profile.js.map +1 -1
  105. package/dist/core/project-config.js +1 -1
  106. package/dist/core/session.js +1 -1
  107. package/dist/core/site-mismatch.js +1 -1
  108. package/dist/core/user-cache.js +1 -1
  109. package/dist/core/version.js +1 -1
  110. package/dist/index.js +1 -1
  111. package/dist/mcp/server.js +1 -1
  112. package/dist/mcp/tools/index.js +1 -1
  113. package/dist/mcp/tools/tdx-run.js +1 -1
  114. package/dist/mcp/tools/tdx-search.js +1 -1
  115. package/dist/mcp/tools/work-create-item.js +1 -1
  116. package/dist/mcp/utils.js +1 -1
  117. package/dist/proxy/claude-usage-tracker.d.ts +5 -4
  118. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  119. package/dist/proxy/claude-usage-tracker.js +1 -1
  120. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  121. package/dist/proxy/passthrough-server.js +1 -1
  122. package/dist/proxy/sse-usage-parser.js +1 -1
  123. package/dist/sdk/agent/agent-config.js +1 -1
  124. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  125. package/dist/sdk/agent/agent-yaml.js +1 -1
  126. package/dist/sdk/agent/test/evaluator.js +1 -1
  127. package/dist/sdk/agent/test/executor.js +1 -1
  128. package/dist/sdk/agent/test/index.js +1 -1
  129. package/dist/sdk/agent/test/output.js +1 -1
  130. package/dist/sdk/agent/test/parser.js +1 -1
  131. package/dist/sdk/agent/tool-target-registry.js +1 -1
  132. package/dist/sdk/api.js +1 -1
  133. package/dist/sdk/auth-token.js +1 -1
  134. package/dist/sdk/cas/audience-context.js +1 -1
  135. package/dist/sdk/cas/cas-api-client.js +1 -1
  136. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  137. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  138. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  139. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  140. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  141. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  142. package/dist/sdk/cas/index.js +1 -1
  143. package/dist/sdk/cas/pull-workflow.js +1 -1
  144. package/dist/sdk/cas/push-workflow.js +1 -1
  145. package/dist/sdk/cas/validate-files.js +1 -1
  146. package/dist/sdk/client/cdp-api-client.js +1 -1
  147. package/dist/sdk/client/delivery-api-client.js +1 -1
  148. package/dist/sdk/client/endpoints.js +1 -1
  149. package/dist/sdk/client/engage-api-client.js +1 -1
  150. package/dist/sdk/client/http-client.js +1 -1
  151. package/dist/sdk/client/llm-api-client.js +1 -1
  152. package/dist/sdk/client/oauth-refresh.js +1 -1
  153. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  154. package/dist/sdk/client/rate-limiter.js +1 -1
  155. package/dist/sdk/client/td-api-client.js +1 -1
  156. package/dist/sdk/client/trino-api-client.js +1 -1
  157. package/dist/sdk/client/workflow-client.js +1 -1
  158. package/dist/sdk/connection-validator.js +1 -1
  159. package/dist/sdk/connection.js +1 -1
  160. package/dist/sdk/delivery.js +1 -1
  161. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  162. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  163. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  164. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  165. package/dist/sdk/engage/campaign-pull.js +1 -1
  166. package/dist/sdk/engage/campaign-push.js +1 -1
  167. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  168. package/dist/sdk/engage/campaign-readiness.js +1 -1
  169. package/dist/sdk/engage/campaign-validator.js +1 -1
  170. package/dist/sdk/engage/campaign-yaml.js +1 -1
  171. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  172. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  173. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  174. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  175. package/dist/sdk/engage/landing-page-init.js +1 -1
  176. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  177. package/dist/sdk/engage/landing-page-pull.js +1 -1
  178. package/dist/sdk/engage/landing-page-push.js +1 -1
  179. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  180. package/dist/sdk/engage/landing-page-validator.js +1 -1
  181. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  182. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  183. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  184. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  185. package/dist/sdk/engage/template-pull.js +1 -1
  186. package/dist/sdk/engage/template-push.js +1 -1
  187. package/dist/sdk/engage/template-validator.js +1 -1
  188. package/dist/sdk/engage/template-yaml.js +1 -1
  189. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  190. package/dist/sdk/engage/types/campaign-def.js +1 -1
  191. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  192. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  193. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  194. package/dist/sdk/engage/types/template-schema.js +1 -1
  195. package/dist/sdk/engage/workspace-assignments.js +1 -1
  196. package/dist/sdk/engage.js +1 -1
  197. package/dist/sdk/errors.js +1 -1
  198. package/dist/sdk/index.js +1 -1
  199. package/dist/sdk/io/index.js +1 -1
  200. package/dist/sdk/io/node-filesystem.js +1 -1
  201. package/dist/sdk/job.js +1 -1
  202. package/dist/sdk/journey.js +1 -1
  203. package/dist/sdk/llm/chat-cache.js +1 -1
  204. package/dist/sdk/llm/codex-usage.d.ts +13 -0
  205. package/dist/sdk/llm/codex-usage.d.ts.map +1 -0
  206. package/dist/sdk/llm/codex-usage.js +1 -0
  207. package/dist/sdk/llm/codex-usage.js.map +1 -0
  208. package/dist/sdk/llm/index.js +1 -1
  209. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  210. package/dist/sdk/llm/model-factors.js +1 -1
  211. package/dist/sdk/llm/user-settings.js +1 -1
  212. package/dist/sdk/llm/work-models.d.ts +52 -0
  213. package/dist/sdk/llm/work-models.d.ts.map +1 -0
  214. package/dist/sdk/llm/work-models.js +1 -0
  215. package/dist/sdk/llm/work-models.js.map +1 -0
  216. package/dist/sdk/p13n-studio-errors.js +1 -1
  217. package/dist/sdk/p13n-studio.js +1 -1
  218. package/dist/sdk/personalization.js +1 -1
  219. package/dist/sdk/policy.js +1 -1
  220. package/dist/sdk/query/deleted-table-validation.js +1 -1
  221. package/dist/sdk/query/index.js +1 -1
  222. package/dist/sdk/query/sql-parser.js +1 -1
  223. package/dist/sdk/realtime.js +1 -1
  224. package/dist/sdk/schedule.js +1 -1
  225. package/dist/sdk/segment/audience-context.js +1 -1
  226. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  227. package/dist/sdk/segment/fields-display.js +1 -1
  228. package/dist/sdk/segment/file-discovery.js +1 -1
  229. package/dist/sdk/segment/journey-utils.js +1 -1
  230. package/dist/sdk/segment/journey-validator.js +1 -1
  231. package/dist/sdk/segment/journey-yaml.js +1 -1
  232. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  233. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  234. package/dist/sdk/segment/pull-workflow.js +1 -1
  235. package/dist/sdk/segment/push-recovery.js +1 -1
  236. package/dist/sdk/segment/push-workflow.js +1 -1
  237. package/dist/sdk/segment/resolution-context.js +1 -1
  238. package/dist/sdk/segment/segment-path-parser.js +1 -1
  239. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  240. package/dist/sdk/segment/segment-validator.js +1 -1
  241. package/dist/sdk/segment/target-resolution.js +1 -1
  242. package/dist/sdk/segment/tdx-config.js +1 -1
  243. package/dist/sdk/segment/types/activation-schema.js +1 -1
  244. package/dist/sdk/segment/types/journey-def.js +1 -1
  245. package/dist/sdk/segment/types/journey-schema.js +1 -1
  246. package/dist/sdk/segment/types/segment-def.js +1 -1
  247. package/dist/sdk/segment/types/segment-schema.js +1 -1
  248. package/dist/sdk/segment/validate-files.js +1 -1
  249. package/dist/sdk/segment/yaml-validator.js +1 -1
  250. package/dist/sdk/segment.js +1 -1
  251. package/dist/sdk/types/index.js +1 -1
  252. package/dist/sdk/types/progress.js +1 -1
  253. package/dist/sdk/types/workspace.js +1 -1
  254. package/dist/sdk/user.js +1 -1
  255. package/dist/sdk/util/format-detector.js +1 -1
  256. package/dist/sdk/util/formatters.js +1 -1
  257. package/dist/sdk/util/index.js +1 -1
  258. package/dist/sdk/util/paginate.js +1 -1
  259. package/dist/sdk/util/tree-formatter.js +1 -1
  260. package/dist/sdk/util/tree-search.js +1 -1
  261. package/dist/sdk/workflow/archive-validation.js +1 -1
  262. package/dist/sdk/workflow/clone-workflow.js +1 -1
  263. package/dist/sdk/workflow/index.js +1 -1
  264. package/dist/sdk/workflow/pull-workflow.js +1 -1
  265. package/dist/sdk/workflow/push-workflow.js +1 -1
  266. package/dist/sdk/workflow/task-graph.js +1 -1
  267. package/dist/sdk/workflow/tdx-config.js +1 -1
  268. package/dist/sdk/workflow/workflow-utils.js +1 -1
  269. package/dist/sdk/workspace/access-tracker.js +1 -1
  270. package/dist/sdk/workspace/frontmatter.js +1 -1
  271. package/dist/sdk/workspace/git.js +1 -1
  272. package/dist/sdk/workspace/index.js +1 -1
  273. package/dist/sdk/workspace/templates.js +1 -1
  274. package/dist/sdk/workspace/weekly.js +1 -1
  275. package/dist/sdk/workspace/wikilinks.js +1 -1
  276. package/dist/test-utils/command-runner.js +1 -1
  277. package/dist/test-utils/factories.js +1 -1
  278. package/dist/test-utils/fixtures.js +1 -1
  279. package/dist/test-utils/http-mock.js +1 -1
  280. package/dist/test-utils/index.js +1 -1
  281. package/dist/utils/async.js +1 -1
  282. package/dist/utils/claude-code-state.js +1 -1
  283. package/dist/utils/colors.js +1 -1
  284. package/dist/utils/diff.js +1 -1
  285. package/dist/utils/file-permissions.js +1 -1
  286. package/dist/utils/file-reader.js +1 -1
  287. package/dist/utils/github-releases.js +1 -1
  288. package/dist/utils/global-cache.js +1 -1
  289. package/dist/utils/json-loader.js +1 -1
  290. package/dist/utils/local-cache.js +1 -1
  291. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  292. package/dist/utils/logger/formatters/index.js +1 -1
  293. package/dist/utils/logger/handlers/console-handler.js +1 -1
  294. package/dist/utils/logger/handlers/file-handler.js +1 -1
  295. package/dist/utils/logger/handlers/index.js +1 -1
  296. package/dist/utils/logger/handlers/null-handler.js +1 -1
  297. package/dist/utils/logger/index.js +1 -1
  298. package/dist/utils/logger/logger.js +1 -1
  299. package/dist/utils/logger/types.js +1 -1
  300. package/dist/utils/option-validation.js +1 -1
  301. package/dist/utils/process.js +1 -1
  302. package/dist/utils/prompt.js +1 -1
  303. package/dist/utils/proxy-fetch.js +1 -1
  304. package/dist/utils/spinner.js +1 -1
  305. package/dist/utils/sse-parser.js +1 -1
  306. package/dist/utils/string-utils.js +1 -1
  307. package/dist/utils/table-ref-parser.js +1 -1
  308. package/dist/utils/td-user.d.ts +3 -0
  309. package/dist/utils/td-user.d.ts.map +1 -0
  310. package/dist/utils/td-user.js +1 -0
  311. package/dist/utils/td-user.js.map +1 -0
  312. package/dist/utils/tdx-logger.js +1 -1
  313. package/dist/utils/version-check.js +1 -1
  314. package/package.json +1 -1
  315. package/dist/commands/ai-usage-command-base.d.ts +0 -26
  316. package/dist/commands/ai-usage-command-base.d.ts.map +0 -1
  317. package/dist/commands/ai-usage-command-base.js +0 -1
  318. package/dist/commands/ai-usage-command-base.js.map +0 -1
  319. package/dist/commands/claude-usage-command.d.ts +0 -19
  320. package/dist/commands/claude-usage-command.d.ts.map +0 -1
  321. package/dist/commands/claude-usage-command.js +0 -1
  322. package/dist/commands/claude-usage-command.js.map +0 -1
  323. package/dist/commands/opencode-usage-command.d.ts +0 -19
  324. package/dist/commands/opencode-usage-command.d.ts.map +0 -1
  325. package/dist/commands/opencode-usage-command.js +0 -1
  326. package/dist/commands/opencode-usage-command.js.map +0 -1
@@ -1 +1 @@
1
- const 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
+ const a21_0x5ccb83=a21_0x4a0b;(function(_0xf4b997,_0x2c8a81){const _0x418a82=a21_0x4a0b,_0x1f1b1f=_0xf4b997();while(!![]){try{const _0x121bbb=-parseInt(_0x418a82(0x12a))/0x1+parseInt(_0x418a82(0x116))/0x2*(parseInt(_0x418a82(0x10a))/0x3)+-parseInt(_0x418a82(0x111))/0x4*(parseInt(_0x418a82(0x10d))/0x5)+-parseInt(_0x418a82(0x11f))/0x6*(parseInt(_0x418a82(0x123))/0x7)+-parseInt(_0x418a82(0x117))/0x8*(-parseInt(_0x418a82(0xfe))/0x9)+parseInt(_0x418a82(0x103))/0xa+-parseInt(_0x418a82(0x125))/0xb*(parseInt(_0x418a82(0x12b))/0xc);if(_0x121bbb===_0x2c8a81)break;else _0x1f1b1f['push'](_0x1f1b1f['shift']());}catch(_0x32bc45){_0x1f1b1f['push'](_0x1f1b1f['shift']());}}}(a21_0x41fa,0xd655e));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';function a21_0x41fa(){const _0x120d4e=['sep','verbose','resolve','✔\x20Context\x20set:\x20','endsWith','2674566eRmftF','length','yellow','execute','data','12617710lXyiFJ','green','engage_workspace','workspace','engage','dim','✔\x20Pushed\x20','3Dgwvsp','\x0aPush\x20summary\x20for\x20workspace\x20\x27','\x20campaign(s)\x20unchanged','171840aEcZeW','cwd','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','dryRun','96KEpsrd','name','errors','includes','\x20=\x20','3116688OfQoQU','40hRBdpZ','\x0aErrors:','red','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','created','engage:always-on-campaign:push','Pushing\x20always-on\x20campaigns\x20to\x20\x27','setPhase','178014sKwciP','Resolving\x20workspace\x20\x27','updated','\x27...','259KIADcS','description','15084949LBklEv','error','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20push\x20--workspace\x20<name>','config','segment','134123qbYdoC','12pDgjLf','.yaml','resolveWorkspaceId','\x20campaign(s)\x20created'];a21_0x41fa=function(){return _0x120d4e;};return a21_0x41fa();}import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a21_0x46a906 from'chalk';import a21_0x59a873 from'path';import{pushAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-push.js';function a21_0x4a0b(_0x34e7e4,_0x57d500){_0x34e7e4=_0x34e7e4-0xfa;const _0x41fa51=a21_0x41fa();let _0x4a0bf3=_0x41fa51[_0x34e7e4];return _0x4a0bf3;}export class EngageAlwaysOnCampaignPushCommand extends BaseCommand{[a21_0x5ccb83(0x112)]=a21_0x5ccb83(0x11c);[a21_0x5ccb83(0x124)]='Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20always-on\x20campaigns';async[a21_0x5ccb83(0x101)](_0x25de08){const _0x1cfa74=a21_0x5ccb83,{options:_0x468f07,args:_0x48f757,tdx:_0x5d1f7b}=_0x25de08,_0x14c8b9=_0x468f07,_0x47b884=_0x48f757[0x0],_0x5cc6b6=_0x47b884?a21_0x59a873[_0x1cfa74(0xfb)](_0x47b884):process[_0x1cfa74(0x10e)](),_0x30e44a=await resolveWorkspaceName(_0x47b884,_0x14c8b9);if(!_0x30e44a)return console['error'](a21_0x46a906[_0x1cfa74(0x100)]('Workspace\x20is\x20required.')),console[_0x1cfa74(0x126)]('\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20push\x20<dir-or-file>'),console[_0x1cfa74(0x126)](_0x1cfa74(0x127)),console[_0x1cfa74(0x126)](_0x1cfa74(0x11a)),0x1;const _0x39cf25=await withProgressSpinner(_0x1cfa74(0x120)+_0x30e44a+_0x1cfa74(0x122),()=>_0x5d1f7b[_0x1cfa74(0x107)][_0x1cfa74(0x12d)](_0x30e44a),{'verbose':_0x14c8b9[_0x1cfa74(0xfa)]}),_0x137e20=_0x39cf25[_0x1cfa74(0x102)],_0x5d5bfa=await withProgressSpinner(_0x1cfa74(0x11d)+_0x30e44a+_0x1cfa74(0x122),_0x3f1ef3=>pushAlwaysOnCampaigns(_0x5cc6b6,_0x137e20,{'engage':_0x5d1f7b[_0x1cfa74(0x107)],'segment':_0x5d1f7b[_0x1cfa74(0x129)]},{'dryRun':_0x14c8b9[_0x1cfa74(0x110)],'progress':{'update':_0x4aac89=>{const _0x596136=_0x1cfa74;_0x3f1ef3[_0x596136(0x11e)](_0x4aac89);}}}),{'verbose':_0x14c8b9[_0x1cfa74(0xfa)]}),_0x43ab29=_0x5d5bfa['data'];if(_0x43ab29[_0x1cfa74(0x113)][_0x1cfa74(0xff)]>0x0){console['error'](a21_0x46a906[_0x1cfa74(0x119)](_0x1cfa74(0x118)));for(const _0x15ec0e of _0x43ab29[_0x1cfa74(0x113)]){console[_0x1cfa74(0x126)]('\x20\x20'+a21_0x46a906[_0x1cfa74(0x119)]('✗')+'\x20'+_0x15ec0e[_0x1cfa74(0x112)]+':\x20'+_0x15ec0e['error']);}}console[_0x1cfa74(0x126)](_0x1cfa74(0x10b)+_0x30e44a+'\x27:'),console[_0x1cfa74(0x126)]('\x20\x20'+a21_0x46a906[_0x1cfa74(0x104)]('+\x20'+_0x43ab29['created']+_0x1cfa74(0x12e))),console[_0x1cfa74(0x126)]('\x20\x20'+a21_0x46a906['yellow']('~\x20'+_0x43ab29[_0x1cfa74(0x121)]+'\x20campaign(s)\x20updated')),console['error']('\x20\x20'+a21_0x46a906['dim']('=\x20'+_0x43ab29['unchanged']+_0x1cfa74(0x10c)));if(_0x14c8b9[_0x1cfa74(0x110)])return console[_0x1cfa74(0x126)](a21_0x46a906[_0x1cfa74(0x100)](_0x1cfa74(0x10f))),0x0;if(_0x43ab29[_0x1cfa74(0x11b)]===0x0&&_0x43ab29[_0x1cfa74(0x121)]===0x0)return console[_0x1cfa74(0x126)](a21_0x46a906[_0x1cfa74(0x104)]('✔\x20All\x20campaigns\x20are\x20up\x20to\x20date')),saveSessionContext({'engage_workspace':_0x30e44a},_0x14c8b9['session']),_0x43ab29[_0x1cfa74(0x113)][_0x1cfa74(0xff)]>0x0?0x1:0x0;return console[_0x1cfa74(0x126)](a21_0x46a906[_0x1cfa74(0x104)](_0x1cfa74(0x109)+(_0x43ab29[_0x1cfa74(0x11b)]+_0x43ab29[_0x1cfa74(0x121)])+'\x20always-on\x20campaign(s)')),saveSessionContext({'engage_workspace':_0x30e44a},_0x14c8b9['session']),console[_0x1cfa74(0x126)](a21_0x46a906[_0x1cfa74(0x104)](_0x1cfa74(0xfc)+a21_0x46a906[_0x1cfa74(0x108)](_0x1cfa74(0x105))+_0x1cfa74(0x115)+a21_0x46a906['cyan'](_0x30e44a))),_0x43ab29['errors'][_0x1cfa74(0xff)]>0x0?0x1:0x0;}}async function resolveWorkspaceName(_0x46329b,_0x49fc68){const _0x2651a6=a21_0x5ccb83;if(_0x46329b&&!_0x46329b[_0x2651a6(0x114)](a21_0x59a873['sep'])&&!_0x46329b[_0x2651a6(0xfd)](_0x2651a6(0x12c)))return _0x46329b;if(_0x49fc68['workspace'])return _0x49fc68[_0x2651a6(0x106)];const _0x495f7c=_0x46329b&&(_0x46329b[_0x2651a6(0x114)](a21_0x59a873[_0x2651a6(0x12f)])||_0x46329b['endsWith'](_0x2651a6(0x12c)))?a21_0x59a873['resolve'](_0x46329b):process[_0x2651a6(0x10e)](),_0x50be91=tryFindTdxConfig(_0x495f7c);if(_0x50be91?.[_0x2651a6(0x128)][_0x2651a6(0x105)])return _0x50be91[_0x2651a6(0x128)][_0x2651a6(0x105)];const _0x1d6ff3=loadSessionContext(_0x49fc68['session']);if(_0x1d6ff3?.[_0x2651a6(0x105)])return _0x1d6ff3[_0x2651a6(0x105)];return undefined;}
@@ -1 +1 @@
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
+ const a22_0x211958=a22_0x3fda;(function(_0x228c7c,_0x10d5fc){const _0x207683=a22_0x3fda,_0x1c0b84=_0x228c7c();while(!![]){try{const _0x4cf36e=-parseInt(_0x207683(0x1dc))/0x1*(parseInt(_0x207683(0x1e5))/0x2)+-parseInt(_0x207683(0x1f9))/0x3*(-parseInt(_0x207683(0x1f3))/0x4)+parseInt(_0x207683(0x1d3))/0x5+parseInt(_0x207683(0x1f7))/0x6*(parseInt(_0x207683(0x1e0))/0x7)+parseInt(_0x207683(0x1e6))/0x8*(parseInt(_0x207683(0x1f1))/0x9)+parseInt(_0x207683(0x1f8))/0xa*(-parseInt(_0x207683(0x1f2))/0xb)+-parseInt(_0x207683(0x1fc))/0xc*(parseInt(_0x207683(0x1d5))/0xd);if(_0x4cf36e===_0x10d5fc)break;else _0x1c0b84['push'](_0x1c0b84['shift']());}catch(_0x5aef3b){_0x1c0b84['push'](_0x1c0b84['shift']());}}}(a22_0x6e85,0x646ec));import{BaseCommand}from'./command.js';function a22_0x3fda(_0x33f98d,_0xb46b68){_0x33f98d=_0x33f98d-0x1d2;const _0x6e852e=a22_0x6e85();let _0x3fda4b=_0x6e852e[_0x33f98d];return _0x3fda4b;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{readFileSync}from'fs';import a22_0x28a509 from'chalk';import{validateAlwaysOnCampaignDef}from'../sdk/engage/always-on-campaign-validator.js';function a22_0x6e85(){const _0x423605=['1105635tOeIRW','yellow','13BZqPpU','Failed\x20to\x20parse','code','warn','name','length','Validate\x20always-on\x20campaign\x20YAML\x20files','161GuSvCp','red','type','Validation\x20complete:\x20','56DqSWZn','warnings','\x20error(s)','log','errors','9826oPQtmx','2016016ADygGp','description','always_on_campaign','EngageAlwaysOnCampaignValidate','push','green','message','path','error','\x20valid,\x20','bold','27wsfjOG','5659071MpvayA','4PhQipP','forEach','details','verbose','579828ZJMZAI','10iQjXLQ','1214319FFVhUT','\x20invalid','\x20\x20[WARNING]\x20','5258208OXnmIo','valid'];a22_0x6e85=function(){return _0x423605;};return a22_0x6e85();}import{parseYamlString}from'../sdk/engage/always-on-campaign-yaml.js';export class EngageAlwaysOnCampaignValidateCommand extends BaseCommand{[a22_0x211958(0x1d9)]=a22_0x211958(0x1e9);[a22_0x211958(0x1e7)]=a22_0x211958(0x1db);async['execute'](_0x1fdf62){const _0x3473a7=a22_0x211958,{options:_0x259139,args:_0x5eee98}=_0x1fdf62,_0x2b0f52=_0x5eee98[0x0]||'.',_0x45d859=_0x259139[_0x3473a7(0x1f6)]??![],_0x271a07=await findYamlFiles(_0x2b0f52);if(_0x271a07[_0x3473a7(0x1da)]===0x0)return console[_0x3473a7(0x1ee)](a22_0x28a509[_0x3473a7(0x1d4)]('No\x20YAML\x20files\x20found')),0x0;let _0x68ae53=0x0,_0x2ea637=0x0;const _0x51027a=[];for(const _0x573589 of _0x271a07){try{const _0x430d07=readFileSync(_0x573589,'utf-8'),_0x29b8a4=parseYamlString(_0x430d07);if(_0x29b8a4[_0x3473a7(0x1de)]!==_0x3473a7(0x1e8))continue;const _0x58effa=validateAlwaysOnCampaignDef(_0x29b8a4);if(_0x58effa[_0x3473a7(0x1d2)])_0x68ae53++,_0x45d859&&console[_0x3473a7(0x1e3)](a22_0x28a509[_0x3473a7(0x1eb)]('✓\x20'+_0x573589));else{_0x2ea637++;const _0x2db675=_0x58effa[_0x3473a7(0x1e4)]['map'](_0x3d7f6a=>'\x20\x20['+_0x3d7f6a[_0x3473a7(0x1d7)]+']\x20'+_0x3d7f6a['path']+':\x20'+_0x3d7f6a[_0x3473a7(0x1ec)]);_0x51027a[_0x3473a7(0x1ea)]({'file':_0x573589,'message':_0x58effa[_0x3473a7(0x1e4)]['length']+_0x3473a7(0x1e2),'details':_0x2db675}),console['error'](a22_0x28a509[_0x3473a7(0x1dd)]('✗\x20'+_0x573589+':\x20'+_0x58effa[_0x3473a7(0x1e4)][_0x3473a7(0x1da)]+_0x3473a7(0x1e2)));}_0x58effa[_0x3473a7(0x1e1)][_0x3473a7(0x1da)]>0x0&&_0x58effa[_0x3473a7(0x1e1)][_0x3473a7(0x1f4)](_0x31256d=>{const _0x2560c4=_0x3473a7;console[_0x2560c4(0x1d8)](a22_0x28a509[_0x2560c4(0x1d4)](_0x2560c4(0x1fb)+_0x31256d[_0x2560c4(0x1ed)]+':\x20'+_0x31256d[_0x2560c4(0x1ec)]));});}catch(_0x2289a1){_0x2ea637++;const _0x542576=_0x2289a1 instanceof Error?_0x2289a1['message']:String(_0x2289a1);_0x51027a[_0x3473a7(0x1ea)]({'file':_0x573589,'message':_0x3473a7(0x1d6),'details':[_0x542576]}),console['error'](a22_0x28a509[_0x3473a7(0x1dd)]('✗\x20'+_0x573589+':\x20'+_0x542576));}}return console[_0x3473a7(0x1ee)](''),console[_0x3473a7(0x1ee)](a22_0x28a509[_0x3473a7(0x1f0)](_0x3473a7(0x1df)+a22_0x28a509[_0x3473a7(0x1eb)](_0x68ae53)+_0x3473a7(0x1ef)+a22_0x28a509[_0x3473a7(0x1dd)](_0x2ea637)+_0x3473a7(0x1fa))),_0x51027a[_0x3473a7(0x1da)]>0x0&&_0x45d859&&(console['error'](''),_0x51027a['forEach'](_0x2f18d6=>{const _0x380561=_0x3473a7;console['error'](a22_0x28a509[_0x380561(0x1dd)](_0x2f18d6['file']+':')),_0x2f18d6[_0x380561(0x1f5)][_0x380561(0x1f4)](_0x3d2e44=>console['error'](_0x3d2e44));})),_0x2ea637>0x0?0x1:0x0;}}
@@ -1 +1 @@
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
+ const a23_0x1a42ca=a23_0xbdf9;(function(_0x156485,_0x1b4e59){const _0x1dab7e=a23_0xbdf9,_0xdf2c74=_0x156485();while(!![]){try{const _0x4b70b0=parseInt(_0x1dab7e(0x1e1))/0x1*(-parseInt(_0x1dab7e(0x1c5))/0x2)+parseInt(_0x1dab7e(0x1d5))/0x3+parseInt(_0x1dab7e(0x1fb))/0x4+-parseInt(_0x1dab7e(0x1bc))/0x5+-parseInt(_0x1dab7e(0x1c9))/0x6*(parseInt(_0x1dab7e(0x1cf))/0x7)+-parseInt(_0x1dab7e(0x1d4))/0x8*(parseInt(_0x1dab7e(0x1cb))/0x9)+parseInt(_0x1dab7e(0x1e7))/0xa;if(_0x4b70b0===_0x1b4e59)break;else _0xdf2c74['push'](_0xdf2c74['shift']());}catch(_0x2bbd47){_0xdf2c74['push'](_0xdf2c74['shift']());}}}(a23_0x4229,0xe75ec));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a23_0xbdf9(_0x572798,_0x1a2679){_0x572798=_0x572798-0x1bb;const _0x4229bc=a23_0x4229();let _0xbdf910=_0x4229bc[_0x572798];return _0xbdf910;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a23_0x4b725b from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a23_0x4e9838 from'path';import{pullCampaigns}from'../sdk/engage/campaign-pull.js';export class EngageCampaignPullCommand extends BaseCommand{['name']=a23_0x1a42ca(0x1c1);['description']=a23_0x1a42ca(0x1bf);async[a23_0x1a42ca(0x1c2)](_0x50870c){const _0x374392=a23_0x1a42ca,{options:_0xbb93a4,args:_0x3e74b8,tdx:_0x251319}=_0x50870c,_0x2e53ed=_0xbb93a4,_0x23f9c7=await resolveWorkspaceName(_0x3e74b8[0x0],_0x2e53ed);if(!_0x23f9c7)return console[_0x374392(0x1d2)](a23_0x4b725b[_0x374392(0x1fa)](_0x374392(0x1c6))),console['error'](_0x374392(0x1c8)),console['error'](_0x374392(0x1e4)),console[_0x374392(0x1d2)](_0x374392(0x1de)),0x1;const _0x225bd2=await withProgressSpinner(_0x374392(0x1bd)+_0x23f9c7+_0x374392(0x1f9),_0x58ab2b=>pullCampaigns({'engage':_0x251319[_0x374392(0x1f1)],'segment':_0x251319[_0x374392(0x1f2)]},_0x23f9c7,{'campaignName':_0x2e53ed['name'],'campaignType':_0x2e53ed['type'],'progress':{'update':_0x1f7a34=>{const _0x9b7f23=_0x374392;_0x58ab2b[_0x9b7f23(0x1dd)](_0x1f7a34);}}}),{'verbose':_0x2e53ed[_0x374392(0x1d9)]}),_0x11f452=_0x225bd2['data'];if(_0x11f452['counts'][_0x374392(0x1d7)]===0x0)return console['error'](a23_0x4b725b['yellow']('No\x20campaigns\x20found\x20in\x20workspace\x20\x27'+_0x11f452[_0x374392(0x1e6)]+'\x27')),0x0;const _0x2e03d6=_0x11f452[_0x374392(0x1e8)]['filter'](_0x691c1a=>_0x691c1a[_0x374392(0x1e0)]),_0x27ef7b=_0x11f452[_0x374392(0x1e8)]['filter'](_0x4ef116=>!_0x4ef116['isNew']&&_0x4ef116['hasChanges']),_0x14529d=_0x11f452[_0x374392(0x1e8)]['filter'](_0xf2fa31=>!_0xf2fa31['isNew']&&!_0xf2fa31[_0x374392(0x1be)]);console['error'](_0x374392(0x1c7)+_0x11f452[_0x374392(0x1e6)]+'\x27:'),console['error']('\x20\x20'+a23_0x4b725b[_0x374392(0x1f6)](_0x11f452[_0x374392(0x1d6)][_0x374392(0x1d7)]+'\x20campaigns')),console['error']('\x20\x20'+a23_0x4b725b[_0x374392(0x1f5)]('+\x20'+_0x2e03d6[_0x374392(0x1d3)]+_0x374392(0x1f7))),console[_0x374392(0x1d2)]('\x20\x20'+a23_0x4b725b[_0x374392(0x1fa)]('~\x20'+_0x27ef7b[_0x374392(0x1d3)]+_0x374392(0x1d1))),console[_0x374392(0x1d2)]('\x20\x20'+a23_0x4b725b[_0x374392(0x1ee)]('=\x20'+_0x14529d[_0x374392(0x1d3)]+'\x20unchanged\x20files')),console[_0x374392(0x1d2)](_0x374392(0x1e2)+a23_0x4b725b[_0x374392(0x1f6)](_0x11f452[_0x374392(0x1f8)])+'\x0a');if(_0x27ef7b['length']>0x0)for(const _0xf7fb54 of _0x27ef7b){console[_0x374392(0x1d2)](_0x374392(0x1c0)+_0xf7fb54[_0x374392(0x1ef)]+'\x27:'),console['error']('\u2500'[_0x374392(0x1bb)](0x3c)),console[_0x374392(0x1d2)](_0xf7fb54[_0x374392(0x1d8)]),console[_0x374392(0x1d2)]('\u2500'['repeat'](0x3c));}if(_0x2e53ed[_0x374392(0x1d0)])return console['error'](a23_0x4b725b[_0x374392(0x1fa)](_0x374392(0x1ec))),0x0;if(_0x2e03d6[_0x374392(0x1d3)]===0x0&&_0x27ef7b['length']===0x0)return console[_0x374392(0x1d2)](a23_0x4b725b[_0x374392(0x1f5)]('\u2714\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'engage_workspace':_0x11f452[_0x374392(0x1e6)]},_0x2e53ed[_0x374392(0x1f4)]),0x0;if(!_0x2e53ed[_0x374392(0x1ce)]){if(!isInteractive())return console[_0x374392(0x1d2)](a23_0x4b725b[_0x374392(0x1ea)](_0x374392(0x1cd)),_0x374392(0x1e3)),console['error'](a23_0x4b725b[_0x374392(0x1ee)](_0x374392(0x1eb))),0x1;const _0x3e7385=await confirmKey(_0x374392(0x1e9)+(_0x2e03d6[_0x374392(0x1d3)]+_0x27ef7b[_0x374392(0x1d3)])+_0x374392(0x1da));if(!_0x3e7385)return console['error'](a23_0x4b725b[_0x374392(0x1fa)](_0x374392(0x1f0)),_0x374392(0x1e5)),0x1;}for(const _0x4a303c of _0x11f452[_0x374392(0x1e8)]){if(_0x4a303c[_0x374392(0x1e0)]||_0x4a303c['hasChanges']){const _0x44c54c=a23_0x4e9838[_0x374392(0x1c4)](_0x4a303c[_0x374392(0x1f3)]);!existsSync(_0x44c54c)&&mkdirSync(_0x44c54c,{'recursive':!![]}),writeFileSync(_0x4a303c[_0x374392(0x1f3)],_0x4a303c[_0x374392(0x1db)],'utf-8');}}return console[_0x374392(0x1d2)](a23_0x4b725b['green'](_0x374392(0x1cc)+(_0x2e03d6['length']+_0x27ef7b['length'])+_0x374392(0x1ed)+_0x11f452[_0x374392(0x1f8)])),saveSessionContext({'engage_workspace':_0x11f452[_0x374392(0x1e6)]},_0x2e53ed[_0x374392(0x1f4)]),console[_0x374392(0x1d2)](a23_0x4b725b[_0x374392(0x1f5)](_0x374392(0x1c3)+a23_0x4b725b[_0x374392(0x1ee)](_0x374392(0x1df))+'\x20=\x20'+a23_0x4b725b['cyan'](_0x11f452[_0x374392(0x1e6)]))),0x0;}}async function resolveWorkspaceName(_0x11b081,_0x4c6042){const _0x1bee89=a23_0x1a42ca;if(_0x11b081)return _0x11b081;if(_0x4c6042[_0x1bee89(0x1dc)])return _0x4c6042['workspace'];const _0x362199=tryFindTdxConfig(process['cwd']());if(_0x362199?.[_0x1bee89(0x1ca)]['engage_workspace'])return _0x362199[_0x1bee89(0x1ca)][_0x1bee89(0x1df)];const _0x1c3a90=loadSessionContext(_0x4c6042[_0x1bee89(0x1f4)]);if(_0x1c3a90?.[_0x1bee89(0x1df)])return _0x1c3a90[_0x1bee89(0x1df)];return undefined;}function a23_0x4229(){const _0x486456=['8223995DqxjhS','Pulling\x20campaigns\x20from\x20\x27','hasChanges','Pull\x20campaigns\x20to\x20YAML\x20files','\x0aChanges\x20to\x20\x27','engage:campaign:pull','execute','✔\x20Context\x20set:\x20','dirname','32EFVnSf','Workspace\x20is\x20required.','\x0aPull\x20summary\x20for\x20workspace\x20\x27','\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>','12pokOLS','config','333iFwQxh','✔\x20Pulled\x20','\x0aError:','yes','3583993TOXFSu','dryRun','\x20changed\x20files','error','length','37576KxCuTu','2185320BrWWOv','counts','campaigns','diff','verbose','\x20files?','content','workspace','setPhase','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','engage_workspace','isNew','30720aJMzQz','\x20\x20Target:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','-\x20no\x20files\x20written','workspaceName','33606660UoodFY','files','Write\x20','red','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','\x20files\x20to\x20','dim','relativePath','Aborted.','engage','segment','absolutePath','session','green','cyan','\x20new\x20files','targetDir','\x27...','yellow','770768ynmAAN','repeat'];a23_0x4229=function(){return _0x486456;};return a23_0x4229();}
@@ -1 +1 @@
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
+ const a24_0x2dd7cc=a24_0x58fd;(function(_0x5a3acc,_0x31eb98){const _0x5938b8=a24_0x58fd,_0x582c43=_0x5a3acc();while(!![]){try{const _0x12865d=parseInt(_0x5938b8(0xec))/0x1*(-parseInt(_0x5938b8(0xe8))/0x2)+parseInt(_0x5938b8(0x130))/0x3*(-parseInt(_0x5938b8(0xdd))/0x4)+-parseInt(_0x5938b8(0xe5))/0x5*(parseInt(_0x5938b8(0xfb))/0x6)+parseInt(_0x5938b8(0xfd))/0x7+-parseInt(_0x5938b8(0x134))/0x8+-parseInt(_0x5938b8(0x127))/0x9+parseInt(_0x5938b8(0xfc))/0xa;if(_0x12865d===_0x31eb98)break;else _0x582c43['push'](_0x582c43['shift']());}catch(_0x56556b){_0x582c43['push'](_0x582c43['shift']());}}}(a24_0x38b3,0x8144c));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a24_0x7f8d87 from'chalk';import a24_0x114d9a from'path';function a24_0x58fd(_0x52e1d0,_0x463ff7){_0x52e1d0=_0x52e1d0-0xd9;const _0x38b372=a24_0x38b3();let _0x58fd4f=_0x38b372[_0x52e1d0];return _0x58fd4f;}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';function a24_0x38b3(){const _0x59c56b=['20947ohgfqp','def','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','update','\x20DRAFT\x20ListCampaigns\x20to\x20update:','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','green','dryRun','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','cwd','config','campaignType','path','\x0aPush\x20summary\x20for\x20workspace\x20\x27','Found\x20','108gsMFgJ','36059880CRvctA','891856ljHDyQ','input','dirname','error','engage:campaign:push','\x27...','engage_workspace','action','\x0aValidation\x20errors\x20in\x20','setPhase','\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','session','name','map','\x20\x20\x20\x20','yellow','Applying\x20ListCampaign\x20changes...','\x20campaigns','Preparing\x20ListCampaign\x20push...','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','workspace','Aborted.','\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','status','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','updated','Use\x20-y\x20or\x20--yes\x20to\x20apply\x20the\x20ListCampaign\x20draft\x20changes','cyan','engage','Resolving\x20references...','verbose','description','yes','resolveWorkspaceId','errors','campaign','prepareListCampaignPushes','campaignId','length','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','\x20new\x20ListCampaigns:','\x20campaign\x20files','6265719FzidtF','Preparing\x20push\x20to\x20workspace\x20\x27','campaign_type','segment','message','-\x20no\x20changes\x20applied','red','site','warnings','205158QXQYPd','configDir','execute','\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)','5922832IVhCLo','1\x20campaign\x20file:\x20','dim','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','\x0aListCampaign\x20push\x20summary\x20for\x20workspace\x20\x27','12TaJrUB','pushListCampaignFiles','create','✔\x20Created\x20','created','Error:\x20Invalid\x20campaign\x20type\x20\x22','Push\x20','resolve','253570dJtBRP','\x20errors:','\x20ListCampaign\x20draft','62pqLaXf','data','filter','No\x20campaign\x20YAML\x20files\x20found\x20in\x20'];a24_0x38b3=function(){return _0x59c56b;};return a24_0x38b3();}import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{[a24_0x2dd7cc(0x109)]=a24_0x2dd7cc(0x101);[a24_0x2dd7cc(0x11c)]=a24_0x2dd7cc(0xda);async[a24_0x2dd7cc(0x132)](_0x3d61cf){const _0x32baf0=a24_0x2dd7cc,{options:_0x37463f,args:_0x33a1c9,tdx:_0x171a49}=_0x3d61cf,_0x2e23db=_0x37463f,_0x2166d7=_0x33a1c9[0x0],_0x57c5ac=_0x2166d7?a24_0x114d9a[_0x32baf0(0xe4)](_0x2166d7):undefined,_0x1389b6=_0x57c5ac?isYamlFile(_0x57c5ac):![];let _0x59a835;if(_0x1389b6&&_0x57c5ac)_0x59a835=a24_0x114d9a[_0x32baf0(0xff)](_0x57c5ac);else _0x57c5ac?_0x59a835=_0x57c5ac:_0x59a835=process[_0x32baf0(0xf5)]();let _0x10d50c;const _0x467f7c=tryFindTdxConfig(_0x59a835);_0x467f7c?.[_0x32baf0(0xf6)][_0x32baf0(0x103)]&&(_0x10d50c=_0x467f7c[_0x32baf0(0xf6)]['engage_workspace'],!_0x1389b6&&(_0x59a835=_0x467f7c[_0x32baf0(0x131)]));_0x2e23db[_0x32baf0(0x111)]&&(_0x10d50c=_0x2e23db[_0x32baf0(0x111)]);if(!_0x10d50c){const _0x21a7ad=loadSessionContext(_0x2e23db[_0x32baf0(0x108)]);_0x21a7ad?.['engage_workspace']&&(_0x10d50c=_0x21a7ad[_0x32baf0(0x103)]);}if(!_0x10d50c)return console['error'](a24_0x7f8d87['yellow']('Workspace\x20is\x20required.')),console[_0x32baf0(0x100)](_0x32baf0(0x113)),console['error'](_0x32baf0(0x133)),console[_0x32baf0(0x100)](_0x32baf0(0x107)),console[_0x32baf0(0x100)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;const _0x2f3c14=_0x2e23db[_0x32baf0(0xf7)]??'campaign';if(_0x2f3c14==='list-campaign')return await this[_0x32baf0(0xde)](_0x3d61cf,_0x10d50c,_0x59a835,_0x57c5ac,_0x1389b6);if(_0x2f3c14!=='campaign')return console[_0x32baf0(0x100)](_0x32baf0(0xe2)+_0x2f3c14+_0x32baf0(0xf4)),0x1;let _0x52edad;_0x1389b6&&_0x57c5ac?_0x52edad=[_0x57c5ac]:_0x52edad=discoverCampaignFiles(_0x59a835);if(_0x52edad[_0x32baf0(0x123)]===0x0)return console['error'](a24_0x7f8d87[_0x32baf0(0x10c)](_0x32baf0(0xeb)+_0x59a835)),console[_0x32baf0(0x100)](a24_0x7f8d87[_0x32baf0(0xd9)](_0x32baf0(0x115))),0x1;const _0x1ead5b=_0x52edad[_0x32baf0(0x10a)](_0x1d3d9f=>parseCampaignFile(_0x1d3d9f,a24_0x114d9a[_0x32baf0(0xff)](_0x1d3d9f))),_0x5d58e8=_0x1ead5b['length']===0x1?_0x32baf0(0x135)+_0x1ead5b[0x0][_0x32baf0(0xed)][_0x32baf0(0x109)]:_0x1ead5b[_0x32baf0(0x123)]+_0x32baf0(0x126);console[_0x32baf0(0x100)](_0x32baf0(0xfa)+a24_0x7f8d87[_0x32baf0(0x118)](_0x5d58e8));let _0xc65acc=![];for(const _0x42eb9b of _0x1ead5b){const _0x55020c=validateCampaignDef(_0x42eb9b[_0x32baf0(0xed)]);if(!_0x55020c['valid']){_0xc65acc=!![],console[_0x32baf0(0x100)](a24_0x7f8d87[_0x32baf0(0x12d)](_0x32baf0(0x105)+_0x42eb9b['relativePath']+':'));for(const _0x4709c9 of _0x55020c['errors']){console[_0x32baf0(0x100)]('\x20\x20'+a24_0x7f8d87[_0x32baf0(0x12d)]('✗')+'\x20'+_0x4709c9[_0x32baf0(0xf8)]+':\x20'+_0x4709c9[_0x32baf0(0x12b)]);}}for(const _0x2c5b6d of _0x55020c[_0x32baf0(0x12f)]){console['error']('\x20\x20'+a24_0x7f8d87[_0x32baf0(0x10c)]('⚠')+'\x20'+_0x2c5b6d[_0x32baf0(0xf8)]+':\x20'+_0x2c5b6d[_0x32baf0(0x12b)]);}}if(_0xc65acc)return console[_0x32baf0(0x100)](a24_0x7f8d87[_0x32baf0(0x12d)](_0x32baf0(0xf1))),0x1;const _0x1fe812=await _0x171a49[_0x32baf0(0x119)][_0x32baf0(0x11e)](_0x10d50c),_0xe43708=await withProgressSpinner(_0x32baf0(0x128)+_0x10d50c+_0x32baf0(0x102),_0x27b1a1=>preparePush({'engage':_0x171a49['engage'],'segment':_0x171a49[_0x32baf0(0x12a)]},_0x1ead5b,_0x1fe812,{'progress':{'update':_0x13833c=>_0x27b1a1[_0x32baf0(0x106)](_0x13833c)}}),{'verbose':_0x2e23db[_0x32baf0(0x11b)]}),_0x285b3d=_0xe43708['data'];await withProgressSpinner(_0x32baf0(0x11a),_0x21218a=>resolveAndBuildInputs({'engage':_0x171a49[_0x32baf0(0x119)],'segment':_0x171a49[_0x32baf0(0x12a)]},_0x285b3d,_0x1fe812,{'progress':{'update':_0x1b3e7c=>_0x21218a[_0x32baf0(0x106)](_0x1b3e7c)}}),{'verbose':_0x2e23db[_0x32baf0(0x11b)]});const _0x4398ea=_0x285b3d[_0x32baf0(0xea)](_0x87bcc2=>_0x87bcc2[_0x32baf0(0x104)]===_0x32baf0(0xdf)),_0x497173=_0x285b3d['filter'](_0x4295d3=>_0x4295d3[_0x32baf0(0x104)]===_0x32baf0(0xef));console[_0x32baf0(0x100)](_0x32baf0(0xf9)+_0x10d50c+'\x27:');if(_0x4398ea[_0x32baf0(0x123)]>0x0){console[_0x32baf0(0x100)]('\x20\x20'+a24_0x7f8d87[_0x32baf0(0xf2)]('+\x20'+_0x4398ea[_0x32baf0(0x123)]+'\x20new\x20campaigns:'));for(const _0x36524d of _0x4398ea){console[_0x32baf0(0x100)](_0x32baf0(0x10b)+a24_0x7f8d87[_0x32baf0(0xf2)]('+')+'\x20'+_0x36524d[_0x32baf0(0xed)][_0x32baf0(0x109)]+'\x20('+_0x36524d['def'][_0x32baf0(0x129)]+')');}}if(_0x497173[_0x32baf0(0x123)]>0x0){console[_0x32baf0(0x100)]('\x20\x20'+a24_0x7f8d87[_0x32baf0(0x10c)]('~\x20'+_0x497173['length']+'\x20campaigns\x20to\x20update:'));for(const _0x4afc10 of _0x497173){console[_0x32baf0(0x100)]('\x20\x20\x20\x20'+a24_0x7f8d87['yellow']('~')+'\x20'+_0x4afc10[_0x32baf0(0xed)][_0x32baf0(0x109)]+'\x20('+_0x4afc10[_0x32baf0(0xed)][_0x32baf0(0x129)]+')');}}if(_0x4398ea[_0x32baf0(0x123)]===0x0&&_0x497173[_0x32baf0(0x123)]===0x0)return console[_0x32baf0(0x100)](a24_0x7f8d87['green'](_0x32baf0(0x124))),0x0;if(_0x2e23db[_0x32baf0(0xf3)])return console[_0x32baf0(0x100)](a24_0x7f8d87[_0x32baf0(0x10c)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(!_0x2e23db[_0x32baf0(0x11d)]){if(!isInteractive())return console[_0x32baf0(0x100)](a24_0x7f8d87['red']('\x0aError:'),_0x32baf0(0x110)),console[_0x32baf0(0x100)](a24_0x7f8d87['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x230f73=await confirmKey(_0x32baf0(0xe3)+(_0x4398ea[_0x32baf0(0x123)]+_0x497173[_0x32baf0(0x123)])+'\x20campaigns?');if(!_0x230f73)return console[_0x32baf0(0x100)](a24_0x7f8d87[_0x32baf0(0x10c)](_0x32baf0(0x112)),'-\x20no\x20changes\x20applied'),0x1;}const _0x5a3de6=await withProgressSpinner('Pushing\x20campaigns...',_0x110154=>executePush({'engage':_0x171a49['engage'],'segment':_0x171a49[_0x32baf0(0x12a)]},_0x285b3d,{'progress':{'update':_0x19d548=>_0x110154['setPhase'](_0x19d548)}}),{'verbose':_0x2e23db[_0x32baf0(0x11b)]}),_0x3bb369=_0x5a3de6[_0x32baf0(0xe9)];for(const _0x1b7663 of _0x3bb369['results']){if(_0x1b7663[_0x32baf0(0x122)]&&(_0x1b7663[_0x32baf0(0x104)]==='created'||_0x1b7663[_0x32baf0(0x104)]===_0x32baf0(0x116))){const _0x109184=getCampaignUrl(_0x2e23db[_0x32baf0(0x12e)],_0x1fe812,_0x1b7663['campaignId']),_0x45f83d=_0x1b7663[_0x32baf0(0x104)]==='created'?'+':'~',_0x1eaa01=_0x1b7663['action']===_0x32baf0(0xe1)?a24_0x7f8d87['green'](_0x45f83d):a24_0x7f8d87[_0x32baf0(0x10c)](_0x45f83d);console[_0x32baf0(0x100)]('\x20\x20'+_0x1eaa01+'\x20'+hyperlink(_0x1b7663[_0x32baf0(0x109)],_0x109184)+'\x20'+a24_0x7f8d87[_0x32baf0(0xd9)](_0x109184));}}_0x3bb369[_0x32baf0(0xe1)]>0x0&&console[_0x32baf0(0x100)](a24_0x7f8d87['green'](_0x32baf0(0xe0)+_0x3bb369['created']+_0x32baf0(0x10e)));_0x3bb369[_0x32baf0(0x116)]>0x0&&console['error'](a24_0x7f8d87['green']('✔\x20Updated\x20'+_0x3bb369[_0x32baf0(0x116)]+_0x32baf0(0x10e)));if(_0x3bb369[_0x32baf0(0x11f)][_0x32baf0(0x123)]>0x0){console['error'](a24_0x7f8d87[_0x32baf0(0x12d)]('✘\x20'+_0x3bb369[_0x32baf0(0x11f)]['length']+_0x32baf0(0xe6)));for(const _0x43c4ce of _0x3bb369[_0x32baf0(0x11f)]){console[_0x32baf0(0x100)]('\x20\x20'+a24_0x7f8d87[_0x32baf0(0x12d)](_0x43c4ce[_0x32baf0(0x109)])+':\x20'+_0x43c4ce[_0x32baf0(0x100)]);}}return saveSessionContext({'engage_workspace':_0x10d50c},_0x2e23db[_0x32baf0(0x108)]),_0x3bb369[_0x32baf0(0x11f)][_0x32baf0(0x123)]>0x0?0x1:0x0;}async[a24_0x2dd7cc(0xde)](_0x25dcf3,_0x16614b,_0x3ea5b3,_0x33009e,_0x3ea8c4){const _0x510143=a24_0x2dd7cc,{options:_0xc7a4a6,tdx:_0x33d5a9}=_0x25dcf3,_0x3c9f72=_0xc7a4a6,_0x2450d4=_0x3ea8c4&&_0x33009e?[_0x33009e]:discoverListCampaignFiles(_0x3ea5b3);if(_0x2450d4[_0x510143(0x123)]===0x0)return console[_0x510143(0x100)](a24_0x7f8d87['yellow'](_0x510143(0xee)+_0x3ea5b3)),console[_0x510143(0x100)](a24_0x7f8d87['dim']('ListCampaign\x20files\x20must\x20have\x20type:\x20list_campaign.')),0x1;const _0x135a6d=await _0x33d5a9[_0x510143(0x119)][_0x510143(0x11e)](_0x16614b),_0x46761f=await withProgressSpinner(_0x510143(0x10f),()=>_0x33d5a9[_0x510143(0x119)][_0x510143(0x121)](_0x135a6d,_0x2450d4),{'verbose':_0xc7a4a6[_0x510143(0x11b)]}),_0x40bc28=_0x46761f[_0x510143(0xe9)],_0x1dcb34=_0x40bc28[_0x510143(0xea)](_0x4e563a=>_0x4e563a[_0x510143(0x104)]===_0x510143(0xdf)),_0x2bf18e=_0x40bc28[_0x510143(0xea)](_0x359812=>_0x359812[_0x510143(0x104)]===_0x510143(0xef));console[_0x510143(0x100)](_0x510143(0xdc)+_0x16614b+'\x27:');if(_0x1dcb34[_0x510143(0x123)]>0x0){console['error']('\x20\x20'+a24_0x7f8d87[_0x510143(0xf2)]('+\x20'+_0x1dcb34[_0x510143(0x123)]+_0x510143(0x125)));for(const _0x27bde2 of _0x1dcb34)console[_0x510143(0x100)](_0x510143(0x10b)+a24_0x7f8d87[_0x510143(0xf2)]('+')+'\x20'+_0x27bde2[_0x510143(0xfe)][_0x510143(0x109)]);}if(_0x2bf18e[_0x510143(0x123)]>0x0){console[_0x510143(0x100)]('\x20\x20'+a24_0x7f8d87[_0x510143(0x10c)]('~\x20'+_0x2bf18e[_0x510143(0x123)]+_0x510143(0xf0)));for(const _0x10f2cf of _0x2bf18e)console[_0x510143(0x100)](_0x510143(0x10b)+a24_0x7f8d87[_0x510143(0x10c)]('~')+'\x20'+_0x10f2cf['input']['name']);}if(_0x3c9f72[_0x510143(0xf3)])return console['error'](a24_0x7f8d87[_0x510143(0x10c)](_0x510143(0xdb))),0x0;if(!_0x3c9f72['yes']){if(!isInteractive())return console['error'](a24_0x7f8d87['red']('\x0aError:\x20Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode')),console[_0x510143(0x100)](a24_0x7f8d87['dim'](_0x510143(0x117))),0x1;const _0x4173e4=await confirmKey('Push\x20'+_0x40bc28[_0x510143(0x123)]+_0x510143(0xe7)+(_0x40bc28[_0x510143(0x123)]===0x1?'':'s')+'?');if(!_0x4173e4)return console[_0x510143(0x100)](a24_0x7f8d87[_0x510143(0x10c)](_0x510143(0x112)),_0x510143(0x12c)),0x1;}const _0x9e05f=await withProgressSpinner(_0x510143(0x10d),()=>_0x33d5a9[_0x510143(0x119)]['applyListCampaignPushes'](_0x40bc28),{'verbose':_0xc7a4a6[_0x510143(0x11b)]});for(const _0xada1d8 of _0x9e05f[_0x510143(0xe9)]){const _0x4dcfc1=_0xada1d8[_0x510143(0x104)]===_0x510143(0xe1)?a24_0x7f8d87[_0x510143(0xf2)]('+'):a24_0x7f8d87['yellow']('~');console[_0x510143(0x100)]('\x20\x20'+_0x4dcfc1+'\x20'+_0xada1d8[_0x510143(0x120)]['name']+'\x20('+_0xada1d8[_0x510143(0x120)][_0x510143(0x114)]+')');}return saveSessionContext({'engage_workspace':_0x16614b},_0xc7a4a6[_0x510143(0x108)]),0x0;}}
@@ -1 +1 @@
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
+ const a25_0x230fe9=a25_0x4cf4;(function(_0x328d52,_0x5f2ffe){const _0x31fb80=a25_0x4cf4,_0x50f8ff=_0x328d52();while(!![]){try{const _0x487b8d=parseInt(_0x31fb80(0xc1))/0x1+-parseInt(_0x31fb80(0xb9))/0x2*(parseInt(_0x31fb80(0xe2))/0x3)+parseInt(_0x31fb80(0xc0))/0x4*(-parseInt(_0x31fb80(0xd5))/0x5)+-parseInt(_0x31fb80(0xc9))/0x6+parseInt(_0x31fb80(0xd6))/0x7*(parseInt(_0x31fb80(0xb8))/0x8)+parseInt(_0x31fb80(0xcc))/0x9+-parseInt(_0x31fb80(0xd3))/0xa*(parseInt(_0x31fb80(0xdd))/0xb);if(_0x487b8d===_0x5f2ffe)break;else _0x50f8ff['push'](_0x50f8ff['shift']());}catch(_0x10fd61){_0x50f8ff['push'](_0x50f8ff['shift']());}}}(a25_0x1823,0xe99d9));import a25_0x55d96c from'chalk';import{handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{BaseCommand}from'./command.js';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a25_0x4cf4(_0x58da7e,_0x150c8d){_0x58da7e=_0x58da7e-0xb2;const _0x18236b=a25_0x1823();let _0x4cf414=_0x18236b[_0x58da7e];return _0x4cf414;}import{runCampaignReadiness,toStructuredCampaignReadinessReport}from'../sdk/engage/campaign-readiness-workflow.js';function a25_0x1823(){const _0x1beedf=['\x20(skipped:\x20','engage','1868958GxmKAs','session','\x20not\x20applicable','7530570XrcCNW','Readiness:\x20','output','name','length','\x20ready,\x20','results','79770WnRMCv','ready','60ZQynNX','183757sxlUBy','Checking\x20campaign\x20readiness...','engage:campaign:readiness','campaignName','skipReason','green','summary','506ziGBma','\x20skipped','\x20blocked,\x20','status','validation','3SfLkhg','log','exitCode','relativePath','skipped','workspace','blocked','dim','248Hbtsym','2404166xPbBmV','red','checks','execute','toUpperCase','verbose','yellow','100048LWWsMF','1487040zcunea','Check\x20email\x20campaign\x20readiness\x20against\x20workspace\x20delivery\x20config','warnings','message','delivery','description'];a25_0x1823=function(){return _0x1beedf;};return a25_0x1823();}import{withSpinner}from'../utils/spinner.js';export class EngageCampaignReadinessCommand extends BaseCommand{[a25_0x230fe9(0xcf)]=a25_0x230fe9(0xd8);[a25_0x230fe9(0xc6)]=a25_0x230fe9(0xc2);async[a25_0x230fe9(0xbc)](_0x695b0c){const _0x527c83=a25_0x230fe9,{options:_0x311e1a,args:_0x535f21,tdx:_0x74a13d}=_0x695b0c,_0x4a4409=_0x311e1a,{data:_0x21d18e}=await withSpinner(_0x527c83(0xd7),()=>runCampaignReadiness({'engage':_0x74a13d[_0x527c83(0xc8)],'delivery':_0x74a13d[_0x527c83(0xc5)]},{'target':_0x535f21[0x0],'workspace':_0x4a4409[_0x527c83(0xb5)],'session':_0x311e1a[_0x527c83(0xca)]}),{'verbose':_0x311e1a[_0x527c83(0xbe)]});if(isStructuredFormat(_0x311e1a)||_0x311e1a[_0x527c83(0xce)]){const _0x16e167=toStructuredCampaignReadinessReport(_0x21d18e);return await handleSingleObjectOutput(_0x16e167,_0x311e1a),_0x21d18e['exitCode'];}if(_0x21d18e[_0x527c83(0xc4)])console['log'](a25_0x55d96c[_0x527c83(0xbf)](_0x21d18e['message']));for(const _0x488220 of _0x21d18e[_0x527c83(0xd2)]){if(_0x488220[_0x527c83(0xe0)]===_0x527c83(0xb4)){_0x311e1a[_0x527c83(0xbe)]&&console[_0x527c83(0xe3)](a25_0x55d96c['dim']('–\x20'+_0x488220[_0x527c83(0xb3)]+_0x527c83(0xc7)+_0x488220[_0x527c83(0xda)]+')'));continue;}const _0x1fe356=_0x488220[_0x527c83(0xe0)]===_0x527c83(0xd4)?a25_0x55d96c['green']('✔'):_0x488220['status']===_0x527c83(0xb6)?a25_0x55d96c['red']('✖'):a25_0x55d96c[_0x527c83(0xb7)]('–'),_0x2d9244=_0x488220['campaignName']?_0x488220[_0x527c83(0xd9)]+':\x20':'';console['log'](_0x1fe356+'\x20'+_0x488220['relativePath']+':\x20'+_0x2d9244+_0x488220[_0x527c83(0xe0)][_0x527c83(0xbd)]());_0x488220[_0x527c83(0xe1)]&&(!_0x488220[_0x527c83(0xe1)]['valid']||_0x488220[_0x527c83(0xe1)][_0x527c83(0xc3)][_0x527c83(0xd0)]>0x0)&&console[_0x527c83(0xe3)](formatValidationResult(_0x488220[_0x527c83(0xe1)],_0x488220['source']??'',_0x488220[_0x527c83(0xb3)]));for(const _0x22cacc of _0x488220[_0x527c83(0xbb)]){const _0x550ecf=_0x22cacc[_0x527c83(0xe0)]==='ready'?a25_0x55d96c[_0x527c83(0xdb)]('✔'):_0x22cacc[_0x527c83(0xe0)]===_0x527c83(0xb6)?a25_0x55d96c[_0x527c83(0xba)]('✖'):a25_0x55d96c['dim']('–');console[_0x527c83(0xe3)]('\x20\x20'+_0x550ecf+'\x20'+_0x22cacc[_0x527c83(0xcf)]+':\x20'+_0x22cacc['message']);}}const {readyCount:_0xc69898,blockedCount:_0x17c421,notApplicableCount:_0x304ac4,skippedCount:_0xf25c93}=_0x21d18e[_0x527c83(0xdc)],_0x122eed=_0x527c83(0xcd)+_0xc69898+_0x527c83(0xd1)+_0x17c421+_0x527c83(0xdf)+_0x304ac4+_0x527c83(0xcb)+(_0xf25c93?',\x20'+_0xf25c93+_0x527c83(0xde):'');return console[_0x527c83(0xe3)](_0x17c421>0x0?a25_0x55d96c[_0x527c83(0xba)](_0x122eed):a25_0x55d96c[_0x527c83(0xdb)](_0x122eed)),_0x21d18e[_0x527c83(0xb2)];}}
@@ -1 +1 @@
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;}}
1
+ const a26_0x515352=a26_0x2b79;function a26_0x2b79(_0x3f29b2,_0x328e5c){_0x3f29b2=_0x3f29b2-0x1e3;const _0x13e6aa=a26_0x13e6();let _0x2b7921=_0x13e6aa[_0x3f29b2];return _0x2b7921;}(function(_0xab690d,_0x18c5d4){const _0x1efd37=a26_0x2b79,_0x5ab6c3=_0xab690d();while(!![]){try{const _0x17d1f9=-parseInt(_0x1efd37(0x211))/0x1*(-parseInt(_0x1efd37(0x1ea))/0x2)+-parseInt(_0x1efd37(0x213))/0x3*(parseInt(_0x1efd37(0x1e4))/0x4)+parseInt(_0x1efd37(0x1ee))/0x5+-parseInt(_0x1efd37(0x203))/0x6+parseInt(_0x1efd37(0x1ff))/0x7*(-parseInt(_0x1efd37(0x219))/0x8)+parseInt(_0x1efd37(0x1ed))/0x9*(-parseInt(_0x1efd37(0x20a))/0xa)+parseInt(_0x1efd37(0x1f0))/0xb;if(_0x17d1f9===_0x18c5d4)break;else _0x5ab6c3['push'](_0x5ab6c3['shift']());}catch(_0xd8556b){_0x5ab6c3['push'](_0x5ab6c3['shift']());}}}(a26_0x13e6,0xef740));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 a26_0x5ae06c from'chalk';import a26_0x21a043 from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageCampaignValidateCommand extends BaseCommand{[a26_0x515352(0x20d)]=a26_0x515352(0x216);[a26_0x515352(0x1e5)]='Validate\x20campaign\x20YAML\x20files';async[a26_0x515352(0x1f4)](_0x12322f){const _0x500f42=a26_0x515352,{options:_0x4c90e9,args:_0xa34a25}=_0x12322f,_0x13b2fa=_0x4c90e9,_0x4abcff=_0x13b2fa[_0x500f42(0x1fe)]??_0x500f42(0x1fb);if(_0x4abcff===_0x500f42(0x1ec))return this['validateListCampaignFiles'](_0xa34a25[0x0],_0x13b2fa[_0x500f42(0x1f2)]);if(_0x4abcff!=='campaign')return console[_0x500f42(0x1fd)](_0x500f42(0x1fc)+_0x4abcff+_0x500f42(0x210)),0x1;const _0x495bc5=_0xa34a25[0x0],_0x3ddfef=_0x495bc5?a26_0x21a043[_0x500f42(0x209)](_0x495bc5):undefined,_0x20ace2=_0x3ddfef?isYamlFile(_0x3ddfef):![];let _0x230128,_0x1fd582;if(_0x20ace2&&_0x3ddfef)_0x230128=a26_0x21a043[_0x500f42(0x1f7)](_0x3ddfef),_0x1fd582=_0x3ddfef;else _0x3ddfef?_0x230128=_0x3ddfef:_0x230128=process[_0x500f42(0x1eb)]();if(!_0x1fd582&&!existsSync(_0x230128))return console[_0x500f42(0x1fd)](a26_0x5ae06c[_0x500f42(0x205)](_0x500f42(0x1f9)+_0x230128+'\x0a')),0x1;let _0x19b8d1;if(_0x1fd582){if(!_0x1fd582[_0x500f42(0x21b)](_0x500f42(0x1e6))&&!_0x1fd582[_0x500f42(0x21b)](_0x500f42(0x1e3)))return console[_0x500f42(0x1fd)](a26_0x5ae06c[_0x500f42(0x205)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x1fd582+'\x0a')),0x1;_0x19b8d1=[_0x1fd582];}else _0x19b8d1=findYamlFiles(_0x230128);if(_0x19b8d1['length']===0x0)return console['error'](a26_0x5ae06c[_0x500f42(0x205)](_0x500f42(0x207)+_0x230128+'\x0a')),0x1;const _0x2486f3=validateYamlFiles(_0x19b8d1,_0x230128,{'filterType':_0x500f42(0x1fb)}),_0x3014cb=calculateSummary(_0x2486f3),_0x5f296d=_0x2486f3[_0x500f42(0x1f3)](isValidationResult);if(_0x5f296d[_0x500f42(0x1f5)]===0x0)return console[_0x500f42(0x1fd)](a26_0x5ae06c[_0x500f42(0x20b)](_0x500f42(0x1e8)+_0x230128+'\x0a')),_0x3014cb[_0x500f42(0x218)]>0x0&&console[_0x500f42(0x1fd)](a26_0x5ae06c[_0x500f42(0x204)]('('+_0x3014cb[_0x500f42(0x218)]+'\x20non-campaign\x20file(s)\x20skipped)')),0x0;for(const _0x23e15e of _0x2486f3){if(!isValidationResult(_0x23e15e)){_0x13b2fa[_0x500f42(0x1f2)]&&console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x204)]('-\x20'+_0x23e15e['relativePath']+_0x500f42(0x202)+_0x23e15e[_0x500f42(0x212)]+')'));continue;}const {relativePath:_0x2f5bf8,source:_0x4fb9cc,result:_0xf997cd}=_0x23e15e;if(_0xf997cd['valid']&&_0xf997cd[_0x500f42(0x20f)][_0x500f42(0x1f5)]===0x0)_0x13b2fa['verbose']&&console['log'](a26_0x5ae06c['green']('✔\x20'+_0x2f5bf8));else _0xf997cd[_0x500f42(0x206)]?(console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x20b)]('⚠\x20'+_0x2f5bf8+':\x20'+_0xf997cd[_0x500f42(0x20f)][_0x500f42(0x1f5)]+_0x500f42(0x1ef))),console[_0x500f42(0x20e)](formatValidationResult(_0xf997cd,_0x4fb9cc,_0x2f5bf8))):(console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x205)]('✖\x20'+_0x2f5bf8+':\x20'+_0xf997cd['errors'][_0x500f42(0x1f5)]+_0x500f42(0x21a))),console[_0x500f42(0x20e)](formatValidationResult(_0xf997cd,_0x4fb9cc,_0x2f5bf8)));}return console['log'](''),_0x3014cb[_0x500f42(0x1f8)]?(console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x205)](_0x500f42(0x1f6)+_0x3014cb['invalidCount']+'\x20campaign(s)\x20with\x20errors,\x20'+_0x3014cb[_0x500f42(0x1e7)]+'\x20valid')),_0x3014cb[_0x500f42(0x217)]>0x0&&console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x20b)](_0x3014cb['warningCount']+_0x500f42(0x21c))),_0x3014cb[_0x500f42(0x218)]>0x0&&console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x204)](_0x3014cb[_0x500f42(0x218)]+_0x500f42(0x21d))),0x1):(console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x201)](_0x500f42(0x1f1)+_0x3014cb[_0x500f42(0x1e7)]+_0x500f42(0x20c))),_0x3014cb['warningCount']>0x0&&console[_0x500f42(0x20e)](a26_0x5ae06c[_0x500f42(0x20b)](_0x3014cb[_0x500f42(0x217)]+_0x500f42(0x21c))),_0x3014cb[_0x500f42(0x218)]>0x0&&console[_0x500f42(0x20e)](a26_0x5ae06c['dim'](_0x3014cb[_0x500f42(0x218)]+_0x500f42(0x21d))),0x0);}[a26_0x515352(0x208)](_0x4f969b,_0xe5f5ca){const _0x4d8fa2=a26_0x515352,_0x29db9c=_0x4f969b?a26_0x21a043[_0x4d8fa2(0x209)](_0x4f969b):undefined,_0xc4309b=_0x29db9c?isYamlFile(_0x29db9c):![],_0x39ad89=_0xc4309b&&_0x29db9c?a26_0x21a043['dirname'](_0x29db9c):_0x29db9c??process[_0x4d8fa2(0x1eb)]();if(!_0xc4309b&&!existsSync(_0x39ad89))return console['error'](a26_0x5ae06c[_0x4d8fa2(0x205)](_0x4d8fa2(0x1f9)+_0x39ad89)),0x1;const _0x445d17=_0xc4309b&&_0x29db9c?[_0x29db9c]:discoverListCampaignFiles(_0x39ad89);if(_0x445d17['length']===0x0)return console[_0x4d8fa2(0x1fd)](a26_0x5ae06c[_0x4d8fa2(0x20b)]('No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20'+_0x39ad89)),0x1;let _0x289eb8=0x0;for(const _0x4d5f84 of _0x445d17){const _0x33b261=validateListCampaignYaml(readFileSync(_0x4d5f84,'utf8'));if(_0x33b261[_0x4d8fa2(0x206)]){if(_0xe5f5ca)console[_0x4d8fa2(0x20e)](a26_0x5ae06c[_0x4d8fa2(0x201)]('✔\x20'+a26_0x21a043[_0x4d8fa2(0x1fa)](_0x39ad89,_0x4d5f84)));continue;}_0x289eb8+=_0x33b261[_0x4d8fa2(0x215)][_0x4d8fa2(0x1f5)],console[_0x4d8fa2(0x1fd)](a26_0x5ae06c[_0x4d8fa2(0x205)]('✖\x20'+a26_0x21a043['relative'](_0x39ad89,_0x4d5f84)));for(const _0x5aa7b1 of _0x33b261[_0x4d8fa2(0x215)]){const _0x31a6f4=_0x5aa7b1[_0x4d8fa2(0x214)]?_0x5aa7b1['path']+':\x20':'';console[_0x4d8fa2(0x1fd)]('\x20\x20'+a26_0x5ae06c['red']('✗')+'\x20'+_0x31a6f4+_0x5aa7b1[_0x4d8fa2(0x1e9)]);}}if(_0x289eb8>0x0)return console['error'](a26_0x5ae06c['red'](_0x4d8fa2(0x1f6)+_0x289eb8+'\x20ListCampaign\x20error(s)')),0x1;return console['log'](a26_0x5ae06c['green']('✔\x20All\x20'+_0x445d17[_0x4d8fa2(0x1f5)]+_0x4d8fa2(0x200))),0x0;}}function a26_0x13e6(){const _0x44246b=['\x20campaign(s)\x20valid','name','log','warnings','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','13017wLiIoQ','reason','27eoFMnd','path','errors','engage:campaign:validate','warningCount','skippedCount','56cYrVIn','\x20error(s)','endsWith','\x20warning(s)\x20found','\x20non-campaign\x20file(s)\x20skipped','.yaml','244316CKILxM','description','.yml','validCount','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','message','122eYBmFf','cwd','list-campaign','864ymPCBt','6597800CaLyTT','\x20warning(s)','21620401fbumfo','✔\x20All\x20','verbose','filter','execute','length','Validation\x20failed:\x20','dirname','hasErrors','Error:\x20Directory\x20not\x20found:\x20','relative','campaign','Error:\x20Invalid\x20campaign\x20type\x20\x22','error','campaignType','72317vdvSHt','\x20ListCampaign\x20YAML\x20file(s)\x20valid','green','\x20(skipped:\x20','3558744rnKIKm','dim','red','valid','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','validateListCampaignFiles','resolve','196160pwjuhz','yellow'];a26_0x13e6=function(){return _0x44246b;};return a26_0x13e6();}