@treasuredata/tdx 2026.4.14 → 2026.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +30 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a40_0x4726(_0x494dfd,_0x4f2453){_0x494dfd=_0x494dfd-0xa7;const _0x6227c5=a40_0x6227();let _0x4726f6=_0x6227c5[_0x494dfd];return _0x4726f6;}const a40_0x43d2b2=a40_0x4726;(function(_0x3e7266,_0x406b9c){const _0x32d9bc=a40_0x4726,_0x365e70=_0x3e7266();while(!![]){try{const _0x4c71cd=parseInt(_0x32d9bc(0xb6))/0x1*(-parseInt(_0x32d9bc(0xc0))/0x2)+-parseInt(_0x32d9bc(0xf2))/0x3+parseInt(_0x32d9bc(0xaf))/0x4*(parseInt(_0x32d9bc(0xd2))/0x5)+parseInt(_0x32d9bc(0xca))/0x6+-parseInt(_0x32d9bc(0xeb))/0x7*(parseInt(_0x32d9bc(0xdd))/0x8)+-parseInt(_0x32d9bc(0xd4))/0x9+-parseInt(_0x32d9bc(0xcc))/0xa*(-parseInt(_0x32d9bc(0xb8))/0xb);if(_0x4c71cd===_0x406b9c)break;else _0x365e70['push'](_0x365e70['shift']());}catch(_0x40160e){_0x365e70['push'](_0x365e70['shift']());}}}(a40_0x6227,0xca4b6));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 a40_0x2b5e9e from'chalk';function a40_0x6227(){const _0xe282f5=['pullSegments','no_parent','helpText','4804PsJGpE','isNew','filter','counts','\x20=\x20','name','session','729559CEPZnT','\x0aError:','220IMqSlw','✔\x20All\x20files\x20are\x20up\x20to\x20date','\x0aChanges\x20to\x20\x27','green','cyan','dim','Pulling\x20segments\x20from\x20\x27','Write\x20','2giiBux','absolutePath','\x20files\x20to\x20','\x20\x20🗺️\x20\x20','files','Error:\x20','\x20versions)','segment:pull','targetDir','journeys','5610912fcLdUZ','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<file_path>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20segment\x20file','1743540Tgbbjc','resourceName','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','relativePath','execute','data','5360TNTHTL','message','14245137jUWFzE','✔\x20Context\x20set:\x20','type','utf-8','\x20\x20🎯\x20','yellow','error','yes','length','24RgxuiX','hasChanges','\x27...','journeyVersions','\x20\x20Target:\x20','Aborted.','parent_segment','\x20segments','No\x20segments\x20or\x20journeys\x20found\x20in\x20parent\x20segment\x20\x27','dryRun','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','dirname','verbose','setPhase','3584735HWGFeD','\x20journeys','parentName','segments','\x20changed\x20files','cwd','✔\x20Pulled\x20','3097317RnQrQt','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)','Parent\x20segment:\x20','red','\x20new\x20files','\x20unchanged\x20files','Pull\x20child\x20segments\x20and\x20journeys\x20to\x20YAML\x20files','repeat'];a40_0x6227=function(){return _0xe282f5;};return a40_0x6227();}import{existsSync,mkdirSync,writeFileSync}from'fs';import a40_0x2ba1ee 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{[a40_0x43d2b2(0xb4)]=a40_0x43d2b2(0xc7);['description']=a40_0x43d2b2(0xaa);async[a40_0x43d2b2(0xd0)](_0x18348c){const _0x265e7b=a40_0x43d2b2,{options:_0x3e4e42,args:_0x29242b,tdx:_0x2d8ef9}=_0x18348c,_0x2fed27=_0x3e4e42,_0x1b3c62=await resolveTarget({'arg':_0x29242b[0x0],'contextParent':_0x3e4e42['parentSegment'],'cwd':process[_0x265e7b(0xf0)]()});if(!isSuccessfulResolution(_0x1b3c62))return _0x1b3c62['errorCode']===_0x265e7b(0xad)?(console[_0x265e7b(0xda)](a40_0x2b5e9e[_0x265e7b(0xd9)](_0x265e7b(0xe7))),console[_0x265e7b(0xda)](_0x265e7b(0xf3)),console[_0x265e7b(0xda)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20pull\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20segments\x20from\x20parent'),console[_0x265e7b(0xda)](_0x265e7b(0xcb))):(console[_0x265e7b(0xda)](a40_0x2b5e9e['red'](_0x265e7b(0xc5)+_0x1b3c62[_0x265e7b(0xd3)]+'\x0a')),_0x1b3c62[_0x265e7b(0xae)]&&console['error'](a40_0x2b5e9e['cyan'](_0x1b3c62['helpText']))),0x1;const _0x4bf822=_0x1b3c62[_0x265e7b(0xed)],_0x196b32=_0x1b3c62[_0x265e7b(0xc8)],_0x4c2c65=_0x1b3c62[_0x265e7b(0xd6)]==='file'?_0x1b3c62[_0x265e7b(0xcd)]:undefined;_0x2fed27[_0x265e7b(0xe9)]&&(console[_0x265e7b(0xda)]('Site:\x20'+_0x2fed27['site']),console[_0x265e7b(0xda)](_0x265e7b(0xf4)+_0x4bf822),_0x4c2c65&&console[_0x265e7b(0xda)]('Target\x20resource:\x20'+_0x4c2c65));const _0x15e2a3=await withProgressSpinner(_0x265e7b(0xbe)+_0x4bf822+_0x265e7b(0xdf),_0x1db543=>_0x2d8ef9['segment'][_0x265e7b(0xac)](_0x4bf822,{'targetDir':_0x196b32,'targetResourceName':_0x4c2c65,'verbose':_0x2fed27[_0x265e7b(0xe9)],'progress':{'update':_0x631e77=>{const _0x571ebc=_0x265e7b;_0x1db543[_0x571ebc(0xea)](_0x631e77),_0x2fed27[_0x571ebc(0xe9)]&&console[_0x571ebc(0xda)]('\x20\x20'+_0x631e77);}}}),{'verbose':_0x2fed27['verbose']}),_0x21ee89=_0x15e2a3[_0x265e7b(0xd1)];if(_0x21ee89[_0x265e7b(0xb2)][_0x265e7b(0xee)]===0x0&&_0x21ee89[_0x265e7b(0xb2)][_0x265e7b(0xc9)]===0x0)return console[_0x265e7b(0xda)](a40_0x2b5e9e[_0x265e7b(0xd9)](_0x265e7b(0xe5)+_0x21ee89[_0x265e7b(0xed)]+'\x27')),0x0;const _0x48224a=_0x21ee89[_0x265e7b(0xc4)][_0x265e7b(0xb1)](_0x25752c=>_0x25752c[_0x265e7b(0xb0)]),_0x4701cc=_0x21ee89['files'][_0x265e7b(0xb1)](_0x5354b2=>!_0x5354b2[_0x265e7b(0xb0)]&&_0x5354b2['hasChanges']),_0x4579a3=_0x21ee89[_0x265e7b(0xc4)]['filter'](_0x44fa0c=>!_0x44fa0c[_0x265e7b(0xb0)]&&!_0x44fa0c[_0x265e7b(0xde)]);console[_0x265e7b(0xda)]('\x0aPull\x20summary\x20for\x20\x27'+_0x21ee89[_0x265e7b(0xed)]+'\x27:'),console[_0x265e7b(0xda)](_0x265e7b(0xd8)+a40_0x2b5e9e[_0x265e7b(0xbc)](_0x21ee89['counts'][_0x265e7b(0xee)]+_0x265e7b(0xe4))+'\x20with\x20'+a40_0x2b5e9e[_0x265e7b(0xbc)](_0x21ee89[_0x265e7b(0xb2)]['activations']+'\x20activations'));if(_0x21ee89[_0x265e7b(0xb2)][_0x265e7b(0xc9)]>0x0){const _0x34cb7a=_0x21ee89['counts'][_0x265e7b(0xe0)]>_0x21ee89['counts']['journeys']?'\x20('+_0x21ee89[_0x265e7b(0xb2)]['journeyVersions']+_0x265e7b(0xc6):'';console[_0x265e7b(0xda)](_0x265e7b(0xc3)+a40_0x2b5e9e[_0x265e7b(0xbc)](_0x21ee89[_0x265e7b(0xb2)][_0x265e7b(0xc9)]+_0x265e7b(0xec))+a40_0x2b5e9e[_0x265e7b(0xbd)](_0x34cb7a));}console[_0x265e7b(0xda)]('\x20\x20'+a40_0x2b5e9e[_0x265e7b(0xbb)]('+\x20'+_0x48224a[_0x265e7b(0xdc)]+_0x265e7b(0xa8))),console[_0x265e7b(0xda)]('\x20\x20'+a40_0x2b5e9e[_0x265e7b(0xd9)]('~\x20'+_0x4701cc[_0x265e7b(0xdc)]+_0x265e7b(0xef))),console[_0x265e7b(0xda)]('\x20\x20'+a40_0x2b5e9e[_0x265e7b(0xbd)]('=\x20'+_0x4579a3[_0x265e7b(0xdc)]+_0x265e7b(0xa9))),console[_0x265e7b(0xda)](_0x265e7b(0xe1)+a40_0x2b5e9e['cyan'](_0x21ee89[_0x265e7b(0xc8)])+'\x0a');if(_0x4701cc[_0x265e7b(0xdc)]>0x0)for(const _0x393cfc of _0x4701cc){console[_0x265e7b(0xda)](_0x265e7b(0xba)+_0x393cfc[_0x265e7b(0xcf)]+'\x27:'),console[_0x265e7b(0xda)]('─'[_0x265e7b(0xab)](0x3c)),console[_0x265e7b(0xda)](_0x393cfc['diff']),console[_0x265e7b(0xda)]('─'[_0x265e7b(0xab)](0x3c));}if(_0x2fed27[_0x265e7b(0xe6)])return console['error'](a40_0x2b5e9e[_0x265e7b(0xd9)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x48224a[_0x265e7b(0xdc)]===0x0&&_0x4701cc[_0x265e7b(0xdc)]===0x0)return console[_0x265e7b(0xda)](a40_0x2b5e9e['green'](_0x265e7b(0xb9))),saveSessionContext({'parent_segment':_0x21ee89[_0x265e7b(0xed)]},_0x2fed27[_0x265e7b(0xb5)]),console['error'](a40_0x2b5e9e['green'](_0x265e7b(0xd5)+a40_0x2b5e9e['dim'](_0x265e7b(0xe3))+_0x265e7b(0xb3)+a40_0x2b5e9e['cyan'](_0x21ee89[_0x265e7b(0xed)]))),0x0;if(!_0x2fed27[_0x265e7b(0xdb)]){if(!isInteractive())return console['error'](a40_0x2b5e9e[_0x265e7b(0xa7)](_0x265e7b(0xb7)),_0x265e7b(0xce)),console[_0x265e7b(0xda)](a40_0x2b5e9e[_0x265e7b(0xbd)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3152a=await confirmKey(_0x265e7b(0xbf)+(_0x48224a[_0x265e7b(0xdc)]+_0x4701cc['length'])+'\x20files?');if(!_0x3152a)return console[_0x265e7b(0xda)](a40_0x2b5e9e[_0x265e7b(0xd9)](_0x265e7b(0xe2)),'-\x20no\x20files\x20written'),0x1;}for(const _0x152cd2 of _0x21ee89[_0x265e7b(0xc4)]){if(_0x152cd2[_0x265e7b(0xb0)]||_0x152cd2['hasChanges']){const _0x3e4c2e=a40_0x2ba1ee[_0x265e7b(0xe8)](_0x152cd2[_0x265e7b(0xc1)]);!existsSync(_0x3e4c2e)&&mkdirSync(_0x3e4c2e,{'recursive':!![]}),writeFileSync(_0x152cd2[_0x265e7b(0xc1)],_0x152cd2['content'],_0x265e7b(0xd7));}}return console[_0x265e7b(0xda)](a40_0x2b5e9e[_0x265e7b(0xbb)](_0x265e7b(0xf1)+(_0x48224a[_0x265e7b(0xdc)]+_0x4701cc['length'])+_0x265e7b(0xc2)+_0x21ee89[_0x265e7b(0xc8)])),saveSessionContext({'parent_segment':_0x21ee89['parentName']},_0x2fed27[_0x265e7b(0xb5)]),console[_0x265e7b(0xda)](a40_0x2b5e9e[_0x265e7b(0xbb)](_0x265e7b(0xd5)+a40_0x2b5e9e[_0x265e7b(0xbd)](_0x265e7b(0xe3))+'\x20=\x20'+a40_0x2b5e9e[_0x265e7b(0xbc)](_0x21ee89[_0x265e7b(0xed)]))),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x4491ab=a41_0x4e8e;(function(_0x291a87,_0x231c4c){const _0xff7f1f=a41_0x4e8e,_0x3498a8=_0x291a87();while(!![]){try{const _0x2fc4a9=-parseInt(_0xff7f1f(0x20f))/0x1+-parseInt(_0xff7f1f(0x223))/0x2*(parseInt(_0xff7f1f(0x1df))/0x3)+parseInt(_0xff7f1f(0x258))/0x4+-parseInt(_0xff7f1f(0x1d9))/0x5*(-parseInt(_0xff7f1f(0x227))/0x6)+parseInt(_0xff7f1f(0x232))/0x7+parseInt(_0xff7f1f(0x256))/0x8+-parseInt(_0xff7f1f(0x1e0))/0x9;if(_0x2fc4a9===_0x231c4c)break;else _0x3498a8['push'](_0x3498a8['shift']());}catch(_0x106baa){_0x3498a8['push'](_0x3498a8['shift']());}}}(a41_0x463c,0x76dd0));import{BaseCommand}from'./command.js';function a41_0x463c(){const _0x5599cc=['Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','created','folderId','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','Scoped\x20to\x20folder:\x20','endsWith','filter','data','description','Error:\x20','targetDir','\x20created','parentSegment','\x20changed','Resolving\x20parent\x20segment\x20\x27','yamlConfig','attributes','existingSegment','journeysOnly','journeyBundleName','/e/','createdSegmentIds','repeat','add','get','Changes\x20to\x20journey:','deleted','journeys','parentFolder','.yaml','419312tCYrZc','diff','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','segment:push','folderPath','connection','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','unchanged','/app/ps/','📁\x20','execute','⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20','toUpdate','list','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','all','then','Fetching\x20existing\x20activations...','Folders\x20to\x20create:','existingJourney','6316LgnUqz','\x20deleted','Error:\x20Directory\x20not\x20found:\x20','dryRun','102DzeMEv','new','name','/j/da/je','segments','\x20updated','Fetching\x20existing\x20data...','versionNumber','toDelete','segment','audienceId','4693857OuLWtE','folders','site','user','listActivations','idToName','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','activations','\x0aValidation\x20failed:','(Journey\x20will\x20be\x20deleted)','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','.yml','\x0a✔\x20Push\x20complete','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','delete','listJourneysWithDetailsFromParentSegment','\x20to\x20update','journeyId','getOutputSchemaWithCache','nameToType','set','state','\x20\x20\x20\x20','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20to\x20delete','Aborted.','\x20new','journeyBundleId','red','yellow','\x20YAML\x20files\x20found','error','New\x20segment:','type','nameToId','toCreate','724984KWCOkH','Delete\x20segment:','1708620FPBOyh','map','cyan','/sb/da/esr','segmentFolderId','updated','changed','setPhase','push','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','Parent\x20segment:\x20','join','file','createdAt','green','Changes\x20to:','Push\x20','errorCode','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','message','\x20\x20Activations:','parent_name','dim','109415lRcTLO','isScoped','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','length','\x20\x20Activations:\x20','paused','420vtNhlc','1908396guZvtf','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','getJourney','\x20\x20📊\x20Segments:','\x20unchanged','resolveParentId','blue','verbose','filePath','helpText','relationships','Site:\x20','isNew','journey','toString','listSegments','listFolders'];a41_0x463c=function(){return _0x5599cc;};return a41_0x463c();}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 a41_0x46fc59 from'chalk';function a41_0x4e8e(_0x40459b,_0x4e5d4c){_0x40459b=_0x40459b-0x1d3;const _0x463cb0=a41_0x463c();let _0x4e8e2b=_0x463cb0[_0x40459b];return _0x4e8e2b;}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{[a41_0x4491ab(0x229)]=a41_0x4491ab(0x212);[a41_0x4491ab(0x1f9)]=a41_0x4491ab(0x1f4);async[a41_0x4491ab(0x219)](_0x11fb34){const _0x28cbf7=a41_0x4491ab,{options:_0x11a60e,args:_0x1e6f4e,tdx:_0x5bef7a}=_0x11fb34,_0x9b0375=_0x11a60e,_0x4716a4=await resolveTarget({'arg':_0x1e6f4e[0x0],'contextParent':_0x11a60e[_0x28cbf7(0x1fd)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x4716a4))return _0x4716a4[_0x28cbf7(0x1d3)]==='no_parent'?(console[_0x28cbf7(0x251)](a41_0x46fc59['yellow'](_0x28cbf7(0x215))),console[_0x28cbf7(0x251)]('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)'),console['error'](_0x28cbf7(0x23c)),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[_0x28cbf7(0x251)](a41_0x46fc59['red'](_0x28cbf7(0x1fa)+_0x4716a4[_0x28cbf7(0x1d5)]+'\x0a')),_0x4716a4[_0x28cbf7(0x1e9)]&&console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x25a)](_0x4716a4['helpText']))),0x1;if(_0x4716a4[_0x28cbf7(0x253)]===_0x28cbf7(0x1d7))return console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24e)](_0x28cbf7(0x225)+_0x4716a4['targetDir']+'\x0a')),console['error'](a41_0x46fc59[_0x28cbf7(0x25a)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;const _0x3c5720=_0x4716a4['parentName'],_0x47f69a=_0x4716a4[_0x28cbf7(0x1fb)],_0x4f2ac1=_0x4716a4[_0x28cbf7(0x253)]===_0x28cbf7(0x264)?_0x4716a4[_0x28cbf7(0x1e8)]:undefined,_0x1f3325=getScopedDetails(_0x4716a4),_0x2212c8=_0x1f3325?.[_0x28cbf7(0x1da)]??![],_0x598ad2=_0x1f3325?.['scopedFolderPath']??'';if(!existsSync(_0x47f69a))return console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24e)](_0x28cbf7(0x225)+_0x47f69a+'\x0a')),console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x25a)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;_0x9b0375['verbose']&&(console[_0x28cbf7(0x251)](_0x28cbf7(0x1eb)+_0x9b0375[_0x28cbf7(0x234)]),console[_0x28cbf7(0x251)](_0x28cbf7(0x262)+_0x3c5720),console['error']('Source\x20directory:\x20'+_0x47f69a),_0x2212c8&&console[_0x28cbf7(0x251)](_0x28cbf7(0x1f5)+_0x598ad2));const _0x36b955=await withSpinner(_0x28cbf7(0x1ff)+_0x3c5720+'\x27...',()=>_0x5bef7a[_0x28cbf7(0x230)][_0x28cbf7(0x1e5)](_0x3c5720),{'verbose':_0x9b0375[_0x28cbf7(0x1e7)]}),_0x5d7710=_0x36b955[_0x28cbf7(0x1f8)],{parentSegmentResult:_0x51c51a,segmentsResult:_0x3d98d6,foldersResult:_0x2fdc22,journeysWithDetailsResult:_0x269078,userMaps:_0x363391}=await withSpinner(_0x28cbf7(0x22d),async()=>{const _0x5f4329=_0x28cbf7,[_0x48842c,_0x26bb24,_0x167697,_0x1aa8bb,_0x267c3a]=await Promise[_0x5f4329(0x21e)]([_0x5bef7a[_0x5f4329(0x230)]['getParent'](_0x5d7710),_0x5bef7a[_0x5f4329(0x230)][_0x5f4329(0x1ef)](_0x5d7710),_0x5bef7a['segment'][_0x5f4329(0x1f0)](_0x5d7710),_0x5bef7a[_0x5f4329(0x1ed)][_0x5f4329(0x241)](_0x5d7710,{'includeAllVersions':!![]}),_0x5bef7a[_0x5f4329(0x235)]['buildUserMaps']()]);return{'parentSegmentResult':_0x48842c,'segmentsResult':_0x26bb24,'foldersResult':_0x167697,'journeysWithDetailsResult':_0x1aa8bb,'userMaps':_0x267c3a};},{'verbose':_0x9b0375[_0x28cbf7(0x1e7)]})[_0x28cbf7(0x21f)](_0xa59d34=>_0xa59d34['data']),_0x37364c=_0x51c51a,_0x14713b=extractRootFolderId(_0x37364c),_0x1f9237=_0x3d98d6,_0x2605b2=_0x2fdc22,{journeys:_0x3e33af,activationStepsById:_0x1d7141}=_0x269078,_0x492ea1=new Map(_0x3e33af[_0x28cbf7(0x259)](_0x2d4a78=>[_0x2d4a78['id'],_0x2d4a78])),_0xb13528=_0x3e33af[_0x28cbf7(0x259)](_0x1e0ea2=>({'id':_0x1e0ea2['id'],'name':_0x1e0ea2['attributes'][_0x28cbf7(0x229)],'journeyBundleName':_0x1e0ea2[_0x28cbf7(0x201)][_0x28cbf7(0x204)]||'','journeyBundleId':_0x1e0ea2[_0x28cbf7(0x201)][_0x28cbf7(0x24d)]||'','versionNumber':_0x1e0ea2['attributes'][_0x28cbf7(0x22e)],'description':_0x1e0ea2[_0x28cbf7(0x201)]['description'],'state':_0x1e0ea2[_0x28cbf7(0x201)][_0x28cbf7(0x247)],'paused':_0x1e0ea2['attributes'][_0x28cbf7(0x1de)],'audienceId':_0x1e0ea2['attributes'][_0x28cbf7(0x231)],'folderId':_0x1e0ea2[_0x28cbf7(0x1ea)]?.[_0x28cbf7(0x20d)]?.[_0x28cbf7(0x1f8)]?.['id'],'createdAt':_0x1e0ea2[_0x28cbf7(0x201)][_0x28cbf7(0x265)],'updatedAt':_0x1e0ea2[_0x28cbf7(0x201)]['updatedAt']})),{emailToId:_0x25283b,idToEmail:_0x319809}=_0x363391,_0x2ebb65=await withSpinner('Fetching\x20connections\x20for\x20name\x20resolution...',async()=>{const _0x2e89da=_0x28cbf7,_0x4f56cc=await _0x5bef7a[_0x2e89da(0x214)][_0x2e89da(0x21c)]();return buildConnectionMaps(_0x4f56cc);},{'verbose':_0x9b0375[_0x28cbf7(0x1e7)]})[_0x28cbf7(0x21f)](_0x457ac9=>_0x457ac9['data']),_0x5d865f=_0x2ebb65[_0x28cbf7(0x254)],_0x3297ed=_0x2ebb65[_0x28cbf7(0x237)],_0x2c82a1=_0x2ebb65[_0x28cbf7(0x245)],_0x17c935={'emailToIdMap':_0x25283b,'connectionNameToIdMap':_0x5d865f,'connectionNameToTypeMap':_0x2c82a1,'getSchema':_0x42cff5=>_0x5bef7a['connection'][_0x28cbf7(0x244)](_0x42cff5)};let {pathToId:_0x396ab7,idToPath:_0x40a74e}=buildFolderMaps(_0x2605b2);const _0x50aac2=buildSegmentLookupMap(_0x1f9237,_0x40a74e),_0x1b9240=buildSegmentNameToIdMap(_0x1f9237),_0x1ac331=buildJourneyBundleLookupMap(_0xb13528,_0x40a74e);let _0x413e3d;if(_0x4f2ac1){if(!_0x4f2ac1[_0x28cbf7(0x1f6)](_0x28cbf7(0x23d))&&!_0x4f2ac1[_0x28cbf7(0x1f6)](_0x28cbf7(0x20e)))return console['error'](a41_0x46fc59[_0x28cbf7(0x24e)](_0x28cbf7(0x249)+_0x4f2ac1+'\x0a')),0x1;_0x413e3d=[_0x4f2ac1];}else _0x413e3d=findYamlFiles(_0x47f69a);if(_0x413e3d[_0x28cbf7(0x1dc)]===0x0)return console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24e)](_0x28cbf7(0x1d4)+_0x47f69a+'\x0a')),console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x25a)](_0x28cbf7(0x1f1))),0x1;let _0x15291f,_0x58d7e1;try{const _0x1c1e7f=parseAndClassifyYamlFiles(_0x413e3d,_0x47f69a,{'skipSegments':_0x9b0375[_0x28cbf7(0x203)]});_0x15291f=_0x1c1e7f['segments'],_0x58d7e1=_0x1c1e7f[_0x28cbf7(0x20c)];const _0x36cf59=validateParsedFiles(_0x1c1e7f,_0x47f69a);if(_0x36cf59[_0x28cbf7(0x1dc)]>0x0)return console[_0x28cbf7(0x251)](a41_0x46fc59['red'](_0x28cbf7(0x23a))),console['error'](formatValidationErrors(_0x36cf59)),console['error'](a41_0x46fc59[_0x28cbf7(0x24f)](_0x28cbf7(0x238))),0x1;}catch(_0x25b821){return console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24e)]('Error\x20parsing\x20YAML:\x20'+(_0x25b821 instanceof Error?_0x25b821['message']:_0x25b821))),0x1;}if(_0x15291f[_0x28cbf7(0x1dc)]===0x0&&_0x58d7e1[_0x28cbf7(0x1dc)]===0x0){const _0x3344d2=_0x9b0375[_0x28cbf7(0x203)]?_0x28cbf7(0x1ed):'segment\x20or\x20journey';return console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24f)]('No\x20'+_0x3344d2+_0x28cbf7(0x250))),0x0;}const _0x3b15c5=new Map();_0x1f9237[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375['journeysOnly']&&await withSpinner(_0x28cbf7(0x220),async()=>{await batchAsync(_0x1f9237,async _0x4e513d=>{const _0x154ec9=a41_0x4e8e,_0x23e492=await _0x5bef7a[_0x154ec9(0x230)][_0x154ec9(0x236)](_0x5d7710,_0x4e513d['id']);_0x3b15c5['set'](_0x4e513d['id'],_0x23e492);});},{'verbose':_0x9b0375[_0x28cbf7(0x1e7)]});const {segmentFiles:_0x12c4d9,foldersToCreate:_0x4d8d54}=await prepareSegmentFiles(_0x15291f,{'segmentByFolderAndName':_0x50aac2,'activationsBySegmentId':_0x3b15c5,'folderPathToId':_0x396ab7,'idToEmailMap':_0x319809,'connectionIdToNameMap':_0x3297ed},_0x17c935,_0x2212c8,_0x598ad2),_0x3cead4=_0x4f2ac1?[]:findSegmentsToDelete(_0x1f9237,_0x15291f[_0x28cbf7(0x259)](({yamlConfig:_0x3ca79e,folderPath:_0x1f606a})=>({'yamlConfig':_0x3ca79e,'folderPath':resolveTDFolderPath(_0x1f606a,_0x2212c8,_0x598ad2)})),_0x40a74e,_0x598ad2,_0x2212c8),{journeyFiles:_0x30c7fa,foldersToCreate:_0xd6a7d7}=await withProgressSpinner('Preparing\x20journeys...',async _0x1e13a4=>prepareJourneyFiles(_0x58d7e1,{'fetchJourney':async _0x9a7b68=>_0x5bef7a['journey'][_0x28cbf7(0x1e2)](_0x9a7b68[_0x28cbf7(0x243)]),'journeyBundlesByFolderAndName':_0x1ac331,'folderPathToId':_0x396ab7,'idToEmailMap':_0x319809,'connectionIdToNameMap':_0x3297ed,'existingSegments':_0x1f9237,'parentId':_0x5d7710,'deps':_0x5bef7a,'progress':{'update':_0x3bd06a=>{const _0x214f70=_0x28cbf7;_0x1e13a4[_0x214f70(0x25f)](_0x3bd06a),_0x9b0375['verbose']&&console[_0x214f70(0x251)]('\x20\x20'+_0x3bd06a);}},'journeyById':_0x492ea1,'activationStepsById':_0x1d7141},_0x2212c8,_0x598ad2),{'verbose':_0x9b0375[_0x28cbf7(0x1e7)]})[_0x28cbf7(0x21f)](_0x4b267b=>_0x4b267b[_0x28cbf7(0x1f8)]);for(const _0x4bc622 of _0xd6a7d7){_0x4d8d54[_0x28cbf7(0x208)](_0x4bc622);}const _0x52f2fd=_0x4f2ac1?[]:findJourneysToDelete(_0xb13528,_0x58d7e1[_0x28cbf7(0x259)](({yamlConfig:_0x535217,folderPath:_0x1b336e})=>({'yamlConfig':_0x535217,'folderPath':resolveTDFolderPath(_0x1b336e,_0x2212c8,_0x598ad2)})),_0x40a74e,_0x598ad2,_0x2212c8),_0x208ab4=calculatePushStats(_0x12c4d9,_0x30c7fa,_0x4d8d54,_0x3cead4,_0x52f2fd,!!_0x9b0375[_0x28cbf7(0x240)],!!_0x9b0375[_0x28cbf7(0x203)]),_0x41be80=_0x208ab4[_0x28cbf7(0x22b)][_0x28cbf7(0x228)],_0x20e116=_0x208ab4['segments'][_0x28cbf7(0x25e)],_0x2fc568=_0x208ab4[_0x28cbf7(0x22b)]['unchanged'],_0x3a5f30=_0x208ab4[_0x28cbf7(0x22b)][_0x28cbf7(0x22f)],_0x371043=_0x208ab4[_0x28cbf7(0x233)][_0x28cbf7(0x255)],_0x3a8bd7=_0x208ab4['journeys']['new'],_0x1d1325=_0x208ab4[_0x28cbf7(0x20c)][_0x28cbf7(0x25e)],_0x3791bd=_0x208ab4[_0x28cbf7(0x20c)][_0x28cbf7(0x216)],_0x5206be=_0x208ab4[_0x28cbf7(0x20c)][_0x28cbf7(0x22f)],_0x5af43f=_0x208ab4[_0x28cbf7(0x239)][_0x28cbf7(0x21e)],_0x4378a2=_0x208ab4['activations'][_0x28cbf7(0x255)],_0x30f667=_0x208ab4[_0x28cbf7(0x239)][_0x28cbf7(0x21b)],_0x52a4e3=_0x208ab4[_0x28cbf7(0x239)][_0x28cbf7(0x22f)];console[_0x28cbf7(0x251)]('\x0aPush\x20summary\x20for\x20\x27'+_0x3c5720+'\x27:');_0x371043[_0x28cbf7(0x1dc)]>0x0&&console['error']('\x20\x20'+a41_0x46fc59[_0x28cbf7(0x1e6)](_0x28cbf7(0x218)+_0x371043[_0x28cbf7(0x1dc)]+'\x20folders\x20to\x20create'));if(!_0x9b0375['journeysOnly']){console[_0x28cbf7(0x251)](_0x28cbf7(0x1e3)),console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x266)]('+\x20'+_0x41be80[_0x28cbf7(0x1dc)]+'\x20new')),console['error'](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x24f)]('~\x20'+_0x20e116[_0x28cbf7(0x1dc)]+_0x28cbf7(0x1fe)));if(_0x3a5f30[_0x28cbf7(0x1dc)]>0x0)console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x24e)]('-\x20'+_0x3a5f30[_0x28cbf7(0x1dc)]+_0x28cbf7(0x24a)));else _0x3cead4['length']>0x0&&!_0x9b0375[_0x28cbf7(0x240)]&&console[_0x28cbf7(0x251)]('\x20\x20\x20\x20'+a41_0x46fc59['dim'](_0x3cead4[_0x28cbf7(0x1dc)]+_0x28cbf7(0x211)));console[_0x28cbf7(0x251)]('\x20\x20\x20\x20'+a41_0x46fc59[_0x28cbf7(0x1d8)]('=\x20'+_0x2fc568[_0x28cbf7(0x1dc)]+_0x28cbf7(0x1e4)));}if(_0x30c7fa['length']>0x0||_0x52f2fd[_0x28cbf7(0x1dc)]>0x0){console[_0x28cbf7(0x251)]('\x20\x20🗺️\x20\x20Journeys:'),console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x266)]('+\x20'+_0x3a8bd7[_0x28cbf7(0x1dc)]+_0x28cbf7(0x24c))),console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x24f)]('~\x20'+_0x1d1325[_0x28cbf7(0x1dc)]+_0x28cbf7(0x1fe)));if(_0x5206be[_0x28cbf7(0x1dc)]>0x0)console['error'](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x24e)]('-\x20'+_0x5206be['length']+_0x28cbf7(0x24a)));else _0x52f2fd[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375[_0x28cbf7(0x240)]&&console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59[_0x28cbf7(0x1d8)](_0x52f2fd[_0x28cbf7(0x1dc)]+_0x28cbf7(0x211)));console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59['dim']('=\x20'+_0x3791bd[_0x28cbf7(0x1dc)]+_0x28cbf7(0x1e4)));}_0x5af43f[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375[_0x28cbf7(0x203)]&&(console[_0x28cbf7(0x251)](''),console[_0x28cbf7(0x251)](_0x28cbf7(0x1d6)),_0x4378a2[_0x28cbf7(0x1dc)]>0x0&&console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59['green']('+\x20'+_0x4378a2[_0x28cbf7(0x1dc)]+'\x20to\x20create')),_0x30f667['length']>0x0&&console[_0x28cbf7(0x251)]('\x20\x20\x20\x20'+a41_0x46fc59['yellow']('~\x20'+_0x30f667['length']+_0x28cbf7(0x242))),_0x52a4e3[_0x28cbf7(0x1dc)]>0x0&&console[_0x28cbf7(0x251)](_0x28cbf7(0x248)+a41_0x46fc59['red']('-\x20'+_0x52a4e3[_0x28cbf7(0x1dc)]+_0x28cbf7(0x24a))));console[_0x28cbf7(0x251)]('\x20\x20Source:\x20'+a41_0x46fc59[_0x28cbf7(0x25a)](_0x47f69a)+'\x0a');if(_0x371043['length']>0x0){console[_0x28cbf7(0x251)](_0x28cbf7(0x221));for(const _0x5e629f of _0x371043){console[_0x28cbf7(0x251)]('\x20\x20'+a41_0x46fc59['blue']('+')+'\x20'+_0x5e629f);}console['error']('');}if(_0x41be80[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375[_0x28cbf7(0x203)])for(const _0x67edc6 of _0x41be80){const _0x36ae6e=_0x67edc6['folderPath']?_0x67edc6[_0x28cbf7(0x213)]+'/'+_0x67edc6[_0x28cbf7(0x200)][_0x28cbf7(0x229)]:_0x67edc6['yamlConfig'][_0x28cbf7(0x229)],_0x36ff8e=_0x67edc6[_0x28cbf7(0x200)]['activations']?.[_0x28cbf7(0x1dc)]||0x0,_0x48f1d0=_0x36ff8e>0x0?a41_0x46fc59['dim']('\x20['+_0x36ff8e+'\x20activations]'):'';console[_0x28cbf7(0x251)]('\x0a'+a41_0x46fc59[_0x28cbf7(0x266)](_0x28cbf7(0x252))+'\x20'+_0x36ae6e+_0x48f1d0),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c)),_0x67edc6['diff']&&console[_0x28cbf7(0x251)](_0x67edc6[_0x28cbf7(0x210)]),console['error']('─'[_0x28cbf7(0x207)](0x3c));}if(_0x3a5f30[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375[_0x28cbf7(0x203)])for(const _0x4ae1eb of _0x3a5f30){const _0x4746a0=_0x4ae1eb[_0x28cbf7(0x25c)]?_0x40a74e[_0x28cbf7(0x209)](_0x4ae1eb[_0x28cbf7(0x25c)][_0x28cbf7(0x1ee)]())||'':'',_0x51b994=_0x4746a0?_0x4746a0+'/'+_0x4ae1eb[_0x28cbf7(0x229)]:_0x4ae1eb[_0x28cbf7(0x229)],_0x381d7f=_0x3b15c5['get'](_0x4ae1eb['id'])||[],_0x47f2c8=_0x381d7f[_0x28cbf7(0x1dc)]>0x0?a41_0x46fc59[_0x28cbf7(0x1d8)]('\x20['+_0x381d7f[_0x28cbf7(0x1dc)]+'\x20activations]'):'';console[_0x28cbf7(0x251)]('\x0a'+a41_0x46fc59['red'](_0x28cbf7(0x257))+'\x20'+_0x51b994+_0x47f2c8),console['error']('─'['repeat'](0x3c));const _0x55f2ea=segmentWithActivationsToYaml(_0x4ae1eb,_0x381d7f,undefined,_0x319809,_0x3297ed),_0x3b9b2a=segmentToYamlString(_0x55f2ea),_0x1632e0=generateDiff(_0x3b9b2a,'');console[_0x28cbf7(0x251)](formatDiffWithColors(_0x1632e0)),console[_0x28cbf7(0x251)]('─'['repeat'](0x3c));}const _0x31ab96=_0x12c4d9[_0x28cbf7(0x1f7)](_0xd3541b=>!_0xd3541b[_0x28cbf7(0x1ec)]&&_0xd3541b[_0x28cbf7(0x210)]);if(_0x31ab96[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375[_0x28cbf7(0x203)])for(const _0x5c2ff3 of _0x31ab96){const _0x4835bc=_0x5c2ff3['folderPath']?_0x5c2ff3['folderPath']+'/'+_0x5c2ff3[_0x28cbf7(0x200)][_0x28cbf7(0x229)]:_0x5c2ff3[_0x28cbf7(0x200)]['name'];console['error']('\x0a'+a41_0x46fc59['yellow'](_0x28cbf7(0x267))+'\x20'+_0x4835bc),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c)),console[_0x28cbf7(0x251)](_0x5c2ff3[_0x28cbf7(0x210)]),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c));}if(_0x3a8bd7['length']>0x0)for(const _0x372b6b of _0x3a8bd7){const _0xc40da0=_0x372b6b['folderPath']?_0x372b6b['folderPath']+'/'+_0x372b6b['yamlConfig'][_0x28cbf7(0x229)]:_0x372b6b[_0x28cbf7(0x200)][_0x28cbf7(0x229)];console[_0x28cbf7(0x251)]('\x0a'+a41_0x46fc59[_0x28cbf7(0x266)]('New\x20journey:')+'\x20'+_0xc40da0),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c)),_0x372b6b['diff']&&console['error'](_0x372b6b[_0x28cbf7(0x210)]),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c));}const _0x40e96f=_0x30c7fa[_0x28cbf7(0x1f7)](_0xc16820=>!_0xc16820[_0x28cbf7(0x1ec)]&&_0xc16820[_0x28cbf7(0x210)]);if(_0x40e96f['length']>0x0)for(const _0x3a0cc4 of _0x40e96f){const _0x21d327=_0x3a0cc4['folderPath']?_0x3a0cc4['folderPath']+'/'+_0x3a0cc4['yamlConfig'][_0x28cbf7(0x229)]:_0x3a0cc4['yamlConfig'][_0x28cbf7(0x229)];console[_0x28cbf7(0x251)]('\x0a'+a41_0x46fc59['yellow'](_0x28cbf7(0x20a))+'\x20'+_0x21d327),console[_0x28cbf7(0x251)]('─'['repeat'](0x3c)),console[_0x28cbf7(0x251)](_0x3a0cc4[_0x28cbf7(0x210)]),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c));}if(_0x5206be[_0x28cbf7(0x1dc)]>0x0)for(const _0x5ba162 of _0x5206be){const _0x562369=_0x5ba162[_0x28cbf7(0x1f3)]?_0x40a74e[_0x28cbf7(0x209)](_0x5ba162['folderId'])||'':'',_0x187bf4=_0x562369?_0x562369+'/'+_0x5ba162[_0x28cbf7(0x204)]:_0x5ba162[_0x28cbf7(0x204)];console['error']('\x0a'+a41_0x46fc59[_0x28cbf7(0x24e)]('Delete\x20journey:')+'\x20'+_0x187bf4),console[_0x28cbf7(0x251)]('─'['repeat'](0x3c)),console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24e)](_0x28cbf7(0x23b))),console[_0x28cbf7(0x251)]('─'[_0x28cbf7(0x207)](0x3c));}if(_0x9b0375[_0x28cbf7(0x226)])return console['error'](a41_0x46fc59[_0x28cbf7(0x24f)](_0x28cbf7(0x23f))),0x0;const _0x2a2ebe=_0x9b0375[_0x28cbf7(0x203)]?![]:_0x41be80['length']>0x0||_0x20e116['length']>0x0||_0x3a5f30[_0x28cbf7(0x1dc)]>0x0,_0x284f3f=_0x3a8bd7[_0x28cbf7(0x1dc)]>0x0||_0x1d1325[_0x28cbf7(0x1dc)]>0x0||_0x5206be[_0x28cbf7(0x1dc)]>0x0,_0x436c8a=_0x9b0375[_0x28cbf7(0x203)]?![]:_0x5af43f[_0x28cbf7(0x1dc)]>0x0,_0x22eea1=_0x371043['length']>0x0;if(!_0x2a2ebe&&!_0x284f3f&&!_0x436c8a&&!_0x22eea1){const _0x49c41e=_0x9b0375[_0x28cbf7(0x203)]?_0x28cbf7(0x1db):_0x28cbf7(0x261);console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x266)](_0x49c41e));if(_0x4f2ac1&&_0x2fc568[_0x28cbf7(0x1dc)]===0x1){const _0x2e720e=_0x2fc568[0x0];if(_0x2e720e['existingSegment']?.['id']){const _0x2b130f=getConsoleNextUrl(_0x9b0375['site'],_0x28cbf7(0x217)+_0x5d7710+_0x28cbf7(0x205)+_0x2e720e[_0x28cbf7(0x202)]['id']+_0x28cbf7(0x25b));console['error'](_0x28cbf7(0x1e1)+a41_0x46fc59[_0x28cbf7(0x25a)](_0x2b130f));}}if(_0x4f2ac1&&_0x3791bd[_0x28cbf7(0x1dc)]===0x1){const _0x15a964=_0x3791bd[0x0];if(_0x15a964['existingJourney']?.['id']){const _0x461e29=getConsoleNextUrl(_0x9b0375['site'],_0x28cbf7(0x217)+_0x5d7710+'/e/'+_0x15a964[_0x28cbf7(0x222)]['id']+_0x28cbf7(0x22a));console['error']('\x20\x20'+a41_0x46fc59[_0x28cbf7(0x25a)](_0x461e29));}}return 0x0;}const _0x4ad48d=_0x9b0375[_0x28cbf7(0x203)]?_0x3a8bd7['length']+_0x1d1325['length']+_0x5206be['length']+_0x371043[_0x28cbf7(0x1dc)]:_0x41be80['length']+_0x20e116[_0x28cbf7(0x1dc)]+_0x3a5f30[_0x28cbf7(0x1dc)]+_0x3a8bd7['length']+_0x1d1325[_0x28cbf7(0x1dc)]+_0x5206be[_0x28cbf7(0x1dc)]+_0x371043[_0x28cbf7(0x1dc)]+_0x5af43f[_0x28cbf7(0x1dc)];if(!_0x9b0375['yes']&&_0x4ad48d>0x0){if(!isInteractive())return console[_0x28cbf7(0x251)](a41_0x46fc59['red']('\x0aError:'),_0x28cbf7(0x21d)),console[_0x28cbf7(0x251)](a41_0x46fc59['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xefd14b=await confirmKey(_0x28cbf7(0x268)+_0x4ad48d+'\x20changes?');if(!_0xefd14b)return console[_0x28cbf7(0x251)](a41_0x46fc59['yellow'](_0x28cbf7(0x24b))),0x1;}const _0x2739a7={'withProgress':async(_0x5542e4,_0x16c4f5)=>{const _0x28d435=_0x28cbf7,_0x21c531=await withSpinner(_0x5542e4,_0x16c4f5,{'verbose':_0x9b0375[_0x28d435(0x1e7)]});return{'data':_0x21c531[_0x28d435(0x1f8)]};},'logInfo':_0x3454ea=>console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x1e6)]('✔\x20'+_0x3454ea)),'logSuccess':_0x5129ab=>console[_0x28cbf7(0x251)](a41_0x46fc59['green']('✔\x20'+_0x5129ab)),'logWarning':_0x2994b7=>console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24f)]('⚠\x20'+_0x2994b7)),'logDeleted':_0x410ea9=>console['error'](a41_0x46fc59[_0x28cbf7(0x24e)]('✔\x20'+_0x410ea9))},_0x4bb8a4={'segment':_0x5bef7a[_0x28cbf7(0x230)],'journey':_0x5bef7a[_0x28cbf7(0x1ed)],'user':_0x5bef7a['user'],'connection':_0x5bef7a[_0x28cbf7(0x214)]};_0x371043[_0x28cbf7(0x1dc)]>0x0&&(_0x396ab7=await executePushFolders(_0x4bb8a4,_0x371043,_0x396ab7,{'parentId':_0x5d7710},_0x2739a7));const _0x2a3633={'rootFolderId':_0x14713b,'folderPathToId':_0x396ab7,'folderIdToPath':_0x40a74e,'segmentNameToId':_0x1b9240,'activationsBySegmentId':_0x3b15c5,'emailToIdMap':_0x25283b,'idToEmailMap':_0x319809,'connectionNameToIdMap':_0x2ebb65[_0x28cbf7(0x254)],'connectionIdToNameMap':_0x2ebb65[_0x28cbf7(0x237)],'connectionNameToTypeMap':_0x2c82a1},_0x8d4c52=await executePushSegments(_0x4bb8a4,_0x9b0375[_0x28cbf7(0x203)]?[]:_0x12c4d9,_0x2a3633,{'parentId':_0x5d7710},_0x2739a7),_0xaf272d=_0x8d4c52[_0x28cbf7(0x1f2)],_0x406a49=_0x8d4c52['updated'],_0x5f5b0a=_0x8d4c52[_0x28cbf7(0x239)][_0x28cbf7(0x1f2)],_0x5324b2=_0x8d4c52['activations'][_0x28cbf7(0x25d)],_0x948af9=_0x8d4c52[_0x28cbf7(0x239)][_0x28cbf7(0x20b)];let _0x52af73;if(_0x4f2ac1&&_0x12c4d9['length']===0x1){const _0x5c45f1=_0x12c4d9[0x0];_0x52af73=_0x5c45f1[_0x28cbf7(0x202)]?.['id']??_0x8d4c52[_0x28cbf7(0x206)][_0x28cbf7(0x209)](_0x5c45f1[_0x28cbf7(0x200)][_0x28cbf7(0x229)]);}const _0x293764=await executePushSegmentDeletions(_0x4bb8a4,_0x9b0375[_0x28cbf7(0x203)]?[]:_0x3a5f30,_0x2739a7);let _0x3d2aa7=0x0,_0x35fbcb=0x0,_0x5b7a35=0x0;const _0x45a119=new Map(_0x1b9240);for(const [_0x281e66,_0x15dc8c]of _0x8d4c52[_0x28cbf7(0x206)]){_0x45a119[_0x28cbf7(0x246)](_0x281e66,_0x15dc8c);}if(_0x30c7fa[_0x28cbf7(0x1dc)]>0x0){const _0x52b251={..._0x2a3633,'segmentNameToId':_0x45a119,'existingSegments':_0x1f9237,'activationContext':_0x17c935},_0x434fc8=await executePushJourneys(_0x4bb8a4,_0x30c7fa,_0x52b251,{'parentId':_0x5d7710,'rootFolderId':_0x14713b,'verbose':_0x9b0375[_0x28cbf7(0x1e7)]},_0x2739a7);_0x3d2aa7=_0x434fc8['created'],_0x35fbcb=_0x434fc8[_0x28cbf7(0x25d)];if(_0x4f2ac1&&_0x434fc8['results'][_0x28cbf7(0x1dc)]===0x1){const _0x41d325=_0x434fc8['results'][0x0];if(_0x41d325['journeyId']){const _0x1709da=getConsoleNextUrl(_0x9b0375['site'],_0x28cbf7(0x217)+_0x5d7710+_0x28cbf7(0x205)+_0x41d325[_0x28cbf7(0x243)]+_0x28cbf7(0x22a));console[_0x28cbf7(0x251)]('\x20\x20'+a41_0x46fc59[_0x28cbf7(0x25a)](_0x1709da));}}}for(const _0x5b714c of _0x5206be){console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x24f)](_0x28cbf7(0x21a)+_0x5b714c[_0x28cbf7(0x204)])),_0x5b7a35++;}const _0x6d4f84=[];if(_0xaf272d>0x0)_0x6d4f84['push'](_0xaf272d+_0x28cbf7(0x1fc));if(_0x406a49>0x0)_0x6d4f84[_0x28cbf7(0x260)](_0x406a49+_0x28cbf7(0x22c));if(_0x293764>0x0)_0x6d4f84[_0x28cbf7(0x260)](_0x293764+_0x28cbf7(0x224));const _0xc8eb61=[];if(_0x3d2aa7>0x0)_0xc8eb61[_0x28cbf7(0x260)](_0x3d2aa7+_0x28cbf7(0x1fc));if(_0x35fbcb>0x0)_0xc8eb61[_0x28cbf7(0x260)](_0x35fbcb+_0x28cbf7(0x22c));if(_0x5b7a35>0x0)_0xc8eb61[_0x28cbf7(0x260)](_0x5b7a35+_0x28cbf7(0x224));const _0x177ea2=[];if(_0x5f5b0a>0x0)_0x177ea2[_0x28cbf7(0x260)](_0x5f5b0a+'\x20created');if(_0x5324b2>0x0)_0x177ea2[_0x28cbf7(0x260)](_0x5324b2+'\x20updated');if(_0x948af9>0x0)_0x177ea2[_0x28cbf7(0x260)](_0x948af9+_0x28cbf7(0x224));console[_0x28cbf7(0x251)](a41_0x46fc59[_0x28cbf7(0x266)](_0x28cbf7(0x23e)));_0x6d4f84['length']>0x0&&!_0x9b0375[_0x28cbf7(0x203)]&&console['error']('\x20\x20Segments:\x20'+_0x6d4f84[_0x28cbf7(0x263)](',\x20'));_0xc8eb61[_0x28cbf7(0x1dc)]>0x0&&console[_0x28cbf7(0x251)]('\x20\x20Journeys:\x20'+_0xc8eb61[_0x28cbf7(0x263)](',\x20'));_0x177ea2[_0x28cbf7(0x1dc)]>0x0&&!_0x9b0375['journeysOnly']&&console['error'](_0x28cbf7(0x1dd)+_0x177ea2['join'](',\x20'));if(_0x52af73){const _0x112add=getConsoleNextUrl(_0x9b0375[_0x28cbf7(0x234)],_0x28cbf7(0x217)+_0x5d7710+_0x28cbf7(0x205)+_0x52af73+_0x28cbf7(0x25b));console[_0x28cbf7(0x251)](_0x28cbf7(0x1e1)+a41_0x46fc59[_0x28cbf7(0x25a)](_0x112add));}return 0x0;}}
|
|
1
|
+
const a41_0x1d1430=a41_0x3591;(function(_0x4a4ce1,_0x2873df){const _0x245ad3=a41_0x3591,_0x76a2c6=_0x4a4ce1();while(!![]){try{const _0x4940f0=-parseInt(_0x245ad3(0x23a))/0x1+-parseInt(_0x245ad3(0x25d))/0x2*(-parseInt(_0x245ad3(0x223))/0x3)+parseInt(_0x245ad3(0x205))/0x4+parseInt(_0x245ad3(0x207))/0x5*(-parseInt(_0x245ad3(0x1da))/0x6)+parseInt(_0x245ad3(0x22a))/0x7*(-parseInt(_0x245ad3(0x1fe))/0x8)+-parseInt(_0x245ad3(0x201))/0x9+parseInt(_0x245ad3(0x275))/0xa*(parseInt(_0x245ad3(0x257))/0xb);if(_0x4940f0===_0x2873df)break;else _0x76a2c6['push'](_0x76a2c6['shift']());}catch(_0x2fb87e){_0x76a2c6['push'](_0x76a2c6['shift']());}}}(a41_0x4d9d,0x23750));function a41_0x3591(_0x480cd1,_0x3f7d7c){_0x480cd1=_0x480cd1-0x1d4;const _0x4d9dad=a41_0x4d9d();let _0x359130=_0x4d9dad[_0x480cd1];return _0x359130;}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';function a41_0x4d9d(){const _0xd26161=['site','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','journeys','results','existingSegment','\x20\x20📊\x20Segments:','Site:\x20','\x27...','new','createdSegmentIds','Error:\x20','\x20changed','\x20folders\x20to\x20create','relationships','parentSegment','no_parent','355287XglpRT','segmentFolderId','journeyBundleId','resolveParentId','journeyId','\x0aPush\x20summary\x20for\x20\x27','changed','2870MXoknZ','Push\x20YAML\x20files\x20to\x20Treasure\x20Data\x20as\x20child\x20segments','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20to\x20create','segment\x20or\x20journey','.yaml','\x20\x20Console\x20URL\x20(share\x20with\x20client):\x20','map','New\x20segment:','\x20changes?','message','existingJourney','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','dim','nameToType','filter','77183yGlOts','Fetching\x20connections\x20for\x20name\x20resolution...','error','created','add','push','Changes\x20to:','helpText','activations','listSegments','.yml','\x20\x20\x20\x20','green','blue','type','Aborted.','Tip:\x20Run\x20`tdx\x20sg\x20pull`\x20first\x20to\x20create\x20segment\x20and\x20journey\x20files','folderId','\x20new','\x0a✔\x20Push\x20complete','filePath','\x20created','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20push\x20<parent_name>\x20\x20\x20\x20\x20\x20#\x20Push\x20all\x20segments\x20to\x20parent','then','all','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','/sb/da/esr','\x20\x20Segments:\x20','parentFolder','4631MwVTMn','buildUserMaps','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','yamlConfig','errorCode','Fetching\x20existing\x20data...','2UtDxzJ','length','yellow','repeat','connection','state','Scoped\x20to\x20folder:\x20','cwd','folderPath','get','/app/ps/','updatedAt','audienceId','\x20\x20Journeys:\x20','diff','Delete\x20journey:','\x20\x20🗺️\x20\x20Journeys:','data','file','getParent','Parent\x20segment:\x20','folders','toCreate','endsWith','7980dGZfWN','parent_name','\x0aValidation\x20failed:','✔\x20All\x20segments,\x20journeys,\x20and\x20activations\x20are\x20up\x20to\x20date','Error:\x20Directory\x20not\x20found:\x20','deleted','scopedFolderPath','updated','segment','6vdCoRW','name','journeyBundleName','listFolders','(Journey\x20will\x20be\x20deleted)','listActivations','getJourney','journeysOnly','toString','join','description','attributes','Changes\x20to\x20journey:','\x20\x20Source:\x20','/e/','\x20deleted','\x20unchanged','paused','Error\x20parsing\x20YAML:\x20','nameToId','toUpdate','\x20on\x20server\x20not\x20in\x20YAML\x20(use\x20--delete\x20to\x20remove)','idToName','red','setPhase','isNew','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)','✔\x20All\x20journeys\x20are\x20up\x20to\x20date','/j/da/je','segments','targetDir','execute','list','toDelete','Resolving\x20parent\x20segment\x20\x27','\x20activations]','1976WoCeSi','Preparing\x20journeys...','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20made','310041StzUaD','\x20YAML\x20files\x20found','\x0aFix\x20the\x20errors\x20above\x20and\x20try\x20again.\x20Use\x20`tdx\x20sg\x20validate`\x20to\x20check\x20files\x20locally.','Fetching\x20existing\x20activations...','680296eNzgSd','user','1331635IUAUFV','\x20to\x20delete','\x20\x20Activations:','\x20updated','dryRun','New\x20journey:','isScoped','Push\x20','verbose','\x0aError:','cyan','journey'];a41_0x4d9d=function(){return _0xd26161;};return a41_0x4d9d();}import a41_0x6bfc0 from'chalk';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';[a41_0x1d1430(0x1e4)]=a41_0x1d1430(0x22b);async[a41_0x1d1430(0x1f9)](_0x6f48ae){const _0x4c5a08=a41_0x1d1430,{options:_0x298e42,args:_0x52d6c2,tdx:_0x14e949}=_0x6f48ae,_0xadf5a7=_0x298e42,_0x279ea9=await resolveTarget({'arg':_0x52d6c2[0x0],'contextParent':_0x298e42[_0x4c5a08(0x221)],'cwd':process[_0x4c5a08(0x264)]()});if(!isSuccessfulResolution(_0x279ea9))return _0x279ea9[_0x4c5a08(0x25b)]===_0x4c5a08(0x222)?(console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x25f)](_0x4c5a08(0x214))),console[_0x4c5a08(0x23c)](_0x4c5a08(0x1f4)),console[_0x4c5a08(0x23c)](_0x4c5a08(0x250)),console[_0x4c5a08(0x23c)]('\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[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x21d)+_0x279ea9[_0x4c5a08(0x234)]+'\x0a')),_0x279ea9[_0x4c5a08(0x241)]&&console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x211)](_0x279ea9['helpText']))),0x1;if(_0x279ea9[_0x4c5a08(0x248)]===_0x4c5a08(0x276))return console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)]('Error:\x20Directory\x20not\x20found:\x20'+_0x279ea9[_0x4c5a08(0x1f8)]+'\x0a')),console[_0x4c5a08(0x23c)](a41_0x6bfc0['cyan'](_0x4c5a08(0x253))),0x1;const _0x5d2d05=_0x279ea9['parentName'],_0x33eeec=_0x279ea9['targetDir'],_0x428e78=_0x279ea9[_0x4c5a08(0x248)]===_0x4c5a08(0x26f)?_0x279ea9[_0x4c5a08(0x24e)]:undefined,_0x29efb6=getScopedDetails(_0x279ea9),_0x2085cf=_0x29efb6?.[_0x4c5a08(0x20d)]??![],_0x28929b=_0x29efb6?.[_0x4c5a08(0x1d7)]??'';if(!existsSync(_0x33eeec))return console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x1d5)+_0x33eeec+'\x0a')),console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x211)](_0x4c5a08(0x253))),0x1;_0xadf5a7['verbose']&&(console['error'](_0x4c5a08(0x219)+_0xadf5a7[_0x4c5a08(0x213)]),console['error'](_0x4c5a08(0x271)+_0x5d2d05),console[_0x4c5a08(0x23c)]('Source\x20directory:\x20'+_0x33eeec),_0x2085cf&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x263)+_0x28929b));const _0x2ec5c2=await withSpinner(_0x4c5a08(0x1fc)+_0x5d2d05+_0x4c5a08(0x21a),()=>_0x14e949[_0x4c5a08(0x1d9)][_0x4c5a08(0x226)](_0x5d2d05),{'verbose':_0xadf5a7[_0x4c5a08(0x20f)]}),_0x5aeb54=_0x2ec5c2[_0x4c5a08(0x26e)],{parentSegmentResult:_0x7c66d5,segmentsResult:_0x5996eb,foldersResult:_0xb8bd43,journeysWithDetailsResult:_0x481c4b,userMaps:_0x5d1507}=await withSpinner(_0x4c5a08(0x25c),async()=>{const _0x8b096=_0x4c5a08,[_0x517db8,_0x37fda1,_0x33e666,_0x56d153,_0xd4320d]=await Promise['all']([_0x14e949[_0x8b096(0x1d9)][_0x8b096(0x270)](_0x5aeb54),_0x14e949['segment'][_0x8b096(0x243)](_0x5aeb54),_0x14e949['segment'][_0x8b096(0x1dd)](_0x5aeb54),_0x14e949[_0x8b096(0x212)]['listJourneysWithDetailsFromParentSegment'](_0x5aeb54,{'includeAllVersions':!![]}),_0x14e949[_0x8b096(0x206)][_0x8b096(0x258)]()]);return{'parentSegmentResult':_0x517db8,'segmentsResult':_0x37fda1,'foldersResult':_0x33e666,'journeysWithDetailsResult':_0x56d153,'userMaps':_0xd4320d};},{'verbose':_0xadf5a7['verbose']})[_0x4c5a08(0x251)](_0x4dc9ef=>_0x4dc9ef[_0x4c5a08(0x26e)]),_0x583df5=_0x7c66d5,_0x3fbefb=extractRootFolderId(_0x583df5),_0x480610=_0x5996eb,_0x3b8a53=_0xb8bd43,{journeys:_0x3f7945,activationStepsById:_0x264ede}=_0x481c4b,_0x292a65=new Map(_0x3f7945[_0x4c5a08(0x231)](_0x4cc062=>[_0x4cc062['id'],_0x4cc062])),_0x53ab0d=_0x3f7945[_0x4c5a08(0x231)](_0xabe0ee=>({'id':_0xabe0ee['id'],'name':_0xabe0ee[_0x4c5a08(0x1e5)]['name'],'journeyBundleName':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x1dc)]||'','journeyBundleId':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x225)]||'','versionNumber':_0xabe0ee[_0x4c5a08(0x1e5)]['versionNumber'],'description':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x1e4)],'state':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x262)],'paused':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x1eb)],'audienceId':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x269)],'folderId':_0xabe0ee[_0x4c5a08(0x220)]?.[_0x4c5a08(0x256)]?.['data']?.['id'],'createdAt':_0xabe0ee[_0x4c5a08(0x1e5)]['createdAt'],'updatedAt':_0xabe0ee[_0x4c5a08(0x1e5)][_0x4c5a08(0x268)]})),{emailToId:_0x56f190,idToEmail:_0x414c9b}=_0x5d1507,_0x2e9fe9=await withSpinner(_0x4c5a08(0x23b),async()=>{const _0x1e80f6=_0x4c5a08,_0x1f5417=await _0x14e949[_0x1e80f6(0x261)][_0x1e80f6(0x1fa)]();return buildConnectionMaps(_0x1f5417);},{'verbose':_0xadf5a7[_0x4c5a08(0x20f)]})[_0x4c5a08(0x251)](_0x5240fc=>_0x5240fc['data']),_0x338e40=_0x2e9fe9[_0x4c5a08(0x1ed)],_0x5079ff=_0x2e9fe9[_0x4c5a08(0x1f0)],_0x5d2240=_0x2e9fe9[_0x4c5a08(0x238)],_0x15b665={'emailToIdMap':_0x56f190,'connectionNameToIdMap':_0x338e40,'connectionNameToTypeMap':_0x5d2240,'getSchema':_0x21594f=>_0x14e949[_0x4c5a08(0x261)]['getOutputSchemaWithCache'](_0x21594f)};let {pathToId:_0x20ec49,idToPath:_0x440a85}=buildFolderMaps(_0x3b8a53);const _0x232439=buildSegmentLookupMap(_0x480610,_0x440a85),_0x10ccc0=buildSegmentNameToIdMap(_0x480610),_0x365a7f=buildJourneyBundleLookupMap(_0x53ab0d,_0x440a85);let _0x2e63fd;if(_0x428e78){if(!_0x428e78[_0x4c5a08(0x274)](_0x4c5a08(0x244))&&!_0x428e78['endsWith'](_0x4c5a08(0x22f)))return console[_0x4c5a08(0x23c)](a41_0x6bfc0['red'](_0x4c5a08(0x259)+_0x428e78+'\x0a')),0x1;_0x2e63fd=[_0x428e78];}else _0x2e63fd=findYamlFiles(_0x33eeec);if(_0x2e63fd[_0x4c5a08(0x25e)]===0x0)return console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x236)+_0x33eeec+'\x0a')),console[_0x4c5a08(0x23c)](a41_0x6bfc0['cyan'](_0x4c5a08(0x24a))),0x1;let _0x3f58c2,_0x32ff40;try{const _0x223684=parseAndClassifyYamlFiles(_0x2e63fd,_0x33eeec,{'skipSegments':_0xadf5a7[_0x4c5a08(0x1e1)]});_0x3f58c2=_0x223684['segments'],_0x32ff40=_0x223684[_0x4c5a08(0x215)];const _0x2fbcb8=validateParsedFiles(_0x223684,_0x33eeec);if(_0x2fbcb8[_0x4c5a08(0x25e)]>0x0)return console['error'](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x277))),console[_0x4c5a08(0x23c)](formatValidationErrors(_0x2fbcb8)),console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x25f)](_0x4c5a08(0x203))),0x1;}catch(_0x5f07fd){return console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x1ec)+(_0x5f07fd instanceof Error?_0x5f07fd[_0x4c5a08(0x234)]:_0x5f07fd))),0x1;}if(_0x3f58c2[_0x4c5a08(0x25e)]===0x0&&_0x32ff40['length']===0x0){const _0x50e519=_0xadf5a7[_0x4c5a08(0x1e1)]?_0x4c5a08(0x212):_0x4c5a08(0x22e);return console[_0x4c5a08(0x23c)](a41_0x6bfc0['yellow']('No\x20'+_0x50e519+_0x4c5a08(0x202))),0x0;}const _0x5db99f=new Map();_0x480610[_0x4c5a08(0x25e)]>0x0&&!_0xadf5a7['journeysOnly']&&await withSpinner(_0x4c5a08(0x204),async()=>{await batchAsync(_0x480610,async _0x3abb9d=>{const _0x26d34d=a41_0x3591,_0x442f3c=await _0x14e949[_0x26d34d(0x1d9)][_0x26d34d(0x1df)](_0x5aeb54,_0x3abb9d['id']);_0x5db99f['set'](_0x3abb9d['id'],_0x442f3c);});},{'verbose':_0xadf5a7['verbose']});const {segmentFiles:_0x59afbf,foldersToCreate:_0x15a4e8}=await prepareSegmentFiles(_0x3f58c2,{'segmentByFolderAndName':_0x232439,'activationsBySegmentId':_0x5db99f,'folderPathToId':_0x20ec49,'idToEmailMap':_0x414c9b,'connectionIdToNameMap':_0x5079ff},_0x15b665,_0x2085cf,_0x28929b),_0x5f4f75=_0x428e78?[]:findSegmentsToDelete(_0x480610,_0x3f58c2[_0x4c5a08(0x231)](({yamlConfig:_0x1bc06c,folderPath:_0x46f758})=>({'yamlConfig':_0x1bc06c,'folderPath':resolveTDFolderPath(_0x46f758,_0x2085cf,_0x28929b)})),_0x440a85,_0x28929b,_0x2085cf),{journeyFiles:_0x209ef8,foldersToCreate:_0x4ae9a6}=await withProgressSpinner(_0x4c5a08(0x1ff),async _0x3ace3c=>prepareJourneyFiles(_0x32ff40,{'fetchJourney':async _0x1c6f05=>_0x14e949[_0x4c5a08(0x212)][_0x4c5a08(0x1e0)](_0x1c6f05[_0x4c5a08(0x227)]),'journeyBundlesByFolderAndName':_0x365a7f,'folderPathToId':_0x20ec49,'idToEmailMap':_0x414c9b,'connectionIdToNameMap':_0x5079ff,'existingSegments':_0x480610,'parentId':_0x5aeb54,'deps':_0x14e949,'progress':{'update':_0x5bdedf=>{const _0x32824e=_0x4c5a08;_0x3ace3c[_0x32824e(0x1f2)](_0x5bdedf),_0xadf5a7[_0x32824e(0x20f)]&&console[_0x32824e(0x23c)]('\x20\x20'+_0x5bdedf);}},'journeyById':_0x292a65,'activationStepsById':_0x264ede},_0x2085cf,_0x28929b),{'verbose':_0xadf5a7[_0x4c5a08(0x20f)]})[_0x4c5a08(0x251)](_0xd85414=>_0xd85414[_0x4c5a08(0x26e)]);for(const _0x5a9f95 of _0x4ae9a6){_0x15a4e8[_0x4c5a08(0x23e)](_0x5a9f95);}const _0x3a2a48=_0x428e78?[]:findJourneysToDelete(_0x53ab0d,_0x32ff40[_0x4c5a08(0x231)](({yamlConfig:_0x17ae4a,folderPath:_0x476a0b})=>({'yamlConfig':_0x17ae4a,'folderPath':resolveTDFolderPath(_0x476a0b,_0x2085cf,_0x28929b)})),_0x440a85,_0x28929b,_0x2085cf),_0x47186d=calculatePushStats(_0x59afbf,_0x209ef8,_0x15a4e8,_0x5f4f75,_0x3a2a48,!!_0xadf5a7['delete'],!!_0xadf5a7['journeysOnly']),_0x1fcbfa=_0x47186d[_0x4c5a08(0x1f7)][_0x4c5a08(0x21b)],_0x1db8f3=_0x47186d[_0x4c5a08(0x1f7)][_0x4c5a08(0x229)],_0x3c1feb=_0x47186d[_0x4c5a08(0x1f7)]['unchanged'],_0x24b745=_0x47186d['segments'][_0x4c5a08(0x1fb)],_0x40517b=_0x47186d[_0x4c5a08(0x272)][_0x4c5a08(0x273)],_0x45ed9e=_0x47186d['journeys'][_0x4c5a08(0x21b)],_0x1684f8=_0x47186d['journeys'][_0x4c5a08(0x229)],_0x358467=_0x47186d[_0x4c5a08(0x215)]['unchanged'],_0x178e2a=_0x47186d['journeys'][_0x4c5a08(0x1fb)],_0x2c1139=_0x47186d[_0x4c5a08(0x242)][_0x4c5a08(0x252)],_0x2b5399=_0x47186d[_0x4c5a08(0x242)]['toCreate'],_0x1b1b6d=_0x47186d[_0x4c5a08(0x242)][_0x4c5a08(0x1ee)],_0x5dbd7a=_0x47186d[_0x4c5a08(0x242)][_0x4c5a08(0x1fb)];console['error'](_0x4c5a08(0x228)+_0x5d2d05+'\x27:');_0x40517b[_0x4c5a08(0x25e)]>0x0&&console[_0x4c5a08(0x23c)]('\x20\x20'+a41_0x6bfc0[_0x4c5a08(0x247)]('📁\x20'+_0x40517b['length']+_0x4c5a08(0x21f)));if(!_0xadf5a7[_0x4c5a08(0x1e1)]){console[_0x4c5a08(0x23c)](_0x4c5a08(0x218)),console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x246)]('+\x20'+_0x1fcbfa[_0x4c5a08(0x25e)]+_0x4c5a08(0x24c))),console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x25f)]('~\x20'+_0x1db8f3[_0x4c5a08(0x25e)]+'\x20changed'));if(_0x24b745['length']>0x0)console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0['red']('-\x20'+_0x24b745[_0x4c5a08(0x25e)]+'\x20to\x20delete'));else _0x5f4f75['length']>0x0&&!_0xadf5a7['delete']&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0['dim'](_0x5f4f75[_0x4c5a08(0x25e)]+_0x4c5a08(0x1ef)));console['error'](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x237)]('=\x20'+_0x3c1feb[_0x4c5a08(0x25e)]+_0x4c5a08(0x1ea)));}if(_0x209ef8[_0x4c5a08(0x25e)]>0x0||_0x3a2a48[_0x4c5a08(0x25e)]>0x0){console[_0x4c5a08(0x23c)](_0x4c5a08(0x26d)),console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0['green']('+\x20'+_0x45ed9e[_0x4c5a08(0x25e)]+'\x20new')),console['error'](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x25f)]('~\x20'+_0x1684f8['length']+_0x4c5a08(0x21e)));if(_0x178e2a[_0x4c5a08(0x25e)]>0x0)console['error']('\x20\x20\x20\x20'+a41_0x6bfc0['red']('-\x20'+_0x178e2a[_0x4c5a08(0x25e)]+'\x20to\x20delete'));else _0x3a2a48['length']>0x0&&!_0xadf5a7['delete']&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0['dim'](_0x3a2a48[_0x4c5a08(0x25e)]+_0x4c5a08(0x1ef)));console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x237)]('=\x20'+_0x358467[_0x4c5a08(0x25e)]+'\x20unchanged'));}_0x2c1139[_0x4c5a08(0x25e)]>0x0&&!_0xadf5a7[_0x4c5a08(0x1e1)]&&(console['error'](''),console[_0x4c5a08(0x23c)](_0x4c5a08(0x209)),_0x2b5399[_0x4c5a08(0x25e)]>0x0&&console[_0x4c5a08(0x23c)]('\x20\x20\x20\x20'+a41_0x6bfc0['green']('+\x20'+_0x2b5399[_0x4c5a08(0x25e)]+_0x4c5a08(0x22d))),_0x1b1b6d[_0x4c5a08(0x25e)]>0x0&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x25f)]('~\x20'+_0x1b1b6d[_0x4c5a08(0x25e)]+'\x20to\x20update')),_0x5dbd7a[_0x4c5a08(0x25e)]>0x0&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x245)+a41_0x6bfc0[_0x4c5a08(0x1f1)]('-\x20'+_0x5dbd7a['length']+_0x4c5a08(0x208))));console['error'](_0x4c5a08(0x1e7)+a41_0x6bfc0[_0x4c5a08(0x211)](_0x33eeec)+'\x0a');if(_0x40517b[_0x4c5a08(0x25e)]>0x0){console[_0x4c5a08(0x23c)]('Folders\x20to\x20create:');for(const _0x535351 of _0x40517b){console['error']('\x20\x20'+a41_0x6bfc0[_0x4c5a08(0x247)]('+')+'\x20'+_0x535351);}console[_0x4c5a08(0x23c)]('');}if(_0x1fcbfa['length']>0x0&&!_0xadf5a7[_0x4c5a08(0x1e1)])for(const _0x35ecf8 of _0x1fcbfa){const _0x323e26=_0x35ecf8[_0x4c5a08(0x265)]?_0x35ecf8[_0x4c5a08(0x265)]+'/'+_0x35ecf8[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)]:_0x35ecf8[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)],_0x531ad6=_0x35ecf8[_0x4c5a08(0x25a)][_0x4c5a08(0x242)]?.[_0x4c5a08(0x25e)]||0x0,_0x3185ad=_0x531ad6>0x0?a41_0x6bfc0[_0x4c5a08(0x237)]('\x20['+_0x531ad6+'\x20activations]'):'';console['error']('\x0a'+a41_0x6bfc0['green'](_0x4c5a08(0x232))+'\x20'+_0x323e26+_0x3185ad),console['error']('─'['repeat'](0x3c)),_0x35ecf8['diff']&&console[_0x4c5a08(0x23c)](_0x35ecf8[_0x4c5a08(0x26b)]),console[_0x4c5a08(0x23c)]('─'['repeat'](0x3c));}if(_0x24b745[_0x4c5a08(0x25e)]>0x0&&!_0xadf5a7[_0x4c5a08(0x1e1)])for(const _0x39c5ae of _0x24b745){const _0x19a2f4=_0x39c5ae['segmentFolderId']?_0x440a85[_0x4c5a08(0x266)](_0x39c5ae[_0x4c5a08(0x224)][_0x4c5a08(0x1e2)]())||'':'',_0x1f6b1b=_0x19a2f4?_0x19a2f4+'/'+_0x39c5ae['name']:_0x39c5ae[_0x4c5a08(0x1db)],_0x5859d6=_0x5db99f[_0x4c5a08(0x266)](_0x39c5ae['id'])||[],_0x4e9c8d=_0x5859d6[_0x4c5a08(0x25e)]>0x0?a41_0x6bfc0[_0x4c5a08(0x237)]('\x20['+_0x5859d6['length']+_0x4c5a08(0x1fd)):'';console[_0x4c5a08(0x23c)]('\x0a'+a41_0x6bfc0[_0x4c5a08(0x1f1)]('Delete\x20segment:')+'\x20'+_0x1f6b1b+_0x4e9c8d),console[_0x4c5a08(0x23c)]('─'[_0x4c5a08(0x260)](0x3c));const _0x5acbf0=segmentWithActivationsToYaml(_0x39c5ae,_0x5859d6,undefined,_0x414c9b,_0x5079ff),_0x264df7=segmentToYamlString(_0x5acbf0),_0x1436ee=generateDiff(_0x264df7,'');console[_0x4c5a08(0x23c)](formatDiffWithColors(_0x1436ee)),console[_0x4c5a08(0x23c)]('─'[_0x4c5a08(0x260)](0x3c));}const _0x708ca0=_0x59afbf[_0x4c5a08(0x239)](_0x1c7d54=>!_0x1c7d54[_0x4c5a08(0x1f3)]&&_0x1c7d54[_0x4c5a08(0x26b)]);if(_0x708ca0[_0x4c5a08(0x25e)]>0x0&&!_0xadf5a7[_0x4c5a08(0x1e1)])for(const _0xb31429 of _0x708ca0){const _0x41c855=_0xb31429['folderPath']?_0xb31429[_0x4c5a08(0x265)]+'/'+_0xb31429[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)]:_0xb31429[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)];console[_0x4c5a08(0x23c)]('\x0a'+a41_0x6bfc0[_0x4c5a08(0x25f)](_0x4c5a08(0x240))+'\x20'+_0x41c855),console['error']('─'[_0x4c5a08(0x260)](0x3c)),console['error'](_0xb31429[_0x4c5a08(0x26b)]),console[_0x4c5a08(0x23c)]('─'['repeat'](0x3c));}if(_0x45ed9e[_0x4c5a08(0x25e)]>0x0)for(const _0x3d1c6b of _0x45ed9e){const _0x26baa2=_0x3d1c6b[_0x4c5a08(0x265)]?_0x3d1c6b[_0x4c5a08(0x265)]+'/'+_0x3d1c6b['yamlConfig'][_0x4c5a08(0x1db)]:_0x3d1c6b[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)];console[_0x4c5a08(0x23c)]('\x0a'+a41_0x6bfc0[_0x4c5a08(0x246)](_0x4c5a08(0x20c))+'\x20'+_0x26baa2),console[_0x4c5a08(0x23c)]('─'[_0x4c5a08(0x260)](0x3c)),_0x3d1c6b[_0x4c5a08(0x26b)]&&console['error'](_0x3d1c6b['diff']),console[_0x4c5a08(0x23c)]('─'[_0x4c5a08(0x260)](0x3c));}const _0x2e4ab=_0x209ef8[_0x4c5a08(0x239)](_0x1aaec8=>!_0x1aaec8[_0x4c5a08(0x1f3)]&&_0x1aaec8[_0x4c5a08(0x26b)]);if(_0x2e4ab[_0x4c5a08(0x25e)]>0x0)for(const _0xd38b54 of _0x2e4ab){const _0x1d6e98=_0xd38b54[_0x4c5a08(0x265)]?_0xd38b54[_0x4c5a08(0x265)]+'/'+_0xd38b54['yamlConfig'][_0x4c5a08(0x1db)]:_0xd38b54[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)];console[_0x4c5a08(0x23c)]('\x0a'+a41_0x6bfc0[_0x4c5a08(0x25f)](_0x4c5a08(0x1e6))+'\x20'+_0x1d6e98),console[_0x4c5a08(0x23c)]('─'[_0x4c5a08(0x260)](0x3c)),console[_0x4c5a08(0x23c)](_0xd38b54[_0x4c5a08(0x26b)]),console[_0x4c5a08(0x23c)]('─'['repeat'](0x3c));}if(_0x178e2a[_0x4c5a08(0x25e)]>0x0)for(const _0x2906bd of _0x178e2a){const _0x123bfe=_0x2906bd[_0x4c5a08(0x24b)]?_0x440a85[_0x4c5a08(0x266)](_0x2906bd['folderId'])||'':'',_0x1083d2=_0x123bfe?_0x123bfe+'/'+_0x2906bd[_0x4c5a08(0x1dc)]:_0x2906bd['journeyBundleName'];console[_0x4c5a08(0x23c)]('\x0a'+a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x26c))+'\x20'+_0x1083d2),console['error']('─'[_0x4c5a08(0x260)](0x3c)),console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x1de))),console[_0x4c5a08(0x23c)]('─'[_0x4c5a08(0x260)](0x3c));}if(_0xadf5a7[_0x4c5a08(0x20b)])return console['error'](a41_0x6bfc0['yellow'](_0x4c5a08(0x200))),0x0;const _0x36e711=_0xadf5a7[_0x4c5a08(0x1e1)]?![]:_0x1fcbfa[_0x4c5a08(0x25e)]>0x0||_0x1db8f3[_0x4c5a08(0x25e)]>0x0||_0x24b745[_0x4c5a08(0x25e)]>0x0,_0x210037=_0x45ed9e['length']>0x0||_0x1684f8[_0x4c5a08(0x25e)]>0x0||_0x178e2a[_0x4c5a08(0x25e)]>0x0,_0x3a2b0a=_0xadf5a7[_0x4c5a08(0x1e1)]?![]:_0x2c1139['length']>0x0,_0x2d2144=_0x40517b[_0x4c5a08(0x25e)]>0x0;if(!_0x36e711&&!_0x210037&&!_0x3a2b0a&&!_0x2d2144){const _0x411161=_0xadf5a7['journeysOnly']?_0x4c5a08(0x1f5):_0x4c5a08(0x1d4);console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x246)](_0x411161));if(_0x428e78&&_0x3c1feb['length']===0x1){const _0x693c57=_0x3c1feb[0x0];if(_0x693c57['existingSegment']?.['id']){const _0x4313cb=getConsoleNextUrl(_0xadf5a7[_0x4c5a08(0x213)],_0x4c5a08(0x267)+_0x5aeb54+_0x4c5a08(0x1e8)+_0x693c57[_0x4c5a08(0x217)]['id']+'/sb/da/esr');console[_0x4c5a08(0x23c)](_0x4c5a08(0x230)+a41_0x6bfc0[_0x4c5a08(0x211)](_0x4313cb));}}if(_0x428e78&&_0x358467[_0x4c5a08(0x25e)]===0x1){const _0x388fd8=_0x358467[0x0];if(_0x388fd8[_0x4c5a08(0x235)]?.['id']){const _0x43a51b=getConsoleNextUrl(_0xadf5a7[_0x4c5a08(0x213)],_0x4c5a08(0x267)+_0x5aeb54+_0x4c5a08(0x1e8)+_0x388fd8[_0x4c5a08(0x235)]['id']+_0x4c5a08(0x1f6));console[_0x4c5a08(0x23c)]('\x20\x20'+a41_0x6bfc0[_0x4c5a08(0x211)](_0x43a51b));}}return 0x0;}const _0x2088d2=_0xadf5a7['journeysOnly']?_0x45ed9e[_0x4c5a08(0x25e)]+_0x1684f8[_0x4c5a08(0x25e)]+_0x178e2a[_0x4c5a08(0x25e)]+_0x40517b[_0x4c5a08(0x25e)]:_0x1fcbfa[_0x4c5a08(0x25e)]+_0x1db8f3[_0x4c5a08(0x25e)]+_0x24b745['length']+_0x45ed9e[_0x4c5a08(0x25e)]+_0x1684f8[_0x4c5a08(0x25e)]+_0x178e2a[_0x4c5a08(0x25e)]+_0x40517b[_0x4c5a08(0x25e)]+_0x2c1139['length'];if(!_0xadf5a7['yes']&&_0x2088d2>0x0){if(!isInteractive())return console['error'](a41_0x6bfc0[_0x4c5a08(0x1f1)](_0x4c5a08(0x210)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a41_0x6bfc0[_0x4c5a08(0x237)](_0x4c5a08(0x22c))),0x1;const _0xc5dd29=await confirmKey(_0x4c5a08(0x20e)+_0x2088d2+_0x4c5a08(0x233));if(!_0xc5dd29)return console['error'](a41_0x6bfc0[_0x4c5a08(0x25f)](_0x4c5a08(0x249))),0x1;}const _0x42a206={'withProgress':async(_0x2fe91a,_0x2070ea)=>{const _0x59840d=_0x4c5a08,_0x81db0c=await withSpinner(_0x2fe91a,_0x2070ea,{'verbose':_0xadf5a7[_0x59840d(0x20f)]});return{'data':_0x81db0c[_0x59840d(0x26e)]};},'logInfo':_0x3c2a93=>console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x247)]('✔\x20'+_0x3c2a93)),'logSuccess':_0x58971b=>console[_0x4c5a08(0x23c)](a41_0x6bfc0['green']('✔\x20'+_0x58971b)),'logWarning':_0xc6fe34=>console['error'](a41_0x6bfc0[_0x4c5a08(0x25f)]('⚠\x20'+_0xc6fe34)),'logDeleted':_0x3a2797=>console[_0x4c5a08(0x23c)](a41_0x6bfc0[_0x4c5a08(0x1f1)]('✔\x20'+_0x3a2797))},_0x192e15={'segment':_0x14e949['segment'],'journey':_0x14e949[_0x4c5a08(0x212)],'user':_0x14e949[_0x4c5a08(0x206)],'connection':_0x14e949[_0x4c5a08(0x261)]};_0x40517b[_0x4c5a08(0x25e)]>0x0&&(_0x20ec49=await executePushFolders(_0x192e15,_0x40517b,_0x20ec49,{'parentId':_0x5aeb54},_0x42a206));const _0x526b07={'rootFolderId':_0x3fbefb,'folderPathToId':_0x20ec49,'folderIdToPath':_0x440a85,'segmentNameToId':_0x10ccc0,'activationsBySegmentId':_0x5db99f,'emailToIdMap':_0x56f190,'idToEmailMap':_0x414c9b,'connectionNameToIdMap':_0x2e9fe9[_0x4c5a08(0x1ed)],'connectionIdToNameMap':_0x2e9fe9['idToName'],'connectionNameToTypeMap':_0x5d2240},_0x2b676f=await executePushSegments(_0x192e15,_0xadf5a7['journeysOnly']?[]:_0x59afbf,_0x526b07,{'parentId':_0x5aeb54},_0x42a206),_0x523e56=_0x2b676f['created'],_0x5c8ec3=_0x2b676f[_0x4c5a08(0x1d8)],_0x339bdf=_0x2b676f[_0x4c5a08(0x242)]['created'],_0x55a37a=_0x2b676f['activations'][_0x4c5a08(0x1d8)],_0x243e6f=_0x2b676f['activations'][_0x4c5a08(0x1d6)];let _0x28fa21;if(_0x428e78&&_0x59afbf[_0x4c5a08(0x25e)]===0x1){const _0x2a4f2f=_0x59afbf[0x0];_0x28fa21=_0x2a4f2f[_0x4c5a08(0x217)]?.['id']??_0x2b676f[_0x4c5a08(0x21c)][_0x4c5a08(0x266)](_0x2a4f2f[_0x4c5a08(0x25a)][_0x4c5a08(0x1db)]);}const _0x4b0643=await executePushSegmentDeletions(_0x192e15,_0xadf5a7['journeysOnly']?[]:_0x24b745,_0x42a206);let _0x1fc8fc=0x0,_0x34cd79=0x0,_0x31ff97=0x0;const _0x2f12f2=new Map(_0x10ccc0);for(const [_0x207b81,_0x3dede8]of _0x2b676f[_0x4c5a08(0x21c)]){_0x2f12f2['set'](_0x207b81,_0x3dede8);}if(_0x209ef8[_0x4c5a08(0x25e)]>0x0){const _0x45f8e4={..._0x526b07,'segmentNameToId':_0x2f12f2,'existingSegments':_0x480610,'activationContext':_0x15b665},_0x3e53e6=await executePushJourneys(_0x192e15,_0x209ef8,_0x45f8e4,{'parentId':_0x5aeb54,'rootFolderId':_0x3fbefb,'verbose':_0xadf5a7[_0x4c5a08(0x20f)]},_0x42a206);_0x1fc8fc=_0x3e53e6[_0x4c5a08(0x23d)],_0x34cd79=_0x3e53e6[_0x4c5a08(0x1d8)];if(_0x428e78&&_0x3e53e6[_0x4c5a08(0x216)][_0x4c5a08(0x25e)]===0x1){const _0x1c7978=_0x3e53e6[_0x4c5a08(0x216)][0x0];if(_0x1c7978[_0x4c5a08(0x227)]){const _0x524423=getConsoleNextUrl(_0xadf5a7[_0x4c5a08(0x213)],_0x4c5a08(0x267)+_0x5aeb54+_0x4c5a08(0x1e8)+_0x1c7978[_0x4c5a08(0x227)]+_0x4c5a08(0x1f6));console[_0x4c5a08(0x23c)]('\x20\x20'+a41_0x6bfc0['cyan'](_0x524423));}}}for(const _0x5cfb67 of _0x178e2a){console['error'](a41_0x6bfc0[_0x4c5a08(0x25f)]('⚠\x20Journey\x20deletion\x20not\x20yet\x20implemented:\x20'+_0x5cfb67['journeyBundleName'])),_0x31ff97++;}const _0x181b1c=[];if(_0x523e56>0x0)_0x181b1c[_0x4c5a08(0x23f)](_0x523e56+_0x4c5a08(0x24f));if(_0x5c8ec3>0x0)_0x181b1c[_0x4c5a08(0x23f)](_0x5c8ec3+_0x4c5a08(0x20a));if(_0x4b0643>0x0)_0x181b1c[_0x4c5a08(0x23f)](_0x4b0643+_0x4c5a08(0x1e9));const _0x276c72=[];if(_0x1fc8fc>0x0)_0x276c72[_0x4c5a08(0x23f)](_0x1fc8fc+_0x4c5a08(0x24f));if(_0x34cd79>0x0)_0x276c72[_0x4c5a08(0x23f)](_0x34cd79+_0x4c5a08(0x20a));if(_0x31ff97>0x0)_0x276c72['push'](_0x31ff97+'\x20deleted');const _0x5b5201=[];if(_0x339bdf>0x0)_0x5b5201[_0x4c5a08(0x23f)](_0x339bdf+_0x4c5a08(0x24f));if(_0x55a37a>0x0)_0x5b5201[_0x4c5a08(0x23f)](_0x55a37a+_0x4c5a08(0x20a));if(_0x243e6f>0x0)_0x5b5201[_0x4c5a08(0x23f)](_0x243e6f+_0x4c5a08(0x1e9));console['error'](a41_0x6bfc0[_0x4c5a08(0x246)](_0x4c5a08(0x24d)));_0x181b1c[_0x4c5a08(0x25e)]>0x0&&!_0xadf5a7['journeysOnly']&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x255)+_0x181b1c[_0x4c5a08(0x1e3)](',\x20'));_0x276c72['length']>0x0&&console[_0x4c5a08(0x23c)](_0x4c5a08(0x26a)+_0x276c72[_0x4c5a08(0x1e3)](',\x20'));_0x5b5201[_0x4c5a08(0x25e)]>0x0&&!_0xadf5a7['journeysOnly']&&console[_0x4c5a08(0x23c)]('\x20\x20Activations:\x20'+_0x5b5201[_0x4c5a08(0x1e3)](',\x20'));if(_0x28fa21){const _0x183216=getConsoleNextUrl(_0xadf5a7['site'],_0x4c5a08(0x267)+_0x5aeb54+'/e/'+_0x28fa21+_0x4c5a08(0x254));console[_0x4c5a08(0x23c)](_0x4c5a08(0x230)+a41_0x6bfc0[_0x4c5a08(0x211)](_0x183216));}return 0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x12a42c=a42_0x2602;(function(_0x42d00c,_0xa1c434){const _0x1c5bf1=a42_0x2602,_0x5d4931=_0x42d00c();while(!![]){try{const _0x534e59=-parseInt(_0x1c5bf1(0x147))/0x1+-parseInt(_0x1c5bf1(0x12e))/0x2*(-parseInt(_0x1c5bf1(0x14c))/0x3)+parseInt(_0x1c5bf1(0x132))/0x4*(-parseInt(_0x1c5bf1(0x12a))/0x5)+parseInt(_0x1c5bf1(0x149))/0x6*(-parseInt(_0x1c5bf1(0x13a))/0x7)+-parseInt(_0x1c5bf1(0x13d))/0x8*(-parseInt(_0x1c5bf1(0x136))/0x9)+-parseInt(_0x1c5bf1(0x13b))/0xa+parseInt(_0x1c5bf1(0x140))/0xb;if(_0x534e59===_0xa1c434)break;else _0x5d4931['push'](_0x5d4931['shift']());}catch(_0xe3cded){_0x5d4931['push'](_0x5d4931['shift']());}}}(a42_0x344e,0x47d57));function a42_0x2602(_0x69c2da,_0xc9cb5b){_0x69c2da=_0x69c2da-0x11f;const _0x344e0f=a42_0x344e();let _0x260279=_0x344e0f[_0x69c2da];return _0x260279;}function a42_0x344e(){const _0x4e0716=['execute','ruleFile','error','54QSYzdk','yellow','resolveFolderId','updateSegmentById','2235394UWjpmE','1332870GUVzbx','Segment\x20ID:\x20','676184ldrRuz','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','11023023HYJjlJ','Examples:','rule','type','segment','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolving\x20path\x20\x27','552347SuKKNq','INTERNAL','6MzWjQz','folder','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','421095nBZBGB','segmentPath','data','segmentId','Parent\x20ID:\x20','kind','Resolved\x20folder\x20ID:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Resolved\x20type:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','description','\x27...','name','Error:\x20Cannot\x20update\x20','134765NHhaka','Updating\x20segment\x20\x27','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','segmentName','2osWWQE','verbose','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','52vAqbNo'];a42_0x344e=function(){return _0x4e0716;};return a42_0x344e();}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';import{SDKError,ErrorCode}from'../sdk/index.js';import a42_0xe02c31 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a42_0x12a42c(0x128)]='segment:update';['description']='Update\x20existing\x20child\x20segment';async[a42_0x12a42c(0x133)](_0x4cddb7){const _0x28df27=a42_0x12a42c;console[_0x28df27(0x135)](a42_0xe02c31['yellow'](_0x28df27(0x12c))),console[_0x28df27(0x135)](a42_0xe02c31[_0x28df27(0x137)]('\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a'));const {options:_0x422808,args:_0x132b01,tdx:_0x389a74}=_0x4cddb7,_0x367eda=_0x422808;if(_0x132b01['length']===0x0)return console[_0x28df27(0x135)](_0x28df27(0x145)),console[_0x28df27(0x135)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x28df27(0x135)](_0x28df27(0x141)),console['error'](_0x28df27(0x13e)),console[_0x28df27(0x135)](_0x28df27(0x123)),0x1;const _0x3bf1af=_0x132b01[0x0],_0x270180=_0x422808[_0x28df27(0x14d)];let _0xcddb53=_0x3bf1af;_0x270180&&!_0x3bf1af['includes']('/')&&(_0xcddb53=_0x270180+'/'+_0x3bf1af,_0x367eda['verbose']&&console[_0x28df27(0x135)]('Resolved\x20relative\x20path\x20to:\x20'+_0xcddb53));const _0x101f09=await withSpinner(_0x28df27(0x146)+_0xcddb53+'\x27...',()=>_0x389a74[_0x28df27(0x144)]['resolvePathToResource'](_0xcddb53),{'verbose':_0x367eda[_0x28df27(0x12f)]}),_0x518436=_0x101f09[_0x28df27(0x14e)];_0x367eda[_0x28df27(0x12f)]&&console[_0x28df27(0x135)](_0x28df27(0x124)+_0x518436[_0x28df27(0x143)]);if(_0x518436[_0x28df27(0x143)]!==_0x28df27(0x144))return console[_0x28df27(0x135)](_0x28df27(0x129)+_0x518436[_0x28df27(0x143)]+_0x28df27(0x14b)),console[_0x28df27(0x135)](_0x28df27(0x13f)),0x1;if(!_0x518436[_0x28df27(0x11f)])throw new SDKError(ErrorCode[_0x28df27(0x148)],_0x28df27(0x125));const _0x54512f=_0x518436['parentId'],_0x485411=_0x518436[_0x28df27(0x11f)];_0x367eda[_0x28df27(0x12f)]&&(console['error'](_0x28df27(0x120)+_0x54512f),console[_0x28df27(0x135)](_0x28df27(0x13c)+_0x485411));let _0x446ea4;if(_0x367eda[_0x28df27(0x14a)]){const _0x4f7e65=_0x367eda[_0x28df27(0x14a)],_0x1c2b5c=await withSpinner(_0x28df27(0x130)+_0x4f7e65+'\x27...',()=>_0x389a74[_0x28df27(0x144)][_0x28df27(0x138)](_0x54512f,_0x4f7e65),{'verbose':_0x367eda[_0x28df27(0x12f)]});_0x446ea4=parseInt(_0x1c2b5c[_0x28df27(0x14e)],0xa),_0x367eda['verbose']&&console[_0x28df27(0x135)](_0x28df27(0x122)+_0x446ea4);}const _0x2601a3=await loadJSONFromOptions(_0x367eda[_0x28df27(0x142)],_0x367eda[_0x28df27(0x134)]),_0x25880b={'name':_0x367eda[_0x28df27(0x128)],'description':_0x367eda[_0x28df27(0x126)],'rule':_0x2601a3,'kind':_0x367eda['kind']!==undefined?parseInt(_0x367eda[_0x28df27(0x121)],0xa):undefined,'segmentFolderId':_0x446ea4},_0x2d1b1c=await withSpinner(_0x28df27(0x12b)+_0x518436[_0x28df27(0x12d)]+_0x28df27(0x127),()=>_0x389a74[_0x28df27(0x144)][_0x28df27(0x139)](_0x54512f,_0x485411,_0x25880b),{'verbose':_0x367eda[_0x28df27(0x12f)]}),_0x240cb5=_0x2d1b1c[_0x28df27(0x14e)];return console['error']('✔\x20Updated\x20segment\x20\x27'+_0x240cb5[_0x28df27(0x128)]+'\x27'),_0xcddb53!==_0x3bf1af&&console[_0x28df27(0x135)](_0x28df27(0x131)+_0xcddb53),await handleSDKOutput([_0x240cb5],_0x367eda),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a43_0x88f7(_0x5baf8c,_0x5622d4){_0x5baf8c=_0x5baf8c-0x126;const _0x46af48=a43_0x46af();let _0x88f715=_0x46af48[_0x5baf8c];return _0x88f715;}const a43_0x5b171d=a43_0x88f7;(function(_0x3be89a,_0xac6591){const _0x519519=a43_0x88f7,_0x48cf0d=_0x3be89a();while(!![]){try{const _0x420260=parseInt(_0x519519(0x14d))/0x1*(parseInt(_0x519519(0x154))/0x2)+parseInt(_0x519519(0x149))/0x3+parseInt(_0x519519(0x140))/0x4+-parseInt(_0x519519(0x150))/0x5+parseInt(_0x519519(0x14f))/0x6*(parseInt(_0x519519(0x14a))/0x7)+-parseInt(_0x519519(0x15e))/0x8*(parseInt(_0x519519(0x145))/0x9)+-parseInt(_0x519519(0x15d))/0xa*(parseInt(_0x519519(0x137))/0xb);if(_0x420260===_0xac6591)break;else _0x48cf0d['push'](_0x48cf0d['shift']());}catch(_0x18272a){_0x48cf0d['push'](_0x48cf0d['shift']());}}}(a43_0x46af,0x745a7));function a43_0x46af(){const _0x3cbff3=['Target\x20path:\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','description','11ZwESbi','✔\x20Context\x20set\x20to:\x20','data','resolvePathToResource','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','join','green','segmentPath','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','2103904xFqcat','\x27...','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Use:\x20tdx\x20segment\x20use\x20','parentName','19611RaaykT','name','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1834455QfEqcd','7QaRXYM','red','site','120066EJWCoF','Usage:\x20tdx\x20segment\x20use\x20<path>','148278cKImOW','2400770PDNZeE','Resolved\x20path\x20type:\x20','length','segment:use','6hFwUqr','error','dim','folderId','Resolving\x20path\x20\x27','fullPath','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','log','Examples:','5351290nsWpLT','112sRCDxB','type','isDirectory','Error:\x20Path\x20is\x20required\x0a','folderPath','cyan','verbose','split','parent_segment','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','segment','Folder\x20ID:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','slice'];a43_0x46af=function(){return _0x3cbff3;};return a43_0x46af();}import{existsSync,statSync}from'fs';import a43_0x4b6c32 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a43_0x5b171d(0x146)]=a43_0x5b171d(0x153);[a43_0x5b171d(0x136)]=a43_0x5b171d(0x15a);async['execute'](_0x5f5a48){const _0x4a752a=a43_0x5b171d,{options:_0xc75491,args:_0x5de05c,tdx:_0x3b9fae}=_0x5f5a48;if(_0x5de05c['length']===0x0)return console[_0x4a752a(0x155)](a43_0x4b6c32[_0x4a752a(0x14b)](_0x4a752a(0x127))),console['error'](_0x4a752a(0x14e)),console[_0x4a752a(0x155)](_0x4a752a(0x15c)),console['error'](_0x4a752a(0x148)),console[_0x4a752a(0x155)](_0x4a752a(0x147)),console['error'](_0x4a752a(0x134)),console['error'](_0x4a752a(0x12d)),0x1;const _0x15569f=_0x5de05c[0x0],_0x3b8b78=_0xc75491['session'];try{if(_0x15569f==='/')return saveSessionContext({'segment_path':undefined},_0x3b8b78),console[_0x4a752a(0x15b)](a43_0x4b6c32[_0x4a752a(0x13d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x15569f)&&statSync(_0x15569f)[_0x4a752a(0x126)]()){let _0x1d8e5c;try{_0x1d8e5c=findTdxConfig(_0x15569f);}catch{return console['error'](a43_0x4b6c32[_0x4a752a(0x14b)](_0x4a752a(0x13b)+_0x15569f)),console[_0x4a752a(0x155)](a43_0x4b6c32[_0x4a752a(0x129)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x304d5d=_0x1d8e5c['config'][_0x4a752a(0x12c)];return saveSessionContext({'segment_path':_0x304d5d,'parent_segment':_0x304d5d},_0x3b8b78),console[_0x4a752a(0x15b)](a43_0x4b6c32['green'](_0x4a752a(0x138)+a43_0x4b6c32[_0x4a752a(0x129)](_0x304d5d))),0x0;}const _0x1c7da1=_0xc75491[_0x4a752a(0x13e)];let _0x3020f2=_0x15569f;const _0x2a66e8=parsePath(_0x15569f);if(!_0x2a66e8['isAbsolute']){if(!_0x1c7da1)return console['error'](a43_0x4b6c32[_0x4a752a(0x14b)](_0x4a752a(0x135))),console[_0x4a752a(0x155)](a43_0x4b6c32[_0x4a752a(0x129)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x15569f==='..'){const _0x3024bd=_0x1c7da1[_0x4a752a(0x12b)]('/')[_0x4a752a(0x131)](0x0,-0x1)[_0x4a752a(0x13c)]('/');_0x3020f2=_0x3024bd||'/';}else _0x15569f==='.'?_0x3020f2=_0x1c7da1:_0x3020f2=_0x1c7da1+'/'+_0x15569f;_0xc75491[_0x4a752a(0x12a)]&&console[_0x4a752a(0x155)]('Resolved\x20relative\x20path\x20to:\x20'+_0x3020f2);}if(_0x3020f2==='/'||_0x3020f2==='')return saveSessionContext({'segment_path':undefined},_0x3b8b78),console[_0x4a752a(0x15b)](a43_0x4b6c32[_0x4a752a(0x13d)](_0x4a752a(0x142))),0x0;_0x3020f2=normalizePath(_0x3020f2);const _0x1c3574=parsePath(_0x3020f2)['segments'];if(_0x1c3574[_0x4a752a(0x152)]===0x0)return saveSessionContext({'segment_path':undefined},_0x3b8b78),console['log'](a43_0x4b6c32['green'](_0x4a752a(0x142))),0x0;_0xc75491[_0x4a752a(0x12a)]&&(console['error']('Site:\x20'+_0xc75491[_0x4a752a(0x14c)]),console[_0x4a752a(0x155)](_0x4a752a(0x132)+_0x3020f2));const _0x422281=await withSpinner(_0x4a752a(0x158)+_0x3020f2+_0x4a752a(0x141),()=>_0x3b9fae[_0x4a752a(0x12e)][_0x4a752a(0x13a)](_0x3020f2),{'verbose':_0xc75491['verbose']}),_0x4038a5=_0x422281[_0x4a752a(0x139)];_0xc75491[_0x4a752a(0x12a)]&&(console[_0x4a752a(0x155)](_0x4a752a(0x151)+_0x4038a5[_0x4a752a(0x15f)]),console[_0x4a752a(0x155)]('Parent\x20ID:\x20'+_0x4038a5['parentId']),_0x4038a5[_0x4a752a(0x157)]&&console[_0x4a752a(0x155)](_0x4a752a(0x12f)+_0x4038a5[_0x4a752a(0x157)]));if(_0x4038a5['type']===_0x4a752a(0x12e))return console[_0x4a752a(0x155)](a43_0x4b6c32[_0x4a752a(0x14b)](_0x4a752a(0x130))),console[_0x4a752a(0x155)](_0x4a752a(0x133)),console[_0x4a752a(0x155)](a43_0x4b6c32['cyan'](_0x4a752a(0x143)+_0x4038a5['parentName']+(_0x4038a5['folderPath']?'/'+_0x4038a5[_0x4a752a(0x128)][_0x4a752a(0x13c)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x4038a5['fullPath'],'parent_segment':_0x4038a5[_0x4a752a(0x144)]},_0x3b8b78),console[_0x4a752a(0x15b)](a43_0x4b6c32[_0x4a752a(0x13d)](_0x4a752a(0x138)+a43_0x4b6c32[_0x4a752a(0x129)](_0x4038a5[_0x4a752a(0x159)]))),_0xc75491['verbose']&&(console[_0x4a752a(0x155)](a43_0x4b6c32[_0x4a752a(0x156)](_0x4a752a(0x13f))),console[_0x4a752a(0x155)](a43_0x4b6c32[_0x4a752a(0x156)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x14b239){throw _0x14b239;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x214d3d=a44_0x1f39;function a44_0x1f39(_0x3eed89,_0x56c9b8){_0x3eed89=_0x3eed89-0x129;const _0x20a6ca=a44_0x20a6();let _0x1f3913=_0x20a6ca[_0x3eed89];return _0x1f3913;}(function(_0x1d509f,_0x329a50){const _0x341242=a44_0x1f39,_0x48c75e=_0x1d509f();while(!![]){try{const _0x5585a9=parseInt(_0x341242(0x158))/0x1+-parseInt(_0x341242(0x147))/0x2+parseInt(_0x341242(0x13b))/0x3+parseInt(_0x341242(0x131))/0x4+-parseInt(_0x341242(0x14e))/0x5+parseInt(_0x341242(0x157))/0x6+-parseInt(_0x341242(0x12d))/0x7;if(_0x5585a9===_0x329a50)break;else _0x48c75e['push'](_0x48c75e['shift']());}catch(_0x102600){_0x48c75e['push'](_0x48c75e['shift']());}}}(a44_0x20a6,0xcab3e));function a44_0x20a6(){const _0x49618e=['5520468FXLWTn','\x20file(s)\x20with\x20errors,\x20','type','\x20warning(s)\x20found','.yml','warningCount','valid','validCount','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','dim','781308wJfYSF','red','name','Validate\x20segment\x20and\x20journey\x20YAML\x20files','Error:\x20Directory\x20not\x20found:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','filePath','helpText','errors','cwd','message','Error:\x20','1050158IMffEO','log','hasErrors','✔\x20All\x20','yellow','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','invalidCount','6166340dZfBot','file','warnings','description','errorCode','error','endsWith','cyan','green','968922SxIMHc','1606456dysHuT','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','verbose','Validation\x20failed:\x20','):\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','length','5739153dmglyj','\x20error(s)','\x20warning(s)','\x20file(s)\x20valid'];a44_0x20a6=function(){return _0x49618e;};return a44_0x20a6();}import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a44_0x1157e8 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a44_0x214d3d(0x13d)]='segment:validate';[a44_0x214d3d(0x151)]=a44_0x214d3d(0x13e);async['execute'](_0x1988c5){const _0x5ddf94=a44_0x214d3d,{options:_0x354e94,args:_0x5dc412}=_0x1988c5,_0x289603=_0x354e94,_0x33b6b3=await resolveTarget({'arg':_0x5dc412[0x0],'contextParent':_0x354e94['parentSegment'],'cwd':process[_0x5ddf94(0x144)]()});if(!isSuccessfulResolution(_0x33b6b3))return _0x33b6b3[_0x5ddf94(0x152)]==='no_parent'?(console[_0x5ddf94(0x153)](a44_0x1157e8[_0x5ddf94(0x14b)](_0x5ddf94(0x140))),console['error']('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x5ddf94(0x153)](_0x5ddf94(0x159)),console[_0x5ddf94(0x153)](_0x5ddf94(0x14c))):(console[_0x5ddf94(0x153)](a44_0x1157e8[_0x5ddf94(0x13c)](_0x5ddf94(0x146)+_0x33b6b3[_0x5ddf94(0x145)]+'\x0a')),_0x33b6b3[_0x5ddf94(0x142)]&&console[_0x5ddf94(0x153)](a44_0x1157e8[_0x5ddf94(0x155)](_0x33b6b3[_0x5ddf94(0x142)]))),0x1;const _0x2ce325=_0x33b6b3['targetDir'],_0x957592=_0x33b6b3[_0x5ddf94(0x133)]===_0x5ddf94(0x14f)?_0x33b6b3[_0x5ddf94(0x141)]:undefined;if(!_0x957592&&!existsSync(_0x2ce325))return console[_0x5ddf94(0x153)](a44_0x1157e8[_0x5ddf94(0x13c)](_0x5ddf94(0x13f)+_0x2ce325+'\x0a')),0x1;let _0x228af3;if(_0x957592){if(!_0x957592[_0x5ddf94(0x154)](_0x5ddf94(0x135))&&!_0x957592['endsWith']('.yaml'))return console[_0x5ddf94(0x153)](a44_0x1157e8[_0x5ddf94(0x13c)](_0x5ddf94(0x139)+_0x957592+'\x0a')),0x1;_0x228af3=[_0x957592];}else _0x228af3=findYamlFiles(_0x2ce325);if(_0x228af3[_0x5ddf94(0x12c)]===0x0)return console[_0x5ddf94(0x153)](a44_0x1157e8['red'](_0x5ddf94(0x12b)+_0x2ce325+'\x0a')),0x1;const _0x39c2a2=validateYamlFiles(_0x228af3,_0x2ce325),_0x37ce3a=calculateSummary(_0x39c2a2);for(const _0x55382f of _0x39c2a2){if(!isValidationResult(_0x55382f))continue;const {relativePath:_0x1eafc4,source:_0x23d9fa,result:_0x5d29b4,fileType:_0x1cb720}=_0x55382f,_0x289f0d=_0x1cb720;if(_0x5d29b4[_0x5ddf94(0x137)]&&_0x5d29b4[_0x5ddf94(0x150)][_0x5ddf94(0x12c)]===0x0)_0x289603[_0x5ddf94(0x15a)]&&console[_0x5ddf94(0x148)](a44_0x1157e8[_0x5ddf94(0x156)]('✔\x20'+_0x1eafc4)+a44_0x1157e8[_0x5ddf94(0x13a)]('\x20('+_0x289f0d+')'));else _0x5d29b4[_0x5ddf94(0x137)]?(console[_0x5ddf94(0x148)](a44_0x1157e8['yellow']('⚠\x20'+_0x1eafc4)+a44_0x1157e8[_0x5ddf94(0x13a)]('\x20('+_0x289f0d+_0x5ddf94(0x12a)+_0x5d29b4['warnings'][_0x5ddf94(0x12c)]+_0x5ddf94(0x12f))),console[_0x5ddf94(0x148)](formatValidationResult(_0x5d29b4,_0x23d9fa,_0x1eafc4))):(console[_0x5ddf94(0x148)](a44_0x1157e8[_0x5ddf94(0x13c)]('✖\x20'+_0x1eafc4)+a44_0x1157e8['dim']('\x20('+_0x289f0d+_0x5ddf94(0x12a)+_0x5d29b4[_0x5ddf94(0x143)][_0x5ddf94(0x12c)]+_0x5ddf94(0x12e))),console[_0x5ddf94(0x148)](formatValidationResult(_0x5d29b4,_0x23d9fa,_0x1eafc4)));}return console[_0x5ddf94(0x148)](''),_0x37ce3a[_0x5ddf94(0x149)]?(console['log'](a44_0x1157e8['red'](_0x5ddf94(0x129)+_0x37ce3a[_0x5ddf94(0x14d)]+_0x5ddf94(0x132)+_0x37ce3a[_0x5ddf94(0x138)]+'\x20valid')),_0x37ce3a[_0x5ddf94(0x136)]>0x0&&console[_0x5ddf94(0x148)](a44_0x1157e8[_0x5ddf94(0x14b)](_0x37ce3a[_0x5ddf94(0x136)]+'\x20warning(s)\x20found')),0x1):(console[_0x5ddf94(0x148)](a44_0x1157e8[_0x5ddf94(0x156)](_0x5ddf94(0x14a)+_0x37ce3a['validCount']+_0x5ddf94(0x130))),_0x37ce3a[_0x5ddf94(0x136)]>0x0&&console[_0x5ddf94(0x148)](a44_0x1157e8['yellow'](_0x37ce3a[_0x5ddf94(0x136)]+_0x5ddf94(0x134))),0x0);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a45_0x4260e1=a45_0x475c;function a45_0x475c(_0x5a94a9,_0x4a756a){_0x5a94a9=_0x5a94a9-0x176;const _0x5df7c5=a45_0x5df7();let _0x475c49=_0x5df7c5[_0x5a94a9];return _0x475c49;}(function(_0x19abf9,_0x4b8625){const _0x4a8948=a45_0x475c,_0x43d3a3=_0x19abf9();while(!![]){try{const _0x51811b=-parseInt(_0x4a8948(0x17f))/0x1+-parseInt(_0x4a8948(0x1a6))/0x2+-parseInt(_0x4a8948(0x18f))/0x3+-parseInt(_0x4a8948(0x1b3))/0x4+parseInt(_0x4a8948(0x183))/0x5*(-parseInt(_0x4a8948(0x1ac))/0x6)+parseInt(_0x4a8948(0x1a1))/0x7*(-parseInt(_0x4a8948(0x199))/0x8)+parseInt(_0x4a8948(0x184))/0x9;if(_0x51811b===_0x4b8625)break;else _0x43d3a3['push'](_0x43d3a3['shift']());}catch(_0x2469d8){_0x43d3a3['push'](_0x43d3a3['shift']());}}}(a45_0x5df7,0xb3f5a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a45_0x5df7(){const _0x522168=['test','\x20segment','log','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','verbose','12sJixVb','resolvePathToResource','(empty)','format','replace','Site:\x20','/j/da','2551356DEoZqZ','\x5c$&','listUnified','folders','Parent\x20segment\x20context:\x20','localeCompare','jsonl','cause','journey','✔\x20Found\x20',']\x20matching\x20\x27','/e/','name','✔\x20Built\x20tree\x20with\x20','\x20folder','Folder\x20ID:\x20','children','includes','map','parentSegment','parentId','data','Parent\x20ID:\x20','Building\x20hierarchy\x20tree...','Resolving\x20path\x20\x27','/app/ps/','88284BtUGMt','length','type','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','1424355RhPYbR','32988267LNchKC',',\x20and\x20','journeys','maxDepth','journeyBundleName','Resolving\x20parent\x20segment\x20\x27','dim','listUnifiedWithJourneys','Error:\x20No\x20parent\x20segment\x20context\x20set.','listWithPattern','Folder/pattern\x20arg:\x20','3128493IgHDhO','error','Listing\x20folders,\x20segments,\x20and\x20journeys...','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','\x20matching\x20\x27','\x20journey','listRecursive','No\x20items\x20match\x20pattern:\x20','filter','folderId','26120FVdCRV','sort','segment','Error:\x20','folder','Set\x20a\x20parent\x20segment\x20context\x20first:','execute','segments','889rrKOaC','json','(not\x20set)','site','description','349796RyrNXc'];a45_0x5df7=function(){return _0x522168;};return a45_0x5df7();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a45_0xf41dc from'chalk';export class SegmentsCommand extends BaseCommand{[a45_0x4260e1(0x1bf)]=a45_0x4260e1(0x1a0);[a45_0x4260e1(0x1a5)]='List\x20folders\x20and\x20child\x20segments';async[a45_0x4260e1(0x19f)](_0x51e3c6){const _0x1c05be=a45_0x4260e1,{options:_0xfc9645,args:_0xd755ad}=_0x51e3c6,_0xf2b28=_0xfc9645['recursive'],_0x53ff25=_0xd755ad[0x0];try{const _0x13b6c2=_0xfc9645[_0x1c05be(0x178)];_0xfc9645[_0x1c05be(0x1ab)]&&(console[_0x1c05be(0x190)](_0x1c05be(0x1b1)+_0xfc9645[_0x1c05be(0x1a4)]),console['error'](_0x1c05be(0x1b7)+(_0x13b6c2||_0x1c05be(0x1a3))),_0x53ff25&&console[_0x1c05be(0x190)](_0x1c05be(0x18e)+_0x53ff25),_0xf2b28&&console[_0x1c05be(0x190)]('Recursive\x20mode:\x20enabled'));if(!_0x13b6c2)return console['error'](_0x1c05be(0x18c)),console['error'](''),console['error'](_0x1c05be(0x19e)),console['error'](_0x1c05be(0x192)),console[_0x1c05be(0x190)](_0x1c05be(0x182)),console['error'](''),console['error'](_0x1c05be(0x1aa)),0x1;const _0x48fdb5=_0x53ff25&&(_0x53ff25[_0x1c05be(0x176)]('*')||_0x53ff25[_0x1c05be(0x176)]('?'));if(_0x48fdb5)return await this[_0x1c05be(0x18d)](_0x51e3c6,_0x13b6c2,_0x53ff25);const _0x1e268e=_0x53ff25?_0x13b6c2+'/'+_0x53ff25:_0x13b6c2;return _0xf2b28?await this[_0x1c05be(0x195)](_0x51e3c6,_0x1e268e):await this[_0x1c05be(0x1b5)](_0x51e3c6,_0x1e268e);}catch(_0x559cc5){if(_0x559cc5 instanceof SDKError)return console[_0x1c05be(0x190)](_0x1c05be(0x19c)+_0x559cc5['message']),_0x559cc5[_0x1c05be(0x1ba)]&&console['error']('\x20\x20Cause:\x20'+_0x559cc5['cause']),0x1;throw _0x559cc5;}}async[a45_0x4260e1(0x18d)](_0x479723,_0x5a61fc,_0x39f317){const _0x57cab3=a45_0x4260e1,{options:_0x534d7a,tdx:_0x3eade2}=_0x479723,_0x19d73e=await withSpinner(_0x57cab3(0x189)+_0x5a61fc+'\x27...',()=>_0x3eade2['segment'][_0x57cab3(0x1ad)](_0x5a61fc),{'verbose':_0x534d7a[_0x57cab3(0x1ab)]}),_0x541872=_0x19d73e[_0x57cab3(0x17a)],_0x930372=await withSpinner(_0x57cab3(0x191),()=>_0x3eade2['segment']['listUnifiedWithJourneys'](_0x541872[_0x57cab3(0x179)],_0x541872[_0x57cab3(0x198)]),{'verbose':_0x534d7a[_0x57cab3(0x1ab)]}),{folders:_0x41fb53,segments:_0x2ea04e,journeys:_0x1f3bb6}=_0x930372['data'],_0x19df27=_0x39f317[_0x57cab3(0x1b0)](/[.+^${}()|[\]\\]/g,_0x57cab3(0x1b4))[_0x57cab3(0x1b0)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x504bee=new RegExp('^'+_0x19df27+'$','i'),_0x1ae581=_0x41fb53[_0x57cab3(0x197)](_0x2a5314=>_0x504bee['test'](_0x2a5314[_0x57cab3(0x1bf)])),_0x46116b=_0x2ea04e[_0x57cab3(0x197)](_0x13bc91=>_0x504bee[_0x57cab3(0x1a7)](_0x13bc91[_0x57cab3(0x1bf)])),_0xe2a6ce=_0x1f3bb6[_0x57cab3(0x197)](_0x36b2f4=>_0x504bee[_0x57cab3(0x1a7)](_0x36b2f4['journeyBundleName'])),_0x566236=_0x1ae581[_0x57cab3(0x180)]+_0x46116b['length']+_0xe2a6ce['length'];console[_0x57cab3(0x190)](_0x57cab3(0x1bc)+_0x1ae581['length']+_0x57cab3(0x1c1)+(_0x1ae581[_0x57cab3(0x180)]!==0x1?'s':'')+',\x20'+_0x46116b[_0x57cab3(0x180)]+_0x57cab3(0x1a8)+(_0x46116b[_0x57cab3(0x180)]!==0x1?'s':'')+_0x57cab3(0x185)+_0xe2a6ce[_0x57cab3(0x180)]+'\x20journey'+(_0xe2a6ce[_0x57cab3(0x180)]!==0x1?'s':'')+_0x57cab3(0x193)+_0x39f317+'\x27');const _0x2de856=_0x576c3e=>{const _0x28753b=_0x57cab3;return getConsoleNextUrl(_0x534d7a[_0x28753b(0x1a4)],'/app/ps/'+_0x541872['parentId']+_0x28753b(0x1be)+_0x576c3e);},_0x2d983d=_0x534d7a['format']===_0x57cab3(0x1a2)||_0x534d7a[_0x57cab3(0x1af)]===_0x57cab3(0x1b9);if(_0x2d983d){const _0x128687=[..._0x1ae581['map'](_0x3c64b3=>({..._0x3c64b3,'type':_0x57cab3(0x19d)})),..._0x46116b[_0x57cab3(0x177)](_0x39d8b3=>({..._0x39d8b3,'type':_0x57cab3(0x19b),'url':_0x2de856(_0x39d8b3['id'])})),..._0xe2a6ce[_0x57cab3(0x177)](_0x50d672=>({..._0x50d672,'name':_0x50d672[_0x57cab3(0x188)],'type':_0x57cab3(0x1bb)}))]['sort']((_0x4998ed,_0x2a14b7)=>_0x4998ed['name']['localeCompare'](_0x2a14b7[_0x57cab3(0x1bf)]));await handleSDKOutput(_0x128687,_0x534d7a);}else{if(_0x566236===0x0)console[_0x57cab3(0x1a9)](_0x57cab3(0x196)+_0x39f317);else{console[_0x57cab3(0x1a9)](a45_0xf41dc[_0x57cab3(0x18a)]('['+_0x5a61fc+_0x57cab3(0x1bd)+_0x39f317+'\x27'));const _0x4b7193=formatFlatList(_0x1ae581,_0x46116b,{'showMetadata':!![],'getSegmentUrl':_0x2de856},_0xe2a6ce);console[_0x57cab3(0x1a9)](_0x4b7193);}}return 0x0;}async[a45_0x4260e1(0x1b5)](_0x5f8c7d,_0x120a6c){const _0x105330=a45_0x4260e1,{options:_0x2457c1,tdx:_0x5a7e3d}=_0x5f8c7d,_0x50d4b3=await withSpinner(_0x105330(0x17d)+_0x120a6c+'\x27...',()=>_0x5a7e3d[_0x105330(0x19b)][_0x105330(0x1ad)](_0x120a6c),{'verbose':_0x2457c1[_0x105330(0x1ab)]}),_0x54fc03=_0x50d4b3['data'];_0x2457c1[_0x105330(0x1ab)]&&(console[_0x105330(0x190)]('Parent\x20ID:\x20'+_0x54fc03[_0x105330(0x179)]),_0x54fc03['folderId']&&console[_0x105330(0x190)](_0x105330(0x1c2)+_0x54fc03[_0x105330(0x198)]));const _0x6792e8=await withSpinner(_0x105330(0x191),()=>_0x5a7e3d[_0x105330(0x19b)][_0x105330(0x18b)](_0x54fc03[_0x105330(0x179)],_0x54fc03['folderId']),{'verbose':_0x2457c1[_0x105330(0x1ab)]}),{folders:_0x430da9,segments:_0x213b9c,journeys:_0x2744e5}=_0x6792e8[_0x105330(0x17a)],_0x21cd4f=_0x430da9[_0x105330(0x180)]+_0x213b9c[_0x105330(0x180)]+_0x2744e5['length'];console[_0x105330(0x190)]('✔\x20Found\x20'+_0x430da9[_0x105330(0x180)]+_0x105330(0x1c1)+(_0x430da9['length']!==0x1?'s':'')+',\x20'+_0x213b9c[_0x105330(0x180)]+_0x105330(0x1a8)+(_0x213b9c[_0x105330(0x180)]!==0x1?'s':'')+',\x20and\x20'+_0x2744e5[_0x105330(0x180)]+_0x105330(0x194)+(_0x2744e5[_0x105330(0x180)]!==0x1?'s':''));const _0x4660a4=_0x227f04=>{const _0x18426e=_0x105330;return getConsoleNextUrl(_0x2457c1[_0x18426e(0x1a4)],_0x18426e(0x17e)+_0x54fc03[_0x18426e(0x179)]+_0x18426e(0x1be)+_0x227f04);},_0x468564=_0x414541=>{const _0x8fd2ce=_0x105330;return getConsoleNextUrl(_0x2457c1['site'],_0x8fd2ce(0x17e)+_0x54fc03[_0x8fd2ce(0x179)]+_0x8fd2ce(0x1be)+_0x414541+_0x8fd2ce(0x1b2));},_0x169ec0=_0x2457c1[_0x105330(0x1af)]==='json'||_0x2457c1[_0x105330(0x1af)]==='jsonl';if(_0x169ec0){const _0x19a784=[..._0x430da9['map'](_0x337af9=>({..._0x337af9,'type':_0x105330(0x19d)})),..._0x213b9c[_0x105330(0x177)](_0x54f164=>({..._0x54f164,'type':_0x105330(0x19b),'url':_0x4660a4(_0x54f164['id'])})),..._0x2744e5[_0x105330(0x177)](_0x4b3931=>({..._0x4b3931,'name':_0x4b3931[_0x105330(0x188)],'type':_0x105330(0x1bb),'url':_0x468564(_0x4b3931['id'])}))][_0x105330(0x19a)]((_0x5c243c,_0x367ca8)=>_0x5c243c[_0x105330(0x1bf)][_0x105330(0x1b8)](_0x367ca8[_0x105330(0x1bf)]));await handleSDKOutput(_0x19a784,_0x2457c1);}else{if(_0x21cd4f===0x0)console['log'](a45_0xf41dc[_0x105330(0x18a)]('['+_0x120a6c+']')),console[_0x105330(0x1a9)](_0x105330(0x1ae));else{console[_0x105330(0x1a9)](a45_0xf41dc['dim']('['+_0x120a6c+']'));const _0x50cfb1=formatFlatList(_0x430da9,_0x213b9c,{'showMetadata':!![],'getSegmentUrl':_0x4660a4,'getJourneyUrl':_0x468564},_0x2744e5);console['log'](_0x50cfb1);}}return 0x0;}async['listRecursive'](_0x4b75bf,_0xe8304){const _0x3df135=a45_0x4260e1,{options:_0x379e49,tdx:_0x2ffc5f}=_0x4b75bf,_0x489542=await withSpinner('Resolving\x20path\x20\x27'+_0xe8304+'\x27...',()=>_0x2ffc5f['segment'][_0x3df135(0x1ad)](_0xe8304),{'verbose':_0x379e49[_0x3df135(0x1ab)]}),_0x326e5f=_0x489542[_0x3df135(0x17a)];_0x379e49[_0x3df135(0x1ab)]&&(console[_0x3df135(0x190)](_0x3df135(0x17b)+_0x326e5f[_0x3df135(0x179)]),_0x326e5f[_0x3df135(0x198)]&&console[_0x3df135(0x190)](_0x3df135(0x1c2)+_0x326e5f[_0x3df135(0x198)]));const _0x4ca61a=_0x379e49[_0x3df135(0x187)]||0xa,_0x27fe8e=await withSpinner(_0x3df135(0x17c),()=>_0x2ffc5f[_0x3df135(0x19b)][_0x3df135(0x195)](_0x326e5f[_0x3df135(0x179)],_0x326e5f[_0x3df135(0x198)],0x0,_0x4ca61a),{'verbose':_0x379e49['verbose']}),_0x1374ee=_0x27fe8e[_0x3df135(0x17a)],_0x538281=_0x44a4d6=>{const _0x44441f=_0x3df135;let _0x27bd12=0x0,_0x38af74=0x0,_0xae25b1=0x0;for(const _0x1067d8 of _0x44a4d6){if(_0x1067d8[_0x44441f(0x181)]==='folder')_0x27bd12++;else{if(_0x1067d8[_0x44441f(0x181)]===_0x44441f(0x19b))_0x38af74++;else{if(_0x1067d8[_0x44441f(0x181)]===_0x44441f(0x1bb))_0xae25b1++;}}if(_0x1067d8[_0x44441f(0x1c3)]){const _0x17816b=_0x538281(_0x1067d8['children']);_0x27bd12+=_0x17816b[_0x44441f(0x1b6)],_0x38af74+=_0x17816b[_0x44441f(0x1a0)],_0xae25b1+=_0x17816b[_0x44441f(0x186)];}}return{'folders':_0x27bd12,'segments':_0x38af74,'journeys':_0xae25b1};},_0x3c1591=_0x538281(_0x1374ee);console[_0x3df135(0x190)](_0x3df135(0x1c0)+_0x3c1591[_0x3df135(0x1b6)]+_0x3df135(0x1c1)+(_0x3c1591['folders']!==0x1?'s':'')+',\x20'+_0x3c1591[_0x3df135(0x1a0)]+'\x20segment'+(_0x3c1591['segments']!==0x1?'s':'')+_0x3df135(0x185)+_0x3c1591['journeys']+_0x3df135(0x194)+(_0x3c1591[_0x3df135(0x186)]!==0x1?'s':''));const _0x33ecbd=_0x45f0f1=>{const _0x245fb9=_0x3df135;return getConsoleNextUrl(_0x379e49[_0x245fb9(0x1a4)],_0x245fb9(0x17e)+_0x326e5f['parentId']+_0x245fb9(0x1be)+_0x45f0f1);},_0x219a61=_0x40f863=>{const _0x369ccf=_0x3df135;return getConsoleNextUrl(_0x379e49[_0x369ccf(0x1a4)],'/app/ps/'+_0x326e5f[_0x369ccf(0x179)]+_0x369ccf(0x1be)+_0x40f863+_0x369ccf(0x1b2));};if(_0x379e49[_0x3df135(0x1af)]===_0x3df135(0x1a2)||_0x379e49[_0x3df135(0x1af)]===_0x3df135(0x1b9))await handleSDKOutput(_0x1374ee,_0x379e49);else{console['log'](a45_0xf41dc[_0x3df135(0x18a)]('['+_0xe8304+']'));const _0x44c084=formatTree(_0x1374ee,{'showMetadata':!![],'getSegmentUrl':_0x33ecbd,'getJourneyUrl':_0x219a61});console[_0x3df135(0x1a9)](_0x44c084);}return 0x0;}}
|
|
1
|
+
const a45_0x44ac84=a45_0x1339;(function(_0x48683d,_0x58350e){const _0x7246e8=a45_0x1339,_0x1d5739=_0x48683d();while(!![]){try{const _0x1b0fae=-parseInt(_0x7246e8(0x1f3))/0x1*(-parseInt(_0x7246e8(0x1e6))/0x2)+-parseInt(_0x7246e8(0x1c1))/0x3+parseInt(_0x7246e8(0x1e1))/0x4+parseInt(_0x7246e8(0x1ce))/0x5+parseInt(_0x7246e8(0x1c3))/0x6*(-parseInt(_0x7246e8(0x1d2))/0x7)+parseInt(_0x7246e8(0x1d6))/0x8*(-parseInt(_0x7246e8(0x1b2))/0x9)+-parseInt(_0x7246e8(0x1b5))/0xa;if(_0x1b0fae===_0x58350e)break;else _0x1d5739['push'](_0x1d5739['shift']());}catch(_0x5b47db){_0x1d5739['push'](_0x1d5739['shift']());}}}(a45_0x5755,0x19e67));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a45_0x1a7f56 from'chalk';function a45_0x1339(_0x18d29d,_0x5c6f52){_0x18d29d=_0x18d29d-0x1b0;const _0x57550b=a45_0x5755();let _0x133984=_0x57550b[_0x18d29d];return _0x133984;}export class SegmentsCommand extends BaseCommand{[a45_0x44ac84(0x1c6)]=a45_0x44ac84(0x1d1);[a45_0x44ac84(0x1b0)]=a45_0x44ac84(0x1dd);async[a45_0x44ac84(0x1c0)](_0x5ba7d2){const _0x1c2491=a45_0x44ac84,{options:_0xd94ea7,args:_0x5467fc}=_0x5ba7d2,_0x3bb8dd=_0xd94ea7[_0x1c2491(0x1db)],_0x2175cc=_0x5467fc[0x0];try{const _0x2e4684=_0xd94ea7[_0x1c2491(0x1b1)];_0xd94ea7[_0x1c2491(0x1b4)]&&(console[_0x1c2491(0x1e7)](_0x1c2491(0x1bb)+_0xd94ea7['site']),console[_0x1c2491(0x1e7)](_0x1c2491(0x1bd)+(_0x2e4684||_0x1c2491(0x1c9))),_0x2175cc&&console[_0x1c2491(0x1e7)](_0x1c2491(0x1b7)+_0x2175cc),_0x3bb8dd&&console[_0x1c2491(0x1e7)](_0x1c2491(0x1fc)));if(!_0x2e4684)return console['error'](_0x1c2491(0x1fb)),console[_0x1c2491(0x1e7)](''),console[_0x1c2491(0x1e7)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x1c2491(0x1e7)](_0x1c2491(0x1ec)),console[_0x1c2491(0x1e7)](_0x1c2491(0x1bc)),console[_0x1c2491(0x1e7)](''),console[_0x1c2491(0x1e7)](_0x1c2491(0x1ca)),0x1;const _0x4ea187=_0x2175cc&&(_0x2175cc[_0x1c2491(0x1f9)]('*')||_0x2175cc[_0x1c2491(0x1f9)]('?'));if(_0x4ea187)return await this[_0x1c2491(0x1d8)](_0x5ba7d2,_0x2e4684,_0x2175cc);const _0x2909ec=_0x2175cc?_0x2e4684+'/'+_0x2175cc:_0x2e4684;return _0x3bb8dd?await this[_0x1c2491(0x1d7)](_0x5ba7d2,_0x2909ec):await this[_0x1c2491(0x1b6)](_0x5ba7d2,_0x2909ec);}catch(_0x52cc81){if(_0x52cc81 instanceof SDKError)return console['error']('Error:\x20'+_0x52cc81['message']),_0x52cc81[_0x1c2491(0x1ee)]&&console[_0x1c2491(0x1e7)](_0x1c2491(0x1b3)+_0x52cc81['cause']),0x1;throw _0x52cc81;}}async['listWithPattern'](_0x170fc1,_0x1c2437,_0x40e12e){const _0x2d0c3a=a45_0x44ac84,{options:_0x2645a9,tdx:_0x2c1cf0}=_0x170fc1,_0x255d0f=await withSpinner(_0x2d0c3a(0x1e2)+_0x1c2437+_0x2d0c3a(0x1b9),()=>_0x2c1cf0[_0x2d0c3a(0x1f4)][_0x2d0c3a(0x1df)](_0x1c2437),{'verbose':_0x2645a9[_0x2d0c3a(0x1b4)]}),_0x1c56d5=_0x255d0f[_0x2d0c3a(0x1d3)],_0x4e1605=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x2c1cf0[_0x2d0c3a(0x1f4)][_0x2d0c3a(0x1dc)](_0x1c56d5[_0x2d0c3a(0x1e0)],_0x1c56d5[_0x2d0c3a(0x1d9)]),{'verbose':_0x2645a9[_0x2d0c3a(0x1b4)]}),{folders:_0x304a71,segments:_0x4fdc75,journeys:_0x2380ca}=_0x4e1605[_0x2d0c3a(0x1d3)],_0x158067=_0x40e12e[_0x2d0c3a(0x1de)](/[.+^${}()|[\]\\]/g,_0x2d0c3a(0x1d5))[_0x2d0c3a(0x1de)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x157985=new RegExp('^'+_0x158067+'$','i'),_0xb4b2a5=_0x304a71[_0x2d0c3a(0x1cf)](_0x40bde5=>_0x157985['test'](_0x40bde5[_0x2d0c3a(0x1c6)])),_0x31f4e2=_0x4fdc75[_0x2d0c3a(0x1cf)](_0x79daf8=>_0x157985[_0x2d0c3a(0x1cd)](_0x79daf8[_0x2d0c3a(0x1c6)])),_0x4e81e7=_0x2380ca[_0x2d0c3a(0x1cf)](_0x2615f1=>_0x157985[_0x2d0c3a(0x1cd)](_0x2615f1[_0x2d0c3a(0x1ef)])),_0x3c66ca=_0xb4b2a5[_0x2d0c3a(0x1e3)]+_0x31f4e2['length']+_0x4e81e7[_0x2d0c3a(0x1e3)];console[_0x2d0c3a(0x1e7)](_0x2d0c3a(0x1ea)+_0xb4b2a5[_0x2d0c3a(0x1e3)]+_0x2d0c3a(0x1e5)+(_0xb4b2a5[_0x2d0c3a(0x1e3)]!==0x1?'s':'')+',\x20'+_0x31f4e2['length']+_0x2d0c3a(0x1c2)+(_0x31f4e2['length']!==0x1?'s':'')+_0x2d0c3a(0x1c8)+_0x4e81e7[_0x2d0c3a(0x1e3)]+'\x20journey'+(_0x4e81e7['length']!==0x1?'s':'')+'\x20matching\x20\x27'+_0x40e12e+'\x27');const _0x1feac4=_0x23a526=>{const _0x50d2ea=_0x2d0c3a;return getConsoleNextUrl(_0x2645a9[_0x50d2ea(0x1f2)],_0x50d2ea(0x1cb)+_0x1c56d5[_0x50d2ea(0x1e0)]+_0x50d2ea(0x1f5)+_0x23a526);},_0x293549=_0x2645a9[_0x2d0c3a(0x1c7)]===_0x2d0c3a(0x1f6)||_0x2645a9['format']===_0x2d0c3a(0x1ed);if(_0x293549){const _0x45d7b1=[..._0xb4b2a5[_0x2d0c3a(0x1eb)](_0x29727d=>({..._0x29727d,'type':_0x2d0c3a(0x1cc)})),..._0x31f4e2[_0x2d0c3a(0x1eb)](_0x3ef088=>({..._0x3ef088,'type':'segment','url':_0x1feac4(_0x3ef088['id'])})),..._0x4e81e7[_0x2d0c3a(0x1eb)](_0x7caf1b=>({..._0x7caf1b,'name':_0x7caf1b[_0x2d0c3a(0x1ef)],'type':_0x2d0c3a(0x1bf)}))]['sort']((_0x2ea18c,_0x4eee6b)=>_0x2ea18c[_0x2d0c3a(0x1c6)][_0x2d0c3a(0x1d0)](_0x4eee6b[_0x2d0c3a(0x1c6)]));await handleSDKOutput(_0x45d7b1,_0x2645a9);}else{if(_0x3c66ca===0x0)console[_0x2d0c3a(0x1d4)](_0x2d0c3a(0x1f0)+_0x40e12e);else{console['log'](a45_0x1a7f56[_0x2d0c3a(0x1f7)]('['+_0x1c2437+_0x2d0c3a(0x1e8)+_0x40e12e+'\x27'));const _0x39077c=formatFlatList(_0xb4b2a5,_0x31f4e2,{'showMetadata':!![],'getSegmentUrl':_0x1feac4},_0x4e81e7);console[_0x2d0c3a(0x1d4)](_0x39077c);}}return 0x0;}async['listUnified'](_0x17cdd8,_0x5dd383){const _0x357f19=a45_0x44ac84,{options:_0x1c64ef,tdx:_0x5ee066}=_0x17cdd8,_0x2e2040=await withSpinner('Resolving\x20path\x20\x27'+_0x5dd383+_0x357f19(0x1b9),()=>_0x5ee066[_0x357f19(0x1f4)][_0x357f19(0x1df)](_0x5dd383),{'verbose':_0x1c64ef['verbose']}),_0x1145cf=_0x2e2040['data'];_0x1c64ef[_0x357f19(0x1b4)]&&(console['error']('Parent\x20ID:\x20'+_0x1145cf['parentId']),_0x1145cf[_0x357f19(0x1d9)]&&console[_0x357f19(0x1e7)](_0x357f19(0x1f1)+_0x1145cf['folderId']));const _0x56d9a1=await withSpinner(_0x357f19(0x1be),()=>_0x5ee066[_0x357f19(0x1f4)][_0x357f19(0x1dc)](_0x1145cf[_0x357f19(0x1e0)],_0x1145cf['folderId']),{'verbose':_0x1c64ef[_0x357f19(0x1b4)]}),{folders:_0x461655,segments:_0x1482d8,journeys:_0x4c9533}=_0x56d9a1[_0x357f19(0x1d3)],_0x5c54b7=_0x461655[_0x357f19(0x1e3)]+_0x1482d8['length']+_0x4c9533[_0x357f19(0x1e3)];console[_0x357f19(0x1e7)](_0x357f19(0x1ea)+_0x461655[_0x357f19(0x1e3)]+_0x357f19(0x1e5)+(_0x461655[_0x357f19(0x1e3)]!==0x1?'s':'')+',\x20'+_0x1482d8[_0x357f19(0x1e3)]+'\x20segment'+(_0x1482d8['length']!==0x1?'s':'')+_0x357f19(0x1c8)+_0x4c9533[_0x357f19(0x1e3)]+_0x357f19(0x1c4)+(_0x4c9533['length']!==0x1?'s':''));const _0x4e7733=_0x3c8c17=>{const _0x5f31ea=_0x357f19;return getConsoleNextUrl(_0x1c64ef[_0x5f31ea(0x1f2)],_0x5f31ea(0x1cb)+_0x1145cf['parentId']+_0x5f31ea(0x1f5)+_0x3c8c17);},_0x4987f8=_0x5df14d=>{const _0x1f21de=_0x357f19;return getConsoleNextUrl(_0x1c64ef[_0x1f21de(0x1f2)],'/app/ps/'+_0x1145cf[_0x1f21de(0x1e0)]+_0x1f21de(0x1f5)+_0x5df14d+'/j/da');},_0x255776=_0x1c64ef['format']==='json'||_0x1c64ef['format']===_0x357f19(0x1ed);if(_0x255776){const _0x24a44b=[..._0x461655['map'](_0x3026b7=>({..._0x3026b7,'type':'folder'})),..._0x1482d8[_0x357f19(0x1eb)](_0x135f1a=>({..._0x135f1a,'type':_0x357f19(0x1f4),'url':_0x4e7733(_0x135f1a['id'])})),..._0x4c9533[_0x357f19(0x1eb)](_0x10cda8=>({..._0x10cda8,'name':_0x10cda8[_0x357f19(0x1ef)],'type':_0x357f19(0x1bf),'url':_0x4987f8(_0x10cda8['id'])}))][_0x357f19(0x1e9)]((_0x3185f8,_0x51f533)=>_0x3185f8[_0x357f19(0x1c6)][_0x357f19(0x1d0)](_0x51f533['name']));await handleSDKOutput(_0x24a44b,_0x1c64ef);}else{if(_0x5c54b7===0x0)console[_0x357f19(0x1d4)](a45_0x1a7f56[_0x357f19(0x1f7)]('['+_0x5dd383+']')),console[_0x357f19(0x1d4)](_0x357f19(0x1fa));else{console[_0x357f19(0x1d4)](a45_0x1a7f56[_0x357f19(0x1f7)]('['+_0x5dd383+']'));const _0xe22438=formatFlatList(_0x461655,_0x1482d8,{'showMetadata':!![],'getSegmentUrl':_0x4e7733,'getJourneyUrl':_0x4987f8},_0x4c9533);console[_0x357f19(0x1d4)](_0xe22438);}}return 0x0;}async[a45_0x44ac84(0x1d7)](_0x2cc1af,_0x39bc9){const _0x41e427=a45_0x44ac84,{options:_0x17759a,tdx:_0x5efd5f}=_0x2cc1af,_0x2e6b2a=await withSpinner('Resolving\x20path\x20\x27'+_0x39bc9+_0x41e427(0x1b9),()=>_0x5efd5f['segment'][_0x41e427(0x1df)](_0x39bc9),{'verbose':_0x17759a['verbose']}),_0x13690e=_0x2e6b2a[_0x41e427(0x1d3)];_0x17759a[_0x41e427(0x1b4)]&&(console[_0x41e427(0x1e7)]('Parent\x20ID:\x20'+_0x13690e[_0x41e427(0x1e0)]),_0x13690e[_0x41e427(0x1d9)]&&console[_0x41e427(0x1e7)](_0x41e427(0x1f1)+_0x13690e[_0x41e427(0x1d9)]));const _0x21c4f4=_0x17759a[_0x41e427(0x1da)]||0xa,_0x67218=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x5efd5f[_0x41e427(0x1f4)][_0x41e427(0x1d7)](_0x13690e[_0x41e427(0x1e0)],_0x13690e[_0x41e427(0x1d9)],0x0,_0x21c4f4),{'verbose':_0x17759a[_0x41e427(0x1b4)]}),_0x5a8576=_0x67218[_0x41e427(0x1d3)],_0x298c16=_0x4b7b2f=>{const _0x144e7b=_0x41e427;let _0x450c6b=0x0,_0x93d88e=0x0,_0x1f52a6=0x0;for(const _0x2e9586 of _0x4b7b2f){if(_0x2e9586[_0x144e7b(0x1ba)]===_0x144e7b(0x1cc))_0x450c6b++;else{if(_0x2e9586[_0x144e7b(0x1ba)]===_0x144e7b(0x1f4))_0x93d88e++;else{if(_0x2e9586['type']===_0x144e7b(0x1bf))_0x1f52a6++;}}if(_0x2e9586[_0x144e7b(0x1c5)]){const _0x75948b=_0x298c16(_0x2e9586['children']);_0x450c6b+=_0x75948b[_0x144e7b(0x1b8)],_0x93d88e+=_0x75948b['segments'],_0x1f52a6+=_0x75948b[_0x144e7b(0x1f8)];}}return{'folders':_0x450c6b,'segments':_0x93d88e,'journeys':_0x1f52a6};},_0x1c45a1=_0x298c16(_0x5a8576);console['error'](_0x41e427(0x1e4)+_0x1c45a1[_0x41e427(0x1b8)]+_0x41e427(0x1e5)+(_0x1c45a1[_0x41e427(0x1b8)]!==0x1?'s':'')+',\x20'+_0x1c45a1[_0x41e427(0x1d1)]+_0x41e427(0x1c2)+(_0x1c45a1[_0x41e427(0x1d1)]!==0x1?'s':'')+_0x41e427(0x1c8)+_0x1c45a1[_0x41e427(0x1f8)]+'\x20journey'+(_0x1c45a1[_0x41e427(0x1f8)]!==0x1?'s':''));const _0x2fb258=_0x1116c2=>{const _0x181add=_0x41e427;return getConsoleNextUrl(_0x17759a['site'],_0x181add(0x1cb)+_0x13690e[_0x181add(0x1e0)]+_0x181add(0x1f5)+_0x1116c2);},_0x2e91d1=_0x34d557=>{const _0x5161c3=_0x41e427;return getConsoleNextUrl(_0x17759a[_0x5161c3(0x1f2)],_0x5161c3(0x1cb)+_0x13690e[_0x5161c3(0x1e0)]+_0x5161c3(0x1f5)+_0x34d557+'/j/da');};if(_0x17759a['format']===_0x41e427(0x1f6)||_0x17759a[_0x41e427(0x1c7)]===_0x41e427(0x1ed))await handleSDKOutput(_0x5a8576,_0x17759a);else{console['log'](a45_0x1a7f56[_0x41e427(0x1f7)]('['+_0x39bc9+']'));const _0x3bf51a=formatTree(_0x5a8576,{'showMetadata':!![],'getSegmentUrl':_0x2fb258,'getJourneyUrl':_0x2e91d1});console['log'](_0x3bf51a);}return 0x0;}}function a45_0x5755(){const _0x79a41d=['Site:\x20','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','Parent\x20segment\x20context:\x20','Listing\x20folders,\x20segments,\x20and\x20journeys...','journey','execute','303876QDTdtq','\x20segment','1010118ftqaSk','\x20journey','children','name','format',',\x20and\x20','(not\x20set)','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','/app/ps/','folder','test','1026430PObfHv','filter','localeCompare','segments','7FqSlGo','data','log','\x5c$&','88ueQZBs','listRecursive','listWithPattern','folderId','maxDepth','recursive','listUnifiedWithJourneys','List\x20folders\x20and\x20child\x20segments','replace','resolvePathToResource','parentId','576280VpoDyU','Resolving\x20parent\x20segment\x20\x27','length','✔\x20Built\x20tree\x20with\x20','\x20folder','2gDyJAK','error',']\x20matching\x20\x27','sort','✔\x20Found\x20','map','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','jsonl','cause','journeyBundleName','No\x20items\x20match\x20pattern:\x20','Folder\x20ID:\x20','site','172941LbNIZs','segment','/e/','json','dim','journeys','includes','(empty)','Error:\x20No\x20parent\x20segment\x20context\x20set.','Recursive\x20mode:\x20enabled','description','parentSegment','61515kIoKoP','\x20\x20Cause:\x20','verbose','713800zLbMlY','listUnified','Folder/pattern\x20arg:\x20','folders','\x27...','type'];a45_0x5755=function(){return _0x79a41d;};return a45_0x5755();}
|
package/dist/commands/show.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x229517=a46_0x27d5;(function(_0x414b66,_0x14c243){const _0x941420=a46_0x27d5,_0x47dc12=_0x414b66();while(!![]){try{const _0x2349a6=-parseInt(_0x941420(0x139))/0x1*(parseInt(_0x941420(0x12e))/0x2)+parseInt(_0x941420(0x133))/0x3+parseInt(_0x941420(0x136))/0x4+parseInt(_0x941420(0x13a))/0x5+parseInt(_0x941420(0x138))/0x6+-parseInt(_0x941420(0x126))/0x7*(-parseInt(_0x941420(0x12a))/0x8)+-parseInt(_0x941420(0x130))/0x9*(parseInt(_0x941420(0x13d))/0xa);if(_0x2349a6===_0x14c243)break;else _0x47dc12['push'](_0x47dc12['shift']());}catch(_0x52723c){_0x47dc12['push'](_0x47dc12['shift']());}}}(a46_0x4cc1,0x1e993));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a46_0x27d5(_0x5ec1b0,_0x4f0cde){_0x5ec1b0=_0x5ec1b0-0x11c;const _0x4cc1c8=a46_0x4cc1();let _0x27d5fe=_0x4cc1c8[_0x5ec1b0];return _0x27d5fe;}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a46_0x229517(0x137)]=a46_0x229517(0x127);[a46_0x229517(0x12d)]=a46_0x229517(0x12f);async['execute'](_0x5a3ac8){const _0x10a897=a46_0x229517;return this[_0x10a897(0x129)](_0x5a3ac8);}async[a46_0x229517(0x129)](_0x5965d8){const _0x17a027=a46_0x229517,{options:_0x277528,args:_0x3f4d9b,tdx:_0x18d7f7}=_0x5965d8;let _0x346c04;try{_0x346c04=parseTableReference(_0x3f4d9b[0x0]);const _0x3c5436=_0x277528[_0x17a027(0x11e)];!_0x346c04['database']&&_0x3c5436&&(_0x346c04[_0x17a027(0x11e)]=_0x3c5436);const _0x1c19f3=validateTableDescribeReference(_0x346c04);if(_0x1c19f3)return console[_0x17a027(0x123)](_0x17a027(0x11f)+_0x1c19f3),console[_0x17a027(0x123)](_0x17a027(0x13f)),console['error'](_0x17a027(0x124)),console[_0x17a027(0x123)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x35ea27){return console['error'](_0x17a027(0x11f)+_0x35ea27[_0x17a027(0x125)]),console['error'](_0x17a027(0x13f)),console[_0x17a027(0x123)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x17a027(0x123)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x5751e9=_0x346c04['catalog'],_0x373a9e=_0x346c04[_0x17a027(0x11e)],_0x35f486=_0x346c04['table'],_0x1b6f09=resolveLimit(_0x277528['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x277528[_0x17a027(0x134)]&&(console['error'](_0x17a027(0x12c)+_0x277528[_0x17a027(0x132)]),_0x5751e9&&console[_0x17a027(0x123)](_0x17a027(0x13e)+_0x5751e9),console[_0x17a027(0x123)]('Database:\x20'+_0x373a9e),console[_0x17a027(0x123)]('Table:\x20'+_0x35f486),console[_0x17a027(0x123)]('Limit:\x20'+_0x1b6f09));const _0x23a28f=_0x5751e9?_0x5751e9+'.'+_0x373a9e+'.'+_0x35f486:_0x373a9e+'.'+_0x35f486,_0x5f56ad=await withSpinner('Querying\x20'+_0x23a28f+_0x17a027(0x131),()=>_0x18d7f7['query']['showTable'](_0x373a9e,_0x35f486,_0x1b6f09,_0x5751e9),{'verbose':_0x277528[_0x17a027(0x134)]}),_0x1607b6=_0x5f56ad[_0x17a027(0x122)],_0x84bddc=_0x1607b6[_0x17a027(0x122)];return _0x84bddc[_0x17a027(0x135)]===0x0?console[_0x17a027(0x123)](_0x17a027(0x13c)):console[_0x17a027(0x123)](_0x17a027(0x140)+_0x84bddc[_0x17a027(0x135)]+_0x17a027(0x11d)+(_0x84bddc[_0x17a027(0x135)]!==0x1?'s':'')+_0x17a027(0x128)+_0x23a28f),await handleSDKOutput(_0x84bddc,_0x277528),0x0;}catch(_0x36ef93){if(_0x36ef93 instanceof SDKError)return console['error'](_0x17a027(0x11f)+_0x36ef93[_0x17a027(0x125)]),_0x36ef93[_0x17a027(0x121)]&&console[_0x17a027(0x123)](_0x17a027(0x11c)+_0x36ef93[_0x17a027(0x121)]),0x1;throw _0x36ef93;}}['validate'](_0x2d4c6d){const _0x3cc811=a46_0x229517;if(_0x2d4c6d[_0x3cc811(0x120)][_0x3cc811(0x135)]===0x0)return _0x3cc811(0x13b);if(_0x2d4c6d[_0x3cc811(0x120)]['length']>0x1)return _0x3cc811(0x12b);return undefined;}}function a46_0x4cc1(){const _0x3b880f=['1LBAfeo','1062685qWaQFg','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','9050Haajfc','Catalog:\x20','Usage:\x20tdx\x20show\x20<database.table>','✔\x20Retrieved\x20','\x20\x20Cause:\x20','\x20row','database','Error:\x20','args','cause','data','error','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','message','1360016KNyQGi','show','\x20from\x20','showTable','8CgciAE','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Site:\x20','description','283132rVEtlM','Show\x20table\x20contents','6345BvrOxQ','...','site','696945RvbHhm','verbose','length','659896MGjjoB','name','604848SfjRom'];a46_0x4cc1=function(){return _0x3b880f;};return a46_0x4cc1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x594681=a47_0x4577;(function(_0x383012,_0x59c33d){const _0xde0427=a47_0x4577,_0x1e8101=_0x383012();while(!![]){try{const _0x4fa9e4=parseInt(_0xde0427(0xbd))/0x1*(parseInt(_0xde0427(0xa3))/0x2)+parseInt(_0xde0427(0xab))/0x3+parseInt(_0xde0427(0xc8))/0x4*(-parseInt(_0xde0427(0xaa))/0x5)+parseInt(_0xde0427(0xc9))/0x6*(-parseInt(_0xde0427(0xba))/0x7)+parseInt(_0xde0427(0xc6))/0x8*(parseInt(_0xde0427(0xcf))/0x9)+-parseInt(_0xde0427(0xa1))/0xa+parseInt(_0xde0427(0x9f))/0xb;if(_0x4fa9e4===_0x59c33d)break;else _0x1e8101['push'](_0x1e8101['shift']());}catch(_0x409a42){_0x1e8101['push'](_0x1e8101['shift']());}}}(a47_0x19cf,0xe0454));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';function a47_0x4577(_0x3fd5ec,_0x230bdd){_0x3fd5ec=_0x3fd5ec-0x9f;const _0x19cf50=a47_0x19cf();let _0x45773b=_0x19cf50[_0x3fd5ec];return _0x45773b;}import{getOAuthTokens}from'../core/oauth-keychain.js';import{HTTPClientError}from'../sdk/client/http-client.js';function a47_0x19cf(){const _0x377134=['User:','first_name','join','log','7Oygrqk','displayWithSources','N/A','29UTSGcd','✓\x20Authentication\x20successful\x0a','Read\x20credential\x20from\x20','session','error','No\x20credential\x20found','bold','name','config','8BwUdeW','Name:','16leoNPH','7841982wdIWdT','cli','execute','dim','message','TDX_PROFILE\x20env','4217769WLbnuL','Show\x20authentication\x20status\x20and\x20current\x20context','23419528xJkVpp','status','6263740SjFaoW','CLI\x20flag','8692yFeSvL','description','cyan','filter','jobs','last_name','site','514930FaReJT','1620612FiapjZ','getUserInfo','yellow','profileSource','(from\x20','tdx','\x20profile:\x20','Account\x20ID:','email','account_id','profile'];a47_0x19cf=function(){return _0x377134;};return a47_0x19cf();}import{GlobalContext}from'../core/global-context.js';import a47_0x3f6c8d from'chalk';export class StatusCommand extends BaseCommand{[a47_0x594681(0xc4)]=a47_0x594681(0xa0);[a47_0x594681(0xa4)]=a47_0x594681(0xd0);async[a47_0x594681(0xcb)](_0x53d57f){const _0x5c75a0=a47_0x594681,{options:_0x4c2a81,tdx:_0xeeccbb}=_0x53d57f,_0x101006=_0x4c2a81[_0x5c75a0(0xa9)],_0x26d604=new GlobalContext(_0x4c2a81),_0x18484b=_0x26d604[_0x5c75a0(0xb5)],_0x19395c=_0x26d604[_0x5c75a0(0xae)],_0x5c9701=_0x19395c===_0x5c75a0(0xca)?_0x5c75a0(0xa2):_0x19395c==='session'?_0x5c75a0(0xc0):_0x19395c==='env'?_0x5c75a0(0xce):_0x19395c===_0x5c75a0(0xc5)?_0x5c75a0(0xc5):null,_0x185133=_0x18484b?a47_0x3f6c8d[_0x5c75a0(0xa5)](_0x18484b):a47_0x3f6c8d[_0x5c75a0(0xcc)](_0x5c75a0(0xbc)),_0xadf99e=_0x5c9701?'\x20'+a47_0x3f6c8d[_0x5c75a0(0xcc)](_0x5c75a0(0xaf)+_0x5c9701+')'):'';console[_0x5c75a0(0xb9)](a47_0x3f6c8d[_0x5c75a0(0xc3)](_0x5c75a0(0xb0))+_0x5c75a0(0xb1)+_0x185133+_0xadf99e+'\x20'+a47_0x3f6c8d[_0x5c75a0(0xcc)]('(')+'site:\x20'+a47_0x3f6c8d[_0x5c75a0(0xa5)](_0x101006)+a47_0x3f6c8d[_0x5c75a0(0xcc)](')'));const _0x5c07c9=await getOAuthTokens(_0x18484b);if(_0x5c07c9)console['log']('Credential\x20type:\x20'+a47_0x3f6c8d[_0x5c75a0(0xa5)]('OAuth'));else{const _0x35885b=await resolveAPIKeyAsync(_0x101006,_0x18484b);if(_0x35885b){const {source:_0x318fc7,isDeprecated:_0x36805c}=_0x35885b,_0x4e7c94=_0x5c75a0(0xbf)+a47_0x3f6c8d[_0x5c75a0(0xa5)](_0x318fc7);console[_0x5c75a0(0xb9)](_0x36805c?a47_0x3f6c8d['yellow'](_0x4e7c94):_0x4e7c94);}else console[_0x5c75a0(0xb9)](a47_0x3f6c8d[_0x5c75a0(0xad)](_0x5c75a0(0xc2)));}let _0x560686=![];try{const _0x31a080=await _0xeeccbb[_0x5c75a0(0xa7)][_0x5c75a0(0xac)]();console[_0x5c75a0(0xb9)](a47_0x3f6c8d['green'](_0x5c75a0(0xbe))),console[_0x5c75a0(0xb9)](a47_0x3f6c8d[_0x5c75a0(0xc3)](_0x5c75a0(0xb6))+'\x20'+a47_0x3f6c8d[_0x5c75a0(0xa5)](_0x31a080[_0x5c75a0(0xb3)]));if(_0x31a080[_0x5c75a0(0xb7)]||_0x31a080['last_name']){const _0x2759c6=[_0x31a080['first_name'],_0x31a080[_0x5c75a0(0xa8)]][_0x5c75a0(0xa6)](Boolean)[_0x5c75a0(0xb8)]('\x20');console[_0x5c75a0(0xb9)](a47_0x3f6c8d[_0x5c75a0(0xc3)](_0x5c75a0(0xc7))+'\x20'+_0x2759c6);}_0x31a080[_0x5c75a0(0xb4)]&&console[_0x5c75a0(0xb9)](a47_0x3f6c8d['bold'](_0x5c75a0(0xb2))+'\x20'+a47_0x3f6c8d['yellow'](_0x31a080[_0x5c75a0(0xb4)])),_0x560686=!![];}catch(_0x6194b3){_0x6194b3 instanceof HTTPClientError&&_0x6194b3[_0x5c75a0(0xa0)]===0x191?printAuthError(_0x6194b3,!![],_0x18484b):console[_0x5c75a0(0xc1)](a47_0x3f6c8d['red']('✗\x20Validation\x20failed:\x20'+(_0x6194b3 instanceof Error?_0x6194b3[_0x5c75a0(0xcd)]:String(_0x6194b3))));}return console['log'](),_0x26d604[_0x5c75a0(0xbb)](),_0x560686?0x0:0x1;}}
|