@treasuredata/tdx 2026.9.3 → 2026.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/ai-usage-command-base.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.d.ts.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-journey-command.d.ts +34 -0
  17. package/dist/commands/cas-journey-command.d.ts.map +1 -0
  18. package/dist/commands/cas-journey-command.js +1 -0
  19. package/dist/commands/cas-journey-command.js.map +1 -0
  20. package/dist/commands/cas-segment-command.js +1 -1
  21. package/dist/commands/chat-command.js +1 -1
  22. package/dist/commands/claude-command.d.ts.map +1 -1
  23. package/dist/commands/claude-command.js +1 -1
  24. package/dist/commands/claude-command.js.map +1 -1
  25. package/dist/commands/claude-statusline-command.js +1 -1
  26. package/dist/commands/claude-usage-command.js +1 -1
  27. package/dist/commands/codex-command.d.ts.map +1 -1
  28. package/dist/commands/codex-command.js +1 -1
  29. package/dist/commands/codex-command.js.map +1 -1
  30. package/dist/commands/command.js +1 -1
  31. package/dist/commands/connection-command.js +1 -1
  32. package/dist/commands/databases.js +1 -1
  33. package/dist/commands/delivery-command.js +1 -1
  34. package/dist/commands/describe.js +1 -1
  35. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  36. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  37. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  38. package/dist/commands/engage-campaign-pull-command.js +1 -1
  39. package/dist/commands/engage-campaign-push-command.js +1 -1
  40. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  41. package/dist/commands/engage-campaign-validate-command.js +1 -1
  42. package/dist/commands/engage-command.js +1 -1
  43. package/dist/commands/engage-in-browser-message-command.js +1 -1
  44. package/dist/commands/engage-landing-page-command.js +1 -1
  45. package/dist/commands/engage-template-pull-command.js +1 -1
  46. package/dist/commands/engage-template-push-command.js +1 -1
  47. package/dist/commands/engage-template-validate-command.js +1 -1
  48. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  49. package/dist/commands/job-command.js +1 -1
  50. package/dist/commands/journey-command.d.ts +46 -0
  51. package/dist/commands/journey-command.d.ts.map +1 -1
  52. package/dist/commands/journey-command.js +1 -1
  53. package/dist/commands/journey-command.js.map +1 -1
  54. package/dist/commands/journey-validate-command.js +1 -1
  55. package/dist/commands/llm-command.js +1 -1
  56. package/dist/commands/mcp-command.js +1 -1
  57. package/dist/commands/opencode-command.d.ts +25 -0
  58. package/dist/commands/opencode-command.d.ts.map +1 -1
  59. package/dist/commands/opencode-command.js +1 -1
  60. package/dist/commands/opencode-command.js.map +1 -1
  61. package/dist/commands/opencode-usage-command.js +1 -1
  62. package/dist/commands/p13n-command.js +1 -1
  63. package/dist/commands/parent-segment-command.js +1 -1
  64. package/dist/commands/policy-command.js +1 -1
  65. package/dist/commands/profile-command.js +1 -1
  66. package/dist/commands/profiles-command.js +1 -1
  67. package/dist/commands/query-command.js +1 -1
  68. package/dist/commands/schedule-command.js +1 -1
  69. package/dist/commands/segment-command.js +1 -1
  70. package/dist/commands/segment-create-command.js +1 -1
  71. package/dist/commands/segment-fields-command.js +1 -1
  72. package/dist/commands/segment-move-command.js +1 -1
  73. package/dist/commands/segment-pull-command.js +1 -1
  74. package/dist/commands/segment-push-command.js +1 -1
  75. package/dist/commands/segment-update-command.js +1 -1
  76. package/dist/commands/segment-use-command.js +1 -1
  77. package/dist/commands/segment-validate-command.js +1 -1
  78. package/dist/commands/segments.js +1 -1
  79. package/dist/commands/show.js +1 -1
  80. package/dist/commands/status-command.js +1 -1
  81. package/dist/commands/table-deleted.js +1 -1
  82. package/dist/commands/tables.js +1 -1
  83. package/dist/commands/unset-command.js +1 -1
  84. package/dist/commands/upgrade-command.js +1 -1
  85. package/dist/commands/use-command.js +1 -1
  86. package/dist/commands/user-command.js +1 -1
  87. package/dist/commands/work-command.js +1 -1
  88. package/dist/commands/workflow-command.js +1 -1
  89. package/dist/core/auth.d.ts +10 -1
  90. package/dist/core/auth.d.ts.map +1 -1
  91. package/dist/core/auth.js +1 -1
  92. package/dist/core/auth.js.map +1 -1
  93. package/dist/core/command-output.js +1 -1
  94. package/dist/core/config.js +1 -1
  95. package/dist/core/connection-cache.js +1 -1
  96. package/dist/core/constants.js +1 -1
  97. package/dist/core/credential-cache.js +1 -1
  98. package/dist/core/global-context.js +1 -1
  99. package/dist/core/keychain.js +1 -1
  100. package/dist/core/oauth-keychain.js +1 -1
  101. package/dist/core/oauth.js +1 -1
  102. package/dist/core/profile.js +1 -1
  103. package/dist/core/project-config.js +1 -1
  104. package/dist/core/session.js +1 -1
  105. package/dist/core/site-mismatch.js +1 -1
  106. package/dist/core/user-cache.js +1 -1
  107. package/dist/core/version.js +1 -1
  108. package/dist/index.js +1 -1
  109. package/dist/mcp/server.js +1 -1
  110. package/dist/mcp/tools/index.js +1 -1
  111. package/dist/mcp/tools/tdx-run.js +1 -1
  112. package/dist/mcp/tools/tdx-search.js +1 -1
  113. package/dist/mcp/tools/work-create-item.js +1 -1
  114. package/dist/mcp/utils.js +1 -1
  115. package/dist/proxy/claude-usage-tracker.js +1 -1
  116. package/dist/proxy/passthrough-server.d.ts +2 -0
  117. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  118. package/dist/proxy/passthrough-server.js +1 -1
  119. package/dist/proxy/passthrough-server.js.map +1 -1
  120. package/dist/proxy/sse-usage-parser.js +1 -1
  121. package/dist/sdk/agent/agent-config.js +1 -1
  122. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  123. package/dist/sdk/agent/agent-yaml.js +1 -1
  124. package/dist/sdk/agent/test/evaluator.js +1 -1
  125. package/dist/sdk/agent/test/executor.js +1 -1
  126. package/dist/sdk/agent/test/index.js +1 -1
  127. package/dist/sdk/agent/test/output.js +1 -1
  128. package/dist/sdk/agent/test/parser.js +1 -1
  129. package/dist/sdk/agent/tool-target-registry.js +1 -1
  130. package/dist/sdk/api.js +1 -1
  131. package/dist/sdk/auth-token.js +1 -1
  132. package/dist/sdk/cas/audience-context.d.ts +33 -0
  133. package/dist/sdk/cas/audience-context.d.ts.map +1 -0
  134. package/dist/sdk/cas/audience-context.js +1 -0
  135. package/dist/sdk/cas/audience-context.js.map +1 -0
  136. package/dist/sdk/cas/cas-api-client.js +1 -1
  137. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  138. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  139. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  140. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  141. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  142. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  143. package/dist/sdk/cas/index.d.ts +8 -0
  144. package/dist/sdk/cas/index.d.ts.map +1 -1
  145. package/dist/sdk/cas/index.js +1 -1
  146. package/dist/sdk/cas/index.js.map +1 -1
  147. package/dist/sdk/cas/pull-workflow.js +1 -1
  148. package/dist/sdk/cas/push-workflow.js +1 -1
  149. package/dist/sdk/cas/validate-files.js +1 -1
  150. package/dist/sdk/client/cdp-api-client.js +1 -1
  151. package/dist/sdk/client/delivery-api-client.js +1 -1
  152. package/dist/sdk/client/endpoints.js +1 -1
  153. package/dist/sdk/client/engage-api-client.js +1 -1
  154. package/dist/sdk/client/http-client.js +1 -1
  155. package/dist/sdk/client/llm-api-client.js +1 -1
  156. package/dist/sdk/client/oauth-refresh.js +1 -1
  157. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  158. package/dist/sdk/client/rate-limiter.js +1 -1
  159. package/dist/sdk/client/td-api-client.js +1 -1
  160. package/dist/sdk/client/trino-api-client.js +1 -1
  161. package/dist/sdk/client/workflow-client.js +1 -1
  162. package/dist/sdk/connection-validator.js +1 -1
  163. package/dist/sdk/connection.js +1 -1
  164. package/dist/sdk/delivery.js +1 -1
  165. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  166. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  167. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  168. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  169. package/dist/sdk/engage/campaign-pull.js +1 -1
  170. package/dist/sdk/engage/campaign-push.js +1 -1
  171. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  172. package/dist/sdk/engage/campaign-readiness.js +1 -1
  173. package/dist/sdk/engage/campaign-validator.js +1 -1
  174. package/dist/sdk/engage/campaign-yaml.js +1 -1
  175. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  176. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  177. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  178. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  179. package/dist/sdk/engage/landing-page-init.js +1 -1
  180. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  181. package/dist/sdk/engage/landing-page-pull.js +1 -1
  182. package/dist/sdk/engage/landing-page-push.js +1 -1
  183. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  184. package/dist/sdk/engage/landing-page-validator.js +1 -1
  185. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  186. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  187. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  188. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  189. package/dist/sdk/engage/template-pull.js +1 -1
  190. package/dist/sdk/engage/template-push.js +1 -1
  191. package/dist/sdk/engage/template-validator.js +1 -1
  192. package/dist/sdk/engage/template-yaml.js +1 -1
  193. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  194. package/dist/sdk/engage/types/campaign-def.js +1 -1
  195. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  196. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  197. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  198. package/dist/sdk/engage/types/template-schema.js +1 -1
  199. package/dist/sdk/engage/workspace-assignments.js +1 -1
  200. package/dist/sdk/engage.js +1 -1
  201. package/dist/sdk/errors.js +1 -1
  202. package/dist/sdk/index.js +1 -1
  203. package/dist/sdk/io/index.js +1 -1
  204. package/dist/sdk/io/node-filesystem.js +1 -1
  205. package/dist/sdk/job.js +1 -1
  206. package/dist/sdk/journey.d.ts +4 -1
  207. package/dist/sdk/journey.d.ts.map +1 -1
  208. package/dist/sdk/journey.js +1 -1
  209. package/dist/sdk/journey.js.map +1 -1
  210. package/dist/sdk/llm/chat-cache.js +1 -1
  211. package/dist/sdk/llm/index.js +1 -1
  212. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  213. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  214. package/dist/sdk/llm/model-factors.js +1 -1
  215. package/dist/sdk/llm/model-factors.js.map +1 -1
  216. package/dist/sdk/llm/user-settings.js +1 -1
  217. package/dist/sdk/p13n-studio-errors.js +1 -1
  218. package/dist/sdk/p13n-studio.js +1 -1
  219. package/dist/sdk/personalization.js +1 -1
  220. package/dist/sdk/policy.js +1 -1
  221. package/dist/sdk/query/deleted-table-validation.js +1 -1
  222. package/dist/sdk/query/index.js +1 -1
  223. package/dist/sdk/query/sql-parser.js +1 -1
  224. package/dist/sdk/realtime.js +1 -1
  225. package/dist/sdk/schedule.js +1 -1
  226. package/dist/sdk/segment/audience-context.js +1 -1
  227. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  228. package/dist/sdk/segment/fields-display.js +1 -1
  229. package/dist/sdk/segment/file-discovery.js +1 -1
  230. package/dist/sdk/segment/journey-utils.js +1 -1
  231. package/dist/sdk/segment/journey-validator.js +1 -1
  232. package/dist/sdk/segment/journey-yaml.js +1 -1
  233. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  234. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  235. package/dist/sdk/segment/pull-workflow.js +1 -1
  236. package/dist/sdk/segment/push-recovery.js +1 -1
  237. package/dist/sdk/segment/push-workflow.js +1 -1
  238. package/dist/sdk/segment/resolution-context.js +1 -1
  239. package/dist/sdk/segment/segment-path-parser.js +1 -1
  240. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  241. package/dist/sdk/segment/segment-validator.js +1 -1
  242. package/dist/sdk/segment/target-resolution.js +1 -1
  243. package/dist/sdk/segment/tdx-config.js +1 -1
  244. package/dist/sdk/segment/types/activation-schema.js +1 -1
  245. package/dist/sdk/segment/types/journey-def.js +1 -1
  246. package/dist/sdk/segment/types/journey-schema.js +1 -1
  247. package/dist/sdk/segment/types/segment-def.js +1 -1
  248. package/dist/sdk/segment/types/segment-schema.js +1 -1
  249. package/dist/sdk/segment/validate-files.js +1 -1
  250. package/dist/sdk/segment/yaml-validator.js +1 -1
  251. package/dist/sdk/segment.js +1 -1
  252. package/dist/sdk/types/index.js +1 -1
  253. package/dist/sdk/types/progress.js +1 -1
  254. package/dist/sdk/types/workspace.js +1 -1
  255. package/dist/sdk/user.js +1 -1
  256. package/dist/sdk/util/format-detector.js +1 -1
  257. package/dist/sdk/util/formatters.js +1 -1
  258. package/dist/sdk/util/index.js +1 -1
  259. package/dist/sdk/util/paginate.js +1 -1
  260. package/dist/sdk/util/tree-formatter.js +1 -1
  261. package/dist/sdk/util/tree-search.js +1 -1
  262. package/dist/sdk/workflow/archive-validation.js +1 -1
  263. package/dist/sdk/workflow/clone-workflow.js +1 -1
  264. package/dist/sdk/workflow/index.js +1 -1
  265. package/dist/sdk/workflow/pull-workflow.js +1 -1
  266. package/dist/sdk/workflow/push-workflow.js +1 -1
  267. package/dist/sdk/workflow/task-graph.js +1 -1
  268. package/dist/sdk/workflow/tdx-config.js +1 -1
  269. package/dist/sdk/workflow/workflow-utils.js +1 -1
  270. package/dist/sdk/workspace/access-tracker.js +1 -1
  271. package/dist/sdk/workspace/frontmatter.js +1 -1
  272. package/dist/sdk/workspace/git.js +1 -1
  273. package/dist/sdk/workspace/index.js +1 -1
  274. package/dist/sdk/workspace/templates.js +1 -1
  275. package/dist/sdk/workspace/weekly.js +1 -1
  276. package/dist/sdk/workspace/wikilinks.js +1 -1
  277. package/dist/test-utils/command-runner.js +1 -1
  278. package/dist/test-utils/factories.js +1 -1
  279. package/dist/test-utils/fixtures.js +1 -1
  280. package/dist/test-utils/http-mock.js +1 -1
  281. package/dist/test-utils/index.js +1 -1
  282. package/dist/utils/async.js +1 -1
  283. package/dist/utils/claude-code-state.js +1 -1
  284. package/dist/utils/colors.js +1 -1
  285. package/dist/utils/diff.js +1 -1
  286. package/dist/utils/file-permissions.js +1 -1
  287. package/dist/utils/file-reader.js +1 -1
  288. package/dist/utils/github-releases.js +1 -1
  289. package/dist/utils/global-cache.js +1 -1
  290. package/dist/utils/json-loader.js +1 -1
  291. package/dist/utils/local-cache.js +1 -1
  292. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  293. package/dist/utils/logger/formatters/index.js +1 -1
  294. package/dist/utils/logger/handlers/console-handler.js +1 -1
  295. package/dist/utils/logger/handlers/file-handler.js +1 -1
  296. package/dist/utils/logger/handlers/index.js +1 -1
  297. package/dist/utils/logger/handlers/null-handler.js +1 -1
  298. package/dist/utils/logger/index.js +1 -1
  299. package/dist/utils/logger/logger.js +1 -1
  300. package/dist/utils/logger/types.js +1 -1
  301. package/dist/utils/option-validation.js +1 -1
  302. package/dist/utils/process.js +1 -1
  303. package/dist/utils/prompt.js +1 -1
  304. package/dist/utils/proxy-fetch.js +1 -1
  305. package/dist/utils/spinner.js +1 -1
  306. package/dist/utils/sse-parser.js +1 -1
  307. package/dist/utils/string-utils.js +1 -1
  308. package/dist/utils/table-ref-parser.js +1 -1
  309. package/dist/utils/tdx-logger.js +1 -1
  310. package/dist/utils/version-check.js +1 -1
  311. package/package.json +2 -1
@@ -1 +1 @@
1
- function a19_0x11fb(_0x456112,_0x5246d8){_0x456112=_0x456112-0x74;const _0x2d0a17=a19_0x2d0a();let _0x11fb68=_0x2d0a17[_0x456112];return _0x11fb68;}const a19_0x133da9=a19_0x11fb;(function(_0x2615c9,_0x3658c9){const _0x57cbfb=a19_0x11fb,_0x466137=_0x2615c9();while(!![]){try{const _0x43e11c=-parseInt(_0x57cbfb(0x84))/0x1*(parseInt(_0x57cbfb(0x79))/0x2)+parseInt(_0x57cbfb(0x85))/0x3+-parseInt(_0x57cbfb(0x86))/0x4*(-parseInt(_0x57cbfb(0x82))/0x5)+-parseInt(_0x57cbfb(0x7e))/0x6*(-parseInt(_0x57cbfb(0x75))/0x7)+-parseInt(_0x57cbfb(0x81))/0x8+-parseInt(_0x57cbfb(0x83))/0x9+-parseInt(_0x57cbfb(0x87))/0xa*(-parseInt(_0x57cbfb(0x76))/0xb);if(_0x43e11c===_0x3658c9)break;else _0x466137['push'](_0x466137['shift']());}catch(_0x547b9a){_0x466137['push'](_0x466137['shift']());}}}(a19_0x2d0a,0xeab64));import{BaseCommand}from'./command.js';function a19_0x2d0a(){const _0x26b320=['delivery:senders','limit','244UxRhMY','List\x20email\x20senders','data','verbose','filter','234FkhOvx','execute','Fetching\x20email\x20senders...','5896968KGEEFP','155LZKgxx','4598136ypDAUq','9539mhDIup','241926uRghjJ','76724PfFVoj','10xADvDK','name','203735KeDyNI','17190965iqBmiB'];a19_0x2d0a=function(){return _0x26b320;};return a19_0x2d0a();}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{resolveWorkspaceIdFromOptions}from'./engage-command.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../core/constants.js';export class DeliveryEmailSendersCommand extends BaseCommand{['name']=a19_0x133da9(0x77);['description']=a19_0x133da9(0x7a);async[a19_0x133da9(0x7f)](_0x44becd){const _0x1786a4=a19_0x133da9,{options:_0x14709a,args:_0x5e00ab,tdx:_0x2ed5e3}=_0x44becd,_0x3e5078=_0x5e00ab[0x0],_0x42040d=resolveLimit(_0x14709a[_0x1786a4(0x78)],DEFAULT_LLM_LIMIT),_0x2f05d0=_0x14709a,_0x198d56=await resolveWorkspaceIdFromOptions(_0x2f05d0,_0x2ed5e3),_0x174511=await withSpinner(_0x1786a4(0x80),()=>_0x2ed5e3['delivery']['listEmailSenders']({'workspaceId':_0x198d56,'limit':_0x42040d}),{'verbose':_0x14709a[_0x1786a4(0x7c)]});let _0x255487=_0x174511[_0x1786a4(0x7b)];return _0x3e5078&&(_0x255487=_0x174511['data'][_0x1786a4(0x7d)](_0x4a5152=>matchGlobPattern(_0x4a5152[_0x1786a4(0x74)],_0x3e5078))),await handleSDKOutput(_0x255487,_0x14709a),0x0;}}
1
+ const a20_0x545d94=a20_0x4500;(function(_0x569881,_0x532a95){const _0x218dea=a20_0x4500,_0x71c265=_0x569881();while(!![]){try{const _0x15cb6b=-parseInt(_0x218dea(0xe1))/0x1*(-parseInt(_0x218dea(0xf0))/0x2)+parseInt(_0x218dea(0xe2))/0x3*(parseInt(_0x218dea(0xe3))/0x4)+parseInt(_0x218dea(0xdf))/0x5*(parseInt(_0x218dea(0xdd))/0x6)+-parseInt(_0x218dea(0xde))/0x7+-parseInt(_0x218dea(0xe5))/0x8+-parseInt(_0x218dea(0xeb))/0x9+parseInt(_0x218dea(0xea))/0xa*(-parseInt(_0x218dea(0xf1))/0xb);if(_0x15cb6b===_0x532a95)break;else _0x71c265['push'](_0x71c265['shift']());}catch(_0x3d11a0){_0x71c265['push'](_0x71c265['shift']());}}}(a20_0xfc53,0x4cece));import{BaseCommand}from'./command.js';function a20_0x4500(_0x16ec45,_0x17dfbd){_0x16ec45=_0x16ec45-0xdd;const _0xfc53c=a20_0xfc53();let _0x450054=_0xfc53c[_0x16ec45];return _0x450054;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';function a20_0xfc53(){const _0x31beb2=['14172IVltAY','data','1535952FYpnjy','name','description','delivery','filter','1030520RvfKIV','2373552yJswFm','execute','verbose','Fetching\x20email\x20senders...','limit','4VhEYIi','11lYOXzE','12lGcDLn','3640637jIJjTM','512780nWAlVh','List\x20email\x20senders','298579PEvMFm','501cMZfgW'];a20_0xfc53=function(){return _0x31beb2;};return a20_0xfc53();}import{resolveWorkspaceIdFromOptions}from'./engage-command.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../core/constants.js';export class DeliveryEmailSendersCommand extends BaseCommand{[a20_0x545d94(0xe6)]='delivery:senders';[a20_0x545d94(0xe7)]=a20_0x545d94(0xe0);async[a20_0x545d94(0xec)](_0xed4f89){const _0x421fec=a20_0x545d94,{options:_0x1d3317,args:_0x61d8b7,tdx:_0x43cc2b}=_0xed4f89,_0x98c97d=_0x61d8b7[0x0],_0x50c83c=resolveLimit(_0x1d3317[_0x421fec(0xef)],DEFAULT_LLM_LIMIT),_0x1db7a5=_0x1d3317,_0x379729=await resolveWorkspaceIdFromOptions(_0x1db7a5,_0x43cc2b),_0x3e05f8=await withSpinner(_0x421fec(0xee),()=>_0x43cc2b[_0x421fec(0xe8)]['listEmailSenders']({'workspaceId':_0x379729,'limit':_0x50c83c}),{'verbose':_0x1d3317[_0x421fec(0xed)]});let _0x22f430=_0x3e05f8['data'];return _0x98c97d&&(_0x22f430=_0x3e05f8[_0x421fec(0xe4)][_0x421fec(0xe9)](_0x1fd17c=>matchGlobPattern(_0x1fd17c['name'],_0x98c97d))),await handleSDKOutput(_0x22f430,_0x1d3317),0x0;}}
@@ -1 +1 @@
1
- const a20_0x207b58=a20_0x1551;(function(_0x25afc6,_0x5c0d99){const _0x3116cf=a20_0x1551,_0x462357=_0x25afc6();while(!![]){try{const _0x3389df=-parseInt(_0x3116cf(0x18f))/0x1+parseInt(_0x3116cf(0x189))/0x2+parseInt(_0x3116cf(0x182))/0x3+parseInt(_0x3116cf(0x18d))/0x4+-parseInt(_0x3116cf(0x187))/0x5+-parseInt(_0x3116cf(0x199))/0x6*(-parseInt(_0x3116cf(0x183))/0x7)+-parseInt(_0x3116cf(0x197))/0x8;if(_0x3389df===_0x5c0d99)break;else _0x462357['push'](_0x462357['shift']());}catch(_0x76cd38){_0x462357['push'](_0x462357['shift']());}}}(a20_0xd041,0xe2ca4));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,resolveOutputOptions}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export function hideEmptyDescriptions(_0x19e393){const _0x4a716e=a20_0x1551;if(_0x19e393[_0x4a716e(0x181)](_0x40ab06=>_0x40ab06[_0x4a716e(0x19f)]))return _0x19e393;return _0x19e393[_0x4a716e(0x19c)](({description:_0x5270b5,..._0x21e2c7})=>_0x21e2c7);}function a20_0x1551(_0x492084,_0x146630){_0x492084=_0x492084-0x17f;const _0xd0419b=a20_0xd041();let _0x1551f1=_0xd0419b[_0x492084];return _0x1551f1;}function a20_0xd041(){const _0x1bb45c=['execute','message','length','database','verbose','args','error','16071936ployjm','\x20column','492DheLHm','Database:\x20','Describe\x20table\x20schema','map','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','Site:\x20','description','Table:\x20','site','data','some','5161758pdrdcA','102025XmuyEq','✔\x20Found\x20','table','cause','5408155kBoPFU','name','3009778UyOmzF','describeTable','Table\x20\x27','query','2494320uReIBy','\x27\x20does\x20not\x20exist','1024650QHfbvY'];a20_0xd041=function(){return _0x1bb45c;};return a20_0xd041();}export class DescribeCommand extends BaseCommand{[a20_0x207b58(0x188)]='describe';[a20_0x207b58(0x19f)]=a20_0x207b58(0x19b);async[a20_0x207b58(0x190)](_0x59f96f){return this['describeTable'](_0x59f96f);}async[a20_0x207b58(0x18a)](_0x501ab0){const _0x248ceb=a20_0x207b58,{options:_0x33083f,args:_0x15fd32,tdx:_0x29b277}=_0x501ab0;let _0x1bf667;try{_0x1bf667=parseTableReference(_0x15fd32[0x0]);const _0x1ce218=_0x33083f[_0x248ceb(0x193)];!_0x1bf667[_0x248ceb(0x193)]&&_0x1ce218&&(_0x1bf667[_0x248ceb(0x193)]=_0x1ce218);const _0x3c2096=validateTableDescribeReference(_0x1bf667);if(_0x3c2096)return console[_0x248ceb(0x196)]('Error:\x20'+_0x3c2096),0x1;}catch(_0x2ef61f){return console[_0x248ceb(0x196)]('Error:\x20'+_0x2ef61f[_0x248ceb(0x191)]),0x1;}const _0x243cca=_0x1bf667[_0x248ceb(0x193)],_0x233b66=_0x1bf667[_0x248ceb(0x185)];try{_0x33083f['verbose']&&(console[_0x248ceb(0x196)](_0x248ceb(0x19e)+_0x33083f[_0x248ceb(0x17f)]),console['error'](_0x248ceb(0x19a)+_0x243cca),console[_0x248ceb(0x196)](_0x248ceb(0x1a0)+_0x233b66));const _0x5b0cdd=await withSpinner('Describing\x20table\x20'+_0x243cca+'.'+_0x233b66+'...',()=>_0x29b277[_0x248ceb(0x18c)]['describeTable'](_0x243cca,_0x233b66),{'verbose':_0x33083f[_0x248ceb(0x194)]}),_0x5a7b01=_0x5b0cdd[_0x248ceb(0x180)];if(_0x5a7b01[_0x248ceb(0x192)]===0x0)return console[_0x248ceb(0x196)]('✖\x20Table\x20not\x20found'),console['error'](_0x248ceb(0x18b)+_0x243cca+'.'+_0x233b66+_0x248ceb(0x18e)),0x1;console['error'](_0x248ceb(0x184)+_0x5a7b01[_0x248ceb(0x192)]+_0x248ceb(0x198)+(_0x5a7b01['length']!==0x1?'s':'')+'\x20in\x20'+_0x243cca+'.'+_0x233b66);const {format:_0x2aa15c}=resolveOutputOptions(_0x33083f);return await handleSDKOutput(_0x2aa15c===_0x248ceb(0x185)?hideEmptyDescriptions(_0x5a7b01):_0x5a7b01,_0x33083f),0x0;}catch(_0x33f0e9){if(_0x33f0e9 instanceof SDKError)return console[_0x248ceb(0x196)]('Error:\x20'+_0x33f0e9[_0x248ceb(0x191)]),_0x33f0e9[_0x248ceb(0x186)]&&console[_0x248ceb(0x196)]('\x20\x20Cause:\x20'+_0x33f0e9[_0x248ceb(0x186)]),0x1;throw _0x33f0e9;}}['validate'](_0x42cfc1){const _0x31694e=a20_0x207b58;if(_0x42cfc1[_0x31694e(0x195)][_0x31694e(0x192)]===0x0)return _0x31694e(0x19d);if(_0x42cfc1[_0x31694e(0x195)]['length']>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a21_0x2cfd4d=a21_0x5536;(function(_0x4ff5d6,_0xbae4b0){const _0x3067ca=a21_0x5536,_0x4b821e=_0x4ff5d6();while(!![]){try{const _0x419222=-parseInt(_0x3067ca(0xf3))/0x1*(parseInt(_0x3067ca(0x102))/0x2)+parseInt(_0x3067ca(0x10d))/0x3+-parseInt(_0x3067ca(0xfa))/0x4+parseInt(_0x3067ca(0x110))/0x5+-parseInt(_0x3067ca(0x113))/0x6*(parseInt(_0x3067ca(0x115))/0x7)+parseInt(_0x3067ca(0x106))/0x8*(-parseInt(_0x3067ca(0xff))/0x9)+-parseInt(_0x3067ca(0x112))/0xa*(-parseInt(_0x3067ca(0xf8))/0xb);if(_0x419222===_0xbae4b0)break;else _0x4b821e['push'](_0x4b821e['shift']());}catch(_0xc4349a){_0x4b821e['push'](_0x4b821e['shift']());}}}(a21_0x1362,0x3aa4c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,resolveOutputOptions}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a21_0x5536(_0x32846c,_0xde5d56){_0x32846c=_0x32846c-0xef;const _0x1362e7=a21_0x1362();let _0x55367a=_0x1362e7[_0x32846c];return _0x55367a;}import{withSpinner}from'../utils/spinner.js';function a21_0x1362(){const _0x2338dd=['...','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','\x20\x20Cause:\x20','error','2037429CbxWMV','describe','validate','118lNoBbW','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','description','Describe\x20table\x20schema','8vEQVdF','Error:\x20','\x27\x20does\x20not\x20exist','message','\x20column','table','some','540591dtRgqD','describeTable','Table:\x20','155145XmIvlZ','Describing\x20table\x20','30kVmXwQ','5766BVnhHn','✖\x20Table\x20not\x20found','1799PBefTl','data','query','args','\x20in\x20','name','5734pcxweP','site','length','database','verbose','4164611eTiPFX','execute','1180644brIbMk'];a21_0x1362=function(){return _0x2338dd;};return a21_0x1362();}export function hideEmptyDescriptions(_0x3cb7bd){const _0x26fed2=a21_0x5536;if(_0x3cb7bd[_0x26fed2(0x10c)](_0x42acdc=>_0x42acdc[_0x26fed2(0x104)]))return _0x3cb7bd;return _0x3cb7bd['map'](({description:_0x454834,..._0x262ed6})=>_0x262ed6);}export class DescribeCommand extends BaseCommand{[a21_0x2cfd4d(0xf2)]=a21_0x2cfd4d(0x100);[a21_0x2cfd4d(0x104)]=a21_0x2cfd4d(0x105);async[a21_0x2cfd4d(0xf9)](_0x5d19dc){const _0x45e9f9=a21_0x2cfd4d;return this[_0x45e9f9(0x10e)](_0x5d19dc);}async[a21_0x2cfd4d(0x10e)](_0x2caaea){const _0x2414d3=a21_0x2cfd4d,{options:_0x51db75,args:_0x1dfa19,tdx:_0xbb4a0a}=_0x2caaea;let _0x36e119;try{_0x36e119=parseTableReference(_0x1dfa19[0x0]);const _0x3f11e2=_0x51db75[_0x2414d3(0xf6)];!_0x36e119[_0x2414d3(0xf6)]&&_0x3f11e2&&(_0x36e119[_0x2414d3(0xf6)]=_0x3f11e2);const _0x3fbe84=validateTableDescribeReference(_0x36e119);if(_0x3fbe84)return console[_0x2414d3(0xfe)](_0x2414d3(0x107)+_0x3fbe84),0x1;}catch(_0x43b831){return console['error'](_0x2414d3(0x107)+_0x43b831[_0x2414d3(0x109)]),0x1;}const _0x7deda2=_0x36e119[_0x2414d3(0xf6)],_0x1e23ce=_0x36e119[_0x2414d3(0x10b)];try{_0x51db75[_0x2414d3(0xf7)]&&(console['error']('Site:\x20'+_0x51db75[_0x2414d3(0xf4)]),console[_0x2414d3(0xfe)]('Database:\x20'+_0x7deda2),console[_0x2414d3(0xfe)](_0x2414d3(0x10f)+_0x1e23ce));const _0x3c7aa8=await withSpinner(_0x2414d3(0x111)+_0x7deda2+'.'+_0x1e23ce+_0x2414d3(0xfb),()=>_0xbb4a0a[_0x2414d3(0xef)][_0x2414d3(0x10e)](_0x7deda2,_0x1e23ce),{'verbose':_0x51db75[_0x2414d3(0xf7)]}),_0x391e65=_0x3c7aa8[_0x2414d3(0x116)];if(_0x391e65[_0x2414d3(0xf5)]===0x0)return console[_0x2414d3(0xfe)](_0x2414d3(0x114)),console[_0x2414d3(0xfe)]('Table\x20\x27'+_0x7deda2+'.'+_0x1e23ce+_0x2414d3(0x108)),0x1;console['error']('✔\x20Found\x20'+_0x391e65[_0x2414d3(0xf5)]+_0x2414d3(0x10a)+(_0x391e65[_0x2414d3(0xf5)]!==0x1?'s':'')+_0x2414d3(0xf1)+_0x7deda2+'.'+_0x1e23ce);const {format:_0x3b7e12}=resolveOutputOptions(_0x51db75);return await handleSDKOutput(_0x3b7e12===_0x2414d3(0x10b)?hideEmptyDescriptions(_0x391e65):_0x391e65,_0x51db75),0x0;}catch(_0x1ff050){if(_0x1ff050 instanceof SDKError)return console[_0x2414d3(0xfe)]('Error:\x20'+_0x1ff050['message']),_0x1ff050['cause']&&console[_0x2414d3(0xfe)](_0x2414d3(0xfd)+_0x1ff050['cause']),0x1;throw _0x1ff050;}}[a21_0x2cfd4d(0x101)](_0x2af38a){const _0x209c94=a21_0x2cfd4d;if(_0x2af38a[_0x209c94(0xf0)][_0x209c94(0xf5)]===0x0)return _0x209c94(0xfc);if(_0x2af38a[_0x209c94(0xf0)][_0x209c94(0xf5)]>0x1)return _0x209c94(0x103);return undefined;}}
@@ -1 +1 @@
1
- const a21_0x58f78b=a21_0x800c;(function(_0x32d203,_0x1eb605){const _0x530a2b=a21_0x800c,_0xcc8772=_0x32d203();while(!![]){try{const _0x5d2308=parseInt(_0x530a2b(0x1d0))/0x1*(-parseInt(_0x530a2b(0x1cb))/0x2)+-parseInt(_0x530a2b(0x1e1))/0x3+-parseInt(_0x530a2b(0x1e5))/0x4+parseInt(_0x530a2b(0x1a9))/0x5*(parseInt(_0x530a2b(0x1da))/0x6)+parseInt(_0x530a2b(0x1b2))/0x7+-parseInt(_0x530a2b(0x1ce))/0x8*(-parseInt(_0x530a2b(0x1c9))/0x9)+-parseInt(_0x530a2b(0x1bc))/0xa*(parseInt(_0x530a2b(0x1b8))/0xb);if(_0x5d2308===_0x1eb605)break;else _0xcc8772['push'](_0xcc8772['shift']());}catch(_0x26e88e){_0xcc8772['push'](_0xcc8772['shift']());}}}(a21_0x2204,0xb8036));function a21_0x2204(){const _0x5b8e48=['counts','Resolving\x20workspace\x20\x27','Pulling\x20always-on\x20campaigns\x20from\x20\x27','1936190WwwKeM','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','engage_workspace','\x0aError:','engage','red','verbose','\x20=\x20','workspaceName','filter','data','-\x20no\x20files\x20written','dim','6507fjLxmv','✔\x20Pulled\x20','2wSTXwU','config','green','13488FsZqfW','dirname','107695CHtyhv','hasChanges','diff','type','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20pull\x20--workspace\x20<name>','resolveWorkspaceId','yes','Aborted.','engage:always-on-campaign:pull','\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20pull\x20<workspace-name>','6rsLsaG','relativePath','\x20unchanged\x20files','content','yellow','repeat','session','386892NltXQa','campaigns','description','\x20always-on\x20campaign(s)','3640992LLrIcR','Workspace\x20is\x20required.','targetDir','execute','\x20\x20Target:\x20','files','absolutePath','739665qRPxZB','\x0aChanges\x20to\x20\x27','error','\x27...','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','workspace','\x20files?','Write\x20','isNew','10512663sliYgn','dryRun','✔\x20Context\x20set:\x20','\x0aPull\x20summary\x20for\x20workspace\x20\x27','length','cyan','55iBhGDw'];a21_0x2204=function(){return _0x5b8e48;};return a21_0x2204();}import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a21_0x800c(_0x3456b2,_0x2dc8b4){_0x3456b2=_0x3456b2-0x1a9;const _0x220471=a21_0x2204();let _0x800c32=_0x220471[_0x3456b2];return _0x800c32;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a21_0x275de8 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a21_0x184f0a from'path';import{pullAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-pull.js';export class EngageAlwaysOnCampaignPullCommand extends BaseCommand{['name']=a21_0x58f78b(0x1d8);[a21_0x58f78b(0x1e3)]='Pull\x20always-on\x20campaigns\x20to\x20YAML\x20files';async[a21_0x58f78b(0x1e8)](_0x417341){const _0x3d50e8=a21_0x58f78b,{options:_0x529126,args:_0x50ae88,tdx:_0x504615}=_0x417341,_0x1004b9=_0x529126,_0x29f14f=await resolveWorkspaceName(_0x50ae88[0x0],_0x1004b9);if(!_0x29f14f)return console[_0x3d50e8(0x1ab)](a21_0x275de8[_0x3d50e8(0x1de)](_0x3d50e8(0x1e6))),console[_0x3d50e8(0x1ab)](_0x3d50e8(0x1d9)),console[_0x3d50e8(0x1ab)](_0x3d50e8(0x1d4)),console[_0x3d50e8(0x1ab)](_0x3d50e8(0x1ad)),0x1;const _0x52daef=await withProgressSpinner(_0x3d50e8(0x1ba)+_0x29f14f+_0x3d50e8(0x1ac),()=>_0x504615['engage'][_0x3d50e8(0x1d5)](_0x29f14f),{'verbose':_0x1004b9[_0x3d50e8(0x1c2)]}),_0x388b=_0x52daef[_0x3d50e8(0x1c6)],_0x4a2094=await withProgressSpinner(_0x3d50e8(0x1bb)+_0x29f14f+_0x3d50e8(0x1ac),_0x122750=>pullAlwaysOnCampaigns(_0x388b,_0x29f14f,{'engage':_0x504615[_0x3d50e8(0x1c0)]},{'campaignName':_0x1004b9['name'],'campaignType':_0x1004b9[_0x3d50e8(0x1d3)],'progress':{'update':_0x1cc807=>{_0x122750['setPhase'](_0x1cc807);}}}),{'verbose':_0x1004b9['verbose']}),_0x14a1a8=_0x4a2094[_0x3d50e8(0x1c6)];if(_0x14a1a8[_0x3d50e8(0x1b9)][_0x3d50e8(0x1e2)]===0x0)return console['error'](a21_0x275de8[_0x3d50e8(0x1de)]('No\x20always-on\x20campaigns\x20found\x20in\x20workspace\x20\x27'+_0x14a1a8[_0x3d50e8(0x1c4)]+'\x27')),0x0;const _0x4e8f6d=_0x14a1a8[_0x3d50e8(0x1ea)][_0x3d50e8(0x1c5)](_0x4d341e=>_0x4d341e[_0x3d50e8(0x1b1)]),_0x4c8dee=_0x14a1a8[_0x3d50e8(0x1ea)][_0x3d50e8(0x1c5)](_0x3c307d=>!_0x3c307d[_0x3d50e8(0x1b1)]&&_0x3c307d[_0x3d50e8(0x1d1)]),_0x2c502e=_0x14a1a8[_0x3d50e8(0x1ea)][_0x3d50e8(0x1c5)](_0x4c0573=>!_0x4c0573[_0x3d50e8(0x1b1)]&&!_0x4c0573['hasChanges']);console[_0x3d50e8(0x1ab)](_0x3d50e8(0x1b5)+_0x14a1a8[_0x3d50e8(0x1c4)]+'\x27:'),console[_0x3d50e8(0x1ab)]('\x20\x20'+a21_0x275de8[_0x3d50e8(0x1b7)](_0x14a1a8[_0x3d50e8(0x1b9)][_0x3d50e8(0x1e2)]+_0x3d50e8(0x1e4))),console[_0x3d50e8(0x1ab)]('\x20\x20'+a21_0x275de8[_0x3d50e8(0x1cd)]('+\x20'+_0x4e8f6d['length']+'\x20new\x20files')),console[_0x3d50e8(0x1ab)]('\x20\x20'+a21_0x275de8['yellow']('~\x20'+_0x4c8dee['length']+'\x20changed\x20files')),console[_0x3d50e8(0x1ab)]('\x20\x20'+a21_0x275de8[_0x3d50e8(0x1c8)]('=\x20'+_0x2c502e['length']+_0x3d50e8(0x1dc))),console[_0x3d50e8(0x1ab)](_0x3d50e8(0x1e9)+a21_0x275de8[_0x3d50e8(0x1b7)](_0x14a1a8[_0x3d50e8(0x1e7)])+'\x0a');if(_0x4c8dee[_0x3d50e8(0x1b6)]>0x0)for(const _0x3c01e0 of _0x4c8dee){console['error'](_0x3d50e8(0x1aa)+_0x3c01e0[_0x3d50e8(0x1db)]+'\x27:'),console['error']('─'[_0x3d50e8(0x1df)](0x3c)),console[_0x3d50e8(0x1ab)](_0x3c01e0[_0x3d50e8(0x1d2)]),console[_0x3d50e8(0x1ab)]('─'['repeat'](0x3c));}if(_0x1004b9[_0x3d50e8(0x1b3)])return console[_0x3d50e8(0x1ab)](a21_0x275de8[_0x3d50e8(0x1de)](_0x3d50e8(0x1bd))),0x0;if(_0x4e8f6d[_0x3d50e8(0x1b6)]===0x0&&_0x4c8dee[_0x3d50e8(0x1b6)]===0x0)return console[_0x3d50e8(0x1ab)](a21_0x275de8[_0x3d50e8(0x1cd)]('✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'engage_workspace':_0x14a1a8[_0x3d50e8(0x1c4)]},_0x1004b9[_0x3d50e8(0x1e0)]),0x0;if(!_0x1004b9[_0x3d50e8(0x1d6)]){if(!isInteractive())return console['error'](a21_0x275de8[_0x3d50e8(0x1c1)](_0x3d50e8(0x1bf)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3d50e8(0x1ab)](a21_0x275de8['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x16a23d=await confirmKey(_0x3d50e8(0x1b0)+(_0x4e8f6d[_0x3d50e8(0x1b6)]+_0x4c8dee[_0x3d50e8(0x1b6)])+_0x3d50e8(0x1af));if(!_0x16a23d)return console[_0x3d50e8(0x1ab)](a21_0x275de8[_0x3d50e8(0x1de)](_0x3d50e8(0x1d7)),_0x3d50e8(0x1c7)),0x1;}for(const _0x333ae0 of _0x14a1a8[_0x3d50e8(0x1ea)]){if(_0x333ae0[_0x3d50e8(0x1b1)]||_0x333ae0[_0x3d50e8(0x1d1)]){const _0x41aaaf=a21_0x184f0a[_0x3d50e8(0x1cf)](_0x333ae0[_0x3d50e8(0x1eb)]);!existsSync(_0x41aaaf)&&mkdirSync(_0x41aaaf,{'recursive':!![]}),writeFileSync(_0x333ae0[_0x3d50e8(0x1eb)],_0x333ae0[_0x3d50e8(0x1dd)],'utf-8');}}return console[_0x3d50e8(0x1ab)](a21_0x275de8[_0x3d50e8(0x1cd)](_0x3d50e8(0x1ca)+(_0x4e8f6d[_0x3d50e8(0x1b6)]+_0x4c8dee[_0x3d50e8(0x1b6)])+'\x20files\x20to\x20'+_0x14a1a8[_0x3d50e8(0x1e7)])),saveSessionContext({'engage_workspace':_0x14a1a8['workspaceName']},_0x1004b9[_0x3d50e8(0x1e0)]),console[_0x3d50e8(0x1ab)](a21_0x275de8[_0x3d50e8(0x1cd)](_0x3d50e8(0x1b4)+a21_0x275de8[_0x3d50e8(0x1c8)]('engage_workspace')+_0x3d50e8(0x1c3)+a21_0x275de8['cyan'](_0x14a1a8['workspaceName']))),0x0;}}async function resolveWorkspaceName(_0x56704b,_0x1b07b0){const _0x943dc8=a21_0x58f78b;if(_0x56704b)return _0x56704b;if(_0x1b07b0['workspace'])return _0x1b07b0[_0x943dc8(0x1ae)];const _0x4fc7c9=tryFindTdxConfig(process['cwd']());if(_0x4fc7c9?.[_0x943dc8(0x1cc)][_0x943dc8(0x1be)])return _0x4fc7c9[_0x943dc8(0x1cc)]['engage_workspace'];const _0x11e196=loadSessionContext(_0x1b07b0[_0x943dc8(0x1e0)]);if(_0x11e196?.[_0x943dc8(0x1be)])return _0x11e196[_0x943dc8(0x1be)];return undefined;}
1
+ const a22_0x41ac62=a22_0x4654;(function(_0x13f47b,_0x2455ca){const _0x5d8e2f=a22_0x4654,_0x42cf93=_0x13f47b();while(!![]){try{const _0x53b801=-parseInt(_0x5d8e2f(0xb1))/0x1+-parseInt(_0x5d8e2f(0xcc))/0x2+parseInt(_0x5d8e2f(0xc5))/0x3*(parseInt(_0x5d8e2f(0xca))/0x4)+parseInt(_0x5d8e2f(0xbc))/0x5*(parseInt(_0x5d8e2f(0x9a))/0x6)+-parseInt(_0x5d8e2f(0xb7))/0x7*(-parseInt(_0x5d8e2f(0x9f))/0x8)+parseInt(_0x5d8e2f(0xc3))/0x9+-parseInt(_0x5d8e2f(0xd7))/0xa;if(_0x53b801===_0x2455ca)break;else _0x42cf93['push'](_0x42cf93['shift']());}catch(_0x4cbb71){_0x42cf93['push'](_0x42cf93['shift']());}}}(a22_0x44da,0x6a52e));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';function a22_0x44da(){const _0x2d6cf7=['\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','114450cUXxXI','\x27...','repeat','green','Pull\x20always-on\x20campaigns\x20to\x20YAML\x20files','type','\x0aChanges\x20to\x20\x27','4938Ipmaaq','error','data','dryRun','isNew','8vrwcNM','content','engage:always-on-campaign:pull','hasChanges','length','\x0aError:','absolutePath','execute','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20pull\x20--workspace\x20<name>','workspace','targetDir','No\x20always-on\x20campaigns\x20found\x20in\x20workspace\x20\x27','-\x20no\x20files\x20written','resolveWorkspaceId','description','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','files','693666wxZVzu','engage','session','yellow','\x0aPull\x20summary\x20for\x20workspace\x20\x27','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','745598VdOWvK','✔\x20Pulled\x20','filter','config','campaigns','3845gSYSPI','✔\x20All\x20files\x20are\x20up\x20to\x20date','✔\x20Context\x20set:\x20','setPhase','dim','Pulling\x20always-on\x20campaigns\x20from\x20\x27','workspaceName','4379904cKaCRD','Aborted.','50223lgjjKf','engage_workspace','counts','\x20unchanged\x20files','cyan','20OnEhkN','dirname','338298gKPLaG','verbose','yes','name','Resolving\x20workspace\x20\x27','\x20files\x20to\x20','\x20new\x20files','cwd','utf-8','\x20changed\x20files'];a22_0x44da=function(){return _0x2d6cf7;};return a22_0x44da();}import a22_0x58bb9e from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';function a22_0x4654(_0x35d1fc,_0x476958){_0x35d1fc=_0x35d1fc-0x96;const _0x44da6c=a22_0x44da();let _0x465436=_0x44da6c[_0x35d1fc];return _0x465436;}import a22_0x42348c from'path';import{pullAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-pull.js';export class EngageAlwaysOnCampaignPullCommand extends BaseCommand{['name']=a22_0x41ac62(0xa1);[a22_0x41ac62(0xad)]=a22_0x41ac62(0x97);async[a22_0x41ac62(0xa6)](_0x546cdb){const _0x40e709=a22_0x41ac62,{options:_0x5d2ff7,args:_0x56f783,tdx:_0xefb592}=_0x546cdb,_0xa4f1f9=_0x5d2ff7,_0x430bf5=await resolveWorkspaceName(_0x56f783[0x0],_0xa4f1f9);if(!_0x430bf5)return console['error'](a22_0x58bb9e[_0x40e709(0xb4)]('Workspace\x20is\x20required.')),console['error']('\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20pull\x20<workspace-name>'),console[_0x40e709(0x9b)](_0x40e709(0xa7)),console[_0x40e709(0x9b)](_0x40e709(0xb6)),0x1;const _0x14681f=await withProgressSpinner(_0x40e709(0xd0)+_0x430bf5+_0x40e709(0xd8),()=>_0xefb592[_0x40e709(0xb2)][_0x40e709(0xac)](_0x430bf5),{'verbose':_0xa4f1f9[_0x40e709(0xcd)]}),_0x21136e=_0x14681f[_0x40e709(0x9c)],_0x4f39b1=await withProgressSpinner(_0x40e709(0xc1)+_0x430bf5+_0x40e709(0xd8),_0x11d119=>pullAlwaysOnCampaigns(_0x21136e,_0x430bf5,{'engage':_0xefb592[_0x40e709(0xb2)]},{'campaignName':_0xa4f1f9[_0x40e709(0xcf)],'campaignType':_0xa4f1f9[_0x40e709(0x98)],'progress':{'update':_0x2f827e=>{const _0x53f54d=_0x40e709;_0x11d119[_0x53f54d(0xbf)](_0x2f827e);}}}),{'verbose':_0xa4f1f9[_0x40e709(0xcd)]}),_0xded802=_0x4f39b1[_0x40e709(0x9c)];if(_0xded802['counts'][_0x40e709(0xbb)]===0x0)return console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0xb4)](_0x40e709(0xaa)+_0xded802[_0x40e709(0xc2)]+'\x27')),0x0;const _0x450978=_0xded802['files'][_0x40e709(0xb9)](_0x56c83e=>_0x56c83e[_0x40e709(0x9e)]),_0x3b4d36=_0xded802[_0x40e709(0xb0)]['filter'](_0x64a66=>!_0x64a66['isNew']&&_0x64a66[_0x40e709(0xa2)]),_0x5bbe55=_0xded802[_0x40e709(0xb0)][_0x40e709(0xb9)](_0x2b4e3a=>!_0x2b4e3a[_0x40e709(0x9e)]&&!_0x2b4e3a['hasChanges']);console[_0x40e709(0x9b)](_0x40e709(0xb5)+_0xded802[_0x40e709(0xc2)]+'\x27:'),console[_0x40e709(0x9b)]('\x20\x20'+a22_0x58bb9e[_0x40e709(0xc9)](_0xded802[_0x40e709(0xc7)][_0x40e709(0xbb)]+'\x20always-on\x20campaign(s)')),console[_0x40e709(0x9b)]('\x20\x20'+a22_0x58bb9e[_0x40e709(0x96)]('+\x20'+_0x450978[_0x40e709(0xa3)]+_0x40e709(0xd2))),console[_0x40e709(0x9b)]('\x20\x20'+a22_0x58bb9e[_0x40e709(0xb4)]('~\x20'+_0x3b4d36[_0x40e709(0xa3)]+_0x40e709(0xd5))),console['error']('\x20\x20'+a22_0x58bb9e[_0x40e709(0xc0)]('=\x20'+_0x5bbe55['length']+_0x40e709(0xc8))),console[_0x40e709(0x9b)]('\x20\x20Target:\x20'+a22_0x58bb9e[_0x40e709(0xc9)](_0xded802[_0x40e709(0xa9)])+'\x0a');if(_0x3b4d36[_0x40e709(0xa3)]>0x0)for(const _0x3e648b of _0x3b4d36){console['error'](_0x40e709(0x99)+_0x3e648b['relativePath']+'\x27:'),console[_0x40e709(0x9b)]('─'['repeat'](0x3c)),console[_0x40e709(0x9b)](_0x3e648b['diff']),console[_0x40e709(0x9b)]('─'[_0x40e709(0xd9)](0x3c));}if(_0xa4f1f9[_0x40e709(0x9d)])return console[_0x40e709(0x9b)](a22_0x58bb9e['yellow'](_0x40e709(0xd6))),0x0;if(_0x450978[_0x40e709(0xa3)]===0x0&&_0x3b4d36[_0x40e709(0xa3)]===0x0)return console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0x96)](_0x40e709(0xbd))),saveSessionContext({'engage_workspace':_0xded802[_0x40e709(0xc2)]},_0xa4f1f9[_0x40e709(0xb3)]),0x0;if(!_0xa4f1f9[_0x40e709(0xce)]){if(!isInteractive())return console['error'](a22_0x58bb9e['red'](_0x40e709(0xa4)),_0x40e709(0xae)),console[_0x40e709(0x9b)](a22_0x58bb9e['dim'](_0x40e709(0xaf))),0x1;const _0x16ee62=await confirmKey('Write\x20'+(_0x450978['length']+_0x3b4d36[_0x40e709(0xa3)])+'\x20files?');if(!_0x16ee62)return console['error'](a22_0x58bb9e[_0x40e709(0xb4)](_0x40e709(0xc4)),_0x40e709(0xab)),0x1;}for(const _0x5ad0df of _0xded802[_0x40e709(0xb0)]){if(_0x5ad0df[_0x40e709(0x9e)]||_0x5ad0df[_0x40e709(0xa2)]){const _0x495f00=a22_0x42348c[_0x40e709(0xcb)](_0x5ad0df[_0x40e709(0xa5)]);!existsSync(_0x495f00)&&mkdirSync(_0x495f00,{'recursive':!![]}),writeFileSync(_0x5ad0df[_0x40e709(0xa5)],_0x5ad0df[_0x40e709(0xa0)],_0x40e709(0xd4));}}return console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0x96)](_0x40e709(0xb8)+(_0x450978[_0x40e709(0xa3)]+_0x3b4d36['length'])+_0x40e709(0xd1)+_0xded802['targetDir'])),saveSessionContext({'engage_workspace':_0xded802['workspaceName']},_0xa4f1f9['session']),console[_0x40e709(0x9b)](a22_0x58bb9e[_0x40e709(0x96)](_0x40e709(0xbe)+a22_0x58bb9e['dim'](_0x40e709(0xc6))+'\x20=\x20'+a22_0x58bb9e[_0x40e709(0xc9)](_0xded802[_0x40e709(0xc2)]))),0x0;}}async function resolveWorkspaceName(_0x12c645,_0x13434b){const _0x425a7d=a22_0x41ac62;if(_0x12c645)return _0x12c645;if(_0x13434b[_0x425a7d(0xa8)])return _0x13434b['workspace'];const _0x2dfb5d=tryFindTdxConfig(process[_0x425a7d(0xd3)]());if(_0x2dfb5d?.[_0x425a7d(0xba)][_0x425a7d(0xc6)])return _0x2dfb5d[_0x425a7d(0xba)][_0x425a7d(0xc6)];const _0x58961d=loadSessionContext(_0x13434b[_0x425a7d(0xb3)]);if(_0x58961d?.[_0x425a7d(0xc6)])return _0x58961d['engage_workspace'];return undefined;}
@@ -1 +1 @@
1
- const a22_0x5c6ad3=a22_0xfc58;function a22_0xfc58(_0x1c75b5,_0xa9290b){_0x1c75b5=_0x1c75b5-0x10a;const _0x41ae93=a22_0x41ae();let _0xfc5812=_0x41ae93[_0x1c75b5];return _0xfc5812;}(function(_0x27a7f9,_0x370c13){const _0x6bbfc5=a22_0xfc58,_0x109c37=_0x27a7f9();while(!![]){try{const _0x152f39=-parseInt(_0x6bbfc5(0x125))/0x1+-parseInt(_0x6bbfc5(0x132))/0x2*(parseInt(_0x6bbfc5(0x137))/0x3)+-parseInt(_0x6bbfc5(0x131))/0x4*(parseInt(_0x6bbfc5(0x139))/0x5)+-parseInt(_0x6bbfc5(0x11e))/0x6*(-parseInt(_0x6bbfc5(0x12c))/0x7)+parseInt(_0x6bbfc5(0x112))/0x8+parseInt(_0x6bbfc5(0x12b))/0x9*(parseInt(_0x6bbfc5(0x113))/0xa)+-parseInt(_0x6bbfc5(0x118))/0xb*(-parseInt(_0x6bbfc5(0x12e))/0xc);if(_0x152f39===_0x370c13)break;else _0x109c37['push'](_0x109c37['shift']());}catch(_0x13103b){_0x109c37['push'](_0x109c37['shift']());}}}(a22_0x41ae,0x20233));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a22_0x3c54ce from'chalk';import a22_0x39d9f4 from'path';import{pushAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-push.js';function a22_0x41ae(){const _0x24a850=['includes','708176ZYWFmw','32880IhsgDe','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','error','length','engage:always-on-campaign:push','12485pfNjci','errors','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20always-on\x20campaigns','created','workspace','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','9642CqQBlT','cwd','dryRun','\x20campaign(s)\x20unchanged','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20push\x20--workspace\x20<name>','resolveWorkspaceId','setPhase','118500VXyPZk','execute','\x20always-on\x20campaign(s)','segment','data','session','315cZVHZn','553vkptFV','verbose','3432zYmMRL','green','\x20campaign(s)\x20updated','4TvYNvd','59528bqQqGK','Pushing\x20always-on\x20campaigns\x20to\x20\x27','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','\x20campaign(s)\x20created','engage','21VubNZw','config','983410ZMRkiG','dim','✔\x20Context\x20set:\x20','yellow','updated','name','resolve','engage_workspace','cyan','.yaml','sep','unchanged','Workspace\x20is\x20required.','\x0aErrors:','\x27...','endsWith','\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20push\x20<dir-or-file>'];a22_0x41ae=function(){return _0x24a850;};return a22_0x41ae();}export class EngageAlwaysOnCampaignPushCommand extends BaseCommand{[a22_0x5c6ad3(0x13e)]=a22_0x5c6ad3(0x117);['description']=a22_0x5c6ad3(0x11a);async[a22_0x5c6ad3(0x126)](_0x5e125e){const _0x4e3ad9=a22_0x5c6ad3,{options:_0x18c010,args:_0x3ff697,tdx:_0x53040c}=_0x5e125e,_0x1d55d3=_0x18c010,_0x44215a=_0x3ff697[0x0],_0x140d0b=_0x44215a?a22_0x39d9f4[_0x4e3ad9(0x13f)](_0x44215a):process['cwd'](),_0x4d3ace=await resolveWorkspaceName(_0x44215a,_0x1d55d3);if(!_0x4d3ace)return console[_0x4e3ad9(0x115)](a22_0x3c54ce[_0x4e3ad9(0x13c)](_0x4e3ad9(0x10c))),console['error'](_0x4e3ad9(0x110)),console['error'](_0x4e3ad9(0x122)),console[_0x4e3ad9(0x115)](_0x4e3ad9(0x114)),0x1;const _0x33584d=await withProgressSpinner('Resolving\x20workspace\x20\x27'+_0x4d3ace+_0x4e3ad9(0x10e),()=>_0x53040c[_0x4e3ad9(0x136)][_0x4e3ad9(0x123)](_0x4d3ace),{'verbose':_0x1d55d3[_0x4e3ad9(0x12d)]}),_0x3970a2=_0x33584d[_0x4e3ad9(0x129)],_0x22738b=await withProgressSpinner(_0x4e3ad9(0x133)+_0x4d3ace+_0x4e3ad9(0x10e),_0x6dc421=>pushAlwaysOnCampaigns(_0x140d0b,_0x3970a2,{'engage':_0x53040c[_0x4e3ad9(0x136)],'segment':_0x53040c[_0x4e3ad9(0x128)]},{'dryRun':_0x1d55d3[_0x4e3ad9(0x120)],'progress':{'update':_0x5aee36=>{const _0x257e3b=_0x4e3ad9;_0x6dc421[_0x257e3b(0x124)](_0x5aee36);}}}),{'verbose':_0x1d55d3['verbose']}),_0xe04eea=_0x22738b['data'];if(_0xe04eea[_0x4e3ad9(0x119)][_0x4e3ad9(0x116)]>0x0){console['error'](a22_0x3c54ce['red'](_0x4e3ad9(0x10d)));for(const _0x23d485 of _0xe04eea[_0x4e3ad9(0x119)]){console[_0x4e3ad9(0x115)]('\x20\x20'+a22_0x3c54ce['red']('✗')+'\x20'+_0x23d485['name']+':\x20'+_0x23d485[_0x4e3ad9(0x115)]);}}console['error']('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0x4d3ace+'\x27:'),console['error']('\x20\x20'+a22_0x3c54ce[_0x4e3ad9(0x12f)]('+\x20'+_0xe04eea[_0x4e3ad9(0x11b)]+_0x4e3ad9(0x135))),console[_0x4e3ad9(0x115)]('\x20\x20'+a22_0x3c54ce[_0x4e3ad9(0x13c)]('~\x20'+_0xe04eea[_0x4e3ad9(0x13d)]+_0x4e3ad9(0x130))),console['error']('\x20\x20'+a22_0x3c54ce[_0x4e3ad9(0x13a)]('=\x20'+_0xe04eea[_0x4e3ad9(0x10b)]+_0x4e3ad9(0x121)));if(_0x1d55d3[_0x4e3ad9(0x120)])return console[_0x4e3ad9(0x115)](a22_0x3c54ce['yellow'](_0x4e3ad9(0x11d))),0x0;if(_0xe04eea[_0x4e3ad9(0x11b)]===0x0&&_0xe04eea[_0x4e3ad9(0x13d)]===0x0)return console[_0x4e3ad9(0x115)](a22_0x3c54ce['green'](_0x4e3ad9(0x134))),saveSessionContext({'engage_workspace':_0x4d3ace},_0x1d55d3[_0x4e3ad9(0x12a)]),_0xe04eea[_0x4e3ad9(0x119)]['length']>0x0?0x1:0x0;return console[_0x4e3ad9(0x115)](a22_0x3c54ce['green']('✔\x20Pushed\x20'+(_0xe04eea[_0x4e3ad9(0x11b)]+_0xe04eea['updated'])+_0x4e3ad9(0x127))),saveSessionContext({'engage_workspace':_0x4d3ace},_0x1d55d3[_0x4e3ad9(0x12a)]),console[_0x4e3ad9(0x115)](a22_0x3c54ce['green'](_0x4e3ad9(0x13b)+a22_0x3c54ce[_0x4e3ad9(0x13a)](_0x4e3ad9(0x140))+'\x20=\x20'+a22_0x3c54ce[_0x4e3ad9(0x141)](_0x4d3ace))),_0xe04eea[_0x4e3ad9(0x119)][_0x4e3ad9(0x116)]>0x0?0x1:0x0;}}async function resolveWorkspaceName(_0x59217a,_0x58847a){const _0x419d1d=a22_0x5c6ad3;if(_0x59217a&&!_0x59217a[_0x419d1d(0x111)](a22_0x39d9f4[_0x419d1d(0x10a)])&&!_0x59217a[_0x419d1d(0x10f)](_0x419d1d(0x142)))return _0x59217a;if(_0x58847a[_0x419d1d(0x11c)])return _0x58847a[_0x419d1d(0x11c)];const _0x55acf9=_0x59217a&&(_0x59217a[_0x419d1d(0x111)](a22_0x39d9f4[_0x419d1d(0x10a)])||_0x59217a[_0x419d1d(0x10f)](_0x419d1d(0x142)))?a22_0x39d9f4[_0x419d1d(0x13f)](_0x59217a):process[_0x419d1d(0x11f)](),_0x55ba0c=tryFindTdxConfig(_0x55acf9);if(_0x55ba0c?.[_0x419d1d(0x138)]['engage_workspace'])return _0x55ba0c[_0x419d1d(0x138)][_0x419d1d(0x140)];const _0x4818e8=loadSessionContext(_0x58847a[_0x419d1d(0x12a)]);if(_0x4818e8?.[_0x419d1d(0x140)])return _0x4818e8[_0x419d1d(0x140)];return undefined;}
1
+ const a23_0x319fa2=a23_0x3669;(function(_0x44b33f,_0x11c382){const _0x5de1b3=a23_0x3669,_0x461369=_0x44b33f();while(!![]){try{const _0x1846db=-parseInt(_0x5de1b3(0x215))/0x1+parseInt(_0x5de1b3(0x200))/0x2*(-parseInt(_0x5de1b3(0x1fa))/0x3)+-parseInt(_0x5de1b3(0x1f8))/0x4+-parseInt(_0x5de1b3(0x214))/0x5*(parseInt(_0x5de1b3(0x203))/0x6)+parseInt(_0x5de1b3(0x1fd))/0x7*(parseInt(_0x5de1b3(0x210))/0x8)+parseInt(_0x5de1b3(0x20f))/0x9*(-parseInt(_0x5de1b3(0x20e))/0xa)+parseInt(_0x5de1b3(0x20c))/0xb*(parseInt(_0x5de1b3(0x1f1))/0xc);if(_0x1846db===_0x11c382)break;else _0x461369['push'](_0x461369['shift']());}catch(_0x32e9ce){_0x461369['push'](_0x461369['shift']());}}}(a23_0x1709,0xaf051));import{BaseCommand}from'./command.js';function a23_0x1709(){const _0x488924=['\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','\x20=\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20push\x20--workspace\x20<name>','dim','resolveWorkspaceId','name','cyan','\x27...','red','updated','config','segment','green','52196316ecwirQ','\x20campaign(s)\x20updated','workspace','data','session','cwd','yellow','4136160VHuBYB','execute','9virWrB','engage_workspace','errors','7728826lOrFqD','endsWith','description','926996byrmEL','sep','includes','3006LxqHQW','engage','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','resolve','\x20campaign(s)\x20created','engage:always-on-campaign:push','length','\x0aPush\x20summary\x20for\x20workspace\x20\x27','dryRun','11FCNMQQ','verbose','490sTqKMl','28818ZEsuXr','8yYzkEz','✔\x20Pushed\x20','\x0aErrors:','.yaml','9455XEinwx','1208107QCxHew','error','created','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20always-on\x20campaigns'];a23_0x1709=function(){return _0x488924;};return a23_0x1709();}import{withProgressSpinner}from'../utils/spinner.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a23_0x457dad from'chalk';function a23_0x3669(_0xa2a165,_0x519b51){_0xa2a165=_0xa2a165-0x1e4;const _0x170973=a23_0x1709();let _0x366990=_0x170973[_0xa2a165];return _0x366990;}import a23_0x44d3aa from'path';import{pushAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-push.js';export class EngageAlwaysOnCampaignPushCommand extends BaseCommand{[a23_0x319fa2(0x1e9)]=a23_0x319fa2(0x208);[a23_0x319fa2(0x1ff)]=a23_0x319fa2(0x218);async[a23_0x319fa2(0x1f9)](_0x517507){const _0x50998f=a23_0x319fa2,{options:_0xdbdf2d,args:_0x48bb0e,tdx:_0xf0f112}=_0x517507,_0x3a1d8e=_0xdbdf2d,_0x484d5d=_0x48bb0e[0x0],_0x5d1936=_0x484d5d?a23_0x44d3aa[_0x50998f(0x206)](_0x484d5d):process[_0x50998f(0x1f6)](),_0xf5dace=await resolveWorkspaceName(_0x484d5d,_0x3a1d8e);if(!_0xf5dace)return console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f7)]('Workspace\x20is\x20required.')),console[_0x50998f(0x216)]('\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20push\x20<dir-or-file>'),console[_0x50998f(0x216)](_0x50998f(0x1e6)),console[_0x50998f(0x216)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;const _0x3a1a83=await withProgressSpinner('Resolving\x20workspace\x20\x27'+_0xf5dace+_0x50998f(0x1eb),()=>_0xf0f112[_0x50998f(0x204)][_0x50998f(0x1e8)](_0xf5dace),{'verbose':_0x3a1d8e[_0x50998f(0x20d)]}),_0x79d8e6=_0x3a1a83[_0x50998f(0x1f4)],_0x8d6849=await withProgressSpinner('Pushing\x20always-on\x20campaigns\x20to\x20\x27'+_0xf5dace+'\x27...',_0x561dd1=>pushAlwaysOnCampaigns(_0x5d1936,_0x79d8e6,{'engage':_0xf0f112[_0x50998f(0x204)],'segment':_0xf0f112[_0x50998f(0x1ef)]},{'dryRun':_0x3a1d8e[_0x50998f(0x20b)],'progress':{'update':_0x2ee822=>{_0x561dd1['setPhase'](_0x2ee822);}}}),{'verbose':_0x3a1d8e[_0x50998f(0x20d)]}),_0x349fa9=_0x8d6849[_0x50998f(0x1f4)];if(_0x349fa9[_0x50998f(0x1fc)]['length']>0x0){console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1ec)](_0x50998f(0x212)));for(const _0x5d095a of _0x349fa9[_0x50998f(0x1fc)]){console[_0x50998f(0x216)]('\x20\x20'+a23_0x457dad[_0x50998f(0x1ec)]('✗')+'\x20'+_0x5d095a[_0x50998f(0x1e9)]+':\x20'+_0x5d095a['error']);}}console[_0x50998f(0x216)](_0x50998f(0x20a)+_0xf5dace+'\x27:'),console[_0x50998f(0x216)]('\x20\x20'+a23_0x457dad[_0x50998f(0x1f0)]('+\x20'+_0x349fa9[_0x50998f(0x217)]+_0x50998f(0x207))),console[_0x50998f(0x216)]('\x20\x20'+a23_0x457dad[_0x50998f(0x1f7)]('~\x20'+_0x349fa9['updated']+_0x50998f(0x1f2))),console['error']('\x20\x20'+a23_0x457dad[_0x50998f(0x1e7)]('=\x20'+_0x349fa9['unchanged']+'\x20campaign(s)\x20unchanged'));if(_0x3a1d8e[_0x50998f(0x20b)])return console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f7)](_0x50998f(0x1e4))),0x0;if(_0x349fa9['created']===0x0&&_0x349fa9['updated']===0x0)return console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f0)](_0x50998f(0x205))),saveSessionContext({'engage_workspace':_0xf5dace},_0x3a1d8e[_0x50998f(0x1f5)]),_0x349fa9[_0x50998f(0x1fc)][_0x50998f(0x209)]>0x0?0x1:0x0;return console['error'](a23_0x457dad['green'](_0x50998f(0x211)+(_0x349fa9[_0x50998f(0x217)]+_0x349fa9[_0x50998f(0x1ed)])+'\x20always-on\x20campaign(s)')),saveSessionContext({'engage_workspace':_0xf5dace},_0x3a1d8e[_0x50998f(0x1f5)]),console[_0x50998f(0x216)](a23_0x457dad[_0x50998f(0x1f0)]('✔\x20Context\x20set:\x20'+a23_0x457dad[_0x50998f(0x1e7)](_0x50998f(0x1fb))+_0x50998f(0x1e5)+a23_0x457dad[_0x50998f(0x1ea)](_0xf5dace))),_0x349fa9[_0x50998f(0x1fc)][_0x50998f(0x209)]>0x0?0x1:0x0;}}async function resolveWorkspaceName(_0x1e853b,_0x2ad59f){const _0x2645f2=a23_0x319fa2;if(_0x1e853b&&!_0x1e853b[_0x2645f2(0x202)](a23_0x44d3aa[_0x2645f2(0x201)])&&!_0x1e853b[_0x2645f2(0x1fe)](_0x2645f2(0x213)))return _0x1e853b;if(_0x2ad59f[_0x2645f2(0x1f3)])return _0x2ad59f[_0x2645f2(0x1f3)];const _0x1fe4af=_0x1e853b&&(_0x1e853b['includes'](a23_0x44d3aa['sep'])||_0x1e853b['endsWith'](_0x2645f2(0x213)))?a23_0x44d3aa[_0x2645f2(0x206)](_0x1e853b):process[_0x2645f2(0x1f6)](),_0x19bff6=tryFindTdxConfig(_0x1fe4af);if(_0x19bff6?.['config'][_0x2645f2(0x1fb)])return _0x19bff6[_0x2645f2(0x1ee)][_0x2645f2(0x1fb)];const _0x29441b=loadSessionContext(_0x2ad59f[_0x2645f2(0x1f5)]);if(_0x29441b?.[_0x2645f2(0x1fb)])return _0x29441b[_0x2645f2(0x1fb)];return undefined;}
@@ -1 +1 @@
1
- const a23_0x4e5b3d=a23_0x2483;(function(_0x19ffe5,_0x18f4e1){const _0x3c0648=a23_0x2483,_0x143bd8=_0x19ffe5();while(!![]){try{const _0x4eeadd=parseInt(_0x3c0648(0x197))/0x1+parseInt(_0x3c0648(0x18c))/0x2+parseInt(_0x3c0648(0x187))/0x3+-parseInt(_0x3c0648(0x19a))/0x4*(parseInt(_0x3c0648(0x1a1))/0x5)+-parseInt(_0x3c0648(0x19c))/0x6+parseInt(_0x3c0648(0x199))/0x7+-parseInt(_0x3c0648(0x19e))/0x8*(parseInt(_0x3c0648(0x1a0))/0x9);if(_0x4eeadd===_0x18f4e1)break;else _0x143bd8['push'](_0x143bd8['shift']());}catch(_0x39ba2f){_0x143bd8['push'](_0x143bd8['shift']());}}}(a23_0x3050,0xa2c55));import{BaseCommand}from'./command.js';function a23_0x2483(_0x5bf2e4,_0x324a8a){_0x5bf2e4=_0x5bf2e4-0x186;const _0x3050ae=a23_0x3050();let _0x24834d=_0x3050ae[_0x5bf2e4];return _0x24834d;}function a23_0x3050(){const _0x210961=['file','1128917FXgsJR','Validation\x20complete:\x20','4780139KGzXXV','12FgOwxl','\x20\x20[','1772610ADUJqe','\x20\x20[WARNING]\x20','7029928oJVMju','warnings','27nwNQlp','38585YsitUD','errors','type','green','name','map','warn','No\x20YAML\x20files\x20found','length','details','\x20error(s)','2939130flbnzN','utf-8','bold','execute','yellow','1660028HEOWiu','Validate\x20always-on\x20campaign\x20YAML\x20files','error','red','path','forEach','Failed\x20to\x20parse','message','push','valid'];a23_0x3050=function(){return _0x210961;};return a23_0x3050();}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{readFileSync}from'fs';import a23_0x20b7b1 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{[a23_0x4e5b3d(0x1a5)]='EngageAlwaysOnCampaignValidate';['description']=a23_0x4e5b3d(0x18d);async[a23_0x4e5b3d(0x18a)](_0x681efd){const _0x1d9d69=a23_0x4e5b3d,{options:_0x37923b,args:_0x638d7d}=_0x681efd,_0xeba46d=_0x638d7d[0x0]||'.',_0x440b76=_0x37923b['verbose']??![],_0x23ec13=await findYamlFiles(_0xeba46d);if(_0x23ec13[_0x1d9d69(0x1a9)]===0x0)return console['error'](a23_0x20b7b1['yellow'](_0x1d9d69(0x1a8))),0x0;let _0x25608a=0x0,_0x235b02=0x0;const _0x1a3c83=[];for(const _0x45a34f of _0x23ec13){try{const _0x27afb1=readFileSync(_0x45a34f,_0x1d9d69(0x188)),_0x36e490=parseYamlString(_0x27afb1);if(_0x36e490[_0x1d9d69(0x1a3)]!=='always_on_campaign')continue;const _0x351565=validateAlwaysOnCampaignDef(_0x36e490);if(_0x351565[_0x1d9d69(0x195)])_0x25608a++,_0x440b76&&console['log'](a23_0x20b7b1['green']('✓\x20'+_0x45a34f));else{_0x235b02++;const _0x34e799=_0x351565[_0x1d9d69(0x1a2)][_0x1d9d69(0x1a6)](_0x578afd=>_0x1d9d69(0x19b)+_0x578afd['code']+']\x20'+_0x578afd[_0x1d9d69(0x190)]+':\x20'+_0x578afd[_0x1d9d69(0x193)]);_0x1a3c83['push']({'file':_0x45a34f,'message':_0x351565['errors'][_0x1d9d69(0x1a9)]+_0x1d9d69(0x186),'details':_0x34e799}),console[_0x1d9d69(0x18e)](a23_0x20b7b1['red']('✗\x20'+_0x45a34f+':\x20'+_0x351565['errors'][_0x1d9d69(0x1a9)]+_0x1d9d69(0x186)));}_0x351565['warnings'][_0x1d9d69(0x1a9)]>0x0&&_0x351565[_0x1d9d69(0x19f)]['forEach'](_0x45a666=>{const _0x1ab95e=_0x1d9d69;console[_0x1ab95e(0x1a7)](a23_0x20b7b1[_0x1ab95e(0x18b)](_0x1ab95e(0x19d)+_0x45a666['path']+':\x20'+_0x45a666['message']));});}catch(_0x222ada){_0x235b02++;const _0x36a36a=_0x222ada instanceof Error?_0x222ada[_0x1d9d69(0x193)]:String(_0x222ada);_0x1a3c83[_0x1d9d69(0x194)]({'file':_0x45a34f,'message':_0x1d9d69(0x192),'details':[_0x36a36a]}),console[_0x1d9d69(0x18e)](a23_0x20b7b1[_0x1d9d69(0x18f)]('✗\x20'+_0x45a34f+':\x20'+_0x36a36a));}}return console['error'](''),console[_0x1d9d69(0x18e)](a23_0x20b7b1[_0x1d9d69(0x189)](_0x1d9d69(0x198)+a23_0x20b7b1[_0x1d9d69(0x1a4)](_0x25608a)+'\x20valid,\x20'+a23_0x20b7b1[_0x1d9d69(0x18f)](_0x235b02)+'\x20invalid')),_0x1a3c83[_0x1d9d69(0x1a9)]>0x0&&_0x440b76&&(console[_0x1d9d69(0x18e)](''),_0x1a3c83[_0x1d9d69(0x191)](_0x5aeee5=>{const _0x1d0249=_0x1d9d69;console[_0x1d0249(0x18e)](a23_0x20b7b1[_0x1d0249(0x18f)](_0x5aeee5[_0x1d0249(0x196)]+':')),_0x5aeee5[_0x1d0249(0x1aa)]['forEach'](_0x4a2f18=>console[_0x1d0249(0x18e)](_0x4a2f18));})),_0x235b02>0x0?0x1:0x0;}}
1
+ const a24_0x4b10c1=a24_0x225d;(function(_0x211cd8,_0x15fbe5){const _0x5ae5b2=a24_0x225d,_0x48a104=_0x211cd8();while(!![]){try{const _0x545172=-parseInt(_0x5ae5b2(0x15d))/0x1+-parseInt(_0x5ae5b2(0x15f))/0x2*(parseInt(_0x5ae5b2(0x181))/0x3)+-parseInt(_0x5ae5b2(0x174))/0x4+parseInt(_0x5ae5b2(0x17e))/0x5*(parseInt(_0x5ae5b2(0x177))/0x6)+parseInt(_0x5ae5b2(0x180))/0x7*(-parseInt(_0x5ae5b2(0x17c))/0x8)+-parseInt(_0x5ae5b2(0x16a))/0x9*(-parseInt(_0x5ae5b2(0x168))/0xa)+-parseInt(_0x5ae5b2(0x171))/0xb*(-parseInt(_0x5ae5b2(0x184))/0xc);if(_0x545172===_0x15fbe5)break;else _0x48a104['push'](_0x48a104['shift']());}catch(_0x1b0d57){_0x48a104['push'](_0x48a104['shift']());}}}(a24_0x548d,0x5e92b));import{BaseCommand}from'./command.js';function a24_0x225d(_0x1f49e6,_0x574c67){_0x1f49e6=_0x1f49e6-0x15a;const _0x548d98=a24_0x548d();let _0x225d55=_0x548d98[_0x1f49e6];return _0x225d55;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{readFileSync}from'fs';function a24_0x548d(){const _0x455a69=['Validate\x20always-on\x20campaign\x20YAML\x20files','\x20invalid','warn','code','bold','warnings','utf-8','860OOOzxG','length','53478cYGniM','file','message','yellow','\x20\x20[','Failed\x20to\x20parse','\x20error(s)','11LgMNEP','error','green','2128592rZOsts','valid','red','531282OTxVhS','forEach','path','description','map','2218088yegjfQ','EngageAlwaysOnCampaignValidate','20dTLyfm','always_on_campaign','14YhuTcu','3966hPBTMB','No\x20YAML\x20files\x20found','type','10018668ThIkIv','execute','log','Validation\x20complete:\x20','9240gDhaHh','errors','328wTEpNg','push'];a24_0x548d=function(){return _0x455a69;};return a24_0x548d();}import a24_0x253b27 from'chalk';import{validateAlwaysOnCampaignDef}from'../sdk/engage/always-on-campaign-validator.js';import{parseYamlString}from'../sdk/engage/always-on-campaign-yaml.js';export class EngageAlwaysOnCampaignValidateCommand extends BaseCommand{['name']=a24_0x4b10c1(0x17d);[a24_0x4b10c1(0x17a)]=a24_0x4b10c1(0x161);async[a24_0x4b10c1(0x15a)](_0x2efe82){const _0x8055fc=a24_0x4b10c1,{options:_0x3e269c,args:_0x65d0d3}=_0x2efe82,_0x293911=_0x65d0d3[0x0]||'.',_0x2631fd=_0x3e269c['verbose']??![],_0x15fb03=await findYamlFiles(_0x293911);if(_0x15fb03[_0x8055fc(0x169)]===0x0)return console[_0x8055fc(0x172)](a24_0x253b27[_0x8055fc(0x16d)](_0x8055fc(0x182))),0x0;let _0x555a65=0x0,_0x1eb24a=0x0;const _0x598e7c=[];for(const _0x417738 of _0x15fb03){try{const _0xf2c37a=readFileSync(_0x417738,_0x8055fc(0x167)),_0xac4846=parseYamlString(_0xf2c37a);if(_0xac4846[_0x8055fc(0x183)]!==_0x8055fc(0x17f))continue;const _0x2f65f3=validateAlwaysOnCampaignDef(_0xac4846);if(_0x2f65f3[_0x8055fc(0x175)])_0x555a65++,_0x2631fd&&console[_0x8055fc(0x15b)](a24_0x253b27[_0x8055fc(0x173)]('✓\x20'+_0x417738));else{_0x1eb24a++;const _0x108464=_0x2f65f3['errors'][_0x8055fc(0x17b)](_0x145ee7=>_0x8055fc(0x16e)+_0x145ee7[_0x8055fc(0x164)]+']\x20'+_0x145ee7[_0x8055fc(0x179)]+':\x20'+_0x145ee7[_0x8055fc(0x16c)]);_0x598e7c['push']({'file':_0x417738,'message':_0x2f65f3[_0x8055fc(0x15e)][_0x8055fc(0x169)]+_0x8055fc(0x170),'details':_0x108464}),console['error'](a24_0x253b27['red']('✗\x20'+_0x417738+':\x20'+_0x2f65f3['errors'][_0x8055fc(0x169)]+'\x20error(s)'));}_0x2f65f3[_0x8055fc(0x166)][_0x8055fc(0x169)]>0x0&&_0x2f65f3[_0x8055fc(0x166)][_0x8055fc(0x178)](_0x102e06=>{const _0x2a186e=_0x8055fc;console[_0x2a186e(0x163)](a24_0x253b27[_0x2a186e(0x16d)]('\x20\x20[WARNING]\x20'+_0x102e06[_0x2a186e(0x179)]+':\x20'+_0x102e06['message']));});}catch(_0x1a6af7){_0x1eb24a++;const _0x55e9a8=_0x1a6af7 instanceof Error?_0x1a6af7[_0x8055fc(0x16c)]:String(_0x1a6af7);_0x598e7c[_0x8055fc(0x160)]({'file':_0x417738,'message':_0x8055fc(0x16f),'details':[_0x55e9a8]}),console[_0x8055fc(0x172)](a24_0x253b27[_0x8055fc(0x176)]('✗\x20'+_0x417738+':\x20'+_0x55e9a8));}}return console[_0x8055fc(0x172)](''),console[_0x8055fc(0x172)](a24_0x253b27[_0x8055fc(0x165)](_0x8055fc(0x15c)+a24_0x253b27[_0x8055fc(0x173)](_0x555a65)+'\x20valid,\x20'+a24_0x253b27['red'](_0x1eb24a)+_0x8055fc(0x162))),_0x598e7c['length']>0x0&&_0x2631fd&&(console['error'](''),_0x598e7c[_0x8055fc(0x178)](_0x5cdf93=>{const _0x207fb4=_0x8055fc;console[_0x207fb4(0x172)](a24_0x253b27['red'](_0x5cdf93[_0x207fb4(0x16b)]+':')),_0x5cdf93['details']['forEach'](_0x2d8ab0=>console[_0x207fb4(0x172)](_0x2d8ab0));})),_0x1eb24a>0x0?0x1:0x0;}}
@@ -1 +1 @@
1
- const a24_0x250a48=a24_0x3ba6;(function(_0x4e714e,_0x2e0976){const _0x310740=a24_0x3ba6,_0x2cdba6=_0x4e714e();while(!![]){try{const _0x1eeeff=parseInt(_0x310740(0xb4))/0x1*(-parseInt(_0x310740(0xb3))/0x2)+parseInt(_0x310740(0xbc))/0x3*(parseInt(_0x310740(0xa9))/0x4)+-parseInt(_0x310740(0xc8))/0x5*(-parseInt(_0x310740(0xa6))/0x6)+-parseInt(_0x310740(0xae))/0x7+parseInt(_0x310740(0xa5))/0x8+parseInt(_0x310740(0xca))/0x9+-parseInt(_0x310740(0xbd))/0xa*(parseInt(_0x310740(0xc1))/0xb);if(_0x1eeeff===_0x2e0976)break;else _0x2cdba6['push'](_0x2cdba6['shift']());}catch(_0x377021){_0x2cdba6['push'](_0x2cdba6['shift']());}}}(a24_0x270c,0xc5d29));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a24_0x3ba6(_0x492b28,_0x13ae76){_0x492b28=_0x492b28-0x95;const _0x270ca7=a24_0x270c();let _0x3ba6a6=_0x270ca7[_0x492b28];return _0x3ba6a6;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';function a24_0x270c(){const _0x574647=['\x20\x20Target:\x20','counts','7826217rrNVLc','verbose','type','hasChanges','✔\x20Pulled\x20','176MXSteL','6271UOIxWE','\x0aChanges\x20to\x20\x27','\x0aError:','Write\x20','\x20=\x20','session','\x20files\x20to\x20','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','1002LZiRpY','13220KRmwUu','length','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','\x27...','8129XTOBoC','segment','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','workspace','filter','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','cwd','35WMWFCf','yellow','7166367QFSXMa','\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>','diff','Workspace\x20is\x20required.','✔\x20Context\x20set:\x20','campaigns','targetDir','relativePath','Aborted.','\x20unchanged\x20files','isNew','cyan','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','repeat','error','green','files','Pull\x20campaigns\x20to\x20YAML\x20files','config','\x20campaigns','name','content','engage','data','\x0aPull\x20summary\x20for\x20workspace\x20\x27','workspaceName','engage_workspace','dim','absolutePath','8822976xpDmjy','509766WOuYWa','red','dirname','11536VrnbYQ','setPhase','No\x20campaigns\x20found\x20in\x20workspace\x20\x27'];a24_0x270c=function(){return _0x574647;};return a24_0x270c();}import a24_0x41384b from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a24_0x8ce300 from'path';import{pullCampaigns}from'../sdk/engage/campaign-pull.js';export class EngageCampaignPullCommand extends BaseCommand{[a24_0x250a48(0x9c)]='engage:campaign:pull';['description']=a24_0x250a48(0x99);async['execute'](_0x1cc3f2){const _0x26eb2b=a24_0x250a48,{options:_0x2ed454,args:_0x2c3002,tdx:_0x1a4e40}=_0x1cc3f2,_0x5f5507=_0x2ed454,_0x50356c=await resolveWorkspaceName(_0x2c3002[0x0],_0x5f5507);if(!_0x50356c)return console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0xc9)](_0x26eb2b(0xcd))),console[_0x26eb2b(0x96)](_0x26eb2b(0xcb)),console[_0x26eb2b(0x96)](_0x26eb2b(0xbf)),console[_0x26eb2b(0x96)](_0x26eb2b(0xc3)),0x1;const _0x49ef92=await withProgressSpinner('Pulling\x20campaigns\x20from\x20\x27'+_0x50356c+_0x26eb2b(0xc0),_0x13da2b=>pullCampaigns({'engage':_0x1a4e40[_0x26eb2b(0x9e)],'segment':_0x1a4e40[_0x26eb2b(0xc2)]},_0x50356c,{'campaignName':_0x5f5507[_0x26eb2b(0x9c)],'campaignType':_0x5f5507[_0x26eb2b(0xb0)],'progress':{'update':_0x528571=>{const _0xe6e7c6=_0x26eb2b;_0x13da2b[_0xe6e7c6(0xaa)](_0x528571);}}}),{'verbose':_0x5f5507[_0x26eb2b(0xaf)]}),_0x4fc43e=_0x49ef92[_0x26eb2b(0x9f)];if(_0x4fc43e[_0x26eb2b(0xad)][_0x26eb2b(0xcf)]===0x0)return console['error'](a24_0x41384b[_0x26eb2b(0xc9)](_0x26eb2b(0xab)+_0x4fc43e['workspaceName']+'\x27')),0x0;const _0x596760=_0x4fc43e[_0x26eb2b(0x98)]['filter'](_0x4e7277=>_0x4e7277['isNew']),_0x41f703=_0x4fc43e[_0x26eb2b(0x98)][_0x26eb2b(0xc5)](_0x3b7d19=>!_0x3b7d19[_0x26eb2b(0xd4)]&&_0x3b7d19['hasChanges']),_0x382815=_0x4fc43e['files']['filter'](_0x2cf4f9=>!_0x2cf4f9[_0x26eb2b(0xd4)]&&!_0x2cf4f9[_0x26eb2b(0xb1)]);console[_0x26eb2b(0x96)](_0x26eb2b(0xa0)+_0x4fc43e[_0x26eb2b(0xa1)]+'\x27:'),console[_0x26eb2b(0x96)]('\x20\x20'+a24_0x41384b[_0x26eb2b(0xd5)](_0x4fc43e[_0x26eb2b(0xad)][_0x26eb2b(0xcf)]+_0x26eb2b(0x9b))),console[_0x26eb2b(0x96)]('\x20\x20'+a24_0x41384b[_0x26eb2b(0x97)]('+\x20'+_0x596760[_0x26eb2b(0xbe)]+'\x20new\x20files')),console[_0x26eb2b(0x96)]('\x20\x20'+a24_0x41384b['yellow']('~\x20'+_0x41f703['length']+'\x20changed\x20files')),console[_0x26eb2b(0x96)]('\x20\x20'+a24_0x41384b['dim']('=\x20'+_0x382815[_0x26eb2b(0xbe)]+_0x26eb2b(0xd3))),console['error'](_0x26eb2b(0xac)+a24_0x41384b['cyan'](_0x4fc43e[_0x26eb2b(0xd0)])+'\x0a');if(_0x41f703[_0x26eb2b(0xbe)]>0x0)for(const _0x1b2681 of _0x41f703){console[_0x26eb2b(0x96)](_0x26eb2b(0xb5)+_0x1b2681[_0x26eb2b(0xd1)]+'\x27:'),console['error']('\u2500'[_0x26eb2b(0x95)](0x3c)),console['error'](_0x1b2681[_0x26eb2b(0xcc)]),console[_0x26eb2b(0x96)]('\u2500'[_0x26eb2b(0x95)](0x3c));}if(_0x5f5507['dryRun'])return console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0xc9)](_0x26eb2b(0xbb))),0x0;if(_0x596760[_0x26eb2b(0xbe)]===0x0&&_0x41f703[_0x26eb2b(0xbe)]===0x0)return console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0x97)]('\u2714\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'engage_workspace':_0x4fc43e['workspaceName']},_0x5f5507[_0x26eb2b(0xb9)]),0x0;if(!_0x5f5507['yes']){if(!isInteractive())return console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0xa7)](_0x26eb2b(0xb6)),_0x26eb2b(0xc6)),console['error'](a24_0x41384b[_0x26eb2b(0xa3)](_0x26eb2b(0xd6))),0x1;const _0x2ea70c=await confirmKey(_0x26eb2b(0xb7)+(_0x596760[_0x26eb2b(0xbe)]+_0x41f703['length'])+'\x20files?');if(!_0x2ea70c)return console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0xc9)](_0x26eb2b(0xd2)),'-\x20no\x20files\x20written'),0x1;}for(const _0x4defa3 of _0x4fc43e[_0x26eb2b(0x98)]){if(_0x4defa3[_0x26eb2b(0xd4)]||_0x4defa3[_0x26eb2b(0xb1)]){const _0x1257fb=a24_0x8ce300[_0x26eb2b(0xa8)](_0x4defa3['absolutePath']);!existsSync(_0x1257fb)&&mkdirSync(_0x1257fb,{'recursive':!![]}),writeFileSync(_0x4defa3[_0x26eb2b(0xa4)],_0x4defa3[_0x26eb2b(0x9d)],'utf-8');}}return console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0x97)](_0x26eb2b(0xb2)+(_0x596760[_0x26eb2b(0xbe)]+_0x41f703[_0x26eb2b(0xbe)])+_0x26eb2b(0xba)+_0x4fc43e['targetDir'])),saveSessionContext({'engage_workspace':_0x4fc43e[_0x26eb2b(0xa1)]},_0x5f5507['session']),console[_0x26eb2b(0x96)](a24_0x41384b[_0x26eb2b(0x97)](_0x26eb2b(0xce)+a24_0x41384b['dim']('engage_workspace')+_0x26eb2b(0xb8)+a24_0x41384b['cyan'](_0x4fc43e[_0x26eb2b(0xa1)]))),0x0;}}async function resolveWorkspaceName(_0x3b4601,_0x3707c){const _0x1bc08c=a24_0x250a48;if(_0x3b4601)return _0x3b4601;if(_0x3707c[_0x1bc08c(0xc4)])return _0x3707c[_0x1bc08c(0xc4)];const _0xd115b9=tryFindTdxConfig(process[_0x1bc08c(0xc7)]());if(_0xd115b9?.[_0x1bc08c(0x9a)][_0x1bc08c(0xa2)])return _0xd115b9[_0x1bc08c(0x9a)][_0x1bc08c(0xa2)];const _0x12925f=loadSessionContext(_0x3707c['session']);if(_0x12925f?.['engage_workspace'])return _0x12925f[_0x1bc08c(0xa2)];return undefined;}
1
+ const a25_0xaca583=a25_0x59bc;(function(_0x3463f9,_0x4bdb23){const _0x496157=a25_0x59bc,_0x2b2841=_0x3463f9();while(!![]){try{const _0x1ca3fc=parseInt(_0x496157(0xdf))/0x1*(parseInt(_0x496157(0xce))/0x2)+parseInt(_0x496157(0xae))/0x3*(parseInt(_0x496157(0x9b))/0x4)+-parseInt(_0x496157(0x9f))/0x5+-parseInt(_0x496157(0xa9))/0x6*(parseInt(_0x496157(0xc9))/0x7)+parseInt(_0x496157(0xb0))/0x8*(parseInt(_0x496157(0xb6))/0x9)+parseInt(_0x496157(0xe0))/0xa*(parseInt(_0x496157(0xc7))/0xb)+-parseInt(_0x496157(0xb3))/0xc;if(_0x1ca3fc===_0x4bdb23)break;else _0x2b2841['push'](_0x2b2841['shift']());}catch(_0x2413f5){_0x2b2841['push'](_0x2b2841['shift']());}}}(a25_0x54bb,0xa7d9d));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a25_0x1532c4 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a25_0x5c2c15 from'path';function a25_0x54bb(){const _0x9bef80=['diff','error','27xacZKo','72070zWDbbn','files','setPhase','284EWepmW','name','\x20=\x20','cwd','3310385qWnWza','green','\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>','type','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','Pulling\x20campaigns\x20from\x20\x27','engage:campaign:pull','repeat','\x20files\x20to\x20','✔\x20Pulled\x20','6QDDxZD','\x20new\x20files','data','\x0aChanges\x20to\x20\x27','No\x20campaigns\x20found\x20in\x20workspace\x20\x27','2883mdOoEH','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','5056RpBkrU','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','\x27...','4903980wIQPmM','\x20unchanged\x20files','campaigns','15903wkkLsu','verbose','hasChanges','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','\x20files?','Workspace\x20is\x20required.','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','segment','✔\x20Context\x20set:\x20','session','dim','yellow','dirname','\x0aError:','description','filter','counts','605xbMOct','\x20\x20Target:\x20','1159361RIltYu','Write\x20','config','engage_workspace','red','25372TejHHR','workspaceName','cyan','targetDir','\x20campaigns','dryRun','length','✔\x20All\x20files\x20are\x20up\x20to\x20date','\x0aPull\x20summary\x20for\x20workspace\x20\x27','Pull\x20campaigns\x20to\x20YAML\x20files','-\x20no\x20files\x20written','isNew','workspace','absolutePath','yes'];a25_0x54bb=function(){return _0x9bef80;};return a25_0x54bb();}import{pullCampaigns}from'../sdk/engage/campaign-pull.js';function a25_0x59bc(_0x1224fe,_0x59df34){_0x1224fe=_0x1224fe-0x9b;const _0x54bb40=a25_0x54bb();let _0x59bc02=_0x54bb40[_0x1224fe];return _0x59bc02;}export class EngageCampaignPullCommand extends BaseCommand{[a25_0xaca583(0x9c)]=a25_0xaca583(0xa5);[a25_0xaca583(0xc4)]=a25_0xaca583(0xd7);async['execute'](_0x183714){const _0x572d7c=a25_0xaca583,{options:_0x1bd344,args:_0xddceb3,tdx:_0x3b0e56}=_0x183714,_0x32c17d=_0x1bd344,_0x3b1469=await resolveWorkspaceName(_0xddceb3[0x0],_0x32c17d);if(!_0x3b1469)return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc1)](_0x572d7c(0xbb))),console[_0x572d7c(0xde)](_0x572d7c(0xa1)),console['error'](_0x572d7c(0xb9)),console[_0x572d7c(0xde)](_0x572d7c(0xb1)),0x1;const _0x22aa34=await withProgressSpinner(_0x572d7c(0xa4)+_0x3b1469+_0x572d7c(0xb2),_0x4cb469=>pullCampaigns({'engage':_0x3b0e56['engage'],'segment':_0x3b0e56[_0x572d7c(0xbd)]},_0x3b1469,{'campaignName':_0x32c17d[_0x572d7c(0x9c)],'campaignType':_0x32c17d[_0x572d7c(0xa2)],'progress':{'update':_0x346368=>{const _0x50a3cf=_0x572d7c;_0x4cb469[_0x50a3cf(0xe2)](_0x346368);}}}),{'verbose':_0x32c17d[_0x572d7c(0xb7)]}),_0x252d8a=_0x22aa34[_0x572d7c(0xab)];if(_0x252d8a[_0x572d7c(0xc6)][_0x572d7c(0xb5)]===0x0)return console[_0x572d7c(0xde)](a25_0x1532c4['yellow'](_0x572d7c(0xad)+_0x252d8a[_0x572d7c(0xcf)]+'\x27')),0x0;const _0x335f80=_0x252d8a[_0x572d7c(0xe1)][_0x572d7c(0xc5)](_0x53d0e0=>_0x53d0e0[_0x572d7c(0xd9)]),_0x8f7839=_0x252d8a[_0x572d7c(0xe1)][_0x572d7c(0xc5)](_0x1f9461=>!_0x1f9461['isNew']&&_0x1f9461[_0x572d7c(0xb8)]),_0x3a5edd=_0x252d8a[_0x572d7c(0xe1)][_0x572d7c(0xc5)](_0x277b94=>!_0x277b94[_0x572d7c(0xd9)]&&!_0x277b94[_0x572d7c(0xb8)]);console[_0x572d7c(0xde)](_0x572d7c(0xd6)+_0x252d8a[_0x572d7c(0xcf)]+'\x27:'),console['error']('\x20\x20'+a25_0x1532c4[_0x572d7c(0xd0)](_0x252d8a[_0x572d7c(0xc6)][_0x572d7c(0xb5)]+_0x572d7c(0xd2))),console[_0x572d7c(0xde)]('\x20\x20'+a25_0x1532c4[_0x572d7c(0xa0)]('+\x20'+_0x335f80[_0x572d7c(0xd4)]+_0x572d7c(0xaa))),console[_0x572d7c(0xde)]('\x20\x20'+a25_0x1532c4[_0x572d7c(0xc1)]('~\x20'+_0x8f7839[_0x572d7c(0xd4)]+'\x20changed\x20files')),console['error']('\x20\x20'+a25_0x1532c4[_0x572d7c(0xc0)]('=\x20'+_0x3a5edd[_0x572d7c(0xd4)]+_0x572d7c(0xb4))),console[_0x572d7c(0xde)](_0x572d7c(0xc8)+a25_0x1532c4[_0x572d7c(0xd0)](_0x252d8a[_0x572d7c(0xd1)])+'\x0a');if(_0x8f7839['length']>0x0)for(const _0x153b15 of _0x8f7839){console[_0x572d7c(0xde)](_0x572d7c(0xac)+_0x153b15['relativePath']+'\x27:'),console[_0x572d7c(0xde)]('\u2500'[_0x572d7c(0xa6)](0x3c)),console[_0x572d7c(0xde)](_0x153b15[_0x572d7c(0xdd)]),console['error']('\u2500'[_0x572d7c(0xa6)](0x3c));}if(_0x32c17d[_0x572d7c(0xd3)])return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc1)](_0x572d7c(0xa3))),0x0;if(_0x335f80[_0x572d7c(0xd4)]===0x0&&_0x8f7839['length']===0x0)return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xa0)](_0x572d7c(0xd5))),saveSessionContext({'engage_workspace':_0x252d8a[_0x572d7c(0xcf)]},_0x32c17d[_0x572d7c(0xbf)]),0x0;if(!_0x32c17d[_0x572d7c(0xdc)]){if(!isInteractive())return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xcd)](_0x572d7c(0xc3)),_0x572d7c(0xaf)),console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc0)](_0x572d7c(0xbc))),0x1;const _0x35d844=await confirmKey(_0x572d7c(0xca)+(_0x335f80[_0x572d7c(0xd4)]+_0x8f7839[_0x572d7c(0xd4)])+_0x572d7c(0xba));if(!_0x35d844)return console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xc1)]('Aborted.'),_0x572d7c(0xd8)),0x1;}for(const _0x141906 of _0x252d8a[_0x572d7c(0xe1)]){if(_0x141906[_0x572d7c(0xd9)]||_0x141906[_0x572d7c(0xb8)]){const _0x4d5923=a25_0x5c2c15[_0x572d7c(0xc2)](_0x141906[_0x572d7c(0xdb)]);!existsSync(_0x4d5923)&&mkdirSync(_0x4d5923,{'recursive':!![]}),writeFileSync(_0x141906[_0x572d7c(0xdb)],_0x141906['content'],'utf-8');}}return console['error'](a25_0x1532c4['green'](_0x572d7c(0xa8)+(_0x335f80['length']+_0x8f7839['length'])+_0x572d7c(0xa7)+_0x252d8a[_0x572d7c(0xd1)])),saveSessionContext({'engage_workspace':_0x252d8a[_0x572d7c(0xcf)]},_0x32c17d[_0x572d7c(0xbf)]),console[_0x572d7c(0xde)](a25_0x1532c4[_0x572d7c(0xa0)](_0x572d7c(0xbe)+a25_0x1532c4[_0x572d7c(0xc0)](_0x572d7c(0xcc))+_0x572d7c(0x9d)+a25_0x1532c4['cyan'](_0x252d8a[_0x572d7c(0xcf)]))),0x0;}}async function resolveWorkspaceName(_0x36548a,_0x42c693){const _0x3acc1d=a25_0xaca583;if(_0x36548a)return _0x36548a;if(_0x42c693['workspace'])return _0x42c693[_0x3acc1d(0xda)];const _0x508a5e=tryFindTdxConfig(process[_0x3acc1d(0x9e)]());if(_0x508a5e?.[_0x3acc1d(0xcb)][_0x3acc1d(0xcc)])return _0x508a5e['config'][_0x3acc1d(0xcc)];const _0x15d4ec=loadSessionContext(_0x42c693[_0x3acc1d(0xbf)]);if(_0x15d4ec?.[_0x3acc1d(0xcc)])return _0x15d4ec['engage_workspace'];return undefined;}
@@ -1 +1 @@
1
- const a25_0x408bfb=a25_0x48ea;(function(_0x3cd534,_0xa79eb){const _0x32f452=a25_0x48ea,_0xfaf3b7=_0x3cd534();while(!![]){try{const _0x3d3fb2=parseInt(_0x32f452(0x100))/0x1+parseInt(_0x32f452(0x11a))/0x2+-parseInt(_0x32f452(0xfe))/0x3+-parseInt(_0x32f452(0xfb))/0x4*(-parseInt(_0x32f452(0xf8))/0x5)+-parseInt(_0x32f452(0xf6))/0x6*(parseInt(_0x32f452(0x116))/0x7)+parseInt(_0x32f452(0xe8))/0x8*(parseInt(_0x32f452(0x108))/0x9)+-parseInt(_0x32f452(0x129))/0xa;if(_0x3d3fb2===_0xa79eb)break;else _0xfaf3b7['push'](_0xfaf3b7['shift']());}catch(_0x348a40){_0xfaf3b7['push'](_0xfaf3b7['shift']());}}}(a25_0x5c17,0x7c50c));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a25_0x5a8da2 from'chalk';import a25_0x4c3a5a from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';import{validateCampaignDef}from'../sdk/engage/campaign-validator.js';function a25_0x5c17(){const _0x2675f6=['resolve','length','create','workspace','status','error','config','campaignType','10027160rbQiGC','\x0aError:','Error:\x20Invalid\x20campaign\x20type\x20\x22','data','cyan','campaign_type','\x0aListCampaign\x20push\x20summary\x20for\x20workspace\x20\x27','campaign','\x20campaigns\x20to\x20update:','description','campaignId','verbose','def','created','\x20new\x20campaigns:','engage','warnings','Push\x20','dim','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','dirname','\x20new\x20ListCampaigns:','filter','\x20campaigns?','setPhase','75464RCxfna','\x20campaign\x20files','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','input','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','Applying\x20ListCampaign\x20changes...','\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)','errors','\x0aPush\x20summary\x20for\x20workspace\x20\x27','\x20\x20\x20\x20','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','action','\x0aValidation\x20errors\x20in\x20','segment','413514DgxlZk','pushListCampaignFiles','13430xqfyFf','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','\x20errors:','1204uDuyPJ','list-campaign','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','1733538sTUfgb','site','739640YpyCUC','session','red','yellow','map','update','\x20campaigns','updated','477fCbtME','green','-\x20no\x20changes\x20applied','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','✔\x20Updated\x20','Use\x20-y\x20or\x20--yes\x20to\x20apply\x20the\x20ListCampaign\x20draft\x20changes','\x0aUsage:\x20tdx\x20engage\x20campaign\x20push\x20<file.yaml>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20single\x20file','applyListCampaignPushes','dryRun','relativePath','message','prepareListCampaignPushes','engage_workspace','resolveWorkspaceId','56aACHUD','Preparing\x20push\x20to\x20workspace\x20\x27','Aborted.','cwd','1186070uAMegZ','✔\x20Created\x20','engage:campaign:push','path','execute','\x20ListCampaign\x20draft','name'];a25_0x5c17=function(){return _0x2675f6;};return a25_0x5c17();}import{discoverListCampaignFiles}from'../sdk/engage/list-campaign-yaml.js';import{getCampaignUrl}from'../sdk/client/endpoints.js';function a25_0x48ea(_0x5ccbd9,_0x5eaf01){_0x5ccbd9=_0x5ccbd9-0xd5;const _0x5c1783=a25_0x5c17();let _0x48ea9c=_0x5c1783[_0x5ccbd9];return _0x48ea9c;}import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{[a25_0x408bfb(0x120)]=a25_0x408bfb(0x11c);[a25_0x408bfb(0xd7)]=a25_0x408bfb(0xea);async[a25_0x408bfb(0x11e)](_0x19d6cb){const _0x521a59=a25_0x408bfb,{options:_0x3f2280,args:_0x1404b7,tdx:_0x175d96}=_0x19d6cb,_0x562d9b=_0x3f2280,_0xbe6a5e=_0x1404b7[0x0],_0x588b88=_0xbe6a5e?a25_0x4c3a5a[_0x521a59(0x121)](_0xbe6a5e):undefined,_0x6bdaef=_0x588b88?isYamlFile(_0x588b88):![];let _0xe8f0a4;if(_0x6bdaef&&_0x588b88)_0xe8f0a4=a25_0x4c3a5a[_0x521a59(0xe3)](_0x588b88);else _0x588b88?_0xe8f0a4=_0x588b88:_0xe8f0a4=process[_0x521a59(0x119)]();let _0x5ef401;const _0x350243=tryFindTdxConfig(_0xe8f0a4);_0x350243?.['config']['engage_workspace']&&(_0x5ef401=_0x350243[_0x521a59(0x127)][_0x521a59(0x114)],!_0x6bdaef&&(_0xe8f0a4=_0x350243['configDir']));_0x562d9b[_0x521a59(0x124)]&&(_0x5ef401=_0x562d9b[_0x521a59(0x124)]);if(!_0x5ef401){const _0x50247e=loadSessionContext(_0x562d9b[_0x521a59(0x101)]);_0x50247e?.[_0x521a59(0x114)]&&(_0x5ef401=_0x50247e[_0x521a59(0x114)]);}if(!_0x5ef401)return console['error'](a25_0x5a8da2[_0x521a59(0x103)]('Workspace\x20is\x20required.')),console['error'](_0x521a59(0x10e)),console[_0x521a59(0x126)](_0x521a59(0xee)),console[_0x521a59(0x126)]('\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['error'](_0x521a59(0xec)),0x1;const _0x1d4bbf=_0x562d9b[_0x521a59(0x128)]??_0x521a59(0xd5);if(_0x1d4bbf===_0x521a59(0xfc))return await this[_0x521a59(0xf7)](_0x19d6cb,_0x5ef401,_0xe8f0a4,_0x588b88,_0x6bdaef);if(_0x1d4bbf!==_0x521a59(0xd5))return console[_0x521a59(0x126)](_0x521a59(0x12b)+_0x1d4bbf+_0x521a59(0xe1)),0x1;let _0xe67aa1;_0x6bdaef&&_0x588b88?_0xe67aa1=[_0x588b88]:_0xe67aa1=discoverCampaignFiles(_0xe8f0a4);if(_0xe67aa1[_0x521a59(0x122)]===0x0)return console['error'](a25_0x5a8da2['yellow']('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0xe8f0a4)),console[_0x521a59(0x126)](a25_0x5a8da2[_0x521a59(0xe0)](_0x521a59(0xf2))),0x1;const _0x1955d4=_0xe67aa1[_0x521a59(0x104)](_0x25f0a5=>parseCampaignFile(_0x25f0a5,a25_0x4c3a5a[_0x521a59(0xe3)](_0x25f0a5))),_0x47b65a=_0x1955d4[_0x521a59(0x122)]===0x1?'1\x20campaign\x20file:\x20'+_0x1955d4[0x0]['def'][_0x521a59(0x120)]:_0x1955d4[_0x521a59(0x122)]+_0x521a59(0xe9);console['error']('Found\x20'+a25_0x5a8da2[_0x521a59(0x12d)](_0x47b65a));let _0x2af661=![];for(const _0x310a93 of _0x1955d4){const _0x1fe625=validateCampaignDef(_0x310a93[_0x521a59(0xda)]);if(!_0x1fe625['valid']){_0x2af661=!![],console[_0x521a59(0x126)](a25_0x5a8da2[_0x521a59(0x102)](_0x521a59(0xf4)+_0x310a93[_0x521a59(0x111)]+':'));for(const _0x3d88e3 of _0x1fe625[_0x521a59(0xef)]){console[_0x521a59(0x126)]('\x20\x20'+a25_0x5a8da2[_0x521a59(0x102)]('✗')+'\x20'+_0x3d88e3[_0x521a59(0x11d)]+':\x20'+_0x3d88e3[_0x521a59(0x112)]);}}for(const _0x1d8be1 of _0x1fe625[_0x521a59(0xde)]){console[_0x521a59(0x126)]('\x20\x20'+a25_0x5a8da2[_0x521a59(0x103)]('⚠')+'\x20'+_0x1d8be1[_0x521a59(0x11d)]+':\x20'+_0x1d8be1[_0x521a59(0x112)]);}}if(_0x2af661)return console['error'](a25_0x5a8da2[_0x521a59(0x102)](_0x521a59(0xfd))),0x1;const _0x1a76c1=await _0x175d96['engage'][_0x521a59(0x115)](_0x5ef401),_0x52b3bb=await withProgressSpinner(_0x521a59(0x117)+_0x5ef401+'\x27...',_0x267408=>preparePush({'engage':_0x175d96[_0x521a59(0xdd)],'segment':_0x175d96[_0x521a59(0xf5)]},_0x1955d4,_0x1a76c1,{'progress':{'update':_0x278811=>_0x267408['setPhase'](_0x278811)}}),{'verbose':_0x562d9b[_0x521a59(0xd9)]}),_0x5af9d9=_0x52b3bb['data'];await withProgressSpinner('Resolving\x20references...',_0x4fdcfc=>resolveAndBuildInputs({'engage':_0x175d96[_0x521a59(0xdd)],'segment':_0x175d96['segment']},_0x5af9d9,_0x1a76c1,{'progress':{'update':_0xb6376d=>_0x4fdcfc[_0x521a59(0xe7)](_0xb6376d)}}),{'verbose':_0x562d9b['verbose']});const _0x1deba3=_0x5af9d9[_0x521a59(0xe5)](_0x818d0=>_0x818d0[_0x521a59(0xf3)]===_0x521a59(0x123)),_0x313dfc=_0x5af9d9[_0x521a59(0xe5)](_0x4e9fd6=>_0x4e9fd6[_0x521a59(0xf3)]===_0x521a59(0x105));console[_0x521a59(0x126)](_0x521a59(0xf0)+_0x5ef401+'\x27:');if(_0x1deba3[_0x521a59(0x122)]>0x0){console[_0x521a59(0x126)]('\x20\x20'+a25_0x5a8da2[_0x521a59(0x109)]('+\x20'+_0x1deba3[_0x521a59(0x122)]+_0x521a59(0xdc)));for(const _0xc45e12 of _0x1deba3){console[_0x521a59(0x126)]('\x20\x20\x20\x20'+a25_0x5a8da2[_0x521a59(0x109)]('+')+'\x20'+_0xc45e12[_0x521a59(0xda)][_0x521a59(0x120)]+'\x20('+_0xc45e12[_0x521a59(0xda)][_0x521a59(0x12e)]+')');}}if(_0x313dfc[_0x521a59(0x122)]>0x0){console[_0x521a59(0x126)]('\x20\x20'+a25_0x5a8da2[_0x521a59(0x103)]('~\x20'+_0x313dfc[_0x521a59(0x122)]+_0x521a59(0xd6)));for(const _0x50168d of _0x313dfc){console[_0x521a59(0x126)](_0x521a59(0xf1)+a25_0x5a8da2[_0x521a59(0x103)]('~')+'\x20'+_0x50168d[_0x521a59(0xda)][_0x521a59(0x120)]+'\x20('+_0x50168d['def'][_0x521a59(0x12e)]+')');}}if(_0x1deba3['length']===0x0&&_0x313dfc[_0x521a59(0x122)]===0x0)return console[_0x521a59(0x126)](a25_0x5a8da2[_0x521a59(0x109)](_0x521a59(0x10b))),0x0;if(_0x562d9b[_0x521a59(0x110)])return console[_0x521a59(0x126)](a25_0x5a8da2[_0x521a59(0x103)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(!_0x562d9b['yes']){if(!isInteractive())return console['error'](a25_0x5a8da2[_0x521a59(0x102)](_0x521a59(0x12a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a25_0x5a8da2[_0x521a59(0xe0)](_0x521a59(0xe2))),0x1;const _0x54501f=await confirmKey('Push\x20'+(_0x1deba3[_0x521a59(0x122)]+_0x313dfc[_0x521a59(0x122)])+_0x521a59(0xe6));if(!_0x54501f)return console['error'](a25_0x5a8da2[_0x521a59(0x103)](_0x521a59(0x118)),_0x521a59(0x10a)),0x1;}const _0x268468=await withProgressSpinner('Pushing\x20campaigns...',_0x3afab3=>executePush({'engage':_0x175d96[_0x521a59(0xdd)],'segment':_0x175d96[_0x521a59(0xf5)]},_0x5af9d9,{'progress':{'update':_0x32ae33=>_0x3afab3[_0x521a59(0xe7)](_0x32ae33)}}),{'verbose':_0x562d9b['verbose']}),_0x54e069=_0x268468['data'];for(const _0x9e19ee of _0x54e069['results']){if(_0x9e19ee[_0x521a59(0xd8)]&&(_0x9e19ee[_0x521a59(0xf3)]===_0x521a59(0xdb)||_0x9e19ee[_0x521a59(0xf3)]==='updated')){const _0x392358=getCampaignUrl(_0x562d9b[_0x521a59(0xff)],_0x1a76c1,_0x9e19ee[_0x521a59(0xd8)]),_0x1b65ff=_0x9e19ee[_0x521a59(0xf3)]===_0x521a59(0xdb)?'+':'~',_0x28a41a=_0x9e19ee[_0x521a59(0xf3)]===_0x521a59(0xdb)?a25_0x5a8da2['green'](_0x1b65ff):a25_0x5a8da2['yellow'](_0x1b65ff);console[_0x521a59(0x126)]('\x20\x20'+_0x28a41a+'\x20'+hyperlink(_0x9e19ee['name'],_0x392358)+'\x20'+a25_0x5a8da2[_0x521a59(0xe0)](_0x392358));}}_0x54e069[_0x521a59(0xdb)]>0x0&&console[_0x521a59(0x126)](a25_0x5a8da2[_0x521a59(0x109)](_0x521a59(0x11b)+_0x54e069['created']+_0x521a59(0x106)));_0x54e069[_0x521a59(0x107)]>0x0&&console['error'](a25_0x5a8da2['green'](_0x521a59(0x10c)+_0x54e069[_0x521a59(0x107)]+_0x521a59(0x106)));if(_0x54e069[_0x521a59(0xef)][_0x521a59(0x122)]>0x0){console[_0x521a59(0x126)](a25_0x5a8da2[_0x521a59(0x102)]('✘\x20'+_0x54e069[_0x521a59(0xef)][_0x521a59(0x122)]+_0x521a59(0xfa)));for(const _0x48f9f0 of _0x54e069[_0x521a59(0xef)]){console[_0x521a59(0x126)]('\x20\x20'+a25_0x5a8da2['red'](_0x48f9f0[_0x521a59(0x120)])+':\x20'+_0x48f9f0[_0x521a59(0x126)]);}}return saveSessionContext({'engage_workspace':_0x5ef401},_0x562d9b[_0x521a59(0x101)]),_0x54e069[_0x521a59(0xef)][_0x521a59(0x122)]>0x0?0x1:0x0;}async[a25_0x408bfb(0xf7)](_0x38da9f,_0x3c28fd,_0x40f1ce,_0x29426b,_0x33260e){const _0x2096a5=a25_0x408bfb,{options:_0x402baf,tdx:_0x4ce406}=_0x38da9f,_0x4d07b5=_0x402baf,_0x3bfcfb=_0x33260e&&_0x29426b?[_0x29426b]:discoverListCampaignFiles(_0x40f1ce);if(_0x3bfcfb['length']===0x0)return console[_0x2096a5(0x126)](a25_0x5a8da2[_0x2096a5(0x103)](_0x2096a5(0xf9)+_0x40f1ce)),console[_0x2096a5(0x126)](a25_0x5a8da2[_0x2096a5(0xe0)]('ListCampaign\x20files\x20must\x20have\x20type:\x20list_campaign.')),0x1;const _0x4689ca=await _0x4ce406['engage'][_0x2096a5(0x115)](_0x3c28fd),_0x33efe1=await withProgressSpinner('Preparing\x20ListCampaign\x20push...',()=>_0x4ce406[_0x2096a5(0xdd)][_0x2096a5(0x113)](_0x4689ca,_0x3bfcfb),{'verbose':_0x402baf['verbose']}),_0x253987=_0x33efe1[_0x2096a5(0x12c)],_0x5918b5=_0x253987[_0x2096a5(0xe5)](_0x549448=>_0x549448[_0x2096a5(0xf3)]===_0x2096a5(0x123)),_0x471ecf=_0x253987[_0x2096a5(0xe5)](_0x4beb75=>_0x4beb75[_0x2096a5(0xf3)]===_0x2096a5(0x105));console['error'](_0x2096a5(0x12f)+_0x3c28fd+'\x27:');if(_0x5918b5[_0x2096a5(0x122)]>0x0){console['error']('\x20\x20'+a25_0x5a8da2[_0x2096a5(0x109)]('+\x20'+_0x5918b5[_0x2096a5(0x122)]+_0x2096a5(0xe4)));for(const _0x51cf16 of _0x5918b5)console[_0x2096a5(0x126)]('\x20\x20\x20\x20'+a25_0x5a8da2['green']('+')+'\x20'+_0x51cf16[_0x2096a5(0xeb)]['name']);}if(_0x471ecf['length']>0x0){console['error']('\x20\x20'+a25_0x5a8da2[_0x2096a5(0x103)]('~\x20'+_0x471ecf[_0x2096a5(0x122)]+'\x20DRAFT\x20ListCampaigns\x20to\x20update:'));for(const _0x5812d6 of _0x471ecf)console[_0x2096a5(0x126)](_0x2096a5(0xf1)+a25_0x5a8da2[_0x2096a5(0x103)]('~')+'\x20'+_0x5812d6[_0x2096a5(0xeb)][_0x2096a5(0x120)]);}if(_0x4d07b5['dryRun'])return console[_0x2096a5(0x126)](a25_0x5a8da2[_0x2096a5(0x103)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied')),0x0;if(!_0x4d07b5['yes']){if(!isInteractive())return console[_0x2096a5(0x126)](a25_0x5a8da2[_0x2096a5(0x102)]('\x0aError:\x20Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode')),console[_0x2096a5(0x126)](a25_0x5a8da2[_0x2096a5(0xe0)](_0x2096a5(0x10d))),0x1;const _0x3f723c=await confirmKey(_0x2096a5(0xdf)+_0x253987['length']+_0x2096a5(0x11f)+(_0x253987[_0x2096a5(0x122)]===0x1?'':'s')+'?');if(!_0x3f723c)return console['error'](a25_0x5a8da2[_0x2096a5(0x103)]('Aborted.'),'-\x20no\x20changes\x20applied'),0x1;}const _0x12a155=await withProgressSpinner(_0x2096a5(0xed),()=>_0x4ce406[_0x2096a5(0xdd)][_0x2096a5(0x10f)](_0x253987),{'verbose':_0x402baf['verbose']});for(const _0x2d75a4 of _0x12a155[_0x2096a5(0x12c)]){const _0x321867=_0x2d75a4['action']===_0x2096a5(0xdb)?a25_0x5a8da2[_0x2096a5(0x109)]('+'):a25_0x5a8da2['yellow']('~');console[_0x2096a5(0x126)]('\x20\x20'+_0x321867+'\x20'+_0x2d75a4['campaign'][_0x2096a5(0x120)]+'\x20('+_0x2d75a4[_0x2096a5(0xd5)][_0x2096a5(0x125)]+')');}return saveSessionContext({'engage_workspace':_0x3c28fd},_0x402baf[_0x2096a5(0x101)]),0x0;}}
1
+ const a26_0x26c3c3=a26_0x37a2;(function(_0x450f0c,_0x295a31){const _0x1cfc98=a26_0x37a2,_0x15c7c0=_0x450f0c();while(!![]){try{const _0x267a08=parseInt(_0x1cfc98(0x81))/0x1+-parseInt(_0x1cfc98(0x74))/0x2*(-parseInt(_0x1cfc98(0xa6))/0x3)+parseInt(_0x1cfc98(0xaa))/0x4+parseInt(_0x1cfc98(0xb5))/0x5*(-parseInt(_0x1cfc98(0x80))/0x6)+parseInt(_0x1cfc98(0x8a))/0x7+-parseInt(_0x1cfc98(0x7d))/0x8*(-parseInt(_0x1cfc98(0xc3))/0x9)+-parseInt(_0x1cfc98(0x87))/0xa;if(_0x267a08===_0x295a31)break;else _0x15c7c0['push'](_0x15c7c0['shift']());}catch(_0x9dd63){_0x15c7c0['push'](_0x15c7c0['shift']());}}}(a26_0x3020,0x65eff));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';function a26_0x3020(){const _0x3b9a23=['✔\x20Updated\x20','dirname','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','green','5652YeDIIu','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','yes','engage','workspace','applyListCampaignPushes','✔\x20Created\x20','created','create','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','execute','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','engage_workspace','resolve','setPhase','Found\x20','232012jTbZJY','\x20new\x20ListCampaigns:','status','filter','\x0aError:\x20Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20(requires\x20tdx.json)','name','results','1704EYSLhr','dryRun','\x20campaigns\x20to\x20update:','1035732EspKKV','533904YeAxak','campaign','\x0aListCampaign\x20push\x20summary\x20for\x20workspace\x20\x27','Error:\x20Invalid\x20campaign\x20type\x20\x22','\x20campaigns?','campaign_type','13055480mobMBv','Resolving\x20references...','Use\x20-y\x20or\x20--yes\x20to\x20apply\x20the\x20ListCampaign\x20draft\x20changes','2980145GjnSHu','message','engage:campaign:push','\x20\x20\x20\x20','path','yellow','ListCampaign\x20files\x20must\x20have\x20type:\x20list_campaign.','verbose','Pushing\x20campaigns...','dim','data','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','action','\x0aPush\x20summary\x20for\x20workspace\x20\x27','\x0aValidation\x20errors\x20in\x20','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','Applying\x20ListCampaign\x20changes...','\x20campaign\x20files','pushListCampaignFiles','cyan','map','warnings','\x27...','def','configDir','update','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','\x20ListCampaign\x20draft','18FEaolI','updated','\x20campaigns','-\x20no\x20changes\x20applied','1115552fIoTFE','site','campaignType','Aborted.','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','red','length','resolveWorkspaceId','description','Push\x20','input','10yPGQMs','prepareListCampaignPushes','campaignId','error','Preparing\x20push\x20to\x20workspace\x20\x27','Workspace\x20is\x20required.','config','session','errors','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns'];a26_0x3020=function(){return _0x3b9a23;};return a26_0x3020();}import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';function a26_0x37a2(_0x462998,_0xd84254){_0x462998=_0x462998-0x6c;const _0x302085=a26_0x3020();let _0x37a232=_0x302085[_0x462998];return _0x37a232;}import{isYamlFile}from'../sdk/segment/file-discovery.js';import a26_0x41292d from'chalk';import a26_0x3cf4d0 from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';import{validateCampaignDef}from'../sdk/engage/campaign-validator.js';import{discoverListCampaignFiles}from'../sdk/engage/list-campaign-yaml.js';import{getCampaignUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{['name']=a26_0x26c3c3(0x8c);[a26_0x26c3c3(0xb2)]=a26_0x26c3c3(0xbe);async[a26_0x26c3c3(0x6e)](_0x4e9242){const _0x5d389b=a26_0x26c3c3,{options:_0x13396b,args:_0x327515,tdx:_0x5f450c}=_0x4e9242,_0x1e25de=_0x13396b,_0x402942=_0x327515[0x0],_0x150a7e=_0x402942?a26_0x3cf4d0[_0x5d389b(0x71)](_0x402942):undefined,_0x1ee217=_0x150a7e?isYamlFile(_0x150a7e):![];let _0x591f40;if(_0x1ee217&&_0x150a7e)_0x591f40=a26_0x3cf4d0['dirname'](_0x150a7e);else _0x150a7e?_0x591f40=_0x150a7e:_0x591f40=process['cwd']();let _0x372f64;const _0x11f8b4=tryFindTdxConfig(_0x591f40);_0x11f8b4?.[_0x5d389b(0xbb)][_0x5d389b(0x70)]&&(_0x372f64=_0x11f8b4[_0x5d389b(0xbb)]['engage_workspace'],!_0x1ee217&&(_0x591f40=_0x11f8b4[_0x5d389b(0xa2)]));_0x1e25de['workspace']&&(_0x372f64=_0x1e25de[_0x5d389b(0xc7)]);if(!_0x372f64){const _0xfe07a8=loadSessionContext(_0x1e25de[_0x5d389b(0xbc)]);_0xfe07a8?.['engage_workspace']&&(_0x372f64=_0xfe07a8[_0x5d389b(0x70)]);}if(!_0x372f64)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0x8f)](_0x5d389b(0xba))),console[_0x5d389b(0xb8)]('\x0aUsage:\x20tdx\x20engage\x20campaign\x20push\x20<file.yaml>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20single\x20file'),console[_0x5d389b(0xb8)](_0x5d389b(0x7a)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20push\x20--workspace\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20with\x20explicit\x20workspace'),console[_0x5d389b(0xb8)](_0x5d389b(0xae)),0x1;const _0x38af5e=_0x1e25de[_0x5d389b(0xac)]??_0x5d389b(0x82);if(_0x38af5e==='list-campaign')return await this['pushListCampaignFiles'](_0x4e9242,_0x372f64,_0x591f40,_0x150a7e,_0x1ee217);if(_0x38af5e!==_0x5d389b(0x82))return console[_0x5d389b(0xb8)](_0x5d389b(0x84)+_0x38af5e+_0x5d389b(0xc1)),0x1;let _0x365350;_0x1ee217&&_0x150a7e?_0x365350=[_0x150a7e]:_0x365350=discoverCampaignFiles(_0x591f40);if(_0x365350[_0x5d389b(0xb0)]===0x0)return console['error'](a26_0x41292d[_0x5d389b(0x8f)](_0x5d389b(0x6c)+_0x591f40)),console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0x93)](_0x5d389b(0x6f))),0x1;const _0x1bf41c=_0x365350[_0x5d389b(0x9e)](_0x1d2434=>parseCampaignFile(_0x1d2434,a26_0x3cf4d0[_0x5d389b(0xc0)](_0x1d2434))),_0x55a55e=_0x1bf41c[_0x5d389b(0xb0)]===0x1?'1\x20campaign\x20file:\x20'+_0x1bf41c[0x0][_0x5d389b(0xa1)][_0x5d389b(0x7b)]:_0x1bf41c[_0x5d389b(0xb0)]+_0x5d389b(0x9b);console['error'](_0x5d389b(0x73)+a26_0x41292d[_0x5d389b(0x9d)](_0x55a55e));let _0x4c1f33=![];for(const _0x1a4852 of _0x1bf41c){const _0x49c838=validateCampaignDef(_0x1a4852[_0x5d389b(0xa1)]);if(!_0x49c838['valid']){_0x4c1f33=!![],console['error'](a26_0x41292d[_0x5d389b(0xaf)](_0x5d389b(0x98)+_0x1a4852['relativePath']+':'));for(const _0x11e77d of _0x49c838[_0x5d389b(0xbd)]){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d['red']('✗')+'\x20'+_0x11e77d[_0x5d389b(0x8e)]+':\x20'+_0x11e77d[_0x5d389b(0x8b)]);}}for(const _0x50b055 of _0x49c838[_0x5d389b(0x9f)]){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d['yellow']('⚠')+'\x20'+_0x50b055[_0x5d389b(0x8e)]+':\x20'+_0x50b055['message']);}}if(_0x4c1f33)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xaf)](_0x5d389b(0xc4))),0x1;const _0x297bb8=await _0x5f450c['engage'][_0x5d389b(0xb1)](_0x372f64),_0x477aae=await withProgressSpinner(_0x5d389b(0xb9)+_0x372f64+_0x5d389b(0xa0),_0x91cfd2=>preparePush({'engage':_0x5f450c[_0x5d389b(0xc6)],'segment':_0x5f450c[_0x5d389b(0x79)]},_0x1bf41c,_0x297bb8,{'progress':{'update':_0xb6f06b=>_0x91cfd2[_0x5d389b(0x72)](_0xb6f06b)}}),{'verbose':_0x1e25de[_0x5d389b(0x91)]}),_0x7bd696=_0x477aae[_0x5d389b(0x94)];await withProgressSpinner(_0x5d389b(0x88),_0x25d58a=>resolveAndBuildInputs({'engage':_0x5f450c['engage'],'segment':_0x5f450c[_0x5d389b(0x79)]},_0x7bd696,_0x297bb8,{'progress':{'update':_0x9f284f=>_0x25d58a[_0x5d389b(0x72)](_0x9f284f)}}),{'verbose':_0x1e25de[_0x5d389b(0x91)]});const _0x3e885d=_0x7bd696['filter'](_0x139cd5=>_0x139cd5['action']===_0x5d389b(0xcb)),_0x4096ac=_0x7bd696[_0x5d389b(0x77)](_0x227ac6=>_0x227ac6['action']===_0x5d389b(0xa3));console['error'](_0x5d389b(0x97)+_0x372f64+'\x27:');if(_0x3e885d[_0x5d389b(0xb0)]>0x0){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d[_0x5d389b(0xc2)]('+\x20'+_0x3e885d[_0x5d389b(0xb0)]+'\x20new\x20campaigns:'));for(const _0x43db5c of _0x3e885d){console[_0x5d389b(0xb8)](_0x5d389b(0x8d)+a26_0x41292d[_0x5d389b(0xc2)]('+')+'\x20'+_0x43db5c[_0x5d389b(0xa1)][_0x5d389b(0x7b)]+'\x20('+_0x43db5c[_0x5d389b(0xa1)][_0x5d389b(0x86)]+')');}}if(_0x4096ac[_0x5d389b(0xb0)]>0x0){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d[_0x5d389b(0x8f)]('~\x20'+_0x4096ac['length']+_0x5d389b(0x7f)));for(const _0x1888c4 of _0x4096ac){console[_0x5d389b(0xb8)](_0x5d389b(0x8d)+a26_0x41292d['yellow']('~')+'\x20'+_0x1888c4[_0x5d389b(0xa1)][_0x5d389b(0x7b)]+'\x20('+_0x1888c4['def'][_0x5d389b(0x86)]+')');}}if(_0x3e885d[_0x5d389b(0xb0)]===0x0&&_0x4096ac[_0x5d389b(0xb0)]===0x0)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xc2)](_0x5d389b(0xa4))),0x0;if(_0x1e25de[_0x5d389b(0x7e)])return console[_0x5d389b(0xb8)](a26_0x41292d['yellow'](_0x5d389b(0x99))),0x0;if(!_0x1e25de[_0x5d389b(0xc5)]){if(!isInteractive())return console[_0x5d389b(0xb8)](a26_0x41292d['red']('\x0aError:'),_0x5d389b(0x95)),console[_0x5d389b(0xb8)](a26_0x41292d['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1568eb=await confirmKey(_0x5d389b(0xb3)+(_0x3e885d[_0x5d389b(0xb0)]+_0x4096ac['length'])+_0x5d389b(0x85));if(!_0x1568eb)return console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0x8f)](_0x5d389b(0xad)),_0x5d389b(0xa9)),0x1;}const _0x1f6b97=await withProgressSpinner(_0x5d389b(0x92),_0x491130=>executePush({'engage':_0x5f450c[_0x5d389b(0xc6)],'segment':_0x5f450c[_0x5d389b(0x79)]},_0x7bd696,{'progress':{'update':_0x202e5e=>_0x491130['setPhase'](_0x202e5e)}}),{'verbose':_0x1e25de[_0x5d389b(0x91)]}),_0x5a0508=_0x1f6b97[_0x5d389b(0x94)];for(const _0x15691d of _0x5a0508[_0x5d389b(0x7c)]){if(_0x15691d[_0x5d389b(0xb7)]&&(_0x15691d[_0x5d389b(0x96)]===_0x5d389b(0xca)||_0x15691d[_0x5d389b(0x96)]===_0x5d389b(0xa7))){const _0x4a26da=getCampaignUrl(_0x1e25de[_0x5d389b(0xab)],_0x297bb8,_0x15691d['campaignId']),_0x498c29=_0x15691d['action']===_0x5d389b(0xca)?'+':'~',_0x49e8ba=_0x15691d['action']===_0x5d389b(0xca)?a26_0x41292d[_0x5d389b(0xc2)](_0x498c29):a26_0x41292d[_0x5d389b(0x8f)](_0x498c29);console[_0x5d389b(0xb8)]('\x20\x20'+_0x49e8ba+'\x20'+hyperlink(_0x15691d[_0x5d389b(0x7b)],_0x4a26da)+'\x20'+a26_0x41292d[_0x5d389b(0x93)](_0x4a26da));}}_0x5a0508[_0x5d389b(0xca)]>0x0&&console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xc2)](_0x5d389b(0xc9)+_0x5a0508[_0x5d389b(0xca)]+_0x5d389b(0xa8)));_0x5a0508[_0x5d389b(0xa7)]>0x0&&console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xc2)](_0x5d389b(0xbf)+_0x5a0508[_0x5d389b(0xa7)]+_0x5d389b(0xa8)));if(_0x5a0508[_0x5d389b(0xbd)]['length']>0x0){console[_0x5d389b(0xb8)](a26_0x41292d[_0x5d389b(0xaf)]('✘\x20'+_0x5a0508[_0x5d389b(0xbd)][_0x5d389b(0xb0)]+'\x20errors:'));for(const _0x45fea7 of _0x5a0508['errors']){console[_0x5d389b(0xb8)]('\x20\x20'+a26_0x41292d[_0x5d389b(0xaf)](_0x45fea7[_0x5d389b(0x7b)])+':\x20'+_0x45fea7[_0x5d389b(0xb8)]);}}return saveSessionContext({'engage_workspace':_0x372f64},_0x1e25de['session']),_0x5a0508['errors'][_0x5d389b(0xb0)]>0x0?0x1:0x0;}async[a26_0x26c3c3(0x9c)](_0x3c8c3a,_0xc2d916,_0x40d095,_0x324f8b,_0x1dcc8f){const _0x13fe0c=a26_0x26c3c3,{options:_0x310691,tdx:_0x3778f6}=_0x3c8c3a,_0x33182f=_0x310691,_0x4532e3=_0x1dcc8f&&_0x324f8b?[_0x324f8b]:discoverListCampaignFiles(_0x40d095);if(_0x4532e3[_0x13fe0c(0xb0)]===0x0)return console['error'](a26_0x41292d[_0x13fe0c(0x8f)](_0x13fe0c(0x6d)+_0x40d095)),console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0x93)](_0x13fe0c(0x90))),0x1;const _0x4137e6=await _0x3778f6[_0x13fe0c(0xc6)]['resolveWorkspaceId'](_0xc2d916),_0x4330c=await withProgressSpinner('Preparing\x20ListCampaign\x20push...',()=>_0x3778f6[_0x13fe0c(0xc6)][_0x13fe0c(0xb6)](_0x4137e6,_0x4532e3),{'verbose':_0x310691[_0x13fe0c(0x91)]}),_0x55f68a=_0x4330c[_0x13fe0c(0x94)],_0x1a920b=_0x55f68a['filter'](_0x28cdf9=>_0x28cdf9['action']===_0x13fe0c(0xcb)),_0x5b48c4=_0x55f68a[_0x13fe0c(0x77)](_0x6fa87b=>_0x6fa87b['action']===_0x13fe0c(0xa3));console[_0x13fe0c(0xb8)](_0x13fe0c(0x83)+_0xc2d916+'\x27:');if(_0x1a920b[_0x13fe0c(0xb0)]>0x0){console['error']('\x20\x20'+a26_0x41292d[_0x13fe0c(0xc2)]('+\x20'+_0x1a920b['length']+_0x13fe0c(0x75)));for(const _0x11220e of _0x1a920b)console[_0x13fe0c(0xb8)](_0x13fe0c(0x8d)+a26_0x41292d[_0x13fe0c(0xc2)]('+')+'\x20'+_0x11220e['input'][_0x13fe0c(0x7b)]);}if(_0x5b48c4[_0x13fe0c(0xb0)]>0x0){console[_0x13fe0c(0xb8)]('\x20\x20'+a26_0x41292d['yellow']('~\x20'+_0x5b48c4[_0x13fe0c(0xb0)]+'\x20DRAFT\x20ListCampaigns\x20to\x20update:'));for(const _0x1e858f of _0x5b48c4)console[_0x13fe0c(0xb8)]('\x20\x20\x20\x20'+a26_0x41292d[_0x13fe0c(0x8f)]('~')+'\x20'+_0x1e858f[_0x13fe0c(0xb4)][_0x13fe0c(0x7b)]);}if(_0x33182f[_0x13fe0c(0x7e)])return console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0x8f)](_0x13fe0c(0x99))),0x0;if(!_0x33182f[_0x13fe0c(0xc5)]){if(!isInteractive())return console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0xaf)](_0x13fe0c(0x78))),console['error'](a26_0x41292d[_0x13fe0c(0x93)](_0x13fe0c(0x89))),0x1;const _0x4d0b94=await confirmKey('Push\x20'+_0x55f68a[_0x13fe0c(0xb0)]+_0x13fe0c(0xa5)+(_0x55f68a[_0x13fe0c(0xb0)]===0x1?'':'s')+'?');if(!_0x4d0b94)return console[_0x13fe0c(0xb8)](a26_0x41292d[_0x13fe0c(0x8f)](_0x13fe0c(0xad)),_0x13fe0c(0xa9)),0x1;}const _0x2775d4=await withProgressSpinner(_0x13fe0c(0x9a),()=>_0x3778f6[_0x13fe0c(0xc6)][_0x13fe0c(0xc8)](_0x55f68a),{'verbose':_0x310691[_0x13fe0c(0x91)]});for(const _0x2193b8 of _0x2775d4[_0x13fe0c(0x94)]){const _0x2a8f8a=_0x2193b8[_0x13fe0c(0x96)]===_0x13fe0c(0xca)?a26_0x41292d[_0x13fe0c(0xc2)]('+'):a26_0x41292d[_0x13fe0c(0x8f)]('~');console[_0x13fe0c(0xb8)]('\x20\x20'+_0x2a8f8a+'\x20'+_0x2193b8['campaign'][_0x13fe0c(0x7b)]+'\x20('+_0x2193b8[_0x13fe0c(0x82)][_0x13fe0c(0x76)]+')');}return saveSessionContext({'engage_workspace':_0xc2d916},_0x310691[_0x13fe0c(0xbc)]),0x0;}}
@@ -1 +1 @@
1
- const a26_0x5071bb=a26_0x1a2d;(function(_0xe62dda,_0x1fc495){const _0x36a6db=a26_0x1a2d,_0x2daa5c=_0xe62dda();while(!![]){try{const _0x154e63=parseInt(_0x36a6db(0xdc))/0x1*(parseInt(_0x36a6db(0xb6))/0x2)+parseInt(_0x36a6db(0xbb))/0x3+parseInt(_0x36a6db(0xc5))/0x4+-parseInt(_0x36a6db(0xe0))/0x5+-parseInt(_0x36a6db(0xbf))/0x6*(parseInt(_0x36a6db(0xd8))/0x7)+-parseInt(_0x36a6db(0xd9))/0x8*(parseInt(_0x36a6db(0xce))/0x9)+parseInt(_0x36a6db(0xb7))/0xa;if(_0x154e63===_0x1fc495)break;else _0x2daa5c['push'](_0x2daa5c['shift']());}catch(_0x1d0841){_0x2daa5c['push'](_0x2daa5c['shift']());}}}(a26_0x3d4e,0x9046d));import a26_0x15b8c7 from'chalk';import{handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{BaseCommand}from'./command.js';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a26_0x3d4e(){const _0xd0eea=['message','108mJcldt','yellow','engage','campaignName','status','valid','\x20ready,\x20','ready','checks','summary','2492JmZVzs','580744ZfgCHW','delivery','skipReason','8QcWbCN','skipped','exitCode','log','2692945vZRRvo','dim','toUpperCase','273482eUhJDn','6028640obCxxs','Checking\x20campaign\x20readiness...','red','workspace','728784vNtgId','blocked','execute','\x20blocked,\x20','17148WyfwBJ','results','green','name','\x20(skipped:\x20','relativePath','4313560dhXIJb','validation','output','engage:campaign:readiness','verbose','source','\x20not\x20applicable','description'];a26_0x3d4e=function(){return _0xd0eea;};return a26_0x3d4e();}import{runCampaignReadiness,toStructuredCampaignReadinessReport}from'../sdk/engage/campaign-readiness-workflow.js';function a26_0x1a2d(_0x52080a,_0x3cbc09){_0x52080a=_0x52080a-0xb6;const _0x3d4edf=a26_0x3d4e();let _0x1a2dd1=_0x3d4edf[_0x52080a];return _0x1a2dd1;}import{withSpinner}from'../utils/spinner.js';export class EngageCampaignReadinessCommand extends BaseCommand{[a26_0x5071bb(0xc2)]=a26_0x5071bb(0xc8);[a26_0x5071bb(0xcc)]='Check\x20email\x20campaign\x20readiness\x20against\x20workspace\x20delivery\x20config';async[a26_0x5071bb(0xbd)](_0x4a95a4){const _0x4fecb4=a26_0x5071bb,{options:_0x12bd9c,args:_0x5b2cd3,tdx:_0x5ac689}=_0x4a95a4,_0x1d295e=_0x12bd9c,{data:_0x5209a7}=await withSpinner(_0x4fecb4(0xb8),()=>runCampaignReadiness({'engage':_0x5ac689[_0x4fecb4(0xd0)],'delivery':_0x5ac689[_0x4fecb4(0xda)]},{'target':_0x5b2cd3[0x0],'workspace':_0x1d295e[_0x4fecb4(0xba)],'session':_0x12bd9c['session']}),{'verbose':_0x12bd9c[_0x4fecb4(0xc9)]});if(isStructuredFormat(_0x12bd9c)||_0x12bd9c[_0x4fecb4(0xc7)]){const _0x2d1c65=toStructuredCampaignReadinessReport(_0x5209a7);return await handleSingleObjectOutput(_0x2d1c65,_0x12bd9c),_0x5209a7[_0x4fecb4(0xde)];}if(_0x5209a7[_0x4fecb4(0xcd)])console['log'](a26_0x15b8c7[_0x4fecb4(0xcf)](_0x5209a7[_0x4fecb4(0xcd)]));for(const _0x13ba4b of _0x5209a7[_0x4fecb4(0xc0)]){if(_0x13ba4b[_0x4fecb4(0xd2)]===_0x4fecb4(0xdd)){_0x12bd9c[_0x4fecb4(0xc9)]&&console[_0x4fecb4(0xdf)](a26_0x15b8c7[_0x4fecb4(0xe1)]('–\x20'+_0x13ba4b[_0x4fecb4(0xc4)]+_0x4fecb4(0xc3)+_0x13ba4b[_0x4fecb4(0xdb)]+')'));continue;}const _0x470728=_0x13ba4b[_0x4fecb4(0xd2)]===_0x4fecb4(0xd5)?a26_0x15b8c7['green']('✔'):_0x13ba4b[_0x4fecb4(0xd2)]===_0x4fecb4(0xbc)?a26_0x15b8c7[_0x4fecb4(0xb9)]('✖'):a26_0x15b8c7['dim']('–'),_0x4d7df1=_0x13ba4b[_0x4fecb4(0xd1)]?_0x13ba4b[_0x4fecb4(0xd1)]+':\x20':'';console[_0x4fecb4(0xdf)](_0x470728+'\x20'+_0x13ba4b[_0x4fecb4(0xc4)]+':\x20'+_0x4d7df1+_0x13ba4b[_0x4fecb4(0xd2)][_0x4fecb4(0xe2)]());_0x13ba4b[_0x4fecb4(0xc6)]&&(!_0x13ba4b[_0x4fecb4(0xc6)][_0x4fecb4(0xd3)]||_0x13ba4b[_0x4fecb4(0xc6)]['warnings']['length']>0x0)&&console[_0x4fecb4(0xdf)](formatValidationResult(_0x13ba4b[_0x4fecb4(0xc6)],_0x13ba4b[_0x4fecb4(0xca)]??'',_0x13ba4b[_0x4fecb4(0xc4)]));for(const _0x432ef8 of _0x13ba4b[_0x4fecb4(0xd6)]){const _0xb5f305=_0x432ef8[_0x4fecb4(0xd2)]===_0x4fecb4(0xd5)?a26_0x15b8c7['green']('✔'):_0x432ef8[_0x4fecb4(0xd2)]===_0x4fecb4(0xbc)?a26_0x15b8c7[_0x4fecb4(0xb9)]('✖'):a26_0x15b8c7['dim']('–');console[_0x4fecb4(0xdf)]('\x20\x20'+_0xb5f305+'\x20'+_0x432ef8[_0x4fecb4(0xc2)]+':\x20'+_0x432ef8[_0x4fecb4(0xcd)]);}}const {readyCount:_0x35ed28,blockedCount:_0x2e7b9a,notApplicableCount:_0x3177b0,skippedCount:_0x397d8f}=_0x5209a7[_0x4fecb4(0xd7)],_0x3dac19='Readiness:\x20'+_0x35ed28+_0x4fecb4(0xd4)+_0x2e7b9a+_0x4fecb4(0xbe)+_0x3177b0+_0x4fecb4(0xcb)+(_0x397d8f?',\x20'+_0x397d8f+'\x20skipped':'');return console[_0x4fecb4(0xdf)](_0x2e7b9a>0x0?a26_0x15b8c7[_0x4fecb4(0xb9)](_0x3dac19):a26_0x15b8c7[_0x4fecb4(0xc1)](_0x3dac19)),_0x5209a7[_0x4fecb4(0xde)];}}
1
+ const a27_0x197b99=a27_0x12e2;(function(_0x15e9d4,_0x15e6b6){const _0x517066=a27_0x12e2,_0xb595d1=_0x15e9d4();while(!![]){try{const _0x57e2e9=parseInt(_0x517066(0x126))/0x1*(-parseInt(_0x517066(0x12e))/0x2)+parseInt(_0x517066(0x10b))/0x3*(-parseInt(_0x517066(0x114))/0x4)+-parseInt(_0x517066(0x10f))/0x5+-parseInt(_0x517066(0x111))/0x6+parseInt(_0x517066(0x11e))/0x7+parseInt(_0x517066(0x121))/0x8*(parseInt(_0x517066(0x125))/0x9)+-parseInt(_0x517066(0x117))/0xa*(-parseInt(_0x517066(0x10e))/0xb);if(_0x57e2e9===_0x15e6b6)break;else _0xb595d1['push'](_0xb595d1['shift']());}catch(_0x83d2d5){_0xb595d1['push'](_0xb595d1['shift']());}}}(a27_0x4ef6,0x547b5));import a27_0x649d6a from'chalk';function a27_0x4ef6(){const _0x58e166=['exitCode','valid','blocked','message','warnings','1217713MPNaDw','results','\x20ready,\x20','7064UKKCCs','dim','output','delivery','6057QBghlv','3bxqVxd','checks','relativePath','engage','workspace','description','session','status','127234mnwAFj','summary','engage:campaign:readiness','Check\x20email\x20campaign\x20readiness\x20against\x20workspace\x20delivery\x20config','\x20not\x20applicable','verbose','log','14169CCZUMi','validation','red','1826eUjOTw','685680owMAWZ','green','3733494zCUnKq','ready','name','212nhVGWY','\x20skipped','\x20(skipped:\x20','46890jxrXFu','skipReason'];a27_0x4ef6=function(){return _0x58e166;};return a27_0x4ef6();}import{handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{BaseCommand}from'./command.js';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a27_0x12e2(_0x2b6757,_0x526a6a){_0x2b6757=_0x2b6757-0x109;const _0x4ef6d7=a27_0x4ef6();let _0x12e27c=_0x4ef6d7[_0x2b6757];return _0x12e27c;}import{runCampaignReadiness,toStructuredCampaignReadinessReport}from'../sdk/engage/campaign-readiness-workflow.js';import{withSpinner}from'../utils/spinner.js';export class EngageCampaignReadinessCommand extends BaseCommand{['name']=a27_0x197b99(0x130);[a27_0x197b99(0x12b)]=a27_0x197b99(0x131);async['execute'](_0x13e424){const _0x13531b=a27_0x197b99,{options:_0x229365,args:_0x290703,tdx:_0x2e5122}=_0x13e424,_0x1b2f7a=_0x229365,{data:_0x47afb3}=await withSpinner('Checking\x20campaign\x20readiness...',()=>runCampaignReadiness({'engage':_0x2e5122[_0x13531b(0x129)],'delivery':_0x2e5122[_0x13531b(0x124)]},{'target':_0x290703[0x0],'workspace':_0x1b2f7a[_0x13531b(0x12a)],'session':_0x229365[_0x13531b(0x12c)]}),{'verbose':_0x229365['verbose']});if(isStructuredFormat(_0x229365)||_0x229365[_0x13531b(0x123)]){const _0x5a4110=toStructuredCampaignReadinessReport(_0x47afb3);return await handleSingleObjectOutput(_0x5a4110,_0x229365),_0x47afb3[_0x13531b(0x119)];}if(_0x47afb3[_0x13531b(0x11c)])console[_0x13531b(0x10a)](a27_0x649d6a['yellow'](_0x47afb3[_0x13531b(0x11c)]));for(const _0x10a9ee of _0x47afb3[_0x13531b(0x11f)]){if(_0x10a9ee[_0x13531b(0x12d)]==='skipped'){_0x229365[_0x13531b(0x109)]&&console['log'](a27_0x649d6a[_0x13531b(0x122)]('–\x20'+_0x10a9ee['relativePath']+_0x13531b(0x116)+_0x10a9ee[_0x13531b(0x118)]+')'));continue;}const _0x13117e=_0x10a9ee[_0x13531b(0x12d)]===_0x13531b(0x112)?a27_0x649d6a[_0x13531b(0x110)]('✔'):_0x10a9ee[_0x13531b(0x12d)]===_0x13531b(0x11b)?a27_0x649d6a[_0x13531b(0x10d)]('✖'):a27_0x649d6a[_0x13531b(0x122)]('–'),_0x20c62e=_0x10a9ee['campaignName']?_0x10a9ee['campaignName']+':\x20':'';console['log'](_0x13117e+'\x20'+_0x10a9ee[_0x13531b(0x128)]+':\x20'+_0x20c62e+_0x10a9ee['status']['toUpperCase']());_0x10a9ee[_0x13531b(0x10c)]&&(!_0x10a9ee['validation'][_0x13531b(0x11a)]||_0x10a9ee[_0x13531b(0x10c)][_0x13531b(0x11d)]['length']>0x0)&&console[_0x13531b(0x10a)](formatValidationResult(_0x10a9ee[_0x13531b(0x10c)],_0x10a9ee['source']??'',_0x10a9ee['relativePath']));for(const _0x3bcffa of _0x10a9ee[_0x13531b(0x127)]){const _0x14578c=_0x3bcffa[_0x13531b(0x12d)]===_0x13531b(0x112)?a27_0x649d6a['green']('✔'):_0x3bcffa[_0x13531b(0x12d)]===_0x13531b(0x11b)?a27_0x649d6a[_0x13531b(0x10d)]('✖'):a27_0x649d6a[_0x13531b(0x122)]('–');console['log']('\x20\x20'+_0x14578c+'\x20'+_0x3bcffa[_0x13531b(0x113)]+':\x20'+_0x3bcffa[_0x13531b(0x11c)]);}}const {readyCount:_0x545a45,blockedCount:_0xf8a116,notApplicableCount:_0x4500c2,skippedCount:_0x3fb536}=_0x47afb3[_0x13531b(0x12f)],_0x23dc12='Readiness:\x20'+_0x545a45+_0x13531b(0x120)+_0xf8a116+'\x20blocked,\x20'+_0x4500c2+_0x13531b(0x132)+(_0x3fb536?',\x20'+_0x3fb536+_0x13531b(0x115):'');return console[_0x13531b(0x10a)](_0xf8a116>0x0?a27_0x649d6a[_0x13531b(0x10d)](_0x23dc12):a27_0x649d6a['green'](_0x23dc12)),_0x47afb3['exitCode'];}}
@@ -1 +1 @@
1
- const a27_0x29bceb=a27_0x10b6;(function(_0xecfaa4,_0x2dc7dc){const _0x7cce11=a27_0x10b6,_0x3d8df9=_0xecfaa4();while(!![]){try{const _0x420dc9=-parseInt(_0x7cce11(0x1ba))/0x1*(parseInt(_0x7cce11(0x1af))/0x2)+parseInt(_0x7cce11(0x1b7))/0x3*(-parseInt(_0x7cce11(0x1a3))/0x4)+-parseInt(_0x7cce11(0x1aa))/0x5*(parseInt(_0x7cce11(0x1b6))/0x6)+parseInt(_0x7cce11(0x1a7))/0x7+-parseInt(_0x7cce11(0x1ca))/0x8*(-parseInt(_0x7cce11(0x1c2))/0x9)+parseInt(_0x7cce11(0x19f))/0xa*(-parseInt(_0x7cce11(0x1c7))/0xb)+parseInt(_0x7cce11(0x1ac))/0xc;if(_0x420dc9===_0x2dc7dc)break;else _0x3d8df9['push'](_0x3d8df9['shift']());}catch(_0x3cde02){_0x3d8df9['push'](_0x3d8df9['shift']());}}}(a27_0x5e49,0x98928));import{BaseCommand}from'./command.js';function a27_0x10b6(_0x452bef,_0x9db5fc){_0x452bef=_0x452bef-0x198;const _0x5e4929=a27_0x5e49();let _0x10b668=_0x5e4929[_0x452bef];return _0x10b668;}import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{discoverListCampaignFiles,validateListCampaignYaml}from'../sdk/engage/list-campaign-yaml.js';import{existsSync,readFileSync}from'fs';import a27_0x3727fc from'chalk';import a27_0x1fa542 from'path';function a27_0x5e49(){const _0x133130=['execute','length','error','52566tpLUCc','28848SYiBiE','\x20non-campaign\x20file(s)\x20skipped','Error:\x20Invalid\x20campaign\x20type\x20\x22','2VmGRKO','\x20ListCampaign\x20error(s)','\x20non-campaign\x20file(s)\x20skipped)','cwd','validateListCampaignFiles','dirname','validCount','\x20warning(s)\x20found','9oZAXfH','resolve','verbose','relative','name','25036EBTYsv','\x20(skipped:\x20','\x20warning(s)','6715704siLgyv','red','endsWith','✔\x20All\x20','green','warnings','yellow','\x20error(s)','invalidCount','path','errors','engage:campaign:validate','\x20ListCampaign\x20YAML\x20file(s)\x20valid','Validation\x20failed:\x20','Error:\x20Directory\x20not\x20found:\x20','540zidcTQ','dim','campaignType','reason','432FIBAxk','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20campaign(s)\x20valid','filter','474831TjDZqo','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','warningCount','505vOAkeH','log','23088564UIPCvG','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','skippedCount','160114yxTxsj','valid','\x20campaign(s)\x20with\x20errors,\x20','campaign'];a27_0x5e49=function(){return _0x133130;};return a27_0x5e49();}import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageCampaignValidateCommand extends BaseCommand{[a27_0x29bceb(0x1c6)]=a27_0x29bceb(0x19b);['description']='Validate\x20campaign\x20YAML\x20files';async[a27_0x29bceb(0x1b3)](_0x5ac626){const _0x217ae6=a27_0x29bceb,{options:_0x179a46,args:_0x5c1361}=_0x5ac626,_0x2eb6ad=_0x179a46,_0x16fd1b=_0x2eb6ad[_0x217ae6(0x1a1)]??'campaign';if(_0x16fd1b==='list-campaign')return this[_0x217ae6(0x1be)](_0x5c1361[0x0],_0x2eb6ad[_0x217ae6(0x1c4)]);if(_0x16fd1b!==_0x217ae6(0x1b2))return console[_0x217ae6(0x1b5)](_0x217ae6(0x1b9)+_0x16fd1b+_0x217ae6(0x1a8)),0x1;const _0x1c24f5=_0x5c1361[0x0],_0x4ff120=_0x1c24f5?a27_0x1fa542['resolve'](_0x1c24f5):undefined,_0xcd681f=_0x4ff120?isYamlFile(_0x4ff120):![];let _0x113c76,_0x16acb6;if(_0xcd681f&&_0x4ff120)_0x113c76=a27_0x1fa542[_0x217ae6(0x1bf)](_0x4ff120),_0x16acb6=_0x4ff120;else _0x4ff120?_0x113c76=_0x4ff120:_0x113c76=process[_0x217ae6(0x1bd)]();if(!_0x16acb6&&!existsSync(_0x113c76))return console[_0x217ae6(0x1b5)](a27_0x3727fc[_0x217ae6(0x1cb)](_0x217ae6(0x19e)+_0x113c76+'\x0a')),0x1;let _0x2c6cf9;if(_0x16acb6){if(!_0x16acb6[_0x217ae6(0x1cc)]('.yml')&&!_0x16acb6['endsWith']('.yaml'))return console[_0x217ae6(0x1b5)](a27_0x3727fc['red'](_0x217ae6(0x1ad)+_0x16acb6+'\x0a')),0x1;_0x2c6cf9=[_0x16acb6];}else _0x2c6cf9=findYamlFiles(_0x113c76);if(_0x2c6cf9['length']===0x0)return console['error'](a27_0x3727fc[_0x217ae6(0x1cb)](_0x217ae6(0x1a4)+_0x113c76+'\x0a')),0x1;const _0x527b2e=validateYamlFiles(_0x2c6cf9,_0x113c76,{'filterType':_0x217ae6(0x1b2)}),_0x2164b8=calculateSummary(_0x527b2e),_0x47d604=_0x527b2e[_0x217ae6(0x1a6)](isValidationResult);if(_0x47d604['length']===0x0)return console[_0x217ae6(0x1b5)](a27_0x3727fc[_0x217ae6(0x1d0)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x113c76+'\x0a')),_0x2164b8['skippedCount']>0x0&&console[_0x217ae6(0x1b5)](a27_0x3727fc[_0x217ae6(0x1a0)]('('+_0x2164b8[_0x217ae6(0x1ae)]+_0x217ae6(0x1bc))),0x0;for(const _0xa935c3 of _0x527b2e){if(!isValidationResult(_0xa935c3)){_0x2eb6ad[_0x217ae6(0x1c4)]&&console['log'](a27_0x3727fc['dim']('-\x20'+_0xa935c3['relativePath']+_0x217ae6(0x1c8)+_0xa935c3[_0x217ae6(0x1a2)]+')'));continue;}const {relativePath:_0x3e0cb8,source:_0x2eb8a1,result:_0x5bffae}=_0xa935c3;if(_0x5bffae[_0x217ae6(0x1b0)]&&_0x5bffae[_0x217ae6(0x1cf)]['length']===0x0)_0x2eb6ad[_0x217ae6(0x1c4)]&&console[_0x217ae6(0x1ab)](a27_0x3727fc[_0x217ae6(0x1ce)]('✔\x20'+_0x3e0cb8));else _0x5bffae[_0x217ae6(0x1b0)]?(console[_0x217ae6(0x1ab)](a27_0x3727fc[_0x217ae6(0x1d0)]('⚠\x20'+_0x3e0cb8+':\x20'+_0x5bffae[_0x217ae6(0x1cf)]['length']+_0x217ae6(0x1c9))),console[_0x217ae6(0x1ab)](formatValidationResult(_0x5bffae,_0x2eb8a1,_0x3e0cb8))):(console[_0x217ae6(0x1ab)](a27_0x3727fc[_0x217ae6(0x1cb)]('✖\x20'+_0x3e0cb8+':\x20'+_0x5bffae[_0x217ae6(0x19a)][_0x217ae6(0x1b4)]+_0x217ae6(0x1d1))),console[_0x217ae6(0x1ab)](formatValidationResult(_0x5bffae,_0x2eb8a1,_0x3e0cb8)));}return console['log'](''),_0x2164b8['hasErrors']?(console[_0x217ae6(0x1ab)](a27_0x3727fc[_0x217ae6(0x1cb)]('Validation\x20failed:\x20'+_0x2164b8[_0x217ae6(0x198)]+_0x217ae6(0x1b1)+_0x2164b8[_0x217ae6(0x1c0)]+'\x20valid')),_0x2164b8[_0x217ae6(0x1a9)]>0x0&&console[_0x217ae6(0x1ab)](a27_0x3727fc['yellow'](_0x2164b8['warningCount']+'\x20warning(s)\x20found')),_0x2164b8[_0x217ae6(0x1ae)]>0x0&&console[_0x217ae6(0x1ab)](a27_0x3727fc[_0x217ae6(0x1a0)](_0x2164b8[_0x217ae6(0x1ae)]+_0x217ae6(0x1b8))),0x1):(console['log'](a27_0x3727fc[_0x217ae6(0x1ce)]('✔\x20All\x20'+_0x2164b8[_0x217ae6(0x1c0)]+_0x217ae6(0x1a5))),_0x2164b8[_0x217ae6(0x1a9)]>0x0&&console[_0x217ae6(0x1ab)](a27_0x3727fc[_0x217ae6(0x1d0)](_0x2164b8[_0x217ae6(0x1a9)]+_0x217ae6(0x1c1))),_0x2164b8[_0x217ae6(0x1ae)]>0x0&&console[_0x217ae6(0x1ab)](a27_0x3727fc['dim'](_0x2164b8[_0x217ae6(0x1ae)]+_0x217ae6(0x1b8))),0x0);}[a27_0x29bceb(0x1be)](_0x113342,_0xf554d6){const _0x206761=a27_0x29bceb,_0x21598f=_0x113342?a27_0x1fa542[_0x206761(0x1c3)](_0x113342):undefined,_0x5cbc10=_0x21598f?isYamlFile(_0x21598f):![],_0x8dca1d=_0x5cbc10&&_0x21598f?a27_0x1fa542[_0x206761(0x1bf)](_0x21598f):_0x21598f??process[_0x206761(0x1bd)]();if(!_0x5cbc10&&!existsSync(_0x8dca1d))return console[_0x206761(0x1b5)](a27_0x3727fc['red'](_0x206761(0x19e)+_0x8dca1d)),0x1;const _0x443ef7=_0x5cbc10&&_0x21598f?[_0x21598f]:discoverListCampaignFiles(_0x8dca1d);if(_0x443ef7[_0x206761(0x1b4)]===0x0)return console['error'](a27_0x3727fc[_0x206761(0x1d0)]('No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20'+_0x8dca1d)),0x1;let _0x3899d5=0x0;for(const _0x6d8c3b of _0x443ef7){const _0x4d00c7=validateListCampaignYaml(readFileSync(_0x6d8c3b,'utf8'));if(_0x4d00c7['valid']){if(_0xf554d6)console['log'](a27_0x3727fc[_0x206761(0x1ce)]('✔\x20'+a27_0x1fa542['relative'](_0x8dca1d,_0x6d8c3b)));continue;}_0x3899d5+=_0x4d00c7[_0x206761(0x19a)][_0x206761(0x1b4)],console[_0x206761(0x1b5)](a27_0x3727fc[_0x206761(0x1cb)]('✖\x20'+a27_0x1fa542[_0x206761(0x1c5)](_0x8dca1d,_0x6d8c3b)));for(const _0x3b2074 of _0x4d00c7[_0x206761(0x19a)]){const _0x506145=_0x3b2074['path']?_0x3b2074[_0x206761(0x199)]+':\x20':'';console['error']('\x20\x20'+a27_0x3727fc[_0x206761(0x1cb)]('✗')+'\x20'+_0x506145+_0x3b2074['message']);}}if(_0x3899d5>0x0)return console['error'](a27_0x3727fc[_0x206761(0x1cb)](_0x206761(0x19d)+_0x3899d5+_0x206761(0x1bb))),0x1;return console[_0x206761(0x1ab)](a27_0x3727fc[_0x206761(0x1ce)](_0x206761(0x1cd)+_0x443ef7[_0x206761(0x1b4)]+_0x206761(0x19c))),0x0;}}
1
+ const a28_0x4255a6=a28_0x13d9;(function(_0x20e48a,_0x65eb4a){const _0x2202f0=a28_0x13d9,_0x78ddab=_0x20e48a();while(!![]){try{const _0x12fad2=parseInt(_0x2202f0(0xca))/0x1*(-parseInt(_0x2202f0(0xd7))/0x2)+-parseInt(_0x2202f0(0xc9))/0x3+-parseInt(_0x2202f0(0xc6))/0x4+parseInt(_0x2202f0(0xcf))/0x5*(parseInt(_0x2202f0(0xa2))/0x6)+-parseInt(_0x2202f0(0xb6))/0x7+-parseInt(_0x2202f0(0x9f))/0x8*(-parseInt(_0x2202f0(0xc8))/0x9)+parseInt(_0x2202f0(0xb1))/0xa;if(_0x12fad2===_0x65eb4a)break;else _0x78ddab['push'](_0x78ddab['shift']());}catch(_0x526d0f){_0x78ddab['push'](_0x78ddab['shift']());}}}(a28_0x44cc,0xc327b));function a28_0x44cc(){const _0x2f2057=['246536FEshhm','length','Validate\x20campaign\x20YAML\x20files','319692XuunGb','red','filter','validCount','\x20ListCampaign\x20error(s)','green','\x20error(s)','\x20valid','name','endsWith','description','\x20campaign(s)\x20valid','errors','Error:\x20Directory\x20not\x20found:\x20','warningCount','32855620RamEyf','path','\x22.\x20Valid\x20values:\x20campaign,\x20list-campaign','execute','dim','6265462HhlFGy','utf8','.yaml','campaign','error','valid','✔\x20All\x20','verbose','\x20non-campaign\x20file(s)\x20skipped','resolve','No\x20ListCampaign\x20YAML\x20files\x20found\x20in\x20','skippedCount','engage:campaign:validate','yellow','cwd','message','4580980FjREpH','\x20warning(s)\x20found','279vhoHoT','4504200WOAPpU','55RUepLp','validateListCampaignFiles','invalidCount','relative','log','55ZkzsRl','Validation\x20failed:\x20','\x20(skipped:\x20','\x20campaign(s)\x20with\x20errors,\x20','\x20ListCampaign\x20YAML\x20file(s)\x20valid','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','warnings','list-campaign','17670cmcRmV','campaignType'];a28_0x44cc=function(){return _0x2f2057;};return a28_0x44cc();}import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{discoverListCampaignFiles,validateListCampaignYaml}from'../sdk/engage/list-campaign-yaml.js';import{existsSync,readFileSync}from'fs';import a28_0x305554 from'chalk';import a28_0x31f597 from'path';function a28_0x13d9(_0x244974,_0x497aa9){_0x244974=_0x244974-0x9f;const _0x44cca9=a28_0x44cc();let _0x13d941=_0x44cca9[_0x244974];return _0x13d941;}import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageCampaignValidateCommand extends BaseCommand{[a28_0x4255a6(0xaa)]=a28_0x4255a6(0xc2);[a28_0x4255a6(0xac)]=a28_0x4255a6(0xa1);async[a28_0x4255a6(0xb4)](_0x2c72e8){const _0x2faea3=a28_0x4255a6,{options:_0x3e66aa,args:_0x5232ec}=_0x2c72e8,_0x2d2d53=_0x3e66aa,_0x27867c=_0x2d2d53[_0x2faea3(0xd8)]??'campaign';if(_0x27867c===_0x2faea3(0xd6))return this[_0x2faea3(0xcb)](_0x5232ec[0x0],_0x2d2d53[_0x2faea3(0xbd)]);if(_0x27867c!=='campaign')return console['error']('Error:\x20Invalid\x20campaign\x20type\x20\x22'+_0x27867c+_0x2faea3(0xb3)),0x1;const _0x2f32b4=_0x5232ec[0x0],_0x177254=_0x2f32b4?a28_0x31f597[_0x2faea3(0xbf)](_0x2f32b4):undefined,_0x1c015c=_0x177254?isYamlFile(_0x177254):![];let _0x116c89,_0x367996;if(_0x1c015c&&_0x177254)_0x116c89=a28_0x31f597['dirname'](_0x177254),_0x367996=_0x177254;else _0x177254?_0x116c89=_0x177254:_0x116c89=process[_0x2faea3(0xc4)]();if(!_0x367996&&!existsSync(_0x116c89))return console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xa3)](_0x2faea3(0xaf)+_0x116c89+'\x0a')),0x1;let _0x3ce57b;if(_0x367996){if(!_0x367996[_0x2faea3(0xab)]('.yml')&&!_0x367996['endsWith'](_0x2faea3(0xb8)))return console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xa3)](_0x2faea3(0xd4)+_0x367996+'\x0a')),0x1;_0x3ce57b=[_0x367996];}else _0x3ce57b=findYamlFiles(_0x116c89);if(_0x3ce57b[_0x2faea3(0xa0)]===0x0)return console['error'](a28_0x305554[_0x2faea3(0xa3)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x116c89+'\x0a')),0x1;const _0x37202e=validateYamlFiles(_0x3ce57b,_0x116c89,{'filterType':_0x2faea3(0xb9)}),_0x517ea1=calculateSummary(_0x37202e),_0x21249b=_0x37202e[_0x2faea3(0xa4)](isValidationResult);if(_0x21249b['length']===0x0)return console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xc3)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x116c89+'\x0a')),_0x517ea1[_0x2faea3(0xc1)]>0x0&&console[_0x2faea3(0xba)](a28_0x305554[_0x2faea3(0xb5)]('('+_0x517ea1[_0x2faea3(0xc1)]+'\x20non-campaign\x20file(s)\x20skipped)')),0x0;for(const _0xd34fab of _0x37202e){if(!isValidationResult(_0xd34fab)){_0x2d2d53[_0x2faea3(0xbd)]&&console['log'](a28_0x305554[_0x2faea3(0xb5)]('-\x20'+_0xd34fab['relativePath']+_0x2faea3(0xd1)+_0xd34fab['reason']+')'));continue;}const {relativePath:_0x29a6ac,source:_0x19bfad,result:_0x36099a}=_0xd34fab;if(_0x36099a[_0x2faea3(0xbb)]&&_0x36099a['warnings'][_0x2faea3(0xa0)]===0x0)_0x2d2d53[_0x2faea3(0xbd)]&&console[_0x2faea3(0xce)](a28_0x305554['green']('✔\x20'+_0x29a6ac));else _0x36099a[_0x2faea3(0xbb)]?(console[_0x2faea3(0xce)](a28_0x305554[_0x2faea3(0xc3)]('⚠\x20'+_0x29a6ac+':\x20'+_0x36099a[_0x2faea3(0xd5)][_0x2faea3(0xa0)]+'\x20warning(s)')),console['log'](formatValidationResult(_0x36099a,_0x19bfad,_0x29a6ac))):(console[_0x2faea3(0xce)](a28_0x305554['red']('✖\x20'+_0x29a6ac+':\x20'+_0x36099a[_0x2faea3(0xae)][_0x2faea3(0xa0)]+_0x2faea3(0xa8))),console[_0x2faea3(0xce)](formatValidationResult(_0x36099a,_0x19bfad,_0x29a6ac)));}return console[_0x2faea3(0xce)](''),_0x517ea1['hasErrors']?(console['log'](a28_0x305554[_0x2faea3(0xa3)](_0x2faea3(0xd0)+_0x517ea1[_0x2faea3(0xcc)]+_0x2faea3(0xd2)+_0x517ea1[_0x2faea3(0xa5)]+_0x2faea3(0xa9))),_0x517ea1[_0x2faea3(0xb0)]>0x0&&console['log'](a28_0x305554['yellow'](_0x517ea1[_0x2faea3(0xb0)]+'\x20warning(s)\x20found')),_0x517ea1[_0x2faea3(0xc1)]>0x0&&console['log'](a28_0x305554[_0x2faea3(0xb5)](_0x517ea1[_0x2faea3(0xc1)]+_0x2faea3(0xbe))),0x1):(console[_0x2faea3(0xce)](a28_0x305554[_0x2faea3(0xa7)](_0x2faea3(0xbc)+_0x517ea1[_0x2faea3(0xa5)]+_0x2faea3(0xad))),_0x517ea1['warningCount']>0x0&&console[_0x2faea3(0xce)](a28_0x305554[_0x2faea3(0xc3)](_0x517ea1['warningCount']+_0x2faea3(0xc7))),_0x517ea1[_0x2faea3(0xc1)]>0x0&&console['log'](a28_0x305554[_0x2faea3(0xb5)](_0x517ea1[_0x2faea3(0xc1)]+_0x2faea3(0xbe))),0x0);}[a28_0x4255a6(0xcb)](_0x1ab8b0,_0x2616c8){const _0x139aac=a28_0x4255a6,_0x139f79=_0x1ab8b0?a28_0x31f597[_0x139aac(0xbf)](_0x1ab8b0):undefined,_0x41182a=_0x139f79?isYamlFile(_0x139f79):![],_0x344fc=_0x41182a&&_0x139f79?a28_0x31f597['dirname'](_0x139f79):_0x139f79??process[_0x139aac(0xc4)]();if(!_0x41182a&&!existsSync(_0x344fc))return console[_0x139aac(0xba)](a28_0x305554[_0x139aac(0xa3)]('Error:\x20Directory\x20not\x20found:\x20'+_0x344fc)),0x1;const _0x899167=_0x41182a&&_0x139f79?[_0x139f79]:discoverListCampaignFiles(_0x344fc);if(_0x899167[_0x139aac(0xa0)]===0x0)return console[_0x139aac(0xba)](a28_0x305554[_0x139aac(0xc3)](_0x139aac(0xc0)+_0x344fc)),0x1;let _0x38bfcc=0x0;for(const _0x454636 of _0x899167){const _0x57bd05=validateListCampaignYaml(readFileSync(_0x454636,_0x139aac(0xb7)));if(_0x57bd05[_0x139aac(0xbb)]){if(_0x2616c8)console['log'](a28_0x305554[_0x139aac(0xa7)]('✔\x20'+a28_0x31f597[_0x139aac(0xcd)](_0x344fc,_0x454636)));continue;}_0x38bfcc+=_0x57bd05[_0x139aac(0xae)][_0x139aac(0xa0)],console['error'](a28_0x305554['red']('✖\x20'+a28_0x31f597[_0x139aac(0xcd)](_0x344fc,_0x454636)));for(const _0x228662 of _0x57bd05[_0x139aac(0xae)]){const _0x217c74=_0x228662[_0x139aac(0xb2)]?_0x228662['path']+':\x20':'';console[_0x139aac(0xba)]('\x20\x20'+a28_0x305554[_0x139aac(0xa3)]('✗')+'\x20'+_0x217c74+_0x228662[_0x139aac(0xc5)]);}}if(_0x38bfcc>0x0)return console[_0x139aac(0xba)](a28_0x305554[_0x139aac(0xa3)](_0x139aac(0xd0)+_0x38bfcc+_0x139aac(0xa6))),0x1;return console[_0x139aac(0xce)](a28_0x305554[_0x139aac(0xa7)](_0x139aac(0xbc)+_0x899167[_0x139aac(0xa0)]+_0x139aac(0xd3))),0x0;}}