@treasuredata/tdx 2026.7.4 → 2026.7.6
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.d.ts.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-command.js.map +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +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-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/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.js +1 -1
- package/dist/proxy/passthrough-server.js +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-schema.d.ts +15 -3
- package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js.map +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js.map +1 -1
- package/dist/sdk/cas/cas-audience-yaml.d.ts +8 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js.map +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.d.ts +47 -1
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js.map +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.d.ts +6 -6
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +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.d.ts +6 -6
- 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.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.js +1 -1
- package/dist/sdk/llm/user-settings.js +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/child-segment-yaml.d.ts +0 -8
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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.d.ts.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +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.d.ts +66 -7
- package/dist/sdk/segment/types/activation-schema.d.ts.map +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js.map +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.d.ts +1 -1
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-def.js.map +1 -1
- package/dist/sdk/segment/types/segment-schema.d.ts +110 -1
- package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js.map +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/cas.d.ts +5 -0
- package/dist/sdk/types/cas.d.ts.map +1 -1
- package/dist/sdk/types/cdp.d.ts +7 -3
- package/dist/sdk/types/cdp.d.ts.map +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/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.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.js +1 -1
- package/dist/utils/proxy-fetch.js.map +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
|
|
1
|
+
const a13_0x3c1858=a13_0x1eca;(function(_0x1311bc,_0x1a33bd){const _0x1cbedf=a13_0x1eca,_0x1adef2=_0x1311bc();while(!![]){try{const _0x50224a=-parseInt(_0x1cbedf(0x8e))/0x1*(parseInt(_0x1cbedf(0x72))/0x2)+-parseInt(_0x1cbedf(0x7b))/0x3+-parseInt(_0x1cbedf(0x71))/0x4*(-parseInt(_0x1cbedf(0x7c))/0x5)+-parseInt(_0x1cbedf(0x77))/0x6+-parseInt(_0x1cbedf(0x78))/0x7+parseInt(_0x1cbedf(0x76))/0x8+-parseInt(_0x1cbedf(0xae))/0x9*(-parseInt(_0x1cbedf(0x85))/0xa);if(_0x50224a===_0x1a33bd)break;else _0x1adef2['push'](_0x1adef2['shift']());}catch(_0x8c6b76){_0x1adef2['push'](_0x1adef2['shift']());}}}(a13_0x324c,0xd3b46));import a13_0x2fb10a from'chalk';function a13_0x324c(){const _0x432422=['getTime','never','toFixed','toLocaleTimeString','message','todayCredits','monthCredits','entryCount','log','\x20\x20Month:\x20\x20\x20','Requests','padStart','toLocaleDateString','Credits','red','credits','profileCount','repeat','en-US','padEnd','outputStructured','totalCredits','round','length','\x20days\x20ago','execute','profile','757179Usxkqz','Today','json','en-CA','13484YHuGsz','20874EIXWbr','\x20\x20Today:\x20\x20\x20','yesterday','map','1619520qRPcix','6891636NzDnmC','11875962lEicmH','numeric','dim','4136136zQTWrG','595ekcSEc','Last\x20Used','bold','\x20\x20Total:\x20\x20\x20','format','default','Usage\x20by\x20Profile','jsonl','2-digit','650riNeZe','Error:\x20','Unknown\x20error','cyan','error','Month','max','Usage\x20by\x20Source','Source','94VjcBbm','usage','today\x20','\x20credits','Total'];a13_0x324c=function(){return _0x432422;};return a13_0x324c();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{getAllProfileStats,getAllSourceStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function a13_0x1eca(_0x1c6613,_0x4355e7){_0x1c6613=_0x1c6613-0x6f;const _0x324c94=a13_0x324c();let _0x1eca09=_0x324c94[_0x1c6613];return _0x1eca09;}function formatCredits(_0x4e1c42){const _0x239eea=a13_0x1eca;return _0x4e1c42[_0x239eea(0x95)](0x2);}function formatLastUsed(_0x195b5f){const _0x383d0b=a13_0x1eca;if(!_0x195b5f)return _0x383d0b(0x94);const _0x182458=new Date(_0x195b5f),_0x3a4386=new Date(),_0x278b48=_0x182458[_0x383d0b(0x9f)](_0x383d0b(0x70)),_0x545211=_0x3a4386[_0x383d0b(0x9f)](_0x383d0b(0x70));if(_0x278b48===_0x545211)return _0x383d0b(0x90)+_0x182458[_0x383d0b(0x96)](_0x383d0b(0xa5),{'hour':_0x383d0b(0x84),'minute':_0x383d0b(0x84)});const _0x1eb4a3=new Date(_0x278b48),_0x2d39a6=new Date(_0x545211),_0xca97ea=Math[_0x383d0b(0xa9)]((_0x2d39a6[_0x383d0b(0x93)]()-_0x1eb4a3[_0x383d0b(0x93)]())/(0x18*0x3c*0x3c*0x3e8));if(_0xca97ea===0x1)return _0x383d0b(0x74);else return _0xca97ea>0x1&&_0xca97ea<0x7?_0xca97ea+_0x383d0b(0xab):_0x182458[_0x383d0b(0x9f)](_0x383d0b(0xa5),{'month':'short','day':_0x383d0b(0x79)});}export class ClaudeUsageCommand extends BaseCommand{['name']=a13_0x3c1858(0x8f);['description']='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a13_0x3c1858(0xac)](_0x6e610b){const _0x175c48=a13_0x3c1858,{options:_0x14fff6}=_0x6e610b,_0x55fef7=_0x14fff6[_0x175c48(0x80)]===_0x175c48(0x6f)||_0x14fff6[_0x175c48(0x80)]===_0x175c48(0x83)||_0x14fff6[_0x175c48(0x6f)];try{const [_0x36cc74,_0x81d21c,_0x6d399e]=await Promise['all']([getAllProfileStats(),getAllSourceStats(),getUsageSummary()]);return _0x55fef7?await this[_0x175c48(0xa7)](_0x36cc74,_0x81d21c,_0x6d399e,_0x14fff6):this['outputTable'](_0x36cc74,_0x81d21c,_0x6d399e),0x0;}catch(_0x5efbe0){const _0x94b998=_0x5efbe0 instanceof Error?_0x5efbe0[_0x175c48(0x97)]:_0x175c48(0x87);return console[_0x175c48(0x89)](a13_0x2fb10a[_0x175c48(0xa1)](_0x175c48(0x86)+_0x94b998)),0x1;}}async[a13_0x3c1858(0xa7)](_0x2a4952,_0x2355cc,_0x45b74d,_0x2d216b){const _0x5f98a0=a13_0x3c1858,_0xd9b1bd={'summary':{'todayCredits':_0x45b74d['todayCredits'],'monthCredits':_0x45b74d[_0x5f98a0(0x99)],'totalCredits':_0x45b74d[_0x5f98a0(0xa8)],'profileCount':_0x45b74d[_0x5f98a0(0xa3)]},'profiles':_0x2a4952[_0x5f98a0(0x75)](_0x1e3e92=>({'profile':_0x1e3e92[_0x5f98a0(0xad)],'credits':_0x1e3e92[_0x5f98a0(0xa2)],'requests':_0x1e3e92['entryCount'],'lastUsedAt':_0x1e3e92['lastUsedAt']})),'sources':_0x2355cc[_0x5f98a0(0x75)](_0x172344=>({'source':_0x172344['source'],'credits':_0x172344[_0x5f98a0(0xa2)],'todayCredits':_0x172344[_0x5f98a0(0x98)],'monthCredits':_0x172344[_0x5f98a0(0x99)],'requests':_0x172344[_0x5f98a0(0x9a)]}))};await handleSDKOutput([_0xd9b1bd],_0x2d216b);}['outputTable'](_0x2491ce,_0xce740,_0x1e90e7){const _0x31bdf1=a13_0x3c1858;console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7e)]('\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary')),console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7a)]('─'[_0x31bdf1(0xa4)](0x32))),console[_0x31bdf1(0x9b)](_0x31bdf1(0x73)+a13_0x2fb10a[_0x31bdf1(0x88)](formatCredits(_0x1e90e7[_0x31bdf1(0x98)]))+_0x31bdf1(0x91)),console['log'](_0x31bdf1(0x9c)+a13_0x2fb10a[_0x31bdf1(0x88)](formatCredits(_0x1e90e7[_0x31bdf1(0x99)]))+_0x31bdf1(0x91)),console[_0x31bdf1(0x9b)](_0x31bdf1(0x7f)+a13_0x2fb10a[_0x31bdf1(0x88)](formatCredits(_0x1e90e7[_0x31bdf1(0xa8)]))+_0x31bdf1(0x91)),console[_0x31bdf1(0x9b)]();if(_0xce740[_0x31bdf1(0xaa)]>0x0){console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7e)](_0x31bdf1(0x8c))),console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7a)]('─'['repeat'](0x3c)));const _0x527e27=0xc,_0x424402=0xa,_0x15778f=0xa,_0x1fe276=0xa;console[_0x31bdf1(0x9b)]('\x20\x20'+_0x31bdf1(0x8d)[_0x31bdf1(0xa6)](_0x527e27)+'\x20\x20'+_0x31bdf1(0x92)[_0x31bdf1(0x9e)](_0x424402)+'\x20\x20'+_0x31bdf1(0xaf)[_0x31bdf1(0x9e)](_0x15778f)+'\x20\x20'+_0x31bdf1(0x8a)[_0x31bdf1(0x9e)](_0x1fe276));for(const _0x37350a of _0xce740){console[_0x31bdf1(0x9b)]('\x20\x20'+_0x37350a['source']['padEnd'](_0x527e27)+'\x20\x20'+a13_0x2fb10a[_0x31bdf1(0x88)](formatCredits(_0x37350a[_0x31bdf1(0xa2)])[_0x31bdf1(0x9e)](_0x424402))+'\x20\x20'+formatCredits(_0x37350a[_0x31bdf1(0x98)])[_0x31bdf1(0x9e)](_0x15778f)+'\x20\x20'+formatCredits(_0x37350a[_0x31bdf1(0x99)])[_0x31bdf1(0x9e)](_0x1fe276));}console[_0x31bdf1(0x9b)]();}if(_0x2491ce['length']===0x0){console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7a)]('\x20\x20No\x20usage\x20data\x20recorded\x20yet.')),console['log'](a13_0x2fb10a['dim']('\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a'));return;}console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7e)](_0x31bdf1(0x82))),console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7a)]('─'[_0x31bdf1(0xa4)](0x3c)));const _0x44787d=Math[_0x31bdf1(0x8b)](0xc,..._0x2491ce['map'](_0x2d8d5a=>_0x2d8d5a[_0x31bdf1(0xad)]==='default'?'(default)'[_0x31bdf1(0xaa)]:_0x2d8d5a[_0x31bdf1(0xad)][_0x31bdf1(0xaa)])),_0x21e74f=0xa,_0x3648b2=0xa;console['log']('\x20\x20'+'Profile'['padEnd'](_0x44787d)+'\x20\x20'+_0x31bdf1(0xa0)[_0x31bdf1(0x9e)](_0x21e74f)+'\x20\x20'+_0x31bdf1(0x9d)[_0x31bdf1(0x9e)](_0x3648b2)+'\x20\x20'+_0x31bdf1(0x7d));for(const _0x27fa1e of _0x2491ce){const _0x4de29b=_0x27fa1e[_0x31bdf1(0xad)]===_0x31bdf1(0x81)?'(default)':_0x27fa1e['profile'],_0x7683c8=_0x4de29b[_0x31bdf1(0xa6)](_0x44787d),_0x4c397e=_0x27fa1e[_0x31bdf1(0xad)]===_0x31bdf1(0x81)?a13_0x2fb10a['dim'](_0x7683c8):_0x7683c8;console[_0x31bdf1(0x9b)]('\x20\x20'+_0x4c397e+'\x20\x20'+a13_0x2fb10a[_0x31bdf1(0x88)](formatCredits(_0x27fa1e['credits'])[_0x31bdf1(0x9e)](_0x21e74f))+'\x20\x20'+String(_0x27fa1e[_0x31bdf1(0x9a)])[_0x31bdf1(0x9e)](_0x3648b2)+'\x20\x20'+a13_0x2fb10a[_0x31bdf1(0x7a)](formatLastUsed(_0x27fa1e['lastUsedAt'])));}console[_0x31bdf1(0x9b)](),console[_0x31bdf1(0x9b)](a13_0x2fb10a[_0x31bdf1(0x7a)]('Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.')),console[_0x31bdf1(0x9b)]();}}
|
package/dist/commands/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x43d808=a14_0x1909;(function(_0x2fb064,_0x1ee4b5){const _0x5bcd30=a14_0x1909,_0x5adbfc=_0x2fb064();while(!![]){try{const _0x5253e6=parseInt(_0x5bcd30(0x1ca))/0x1+-parseInt(_0x5bcd30(0x1c3))/0x2*(parseInt(_0x5bcd30(0x1d3))/0x3)+parseInt(_0x5bcd30(0x1a7))/0x4*(-parseInt(_0x5bcd30(0x1b0))/0x5)+parseInt(_0x5bcd30(0x1cf))/0x6+-parseInt(_0x5bcd30(0x1af))/0x7+-parseInt(_0x5bcd30(0x1c6))/0x8+parseInt(_0x5bcd30(0x1c9))/0x9;if(_0x5253e6===_0x1ee4b5)break;else _0x5adbfc['push'](_0x5adbfc['shift']());}catch(_0x37d0c8){_0x5adbfc['push'](_0x5adbfc['shift']());}}}(a14_0x147e,0xb988a));import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../sdk/client/http-client.js';function a14_0x1909(_0x168295,_0x1bcc3){_0x168295=_0x168295-0x1a6;const _0x147edd=a14_0x147e();let _0x190916=_0x147edd[_0x168295];return _0x190916;}import{SDKError,ErrorCategory,ErrorCode}from'../sdk/errors.js';import{Logger}from'../utils/logger/index.js';import a14_0x512ef0 from'chalk';export function printAuthError(_0x2aa99e,_0x9633bf=![],_0x5dbae9){const _0x5b3d8b=a14_0x1909,_0x40930d=_0x2aa99e[_0x5b3d8b(0x1ae)]?.[_0x5b3d8b(0x1aa)]||_0x2aa99e[_0x5b3d8b(0x1bb)];console[_0x5b3d8b(0x1ba)](a14_0x512ef0[_0x5b3d8b(0x1d1)](_0x5b3d8b(0x1bd))),console['error'](a14_0x512ef0[_0x5b3d8b(0x1d1)]('Reason:\x20'+_0x40930d));if(_0x9633bf){const _0x42de59=_0x5dbae9?_0x5b3d8b(0x1c5)+_0x5dbae9:'';console[_0x5b3d8b(0x1ba)]('\x0a'+a14_0x512ef0[_0x5b3d8b(0x1d4)](_0x5b3d8b(0x1c7))),console[_0x5b3d8b(0x1ba)]('\x20\x20'+a14_0x512ef0[_0x5b3d8b(0x1bf)](_0x5b3d8b(0x1cd)+_0x42de59)+'\x0a'),console[_0x5b3d8b(0x1ba)](''+a14_0x512ef0['dim'](_0x5b3d8b(0x1c0))),console['error']('\x20\x20'+a14_0x512ef0[_0x5b3d8b(0x1bf)](_0x5b3d8b(0x1ce)+_0x42de59));}}export class BaseCommand{[a14_0x43d808(0x1c4)](_0x54659a){const _0x27899a=a14_0x43d808,{options:_0x5d089e}=_0x54659a,_0x25c4d0=_0x5d089e[_0x27899a(0x1bc)];if(_0x25c4d0!==undefined){const _0x654d08=typeof _0x25c4d0===_0x27899a(0x1c2)?_0x25c4d0:parseInt(_0x25c4d0,0xa);if(isNaN(_0x654d08))return _0x27899a(0x1b5)+_0x25c4d0+_0x27899a(0x1d5);const _0x53f182=validateLimitOption(_0x654d08);if(!_0x53f182[_0x27899a(0x1b7)])return _0x53f182['error'];_0x54659a[_0x27899a(0x1d8)][_0x27899a(0x1bc)]=_0x53f182[_0x27899a(0x1b8)];}return undefined;}[a14_0x43d808(0x1cc)](_0x359743){return undefined;}async[a14_0x43d808(0x1b3)](_0x2a880a){const _0x1cabbf=a14_0x43d808;try{const _0x384e7e=this[_0x1cabbf(0x1c4)](_0x2a880a);if(_0x384e7e)return console['error']('Error:\x20'+_0x384e7e),0x1;const _0x3cbfb7=this[_0x1cabbf(0x1cc)](_0x2a880a);if(_0x3cbfb7){const _0x1a69bf=/^\s*(Usage|Note|Warning|Error):/i[_0x1cabbf(0x1ab)](_0x3cbfb7);return _0x1a69bf?console[_0x1cabbf(0x1ba)](_0x3cbfb7):console[_0x1cabbf(0x1ba)](_0x1cabbf(0x1cb)+_0x3cbfb7),0x1;}const _0x48aa02=await this[_0x1cabbf(0x1d2)](_0x2a880a);return _0x48aa02??0x0;}catch(_0x192cb2){if(_0x192cb2 instanceof Error){if(_0x192cb2 instanceof HTTPClientError&&_0x192cb2[_0x1cabbf(0x1ad)]===0x191){const _0x4696a8=_0x2a880a['options'][_0x1cabbf(0x1a6)];printAuthError(_0x192cb2,!![],_0x4696a8);if(_0x192cb2[_0x1cabbf(0x1b1)]){const _0x459a3c=Logger['of'](_0x1cabbf(0x1ac));_0x459a3c[_0x1cabbf(0x1c1)](_0x1cabbf(0x1b2)),_0x459a3c[_0x1cabbf(0x1c1)](_0x192cb2['stack']);}return 0x1;}_0x192cb2 instanceof SDKError&&_0x192cb2[_0x1cabbf(0x1b9)]===ErrorCode['PERMISSION_DENIED']?(console[_0x1cabbf(0x1ba)](a14_0x512ef0['red']('Error:\x20'+_0x192cb2['message'])),console['error'](a14_0x512ef0[_0x1cabbf(0x1d4)](_0x1cabbf(0x1d6)))):console[_0x1cabbf(0x1ba)](a14_0x512ef0[_0x1cabbf(0x1d1)](_0x1cabbf(0x1cb)+_0x192cb2[_0x1cabbf(0x1bb)]));_0x192cb2 instanceof SDKError&&_0x192cb2[_0x1cabbf(0x1b6)]&&console[_0x1cabbf(0x1ba)](a14_0x512ef0[_0x1cabbf(0x1be)](_0x192cb2[_0x1cabbf(0x1b6)]));const _0x2bc135=_0x192cb2 instanceof SDKError&&_0x192cb2[_0x1cabbf(0x1a9)]===ErrorCategory['USER_ERROR'];_0x192cb2[_0x1cabbf(0x1b1)]&&!_0x2bc135&&console['error'](_0x1cabbf(0x1da)+_0x192cb2[_0x1cabbf(0x1b1)]);}else console[_0x1cabbf(0x1ba)](_0x1cabbf(0x1cb)+String(_0x192cb2));return 0x1;}}}export class CommandRegistry{['commands']=new Map();[a14_0x43d808(0x1d7)](_0x235436){const _0x12f4c4=a14_0x43d808;if(this[_0x12f4c4(0x1a8)][_0x12f4c4(0x1d9)](_0x235436[_0x12f4c4(0x1db)]))throw new Error(_0x12f4c4(0x1c8)+_0x235436[_0x12f4c4(0x1db)]+'\x27\x20is\x20already\x20registered');this[_0x12f4c4(0x1a8)][_0x12f4c4(0x1d0)](_0x235436[_0x12f4c4(0x1db)],_0x235436);}[a14_0x43d808(0x1dc)](_0x3cf781){const _0x286900=a14_0x43d808;return this[_0x286900(0x1a8)][_0x286900(0x1dc)](_0x3cf781);}['getAll'](){const _0x577fbb=a14_0x43d808;return Array[_0x577fbb(0x1b4)](this[_0x577fbb(0x1a8)]['values']());}[a14_0x43d808(0x1d9)](_0x52ddfb){const _0x235c96=a14_0x43d808;return this[_0x235c96(0x1a8)][_0x235c96(0x1d9)](_0x52ddfb);}}export const registry=new CommandRegistry();function a14_0x147e(){const _0x57891d=['tdx\x20auth\x20setup','tdx\x20auth','5728170jkOqjn','set','red','execute','183jydorN','dim','.\x20Must\x20be\x20a\x20number.','\x20\x20→\x20Please\x20contact\x20your\x20admin\x20to\x20request\x20the\x20required\x20permission.','register','options','has','\x0aStack\x20trace:\x0a','name','get','profile','2472WWfcyy','commands','category','detail','test','command','status','problemDetails','2736349UluIJI','8885IOkiec','stack','Authentication\x20error\x20stack\x20trace:','run','from','Invalid\x20limit\x20value:\x20','helpText','isValid','value','code','error','message','limit','Authentication\x20failed','yellow','cyan','To\x20check\x20your\x20current\x20auth\x20status:','debug','number','1658LUzasn','validateGlobalOptions','\x20--profile\x20','8972144dVcHcs','To\x20set\x20up\x20authentication:','Command\x20\x27','21971358IiWsTx','25169LZLuOR','Error:\x20','validate'];a14_0x147e=function(){return _0x57891d;};return a14_0x147e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a15_0x286245=a15_0x4f72;(function(_0x3e18b0,_0x8436b6){const _0x1fc24a=a15_0x4f72,_0x327314=_0x3e18b0();while(!![]){try{const _0x1eab83=-parseInt(_0x1fc24a(0x202))/0x1+-parseInt(_0x1fc24a(0x1fd))/0x2+parseInt(_0x1fc24a(0x21b))/0x3+parseInt(_0x1fc24a(0x224))/0x4*(-parseInt(_0x1fc24a(0x1e1))/0x5)+-parseInt(_0x1fc24a(0x1db))/0x6*(parseInt(_0x1fc24a(0x22b))/0x7)+parseInt(_0x1fc24a(0x1f6))/0x8+parseInt(_0x1fc24a(0x21f))/0x9*(parseInt(_0x1fc24a(0x217))/0xa);if(_0x1eab83===_0x8436b6)break;else _0x327314['push'](_0x327314['shift']());}catch(_0x29b6b4){_0x327314['push'](_0x327314['shift']());}}}(a15_0x37c0,0x2723a));function a15_0x37c0(){const _0x8e9da=['owner','Site:\x20','\x20connection','\x20\x20\x20\x20','resolve','map','maximum','name','default_value','sort','\x27...','✔\x20Found\x20schema\x20for\x20connection\x20\x27','✔\x20Found\x20schema\x20for\x20connector\x20type:\x20','description','listTypes','30DysAjZ','push','repeat','✔\x20Found\x20connection:\x20','333909UowCCL','data','options','\x20\x20\x20\x20Options:\x20','1501137jGyJXo','connection','Looking\x20up\x20connection:\x20','\x27\x20as\x20connector\x20type','Type:\x20','360cQMRcl','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.','error','List\x20all\x20result\x20output\x20connections','Treating\x20\x27','Range:\x20','verbose','7PGrOyC','Show\x20connector\x20output\x20schema\x20for\x20connector_config\x20validation','legacy','limit','find','legacy_settings','✔\x20Found\x20settings\x20for\x20connector\x20type:\x20','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:types','\x0aConnector:\x20','Listing\x20connections...','\x27\x20as\x20connection\x20name\x20→\x20type:\x20','output','cyan','connection:list','Show\x20connection-level\x20settings\x20(credentials,\x20authentication)','log','getMetadata','Fetching\x20settings\x20for\x20\x27','✔\x20Found\x20','join','object','Name:\x20','connection:settings','yellow','<=\x20','\x20[record]','input','hint','Listing\x20connector\x20types...','1340028ZZhafS','✔\x20Resolved\x20\x27','getOutputSchema','Options:\x20','bold','\x0aConnection:\x20','5205QwBSpP','value','green','entries','minimum','\x20-\x20','padStart','type','label','site','\x0aAvailable\x20fields:','criteria','hidden','max','properties','connection:schema','\x27\x20(type:\x20','\x0aNo\x20fields\x20defined\x20in\x20schema','List\x20available\x20connector\x20types','\x20connector\x20type','No\x20available\x20fields\x20for\x20this\x20connector','2050296WFtxuZ','stringify','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.','credential','table','Show\x20when:\x20','enumeration','390728PkkWqJ','filter','execute','length','list','195263XtVJpy','blue','settings','dim','Fetching\x20schema\x20for\x20\x27','validate'];a15_0x37c0=function(){return _0x8e9da;};return a15_0x37c0();}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_0x47c6f3 from'chalk';function normalizeSchemaForDisplay(_0x33acfb){const _0x5e9857=a15_0x4f72,_0x2ab5ba=_0x33acfb[_0x5e9857(0x1ef)]||[],_0x886253=_0x2ab5ba[_0x5e9857(0x22f)](_0x18267c=>_0x18267c[_0x5e9857(0x20f)]==='legacy_settings'&&_0x18267c[_0x5e9857(0x1e8)]==='record'&&_0x18267c[_0x5e9857(0x1ef)]);if(_0x886253?.[_0x5e9857(0x1ef)]){const _0x544dfd=_0x2ab5ba['filter'](_0x35cc18=>_0x35cc18[_0x5e9857(0x20f)]!==_0x5e9857(0x22d)&&_0x35cc18[_0x5e9857(0x20f)]!=='legacy_settings');return[..._0x544dfd,..._0x886253['properties']];}return _0x2ab5ba[_0x5e9857(0x1fe)](_0x50a489=>_0x50a489[_0x5e9857(0x20f)]!=='legacy');}function printSchemaFields(_0x899b5c,_0x108810){const _0x44a33b=a15_0x4f72,_0x43ffc9='\x20\x20'[_0x44a33b(0x219)](_0x108810+0x1),_0x418d40='\x20\x20'['repeat'](_0x108810+0x2);for(const _0x11e8ad of _0x899b5c){if(!_0x11e8ad[_0x44a33b(0x20f)])continue;const _0x4323dd=_0x11e8ad[_0x44a33b(0x1e8)]==='record'&&_0x11e8ad['properties']&&_0x11e8ad['properties'][_0x44a33b(0x200)]>0x0&&_0x11e8ad[_0x44a33b(0x20f)]!==_0x44a33b(0x230);let _0xd82c69=''+_0x43ffc9+a15_0x47c6f3['green'](_0x11e8ad[_0x44a33b(0x20f)]);_0x11e8ad['title']&&(_0xd82c69+=':\x20'+_0x11e8ad['title']);if(_0x11e8ad[_0x44a33b(0x1d8)])_0xd82c69+=a15_0x47c6f3[_0x44a33b(0x205)]('\x20['+_0x11e8ad['input']+']');else _0x4323dd&&(_0xd82c69+=a15_0x47c6f3[_0x44a33b(0x205)](_0x44a33b(0x1d7)));console['log'](_0xd82c69);_0x11e8ad[_0x44a33b(0x215)]&&console[_0x44a33b(0x1cd)](''+_0x418d40+a15_0x47c6f3[_0x44a33b(0x205)](_0x11e8ad[_0x44a33b(0x215)]));if(_0x11e8ad[_0x44a33b(0x1fc)]){const _0x4d51fd=_0x11e8ad[_0x44a33b(0x1fc)]['map'](_0xb4df=>typeof _0xb4df===_0x44a33b(0x1d2)&&'value'in _0xb4df?_0xb4df['value']:_0xb4df)[_0x44a33b(0x1d1)](',\x20');console[_0x44a33b(0x1cd)](_0x418d40+_0x44a33b(0x1de)+a15_0x47c6f3['yellow'](_0x4d51fd));}_0x11e8ad['default_value']!==undefined&&console[_0x44a33b(0x1cd)](_0x418d40+'Default:\x20'+a15_0x47c6f3[_0x44a33b(0x203)](String(_0x11e8ad[_0x44a33b(0x210)])));if(_0x11e8ad[_0x44a33b(0x1e5)]!==undefined||_0x11e8ad[_0x44a33b(0x20e)]!==undefined){const _0x74d01=_0x11e8ad['minimum']!==undefined&&_0x11e8ad[_0x44a33b(0x20e)]!==undefined?_0x11e8ad[_0x44a33b(0x1e5)]+_0x44a33b(0x1e6)+_0x11e8ad[_0x44a33b(0x20e)]:_0x11e8ad['minimum']!==undefined?'>=\x20'+_0x11e8ad[_0x44a33b(0x1e5)]:_0x44a33b(0x1d6)+_0x11e8ad[_0x44a33b(0x20e)];console[_0x44a33b(0x1cd)](_0x418d40+_0x44a33b(0x229)+a15_0x47c6f3['blue'](_0x74d01));}if(_0x11e8ad[_0x44a33b(0x1ec)]){const _0x5a62ec=Object[_0x44a33b(0x1e4)](_0x11e8ad[_0x44a33b(0x1ec)])[_0x44a33b(0x20d)](([_0x573407,_0x341811])=>_0x573407+'='+JSON[_0x44a33b(0x1f7)](_0x341811))[_0x44a33b(0x1d1)](',\x20');console[_0x44a33b(0x1cd)](''+_0x418d40+a15_0x47c6f3['dim'](_0x44a33b(0x1fb)+_0x5a62ec));}_0x4323dd&&_0x11e8ad['properties']&&printSchemaFields(_0x11e8ad[_0x44a33b(0x1ef)],_0x108810+0x1);}}export class ConnectionListCommand extends BaseCommand{[a15_0x286245(0x20f)]=a15_0x286245(0x1cb);['description']=a15_0x286245(0x227);async['execute'](_0x7d4e36){const _0xaca34=a15_0x286245,{options:_0x1563a9,tdx:_0x1691c7}=_0x7d4e36;_0x1563a9[_0xaca34(0x22a)]&&console['error'](_0xaca34(0x209)+_0x1563a9['site']);const _0x4ab7df=resolveLimit(_0x1563a9[_0xaca34(0x22e)],DEFAULT_LISTING_LIMIT),_0x3a4b00=await withSpinner(_0xaca34(0x235),()=>_0x1691c7[_0xaca34(0x220)][_0xaca34(0x201)](),{'verbose':_0x1563a9['verbose']}),_0x26dcf0=_0x3a4b00[_0xaca34(0x21c)];console['error'](_0xaca34(0x1d0)+_0x26dcf0['length']+_0xaca34(0x20a)+(_0x26dcf0[_0xaca34(0x200)]!==0x1?'s':''));if(isStructuredFormat(_0x1563a9)){const _0x8aa54c=_0x26dcf0['slice'](0x0,_0x4ab7df);await handleSDKOutput(_0x8aa54c,{..._0x1563a9,'limit':_0x4ab7df});}else{const _0x37bfee=_0x26dcf0[_0xaca34(0x200)]>0x0?Math['max'](..._0x26dcf0['map'](_0x2dced2=>_0x2dced2[_0xaca34(0x1e8)][_0xaca34(0x200)])):0x0,_0x504d90=[];for(const _0x5795db of _0x26dcf0){const _0x10e6bd=a15_0x47c6f3[_0xaca34(0x1ca)](_0x5795db['type'][_0xaca34(0x1e7)](_0x37bfee)),_0x1b54ae=_0x5795db['owner']?.['name']?_0xaca34(0x1e6)+a15_0x47c6f3[_0xaca34(0x205)](_0x5795db[_0xaca34(0x208)][_0xaca34(0x20f)]):'';_0x504d90['push'](_0x10e6bd+'\x20\x20'+_0x5795db['name']+_0x1b54ae);}await writeOutput(_0x504d90[_0xaca34(0x1d1)]('\x0a'),_0x1563a9[_0xaca34(0x1c9)],_0xaca34(0x1fa));}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{['name']='connection:show';[a15_0x286245(0x215)]='Show\x20connection\x20details';[a15_0x286245(0x207)](_0x396f1f){const _0x84b01a=a15_0x286245,{args:_0x4b0a4c}=_0x396f1f;if(!_0x4b0a4c[0x0])return _0x84b01a(0x232);return undefined;}async[a15_0x286245(0x1ff)](_0x4b1cbd){const _0x49fabe=a15_0x286245,{options:_0x22b242,args:_0x5a97b5,tdx:_0x237b3d}=_0x4b1cbd,_0x19ef59=_0x5a97b5[0x0];_0x22b242['verbose']&&(console['error'](_0x49fabe(0x209)+_0x22b242[_0x49fabe(0x1ea)]),console[_0x49fabe(0x226)](_0x49fabe(0x221)+_0x19ef59));const _0x2ef8f8=await withSpinner('Fetching\x20connection\x20\x27'+_0x19ef59+'\x27...',()=>_0x237b3d['connection'][_0x49fabe(0x20c)](_0x19ef59),{'verbose':_0x22b242[_0x49fabe(0x22a)]}),_0x273c46=_0x2ef8f8[_0x49fabe(0x21c)];return console[_0x49fabe(0x226)](_0x49fabe(0x21a)+_0x273c46[_0x49fabe(0x20f)]),await handleSingleObjectOutput(_0x273c46,_0x22b242),0x0;}}export class ConnectionSchemaCommand extends BaseCommand{[a15_0x286245(0x20f)]=a15_0x286245(0x1f0);[a15_0x286245(0x215)]=a15_0x286245(0x22c);['validate'](_0x52357e){const _0x1adfc5=a15_0x286245,{args:_0x1a85ce}=_0x52357e;if(!_0x1a85ce[0x0])return _0x1adfc5(0x1f8);return undefined;}async[a15_0x286245(0x1ff)](_0x484c81){const _0x2d1e44=a15_0x286245,{options:_0x22fa31,args:_0x30ac18,tdx:_0x4f3bfb}=_0x484c81,_0x5131d8=_0x30ac18[0x0];_0x22fa31[_0x2d1e44(0x22a)]&&(console[_0x2d1e44(0x226)](_0x2d1e44(0x209)+_0x22fa31[_0x2d1e44(0x1ea)]),console[_0x2d1e44(0x226)]('Resolving\x20connector\x20type\x20or\x20name:\x20'+_0x5131d8));let _0x30040a=_0x5131d8,_0x5c6860;try{const _0x47f72c=await _0x4f3bfb[_0x2d1e44(0x220)]['findByName'](_0x5131d8);_0x47f72c&&(_0x30040a=_0x47f72c['type'],_0x5c6860=_0x47f72c['name'],_0x22fa31['verbose']&&console[_0x2d1e44(0x226)](_0x2d1e44(0x1dc)+_0x5131d8+_0x2d1e44(0x236)+_0x30040a));}catch{_0x22fa31[_0x2d1e44(0x22a)]&&console['error'](_0x2d1e44(0x228)+_0x5131d8+_0x2d1e44(0x222));}const _0x282f3e=await withSpinner(_0x2d1e44(0x206)+_0x30040a+_0x2d1e44(0x212),()=>_0x4f3bfb[_0x2d1e44(0x220)][_0x2d1e44(0x1dd)](_0x30040a),{'verbose':_0x22fa31[_0x2d1e44(0x22a)]}),_0x3366ab=_0x282f3e[_0x2d1e44(0x21c)];_0x5c6860?console[_0x2d1e44(0x226)](_0x2d1e44(0x213)+_0x5c6860+_0x2d1e44(0x1f1)+_0x30040a+')'):console[_0x2d1e44(0x226)](_0x2d1e44(0x214)+_0x30040a);if(isStructuredFormat(_0x22fa31))await handleSingleObjectOutput(_0x3366ab,_0x22fa31);else{const _0x3135cc=normalizeSchemaForDisplay(_0x3366ab);_0x5c6860?(console[_0x2d1e44(0x1cd)](_0x2d1e44(0x1e0)+a15_0x47c6f3[_0x2d1e44(0x1ca)](_0x5c6860)),console['log'](_0x2d1e44(0x223)+a15_0x47c6f3[_0x2d1e44(0x205)](_0x30040a))):console[_0x2d1e44(0x1cd)](_0x2d1e44(0x234)+a15_0x47c6f3[_0x2d1e44(0x1ca)](_0x30040a)),_0x3135cc[_0x2d1e44(0x200)]>0x0?(console['log'](a15_0x47c6f3[_0x2d1e44(0x1df)](_0x2d1e44(0x1eb))),printSchemaFields(_0x3135cc,0x0)):console[_0x2d1e44(0x1cd)](a15_0x47c6f3['dim'](_0x2d1e44(0x1f2)));}return 0x0;}}export class ConnectionTypesCommand extends BaseCommand{[a15_0x286245(0x20f)]=a15_0x286245(0x233);['description']=a15_0x286245(0x1f3);async[a15_0x286245(0x1ff)](_0xb359f7){const _0x5f05e2=a15_0x286245,{options:_0x3bb1ab,tdx:_0x3cad77}=_0xb359f7;_0x3bb1ab[_0x5f05e2(0x22a)]&&console[_0x5f05e2(0x226)]('Site:\x20'+_0x3bb1ab[_0x5f05e2(0x1ea)]);const _0x4d93dc=await withSpinner(_0x5f05e2(0x1da),()=>_0x3cad77[_0x5f05e2(0x220)][_0x5f05e2(0x216)](),{'verbose':_0x3bb1ab[_0x5f05e2(0x22a)]}),_0x53c0e8=_0x4d93dc[_0x5f05e2(0x21c)][_0x5f05e2(0x211)]((_0x4c1b64,_0x353440)=>_0x4c1b64[_0x5f05e2(0x1e8)]['localeCompare'](_0x353440[_0x5f05e2(0x1e8)]));console[_0x5f05e2(0x226)](_0x5f05e2(0x1d0)+_0x53c0e8['length']+_0x5f05e2(0x1f4)+(_0x53c0e8[_0x5f05e2(0x200)]!==0x1?'s':''));if(isStructuredFormat(_0x3bb1ab))await handleSDKOutput(_0x53c0e8,_0x3bb1ab);else{const _0x125b57=_0x53c0e8[_0x5f05e2(0x200)]>0x0?Math[_0x5f05e2(0x1ee)](..._0x53c0e8[_0x5f05e2(0x20d)](_0x366b40=>_0x366b40[_0x5f05e2(0x1e8)][_0x5f05e2(0x200)])):0x0,_0x49f815=[];for(const _0x2f96b6 of _0x53c0e8){const _0x567b74=a15_0x47c6f3[_0x5f05e2(0x1ca)](_0x2f96b6[_0x5f05e2(0x1e8)][_0x5f05e2(0x1e7)](_0x125b57));_0x49f815[_0x5f05e2(0x218)](_0x567b74+'\x20\x20'+_0x2f96b6['name']);}await writeOutput(_0x49f815[_0x5f05e2(0x1d1)]('\x0a'),_0x3bb1ab[_0x5f05e2(0x1c9)],'table');}return 0x0;}}export class ConnectionSettingsCommand extends BaseCommand{[a15_0x286245(0x20f)]=a15_0x286245(0x1d4);['description']=a15_0x286245(0x1cc);[a15_0x286245(0x207)](_0x22afa9){const _0x18d69d=a15_0x286245,{args:_0x2121f6}=_0x22afa9;if(!_0x2121f6[0x0])return _0x18d69d(0x225);return undefined;}async[a15_0x286245(0x1ff)](_0x157eff){const _0x54c168=a15_0x286245,{options:_0x1d9a77,args:_0x203712,tdx:_0x1a107d}=_0x157eff,_0x4d205c=_0x203712[0x0];_0x1d9a77['verbose']&&(console[_0x54c168(0x226)]('Site:\x20'+_0x1d9a77[_0x54c168(0x1ea)]),console['error']('Fetching\x20settings\x20for\x20connector\x20type:\x20'+_0x4d205c));const _0x3fabb7=await withSpinner(_0x54c168(0x1cf)+_0x4d205c+_0x54c168(0x212),()=>_0x1a107d[_0x54c168(0x220)][_0x54c168(0x1ce)](_0x4d205c),{'verbose':_0x1d9a77[_0x54c168(0x22a)]}),_0x5f2100=_0x3fabb7[_0x54c168(0x21c)];console['error'](_0x54c168(0x231)+_0x4d205c);if(isStructuredFormat(_0x1d9a77))await handleSingleObjectOutput(_0x5f2100,_0x1d9a77);else{console[_0x54c168(0x1cd)](_0x54c168(0x234)+a15_0x47c6f3[_0x54c168(0x1ca)](_0x4d205c)),console['log'](_0x54c168(0x1d3)+_0x5f2100[_0x54c168(0x20f)]);const _0x4b2b53=_0x5f2100[_0x54c168(0x204)]||[],_0x2eb4af=_0x4b2b53[_0x54c168(0x1fe)](_0x2ca57c=>_0x2ca57c[_0x54c168(0x1f9)]);_0x2eb4af[_0x54c168(0x200)]>0x0&&(console[_0x54c168(0x1cd)](a15_0x47c6f3[_0x54c168(0x1df)]('\x0aCredential\x20settings:')),printMetadataSettings(_0x2eb4af));let _0x59782c=![];try{const _0x40247e=await _0x1a107d[_0x54c168(0x220)][_0x54c168(0x1dd)](_0x4d205c),_0x17237f=normalizeSchemaForDisplay(_0x40247e);_0x17237f['length']>0x0&&(console[_0x54c168(0x1cd)](a15_0x47c6f3[_0x54c168(0x1df)](_0x54c168(0x1eb))),printSchemaFields(_0x17237f,0x0),_0x59782c=!![]);}catch{const _0xd8d6f4=_0x4b2b53[_0x54c168(0x1fe)](_0x167612=>!_0x167612[_0x54c168(0x1f9)]);_0xd8d6f4[_0x54c168(0x200)]>0x0&&(console[_0x54c168(0x1cd)](a15_0x47c6f3[_0x54c168(0x1df)](_0x54c168(0x1eb))),printMetadataSettings(_0xd8d6f4),_0x59782c=!![]);}!_0x59782c&&_0x1d9a77[_0x54c168(0x22a)]&&console[_0x54c168(0x226)](a15_0x47c6f3[_0x54c168(0x205)](_0x54c168(0x1f5))),_0x2eb4af[_0x54c168(0x200)]===0x0&&console[_0x54c168(0x1cd)](a15_0x47c6f3[_0x54c168(0x205)]('\x0aNo\x20credential\x20settings\x20defined'));}return 0x0;}}function a15_0x4f72(_0x21c678,_0x48ac87){_0x21c678=_0x21c678-0x1c9;const _0x37c02f=a15_0x37c0();let _0x4f72f9=_0x37c02f[_0x21c678];return _0x4f72f9;}function printMetadataSettings(_0x5278b9){const _0xd69d1a=a15_0x286245;for(const _0x211737 of _0x5278b9){if(!_0x211737['name'])continue;if(_0x211737[_0xd69d1a(0x1ed)])continue;let _0x26dc48='\x20\x20'+a15_0x47c6f3[_0xd69d1a(0x1e3)](_0x211737[_0xd69d1a(0x20f)]);_0x211737[_0xd69d1a(0x1e9)]&&(_0x26dc48+=':\x20'+_0x211737[_0xd69d1a(0x1e9)]);_0x211737[_0xd69d1a(0x1e8)]&&(_0x26dc48+=a15_0x47c6f3[_0xd69d1a(0x205)]('\x20['+_0x211737[_0xd69d1a(0x1e8)]+']'));console[_0xd69d1a(0x1cd)](_0x26dc48);_0x211737[_0xd69d1a(0x1d9)]&&console[_0xd69d1a(0x1cd)](_0xd69d1a(0x20b)+a15_0x47c6f3[_0xd69d1a(0x205)](_0x211737[_0xd69d1a(0x1d9)]));if(_0x211737['options']){const _0x30d26c=_0x211737[_0xd69d1a(0x21d)]['map'](_0x11c1dd=>_0x11c1dd[_0xd69d1a(0x1e2)])[_0xd69d1a(0x1d1)](',\x20');console[_0xd69d1a(0x1cd)](_0xd69d1a(0x21e)+a15_0x47c6f3[_0xd69d1a(0x1d5)](_0x30d26c));}_0x211737[_0xd69d1a(0x210)]!==undefined&&_0x211737[_0xd69d1a(0x210)]!==null&&console['log']('\x20\x20\x20\x20Default:\x20'+a15_0x47c6f3[_0xd69d1a(0x203)](String(_0x211737[_0xd69d1a(0x210)])));if(_0x211737[_0xd69d1a(0x1ec)]){const _0x43c879=Object['entries'](_0x211737['criteria'])[_0xd69d1a(0x20d)](([_0x17a947,_0x3b03a8])=>_0x17a947+'='+JSON[_0xd69d1a(0x1f7)](_0x3b03a8))[_0xd69d1a(0x1d1)](',\x20');console[_0xd69d1a(0x1cd)](_0xd69d1a(0x20b)+a15_0x47c6f3[_0xd69d1a(0x205)](_0xd69d1a(0x1fb)+_0x43c879));}}}
|
|
1
|
+
const a15_0x4b9002=a15_0x44ec;(function(_0x976156,_0xac320e){const _0x2396cb=a15_0x44ec,_0x18119b=_0x976156();while(!![]){try{const _0xa4da5e=parseInt(_0x2396cb(0xaf))/0x1*(parseInt(_0x2396cb(0xa7))/0x2)+parseInt(_0x2396cb(0x78))/0x3+-parseInt(_0x2396cb(0xad))/0x4*(-parseInt(_0x2396cb(0x8d))/0x5)+parseInt(_0x2396cb(0x6b))/0x6+-parseInt(_0x2396cb(0xaa))/0x7+parseInt(_0x2396cb(0x90))/0x8+-parseInt(_0x2396cb(0x88))/0x9;if(_0xa4da5e===_0xac320e)break;else _0x18119b['push'](_0x18119b['shift']());}catch(_0x3612de){_0x18119b['push'](_0x18119b['shift']());}}}(a15_0x8c6c,0xa593a));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';function a15_0x8c6c(){const _0x49b1b4=['✔\x20Found\x20','default_value','options','entries','Fetching\x20schema\x20for\x20\x27','input','enumeration','hidden','\x0aNo\x20fields\x20defined\x20in\x20schema','\x20\x20\x20\x20Default:\x20','\x20\x20\x20\x20','dim','blue','minimum','✔\x20Found\x20connection:\x20','\x0aConnection:\x20','>=\x20','\x27...','4909806drcSMz','value','execute','owner','max','getMetadata','✔\x20Resolved\x20\x27','findByName','limit','\x20[record]','\x0aConnector:\x20','Show\x20when:\x20','\x20connector\x20type','3313650pXMVmX','\x20\x20\x20\x20Options:\x20','Default:\x20','✔\x20Found\x20settings\x20for\x20connector\x20type:\x20','connection:types','log','Range:\x20','\x20-\x20','yellow','output','List\x20all\x20result\x20output\x20connections','join','repeat','filter','connection:schema','\x0aCredential\x20settings:','28200177hgYajK','maximum','validate','\x20connection','localeCompare','169175sfpgKi','push','\x27\x20(type:\x20','6673568XVpBen','cyan','properties','name','padStart','site','record','Type:\x20','Fetching\x20settings\x20for\x20\x27','\x27\x20as\x20connection\x20name\x20→\x20type:\x20','slice','label','data','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.','\x0aAvailable\x20fields:','sort','verbose','getOutputSchema','bold','connection:settings','Listing\x20connector\x20types...','length','settings','237794gncTDZ','connection:show','green','7694638ElEOIu','credential','Site:\x20','100hjZWcf','find','11RUWEMp','Fetching\x20connection\x20\x27','type','resolve','legacy_settings','object','error','connection','connection:list','Treating\x20\x27','Show\x20connection-level\x20settings\x20(credentials,\x20authentication)','\x0aNo\x20credential\x20settings\x20defined','table','Show\x20connector\x20output\x20schema\x20for\x20connector_config\x20validation','map','Options:\x20','No\x20available\x20fields\x20for\x20this\x20connector','✔\x20Found\x20schema\x20for\x20connector\x20type:\x20','Listing\x20connections...','\x27\x20as\x20connector\x20type','description','legacy','criteria','stringify','hint'];a15_0x8c6c=function(){return _0x49b1b4;};return a15_0x8c6c();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import a15_0x319af1 from'chalk';function normalizeSchemaForDisplay(_0x49d6de){const _0x1766a3=a15_0x44ec,_0x1577ee=_0x49d6de[_0x1766a3(0x92)]||[],_0x1b8162=_0x1577ee[_0x1766a3(0xae)](_0x40b976=>_0x40b976[_0x1766a3(0x93)]===_0x1766a3(0xb3)&&_0x40b976[_0x1766a3(0xb1)]===_0x1766a3(0x96)&&_0x40b976['properties']);if(_0x1b8162?.['properties']){const _0x33b48b=_0x1577ee['filter'](_0x2acc47=>_0x2acc47['name']!==_0x1766a3(0xc4)&&_0x2acc47[_0x1766a3(0x93)]!==_0x1766a3(0xb3));return[..._0x33b48b,..._0x1b8162[_0x1766a3(0x92)]];}return _0x1577ee[_0x1766a3(0x85)](_0x35f64d=>_0x35f64d[_0x1766a3(0x93)]!=='legacy');}function printSchemaFields(_0x35c324,_0x4cc287){const _0x399395=a15_0x44ec,_0xf61580='\x20\x20'[_0x399395(0x84)](_0x4cc287+0x1),_0x4793a9='\x20\x20'[_0x399395(0x84)](_0x4cc287+0x2);for(const _0x2f60b6 of _0x35c324){if(!_0x2f60b6[_0x399395(0x93)])continue;const _0x5ca83b=_0x2f60b6[_0x399395(0xb1)]===_0x399395(0x96)&&_0x2f60b6[_0x399395(0x92)]&&_0x2f60b6[_0x399395(0x92)][_0x399395(0xa5)]>0x0&&_0x2f60b6[_0x399395(0x93)]!=='legacy_settings';let _0x29406b=''+_0xf61580+a15_0x319af1[_0x399395(0xa9)](_0x2f60b6[_0x399395(0x93)]);_0x2f60b6['title']&&(_0x29406b+=':\x20'+_0x2f60b6['title']);if(_0x2f60b6[_0x399395(0xcd)])_0x29406b+=a15_0x319af1[_0x399395(0xd3)]('\x20['+_0x2f60b6[_0x399395(0xcd)]+']');else _0x5ca83b&&(_0x29406b+=a15_0x319af1[_0x399395(0xd3)](_0x399395(0x74)));console[_0x399395(0x7d)](_0x29406b);_0x2f60b6[_0x399395(0xc3)]&&console[_0x399395(0x7d)](''+_0x4793a9+a15_0x319af1[_0x399395(0xd3)](_0x2f60b6[_0x399395(0xc3)]));if(_0x2f60b6['enumeration']){const _0x5852a3=_0x2f60b6[_0x399395(0xce)][_0x399395(0xbd)](_0x170b82=>typeof _0x170b82===_0x399395(0xb4)&&_0x399395(0x6c)in _0x170b82?_0x170b82[_0x399395(0x6c)]:_0x170b82)['join'](',\x20');console[_0x399395(0x7d)](_0x4793a9+_0x399395(0xbe)+a15_0x319af1[_0x399395(0x80)](_0x5852a3));}_0x2f60b6['default_value']!==undefined&&console['log'](_0x4793a9+_0x399395(0x7a)+a15_0x319af1['blue'](String(_0x2f60b6[_0x399395(0xc9)])));if(_0x2f60b6[_0x399395(0x66)]!==undefined||_0x2f60b6['maximum']!==undefined){const _0x103edf=_0x2f60b6['minimum']!==undefined&&_0x2f60b6[_0x399395(0x89)]!==undefined?_0x2f60b6[_0x399395(0x66)]+'\x20-\x20'+_0x2f60b6[_0x399395(0x89)]:_0x2f60b6[_0x399395(0x66)]!==undefined?_0x399395(0x69)+_0x2f60b6['minimum']:'<=\x20'+_0x2f60b6[_0x399395(0x89)];console[_0x399395(0x7d)](_0x4793a9+_0x399395(0x7e)+a15_0x319af1[_0x399395(0xd4)](_0x103edf));}if(_0x2f60b6['criteria']){const _0x5ef214=Object[_0x399395(0xcb)](_0x2f60b6['criteria'])[_0x399395(0xbd)](([_0x5bfdd8,_0x5596ff])=>_0x5bfdd8+'='+JSON['stringify'](_0x5596ff))[_0x399395(0x83)](',\x20');console['log'](''+_0x4793a9+a15_0x319af1[_0x399395(0xd3)]('Show\x20when:\x20'+_0x5ef214));}_0x5ca83b&&_0x2f60b6[_0x399395(0x92)]&&printSchemaFields(_0x2f60b6[_0x399395(0x92)],_0x4cc287+0x1);}}export class ConnectionListCommand extends BaseCommand{[a15_0x4b9002(0x93)]=a15_0x4b9002(0xb7);[a15_0x4b9002(0xc3)]=a15_0x4b9002(0x82);async[a15_0x4b9002(0x6d)](_0x53a1b9){const _0x464fd3=a15_0x4b9002,{options:_0x51bd7b,tdx:_0xcf4e7}=_0x53a1b9;_0x51bd7b['verbose']&&console[_0x464fd3(0xb5)](_0x464fd3(0xac)+_0x51bd7b['site']);const _0x5842fc=resolveLimit(_0x51bd7b[_0x464fd3(0x73)],DEFAULT_LISTING_LIMIT),_0x1cb451=await withSpinner(_0x464fd3(0xc1),()=>_0xcf4e7['connection']['list'](),{'verbose':_0x51bd7b[_0x464fd3(0xa0)]}),_0xefcbd1=_0x1cb451[_0x464fd3(0x9c)];console[_0x464fd3(0xb5)](_0x464fd3(0xc8)+_0xefcbd1[_0x464fd3(0xa5)]+_0x464fd3(0x8b)+(_0xefcbd1['length']!==0x1?'s':''));if(isStructuredFormat(_0x51bd7b)){const _0x45e171=_0xefcbd1[_0x464fd3(0x9a)](0x0,_0x5842fc);await handleSDKOutput(_0x45e171,{..._0x51bd7b,'limit':_0x5842fc});}else{const _0x4da80b=_0xefcbd1[_0x464fd3(0xa5)]>0x0?Math['max'](..._0xefcbd1[_0x464fd3(0xbd)](_0x30de4c=>_0x30de4c[_0x464fd3(0xb1)][_0x464fd3(0xa5)])):0x0,_0x574dc4=[];for(const _0x560c2d of _0xefcbd1){const _0x52b10d=a15_0x319af1['cyan'](_0x560c2d[_0x464fd3(0xb1)][_0x464fd3(0x94)](_0x4da80b)),_0x1261c4=_0x560c2d['owner']?.[_0x464fd3(0x93)]?_0x464fd3(0x7f)+a15_0x319af1['dim'](_0x560c2d[_0x464fd3(0x6e)]['name']):'';_0x574dc4[_0x464fd3(0x8e)](_0x52b10d+'\x20\x20'+_0x560c2d[_0x464fd3(0x93)]+_0x1261c4);}await writeOutput(_0x574dc4[_0x464fd3(0x83)]('\x0a'),_0x51bd7b['output'],_0x464fd3(0xbb));}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{[a15_0x4b9002(0x93)]=a15_0x4b9002(0xa8);[a15_0x4b9002(0xc3)]='Show\x20connection\x20details';['validate'](_0x1d7890){const {args:_0x2058cb}=_0x1d7890;if(!_0x2058cb[0x0])return'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';return undefined;}async[a15_0x4b9002(0x6d)](_0x493c00){const _0x4553da=a15_0x4b9002,{options:_0x2a2258,args:_0x316cdf,tdx:_0x51ee9e}=_0x493c00,_0x15f7b5=_0x316cdf[0x0];_0x2a2258[_0x4553da(0xa0)]&&(console[_0x4553da(0xb5)](_0x4553da(0xac)+_0x2a2258[_0x4553da(0x95)]),console[_0x4553da(0xb5)]('Looking\x20up\x20connection:\x20'+_0x15f7b5));const _0x10886e=await withSpinner(_0x4553da(0xb0)+_0x15f7b5+'\x27...',()=>_0x51ee9e[_0x4553da(0xb6)][_0x4553da(0xb2)](_0x15f7b5),{'verbose':_0x2a2258[_0x4553da(0xa0)]}),_0x1da20f=_0x10886e[_0x4553da(0x9c)];return console['error'](_0x4553da(0x67)+_0x1da20f['name']),await handleSingleObjectOutput(_0x1da20f,_0x2a2258),0x0;}}export class ConnectionSchemaCommand extends BaseCommand{['name']=a15_0x4b9002(0x86);[a15_0x4b9002(0xc3)]=a15_0x4b9002(0xbc);[a15_0x4b9002(0x8a)](_0xc8dd54){const {args:_0x5636f4}=_0xc8dd54;if(!_0x5636f4[0x0])return'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.';return undefined;}async[a15_0x4b9002(0x6d)](_0x458ce0){const _0x4320d4=a15_0x4b9002,{options:_0x223467,args:_0x3d3b56,tdx:_0x53265d}=_0x458ce0,_0x2cc176=_0x3d3b56[0x0];_0x223467[_0x4320d4(0xa0)]&&(console['error'](_0x4320d4(0xac)+_0x223467[_0x4320d4(0x95)]),console[_0x4320d4(0xb5)]('Resolving\x20connector\x20type\x20or\x20name:\x20'+_0x2cc176));let _0x3e79e7=_0x2cc176,_0x3d974f;try{const _0x23eb02=await _0x53265d['connection'][_0x4320d4(0x72)](_0x2cc176);_0x23eb02&&(_0x3e79e7=_0x23eb02['type'],_0x3d974f=_0x23eb02[_0x4320d4(0x93)],_0x223467[_0x4320d4(0xa0)]&&console['error'](_0x4320d4(0x71)+_0x2cc176+_0x4320d4(0x99)+_0x3e79e7));}catch{_0x223467[_0x4320d4(0xa0)]&&console[_0x4320d4(0xb5)](_0x4320d4(0xb8)+_0x2cc176+_0x4320d4(0xc2));}const _0x519dac=await withSpinner(_0x4320d4(0xcc)+_0x3e79e7+_0x4320d4(0x6a),()=>_0x53265d[_0x4320d4(0xb6)][_0x4320d4(0xa1)](_0x3e79e7),{'verbose':_0x223467[_0x4320d4(0xa0)]}),_0x3a62d3=_0x519dac['data'];_0x3d974f?console[_0x4320d4(0xb5)]('✔\x20Found\x20schema\x20for\x20connection\x20\x27'+_0x3d974f+_0x4320d4(0x8f)+_0x3e79e7+')'):console[_0x4320d4(0xb5)](_0x4320d4(0xc0)+_0x3e79e7);if(isStructuredFormat(_0x223467))await handleSingleObjectOutput(_0x3a62d3,_0x223467);else{const _0x1a9b39=normalizeSchemaForDisplay(_0x3a62d3);_0x3d974f?(console[_0x4320d4(0x7d)](_0x4320d4(0x68)+a15_0x319af1[_0x4320d4(0x91)](_0x3d974f)),console['log'](_0x4320d4(0x97)+a15_0x319af1[_0x4320d4(0xd3)](_0x3e79e7))):console['log'](_0x4320d4(0x75)+a15_0x319af1[_0x4320d4(0x91)](_0x3e79e7)),_0x1a9b39[_0x4320d4(0xa5)]>0x0?(console[_0x4320d4(0x7d)](a15_0x319af1[_0x4320d4(0xa2)]('\x0aAvailable\x20fields:')),printSchemaFields(_0x1a9b39,0x0)):console[_0x4320d4(0x7d)](a15_0x319af1[_0x4320d4(0xd3)](_0x4320d4(0xd0)));}return 0x0;}}export class ConnectionTypesCommand extends BaseCommand{['name']=a15_0x4b9002(0x7c);[a15_0x4b9002(0xc3)]='List\x20available\x20connector\x20types';async[a15_0x4b9002(0x6d)](_0x22332f){const _0x100482=a15_0x4b9002,{options:_0x2d0a6e,tdx:_0x5bf9b5}=_0x22332f;_0x2d0a6e[_0x100482(0xa0)]&&console[_0x100482(0xb5)](_0x100482(0xac)+_0x2d0a6e[_0x100482(0x95)]);const _0x22cf3c=await withSpinner(_0x100482(0xa4),()=>_0x5bf9b5[_0x100482(0xb6)]['listTypes'](),{'verbose':_0x2d0a6e[_0x100482(0xa0)]}),_0x5521e0=_0x22cf3c['data'][_0x100482(0x9f)]((_0x343db8,_0x2d50ad)=>_0x343db8['type'][_0x100482(0x8c)](_0x2d50ad[_0x100482(0xb1)]));console[_0x100482(0xb5)](_0x100482(0xc8)+_0x5521e0[_0x100482(0xa5)]+_0x100482(0x77)+(_0x5521e0[_0x100482(0xa5)]!==0x1?'s':''));if(isStructuredFormat(_0x2d0a6e))await handleSDKOutput(_0x5521e0,_0x2d0a6e);else{const _0x3883fc=_0x5521e0[_0x100482(0xa5)]>0x0?Math[_0x100482(0x6f)](..._0x5521e0[_0x100482(0xbd)](_0x226725=>_0x226725[_0x100482(0xb1)][_0x100482(0xa5)])):0x0,_0x4eda6f=[];for(const _0x265ec7 of _0x5521e0){const _0x3da3d7=a15_0x319af1[_0x100482(0x91)](_0x265ec7['type'][_0x100482(0x94)](_0x3883fc));_0x4eda6f[_0x100482(0x8e)](_0x3da3d7+'\x20\x20'+_0x265ec7[_0x100482(0x93)]);}await writeOutput(_0x4eda6f[_0x100482(0x83)]('\x0a'),_0x2d0a6e[_0x100482(0x81)],_0x100482(0xbb));}return 0x0;}}function a15_0x44ec(_0x7bc63c,_0x4cc787){_0x7bc63c=_0x7bc63c-0x66;const _0x8c6ce2=a15_0x8c6c();let _0x44ecbf=_0x8c6ce2[_0x7bc63c];return _0x44ecbf;}export class ConnectionSettingsCommand extends BaseCommand{[a15_0x4b9002(0x93)]=a15_0x4b9002(0xa3);[a15_0x4b9002(0xc3)]=a15_0x4b9002(0xb9);[a15_0x4b9002(0x8a)](_0x5d2cbb){const _0x38c731=a15_0x4b9002,{args:_0x4988b3}=_0x5d2cbb;if(!_0x4988b3[0x0])return _0x38c731(0x9d);return undefined;}async[a15_0x4b9002(0x6d)](_0x15c3e5){const _0x4f736b=a15_0x4b9002,{options:_0x153d45,args:_0xbc5c9f,tdx:_0x265ad0}=_0x15c3e5,_0x9eaec2=_0xbc5c9f[0x0];_0x153d45[_0x4f736b(0xa0)]&&(console[_0x4f736b(0xb5)](_0x4f736b(0xac)+_0x153d45[_0x4f736b(0x95)]),console['error']('Fetching\x20settings\x20for\x20connector\x20type:\x20'+_0x9eaec2));const _0x4c3d50=await withSpinner(_0x4f736b(0x98)+_0x9eaec2+_0x4f736b(0x6a),()=>_0x265ad0['connection'][_0x4f736b(0x70)](_0x9eaec2),{'verbose':_0x153d45['verbose']}),_0x11fed7=_0x4c3d50['data'];console[_0x4f736b(0xb5)](_0x4f736b(0x7b)+_0x9eaec2);if(isStructuredFormat(_0x153d45))await handleSingleObjectOutput(_0x11fed7,_0x153d45);else{console[_0x4f736b(0x7d)](_0x4f736b(0x75)+a15_0x319af1[_0x4f736b(0x91)](_0x9eaec2)),console['log']('Name:\x20'+_0x11fed7[_0x4f736b(0x93)]);const _0x11c5a5=_0x11fed7[_0x4f736b(0xa6)]||[],_0x30873b=_0x11c5a5[_0x4f736b(0x85)](_0x2ca419=>_0x2ca419[_0x4f736b(0xab)]);_0x30873b[_0x4f736b(0xa5)]>0x0&&(console['log'](a15_0x319af1[_0x4f736b(0xa2)](_0x4f736b(0x87))),printMetadataSettings(_0x30873b));let _0xc54000=![];try{const _0x1aed48=await _0x265ad0[_0x4f736b(0xb6)]['getOutputSchema'](_0x9eaec2),_0x38566d=normalizeSchemaForDisplay(_0x1aed48);_0x38566d[_0x4f736b(0xa5)]>0x0&&(console[_0x4f736b(0x7d)](a15_0x319af1[_0x4f736b(0xa2)](_0x4f736b(0x9e))),printSchemaFields(_0x38566d,0x0),_0xc54000=!![]);}catch{const _0x413071=_0x11c5a5['filter'](_0x4aac2e=>!_0x4aac2e[_0x4f736b(0xab)]);_0x413071[_0x4f736b(0xa5)]>0x0&&(console[_0x4f736b(0x7d)](a15_0x319af1[_0x4f736b(0xa2)]('\x0aAvailable\x20fields:')),printMetadataSettings(_0x413071),_0xc54000=!![]);}!_0xc54000&&_0x153d45[_0x4f736b(0xa0)]&&console[_0x4f736b(0xb5)](a15_0x319af1['dim'](_0x4f736b(0xbf))),_0x30873b[_0x4f736b(0xa5)]===0x0&&console['log'](a15_0x319af1['dim'](_0x4f736b(0xba)));}return 0x0;}}function printMetadataSettings(_0x520726){const _0x3f8c2c=a15_0x4b9002;for(const _0xedb6fa of _0x520726){if(!_0xedb6fa['name'])continue;if(_0xedb6fa[_0x3f8c2c(0xcf)])continue;let _0x4735f2='\x20\x20'+a15_0x319af1['green'](_0xedb6fa[_0x3f8c2c(0x93)]);_0xedb6fa[_0x3f8c2c(0x9b)]&&(_0x4735f2+=':\x20'+_0xedb6fa[_0x3f8c2c(0x9b)]);_0xedb6fa[_0x3f8c2c(0xb1)]&&(_0x4735f2+=a15_0x319af1[_0x3f8c2c(0xd3)]('\x20['+_0xedb6fa[_0x3f8c2c(0xb1)]+']'));console[_0x3f8c2c(0x7d)](_0x4735f2);_0xedb6fa[_0x3f8c2c(0xc7)]&&console[_0x3f8c2c(0x7d)](_0x3f8c2c(0xd2)+a15_0x319af1[_0x3f8c2c(0xd3)](_0xedb6fa['hint']));if(_0xedb6fa[_0x3f8c2c(0xca)]){const _0x56dcf4=_0xedb6fa[_0x3f8c2c(0xca)][_0x3f8c2c(0xbd)](_0x3b6d2f=>_0x3b6d2f[_0x3f8c2c(0x6c)])[_0x3f8c2c(0x83)](',\x20');console[_0x3f8c2c(0x7d)](_0x3f8c2c(0x79)+a15_0x319af1['yellow'](_0x56dcf4));}_0xedb6fa['default_value']!==undefined&&_0xedb6fa['default_value']!==null&&console['log'](_0x3f8c2c(0xd1)+a15_0x319af1['blue'](String(_0xedb6fa[_0x3f8c2c(0xc9)])));if(_0xedb6fa[_0x3f8c2c(0xc5)]){const _0x2a4e2f=Object[_0x3f8c2c(0xcb)](_0xedb6fa[_0x3f8c2c(0xc5)])[_0x3f8c2c(0xbd)](([_0xf97764,_0x5020d3])=>_0xf97764+'='+JSON[_0x3f8c2c(0xc6)](_0x5020d3))[_0x3f8c2c(0x83)](',\x20');console[_0x3f8c2c(0x7d)]('\x20\x20\x20\x20'+a15_0x319af1[_0x3f8c2c(0xd3)](_0x3f8c2c(0x76)+_0x2a4e2f));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x430d5c=a16_0x3876;(function(_0x2e243d,_0x48e8f7){const _0x30cb02=a16_0x3876,_0x27f04c=_0x2e243d();while(!![]){try{const _0x327e6e=-parseInt(_0x30cb02(0xac))/0x1*(parseInt(_0x30cb02(0x96))/0x2)+-parseInt(_0x30cb02(0xb1))/0x3*(-parseInt(_0x30cb02(0xa1))/0x4)+parseInt(_0x30cb02(0xaf))/0x5*(parseInt(_0x30cb02(0x95))/0x6)+parseInt(_0x30cb02(0xa4))/0x7*(parseInt(_0x30cb02(0x94))/0x8)+-parseInt(_0x30cb02(0xa9))/0x9+-parseInt(_0x30cb02(0x99))/0xa*(parseInt(_0x30cb02(0xae))/0xb)+parseInt(_0x30cb02(0x9f))/0xc;if(_0x327e6e===_0x48e8f7)break;else _0x27f04c['push'](_0x27f04c['shift']());}catch(_0x5c927a){_0x27f04c['push'](_0x27f04c['shift']());}}}(a16_0xa9e3,0x722f6));import{BaseCommand}from'./command.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';function a16_0xa9e3(){const _0x42ad95=['Listing\x20databases...','3984650VpdqLv','Pattern:\x20','execute','log','name','database_name','5469000vDvUoq','verbose','1948pFCMJt','databases','error','996289wYcDUC','length','\x20database','List\x20all\x20databases','data','3675132aFSJJB','📦\x20','limit','13611FzbzuZ','query','11tezHMC','13810OblhiM','description','4581GumQGI','site','8psxvym','948vWAYex','74DVCPCN','Site:\x20'];a16_0xa9e3=function(){return _0x42ad95;};return a16_0xa9e3();}import{withSpinner}from'../utils/spinner.js';function a16_0x3876(_0x42ba8b,_0x3e20fb){_0x42ba8b=_0x42ba8b-0x93;const _0xa9e3f3=a16_0xa9e3();let _0x3876a5=_0xa9e3f3[_0x42ba8b];return _0x3876a5;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';export class DatabasesCommand extends BaseCommand{[a16_0x430d5c(0x9d)]=a16_0x430d5c(0xa2);[a16_0x430d5c(0xb0)]=a16_0x430d5c(0xa7);async[a16_0x430d5c(0x9b)](_0x32bb99){const _0x5c3235=a16_0x430d5c,{options:_0x5569fe,args:_0xfbb719,tdx:_0x451a88}=_0x32bb99,_0x2a366e=_0xfbb719[0x0];_0x5569fe[_0x5c3235(0xa0)]&&(console[_0x5c3235(0xa3)](_0x5c3235(0x97)+_0x5569fe[_0x5c3235(0x93)]),_0x2a366e&&console['error'](_0x5c3235(0x9a)+_0x2a366e));const _0x3705cf=resolveLimit(_0x5569fe[_0x5c3235(0xab)],DEFAULT_LISTING_LIMIT),_0x338caa=await withSpinner(_0x5c3235(0x98),()=>_0x451a88[_0x5c3235(0xad)]['listDatabases'](_0x2a366e,_0x3705cf),{'verbose':_0x5569fe[_0x5c3235(0xa0)]}),_0xef3fca=_0x338caa[_0x5c3235(0xa8)];console[_0x5c3235(0xa3)]('✔\x20Found\x20'+_0xef3fca[_0x5c3235(0xa5)]+_0x5c3235(0xa6)+(_0xef3fca['length']!==0x1?'s':''));if(isStructuredFormat(_0x5569fe))await handleSDKOutput(_0xef3fca,{..._0x5569fe,'limit':_0x3705cf});else for(const _0x58a84b of _0xef3fca){console[_0x5c3235(0x9c)](_0x5c3235(0xaa)+_0x58a84b[_0x5c3235(0x9e)]);}return 0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x2077fe=a17_0x38f2;(function(_0x256601,_0x3d84f2){const _0x161d68=a17_0x38f2,_0x2bbdff=_0x256601();while(!![]){try{const _0x22903f=parseInt(_0x161d68(0x15b))/0x1+-parseInt(_0x161d68(0x154))/0x2*(parseInt(_0x161d68(0x158))/0x3)+parseInt(_0x161d68(0x152))/0x4*(-parseInt(_0x161d68(0x15e))/0x5)+-parseInt(_0x161d68(0x15c))/0x6*(-parseInt(_0x161d68(0x157))/0x7)+parseInt(_0x161d68(0x14f))/0x8+-parseInt(_0x161d68(0x151))/0x9+parseInt(_0x161d68(0x15a))/0xa;if(_0x22903f===_0x3d84f2)break;else _0x2bbdff['push'](_0x2bbdff['shift']());}catch(_0x52e4bd){_0x2bbdff['push'](_0x2bbdff['shift']());}}}(a17_0x2336,0xf119f));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a17_0x2336(){const _0x4e2a02=['6666000rPVdiX','Fetching\x20email\x20senders...','665937wdvPWr','116ictiuq','name','1121746JCwKJC','delivery','execute','210CJCrjX','9MFKPAO','verbose','16746440zLpxaK','144011PqtzEk','119070ejzdVz','description','86740CqHxLp','limit','data','List\x20email\x20senders','delivery:senders','listEmailSenders'];a17_0x2336=function(){return _0x4e2a02;};return a17_0x2336();}import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{resolveWorkspaceIdFromOptions}from'./engage-command.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../core/constants.js';function a17_0x38f2(_0x1e557f,_0xb68736){_0x1e557f=_0x1e557f-0x14a;const _0x2336e2=a17_0x2336();let _0x38f202=_0x2336e2[_0x1e557f];return _0x38f202;}export class DeliveryEmailSendersCommand extends BaseCommand{['name']=a17_0x2077fe(0x14d);[a17_0x2077fe(0x15d)]=a17_0x2077fe(0x14c);async[a17_0x2077fe(0x156)](_0x205456){const _0x225192=a17_0x2077fe,{options:_0x51add7,args:_0x239dd2,tdx:_0x1ca944}=_0x205456,_0x47dd06=_0x239dd2[0x0],_0x129a9f=resolveLimit(_0x51add7[_0x225192(0x14a)],DEFAULT_LLM_LIMIT),_0x236df3=_0x51add7,_0x2487cd=await resolveWorkspaceIdFromOptions(_0x236df3,_0x1ca944),_0x5b3255=await withSpinner(_0x225192(0x150),()=>_0x1ca944[_0x225192(0x155)][_0x225192(0x14e)]({'workspaceId':_0x2487cd,'limit':_0x129a9f}),{'verbose':_0x51add7[_0x225192(0x159)]});let _0x28dfdb=_0x5b3255[_0x225192(0x14b)];return _0x47dd06&&(_0x28dfdb=_0x5b3255['data']['filter'](_0x5e9a13=>matchGlobPattern(_0x5e9a13[_0x225192(0x153)],_0x47dd06))),await handleSDKOutput(_0x28dfdb,_0x51add7),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a18_0x27ddb6=a18_0x350e;(function(_0x3d62bb,_0xeedcf1){const _0x357a78=a18_0x350e,_0xd4ab91=_0x3d62bb();while(!![]){try{const _0x48ff9c=parseInt(_0x357a78(0x106))/0x1+parseInt(_0x357a78(0x108))/0x2+parseInt(_0x357a78(0x11a))/0x3*(parseInt(_0x357a78(0x101))/0x4)+-parseInt(_0x357a78(0x119))/0x5*(-parseInt(_0x357a78(0x115))/0x6)+-parseInt(_0x357a78(0x105))/0x7+-parseInt(_0x357a78(0x11b))/0x8*(parseInt(_0x357a78(0x10b))/0x9)+parseInt(_0x357a78(0x120))/0xa;if(_0x48ff9c===_0xeedcf1)break;else _0xd4ab91['push'](_0xd4ab91['shift']());}catch(_0x27f214){_0xd4ab91['push'](_0xd4ab91['shift']());}}}(a18_0x36a3,0x57dc1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,resolveOutputOptions}from'../core/command-output.js';function a18_0x36a3(){const _0x3f292f=['message','map','1028260NivxzD','Error:\x20','describeTable','table','\x20\x20Cause:\x20','site','validate','\x27\x20does\x20not\x20exist','52uIIILf','some','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','database','4846331fITZlQ','335374bOLglD','error','1107120RRhuzc','query','description','143910UPbCiY','...','Table:\x20','describe','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','data','Describe\x20table\x20schema','✖\x20Table\x20not\x20found','✔\x20Found\x20','execute','6cJJbiA','length','name','verbose','2580935IaFBKP','23979xRHtLp','280XudWGp','args','cause'];a18_0x36a3=function(){return _0x3f292f;};return a18_0x36a3();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export function hideEmptyDescriptions(_0x545fcb){const _0x1f69a1=a18_0x350e;if(_0x545fcb[_0x1f69a1(0x102)](_0xc28172=>_0xc28172[_0x1f69a1(0x10a)]))return _0x545fcb;return _0x545fcb[_0x1f69a1(0x11f)](({description:_0x5c5648,..._0x570523})=>_0x570523);}function a18_0x350e(_0x12d79a,_0x1da711){_0x12d79a=_0x12d79a-0xff;const _0x36a35c=a18_0x36a3();let _0x350e1e=_0x36a35c[_0x12d79a];return _0x350e1e;}export class DescribeCommand extends BaseCommand{[a18_0x27ddb6(0x117)]=a18_0x27ddb6(0x10e);[a18_0x27ddb6(0x10a)]=a18_0x27ddb6(0x111);async[a18_0x27ddb6(0x114)](_0x17672b){const _0x5803a4=a18_0x27ddb6;return this[_0x5803a4(0x122)](_0x17672b);}async[a18_0x27ddb6(0x122)](_0x4b344b){const _0x327a46=a18_0x27ddb6,{options:_0x529dc7,args:_0x185824,tdx:_0x154369}=_0x4b344b;let _0x43cde3;try{_0x43cde3=parseTableReference(_0x185824[0x0]);const _0x2878ba=_0x529dc7[_0x327a46(0x104)];!_0x43cde3[_0x327a46(0x104)]&&_0x2878ba&&(_0x43cde3['database']=_0x2878ba);const _0x5214ee=validateTableDescribeReference(_0x43cde3);if(_0x5214ee)return console['error']('Error:\x20'+_0x5214ee),0x1;}catch(_0xc178d2){return console[_0x327a46(0x107)](_0x327a46(0x121)+_0xc178d2[_0x327a46(0x11e)]),0x1;}const _0x2dda4c=_0x43cde3[_0x327a46(0x104)],_0x4b893e=_0x43cde3[_0x327a46(0x123)];try{_0x529dc7[_0x327a46(0x118)]&&(console[_0x327a46(0x107)]('Site:\x20'+_0x529dc7[_0x327a46(0x125)]),console[_0x327a46(0x107)]('Database:\x20'+_0x2dda4c),console['error'](_0x327a46(0x10d)+_0x4b893e));const _0x2b613e=await withSpinner('Describing\x20table\x20'+_0x2dda4c+'.'+_0x4b893e+_0x327a46(0x10c),()=>_0x154369[_0x327a46(0x109)][_0x327a46(0x122)](_0x2dda4c,_0x4b893e),{'verbose':_0x529dc7[_0x327a46(0x118)]}),_0x212ff9=_0x2b613e[_0x327a46(0x110)];if(_0x212ff9['length']===0x0)return console['error'](_0x327a46(0x112)),console[_0x327a46(0x107)]('Table\x20\x27'+_0x2dda4c+'.'+_0x4b893e+_0x327a46(0x100)),0x1;console[_0x327a46(0x107)](_0x327a46(0x113)+_0x212ff9[_0x327a46(0x116)]+'\x20column'+(_0x212ff9['length']!==0x1?'s':'')+'\x20in\x20'+_0x2dda4c+'.'+_0x4b893e);const {format:_0x461289}=resolveOutputOptions(_0x529dc7);return await handleSDKOutput(_0x461289==='table'?hideEmptyDescriptions(_0x212ff9):_0x212ff9,_0x529dc7),0x0;}catch(_0x4e35f5){if(_0x4e35f5 instanceof SDKError)return console[_0x327a46(0x107)](_0x327a46(0x121)+_0x4e35f5['message']),_0x4e35f5[_0x327a46(0x11d)]&&console[_0x327a46(0x107)](_0x327a46(0x124)+_0x4e35f5[_0x327a46(0x11d)]),0x1;throw _0x4e35f5;}}[a18_0x27ddb6(0xff)](_0x4c7ac1){const _0x41879f=a18_0x27ddb6;if(_0x4c7ac1['args'][_0x41879f(0x116)]===0x0)return _0x41879f(0x103);if(_0x4c7ac1[_0x41879f(0x11c)][_0x41879f(0x116)]>0x1)return _0x41879f(0x10f);return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x4a8662=a19_0x186a;(function(_0x44cde7,_0x127b6d){const _0x1f1cc1=a19_0x186a,_0x50e8c3=_0x44cde7();while(!![]){try{const _0x589a57=parseInt(_0x1f1cc1(0x1fb))/0x1*(-parseInt(_0x1f1cc1(0x1f3))/0x2)+-parseInt(_0x1f1cc1(0x1e2))/0x3+parseInt(_0x1f1cc1(0x1e9))/0x4+parseInt(_0x1f1cc1(0x1cf))/0x5*(parseInt(_0x1f1cc1(0x1c2))/0x6)+parseInt(_0x1f1cc1(0x1c8))/0x7*(parseInt(_0x1f1cc1(0x1d1))/0x8)+-parseInt(_0x1f1cc1(0x1ec))/0x9*(parseInt(_0x1f1cc1(0x1cd))/0xa)+-parseInt(_0x1f1cc1(0x1f7))/0xb*(parseInt(_0x1f1cc1(0x1ed))/0xc);if(_0x589a57===_0x127b6d)break;else _0x50e8c3['push'](_0x50e8c3['shift']());}catch(_0x144206){_0x50e8c3['push'](_0x50e8c3['shift']());}}}(a19_0x35a1,0xc2f91));import{BaseCommand}from'./command.js';function a19_0x35a1(){const _0x5e2e81=['5316255oXAoYh','config','\x27...','Write\x20','Workspace\x20is\x20required.','1332340WtLqKS','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','35pjBCFY','\x0aPull\x20summary\x20for\x20workspace\x20\x27','16fNLXEa','\x20unchanged\x20files','yellow','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20campaigns\x20found\x20in\x20workspace\x20\x27','targetDir','\x20\x20Target:\x20','cwd','content','red','yes','name','workspace','\x20\x20\x20\x20\x20\x20\x20tdx\x20engage\x20campaign\x20pull\x20--workspace\x20<name>','\x20changed\x20files','length','engage_workspace','423738cCcFdI','utf-8','workspaceName','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','absolutePath','counts','segment','5991936ulFayp','type','setPhase','54DbnOBG','144yoNWyW','-\x20no\x20files\x20written','dim','execute','session','error','152sxjOeP','\x20=\x20','repeat','Pull\x20campaigns\x20to\x20YAML\x20files','1401279qyNqHE','✔\x20Pulled\x20','data','engage:campaign:pull','3381XLETKS','campaigns','\x0aChanges\x20to\x20\x27','files','filter','hasChanges','cyan','relativePath','isNew','\x20files?','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20campaigns','435402nWfkxQ','✔\x20All\x20files\x20are\x20up\x20to\x20date','\x0aUsage:\x20tdx\x20engage\x20campaign\x20pull\x20<workspace-name>','green','dryRun','diff'];a19_0x35a1=function(){return _0x5e2e81;};return a19_0x35a1();}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 a19_0x35a62b from'chalk';import{existsSync,mkdirSync,writeFileSync}from'fs';function a19_0x186a(_0x1ec8f6,_0xf8908e){_0x1ec8f6=_0x1ec8f6-0x1b9;const _0x35a12d=a19_0x35a1();let _0x186a25=_0x35a12d[_0x1ec8f6];return _0x186a25;}import a19_0x4542d9 from'path';import{pullCampaigns}from'../sdk/engage/campaign-pull.js';export class EngageCampaignPullCommand extends BaseCommand{['name']=a19_0x4a8662(0x1fa);['description']=a19_0x4a8662(0x1f6);async[a19_0x4a8662(0x1f0)](_0x570030){const _0x35ca46=a19_0x4a8662,{options:_0x3ca6cc,args:_0x124d67,tdx:_0x665af3}=_0x570030,_0x55901=_0x3ca6cc,_0xba7836=await resolveWorkspaceName(_0x124d67[0x0],_0x55901);if(!_0xba7836)return console['error'](a19_0x35a62b[_0x35ca46(0x1d3)](_0x35ca46(0x1cc))),console[_0x35ca46(0x1f2)](_0x35ca46(0x1c4)),console['error'](_0x35ca46(0x1de)),console[_0x35ca46(0x1f2)](_0x35ca46(0x1ce)),0x1;const _0x4c38d9=await withProgressSpinner('Pulling\x20campaigns\x20from\x20\x27'+_0xba7836+_0x35ca46(0x1ca),_0x4fdcae=>pullCampaigns({'engage':_0x665af3['engage'],'segment':_0x665af3[_0x35ca46(0x1e8)]},_0xba7836,{'campaignName':_0x55901[_0x35ca46(0x1dc)],'campaignType':_0x55901[_0x35ca46(0x1ea)],'progress':{'update':_0x4f78a6=>{const _0x37a3ad=_0x35ca46;_0x4fdcae[_0x37a3ad(0x1eb)](_0x4f78a6);}}}),{'verbose':_0x55901['verbose']}),_0x1f3f16=_0x4c38d9[_0x35ca46(0x1f9)];if(_0x1f3f16[_0x35ca46(0x1e7)][_0x35ca46(0x1fc)]===0x0)return console['error'](a19_0x35a62b[_0x35ca46(0x1d3)](_0x35ca46(0x1d5)+_0x1f3f16[_0x35ca46(0x1e4)]+'\x27')),0x0;const _0x1230a3=_0x1f3f16[_0x35ca46(0x1b9)][_0x35ca46(0x1ba)](_0x5e69b9=>_0x5e69b9[_0x35ca46(0x1be)]),_0x266ea7=_0x1f3f16['files'][_0x35ca46(0x1ba)](_0x28a457=>!_0x28a457['isNew']&&_0x28a457[_0x35ca46(0x1bb)]),_0x169c07=_0x1f3f16[_0x35ca46(0x1b9)][_0x35ca46(0x1ba)](_0x4d5fed=>!_0x4d5fed[_0x35ca46(0x1be)]&&!_0x4d5fed[_0x35ca46(0x1bb)]);console[_0x35ca46(0x1f2)](_0x35ca46(0x1d0)+_0x1f3f16['workspaceName']+'\x27:'),console[_0x35ca46(0x1f2)]('\x20\x20'+a19_0x35a62b[_0x35ca46(0x1bc)](_0x1f3f16[_0x35ca46(0x1e7)][_0x35ca46(0x1fc)]+_0x35ca46(0x1c1))),console['error']('\x20\x20'+a19_0x35a62b[_0x35ca46(0x1c5)]('+\x20'+_0x1230a3['length']+'\x20new\x20files')),console[_0x35ca46(0x1f2)]('\x20\x20'+a19_0x35a62b['yellow']('~\x20'+_0x266ea7['length']+_0x35ca46(0x1df))),console['error']('\x20\x20'+a19_0x35a62b[_0x35ca46(0x1ef)]('=\x20'+_0x169c07[_0x35ca46(0x1e0)]+_0x35ca46(0x1d2))),console['error'](_0x35ca46(0x1d7)+a19_0x35a62b[_0x35ca46(0x1bc)](_0x1f3f16[_0x35ca46(0x1d6)])+'\x0a');if(_0x266ea7[_0x35ca46(0x1e0)]>0x0)for(const _0x1e65c6 of _0x266ea7){console[_0x35ca46(0x1f2)](_0x35ca46(0x1fd)+_0x1e65c6[_0x35ca46(0x1bd)]+'\x27:'),console[_0x35ca46(0x1f2)]('\u2500'[_0x35ca46(0x1f5)](0x3c)),console[_0x35ca46(0x1f2)](_0x1e65c6[_0x35ca46(0x1c7)]),console[_0x35ca46(0x1f2)]('\u2500'[_0x35ca46(0x1f5)](0x3c));}if(_0x55901[_0x35ca46(0x1c6)])return console[_0x35ca46(0x1f2)](a19_0x35a62b[_0x35ca46(0x1d3)](_0x35ca46(0x1e5))),0x0;if(_0x1230a3[_0x35ca46(0x1e0)]===0x0&&_0x266ea7[_0x35ca46(0x1e0)]===0x0)return console[_0x35ca46(0x1f2)](a19_0x35a62b[_0x35ca46(0x1c5)](_0x35ca46(0x1c3))),saveSessionContext({'engage_workspace':_0x1f3f16[_0x35ca46(0x1e4)]},_0x55901[_0x35ca46(0x1f1)]),0x0;if(!_0x55901[_0x35ca46(0x1db)]){if(!isInteractive())return console[_0x35ca46(0x1f2)](a19_0x35a62b[_0x35ca46(0x1da)]('\x0aError:'),_0x35ca46(0x1d4)),console[_0x35ca46(0x1f2)](a19_0x35a62b['dim'](_0x35ca46(0x1c0))),0x1;const _0x1dd76a=await confirmKey(_0x35ca46(0x1cb)+(_0x1230a3[_0x35ca46(0x1e0)]+_0x266ea7[_0x35ca46(0x1e0)])+_0x35ca46(0x1bf));if(!_0x1dd76a)return console['error'](a19_0x35a62b[_0x35ca46(0x1d3)]('Aborted.'),_0x35ca46(0x1ee)),0x1;}for(const _0x35eef8 of _0x1f3f16[_0x35ca46(0x1b9)]){if(_0x35eef8[_0x35ca46(0x1be)]||_0x35eef8['hasChanges']){const _0x3e77f2=a19_0x4542d9['dirname'](_0x35eef8[_0x35ca46(0x1e6)]);!existsSync(_0x3e77f2)&&mkdirSync(_0x3e77f2,{'recursive':!![]}),writeFileSync(_0x35eef8[_0x35ca46(0x1e6)],_0x35eef8[_0x35ca46(0x1d9)],_0x35ca46(0x1e3));}}return console[_0x35ca46(0x1f2)](a19_0x35a62b[_0x35ca46(0x1c5)](_0x35ca46(0x1f8)+(_0x1230a3['length']+_0x266ea7[_0x35ca46(0x1e0)])+'\x20files\x20to\x20'+_0x1f3f16['targetDir'])),saveSessionContext({'engage_workspace':_0x1f3f16[_0x35ca46(0x1e4)]},_0x55901[_0x35ca46(0x1f1)]),console[_0x35ca46(0x1f2)](a19_0x35a62b[_0x35ca46(0x1c5)]('✔\x20Context\x20set:\x20'+a19_0x35a62b['dim'](_0x35ca46(0x1e1))+_0x35ca46(0x1f4)+a19_0x35a62b['cyan'](_0x1f3f16[_0x35ca46(0x1e4)]))),0x0;}}async function resolveWorkspaceName(_0x5a5cad,_0x4d8314){const _0x437d9a=a19_0x4a8662;if(_0x5a5cad)return _0x5a5cad;if(_0x4d8314[_0x437d9a(0x1dd)])return _0x4d8314[_0x437d9a(0x1dd)];const _0x57dfd3=tryFindTdxConfig(process[_0x437d9a(0x1d8)]());if(_0x57dfd3?.[_0x437d9a(0x1c9)]['engage_workspace'])return _0x57dfd3[_0x437d9a(0x1c9)][_0x437d9a(0x1e1)];const _0x5561a5=loadSessionContext(_0x4d8314[_0x437d9a(0x1f1)]);if(_0x5561a5?.['engage_workspace'])return _0x5561a5['engage_workspace'];return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a20_0x1d8ed2=a20_0x5374;function a20_0x5374(_0x3c4e35,_0x5697e0){_0x3c4e35=_0x3c4e35-0x165;const _0x2ae6d6=a20_0x2ae6();let _0x537481=_0x2ae6d6[_0x3c4e35];return _0x537481;}(function(_0x2c395a,_0x29f6fb){const _0x1654c9=a20_0x5374,_0x3fdd43=_0x2c395a();while(!![]){try{const _0x20d30f=parseInt(_0x1654c9(0x17c))/0x1+-parseInt(_0x1654c9(0x1ad))/0x2+parseInt(_0x1654c9(0x18c))/0x3*(parseInt(_0x1654c9(0x193))/0x4)+-parseInt(_0x1654c9(0x199))/0x5*(-parseInt(_0x1654c9(0x196))/0x6)+parseInt(_0x1654c9(0x19c))/0x7*(parseInt(_0x1654c9(0x169))/0x8)+-parseInt(_0x1654c9(0x1a6))/0x9*(-parseInt(_0x1654c9(0x16c))/0xa)+-parseInt(_0x1654c9(0x174))/0xb;if(_0x20d30f===_0x29f6fb)break;else _0x3fdd43['push'](_0x3fdd43['shift']());}catch(_0x2960e3){_0x3fdd43['push'](_0x3fdd43['shift']());}}}(a20_0x2ae6,0x59516));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_0x10f5f8 from'chalk';import a20_0x8b9ca5 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';function a20_0x2ae6(){const _0x1531c1=['def','session','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','17192472HOQCFn','description','engage_workspace','\x0aPush\x20summary\x20for\x20workspace\x20\x27','campaign_type','\x20errors:','\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','\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)','514438LvufTt','✔\x20Created\x20','green','Found\x20','\x20campaign\x20files','action','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','\x0aError:','data','verbose','errors','execute','name','relativePath','workspace','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','242280UZIKVw','yes','created','\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','\x20new\x20campaigns:','\x0aValidation\x20errors\x20in\x20','yellow','12tfFNvr','1\x20campaign\x20file:\x20','dirname','873708iGeEfj','Aborted.','updated','20IkCDIQ','valid','update','133pAlKPJ','\x27...','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','site','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','message','campaignId','dryRun','resolve','446067PPWGEh','engage','\x20campaigns','error','\x20\x20\x20\x20','configDir','length','221212cYWhbO','Push\x20','cwd','filter','results','config','map','dim','resolveWorkspaceId','segment','65272CPyqqD','setPhase','engage:campaign:push','110rmTaNj','Pushing\x20campaigns...','path','red','Workspace\x20is\x20required.'];a20_0x2ae6=function(){return _0x1531c1;};return a20_0x2ae6();}export class EngageCampaignPushCommand extends BaseCommand{['name']=a20_0x1d8ed2(0x16b);[a20_0x1d8ed2(0x175)]=a20_0x1d8ed2(0x18b);async[a20_0x1d8ed2(0x187)](_0x4c0aac){const _0x3bd96e=a20_0x1d8ed2,{options:_0x11ee5c,args:_0xf57d75,tdx:_0x360506}=_0x4c0aac,_0x21fa07=_0x11ee5c,_0x587712=_0xf57d75[0x0],_0x463c38=_0x587712?a20_0x8b9ca5[_0x3bd96e(0x1a5)](_0x587712):undefined,_0x3d3bc1=_0x463c38?isYamlFile(_0x463c38):![];let _0x41d5e5;if(_0x3d3bc1&&_0x463c38)_0x41d5e5=a20_0x8b9ca5[_0x3bd96e(0x195)](_0x463c38);else _0x463c38?_0x41d5e5=_0x463c38:_0x41d5e5=process[_0x3bd96e(0x1af)]();let _0x371bd0;const _0x5d9b16=tryFindTdxConfig(_0x41d5e5);_0x5d9b16?.[_0x3bd96e(0x1b2)]['engage_workspace']&&(_0x371bd0=_0x5d9b16[_0x3bd96e(0x1b2)]['engage_workspace'],!_0x3d3bc1&&(_0x41d5e5=_0x5d9b16[_0x3bd96e(0x1ab)]));_0x21fa07[_0x3bd96e(0x18a)]&&(_0x371bd0=_0x21fa07[_0x3bd96e(0x18a)]);if(!_0x371bd0){const _0x38887a=loadSessionContext(_0x21fa07[_0x3bd96e(0x172)]);_0x38887a?.[_0x3bd96e(0x176)]&&(_0x371bd0=_0x38887a[_0x3bd96e(0x176)]);}if(!_0x371bd0)return console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x192)](_0x3bd96e(0x170))),console[_0x3bd96e(0x1a9)](_0x3bd96e(0x18f)),console[_0x3bd96e(0x1a9)](_0x3bd96e(0x17b)),console[_0x3bd96e(0x1a9)](_0x3bd96e(0x17a)),console[_0x3bd96e(0x1a9)](_0x3bd96e(0x19e)),0x1;let _0x178e10;_0x3d3bc1&&_0x463c38?_0x178e10=[_0x463c38]:_0x178e10=discoverCampaignFiles(_0x41d5e5);if(_0x178e10[_0x3bd96e(0x1ac)]===0x0)return console['error'](a20_0x10f5f8[_0x3bd96e(0x192)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x41d5e5)),console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x166)](_0x3bd96e(0x173))),0x1;const _0xe054d2=_0x178e10[_0x3bd96e(0x165)](_0x5b67e0=>parseCampaignFile(_0x5b67e0,a20_0x8b9ca5[_0x3bd96e(0x195)](_0x5b67e0))),_0x60f806=_0xe054d2[_0x3bd96e(0x1ac)]===0x1?_0x3bd96e(0x194)+_0xe054d2[0x0][_0x3bd96e(0x171)][_0x3bd96e(0x188)]:_0xe054d2[_0x3bd96e(0x1ac)]+_0x3bd96e(0x180);console[_0x3bd96e(0x1a9)](_0x3bd96e(0x17f)+a20_0x10f5f8['cyan'](_0x60f806));let _0x50ca53=![];for(const _0x201509 of _0xe054d2){const _0x178258=validateCampaignDef(_0x201509[_0x3bd96e(0x171)]);if(!_0x178258[_0x3bd96e(0x19a)]){_0x50ca53=!![],console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x16f)](_0x3bd96e(0x191)+_0x201509[_0x3bd96e(0x189)]+':'));for(const _0x4ecc49 of _0x178258[_0x3bd96e(0x186)]){console[_0x3bd96e(0x1a9)]('\x20\x20'+a20_0x10f5f8['red']('✗')+'\x20'+_0x4ecc49[_0x3bd96e(0x16e)]+':\x20'+_0x4ecc49[_0x3bd96e(0x1a2)]);}}for(const _0x4a636d of _0x178258['warnings']){console[_0x3bd96e(0x1a9)]('\x20\x20'+a20_0x10f5f8['yellow']('⚠')+'\x20'+_0x4a636d[_0x3bd96e(0x16e)]+':\x20'+_0x4a636d[_0x3bd96e(0x1a2)]);}}if(_0x50ca53)return console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x16f)](_0x3bd96e(0x1a0))),0x1;const _0x4ebe3c=await _0x360506[_0x3bd96e(0x1a7)][_0x3bd96e(0x167)](_0x371bd0),_0x43b547=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x371bd0+_0x3bd96e(0x19d),_0x15fd31=>preparePush({'engage':_0x360506['engage'],'segment':_0x360506[_0x3bd96e(0x168)]},_0xe054d2,_0x4ebe3c,{'progress':{'update':_0x187f4a=>_0x15fd31[_0x3bd96e(0x16a)](_0x187f4a)}}),{'verbose':_0x21fa07[_0x3bd96e(0x185)]}),_0x3f942c=_0x43b547[_0x3bd96e(0x184)];await withProgressSpinner('Resolving\x20references...',_0x5327af=>resolveAndBuildInputs({'engage':_0x360506[_0x3bd96e(0x1a7)],'segment':_0x360506[_0x3bd96e(0x168)]},_0x3f942c,_0x4ebe3c,{'progress':{'update':_0x2616bc=>_0x5327af[_0x3bd96e(0x16a)](_0x2616bc)}}),{'verbose':_0x21fa07['verbose']});const _0x2650a6=_0x3f942c[_0x3bd96e(0x1b0)](_0x19e0c2=>_0x19e0c2[_0x3bd96e(0x181)]==='create'),_0x5dbbf3=_0x3f942c[_0x3bd96e(0x1b0)](_0x5c17f1=>_0x5c17f1[_0x3bd96e(0x181)]===_0x3bd96e(0x19b));console[_0x3bd96e(0x1a9)](_0x3bd96e(0x177)+_0x371bd0+'\x27:');if(_0x2650a6['length']>0x0){console[_0x3bd96e(0x1a9)]('\x20\x20'+a20_0x10f5f8[_0x3bd96e(0x17e)]('+\x20'+_0x2650a6[_0x3bd96e(0x1ac)]+_0x3bd96e(0x190)));for(const _0x5f275f of _0x2650a6){console[_0x3bd96e(0x1a9)](_0x3bd96e(0x1aa)+a20_0x10f5f8[_0x3bd96e(0x17e)]('+')+'\x20'+_0x5f275f[_0x3bd96e(0x171)][_0x3bd96e(0x188)]+'\x20('+_0x5f275f[_0x3bd96e(0x171)][_0x3bd96e(0x178)]+')');}}if(_0x5dbbf3[_0x3bd96e(0x1ac)]>0x0){console[_0x3bd96e(0x1a9)]('\x20\x20'+a20_0x10f5f8[_0x3bd96e(0x192)]('~\x20'+_0x5dbbf3[_0x3bd96e(0x1ac)]+'\x20campaigns\x20to\x20update:'));for(const _0x4ed685 of _0x5dbbf3){console[_0x3bd96e(0x1a9)]('\x20\x20\x20\x20'+a20_0x10f5f8['yellow']('~')+'\x20'+_0x4ed685['def'][_0x3bd96e(0x188)]+'\x20('+_0x4ed685[_0x3bd96e(0x171)][_0x3bd96e(0x178)]+')');}}if(_0x2650a6[_0x3bd96e(0x1ac)]===0x0&&_0x5dbbf3[_0x3bd96e(0x1ac)]===0x0)return console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x17e)](_0x3bd96e(0x182))),0x0;if(_0x21fa07[_0x3bd96e(0x1a4)])return console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x192)](_0x3bd96e(0x1a1))),0x0;if(!_0x21fa07[_0x3bd96e(0x18d)]){if(!isInteractive())return console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x16f)](_0x3bd96e(0x183)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a20_0x10f5f8['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1d171c=await confirmKey(_0x3bd96e(0x1ae)+(_0x2650a6['length']+_0x5dbbf3[_0x3bd96e(0x1ac)])+'\x20campaigns?');if(!_0x1d171c)return console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x192)](_0x3bd96e(0x197)),'-\x20no\x20changes\x20applied'),0x1;}const _0x15dd9e=await withProgressSpinner(_0x3bd96e(0x16d),_0x5588d9=>executePush({'engage':_0x360506[_0x3bd96e(0x1a7)],'segment':_0x360506['segment']},_0x3f942c,{'progress':{'update':_0x1123aa=>_0x5588d9[_0x3bd96e(0x16a)](_0x1123aa)}}),{'verbose':_0x21fa07['verbose']}),_0x1e2c80=_0x15dd9e[_0x3bd96e(0x184)];for(const _0x4f0b44 of _0x1e2c80[_0x3bd96e(0x1b1)]){if(_0x4f0b44[_0x3bd96e(0x1a3)]&&(_0x4f0b44[_0x3bd96e(0x181)]==='created'||_0x4f0b44[_0x3bd96e(0x181)]===_0x3bd96e(0x198))){const _0x32bcef=getCampaignUrl(_0x21fa07[_0x3bd96e(0x19f)],_0x4ebe3c,_0x4f0b44[_0x3bd96e(0x1a3)]),_0x3a6325=_0x4f0b44['action']==='created'?'+':'~',_0x58a1af=_0x4f0b44['action']===_0x3bd96e(0x18e)?a20_0x10f5f8[_0x3bd96e(0x17e)](_0x3a6325):a20_0x10f5f8['yellow'](_0x3a6325);console[_0x3bd96e(0x1a9)]('\x20\x20'+_0x58a1af+'\x20'+hyperlink(_0x4f0b44[_0x3bd96e(0x188)],_0x32bcef)+'\x20'+a20_0x10f5f8['dim'](_0x32bcef));}}_0x1e2c80[_0x3bd96e(0x18e)]>0x0&&console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x17e)](_0x3bd96e(0x17d)+_0x1e2c80[_0x3bd96e(0x18e)]+'\x20campaigns'));_0x1e2c80[_0x3bd96e(0x198)]>0x0&&console[_0x3bd96e(0x1a9)](a20_0x10f5f8[_0x3bd96e(0x17e)]('✔\x20Updated\x20'+_0x1e2c80[_0x3bd96e(0x198)]+_0x3bd96e(0x1a8)));if(_0x1e2c80[_0x3bd96e(0x186)][_0x3bd96e(0x1ac)]>0x0){console[_0x3bd96e(0x1a9)](a20_0x10f5f8['red']('✘\x20'+_0x1e2c80[_0x3bd96e(0x186)][_0x3bd96e(0x1ac)]+_0x3bd96e(0x179)));for(const _0x59803c of _0x1e2c80[_0x3bd96e(0x186)]){console['error']('\x20\x20'+a20_0x10f5f8['red'](_0x59803c[_0x3bd96e(0x188)])+':\x20'+_0x59803c[_0x3bd96e(0x1a9)]);}}return saveSessionContext({'engage_workspace':_0x371bd0},_0x21fa07[_0x3bd96e(0x172)]),_0x1e2c80['errors']['length']>0x0?0x1:0x0;}}
|
|
1
|
+
function a20_0x4bea(_0x14cbb8,_0x5ff5e3){_0x14cbb8=_0x14cbb8-0x159;const _0x503666=a20_0x5036();let _0x4beaf3=_0x503666[_0x14cbb8];return _0x4beaf3;}const a20_0x5ac03b=a20_0x4bea;(function(_0x155430,_0x34d41c){const _0x286788=a20_0x4bea,_0x2036e9=_0x155430();while(!![]){try{const _0x1841a7=-parseInt(_0x286788(0x188))/0x1*(parseInt(_0x286788(0x15b))/0x2)+parseInt(_0x286788(0x17e))/0x3+-parseInt(_0x286788(0x15e))/0x4+-parseInt(_0x286788(0x187))/0x5+parseInt(_0x286788(0x184))/0x6+parseInt(_0x286788(0x189))/0x7*(-parseInt(_0x286788(0x16c))/0x8)+parseInt(_0x286788(0x199))/0x9*(parseInt(_0x286788(0x19a))/0xa);if(_0x1841a7===_0x34d41c)break;else _0x2036e9['push'](_0x2036e9['shift']());}catch(_0x2a0930){_0x2036e9['push'](_0x2036e9['shift']());}}}(a20_0x5036,0xd20aa));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_0x2be18b from'chalk';import a20_0x2a1a36 from'path';function a20_0x5036(){const _0xa8037d=['campaignId','length','created','engage_workspace','path','cwd','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','configDir','Pushing\x20campaigns...','56OvcvaN','yellow','name','update','\x20campaign\x20files','verbose','\x0aError:','Push\x20YAML\x20files\x20to\x20Engage\x20API\x20as\x20campaigns','✔\x20Updated\x20','create','\x0aValidation\x20failed.\x20Fix\x20the\x20errors\x20above\x20before\x20pushing.','\x20campaigns','action','error','valid','session','execute','segment','3349284iTdLce','setPhase','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','map','errors','\x20\x20\x20\x20','3261006XDelpt','\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','✔\x20All\x20campaigns\x20are\x20up\x20to\x20date','2536785wJyIIn','7EUCRMn','1408841rqZYtY','✔\x20Created\x20','1\x20campaign\x20file:\x20','filter','resolveWorkspaceId','\x20campaigns?','message','\x20new\x20campaigns:','campaign_type','warnings','red','\x20campaigns\x20to\x20update:','def','engage','data','green','2682LpXbyu','72100VOrElD','Campaign\x20YAML\x20files\x20must\x20have\x20type:\x20campaign\x20in\x20their\x20definition.','\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)','\x0aValidation\x20errors\x20in\x20','Found\x20','\x27...','engage:campaign:push','updated','\x0aOr\x20set\x20workspace\x20context\x20with:\x20tdx\x20use\x20engage_workspace\x20<name>','relativePath','site','dryRun','149626rlTKvW','config','dim','2033160cQWnPi','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20applied','Push\x20','description','Workspace\x20is\x20required.'];a20_0x5036=function(){return _0xa8037d;};return a20_0x5036();}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{['name']=a20_0x5ac03b(0x1a0);[a20_0x5ac03b(0x161)]=a20_0x5ac03b(0x173);async[a20_0x5ac03b(0x17c)](_0x27213c){const _0x4bf376=a20_0x5ac03b,{options:_0x1e3dd6,args:_0x27ea3c,tdx:_0x287fa7}=_0x27213c,_0x58bb4d=_0x1e3dd6,_0x14f2cf=_0x27ea3c[0x0],_0x536f3d=_0x14f2cf?a20_0x2a1a36['resolve'](_0x14f2cf):undefined,_0x21523a=_0x536f3d?isYamlFile(_0x536f3d):![];let _0x15965c;if(_0x21523a&&_0x536f3d)_0x15965c=a20_0x2a1a36['dirname'](_0x536f3d);else _0x536f3d?_0x15965c=_0x536f3d:_0x15965c=process[_0x4bf376(0x168)]();let _0x327abc;const _0x5d429d=tryFindTdxConfig(_0x15965c);_0x5d429d?.[_0x4bf376(0x15c)][_0x4bf376(0x166)]&&(_0x327abc=_0x5d429d['config'][_0x4bf376(0x166)],!_0x21523a&&(_0x15965c=_0x5d429d[_0x4bf376(0x16a)]));_0x58bb4d['workspace']&&(_0x327abc=_0x58bb4d['workspace']);if(!_0x327abc){const _0x14fd26=loadSessionContext(_0x58bb4d[_0x4bf376(0x17b)]);_0x14fd26?.['engage_workspace']&&(_0x327abc=_0x14fd26[_0x4bf376(0x166)]);}if(!_0x327abc)return console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x16d)](_0x4bf376(0x162))),console[_0x4bf376(0x179)]('\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[_0x4bf376(0x179)](_0x4bf376(0x19c)),console['error'](_0x4bf376(0x185)),console[_0x4bf376(0x179)](_0x4bf376(0x1a2)),0x1;let _0x29546e;_0x21523a&&_0x536f3d?_0x29546e=[_0x536f3d]:_0x29546e=discoverCampaignFiles(_0x15965c);if(_0x29546e[_0x4bf376(0x164)]===0x0)return console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x16d)]('No\x20campaign\x20YAML\x20files\x20found\x20in\x20'+_0x15965c)),console[_0x4bf376(0x179)](a20_0x2be18b['dim'](_0x4bf376(0x19b))),0x1;const _0x563a93=_0x29546e[_0x4bf376(0x181)](_0x1a6d86=>parseCampaignFile(_0x1a6d86,a20_0x2a1a36['dirname'](_0x1a6d86))),_0x15ec9=_0x563a93['length']===0x1?_0x4bf376(0x18b)+_0x563a93[0x0]['def'][_0x4bf376(0x16e)]:_0x563a93[_0x4bf376(0x164)]+_0x4bf376(0x170);console[_0x4bf376(0x179)](_0x4bf376(0x19e)+a20_0x2be18b['cyan'](_0x15ec9));let _0x5e5339=![];for(const _0x4e5f36 of _0x563a93){const _0x46bf93=validateCampaignDef(_0x4e5f36['def']);if(!_0x46bf93[_0x4bf376(0x17a)]){_0x5e5339=!![],console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x193)](_0x4bf376(0x19d)+_0x4e5f36[_0x4bf376(0x1a3)]+':'));for(const _0xc2c618 of _0x46bf93[_0x4bf376(0x182)]){console[_0x4bf376(0x179)]('\x20\x20'+a20_0x2be18b['red']('✗')+'\x20'+_0xc2c618[_0x4bf376(0x167)]+':\x20'+_0xc2c618[_0x4bf376(0x18f)]);}}for(const _0x345839 of _0x46bf93[_0x4bf376(0x192)]){console[_0x4bf376(0x179)]('\x20\x20'+a20_0x2be18b[_0x4bf376(0x16d)]('⚠')+'\x20'+_0x345839[_0x4bf376(0x167)]+':\x20'+_0x345839[_0x4bf376(0x18f)]);}}if(_0x5e5339)return console['error'](a20_0x2be18b[_0x4bf376(0x193)](_0x4bf376(0x176))),0x1;const _0x43143c=await _0x287fa7['engage'][_0x4bf376(0x18d)](_0x327abc),_0x12de60=await withProgressSpinner('Preparing\x20push\x20to\x20workspace\x20\x27'+_0x327abc+_0x4bf376(0x19f),_0x114544=>preparePush({'engage':_0x287fa7[_0x4bf376(0x196)],'segment':_0x287fa7[_0x4bf376(0x17d)]},_0x563a93,_0x43143c,{'progress':{'update':_0x26ccef=>_0x114544['setPhase'](_0x26ccef)}}),{'verbose':_0x58bb4d[_0x4bf376(0x171)]}),_0x3dc578=_0x12de60[_0x4bf376(0x197)];await withProgressSpinner('Resolving\x20references...',_0x4f2cf7=>resolveAndBuildInputs({'engage':_0x287fa7[_0x4bf376(0x196)],'segment':_0x287fa7['segment']},_0x3dc578,_0x43143c,{'progress':{'update':_0xb9d5e1=>_0x4f2cf7['setPhase'](_0xb9d5e1)}}),{'verbose':_0x58bb4d[_0x4bf376(0x171)]});const _0x1b0c59=_0x3dc578[_0x4bf376(0x18c)](_0x548f38=>_0x548f38[_0x4bf376(0x178)]===_0x4bf376(0x175)),_0x70cac=_0x3dc578['filter'](_0x4342ce=>_0x4342ce[_0x4bf376(0x178)]===_0x4bf376(0x16f));console['error']('\x0aPush\x20summary\x20for\x20workspace\x20\x27'+_0x327abc+'\x27:');if(_0x1b0c59[_0x4bf376(0x164)]>0x0){console[_0x4bf376(0x179)]('\x20\x20'+a20_0x2be18b[_0x4bf376(0x198)]('+\x20'+_0x1b0c59[_0x4bf376(0x164)]+_0x4bf376(0x190)));for(const _0x1ec545 of _0x1b0c59){console[_0x4bf376(0x179)](_0x4bf376(0x183)+a20_0x2be18b[_0x4bf376(0x198)]('+')+'\x20'+_0x1ec545[_0x4bf376(0x195)][_0x4bf376(0x16e)]+'\x20('+_0x1ec545[_0x4bf376(0x195)][_0x4bf376(0x191)]+')');}}if(_0x70cac['length']>0x0){console[_0x4bf376(0x179)]('\x20\x20'+a20_0x2be18b[_0x4bf376(0x16d)]('~\x20'+_0x70cac[_0x4bf376(0x164)]+_0x4bf376(0x194)));for(const _0x10c4f8 of _0x70cac){console[_0x4bf376(0x179)](_0x4bf376(0x183)+a20_0x2be18b['yellow']('~')+'\x20'+_0x10c4f8[_0x4bf376(0x195)][_0x4bf376(0x16e)]+'\x20('+_0x10c4f8[_0x4bf376(0x195)][_0x4bf376(0x191)]+')');}}if(_0x1b0c59[_0x4bf376(0x164)]===0x0&&_0x70cac[_0x4bf376(0x164)]===0x0)return console[_0x4bf376(0x179)](a20_0x2be18b['green'](_0x4bf376(0x186))),0x0;if(_0x58bb4d[_0x4bf376(0x15a)])return console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x16d)](_0x4bf376(0x15f))),0x0;if(!_0x58bb4d['yes']){if(!isInteractive())return console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x193)](_0x4bf376(0x172)),_0x4bf376(0x180)),console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x15d)](_0x4bf376(0x169))),0x1;const _0x4aecbe=await confirmKey(_0x4bf376(0x160)+(_0x1b0c59['length']+_0x70cac['length'])+_0x4bf376(0x18e));if(!_0x4aecbe)return console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x16d)]('Aborted.'),'-\x20no\x20changes\x20applied'),0x1;}const _0x1a3e3a=await withProgressSpinner(_0x4bf376(0x16b),_0x498fad=>executePush({'engage':_0x287fa7[_0x4bf376(0x196)],'segment':_0x287fa7['segment']},_0x3dc578,{'progress':{'update':_0x317396=>_0x498fad[_0x4bf376(0x17f)](_0x317396)}}),{'verbose':_0x58bb4d[_0x4bf376(0x171)]}),_0x3b4471=_0x1a3e3a[_0x4bf376(0x197)];for(const _0x3e7db8 of _0x3b4471['results']){if(_0x3e7db8[_0x4bf376(0x163)]&&(_0x3e7db8[_0x4bf376(0x178)]===_0x4bf376(0x165)||_0x3e7db8['action']===_0x4bf376(0x1a1))){const _0x1b5ad3=getCampaignUrl(_0x58bb4d[_0x4bf376(0x159)],_0x43143c,_0x3e7db8[_0x4bf376(0x163)]),_0xcc0758=_0x3e7db8[_0x4bf376(0x178)]===_0x4bf376(0x165)?'+':'~',_0x36caaa=_0x3e7db8[_0x4bf376(0x178)]==='created'?a20_0x2be18b['green'](_0xcc0758):a20_0x2be18b[_0x4bf376(0x16d)](_0xcc0758);console[_0x4bf376(0x179)]('\x20\x20'+_0x36caaa+'\x20'+hyperlink(_0x3e7db8[_0x4bf376(0x16e)],_0x1b5ad3)+'\x20'+a20_0x2be18b[_0x4bf376(0x15d)](_0x1b5ad3));}}_0x3b4471[_0x4bf376(0x165)]>0x0&&console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x198)](_0x4bf376(0x18a)+_0x3b4471[_0x4bf376(0x165)]+_0x4bf376(0x177)));_0x3b4471[_0x4bf376(0x1a1)]>0x0&&console[_0x4bf376(0x179)](a20_0x2be18b['green'](_0x4bf376(0x174)+_0x3b4471[_0x4bf376(0x1a1)]+'\x20campaigns'));if(_0x3b4471[_0x4bf376(0x182)]['length']>0x0){console[_0x4bf376(0x179)](a20_0x2be18b[_0x4bf376(0x193)]('✘\x20'+_0x3b4471[_0x4bf376(0x182)][_0x4bf376(0x164)]+'\x20errors:'));for(const _0x3116c1 of _0x3b4471['errors']){console[_0x4bf376(0x179)]('\x20\x20'+a20_0x2be18b[_0x4bf376(0x193)](_0x3116c1[_0x4bf376(0x16e)])+':\x20'+_0x3116c1[_0x4bf376(0x179)]);}}return saveSessionContext({'engage_workspace':_0x327abc},_0x58bb4d[_0x4bf376(0x17b)]),_0x3b4471[_0x4bf376(0x182)][_0x4bf376(0x164)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a21_0x36d850=a21_0x57d4;function a21_0x5072(){const _0x429b70=['errors','\x20campaign(s)\x20valid','endsWith','632kNRbLA','warningCount','210183rcoVzh','error','\x20valid','validCount','log','red','427194ypkbxI','cwd','\x20non-campaign\x20file(s)\x20skipped','reason','name','dirname','9jjbksN','skippedCount','No\x20campaign\x20YAML\x20files\x20found\x20in\x20','resolve','valid','filter','✔\x20All\x20','engage:campaign:validate','\x20warning(s)','dim','relativePath','982814LGizxp','warnings','hasErrors','761470ALcCIW','yellow','green','description','invalidCount','Validation\x20failed:\x20','verbose','length','2459024qYTuwV','Error:\x20Directory\x20not\x20found:\x20','\x20non-campaign\x20file(s)\x20skipped)','Validate\x20campaign\x20YAML\x20files','699pbiCft','153216nIKPwi','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20(skipped:\x20','campaign'];a21_0x5072=function(){return _0x429b70;};return a21_0x5072();}function a21_0x57d4(_0x44261e,_0x4062e0){_0x44261e=_0x44261e-0x12c;const _0x507221=a21_0x5072();let _0x57d426=_0x507221[_0x44261e];return _0x57d426;}(function(_0x53d399,_0x8a602e){const _0x5634c4=a21_0x57d4,_0x4984f9=_0x53d399();while(!![]){try{const _0x54f036=-parseInt(_0x5634c4(0x135))/0x1+parseInt(_0x5634c4(0x12c))/0x2+-parseInt(_0x5634c4(0x15b))/0x3*(-parseInt(_0x5634c4(0x133))/0x4)+parseInt(_0x5634c4(0x14f))/0x5+-parseInt(_0x5634c4(0x13b))/0x6+-parseInt(_0x5634c4(0x14c))/0x7+-parseInt(_0x5634c4(0x157))/0x8*(-parseInt(_0x5634c4(0x141))/0x9);if(_0x54f036===_0x8a602e)break;else _0x4984f9['push'](_0x4984f9['shift']());}catch(_0x15a33c){_0x4984f9['push'](_0x4984f9['shift']());}}}(a21_0x5072,0x24f0e));import{BaseCommand}from'./command.js';import{findYamlFiles,isYamlFile}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a21_0x50b35b from'chalk';import a21_0xeb69a5 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{[a21_0x36d850(0x13f)]=a21_0x36d850(0x148);[a21_0x36d850(0x152)]=a21_0x36d850(0x15a);async['execute'](_0x1c33be){const _0x1f9560=a21_0x36d850,{options:_0x35afff,args:_0xb1224}=_0x1c33be,_0x1f291e=_0x35afff,_0x469754=_0xb1224[0x0],_0x46ceaa=_0x469754?a21_0xeb69a5[_0x1f9560(0x144)](_0x469754):undefined,_0x1d96ab=_0x46ceaa?isYamlFile(_0x46ceaa):![];let _0x3cda07,_0x3fcc66;if(_0x1d96ab&&_0x46ceaa)_0x3cda07=a21_0xeb69a5[_0x1f9560(0x140)](_0x46ceaa),_0x3fcc66=_0x46ceaa;else _0x46ceaa?_0x3cda07=_0x46ceaa:_0x3cda07=process[_0x1f9560(0x13c)]();if(!_0x3fcc66&&!existsSync(_0x3cda07))return console[_0x1f9560(0x136)](a21_0x50b35b[_0x1f9560(0x13a)](_0x1f9560(0x158)+_0x3cda07+'\x0a')),0x1;let _0x2497aa;if(_0x3fcc66){if(!_0x3fcc66[_0x1f9560(0x132)]('.yml')&&!_0x3fcc66[_0x1f9560(0x132)]('.yaml'))return console['error'](a21_0x50b35b['red']('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x3fcc66+'\x0a')),0x1;_0x2497aa=[_0x3fcc66];}else _0x2497aa=findYamlFiles(_0x3cda07);if(_0x2497aa['length']===0x0)return console[_0x1f9560(0x136)](a21_0x50b35b['red'](_0x1f9560(0x12d)+_0x3cda07+'\x0a')),0x1;const _0x180e51=validateYamlFiles(_0x2497aa,_0x3cda07,{'filterType':_0x1f9560(0x12f)}),_0x1def2c=calculateSummary(_0x180e51),_0x1b55a8=_0x180e51[_0x1f9560(0x146)](isValidationResult);if(_0x1b55a8['length']===0x0)return console[_0x1f9560(0x136)](a21_0x50b35b[_0x1f9560(0x150)](_0x1f9560(0x143)+_0x3cda07+'\x0a')),_0x1def2c[_0x1f9560(0x142)]>0x0&&console[_0x1f9560(0x136)](a21_0x50b35b[_0x1f9560(0x14a)]('('+_0x1def2c[_0x1f9560(0x142)]+_0x1f9560(0x159))),0x0;for(const _0x441c8b of _0x180e51){if(!isValidationResult(_0x441c8b)){_0x1f291e[_0x1f9560(0x155)]&&console[_0x1f9560(0x139)](a21_0x50b35b['dim']('-\x20'+_0x441c8b[_0x1f9560(0x14b)]+_0x1f9560(0x12e)+_0x441c8b[_0x1f9560(0x13e)]+')'));continue;}const {relativePath:_0x5cab9c,source:_0x4665df,result:_0x3f507c}=_0x441c8b;if(_0x3f507c[_0x1f9560(0x145)]&&_0x3f507c[_0x1f9560(0x14d)][_0x1f9560(0x156)]===0x0)_0x1f291e[_0x1f9560(0x155)]&&console['log'](a21_0x50b35b[_0x1f9560(0x151)]('✔\x20'+_0x5cab9c));else _0x3f507c[_0x1f9560(0x145)]?(console[_0x1f9560(0x139)](a21_0x50b35b['yellow']('⚠\x20'+_0x5cab9c+':\x20'+_0x3f507c[_0x1f9560(0x14d)]['length']+_0x1f9560(0x149))),console[_0x1f9560(0x139)](formatValidationResult(_0x3f507c,_0x4665df,_0x5cab9c))):(console[_0x1f9560(0x139)](a21_0x50b35b['red']('✖\x20'+_0x5cab9c+':\x20'+_0x3f507c[_0x1f9560(0x130)][_0x1f9560(0x156)]+'\x20error(s)')),console['log'](formatValidationResult(_0x3f507c,_0x4665df,_0x5cab9c)));}return console[_0x1f9560(0x139)](''),_0x1def2c[_0x1f9560(0x14e)]?(console[_0x1f9560(0x139)](a21_0x50b35b[_0x1f9560(0x13a)](_0x1f9560(0x154)+_0x1def2c[_0x1f9560(0x153)]+'\x20campaign(s)\x20with\x20errors,\x20'+_0x1def2c[_0x1f9560(0x138)]+_0x1f9560(0x137))),_0x1def2c[_0x1f9560(0x134)]>0x0&&console['log'](a21_0x50b35b[_0x1f9560(0x150)](_0x1def2c[_0x1f9560(0x134)]+'\x20warning(s)\x20found')),_0x1def2c[_0x1f9560(0x142)]>0x0&&console[_0x1f9560(0x139)](a21_0x50b35b[_0x1f9560(0x14a)](_0x1def2c[_0x1f9560(0x142)]+_0x1f9560(0x13d))),0x1):(console[_0x1f9560(0x139)](a21_0x50b35b[_0x1f9560(0x151)](_0x1f9560(0x147)+_0x1def2c[_0x1f9560(0x138)]+_0x1f9560(0x131))),_0x1def2c[_0x1f9560(0x134)]>0x0&&console[_0x1f9560(0x139)](a21_0x50b35b['yellow'](_0x1def2c['warningCount']+'\x20warning(s)\x20found')),_0x1def2c[_0x1f9560(0x142)]>0x0&&console[_0x1f9560(0x139)](a21_0x50b35b[_0x1f9560(0x14a)](_0x1def2c[_0x1f9560(0x142)]+'\x20non-campaign\x20file(s)\x20skipped')),0x0);}}
|