@treasuredata/tdx 0.29.1 → 0.29.2
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/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/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/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/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/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/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/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.d.ts +1 -2
- package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js.map +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/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.d.ts +13 -6
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/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.d.ts.map +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/segment-validator.js.map +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 +184 -0
- package/dist/sdk/segment/types/activation-schema.d.ts.map +1 -0
- package/dist/sdk/segment/types/activation-schema.js +1 -0
- package/dist/sdk/segment/types/activation-schema.js.map +1 -0
- package/dist/sdk/segment/types/journey-def.d.ts +5 -0
- package/dist/sdk/segment/types/journey-def.d.ts.map +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-def.js.map +1 -1
- package/dist/sdk/segment/types/journey-schema.d.ts +419 -0
- package/dist/sdk/segment/types/journey-schema.d.ts.map +1 -0
- package/dist/sdk/segment/types/journey-schema.js +1 -0
- package/dist/sdk/segment/types/journey-schema.js.map +1 -0
- package/dist/sdk/segment/types/segment-def.d.ts +4 -87
- 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.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +14 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +3 -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/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/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a30_0x5933df=a30_0x1790;(function(_0x35d8fa,_0x57e692){const _0x333cd1=a30_0x1790,_0x29e22f=_0x35d8fa();while(!![]){try{const _0x1091cf=parseInt(_0x333cd1(0x198))/0x1+parseInt(_0x333cd1(0x16f))/0x2*(-parseInt(_0x333cd1(0x165))/0x3)+-parseInt(_0x333cd1(0x199))/0x4+-parseInt(_0x333cd1(0x151))/0x5+-parseInt(_0x333cd1(0x145))/0x6+-parseInt(_0x333cd1(0x150))/0x7*(parseInt(_0x333cd1(0x14b))/0x8)+parseInt(_0x333cd1(0x127))/0x9;if(_0x1091cf===_0x57e692)break;else _0x29e22f['push'](_0x29e22f['shift']());}catch(_0x53882b){_0x29e22f['push'](_0x29e22f['shift']());}}}(a30_0x5597,0xc8d40));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';function a30_0x1790(_0x48fa24,_0xce277f){_0x48fa24=_0x48fa24-0x114;const _0x559770=a30_0x5597();let _0x17907f=_0x559770[_0x48fa24];return _0x17907f;}import{readFileSync}from'fs';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a30_0x27b4a8 from'chalk';function formatRelativeTime(_0x39fd84){const _0x5c1b82=a30_0x1790,_0x1c2dcb=new Date(_0x39fd84),_0x42d702=new Date(),_0x9dc2d5=_0x1c2dcb[_0x5c1b82(0x183)]()-_0x42d702[_0x5c1b82(0x183)](),_0x2583fa=Math[_0x5c1b82(0x15f)](_0x9dc2d5)/0x3e8,_0x395e25=_0x9dc2d5<0x0;if(_0x2583fa<0x3c)return _0x395e25?_0x5c1b82(0x13a):'soon';else{if(_0x2583fa<0xe10){const _0x366643=Math[_0x5c1b82(0x12d)](_0x2583fa/0x3c);return _0x395e25?_0x366643+'m\x20ago':_0x5c1b82(0x166)+_0x366643+'m';}else{if(_0x2583fa<0x15180){const _0x2ceeba=Math[_0x5c1b82(0x12d)](_0x2583fa/0xe10);return _0x395e25?_0x2ceeba+'h\x20ago':_0x5c1b82(0x166)+_0x2ceeba+'h';}else{if(_0x2583fa<0x93a80){const _0x483459=Math[_0x5c1b82(0x12d)](_0x2583fa/0x15180);return _0x395e25?_0x483459+_0x5c1b82(0x14e):_0x5c1b82(0x166)+_0x483459+'d';}else return _0x1c2dcb[_0x5c1b82(0x197)]();}}}}export class ScheduleListCommand extends BaseCommand{[a30_0x5933df(0x153)]=a30_0x5933df(0x126);[a30_0x5933df(0x135)]=a30_0x5933df(0x18e);async[a30_0x5933df(0x12b)](_0x31902b){const _0x30f81c=a30_0x5933df,{options:_0x380923,args:_0x4aa4db,tdx:_0x481acd}=_0x31902b,_0x529753=resolveLimit(_0x380923['limit'],DEFAULT_DISPLAY_LIMIT),_0x1a39f3=_0x4aa4db[0x0],_0x15561d=_0x1a39f3?_0x30f81c(0x16a)+_0x1a39f3+_0x30f81c(0x123):'Listing\x20scheduled\x20queries...',_0x3a5ded=await withSpinner(_0x15561d,()=>_0x481acd[_0x30f81c(0x171)]['listQueries']({'limit':_0x529753,'scheduled':!![],'pattern':_0x1a39f3}),{'verbose':_0x380923[_0x30f81c(0x117)]}),_0x4c63e4=_0x3a5ded[_0x30f81c(0x139)][_0x30f81c(0x130)],_0xf6d2f8=_0x3a5ded[_0x30f81c(0x139)][_0x30f81c(0x114)][_0x30f81c(0x119)],_0x301cbd=_0x1a39f3?_0x30f81c(0x161)+_0x1a39f3+'\x22':'';_0xf6d2f8?console[_0x30f81c(0x143)]('Showing\x20first\x20'+_0x4c63e4['length']+'\x20schedules'+_0x301cbd+_0x30f81c(0x159)):console[_0x30f81c(0x143)](_0x30f81c(0x154)+_0x4c63e4[_0x30f81c(0x15c)]+'\x20scheduled\x20quer'+(_0x4c63e4['length']!==0x1?'ies':'y')+_0x301cbd);if(_0x380923['format']===_0x30f81c(0x152)||_0x380923[_0x30f81c(0x12c)]===_0x30f81c(0x147)||_0x380923[_0x30f81c(0x12c)]===_0x30f81c(0x124)||_0x380923['format']===_0x30f81c(0x142)){const _0x4abfe5=_0x4c63e4['map'](_0xb67ddc=>({'id':_0xb67ddc['id'],'name':_0xb67ddc[_0x30f81c(0x153)],'cron':_0xb67ddc['cron'],'database':_0xb67ddc['database']?.['name'],'type':_0xb67ddc[_0x30f81c(0x192)],'timezone':_0xb67ddc[_0x30f81c(0x13d)],'user_name':_0xb67ddc[_0x30f81c(0x16c)]?.[_0x30f81c(0x153)],'updated_at':_0xb67ddc[_0x30f81c(0x182)],'next_run_at':_0xb67ddc[_0x30f81c(0x18a)],'last_job_status':_0xb67ddc[_0x30f81c(0x146)]?.['status']}));await handleSDKOutput(_0x4abfe5,_0x380923);}else{if(_0x4c63e4[_0x30f81c(0x15c)]===0x0)console[_0x30f81c(0x141)](_0x30f81c(0x12f));else{const _0x5430a0=_0x380923[_0x30f81c(0x170)],_0x20cd3f=_0x4c63e4[_0x30f81c(0x13c)](_0x5a3e98=>{const _0x351aec=_0x30f81c,_0x1b721=_0x5a3e98[_0x351aec(0x146)]?.[_0x351aec(0x134)]?_0x5a3e98[_0x351aec(0x146)][_0x351aec(0x134)]==='success'?'✓':'✗':'-',_0x5961f5=_0x5a3e98[_0x351aec(0x146)]?.['ended_at']?formatRelativeTime(_0x5a3e98[_0x351aec(0x146)]['ended_at']):_0x351aec(0x193),_0x172355=_0x5a3e98[_0x351aec(0x18a)]?formatRelativeTime(_0x5a3e98[_0x351aec(0x18a)]):'-',_0x2f3881=_0x5a3e98[_0x351aec(0x184)]||'',_0x5e9f48=_0x5a3e98[_0x351aec(0x153)]||_0x351aec(0x18b),_0x1c0362=getConsoleUrl(_0x5430a0,_0x351aec(0x188)+_0x5a3e98['id']);return{'statusIcon':_0x1b721,'lastRun':_0x5961f5,'nextRun':_0x172355,'cron':_0x2f3881,'name':_0x5e9f48,'queryUrl':_0x1c0362,'status':_0x5a3e98[_0x351aec(0x146)]?.[_0x351aec(0x134)]};}),_0xd341da=Math[_0x30f81c(0x16b)](..._0x20cd3f[_0x30f81c(0x13c)](_0x17f3c9=>_0x17f3c9[_0x30f81c(0x190)][_0x30f81c(0x15c)])),_0x4dd4aa=Math[_0x30f81c(0x16b)](..._0x20cd3f[_0x30f81c(0x13c)](_0x22c9e3=>_0x22c9e3[_0x30f81c(0x172)][_0x30f81c(0x15c)])),_0x5d7c1a=Math[_0x30f81c(0x16b)](..._0x20cd3f[_0x30f81c(0x13c)](_0x421003=>_0x421003[_0x30f81c(0x184)][_0x30f81c(0x15c)])),_0x1e4c76=_0x20cd3f['map'](_0x324759=>{const _0x297086=_0x30f81c,_0x1e0392=_0x324759[_0x297086(0x134)]===_0x297086(0x16e)?a30_0x27b4a8[_0x297086(0x15a)](_0x324759[_0x297086(0x136)]):_0x324759[_0x297086(0x134)]===_0x297086(0x143)?a30_0x27b4a8[_0x297086(0x17a)](_0x324759[_0x297086(0x136)]):a30_0x27b4a8['dim'](_0x324759[_0x297086(0x136)]),_0x5b7230=_0x324759[_0x297086(0x190)][_0x297086(0x12a)](_0xd341da),_0x52fd78=_0x324759[_0x297086(0x172)]['padEnd'](_0x4dd4aa),_0x21cfca=_0x324759[_0x297086(0x184)]?a30_0x27b4a8[_0x297086(0x17c)](_0x324759['cron'][_0x297086(0x12a)](_0x5d7c1a)):'\x20'['repeat'](_0x5d7c1a),_0x291d70=hyperlink(_0x324759[_0x297086(0x153)],_0x324759[_0x297086(0x128)]);return'📅\x20'+_0x1e0392+'\x20'+_0x5b7230+'\x20\x20→\x20'+_0x52fd78+'\x20\x20'+_0x21cfca+'\x20\x20'+_0x291d70;});await writeOutput(_0x1e4c76[_0x30f81c(0x156)]('\x0a'),_0x380923[_0x30f81c(0x189)],_0x30f81c(0x14d));}}return 0x0;}}export class ScheduleShowCommand extends BaseCommand{[a30_0x5933df(0x153)]=a30_0x5933df(0x177);[a30_0x5933df(0x135)]=a30_0x5933df(0x191);[a30_0x5933df(0x185)](_0x4009f1){const _0x3cdc9b=a30_0x5933df,_0xb86fdf=_0x4009f1[_0x3cdc9b(0x18f)][0x0];if(!_0xb86fdf)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20show\x20<name>';return undefined;}async['execute'](_0x4e26af){const _0x359fcb=a30_0x5933df,{options:_0x24b362,args:_0xb7e26f,tdx:_0x3cfeb1}=_0x4e26af,_0x4cbfa7=_0xb7e26f[0x0],_0x3b509f=await withSpinner(_0x359fcb(0x15b),()=>_0x3cfeb1[_0x359fcb(0x171)][_0x359fcb(0x17b)](_0x4cbfa7),{'verbose':_0x24b362['verbose']}),_0x98b56c=_0x3b509f[_0x359fcb(0x139)],_0x34ec85={'name':_0x98b56c['name'],'cron':_0x98b56c[_0x359fcb(0x184)],'database':_0x98b56c[_0x359fcb(0x178)],'type':_0x98b56c[_0x359fcb(0x192)],'timezone':_0x98b56c[_0x359fcb(0x195)],'user_name':_0x98b56c[_0x359fcb(0x12e)],'created_at':_0x98b56c['created_at'],'engine_version':_0x98b56c[_0x359fcb(0x169)],'executing_user_id':_0x98b56c[_0x359fcb(0x14f)],'query':_0x98b56c[_0x359fcb(0x11e)],'delay':_0x98b56c[_0x359fcb(0x180)],'priority':_0x98b56c['priority'],'retry_limit':_0x98b56c['retry_limit'],..._0x98b56c['result']&&{'result':_0x98b56c[_0x359fcb(0x118)]}};return await handleSingleObjectOutput(_0x34ec85,_0x24b362),0x0;}}export class ScheduleCreateCommand extends BaseCommand{[a30_0x5933df(0x153)]=a30_0x5933df(0x140);[a30_0x5933df(0x135)]=a30_0x5933df(0x132);[a30_0x5933df(0x185)](_0xe9fb84){const _0x1f82c8=a30_0x5933df,_0x267306=_0xe9fb84['args'][0x0];if(!_0x267306)return _0x1f82c8(0x137);const _0x2326bc=_0xe9fb84[_0x1f82c8(0x144)];if(!_0x2326bc[_0x1f82c8(0x178)])return'Database\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]';return undefined;}async['execute'](_0x52d98a){const _0x19b52d=a30_0x5933df,{options:_0x2430cb,args:_0x57544f,tdx:_0x1adc15}=_0x52d98a,_0x28f4f8=_0x57544f[0x0],_0x32538e=_0x2430cb,_0x3e931c=_0x32538e['database'],_0xe9e5f9=_0x32538e[_0x19b52d(0x120)],_0x2c886b=_0x32538e['type']||_0x19b52d(0x11a);let _0x861ee7;try{_0x861ee7=readFileSync(_0xe9e5f9,_0x19b52d(0x187))[_0x19b52d(0x122)]();}catch(_0x24e104){throw new SDKError(ErrorCode[_0x19b52d(0x17f)],'Failed\x20to\x20read\x20file:\x20'+_0xe9e5f9,_0x24e104 instanceof Error?_0x24e104:undefined);}if(!_0x861ee7)throw new SDKError(ErrorCode[_0x19b52d(0x17f)],_0x19b52d(0x194));const _0x55ce86={'database':_0x3e931c,'query':_0x861ee7,'type':_0x2c886b};if(_0x32538e[_0x19b52d(0x184)])_0x55ce86['cron']=_0x32538e[_0x19b52d(0x184)];if(_0x32538e[_0x19b52d(0x195)])_0x55ce86[_0x19b52d(0x195)]=_0x32538e[_0x19b52d(0x195)];if(_0x32538e['delay']!==undefined)_0x55ce86['delay']=Number(_0x32538e[_0x19b52d(0x180)]);if(_0x32538e['priority']!==undefined)_0x55ce86['priority']=Number(_0x32538e[_0x19b52d(0x138)]);if(_0x32538e['retryLimit']!==undefined)_0x55ce86[_0x19b52d(0x196)]=Number(_0x32538e['retryLimit']);if(_0x32538e['engineVersion'])_0x55ce86[_0x19b52d(0x169)]=_0x32538e['engineVersion'];if(_0x32538e['result'])_0x55ce86[_0x19b52d(0x118)]=_0x32538e[_0x19b52d(0x118)];if(_0x2430cb['verbose']){console[_0x19b52d(0x143)](_0x19b52d(0x167)+_0x28f4f8),console['error'](_0x19b52d(0x164)+_0x3e931c),console[_0x19b52d(0x143)](_0x19b52d(0x179)+_0x2c886b);if(_0x55ce86['cron'])console[_0x19b52d(0x143)](_0x19b52d(0x16d)+_0x55ce86[_0x19b52d(0x184)]);if(_0x55ce86[_0x19b52d(0x195)])console[_0x19b52d(0x143)](_0x19b52d(0x162)+_0x55ce86[_0x19b52d(0x195)]);}const _0x58375c=await withSpinner(_0x19b52d(0x11d),()=>_0x1adc15['schedules']['create'](_0x28f4f8,_0x55ce86),{'verbose':_0x2430cb[_0x19b52d(0x117)]});return console[_0x19b52d(0x143)]('Schedule\x20created:\x20'+_0x58375c['data'][_0x19b52d(0x153)]),await handleSingleObjectOutput(_0x58375c['data'],_0x2430cb),0x0;}}export class ScheduleUpdateCommand extends BaseCommand{[a30_0x5933df(0x153)]='schedule:update';[a30_0x5933df(0x135)]=a30_0x5933df(0x155);['validate'](_0x32b303){const _0x2a7c2f=a30_0x5933df,_0x151c3b=_0x32b303[_0x2a7c2f(0x18f)][0x0];if(!_0x151c3b)return _0x2a7c2f(0x125);return undefined;}async['execute'](_0x4f0bed){const _0x438e82=a30_0x5933df,{options:_0x8ee190,args:_0x4e4605,tdx:_0x3d5b56}=_0x4f0bed,_0x1c0046=_0x4e4605[0x0],_0x5e6495=_0x8ee190,_0x1d0585={};if(_0x5e6495[_0x438e82(0x178)])_0x1d0585[_0x438e82(0x178)]=_0x5e6495[_0x438e82(0x178)];if(_0x5e6495[_0x438e82(0x192)])_0x1d0585[_0x438e82(0x192)]=_0x5e6495[_0x438e82(0x192)];if(_0x5e6495[_0x438e82(0x184)])_0x1d0585[_0x438e82(0x184)]=_0x5e6495[_0x438e82(0x184)];if(_0x5e6495['timezone'])_0x1d0585['timezone']=_0x5e6495[_0x438e82(0x195)];if(_0x5e6495[_0x438e82(0x180)]!==undefined)_0x1d0585[_0x438e82(0x180)]=Number(_0x5e6495[_0x438e82(0x180)]);if(_0x5e6495[_0x438e82(0x138)]!==undefined)_0x1d0585[_0x438e82(0x138)]=Number(_0x5e6495[_0x438e82(0x138)]);if(_0x5e6495[_0x438e82(0x168)]!==undefined)_0x1d0585[_0x438e82(0x196)]=Number(_0x5e6495[_0x438e82(0x168)]);if(_0x5e6495[_0x438e82(0x13e)])_0x1d0585['engine_version']=_0x5e6495['engineVersion'];if(_0x5e6495[_0x438e82(0x118)])_0x1d0585[_0x438e82(0x118)]=_0x5e6495['result'];if(_0x5e6495[_0x438e82(0x120)])try{_0x1d0585[_0x438e82(0x11e)]=readFileSync(_0x5e6495[_0x438e82(0x120)],_0x438e82(0x187))[_0x438e82(0x122)]();}catch(_0x48c8f2){throw new SDKError(ErrorCode[_0x438e82(0x17f)],'Failed\x20to\x20read\x20file:\x20'+_0x5e6495[_0x438e82(0x120)],_0x48c8f2 instanceof Error?_0x48c8f2:undefined);}if(Object['keys'](_0x1d0585)[_0x438e82(0x15c)]===0x0)throw new SDKError(ErrorCode[_0x438e82(0x17f)],_0x438e82(0x157));if(_0x8ee190[_0x438e82(0x117)]){console[_0x438e82(0x143)]('Updating\x20schedule:\x20'+_0x1c0046);for(const [_0x225b96,_0x5c362d]of Object[_0x438e82(0x18d)](_0x1d0585)){_0x225b96===_0x438e82(0x11e)?console[_0x438e82(0x143)]('\x20\x20'+_0x225b96+':\x20'+_0x5c362d[_0x438e82(0x13b)](0x0,0x32)+_0x438e82(0x174)):console[_0x438e82(0x143)]('\x20\x20'+_0x225b96+':\x20'+_0x5c362d);}}const _0x530867=await withSpinner('Updating\x20schedule...',()=>_0x3d5b56['schedules']['update'](_0x1c0046,_0x1d0585),{'verbose':_0x8ee190[_0x438e82(0x117)]});return console[_0x438e82(0x143)](_0x438e82(0x18c)+_0x530867[_0x438e82(0x139)][_0x438e82(0x153)]),await handleSingleObjectOutput(_0x530867['data'],_0x8ee190),0x0;}}export class ScheduleDeleteCommand extends BaseCommand{['name']=a30_0x5933df(0x17e);[a30_0x5933df(0x135)]=a30_0x5933df(0x173);['validate'](_0x2afb32){const _0x48de5e=a30_0x5933df,_0xc63b44=_0x2afb32[_0x48de5e(0x18f)][0x0];if(!_0xc63b44)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20delete\x20<name>';return undefined;}async[a30_0x5933df(0x12b)](_0xf648b0){const _0x14d7ef=a30_0x5933df,{options:_0x5b6bcf,args:_0xdb9dd1,tdx:_0x4d0ddd}=_0xf648b0,_0x359456=_0xdb9dd1[0x0];if(!_0x5b6bcf[_0x14d7ef(0x175)]){const _0x57d07f=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20schedule\x20\x22'+_0x359456+'\x22?');if(!_0x57d07f)return console[_0x14d7ef(0x143)](_0x14d7ef(0x15d)),0x0;}const _0x515c07=await withSpinner(_0x14d7ef(0x148),()=>_0x4d0ddd[_0x14d7ef(0x171)]['delete'](_0x359456),{'verbose':_0x5b6bcf['verbose']});return console[_0x14d7ef(0x143)]('Schedule\x20deleted:\x20'+_0x515c07['data'][_0x14d7ef(0x153)]),0x0;}}export class ScheduleRunCommand extends BaseCommand{[a30_0x5933df(0x153)]=a30_0x5933df(0x129);[a30_0x5933df(0x135)]='Run\x20a\x20scheduled\x20query\x20immediately';[a30_0x5933df(0x185)](_0x439365){const _0x381bc3=a30_0x5933df,_0x4e002a=_0x439365[_0x381bc3(0x18f)][0x0];if(!_0x4e002a)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20run\x20<name>\x20[--time\x20<iso8601>]\x20[--num\x20<1-10>]';return undefined;}async[a30_0x5933df(0x12b)](_0x3b5198){const _0x53e7ff=a30_0x5933df,{options:_0x3172ac,args:_0xc7e253,tdx:_0x2cc89f}=_0x3b5198,_0x523069=_0xc7e253[0x0],_0x588018=_0x3172ac,_0x6473e1=_0x588018[_0x53e7ff(0x176)],_0x5e61a8=_0x588018[_0x53e7ff(0x186)]!==undefined?Number(_0x588018[_0x53e7ff(0x186)]):undefined;if(_0x3172ac[_0x53e7ff(0x117)]){console[_0x53e7ff(0x143)]('Running\x20schedule:\x20'+_0x523069);if(_0x6473e1)console['error'](_0x53e7ff(0x133)+_0x6473e1);if(_0x5e61a8)console['error'](_0x53e7ff(0x13f)+_0x5e61a8);}const _0xa3a8bb=await withSpinner('Running\x20schedule...',()=>_0x2cc89f[_0x53e7ff(0x171)][_0x53e7ff(0x131)](_0x523069,{'time':_0x6473e1,'num':_0x5e61a8}),{'verbose':_0x3172ac[_0x53e7ff(0x117)]}),_0x91d15c=_0xa3a8bb[_0x53e7ff(0x139)][_0x53e7ff(0x14c)];console[_0x53e7ff(0x143)](_0x53e7ff(0x181)+_0x91d15c['length']+'\x20job'+(_0x91d15c[_0x53e7ff(0x15c)]!==0x1?'s':'')+'\x20created');for(const _0x65df78 of _0x91d15c){console['error'](_0x53e7ff(0x121)+_0x65df78[_0x53e7ff(0x15e)]);}return await handleSDKOutput(_0x91d15c,_0x3172ac),0x0;}}function a30_0x5597(){const _0x38a123=['end_at','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20history\x20<name>\x20[--from\x20<n>]\x20[--to\x20<n>]','Creating\x20schedule...','query','history','file','\x20\x20Job\x20ID:\x20','trim','\x22...','table','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20update\x20<name>\x20[options]','schedule:list','26886663NtHQwB','queryUrl','schedule:run','padEnd','execute','format','round','user_name','No\x20scheduled\x20queries\x20found','queries','run','Create\x20a\x20scheduled\x20query','\x20\x20Time:\x20','status','description','statusIcon','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]','priority','data','just\x20now','substring','map','time_zone','engineVersion','\x20\x20Num:\x20','schedule:create','log','tsv','error','options','4095522QgdSiW','last_job','jsonl','Deleting\x20schedule...','count','\x20(showing\x20','6136uPsDti','jobs','list','d\x20ago','executing_user_id','8127MjIzbc','1900700CNbLkU','json','name','Found\x20','Update\x20a\x20scheduled\x20query','join','At\x20least\x20one\x20option\x20must\x20be\x20provided\x20to\x20update','scheduled_at','\x20(use\x20--limit\x20to\x20see\x20more)','green','Getting\x20schedule\x20details...','length','Cancelled','job_id','abs','created_at','\x20matching\x20\x22','\x20\x20Timezone:\x20','schedule:history','\x20\x20Database:\x20','3EpBoxC','in\x20','Creating\x20schedule:\x20','retryLimit','engine_version','Searching\x20scheduled\x20queries\x20matching\x20\x22','max','user','\x20\x20Cron:\x20','success','1985514ngJlWG','site','schedules','nextRun','Delete\x20a\x20scheduled\x20query','...','yes','time','schedule:show','database','\x20\x20Type:\x20','red','show','cyan','start_at','schedule:delete','INVALID_ARGUMENT','delay','Schedule\x20run\x20submitted:\x20','updated_at','getTime','cron','validate','num','utf-8','/app/queries/editor?queryId=','output','next_run_at','(unnamed)','Schedule\x20updated:\x20','entries','List\x20scheduled\x20queries','args','lastRun','Show\x20schedule\x20details','type','never','Query\x20file\x20is\x20empty','timezone','retry_limit','toLocaleDateString','1115726gzdDNW','1338280FAxHNr','pagination','from','Show\x20schedule\x20execution\x20history','verbose','result','has_next_page','trino'];a30_0x5597=function(){return _0x38a123;};return a30_0x5597();}export class ScheduleHistoryCommand extends BaseCommand{[a30_0x5933df(0x153)]=a30_0x5933df(0x163);['description']=a30_0x5933df(0x116);[a30_0x5933df(0x185)](_0x39c82e){const _0xa5c0e1=a30_0x5933df,_0x1ed8af=_0x39c82e[_0xa5c0e1(0x18f)][0x0];if(!_0x1ed8af)return _0xa5c0e1(0x11c);return undefined;}async[a30_0x5933df(0x12b)](_0xb3ddb){const _0x3231a7=a30_0x5933df,{options:_0x21bd70,args:_0x467f63,tdx:_0x80f620}=_0xb3ddb,_0x3974ae=_0x467f63[0x0],_0x3f0b2a=_0x21bd70,_0x2e4af2=_0x3f0b2a[_0x3231a7(0x115)]!==undefined?Number(_0x3f0b2a[_0x3231a7(0x115)]):undefined,_0x8a41a6=_0x3f0b2a['to']!==undefined?Number(_0x3f0b2a['to']):undefined,_0x46e7d9=await withSpinner('Getting\x20schedule\x20history...',()=>_0x80f620[_0x3231a7(0x171)][_0x3231a7(0x11f)](_0x3974ae,{'from':_0x2e4af2,'to':_0x8a41a6}),{'verbose':_0x21bd70[_0x3231a7(0x117)]}),_0x1876b8=_0x46e7d9['data'];console[_0x3231a7(0x143)](_0x3231a7(0x154)+_0x1876b8['count']+'\x20execution'+(_0x1876b8[_0x3231a7(0x149)]!==0x1?'s':'')+_0x3231a7(0x14a)+_0x1876b8['from']+'-'+_0x1876b8['to']+')');const _0x53d313=_0x1876b8[_0x3231a7(0x11f)][_0x3231a7(0x13c)](_0x5dfd8a=>({'job_id':_0x5dfd8a[_0x3231a7(0x15e)],'type':_0x5dfd8a[_0x3231a7(0x192)],'status':_0x5dfd8a[_0x3231a7(0x134)],'scheduled_at':_0x5dfd8a[_0x3231a7(0x158)],'created_at':_0x5dfd8a[_0x3231a7(0x160)],'start_at':_0x5dfd8a[_0x3231a7(0x17d)],'end_at':_0x5dfd8a[_0x3231a7(0x11b)]}));return await handleSDKOutput(_0x53d313,_0x21bd70),0x0;}}
|
|
1
|
+
const a30_0x1ff8d3=a30_0x3906;(function(_0x40b777,_0x1d9e30){const _0x5075e8=a30_0x3906,_0x519952=_0x40b777();while(!![]){try{const _0x287292=-parseInt(_0x5075e8(0xa3))/0x1*(-parseInt(_0x5075e8(0xb2))/0x2)+-parseInt(_0x5075e8(0xe3))/0x3*(parseInt(_0x5075e8(0x10c))/0x4)+parseInt(_0x5075e8(0xda))/0x5*(-parseInt(_0x5075e8(0xba))/0x6)+parseInt(_0x5075e8(0xc6))/0x7+-parseInt(_0x5075e8(0x100))/0x8*(parseInt(_0x5075e8(0xef))/0x9)+-parseInt(_0x5075e8(0x103))/0xa*(parseInt(_0x5075e8(0x11c))/0xb)+parseInt(_0x5075e8(0xc3))/0xc;if(_0x287292===_0x1d9e30)break;else _0x519952['push'](_0x519952['shift']());}catch(_0x5ab5da){_0x519952['push'](_0x519952['shift']());}}}(a30_0x1d61,0x34e48));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';function a30_0x3906(_0x538a2d,_0x36cc57){_0x538a2d=_0x538a2d-0x9c;const _0x1d6194=a30_0x1d61();let _0x390619=_0x1d6194[_0x538a2d];return _0x390619;}import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{readFileSync}from'fs';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a30_0x1d61(){const _0x206444=['4XhkIVt','last_job','lastRun','next_run_at','\x20\x20Time:\x20','length','retry_limit','toLocaleDateString','history','status','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20history\x20<name>\x20[--from\x20<n>]\x20[--to\x20<n>]','schedule:delete','schedule:create','entries','execute','1466Sltknj','schedule:history','jobs','map','created_at','Run\x20a\x20scheduled\x20query\x20immediately','\x20\x20Database:\x20','padEnd','372cWFESB','No\x20scheduled\x20queries\x20found','At\x20least\x20one\x20option\x20must\x20be\x20provided\x20to\x20update','num','start_at','time_zone','\x20\x20→\x20','Create\x20a\x20scheduled\x20query','timezone','7393644gwxDDt','statusIcon','Schedule\x20created:\x20','2332155kCHTvi','data','abs','engine_version','cyan','schedule:list','list','type','name','show','time','\x20matching\x20\x22','round','(unnamed)','delay','in\x20','red','validate','success','table','26160IdMTKL','engineVersion','user_name','delete','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20update\x20<name>\x20[options]','trino','Schedule\x20deleted:\x20','output','updated_at','3oeireL','has_next_page','run','Show\x20schedule\x20execution\x20history','queries','Delete\x20a\x20scheduled\x20query','Update\x20a\x20scheduled\x20query','schedules','\x20created','Getting\x20schedule\x20details...','queryUrl','create','247392zygbdi','yes','Getting\x20schedule\x20history...','max','database','Showing\x20first\x20','Creating\x20schedule:\x20','job_id','join','List\x20scheduled\x20queries','Running\x20schedule...','ies','args','log','soon','keys','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20run\x20<name>\x20[--time\x20<iso8601>]\x20[--num\x20<1-10>]','48GCuhcG','nextRun','...','1699310OlRiPF','green','trim','\x20schedules','scheduled_at','limit','listQueries','Show\x20schedule\x20details','jsonl','305372AIGKgo','format','h\x20ago','INVALID_ARGUMENT','error','query','retryLimit','Schedule\x20run\x20submitted:\x20','Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]','cron','file','\x20\x20Job\x20ID:\x20','Failed\x20to\x20read\x20file:\x20','/app/queries/editor?queryId=','getTime','options','11petnza','description','substring','priority','Searching\x20scheduled\x20queries\x20matching\x20\x22','Query\x20file\x20is\x20empty','\x20(use\x20--limit\x20to\x20see\x20more)','verbose','\x20\x20Type:\x20','just\x20now','Updating\x20schedule:\x20','Found\x20','json','count','Running\x20schedule:\x20','from','📅\x20','Listing\x20scheduled\x20queries...','ended_at','site','result','Cancelled'];a30_0x1d61=function(){return _0x206444;};return a30_0x1d61();}import{getConsoleUrl}from'../sdk/client/endpoints.js';import{hyperlink}from'../sdk/util/formatters.js';import a30_0x2917ba from'chalk';function formatRelativeTime(_0x1c9612){const _0x3ce014=a30_0x3906,_0x461a96=new Date(_0x1c9612),_0x2d7882=new Date(),_0x4e7278=_0x461a96[_0x3ce014(0x11a)]()-_0x2d7882[_0x3ce014(0x11a)](),_0x211d2c=Math[_0x3ce014(0xc8)](_0x4e7278)/0x3e8,_0x4ea78a=_0x4e7278<0x0;if(_0x211d2c<0x3c)return _0x4ea78a?_0x3ce014(0x125):_0x3ce014(0xfd);else{if(_0x211d2c<0xe10){const _0x5d4c93=Math['round'](_0x211d2c/0x3c);return _0x4ea78a?_0x5d4c93+'m\x20ago':_0x3ce014(0xd5)+_0x5d4c93+'m';}else{if(_0x211d2c<0x15180){const _0x4f57df=Math[_0x3ce014(0xd2)](_0x211d2c/0xe10);return _0x4ea78a?_0x4f57df+_0x3ce014(0x10e):_0x3ce014(0xd5)+_0x4f57df+'h';}else{if(_0x211d2c<0x93a80){const _0x27a43c=Math[_0x3ce014(0xd2)](_0x211d2c/0x15180);return _0x4ea78a?_0x27a43c+'d\x20ago':_0x3ce014(0xd5)+_0x27a43c+'d';}else return _0x461a96[_0x3ce014(0xaa)]();}}}}export class ScheduleListCommand extends BaseCommand{[a30_0x1ff8d3(0xce)]=a30_0x1ff8d3(0xcb);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xf8);async[a30_0x1ff8d3(0xb1)](_0x5b6028){const _0x47c961=a30_0x1ff8d3,{options:_0x5ba1ef,args:_0x410340,tdx:_0x32176b}=_0x5b6028,_0x416cd8=resolveLimit(_0x5ba1ef[_0x47c961(0x108)],DEFAULT_DISPLAY_LIMIT),_0x2eef20=_0x410340[0x0],_0x22b3de=_0x2eef20?_0x47c961(0x120)+_0x2eef20+'\x22...':_0x47c961(0x9e),_0x4c70e1=await withSpinner(_0x22b3de,()=>_0x32176b['schedules'][_0x47c961(0x109)]({'limit':_0x416cd8,'scheduled':!![],'pattern':_0x2eef20}),{'verbose':_0x5ba1ef[_0x47c961(0x123)]}),_0x2def05=_0x4c70e1['data'][_0x47c961(0xe7)],_0x501499=_0x4c70e1[_0x47c961(0xc7)]['pagination'][_0x47c961(0xe4)],_0x4d9c43=_0x2eef20?_0x47c961(0xd1)+_0x2eef20+'\x22':'';_0x501499?console[_0x47c961(0x110)](_0x47c961(0xf4)+_0x2def05[_0x47c961(0xa8)]+_0x47c961(0x106)+_0x4d9c43+_0x47c961(0x122)):console[_0x47c961(0x110)](_0x47c961(0x127)+_0x2def05[_0x47c961(0xa8)]+'\x20scheduled\x20quer'+(_0x2def05[_0x47c961(0xa8)]!==0x1?_0x47c961(0xfa):'y')+_0x4d9c43);if(_0x5ba1ef[_0x47c961(0x10d)]===_0x47c961(0x128)||_0x5ba1ef[_0x47c961(0x10d)]===_0x47c961(0x10b)||_0x5ba1ef[_0x47c961(0x10d)]===_0x47c961(0xd9)||_0x5ba1ef[_0x47c961(0x10d)]==='tsv'){const _0x55161c=_0x2def05[_0x47c961(0xb5)](_0x15f934=>({'id':_0x15f934['id'],'name':_0x15f934[_0x47c961(0xce)],'cron':_0x15f934[_0x47c961(0x115)],'database':_0x15f934['database']?.[_0x47c961(0xce)],'type':_0x15f934[_0x47c961(0xcd)],'timezone':_0x15f934[_0x47c961(0xbf)],'user_name':_0x15f934['user']?.[_0x47c961(0xce)],'updated_at':_0x15f934[_0x47c961(0xe2)],'next_run_at':_0x15f934['next_run_at'],'last_job_status':_0x15f934['last_job']?.[_0x47c961(0xac)]}));await handleSDKOutput(_0x55161c,_0x5ba1ef);}else{if(_0x2def05[_0x47c961(0xa8)]===0x0)console[_0x47c961(0xfc)](_0x47c961(0xbb));else{const _0x5bc618=_0x5ba1ef[_0x47c961(0xa0)],_0x4b44ac=_0x2def05[_0x47c961(0xb5)](_0x37515c=>{const _0x1b0030=_0x47c961,_0x5b36fa=_0x37515c[_0x1b0030(0xa4)]?.[_0x1b0030(0xac)]?_0x37515c[_0x1b0030(0xa4)][_0x1b0030(0xac)]==='success'?'✓':'✗':'-',_0x4915a0=_0x37515c[_0x1b0030(0xa4)]?.[_0x1b0030(0x9f)]?formatRelativeTime(_0x37515c['last_job'][_0x1b0030(0x9f)]):'never',_0x13e1ed=_0x37515c[_0x1b0030(0xa6)]?formatRelativeTime(_0x37515c[_0x1b0030(0xa6)]):'-',_0x3f8805=_0x37515c[_0x1b0030(0x115)]||'',_0x4a39c2=_0x37515c['name']||_0x1b0030(0xd3),_0x44a8ed=getConsoleUrl(_0x5bc618,_0x1b0030(0x119)+_0x37515c['id']);return{'statusIcon':_0x5b36fa,'lastRun':_0x4915a0,'nextRun':_0x13e1ed,'cron':_0x3f8805,'name':_0x4a39c2,'queryUrl':_0x44a8ed,'status':_0x37515c['last_job']?.[_0x1b0030(0xac)]};}),_0x8631c2=Math[_0x47c961(0xf2)](..._0x4b44ac[_0x47c961(0xb5)](_0x5e216f=>_0x5e216f[_0x47c961(0xa5)][_0x47c961(0xa8)])),_0x4f4a56=Math[_0x47c961(0xf2)](..._0x4b44ac[_0x47c961(0xb5)](_0x306054=>_0x306054['nextRun'][_0x47c961(0xa8)])),_0x19b72b=Math[_0x47c961(0xf2)](..._0x4b44ac[_0x47c961(0xb5)](_0x3e5abc=>_0x3e5abc[_0x47c961(0x115)][_0x47c961(0xa8)])),_0x33d4cd=_0x4b44ac[_0x47c961(0xb5)](_0x86c5df=>{const _0x31bb1e=_0x47c961,_0x16c32b=_0x86c5df['status']===_0x31bb1e(0xd8)?a30_0x2917ba[_0x31bb1e(0x104)](_0x86c5df['statusIcon']):_0x86c5df['status']==='error'?a30_0x2917ba[_0x31bb1e(0xd6)](_0x86c5df[_0x31bb1e(0xc4)]):a30_0x2917ba['dim'](_0x86c5df[_0x31bb1e(0xc4)]),_0x58def1=_0x86c5df[_0x31bb1e(0xa5)]['padEnd'](_0x8631c2),_0x51db29=_0x86c5df[_0x31bb1e(0x101)][_0x31bb1e(0xb9)](_0x4f4a56),_0x15b92c=_0x86c5df[_0x31bb1e(0x115)]?a30_0x2917ba[_0x31bb1e(0xca)](_0x86c5df[_0x31bb1e(0x115)]['padEnd'](_0x19b72b)):'\x20'['repeat'](_0x19b72b),_0xc8063b=hyperlink(_0x86c5df[_0x31bb1e(0xce)],_0x86c5df[_0x31bb1e(0xed)]);return _0x31bb1e(0x9d)+_0x16c32b+'\x20'+_0x58def1+_0x31bb1e(0xc0)+_0x51db29+'\x20\x20'+_0x15b92c+'\x20\x20'+_0xc8063b;});await writeOutput(_0x33d4cd[_0x47c961(0xf7)]('\x0a'),_0x5ba1ef[_0x47c961(0xe1)],_0x47c961(0xcc));}}return 0x0;}}export class ScheduleShowCommand extends BaseCommand{[a30_0x1ff8d3(0xce)]='schedule:show';['description']=a30_0x1ff8d3(0x10a);[a30_0x1ff8d3(0xd7)](_0x4a14c4){const _0x2e1677=a30_0x1ff8d3,_0x5543fa=_0x4a14c4[_0x2e1677(0xfb)][0x0];if(!_0x5543fa)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20show\x20<name>';return undefined;}async[a30_0x1ff8d3(0xb1)](_0x4ae9d0){const _0x383fdd=a30_0x1ff8d3,{options:_0x4ee797,args:_0xee18f7,tdx:_0x22572a}=_0x4ae9d0,_0xa8fac1=_0xee18f7[0x0],_0x56fb5d=await withSpinner(_0x383fdd(0xec),()=>_0x22572a[_0x383fdd(0xea)][_0x383fdd(0xcf)](_0xa8fac1),{'verbose':_0x4ee797[_0x383fdd(0x123)]}),_0x4f9bd9=_0x56fb5d['data'],_0x383f79={'name':_0x4f9bd9[_0x383fdd(0xce)],'cron':_0x4f9bd9['cron'],'database':_0x4f9bd9[_0x383fdd(0xf3)],'type':_0x4f9bd9['type'],'timezone':_0x4f9bd9[_0x383fdd(0xc2)],'user_name':_0x4f9bd9[_0x383fdd(0xdc)],'created_at':_0x4f9bd9[_0x383fdd(0xb6)],'engine_version':_0x4f9bd9[_0x383fdd(0xc9)],'executing_user_id':_0x4f9bd9['executing_user_id'],'query':_0x4f9bd9['query'],'delay':_0x4f9bd9[_0x383fdd(0xd4)],'priority':_0x4f9bd9[_0x383fdd(0x11f)],'retry_limit':_0x4f9bd9[_0x383fdd(0xa9)],..._0x4f9bd9['result']&&{'result':_0x4f9bd9[_0x383fdd(0xa1)]}};return await handleSingleObjectOutput(_0x383f79,_0x4ee797),0x0;}}export class ScheduleCreateCommand extends BaseCommand{['name']=a30_0x1ff8d3(0xaf);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xc1);[a30_0x1ff8d3(0xd7)](_0x58d77b){const _0x1248f2=a30_0x1ff8d3,_0xd9837e=_0x58d77b[_0x1248f2(0xfb)][0x0];if(!_0xd9837e)return _0x1248f2(0x114);const _0x499af8=_0x58d77b[_0x1248f2(0x11b)];if(!_0x499af8[_0x1248f2(0xf3)])return'Database\x20is\x20required\x0aUsage:\x20job\x20schedule\x20create\x20<name>\x20-d\x20<db>\x20--file\x20<path>\x20[options]';return undefined;}async[a30_0x1ff8d3(0xb1)](_0x472b90){const _0x543110=a30_0x1ff8d3,{options:_0x56fcd4,args:_0x47192a,tdx:_0x40db99}=_0x472b90,_0x488694=_0x47192a[0x0],_0x5944bf=_0x56fcd4,_0x2a04e5=_0x5944bf[_0x543110(0xf3)],_0x242a3d=_0x5944bf['file'],_0x1897ab=_0x5944bf['type']||_0x543110(0xdf);let _0x33e0ef;try{_0x33e0ef=readFileSync(_0x242a3d,'utf-8')['trim']();}catch(_0x3f633d){throw new SDKError(ErrorCode[_0x543110(0x10f)],_0x543110(0x118)+_0x242a3d,_0x3f633d instanceof Error?_0x3f633d:undefined);}if(!_0x33e0ef)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x543110(0x121));const _0x10ca90={'database':_0x2a04e5,'query':_0x33e0ef,'type':_0x1897ab};if(_0x5944bf[_0x543110(0x115)])_0x10ca90[_0x543110(0x115)]=_0x5944bf[_0x543110(0x115)];if(_0x5944bf[_0x543110(0xc2)])_0x10ca90[_0x543110(0xc2)]=_0x5944bf['timezone'];if(_0x5944bf[_0x543110(0xd4)]!==undefined)_0x10ca90['delay']=Number(_0x5944bf[_0x543110(0xd4)]);if(_0x5944bf['priority']!==undefined)_0x10ca90['priority']=Number(_0x5944bf[_0x543110(0x11f)]);if(_0x5944bf[_0x543110(0x112)]!==undefined)_0x10ca90[_0x543110(0xa9)]=Number(_0x5944bf[_0x543110(0x112)]);if(_0x5944bf['engineVersion'])_0x10ca90[_0x543110(0xc9)]=_0x5944bf['engineVersion'];if(_0x5944bf[_0x543110(0xa1)])_0x10ca90[_0x543110(0xa1)]=_0x5944bf[_0x543110(0xa1)];if(_0x56fcd4[_0x543110(0x123)]){console[_0x543110(0x110)](_0x543110(0xf5)+_0x488694),console[_0x543110(0x110)](_0x543110(0xb8)+_0x2a04e5),console[_0x543110(0x110)](_0x543110(0x124)+_0x1897ab);if(_0x10ca90[_0x543110(0x115)])console['error']('\x20\x20Cron:\x20'+_0x10ca90[_0x543110(0x115)]);if(_0x10ca90[_0x543110(0xc2)])console['error']('\x20\x20Timezone:\x20'+_0x10ca90[_0x543110(0xc2)]);}const _0x4d2774=await withSpinner('Creating\x20schedule...',()=>_0x40db99[_0x543110(0xea)][_0x543110(0xee)](_0x488694,_0x10ca90),{'verbose':_0x56fcd4[_0x543110(0x123)]});return console[_0x543110(0x110)](_0x543110(0xc5)+_0x4d2774[_0x543110(0xc7)]['name']),await handleSingleObjectOutput(_0x4d2774[_0x543110(0xc7)],_0x56fcd4),0x0;}}export class ScheduleUpdateCommand extends BaseCommand{['name']='schedule:update';['description']=a30_0x1ff8d3(0xe9);[a30_0x1ff8d3(0xd7)](_0x2146ef){const _0x509bb3=a30_0x1ff8d3,_0x24ca7b=_0x2146ef[_0x509bb3(0xfb)][0x0];if(!_0x24ca7b)return _0x509bb3(0xde);return undefined;}async[a30_0x1ff8d3(0xb1)](_0x3e94fa){const _0x56d7a4=a30_0x1ff8d3,{options:_0x3042eb,args:_0x5ee3ad,tdx:_0x5d84f1}=_0x3e94fa,_0x46fe00=_0x5ee3ad[0x0],_0x34580c=_0x3042eb,_0x2aae47={};if(_0x34580c['database'])_0x2aae47[_0x56d7a4(0xf3)]=_0x34580c['database'];if(_0x34580c[_0x56d7a4(0xcd)])_0x2aae47[_0x56d7a4(0xcd)]=_0x34580c[_0x56d7a4(0xcd)];if(_0x34580c['cron'])_0x2aae47[_0x56d7a4(0x115)]=_0x34580c['cron'];if(_0x34580c[_0x56d7a4(0xc2)])_0x2aae47[_0x56d7a4(0xc2)]=_0x34580c['timezone'];if(_0x34580c[_0x56d7a4(0xd4)]!==undefined)_0x2aae47[_0x56d7a4(0xd4)]=Number(_0x34580c[_0x56d7a4(0xd4)]);if(_0x34580c[_0x56d7a4(0x11f)]!==undefined)_0x2aae47[_0x56d7a4(0x11f)]=Number(_0x34580c[_0x56d7a4(0x11f)]);if(_0x34580c[_0x56d7a4(0x112)]!==undefined)_0x2aae47[_0x56d7a4(0xa9)]=Number(_0x34580c[_0x56d7a4(0x112)]);if(_0x34580c[_0x56d7a4(0xdb)])_0x2aae47[_0x56d7a4(0xc9)]=_0x34580c[_0x56d7a4(0xdb)];if(_0x34580c['result'])_0x2aae47['result']=_0x34580c['result'];if(_0x34580c[_0x56d7a4(0x116)])try{_0x2aae47[_0x56d7a4(0x111)]=readFileSync(_0x34580c[_0x56d7a4(0x116)],'utf-8')[_0x56d7a4(0x105)]();}catch(_0x5958b2){throw new SDKError(ErrorCode[_0x56d7a4(0x10f)],'Failed\x20to\x20read\x20file:\x20'+_0x34580c['file'],_0x5958b2 instanceof Error?_0x5958b2:undefined);}if(Object[_0x56d7a4(0xfe)](_0x2aae47)[_0x56d7a4(0xa8)]===0x0)throw new SDKError(ErrorCode[_0x56d7a4(0x10f)],_0x56d7a4(0xbc));if(_0x3042eb[_0x56d7a4(0x123)]){console['error'](_0x56d7a4(0x126)+_0x46fe00);for(const [_0x496e68,_0x3fd7c7]of Object[_0x56d7a4(0xb0)](_0x2aae47)){_0x496e68===_0x56d7a4(0x111)?console['error']('\x20\x20'+_0x496e68+':\x20'+_0x3fd7c7[_0x56d7a4(0x11e)](0x0,0x32)+_0x56d7a4(0x102)):console[_0x56d7a4(0x110)]('\x20\x20'+_0x496e68+':\x20'+_0x3fd7c7);}}const _0x193afb=await withSpinner('Updating\x20schedule...',()=>_0x5d84f1['schedules']['update'](_0x46fe00,_0x2aae47),{'verbose':_0x3042eb[_0x56d7a4(0x123)]});return console['error']('Schedule\x20updated:\x20'+_0x193afb['data'][_0x56d7a4(0xce)]),await handleSingleObjectOutput(_0x193afb[_0x56d7a4(0xc7)],_0x3042eb),0x0;}}export class ScheduleDeleteCommand extends BaseCommand{['name']=a30_0x1ff8d3(0xae);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xe8);[a30_0x1ff8d3(0xd7)](_0x1f7914){const _0x332623=a30_0x1ff8d3,_0x1cc136=_0x1f7914[_0x332623(0xfb)][0x0];if(!_0x1cc136)return'Schedule\x20name\x20is\x20required\x0aUsage:\x20job\x20schedule\x20delete\x20<name>';return undefined;}async[a30_0x1ff8d3(0xb1)](_0x35438c){const _0x319027=a30_0x1ff8d3,{options:_0x2a8c01,args:_0x1f5a55,tdx:_0x4731ae}=_0x35438c,_0x4ff049=_0x1f5a55[0x0];if(!_0x2a8c01[_0x319027(0xf0)]){const _0x2ad118=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20schedule\x20\x22'+_0x4ff049+'\x22?');if(!_0x2ad118)return console['error'](_0x319027(0xa2)),0x0;}const _0x266537=await withSpinner('Deleting\x20schedule...',()=>_0x4731ae[_0x319027(0xea)][_0x319027(0xdd)](_0x4ff049),{'verbose':_0x2a8c01[_0x319027(0x123)]});return console[_0x319027(0x110)](_0x319027(0xe0)+_0x266537[_0x319027(0xc7)][_0x319027(0xce)]),0x0;}}export class ScheduleRunCommand extends BaseCommand{[a30_0x1ff8d3(0xce)]='schedule:run';[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xb7);[a30_0x1ff8d3(0xd7)](_0x29d26f){const _0xd3bc89=a30_0x1ff8d3,_0x1bc937=_0x29d26f[_0xd3bc89(0xfb)][0x0];if(!_0x1bc937)return _0xd3bc89(0xff);return undefined;}async[a30_0x1ff8d3(0xb1)](_0x5c1af3){const _0x53006b=a30_0x1ff8d3,{options:_0x2a12b2,args:_0x30946d,tdx:_0x240d68}=_0x5c1af3,_0xe47a4e=_0x30946d[0x0],_0x222ae7=_0x2a12b2,_0x3bd566=_0x222ae7[_0x53006b(0xd0)],_0x4b2d19=_0x222ae7[_0x53006b(0xbd)]!==undefined?Number(_0x222ae7[_0x53006b(0xbd)]):undefined;if(_0x2a12b2[_0x53006b(0x123)]){console[_0x53006b(0x110)](_0x53006b(0x12a)+_0xe47a4e);if(_0x3bd566)console[_0x53006b(0x110)](_0x53006b(0xa7)+_0x3bd566);if(_0x4b2d19)console[_0x53006b(0x110)]('\x20\x20Num:\x20'+_0x4b2d19);}const _0x1ee627=await withSpinner(_0x53006b(0xf9),()=>_0x240d68['schedules'][_0x53006b(0xe5)](_0xe47a4e,{'time':_0x3bd566,'num':_0x4b2d19}),{'verbose':_0x2a12b2['verbose']}),_0x360538=_0x1ee627[_0x53006b(0xc7)][_0x53006b(0xb4)];console[_0x53006b(0x110)](_0x53006b(0x113)+_0x360538[_0x53006b(0xa8)]+'\x20job'+(_0x360538[_0x53006b(0xa8)]!==0x1?'s':'')+_0x53006b(0xeb));for(const _0x3c02f4 of _0x360538){console[_0x53006b(0x110)](_0x53006b(0x117)+_0x3c02f4['job_id']);}return await handleSDKOutput(_0x360538,_0x2a12b2),0x0;}}export class ScheduleHistoryCommand extends BaseCommand{['name']=a30_0x1ff8d3(0xb3);[a30_0x1ff8d3(0x11d)]=a30_0x1ff8d3(0xe6);[a30_0x1ff8d3(0xd7)](_0x285136){const _0x53e56f=a30_0x1ff8d3,_0x1d1090=_0x285136[_0x53e56f(0xfb)][0x0];if(!_0x1d1090)return _0x53e56f(0xad);return undefined;}async[a30_0x1ff8d3(0xb1)](_0x4f8eb2){const _0x26bc97=a30_0x1ff8d3,{options:_0x3e0831,args:_0x2e7314,tdx:_0x15f129}=_0x4f8eb2,_0x33bfea=_0x2e7314[0x0],_0x1b0836=_0x3e0831,_0x26e971=_0x1b0836[_0x26bc97(0x9c)]!==undefined?Number(_0x1b0836[_0x26bc97(0x9c)]):undefined,_0x412a2f=_0x1b0836['to']!==undefined?Number(_0x1b0836['to']):undefined,_0x5a7f83=await withSpinner(_0x26bc97(0xf1),()=>_0x15f129[_0x26bc97(0xea)][_0x26bc97(0xab)](_0x33bfea,{'from':_0x26e971,'to':_0x412a2f}),{'verbose':_0x3e0831[_0x26bc97(0x123)]}),_0xadea98=_0x5a7f83['data'];console[_0x26bc97(0x110)]('Found\x20'+_0xadea98[_0x26bc97(0x129)]+'\x20execution'+(_0xadea98[_0x26bc97(0x129)]!==0x1?'s':'')+'\x20(showing\x20'+_0xadea98['from']+'-'+_0xadea98['to']+')');const _0x485b74=_0xadea98[_0x26bc97(0xab)][_0x26bc97(0xb5)](_0x3924b9=>({'job_id':_0x3924b9[_0x26bc97(0xf6)],'type':_0x3924b9[_0x26bc97(0xcd)],'status':_0x3924b9[_0x26bc97(0xac)],'scheduled_at':_0x3924b9[_0x26bc97(0x107)],'created_at':_0x3924b9[_0x26bc97(0xb6)],'start_at':_0x3924b9[_0x26bc97(0xbe)],'end_at':_0x3924b9['end_at']}));return await handleSDKOutput(_0x485b74,_0x3e0831),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x35e85e=a31_0x4c50;(function(_0x401dab,_0x109d7b){const _0x3f06ce=a31_0x4c50,_0x324e14=_0x401dab();while(!![]){try{const _0x4b339a=-parseInt(_0x3f06ce(0x1f0))/0x1*(-parseInt(_0x3f06ce(0x1fd))/0x2)+parseInt(_0x3f06ce(0x1ea))/0x3+-parseInt(_0x3f06ce(0x18d))/0x4*(parseInt(_0x3f06ce(0x1b1))/0x5)+parseInt(_0x3f06ce(0x1ba))/0x6*(-parseInt(_0x3f06ce(0x182))/0x7)+parseInt(_0x3f06ce(0x17e))/0x8+-parseInt(_0x3f06ce(0x1bc))/0x9*(-parseInt(_0x3f06ce(0x19c))/0xa)+-parseInt(_0x3f06ce(0x1ce))/0xb*(parseInt(_0x3f06ce(0x198))/0xc);if(_0x4b339a===_0x109d7b)break;else _0x324e14['push'](_0x324e14['shift']());}catch(_0xa65987){_0x324e14['push'](_0x324e14['shift']());}}}(a31_0x5ce7,0x1f710));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,formatElapsed}from'../utils/spinner.js';function a31_0x4c50(_0x5e790e,_0x4813dd){_0x5e790e=_0x5e790e-0x167;const _0x5ce7c0=a31_0x5ce7();let _0x4c5057=_0x5ce7c0[_0x5e790e];return _0x4c5057;}import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{executeSchemaQuery}from'../sdk/segment/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import a31_0x162462 from'chalk';async function resolveSegmentTarget(_0x17e73e,_0x51cba6,_0x16456d){const _0x399dce=a31_0x4c50;if(isYamlFilePath(_0x17e73e))try{const _0x45f4a2=await resolveYamlFilePath(_0x17e73e);return _0x16456d&&(console[_0x399dce(0x1ad)](_0x399dce(0x1e3)+_0x17e73e),console[_0x399dce(0x1ad)](_0x399dce(0x19e)+_0x45f4a2[_0x399dce(0x167)]),console[_0x399dce(0x1ad)]('\x20\x20Segment\x20name:\x20'+_0x45f4a2[_0x399dce(0x1cd)]),console[_0x399dce(0x1ad)]('\x20\x20Folder\x20path:\x20'+(_0x45f4a2['folderPath']||'(root)')),console[_0x399dce(0x1ad)](_0x399dce(0x1e9)+_0x45f4a2[_0x399dce(0x19a)])),_0x45f4a2[_0x399dce(0x19a)];}catch(_0x31d430){throw new SDKError(ErrorCode[_0x399dce(0x180)],_0x399dce(0x1b9)+_0x31d430[_0x399dce(0x19b)]);}if(!_0x51cba6)throw new SDKError(ErrorCode[_0x399dce(0x180)],_0x399dce(0x1b7));return _0x51cba6+'/'+_0x17e73e;}export class SegmentDescribeCommand extends BaseCommand{['name']=a31_0x35e85e(0x17a);['description']=a31_0x35e85e(0x16e);async[a31_0x35e85e(0x207)](_0x137fee){const _0xd0953a=a31_0x35e85e,{options:_0x4639d4,args:_0x9ad1b9,tdx:_0x124d0b}=_0x137fee,_0xd36075=_0x9ad1b9[0x0],_0x5a0d8d=!_0xd36075&&!!_0x4639d4[_0xd0953a(0x167)],_0x1e5812=_0xd36075||_0x4639d4['parentSegment'];if(!_0x1e5812)return console['error']('Error:\x20Path\x20or\x20name\x20is\x20required'),console[_0xd0953a(0x1ad)](_0xd0953a(0x1a5)),console[_0xd0953a(0x1ad)]('Examples:'),console[_0xd0953a(0x1ad)](_0xd0953a(0x189)),console[_0xd0953a(0x1ad)](_0xd0953a(0x1fe)),console[_0xd0953a(0x1ad)]('\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0xd0953a(0x1ad)](_0xd0953a(0x1be)),0x1;try{const _0x335ddf=_0x4639d4[_0xd0953a(0x18a)];let _0x356d2f=_0x1e5812;!_0x5a0d8d&&_0x335ddf&&!_0x1e5812['includes']('/')&&(_0x356d2f=_0x335ddf+'/'+_0x1e5812,_0x4639d4[_0xd0953a(0x16b)]&&console[_0xd0953a(0x1ad)](_0xd0953a(0x211)+_0x356d2f));const _0x795736=await withSpinner(_0xd0953a(0x1c7)+_0x356d2f+_0xd0953a(0x1cc),()=>_0x124d0b[_0xd0953a(0x194)][_0xd0953a(0x1eb)](_0x356d2f),{'verbose':_0x4639d4[_0xd0953a(0x16b)]}),_0x521e92=_0x795736[_0xd0953a(0x1ab)];_0x4639d4[_0xd0953a(0x16b)]&&(console[_0xd0953a(0x1ad)](_0xd0953a(0x16f)+_0x521e92[_0xd0953a(0x192)]),console['error'](_0xd0953a(0x1b8)+_0x521e92['parentId']),_0x521e92[_0xd0953a(0x18c)]&&console[_0xd0953a(0x1ad)](_0xd0953a(0x177)+_0x521e92[_0xd0953a(0x18c)]),_0x521e92[_0xd0953a(0x1bb)]&&console[_0xd0953a(0x1ad)](_0xd0953a(0x1ff)+_0x521e92[_0xd0953a(0x1bb)]));if(_0x521e92[_0xd0953a(0x192)]===_0xd0953a(0x1ec)){const _0x4222c6=await withSpinner(_0xd0953a(0x1a7),()=>_0x124d0b[_0xd0953a(0x194)]['getParent'](_0x521e92[_0xd0953a(0x1d9)]),{'verbose':_0x4639d4['verbose']});await handleSingleObjectOutput(_0x4222c6[_0xd0953a(0x1ab)],_0x4639d4);}else{if(_0x521e92[_0xd0953a(0x192)]===_0xd0953a(0x210)){if(!_0x521e92['folderId'])throw new SDKError(ErrorCode[_0xd0953a(0x1cf)],_0xd0953a(0x1f8));const _0x52e79a=await withSpinner(_0xd0953a(0x1fb),()=>_0x124d0b[_0xd0953a(0x194)]['getFolder'](_0x521e92[_0xd0953a(0x18c)]),{'verbose':_0x4639d4[_0xd0953a(0x16b)]});await handleSingleObjectOutput(_0x52e79a[_0xd0953a(0x1ab)],_0x4639d4);}else{if(_0x521e92['type']==='segment'){if(!_0x521e92[_0xd0953a(0x1bb)])throw new SDKError(ErrorCode[_0xd0953a(0x176)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x4fafb5=await withSpinner(_0xd0953a(0x172),()=>_0x124d0b[_0xd0953a(0x194)][_0xd0953a(0x1f7)](_0x521e92[_0xd0953a(0x1d9)],_0x521e92[_0xd0953a(0x1bb)]),{'verbose':_0x4639d4[_0xd0953a(0x16b)]});await handleSingleObjectOutput(_0x4fafb5[_0xd0953a(0x1ab)],_0x4639d4);}}}return 0x0;}catch(_0x503db6){if(_0x503db6 instanceof SDKError)return console[_0xd0953a(0x1ad)]('Error:\x20'+_0x503db6[_0xd0953a(0x19b)]),_0x503db6['cause']&&console[_0xd0953a(0x1ad)](_0xd0953a(0x1ed)+_0x503db6[_0xd0953a(0x1ae)]),0x1;throw _0x503db6;}}}export class SegmentShowCommand extends BaseCommand{[a31_0x35e85e(0x1a8)]=a31_0x35e85e(0x1c4);[a31_0x35e85e(0x202)]=a31_0x35e85e(0x193);async[a31_0x35e85e(0x207)](_0x53f0cd){const _0x535c19=a31_0x35e85e,{options:_0xf88972,args:_0x393c3d,tdx:_0x31322c}=_0x53f0cd,_0x365250=_0x393c3d[0x0];if(!_0x365250)return console['error'](_0x535c19(0x173)),console['error'](_0x535c19(0x1dc)),console[_0x535c19(0x1ad)](_0x535c19(0x171)),console['error']('Examples:'),console[_0x535c19(0x1ad)](_0x535c19(0x201)),console[_0x535c19(0x1ad)](_0x535c19(0x1af)),0x1;try{const _0x16ef3a=_0xf88972['parentSegment'],_0x39ea10=await resolveSegmentTarget(_0x365250,_0x16ef3a,_0xf88972[_0x535c19(0x16b)]);_0xf88972[_0x535c19(0x16b)]&&console[_0x535c19(0x1ad)](_0x535c19(0x1a0)+_0x39ea10);const _0x2f0f61=await withSpinner('Resolving\x20\x27'+_0x365250+_0x535c19(0x1cc),()=>_0x31322c[_0x535c19(0x194)][_0x535c19(0x1eb)](_0x39ea10),{'verbose':_0xf88972[_0x535c19(0x16b)]}),_0x1bcdcb=_0x2f0f61[_0x535c19(0x1ab)];_0xf88972[_0x535c19(0x16b)]&&(console[_0x535c19(0x1ad)](_0x535c19(0x16f)+_0x1bcdcb[_0x535c19(0x192)]),console['error'](_0x535c19(0x1b8)+_0x1bcdcb['parentId']));if(_0x1bcdcb[_0x535c19(0x192)]===_0x535c19(0x210))return console[_0x535c19(0x1ad)](_0x535c19(0x18e)),console[_0x535c19(0x1ad)](_0x535c19(0x1b5)),0x1;if(_0x1bcdcb[_0x535c19(0x192)]==='parent')return console['error'](_0x535c19(0x205)),console[_0x535c19(0x1ad)](_0x535c19(0x208)),0x1;if(!_0x1bcdcb[_0x535c19(0x1bb)])throw new SDKError(ErrorCode[_0x535c19(0x176)],_0x535c19(0x1d8));const _0x448772=await withSpinner(_0x535c19(0x1b4),()=>_0x31322c[_0x535c19(0x194)][_0x535c19(0x1e0)](_0x1bcdcb[_0x535c19(0x1d9)],_0x1bcdcb[_0x535c19(0x1bb)]),{'verbose':_0xf88972[_0x535c19(0x16b)]});let _0x54b92d=_0x448772['data'];const _0x302a14=resolveLimit(_0xf88972[_0x535c19(0x20e)],DEFAULT_DISPLAY_LIMIT),_0x256357=/\bLIMIT\s+\d+/i['test'](_0x54b92d);!_0x256357&&(_0x54b92d=_0x54b92d[_0x535c19(0x206)]()[_0x535c19(0x20f)](/;+$/,''),_0x54b92d=_0x535c19(0x1d1)+_0x54b92d+_0x535c19(0x204)+_0x302a14);_0xf88972[_0x535c19(0x16b)]&&console['error'](_0x535c19(0x185)+_0x54b92d);const _0x3f905d=await withProgressSpinner(_0x535c19(0x188),async _0x2596a5=>{const _0x3223e2=_0x535c19,_0x32a5e6=await _0x31322c[_0x3223e2(0x16d)][_0x3223e2(0x207)](_0x54b92d,{'catalog':'td','schema':_0x3223e2(0x1d3),'onJobId':_0x1570e3=>{const _0x3675da=_0x3223e2;_0x2596a5[_0x3675da(0x1ee)](_0x1570e3);}});return _0x32a5e6;},{'verbose':_0xf88972[_0x535c19(0x16b)]}),_0x3ecbd9=_0x3f905d[_0x535c19(0x1ab)],_0x284117=_0x3ecbd9['jobId']?_0x535c19(0x17b)+_0x3ecbd9[_0x535c19(0x20a)]+']':'';return console[_0x535c19(0x1ad)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x3ecbd9['stats'][_0x535c19(0x200)]['toLocaleString']()+'\x20rows\x20'+(_0x535c19(0x1df)+formatElapsed(_0x3ecbd9['stats'][_0x535c19(0x1d2)])+_0x284117)),await handleQueryOutput(_0x3ecbd9,_0xf88972),0x0;}catch(_0x2542e2){if(_0x2542e2 instanceof SDKError)return console[_0x535c19(0x1ad)]('✖\x20Query\x20failed\x20['+_0x2542e2[_0x535c19(0x1ca)]+']'),console[_0x535c19(0x1ad)]('\x0a'+_0x2542e2[_0x535c19(0x19b)]),0x1;throw _0x2542e2;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a31_0x35e85e(0x1d5);[a31_0x35e85e(0x202)]=a31_0x35e85e(0x183);async[a31_0x35e85e(0x207)](_0x456cd7){const _0x30a4bf=a31_0x35e85e,{options:_0x4a6991,args:_0x5ebfc4,tdx:_0x3aaf52}=_0x456cd7;if(_0x5ebfc4[_0x30a4bf(0x1f9)]===0x0)return console['error'](_0x30a4bf(0x1b2)),console[_0x30a4bf(0x1ad)](_0x30a4bf(0x1b6)),0x1;const _0x26ab54=_0x5ebfc4[0x0];try{_0x4a6991[_0x30a4bf(0x16b)]&&(console[_0x30a4bf(0x1ad)](_0x30a4bf(0x1c1)+_0x4a6991[_0x30a4bf(0x19d)]),console[_0x30a4bf(0x1ad)](_0x30a4bf(0x1d7)+_0x26ab54));const _0x4a6f96=await withSpinner(_0x30a4bf(0x1f5)+_0x26ab54+_0x30a4bf(0x1cc),()=>_0x3aaf52[_0x30a4bf(0x194)][_0x30a4bf(0x196)](_0x26ab54),{'verbose':_0x4a6991['verbose']}),_0x2e6b9e=_0x4a6f96[_0x30a4bf(0x1ab)];_0x4a6991[_0x30a4bf(0x16b)]&&console[_0x30a4bf(0x1ad)](_0x30a4bf(0x1e4)+_0x2e6b9e);const _0x4449d4=await withSpinner('Listing\x20folders\x20for\x20parent\x20\x27'+_0x26ab54+_0x30a4bf(0x1cc),()=>_0x3aaf52[_0x30a4bf(0x194)][_0x30a4bf(0x1ef)](_0x2e6b9e),{'verbose':_0x4a6991[_0x30a4bf(0x16b)]}),_0x4515f5=_0x4449d4[_0x30a4bf(0x1ab)];return console[_0x30a4bf(0x1ad)](_0x30a4bf(0x1a1)+_0x4515f5[_0x30a4bf(0x1f9)]+_0x30a4bf(0x1f2)+(_0x4515f5[_0x30a4bf(0x1f9)]!==0x1?'s':'')),await handleSDKOutput(_0x4515f5,_0x4a6991),0x0;}catch(_0x3040b8){if(_0x3040b8 instanceof SDKError)return console[_0x30a4bf(0x1ad)](_0x30a4bf(0x1e5)+_0x3040b8['message']),_0x3040b8['cause']&&console['error'](_0x30a4bf(0x1ed)+_0x3040b8[_0x30a4bf(0x1ae)]),0x1;throw _0x3040b8;}}}export class SegmentFolderShowCommand extends BaseCommand{[a31_0x35e85e(0x1a8)]=a31_0x35e85e(0x1b3);['description']=a31_0x35e85e(0x1c3);async[a31_0x35e85e(0x207)](_0x10a6c4){const _0x21b33f=a31_0x35e85e,{options:_0x3efd10,args:_0x520a7c,tdx:_0x48d351}=_0x10a6c4;if(_0x520a7c[_0x21b33f(0x1f9)]===0x0)return console[_0x21b33f(0x1ad)]('Error:\x20Folder\x20reference\x20is\x20required'),console[_0x21b33f(0x1ad)](_0x21b33f(0x199)),0x1;try{const {parentId:_0x55fcfc,childId:_0x124342}=parseSegmentRef(_0x520a7c[0x0]);_0x3efd10[_0x21b33f(0x16b)]&&(console[_0x21b33f(0x1ad)](_0x21b33f(0x1c1)+_0x3efd10[_0x21b33f(0x19d)]),console[_0x21b33f(0x1ad)]('Parent\x20name:\x20'+_0x55fcfc),_0x124342&&console['error'](_0x21b33f(0x1c9)+_0x124342));if(!_0x124342)return console[_0x21b33f(0x1ad)](_0x21b33f(0x1a9)),0x1;const _0xb9fa98=await withSpinner(_0x21b33f(0x1f5)+_0x55fcfc+_0x21b33f(0x1cc),()=>_0x48d351['segment'][_0x21b33f(0x196)](_0x55fcfc),{'verbose':_0x3efd10[_0x21b33f(0x16b)]}),_0x1057e2=_0xb9fa98['data'];_0x3efd10[_0x21b33f(0x16b)]&&console['error'](_0x21b33f(0x1e4)+_0x1057e2);const _0x1640b8=await withSpinner(_0x21b33f(0x20d)+_0x124342+'\x27...',()=>_0x48d351[_0x21b33f(0x194)][_0x21b33f(0x1a2)](_0x1057e2,_0x124342),{'verbose':_0x3efd10[_0x21b33f(0x16b)]}),_0x2cebb7=_0x1640b8[_0x21b33f(0x1ab)];_0x3efd10[_0x21b33f(0x16b)]&&console[_0x21b33f(0x1ad)](_0x21b33f(0x1d4)+_0x2cebb7);const _0x2a511b=await withSpinner(_0x21b33f(0x1f1)+_0x124342+_0x21b33f(0x1cc),()=>_0x48d351['segment']['getFolder'](_0x2cebb7),{'verbose':_0x3efd10[_0x21b33f(0x16b)]});return await handleSDKOutput([_0x2a511b[_0x21b33f(0x1ab)]],_0x3efd10),0x0;}catch(_0x2ab5dd){if(_0x2ab5dd instanceof SDKError)return console[_0x21b33f(0x1ad)](_0x21b33f(0x1e5)+_0x2ab5dd[_0x21b33f(0x19b)]),_0x2ab5dd[_0x21b33f(0x1ae)]&&console[_0x21b33f(0x1ad)](_0x21b33f(0x1ed)+_0x2ab5dd[_0x21b33f(0x1ae)]),0x1;throw _0x2ab5dd;}}}export class SegmentSQLCommand extends BaseCommand{[a31_0x35e85e(0x1a8)]=a31_0x35e85e(0x1c2);[a31_0x35e85e(0x202)]=a31_0x35e85e(0x170);async['execute'](_0x418659){const _0x467e58=a31_0x35e85e,{options:_0x4b653d,args:_0x54d8e2}=_0x418659,_0x512f5f=_0x4b653d,_0x16afe9=_0x512f5f[_0x467e58(0x1f4)],_0x29948f=_0x54d8e2[0x0];if(!_0x29948f&&!_0x16afe9)return console[_0x467e58(0x1ad)](a31_0x162462['red'](_0x467e58(0x209))),console[_0x467e58(0x1ad)](_0x467e58(0x1e8)),console[_0x467e58(0x1ad)]('\x20\x20Server-side\x20segment:\x20\x20tdx\x20sg\x20sql\x20<name>'),console['error'](_0x467e58(0x1bd)),console[_0x467e58(0x1ad)](_0x467e58(0x195)),console[_0x467e58(0x1ad)](_0x467e58(0x1c0)),console['error'](_0x467e58(0x197)),0x1;if(_0x29948f&&_0x16afe9)return console['error'](a31_0x162462[_0x467e58(0x1f6)](_0x467e58(0x1a4))),0x1;try{let _0x4ff4a7;if(_0x16afe9)_0x4ff4a7=await this[_0x467e58(0x18b)](_0x16afe9,_0x418659);else{if(isYamlFilePath(_0x29948f))return console[_0x467e58(0x1ad)](a31_0x162462[_0x467e58(0x1f6)]('Error:\x20YAML\x20file\x20paths\x20must\x20be\x20specified\x20with\x20--path\x20option')),console[_0x467e58(0x1ad)]('\x20\x20tdx\x20sg\x20sql\x20--path\x20'+_0x29948f),0x1;else _0x4ff4a7=await this[_0x467e58(0x190)](_0x29948f,_0x418659);}return _0x4b653d[_0x467e58(0x203)]===_0x467e58(0x1c6)||_0x4b653d[_0x467e58(0x203)]===_0x467e58(0x175)?await handleSDKOutput([{'sql':_0x4ff4a7}],_0x4b653d):console[_0x467e58(0x1de)](_0x4ff4a7),0x0;}catch(_0x21748d){if(_0x21748d instanceof SDKError)return console[_0x467e58(0x1ad)](_0x467e58(0x1e5)+_0x21748d[_0x467e58(0x19b)]),_0x21748d['cause']&&console[_0x467e58(0x1ad)](_0x467e58(0x1ed)+_0x21748d['cause']),0x1;throw _0x21748d;}}async[a31_0x35e85e(0x18b)](_0x3a3988,_0x32d4f0){const _0x479cab=a31_0x35e85e,{options:_0x5c543b,tdx:_0x312c97}=_0x32d4f0;let _0x1325e8;try{_0x1325e8=await resolveYamlFilePath(_0x3a3988);}catch(_0x5f05b0){throw new SDKError(ErrorCode[_0x479cab(0x180)],_0x479cab(0x1b9)+_0x5f05b0[_0x479cab(0x19b)]);}_0x5c543b[_0x479cab(0x16b)]&&console[_0x479cab(0x1ad)](_0x479cab(0x16a)+_0x1325e8[_0x479cab(0x167)]+'/'+_0x1325e8[_0x479cab(0x1cd)]);const _0x1797e3=await withSpinner(_0x479cab(0x1e6),()=>_0x312c97[_0x479cab(0x194)]['getSegmentSQLFromYaml'](_0x1325e8[_0x479cab(0x184)],_0x1325e8[_0x479cab(0x167)],_0x1325e8[_0x479cab(0x1cd)]),{'verbose':_0x5c543b['verbose']});return _0x1797e3[_0x479cab(0x1ab)];}async[a31_0x35e85e(0x190)](_0x4e7ab5,_0x3fdf51){const _0x55e66d=a31_0x35e85e,{options:_0x452c10,tdx:_0x10bf02}=_0x3fdf51,_0x500bc3=_0x452c10[_0x55e66d(0x167)],_0x15cb0e=await resolveSegmentTarget(_0x4e7ab5,_0x500bc3,_0x452c10['verbose']);_0x452c10[_0x55e66d(0x16b)]&&console[_0x55e66d(0x1ad)](_0x55e66d(0x1a0)+_0x15cb0e);const _0x11b5ca=await withSpinner(_0x55e66d(0x1aa)+_0x4e7ab5+_0x55e66d(0x1cc),()=>_0x10bf02[_0x55e66d(0x194)][_0x55e66d(0x1eb)](_0x15cb0e),{'verbose':_0x452c10[_0x55e66d(0x16b)]}),_0x5e4b77=_0x11b5ca[_0x55e66d(0x1ab)];_0x452c10[_0x55e66d(0x16b)]&&(console[_0x55e66d(0x1ad)](_0x55e66d(0x16f)+_0x5e4b77[_0x55e66d(0x192)]),console[_0x55e66d(0x1ad)](_0x55e66d(0x1b8)+_0x5e4b77['parentId']));if(_0x5e4b77[_0x55e66d(0x192)]===_0x55e66d(0x210))throw new SDKError(ErrorCode[_0x55e66d(0x180)],_0x55e66d(0x1da));if(_0x5e4b77[_0x55e66d(0x192)]===_0x55e66d(0x1ec))throw new SDKError(ErrorCode[_0x55e66d(0x180)],_0x55e66d(0x17d));if(!_0x5e4b77[_0x55e66d(0x1bb)])throw new SDKError(ErrorCode[_0x55e66d(0x176)],_0x55e66d(0x1d8));const _0x4956c9=await withSpinner(_0x55e66d(0x1b4),()=>_0x10bf02[_0x55e66d(0x194)][_0x55e66d(0x1e0)](_0x5e4b77[_0x55e66d(0x1d9)],_0x5e4b77[_0x55e66d(0x1bb)]),{'verbose':_0x452c10[_0x55e66d(0x16b)]});return _0x4956c9[_0x55e66d(0x1ab)];}}function a31_0x5ce7(){const _0x598c7d=['16914LTtTJx','segmentId','18FAfJus','\x20\x20Local\x20YAML\x20file:\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20--path\x20<file-path>','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','createFolder','\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22','Site:\x20','segment:sql','Show\x20segment\x20folder\x20details','segment:show','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','json','Resolving\x20path\x20\x27','segment:folder:create','Folder\x20name:\x20','code','\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22','\x27...','segmentName','55BjyiRP','SEGMENT_FOLDER_NOT_FOUND','\x20Opening\x20','SELECT\x20*\x20FROM\x20(\x0a','elapsedTimeMillis','information_schema','Resolved\x20folder\x20ID:\x20','segment:folder:list','\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml','Parent\x20name:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','parentId','Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.\x20Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','Usage:\x20tdx\x20sg\x20show\x20<name>','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','log','in\x20','getSegmentSQL','url','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','Resolved\x20YAML\x20file:\x20','Resolved\x20parent\x20ID:\x20','Error:\x20','Fetching\x20SQL\x20from\x20rule...','Use:\x20tdx\x20ps\x20view\x20-w','Usage:','\x20\x20Full\x20path:\x20','536163UAdTYn','resolvePathToResource','parent','\x20\x20Cause:\x20','setJobId','listFolders','5jdxksK','Fetching\x20folder\x20\x27','\x20folder','Use:\x20tdx\x20ps\x20desc','path','Resolving\x20parent\x20segment\x20\x27','red','getSegment','Folder\x20ID\x20missing\x20from\x20resolved\x20path','length','Creating\x20folder\x20\x27','Fetching\x20folder\x20details...','/app/ps/','7102wgpKzI','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Segment\x20ID:\x20','processedRows','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','description','format','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.','trim','execute','Use:\x20tdx\x20ps\x20show','Error:\x20Segment\x20name\x20or\x20--path\x20is\x20required','jobId','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Use:\x20tdx\x20ps\x20view','Resolving\x20folder\x20\x27','limit','replace','folder','Resolved\x20relative\x20path\x20to:\x20','parentSegment','parentFolder','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser','Resolved:\x20','verbose','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','query','Show\x20segment\x20or\x20folder\x20details','Resolved\x20type:\x20','Get\x20SQL\x20query\x20for\x20child\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>','Fetching\x20segment\x20details...','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','segment:desc','jsonl','SEGMENT_NOT_FOUND','Folder\x20ID:\x20','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','segment:describe','\x20[Job\x20ID:\x20','Options:','Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.\x20Use:\x20tdx\x20ps\x20sql','1909776sYyoGA','Show\x20folder\x20or\x20child\x20segment\x20details','INVALID_ARGUMENT','segment:view','469FUFdqJ','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','content','SQL\x20query:\x0a','Resolving\x20parent\x20folder\x20\x27','Usage:\x20tdx\x20sg\x20desc\x20<name>','Executing\x20segment\x20query...','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','segmentPath','getSQLFromYamlFile','folderId','8lltAcF','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]','getSQLFromServerSegment','✔\x20Created\x20folder\x20\x27','type','Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results','segment','Examples:','resolveParentId','\x20\x20tdx\x20sg\x20sql\x20--path\x20segments/my-audience/premium-users.yml','416124MApOpr','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','fullPath','message','1186660cqnFkD','site','\x20\x20Parent\x20segment:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','Target\x20path:\x20','✔\x20Found\x20','resolveFolderId','\x27\x20with\x20ID:\x20','Error:\x20Specify\x20either\x20segment\x20name\x20or\x20--path,\x20not\x20both','Usage:\x20tdx\x20segment\x20describe\x20<path>','getFolder','Fetching\x20parent\x20segment\x20details...','name','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','Resolving\x20\x27','data','\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml','error','cause','\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml','Create\x20segment\x20folder\x20for\x20organization','453720ngjran','Error:\x20Parent\x20segment\x20name\x20is\x20required','segment:folder:show','Fetching\x20SQL\x20for\x20segment...','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22','Parent\x20ID:\x20','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20'];a31_0x5ce7=function(){return _0x598c7d;};return a31_0x5ce7();}export class SegmentFolderCreateCommand extends BaseCommand{[a31_0x35e85e(0x1a8)]=a31_0x35e85e(0x1c8);[a31_0x35e85e(0x202)]=a31_0x35e85e(0x1b0);async[a31_0x35e85e(0x207)](_0x1e2088){const _0x4d8185=a31_0x35e85e,{options:_0x216158,args:_0x2a8a07,tdx:_0x320e53}=_0x1e2088,_0x3af815=_0x216158;if(_0x2a8a07['length']<0x2)return console[_0x4d8185(0x1ad)](_0x4d8185(0x20b)),console[_0x4d8185(0x1ad)](_0x4d8185(0x178)),0x1;const _0x55a7e4=_0x2a8a07[0x0],_0x280bcc=_0x2a8a07[0x1];_0x3af815['verbose']&&(console[_0x4d8185(0x1ad)](_0x4d8185(0x1c1)+_0x3af815[_0x4d8185(0x19d)]),console['error']('Parent\x20segment:\x20'+_0x55a7e4),console[_0x4d8185(0x1ad)](_0x4d8185(0x1c9)+_0x280bcc));let _0x507a7c;if(_0x3af815[_0x4d8185(0x168)]){const _0x21cce6=_0x3af815[_0x4d8185(0x168)],_0x449c04=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x55a7e4+_0x4d8185(0x1cc),()=>_0x320e53['segment'][_0x4d8185(0x196)](_0x55a7e4),{'verbose':_0x3af815[_0x4d8185(0x16b)]}),_0x5df803=_0x449c04[_0x4d8185(0x1ab)],_0x3720c2=await withSpinner(_0x4d8185(0x186)+_0x21cce6+'\x27...',()=>_0x320e53[_0x4d8185(0x194)][_0x4d8185(0x1a2)](_0x5df803,_0x21cce6),{'verbose':_0x3af815[_0x4d8185(0x16b)]});_0x507a7c=_0x3720c2[_0x4d8185(0x1ab)],_0x3af815['verbose']&&console[_0x4d8185(0x1ad)]('Resolved\x20parent\x20folder\x20ID:\x20'+_0x507a7c);}const _0x466e36={'name':_0x280bcc,'description':_0x3af815[_0x4d8185(0x202)],'parentFolderId':_0x507a7c},_0x2fa652=await withSpinner(_0x4d8185(0x1fa)+_0x280bcc+_0x4d8185(0x1cc),()=>_0x320e53[_0x4d8185(0x194)][_0x4d8185(0x1bf)](_0x55a7e4,_0x466e36),{'verbose':_0x3af815[_0x4d8185(0x16b)]}),_0x5ec754=_0x2fa652['data'];return console[_0x4d8185(0x1ad)](_0x4d8185(0x191)+_0x5ec754[_0x4d8185(0x1a8)]+_0x4d8185(0x1a3)+_0x5ec754['id']),await handleSDKOutput([_0x5ec754],_0x3af815),0x0;}}export class SegmentViewCommand extends BaseCommand{[a31_0x35e85e(0x1a8)]=a31_0x35e85e(0x181);[a31_0x35e85e(0x202)]=a31_0x35e85e(0x17f);async[a31_0x35e85e(0x207)](_0x109469){const _0x20e0e3=a31_0x35e85e,{options:_0x50ba66,args:_0x35bf1d,tdx:_0x401ba8}=_0x109469,_0x5936e3=_0x35bf1d[0x0];if(!_0x5936e3)return console[_0x20e0e3(0x1ad)]('Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x18f)),console['error'](_0x20e0e3(0x16c)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x17c)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1e2)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x195)),console[_0x20e0e3(0x1ad)]('\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details'),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x179)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x169)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1d6)),0x1;try{const _0x44657e=_0x50ba66[_0x20e0e3(0x167)],_0x57a126=await resolveSegmentTarget(_0x5936e3,_0x44657e,_0x50ba66[_0x20e0e3(0x16b)]);_0x50ba66[_0x20e0e3(0x16b)]&&console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1a0)+_0x57a126);const _0x351813=await withSpinner(_0x20e0e3(0x1aa)+_0x5936e3+'\x27...',()=>_0x401ba8[_0x20e0e3(0x194)][_0x20e0e3(0x1eb)](_0x57a126),{'verbose':_0x50ba66[_0x20e0e3(0x16b)]}),_0x5c073e=_0x351813[_0x20e0e3(0x1ab)];_0x50ba66[_0x20e0e3(0x16b)]&&(console[_0x20e0e3(0x1ad)]('Resolved\x20type:\x20'+_0x5c073e[_0x20e0e3(0x192)]),console[_0x20e0e3(0x1ad)]('Parent\x20ID:\x20'+_0x5c073e[_0x20e0e3(0x1d9)]),_0x5c073e[_0x20e0e3(0x18c)]&&console['error'](_0x20e0e3(0x177)+_0x5c073e[_0x20e0e3(0x18c)]),_0x5c073e[_0x20e0e3(0x1bb)]&&console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1ff)+_0x5c073e['segmentId']));if(_0x50ba66['web']){if(_0x5c073e[_0x20e0e3(0x192)]===_0x20e0e3(0x210))return console['error'](_0x20e0e3(0x1dd)),0x1;if(_0x5c073e[_0x20e0e3(0x192)]===_0x20e0e3(0x1ec))return console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1db)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1e7)),0x1;if(!_0x5c073e['segmentId'])throw new SDKError(ErrorCode[_0x20e0e3(0x176)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x35e871=getConsoleNextUrl(_0x50ba66[_0x20e0e3(0x19d)],_0x20e0e3(0x1fc)+_0x5c073e[_0x20e0e3(0x1d9)]+'/e/'+_0x5c073e['segmentId']);return console[_0x20e0e3(0x1ad)](a31_0x162462['green']('✔')+_0x20e0e3(0x1d0)+a31_0x162462['cyan'](_0x35e871)),openBrowser(_0x35e871),0x0;}if(_0x5c073e[_0x20e0e3(0x192)]==='folder'){if(!_0x5c073e[_0x20e0e3(0x18c)])throw new SDKError(ErrorCode['SEGMENT_FOLDER_NOT_FOUND'],_0x20e0e3(0x1f8));const _0x558d1d=await withSpinner('Fetching\x20folder\x20details...',()=>_0x401ba8[_0x20e0e3(0x194)][_0x20e0e3(0x1a6)](_0x5c073e[_0x20e0e3(0x18c)]),{'verbose':_0x50ba66[_0x20e0e3(0x16b)]});await handleSingleObjectOutput(_0x558d1d[_0x20e0e3(0x1ab)],_0x50ba66);}else{if(_0x5c073e[_0x20e0e3(0x192)]==='segment'){if(!_0x5c073e[_0x20e0e3(0x1bb)])throw new SDKError(ErrorCode[_0x20e0e3(0x176)],_0x20e0e3(0x1d8));const _0x5cf824=await withSpinner(_0x20e0e3(0x172),()=>_0x401ba8[_0x20e0e3(0x194)]['getSegment'](_0x5c073e[_0x20e0e3(0x1d9)],_0x5c073e[_0x20e0e3(0x1bb)]),{'verbose':_0x50ba66[_0x20e0e3(0x16b)]}),_0x1b6892=getConsoleNextUrl(_0x50ba66['site'],_0x20e0e3(0x1fc)+_0x5c073e[_0x20e0e3(0x1d9)]+'/e/'+_0x5c073e[_0x20e0e3(0x1bb)]),_0x26cd65=_0x5cf824[_0x20e0e3(0x1ab)];_0x26cd65[_0x20e0e3(0x1e1)]=_0x1b6892,await handleSingleObjectOutput(_0x26cd65,_0x50ba66);}else return console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1c5)),console[_0x20e0e3(0x1ad)](_0x20e0e3(0x20c)),0x1;}return 0x0;}catch(_0x536f6b){if(_0x536f6b instanceof SDKError)return console['error'](_0x20e0e3(0x1e5)+_0x536f6b[_0x20e0e3(0x19b)]),_0x536f6b[_0x20e0e3(0x1ae)]&&console[_0x20e0e3(0x1ad)](_0x20e0e3(0x1ed)+_0x536f6b[_0x20e0e3(0x1ae)]),0x1;throw _0x536f6b;}}}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{[a31_0x35e85e(0x1a8)]=a31_0x35e85e(0x174);[a31_0x35e85e(0x202)]='Show\x20child\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x477ce7){const _0x32c7be=a31_0x35e85e,{options:_0x1eb9bf,args:_0x305135,tdx:_0x3352ac}=_0x477ce7,_0x107266=_0x305135[0x0];if(!_0x107266)return console[_0x32c7be(0x1ad)](_0x32c7be(0x173)),console[_0x32c7be(0x1ad)](_0x32c7be(0x187)),console[_0x32c7be(0x1ad)](_0x32c7be(0x19f)),console[_0x32c7be(0x1ad)](_0x32c7be(0x195)),console[_0x32c7be(0x1ad)](_0x32c7be(0x1cb)),console['error'](_0x32c7be(0x1ac)),0x1;try{const _0x5738e6=_0x1eb9bf['parentSegment'],_0x67f1e9=await resolveSegmentTarget(_0x107266,_0x5738e6,_0x1eb9bf[_0x32c7be(0x16b)]);_0x1eb9bf['verbose']&&console[_0x32c7be(0x1ad)](_0x32c7be(0x1a0)+_0x67f1e9);const _0x3ed744=await withSpinner('Resolving\x20\x27'+_0x107266+_0x32c7be(0x1cc),()=>_0x3352ac[_0x32c7be(0x194)]['resolvePathToResource'](_0x67f1e9),{'verbose':_0x1eb9bf['verbose']}),_0x6dfc61=_0x3ed744['data'];_0x1eb9bf[_0x32c7be(0x16b)]&&(console[_0x32c7be(0x1ad)](_0x32c7be(0x16f)+_0x6dfc61[_0x32c7be(0x192)]),console['error'](_0x32c7be(0x1b8)+_0x6dfc61['parentId']));if(_0x6dfc61['type']===_0x32c7be(0x210))return console[_0x32c7be(0x1ad)]('Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.'),console['error']('Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.'),0x1;if(_0x6dfc61['type']===_0x32c7be(0x1ec))return console['error']('Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console['error'](_0x32c7be(0x1f3)),0x1;if(!_0x6dfc61[_0x32c7be(0x1bb)])throw new SDKError(ErrorCode[_0x32c7be(0x176)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0xe91c3b=await withSpinner(_0x32c7be(0x1b4),()=>_0x3352ac['segment']['getSegmentSQL'](_0x6dfc61[_0x32c7be(0x1d9)],_0x6dfc61[_0x32c7be(0x1bb)]),{'verbose':_0x1eb9bf[_0x32c7be(0x16b)]}),_0x22076f=_0xe91c3b[_0x32c7be(0x1ab)],_0x573247=await executeSchemaQuery(_0x22076f,_0x3352ac,_0x1eb9bf);return await handleQueryOutput(_0x573247,_0x1eb9bf),0x0;}catch(_0x31d613){if(_0x31d613 instanceof SDKError)return console[_0x32c7be(0x1ad)](_0x32c7be(0x1e5)+_0x31d613[_0x32c7be(0x19b)]),_0x31d613[_0x32c7be(0x1ae)]&&console[_0x32c7be(0x1ad)](_0x32c7be(0x1ed)+_0x31d613['cause']),0x1;throw _0x31d613;}}}
|
|
1
|
+
const a31_0x4de3a5=a31_0x59aa;(function(_0x3471a5,_0x500af2){const _0x1fd011=a31_0x59aa,_0x328f02=_0x3471a5();while(!![]){try{const _0xbf8f85=parseInt(_0x1fd011(0x10b))/0x1+parseInt(_0x1fd011(0x106))/0x2+parseInt(_0x1fd011(0xc4))/0x3+parseInt(_0x1fd011(0x10e))/0x4*(parseInt(_0x1fd011(0xd7))/0x5)+parseInt(_0x1fd011(0x11a))/0x6+parseInt(_0x1fd011(0x115))/0x7*(parseInt(_0x1fd011(0x104))/0x8)+-parseInt(_0x1fd011(0x114))/0x9;if(_0xbf8f85===_0x500af2)break;else _0x328f02['push'](_0x328f02['shift']());}catch(_0x7a58f3){_0x328f02['push'](_0x328f02['shift']());}}}(a31_0x310d,0x7ad12));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import{executeSchemaQuery}from'../sdk/segment/fields-display.js';import{isYamlFilePath,resolveYamlFilePath}from'../sdk/segment/segment-path-parser.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{openBrowser}from'../utils/process.js';import a31_0x57f4f7 from'chalk';async function resolveSegmentTarget(_0x363db0,_0x5ed378,_0x1bacb0){const _0x520240=a31_0x59aa;if(isYamlFilePath(_0x363db0))try{const _0x471976=await resolveYamlFilePath(_0x363db0);return _0x1bacb0&&(console['error'](_0x520240(0x12d)+_0x363db0),console[_0x520240(0xed)](_0x520240(0x123)+_0x471976['parentSegment']),console[_0x520240(0xed)]('\x20\x20Segment\x20name:\x20'+_0x471976[_0x520240(0xda)]),console[_0x520240(0xed)](_0x520240(0x127)+(_0x471976[_0x520240(0x96)]||_0x520240(0xb7))),console[_0x520240(0xed)]('\x20\x20Full\x20path:\x20'+_0x471976[_0x520240(0x116)])),_0x471976['fullPath'];}catch(_0x8ef592){throw new SDKError(ErrorCode[_0x520240(0xc2)],_0x520240(0xfc)+_0x8ef592['message']);}if(!_0x5ed378)throw new SDKError(ErrorCode[_0x520240(0xc2)],'No\x20parent\x20segment\x20context\x20set.\x20Set\x20context\x20with:\x20tdx\x20sg\x20use\x20\x22Name\x22\x20or\x20tdx\x20sg\x20pull\x20\x22Name\x22');return _0x5ed378+'/'+_0x363db0;}export class SegmentDescribeCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xa7);['description']=a31_0x4de3a5(0x136);async[a31_0x4de3a5(0x113)](_0x56036c){const _0x465f5e=a31_0x4de3a5,{options:_0x53342a,args:_0x1fdea0,tdx:_0x4806dd}=_0x56036c,_0x503e31=_0x1fdea0[0x0],_0x1d0c3a=!_0x503e31&&!!_0x53342a[_0x465f5e(0xe7)],_0x3e4a60=_0x503e31||_0x53342a['parentSegment'];if(!_0x3e4a60)return console['error']('Error:\x20Path\x20or\x20name\x20is\x20required'),console['error'](_0x465f5e(0xd6)),console[_0x465f5e(0xed)](_0x465f5e(0x137)),console[_0x465f5e(0xed)](_0x465f5e(0xc6)),console[_0x465f5e(0xed)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x465f5e(0xed)]('\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0x465f5e(0xed)](_0x465f5e(0xec)),0x1;try{const _0x169ada=_0x53342a['segmentPath'];let _0x5a258e=_0x3e4a60;!_0x1d0c3a&&_0x169ada&&!_0x3e4a60[_0x465f5e(0x124)]('/')&&(_0x5a258e=_0x169ada+'/'+_0x3e4a60,_0x53342a['verbose']&&console[_0x465f5e(0xed)](_0x465f5e(0xff)+_0x5a258e));const _0x3fb1be=await withSpinner(_0x465f5e(0x121)+_0x5a258e+_0x465f5e(0xd1),()=>_0x4806dd[_0x465f5e(0xab)][_0x465f5e(0xdc)](_0x5a258e),{'verbose':_0x53342a[_0x465f5e(0x9f)]}),_0x4b743d=_0x3fb1be['data'];_0x53342a[_0x465f5e(0x9f)]&&(console[_0x465f5e(0xed)](_0x465f5e(0x10c)+_0x4b743d[_0x465f5e(0xdd)]),console['error'](_0x465f5e(0xa1)+_0x4b743d[_0x465f5e(0xcf)]),_0x4b743d['folderId']&&console['error'](_0x465f5e(0x100)+_0x4b743d[_0x465f5e(0xe5)]),_0x4b743d[_0x465f5e(0x12c)]&&console[_0x465f5e(0xed)](_0x465f5e(0xf7)+_0x4b743d[_0x465f5e(0x12c)]));if(_0x4b743d[_0x465f5e(0xdd)]==='parent'){const _0x3b09dd=await withSpinner('Fetching\x20parent\x20segment\x20details...',()=>_0x4806dd['segment'][_0x465f5e(0x10f)](_0x4b743d[_0x465f5e(0xcf)]),{'verbose':_0x53342a[_0x465f5e(0x9f)]});await handleSingleObjectOutput(_0x3b09dd[_0x465f5e(0x134)],_0x53342a);}else{if(_0x4b743d[_0x465f5e(0xdd)]===_0x465f5e(0xac)){if(!_0x4b743d['folderId'])throw new SDKError(ErrorCode[_0x465f5e(0xf5)],_0x465f5e(0xaf));const _0x324cf7=await withSpinner(_0x465f5e(0xf8),()=>_0x4806dd[_0x465f5e(0xab)][_0x465f5e(0xdf)](_0x4b743d['folderId']),{'verbose':_0x53342a[_0x465f5e(0x9f)]});await handleSingleObjectOutput(_0x324cf7[_0x465f5e(0x134)],_0x53342a);}else{if(_0x4b743d[_0x465f5e(0xdd)]===_0x465f5e(0xab)){if(!_0x4b743d[_0x465f5e(0x12c)])throw new SDKError(ErrorCode[_0x465f5e(0xb9)],_0x465f5e(0xf0));const _0x262e6c=await withSpinner(_0x465f5e(0xbf),()=>_0x4806dd[_0x465f5e(0xab)][_0x465f5e(0xbb)](_0x4b743d['parentId'],_0x4b743d[_0x465f5e(0x12c)]),{'verbose':_0x53342a[_0x465f5e(0x9f)]});await handleSingleObjectOutput(_0x262e6c[_0x465f5e(0x134)],_0x53342a);}}}return 0x0;}catch(_0x524ef7){if(_0x524ef7 instanceof SDKError)return console['error'](_0x465f5e(0x9e)+_0x524ef7['message']),_0x524ef7['cause']&&console[_0x465f5e(0xed)](_0x465f5e(0xc0)+_0x524ef7['cause']),0x1;throw _0x524ef7;}}}export class SegmentShowCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]='segment:show';[a31_0x4de3a5(0xd8)]='Execute\x20child\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x4de3a5(0x113)](_0x5658b7){const _0x482b1d=a31_0x4de3a5,{options:_0x5d6b5f,args:_0x5bb871,tdx:_0x3b6f79}=_0x5658b7,_0x2dcbbf=_0x5bb871[0x0];if(!_0x2dcbbf)return console[_0x482b1d(0xed)](_0x482b1d(0x133)),console[_0x482b1d(0xed)](_0x482b1d(0x129)),console['error'](_0x482b1d(0xc5)),console[_0x482b1d(0xed)]('Examples:'),console['error'](_0x482b1d(0x97)),console[_0x482b1d(0xed)](_0x482b1d(0x108)),0x1;try{const _0x29a996=_0x5d6b5f[_0x482b1d(0xe7)],_0x2075aa=await resolveSegmentTarget(_0x2dcbbf,_0x29a996,_0x5d6b5f[_0x482b1d(0x9f)]);_0x5d6b5f['verbose']&&console[_0x482b1d(0xed)](_0x482b1d(0xbc)+_0x2075aa);const _0x237e41=await withSpinner('Resolving\x20\x27'+_0x2dcbbf+'\x27...',()=>_0x3b6f79['segment'][_0x482b1d(0xdc)](_0x2075aa),{'verbose':_0x5d6b5f[_0x482b1d(0x9f)]}),_0x3b6a8f=_0x237e41[_0x482b1d(0x134)];_0x5d6b5f['verbose']&&(console['error'](_0x482b1d(0x10c)+_0x3b6a8f[_0x482b1d(0xdd)]),console[_0x482b1d(0xed)](_0x482b1d(0xa1)+_0x3b6a8f['parentId']));if(_0x3b6a8f[_0x482b1d(0xdd)]===_0x482b1d(0xac))return console[_0x482b1d(0xed)](_0x482b1d(0x117)),console[_0x482b1d(0xed)](_0x482b1d(0x135)),0x1;if(_0x3b6a8f[_0x482b1d(0xdd)]===_0x482b1d(0xb1))return console[_0x482b1d(0xed)]('Error:\x20Cannot\x20execute\x20query\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console['error'](_0x482b1d(0x101)),0x1;if(!_0x3b6a8f['segmentId'])throw new SDKError(ErrorCode[_0x482b1d(0xb9)],_0x482b1d(0xf0));const _0x5eccd4=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3b6f79[_0x482b1d(0xab)][_0x482b1d(0xa4)](_0x3b6a8f[_0x482b1d(0xcf)],_0x3b6a8f[_0x482b1d(0x12c)]),{'verbose':_0x5d6b5f[_0x482b1d(0x9f)]});let _0x5c3328=_0x5eccd4[_0x482b1d(0x134)];const _0x163532=resolveLimit(_0x5d6b5f[_0x482b1d(0xf3)],DEFAULT_DISPLAY_LIMIT),_0x21562c=/\bLIMIT\s+\d+/i['test'](_0x5c3328);!_0x21562c&&(_0x5c3328=_0x5c3328[_0x482b1d(0x109)]()[_0x482b1d(0xb5)](/;+$/,''),_0x5c3328='SELECT\x20*\x20FROM\x20(\x0a'+_0x5c3328+_0x482b1d(0xce)+_0x163532);_0x5d6b5f[_0x482b1d(0x9f)]&&console[_0x482b1d(0xed)]('SQL\x20query:\x0a'+_0x5c3328);const _0x32b1cc=await withProgressSpinner(_0x482b1d(0x11f),async _0x518a99=>{const _0x2d0dbf=_0x482b1d,_0x1b3406=await _0x3b6f79['query'][_0x2d0dbf(0x113)](_0x5c3328,{'catalog':'td','schema':_0x2d0dbf(0xc1),'onJobId':_0x5a3656=>{const _0x5cf447=_0x2d0dbf;_0x518a99[_0x5cf447(0xb2)](_0x5a3656);}});return _0x1b3406;},{'verbose':_0x5d6b5f[_0x482b1d(0x9f)]}),_0x21b7f7=_0x32b1cc[_0x482b1d(0x134)],_0x33c114=_0x21b7f7[_0x482b1d(0xe8)]?'\x20[Job\x20ID:\x20'+_0x21b7f7[_0x482b1d(0xe8)]+']':'';return console[_0x482b1d(0xed)](_0x482b1d(0x9d)+_0x21b7f7[_0x482b1d(0x103)][_0x482b1d(0xe6)][_0x482b1d(0xc8)]()+_0x482b1d(0x130)+(_0x482b1d(0xcc)+formatElapsed(_0x21b7f7[_0x482b1d(0x103)][_0x482b1d(0xcd)])+_0x33c114)),await handleQueryOutput(_0x21b7f7,_0x5d6b5f),0x0;}catch(_0x1b163d){if(_0x1b163d instanceof SDKError)return console['error'](_0x482b1d(0xbe)+_0x1b163d['code']+']'),console[_0x482b1d(0xed)]('\x0a'+_0x1b163d[_0x482b1d(0x10a)]),0x1;throw _0x1b163d;}}}export class SegmentFolderListCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]='segment:folder:list';['description']=a31_0x4de3a5(0xa0);async[a31_0x4de3a5(0x113)](_0x595682){const _0x50f67e=a31_0x4de3a5,{options:_0x47f233,args:_0x3e3dfa,tdx:_0x1df508}=_0x595682;if(_0x3e3dfa[_0x50f67e(0xc7)]===0x0)return console[_0x50f67e(0xed)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console['error'](_0x50f67e(0xf6)),0x1;const _0x1f8c31=_0x3e3dfa[0x0];try{_0x47f233[_0x50f67e(0x9f)]&&(console['error']('Site:\x20'+_0x47f233[_0x50f67e(0x99)]),console[_0x50f67e(0xed)](_0x50f67e(0xaa)+_0x1f8c31));const _0x4cd098=await withSpinner(_0x50f67e(0xe9)+_0x1f8c31+_0x50f67e(0xd1),()=>_0x1df508[_0x50f67e(0xab)][_0x50f67e(0x9a)](_0x1f8c31),{'verbose':_0x47f233[_0x50f67e(0x9f)]}),_0x155489=_0x4cd098[_0x50f67e(0x134)];_0x47f233[_0x50f67e(0x9f)]&&console[_0x50f67e(0xed)]('Resolved\x20parent\x20ID:\x20'+_0x155489);const _0x329235=await withSpinner(_0x50f67e(0xb4)+_0x1f8c31+'\x27...',()=>_0x1df508[_0x50f67e(0xab)][_0x50f67e(0x105)](_0x155489),{'verbose':_0x47f233[_0x50f67e(0x9f)]}),_0x299085=_0x329235['data'];return console['error'](_0x50f67e(0xcb)+_0x299085['length']+'\x20folder'+(_0x299085[_0x50f67e(0xc7)]!==0x1?'s':'')),await handleSDKOutput(_0x299085,_0x47f233),0x0;}catch(_0x1c0c9e){if(_0x1c0c9e instanceof SDKError)return console['error']('Error:\x20'+_0x1c0c9e['message']),_0x1c0c9e[_0x50f67e(0x120)]&&console['error'](_0x50f67e(0xc0)+_0x1c0c9e[_0x50f67e(0x120)]),0x1;throw _0x1c0c9e;}}}export class SegmentFolderShowCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xae);['description']='Show\x20segment\x20folder\x20details';async[a31_0x4de3a5(0x113)](_0x421f2b){const _0x574c54=a31_0x4de3a5,{options:_0x647561,args:_0x460741,tdx:_0x43e236}=_0x421f2b;if(_0x460741[_0x574c54(0xc7)]===0x0)return console[_0x574c54(0xed)](_0x574c54(0xef)),console[_0x574c54(0xed)](_0x574c54(0xbd)),0x1;try{const {parentId:_0x348202,childId:_0x1e4870}=parseSegmentRef(_0x460741[0x0]);_0x647561[_0x574c54(0x9f)]&&(console[_0x574c54(0xed)]('Site:\x20'+_0x647561[_0x574c54(0x99)]),console[_0x574c54(0xed)]('Parent\x20name:\x20'+_0x348202),_0x1e4870&&console[_0x574c54(0xed)](_0x574c54(0x12b)+_0x1e4870));if(!_0x1e4870)return console[_0x574c54(0xed)](_0x574c54(0x12e)),0x1;const _0x48d93b=await withSpinner(_0x574c54(0xe9)+_0x348202+_0x574c54(0xd1),()=>_0x43e236[_0x574c54(0xab)][_0x574c54(0x9a)](_0x348202),{'verbose':_0x647561['verbose']}),_0x3f7c4=_0x48d93b[_0x574c54(0x134)];_0x647561[_0x574c54(0x9f)]&&console['error'](_0x574c54(0xd4)+_0x3f7c4);const _0x21c043=await withSpinner(_0x574c54(0x126)+_0x1e4870+_0x574c54(0xd1),()=>_0x43e236[_0x574c54(0xab)][_0x574c54(0x132)](_0x3f7c4,_0x1e4870),{'verbose':_0x647561[_0x574c54(0x9f)]}),_0x380882=_0x21c043[_0x574c54(0x134)];_0x647561[_0x574c54(0x9f)]&&console[_0x574c54(0xed)](_0x574c54(0xfa)+_0x380882);const _0x466ee6=await withSpinner(_0x574c54(0xad)+_0x1e4870+_0x574c54(0xd1),()=>_0x43e236[_0x574c54(0xab)][_0x574c54(0xdf)](_0x380882),{'verbose':_0x647561[_0x574c54(0x9f)]});return await handleSDKOutput([_0x466ee6[_0x574c54(0x134)]],_0x647561),0x0;}catch(_0xdf53d1){if(_0xdf53d1 instanceof SDKError)return console['error'](_0x574c54(0x9e)+_0xdf53d1['message']),_0xdf53d1[_0x574c54(0x120)]&&console[_0x574c54(0xed)]('\x20\x20Cause:\x20'+_0xdf53d1[_0x574c54(0x120)]),0x1;throw _0xdf53d1;}}}export class SegmentSQLCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xc3);[a31_0x4de3a5(0xd8)]='Get\x20SQL\x20query\x20for\x20child\x20segment';async[a31_0x4de3a5(0x113)](_0x3babfb){const _0x378a95=a31_0x4de3a5,{options:_0x3e2282,args:_0x282389}=_0x3babfb,_0x4f59df=_0x3e2282,_0x486ea9=_0x4f59df['path'],_0xcdba73=_0x282389[0x0];if(!_0xcdba73&&!_0x486ea9)return console['error'](a31_0x57f4f7[_0x378a95(0x128)](_0x378a95(0xb6))),console['error'](_0x378a95(0xe4)),console[_0x378a95(0xed)]('\x20\x20Server-side\x20segment:\x20\x20tdx\x20sg\x20sql\x20<name>'),console[_0x378a95(0xed)](_0x378a95(0x12f)),console['error']('Examples:'),console['error']('\x20\x20tdx\x20sg\x20sql\x20\x22Premium\x20Users\x22'),console[_0x378a95(0xed)]('\x20\x20tdx\x20sg\x20sql\x20--path\x20segments/my-audience/premium-users.yml'),0x1;if(_0xcdba73&&_0x486ea9)return console[_0x378a95(0xed)](a31_0x57f4f7['red'](_0x378a95(0x112))),0x1;try{let _0x3d6df4;if(_0x486ea9)_0x3d6df4=await this[_0x378a95(0xeb)](_0x486ea9,_0x3babfb);else{if(isYamlFilePath(_0xcdba73))return console[_0x378a95(0xed)](a31_0x57f4f7['red'](_0x378a95(0xa9))),console[_0x378a95(0xed)](_0x378a95(0xb8)+_0xcdba73),0x1;else _0x3d6df4=await this['getSQLFromServerSegment'](_0xcdba73,_0x3babfb);}return _0x3e2282[_0x378a95(0xd0)]===_0x378a95(0xfe)||_0x3e2282['format']===_0x378a95(0xa3)?await handleSDKOutput([{'sql':_0x3d6df4}],_0x3e2282):console[_0x378a95(0xa2)](_0x3d6df4),0x0;}catch(_0x44dde3){if(_0x44dde3 instanceof SDKError)return console[_0x378a95(0xed)](_0x378a95(0x9e)+_0x44dde3[_0x378a95(0x10a)]),_0x44dde3[_0x378a95(0x120)]&&console[_0x378a95(0xed)]('\x20\x20Cause:\x20'+_0x44dde3[_0x378a95(0x120)]),0x1;throw _0x44dde3;}}async[a31_0x4de3a5(0xeb)](_0x3931a7,_0x471017){const _0x27fc9f=a31_0x4de3a5,{options:_0x5285f2,tdx:_0x3a88c3}=_0x471017;let _0x53fc9d;try{_0x53fc9d=await resolveYamlFilePath(_0x3931a7);}catch(_0x1d015f){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x27fc9f(0xfc)+_0x1d015f[_0x27fc9f(0x10a)]);}_0x5285f2[_0x27fc9f(0x9f)]&&console[_0x27fc9f(0xed)]('Resolved:\x20'+_0x53fc9d[_0x27fc9f(0xe7)]+'/'+_0x53fc9d[_0x27fc9f(0xda)]);const _0x5e5cd3=await withSpinner(_0x27fc9f(0x10d),()=>_0x3a88c3[_0x27fc9f(0xab)][_0x27fc9f(0x11e)](_0x53fc9d[_0x27fc9f(0x11c)],_0x53fc9d[_0x27fc9f(0xe7)],_0x53fc9d[_0x27fc9f(0xda)]),{'verbose':_0x5285f2[_0x27fc9f(0x9f)]});return _0x5e5cd3[_0x27fc9f(0x134)];}async[a31_0x4de3a5(0xb3)](_0x5886d0,_0x81d3c6){const _0xb7d419=a31_0x4de3a5,{options:_0x54342d,tdx:_0x3c5f8e}=_0x81d3c6,_0x55f21e=_0x54342d[_0xb7d419(0xe7)],_0x5ca097=await resolveSegmentTarget(_0x5886d0,_0x55f21e,_0x54342d[_0xb7d419(0x9f)]);_0x54342d[_0xb7d419(0x9f)]&&console[_0xb7d419(0xed)]('Target\x20path:\x20'+_0x5ca097);const _0x5a9500=await withSpinner(_0xb7d419(0x110)+_0x5886d0+_0xb7d419(0xd1),()=>_0x3c5f8e[_0xb7d419(0xab)][_0xb7d419(0xdc)](_0x5ca097),{'verbose':_0x54342d[_0xb7d419(0x9f)]}),_0x1db543=_0x5a9500[_0xb7d419(0x134)];_0x54342d[_0xb7d419(0x9f)]&&(console[_0xb7d419(0xed)](_0xb7d419(0x10c)+_0x1db543[_0xb7d419(0xdd)]),console[_0xb7d419(0xed)](_0xb7d419(0xa1)+_0x1db543['parentId']));if(_0x1db543['type']===_0xb7d419(0xac))throw new SDKError(ErrorCode[_0xb7d419(0xc2)],'Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.\x20Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.');if(_0x1db543[_0xb7d419(0xdd)]==='parent')throw new SDKError(ErrorCode[_0xb7d419(0xc2)],_0xb7d419(0xfd));if(!_0x1db543[_0xb7d419(0x12c)])throw new SDKError(ErrorCode[_0xb7d419(0xb9)],_0xb7d419(0xf0));const _0x2dcc5b=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3c5f8e['segment'][_0xb7d419(0xa4)](_0x1db543['parentId'],_0x1db543[_0xb7d419(0x12c)]),{'verbose':_0x54342d[_0xb7d419(0x9f)]});return _0x2dcc5b[_0xb7d419(0x134)];}}export class SegmentFolderCreateCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xe1);[a31_0x4de3a5(0xd8)]=a31_0x4de3a5(0x118);async[a31_0x4de3a5(0x113)](_0x196777){const _0x33e71a=a31_0x4de3a5,{options:_0x448cbd,args:_0xa3f3d7,tdx:_0x3889d3}=_0x196777,_0xf44c4e=_0x448cbd;if(_0xa3f3d7[_0x33e71a(0xc7)]<0x2)return console[_0x33e71a(0xed)](_0x33e71a(0xe2)),console[_0x33e71a(0xed)](_0x33e71a(0xde)),0x1;const _0x57916a=_0xa3f3d7[0x0],_0x3abc9f=_0xa3f3d7[0x1];_0xf44c4e[_0x33e71a(0x9f)]&&(console[_0x33e71a(0xed)](_0x33e71a(0xc9)+_0xf44c4e[_0x33e71a(0x99)]),console[_0x33e71a(0xed)](_0x33e71a(0xd3)+_0x57916a),console['error'](_0x33e71a(0x12b)+_0x3abc9f));let _0x224aad;if(_0xf44c4e['parentFolder']){const _0x4cb490=_0xf44c4e['parentFolder'],_0x27999a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x57916a+_0x33e71a(0xd1),()=>_0x3889d3[_0x33e71a(0xab)][_0x33e71a(0x9a)](_0x57916a),{'verbose':_0xf44c4e[_0x33e71a(0x9f)]}),_0x1ad0f5=_0x27999a[_0x33e71a(0x134)],_0x30e482=await withSpinner('Resolving\x20parent\x20folder\x20\x27'+_0x4cb490+'\x27...',()=>_0x3889d3[_0x33e71a(0xab)]['resolveFolderId'](_0x1ad0f5,_0x4cb490),{'verbose':_0xf44c4e[_0x33e71a(0x9f)]});_0x224aad=_0x30e482[_0x33e71a(0x134)],_0xf44c4e[_0x33e71a(0x9f)]&&console[_0x33e71a(0xed)](_0x33e71a(0xf4)+_0x224aad);}const _0x335bd9={'name':_0x3abc9f,'description':_0xf44c4e[_0x33e71a(0xd8)],'parentFolderId':_0x224aad},_0x46d1c0=await withSpinner('Creating\x20folder\x20\x27'+_0x3abc9f+_0x33e71a(0xd1),()=>_0x3889d3[_0x33e71a(0xab)][_0x33e71a(0xf2)](_0x57916a,_0x335bd9),{'verbose':_0xf44c4e[_0x33e71a(0x9f)]}),_0xe4a0a8=_0x46d1c0[_0x33e71a(0x134)];return console[_0x33e71a(0xed)]('✔\x20Created\x20folder\x20\x27'+_0xe4a0a8[_0x33e71a(0xa8)]+_0x33e71a(0xb0)+_0xe4a0a8['id']),await handleSDKOutput([_0xe4a0a8],_0xf44c4e),0x0;}}export class SegmentViewCommand extends BaseCommand{[a31_0x4de3a5(0xa8)]=a31_0x4de3a5(0xba);[a31_0x4de3a5(0xd8)]='Show\x20folder\x20or\x20child\x20segment\x20details';async[a31_0x4de3a5(0x113)](_0x41ef75){const _0x3ed80e=a31_0x4de3a5,{options:_0x3c8c3d,args:_0x44a3c3,tdx:_0x266562}=_0x41ef75,_0x285f00=_0x44a3c3[0x0];if(!_0x285f00)return console[_0x3ed80e(0xed)](_0x3ed80e(0x12a)),console['error'](_0x3ed80e(0x102)),console[_0x3ed80e(0xed)](_0x3ed80e(0xa6)),console[_0x3ed80e(0xed)](_0x3ed80e(0x9c)),console[_0x3ed80e(0xed)](_0x3ed80e(0x11d)),console['error'](_0x3ed80e(0x137)),console[_0x3ed80e(0xed)](_0x3ed80e(0x107)),console[_0x3ed80e(0xed)](_0x3ed80e(0xca)),console['error']('\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20-w\x20\x20#\x20Open\x20segment\x20in\x20web\x20browser'),console[_0x3ed80e(0xed)]('\x20\x20tdx\x20sg\x20view\x20segments/my-audience/premium-users.yml'),0x1;try{const _0x15edb1=_0x3c8c3d['parentSegment'],_0x4f2d22=await resolveSegmentTarget(_0x285f00,_0x15edb1,_0x3c8c3d['verbose']);_0x3c8c3d['verbose']&&console[_0x3ed80e(0xed)](_0x3ed80e(0xbc)+_0x4f2d22);const _0x477d83=await withSpinner('Resolving\x20\x27'+_0x285f00+'\x27...',()=>_0x266562[_0x3ed80e(0xab)][_0x3ed80e(0xdc)](_0x4f2d22),{'verbose':_0x3c8c3d[_0x3ed80e(0x9f)]}),_0x2b9200=_0x477d83['data'];_0x3c8c3d['verbose']&&(console[_0x3ed80e(0xed)](_0x3ed80e(0x10c)+_0x2b9200[_0x3ed80e(0xdd)]),console[_0x3ed80e(0xed)](_0x3ed80e(0xa1)+_0x2b9200[_0x3ed80e(0xcf)]),_0x2b9200[_0x3ed80e(0xe5)]&&console[_0x3ed80e(0xed)](_0x3ed80e(0x100)+_0x2b9200['folderId']),_0x2b9200[_0x3ed80e(0x12c)]&&console[_0x3ed80e(0xed)](_0x3ed80e(0xf7)+_0x2b9200[_0x3ed80e(0x12c)]));if(_0x3c8c3d[_0x3ed80e(0xfb)]){if(_0x2b9200[_0x3ed80e(0xdd)]==='folder')return console[_0x3ed80e(0xed)](_0x3ed80e(0xea)),0x1;if(_0x2b9200[_0x3ed80e(0xdd)]===_0x3ed80e(0xb1))return console[_0x3ed80e(0xed)](_0x3ed80e(0x122)),console[_0x3ed80e(0xed)](_0x3ed80e(0x11b)),0x1;if(!_0x2b9200[_0x3ed80e(0x12c)])throw new SDKError(ErrorCode[_0x3ed80e(0xb9)],_0x3ed80e(0xf0));const _0xf66602=getConsoleNextUrl(_0x3c8c3d[_0x3ed80e(0x99)],_0x3ed80e(0xd5)+_0x2b9200['parentId']+_0x3ed80e(0x131)+_0x2b9200[_0x3ed80e(0x12c)]);return console['error'](a31_0x57f4f7[_0x3ed80e(0xd9)]('✔')+_0x3ed80e(0xf9)+a31_0x57f4f7[_0x3ed80e(0x9b)](_0xf66602)),openBrowser(_0xf66602),0x0;}if(_0x2b9200[_0x3ed80e(0xdd)]==='folder'){if(!_0x2b9200[_0x3ed80e(0xe5)])throw new SDKError(ErrorCode['SEGMENT_FOLDER_NOT_FOUND'],_0x3ed80e(0xaf));const _0x2e6e32=await withSpinner(_0x3ed80e(0xf8),()=>_0x266562[_0x3ed80e(0xab)][_0x3ed80e(0xdf)](_0x2b9200[_0x3ed80e(0xe5)]),{'verbose':_0x3c8c3d[_0x3ed80e(0x9f)]});await handleSingleObjectOutput(_0x2e6e32['data'],_0x3c8c3d);}else{if(_0x2b9200[_0x3ed80e(0xdd)]===_0x3ed80e(0xab)){if(!_0x2b9200[_0x3ed80e(0x12c)])throw new SDKError(ErrorCode[_0x3ed80e(0xb9)],_0x3ed80e(0xf0));const _0x539661=await withSpinner(_0x3ed80e(0xbf),()=>_0x266562['segment'][_0x3ed80e(0xbb)](_0x2b9200['parentId'],_0x2b9200[_0x3ed80e(0x12c)]),{'verbose':_0x3c8c3d[_0x3ed80e(0x9f)]}),_0x380500=getConsoleNextUrl(_0x3c8c3d[_0x3ed80e(0x99)],_0x3ed80e(0xd5)+_0x2b9200[_0x3ed80e(0xcf)]+_0x3ed80e(0x131)+_0x2b9200[_0x3ed80e(0x12c)]),_0x555b4d=_0x539661[_0x3ed80e(0x134)];_0x555b4d[_0x3ed80e(0x119)]=_0x380500,await handleSingleObjectOutput(_0x555b4d,_0x3c8c3d);}else return console[_0x3ed80e(0xed)](_0x3ed80e(0xe3)),console[_0x3ed80e(0xed)](_0x3ed80e(0xd2)),0x1;}return 0x0;}catch(_0xd61f26){if(_0xd61f26 instanceof SDKError)return console[_0x3ed80e(0xed)]('Error:\x20'+_0xd61f26[_0x3ed80e(0x10a)]),_0xd61f26[_0x3ed80e(0x120)]&&console[_0x3ed80e(0xed)](_0x3ed80e(0xc0)+_0xd61f26[_0x3ed80e(0x120)]),0x1;throw _0xd61f26;}}}function a31_0x59aa(_0x3e0e51,_0x250a6a){_0x3e0e51=_0x3e0e51-0x96;const _0x310d91=a31_0x310d();let _0x59aad7=_0x310d91[_0x3e0e51];return _0x59aad7;}function a31_0x310d(){const _0x27900f=['folderId','processedRows','parentSegment','jobId','Resolving\x20parent\x20segment\x20\x27','Error:\x20Cannot\x20open\x20folder\x20in\x20web\x20browser.\x20Use\x20a\x20segment\x20name\x20instead.','getSQLFromYamlFile','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','error','\x20\x20tdx\x20sg\x20desc\x20segments/my-audience/premium-users.yml','Error:\x20Folder\x20reference\x20is\x20required','Segment\x20ID\x20missing\x20from\x20resolved\x20path','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20desc\x20<path/to/segment.yml>','createFolder','limit','Resolved\x20parent\x20folder\x20ID:\x20','SEGMENT_FOLDER_NOT_FOUND','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Segment\x20ID:\x20','Fetching\x20folder\x20details...','\x20Opening\x20','Resolved\x20folder\x20ID:\x20','web','Failed\x20to\x20resolve\x20YAML\x20file\x20path:\x20','Cannot\x20get\x20SQL\x20for\x20parent\x20segment\x20with\x20this\x20command.\x20Use:\x20tdx\x20ps\x20sql','json','Resolved\x20relative\x20path\x20to:\x20','Folder\x20ID:\x20','Use:\x20tdx\x20ps\x20show','Usage:\x20tdx\x20sg\x20view\x20<name>\x20[-w]','stats','245280QqRVAW','listFolders','790152VQZTrM','\x20\x20tdx\x20sg\x20view\x20\x22Marketing\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20folder\x20details','\x20\x20tdx\x20sg\x20show\x20segments/my-audience/premium-users.yml','trim','message','140374wMDeZQ','Resolved\x20type:\x20','Fetching\x20SQL\x20from\x20rule...','20XTjJBQ','getParent','Resolving\x20\x27','Fetching\x20SQL\x20for\x20segment...','Error:\x20Specify\x20either\x20segment\x20name\x20or\x20--path,\x20not\x20both','execute','23826087xxjUts','112ZqgVHy','fullPath','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','Create\x20segment\x20folder\x20for\x20organization','url','3237612etqGPI','Use:\x20tdx\x20ps\x20view\x20-w','content','\x20\x20-w,\x20--web\x20\x20Open\x20segment\x20in\x20web\x20browser','getSegmentSQLFromYaml','Executing\x20segment\x20query...','cause','Resolving\x20path\x20\x27','Error:\x20Cannot\x20open\x20parent\x20segment\x20with\x20this\x20command.','\x20\x20Parent\x20segment:\x20','includes','Show\x20child\x20segment\x20schema\x20(column\x20types)','Resolving\x20folder\x20\x27','\x20\x20Folder\x20path:\x20','red','Usage:\x20tdx\x20sg\x20show\x20<name>','Error:\x20Folder\x20or\x20segment\x20name,\x20or\x20YAML\x20file\x20path\x20is\x20required','Folder\x20name:\x20','segmentId','Resolved\x20YAML\x20file:\x20','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','\x20\x20Local\x20YAML\x20file:\x20\x20\x20\x20\x20\x20tdx\x20sg\x20sql\x20--path\x20<file-path>','\x20rows\x20','/e/','resolveFolderId','Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required','data','Use:\x20tdx\x20sg\x20view\x20<name>\x20\x20#\x20To\x20show\x20folder\x20details','Show\x20segment\x20or\x20folder\x20details','Examples:','folderPath','\x20\x20tdx\x20sg\x20show\x20\x22Premium\x20Users\x22','Usage:\x20tdx\x20sg\x20desc\x20<name>','site','resolveParentId','cyan','Options:','✔\x20Query\x20completed:\x20Processed\x20','Error:\x20','verbose','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Parent\x20ID:\x20','log','jsonl','getSegmentSQL','segment:desc','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20view\x20<path/to/segment.yml>','segment:describe','name','Error:\x20YAML\x20file\x20paths\x20must\x20be\x20specified\x20with\x20--path\x20option','Parent\x20name:\x20','segment','folder','Fetching\x20folder\x20\x27','segment:folder:show','Folder\x20ID\x20missing\x20from\x20resolved\x20path','\x27\x20with\x20ID:\x20','parent','setJobId','getSQLFromServerSegment','Listing\x20folders\x20for\x20parent\x20\x27','replace','Error:\x20Segment\x20name\x20or\x20--path\x20is\x20required','(root)','\x20\x20tdx\x20sg\x20sql\x20--path\x20','SEGMENT_NOT_FOUND','segment:view','getSegment','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','✖\x20Query\x20failed\x20[','Fetching\x20segment\x20details...','\x20\x20Cause:\x20','information_schema','INVALID_ARGUMENT','segment:sql','2468712rHAODq','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20show\x20<path/to/segment.yml>','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','length','toLocaleString','Site:\x20','\x20\x20tdx\x20sg\x20view\x20\x22Premium\x20Users\x22\x20\x20\x20\x20\x20#\x20View\x20child\x20segment\x20details','✔\x20Found\x20','in\x20','elapsedTimeMillis','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','parentId','format','\x27...','Use:\x20tdx\x20ps\x20view','Parent\x20segment:\x20','Resolved\x20parent\x20ID:\x20','/app/ps/','Usage:\x20tdx\x20segment\x20describe\x20<path>','761885JftJeU','description','green','segmentName','\x20\x20tdx\x20sg\x20desc\x20\x22Premium\x20Users\x22','resolvePathToResource','type','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','getFolder','Error:\x20Cannot\x20show\x20schema\x20for\x20a\x20folder.','segment:folder:create','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Error:\x20Cannot\x20view\x20parent\x20segment\x20details\x20with\x20this\x20command.','Usage:'];a31_0x310d=function(){return _0x27900f;};return a31_0x310d();}export const SegmentInfoCommand=SegmentViewCommand;export class SegmentDescCommand extends BaseCommand{['name']=a31_0x4de3a5(0xa5);[a31_0x4de3a5(0xd8)]=a31_0x4de3a5(0x125);async[a31_0x4de3a5(0x113)](_0x4cf968){const _0x3fc4a1=a31_0x4de3a5,{options:_0x33924a,args:_0x53c248,tdx:_0x3ca3ee}=_0x4cf968,_0x283a37=_0x53c248[0x0];if(!_0x283a37)return console[_0x3fc4a1(0xed)]('Error:\x20Child\x20segment\x20name\x20or\x20YAML\x20file\x20path\x20is\x20required'),console[_0x3fc4a1(0xed)](_0x3fc4a1(0x98)),console[_0x3fc4a1(0xed)](_0x3fc4a1(0xf1)),console['error']('Examples:'),console[_0x3fc4a1(0xed)](_0x3fc4a1(0xdb)),console[_0x3fc4a1(0xed)](_0x3fc4a1(0xee)),0x1;try{const _0x15f406=_0x33924a[_0x3fc4a1(0xe7)],_0x3aa3f8=await resolveSegmentTarget(_0x283a37,_0x15f406,_0x33924a[_0x3fc4a1(0x9f)]);_0x33924a['verbose']&&console['error'](_0x3fc4a1(0xbc)+_0x3aa3f8);const _0x2a7063=await withSpinner(_0x3fc4a1(0x110)+_0x283a37+_0x3fc4a1(0xd1),()=>_0x3ca3ee[_0x3fc4a1(0xab)][_0x3fc4a1(0xdc)](_0x3aa3f8),{'verbose':_0x33924a[_0x3fc4a1(0x9f)]}),_0x485fad=_0x2a7063['data'];_0x33924a[_0x3fc4a1(0x9f)]&&(console[_0x3fc4a1(0xed)]('Resolved\x20type:\x20'+_0x485fad['type']),console[_0x3fc4a1(0xed)]('Parent\x20ID:\x20'+_0x485fad[_0x3fc4a1(0xcf)]));if(_0x485fad[_0x3fc4a1(0xdd)]===_0x3fc4a1(0xac))return console[_0x3fc4a1(0xed)](_0x3fc4a1(0xe0)),console[_0x3fc4a1(0xed)]('Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.'),0x1;if(_0x485fad[_0x3fc4a1(0xdd)]===_0x3fc4a1(0xb1))return console[_0x3fc4a1(0xed)]('Error:\x20Cannot\x20show\x20schema\x20for\x20parent\x20segment\x20with\x20this\x20command.'),console[_0x3fc4a1(0xed)]('Use:\x20tdx\x20ps\x20desc'),0x1;if(!_0x485fad[_0x3fc4a1(0x12c)])throw new SDKError(ErrorCode[_0x3fc4a1(0xb9)],_0x3fc4a1(0xf0));const _0x3f403e=await withSpinner(_0x3fc4a1(0x111),()=>_0x3ca3ee[_0x3fc4a1(0xab)][_0x3fc4a1(0xa4)](_0x485fad[_0x3fc4a1(0xcf)],_0x485fad[_0x3fc4a1(0x12c)]),{'verbose':_0x33924a[_0x3fc4a1(0x9f)]}),_0x58151d=_0x3f403e[_0x3fc4a1(0x134)],_0x153532=await executeSchemaQuery(_0x58151d,_0x3ca3ee,_0x33924a);return await handleQueryOutput(_0x153532,_0x33924a),0x0;}catch(_0x17bb8f){if(_0x17bb8f instanceof SDKError)return console[_0x3fc4a1(0xed)](_0x3fc4a1(0x9e)+_0x17bb8f[_0x3fc4a1(0x10a)]),_0x17bb8f['cause']&&console[_0x3fc4a1(0xed)](_0x3fc4a1(0xc0)+_0x17bb8f[_0x3fc4a1(0x120)]),0x1;throw _0x17bb8f;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x48d71c=a32_0x281b;(function(_0x2776b1,_0x569a33){const _0xc57f09=a32_0x281b,_0x2ce748=_0x2776b1();while(!![]){try{const _0x27381a=parseInt(_0xc57f09(0xdc))/0x1+-parseInt(_0xc57f09(0xf6))/0x2*(-parseInt(_0xc57f09(0xfb))/0x3)+parseInt(_0xc57f09(0xe2))/0x4*(-parseInt(_0xc57f09(0xe3))/0x5)+parseInt(_0xc57f09(0xf7))/0x6+-parseInt(_0xc57f09(0xe8))/0x7+parseInt(_0xc57f09(0xfd))/0x8+-parseInt(_0xc57f09(0xcf))/0x9;if(_0x27381a===_0x569a33)break;else _0x2ce748['push'](_0x2ce748['shift']());}catch(_0x18639d){_0x2ce748['push'](_0x2ce748['shift']());}}}(a32_0x4a8b,0x40bba));function a32_0x281b(_0xc53d06,_0x5a5893){_0xc53d06=_0xc53d06-0xcd;const _0x4a8b51=a32_0x4a8b();let _0x281ba1=_0x4a8b51[_0xc53d06];return _0x281ba1;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a32_0x4a8b(){const _0x48fbeb=['Resolved\x20relative\x20path\x20to:\x20','450422cDVVgs','Site:\x20','segment','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Target\x20path:\x20','execute','636zvSVoI','4815rVBPUy','folder','Resolving\x20parent\x20segment\x20\x27','description','Creating\x20segment\x20\x27','784623aRQLdF','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','kind','type','segments','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','resolvePathToResource','Create\x20child\x20segment\x20with\x20filtering\x20rules','Parent:\x20','createSegment','error','\x27...','resolveParentId','167572eRZWcS','2808900mpadEA','invisible','data','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','3OfkEXD','verbose','3288488QpZOkK','Resolved\x20folder\x20ID:\x20','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','includes','\x20\x20\x20Path:\x20','7947603rmMXBX','site','length','segmentPath','parent','folderId','segment:create','noCountPopulation','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','name','\x27\x20with\x20ID:\x20','yellow'];a32_0x4a8b=function(){return _0x48fbeb;};return a32_0x4a8b();}import{parsePath,getParentPath,getBaseName}from'../sdk/segment/segment-path-parser.js';import a32_0x20eeef from'chalk';export class SegmentCreateCommand extends BaseCommand{[a32_0x48d71c(0xd8)]=a32_0x48d71c(0xd5);[a32_0x48d71c(0xe6)]=a32_0x48d71c(0xf0);async[a32_0x48d71c(0xe1)](_0x32928a){const _0x101b7d=a32_0x48d71c;console['error'](a32_0x20eeef['yellow']('⚠\x20Deprecation\x20warning:\x20`segment\x20create`\x20is\x20deprecated.')),console['error'](a32_0x20eeef[_0x101b7d(0xda)](_0x101b7d(0xe9)));const {options:_0x567df6,args:_0x2bae29,tdx:_0x432f55}=_0x32928a,_0x24c9e2=_0x567df6;if(_0x2bae29[_0x101b7d(0xd1)]===0x0)return console['error'](_0x101b7d(0xdf)),console[_0x101b7d(0xf3)]('Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]'),console[_0x101b7d(0xf3)]('Examples:'),console[_0x101b7d(0xf3)](_0x101b7d(0xfa)),console['error'](_0x101b7d(0xd7)),console[_0x101b7d(0xf3)](_0x101b7d(0xed)),0x1;const _0x3b760b=_0x2bae29[0x0],_0x4d23f2=_0x567df6[_0x101b7d(0xd2)];let _0x32d0ec=_0x3b760b;_0x4d23f2&&!_0x3b760b[_0x101b7d(0xcd)]('/')&&(_0x32d0ec=_0x4d23f2+'/'+_0x3b760b,_0x24c9e2[_0x101b7d(0xfc)]&&console[_0x101b7d(0xf3)](_0x101b7d(0xdb)+_0x32d0ec));const _0x22b426=parsePath(_0x32d0ec);if(_0x22b426[_0x101b7d(0xec)]['length']<0x2)return console['error']('Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)'),console[_0x101b7d(0xf3)](_0x101b7d(0xee)),0x1;const _0x5d1043=_0x22b426[_0x101b7d(0xec)][0x0],_0x4881c9=getBaseName(_0x32d0ec),_0x51a422=getParentPath(_0x32d0ec);_0x24c9e2[_0x101b7d(0xfc)]&&(console['error'](_0x101b7d(0xdd)+_0x24c9e2[_0x101b7d(0xd0)]),console[_0x101b7d(0xf3)](_0x101b7d(0xe0)+_0x32d0ec),console[_0x101b7d(0xf3)](_0x101b7d(0xf1)+_0x5d1043),console['error']('Segment\x20name:\x20'+_0x4881c9),console[_0x101b7d(0xf3)]('Parent\x20path:\x20'+_0x51a422));const _0x1c1e53=await withSpinner(_0x101b7d(0xe5)+_0x5d1043+'\x27...',()=>_0x432f55[_0x101b7d(0xde)][_0x101b7d(0xf5)](_0x5d1043),{'verbose':_0x24c9e2[_0x101b7d(0xfc)]}),_0x1a9419=_0x1c1e53[_0x101b7d(0xf9)];let _0x222ca9;if(_0x22b426['segments'][_0x101b7d(0xd1)]>0x2){const _0x90c9d1=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x51a422+_0x101b7d(0xf4),()=>_0x432f55[_0x101b7d(0xde)][_0x101b7d(0xef)](_0x51a422),{'verbose':_0x24c9e2[_0x101b7d(0xfc)]}),_0x340ec1=_0x90c9d1[_0x101b7d(0xf9)];if(_0x340ec1[_0x101b7d(0xeb)]!=='folder'&&_0x340ec1['type']!==_0x101b7d(0xd3))return console[_0x101b7d(0xf3)](_0x101b7d(0xff)),0x1;_0x222ca9=_0x340ec1[_0x101b7d(0xd4)];}else{if(_0x24c9e2['folder']){const _0x5551a6=await withSpinner('Resolving\x20folder\x20\x27'+_0x24c9e2['folder']+_0x101b7d(0xf4),()=>_0x432f55[_0x101b7d(0xde)]['resolveFolderId'](_0x1a9419,_0x24c9e2[_0x101b7d(0xe4)]),{'verbose':_0x24c9e2[_0x101b7d(0xfc)]});_0x222ca9=_0x5551a6[_0x101b7d(0xf9)];}}_0x24c9e2[_0x101b7d(0xfc)]&&_0x222ca9&&console[_0x101b7d(0xf3)](_0x101b7d(0xfe)+_0x222ca9);const _0x12db09=await loadJSONFromOptions(_0x24c9e2['rule'],_0x24c9e2['ruleFile']),_0x36c95a={'name':_0x4881c9,'description':_0x24c9e2[_0x101b7d(0xe6)],'rule':_0x12db09,'kind':_0x24c9e2[_0x101b7d(0xea)]!==undefined?parseInt(_0x24c9e2['kind'],0xa):undefined,'isVisible':_0x24c9e2[_0x101b7d(0xf8)]?![]:undefined,'segmentFolderId':_0x222ca9,'countPopulation':_0x24c9e2[_0x101b7d(0xd6)]?![]:undefined},_0x3ed9d6=await withSpinner(_0x101b7d(0xe7)+_0x4881c9+_0x101b7d(0xf4),()=>_0x432f55['segment'][_0x101b7d(0xf2)](_0x1a9419,_0x36c95a),{'verbose':_0x24c9e2[_0x101b7d(0xfc)]}),_0x3ee334=_0x3ed9d6[_0x101b7d(0xf9)];return console['error']('✔\x20Created\x20segment\x20\x27'+_0x3ee334[_0x101b7d(0xd8)]+_0x101b7d(0xd9)+_0x3ee334['id']),_0x32d0ec!==_0x3b760b&&console[_0x101b7d(0xf3)](_0x101b7d(0xce)+_0x32d0ec),await handleSDKOutput([_0x3ee334],_0x24c9e2),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a33_0x11da(){const _0x256d6b=['execute','segment:fields','68125xuNXeO','description','3OEzjDi','56BGIqcb','4601044tiLjTs','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','\x20field','24puIKLh','listFields','1007487smviqC','✔\x20Found\x20','verbose','\x27...','parentSegment','jsonl','site','segment','error','Error:\x20Parent\x20segment\x20name\x20is\x20required','38qNqBAz','27154FaBCUR','6219590LXUnsk','13675541TKqTZu','length','json','Site:\x20','Parent\x20segment:\x20','156PlywEl','name','451460sHTOco','Listing\x20fields\x20for\x20\x27'];a33_0x11da=function(){return _0x256d6b;};return a33_0x11da();}const a33_0x90070f=a33_0x8565;(function(_0x5839ad,_0x309bb8){const _0x554c83=a33_0x8565,_0x983fae=_0x5839ad();while(!![]){try{const _0x3afdc1=parseInt(_0x554c83(0xc5))/0x1*(parseInt(_0x554c83(0xc4))/0x2)+parseInt(_0x554c83(0xd4))/0x3*(-parseInt(_0x554c83(0xce))/0x4)+parseInt(_0x554c83(0xd2))/0x5*(-parseInt(_0x554c83(0xcc))/0x6)+-parseInt(_0x554c83(0xd6))/0x7+parseInt(_0x554c83(0xd5))/0x8*(-parseInt(_0x554c83(0xdc))/0x9)+-parseInt(_0x554c83(0xc6))/0xa+parseInt(_0x554c83(0xc7))/0xb*(parseInt(_0x554c83(0xda))/0xc);if(_0x3afdc1===_0x309bb8)break;else _0x983fae['push'](_0x983fae['shift']());}catch(_0x5dd833){_0x983fae['push'](_0x983fae['shift']());}}}(a33_0x11da,0x73565));function a33_0x8565(_0x22adca,_0x229976){_0x22adca=_0x22adca-0xbd;const _0x11da14=a33_0x11da();let _0x8565f7=_0x11da14[_0x22adca];return _0x8565f7;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{displayFieldsHumanReadable}from'../sdk/segment/fields-display.js';export class SegmentFieldsCommand extends BaseCommand{[a33_0x90070f(0xcd)]=a33_0x90070f(0xd1);[a33_0x90070f(0xd3)]='List\x20available\x20fields\x20for\x20segmentation';async[a33_0x90070f(0xd0)](_0x352623){const _0x3cb1a2=a33_0x90070f,{options:_0x2d1083,args:_0x15ad34,tdx:_0x849ae3}=_0x352623,_0x4ecb2f=_0x15ad34[0x0]||_0x2d1083[_0x3cb1a2(0xbe)];if(!_0x4ecb2f)return console[_0x3cb1a2(0xc2)](_0x3cb1a2(0xc3)),console[_0x3cb1a2(0xc2)](_0x3cb1a2(0xd8)),console[_0x3cb1a2(0xc2)](_0x3cb1a2(0xd7)),0x1;_0x2d1083[_0x3cb1a2(0xde)]&&(console[_0x3cb1a2(0xc2)](_0x3cb1a2(0xca)+_0x2d1083[_0x3cb1a2(0xc0)]),console[_0x3cb1a2(0xc2)](_0x3cb1a2(0xcb)+_0x4ecb2f));const _0x4a9e78=await withSpinner(_0x3cb1a2(0xcf)+_0x4ecb2f+_0x3cb1a2(0xbd),()=>_0x849ae3[_0x3cb1a2(0xc1)][_0x3cb1a2(0xdb)](_0x4ecb2f),{'verbose':_0x2d1083[_0x3cb1a2(0xde)]}),_0xdb42a=_0x4a9e78['data'];console[_0x3cb1a2(0xc2)](_0x3cb1a2(0xdd)+_0xdb42a[_0x3cb1a2(0xc8)]+_0x3cb1a2(0xd9)+(_0xdb42a['length']!==0x1?'s':''));if(_0x2d1083[_0x3cb1a2(0xc9)]||_0x2d1083[_0x3cb1a2(0xbf)])return await handleSDKOutput(_0xdb42a,_0x2d1083),0x0;return displayFieldsHumanReadable(_0xdb42a,_0x4ecb2f),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a34_0x1f14(_0x24dbbe,_0x2e82ea){_0x24dbbe=_0x24dbbe-0xfc;const _0x3fad74=a34_0x3fad();let _0x1f14c1=_0x3fad74[_0x24dbbe];return _0x1f14c1;}const a34_0x218cf7=a34_0x1f14;(function(_0x28b911,_0x326276){const _0x44c09=a34_0x1f14,_0x21a709=_0x28b911();while(!![]){try{const _0x5049ec=-parseInt(_0x44c09(0x132))/0x1*(-parseInt(_0x44c09(0x136))/0x2)+parseInt(_0x44c09(0x119))/0x3*(-parseInt(_0x44c09(0x126))/0x4)+parseInt(_0x44c09(0x105))/0x5+-parseInt(_0x44c09(0x10e))/0x6+parseInt(_0x44c09(0x135))/0x7+-parseInt(_0x44c09(0x130))/0x8+-parseInt(_0x44c09(0xfe))/0x9;if(_0x5049ec===_0x326276)break;else _0x21a709['push'](_0x21a709['shift']());}catch(_0x3bc541){_0x21a709['push'](_0x21a709['shift']());}}}(a34_0x3fad,0x99abd));import{BaseCommand}from'./command.js';import{withProgressSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{saveSessionContext}from'../core/session.js';import a34_0x3cd523 from'chalk';function a34_0x3fad(){const _0x1b2bce=['execute','1384458Ovevxb','No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27','isNew','helpText','✔\x20Context\x20set:\x20','\x20with\x20','no_parent','\x20=\x20','\x20files\x20to\x20','resourceName','\x20files?','1731auuXsf','\x0aError:','journeyVersions','parentName','session','Write\x20','error','\x20\x20Target:\x20','data','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','targetDir','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','file','2936BjAOEM','repeat','hasChanges','\x27...','✔\x20All\x20files\x20are\x20up\x20to\x20date','Pulling\x20segments\x20from\x20\x27','Error:\x20','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','\x0aChanges\x20to\x20\x27','verbose','1270848DPsCkL','length','1gUjvLZ','\x20\x20🗺️\x20\x20','✔\x20Pulled\x20','2305653WTDehq','1302586MNogUL','green','Parent\x20segment:\x20','activations','filter','errorCode','segment:pull','Site:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','segment','message','type','cyan','absolutePath','journeys','\x20segments','cwd','6581781MwdWPs','counts','\x20versions)','files','parent_segment','\x20journeys','red','5965955UwBqEy','Usage:\x20tdx\x20sg\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20(requires\x20context\x20or\x20tdx.json)','yellow','dim','Aborted.','parentSegment','dirname','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a'];a34_0x3fad=function(){return _0x1b2bce;};return a34_0x3fad();}import{existsSync,mkdirSync,writeFileSync}from'fs';import a34_0x5b31bb from'path';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';export{buildFolderIdToPathMap as buildFolderPathMap}from'../sdk/segment/resolution-context.js';export class SegmentPullCommand extends BaseCommand{['name']=a34_0x218cf7(0x13c);['description']=a34_0x218cf7(0x12d);async[a34_0x218cf7(0x10d)](_0x4bda45){const _0xcaa436=a34_0x218cf7,{options:_0x123c3a,args:_0xd470c2,tdx:_0x1ec8c2}=_0x4bda45,_0x18a233=_0x123c3a,_0x2bc657=await resolveTarget({'arg':_0xd470c2[0x0],'contextParent':_0x123c3a[_0xcaa436(0x10a)],'cwd':process[_0xcaa436(0xfd)]()});if(!isSuccessfulResolution(_0x2bc657))return _0x2bc657[_0xcaa436(0x13b)]===_0xcaa436(0x114)?(console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x107)](_0xcaa436(0x10c))),console[_0xcaa436(0x11f)](_0xcaa436(0x106)),console[_0xcaa436(0x11f)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent'),console[_0xcaa436(0x11f)](_0xcaa436(0x13e))):(console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x104)](_0xcaa436(0x12c)+_0x2bc657[_0xcaa436(0x140)]+'\x0a')),_0x2bc657[_0xcaa436(0x111)]&&console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x142)](_0x2bc657[_0xcaa436(0x111)]))),0x1;const _0x5e407c=_0x2bc657[_0xcaa436(0x11c)],_0x238557=_0x2bc657[_0xcaa436(0x123)],_0x476147=_0x2bc657[_0xcaa436(0x141)]===_0xcaa436(0x125)?_0x2bc657[_0xcaa436(0x117)]:undefined;_0x18a233['verbose']&&(console[_0xcaa436(0x11f)](_0xcaa436(0x13d)+_0x18a233['site']),console[_0xcaa436(0x11f)](_0xcaa436(0x138)+_0x5e407c),_0x476147&&console[_0xcaa436(0x11f)]('Target\x20resource:\x20'+_0x476147));const _0x8787c0=await withProgressSpinner(_0xcaa436(0x12b)+_0x5e407c+_0xcaa436(0x129),_0x56422d=>_0x1ec8c2[_0xcaa436(0x13f)]['pullSegments'](_0x5e407c,{'targetDir':_0x238557,'targetResourceName':_0x476147,'verbose':_0x18a233[_0xcaa436(0x12f)],'progress':{'update':_0x2dcc9b=>{const _0x2fa592=_0xcaa436;_0x56422d['setPhase'](_0x2dcc9b),_0x18a233[_0x2fa592(0x12f)]&&console[_0x2fa592(0x11f)]('\x20\x20'+_0x2dcc9b);}}}),{'verbose':_0x18a233[_0xcaa436(0x12f)]}),_0xb7a2c6=_0x8787c0[_0xcaa436(0x121)];if(_0xb7a2c6[_0xcaa436(0xff)]['segments']===0x0&&_0xb7a2c6[_0xcaa436(0xff)][_0xcaa436(0x144)]===0x0)return console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x107)](_0xcaa436(0x10f)+_0xb7a2c6[_0xcaa436(0x11c)]+'\x27')),0x0;const _0x1669ab=_0xb7a2c6[_0xcaa436(0x101)][_0xcaa436(0x13a)](_0x4a8e5c=>_0x4a8e5c['isNew']),_0x3823ff=_0xb7a2c6['files'][_0xcaa436(0x13a)](_0x364c3c=>!_0x364c3c[_0xcaa436(0x110)]&&_0x364c3c[_0xcaa436(0x128)]),_0x45e90f=_0xb7a2c6['files'][_0xcaa436(0x13a)](_0x3134ad=>!_0x3134ad[_0xcaa436(0x110)]&&!_0x3134ad[_0xcaa436(0x128)]);console[_0xcaa436(0x11f)]('\x0aPull\x20summary\x20for\x20\x27'+_0xb7a2c6[_0xcaa436(0x11c)]+'\x27:'),console[_0xcaa436(0x11f)]('\x20\x20🎯\x20'+a34_0x3cd523[_0xcaa436(0x142)](_0xb7a2c6[_0xcaa436(0xff)]['segments']+_0xcaa436(0xfc))+_0xcaa436(0x113)+a34_0x3cd523[_0xcaa436(0x142)](_0xb7a2c6['counts'][_0xcaa436(0x139)]+'\x20activations'));if(_0xb7a2c6['counts'][_0xcaa436(0x144)]>0x0){const _0x47da82=_0xb7a2c6[_0xcaa436(0xff)][_0xcaa436(0x11b)]>_0xb7a2c6['counts'][_0xcaa436(0x144)]?'\x20('+_0xb7a2c6[_0xcaa436(0xff)]['journeyVersions']+_0xcaa436(0x100):'';console[_0xcaa436(0x11f)](_0xcaa436(0x133)+a34_0x3cd523[_0xcaa436(0x142)](_0xb7a2c6[_0xcaa436(0xff)][_0xcaa436(0x144)]+_0xcaa436(0x103))+a34_0x3cd523[_0xcaa436(0x108)](_0x47da82));}console[_0xcaa436(0x11f)]('\x20\x20'+a34_0x3cd523[_0xcaa436(0x137)]('+\x20'+_0x1669ab[_0xcaa436(0x131)]+'\x20new\x20files')),console[_0xcaa436(0x11f)]('\x20\x20'+a34_0x3cd523[_0xcaa436(0x107)]('~\x20'+_0x3823ff[_0xcaa436(0x131)]+'\x20changed\x20files')),console[_0xcaa436(0x11f)]('\x20\x20'+a34_0x3cd523[_0xcaa436(0x108)]('=\x20'+_0x45e90f[_0xcaa436(0x131)]+'\x20unchanged\x20files')),console['error'](_0xcaa436(0x120)+a34_0x3cd523[_0xcaa436(0x142)](_0xb7a2c6['targetDir'])+'\x0a');if(_0x3823ff['length']>0x0)for(const _0x55ff9e of _0x3823ff){console[_0xcaa436(0x11f)](_0xcaa436(0x12e)+_0x55ff9e['relativePath']+'\x27:'),console[_0xcaa436(0x11f)]('─'['repeat'](0x3c)),console[_0xcaa436(0x11f)](_0x55ff9e['diff']),console[_0xcaa436(0x11f)]('─'[_0xcaa436(0x127)](0x3c));}if(_0x18a233['dryRun'])return console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x107)](_0xcaa436(0x122))),0x0;if(_0x1669ab[_0xcaa436(0x131)]===0x0&&_0x3823ff[_0xcaa436(0x131)]===0x0)return console[_0xcaa436(0x11f)](a34_0x3cd523['green'](_0xcaa436(0x12a))),saveSessionContext({'parent_segment':_0xb7a2c6[_0xcaa436(0x11c)]},_0x18a233[_0xcaa436(0x11d)]),console['error'](a34_0x3cd523['green'](_0xcaa436(0x112)+a34_0x3cd523[_0xcaa436(0x108)]('parent_segment')+_0xcaa436(0x115)+a34_0x3cd523[_0xcaa436(0x142)](_0xb7a2c6[_0xcaa436(0x11c)]))),0x0;if(!_0x18a233['yes']){if(!isInteractive())return console['error'](a34_0x3cd523[_0xcaa436(0x104)](_0xcaa436(0x11a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a34_0x3cd523[_0xcaa436(0x108)](_0xcaa436(0x124))),0x1;const _0x276543=await confirmKey(_0xcaa436(0x11e)+(_0x1669ab['length']+_0x3823ff[_0xcaa436(0x131)])+_0xcaa436(0x118));if(!_0x276543)return console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x107)](_0xcaa436(0x109)),'-\x20no\x20files\x20written'),0x1;}for(const _0x23db4e of _0xb7a2c6[_0xcaa436(0x101)]){if(_0x23db4e[_0xcaa436(0x110)]||_0x23db4e['hasChanges']){const _0x14926f=a34_0x5b31bb[_0xcaa436(0x10b)](_0x23db4e[_0xcaa436(0x143)]);!existsSync(_0x14926f)&&mkdirSync(_0x14926f,{'recursive':!![]}),writeFileSync(_0x23db4e[_0xcaa436(0x143)],_0x23db4e['content'],'utf-8');}}return console[_0xcaa436(0x11f)](a34_0x3cd523[_0xcaa436(0x137)](_0xcaa436(0x134)+(_0x1669ab[_0xcaa436(0x131)]+_0x3823ff[_0xcaa436(0x131)])+_0xcaa436(0x116)+_0xb7a2c6[_0xcaa436(0x123)])),saveSessionContext({'parent_segment':_0xb7a2c6[_0xcaa436(0x11c)]},_0x18a233[_0xcaa436(0x11d)]),console[_0xcaa436(0x11f)](a34_0x3cd523['green'](_0xcaa436(0x112)+a34_0x3cd523[_0xcaa436(0x108)](_0xcaa436(0x102))+_0xcaa436(0x115)+a34_0x3cd523['cyan'](_0xb7a2c6['parentName']))),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a35_0x422c(){const _0x4fd019=['Fetching\x20connections\x20for\x20name\x20resolution...','setPhase','existingJourney','Fetching\x20existing\x20data...','journeys','196VcTTRq','Scoped\x20to\x20folder:\x20','\x20to\x20create','delete','name','Preparing\x20journeys...','cwd','idToName','\x20\x20📊\x20Segments:','dim','3774456uPDNZf','listActivations','segmentFolderId','\x20deleted','then','listFolders','(Journey\x20will\x20be\x20deleted)','createdAt','description','290059RBpUMk','folders','\x20created','20NTQTxc','10610gAqPMu','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','resolveParentId','Resolving\x20parent\x20segment\x20\x27','updatedAt','push','Source\x20directory:\x20','relationships','user','.yaml','getParent','Push\x20','segments','\x20\x20Journeys:\x20','filter','/j/da/je','createdSegmentIds','get','getOutputSchemaWithCache','data','list','Error\x20parsing\x20YAML:\x20','existingSegment','join','1053348Qdswsz','changed','📁\x20','updated','Error:\x20Directory\x20not\x20found:\x20','set','\x27...','No\x20','\x20new','14EDlnYm','listSegments','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','yes','parent_name','type','message','endsWith','journeysOnly','1117716fXRMiv','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','errorCode','Aborted.','versionNumber','/app/ps/','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','verbose','\x20to\x20delete','cyan','no_parent','green','\x0aPush\x20summary\x20for\x20\x27','red','Changes\x20to:','listJourneysWithDetailsFromParentSegment','Fetching\x20existing\x20activations...','segment\x20or\x20journey','New\x20segment:','paused','getJourney','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','blue','\x20\x20🗺️\x20\x20Journeys:','diff','\x20unchanged','audienceId','new','yellow','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','journeyId','Parent\x20segment:\x20','\x0a✔\x20Push\x20complete','activations','Error:\x20','folderPath','targetDir','\x0aValidation\x20failed:','scopedFolderPath','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','created','yamlConfig','connection','\x20activations]','nameToId','\x20YAML\x20files\x20found','error','site','/e/','\x20\x20Activations:','unchanged','execute','file','\x20updated','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','/sb/da/esr','folderId','40032nAQqsO','journey','Changes\x20to\x20journey:','toDelete','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','journeyBundleName','toString','isNew','repeat','attributes','map','results','2kYSQTw','parentSegment','length','\x20folders\x20to\x20create','segment','Usage:\x20tdx\x20sg\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20(requires\x20context)','journeyBundleId','all','\x20\x20\x20\x20','\x20changed','helpText','toCreate','10080224AyUUWN'];a35_0x422c=function(){return _0x4fd019;};return a35_0x422c();}const a35_0x326f6b=a35_0xf7a3;(function(_0x4f2217,_0x554647){const _0x18cd7c=a35_0xf7a3,_0x23cd6e=_0x4f2217();while(!![]){try{const _0x342d6e=-parseInt(_0x18cd7c(0x210))/0x1*(parseInt(_0x18cd7c(0x1eb))/0x2)+-parseInt(_0x18cd7c(0x22c))/0x3+parseInt(_0x18cd7c(0x1fd))/0x4*(-parseInt(_0x18cd7c(0x214))/0x5)+-parseInt(_0x18cd7c(0x23e))/0x6*(parseInt(_0x18cd7c(0x235))/0x7)+-parseInt(_0x18cd7c(0x207))/0x8+parseInt(_0x18cd7c(0x1df))/0x9+-parseInt(_0x18cd7c(0x213))/0xa*(-parseInt(_0x18cd7c(0x1f7))/0xb);if(_0x342d6e===_0x554647)break;else _0x23cd6e['push'](_0x23cd6e['shift']());}catch(_0x7290e4){_0x23cd6e['push'](_0x23cd6e['shift']());}}}(a35_0x422c,0x3c784));import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a35_0x34fe77 from'chalk';function a35_0xf7a3(_0x30e7a6,_0x9aa813){_0x30e7a6=_0x30e7a6-0x1da;const _0x422cce=a35_0x422c();let _0xf7a31f=_0x422cce[_0x30e7a6];return _0xf7a31f;}import{existsSync}from'fs';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{['name']='segment:push';[a35_0x326f6b(0x20f)]=a35_0x326f6b(0x215);async[a35_0x326f6b(0x273)](_0x5ceffa){const _0x206a67=a35_0x326f6b,{options:_0x2174e7,args:_0x5a1f6f,tdx:_0x35440d}=_0x5ceffa,_0x549452=_0x2174e7,_0x2b4011=await resolveTarget({'arg':_0x5a1f6f[0x0],'contextParent':_0x2174e7[_0x206a67(0x1ec)],'cwd':process[_0x206a67(0x203)]()});if(!isSuccessfulResolution(_0x2b4011))return _0x2b4011[_0x206a67(0x240)]===_0x206a67(0x248)?(console['error'](a35_0x34fe77[_0x206a67(0x25c)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x206a67(0x26e)](_0x206a67(0x1f0)),console[_0x206a67(0x26e)](_0x206a67(0x267)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file')):(console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x24b)](_0x206a67(0x262)+_0x2b4011[_0x206a67(0x23b)]+'\x0a')),_0x2b4011[_0x206a67(0x1f5)]&&console['error'](a35_0x34fe77[_0x206a67(0x247)](_0x2b4011['helpText']))),0x1;if(_0x2b4011[_0x206a67(0x23a)]===_0x206a67(0x239))return console['error'](a35_0x34fe77[_0x206a67(0x24b)](_0x206a67(0x230)+_0x2b4011[_0x206a67(0x264)]+'\x0a')),console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x247)](_0x206a67(0x23f))),0x1;const _0x1e4a46=_0x2b4011['parentName'],_0x29b83d=_0x2b4011[_0x206a67(0x264)],_0x559370=_0x2b4011[_0x206a67(0x23a)]===_0x206a67(0x1da)?_0x2b4011['filePath']:undefined,_0x223d28=getScopedDetails(_0x2b4011),_0x20df82=_0x223d28?.['isScoped']??![],_0x2f27d3=_0x223d28?.[_0x206a67(0x266)]??'';if(!existsSync(_0x29b83d))return console[_0x206a67(0x26e)](a35_0x34fe77['red'](_0x206a67(0x230)+_0x29b83d+'\x0a')),console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x247)](_0x206a67(0x23f))),0x1;_0x549452[_0x206a67(0x245)]&&(console['error']('Site:\x20'+_0x549452['site']),console[_0x206a67(0x26e)](_0x206a67(0x25f)+_0x1e4a46),console[_0x206a67(0x26e)](_0x206a67(0x21a)+_0x29b83d),_0x20df82&&console[_0x206a67(0x26e)](_0x206a67(0x1fe)+_0x2f27d3));const _0x12b620=await withSpinner(_0x206a67(0x217)+_0x1e4a46+_0x206a67(0x232),()=>_0x35440d[_0x206a67(0x1ef)][_0x206a67(0x216)](_0x1e4a46),{'verbose':_0x549452['verbose']}),_0x47c05a=_0x12b620[_0x206a67(0x227)],{parentSegmentResult:_0x2bf1e4,segmentsResult:_0x1c44d7,foldersResult:_0x2acbf8,journeysWithDetailsResult:_0x20090f,userMaps:_0x5229f2}=await withSpinner(_0x206a67(0x1fb),async()=>{const _0x5d0b65=_0x206a67,[_0x5bd2c7,_0x4975a5,_0x3c37ce,_0xe7909f,_0x5deeac]=await Promise[_0x5d0b65(0x1f2)]([_0x35440d[_0x5d0b65(0x1ef)][_0x5d0b65(0x21e)](_0x47c05a),_0x35440d[_0x5d0b65(0x1ef)][_0x5d0b65(0x236)](_0x47c05a),_0x35440d[_0x5d0b65(0x1ef)][_0x5d0b65(0x20c)](_0x47c05a),_0x35440d[_0x5d0b65(0x1e0)][_0x5d0b65(0x24d)](_0x47c05a,{'includeAllVersions':!![]}),_0x35440d[_0x5d0b65(0x21c)]['buildUserMaps']()]);return{'parentSegmentResult':_0x5bd2c7,'segmentsResult':_0x4975a5,'foldersResult':_0x3c37ce,'journeysWithDetailsResult':_0xe7909f,'userMaps':_0x5deeac};},{'verbose':_0x549452[_0x206a67(0x245)]})['then'](_0x3e39a3=>_0x3e39a3[_0x206a67(0x227)]),_0x43e259=_0x2bf1e4,_0x237ffb=extractRootFolderId(_0x43e259),_0x420698=_0x1c44d7,_0x315ea0=_0x2acbf8,{journeys:_0xf48a53,activationStepsById:_0x18c3eb}=_0x20090f,_0x4133a7=new Map(_0xf48a53[_0x206a67(0x1e9)](_0x4aeb1b=>[_0x4aeb1b['id'],_0x4aeb1b])),_0xda10b5=_0xf48a53[_0x206a67(0x1e9)](_0x42beca=>({'id':_0x42beca['id'],'name':_0x42beca['attributes']['name'],'journeyBundleName':_0x42beca[_0x206a67(0x1e8)][_0x206a67(0x1e4)]||'','journeyBundleId':_0x42beca['attributes'][_0x206a67(0x1f1)]||'','versionNumber':_0x42beca[_0x206a67(0x1e8)][_0x206a67(0x242)],'description':_0x42beca['attributes'][_0x206a67(0x20f)],'state':_0x42beca['attributes']['state'],'paused':_0x42beca['attributes'][_0x206a67(0x251)],'audienceId':_0x42beca['attributes'][_0x206a67(0x25a)],'folderId':_0x42beca[_0x206a67(0x21b)]?.['parentFolder']?.[_0x206a67(0x227)]?.['id'],'createdAt':_0x42beca[_0x206a67(0x1e8)][_0x206a67(0x20e)],'updatedAt':_0x42beca[_0x206a67(0x1e8)][_0x206a67(0x218)]})),{emailToId:_0x1e2513,idToEmail:_0x357c80}=_0x5229f2,_0x5a50fd=await withSpinner(_0x206a67(0x1f8),async()=>{const _0x7736de=_0x206a67,_0x542b6f=await _0x35440d[_0x7736de(0x26a)][_0x7736de(0x228)]();return buildConnectionMaps(_0x542b6f);},{'verbose':_0x549452[_0x206a67(0x245)]})[_0x206a67(0x20b)](_0x7bc1da=>_0x7bc1da[_0x206a67(0x227)]),_0x55e1df=_0x5a50fd['nameToId'],_0x27c94c=_0x5a50fd['idToName'],_0x5ec7a1=_0x5a50fd['nameToType'],_0x4b5e26={'emailToIdMap':_0x1e2513,'connectionNameToIdMap':_0x55e1df,'connectionNameToTypeMap':_0x5ec7a1,'getSchema':_0x45040b=>_0x35440d[_0x206a67(0x26a)][_0x206a67(0x226)](_0x45040b)};let {pathToId:_0x33099b,idToPath:_0x2f7c66}=buildFolderMaps(_0x315ea0);const _0x523190=buildSegmentLookupMap(_0x420698,_0x2f7c66),_0x100f99=buildSegmentNameToIdMap(_0x420698),_0x4031c1=buildJourneyBundleLookupMap(_0xda10b5,_0x2f7c66);let _0x479e75;if(_0x559370){if(!_0x559370[_0x206a67(0x23c)]('.yml')&&!_0x559370[_0x206a67(0x23c)](_0x206a67(0x21d)))return console[_0x206a67(0x26e)](a35_0x34fe77['red'](_0x206a67(0x255)+_0x559370+'\x0a')),0x1;_0x479e75=[_0x559370];}else _0x479e75=findYamlFiles(_0x29b83d);if(_0x479e75[_0x206a67(0x1ed)]===0x0)return console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x24b)](_0x206a67(0x237)+_0x29b83d+'\x0a')),console['error'](a35_0x34fe77['cyan'](_0x206a67(0x1dc))),0x1;let _0x2acab3,_0x5a7654;try{const _0x549027=parseAndClassifyYamlFiles(_0x479e75,_0x29b83d,{'skipSegments':_0x549452['journeysOnly']});_0x2acab3=_0x549027[_0x206a67(0x220)],_0x5a7654=_0x549027['journeys'];const _0x17bb45=validateParsedFiles(_0x549027,_0x29b83d);if(_0x17bb45[_0x206a67(0x1ed)]>0x0)return console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x24b)](_0x206a67(0x265))),console[_0x206a67(0x26e)](formatValidationErrors(_0x17bb45)),console[_0x206a67(0x26e)](a35_0x34fe77['yellow']('\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.')),0x1;}catch(_0x164330){return console['error'](a35_0x34fe77[_0x206a67(0x24b)](_0x206a67(0x229)+(_0x164330 instanceof Error?_0x164330[_0x206a67(0x23b)]:_0x164330))),0x1;}if(_0x2acab3[_0x206a67(0x1ed)]===0x0&&_0x5a7654[_0x206a67(0x1ed)]===0x0){const _0x37fea1=_0x549452[_0x206a67(0x23d)]?'journey':_0x206a67(0x24f);return console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x25c)](_0x206a67(0x233)+_0x37fea1+_0x206a67(0x26d))),0x0;}const _0x28d291=new Map();_0x420698[_0x206a67(0x1ed)]>0x0&&!_0x549452[_0x206a67(0x23d)]&&await withSpinner(_0x206a67(0x24e),async()=>{await batchAsync(_0x420698,async _0x3799bc=>{const _0x430d65=a35_0xf7a3,_0x2de49e=await _0x35440d[_0x430d65(0x1ef)][_0x430d65(0x208)](_0x47c05a,_0x3799bc['id']);_0x28d291[_0x430d65(0x231)](_0x3799bc['id'],_0x2de49e);});},{'verbose':_0x549452[_0x206a67(0x245)]});const {segmentFiles:_0x57e375,foldersToCreate:_0x3ae519}=await prepareSegmentFiles(_0x2acab3,{'segmentByFolderAndName':_0x523190,'activationsBySegmentId':_0x28d291,'folderPathToId':_0x33099b,'idToEmailMap':_0x357c80,'connectionIdToNameMap':_0x27c94c},_0x4b5e26,_0x20df82,_0x2f27d3),_0x58026c=_0x559370?[]:findSegmentsToDelete(_0x420698,_0x2acab3[_0x206a67(0x1e9)](({yamlConfig:_0x28bf35,folderPath:_0x7afd01})=>({'yamlConfig':_0x28bf35,'folderPath':resolveTDFolderPath(_0x7afd01,_0x20df82,_0x2f27d3)})),_0x2f7c66,_0x2f27d3,_0x20df82),{journeyFiles:_0xbfe77a,foldersToCreate:_0x505cf5}=await withProgressSpinner(_0x206a67(0x202),async _0x2c5951=>prepareJourneyFiles(_0x5a7654,{'fetchJourney':async _0x57e49c=>_0x35440d[_0x206a67(0x1e0)][_0x206a67(0x252)](_0x57e49c['journeyId']),'journeyBundlesByFolderAndName':_0x4031c1,'folderPathToId':_0x33099b,'idToEmailMap':_0x357c80,'connectionIdToNameMap':_0x27c94c,'existingSegments':_0x420698,'parentId':_0x47c05a,'deps':_0x35440d,'progress':{'update':_0x5c3ab7=>{const _0x15908d=_0x206a67;_0x2c5951[_0x15908d(0x1f9)](_0x5c3ab7),_0x549452[_0x15908d(0x245)]&&console[_0x15908d(0x26e)]('\x20\x20'+_0x5c3ab7);}},'journeyById':_0x4133a7,'activationStepsById':_0x18c3eb},_0x20df82,_0x2f27d3),{'verbose':_0x549452[_0x206a67(0x245)]})['then'](_0x11a42f=>_0x11a42f[_0x206a67(0x227)]);for(const _0x1b6d98 of _0x505cf5){_0x3ae519['add'](_0x1b6d98);}const _0x32179d=_0x559370?[]:findJourneysToDelete(_0xda10b5,_0x5a7654[_0x206a67(0x1e9)](({yamlConfig:_0x48275b,folderPath:_0x501348})=>({'yamlConfig':_0x48275b,'folderPath':resolveTDFolderPath(_0x501348,_0x20df82,_0x2f27d3)})),_0x2f7c66,_0x2f27d3,_0x20df82),_0x5844b9=calculatePushStats(_0x57e375,_0xbfe77a,_0x3ae519,_0x58026c,_0x32179d,!!_0x549452[_0x206a67(0x200)],!!_0x549452[_0x206a67(0x23d)]),_0x2070a3=_0x5844b9[_0x206a67(0x220)][_0x206a67(0x25b)],_0x5529dc=_0x5844b9[_0x206a67(0x220)][_0x206a67(0x22d)],_0x3938c7=_0x5844b9[_0x206a67(0x220)][_0x206a67(0x272)],_0x5dbe99=_0x5844b9[_0x206a67(0x220)]['toDelete'],_0x41f4e0=_0x5844b9[_0x206a67(0x211)][_0x206a67(0x1f6)],_0x56b611=_0x5844b9['journeys']['new'],_0x1ea9d7=_0x5844b9[_0x206a67(0x1fc)][_0x206a67(0x22d)],_0x21fef0=_0x5844b9[_0x206a67(0x1fc)][_0x206a67(0x272)],_0x559c1f=_0x5844b9['journeys'][_0x206a67(0x1e2)],_0x3664a4=_0x5844b9[_0x206a67(0x261)][_0x206a67(0x1f2)],_0x3993b5=_0x5844b9[_0x206a67(0x261)]['toCreate'],_0x445fbd=_0x5844b9[_0x206a67(0x261)]['toUpdate'],_0x4b0b9e=_0x5844b9['activations'][_0x206a67(0x1e2)];console[_0x206a67(0x26e)](_0x206a67(0x24a)+_0x1e4a46+'\x27:');_0x41f4e0[_0x206a67(0x1ed)]>0x0&&console[_0x206a67(0x26e)]('\x20\x20'+a35_0x34fe77['blue'](_0x206a67(0x22e)+_0x41f4e0['length']+_0x206a67(0x1ee)));if(!_0x549452[_0x206a67(0x23d)]){console[_0x206a67(0x26e)](_0x206a67(0x205)),console[_0x206a67(0x26e)]('\x20\x20\x20\x20'+a35_0x34fe77[_0x206a67(0x249)]('+\x20'+_0x2070a3['length']+_0x206a67(0x234))),console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x25c)]('~\x20'+_0x5529dc[_0x206a67(0x1ed)]+_0x206a67(0x1f4)));if(_0x5dbe99['length']>0x0)console['error'](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x24b)]('-\x20'+_0x5dbe99['length']+_0x206a67(0x246)));else _0x58026c[_0x206a67(0x1ed)]>0x0&&!_0x549452['delete']&&console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x206)](_0x58026c[_0x206a67(0x1ed)]+_0x206a67(0x244)));console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x206)]('=\x20'+_0x3938c7[_0x206a67(0x1ed)]+_0x206a67(0x259)));}if(_0xbfe77a[_0x206a67(0x1ed)]>0x0||_0x32179d[_0x206a67(0x1ed)]>0x0){console['error'](_0x206a67(0x257)),console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x249)]('+\x20'+_0x56b611[_0x206a67(0x1ed)]+_0x206a67(0x234))),console['error']('\x20\x20\x20\x20'+a35_0x34fe77[_0x206a67(0x25c)]('~\x20'+_0x1ea9d7[_0x206a67(0x1ed)]+'\x20changed'));if(_0x559c1f[_0x206a67(0x1ed)]>0x0)console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x24b)]('-\x20'+_0x559c1f[_0x206a67(0x1ed)]+'\x20to\x20delete'));else _0x32179d[_0x206a67(0x1ed)]>0x0&&!_0x549452[_0x206a67(0x200)]&&console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x206)](_0x32179d['length']+_0x206a67(0x244)));console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x206)]('=\x20'+_0x21fef0[_0x206a67(0x1ed)]+_0x206a67(0x259)));}_0x3664a4['length']>0x0&&!_0x549452[_0x206a67(0x23d)]&&(console[_0x206a67(0x26e)](''),console['error'](_0x206a67(0x271)),_0x3993b5[_0x206a67(0x1ed)]>0x0&&console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77[_0x206a67(0x249)]('+\x20'+_0x3993b5[_0x206a67(0x1ed)]+_0x206a67(0x1ff))),_0x445fbd[_0x206a67(0x1ed)]>0x0&&console[_0x206a67(0x26e)](_0x206a67(0x1f3)+a35_0x34fe77['yellow']('~\x20'+_0x445fbd['length']+'\x20to\x20update')),_0x4b0b9e[_0x206a67(0x1ed)]>0x0&&console['error'](_0x206a67(0x1f3)+a35_0x34fe77['red']('-\x20'+_0x4b0b9e[_0x206a67(0x1ed)]+'\x20to\x20delete')));console['error']('\x20\x20Source:\x20'+a35_0x34fe77[_0x206a67(0x247)](_0x29b83d)+'\x0a');if(_0x41f4e0['length']>0x0){console[_0x206a67(0x26e)]('Folders\x20to\x20create:');for(const _0x787510 of _0x41f4e0){console['error']('\x20\x20'+a35_0x34fe77['blue']('+')+'\x20'+_0x787510);}console[_0x206a67(0x26e)]('');}if(_0x2070a3['length']>0x0&&!_0x549452[_0x206a67(0x23d)])for(const _0x86f087 of _0x2070a3){const _0x3031f7=_0x86f087[_0x206a67(0x263)]?_0x86f087['folderPath']+'/'+_0x86f087['yamlConfig'][_0x206a67(0x201)]:_0x86f087[_0x206a67(0x269)][_0x206a67(0x201)],_0x1fd9c8=_0x86f087['yamlConfig'][_0x206a67(0x261)]?.[_0x206a67(0x1ed)]||0x0,_0x3f5314=_0x1fd9c8>0x0?a35_0x34fe77[_0x206a67(0x206)]('\x20['+_0x1fd9c8+_0x206a67(0x26b)):'';console[_0x206a67(0x26e)]('\x0a'+a35_0x34fe77[_0x206a67(0x249)](_0x206a67(0x250))+'\x20'+_0x3031f7+_0x3f5314),console['error']('─'['repeat'](0x3c)),_0x86f087['diff']&&console['error'](_0x86f087[_0x206a67(0x258)]),console['error']('─'[_0x206a67(0x1e7)](0x3c));}if(_0x5dbe99[_0x206a67(0x1ed)]>0x0&&!_0x549452['journeysOnly'])for(const _0x252595 of _0x5dbe99){const _0x24be1a=_0x252595[_0x206a67(0x209)]?_0x2f7c66[_0x206a67(0x225)](_0x252595['segmentFolderId'][_0x206a67(0x1e5)]())||'':'',_0x46b2e9=_0x24be1a?_0x24be1a+'/'+_0x252595[_0x206a67(0x201)]:_0x252595[_0x206a67(0x201)],_0xf97ca0=_0x28d291[_0x206a67(0x225)](_0x252595['id'])||[],_0x4724a4=_0xf97ca0['length']>0x0?a35_0x34fe77[_0x206a67(0x206)]('\x20['+_0xf97ca0[_0x206a67(0x1ed)]+'\x20activations]'):'';console[_0x206a67(0x26e)]('\x0a'+a35_0x34fe77[_0x206a67(0x24b)]('Delete\x20segment:')+'\x20'+_0x46b2e9+_0x4724a4),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c));const _0x1e8c62=segmentWithActivationsToYaml(_0x252595,_0xf97ca0,undefined,_0x357c80,_0x27c94c),_0x152a86=segmentToYamlString(_0x1e8c62),_0x1555a3=generateDiff(_0x152a86,'');console[_0x206a67(0x26e)](formatDiffWithColors(_0x1555a3)),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c));}const _0x193a79=_0x57e375['filter'](_0x130e7e=>!_0x130e7e[_0x206a67(0x1e6)]&&_0x130e7e[_0x206a67(0x258)]);if(_0x193a79['length']>0x0&&!_0x549452[_0x206a67(0x23d)])for(const _0x39d2ae of _0x193a79){const _0x55dffc=_0x39d2ae[_0x206a67(0x263)]?_0x39d2ae[_0x206a67(0x263)]+'/'+_0x39d2ae[_0x206a67(0x269)]['name']:_0x39d2ae[_0x206a67(0x269)][_0x206a67(0x201)];console[_0x206a67(0x26e)]('\x0a'+a35_0x34fe77[_0x206a67(0x25c)](_0x206a67(0x24c))+'\x20'+_0x55dffc),console['error']('─'[_0x206a67(0x1e7)](0x3c)),console[_0x206a67(0x26e)](_0x39d2ae[_0x206a67(0x258)]),console['error']('─'[_0x206a67(0x1e7)](0x3c));}if(_0x56b611[_0x206a67(0x1ed)]>0x0)for(const _0x4a6f07 of _0x56b611){const _0x184109=_0x4a6f07[_0x206a67(0x263)]?_0x4a6f07[_0x206a67(0x263)]+'/'+_0x4a6f07['yamlConfig'][_0x206a67(0x201)]:_0x4a6f07[_0x206a67(0x269)][_0x206a67(0x201)];console[_0x206a67(0x26e)]('\x0a'+a35_0x34fe77['green']('New\x20journey:')+'\x20'+_0x184109),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c)),_0x4a6f07['diff']&&console[_0x206a67(0x26e)](_0x4a6f07[_0x206a67(0x258)]),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c));}const _0x5dc743=_0xbfe77a[_0x206a67(0x222)](_0x58af92=>!_0x58af92['isNew']&&_0x58af92[_0x206a67(0x258)]);if(_0x5dc743[_0x206a67(0x1ed)]>0x0)for(const _0x21c66b of _0x5dc743){const _0x268fda=_0x21c66b[_0x206a67(0x263)]?_0x21c66b[_0x206a67(0x263)]+'/'+_0x21c66b[_0x206a67(0x269)]['name']:_0x21c66b['yamlConfig'][_0x206a67(0x201)];console[_0x206a67(0x26e)]('\x0a'+a35_0x34fe77['yellow'](_0x206a67(0x1e1))+'\x20'+_0x268fda),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c)),console[_0x206a67(0x26e)](_0x21c66b[_0x206a67(0x258)]),console['error']('─'[_0x206a67(0x1e7)](0x3c));}if(_0x559c1f[_0x206a67(0x1ed)]>0x0)for(const _0x1c4c60 of _0x559c1f){const _0x3a2a3e=_0x1c4c60[_0x206a67(0x1de)]?_0x2f7c66['get'](_0x1c4c60[_0x206a67(0x1de)])||'':'',_0x46ee96=_0x3a2a3e?_0x3a2a3e+'/'+_0x1c4c60[_0x206a67(0x1e4)]:_0x1c4c60['journeyBundleName'];console[_0x206a67(0x26e)]('\x0a'+a35_0x34fe77[_0x206a67(0x24b)]('Delete\x20journey:')+'\x20'+_0x46ee96),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c)),console[_0x206a67(0x26e)](a35_0x34fe77['red'](_0x206a67(0x20d))),console[_0x206a67(0x26e)]('─'[_0x206a67(0x1e7)](0x3c));}if(_0x549452['dryRun'])return console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x25c)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made')),0x0;const _0x52d3ca=_0x549452[_0x206a67(0x23d)]?![]:_0x2070a3[_0x206a67(0x1ed)]>0x0||_0x5529dc[_0x206a67(0x1ed)]>0x0||_0x5dbe99['length']>0x0,_0x4bfdb3=_0x56b611[_0x206a67(0x1ed)]>0x0||_0x1ea9d7[_0x206a67(0x1ed)]>0x0||_0x559c1f['length']>0x0,_0x38a8d9=_0x549452[_0x206a67(0x23d)]?![]:_0x3664a4[_0x206a67(0x1ed)]>0x0,_0x178046=_0x41f4e0[_0x206a67(0x1ed)]>0x0;if(!_0x52d3ca&&!_0x4bfdb3&&!_0x38a8d9&&!_0x178046){const _0x55955a=_0x549452[_0x206a67(0x23d)]?'✔\x20All\x20journeys\x20are\x20up\x20to\x20date':_0x206a67(0x25d);console['error'](a35_0x34fe77['green'](_0x55955a));if(_0x559370&&_0x3938c7[_0x206a67(0x1ed)]===0x1){const _0x457c9e=_0x3938c7[0x0];if(_0x457c9e['existingSegment']?.['id']){const _0x34b179=getConsoleNextUrl(_0x549452[_0x206a67(0x26f)],_0x206a67(0x243)+_0x47c05a+_0x206a67(0x270)+_0x457c9e[_0x206a67(0x22a)]['id']+_0x206a67(0x1dd));console[_0x206a67(0x26e)](_0x206a67(0x253)+a35_0x34fe77[_0x206a67(0x247)](_0x34b179));}}if(_0x559370&&_0x21fef0[_0x206a67(0x1ed)]===0x1){const _0x4cdf62=_0x21fef0[0x0];if(_0x4cdf62[_0x206a67(0x1fa)]?.['id']){const _0x51b328=getConsoleNextUrl(_0x549452['site'],_0x206a67(0x243)+_0x47c05a+'/e/'+_0x4cdf62[_0x206a67(0x1fa)]['id']+'/j/da/je');console['error']('\x20\x20'+a35_0x34fe77[_0x206a67(0x247)](_0x51b328));}}return 0x0;}const _0x5bd246=_0x549452['journeysOnly']?_0x56b611['length']+_0x1ea9d7['length']+_0x559c1f['length']+_0x41f4e0[_0x206a67(0x1ed)]:_0x2070a3[_0x206a67(0x1ed)]+_0x5529dc['length']+_0x5dbe99['length']+_0x56b611[_0x206a67(0x1ed)]+_0x1ea9d7[_0x206a67(0x1ed)]+_0x559c1f[_0x206a67(0x1ed)]+_0x41f4e0[_0x206a67(0x1ed)]+_0x3664a4[_0x206a67(0x1ed)];if(!_0x549452[_0x206a67(0x238)]&&_0x5bd246>0x0){if(!isInteractive())return console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x24b)]('\x0aError:'),_0x206a67(0x1e3)),console['error'](a35_0x34fe77[_0x206a67(0x206)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x32a385=await confirmKey(_0x206a67(0x21f)+_0x5bd246+'\x20changes?');if(!_0x32a385)return console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x25c)](_0x206a67(0x241))),0x1;}const _0x29a2c8={'withProgress':async(_0x2c8446,_0x50e290)=>{const _0x4242fa=_0x206a67,_0x4b79b3=await withSpinner(_0x2c8446,_0x50e290,{'verbose':_0x549452[_0x4242fa(0x245)]});return{'data':_0x4b79b3['data']};},'logInfo':_0x1d1db9=>console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x256)]('✔\x20'+_0x1d1db9)),'logSuccess':_0x37ab3f=>console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x249)]('✔\x20'+_0x37ab3f)),'logWarning':_0x3c9e37=>console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x25c)]('⚠\x20'+_0x3c9e37)),'logDeleted':_0x2518ee=>console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x24b)]('✔\x20'+_0x2518ee))},_0x2069b4={'segment':_0x35440d[_0x206a67(0x1ef)],'journey':_0x35440d[_0x206a67(0x1e0)],'user':_0x35440d[_0x206a67(0x21c)],'connection':_0x35440d['connection']};_0x41f4e0[_0x206a67(0x1ed)]>0x0&&(_0x33099b=await executePushFolders(_0x2069b4,_0x41f4e0,_0x33099b,{'parentId':_0x47c05a},_0x29a2c8));const _0x324f2b={'rootFolderId':_0x237ffb,'folderPathToId':_0x33099b,'folderIdToPath':_0x2f7c66,'segmentNameToId':_0x100f99,'activationsBySegmentId':_0x28d291,'emailToIdMap':_0x1e2513,'idToEmailMap':_0x357c80,'connectionNameToIdMap':_0x5a50fd[_0x206a67(0x26c)],'connectionIdToNameMap':_0x5a50fd[_0x206a67(0x204)],'connectionNameToTypeMap':_0x5ec7a1},_0x1ae5e5=await executePushSegments(_0x2069b4,_0x549452[_0x206a67(0x23d)]?[]:_0x57e375,_0x324f2b,{'parentId':_0x47c05a},_0x29a2c8),_0x559a2b=_0x1ae5e5[_0x206a67(0x268)],_0x30f22d=_0x1ae5e5['updated'],_0x720499=_0x1ae5e5[_0x206a67(0x261)][_0x206a67(0x268)],_0x2fa227=_0x1ae5e5['activations'][_0x206a67(0x22f)],_0xa5dc32=_0x1ae5e5[_0x206a67(0x261)]['deleted'];let _0x326992;if(_0x559370&&_0x57e375[_0x206a67(0x1ed)]===0x1){const _0x3af563=_0x57e375[0x0];_0x326992=_0x3af563[_0x206a67(0x22a)]?.['id']??_0x1ae5e5['createdSegmentIds'][_0x206a67(0x225)](_0x3af563[_0x206a67(0x269)]['name']);}const _0x4a7ae0=await executePushSegmentDeletions(_0x2069b4,_0x549452[_0x206a67(0x23d)]?[]:_0x5dbe99,_0x29a2c8);let _0x4da16f=0x0,_0x3e00d5=0x0,_0x360dc3=0x0;const _0x21d2d7=new Map(_0x100f99);for(const [_0x137c34,_0x1165a2]of _0x1ae5e5[_0x206a67(0x224)]){_0x21d2d7['set'](_0x137c34,_0x1165a2);}if(_0xbfe77a[_0x206a67(0x1ed)]>0x0){const _0x8de478={..._0x324f2b,'segmentNameToId':_0x21d2d7,'existingSegments':_0x420698,'activationContext':_0x4b5e26},_0x12ddfa=await executePushJourneys(_0x2069b4,_0xbfe77a,_0x8de478,{'parentId':_0x47c05a,'rootFolderId':_0x237ffb,'verbose':_0x549452[_0x206a67(0x245)]},_0x29a2c8);_0x4da16f=_0x12ddfa[_0x206a67(0x268)],_0x3e00d5=_0x12ddfa[_0x206a67(0x22f)];if(_0x559370&&_0x12ddfa[_0x206a67(0x1ea)][_0x206a67(0x1ed)]===0x1){const _0x1bddb9=_0x12ddfa[_0x206a67(0x1ea)][0x0];if(_0x1bddb9['journeyId']){const _0x48b467=getConsoleNextUrl(_0x549452[_0x206a67(0x26f)],'/app/ps/'+_0x47c05a+_0x206a67(0x270)+_0x1bddb9[_0x206a67(0x25e)]+_0x206a67(0x223));console['error']('\x20\x20'+a35_0x34fe77[_0x206a67(0x247)](_0x48b467));}}}for(const _0x5a06b0 of _0x559c1f){console[_0x206a67(0x26e)](a35_0x34fe77['yellow'](_0x206a67(0x254)+_0x5a06b0[_0x206a67(0x1e4)])),_0x360dc3++;}const _0x4c71d2=[];if(_0x559a2b>0x0)_0x4c71d2[_0x206a67(0x219)](_0x559a2b+_0x206a67(0x212));if(_0x30f22d>0x0)_0x4c71d2['push'](_0x30f22d+_0x206a67(0x1db));if(_0x4a7ae0>0x0)_0x4c71d2['push'](_0x4a7ae0+_0x206a67(0x20a));const _0x4096da=[];if(_0x4da16f>0x0)_0x4096da[_0x206a67(0x219)](_0x4da16f+_0x206a67(0x212));if(_0x3e00d5>0x0)_0x4096da['push'](_0x3e00d5+_0x206a67(0x1db));if(_0x360dc3>0x0)_0x4096da[_0x206a67(0x219)](_0x360dc3+_0x206a67(0x20a));const _0x41580a=[];if(_0x720499>0x0)_0x41580a[_0x206a67(0x219)](_0x720499+_0x206a67(0x212));if(_0x2fa227>0x0)_0x41580a['push'](_0x2fa227+_0x206a67(0x1db));if(_0xa5dc32>0x0)_0x41580a[_0x206a67(0x219)](_0xa5dc32+_0x206a67(0x20a));console[_0x206a67(0x26e)](a35_0x34fe77[_0x206a67(0x249)](_0x206a67(0x260)));_0x4c71d2[_0x206a67(0x1ed)]>0x0&&!_0x549452[_0x206a67(0x23d)]&&console[_0x206a67(0x26e)]('\x20\x20Segments:\x20'+_0x4c71d2[_0x206a67(0x22b)](',\x20'));_0x4096da[_0x206a67(0x1ed)]>0x0&&console['error'](_0x206a67(0x221)+_0x4096da[_0x206a67(0x22b)](',\x20'));_0x41580a[_0x206a67(0x1ed)]>0x0&&!_0x549452[_0x206a67(0x23d)]&&console[_0x206a67(0x26e)]('\x20\x20Activations:\x20'+_0x41580a[_0x206a67(0x22b)](',\x20'));if(_0x326992){const _0xfd5fe1=getConsoleNextUrl(_0x549452[_0x206a67(0x26f)],_0x206a67(0x243)+_0x47c05a+_0x206a67(0x270)+_0x326992+'/sb/da/esr');console[_0x206a67(0x26e)]('\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20'+a35_0x34fe77['cyan'](_0xfd5fe1));}return 0x0;}}
|
|
1
|
+
const a35_0x16cda1=a35_0x4462;(function(_0x4f87ff,_0x285cc6){const _0x4d4e6a=a35_0x4462,_0x16662c=_0x4f87ff();while(!![]){try{const _0x3703d6=-parseInt(_0x4d4e6a(0x247))/0x1+parseInt(_0x4d4e6a(0x229))/0x2+parseInt(_0x4d4e6a(0x20b))/0x3+-parseInt(_0x4d4e6a(0x245))/0x4*(-parseInt(_0x4d4e6a(0x1f6))/0x5)+parseInt(_0x4d4e6a(0x1f0))/0x6+parseInt(_0x4d4e6a(0x24f))/0x7+-parseInt(_0x4d4e6a(0x262))/0x8;if(_0x3703d6===_0x285cc6)break;else _0x16662c['push'](_0x16662c['shift']());}catch(_0x203a29){_0x16662c['push'](_0x16662c['shift']());}}}(a35_0x12bd,0xc0054));function a35_0x12bd(){const _0x16385d=['nameToId','parentFolder','New\x20journey:','392439GVzzrT','\x20\x20🗺️\x20\x20Journeys:','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','versionNumber','segment\x20or\x20journey','listFolders','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','type','delete','dryRun','changed','\x20activations]','\x20YAML\x20files\x20found','parent_name','helpText','unchanged','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','deleted','\x0aError:','message','listSegments','\x27...','user','createdAt','\x0a✔\x20Push\x20complete','toString','then','Error\x20parsing\x20YAML:\x20','audienceId','no_parent','1699338kenkak','description','\x20to\x20create','/sb/da/esr','Folders\x20to\x20create:','results','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','journeys','journeyBundleId','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','\x20new','isScoped','execute','Delete\x20segment:','\x20to\x20delete','buildUserMaps','add','push','journeyId','segment:push','Usage:\x20tdx\x20sg\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20(requires\x20context)','(Journey\x20will\x20be\x20deleted)','\x20to\x20update','Fetching\x20existing\x20activations...','Fetching\x20existing\x20data...','data','Fetching\x20connections\x20for\x20name\x20resolution...','Error:\x20Directory\x20not\x20found:\x20','11708jJyXYo','map','526607bNQcOv','yamlConfig','segment','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','join','activations','.yml','setPhase','9448327SgARIh','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20segment\x20file','errorCode','attributes','journeyBundleName','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','length','\x20updated','Push\x20','parentName','green','scopedFolderPath','folderPath','\x20\x20Activations:','/app/ps/','updated','filter','listActivations','Error:\x20','19484352XtxZxS','created','site','\x20created','cyan','\x20\x20Activations:\x20','\x20deleted','toDelete','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','\x20\x20\x20\x20','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','journey','getParent','Changes\x20to:','error','toUpdate','segmentFolderId','.yaml','idToName','file','Site:\x20','get','yellow','New\x20segment:','targetDir','listJourneysWithDetailsFromParentSegment','all','state','existingSegment','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','\x0aValidation\x20failed:','\x20\x20📊\x20Segments:','diff','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','name','Resolving\x20parent\x20segment\x20\x27','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','/e/','updatedAt','existingJourney','red','/j/da/je','3435126emiNrB','\x20changes?','getJourney','\x0aPush\x20summary\x20for\x20\x27','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','blue','1445hGxYGk','\x20unchanged','connection','createdSegmentIds','journeysOnly','verbose','No\x20','segments','dim','isNew','getOutputSchemaWithCache','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','\x20\x20Journeys:\x20','repeat','new','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','\x20changed','Preparing\x20journeys...'];a35_0x12bd=function(){return _0x16385d;};return a35_0x12bd();}import{BaseCommand}from'./command.js';import{withSpinner,withProgressSpinner}from'../utils/spinner.js';import{generateDiff,formatDiffWithColors}from'../utils/diff.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{batchAsync}from'../utils/async.js';import{segmentToYamlString,segmentWithActivationsToYaml}from'../sdk/segment/child-segment-yaml.js';import a35_0x5d6580 from'chalk';import{existsSync}from'fs';function a35_0x4462(_0x3ba3fd,_0x20d75d){_0x3ba3fd=_0x3ba3fd-0x1e5;const _0x12bdf3=a35_0x12bd();let _0x4462ef=_0x12bdf3[_0x3ba3fd];return _0x4462ef;}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import{resolveTarget,isSuccessfulResolution,getScopedDetails}from'../sdk/segment/target-resolution.js';import{buildFolderMaps}from'../sdk/segment/resolution-context.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{resolveTDFolderPath,findSegmentsToDelete,findJourneysToDelete,buildSegmentLookupMap,buildSegmentNameToIdMap,buildJourneyBundleLookupMap,parseAndClassifyYamlFiles,validateParsedFiles,formatValidationErrors,extractRootFolderId,buildConnectionMaps,calculatePushStats,prepareSegmentFiles,prepareJourneyFiles,executePushSegments,executePushFolders,executePushSegmentDeletions,executePushJourneys}from'../sdk/segment/push-workflow.js';export class SegmentPushCommand extends BaseCommand{[a35_0x16cda1(0x1e8)]=a35_0x16cda1(0x23c);[a35_0x16cda1(0x22a)]=a35_0x16cda1(0x211);async[a35_0x16cda1(0x235)](_0x12f78b){const _0x51963d=a35_0x16cda1,{options:_0x4fa69f,args:_0x29f460,tdx:_0x501d76}=_0x12f78b,_0x586acc=_0x4fa69f,_0x3af288=await resolveTarget({'arg':_0x29f460[0x0],'contextParent':_0x4fa69f['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x3af288))return _0x3af288[_0x51963d(0x251)]===_0x51963d(0x228)?(console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x21b))),console[_0x51963d(0x270)](_0x51963d(0x23d)),console[_0x51963d(0x270)](_0x51963d(0x201)),console[_0x51963d(0x270)](_0x51963d(0x250))):(console['error'](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x261)+_0x3af288[_0x51963d(0x21e)]+'\x0a')),_0x3af288[_0x51963d(0x219)]&&console[_0x51963d(0x270)](a35_0x5d6580['cyan'](_0x3af288[_0x51963d(0x219)]))),0x1;if(_0x3af288['type']===_0x51963d(0x218))return console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)]('Error:\x20Directory\x20not\x20found:\x20'+_0x3af288[_0x51963d(0x27a)]+'\x0a')),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x266)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;const _0x39fbde=_0x3af288[_0x51963d(0x258)],_0x108f0f=_0x3af288[_0x51963d(0x27a)],_0x304180=_0x3af288[_0x51963d(0x212)]===_0x51963d(0x275)?_0x3af288['filePath']:undefined,_0xad1551=getScopedDetails(_0x3af288),_0x2cd0ae=_0xad1551?.[_0x51963d(0x234)]??![],_0x44cd79=_0xad1551?.[_0x51963d(0x25a)]??'';if(!existsSync(_0x108f0f))return console[_0x51963d(0x270)](a35_0x5d6580['red'](_0x51963d(0x244)+_0x108f0f+'\x0a')),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x266)](_0x51963d(0x26a))),0x1;_0x586acc[_0x51963d(0x1fb)]&&(console['error'](_0x51963d(0x276)+_0x586acc['site']),console[_0x51963d(0x270)]('Parent\x20segment:\x20'+_0x39fbde),console[_0x51963d(0x270)]('Source\x20directory:\x20'+_0x108f0f),_0x2cd0ae&&console[_0x51963d(0x270)]('Scoped\x20to\x20folder:\x20'+_0x44cd79));const _0x886ba6=await withSpinner(_0x51963d(0x1e9)+_0x39fbde+_0x51963d(0x220),()=>_0x501d76[_0x51963d(0x249)]['resolveParentId'](_0x39fbde),{'verbose':_0x586acc[_0x51963d(0x1fb)]}),_0x169f03=_0x886ba6['data'],{parentSegmentResult:_0x43f834,segmentsResult:_0x252a4f,foldersResult:_0x3ea2dd,journeysWithDetailsResult:_0x16d791,userMaps:_0x2849fa}=await withSpinner(_0x51963d(0x241),async()=>{const _0x16c675=_0x51963d,[_0x448f00,_0x1d17fa,_0x473786,_0x122990,_0x562a8e]=await Promise[_0x16c675(0x27c)]([_0x501d76['segment'][_0x16c675(0x26e)](_0x169f03),_0x501d76['segment'][_0x16c675(0x21f)](_0x169f03),_0x501d76[_0x16c675(0x249)][_0x16c675(0x210)](_0x169f03),_0x501d76[_0x16c675(0x26d)][_0x16c675(0x27b)](_0x169f03,{'includeAllVersions':!![]}),_0x501d76[_0x16c675(0x221)][_0x16c675(0x238)]()]);return{'parentSegmentResult':_0x448f00,'segmentsResult':_0x1d17fa,'foldersResult':_0x473786,'journeysWithDetailsResult':_0x122990,'userMaps':_0x562a8e};},{'verbose':_0x586acc[_0x51963d(0x1fb)]})['then'](_0x2250d=>_0x2250d[_0x51963d(0x242)]),_0x527d14=_0x43f834,_0x2e277c=extractRootFolderId(_0x527d14),_0x4ff995=_0x252a4f,_0xcca10c=_0x3ea2dd,{journeys:_0x1e1a35,activationStepsById:_0x28a4dd}=_0x16d791,_0x57fccc=new Map(_0x1e1a35[_0x51963d(0x246)](_0x25fe95=>[_0x25fe95['id'],_0x25fe95])),_0x4b5746=_0x1e1a35[_0x51963d(0x246)](_0x3356b1=>({'id':_0x3356b1['id'],'name':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x1e8)],'journeyBundleName':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x253)]||'','journeyBundleId':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x231)]||'','versionNumber':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x20e)],'description':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x22a)],'state':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x27d)],'paused':_0x3356b1[_0x51963d(0x252)]['paused'],'audienceId':_0x3356b1['attributes'][_0x51963d(0x227)],'folderId':_0x3356b1['relationships']?.[_0x51963d(0x209)]?.[_0x51963d(0x242)]?.['id'],'createdAt':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x222)],'updatedAt':_0x3356b1[_0x51963d(0x252)][_0x51963d(0x1ec)]})),{emailToId:_0x54815f,idToEmail:_0x264422}=_0x2849fa,_0x3365c2=await withSpinner(_0x51963d(0x243),async()=>{const _0x4209ab=_0x51963d,_0x5eca4b=await _0x501d76[_0x4209ab(0x1f8)]['list']();return buildConnectionMaps(_0x5eca4b);},{'verbose':_0x586acc[_0x51963d(0x1fb)]})[_0x51963d(0x225)](_0x34016e=>_0x34016e['data']),_0x22e886=_0x3365c2[_0x51963d(0x208)],_0x154c86=_0x3365c2[_0x51963d(0x274)],_0xea5794=_0x3365c2['nameToType'],_0x3e2586={'emailToIdMap':_0x54815f,'connectionNameToIdMap':_0x22e886,'connectionNameToTypeMap':_0xea5794,'getSchema':_0x24717a=>_0x501d76['connection'][_0x51963d(0x200)](_0x24717a)};let {pathToId:_0x44335d,idToPath:_0x2cec11}=buildFolderMaps(_0xcca10c);const _0x4c1719=buildSegmentLookupMap(_0x4ff995,_0x2cec11),_0x38df0e=buildSegmentNameToIdMap(_0x4ff995),_0x3aac25=buildJourneyBundleLookupMap(_0x4b5746,_0x2cec11);let _0x5ae501;if(_0x304180){if(!_0x304180['endsWith'](_0x51963d(0x24d))&&!_0x304180['endsWith'](_0x51963d(0x273)))return console[_0x51963d(0x270)](a35_0x5d6580['red'](_0x51963d(0x1e7)+_0x304180+'\x0a')),0x1;_0x5ae501=[_0x304180];}else _0x5ae501=findYamlFiles(_0x108f0f);if(_0x5ae501['length']===0x0)return console[_0x51963d(0x270)](a35_0x5d6580['red'](_0x51963d(0x22f)+_0x108f0f+'\x0a')),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x266)](_0x51963d(0x27f))),0x1;let _0x3a3196,_0x415cab;try{const _0x1b5b98=parseAndClassifyYamlFiles(_0x5ae501,_0x108f0f,{'skipSegments':_0x586acc[_0x51963d(0x1fa)]});_0x3a3196=_0x1b5b98[_0x51963d(0x1fd)],_0x415cab=_0x1b5b98['journeys'];const _0x24dea0=validateParsedFiles(_0x1b5b98,_0x108f0f);if(_0x24dea0[_0x51963d(0x255)]>0x0)return console['error'](a35_0x5d6580['red'](_0x51963d(0x280))),console[_0x51963d(0x270)](formatValidationErrors(_0x24dea0)),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x20d))),0x1;}catch(_0x4e93a4){return console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x226)+(_0x4e93a4 instanceof Error?_0x4e93a4[_0x51963d(0x21e)]:_0x4e93a4))),0x1;}if(_0x3a3196[_0x51963d(0x255)]===0x0&&_0x415cab[_0x51963d(0x255)]===0x0){const _0x30abbd=_0x586acc[_0x51963d(0x1fa)]?'journey':_0x51963d(0x20f);return console['error'](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x1fc)+_0x30abbd+_0x51963d(0x217))),0x0;}const _0x24cc19=new Map();_0x4ff995[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&await withSpinner(_0x51963d(0x240),async()=>{await batchAsync(_0x4ff995,async _0x23abef=>{const _0x2d9b80=a35_0x4462,_0x3ecff6=await _0x501d76[_0x2d9b80(0x249)][_0x2d9b80(0x260)](_0x169f03,_0x23abef['id']);_0x24cc19['set'](_0x23abef['id'],_0x3ecff6);});},{'verbose':_0x586acc[_0x51963d(0x1fb)]});const {segmentFiles:_0x5ba468,foldersToCreate:_0x34cf54}=await prepareSegmentFiles(_0x3a3196,{'segmentByFolderAndName':_0x4c1719,'activationsBySegmentId':_0x24cc19,'folderPathToId':_0x44335d,'idToEmailMap':_0x264422,'connectionIdToNameMap':_0x154c86},_0x3e2586,_0x2cd0ae,_0x44cd79),_0x257e9b=_0x304180?[]:findSegmentsToDelete(_0x4ff995,_0x3a3196['map'](({yamlConfig:_0x553808,folderPath:_0x7e84b7})=>({'yamlConfig':_0x553808,'folderPath':resolveTDFolderPath(_0x7e84b7,_0x2cd0ae,_0x44cd79)})),_0x2cec11,_0x44cd79,_0x2cd0ae),{journeyFiles:_0x403169,foldersToCreate:_0x5f1bf3}=await withProgressSpinner(_0x51963d(0x207),async _0x41f327=>prepareJourneyFiles(_0x415cab,{'fetchJourney':async _0x50ec5c=>_0x501d76[_0x51963d(0x26d)][_0x51963d(0x1f2)](_0x50ec5c[_0x51963d(0x23b)]),'journeyBundlesByFolderAndName':_0x3aac25,'folderPathToId':_0x44335d,'idToEmailMap':_0x264422,'connectionIdToNameMap':_0x154c86,'existingSegments':_0x4ff995,'parentId':_0x169f03,'deps':_0x501d76,'progress':{'update':_0x281a87=>{const _0x3fa507=_0x51963d;_0x41f327[_0x3fa507(0x24e)](_0x281a87),_0x586acc[_0x3fa507(0x1fb)]&&console[_0x3fa507(0x270)]('\x20\x20'+_0x281a87);}},'journeyById':_0x57fccc,'activationStepsById':_0x28a4dd},_0x2cd0ae,_0x44cd79),{'verbose':_0x586acc[_0x51963d(0x1fb)]})[_0x51963d(0x225)](_0x57d389=>_0x57d389[_0x51963d(0x242)]);for(const _0x3bc117 of _0x5f1bf3){_0x34cf54[_0x51963d(0x239)](_0x3bc117);}const _0x19c8ef=_0x304180?[]:findJourneysToDelete(_0x4b5746,_0x415cab[_0x51963d(0x246)](({yamlConfig:_0x1ae5d7,folderPath:_0x5d9152})=>({'yamlConfig':_0x1ae5d7,'folderPath':resolveTDFolderPath(_0x5d9152,_0x2cd0ae,_0x44cd79)})),_0x2cec11,_0x44cd79,_0x2cd0ae),_0x1f73bf=calculatePushStats(_0x5ba468,_0x403169,_0x34cf54,_0x257e9b,_0x19c8ef,!!_0x586acc[_0x51963d(0x213)],!!_0x586acc[_0x51963d(0x1fa)]),_0x4a033e=_0x1f73bf[_0x51963d(0x1fd)][_0x51963d(0x204)],_0x5c788a=_0x1f73bf['segments'][_0x51963d(0x215)],_0x5247f8=_0x1f73bf[_0x51963d(0x1fd)][_0x51963d(0x21a)],_0x4d80ad=_0x1f73bf[_0x51963d(0x1fd)][_0x51963d(0x269)],_0x5d3275=_0x1f73bf['folders']['toCreate'],_0x26207a=_0x1f73bf[_0x51963d(0x230)]['new'],_0x57c657=_0x1f73bf['journeys'][_0x51963d(0x215)],_0x312aac=_0x1f73bf[_0x51963d(0x230)][_0x51963d(0x21a)],_0xb3cce4=_0x1f73bf[_0x51963d(0x230)]['toDelete'],_0x390c32=_0x1f73bf[_0x51963d(0x24c)][_0x51963d(0x27c)],_0x1193ca=_0x1f73bf[_0x51963d(0x24c)]['toCreate'],_0x237bcc=_0x1f73bf[_0x51963d(0x24c)][_0x51963d(0x271)],_0x4eabe1=_0x1f73bf['activations']['toDelete'];console['error'](_0x51963d(0x1f3)+_0x39fbde+'\x27:');_0x5d3275[_0x51963d(0x255)]>0x0&&console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x1f5)]('📁\x20'+_0x5d3275[_0x51963d(0x255)]+'\x20folders\x20to\x20create'));if(!_0x586acc[_0x51963d(0x1fa)]){console[_0x51963d(0x270)](_0x51963d(0x1e5)),console['error']('\x20\x20\x20\x20'+a35_0x5d6580['green']('+\x20'+_0x4a033e[_0x51963d(0x255)]+_0x51963d(0x233))),console['error']('\x20\x20\x20\x20'+a35_0x5d6580[_0x51963d(0x278)]('~\x20'+_0x5c788a[_0x51963d(0x255)]+'\x20changed'));if(_0x4d80ad[_0x51963d(0x255)]>0x0)console['error'](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x1ee)]('-\x20'+_0x4d80ad[_0x51963d(0x255)]+_0x51963d(0x237)));else _0x257e9b[_0x51963d(0x255)]>0x0&&!_0x586acc['delete']&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['dim'](_0x257e9b[_0x51963d(0x255)]+_0x51963d(0x232)));console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x1fe)]('=\x20'+_0x5247f8[_0x51963d(0x255)]+_0x51963d(0x1f7)));}if(_0x403169[_0x51963d(0x255)]>0x0||_0x19c8ef[_0x51963d(0x255)]>0x0){console['error'](_0x51963d(0x20c)),console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['green']('+\x20'+_0x26207a['length']+_0x51963d(0x233))),console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x278)]('~\x20'+_0x57c657['length']+_0x51963d(0x206)));if(_0xb3cce4[_0x51963d(0x255)]>0x0)console['error'](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x1ee)]('-\x20'+_0xb3cce4[_0x51963d(0x255)]+_0x51963d(0x237)));else _0x19c8ef['length']>0x0&&!_0x586acc[_0x51963d(0x213)]&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['dim'](_0x19c8ef[_0x51963d(0x255)]+_0x51963d(0x232)));console['error']('\x20\x20\x20\x20'+a35_0x5d6580['dim']('=\x20'+_0x312aac[_0x51963d(0x255)]+_0x51963d(0x1f7)));}_0x390c32['length']>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&(console['error'](''),console['error'](_0x51963d(0x25c)),_0x1193ca[_0x51963d(0x255)]>0x0&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580[_0x51963d(0x259)]('+\x20'+_0x1193ca[_0x51963d(0x255)]+_0x51963d(0x22b))),_0x237bcc[_0x51963d(0x255)]>0x0&&console['error']('\x20\x20\x20\x20'+a35_0x5d6580[_0x51963d(0x278)]('~\x20'+_0x237bcc['length']+_0x51963d(0x23f))),_0x4eabe1[_0x51963d(0x255)]>0x0&&console[_0x51963d(0x270)](_0x51963d(0x26b)+a35_0x5d6580['red']('-\x20'+_0x4eabe1[_0x51963d(0x255)]+_0x51963d(0x237))));console[_0x51963d(0x270)]('\x20\x20Source:\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x108f0f)+'\x0a');if(_0x5d3275['length']>0x0){console[_0x51963d(0x270)](_0x51963d(0x22d));for(const _0x5bd3e1 of _0x5d3275){console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x1f5)]('+')+'\x20'+_0x5bd3e1);}console[_0x51963d(0x270)]('');}if(_0x4a033e[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)])for(const _0x8b9f86 of _0x4a033e){const _0x3e070f=_0x8b9f86[_0x51963d(0x25b)]?_0x8b9f86[_0x51963d(0x25b)]+'/'+_0x8b9f86[_0x51963d(0x248)][_0x51963d(0x1e8)]:_0x8b9f86['yamlConfig']['name'],_0x416f42=_0x8b9f86[_0x51963d(0x248)][_0x51963d(0x24c)]?.[_0x51963d(0x255)]||0x0,_0x993e6a=_0x416f42>0x0?a35_0x5d6580[_0x51963d(0x1fe)]('\x20['+_0x416f42+_0x51963d(0x216)):'';console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x259)](_0x51963d(0x279))+'\x20'+_0x3e070f+_0x993e6a),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c)),_0x8b9f86['diff']&&console[_0x51963d(0x270)](_0x8b9f86[_0x51963d(0x1e6)]),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c));}if(_0x4d80ad[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)])for(const _0xa4834a of _0x4d80ad){const _0x58f6c7=_0xa4834a[_0x51963d(0x272)]?_0x2cec11[_0x51963d(0x277)](_0xa4834a[_0x51963d(0x272)][_0x51963d(0x224)]())||'':'',_0x1f6a09=_0x58f6c7?_0x58f6c7+'/'+_0xa4834a[_0x51963d(0x1e8)]:_0xa4834a[_0x51963d(0x1e8)],_0x470b18=_0x24cc19['get'](_0xa4834a['id'])||[],_0xdecee5=_0x470b18[_0x51963d(0x255)]>0x0?a35_0x5d6580[_0x51963d(0x1fe)]('\x20['+_0x470b18[_0x51963d(0x255)]+_0x51963d(0x216)):'';console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x236))+'\x20'+_0x1f6a09+_0xdecee5),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c));const _0x37fc8e=segmentWithActivationsToYaml(_0xa4834a,_0x470b18,undefined,_0x264422,_0x154c86),_0x5b1d17=segmentToYamlString(_0x37fc8e),_0xebeee4=generateDiff(_0x5b1d17,'');console[_0x51963d(0x270)](formatDiffWithColors(_0xebeee4)),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c));}const _0x5b28fc=_0x5ba468[_0x51963d(0x25f)](_0x3ad646=>!_0x3ad646[_0x51963d(0x1ff)]&&_0x3ad646[_0x51963d(0x1e6)]);if(_0x5b28fc[_0x51963d(0x255)]>0x0&&!_0x586acc['journeysOnly'])for(const _0x51b9cb of _0x5b28fc){const _0x11bf89=_0x51b9cb[_0x51963d(0x25b)]?_0x51b9cb[_0x51963d(0x25b)]+'/'+_0x51b9cb[_0x51963d(0x248)][_0x51963d(0x1e8)]:_0x51b9cb['yamlConfig'][_0x51963d(0x1e8)];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580['yellow'](_0x51963d(0x26f))+'\x20'+_0x11bf89),console[_0x51963d(0x270)]('─'['repeat'](0x3c)),console[_0x51963d(0x270)](_0x51b9cb[_0x51963d(0x1e6)]),console[_0x51963d(0x270)]('─'['repeat'](0x3c));}if(_0x26207a[_0x51963d(0x255)]>0x0)for(const _0x4367f0 of _0x26207a){const _0x1fc72f=_0x4367f0[_0x51963d(0x25b)]?_0x4367f0[_0x51963d(0x25b)]+'/'+_0x4367f0[_0x51963d(0x248)][_0x51963d(0x1e8)]:_0x4367f0['yamlConfig'][_0x51963d(0x1e8)];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x259)](_0x51963d(0x20a))+'\x20'+_0x1fc72f),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c)),_0x4367f0[_0x51963d(0x1e6)]&&console['error'](_0x4367f0['diff']),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c));}const _0x4d8a08=_0x403169[_0x51963d(0x25f)](_0x2c8bae=>!_0x2c8bae[_0x51963d(0x1ff)]&&_0x2c8bae[_0x51963d(0x1e6)]);if(_0x4d8a08[_0x51963d(0x255)]>0x0)for(const _0x4a81f0 of _0x4d8a08){const _0x2bb45c=_0x4a81f0[_0x51963d(0x25b)]?_0x4a81f0[_0x51963d(0x25b)]+'/'+_0x4a81f0['yamlConfig']['name']:_0x4a81f0[_0x51963d(0x248)][_0x51963d(0x1e8)];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x278)]('Changes\x20to\x20journey:')+'\x20'+_0x2bb45c),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c)),console['error'](_0x4a81f0['diff']),console[_0x51963d(0x270)]('─'['repeat'](0x3c));}if(_0xb3cce4[_0x51963d(0x255)]>0x0)for(const _0x5aafd2 of _0xb3cce4){const _0x59c78e=_0x5aafd2['folderId']?_0x2cec11[_0x51963d(0x277)](_0x5aafd2['folderId'])||'':'',_0x1177d0=_0x59c78e?_0x59c78e+'/'+_0x5aafd2[_0x51963d(0x253)]:_0x5aafd2['journeyBundleName'];console[_0x51963d(0x270)]('\x0a'+a35_0x5d6580[_0x51963d(0x1ee)]('Delete\x20journey:')+'\x20'+_0x1177d0),console[_0x51963d(0x270)]('─'['repeat'](0x3c)),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x23e))),console[_0x51963d(0x270)]('─'[_0x51963d(0x203)](0x3c));}if(_0x586acc[_0x51963d(0x214)])return console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)](_0x51963d(0x1ea))),0x0;const _0xe3b2a7=_0x586acc[_0x51963d(0x1fa)]?![]:_0x4a033e[_0x51963d(0x255)]>0x0||_0x5c788a[_0x51963d(0x255)]>0x0||_0x4d80ad[_0x51963d(0x255)]>0x0,_0x2eaa2e=_0x26207a[_0x51963d(0x255)]>0x0||_0x57c657['length']>0x0||_0xb3cce4[_0x51963d(0x255)]>0x0,_0x38f65c=_0x586acc['journeysOnly']?![]:_0x390c32[_0x51963d(0x255)]>0x0,_0x396530=_0x5d3275['length']>0x0;if(!_0xe3b2a7&&!_0x2eaa2e&&!_0x38f65c&&!_0x396530){const _0x33e1b9=_0x586acc[_0x51963d(0x1fa)]?_0x51963d(0x254):_0x51963d(0x26c);console[_0x51963d(0x270)](a35_0x5d6580['green'](_0x33e1b9));if(_0x304180&&_0x5247f8[_0x51963d(0x255)]===0x1){const _0x5200a1=_0x5247f8[0x0];if(_0x5200a1[_0x51963d(0x27e)]?.['id']){const _0x23c90d=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+'/e/'+_0x5200a1['existingSegment']['id']+_0x51963d(0x22c));console[_0x51963d(0x270)]('\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x23c90d));}}if(_0x304180&&_0x312aac['length']===0x1){const _0x58c314=_0x312aac[0x0];if(_0x58c314['existingJourney']?.['id']){const _0x4077ef=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+_0x51963d(0x1eb)+_0x58c314[_0x51963d(0x1ed)]['id']+'/j/da/je');console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x4077ef));}}return 0x0;}const _0x1afbdd=_0x586acc[_0x51963d(0x1fa)]?_0x26207a[_0x51963d(0x255)]+_0x57c657[_0x51963d(0x255)]+_0xb3cce4[_0x51963d(0x255)]+_0x5d3275[_0x51963d(0x255)]:_0x4a033e['length']+_0x5c788a['length']+_0x4d80ad[_0x51963d(0x255)]+_0x26207a[_0x51963d(0x255)]+_0x57c657['length']+_0xb3cce4[_0x51963d(0x255)]+_0x5d3275['length']+_0x390c32['length'];if(!_0x586acc['yes']&&_0x1afbdd>0x0){if(!isInteractive())return console['error'](a35_0x5d6580[_0x51963d(0x1ee)](_0x51963d(0x21d)),_0x51963d(0x24a)),console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1fe)](_0x51963d(0x1f4))),0x1;const _0x13df07=await confirmKey(_0x51963d(0x257)+_0x1afbdd+_0x51963d(0x1f1));if(!_0x13df07)return console['error'](a35_0x5d6580['yellow']('Aborted.')),0x1;}const _0x323a93={'withProgress':async(_0x5393df,_0x14b741)=>{const _0x3a00ff=_0x51963d,_0x1b16c7=await withSpinner(_0x5393df,_0x14b741,{'verbose':_0x586acc['verbose']});return{'data':_0x1b16c7[_0x3a00ff(0x242)]};},'logInfo':_0x24df40=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1f5)]('✔\x20'+_0x24df40)),'logSuccess':_0x483d8f=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x259)]('✔\x20'+_0x483d8f)),'logWarning':_0x40171b=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)]('⚠\x20'+_0x40171b)),'logDeleted':_0x42b325=>console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x1ee)]('✔\x20'+_0x42b325))},_0x48070c={'segment':_0x501d76[_0x51963d(0x249)],'journey':_0x501d76[_0x51963d(0x26d)],'user':_0x501d76[_0x51963d(0x221)],'connection':_0x501d76[_0x51963d(0x1f8)]};_0x5d3275[_0x51963d(0x255)]>0x0&&(_0x44335d=await executePushFolders(_0x48070c,_0x5d3275,_0x44335d,{'parentId':_0x169f03},_0x323a93));const _0x2c597a={'rootFolderId':_0x2e277c,'folderPathToId':_0x44335d,'folderIdToPath':_0x2cec11,'segmentNameToId':_0x38df0e,'activationsBySegmentId':_0x24cc19,'emailToIdMap':_0x54815f,'idToEmailMap':_0x264422,'connectionNameToIdMap':_0x3365c2[_0x51963d(0x208)],'connectionIdToNameMap':_0x3365c2[_0x51963d(0x274)],'connectionNameToTypeMap':_0xea5794},_0x15f0b0=await executePushSegments(_0x48070c,_0x586acc[_0x51963d(0x1fa)]?[]:_0x5ba468,_0x2c597a,{'parentId':_0x169f03},_0x323a93),_0x188155=_0x15f0b0[_0x51963d(0x263)],_0x1571f7=_0x15f0b0[_0x51963d(0x25e)],_0x38a659=_0x15f0b0[_0x51963d(0x24c)][_0x51963d(0x263)],_0x1c20ec=_0x15f0b0[_0x51963d(0x24c)][_0x51963d(0x25e)],_0x3afd67=_0x15f0b0[_0x51963d(0x24c)][_0x51963d(0x21c)];let _0x2d35a3;if(_0x304180&&_0x5ba468['length']===0x1){const _0xcb743e=_0x5ba468[0x0];_0x2d35a3=_0xcb743e[_0x51963d(0x27e)]?.['id']??_0x15f0b0[_0x51963d(0x1f9)][_0x51963d(0x277)](_0xcb743e[_0x51963d(0x248)][_0x51963d(0x1e8)]);}const _0x29c6a2=await executePushSegmentDeletions(_0x48070c,_0x586acc['journeysOnly']?[]:_0x4d80ad,_0x323a93);let _0x3104b1=0x0,_0xeb411d=0x0,_0x51548f=0x0;const _0x36ff5e=new Map(_0x38df0e);for(const [_0x234092,_0x31b29d]of _0x15f0b0[_0x51963d(0x1f9)]){_0x36ff5e['set'](_0x234092,_0x31b29d);}if(_0x403169['length']>0x0){const _0x3af011={..._0x2c597a,'segmentNameToId':_0x36ff5e,'existingSegments':_0x4ff995,'activationContext':_0x3e2586},_0x36a174=await executePushJourneys(_0x48070c,_0x403169,_0x3af011,{'parentId':_0x169f03,'rootFolderId':_0x2e277c,'verbose':_0x586acc['verbose']},_0x323a93);_0x3104b1=_0x36a174[_0x51963d(0x263)],_0xeb411d=_0x36a174['updated'];if(_0x304180&&_0x36a174[_0x51963d(0x22e)][_0x51963d(0x255)]===0x1){const _0x30fc45=_0x36a174[_0x51963d(0x22e)][0x0];if(_0x30fc45[_0x51963d(0x23b)]){const _0x72eabb=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+_0x51963d(0x1eb)+_0x30fc45['journeyId']+_0x51963d(0x1ef));console[_0x51963d(0x270)]('\x20\x20'+a35_0x5d6580[_0x51963d(0x266)](_0x72eabb));}}}for(const _0x2cdcc0 of _0xb3cce4){console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x278)]('⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x2cdcc0[_0x51963d(0x253)])),_0x51548f++;}const _0x46cd1f=[];if(_0x188155>0x0)_0x46cd1f[_0x51963d(0x23a)](_0x188155+_0x51963d(0x265));if(_0x1571f7>0x0)_0x46cd1f[_0x51963d(0x23a)](_0x1571f7+_0x51963d(0x256));if(_0x29c6a2>0x0)_0x46cd1f['push'](_0x29c6a2+_0x51963d(0x268));const _0x41770f=[];if(_0x3104b1>0x0)_0x41770f[_0x51963d(0x23a)](_0x3104b1+_0x51963d(0x265));if(_0xeb411d>0x0)_0x41770f[_0x51963d(0x23a)](_0xeb411d+'\x20updated');if(_0x51548f>0x0)_0x41770f['push'](_0x51548f+_0x51963d(0x268));const _0x67b9d3=[];if(_0x38a659>0x0)_0x67b9d3[_0x51963d(0x23a)](_0x38a659+'\x20created');if(_0x1c20ec>0x0)_0x67b9d3['push'](_0x1c20ec+_0x51963d(0x256));if(_0x3afd67>0x0)_0x67b9d3[_0x51963d(0x23a)](_0x3afd67+_0x51963d(0x268));console[_0x51963d(0x270)](a35_0x5d6580[_0x51963d(0x259)](_0x51963d(0x223)));_0x46cd1f[_0x51963d(0x255)]>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&console[_0x51963d(0x270)]('\x20\x20Segments:\x20'+_0x46cd1f[_0x51963d(0x24b)](',\x20'));_0x41770f['length']>0x0&&console['error'](_0x51963d(0x202)+_0x41770f[_0x51963d(0x24b)](',\x20'));_0x67b9d3['length']>0x0&&!_0x586acc[_0x51963d(0x1fa)]&&console[_0x51963d(0x270)](_0x51963d(0x267)+_0x67b9d3['join'](',\x20'));if(_0x2d35a3){const _0x172a3a=getConsoleNextUrl(_0x586acc[_0x51963d(0x264)],_0x51963d(0x25d)+_0x169f03+_0x51963d(0x1eb)+_0x2d35a3+_0x51963d(0x22c));console[_0x51963d(0x270)](_0x51963d(0x205)+a35_0x5d6580[_0x51963d(0x266)](_0x172a3a));}return 0x0;}}
|