@treasuredata/tdx 2026.4.21 → 2026.4.22
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/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +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/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.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.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-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-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.js +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/parent-segment-command.js +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-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/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/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.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/passthrough-server.d.ts +10 -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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.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.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +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/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/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/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/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +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.js +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 +33 -9
- 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/personalization.js +1 -1
- package/dist/sdk/policy.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/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.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.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +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/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/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.js +1 -1
- package/dist/utils/prompt.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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a15_0x102622=a15_0x43b7;(function(_0x222fdd,_0x2902ab){const _0x26c156=a15_0x43b7,_0x45a9cc=_0x222fdd();while(!![]){try{const _0x259915=parseInt(_0x26c156(0x1be))/0x1+-parseInt(_0x26c156(0x1d5))/0x2+parseInt(_0x26c156(0x18e))/0x3+parseInt(_0x26c156(0x1b9))/0x4*(-parseInt(_0x26c156(0x1a8))/0x5)+parseInt(_0x26c156(0x1ea))/0x6+parseInt(_0x26c156(0x1e2))/0x7+parseInt(_0x26c156(0x1c6))/0x8;if(_0x259915===_0x2902ab)break;else _0x45a9cc['push'](_0x45a9cc['shift']());}catch(_0x5151a9){_0x45a9cc['push'](_0x45a9cc['shift']());}}}(a15_0x4c93,0x251ce));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import a15_0x196586 from'chalk';function normalizeSchemaForDisplay(_0x230bce){const _0x8ca03b=a15_0x43b7,_0x5a5756=_0x230bce['properties']||[],_0xb159f9=_0x5a5756[_0x8ca03b(0x180)](_0x4100c4=>_0x4100c4[_0x8ca03b(0x19d)]==='legacy_settings'&&_0x4100c4[_0x8ca03b(0x19b)]===_0x8ca03b(0x17f)&&_0x4100c4[_0x8ca03b(0x1bc)]);if(_0xb159f9?.['properties']){const _0x15d852=_0x5a5756[_0x8ca03b(0x1df)](_0x5164a3=>_0x5164a3[_0x8ca03b(0x19d)]!==_0x8ca03b(0x1a9)&&_0x5164a3[_0x8ca03b(0x19d)]!==_0x8ca03b(0x1a5));return[..._0x15d852,..._0xb159f9[_0x8ca03b(0x1bc)]];}return _0x5a5756[_0x8ca03b(0x1df)](_0x59d745=>_0x59d745[_0x8ca03b(0x19d)]!=='legacy');}function printSchemaFields(_0x43443d,_0x2def27){const _0x357433=a15_0x43b7,_0x5364bf='\x20\x20'[_0x357433(0x1d2)](_0x2def27+0x1),_0x34ea93='\x20\x20'['repeat'](_0x2def27+0x2);for(const _0x177915 of _0x43443d){if(!_0x177915[_0x357433(0x19d)])continue;const _0x403a8b=_0x177915[_0x357433(0x19b)]===_0x357433(0x17f)&&_0x177915[_0x357433(0x1bc)]&&_0x177915[_0x357433(0x1bc)][_0x357433(0x1a3)]>0x0&&_0x177915[_0x357433(0x19d)]!==_0x357433(0x1a5);let _0x2f99a9=''+_0x5364bf+a15_0x196586[_0x357433(0x1e8)](_0x177915['name']);_0x177915[_0x357433(0x1a1)]&&(_0x2f99a9+=':\x20'+_0x177915['title']);if(_0x177915[_0x357433(0x1aa)])_0x2f99a9+=a15_0x196586[_0x357433(0x19f)]('\x20['+_0x177915[_0x357433(0x1aa)]+']');else _0x403a8b&&(_0x2f99a9+=a15_0x196586['dim']('\x20[record]'));console[_0x357433(0x1d6)](_0x2f99a9);_0x177915[_0x357433(0x1ba)]&&console[_0x357433(0x1d6)](''+_0x34ea93+a15_0x196586['dim'](_0x177915[_0x357433(0x1ba)]));if(_0x177915[_0x357433(0x1de)]){const _0x5e0f26=_0x177915[_0x357433(0x1de)]['map'](_0x119427=>typeof _0x119427===_0x357433(0x1ad)&&_0x357433(0x194)in _0x119427?_0x119427[_0x357433(0x194)]:_0x119427)['join'](',\x20');console[_0x357433(0x1d6)](_0x34ea93+_0x357433(0x1a6)+a15_0x196586['yellow'](_0x5e0f26));}_0x177915[_0x357433(0x1c5)]!==undefined&&console['log'](_0x34ea93+_0x357433(0x191)+a15_0x196586[_0x357433(0x1a2)](String(_0x177915[_0x357433(0x1c5)])));if(_0x177915['minimum']!==undefined||_0x177915[_0x357433(0x1cc)]!==undefined){const _0x452ec2=_0x177915[_0x357433(0x1e9)]!==undefined&&_0x177915['maximum']!==undefined?_0x177915['minimum']+_0x357433(0x1b5)+_0x177915[_0x357433(0x1cc)]:_0x177915[_0x357433(0x1e9)]!==undefined?_0x357433(0x1c3)+_0x177915[_0x357433(0x1e9)]:_0x357433(0x181)+_0x177915[_0x357433(0x1cc)];console[_0x357433(0x1d6)](_0x34ea93+'Range:\x20'+a15_0x196586[_0x357433(0x1a2)](_0x452ec2));}if(_0x177915[_0x357433(0x199)]){const _0x5732b9=Object[_0x357433(0x1e6)](_0x177915[_0x357433(0x199)])['map'](([_0x801881,_0x3bf6f7])=>_0x801881+'='+JSON[_0x357433(0x1c0)](_0x3bf6f7))['join'](',\x20');console[_0x357433(0x1d6)](''+_0x34ea93+a15_0x196586[_0x357433(0x19f)](_0x357433(0x1b1)+_0x5732b9));}_0x403a8b&&_0x177915[_0x357433(0x1bc)]&&printSchemaFields(_0x177915[_0x357433(0x1bc)],_0x2def27+0x1);}}export class ConnectionListCommand extends BaseCommand{[a15_0x102622(0x19d)]=a15_0x102622(0x1b2);[a15_0x102622(0x1ba)]=a15_0x102622(0x1b3);async[a15_0x102622(0x190)](_0x29fb5a){const _0x4a24fc=a15_0x102622,{options:_0x4d5ad4,tdx:_0x3c22cd}=_0x29fb5a;_0x4d5ad4[_0x4a24fc(0x1cd)]&&console[_0x4a24fc(0x1d8)](_0x4a24fc(0x188)+_0x4d5ad4[_0x4a24fc(0x1ab)]);const _0x5d0a62=resolveLimit(_0x4d5ad4[_0x4a24fc(0x196)],DEFAULT_LISTING_LIMIT),_0x3bbd82=await withSpinner(_0x4a24fc(0x1a7),()=>_0x3c22cd['connection'][_0x4a24fc(0x1d1)](),{'verbose':_0x4d5ad4[_0x4a24fc(0x1cd)]}),_0x1c933b=_0x3bbd82[_0x4a24fc(0x1dd)];console['error'](_0x4a24fc(0x1d9)+_0x1c933b[_0x4a24fc(0x1a3)]+_0x4a24fc(0x1e3)+(_0x1c933b['length']!==0x1?'s':''));if(isStructuredFormat(_0x4d5ad4)){const _0x1c2670=_0x1c933b['slice'](0x0,_0x5d0a62);await handleSDKOutput(_0x1c2670,{..._0x4d5ad4,'limit':_0x5d0a62});}else{const _0x359843=_0x1c933b[_0x4a24fc(0x1a3)]>0x0?Math[_0x4a24fc(0x1c8)](..._0x1c933b[_0x4a24fc(0x1db)](_0x12fb23=>_0x12fb23[_0x4a24fc(0x19b)]['length'])):0x0,_0x1e5dcd=[];for(const _0x24a0e7 of _0x1c933b){const _0x36b310=a15_0x196586['cyan'](_0x24a0e7[_0x4a24fc(0x19b)][_0x4a24fc(0x1b8)](_0x359843)),_0x5588d7=_0x24a0e7[_0x4a24fc(0x1ca)]?.[_0x4a24fc(0x19d)]?_0x4a24fc(0x1b5)+a15_0x196586['dim'](_0x24a0e7[_0x4a24fc(0x1ca)][_0x4a24fc(0x19d)]):'';_0x1e5dcd['push'](_0x36b310+'\x20\x20'+_0x24a0e7['name']+_0x5588d7);}await writeOutput(_0x1e5dcd[_0x4a24fc(0x1a4)]('\x0a'),_0x4d5ad4[_0x4a24fc(0x1af)],_0x4a24fc(0x1d3));}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{[a15_0x102622(0x19d)]=a15_0x102622(0x187);['description']=a15_0x102622(0x182);[a15_0x102622(0x197)](_0x283d1d){const _0x4b4217=a15_0x102622,{args:_0x27691a}=_0x283d1d;if(!_0x27691a[0x0])return _0x4b4217(0x1ac);return undefined;}async['execute'](_0x572180){const _0x4c85d8=a15_0x102622,{options:_0x2be835,args:_0x40c628,tdx:_0x5b98b5}=_0x572180,_0x5ddc53=_0x40c628[0x0];_0x2be835[_0x4c85d8(0x1cd)]&&(console[_0x4c85d8(0x1d8)](_0x4c85d8(0x188)+_0x2be835[_0x4c85d8(0x1ab)]),console[_0x4c85d8(0x1d8)](_0x4c85d8(0x1e0)+_0x5ddc53));const _0x175b6c=await withSpinner(_0x4c85d8(0x1c2)+_0x5ddc53+_0x4c85d8(0x18f),()=>_0x5b98b5[_0x4c85d8(0x1b0)]['resolve'](_0x5ddc53),{'verbose':_0x2be835['verbose']}),_0xea82ce=_0x175b6c[_0x4c85d8(0x1dd)];return console['error']('✔\x20Found\x20connection:\x20'+_0xea82ce[_0x4c85d8(0x19d)]),await handleSingleObjectOutput(_0xea82ce,_0x2be835),0x0;}}export class ConnectionSchemaCommand extends BaseCommand{['name']='connection:schema';['description']=a15_0x102622(0x19e);[a15_0x102622(0x197)](_0x423aeb){const _0xdef19c=a15_0x102622,{args:_0x44ddae}=_0x423aeb;if(!_0x44ddae[0x0])return _0xdef19c(0x1b7);return undefined;}async[a15_0x102622(0x190)](_0x3f8421){const _0x286049=a15_0x102622,{options:_0x18754d,args:_0x3c77dd,tdx:_0x4bfd6c}=_0x3f8421,_0x470491=_0x3c77dd[0x0];_0x18754d[_0x286049(0x1cd)]&&(console[_0x286049(0x1d8)](_0x286049(0x188)+_0x18754d[_0x286049(0x1ab)]),console[_0x286049(0x1d8)](_0x286049(0x183)+_0x470491));let _0x2c1c4d=_0x470491,_0x47a9c2;try{const _0x78f627=await _0x4bfd6c[_0x286049(0x1b0)][_0x286049(0x1c7)](_0x470491);_0x78f627&&(_0x2c1c4d=_0x78f627[_0x286049(0x19b)],_0x47a9c2=_0x78f627[_0x286049(0x19d)],_0x18754d[_0x286049(0x1cd)]&&console[_0x286049(0x1d8)](_0x286049(0x185)+_0x470491+'\x27\x20as\x20connection\x20name\x20→\x20type:\x20'+_0x2c1c4d));}catch{_0x18754d[_0x286049(0x1cd)]&&console[_0x286049(0x1d8)](_0x286049(0x1da)+_0x470491+_0x286049(0x1dc));}const _0x3e974f=await withSpinner(_0x286049(0x1d7)+_0x2c1c4d+_0x286049(0x18f),()=>_0x4bfd6c[_0x286049(0x1b0)][_0x286049(0x18d)](_0x2c1c4d),{'verbose':_0x18754d[_0x286049(0x1cd)]}),_0x2bfb41=_0x3e974f[_0x286049(0x1dd)];_0x47a9c2?console[_0x286049(0x1d8)](_0x286049(0x1e7)+_0x47a9c2+'\x27\x20(type:\x20'+_0x2c1c4d+')'):console[_0x286049(0x1d8)]('✔\x20Found\x20schema\x20for\x20connector\x20type:\x20'+_0x2c1c4d);if(isStructuredFormat(_0x18754d))await handleSingleObjectOutput(_0x2bfb41,_0x18754d);else{const _0x3326d4=normalizeSchemaForDisplay(_0x2bfb41);_0x47a9c2?(console[_0x286049(0x1d6)](_0x286049(0x1ce)+a15_0x196586[_0x286049(0x1bb)](_0x47a9c2)),console[_0x286049(0x1d6)](_0x286049(0x1e1)+a15_0x196586[_0x286049(0x19f)](_0x2c1c4d))):console[_0x286049(0x1d6)]('\x0aConnector:\x20'+a15_0x196586[_0x286049(0x1bb)](_0x2c1c4d)),_0x3326d4[_0x286049(0x1a3)]>0x0?(console[_0x286049(0x1d6)](a15_0x196586['bold'](_0x286049(0x1ae))),printSchemaFields(_0x3326d4,0x0)):console[_0x286049(0x1d6)](a15_0x196586[_0x286049(0x19f)]('\x0aNo\x20fields\x20defined\x20in\x20schema'));}return 0x0;}}export class ConnectionTypesCommand extends BaseCommand{[a15_0x102622(0x19d)]='connection:types';['description']='List\x20available\x20connector\x20types';async[a15_0x102622(0x190)](_0x558087){const _0x4bfa63=a15_0x102622,{options:_0x5a3e7b,tdx:_0x56a9db}=_0x558087;_0x5a3e7b[_0x4bfa63(0x1cd)]&&console['error'](_0x4bfa63(0x188)+_0x5a3e7b[_0x4bfa63(0x1ab)]);const _0x2127f6=await withSpinner(_0x4bfa63(0x189),()=>_0x56a9db[_0x4bfa63(0x1b0)][_0x4bfa63(0x1d0)](),{'verbose':_0x5a3e7b[_0x4bfa63(0x1cd)]}),_0x134669=_0x2127f6[_0x4bfa63(0x1dd)][_0x4bfa63(0x1cf)]((_0x2e52c5,_0x1b5848)=>_0x2e52c5[_0x4bfa63(0x19b)][_0x4bfa63(0x193)](_0x1b5848[_0x4bfa63(0x19b)]));console[_0x4bfa63(0x1d8)](_0x4bfa63(0x1d9)+_0x134669[_0x4bfa63(0x1a3)]+_0x4bfa63(0x19a)+(_0x134669[_0x4bfa63(0x1a3)]!==0x1?'s':''));if(isStructuredFormat(_0x5a3e7b))await handleSDKOutput(_0x134669,_0x5a3e7b);else{const _0x5516d0=_0x134669[_0x4bfa63(0x1a3)]>0x0?Math['max'](..._0x134669['map'](_0x22f64e=>_0x22f64e[_0x4bfa63(0x19b)][_0x4bfa63(0x1a3)])):0x0,_0x256ff6=[];for(const _0x486fa6 of _0x134669){const _0x35a83d=a15_0x196586[_0x4bfa63(0x1bb)](_0x486fa6[_0x4bfa63(0x19b)]['padStart'](_0x5516d0));_0x256ff6[_0x4bfa63(0x1bf)](_0x35a83d+'\x20\x20'+_0x486fa6[_0x4bfa63(0x19d)]);}await writeOutput(_0x256ff6[_0x4bfa63(0x1a4)]('\x0a'),_0x5a3e7b[_0x4bfa63(0x1af)],_0x4bfa63(0x1d3));}return 0x0;}}export class ConnectionSettingsCommand extends BaseCommand{[a15_0x102622(0x19d)]='connection:settings';[a15_0x102622(0x1ba)]=a15_0x102622(0x1d4);['validate'](_0x1ca6ed){const _0x4df80f=a15_0x102622,{args:_0x24700c}=_0x1ca6ed;if(!_0x24700c[0x0])return _0x4df80f(0x186);return undefined;}async[a15_0x102622(0x190)](_0x5ddac8){const _0x29cbba=a15_0x102622,{options:_0x41bd1d,args:_0x2a6b68,tdx:_0x4927d0}=_0x5ddac8,_0x49b297=_0x2a6b68[0x0];_0x41bd1d[_0x29cbba(0x1cd)]&&(console[_0x29cbba(0x1d8)](_0x29cbba(0x188)+_0x41bd1d['site']),console[_0x29cbba(0x1d8)]('Fetching\x20settings\x20for\x20connector\x20type:\x20'+_0x49b297));const _0x37e414=await withSpinner(_0x29cbba(0x1e5)+_0x49b297+_0x29cbba(0x18f),()=>_0x4927d0[_0x29cbba(0x1b0)][_0x29cbba(0x19c)](_0x49b297),{'verbose':_0x41bd1d['verbose']}),_0x3156fb=_0x37e414['data'];console[_0x29cbba(0x1d8)](_0x29cbba(0x192)+_0x49b297);if(isStructuredFormat(_0x41bd1d))await handleSingleObjectOutput(_0x3156fb,_0x41bd1d);else{console[_0x29cbba(0x1d6)](_0x29cbba(0x195)+a15_0x196586['cyan'](_0x49b297)),console[_0x29cbba(0x1d6)](_0x29cbba(0x1cb)+_0x3156fb[_0x29cbba(0x19d)]);const _0x2d9ad1=_0x3156fb[_0x29cbba(0x198)]||[],_0x36722b=_0x2d9ad1['filter'](_0x3a317d=>_0x3a317d[_0x29cbba(0x18a)]);_0x36722b[_0x29cbba(0x1a3)]>0x0&&(console['log'](a15_0x196586[_0x29cbba(0x18b)](_0x29cbba(0x1bd))),printMetadataSettings(_0x36722b));let _0x5cacf0=![];try{const _0x1250ec=await _0x4927d0[_0x29cbba(0x1b0)][_0x29cbba(0x18d)](_0x49b297),_0x591477=normalizeSchemaForDisplay(_0x1250ec);_0x591477['length']>0x0&&(console[_0x29cbba(0x1d6)](a15_0x196586[_0x29cbba(0x18b)](_0x29cbba(0x1ae))),printSchemaFields(_0x591477,0x0),_0x5cacf0=!![]);}catch{const _0x2d6aef=_0x2d9ad1[_0x29cbba(0x1df)](_0x3e6119=>!_0x3e6119['credential']);_0x2d6aef[_0x29cbba(0x1a3)]>0x0&&(console[_0x29cbba(0x1d6)](a15_0x196586[_0x29cbba(0x18b)]('\x0aAvailable\x20fields:')),printMetadataSettings(_0x2d6aef),_0x5cacf0=!![]);}!_0x5cacf0&&_0x41bd1d[_0x29cbba(0x1cd)]&&console[_0x29cbba(0x1d8)](a15_0x196586['dim']('No\x20available\x20fields\x20for\x20this\x20connector')),_0x36722b[_0x29cbba(0x1a3)]===0x0&&console[_0x29cbba(0x1d6)](a15_0x196586['dim'](_0x29cbba(0x1b6)));}return 0x0;}}function a15_0x4c93(){const _0x28626e=['<=\x20','Show\x20connection\x20details','Resolving\x20connector\x20type\x20or\x20name:\x20','\x20\x20\x20\x20Default:\x20','✔\x20Resolved\x20\x27','Usage:\x20tdx\x20connection\x20settings\x20<type>\x0a\x0aArguments:\x0a\x20\x20<type>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27rest\x27,\x20\x27s3\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20settings\x20rest\x0a\x20\x20tdx\x20connection\x20settings\x20salesforce\x0a\x20\x20tdx\x20connection\x20settings\x20s3\x0a\x0aNote:\x20This\x20shows\x20settings\x20for\x20creating/configuring\x20a\x20connection.\x0aFor\x20activation\x20output\x20settings,\x20use\x20\x27tdx\x20connection\x20schema\x20<type>\x27.\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.','connection:show','Site:\x20','Listing\x20connector\x20types...','credential','bold','\x20\x20\x20\x20Options:\x20','getOutputSchema','202626uJJxwb','\x27...','execute','Default:\x20','✔\x20Found\x20settings\x20for\x20connector\x20type:\x20','localeCompare','value','\x0aConnector:\x20','limit','validate','settings','criteria','\x20connector\x20type','type','getMetadata','name','Show\x20connector\x20output\x20schema\x20for\x20connector_config\x20validation','dim','options','title','blue','length','join','legacy_settings','Options:\x20','Listing\x20connections...','1165eLfNNg','legacy','input','site','Usage:\x20tdx\x20connection\x20show\x20<name>\x0a\x0aArguments:\x0a\x20\x20<name>\x20\x20\x20\x20Connection\x20name\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20show\x20my-s3-connection\x0a\x20\x20tdx\x20connection\x20show\x20\x22My\x20Salesforce\x20Connection\x22','object','\x0aAvailable\x20fields:','output','connection','Show\x20when:\x20','connection:list','List\x20all\x20result\x20output\x20connections','hint','\x20-\x20','\x0aNo\x20credential\x20settings\x20defined','Usage:\x20tdx\x20connection\x20schema\x20<type-or-name>\x0a\x0aArguments:\x0a\x20\x20<type-or-name>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27pgsql\x27,\x20\x27s3\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20or\x20connection\x20name\x20(e.g.,\x20\x27my-salesforce-connection\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20schema\x20salesforce\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20By\x20connector\x20type\x0a\x20\x20tdx\x20connection\x20schema\x20my-s3-connection\x20\x20\x20\x20\x20#\x20By\x20connection\x20name\x0a\x20\x20tdx\x20connection\x20schema\x20pgsql\x0a\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.\x0aUse\x20\x27tdx\x20connection\x20list\x27\x20to\x20list\x20available\x20connections.','padStart','4852EwVGrx','description','cyan','properties','\x0aCredential\x20settings:','63062nFtwmX','push','stringify','label','Fetching\x20connection\x20\x27','>=\x20','\x20\x20\x20\x20','default_value','2285944OxJbsH','findByName','max','hidden','owner','Name:\x20','maximum','verbose','\x0aConnection:\x20','sort','listTypes','list','repeat','table','Show\x20connection-level\x20settings\x20(credentials,\x20authentication)','263038ZxrSzW','log','Fetching\x20schema\x20for\x20\x27','error','✔\x20Found\x20','Treating\x20\x27','map','\x27\x20as\x20connector\x20type','data','enumeration','filter','Looking\x20up\x20connection:\x20','Type:\x20','952476xbVrEs','\x20connection','yellow','Fetching\x20settings\x20for\x20\x27','entries','✔\x20Found\x20schema\x20for\x20connection\x20\x27','green','minimum','82482tBfrEc','record','find'];a15_0x4c93=function(){return _0x28626e;};return a15_0x4c93();}function a15_0x43b7(_0x5e89d3,_0x49a43d){_0x5e89d3=_0x5e89d3-0x17f;const _0x4c93ff=a15_0x4c93();let _0x43b717=_0x4c93ff[_0x5e89d3];return _0x43b717;}function printMetadataSettings(_0x3748df){const _0x4a5dab=a15_0x102622;for(const _0x1ea637 of _0x3748df){if(!_0x1ea637['name'])continue;if(_0x1ea637[_0x4a5dab(0x1c9)])continue;let _0x22e6c4='\x20\x20'+a15_0x196586[_0x4a5dab(0x1e8)](_0x1ea637['name']);_0x1ea637[_0x4a5dab(0x1c1)]&&(_0x22e6c4+=':\x20'+_0x1ea637[_0x4a5dab(0x1c1)]);_0x1ea637[_0x4a5dab(0x19b)]&&(_0x22e6c4+=a15_0x196586[_0x4a5dab(0x19f)]('\x20['+_0x1ea637[_0x4a5dab(0x19b)]+']'));console[_0x4a5dab(0x1d6)](_0x22e6c4);_0x1ea637[_0x4a5dab(0x1b4)]&&console['log'](_0x4a5dab(0x1c4)+a15_0x196586[_0x4a5dab(0x19f)](_0x1ea637[_0x4a5dab(0x1b4)]));if(_0x1ea637[_0x4a5dab(0x1a0)]){const _0x5bccfd=_0x1ea637[_0x4a5dab(0x1a0)][_0x4a5dab(0x1db)](_0x2ded4a=>_0x2ded4a[_0x4a5dab(0x194)])[_0x4a5dab(0x1a4)](',\x20');console[_0x4a5dab(0x1d6)](_0x4a5dab(0x18c)+a15_0x196586[_0x4a5dab(0x1e4)](_0x5bccfd));}_0x1ea637['default_value']!==undefined&&_0x1ea637[_0x4a5dab(0x1c5)]!==null&&console[_0x4a5dab(0x1d6)](_0x4a5dab(0x184)+a15_0x196586[_0x4a5dab(0x1a2)](String(_0x1ea637[_0x4a5dab(0x1c5)])));if(_0x1ea637['criteria']){const _0x2b8e11=Object[_0x4a5dab(0x1e6)](_0x1ea637['criteria'])[_0x4a5dab(0x1db)](([_0xd00a7,_0x18e054])=>_0xd00a7+'='+JSON[_0x4a5dab(0x1c0)](_0x18e054))[_0x4a5dab(0x1a4)](',\x20');console[_0x4a5dab(0x1d6)](_0x4a5dab(0x1c4)+a15_0x196586[_0x4a5dab(0x19f)](_0x4a5dab(0x1b1)+_0x2b8e11));}}}
|
|
1
|
+
const a15_0x33b14e=a15_0x3ea0;function a15_0x49ed(){const _0x5e4fa9=['Fetching\x20settings\x20for\x20connector\x20type:\x20','slice','\x20\x20\x20\x20Default:\x20','1951654wGTkWf','table','Show\x20when:\x20','cyan','properties','231UKznpL','yellow','Usage:\x20tdx\x20connection\x20settings\x20<type>\x0a\x0aArguments:\x0a\x20\x20<type>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27rest\x27,\x20\x27s3\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20settings\x20rest\x0a\x20\x20tdx\x20connection\x20settings\x20salesforce\x0a\x20\x20tdx\x20connection\x20settings\x20s3\x0a\x0aNote:\x20This\x20shows\x20settings\x20for\x20creating/configuring\x20a\x20connection.\x0aFor\x20activation\x20output\x20settings,\x20use\x20\x27tdx\x20connection\x20schema\x20<type>\x27.\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.','\x20connector\x20type','Listing\x20connector\x20types...','maximum','list','>=\x20','default_value','value','List\x20available\x20connector\x20types','minimum','description','Type:\x20','record','✔\x20Resolved\x20\x27','data','bold','Treating\x20\x27','connection:schema','\x20\x20\x20\x20','length','type','25339401WMSNNT','credential','Usage:\x20tdx\x20connection\x20schema\x20<type-or-name>\x0a\x0aArguments:\x0a\x20\x20<type-or-name>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27pgsql\x27,\x20\x27s3\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20or\x20connection\x20name\x20(e.g.,\x20\x27my-salesforce-connection\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20schema\x20salesforce\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20By\x20connector\x20type\x0a\x20\x20tdx\x20connection\x20schema\x20my-s3-connection\x20\x20\x20\x20\x20#\x20By\x20connection\x20name\x0a\x20\x20tdx\x20connection\x20schema\x20pgsql\x0a\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.\x0aUse\x20\x27tdx\x20connection\x20list\x27\x20to\x20list\x20available\x20connections.','✔\x20Found\x20schema\x20for\x20connection\x20\x27','title','\x27...','\x20\x20\x20\x20Options:\x20','\x0aAvailable\x20fields:','legacy','map','\x0aNo\x20fields\x20defined\x20in\x20schema','Show\x20connection-level\x20settings\x20(credentials,\x20authentication)','enumeration','Fetching\x20schema\x20for\x20\x27','\x20-\x20','hidden','name','\x0aConnection:\x20','Fetching\x20settings\x20for\x20\x27','getOutputSchema','connection:types','repeat','join','error','localeCompare','9jdMccZ','Name:\x20','stringify','site','green','criteria','connection','hint','418536mqECjY','\x27\x20as\x20connector\x20type','output','1002290iwVnSe','Listing\x20connections...','✔\x20Found\x20','929336vEQvNn','9987834UmNzRt','filter','connection:show','push','blue','execute','\x27\x20(type:\x20','\x27\x20as\x20connection\x20name\x20→\x20type:\x20','options','Usage:\x20tdx\x20connection\x20show\x20<name>\x0a\x0aArguments:\x0a\x20\x20<name>\x20\x20\x20\x20Connection\x20name\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20show\x20my-s3-connection\x0a\x20\x20tdx\x20connection\x20show\x20\x22My\x20Salesforce\x20Connection\x22','connection:list','Range:\x20','padStart','log','Site:\x20','dim','legacy_settings','entries','getMetadata','\x0aConnector:\x20','verbose','List\x20all\x20result\x20output\x20connections','\x20connection','Show\x20connector\x20output\x20schema\x20for\x20connector_config\x20validation','label','resolve','4084750BZVevh','✔\x20Found\x20schema\x20for\x20connector\x20type:\x20','limit','Show\x20connection\x20details','Options:\x20','owner','validate'];a15_0x49ed=function(){return _0x5e4fa9;};return a15_0x49ed();}(function(_0x2f224a,_0x31ffad){const _0x280b6f=a15_0x3ea0,_0x431177=_0x2f224a();while(!![]){try{const _0x4b9a16=parseInt(_0x280b6f(0x1ed))/0x1+-parseInt(_0x280b6f(0x215))/0x2+-parseInt(_0x280b6f(0x24a))/0x3*(-parseInt(_0x280b6f(0x1f0))/0x4)+parseInt(_0x280b6f(0x20b))/0x5+-parseInt(_0x280b6f(0x1f1))/0x6+-parseInt(_0x280b6f(0x21a))/0x7*(parseInt(_0x280b6f(0x1ea))/0x8)+parseInt(_0x280b6f(0x231))/0x9;if(_0x4b9a16===_0x31ffad)break;else _0x431177['push'](_0x431177['shift']());}catch(_0x49c35d){_0x431177['push'](_0x431177['shift']());}}}(a15_0x49ed,0xeb8c4));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import a15_0x3e35fc from'chalk';function normalizeSchemaForDisplay(_0x3ebeee){const _0x18e64d=a15_0x3ea0,_0x5c95c4=_0x3ebeee[_0x18e64d(0x219)]||[],_0x9ce2c7=_0x5c95c4['find'](_0x3c4f11=>_0x3c4f11[_0x18e64d(0x241)]===_0x18e64d(0x201)&&_0x3c4f11[_0x18e64d(0x230)]===_0x18e64d(0x228)&&_0x3c4f11['properties']);if(_0x9ce2c7?.['properties']){const _0x5a70a2=_0x5c95c4[_0x18e64d(0x1f2)](_0xe2345f=>_0xe2345f[_0x18e64d(0x241)]!=='legacy'&&_0xe2345f[_0x18e64d(0x241)]!==_0x18e64d(0x201));return[..._0x5a70a2,..._0x9ce2c7[_0x18e64d(0x219)]];}return _0x5c95c4[_0x18e64d(0x1f2)](_0x52edd3=>_0x52edd3[_0x18e64d(0x241)]!==_0x18e64d(0x239));}function a15_0x3ea0(_0x20fe55,_0x150594){_0x20fe55=_0x20fe55-0x1ea;const _0x49ed6f=a15_0x49ed();let _0x3ea0c8=_0x49ed6f[_0x20fe55];return _0x3ea0c8;}function printSchemaFields(_0x2b32a3,_0x4e3e7a){const _0x230904=a15_0x3ea0,_0x120c1a='\x20\x20'[_0x230904(0x246)](_0x4e3e7a+0x1),_0x3ad52a='\x20\x20'[_0x230904(0x246)](_0x4e3e7a+0x2);for(const _0x42bdfc of _0x2b32a3){if(!_0x42bdfc['name'])continue;const _0x4b0859=_0x42bdfc[_0x230904(0x230)]===_0x230904(0x228)&&_0x42bdfc[_0x230904(0x219)]&&_0x42bdfc[_0x230904(0x219)][_0x230904(0x22f)]>0x0&&_0x42bdfc[_0x230904(0x241)]!=='legacy_settings';let _0x2e4d0d=''+_0x120c1a+a15_0x3e35fc[_0x230904(0x24e)](_0x42bdfc[_0x230904(0x241)]);_0x42bdfc[_0x230904(0x235)]&&(_0x2e4d0d+=':\x20'+_0x42bdfc[_0x230904(0x235)]);if(_0x42bdfc['input'])_0x2e4d0d+=a15_0x3e35fc[_0x230904(0x200)]('\x20['+_0x42bdfc['input']+']');else _0x4b0859&&(_0x2e4d0d+=a15_0x3e35fc['dim']('\x20[record]'));console['log'](_0x2e4d0d);_0x42bdfc[_0x230904(0x226)]&&console[_0x230904(0x1fe)](''+_0x3ad52a+a15_0x3e35fc['dim'](_0x42bdfc['description']));if(_0x42bdfc[_0x230904(0x23d)]){const _0x6ba152=_0x42bdfc[_0x230904(0x23d)][_0x230904(0x23a)](_0x319291=>typeof _0x319291==='object'&&'value'in _0x319291?_0x319291[_0x230904(0x223)]:_0x319291)[_0x230904(0x247)](',\x20');console[_0x230904(0x1fe)](_0x3ad52a+_0x230904(0x20f)+a15_0x3e35fc[_0x230904(0x21b)](_0x6ba152));}_0x42bdfc[_0x230904(0x222)]!==undefined&&console[_0x230904(0x1fe)](_0x3ad52a+'Default:\x20'+a15_0x3e35fc[_0x230904(0x1f5)](String(_0x42bdfc[_0x230904(0x222)])));if(_0x42bdfc[_0x230904(0x225)]!==undefined||_0x42bdfc[_0x230904(0x21f)]!==undefined){const _0x51a82b=_0x42bdfc[_0x230904(0x225)]!==undefined&&_0x42bdfc['maximum']!==undefined?_0x42bdfc[_0x230904(0x225)]+_0x230904(0x23f)+_0x42bdfc[_0x230904(0x21f)]:_0x42bdfc[_0x230904(0x225)]!==undefined?_0x230904(0x221)+_0x42bdfc[_0x230904(0x225)]:'<=\x20'+_0x42bdfc['maximum'];console[_0x230904(0x1fe)](_0x3ad52a+_0x230904(0x1fc)+a15_0x3e35fc[_0x230904(0x1f5)](_0x51a82b));}if(_0x42bdfc[_0x230904(0x24f)]){const _0x179d2f=Object[_0x230904(0x202)](_0x42bdfc[_0x230904(0x24f)])[_0x230904(0x23a)](([_0x5f279a,_0x443059])=>_0x5f279a+'='+JSON['stringify'](_0x443059))[_0x230904(0x247)](',\x20');console[_0x230904(0x1fe)](''+_0x3ad52a+a15_0x3e35fc[_0x230904(0x200)](_0x230904(0x217)+_0x179d2f));}_0x4b0859&&_0x42bdfc[_0x230904(0x219)]&&printSchemaFields(_0x42bdfc[_0x230904(0x219)],_0x4e3e7a+0x1);}}export class ConnectionListCommand extends BaseCommand{['name']=a15_0x33b14e(0x1fb);['description']=a15_0x33b14e(0x206);async[a15_0x33b14e(0x1f6)](_0x364e2a){const _0x4a20b0=a15_0x33b14e,{options:_0x428063,tdx:_0x574559}=_0x364e2a;_0x428063[_0x4a20b0(0x205)]&&console[_0x4a20b0(0x248)](_0x4a20b0(0x1ff)+_0x428063['site']);const _0x4eb34f=resolveLimit(_0x428063[_0x4a20b0(0x20d)],DEFAULT_LISTING_LIMIT),_0x4d9471=await withSpinner(_0x4a20b0(0x1ee),()=>_0x574559[_0x4a20b0(0x250)][_0x4a20b0(0x220)](),{'verbose':_0x428063['verbose']}),_0x3f8b2f=_0x4d9471['data'];console['error'](_0x4a20b0(0x1ef)+_0x3f8b2f[_0x4a20b0(0x22f)]+_0x4a20b0(0x207)+(_0x3f8b2f[_0x4a20b0(0x22f)]!==0x1?'s':''));if(isStructuredFormat(_0x428063)){const _0x5ded25=_0x3f8b2f[_0x4a20b0(0x213)](0x0,_0x4eb34f);await handleSDKOutput(_0x5ded25,{..._0x428063,'limit':_0x4eb34f});}else{const _0x31fdd2=_0x3f8b2f[_0x4a20b0(0x22f)]>0x0?Math['max'](..._0x3f8b2f[_0x4a20b0(0x23a)](_0x29dc97=>_0x29dc97[_0x4a20b0(0x230)][_0x4a20b0(0x22f)])):0x0,_0x1ca1b2=[];for(const _0x3ba382 of _0x3f8b2f){const _0x9baa5=a15_0x3e35fc[_0x4a20b0(0x218)](_0x3ba382[_0x4a20b0(0x230)][_0x4a20b0(0x1fd)](_0x31fdd2)),_0x311967=_0x3ba382[_0x4a20b0(0x210)]?.[_0x4a20b0(0x241)]?'\x20-\x20'+a15_0x3e35fc[_0x4a20b0(0x200)](_0x3ba382['owner'][_0x4a20b0(0x241)]):'';_0x1ca1b2[_0x4a20b0(0x1f4)](_0x9baa5+'\x20\x20'+_0x3ba382[_0x4a20b0(0x241)]+_0x311967);}await writeOutput(_0x1ca1b2['join']('\x0a'),_0x428063[_0x4a20b0(0x1ec)],_0x4a20b0(0x216));}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{[a15_0x33b14e(0x241)]=a15_0x33b14e(0x1f3);['description']=a15_0x33b14e(0x20e);[a15_0x33b14e(0x211)](_0x199502){const _0x27feb3=a15_0x33b14e,{args:_0x368ac9}=_0x199502;if(!_0x368ac9[0x0])return _0x27feb3(0x1fa);return undefined;}async[a15_0x33b14e(0x1f6)](_0x7576b3){const _0x2dd382=a15_0x33b14e,{options:_0x4e50af,args:_0x32c51a,tdx:_0x46a1cc}=_0x7576b3,_0x4179cf=_0x32c51a[0x0];_0x4e50af[_0x2dd382(0x205)]&&(console[_0x2dd382(0x248)](_0x2dd382(0x1ff)+_0x4e50af[_0x2dd382(0x24d)]),console[_0x2dd382(0x248)]('Looking\x20up\x20connection:\x20'+_0x4179cf));const _0x2617c7=await withSpinner('Fetching\x20connection\x20\x27'+_0x4179cf+_0x2dd382(0x236),()=>_0x46a1cc['connection'][_0x2dd382(0x20a)](_0x4179cf),{'verbose':_0x4e50af[_0x2dd382(0x205)]}),_0x228550=_0x2617c7[_0x2dd382(0x22a)];return console[_0x2dd382(0x248)]('✔\x20Found\x20connection:\x20'+_0x228550[_0x2dd382(0x241)]),await handleSingleObjectOutput(_0x228550,_0x4e50af),0x0;}}export class ConnectionSchemaCommand extends BaseCommand{['name']=a15_0x33b14e(0x22d);[a15_0x33b14e(0x226)]=a15_0x33b14e(0x208);[a15_0x33b14e(0x211)](_0x1c02d2){const _0x1b9bda=a15_0x33b14e,{args:_0x3e9610}=_0x1c02d2;if(!_0x3e9610[0x0])return _0x1b9bda(0x233);return undefined;}async['execute'](_0x3283f7){const _0x3fb2d1=a15_0x33b14e,{options:_0x14de2b,args:_0x35b00d,tdx:_0x2cb05e}=_0x3283f7,_0x5d574a=_0x35b00d[0x0];_0x14de2b[_0x3fb2d1(0x205)]&&(console[_0x3fb2d1(0x248)](_0x3fb2d1(0x1ff)+_0x14de2b[_0x3fb2d1(0x24d)]),console[_0x3fb2d1(0x248)]('Resolving\x20connector\x20type\x20or\x20name:\x20'+_0x5d574a));let _0xc1bc5a=_0x5d574a,_0x38b1de;try{const _0x53de5d=await _0x2cb05e['connection']['findByName'](_0x5d574a);_0x53de5d&&(_0xc1bc5a=_0x53de5d['type'],_0x38b1de=_0x53de5d[_0x3fb2d1(0x241)],_0x14de2b[_0x3fb2d1(0x205)]&&console['error'](_0x3fb2d1(0x229)+_0x5d574a+_0x3fb2d1(0x1f8)+_0xc1bc5a));}catch{_0x14de2b['verbose']&&console['error'](_0x3fb2d1(0x22c)+_0x5d574a+_0x3fb2d1(0x1eb));}const _0x53de44=await withSpinner(_0x3fb2d1(0x23e)+_0xc1bc5a+_0x3fb2d1(0x236),()=>_0x2cb05e[_0x3fb2d1(0x250)][_0x3fb2d1(0x244)](_0xc1bc5a),{'verbose':_0x14de2b[_0x3fb2d1(0x205)]}),_0x5b2386=_0x53de44[_0x3fb2d1(0x22a)];_0x38b1de?console[_0x3fb2d1(0x248)](_0x3fb2d1(0x234)+_0x38b1de+_0x3fb2d1(0x1f7)+_0xc1bc5a+')'):console['error'](_0x3fb2d1(0x20c)+_0xc1bc5a);if(isStructuredFormat(_0x14de2b))await handleSingleObjectOutput(_0x5b2386,_0x14de2b);else{const _0x4774db=normalizeSchemaForDisplay(_0x5b2386);_0x38b1de?(console['log'](_0x3fb2d1(0x242)+a15_0x3e35fc[_0x3fb2d1(0x218)](_0x38b1de)),console[_0x3fb2d1(0x1fe)](_0x3fb2d1(0x227)+a15_0x3e35fc[_0x3fb2d1(0x200)](_0xc1bc5a))):console['log'](_0x3fb2d1(0x204)+a15_0x3e35fc[_0x3fb2d1(0x218)](_0xc1bc5a)),_0x4774db[_0x3fb2d1(0x22f)]>0x0?(console[_0x3fb2d1(0x1fe)](a15_0x3e35fc[_0x3fb2d1(0x22b)](_0x3fb2d1(0x238))),printSchemaFields(_0x4774db,0x0)):console['log'](a15_0x3e35fc[_0x3fb2d1(0x200)](_0x3fb2d1(0x23b)));}return 0x0;}}export class ConnectionTypesCommand extends BaseCommand{[a15_0x33b14e(0x241)]=a15_0x33b14e(0x245);[a15_0x33b14e(0x226)]=a15_0x33b14e(0x224);async[a15_0x33b14e(0x1f6)](_0x2ad308){const _0x5c0d75=a15_0x33b14e,{options:_0x4355e8,tdx:_0x116c6d}=_0x2ad308;_0x4355e8[_0x5c0d75(0x205)]&&console[_0x5c0d75(0x248)]('Site:\x20'+_0x4355e8[_0x5c0d75(0x24d)]);const _0x4921a4=await withSpinner(_0x5c0d75(0x21e),()=>_0x116c6d[_0x5c0d75(0x250)]['listTypes'](),{'verbose':_0x4355e8[_0x5c0d75(0x205)]}),_0x537111=_0x4921a4['data']['sort']((_0x409019,_0x9e658d)=>_0x409019[_0x5c0d75(0x230)][_0x5c0d75(0x249)](_0x9e658d[_0x5c0d75(0x230)]));console['error']('✔\x20Found\x20'+_0x537111[_0x5c0d75(0x22f)]+_0x5c0d75(0x21d)+(_0x537111[_0x5c0d75(0x22f)]!==0x1?'s':''));if(isStructuredFormat(_0x4355e8))await handleSDKOutput(_0x537111,_0x4355e8);else{const _0x2f180c=_0x537111['length']>0x0?Math['max'](..._0x537111[_0x5c0d75(0x23a)](_0x3f4fdd=>_0x3f4fdd[_0x5c0d75(0x230)][_0x5c0d75(0x22f)])):0x0,_0x429f6b=[];for(const _0x51e68b of _0x537111){const _0x15fe98=a15_0x3e35fc[_0x5c0d75(0x218)](_0x51e68b['type']['padStart'](_0x2f180c));_0x429f6b[_0x5c0d75(0x1f4)](_0x15fe98+'\x20\x20'+_0x51e68b['name']);}await writeOutput(_0x429f6b[_0x5c0d75(0x247)]('\x0a'),_0x4355e8[_0x5c0d75(0x1ec)],'table');}return 0x0;}}export class ConnectionSettingsCommand extends BaseCommand{[a15_0x33b14e(0x241)]='connection:settings';[a15_0x33b14e(0x226)]=a15_0x33b14e(0x23c);['validate'](_0x5f43bf){const _0x5f0719=a15_0x33b14e,{args:_0x565950}=_0x5f43bf;if(!_0x565950[0x0])return _0x5f0719(0x21c);return undefined;}async[a15_0x33b14e(0x1f6)](_0x11df0f){const _0x50dc90=a15_0x33b14e,{options:_0x1a9a64,args:_0x62e6e0,tdx:_0x11bdd6}=_0x11df0f,_0x4a0bf1=_0x62e6e0[0x0];_0x1a9a64[_0x50dc90(0x205)]&&(console[_0x50dc90(0x248)]('Site:\x20'+_0x1a9a64[_0x50dc90(0x24d)]),console[_0x50dc90(0x248)](_0x50dc90(0x212)+_0x4a0bf1));const _0x4db0d7=await withSpinner(_0x50dc90(0x243)+_0x4a0bf1+_0x50dc90(0x236),()=>_0x11bdd6['connection'][_0x50dc90(0x203)](_0x4a0bf1),{'verbose':_0x1a9a64[_0x50dc90(0x205)]}),_0x512a99=_0x4db0d7['data'];console[_0x50dc90(0x248)]('✔\x20Found\x20settings\x20for\x20connector\x20type:\x20'+_0x4a0bf1);if(isStructuredFormat(_0x1a9a64))await handleSingleObjectOutput(_0x512a99,_0x1a9a64);else{console['log']('\x0aConnector:\x20'+a15_0x3e35fc['cyan'](_0x4a0bf1)),console[_0x50dc90(0x1fe)](_0x50dc90(0x24b)+_0x512a99['name']);const _0x129423=_0x512a99['settings']||[],_0x449dcd=_0x129423['filter'](_0xb96904=>_0xb96904[_0x50dc90(0x232)]);_0x449dcd[_0x50dc90(0x22f)]>0x0&&(console[_0x50dc90(0x1fe)](a15_0x3e35fc[_0x50dc90(0x22b)]('\x0aCredential\x20settings:')),printMetadataSettings(_0x449dcd));let _0x18eb53=![];try{const _0x5d5ded=await _0x11bdd6[_0x50dc90(0x250)][_0x50dc90(0x244)](_0x4a0bf1),_0x1cab34=normalizeSchemaForDisplay(_0x5d5ded);_0x1cab34[_0x50dc90(0x22f)]>0x0&&(console[_0x50dc90(0x1fe)](a15_0x3e35fc['bold'](_0x50dc90(0x238))),printSchemaFields(_0x1cab34,0x0),_0x18eb53=!![]);}catch{const _0x3d51a7=_0x129423[_0x50dc90(0x1f2)](_0x39463e=>!_0x39463e['credential']);_0x3d51a7['length']>0x0&&(console[_0x50dc90(0x1fe)](a15_0x3e35fc[_0x50dc90(0x22b)](_0x50dc90(0x238))),printMetadataSettings(_0x3d51a7),_0x18eb53=!![]);}!_0x18eb53&&_0x1a9a64[_0x50dc90(0x205)]&&console[_0x50dc90(0x248)](a15_0x3e35fc[_0x50dc90(0x200)]('No\x20available\x20fields\x20for\x20this\x20connector')),_0x449dcd[_0x50dc90(0x22f)]===0x0&&console[_0x50dc90(0x1fe)](a15_0x3e35fc[_0x50dc90(0x200)]('\x0aNo\x20credential\x20settings\x20defined'));}return 0x0;}}function printMetadataSettings(_0x41f024){const _0x22d353=a15_0x33b14e;for(const _0x18993a of _0x41f024){if(!_0x18993a[_0x22d353(0x241)])continue;if(_0x18993a[_0x22d353(0x240)])continue;let _0x15c8e0='\x20\x20'+a15_0x3e35fc[_0x22d353(0x24e)](_0x18993a[_0x22d353(0x241)]);_0x18993a['label']&&(_0x15c8e0+=':\x20'+_0x18993a[_0x22d353(0x209)]);_0x18993a['type']&&(_0x15c8e0+=a15_0x3e35fc[_0x22d353(0x200)]('\x20['+_0x18993a[_0x22d353(0x230)]+']'));console['log'](_0x15c8e0);_0x18993a['hint']&&console['log']('\x20\x20\x20\x20'+a15_0x3e35fc[_0x22d353(0x200)](_0x18993a[_0x22d353(0x251)]));if(_0x18993a[_0x22d353(0x1f9)]){const _0xb0ed1c=_0x18993a[_0x22d353(0x1f9)][_0x22d353(0x23a)](_0x373ab4=>_0x373ab4[_0x22d353(0x223)])[_0x22d353(0x247)](',\x20');console['log'](_0x22d353(0x237)+a15_0x3e35fc[_0x22d353(0x21b)](_0xb0ed1c));}_0x18993a['default_value']!==undefined&&_0x18993a['default_value']!==null&&console['log'](_0x22d353(0x214)+a15_0x3e35fc[_0x22d353(0x1f5)](String(_0x18993a[_0x22d353(0x222)])));if(_0x18993a[_0x22d353(0x24f)]){const _0x3c9626=Object['entries'](_0x18993a[_0x22d353(0x24f)])['map'](([_0x328adb,_0x309c32])=>_0x328adb+'='+JSON[_0x22d353(0x24c)](_0x309c32))['join'](',\x20');console[_0x22d353(0x1fe)](_0x22d353(0x22e)+a15_0x3e35fc[_0x22d353(0x200)](_0x22d353(0x217)+_0x3c9626));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x2bac63=a16_0x5e15;(function(_0x5832c6,_0x4163b0){const _0x260711=a16_0x5e15,_0x1a4a2e=_0x5832c6();while(!![]){try{const _0x41e005=parseInt(_0x260711(0x8b))/0x1*(parseInt(_0x260711(0x89))/0x2)+-parseInt(_0x260711(0x92))/0x3*(parseInt(_0x260711(0x96))/0x4)+parseInt(_0x260711(0x83))/0x5*(parseInt(_0x260711(0x8f))/0x6)+parseInt(_0x260711(0x86))/0x7*(parseInt(_0x260711(0x98))/0x8)+-parseInt(_0x260711(0x88))/0x9+-parseInt(_0x260711(0x9a))/0xa*(-parseInt(_0x260711(0x82))/0xb)+-parseInt(_0x260711(0x95))/0xc;if(_0x41e005===_0x4163b0)break;else _0x1a4a2e['push'](_0x1a4a2e['shift']());}catch(_0x25a5fc){_0x1a4a2e['push'](_0x1a4a2e['shift']());}}}(a16_0x5548,0xb903c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';function a16_0x5e15(_0x21e5e8,_0x41ae6c){_0x21e5e8=_0x21e5e8-0x80;const _0x554884=a16_0x5548();let _0x5e1549=_0x554884[_0x21e5e8];return _0x5e1549;}import{withSpinner}from'../utils/spinner.js';function a16_0x5548(){const _0x5af6bb=['6357012SlodOG','3740oMtZuq','cause','8075368idiQLV','verbose','11659430qOXcFG','name','\x20database','description','databases','✔\x20Found\x20','length','execute','11CejFaL','10WhOgLQ','query','📦\x20','7uHMJLj','site','10185966bLRxaH','10ilBTMZ','listDatabases','150607mPppqk','log','limit','\x20\x20Cause:\x20','2467158ooCzxN','List\x20all\x20databases','Listing\x20databases...','4272YMVyuR','error','Pattern:\x20'];a16_0x5548=function(){return _0x5af6bb;};return a16_0x5548();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';export class DatabasesCommand extends BaseCommand{[a16_0x2bac63(0x9b)]=a16_0x2bac63(0x9e);[a16_0x2bac63(0x9d)]=a16_0x2bac63(0x90);async[a16_0x2bac63(0x81)](_0x57854f){const _0x376721=a16_0x2bac63,{options:_0x4cac3a,args:_0x3e0bcc,tdx:_0x263161}=_0x57854f,_0x3e6b51=_0x3e0bcc[0x0];try{_0x4cac3a[_0x376721(0x99)]&&(console['error']('Site:\x20'+_0x4cac3a[_0x376721(0x87)]),_0x3e6b51&&console[_0x376721(0x93)](_0x376721(0x94)+_0x3e6b51));const _0x3ec43d=resolveLimit(_0x4cac3a[_0x376721(0x8d)],DEFAULT_LISTING_LIMIT),_0x15cbe6=await withSpinner(_0x376721(0x91),()=>_0x263161[_0x376721(0x84)][_0x376721(0x8a)](_0x3e6b51,_0x3ec43d),{'verbose':_0x4cac3a['verbose']}),_0x2c5f1c=_0x15cbe6['data'];console[_0x376721(0x93)](_0x376721(0x9f)+_0x2c5f1c[_0x376721(0x80)]+_0x376721(0x9c)+(_0x2c5f1c['length']!==0x1?'s':''));if(isStructuredFormat(_0x4cac3a))await handleSDKOutput(_0x2c5f1c,{..._0x4cac3a,'limit':_0x3ec43d});else for(const _0x45ac7c of _0x2c5f1c){console[_0x376721(0x8c)](_0x376721(0x85)+_0x45ac7c['database_name']);}return 0x0;}catch(_0x3138ab){if(_0x3138ab instanceof SDKError)return console[_0x376721(0x93)]('Error:\x20'+_0x3138ab['message']),_0x3138ab[_0x376721(0x97)]&&console[_0x376721(0x93)](_0x376721(0x8e)+_0x3138ab['cause']),0x1;throw _0x3138ab;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x15923c=a17_0x3159;(function(_0x42583c,_0x47930c){const _0x3b4da8=a17_0x3159,_0x3e4d26=_0x42583c();while(!![]){try{const _0x395ac1=parseInt(_0x3b4da8(0xa0))/0x1*(-parseInt(_0x3b4da8(0x9d))/0x2)+parseInt(_0x3b4da8(0x92))/0x3+parseInt(_0x3b4da8(0x9b))/0x4*(parseInt(_0x3b4da8(0x9c))/0x5)+parseInt(_0x3b4da8(0x94))/0x6*(-parseInt(_0x3b4da8(0x9f))/0x7)+-parseInt(_0x3b4da8(0x90))/0x8*(parseInt(_0x3b4da8(0x93))/0x9)+-parseInt(_0x3b4da8(0x99))/0xa*(-parseInt(_0x3b4da8(0x9e))/0xb)+-parseInt(_0x3b4da8(0x91))/0xc;if(_0x395ac1===_0x47930c)break;else _0x3e4d26['push'](_0x3e4d26['shift']());}catch(_0x128e7a){_0x3e4d26['push'](_0x3e4d26['shift']());}}}(a17_0x4e41,0x814dd));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{resolveWorkspaceIdFromOptions}from'./engage-command.js';function a17_0x3159(_0x1f8104,_0x522c90){_0x1f8104=_0x1f8104-0x8f;const _0x4e4145=a17_0x4e41();let _0x315954=_0x4e4145[_0x1f8104];return _0x315954;}import{DEFAULT_LLM_LIMIT,resolveLimit}from'../core/constants.js';function a17_0x4e41(){const _0x4fdc0f=['119Ylofvt','6TRnlgG','filter','limit','name','315096WIXvLo','1878396UdZHdB','2427825pakrAn','153podhxt','153372ICDTFw','data','listEmailSenders','description','verbose','30XzWRxf','List\x20email\x20senders','21500hgCevY','905aWMApM','7708QiJxlH','114653wXgikb'];a17_0x4e41=function(){return _0x4fdc0f;};return a17_0x4e41();}export class DeliveryEmailSendersCommand extends BaseCommand{[a17_0x15923c(0x8f)]='delivery:senders';[a17_0x15923c(0x97)]=a17_0x15923c(0x9a);async['execute'](_0x3acf03){const _0x44fcdc=a17_0x15923c,{options:_0x5bf051,args:_0x49cb3c,tdx:_0x42e351}=_0x3acf03,_0x49b380=_0x49cb3c[0x0],_0x3056a5=resolveLimit(_0x5bf051[_0x44fcdc(0xa2)],DEFAULT_LLM_LIMIT),_0x245e73=_0x5bf051,_0x395f85=await resolveWorkspaceIdFromOptions(_0x245e73,_0x42e351),_0x4e1482=await withSpinner('Fetching\x20email\x20senders...',()=>_0x42e351['delivery'][_0x44fcdc(0x96)]({'workspaceId':_0x395f85,'limit':_0x3056a5}),{'verbose':_0x5bf051[_0x44fcdc(0x98)]});let _0x453829=_0x4e1482[_0x44fcdc(0x95)];return _0x49b380&&(_0x453829=_0x4e1482[_0x44fcdc(0x95)][_0x44fcdc(0xa1)](_0x3d0ed2=>matchGlobPattern(_0x3d0ed2[_0x44fcdc(0x8f)],_0x49b380))),await handleSDKOutput(_0x453829,_0x5bf051),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x41f682=a18_0x7f36;function a18_0x7f36(_0x5b9760,_0x24d038){_0x5b9760=_0x5b9760-0x1e4;const _0x1e447b=a18_0x1e44();let _0x7f36eb=_0x1e447b[_0x5b9760];return _0x7f36eb;}(function(_0x1ec33f,_0x117d1a){const _0x44040d=a18_0x7f36,_0x4a4679=_0x1ec33f();while(!![]){try{const _0x5448d8=parseInt(_0x44040d(0x1e7))/0x1*(-parseInt(_0x44040d(0x1eb))/0x2)+-parseInt(_0x44040d(0x1ee))/0x3+-parseInt(_0x44040d(0x208))/0x4*(parseInt(_0x44040d(0x1fc))/0x5)+parseInt(_0x44040d(0x1ec))/0x6+-parseInt(_0x44040d(0x205))/0x7*(-parseInt(_0x44040d(0x1f1))/0x8)+-parseInt(_0x44040d(0x1e6))/0x9*(-parseInt(_0x44040d(0x1fa))/0xa)+-parseInt(_0x44040d(0x1ff))/0xb;if(_0x5448d8===_0x117d1a)break;else _0x4a4679['push'](_0x4a4679['shift']());}catch(_0x17bb2b){_0x4a4679['push'](_0x4a4679['shift']());}}}(a18_0x1e44,0x9856a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a18_0x1e44(){const _0xee980=['Database:\x20','5060180WlpCwD','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','605VpesMn','describeTable','description','6129629MZlZon','Table:\x20','Error:\x20','args','\x20in\x20','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','191723RYDDnl','name','table','4184qNfAbS','message','\x27\x20does\x20not\x20exist','9ZTwlbA','30QkiDrq','Table\x20\x27','length','\x20\x20Cause:\x20','63456NTUKJW','6275610geZEKz','verbose','424167AYuPRl','query','describe','248auJeRT','✔\x20Found\x20','site','validate','error','database','\x20column','cause'];a18_0x1e44=function(){return _0xee980;};return a18_0x1e44();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a18_0x41f682(0x206)]=a18_0x41f682(0x1f0);[a18_0x41f682(0x1fe)]='Describe\x20table\x20schema';async['execute'](_0x31904e){const _0x4d8bc7=a18_0x41f682;return this[_0x4d8bc7(0x1fd)](_0x31904e);}async[a18_0x41f682(0x1fd)](_0x30ee78){const _0x35ab41=a18_0x41f682,{options:_0x2bbc5b,args:_0x3fc544,tdx:_0x424981}=_0x30ee78;let _0x109159;try{_0x109159=parseTableReference(_0x3fc544[0x0]);const _0x233f30=_0x2bbc5b['database'];!_0x109159['database']&&_0x233f30&&(_0x109159[_0x35ab41(0x1f6)]=_0x233f30);const _0x270179=validateTableDescribeReference(_0x109159);if(_0x270179)return console['error'](_0x35ab41(0x201)+_0x270179),0x1;}catch(_0x5e1493){return console[_0x35ab41(0x1f5)](_0x35ab41(0x201)+_0x5e1493[_0x35ab41(0x1e4)]),0x1;}const _0x22ed1f=_0x109159[_0x35ab41(0x1f6)],_0x18910b=_0x109159[_0x35ab41(0x207)];try{_0x2bbc5b['verbose']&&(console['error']('Site:\x20'+_0x2bbc5b[_0x35ab41(0x1f3)]),console['error'](_0x35ab41(0x1f9)+_0x22ed1f),console[_0x35ab41(0x1f5)](_0x35ab41(0x200)+_0x18910b));const _0x13658f=await withSpinner('Describing\x20table\x20'+_0x22ed1f+'.'+_0x18910b+'...',()=>_0x424981[_0x35ab41(0x1ef)][_0x35ab41(0x1fd)](_0x22ed1f,_0x18910b),{'verbose':_0x2bbc5b[_0x35ab41(0x1ed)]}),_0x490d2c=_0x13658f['data'];if(_0x490d2c['length']===0x0)return console[_0x35ab41(0x1f5)]('✖\x20Table\x20not\x20found'),console[_0x35ab41(0x1f5)](_0x35ab41(0x1e8)+_0x22ed1f+'.'+_0x18910b+_0x35ab41(0x1e5)),0x1;return console['error'](_0x35ab41(0x1f2)+_0x490d2c[_0x35ab41(0x1e9)]+_0x35ab41(0x1f7)+(_0x490d2c[_0x35ab41(0x1e9)]!==0x1?'s':'')+_0x35ab41(0x203)+_0x22ed1f+'.'+_0x18910b),await handleSDKOutput(_0x490d2c,_0x2bbc5b),0x0;}catch(_0x1ae592){if(_0x1ae592 instanceof SDKError)return console[_0x35ab41(0x1f5)](_0x35ab41(0x201)+_0x1ae592['message']),_0x1ae592[_0x35ab41(0x1f8)]&&console[_0x35ab41(0x1f5)](_0x35ab41(0x1ea)+_0x1ae592[_0x35ab41(0x1f8)]),0x1;throw _0x1ae592;}}[a18_0x41f682(0x1f4)](_0x5780b0){const _0xbaf898=a18_0x41f682;if(_0x5780b0[_0xbaf898(0x202)]['length']===0x0)return _0xbaf898(0x1fb);if(_0x5780b0[_0xbaf898(0x202)][_0xbaf898(0x1e9)]>0x1)return _0xbaf898(0x204);return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x35068d=a19_0x301b;(function(_0x4512ae,_0x35e157){const _0x61c604=a19_0x301b,_0x1ab9df=_0x4512ae();while(!![]){try{const _0x25e769=parseInt(_0x61c604(0xda))/0x1+-parseInt(_0x61c604(0xff))/0x2+-parseInt(_0x61c604(0x10c))/0x3+parseInt(_0x61c604(0xea))/0x4*(parseInt(_0x61c604(0x105))/0x5)+-parseInt(_0x61c604(0xe8))/0x6+-parseInt(_0x61c604(0xef))/0x7*(parseInt(_0x61c604(0x104))/0x8)+-parseInt(_0x61c604(0xfe))/0x9*(-parseInt(_0x61c604(0xec))/0xa);if(_0x25e769===_0x35e157)break;else _0x1ab9df['push'](_0x1ab9df['shift']());}catch(_0x3cfe7f){_0x1ab9df['push'](_0x1ab9df['shift']());}}}(a19_0x4e6a,0x8f701));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';function a19_0x4e6a(){const _0x3b1e4f=['Pulling\x20campaigns\x20from\x20\x27','8843031DVgpaR','1433320xZgGLd','error','session','yellow','content','439312EMqOlk','5uJZrFH','\x20=\x20','engage:campaign:pull','filter','dim','yes','Workspace\x20is\x20required.','2585076uBOpTB','\x20\x20Target:\x20','\x0aChanges\x20to\x20\x27','repeat','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20unchanged\x20files','engage','utf-8','\x20files?','dirname','red','✔\x20Context\x20set:\x20','\x20campaigns','files','cyan','relativePath','data','553485NSCUql','campaigns','Write\x20','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','Pull\x20campaigns\x20to\x20YAML\x20files','verbose','\x0aPull\x20summary\x20for\x20workspace\x20\x27','type','hasChanges','green','workspaceName','isNew','\x20new\x20files','-\x20no\x20files\x20written','3231888xZGAEv','description','108276pQKJom','No\x20campaigns\x20found\x20in\x20workspace\x20\x27','30oQXdcu','setPhase','\x20files\x20to\x20','105fWEIEW','workspace','Aborted.','dryRun','name','length','targetDir','engage_workspace','absolutePath','✔\x20Pulled\x20','✔\x20All\x20files\x20are\x20up\x20to\x20date','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','cwd','diff'];a19_0x4e6a=function(){return _0x3b1e4f;};return a19_0x4e6a();}import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext,loadSessionContext}from'../core/session.js';import{tryFindTdxConfig}from'../sdk/segment/tdx-config.js';import a19_0x1cece2 from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';import a19_0x45afa3 from'path';import{pullCampaigns}from'../sdk/engage/campaign-pull.js';function a19_0x301b(_0x4edb7e,_0x2958d8){_0x4edb7e=_0x4edb7e-0xcd;const _0x4e6a34=a19_0x4e6a();let _0x301bae=_0x4e6a34[_0x4edb7e];return _0x301bae;}export class EngageCampaignPullCommand extends BaseCommand{[a19_0x35068d(0xf3)]=a19_0x35068d(0x107);[a19_0x35068d(0xe9)]=a19_0x35068d(0xde);async['execute'](_0x2f27ab){const _0x3d6f5a=a19_0x35068d,{options:_0x33464b,args:_0x4fe639,tdx:_0x54a28c}=_0x2f27ab,_0x45aa54=_0x33464b,_0x3f7e07=await resolveWorkspaceName(_0x4fe639[0x0],_0x45aa54);if(!_0x3f7e07)return console[_0x3d6f5a(0x100)](a19_0x1cece2[_0x3d6f5a(0x102)](_0x3d6f5a(0x10b))),console[_0x3d6f5a(0x100)]('\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>'),console[_0x3d6f5a(0x100)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>'),console[_0x3d6f5a(0x100)]('\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>'),0x1;const _0x32bb3a=await withProgressSpinner(_0x3d6f5a(0xfd)+_0x3f7e07+'\x27...',_0x519b6b=>pullCampaigns({'engage':_0x54a28c[_0x3d6f5a(0xcf)],'segment':_0x54a28c['segment']},_0x3f7e07,{'campaignName':_0x45aa54['name'],'campaignType':_0x45aa54[_0x3d6f5a(0xe1)],'progress':{'update':_0x23ba78=>{const _0x1019f6=_0x3d6f5a;_0x519b6b[_0x1019f6(0xed)](_0x23ba78);}}}),{'verbose':_0x45aa54[_0x3d6f5a(0xdf)]}),_0x5cc79b=_0x32bb3a[_0x3d6f5a(0xd9)];if(_0x5cc79b['counts'][_0x3d6f5a(0xdb)]===0x0)return console[_0x3d6f5a(0x100)](a19_0x1cece2['yellow'](_0x3d6f5a(0xeb)+_0x5cc79b[_0x3d6f5a(0xe4)]+'\x27')),0x0;const _0x1ea1a2=_0x5cc79b[_0x3d6f5a(0xd6)][_0x3d6f5a(0x108)](_0x4cc418=>_0x4cc418[_0x3d6f5a(0xe5)]),_0x5bc6b7=_0x5cc79b[_0x3d6f5a(0xd6)][_0x3d6f5a(0x108)](_0x79e576=>!_0x79e576[_0x3d6f5a(0xe5)]&&_0x79e576[_0x3d6f5a(0xe2)]),_0x3249d5=_0x5cc79b[_0x3d6f5a(0xd6)][_0x3d6f5a(0x108)](_0x53cfa6=>!_0x53cfa6['isNew']&&!_0x53cfa6[_0x3d6f5a(0xe2)]);console['error'](_0x3d6f5a(0xe0)+_0x5cc79b[_0x3d6f5a(0xe4)]+'\x27:'),console[_0x3d6f5a(0x100)]('\x20\x20'+a19_0x1cece2['cyan'](_0x5cc79b['counts'][_0x3d6f5a(0xdb)]+_0x3d6f5a(0xd5))),console['error']('\x20\x20'+a19_0x1cece2['green']('+\x20'+_0x1ea1a2[_0x3d6f5a(0xf4)]+_0x3d6f5a(0xe6))),console[_0x3d6f5a(0x100)]('\x20\x20'+a19_0x1cece2[_0x3d6f5a(0x102)]('~\x20'+_0x5bc6b7[_0x3d6f5a(0xf4)]+'\x20changed\x20files')),console[_0x3d6f5a(0x100)]('\x20\x20'+a19_0x1cece2[_0x3d6f5a(0x109)]('=\x20'+_0x3249d5['length']+_0x3d6f5a(0xce))),console[_0x3d6f5a(0x100)](_0x3d6f5a(0x10d)+a19_0x1cece2[_0x3d6f5a(0xd7)](_0x5cc79b[_0x3d6f5a(0xf5)])+'\x0a');if(_0x5bc6b7['length']>0x0)for(const _0x84d4a1 of _0x5bc6b7){console[_0x3d6f5a(0x100)](_0x3d6f5a(0x10e)+_0x84d4a1[_0x3d6f5a(0xd8)]+'\x27:'),console[_0x3d6f5a(0x100)]('─'[_0x3d6f5a(0x10f)](0x3c)),console[_0x3d6f5a(0x100)](_0x84d4a1[_0x3d6f5a(0xfc)]),console[_0x3d6f5a(0x100)]('─'[_0x3d6f5a(0x10f)](0x3c));}if(_0x45aa54[_0x3d6f5a(0xf2)])return console[_0x3d6f5a(0x100)](a19_0x1cece2[_0x3d6f5a(0x102)](_0x3d6f5a(0xdd))),0x0;if(_0x1ea1a2[_0x3d6f5a(0xf4)]===0x0&&_0x5bc6b7[_0x3d6f5a(0xf4)]===0x0)return console['error'](a19_0x1cece2[_0x3d6f5a(0xe3)](_0x3d6f5a(0xf9))),saveSessionContext({'engage_workspace':_0x5cc79b[_0x3d6f5a(0xe4)]},_0x45aa54['session']),0x0;if(!_0x45aa54[_0x3d6f5a(0x10a)]){if(!isInteractive())return console['error'](a19_0x1cece2[_0x3d6f5a(0xd3)]('\x0aError:'),_0x3d6f5a(0xcd)),console[_0x3d6f5a(0x100)](a19_0x1cece2['dim'](_0x3d6f5a(0xfa))),0x1;const _0x437fbe=await confirmKey(_0x3d6f5a(0xdc)+(_0x1ea1a2[_0x3d6f5a(0xf4)]+_0x5bc6b7[_0x3d6f5a(0xf4)])+_0x3d6f5a(0xd1));if(!_0x437fbe)return console[_0x3d6f5a(0x100)](a19_0x1cece2['yellow'](_0x3d6f5a(0xf1)),_0x3d6f5a(0xe7)),0x1;}for(const _0x3ebfef of _0x5cc79b[_0x3d6f5a(0xd6)]){if(_0x3ebfef['isNew']||_0x3ebfef[_0x3d6f5a(0xe2)]){const _0x2e8612=a19_0x45afa3[_0x3d6f5a(0xd2)](_0x3ebfef[_0x3d6f5a(0xf7)]);!existsSync(_0x2e8612)&&mkdirSync(_0x2e8612,{'recursive':!![]}),writeFileSync(_0x3ebfef['absolutePath'],_0x3ebfef[_0x3d6f5a(0x103)],_0x3d6f5a(0xd0));}}return console[_0x3d6f5a(0x100)](a19_0x1cece2[_0x3d6f5a(0xe3)](_0x3d6f5a(0xf8)+(_0x1ea1a2[_0x3d6f5a(0xf4)]+_0x5bc6b7['length'])+_0x3d6f5a(0xee)+_0x5cc79b[_0x3d6f5a(0xf5)])),saveSessionContext({'engage_workspace':_0x5cc79b[_0x3d6f5a(0xe4)]},_0x45aa54[_0x3d6f5a(0x101)]),console[_0x3d6f5a(0x100)](a19_0x1cece2[_0x3d6f5a(0xe3)](_0x3d6f5a(0xd4)+a19_0x1cece2[_0x3d6f5a(0x109)](_0x3d6f5a(0xf6))+_0x3d6f5a(0x106)+a19_0x1cece2[_0x3d6f5a(0xd7)](_0x5cc79b[_0x3d6f5a(0xe4)]))),0x0;}}async function resolveWorkspaceName(_0x25a551,_0x303bce){const _0x2b4917=a19_0x35068d;if(_0x25a551)return _0x25a551;if(_0x303bce[_0x2b4917(0xf0)])return _0x303bce[_0x2b4917(0xf0)];const _0x27f423=tryFindTdxConfig(process[_0x2b4917(0xfb)]());if(_0x27f423?.['config'][_0x2b4917(0xf6)])return _0x27f423['config'][_0x2b4917(0xf6)];const _0x5dab2d=loadSessionContext(_0x303bce['session']);if(_0x5dab2d?.[_0x2b4917(0xf6)])return _0x5dab2d[_0x2b4917(0xf6)];return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a20_0x8323d0=a20_0x4f6a;(function(_0x580098,_0x33552f){const _0x37f795=a20_0x4f6a,_0xad0985=_0x580098();while(!![]){try{const _0x151d28=parseInt(_0x37f795(0xfd))/0x1+-parseInt(_0x37f795(0xd8))/0x2+parseInt(_0x37f795(0x119))/0x3+-parseInt(_0x37f795(0x101))/0x4*(parseInt(_0x37f795(0xe6))/0x5)+parseInt(_0x37f795(0xf1))/0x6*(-parseInt(_0x37f795(0xf0))/0x7)+-parseInt(_0x37f795(0xe1))/0x8+parseInt(_0x37f795(0xee))/0x9;if(_0x151d28===_0x33552f)break;else _0xad0985['push'](_0xad0985['shift']());}catch(_0x202a09){_0xad0985['push'](_0xad0985['shift']());}}}(a20_0x4423,0xcd849));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';function a20_0x4423(){const _0x458e82=['segment','\x20campaigns?','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','-\x20no\x20changes\x20applied','resolveWorkspaceId','Pushing\x20campaigns...','\x0aError:','dirname','valid','execute','name','Push\x20','engage:campaign:push','relativePath','configDir','\x20campaigns','1051338raEFWM','warnings','config','\x0aPush\x20summary\x20for\x20workspace\x20\x27','updated','results','dim','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','3047656XmTSfj','\x0aValidation\x20errors\x20in\x20','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','engage_workspace','\x20\x20\x20\x20','✔\x20Updated\x20','workspace','length','\x20campaigns\x20to\x20update:','3109392ElQclm','campaignId','def','\x27...','Workspace\x20is\x20required.','4395RLrdPa','red','campaign_type','map','errors','update','message','data','30585249HpmXza','path','7MNUalT','956952syYrPj','green','\x20campaign\x20files','Resolving\x20references...','\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','setPhase','engage','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','create','\x20errors:','verbose','\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)','229457ReHeKs','description','yellow','1\x20campaign\x20file:\x20','4844mBuwEt','session','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Found\x20','error','created','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','action'];a20_0x4423=function(){return _0x458e82;};return a20_0x4423();}import a20_0xb116b2 from'chalk';import a20_0x1d533d from'path';import{discoverCampaignFiles,parseCampaignFile,preparePush,resolveAndBuildInputs,executePush}from'../sdk/engage/campaign-push.js';function a20_0x4f6a(_0x55ffd7,_0x5808a5){_0x55ffd7=_0x55ffd7-0xd1;const _0x442308=a20_0x4423();let _0x4f6ada=_0x442308[_0x55ffd7];return _0x4f6ada;}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{[a20_0x8323d0(0x113)]=a20_0x8323d0(0x115);[a20_0x8323d0(0xfe)]='Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns';async[a20_0x8323d0(0x112)](_0x550d4e){const _0x16c522=a20_0x8323d0,{options:_0x10688c,args:_0x2b5327,tdx:_0x5cc08f}=_0x550d4e,_0x47a2cf=_0x10688c,_0x4c54b6=_0x2b5327[0x0],_0xc2772b=_0x4c54b6?a20_0x1d533d['resolve'](_0x4c54b6):undefined,_0x4864c0=_0xc2772b?isYamlFile(_0xc2772b):![];let _0x4af2c7;if(_0x4864c0&&_0xc2772b)_0x4af2c7=a20_0x1d533d[_0x16c522(0x110)](_0xc2772b);else _0xc2772b?_0x4af2c7=_0xc2772b:_0x4af2c7=process['cwd']();let _0x119f92;const _0x27d873=tryFindTdxConfig(_0x4af2c7);_0x27d873?.[_0x16c522(0xd2)][_0x16c522(0xdb)]&&(_0x119f92=_0x27d873['config'][_0x16c522(0xdb)],!_0x4864c0&&(_0x4af2c7=_0x27d873[_0x16c522(0x117)]));_0x47a2cf[_0x16c522(0xde)]&&(_0x119f92=_0x47a2cf[_0x16c522(0xde)]);if(!_0x119f92){const _0x1c0dd7=loadSessionContext(_0x47a2cf['session']);_0x1c0dd7?.[_0x16c522(0xdb)]&&(_0x119f92=_0x1c0dd7['engage_workspace']);}if(!_0x119f92)return console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xff)](_0x16c522(0xe5))),console[_0x16c522(0x105)]('\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[_0x16c522(0x105)](_0x16c522(0xfc)),console['error'](_0x16c522(0xf5)),console['error'](_0x16c522(0xda)),0x1;let _0x37261b;_0x4864c0&&_0xc2772b?_0x37261b=[_0xc2772b]:_0x37261b=discoverCampaignFiles(_0x4af2c7);if(_0x37261b['length']===0x0)return console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xff)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x4af2c7)),console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xd6)](_0x16c522(0x107))),0x1;const _0x2264a1=_0x37261b[_0x16c522(0xe9)](_0x4ce018=>parseCampaignFile(_0x4ce018,a20_0x1d533d['dirname'](_0x4ce018))),_0xdd10f1=_0x2264a1[_0x16c522(0xdf)]===0x1?_0x16c522(0x100)+_0x2264a1[0x0][_0x16c522(0xe3)][_0x16c522(0x113)]:_0x2264a1[_0x16c522(0xdf)]+_0x16c522(0xf3);console[_0x16c522(0x105)](_0x16c522(0x104)+a20_0xb116b2['cyan'](_0xdd10f1));let _0x437fc6=![];for(const _0x38f3fe of _0x2264a1){const _0x496c05=validateCampaignDef(_0x38f3fe[_0x16c522(0xe3)]);if(!_0x496c05[_0x16c522(0x111)]){_0x437fc6=!![],console[_0x16c522(0x105)](a20_0xb116b2['red'](_0x16c522(0xd9)+_0x38f3fe[_0x16c522(0x116)]+':'));for(const _0x51575c of _0x496c05[_0x16c522(0xea)]){console[_0x16c522(0x105)]('\x20\x20'+a20_0xb116b2[_0x16c522(0xe7)]('✗')+'\x20'+_0x51575c[_0x16c522(0xef)]+':\x20'+_0x51575c['message']);}}for(const _0x2ce47e of _0x496c05[_0x16c522(0xd1)]){console[_0x16c522(0x105)]('\x20\x20'+a20_0xb116b2[_0x16c522(0xff)]('⚠')+'\x20'+_0x2ce47e[_0x16c522(0xef)]+':\x20'+_0x2ce47e[_0x16c522(0xec)]);}}if(_0x437fc6)return console['error'](a20_0xb116b2['red'](_0x16c522(0xd7))),0x1;const _0x1283ca=await _0x5cc08f[_0x16c522(0xf7)][_0x16c522(0x10d)](_0x119f92),_0xad050a=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x119f92+_0x16c522(0xe4),_0x5ab600=>preparePush({'engage':_0x5cc08f[_0x16c522(0xf7)],'segment':_0x5cc08f[_0x16c522(0x109)]},_0x2264a1,_0x1283ca,{'progress':{'update':_0x52fadb=>_0x5ab600[_0x16c522(0xf6)](_0x52fadb)}}),{'verbose':_0x47a2cf[_0x16c522(0xfb)]}),_0x274aeb=_0xad050a['data'];await withProgressSpinner(_0x16c522(0xf4),_0x28991f=>resolveAndBuildInputs({'engage':_0x5cc08f[_0x16c522(0xf7)],'segment':_0x5cc08f[_0x16c522(0x109)]},_0x274aeb,_0x1283ca,{'progress':{'update':_0x2613d9=>_0x28991f[_0x16c522(0xf6)](_0x2613d9)}}),{'verbose':_0x47a2cf[_0x16c522(0xfb)]});const _0x56b4ef=_0x274aeb['filter'](_0x11793a=>_0x11793a[_0x16c522(0x108)]===_0x16c522(0xf9)),_0x4baeb8=_0x274aeb['filter'](_0xf2b62a=>_0xf2b62a[_0x16c522(0x108)]===_0x16c522(0xeb));console['error'](_0x16c522(0xd3)+_0x119f92+'\x27:');if(_0x56b4ef[_0x16c522(0xdf)]>0x0){console[_0x16c522(0x105)]('\x20\x20'+a20_0xb116b2[_0x16c522(0xf2)]('+\x20'+_0x56b4ef[_0x16c522(0xdf)]+'\x20new\x20campaigns:'));for(const _0x4238fb of _0x56b4ef){console[_0x16c522(0x105)]('\x20\x20\x20\x20'+a20_0xb116b2['green']('+')+'\x20'+_0x4238fb[_0x16c522(0xe3)]['name']+'\x20('+_0x4238fb[_0x16c522(0xe3)][_0x16c522(0xe8)]+')');}}if(_0x4baeb8['length']>0x0){console['error']('\x20\x20'+a20_0xb116b2[_0x16c522(0xff)]('~\x20'+_0x4baeb8[_0x16c522(0xdf)]+_0x16c522(0xe0)));for(const _0x62c8db of _0x4baeb8){console['error'](_0x16c522(0xdc)+a20_0xb116b2['yellow']('~')+'\x20'+_0x62c8db[_0x16c522(0xe3)][_0x16c522(0x113)]+'\x20('+_0x62c8db['def']['campaign_type']+')');}}if(_0x56b4ef[_0x16c522(0xdf)]===0x0&&_0x4baeb8[_0x16c522(0xdf)]===0x0)return console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xf2)]('✔\x20All\x20campaigns\x20are\x20up\x20to\x20date')),0x0;if(_0x47a2cf['dryRun'])return console['error'](a20_0xb116b2[_0x16c522(0xff)](_0x16c522(0xf8))),0x0;if(!_0x47a2cf['yes']){if(!isInteractive())return console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xe7)](_0x16c522(0x10f)),_0x16c522(0x10b)),console['error'](a20_0xb116b2[_0x16c522(0xd6)](_0x16c522(0x103))),0x1;const _0x394cf7=await confirmKey(_0x16c522(0x114)+(_0x56b4ef[_0x16c522(0xdf)]+_0x4baeb8[_0x16c522(0xdf)])+_0x16c522(0x10a));if(!_0x394cf7)return console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xff)]('Aborted.'),_0x16c522(0x10c)),0x1;}const _0x5751c1=await withProgressSpinner(_0x16c522(0x10e),_0xe68914=>executePush({'engage':_0x5cc08f[_0x16c522(0xf7)],'segment':_0x5cc08f[_0x16c522(0x109)]},_0x274aeb,{'progress':{'update':_0x70ad10=>_0xe68914[_0x16c522(0xf6)](_0x70ad10)}}),{'verbose':_0x47a2cf['verbose']}),_0xc8941b=_0x5751c1[_0x16c522(0xed)];for(const _0x528a9a of _0xc8941b[_0x16c522(0xd5)]){if(_0x528a9a[_0x16c522(0xe2)]&&(_0x528a9a[_0x16c522(0x108)]==='created'||_0x528a9a[_0x16c522(0x108)]==='updated')){const _0x2546ab=getCampaignUrl(_0x47a2cf['site'],_0x1283ca,_0x528a9a[_0x16c522(0xe2)]),_0x4b10a8=_0x528a9a[_0x16c522(0x108)]===_0x16c522(0x106)?'+':'~',_0x1f07f5=_0x528a9a[_0x16c522(0x108)]==='created'?a20_0xb116b2[_0x16c522(0xf2)](_0x4b10a8):a20_0xb116b2[_0x16c522(0xff)](_0x4b10a8);console[_0x16c522(0x105)]('\x20\x20'+_0x1f07f5+'\x20'+hyperlink(_0x528a9a[_0x16c522(0x113)],_0x2546ab)+'\x20'+a20_0xb116b2['dim'](_0x2546ab));}}_0xc8941b['created']>0x0&&console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xf2)]('✔\x20Created\x20'+_0xc8941b[_0x16c522(0x106)]+_0x16c522(0x118)));_0xc8941b[_0x16c522(0xd4)]>0x0&&console[_0x16c522(0x105)](a20_0xb116b2[_0x16c522(0xf2)](_0x16c522(0xdd)+_0xc8941b[_0x16c522(0xd4)]+_0x16c522(0x118)));if(_0xc8941b[_0x16c522(0xea)][_0x16c522(0xdf)]>0x0){console[_0x16c522(0x105)](a20_0xb116b2['red']('✘\x20'+_0xc8941b[_0x16c522(0xea)][_0x16c522(0xdf)]+_0x16c522(0xfa)));for(const _0x7bc3ba of _0xc8941b[_0x16c522(0xea)]){console[_0x16c522(0x105)]('\x20\x20'+a20_0xb116b2['red'](_0x7bc3ba[_0x16c522(0x113)])+':\x20'+_0x7bc3ba['error']);}}return saveSessionContext({'engage_workspace':_0x119f92},_0x47a2cf[_0x16c522(0x102)]),_0xc8941b[_0x16c522(0xea)][_0x16c522(0xdf)]>0x0?0x1:0x0;}}
|
|
1
|
+
function a20_0x47a4(_0x61e8b4,_0x1b33a9){_0x61e8b4=_0x61e8b4-0xd6;const _0x48da34=a20_0x48da();let _0x47a407=_0x48da34[_0x61e8b4];return _0x47a407;}function a20_0x48da(){const _0x2bd749=['15285721RiQFSi','site','green','\x0aPush\x20summary\x20for\x20workspace\x20\x27','resolve','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','warnings','def','\x20campaign\x20files','Preparing\x20push\x20to\x20workspace\x20\x27','cyan','Push\x20','5289765DGnybT','dirname','message','1326772mFbWGk','filter','execute','engage','red','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','8AWLoLv','campaignId','\x27...','78754mPOCaB','length','4bJzHFM','update','campaign_type','Aborted.','map','create','name','\x20\x20\x20\x20','segment','verbose','-\x20no\x20changes\x20applied','created','errors','yes','engage_workspace','workspace','\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','results','setPhase','description','\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)','dim','resolveWorkspaceId','18739200cKqdHH','✔\x20Created\x20','\x20campaigns?','5DqAoay','session','action','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','path','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\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','cwd','156jLIzTX','yellow','\x20errors:','relativePath','updated','\x20campaigns','Workspace\x20is\x20required.','dryRun','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','config','configDir','\x0aError:','120162LuiQmH','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','13049496MkZNuz','data','error','✔\x20Updated\x20'];a20_0x48da=function(){return _0x2bd749;};return a20_0x48da();}const a20_0x392a7e=a20_0x47a4;(function(_0x53b7e1,_0x239b1b){const _0x4b1334=a20_0x47a4,_0x10fe6d=_0x53b7e1();while(!![]){try{const _0x29cc56=parseInt(_0x4b1334(0xd6))/0x1*(parseInt(_0x4b1334(0x122))/0x2)+-parseInt(_0x4b1334(0x116))/0x3+parseInt(_0x4b1334(0x119))/0x4*(parseInt(_0x4b1334(0xf0))/0x5)+parseInt(_0x4b1334(0xf8))/0x6*(parseInt(_0x4b1334(0x104))/0x7)+-parseInt(_0x4b1334(0x11f))/0x8*(parseInt(_0x4b1334(0x106))/0x9)+parseInt(_0x4b1334(0xed))/0xa+parseInt(_0x4b1334(0x10a))/0xb;if(_0x29cc56===_0x239b1b)break;else _0x10fe6d['push'](_0x10fe6d['shift']());}catch(_0x304d91){_0x10fe6d['push'](_0x10fe6d['shift']());}}}(a20_0x48da,0xf0af9));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 a20_0x12fa59 from'chalk';import a20_0xedad37 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{[a20_0x392a7e(0xdc)]='engage:campaign:push';[a20_0x392a7e(0xe9)]='Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns';async[a20_0x392a7e(0x11b)](_0x1e540c){const _0x47f2fc=a20_0x392a7e,{options:_0x3928af,args:_0x8cfab1,tdx:_0x4fac7a}=_0x1e540c,_0x1423c3=_0x3928af,_0x2e5f86=_0x8cfab1[0x0],_0x4fdae3=_0x2e5f86?a20_0xedad37[_0x47f2fc(0x10e)](_0x2e5f86):undefined,_0x32b14b=_0x4fdae3?isYamlFile(_0x4fdae3):![];let _0x183cec;if(_0x32b14b&&_0x4fdae3)_0x183cec=a20_0xedad37['dirname'](_0x4fdae3);else _0x4fdae3?_0x183cec=_0x4fdae3:_0x183cec=process[_0x47f2fc(0xf7)]();let _0x541b6e;const _0x20724b=tryFindTdxConfig(_0x183cec);_0x20724b?.[_0x47f2fc(0x101)][_0x47f2fc(0xe4)]&&(_0x541b6e=_0x20724b[_0x47f2fc(0x101)][_0x47f2fc(0xe4)],!_0x32b14b&&(_0x183cec=_0x20724b[_0x47f2fc(0x102)]));_0x1423c3[_0x47f2fc(0xe5)]&&(_0x541b6e=_0x1423c3[_0x47f2fc(0xe5)]);if(!_0x541b6e){const _0x42f556=loadSessionContext(_0x1423c3[_0x47f2fc(0xf1)]);_0x42f556?.['engage_workspace']&&(_0x541b6e=_0x42f556[_0x47f2fc(0xe4)]);}if(!_0x541b6e)return console['error'](a20_0x12fa59['yellow'](_0x47f2fc(0xfe))),console[_0x47f2fc(0x108)](_0x47f2fc(0xe6)),console['error'](_0x47f2fc(0xea)),console[_0x47f2fc(0x108)](_0x47f2fc(0xf6)),console[_0x47f2fc(0x108)](_0x47f2fc(0x105)),0x1;let _0x2bea80;_0x32b14b&&_0x4fdae3?_0x2bea80=[_0x4fdae3]:_0x2bea80=discoverCampaignFiles(_0x183cec);if(_0x2bea80[_0x47f2fc(0x123)]===0x0)return console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0xf9)](_0x47f2fc(0x11e)+_0x183cec)),console[_0x47f2fc(0x108)](a20_0x12fa59['dim']('Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.')),0x1;const _0x2fa276=_0x2bea80[_0x47f2fc(0xda)](_0x899992=>parseCampaignFile(_0x899992,a20_0xedad37[_0x47f2fc(0x117)](_0x899992))),_0x2d8d83=_0x2fa276[_0x47f2fc(0x123)]===0x1?'1\x20campaign\x20file:\x20'+_0x2fa276[0x0][_0x47f2fc(0x111)][_0x47f2fc(0xdc)]:_0x2fa276[_0x47f2fc(0x123)]+_0x47f2fc(0x112);console[_0x47f2fc(0x108)]('Found\x20'+a20_0x12fa59[_0x47f2fc(0x114)](_0x2d8d83));let _0x2d0b3f=![];for(const _0x1651cc of _0x2fa276){const _0x4ef708=validateCampaignDef(_0x1651cc[_0x47f2fc(0x111)]);if(!_0x4ef708['valid']){_0x2d0b3f=!![],console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0x11d)]('\x0aValidation\x20errors\x20in\x20'+_0x1651cc[_0x47f2fc(0xfb)]+':'));for(const _0x57e675 of _0x4ef708[_0x47f2fc(0xe2)]){console[_0x47f2fc(0x108)]('\x20\x20'+a20_0x12fa59[_0x47f2fc(0x11d)]('✗')+'\x20'+_0x57e675['path']+':\x20'+_0x57e675[_0x47f2fc(0x118)]);}}for(const _0x791bd6 of _0x4ef708[_0x47f2fc(0x110)]){console[_0x47f2fc(0x108)]('\x20\x20'+a20_0x12fa59[_0x47f2fc(0xf9)]('⚠')+'\x20'+_0x791bd6[_0x47f2fc(0xf4)]+':\x20'+_0x791bd6[_0x47f2fc(0x118)]);}}if(_0x2d0b3f)return console[_0x47f2fc(0x108)](a20_0x12fa59['red'](_0x47f2fc(0xf3))),0x1;const _0x14100e=await _0x4fac7a[_0x47f2fc(0x11c)][_0x47f2fc(0xec)](_0x541b6e),_0x1c701e=await withProgressSpinner(_0x47f2fc(0x113)+_0x541b6e+_0x47f2fc(0x121),_0x253c09=>preparePush({'engage':_0x4fac7a[_0x47f2fc(0x11c)],'segment':_0x4fac7a[_0x47f2fc(0xde)]},_0x2fa276,_0x14100e,{'progress':{'update':_0x50f1b5=>_0x253c09[_0x47f2fc(0xe8)](_0x50f1b5)}}),{'verbose':_0x1423c3[_0x47f2fc(0xdf)]}),_0x378372=_0x1c701e['data'];await withProgressSpinner('Resolving\x20references...',_0x25f504=>resolveAndBuildInputs({'engage':_0x4fac7a['engage'],'segment':_0x4fac7a[_0x47f2fc(0xde)]},_0x378372,_0x14100e,{'progress':{'update':_0x3112be=>_0x25f504[_0x47f2fc(0xe8)](_0x3112be)}}),{'verbose':_0x1423c3[_0x47f2fc(0xdf)]});const _0x5c2e9f=_0x378372[_0x47f2fc(0x11a)](_0x3db29c=>_0x3db29c[_0x47f2fc(0xf2)]===_0x47f2fc(0xdb)),_0x4d8cd6=_0x378372[_0x47f2fc(0x11a)](_0x576d3b=>_0x576d3b[_0x47f2fc(0xf2)]===_0x47f2fc(0xd7));console[_0x47f2fc(0x108)](_0x47f2fc(0x10d)+_0x541b6e+'\x27:');if(_0x5c2e9f[_0x47f2fc(0x123)]>0x0){console[_0x47f2fc(0x108)]('\x20\x20'+a20_0x12fa59[_0x47f2fc(0x10c)]('+\x20'+_0x5c2e9f[_0x47f2fc(0x123)]+'\x20new\x20campaigns:'));for(const _0x248b88 of _0x5c2e9f){console[_0x47f2fc(0x108)](_0x47f2fc(0xdd)+a20_0x12fa59[_0x47f2fc(0x10c)]('+')+'\x20'+_0x248b88[_0x47f2fc(0x111)][_0x47f2fc(0xdc)]+'\x20('+_0x248b88[_0x47f2fc(0x111)][_0x47f2fc(0xd8)]+')');}}if(_0x4d8cd6[_0x47f2fc(0x123)]>0x0){console[_0x47f2fc(0x108)]('\x20\x20'+a20_0x12fa59[_0x47f2fc(0xf9)]('~\x20'+_0x4d8cd6[_0x47f2fc(0x123)]+'\x20campaigns\x20to\x20update:'));for(const _0x3679df of _0x4d8cd6){console[_0x47f2fc(0x108)](_0x47f2fc(0xdd)+a20_0x12fa59[_0x47f2fc(0xf9)]('~')+'\x20'+_0x3679df[_0x47f2fc(0x111)][_0x47f2fc(0xdc)]+'\x20('+_0x3679df[_0x47f2fc(0x111)][_0x47f2fc(0xd8)]+')');}}if(_0x5c2e9f[_0x47f2fc(0x123)]===0x0&&_0x4d8cd6[_0x47f2fc(0x123)]===0x0)return console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0x10c)]('✔\x20All\x20campaigns\x20are\x20up\x20to\x20date')),0x0;if(_0x1423c3[_0x47f2fc(0xff)])return console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0xf9)](_0x47f2fc(0x100))),0x0;if(!_0x1423c3[_0x47f2fc(0xe3)]){if(!isInteractive())return console[_0x47f2fc(0x108)](a20_0x12fa59['red'](_0x47f2fc(0x103)),_0x47f2fc(0xf5)),console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0xeb)](_0x47f2fc(0x10f))),0x1;const _0x10ed17=await confirmKey(_0x47f2fc(0x115)+(_0x5c2e9f[_0x47f2fc(0x123)]+_0x4d8cd6[_0x47f2fc(0x123)])+_0x47f2fc(0xef));if(!_0x10ed17)return console[_0x47f2fc(0x108)](a20_0x12fa59['yellow'](_0x47f2fc(0xd9)),_0x47f2fc(0xe0)),0x1;}const _0x1d79f9=await withProgressSpinner('Pushing\x20campaigns...',_0x332564=>executePush({'engage':_0x4fac7a['engage'],'segment':_0x4fac7a[_0x47f2fc(0xde)]},_0x378372,{'progress':{'update':_0x4ad800=>_0x332564[_0x47f2fc(0xe8)](_0x4ad800)}}),{'verbose':_0x1423c3[_0x47f2fc(0xdf)]}),_0xc23793=_0x1d79f9[_0x47f2fc(0x107)];for(const _0x1d1455 of _0xc23793[_0x47f2fc(0xe7)]){if(_0x1d1455[_0x47f2fc(0x120)]&&(_0x1d1455[_0x47f2fc(0xf2)]===_0x47f2fc(0xe1)||_0x1d1455['action']==='updated')){const _0x193248=getCampaignUrl(_0x1423c3[_0x47f2fc(0x10b)],_0x14100e,_0x1d1455[_0x47f2fc(0x120)]),_0x9e616c=_0x1d1455[_0x47f2fc(0xf2)]===_0x47f2fc(0xe1)?'+':'~',_0x351447=_0x1d1455[_0x47f2fc(0xf2)]===_0x47f2fc(0xe1)?a20_0x12fa59[_0x47f2fc(0x10c)](_0x9e616c):a20_0x12fa59['yellow'](_0x9e616c);console[_0x47f2fc(0x108)]('\x20\x20'+_0x351447+'\x20'+hyperlink(_0x1d1455[_0x47f2fc(0xdc)],_0x193248)+'\x20'+a20_0x12fa59['dim'](_0x193248));}}_0xc23793['created']>0x0&&console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0x10c)](_0x47f2fc(0xee)+_0xc23793['created']+'\x20campaigns'));_0xc23793['updated']>0x0&&console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0x10c)](_0x47f2fc(0x109)+_0xc23793[_0x47f2fc(0xfc)]+_0x47f2fc(0xfd)));if(_0xc23793[_0x47f2fc(0xe2)]['length']>0x0){console[_0x47f2fc(0x108)](a20_0x12fa59[_0x47f2fc(0x11d)]('✘\x20'+_0xc23793[_0x47f2fc(0xe2)][_0x47f2fc(0x123)]+_0x47f2fc(0xfa)));for(const _0x5b6367 of _0xc23793[_0x47f2fc(0xe2)]){console['error']('\x20\x20'+a20_0x12fa59[_0x47f2fc(0x11d)](_0x5b6367[_0x47f2fc(0xdc)])+':\x20'+_0x5b6367[_0x47f2fc(0x108)]);}}return saveSessionContext({'engage_workspace':_0x541b6e},_0x1423c3['session']),_0xc23793[_0x47f2fc(0xe2)][_0x47f2fc(0x123)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0xef0f63=a21_0x1536;(function(_0x40206b,_0x1a485a){const _0x6f2c79=a21_0x1536,_0x894200=_0x40206b();while(!![]){try{const _0x472327=-parseInt(_0x6f2c79(0xc8))/0x1*(-parseInt(_0x6f2c79(0xd2))/0x2)+-parseInt(_0x6f2c79(0xe4))/0x3+-parseInt(_0x6f2c79(0xd6))/0x4+-parseInt(_0x6f2c79(0xc6))/0x5+parseInt(_0x6f2c79(0xcf))/0x6+parseInt(_0x6f2c79(0xc3))/0x7*(-parseInt(_0x6f2c79(0xe9))/0x8)+-parseInt(_0x6f2c79(0xc9))/0x9*(-parseInt(_0x6f2c79(0xf1))/0xa);if(_0x472327===_0x1a485a)break;else _0x894200['push'](_0x894200['shift']());}catch(_0x397085){_0x894200['push'](_0x894200['shift']());}}}(a21_0x3adf,0xe971c));import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a21_0x136cf7 from'chalk';import a21_0x5ec4be from'path';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a21_0x3adf(){const _0x2626c6=['description','✔\x20All\x20','dirname','resolve','2067512eKjLdz','log','\x20warning(s)','warningCount','invalidCount','.yml','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','endsWith','60ssTwjM','\x20warning(s)\x20found','skippedCount','35vmMBeL','verbose','filter','9521540avXkVW','error','6988dqPpap','6615918ZNXsWC','\x20error(s)','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','reason','hasErrors','validCount','233334SgPqPK','length','red','384kKvHsQ','campaign','execute','\x20campaign(s)\x20valid','5155328HJerDL','dim','green','\x20non-campaign\x20file(s)\x20skipped','yellow','.yaml','Validation\x20failed:\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Validate\x20campaign\x20YAML\x20files','\x20valid','warnings','valid','Error:\x20Directory\x20not\x20found:\x20','\x20(skipped:\x20','1049022sopCVN'];a21_0x3adf=function(){return _0x2626c6;};return a21_0x3adf();}function a21_0x1536(_0x2e9100,_0x978dc5){_0x2e9100=_0x2e9100-0xc3;const _0x3adf96=a21_0x3adf();let _0x1536f2=_0x3adf96[_0x2e9100];return _0x1536f2;}export class EngageCampaignValidateCommand extends BaseCommand{['name']='engage:campaign:validate';[a21_0xef0f63(0xe5)]=a21_0xef0f63(0xde);async[a21_0xef0f63(0xd4)](_0x6b7c1a){const _0x3a57ed=a21_0xef0f63,{options:_0x95a9a1,args:_0x231455}=_0x6b7c1a,_0x4fc272=_0x95a9a1,_0x5c1fcb=_0x231455[0x0],_0x211107=_0x5c1fcb?a21_0x5ec4be[_0x3a57ed(0xe8)](_0x5c1fcb):undefined,_0x45bd8b=_0x211107?isYamlFile(_0x211107):![];let _0xf6900e,_0x42f033;if(_0x45bd8b&&_0x211107)_0xf6900e=a21_0x5ec4be[_0x3a57ed(0xe7)](_0x211107),_0x42f033=_0x211107;else _0x211107?_0xf6900e=_0x211107:_0xf6900e=process['cwd']();if(!_0x42f033&&!existsSync(_0xf6900e))return console[_0x3a57ed(0xc7)](a21_0x136cf7['red'](_0x3a57ed(0xe2)+_0xf6900e+'\x0a')),0x1;let _0x3adcc0;if(_0x42f033){if(!_0x42f033[_0x3a57ed(0xf0)](_0x3a57ed(0xee))&&!_0x42f033[_0x3a57ed(0xf0)](_0x3a57ed(0xdb)))return console[_0x3a57ed(0xc7)](a21_0x136cf7[_0x3a57ed(0xd1)](_0x3a57ed(0xef)+_0x42f033+'\x0a')),0x1;_0x3adcc0=[_0x42f033];}else _0x3adcc0=findYamlFiles(_0xf6900e);if(_0x3adcc0[_0x3a57ed(0xd0)]===0x0)return console[_0x3a57ed(0xc7)](a21_0x136cf7[_0x3a57ed(0xd1)](_0x3a57ed(0xdd)+_0xf6900e+'\x0a')),0x1;const _0xa9c9e0=validateYamlFiles(_0x3adcc0,_0xf6900e,{'filterType':_0x3a57ed(0xd3)}),_0x2f7c36=calculateSummary(_0xa9c9e0),_0x398e66=_0xa9c9e0[_0x3a57ed(0xc5)](isValidationResult);if(_0x398e66[_0x3a57ed(0xd0)]===0x0)return console[_0x3a57ed(0xc7)](a21_0x136cf7[_0x3a57ed(0xda)](_0x3a57ed(0xcb)+_0xf6900e+'\x0a')),_0x2f7c36[_0x3a57ed(0xf3)]>0x0&&console[_0x3a57ed(0xc7)](a21_0x136cf7[_0x3a57ed(0xd7)]('('+_0x2f7c36['skippedCount']+'\x20non-campaign\x20file(s)\x20skipped)')),0x0;for(const _0x26f445 of _0xa9c9e0){if(!isValidationResult(_0x26f445)){_0x4fc272[_0x3a57ed(0xc4)]&&console[_0x3a57ed(0xea)](a21_0x136cf7[_0x3a57ed(0xd7)]('-\x20'+_0x26f445['relativePath']+_0x3a57ed(0xe3)+_0x26f445[_0x3a57ed(0xcc)]+')'));continue;}const {relativePath:_0x279e5a,source:_0x1e8ea7,result:_0xb55eca}=_0x26f445;if(_0xb55eca[_0x3a57ed(0xe1)]&&_0xb55eca['warnings'][_0x3a57ed(0xd0)]===0x0)_0x4fc272['verbose']&&console['log'](a21_0x136cf7['green']('✔\x20'+_0x279e5a));else _0xb55eca[_0x3a57ed(0xe1)]?(console[_0x3a57ed(0xea)](a21_0x136cf7['yellow']('⚠\x20'+_0x279e5a+':\x20'+_0xb55eca[_0x3a57ed(0xe0)][_0x3a57ed(0xd0)]+_0x3a57ed(0xeb))),console['log'](formatValidationResult(_0xb55eca,_0x1e8ea7,_0x279e5a))):(console[_0x3a57ed(0xea)](a21_0x136cf7[_0x3a57ed(0xd1)]('✖\x20'+_0x279e5a+':\x20'+_0xb55eca['errors'][_0x3a57ed(0xd0)]+_0x3a57ed(0xca))),console[_0x3a57ed(0xea)](formatValidationResult(_0xb55eca,_0x1e8ea7,_0x279e5a)));}return console['log'](''),_0x2f7c36[_0x3a57ed(0xcd)]?(console['log'](a21_0x136cf7[_0x3a57ed(0xd1)](_0x3a57ed(0xdc)+_0x2f7c36[_0x3a57ed(0xed)]+'\x20campaign(s)\x20with\x20errors,\x20'+_0x2f7c36[_0x3a57ed(0xce)]+_0x3a57ed(0xdf))),_0x2f7c36[_0x3a57ed(0xec)]>0x0&&console[_0x3a57ed(0xea)](a21_0x136cf7[_0x3a57ed(0xda)](_0x2f7c36[_0x3a57ed(0xec)]+_0x3a57ed(0xf2))),_0x2f7c36[_0x3a57ed(0xf3)]>0x0&&console['log'](a21_0x136cf7[_0x3a57ed(0xd7)](_0x2f7c36[_0x3a57ed(0xf3)]+_0x3a57ed(0xd9))),0x1):(console[_0x3a57ed(0xea)](a21_0x136cf7[_0x3a57ed(0xd8)](_0x3a57ed(0xe6)+_0x2f7c36[_0x3a57ed(0xce)]+_0x3a57ed(0xd5))),_0x2f7c36['warningCount']>0x0&&console['log'](a21_0x136cf7[_0x3a57ed(0xda)](_0x2f7c36['warningCount']+_0x3a57ed(0xf2))),_0x2f7c36[_0x3a57ed(0xf3)]>0x0&&console[_0x3a57ed(0xea)](a21_0x136cf7[_0x3a57ed(0xd7)](_0x2f7c36[_0x3a57ed(0xf3)]+_0x3a57ed(0xd9))),0x0);}}
|