@treasuredata/tdx 2026.9.0 → 2026.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/ai-usage-command-base.d.ts +26 -0
- package/dist/commands/ai-usage-command-base.d.ts.map +1 -0
- package/dist/commands/ai-usage-command-base.js +1 -0
- package/dist/commands/ai-usage-command-base.js.map +1 -0
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts +60 -3
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.d.ts +4 -7
- package/dist/commands/claude-usage-command.d.ts.map +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/claude-usage-command.js.map +1 -1
- package/dist/commands/codex-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-in-browser-message-command.d.ts +33 -0
- package/dist/commands/engage-in-browser-message-command.d.ts.map +1 -0
- package/dist/commands/engage-in-browser-message-command.js +1 -0
- package/dist/commands/engage-in-browser-message-command.js.map +1 -0
- package/dist/commands/engage-landing-page-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/opencode-command.d.ts +18 -0
- package/dist/commands/opencode-command.d.ts.map +1 -0
- package/dist/commands/opencode-command.js +1 -0
- package/dist/commands/opencode-command.js.map +1 -0
- package/dist/commands/opencode-usage-command.d.ts +19 -0
- package/dist/commands/opencode-usage-command.d.ts.map +1 -0
- package/dist/commands/opencode-usage-command.js +1 -0
- package/dist/commands/opencode-usage-command.js.map +1 -0
- package/dist/commands/p13n-command.d.ts +36 -0
- package/dist/commands/p13n-command.d.ts.map +1 -1
- package/dist/commands/p13n-command.js +1 -1
- package/dist/commands/p13n-command.js.map +1 -1
- package/dist/commands/parent-segment-command.d.ts.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/parent-segment-command.js.map +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.d.ts +1 -1
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.d.ts +33 -0
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/auth-token.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +27 -0
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-schema.js +1 -1
- package/dist/sdk/cas/cas-segment-validator.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.d.ts +51 -1
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.d.ts +9 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.d.ts +9 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +1 -1
- package/dist/sdk/client/http-client.d.ts +25 -1
- package/dist/sdk/client/http-client.d.ts.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/http-client.js.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/p13n-studio-api-client.d.ts +62 -7
- package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -1
- package/dist/sdk/client/p13n-studio-api-client.js +1 -1
- package/dist/sdk/client/p13n-studio-api-client.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/in-browser-message-pull.d.ts +41 -0
- package/dist/sdk/engage/in-browser-message-pull.d.ts.map +1 -0
- package/dist/sdk/engage/in-browser-message-pull.js +1 -0
- package/dist/sdk/engage/in-browser-message-pull.js.map +1 -0
- package/dist/sdk/engage/in-browser-message-push.d.ts +59 -0
- package/dist/sdk/engage/in-browser-message-push.d.ts.map +1 -0
- package/dist/sdk/engage/in-browser-message-push.js +1 -0
- package/dist/sdk/engage/in-browser-message-push.js.map +1 -0
- package/dist/sdk/engage/in-browser-message-validator.d.ts +9 -0
- package/dist/sdk/engage/in-browser-message-validator.d.ts.map +1 -0
- package/dist/sdk/engage/in-browser-message-validator.js +1 -0
- package/dist/sdk/engage/in-browser-message-validator.js.map +1 -0
- package/dist/sdk/engage/in-browser-message-yaml.d.ts +36 -0
- package/dist/sdk/engage/in-browser-message-yaml.d.ts.map +1 -0
- package/dist/sdk/engage/in-browser-message-yaml.js +1 -0
- package/dist/sdk/engage/in-browser-message-yaml.js.map +1 -0
- package/dist/sdk/engage/landing-page-init.js +1 -1
- package/dist/sdk/engage/landing-page-public-asset.js +1 -1
- package/dist/sdk/engage/landing-page-pull.js +1 -1
- package/dist/sdk/engage/landing-page-push.js +1 -1
- package/dist/sdk/engage/landing-page-static-site.js +1 -1
- package/dist/sdk/engage/landing-page-validator.js +1 -1
- package/dist/sdk/engage/landing-page-workspace.js +1 -1
- package/dist/sdk/engage/landing-page-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/in-browser-message-schema.d.ts +32 -0
- package/dist/sdk/engage/types/in-browser-message-schema.d.ts.map +1 -0
- package/dist/sdk/engage/types/in-browser-message-schema.js +1 -0
- package/dist/sdk/engage/types/in-browser-message-schema.js.map +1 -0
- package/dist/sdk/engage/types/landing-page-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.d.ts +24 -2
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.d.ts +12 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +38 -1
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/p13n-studio-errors.d.ts +91 -0
- package/dist/sdk/p13n-studio-errors.d.ts.map +1 -0
- package/dist/sdk/p13n-studio-errors.js +1 -0
- package/dist/sdk/p13n-studio-errors.js.map +1 -0
- package/dist/sdk/p13n-studio.d.ts +84 -8
- package/dist/sdk/p13n-studio.d.ts.map +1 -1
- package/dist/sdk/p13n-studio.js +1 -1
- package/dist/sdk/p13n-studio.js.map +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/audience-context.d.ts +117 -0
- package/dist/sdk/segment/audience-context.d.ts.map +1 -0
- package/dist/sdk/segment/audience-context.js +1 -0
- package/dist/sdk/segment/audience-context.js.map +1 -0
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.d.ts +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.d.ts +4 -1
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.d.ts +56 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/cas.d.ts +12 -0
- package/dist/sdk/types/cas.d.ts.map +1 -1
- package/dist/sdk/types/engage.d.ts +66 -0
- package/dist/sdk/types/engage.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +2 -2
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/p13n-studio.d.ts +77 -1
- package/dist/sdk/types/p13n-studio.d.ts.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.d.ts.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/process.js.map +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x553e4c=a22_0x8d61;(function(_0x5f00c3,_0x132a09){const _0x5926c4=a22_0x8d61,_0x1e6faf=_0x5f00c3();while(!![]){try{const _0x3761ad=parseInt(_0x5926c4(0xe4))/0x1+-parseInt(_0x5926c4(0x10a))/0x2*(parseInt(_0x5926c4(0xec))/0x3)+-parseInt(_0x5926c4(0xf4))/0x4+-parseInt(_0x5926c4(0xf9))/0x5+parseInt(_0x5926c4(0xfc))/0x6+parseInt(_0x5926c4(0xfb))/0x7*(-parseInt(_0x5926c4(0xfa))/0x8)+parseInt(_0x5926c4(0x107))/0x9;if(_0x3761ad===_0x132a09)break;else _0x1e6faf['push'](_0x1e6faf['shift']());}catch(_0x361d81){_0x1e6faf['push'](_0x1e6faf['shift']());}}}(a22_0x5e7d,0x24d9b));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a22_0x8d61(_0x15da92,_0x34d94a){_0x15da92=_0x15da92-0xdb;const _0x5e7d3f=a22_0x5e7d();let _0x8d61c6=_0x5e7d3f[_0x15da92];return _0x8d61c6;}function a22_0x5e7d(){const _0x4f90e7=['✔\x20Context\x20set:\x20','segment','82Ulmiwm','config','resolve','session','error','\x27...','engage:always-on-campaign:push','name','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','dim','298186YcBdvu','engage_workspace','\x20campaign(s)\x20updated','green','updated','engage','cwd','length','10422lrpWbP','includes','red','Resolving\x20workspace\x20\x27','sep','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','unchanged','verbose','200820GvmvBX','resolveWorkspaceId','created','setPhase','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20always-on-campaign\x20push\x20--workspace\x20<name>','1504620FygPNc','770248soUSTr','7zCpnwR','1436760VChUjf','\x0aUsage:\x20tdx\x20engage\x20always-on-campaign\x20push\x20<dir-or-file>','yellow','.yaml','execute','dryRun','errors','workspace','\x20campaign(s)\x20unchanged','endsWith','data','1828233xEVcuz'];a22_0x5e7d=function(){return _0x4f90e7;};return a22_0x5e7d();}import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a22_0x186fd5 from'chalk';import a22_0x3717a0 from'path';import{pushAlwaysOnCampaigns}from'../sdk/engage/always-on-campaign-push.js';export class EngageAlwaysOnCampaignPushCommand extends BaseCommand{[a22_0x553e4c(0xe1)]=a22_0x553e4c(0xe0);['description']='Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20always-on\x20campaigns';async[a22_0x553e4c(0x100)](_0x3e65b1){const _0x2bd583=a22_0x553e4c,{options:_0xb57478,args:_0x597ee2,tdx:_0x5d29cd}=_0x3e65b1,_0x48e4e8=_0xb57478,_0x216223=_0x597ee2[0x0],_0x7a1327=_0x216223?a22_0x3717a0[_0x2bd583(0xdc)](_0x216223):process[_0x2bd583(0xea)](),_0xb08532=await resolveWorkspaceName(_0x216223,_0x48e4e8);if(!_0xb08532)return console['error'](a22_0x186fd5[_0x2bd583(0xfe)]('Workspace\x20is\x20required.')),console['error'](_0x2bd583(0xfd)),console[_0x2bd583(0xde)](_0x2bd583(0xf8)),console[_0x2bd583(0xde)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;const _0xc05581=await withProgressSpinner(_0x2bd583(0xef)+_0xb08532+_0x2bd583(0xdf),()=>_0x5d29cd[_0x2bd583(0xe9)][_0x2bd583(0xf5)](_0xb08532),{'verbose':_0x48e4e8[_0x2bd583(0xf3)]}),_0x414db9=_0xc05581[_0x2bd583(0x106)],_0x19160c=await withProgressSpinner('Pushing\x20always-on\x20campaigns\x20to\x20\x27'+_0xb08532+_0x2bd583(0xdf),_0x3a4dda=>pushAlwaysOnCampaigns(_0x7a1327,_0x414db9,{'engage':_0x5d29cd[_0x2bd583(0xe9)],'segment':_0x5d29cd[_0x2bd583(0x109)]},{'dryRun':_0x48e4e8['dryRun'],'progress':{'update':_0x991a36=>{const _0xaaafaa=_0x2bd583;_0x3a4dda[_0xaaafaa(0xf7)](_0x991a36);}}}),{'verbose':_0x48e4e8[_0x2bd583(0xf3)]}),_0x244025=_0x19160c[_0x2bd583(0x106)];if(_0x244025[_0x2bd583(0x102)][_0x2bd583(0xeb)]>0x0){console['error'](a22_0x186fd5[_0x2bd583(0xee)]('\x0aErrors:'));for(const _0xf4b1de of _0x244025[_0x2bd583(0x102)]){console[_0x2bd583(0xde)]('\x20\x20'+a22_0x186fd5[_0x2bd583(0xee)]('✗')+'\x20'+_0xf4b1de[_0x2bd583(0xe1)]+':\x20'+_0xf4b1de[_0x2bd583(0xde)]);}}console['error']('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0xb08532+'\x27:'),console['error']('\x20\x20'+a22_0x186fd5['green']('+\x20'+_0x244025[_0x2bd583(0xf6)]+'\x20campaign(s)\x20created')),console[_0x2bd583(0xde)]('\x20\x20'+a22_0x186fd5[_0x2bd583(0xfe)]('~\x20'+_0x244025[_0x2bd583(0xe8)]+_0x2bd583(0xe6))),console[_0x2bd583(0xde)]('\x20\x20'+a22_0x186fd5[_0x2bd583(0xe3)]('=\x20'+_0x244025[_0x2bd583(0xf2)]+_0x2bd583(0x104)));if(_0x48e4e8[_0x2bd583(0x101)])return console[_0x2bd583(0xde)](a22_0x186fd5[_0x2bd583(0xfe)](_0x2bd583(0xf1))),0x0;if(_0x244025[_0x2bd583(0xf6)]===0x0&&_0x244025[_0x2bd583(0xe8)]===0x0)return console[_0x2bd583(0xde)](a22_0x186fd5[_0x2bd583(0xe7)](_0x2bd583(0xe2))),saveSessionContext({'engage_workspace':_0xb08532},_0x48e4e8[_0x2bd583(0xdd)]),_0x244025[_0x2bd583(0x102)][_0x2bd583(0xeb)]>0x0?0x1:0x0;return console[_0x2bd583(0xde)](a22_0x186fd5['green']('✔\x20Pushed\x20'+(_0x244025[_0x2bd583(0xf6)]+_0x244025['updated'])+'\x20always-on\x20campaign(s)')),saveSessionContext({'engage_workspace':_0xb08532},_0x48e4e8[_0x2bd583(0xdd)]),console[_0x2bd583(0xde)](a22_0x186fd5[_0x2bd583(0xe7)](_0x2bd583(0x108)+a22_0x186fd5[_0x2bd583(0xe3)]('engage_workspace')+'\x20=\x20'+a22_0x186fd5['cyan'](_0xb08532))),_0x244025[_0x2bd583(0x102)]['length']>0x0?0x1:0x0;}}async function resolveWorkspaceName(_0x4c58b2,_0x2b9194){const _0x2ebefb=a22_0x553e4c;if(_0x4c58b2&&!_0x4c58b2[_0x2ebefb(0xed)](a22_0x3717a0[_0x2ebefb(0xf0)])&&!_0x4c58b2[_0x2ebefb(0x105)](_0x2ebefb(0xff)))return _0x4c58b2;if(_0x2b9194[_0x2ebefb(0x103)])return _0x2b9194[_0x2ebefb(0x103)];const _0x5109f0=_0x4c58b2&&(_0x4c58b2['includes'](a22_0x3717a0[_0x2ebefb(0xf0)])||_0x4c58b2[_0x2ebefb(0x105)](_0x2ebefb(0xff)))?a22_0x3717a0['resolve'](_0x4c58b2):process[_0x2ebefb(0xea)](),_0x432252=tryFindTdxConfig(_0x5109f0);if(_0x432252?.[_0x2ebefb(0xdb)][_0x2ebefb(0xe5)])return _0x432252[_0x2ebefb(0xdb)][_0x2ebefb(0xe5)];const _0x445eb4=loadSessionContext(_0x2b9194[_0x2ebefb(0xdd)]);if(_0x445eb4?.[_0x2ebefb(0xe5)])return _0x445eb4['engage_workspace'];return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a23_0x406179=a23_0x3a81;function a23_0x2fd4(){const _0x2fb20b=['warnings','red','\x20valid,\x20','description','87lBDaIX','\x20error(s)','forEach','1864476BrWQoq','EngageAlwaysOnCampaignValidate','valid','verbose','181080xTWdHW','\x20\x20[','28cRLtHB','length','errors','utf-8','push','error','warn','path','Validation\x20complete:\x20','86sCtkbn','75020yWWnoU','50536fLOWLi','code','green','yellow','\x20invalid','message','bold','598236CPrpQS','26764IecUKu','\x20\x20[WARNING]\x20','file','type'];a23_0x2fd4=function(){return _0x2fb20b;};return a23_0x2fd4();}(function(_0x351775,_0x16ba4f){const _0x500ba9=a23_0x3a81,_0x1d3b68=_0x351775();while(!![]){try{const _0x43c546=parseInt(_0x500ba9(0x87))/0x1+-parseInt(_0x500ba9(0x86))/0x2+parseInt(_0x500ba9(0x98))/0x3*(parseInt(_0x500ba9(0x90))/0x4)+-parseInt(_0x500ba9(0x7b))/0x5+parseInt(_0x500ba9(0x8f))/0x6+-parseInt(_0x500ba9(0x7d))/0x7*(parseInt(_0x500ba9(0x88))/0x8)+-parseInt(_0x500ba9(0x9b))/0x9;if(_0x43c546===_0x16ba4f)break;else _0x1d3b68['push'](_0x1d3b68['shift']());}catch(_0x5108be){_0x1d3b68['push'](_0x1d3b68['shift']());}}}(a23_0x2fd4,0x186ea));import{BaseCommand}from'./command.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{readFileSync}from'fs';import a23_0xeffc1c from'chalk';import{validateAlwaysOnCampaignDef}from'../sdk/engage/always-on-campaign-validator.js';function a23_0x3a81(_0x1fbcee,_0x48b4b3){_0x1fbcee=_0x1fbcee-0x7a;const _0x2fd470=a23_0x2fd4();let _0x3a811d=_0x2fd470[_0x1fbcee];return _0x3a811d;}import{parseYamlString}from'../sdk/engage/always-on-campaign-yaml.js';export class EngageAlwaysOnCampaignValidateCommand extends BaseCommand{['name']=a23_0x406179(0x9c);[a23_0x406179(0x97)]='Validate\x20always-on\x20campaign\x20YAML\x20files';async['execute'](_0x5277d2){const _0x3484fd=a23_0x406179,{options:_0x4b0a70,args:_0xc4c2d4}=_0x5277d2,_0x177e84=_0xc4c2d4[0x0]||'.',_0xb6b754=_0x4b0a70[_0x3484fd(0x7a)]??![],_0x13c54f=await findYamlFiles(_0x177e84);if(_0x13c54f[_0x3484fd(0x7e)]===0x0)return console[_0x3484fd(0x82)](a23_0xeffc1c[_0x3484fd(0x8b)]('No\x20YAML\x20files\x20found')),0x0;let _0x128760=0x0,_0x48b9a6=0x0;const _0x3814cb=[];for(const _0x5131b1 of _0x13c54f){try{const _0x5986e8=readFileSync(_0x5131b1,_0x3484fd(0x80)),_0x106ce5=parseYamlString(_0x5986e8);if(_0x106ce5[_0x3484fd(0x93)]!=='always_on_campaign')continue;const _0x1ba8da=validateAlwaysOnCampaignDef(_0x106ce5);if(_0x1ba8da[_0x3484fd(0x9d)])_0x128760++,_0xb6b754&&console['log'](a23_0xeffc1c[_0x3484fd(0x8a)]('✓\x20'+_0x5131b1));else{_0x48b9a6++;const _0x14b8fb=_0x1ba8da[_0x3484fd(0x7f)]['map'](_0x392ea3=>_0x3484fd(0x7c)+_0x392ea3[_0x3484fd(0x89)]+']\x20'+_0x392ea3['path']+':\x20'+_0x392ea3[_0x3484fd(0x8d)]);_0x3814cb[_0x3484fd(0x81)]({'file':_0x5131b1,'message':_0x1ba8da[_0x3484fd(0x7f)][_0x3484fd(0x7e)]+_0x3484fd(0x99),'details':_0x14b8fb}),console[_0x3484fd(0x82)](a23_0xeffc1c[_0x3484fd(0x95)]('✗\x20'+_0x5131b1+':\x20'+_0x1ba8da['errors'][_0x3484fd(0x7e)]+'\x20error(s)'));}_0x1ba8da[_0x3484fd(0x94)]['length']>0x0&&_0x1ba8da['warnings'][_0x3484fd(0x9a)](_0x452514=>{const _0xad7b6d=_0x3484fd;console[_0xad7b6d(0x83)](a23_0xeffc1c[_0xad7b6d(0x8b)](_0xad7b6d(0x91)+_0x452514[_0xad7b6d(0x84)]+':\x20'+_0x452514['message']));});}catch(_0x5e7454){_0x48b9a6++;const _0x34a849=_0x5e7454 instanceof Error?_0x5e7454[_0x3484fd(0x8d)]:String(_0x5e7454);_0x3814cb[_0x3484fd(0x81)]({'file':_0x5131b1,'message':'Failed\x20to\x20parse','details':[_0x34a849]}),console[_0x3484fd(0x82)](a23_0xeffc1c[_0x3484fd(0x95)]('✗\x20'+_0x5131b1+':\x20'+_0x34a849));}}return console['error'](''),console['error'](a23_0xeffc1c[_0x3484fd(0x8e)](_0x3484fd(0x85)+a23_0xeffc1c[_0x3484fd(0x8a)](_0x128760)+_0x3484fd(0x96)+a23_0xeffc1c[_0x3484fd(0x95)](_0x48b9a6)+_0x3484fd(0x8c))),_0x3814cb[_0x3484fd(0x7e)]>0x0&&_0xb6b754&&(console['error'](''),_0x3814cb[_0x3484fd(0x9a)](_0x63a743=>{const _0x4890bc=_0x3484fd;console[_0x4890bc(0x82)](a23_0xeffc1c['red'](_0x63a743[_0x4890bc(0x92)]+':')),_0x63a743['details'][_0x4890bc(0x9a)](_0x2464ce=>console[_0x4890bc(0x82)](_0x2464ce));})),_0x48b9a6>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x346353=a24_0x5e1f;function a24_0x1f94(){const _0x3155ca=['Workspace\x20is\x20required.','setPhase','4753629gkmjGo','Pull\x20campaigns\x20to\x20YAML\x20files','length','\x0aChanges\x20to\x20\x27','green','data','5461760FQYQsT','2687447fSQzWh','75mZUUCI','segment','dirname','\x20files?','✔\x20Pulled\x20','relativePath','config','✔\x20All\x20files\x20are\x20up\x20to\x20date','files','\x20campaigns','error','\x20\x20Target:\x20','diff','243243BkealE','\x20changed\x20files','filter','content','workspace','counts','4MYnWkh','yes','workspaceName','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','absolutePath','dim','targetDir','dryRun','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','session','engage_workspace','type','isNew','\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>','yellow','cyan','226344YOUwmF','description','Aborted.','-\x20no\x20files\x20written','\x0aPull\x20summary\x20for\x20workspace\x20\x27','hasChanges','Write\x20','verbose','\x27...','✔\x20Context\x20set:\x20','campaigns','name','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','204793QZvVst','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','utf-8','cwd','223732QwJlae'];a24_0x1f94=function(){return _0x3155ca;};return a24_0x1f94();}(function(_0x3d3384,_0x4036c9){const _0x240067=a24_0x5e1f,_0x25ddd2=_0x3d3384();while(!![]){try{const _0x41f281=-parseInt(_0x240067(0xf8))/0x1*(parseInt(_0x240067(0x11a))/0x2)+-parseInt(_0x240067(0x114))/0x3+parseInt(_0x240067(0xfc))/0x4+parseInt(_0x240067(0x107))/0x5*(parseInt(_0x240067(0xeb))/0x6)+parseInt(_0x240067(0x106))/0x7+-parseInt(_0x240067(0x105))/0x8+parseInt(_0x240067(0xff))/0x9;if(_0x41f281===_0x4036c9)break;else _0x25ddd2['push'](_0x25ddd2['shift']());}catch(_0x1c6b5d){_0x25ddd2['push'](_0x25ddd2['shift']());}}}(a24_0x1f94,0x5803c));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a24_0x5e1f(_0x30cf98,_0x1d2fd1){_0x30cf98=_0x30cf98-0xe4;const _0x1f944c=a24_0x1f94();let _0x5e1f53=_0x1f944c[_0x30cf98];return _0x5e1f53;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a24_0x4ba071 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a24_0x22d0ff from'path';import{pullCampaigns}from'../sdk/engage/campaign-pull.js';export class EngageCampaignPullCommand extends BaseCommand{['name']='engage:campaign:pull';[a24_0x346353(0xec)]=a24_0x346353(0x100);async['execute'](_0x1c476f){const _0x1ac212=a24_0x346353,{options:_0x27279e,args:_0x5eda0a,tdx:_0x3d8605}=_0x1c476f,_0x80432d=_0x27279e,_0x178296=await resolveWorkspaceName(_0x5eda0a[0x0],_0x80432d);if(!_0x178296)return console[_0x1ac212(0x111)](a24_0x4ba071[_0x1ac212(0xe9)](_0x1ac212(0xfd))),console['error'](_0x1ac212(0xe8)),console[_0x1ac212(0x111)](_0x1ac212(0xf9)),console['error'](_0x1ac212(0xf7)),0x1;const _0x5f426f=await withProgressSpinner('Pulling\x20campaigns\x20from\x20\x27'+_0x178296+_0x1ac212(0xf3),_0x25fc00=>pullCampaigns({'engage':_0x3d8605['engage'],'segment':_0x3d8605[_0x1ac212(0x108)]},_0x178296,{'campaignName':_0x80432d[_0x1ac212(0xf6)],'campaignType':_0x80432d[_0x1ac212(0xe6)],'progress':{'update':_0x5a9e6b=>{const _0x3da5fa=_0x1ac212;_0x25fc00[_0x3da5fa(0xfe)](_0x5a9e6b);}}}),{'verbose':_0x80432d[_0x1ac212(0xf2)]}),_0x23b2ee=_0x5f426f[_0x1ac212(0x104)];if(_0x23b2ee[_0x1ac212(0x119)][_0x1ac212(0xf5)]===0x0)return console[_0x1ac212(0x111)](a24_0x4ba071['yellow']('No\x20campaigns\x20found\x20in\x20workspace\x20\x27'+_0x23b2ee[_0x1ac212(0x11c)]+'\x27')),0x0;const _0x200a26=_0x23b2ee[_0x1ac212(0x10f)]['filter'](_0x174533=>_0x174533[_0x1ac212(0xe7)]),_0x86d9c=_0x23b2ee[_0x1ac212(0x10f)]['filter'](_0x1fea09=>!_0x1fea09[_0x1ac212(0xe7)]&&_0x1fea09[_0x1ac212(0xf0)]),_0x5dd438=_0x23b2ee[_0x1ac212(0x10f)][_0x1ac212(0x116)](_0x2810dc=>!_0x2810dc['isNew']&&!_0x2810dc[_0x1ac212(0xf0)]);console[_0x1ac212(0x111)](_0x1ac212(0xef)+_0x23b2ee[_0x1ac212(0x11c)]+'\x27:'),console['error']('\x20\x20'+a24_0x4ba071[_0x1ac212(0xea)](_0x23b2ee[_0x1ac212(0x119)][_0x1ac212(0xf5)]+_0x1ac212(0x110))),console['error']('\x20\x20'+a24_0x4ba071['green']('+\x20'+_0x200a26[_0x1ac212(0x101)]+'\x20new\x20files')),console[_0x1ac212(0x111)]('\x20\x20'+a24_0x4ba071[_0x1ac212(0xe9)]('~\x20'+_0x86d9c[_0x1ac212(0x101)]+_0x1ac212(0x115))),console[_0x1ac212(0x111)]('\x20\x20'+a24_0x4ba071[_0x1ac212(0x120)]('=\x20'+_0x5dd438['length']+'\x20unchanged\x20files')),console['error'](_0x1ac212(0x112)+a24_0x4ba071[_0x1ac212(0xea)](_0x23b2ee[_0x1ac212(0x121)])+'\x0a');if(_0x86d9c[_0x1ac212(0x101)]>0x0)for(const _0xe4cdff of _0x86d9c){console['error'](_0x1ac212(0x102)+_0xe4cdff[_0x1ac212(0x10c)]+'\x27:'),console['error']('\u2500'['repeat'](0x3c)),console['error'](_0xe4cdff[_0x1ac212(0x113)]),console['error']('\u2500'['repeat'](0x3c));}if(_0x80432d[_0x1ac212(0x122)])return console[_0x1ac212(0x111)](a24_0x4ba071[_0x1ac212(0xe9)](_0x1ac212(0x123))),0x0;if(_0x200a26[_0x1ac212(0x101)]===0x0&&_0x86d9c['length']===0x0)return console[_0x1ac212(0x111)](a24_0x4ba071[_0x1ac212(0x103)](_0x1ac212(0x10e))),saveSessionContext({'engage_workspace':_0x23b2ee[_0x1ac212(0x11c)]},_0x80432d[_0x1ac212(0xe4)]),0x0;if(!_0x80432d[_0x1ac212(0x11b)]){if(!isInteractive())return console[_0x1ac212(0x111)](a24_0x4ba071['red']('\x0aError:'),_0x1ac212(0x11e)),console[_0x1ac212(0x111)](a24_0x4ba071[_0x1ac212(0x120)](_0x1ac212(0x11d))),0x1;const _0x1214e3=await confirmKey(_0x1ac212(0xf1)+(_0x200a26['length']+_0x86d9c[_0x1ac212(0x101)])+_0x1ac212(0x10a));if(!_0x1214e3)return console['error'](a24_0x4ba071['yellow'](_0x1ac212(0xed)),_0x1ac212(0xee)),0x1;}for(const _0x1c7404 of _0x23b2ee[_0x1ac212(0x10f)]){if(_0x1c7404[_0x1ac212(0xe7)]||_0x1c7404['hasChanges']){const _0xe1bd66=a24_0x22d0ff[_0x1ac212(0x109)](_0x1c7404[_0x1ac212(0x11f)]);!existsSync(_0xe1bd66)&&mkdirSync(_0xe1bd66,{'recursive':!![]}),writeFileSync(_0x1c7404[_0x1ac212(0x11f)],_0x1c7404[_0x1ac212(0x117)],_0x1ac212(0xfa));}}return console['error'](a24_0x4ba071[_0x1ac212(0x103)](_0x1ac212(0x10b)+(_0x200a26['length']+_0x86d9c[_0x1ac212(0x101)])+'\x20files\x20to\x20'+_0x23b2ee[_0x1ac212(0x121)])),saveSessionContext({'engage_workspace':_0x23b2ee[_0x1ac212(0x11c)]},_0x80432d[_0x1ac212(0xe4)]),console[_0x1ac212(0x111)](a24_0x4ba071['green'](_0x1ac212(0xf4)+a24_0x4ba071['dim'](_0x1ac212(0xe5))+'\x20=\x20'+a24_0x4ba071[_0x1ac212(0xea)](_0x23b2ee[_0x1ac212(0x11c)]))),0x0;}}async function resolveWorkspaceName(_0x5849f0,_0x39d4d2){const _0x7ba6c3=a24_0x346353;if(_0x5849f0)return _0x5849f0;if(_0x39d4d2[_0x7ba6c3(0x118)])return _0x39d4d2[_0x7ba6c3(0x118)];const _0x2e745e=tryFindTdxConfig(process[_0x7ba6c3(0xfb)]());if(_0x2e745e?.[_0x7ba6c3(0x10d)][_0x7ba6c3(0xe5)])return _0x2e745e['config'][_0x7ba6c3(0xe5)];const _0x3a7852=loadSessionContext(_0x39d4d2['session']);if(_0x3a7852?.[_0x7ba6c3(0xe5)])return _0x3a7852['engage_workspace'];return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x5da900=a24_0x4c9a;(function(_0xddbbca,_0x3d3ffc){const _0x42bb7c=a24_0x4c9a,_0x500f51=_0xddbbca();while(!![]){try{const _0x195bfd=parseInt(_0x42bb7c(0x1eb))/0x1*(parseInt(_0x42bb7c(0x1c2))/0x2)+-parseInt(_0x42bb7c(0x1ef))/0x3+-parseInt(_0x42bb7c(0x1c1))/0x4*(parseInt(_0x42bb7c(0x1d8))/0x5)+parseInt(_0x42bb7c(0x1c8))/0x6+-parseInt(_0x42bb7c(0x1f9))/0x7+parseInt(_0x42bb7c(0x209))/0x8*(-parseInt(_0x42bb7c(0x206))/0x9)+parseInt(_0x42bb7c(0x207))/0xa*(parseInt(_0x42bb7c(0x1d6))/0xb);if(_0x195bfd===_0x3d3ffc)break;else _0x500f51['push'](_0x500f51['shift']());}catch(_0x2b9605){_0x500f51['push'](_0x500f51['shift']());}}}(a24_0x5ec1,0x1a2fc));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 a24_0x5ec1(){const _0x2fd79c=['896778iyEuZH','Pushing\x20campaigns...','execute','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','error','def','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20campaigns?','name','\x20\x20\x20\x20','errors','Found\x20','config','\x20new\x20campaigns:','33jtuHxF','path','20KBJAie','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','segment','workspace','yellow','1\x20campaign\x20file:\x20','Resolving\x20references...','✔\x20Updated\x20','dim','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','data','map','update','resolve','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','\x27...','\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)','relativePath','red','24077ozpBGA','Preparing\x20push\x20to\x20workspace\x20\x27','updated','engage','140580KozWlM','yes','dirname','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','\x0aError:','engage_workspace','resolveWorkspaceId','length','configDir','campaign_type','95669SUjiSi','\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','Workspace\x20is\x20required.','action','verbose','setPhase','Push\x20','site','\x20campaigns','green','-\x20no\x20changes\x20applied','\x20campaign\x20files','cwd','89757kDkMgO','397380CMPgeE','created','80oNInwE','\x0aValidation\x20errors\x20in\x20','description','cyan','97468focisn','8jPZJJN','campaignId','engage:campaign:push','dryRun','warnings','\x20campaigns\x20to\x20update:'];a24_0x5ec1=function(){return _0x2fd79c;};return a24_0x5ec1();}function a24_0x4c9a(_0x3430e6,_0x111b3f){_0x3430e6=_0x3430e6-0x1c0;const _0x5ec1e5=a24_0x5ec1();let _0x4c9a35=_0x5ec1e5[_0x3430e6];return _0x4c9a35;}import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a24_0x1cd84a from'chalk';import a24_0xa17919 from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';import{validateCampaignDef}from'../sdk/engage/campaign-validator.js';import{getCampaignUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{[a24_0x5da900(0x1d0)]=a24_0x5da900(0x1c4);[a24_0x5da900(0x20b)]=a24_0x5da900(0x1d9);async[a24_0x5da900(0x1ca)](_0x586104){const _0x5151d3=a24_0x5da900,{options:_0x3d7f51,args:_0x3e0ceb,tdx:_0x1cb54f}=_0x586104,_0xff3c83=_0x3d7f51,_0x5e8a76=_0x3e0ceb[0x0],_0x4b9845=_0x5e8a76?a24_0xa17919[_0x5151d3(0x1e5)](_0x5e8a76):undefined,_0x2140a6=_0x4b9845?isYamlFile(_0x4b9845):![];let _0x2cb080;if(_0x2140a6&&_0x4b9845)_0x2cb080=a24_0xa17919[_0x5151d3(0x1f1)](_0x4b9845);else _0x4b9845?_0x2cb080=_0x4b9845:_0x2cb080=process[_0x5151d3(0x205)]();let _0x5bc24c;const _0x1d3bc7=tryFindTdxConfig(_0x2cb080);_0x1d3bc7?.[_0x5151d3(0x1d4)]['engage_workspace']&&(_0x5bc24c=_0x1d3bc7[_0x5151d3(0x1d4)][_0x5151d3(0x1f4)],!_0x2140a6&&(_0x2cb080=_0x1d3bc7[_0x5151d3(0x1f7)]));_0xff3c83['workspace']&&(_0x5bc24c=_0xff3c83[_0x5151d3(0x1db)]);if(!_0x5bc24c){const _0x1252a3=loadSessionContext(_0xff3c83['session']);_0x1252a3?.[_0x5151d3(0x1f4)]&&(_0x5bc24c=_0x1252a3[_0x5151d3(0x1f4)]);}if(!_0x5bc24c)return console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x1dc)](_0x5151d3(0x1fb))),console[_0x5151d3(0x1cc)](_0x5151d3(0x1fa)),console[_0x5151d3(0x1cc)](_0x5151d3(0x1e8)),console[_0x5151d3(0x1cc)]('\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[_0x5151d3(0x1cc)](_0x5151d3(0x1e6)),0x1;let _0x16e70d;_0x2140a6&&_0x4b9845?_0x16e70d=[_0x4b9845]:_0x16e70d=discoverCampaignFiles(_0x2cb080);if(_0x16e70d[_0x5151d3(0x1f6)]===0x0)return console[_0x5151d3(0x1cc)](a24_0x1cd84a['yellow']('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x2cb080)),console[_0x5151d3(0x1cc)](a24_0x1cd84a['dim'](_0x5151d3(0x1cb))),0x1;const _0x32e5eb=_0x16e70d[_0x5151d3(0x1e3)](_0x168ed7=>parseCampaignFile(_0x168ed7,a24_0xa17919[_0x5151d3(0x1f1)](_0x168ed7))),_0xaf096a=_0x32e5eb[_0x5151d3(0x1f6)]===0x1?_0x5151d3(0x1dd)+_0x32e5eb[0x0]['def']['name']:_0x32e5eb[_0x5151d3(0x1f6)]+_0x5151d3(0x204);console[_0x5151d3(0x1cc)](_0x5151d3(0x1d3)+a24_0x1cd84a[_0x5151d3(0x1c0)](_0xaf096a));let _0x227cb3=![];for(const _0x2b8daf of _0x32e5eb){const _0x4c29e2=validateCampaignDef(_0x2b8daf['def']);if(!_0x4c29e2['valid']){_0x227cb3=!![],console[_0x5151d3(0x1cc)](a24_0x1cd84a['red'](_0x5151d3(0x20a)+_0x2b8daf[_0x5151d3(0x1e9)]+':'));for(const _0x3355f7 of _0x4c29e2['errors']){console[_0x5151d3(0x1cc)]('\x20\x20'+a24_0x1cd84a[_0x5151d3(0x1ea)]('✗')+'\x20'+_0x3355f7[_0x5151d3(0x1d7)]+':\x20'+_0x3355f7['message']);}}for(const _0x502394 of _0x4c29e2[_0x5151d3(0x1c6)]){console['error']('\x20\x20'+a24_0x1cd84a[_0x5151d3(0x1dc)]('⚠')+'\x20'+_0x502394[_0x5151d3(0x1d7)]+':\x20'+_0x502394['message']);}}if(_0x227cb3)return console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x1ea)](_0x5151d3(0x1f2))),0x1;const _0x215437=await _0x1cb54f[_0x5151d3(0x1ee)][_0x5151d3(0x1f5)](_0x5bc24c),_0x590931=await withProgressSpinner(_0x5151d3(0x1ec)+_0x5bc24c+_0x5151d3(0x1e7),_0x4fa9ca=>preparePush({'engage':_0x1cb54f[_0x5151d3(0x1ee)],'segment':_0x1cb54f[_0x5151d3(0x1da)]},_0x32e5eb,_0x215437,{'progress':{'update':_0x110531=>_0x4fa9ca['setPhase'](_0x110531)}}),{'verbose':_0xff3c83[_0x5151d3(0x1fd)]}),_0x2b9ac0=_0x590931[_0x5151d3(0x1e2)];await withProgressSpinner(_0x5151d3(0x1de),_0x147873=>resolveAndBuildInputs({'engage':_0x1cb54f[_0x5151d3(0x1ee)],'segment':_0x1cb54f[_0x5151d3(0x1da)]},_0x2b9ac0,_0x215437,{'progress':{'update':_0xb657fa=>_0x147873[_0x5151d3(0x1fe)](_0xb657fa)}}),{'verbose':_0xff3c83['verbose']});const _0x52fc11=_0x2b9ac0['filter'](_0x51044d=>_0x51044d[_0x5151d3(0x1fc)]==='create'),_0x36610d=_0x2b9ac0['filter'](_0x3a5366=>_0x3a5366[_0x5151d3(0x1fc)]===_0x5151d3(0x1e4));console[_0x5151d3(0x1cc)]('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0x5bc24c+'\x27:');if(_0x52fc11[_0x5151d3(0x1f6)]>0x0){console['error']('\x20\x20'+a24_0x1cd84a['green']('+\x20'+_0x52fc11[_0x5151d3(0x1f6)]+_0x5151d3(0x1d5)));for(const _0x2c2021 of _0x52fc11){console[_0x5151d3(0x1cc)](_0x5151d3(0x1d1)+a24_0x1cd84a[_0x5151d3(0x202)]('+')+'\x20'+_0x2c2021[_0x5151d3(0x1cd)][_0x5151d3(0x1d0)]+'\x20('+_0x2c2021[_0x5151d3(0x1cd)][_0x5151d3(0x1f8)]+')');}}if(_0x36610d[_0x5151d3(0x1f6)]>0x0){console[_0x5151d3(0x1cc)]('\x20\x20'+a24_0x1cd84a[_0x5151d3(0x1dc)]('~\x20'+_0x36610d['length']+_0x5151d3(0x1c7)));for(const _0x4afa38 of _0x36610d){console[_0x5151d3(0x1cc)](_0x5151d3(0x1d1)+a24_0x1cd84a['yellow']('~')+'\x20'+_0x4afa38['def'][_0x5151d3(0x1d0)]+'\x20('+_0x4afa38[_0x5151d3(0x1cd)][_0x5151d3(0x1f8)]+')');}}if(_0x52fc11[_0x5151d3(0x1f6)]===0x0&&_0x36610d['length']===0x0)return console[_0x5151d3(0x1cc)](a24_0x1cd84a['green']('\u2714\x20All\x20campaigns\x20are\x20up\x20to\x20date')),0x0;if(_0xff3c83[_0x5151d3(0x1c5)])return console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x1dc)](_0x5151d3(0x1e1))),0x0;if(!_0xff3c83[_0x5151d3(0x1f0)]){if(!isInteractive())return console[_0x5151d3(0x1cc)](a24_0x1cd84a['red'](_0x5151d3(0x1f3)),_0x5151d3(0x1ce)),console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x1e0)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xed9149=await confirmKey(_0x5151d3(0x1ff)+(_0x52fc11[_0x5151d3(0x1f6)]+_0x36610d['length'])+_0x5151d3(0x1cf));if(!_0xed9149)return console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x1dc)]('Aborted.'),_0x5151d3(0x203)),0x1;}const _0x354e22=await withProgressSpinner(_0x5151d3(0x1c9),_0x3e421a=>executePush({'engage':_0x1cb54f[_0x5151d3(0x1ee)],'segment':_0x1cb54f['segment']},_0x2b9ac0,{'progress':{'update':_0x2eb1f6=>_0x3e421a[_0x5151d3(0x1fe)](_0x2eb1f6)}}),{'verbose':_0xff3c83[_0x5151d3(0x1fd)]}),_0x1e1c7c=_0x354e22[_0x5151d3(0x1e2)];for(const _0x399038 of _0x1e1c7c['results']){if(_0x399038[_0x5151d3(0x1c3)]&&(_0x399038['action']===_0x5151d3(0x208)||_0x399038[_0x5151d3(0x1fc)]===_0x5151d3(0x1ed))){const _0xe13415=getCampaignUrl(_0xff3c83[_0x5151d3(0x200)],_0x215437,_0x399038[_0x5151d3(0x1c3)]),_0x338b13=_0x399038[_0x5151d3(0x1fc)]===_0x5151d3(0x208)?'+':'~',_0x557e5d=_0x399038[_0x5151d3(0x1fc)]===_0x5151d3(0x208)?a24_0x1cd84a[_0x5151d3(0x202)](_0x338b13):a24_0x1cd84a[_0x5151d3(0x1dc)](_0x338b13);console[_0x5151d3(0x1cc)]('\x20\x20'+_0x557e5d+'\x20'+hyperlink(_0x399038[_0x5151d3(0x1d0)],_0xe13415)+'\x20'+a24_0x1cd84a[_0x5151d3(0x1e0)](_0xe13415));}}_0x1e1c7c[_0x5151d3(0x208)]>0x0&&console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x202)]('✔\x20Created\x20'+_0x1e1c7c[_0x5151d3(0x208)]+_0x5151d3(0x201)));_0x1e1c7c[_0x5151d3(0x1ed)]>0x0&&console[_0x5151d3(0x1cc)](a24_0x1cd84a[_0x5151d3(0x202)](_0x5151d3(0x1df)+_0x1e1c7c['updated']+_0x5151d3(0x201)));if(_0x1e1c7c[_0x5151d3(0x1d2)][_0x5151d3(0x1f6)]>0x0){console[_0x5151d3(0x1cc)](a24_0x1cd84a['red']('✘\x20'+_0x1e1c7c[_0x5151d3(0x1d2)][_0x5151d3(0x1f6)]+'\x20errors:'));for(const _0x4cf355 of _0x1e1c7c[_0x5151d3(0x1d2)]){console[_0x5151d3(0x1cc)]('\x20\x20'+a24_0x1cd84a[_0x5151d3(0x1ea)](_0x4cf355[_0x5151d3(0x1d0)])+':\x20'+_0x4cf355[_0x5151d3(0x1cc)]);}}return saveSessionContext({'engage_workspace':_0x5bc24c},_0xff3c83['session']),_0x1e1c7c['errors'][_0x5151d3(0x1f6)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a25_0x114dec=a25_0xe260;(function(_0x4959e4,_0x455fe9){const _0x4e704e=a25_0xe260,_0x17f622=_0x4959e4();while(!![]){try{const _0x19a504=-parseInt(_0x4e704e(0xbc))/0x1*(parseInt(_0x4e704e(0xdb))/0x2)+parseInt(_0x4e704e(0xce))/0x3*(-parseInt(_0x4e704e(0x96))/0x4)+-parseInt(_0x4e704e(0xa9))/0x5*(parseInt(_0x4e704e(0xc3))/0x6)+parseInt(_0x4e704e(0xb7))/0x7*(parseInt(_0x4e704e(0xba))/0x8)+-parseInt(_0x4e704e(0x9f))/0x9*(parseInt(_0x4e704e(0xa3))/0xa)+parseInt(_0x4e704e(0xa2))/0xb*(-parseInt(_0x4e704e(0x93))/0xc)+parseInt(_0x4e704e(0x98))/0xd;if(_0x19a504===_0x455fe9)break;else _0x17f622['push'](_0x17f622['shift']());}catch(_0x4b1b58){_0x17f622['push'](_0x17f622['shift']());}}}(a25_0x5481,0x28e30));function a25_0x5481(){const _0x43fa45=['create','50906wLdEMa','action','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','created','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20campaigns?','12OEHGYh','path','workspace','324tIKXVs','\x20campaigns\x20to\x20update:','8392306HvYbdV','relativePath','\x27...','red','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','valid','\x0aPush\x20summary\x20for\x20workspace\x20\x27','98658JyUFaX','\x20campaign\x20files','length','2915924kIlBxz','150MHttYv','def','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','resolve','\x20new\x20campaigns:','updated','906605DYrSjj','engage:campaign:push','message','engage','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','errors','setPhase','cyan','filter','dirname','campaignId','map','description','session','49ZMZOhv','yes','data','233400GMFDci','name','2OLCqSc','Push\x20','\x20campaigns','Workspace\x20is\x20required.','\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','segment','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','6uqrweL','1\x20campaign\x20file:\x20','Pushing\x20campaigns...','verbose','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','yellow','\x20\x20\x20\x20','-\x20no\x20changes\x20applied','results','update','config','762LCwzfs','warnings','green','campaign_type','dim','Aborted.','Preparing\x20push\x20to\x20workspace\x20\x27','engage_workspace','\x0aError:','execute','error','configDir'];a25_0x5481=function(){return _0x43fa45;};return a25_0x5481();}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 a25_0xe260(_0x1fe7af,_0x3443bd){_0x1fe7af=_0x1fe7af-0x90;const _0x5481bc=a25_0x5481();let _0xe26013=_0x5481bc[_0x1fe7af];return _0xe26013;}import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import{isYamlFile}from'../sdk/segment/file-discovery.js';import a25_0x41bb3e from'chalk';import a25_0x26d733 from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';import{validateCampaignDef}from'../sdk/engage/campaign-validator.js';import{getCampaignUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';export class EngageCampaignPushCommand extends BaseCommand{[a25_0x114dec(0xbb)]=a25_0x114dec(0xaa);[a25_0x114dec(0xb5)]=a25_0x114dec(0x9c);async[a25_0x114dec(0xd7)](_0x5b87fe){const _0x2c39f9=a25_0x114dec,{options:_0x448f86,args:_0x58e1c0,tdx:_0x560c6d}=_0x5b87fe,_0xd20fd4=_0x448f86,_0x3fa120=_0x58e1c0[0x0],_0x474dc8=_0x3fa120?a25_0x26d733[_0x2c39f9(0xa6)](_0x3fa120):undefined,_0x548fd3=_0x474dc8?isYamlFile(_0x474dc8):![];let _0x52f809;if(_0x548fd3&&_0x474dc8)_0x52f809=a25_0x26d733[_0x2c39f9(0xb2)](_0x474dc8);else _0x474dc8?_0x52f809=_0x474dc8:_0x52f809=process['cwd']();let _0x515ddc;const _0x2949fd=tryFindTdxConfig(_0x52f809);_0x2949fd?.[_0x2c39f9(0xcd)]['engage_workspace']&&(_0x515ddc=_0x2949fd[_0x2c39f9(0xcd)]['engage_workspace'],!_0x548fd3&&(_0x52f809=_0x2949fd[_0x2c39f9(0xd9)]));_0xd20fd4[_0x2c39f9(0x95)]&&(_0x515ddc=_0xd20fd4[_0x2c39f9(0x95)]);if(!_0x515ddc){const _0x4ff988=loadSessionContext(_0xd20fd4[_0x2c39f9(0xb6)]);_0x4ff988?.[_0x2c39f9(0xd5)]&&(_0x515ddc=_0x4ff988[_0x2c39f9(0xd5)]);}if(!_0x515ddc)return console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0xc8)](_0x2c39f9(0xbf))),console[_0x2c39f9(0xd8)]('\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['error']('\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)'),console[_0x2c39f9(0xd8)](_0x2c39f9(0xc0)),console[_0x2c39f9(0xd8)](_0x2c39f9(0xdd)),0x1;let _0x468ee3;_0x548fd3&&_0x474dc8?_0x468ee3=[_0x474dc8]:_0x468ee3=discoverCampaignFiles(_0x52f809);if(_0x468ee3[_0x2c39f9(0xa1)]===0x0)return console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0xc8)](_0x2c39f9(0xad)+_0x52f809)),console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0xd2)](_0x2c39f9(0xc7))),0x1;const _0x5062b4=_0x468ee3[_0x2c39f9(0xb4)](_0x5162fb=>parseCampaignFile(_0x5162fb,a25_0x26d733[_0x2c39f9(0xb2)](_0x5162fb))),_0x202215=_0x5062b4[_0x2c39f9(0xa1)]===0x1?_0x2c39f9(0xc4)+_0x5062b4[0x0][_0x2c39f9(0xa4)][_0x2c39f9(0xbb)]:_0x5062b4[_0x2c39f9(0xa1)]+_0x2c39f9(0xa0);console['error']('Found\x20'+a25_0x41bb3e[_0x2c39f9(0xb0)](_0x202215));let _0x366704=![];for(const _0x553240 of _0x5062b4){const _0x9b8e3b=validateCampaignDef(_0x553240[_0x2c39f9(0xa4)]);if(!_0x9b8e3b[_0x2c39f9(0x9d)]){_0x366704=!![],console['error'](a25_0x41bb3e[_0x2c39f9(0x9b)]('\x0aValidation\x20errors\x20in\x20'+_0x553240[_0x2c39f9(0x99)]+':'));for(const _0x8f7579 of _0x9b8e3b[_0x2c39f9(0xae)]){console[_0x2c39f9(0xd8)]('\x20\x20'+a25_0x41bb3e[_0x2c39f9(0x9b)]('✗')+'\x20'+_0x8f7579[_0x2c39f9(0x94)]+':\x20'+_0x8f7579[_0x2c39f9(0xab)]);}}for(const _0x5e7d36 of _0x9b8e3b[_0x2c39f9(0xcf)]){console[_0x2c39f9(0xd8)]('\x20\x20'+a25_0x41bb3e[_0x2c39f9(0xc8)]('⚠')+'\x20'+_0x5e7d36[_0x2c39f9(0x94)]+':\x20'+_0x5e7d36['message']);}}if(_0x366704)return console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0x9b)]('\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.')),0x1;const _0x49c51c=await _0x560c6d['engage']['resolveWorkspaceId'](_0x515ddc),_0x71a46c=await withProgressSpinner(_0x2c39f9(0xd4)+_0x515ddc+_0x2c39f9(0x9a),_0x2ab66b=>preparePush({'engage':_0x560c6d[_0x2c39f9(0xac)],'segment':_0x560c6d[_0x2c39f9(0xc1)]},_0x5062b4,_0x49c51c,{'progress':{'update':_0x439ffc=>_0x2ab66b[_0x2c39f9(0xaf)](_0x439ffc)}}),{'verbose':_0xd20fd4[_0x2c39f9(0xc6)]}),_0x22cda0=_0x71a46c[_0x2c39f9(0xb9)];await withProgressSpinner('Resolving\x20references...',_0x2c78a4=>resolveAndBuildInputs({'engage':_0x560c6d['engage'],'segment':_0x560c6d['segment']},_0x22cda0,_0x49c51c,{'progress':{'update':_0x41481e=>_0x2c78a4[_0x2c39f9(0xaf)](_0x41481e)}}),{'verbose':_0xd20fd4['verbose']});const _0x492b66=_0x22cda0[_0x2c39f9(0xb1)](_0x42b154=>_0x42b154[_0x2c39f9(0xdc)]===_0x2c39f9(0xda)),_0x1ca26f=_0x22cda0['filter'](_0x38c967=>_0x38c967['action']===_0x2c39f9(0xcc));console['error'](_0x2c39f9(0x9e)+_0x515ddc+'\x27:');if(_0x492b66[_0x2c39f9(0xa1)]>0x0){console[_0x2c39f9(0xd8)]('\x20\x20'+a25_0x41bb3e[_0x2c39f9(0xd0)]('+\x20'+_0x492b66['length']+_0x2c39f9(0xa7)));for(const _0x155980 of _0x492b66){console[_0x2c39f9(0xd8)](_0x2c39f9(0xc9)+a25_0x41bb3e[_0x2c39f9(0xd0)]('+')+'\x20'+_0x155980[_0x2c39f9(0xa4)][_0x2c39f9(0xbb)]+'\x20('+_0x155980[_0x2c39f9(0xa4)]['campaign_type']+')');}}if(_0x1ca26f[_0x2c39f9(0xa1)]>0x0){console[_0x2c39f9(0xd8)]('\x20\x20'+a25_0x41bb3e[_0x2c39f9(0xc8)]('~\x20'+_0x1ca26f[_0x2c39f9(0xa1)]+_0x2c39f9(0x97)));for(const _0x2f9417 of _0x1ca26f){console[_0x2c39f9(0xd8)](_0x2c39f9(0xc9)+a25_0x41bb3e[_0x2c39f9(0xc8)]('~')+'\x20'+_0x2f9417['def'][_0x2c39f9(0xbb)]+'\x20('+_0x2f9417['def'][_0x2c39f9(0xd1)]+')');}}if(_0x492b66[_0x2c39f9(0xa1)]===0x0&&_0x1ca26f[_0x2c39f9(0xa1)]===0x0)return console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0xd0)](_0x2c39f9(0xa5))),0x0;if(_0xd20fd4['dryRun'])return console['error'](a25_0x41bb3e[_0x2c39f9(0xc8)](_0x2c39f9(0xc2))),0x0;if(!_0xd20fd4[_0x2c39f9(0xb8)]){if(!isInteractive())return console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0x9b)](_0x2c39f9(0xd6)),_0x2c39f9(0x91)),console['error'](a25_0x41bb3e['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x61bf7a=await confirmKey(_0x2c39f9(0xbd)+(_0x492b66[_0x2c39f9(0xa1)]+_0x1ca26f[_0x2c39f9(0xa1)])+_0x2c39f9(0x92));if(!_0x61bf7a)return console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0xc8)](_0x2c39f9(0xd3)),_0x2c39f9(0xca)),0x1;}const _0x4a759f=await withProgressSpinner(_0x2c39f9(0xc5),_0x5baf40=>executePush({'engage':_0x560c6d[_0x2c39f9(0xac)],'segment':_0x560c6d[_0x2c39f9(0xc1)]},_0x22cda0,{'progress':{'update':_0x391fec=>_0x5baf40['setPhase'](_0x391fec)}}),{'verbose':_0xd20fd4['verbose']}),_0x5e26be=_0x4a759f[_0x2c39f9(0xb9)];for(const _0x414316 of _0x5e26be[_0x2c39f9(0xcb)]){if(_0x414316[_0x2c39f9(0xb3)]&&(_0x414316['action']===_0x2c39f9(0x90)||_0x414316[_0x2c39f9(0xdc)]===_0x2c39f9(0xa8))){const _0x541cc8=getCampaignUrl(_0xd20fd4['site'],_0x49c51c,_0x414316[_0x2c39f9(0xb3)]),_0x24f28c=_0x414316[_0x2c39f9(0xdc)]===_0x2c39f9(0x90)?'+':'~',_0x2a0cf3=_0x414316[_0x2c39f9(0xdc)]===_0x2c39f9(0x90)?a25_0x41bb3e[_0x2c39f9(0xd0)](_0x24f28c):a25_0x41bb3e['yellow'](_0x24f28c);console[_0x2c39f9(0xd8)]('\x20\x20'+_0x2a0cf3+'\x20'+hyperlink(_0x414316['name'],_0x541cc8)+'\x20'+a25_0x41bb3e[_0x2c39f9(0xd2)](_0x541cc8));}}_0x5e26be[_0x2c39f9(0x90)]>0x0&&console['error'](a25_0x41bb3e[_0x2c39f9(0xd0)]('✔\x20Created\x20'+_0x5e26be[_0x2c39f9(0x90)]+_0x2c39f9(0xbe)));_0x5e26be[_0x2c39f9(0xa8)]>0x0&&console['error'](a25_0x41bb3e['green']('✔\x20Updated\x20'+_0x5e26be[_0x2c39f9(0xa8)]+_0x2c39f9(0xbe)));if(_0x5e26be[_0x2c39f9(0xae)]['length']>0x0){console[_0x2c39f9(0xd8)](a25_0x41bb3e[_0x2c39f9(0x9b)]('✘\x20'+_0x5e26be[_0x2c39f9(0xae)][_0x2c39f9(0xa1)]+'\x20errors:'));for(const _0x1712a4 of _0x5e26be[_0x2c39f9(0xae)]){console[_0x2c39f9(0xd8)]('\x20\x20'+a25_0x41bb3e[_0x2c39f9(0x9b)](_0x1712a4[_0x2c39f9(0xbb)])+':\x20'+_0x1712a4['error']);}}return saveSessionContext({'engage_workspace':_0x515ddc},_0xd20fd4[_0x2c39f9(0xb6)]),_0x5e26be[_0x2c39f9(0xae)][_0x2c39f9(0xa1)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a26_0x512ff9=a26_0x4768;function a26_0x48ba(){const _0x5748fe=['relativePath','\x20(skipped:\x20','green','cwd','2463430Bapxxk','execute','warningCount','2242919IDvACo','skippedCount','description','valid','8cIOZCa','log','error','4340412mWNSZL','dim','685320KOtoAD','\x20warning(s)','length','46711XPqNeg','name','validCount','yellow','\x20valid','\x20campaign(s)\x20with\x20errors,\x20','\x20non-campaign\x20file(s)\x20skipped','6aboowm','Validate\x20campaign\x20YAML\x20files','✔\x20All\x20','.yaml','Validation\x20failed:\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','verbose','.yml','2291730AjVTCK','red','resolve','1623708MjrpsI','endsWith','2lBGufn','\x20warning(s)\x20found','\x20error(s)','dirname'];a26_0x48ba=function(){return _0x5748fe;};return a26_0x48ba();}(function(_0x4749b7,_0x43c7a6){const _0x5691df=a26_0x4768,_0x2d907c=_0x4749b7();while(!![]){try{const _0x1e7d21=parseInt(_0x5691df(0x13d))/0x1*(parseInt(_0x5691df(0x151))/0x2)+-parseInt(_0x5691df(0x13a))/0x3+parseInt(_0x5691df(0x14f))/0x4+parseInt(_0x5691df(0x159))/0x5+-parseInt(_0x5691df(0x144))/0x6*(-parseInt(_0x5691df(0x15c))/0x7)+parseInt(_0x5691df(0x135))/0x8*(-parseInt(_0x5691df(0x138))/0x9)+-parseInt(_0x5691df(0x14c))/0xa;if(_0x1e7d21===_0x43c7a6)break;else _0x2d907c['push'](_0x2d907c['shift']());}catch(_0x4912a6){_0x2d907c['push'](_0x2d907c['shift']());}}}(a26_0x48ba,0x4f8e4));import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';function a26_0x4768(_0xd1359c,_0x11e5fe){_0xd1359c=_0xd1359c-0x134;const _0x48baf9=a26_0x48ba();let _0x4768ee=_0x48baf9[_0xd1359c];return _0x4768ee;}import a26_0x2160a2 from'chalk';import a26_0xebbab from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class EngageCampaignValidateCommand extends BaseCommand{[a26_0x512ff9(0x13e)]='engage:campaign:validate';[a26_0x512ff9(0x15e)]=a26_0x512ff9(0x145);async[a26_0x512ff9(0x15a)](_0x28ff62){const _0x53a272=a26_0x512ff9,{options:_0x5a89fa,args:_0x313a42}=_0x28ff62,_0x27eb85=_0x5a89fa,_0x108a02=_0x313a42[0x0],_0x128a89=_0x108a02?a26_0xebbab[_0x53a272(0x14e)](_0x108a02):undefined,_0x2fc315=_0x128a89?isYamlFile(_0x128a89):![];let _0x1b136e,_0x5e016b;if(_0x2fc315&&_0x128a89)_0x1b136e=a26_0xebbab[_0x53a272(0x154)](_0x128a89),_0x5e016b=_0x128a89;else _0x128a89?_0x1b136e=_0x128a89:_0x1b136e=process[_0x53a272(0x158)]();if(!_0x5e016b&&!existsSync(_0x1b136e))return console[_0x53a272(0x137)](a26_0x2160a2[_0x53a272(0x14d)]('Error:\x20Directory\x20not\x20found:\x20'+_0x1b136e+'\x0a')),0x1;let _0x566710;if(_0x5e016b){if(!_0x5e016b['endsWith'](_0x53a272(0x14b))&&!_0x5e016b[_0x53a272(0x150)](_0x53a272(0x147)))return console[_0x53a272(0x137)](a26_0x2160a2[_0x53a272(0x14d)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x5e016b+'\x0a')),0x1;_0x566710=[_0x5e016b];}else _0x566710=findYamlFiles(_0x1b136e);if(_0x566710[_0x53a272(0x13c)]===0x0)return console[_0x53a272(0x137)](a26_0x2160a2[_0x53a272(0x14d)](_0x53a272(0x149)+_0x1b136e+'\x0a')),0x1;const _0x1bd3f0=validateYamlFiles(_0x566710,_0x1b136e,{'filterType':'campaign'}),_0x26e50b=calculateSummary(_0x1bd3f0),_0x158388=_0x1bd3f0['filter'](isValidationResult);if(_0x158388[_0x53a272(0x13c)]===0x0)return console[_0x53a272(0x137)](a26_0x2160a2[_0x53a272(0x140)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x1b136e+'\x0a')),_0x26e50b[_0x53a272(0x15d)]>0x0&&console[_0x53a272(0x137)](a26_0x2160a2[_0x53a272(0x139)]('('+_0x26e50b[_0x53a272(0x15d)]+'\x20non-campaign\x20file(s)\x20skipped)')),0x0;for(const _0x449baa of _0x1bd3f0){if(!isValidationResult(_0x449baa)){_0x27eb85[_0x53a272(0x14a)]&&console[_0x53a272(0x136)](a26_0x2160a2['dim']('-\x20'+_0x449baa[_0x53a272(0x155)]+_0x53a272(0x156)+_0x449baa['reason']+')'));continue;}const {relativePath:_0x2ca27a,source:_0x1356a8,result:_0x8d87bd}=_0x449baa;if(_0x8d87bd[_0x53a272(0x134)]&&_0x8d87bd['warnings'][_0x53a272(0x13c)]===0x0)_0x27eb85['verbose']&&console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x157)]('✔\x20'+_0x2ca27a));else _0x8d87bd[_0x53a272(0x134)]?(console['log'](a26_0x2160a2['yellow']('⚠\x20'+_0x2ca27a+':\x20'+_0x8d87bd['warnings'][_0x53a272(0x13c)]+_0x53a272(0x13b))),console['log'](formatValidationResult(_0x8d87bd,_0x1356a8,_0x2ca27a))):(console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x14d)]('✖\x20'+_0x2ca27a+':\x20'+_0x8d87bd['errors']['length']+_0x53a272(0x153))),console['log'](formatValidationResult(_0x8d87bd,_0x1356a8,_0x2ca27a)));}return console[_0x53a272(0x136)](''),_0x26e50b['hasErrors']?(console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x14d)](_0x53a272(0x148)+_0x26e50b['invalidCount']+_0x53a272(0x142)+_0x26e50b[_0x53a272(0x13f)]+_0x53a272(0x141))),_0x26e50b[_0x53a272(0x15b)]>0x0&&console['log'](a26_0x2160a2[_0x53a272(0x140)](_0x26e50b[_0x53a272(0x15b)]+_0x53a272(0x152))),_0x26e50b[_0x53a272(0x15d)]>0x0&&console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x139)](_0x26e50b['skippedCount']+_0x53a272(0x143))),0x1):(console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x157)](_0x53a272(0x146)+_0x26e50b[_0x53a272(0x13f)]+'\x20campaign(s)\x20valid')),_0x26e50b[_0x53a272(0x15b)]>0x0&&console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x140)](_0x26e50b[_0x53a272(0x15b)]+_0x53a272(0x152))),_0x26e50b[_0x53a272(0x15d)]>0x0&&console[_0x53a272(0x136)](a26_0x2160a2[_0x53a272(0x139)](_0x26e50b[_0x53a272(0x15d)]+_0x53a272(0x143))),0x0);}}
|