@treasuredata/tdx 2026.8.0 → 2026.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.d.ts +9 -0
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts +10 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.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/auth-token.d.ts +23 -0
- package/dist/sdk/auth-token.d.ts.map +1 -0
- package/dist/sdk/auth-token.js +1 -0
- package/dist/sdk/auth-token.js.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.d.ts +2 -0
- package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js.map +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js.map +1 -1
- package/dist/sdk/cas/types.d.ts +2 -0
- package/dist/sdk/cas/types.d.ts.map +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.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/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.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/cas.d.ts +4 -0
- package/dist/sdk/types/cas.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30688a,_0x3fa491){const _0x4137c8=a174_0xc3a5,_0x4e37d5=_0x30688a();while(!![]){try{const _0x20eac5=-parseInt(_0x4137c8(0x156))/0x1*(-parseInt(_0x4137c8(0x183))/0x2)+-parseInt(_0x4137c8(0x17a))/0x3*(-parseInt(_0x4137c8(0x17b))/0x4)+parseInt(_0x4137c8(0x15e))/0x5*(-parseInt(_0x4137c8(0x15b))/0x6)+parseInt(_0x4137c8(0x15c))/0x7+parseInt(_0x4137c8(0x160))/0x8*(-parseInt(_0x4137c8(0x155))/0x9)+-parseInt(_0x4137c8(0x177))/0xa+parseInt(_0x4137c8(0x159))/0xb*(-parseInt(_0x4137c8(0x17e))/0xc);if(_0x20eac5===_0x3fa491)break;else _0x4e37d5['push'](_0x4e37d5['shift']());}catch(_0x4ad646){_0x4e37d5['push'](_0x4e37d5['shift']());}}}(a174_0x8d15,0x72e10));import a174_0x5359ea from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';function a174_0xc3a5(_0x7e2dab,_0x3ca5d6){_0x7e2dab=_0x7e2dab-0x154;const _0x8d1583=a174_0x8d15();let _0xc3a5a0=_0x8d1583[_0x7e2dab];return _0xc3a5a0;}import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x27a362){const _0x52a9f8=a174_0xc3a5;return _0x27a362['type']!==_0x52a9f8(0x188);}export function isScopedResolution(_0x3ff39b){const _0x11fce7=a174_0xc3a5;return _0x3ff39b[_0x11fce7(0x187)]===_0x11fce7(0x182)||_0x3ff39b[_0x11fce7(0x187)]===_0x11fce7(0x180)||_0x3ff39b[_0x11fce7(0x187)]==='context';}export function getScopedDetails(_0x151c08){const _0x5a51bc=a174_0xc3a5;if(isScopedResolution(_0x151c08))return{'isScoped':_0x151c08[_0x5a51bc(0x173)],'scopedFolderPath':_0x151c08[_0x5a51bc(0x163)]};return undefined;}async function findTdxConfigAsync(_0xe0fc8,_0x36cea5){const _0x16339d=a174_0xc3a5;let _0x1fa6c1=a174_0x5359ea[_0x16339d(0x18a)](_0xe0fc8);const _0x527dd4=a174_0x5359ea[_0x16339d(0x157)](_0x1fa6c1)[_0x16339d(0x15f)];while(_0x1fa6c1!==_0x527dd4){const _0x39af32=a174_0x5359ea[_0x16339d(0x164)](_0x1fa6c1,_0x16339d(0x184));if(await _0x36cea5[_0x16339d(0x16e)](_0x39af32))try{const _0xa383f6=await _0x36cea5[_0x16339d(0x167)](_0x39af32),_0xa84212=JSON['parse'](_0xa383f6);if(_0xa84212[_0x16339d(0x16b)]&&typeof _0xa84212[_0x16339d(0x16b)]==='string')return{'configPath':_0x39af32,'configDir':_0x1fa6c1,'parentSegment':_0xa84212[_0x16339d(0x16b)]};}catch{}_0x1fa6c1=a174_0x5359ea['dirname'](_0x1fa6c1);}return null;}function a174_0x8d15(){const _0x1afe4f=['parent_name','parentSegment','scopedFolderPath','join','segmentName','resourceType','readFile','File\x20not\x20found','invalid_yaml','No\x20tdx.json\x20found','parent_segment','startsWith','extname','exists','file_not_found','no_config','configDir','journey','isScoped','cwd','message','no_parent','9049890BrEzrw','dirname','replace','2768811PvPDgy','4wHvzbC','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','relative','23544GFnXfS','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','file','includes','directory','2hydWJs','tdx.json','folderPath','No\x20tdx.json\x20found\x20for\x20file:\x20','type','error','trim','resolve','basename','535023GoGcHA','740147DCypwt','parse','context','1287nmKwav','match','6HbfOhj','5351479OYoJsx','isDirectory','3220765egiWnT','root','24hePpoq'];a174_0x8d15=function(){return _0x1afe4f;};return a174_0x8d15();}function calculateScopedPath(_0x2ddce5,_0x1748b4){const _0x1e1488=a174_0xc3a5,_0x269e28=a174_0x5359ea[_0x1e1488(0x17d)](_0x1748b4,_0x2ddce5),_0x47bb41=_0x269e28!==''&&_0x269e28!=='.'&&!_0x269e28[_0x1e1488(0x16c)]('..');return{'isScoped':_0x47bb41,'scopedFolderPath':_0x47bb41?_0x269e28[_0x1e1488(0x179)](/\\/g,'/'):''};}export async function resolveTarget(_0x4e36e9){const _0x370af9=a174_0xc3a5,{arg:_0x387cb0,contextParent:_0x37795b,cwd:cwd=process[_0x370af9(0x174)](),fs:fs=nodeFileSystem}=_0x4e36e9;if(_0x387cb0&&isYamlFilePath(_0x387cb0))try{const _0x25fa29=await resolveYamlFilePath(_0x387cb0,fs),_0xe3532a=a174_0x5359ea[_0x370af9(0x18a)](_0x387cb0),_0xc6cd1c=a174_0x5359ea[_0x370af9(0x178)](_0xe3532a),_0x10bc4b=await findTdxConfigAsync(_0xc6cd1c,fs);if(!_0x10bc4b){if(_0x37795b){const _0x3eb944=a174_0x5359ea['dirname'](_0xe3532a);return{'type':_0x370af9(0x180),'parentName':_0x37795b,'targetDir':_0x3eb944,'configRoot':_0x3eb944,'filePath':_0xe3532a,'resourceName':_0x25fa29[_0x370af9(0x165)],'folderPath':_0x25fa29['folderPath'],'resourceType':_0x25fa29[_0x370af9(0x166)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x387cb0,'arg':_0x387cb0,'helpText':_0x370af9(0x17c)};}const _0x37af39=calculateScopedPath(_0xc6cd1c,_0x10bc4b[_0x370af9(0x171)]);return{'type':'file','parentName':_0x10bc4b[_0x370af9(0x162)],'targetDir':_0x10bc4b[_0x370af9(0x171)],'configRoot':_0x10bc4b['configDir'],'filePath':_0xe3532a,'resourceName':_0x25fa29['segmentName'],'folderPath':_0x25fa29[_0x370af9(0x185)],'resourceType':_0x25fa29[_0x370af9(0x166)],'isScoped':_0x37af39[_0x370af9(0x173)],'scopedFolderPath':_0x37af39['scopedFolderPath']};}catch(_0x3bee7a){const _0x14b606=_0x3bee7a instanceof Error?_0x3bee7a[_0x370af9(0x175)]:String(_0x3bee7a);if(_0x14b606['includes'](_0x370af9(0x168)))return{'type':_0x370af9(0x188),'errorCode':_0x370af9(0x16f),'message':'File\x20not\x20found:\x20'+_0x387cb0,'arg':_0x387cb0};if(_0x14b606[_0x370af9(0x181)](_0x370af9(0x16a))){if(_0x37795b){const _0x193629=a174_0x5359ea['resolve'](_0x387cb0);if(await fs['exists'](_0x193629)){const _0x37ab97=a174_0x5359ea[_0x370af9(0x178)](_0x193629),_0x19be5c=await fs[_0x370af9(0x167)](_0x193629),_0x4d75f8=_0x19be5c['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x144a2c=_0x19be5c[_0x370af9(0x15a)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x491ba0=_0x4d75f8?_0x4d75f8[0x1]['trim']():a174_0x5359ea[_0x370af9(0x154)](_0x387cb0,a174_0x5359ea[_0x370af9(0x16d)](_0x387cb0)),_0x376d50=_0x144a2c&&_0x144a2c[0x1][_0x370af9(0x189)]()===_0x370af9(0x172)?_0x370af9(0x172):'segment';return{'type':_0x370af9(0x180),'parentName':_0x37795b,'targetDir':_0x37ab97,'configRoot':_0x37ab97,'filePath':_0x193629,'resourceName':_0x491ba0,'folderPath':'','resourceType':_0x376d50,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':'no_config','message':_0x370af9(0x186)+_0x387cb0,'arg':_0x387cb0,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':_0x370af9(0x188),'errorCode':_0x370af9(0x169),'message':_0x14b606,'arg':_0x387cb0};}if(_0x387cb0){const _0x2d0871=a174_0x5359ea[_0x370af9(0x18a)](cwd,_0x387cb0);let _0x1323b5=null;try{_0x1323b5=await fs['stat'](_0x2d0871);}catch{}if(_0x1323b5?.[_0x370af9(0x15d)]()){const _0x421663=await findTdxConfigAsync(_0x2d0871,fs);if(_0x421663){const _0x188ced=calculateScopedPath(_0x2d0871,_0x421663[_0x370af9(0x171)]);return{'type':_0x370af9(0x182),'parentName':_0x421663['parentSegment'],'targetDir':_0x2d0871,'configRoot':_0x421663[_0x370af9(0x171)],'isScoped':_0x188ced[_0x370af9(0x173)],'scopedFolderPath':_0x188ced[_0x370af9(0x163)]};}if(_0x37795b)return{'type':_0x370af9(0x182),'parentName':_0x37795b,'targetDir':_0x2d0871,'configRoot':_0x2d0871,'isScoped':![],'scopedFolderPath':''};return{'type':_0x370af9(0x188),'errorCode':_0x370af9(0x170),'message':_0x370af9(0x17f)+_0x387cb0,'arg':_0x387cb0,'helpText':_0x370af9(0x17c)};}if(_0x1323b5?.['isFile']())return{'type':_0x370af9(0x188),'errorCode':'invalid_yaml','message':'Not\x20a\x20YAML\x20file:\x20'+_0x387cb0,'arg':_0x387cb0,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x4120cc=sanitizeFileName(_0x387cb0),_0x9d284d=getSegmentRootDir(_0x4120cc,cwd);return{'type':_0x370af9(0x161),'parentName':_0x387cb0,'targetDir':_0x9d284d,'configRoot':_0x9d284d};}const _0x3e56b9=await findTdxConfigAsync(cwd,fs);if(_0x3e56b9){const _0x4aaaf8=calculateScopedPath(cwd,_0x3e56b9[_0x370af9(0x171)]);return{'type':_0x370af9(0x158),'parentName':_0x3e56b9['parentSegment'],'targetDir':cwd,'configRoot':_0x3e56b9[_0x370af9(0x171)],'isScoped':_0x4aaaf8[_0x370af9(0x173)],'scopedFolderPath':_0x4aaaf8['scopedFolderPath']};}if(_0x37795b){const _0x36deac=sanitizeFileName(_0x37795b),_0x2f7357=getSegmentRootDir(_0x36deac,cwd);return{'type':_0x370af9(0x158),'parentName':_0x37795b,'targetDir':_0x2f7357,'configRoot':_0x2f7357,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x370af9(0x176),'message':'Parent\x20segment\x20not\x20specified','helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x316ac8=a175_0x2e53;(function(_0x3d790a,_0x97db2a){const _0x5f56ba=a175_0x2e53,_0xabcb72=_0x3d790a();while(!![]){try{const _0x30446f=parseInt(_0x5f56ba(0xea))/0x1*(-parseInt(_0x5f56ba(0xf4))/0x2)+-parseInt(_0x5f56ba(0xf6))/0x3+-parseInt(_0x5f56ba(0xec))/0x4*(-parseInt(_0x5f56ba(0xe9))/0x5)+parseInt(_0x5f56ba(0xe4))/0x6+parseInt(_0x5f56ba(0xf7))/0x7*(parseInt(_0x5f56ba(0xed))/0x8)+-parseInt(_0x5f56ba(0xe2))/0x9*(-parseInt(_0x5f56ba(0xf5))/0xa)+parseInt(_0x5f56ba(0xe1))/0xb*(parseInt(_0x5f56ba(0xee))/0xc);if(_0x30446f===_0x97db2a)break;else _0xabcb72['push'](_0xabcb72['shift']());}catch(_0x380bad){_0xabcb72['push'](_0xabcb72['shift']());}}}(a175_0x2bc4,0xadca5));import{existsSync,readFileSync}from'fs';import a175_0x2e74ed from'path';const TDX_CONFIG_FILE=a175_0x316ac8(0xe5),SEGMENTS_DIR=a175_0x316ac8(0xf8);export function findTdxConfigPath(_0x128daa=process[a175_0x316ac8(0xf2)]()){const _0x4b269d=a175_0x316ac8;let _0x47694f=a175_0x2e74ed[_0x4b269d(0xfa)](_0x128daa);const _0x57e2f0=a175_0x2e74ed[_0x4b269d(0xeb)](_0x47694f)[_0x4b269d(0xe6)];while(_0x47694f!==_0x57e2f0){const _0x5b8738=a175_0x2e74ed[_0x4b269d(0xfc)](_0x47694f,TDX_CONFIG_FILE);if(existsSync(_0x5b8738))return _0x5b8738;_0x47694f=a175_0x2e74ed[_0x4b269d(0xfb)](_0x47694f);}return null;}function a175_0x2e53(_0x3771c6,_0x2b0bdd){_0x3771c6=_0x3771c6-0xe1;const _0x2bc421=a175_0x2bc4();let _0x2e53ad=_0x2bc421[_0x3771c6];return _0x2e53ad;}export function loadTdxConfig(_0x3a659e){const _0x11e0af=a175_0x316ac8,_0x2c243f=readFileSync(_0x3a659e,'utf-8');let _0x22b5d7;try{_0x22b5d7=JSON[_0x11e0af(0xeb)](_0x2c243f);}catch{throw new Error(_0x11e0af(0xf9)+_0x3a659e);}if(!_0x22b5d7||typeof _0x22b5d7!==_0x11e0af(0xef))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0xd06fb0=_0x22b5d7,_0x180104=_0xd06fb0[_0x11e0af(0xf3)]&&typeof _0xd06fb0[_0x11e0af(0xf3)]===_0x11e0af(0xf0),_0x5beb95=_0xd06fb0[_0x11e0af(0xe3)]&&typeof _0xd06fb0[_0x11e0af(0xe3)]===_0x11e0af(0xf0);if(!_0x180104&&!_0x5beb95)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x37b5f7={};return _0x180104&&(_0x37b5f7[_0x11e0af(0xf3)]=_0xd06fb0[_0x11e0af(0xf3)]),_0x5beb95&&(_0x37b5f7[_0x11e0af(0xe3)]=_0xd06fb0['engage_workspace']),_0x37b5f7;}export function findTdxConfig(_0x269b29=process[a175_0x316ac8(0xf2)]()){const _0x34ff92=a175_0x316ac8,_0x4a7cc8=findTdxConfigPath(_0x269b29);if(!_0x4a7cc8)throw new Error(_0x34ff92(0xe8));const _0x560a14=loadTdxConfig(_0x4a7cc8),_0x566fb4=a175_0x2e74ed[_0x34ff92(0xfb)](_0x4a7cc8);return{'config':_0x560a14,'configPath':_0x4a7cc8,'configDir':_0x566fb4};}export function tryFindTdxConfig(_0x3f3fc5){try{return findTdxConfig(_0x3f3fc5);}catch{return null;}}export function getSegmentRootDir(_0x1a3ef6,_0x116421=process[a175_0x316ac8(0xf2)]()){const _0x370e26=a175_0x316ac8;return a175_0x2e74ed[_0x370e26(0xfc)](_0x116421,SEGMENTS_DIR,_0x1a3ef6);}export function getTdxConfigPath(_0x116cfd,_0x127dc4=process[a175_0x316ac8(0xf2)]()){const _0x12f476=a175_0x316ac8;return a175_0x2e74ed[_0x12f476(0xfc)](getSegmentRootDir(_0x116cfd,_0x127dc4),TDX_CONFIG_FILE);}function a175_0x2bc4(){const _0x241e3f=['startsWith','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','16145YQhzMU','1HqJVMX','parse','900kVbTPk','418312LwccjT','13716kqcpEQ','object','string','relative','cwd','parent_segment','2283826PqRBWJ','275490gVIpyt','3674607eRnRKg','7oIoWyu','segments','Invalid\x20JSON\x20in\x20','resolve','dirname','join','8503urasPt','63iRTuBv','engage_workspace','7340586jQUwVF','tdx.json','root'];a175_0x2bc4=function(){return _0x241e3f;};return a175_0x2bc4();}export function getRelativePathFromConfig(_0x32d9aa,_0x3032a8){const _0x5d81ee=a175_0x316ac8,_0x182324=a175_0x2e74ed['resolve'](_0x32d9aa),_0x136ad7=a175_0x2e74ed[_0x5d81ee(0xf1)](_0x3032a8,_0x182324);if(_0x136ad7[_0x5d81ee(0xe7)]('..'))return'';return _0x136ad7;}export function localPathToTdFolderPath(_0x56cda9){const _0x22db76=a175_0x316ac8,_0x290fc9=a175_0x2e74ed[_0x22db76(0xfb)](_0x56cda9);if(_0x290fc9==='.'||_0x290fc9==='')return'';return _0x290fc9['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0xcd0679,_0x1287eb){const _0x2591a4=a175_0x316ac8;if(!_0xcd0679)return _0x1287eb;return a175_0x2e74ed[_0x2591a4(0xfc)](_0x1287eb,_0xcd0679);}export function createTdxConfigContent(_0x31dee2){const _0x4e6f2b={'parent_segment':_0x31dee2};return JSON['stringify'](_0x4e6f2b,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4f51d1){const _0x21c888={'engage_workspace':_0x4f51d1};return JSON['stringify'](_0x21c888,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x27a80f=a176_0x342a;(function(_0x17496e,_0x4df2bc){const _0x1cf152=a176_0x342a,_0x29f65c=_0x17496e();while(!![]){try{const _0x14faa7=parseInt(_0x1cf152(0x87))/0x1*(-parseInt(_0x1cf152(0x8f))/0x2)+parseInt(_0x1cf152(0x89))/0x3*(-parseInt(_0x1cf152(0x9f))/0x4)+parseInt(_0x1cf152(0x83))/0x5*(-parseInt(_0x1cf152(0x9c))/0x6)+-parseInt(_0x1cf152(0xad))/0x7+-parseInt(_0x1cf152(0x84))/0x8+-parseInt(_0x1cf152(0x82))/0x9*(-parseInt(_0x1cf152(0x7d))/0xa)+parseInt(_0x1cf152(0x90))/0xb;if(_0x14faa7===_0x4df2bc)break;else _0x29f65c['push'](_0x29f65c['shift']());}catch(_0x2274ae){_0x29f65c['push'](_0x29f65c['shift']());}}}(a176_0x45be,0xd6a2b));import{z}from'zod';export const ScheduleTypeSchema=z[a176_0x27a80f(0x81)]([a176_0x27a80f(0x7e),'hourly',a176_0x27a80f(0x9d),a176_0x27a80f(0x94),a176_0x27a80f(0xa8),a176_0x27a80f(0xaa),a176_0x27a80f(0x97)]);export const RepeatUnitSchema=z['enum']([a176_0x27a80f(0x96),a176_0x27a80f(0xa2),a176_0x27a80f(0x91),a176_0x27a80f(0x8a),a176_0x27a80f(0x9a),'once',a176_0x27a80f(0x7e)]);export const ScheduleDefSchema=z[a176_0x27a80f(0x93)]({'type':ScheduleTypeSchema[a176_0x27a80f(0x85)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z['number']()[a176_0x27a80f(0x85)](),'repeat_sub_frequency':z[a176_0x27a80f(0x99)](z[a176_0x27a80f(0x95)]())['optional'](),'start_at':z['string']()['nullable']()['optional'](),'end_on':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0xa9)]()['optional'](),'timezone':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0x85)]()});export const NotificationDefSchema=z[a176_0x27a80f(0x93)]({'notify_on':z[a176_0x27a80f(0x99)](z[a176_0x27a80f(0x81)]([a176_0x27a80f(0x7f),a176_0x27a80f(0xac)]))['optional'](),'email_recipients':z['array'](z['string']())[a176_0x27a80f(0x85)]()});function a176_0x342a(_0x79fe57,_0x251628){_0x79fe57=_0x79fe57-0x7d;const _0x45bec3=a176_0x45be();let _0x342a19=_0x45bec3[_0x79fe57];return _0x342a19;}export const ActivationColumnDefSchema=z['union']([z['string'](),z['object']({'name':z['string'](),'type':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0x85)](),'visibility':z['enum']([a176_0x27a80f(0xa6),a176_0x27a80f(0x8d)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a176_0x27a80f(0x93)]({'columns':z[a176_0x27a80f(0x99)](ActivationColumnDefSchema)[a176_0x27a80f(0x85)](),'behavior_table':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0x85)](),'join_row':z[a176_0x27a80f(0x95)]()['nullable']()[a176_0x27a80f(0x85)](),'join_strategy':z['enum']([a176_0x27a80f(0x8b),a176_0x27a80f(0xa5),a176_0x27a80f(0x80),a176_0x27a80f(0x98)])[a176_0x27a80f(0x85)](),'formatting':z[a176_0x27a80f(0x81)]([a176_0x27a80f(0xab),a176_0x27a80f(0xa3)])[a176_0x27a80f(0x85)](),'order_by':z[a176_0x27a80f(0x99)](z[a176_0x27a80f(0x93)]({'key':z[a176_0x27a80f(0x8e)](),'order':z[a176_0x27a80f(0x81)]([a176_0x27a80f(0x9b),'descending'])}))[a176_0x27a80f(0x85)]()});function a176_0x45be(){const _0x126d81=['hour','cols','min','First','clear','max','monthly','nullable','cron','rows','onFailure','8412264jgzqHS','20020rxkRuB','none','onSuccess','Last','enum','1098muEaMa','2087455YASlRT','6787352xZcVMc','optional','addIssue','229aCSWjX','behavior','12syhPTT','week','All','Activation\x20name\x20is\x20required','masked','string','9034LJFqAL','75113973hIrxJj','day','Connection\x20name\x20is\x20required','object','weekly','number','minute','minutes_interval','Top-N','array','month','ascending','24xUxxCS','daily','record','1439112mbigba','boolean','superRefine'];a176_0x45be=function(){return _0x126d81;};return a176_0x45be();}export const ActivationBehaviorsDefSchema=z[a176_0x27a80f(0x99)](ActivationBehaviorDefSchema)[a176_0x27a80f(0xa7)](0x4);export const ActivationDefSchema=z[a176_0x27a80f(0x93)]({'name':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0xa4)](0x1,a176_0x27a80f(0x8c)),'description':z['string']()[a176_0x27a80f(0x85)](),'connection':z['string']()[a176_0x27a80f(0xa4)](0x1,a176_0x27a80f(0x92)),'all_columns':z[a176_0x27a80f(0xa0)]()[a176_0x27a80f(0x85)](),'columns':z['array'](ActivationColumnDefSchema)[a176_0x27a80f(0x85)](),'schedule':ScheduleDefSchema[a176_0x27a80f(0x85)](),'notification':NotificationDefSchema[a176_0x27a80f(0x85)](),'connector_config':z[a176_0x27a80f(0x9e)](z['string'](),z['unknown']())[a176_0x27a80f(0x85)](),'activation_template_id':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0xa9)]()[a176_0x27a80f(0x85)](),'behavior':ActivationBehaviorDefSchema[a176_0x27a80f(0xa9)]()['optional'](),'behaviors':ActivationBehaviorsDefSchema[a176_0x27a80f(0x85)](),'run_after_journey_refresh':z['boolean']()[a176_0x27a80f(0x85)](),'nested_workflow_project_name':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0x85)](),'nested_workflow_name':z[a176_0x27a80f(0x8e)]()[a176_0x27a80f(0x85)](),'lock_enabled':z[a176_0x27a80f(0xa0)]()['optional']()})[a176_0x27a80f(0xa1)]((_0x53aa5e,_0x3dac66)=>{const _0x1c58e0=a176_0x27a80f;_0x53aa5e[_0x1c58e0(0x88)]!=null&&_0x53aa5e['behaviors']!=null&&_0x3dac66[_0x1c58e0(0x86)]({'code':'custom','message':'Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','path':[_0x1c58e0(0x88)]});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d2287,_0x364490){var _0x50a7f9=a177_0x3c03,_0x45d2b5=_0x4d2287();while(!![]){try{var _0x545500=-parseInt(_0x50a7f9(0x160))/0x1+-parseInt(_0x50a7f9(0x162))/0x2+parseInt(_0x50a7f9(0x163))/0x3+parseInt(_0x50a7f9(0x15f))/0x4+-parseInt(_0x50a7f9(0x161))/0x5+-parseInt(_0x50a7f9(0x164))/0x6+parseInt(_0x50a7f9(0x15d))/0x7*(parseInt(_0x50a7f9(0x15e))/0x8);if(_0x545500===_0x364490)break;else _0x45d2b5['push'](_0x45d2b5['shift']());}catch(_0x1c1055){_0x45d2b5['push'](_0x45d2b5['shift']());}}}(a177_0x2f04,0x7d1a5));function a177_0x3c03(_0x52a02e,_0x136b3d){_0x52a02e=_0x52a02e-0x15d;var _0x2f04d1=a177_0x2f04();var _0x3c0357=_0x2f04d1[_0x52a02e];return _0x3c0357;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a177_0x2f04(){var _0x1469d8=['5095470JrGCvE','1348276mWplyV','443364HEgarL','2517336vhyHYi','13302548BGbAxP','8lQyjMh','2390624ZCbbYL','20599Pmssko'];a177_0x2f04=function(){return _0x1469d8;};return a177_0x2f04();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a178_0x4923(_0x275409,_0xfd32cc){_0x275409=_0x275409-0xd0;const _0xc5ebfb=a178_0xc5eb();let _0x49234f=_0xc5ebfb[_0x275409];return _0x49234f;}function a178_0xc5eb(){const _0x1ea0fe=['boolean','discriminatedUnion','reentry_unless_goal_achieved','string','refine','jump','activation','optional','array','wait','simulation','versions','number','4944940hBaojo','no_reentry','length','day','journey','enum','Journey\x20name\x20is\x20required','launched','journeys','literal','week','10685000DpFPlw','301gmfPKp','108144wnwWIo','record','object','end','1048822MphCAe','filter','draft','decision_point','merge','8533503cQAFuO','reentry_always','min','1489211gygFyE','832990eyxoga','9kNorYG','30kaFzHY'];a178_0xc5eb=function(){return _0x1ea0fe;};return a178_0xc5eb();}const a178_0x2fc5ae=a178_0x4923;(function(_0x1f049e,_0x42d34b){const _0x5ef055=a178_0x4923,_0x437cbb=_0x1f049e();while(!![]){try{const _0x345f84=-parseInt(_0x5ef055(0xde))/0x1+-parseInt(_0x5ef055(0xd6))/0x2*(-parseInt(_0x5ef055(0xe0))/0x3)+parseInt(_0x5ef055(0xef))/0x4+-parseInt(_0x5ef055(0xdf))/0x5*(parseInt(_0x5ef055(0xe1))/0x6)+parseInt(_0x5ef055(0xd1))/0x7*(parseInt(_0x5ef055(0xd2))/0x8)+parseInt(_0x5ef055(0xdb))/0x9+-parseInt(_0x5ef055(0xd0))/0xa;if(_0x345f84===_0x42d34b)break;else _0x437cbb['push'](_0x437cbb['shift']());}catch(_0x473357){_0x437cbb['push'](_0x437cbb['shift']());}}}(a178_0xc5eb,0xe77f0));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z['enum']([a178_0x2fc5ae(0xd8),a178_0x2fc5ae(0xec),a178_0x2fc5ae(0xf6)]);export const ReentryModeTypeSchema=z[a178_0x2fc5ae(0xf4)]([a178_0x2fc5ae(0xf0),a178_0x2fc5ae(0xe4),a178_0x2fc5ae(0xdc)]);export const WaitUnitTypeSchema=z[a178_0x2fc5ae(0xf4)]([a178_0x2fc5ae(0xf2),a178_0x2fc5ae(0xf9)]);export const StepTypeValueSchema=z[a178_0x2fc5ae(0xf4)]([a178_0x2fc5ae(0xeb),a178_0x2fc5ae(0xe8),a178_0x2fc5ae(0xd9),'ab_test','merge',a178_0x2fc5ae(0xe7),a178_0x2fc5ae(0xd5)]);export const EmbeddedSegmentDefSchema=z[a178_0x2fc5ae(0xd4)]({'description':z['string']()[a178_0x2fc5ae(0xe9)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a178_0x2fc5ae(0xd4)]({'journey':z['string'](),'stage':z[a178_0x2fc5ae(0xe5)](),'bundle_id':z['string']()[a178_0x2fc5ae(0xe9)]()});export const CriteriaDefSchema=z[a178_0x2fc5ae(0xd4)]({'name':z[a178_0x2fc5ae(0xe5)](),'description':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'segment':z['string'](),'target':JumpTargetDefSchema[a178_0x2fc5ae(0xe9)]()});const WaitConditionTimeoutDefSchema=z[a178_0x2fc5ae(0xd4)]({'duration':z[a178_0x2fc5ae(0xee)](),'unit':WaitUnitTypeSchema,'next':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)]()}),WaitConditionDefSchema=z[a178_0x2fc5ae(0xd4)]({'segment':z['string'](),'next':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'timeout':WaitConditionTimeoutDefSchema[a178_0x2fc5ae(0xe9)]()}),WaitStepParamsDefSchema=z[a178_0x2fc5ae(0xd4)]({'duration':z[a178_0x2fc5ae(0xee)]()[a178_0x2fc5ae(0xe9)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a178_0x2fc5ae(0xe5)]()['optional'](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a178_0x2fc5ae(0xea)](z[a178_0x2fc5ae(0xe5)]())[a178_0x2fc5ae(0xe9)]()}),StepBaseFields={'name':z[a178_0x2fc5ae(0xe5)](),'uuid':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'next':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)]()},WaitStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z[a178_0x2fc5ae(0xf8)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a178_0x2fc5ae(0xd4)]({'activation':z[a178_0x2fc5ae(0xe5)]()}),ActivationStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z[a178_0x2fc5ae(0xf8)](a178_0x2fc5ae(0xe8)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a178_0x2fc5ae(0xe5)](),'segment':z['string']()[a178_0x2fc5ae(0xe9)](),'segment_id':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'excluded':z[a178_0x2fc5ae(0xe2)]()['optional'](),'next':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)]()}),DecisionPointStepParamsDefSchema=z[a178_0x2fc5ae(0xd4)]({'branches':z[a178_0x2fc5ae(0xea)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z[a178_0x2fc5ae(0xf8)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a178_0x2fc5ae(0xd4)]({'id':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'name':z[a178_0x2fc5ae(0xe5)](),'percentage':z[a178_0x2fc5ae(0xee)](),'next':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)]()}),AbTestStepParamsDefSchema=z[a178_0x2fc5ae(0xd4)]({'variants':z[a178_0x2fc5ae(0xea)](AbTestVariantDefSchema),'unique_id':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'customized_split':z[a178_0x2fc5ae(0xe2)]()[a178_0x2fc5ae(0xe9)]()}),AbTestStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z[a178_0x2fc5ae(0xf8)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z['literal'](a178_0x2fc5ae(0xda))}),JumpStepParamsDefSchema=z[a178_0x2fc5ae(0xd4)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z[a178_0x2fc5ae(0xf8)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a178_0x2fc5ae(0xd4)]({...StepBaseFields,'type':z[a178_0x2fc5ae(0xf8)]('end')})['passthrough']();export const StepDefSchema=z[a178_0x2fc5ae(0xe3)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a178_0x2fc5ae(0xd4)]({'name':z[a178_0x2fc5ae(0xe5)](),'description':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'id':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'entry_criteria':CriteriaDefSchema[a178_0x2fc5ae(0xe9)](),'exit_criteria':z['array'](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a178_0x2fc5ae(0xe9)](),'root_step':z['string']()[a178_0x2fc5ae(0xe9)](),'steps':z[a178_0x2fc5ae(0xea)](StepDefSchema)[a178_0x2fc5ae(0xe9)]()});export const JourneyEntryDefSchema=z['object']({'name':z['string']()[a178_0x2fc5ae(0xe9)](),'version':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'state':JourneyStateTypeSchema[a178_0x2fc5ae(0xe9)](),'latest':z[a178_0x2fc5ae(0xe2)]()[a178_0x2fc5ae(0xe9)](),'stages':z[a178_0x2fc5ae(0xea)](StageDefSchema),'id':z[a178_0x2fc5ae(0xe5)]()['optional'](),'version_number':z[a178_0x2fc5ae(0xee)]()[a178_0x2fc5ae(0xe9)](),'goal':CriteriaDefSchema[a178_0x2fc5ae(0xe9)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z['lazy'](()=>z[a178_0x2fc5ae(0xd4)]({'type':z['literal'](a178_0x2fc5ae(0xf3)),'name':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xdd)](0x1,a178_0x2fc5ae(0xf5)),'description':z['string']()[a178_0x2fc5ae(0xe9)](),'bundle_id':z['string']()[a178_0x2fc5ae(0xe9)](),'bundle_name':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'folder_id':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'reentry':ReentryModeTypeSchema[a178_0x2fc5ae(0xe9)](),'allow_reentry':z[a178_0x2fc5ae(0xe2)]()[a178_0x2fc5ae(0xe9)](),'goal':CriteriaDefSchema[a178_0x2fc5ae(0xe9)](),'id':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'version':z[a178_0x2fc5ae(0xe5)]()[a178_0x2fc5ae(0xe9)](),'version_number':z[a178_0x2fc5ae(0xee)]()[a178_0x2fc5ae(0xe9)](),'stages':z[a178_0x2fc5ae(0xea)](StageDefSchema)['optional'](),'versions':z[a178_0x2fc5ae(0xea)](JourneyEntryDefSchema)[a178_0x2fc5ae(0xe9)](),'journeys':z[a178_0x2fc5ae(0xea)](JourneyEntryDefSchema)[a178_0x2fc5ae(0xe9)](),'segments':z[a178_0x2fc5ae(0xd3)](z[a178_0x2fc5ae(0xe5)](),EmbeddedSegmentDefSchema)[a178_0x2fc5ae(0xe9)](),'activations':z[a178_0x2fc5ae(0xd3)](z['string'](),ActivationDefSchema)[a178_0x2fc5ae(0xe9)]()})[a178_0x2fc5ae(0xe6)](_0x33c918=>{const _0x40b953=a178_0x2fc5ae,_0x546dc5=[_0x33c918[_0x40b953(0xf7)],_0x33c918['stages'],_0x33c918[_0x40b953(0xed)]][_0x40b953(0xd7)](_0x5c3cfc=>Array['isArray'](_0x5c3cfc)&&_0x5c3cfc[_0x40b953(0xf1)]>0x0)[_0x40b953(0xf1)];return _0x546dc5===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a180_0x3ebc(){var _0x3629f4=['8ozWFuF','321mKNOiD','57108nZopHo','3282VdEOna','7296000fqOCxA','41173280pUurid','2339970wjaNfo','2088460kqahUa','329mVnimQ','13829337XLfKsC'];a180_0x3ebc=function(){return _0x3629f4;};return a180_0x3ebc();}(function(_0x32ab35,_0x48d3c8){var _0x1275ed=a180_0x4592,_0x448879=_0x32ab35();while(!![]){try{var _0x58ad94=-parseInt(_0x1275ed(0xf0))/0x1*(-parseInt(_0x1275ed(0xf2))/0x2)+-parseInt(_0x1275ed(0xf5))/0x3+-parseInt(_0x1275ed(0xf6))/0x4+-parseInt(_0x1275ed(0xf3))/0x5+parseInt(_0x1275ed(0xf1))/0x6*(parseInt(_0x1275ed(0xf7))/0x7)+-parseInt(_0x1275ed(0xf9))/0x8*(parseInt(_0x1275ed(0xf8))/0x9)+parseInt(_0x1275ed(0xf4))/0xa;if(_0x58ad94===_0x48d3c8)break;else _0x448879['push'](_0x448879['shift']());}catch(_0x247a93){_0x448879['push'](_0x448879['shift']());}}}(a180_0x3ebc,0xc1bc1));function a180_0x4592(_0x4fa406,_0x1397bf){_0x4fa406=_0x4fa406-0xf0;var _0x3ebce9=a180_0x3ebc();var _0x459284=_0x3ebce9[_0x4fa406];return _0x459284;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x33f304=a180_0x1a34;(function(_0x45ccb4,_0x326652){const _0x2cbf76=a180_0x1a34,_0xf000b5=_0x45ccb4();while(!![]){try{const _0x582e4a=-parseInt(_0x2cbf76(0xec))/0x1*(parseInt(_0x2cbf76(0x12c))/0x2)+parseInt(_0x2cbf76(0x125))/0x3+-parseInt(_0x2cbf76(0xff))/0x4*(parseInt(_0x2cbf76(0x130))/0x5)+parseInt(_0x2cbf76(0xed))/0x6+parseInt(_0x2cbf76(0xee))/0x7*(parseInt(_0x2cbf76(0x106))/0x8)+parseInt(_0x2cbf76(0x112))/0x9*(-parseInt(_0x2cbf76(0x11f))/0xa)+parseInt(_0x2cbf76(0x10b))/0xb;if(_0x582e4a===_0x326652)break;else _0xf000b5['push'](_0xf000b5['shift']());}catch(_0x49c849){_0xf000b5['push'](_0xf000b5['shift']());}}}(a180_0x577f,0x50aca));function a180_0x1a34(_0x4a4c82,_0x3501b4){_0x4a4c82=_0x4a4c82-0xec;const _0x577f19=a180_0x577f();let _0x1a34a5=_0x577f19[_0x4a4c82];return _0x1a34a5;}import{z}from'zod';function a180_0x577f(){const _0x27b927=['segment','operator','MISSING_BETWEEN_BOUNDS','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Less','lazy','Column','Regexp','Min','\x27\x20requires\x20a\x20value','206090bSbPcf','all','has','GreaterEqual','Value','Operator\x20\x27','819144joRqCW','min','exclude','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','month','CountDistinct','batch','197668HrOxkD','Greater','Contain','minute','1520635AMnZes','First','unit','max','Max','EndWith','string','LessEqual','any','MISSING_TIME_UNIT','addIssue','Count','5aFanlw','2451534IoYHJh','14sJvZkD','Last','And','number','record','custom','hour','object','day','StartWith','TimeRange','boolean','array','superRefine','enum','literal','TimeWithinPast','4ufhXVS','Segment\x20reference\x20must\x20not\x20be\x20empty','type','Average','value','Segment\x20name\x20is\x20required','TimeWithinNext','983184PpxvZW','optional','Sum','funnel_stage','from','7881841bcpotj','TimeRange\x20operator\x20requires\x20\x27duration\x27','include','Between','week','Behavior','\x27\x20requires\x20a\x20time\x20unit','225PdUyWR','union','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column'];a180_0x577f=function(){return _0x27b927;};return a180_0x577f();}import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a180_0x33f304(0xfc)](['Equal',a180_0x33f304(0x12d),a180_0x33f304(0x119),'GreaterEqual',a180_0x33f304(0x137),'In','Between',a180_0x33f304(0x11c),'IsNull',a180_0x33f304(0xfe),'TimeWithinNext','Contain',a180_0x33f304(0xf7),a180_0x33f304(0x135),a180_0x33f304(0xf8)]);export const TimeUnitSchema=z['enum'](['second',a180_0x33f304(0x12f),a180_0x33f304(0xf4),a180_0x33f304(0xf6),a180_0x33f304(0x10f),a180_0x33f304(0x129),'year']);export const AggregationTypeSchema=z[a180_0x33f304(0xfc)]([a180_0x33f304(0x13b),a180_0x33f304(0x108),a180_0x33f304(0x102),a180_0x33f304(0x11d),a180_0x33f304(0x134),'CountDistinct',a180_0x33f304(0x131),a180_0x33f304(0xef)]);const TemporalValueSchema=z[a180_0x33f304(0x113)]([z[a180_0x33f304(0xf5)]({'timestamp':z['string']()}),z[a180_0x33f304(0xf5)]({'last':z[a180_0x33f304(0x113)]([z[a180_0x33f304(0xf1)](),z[a180_0x33f304(0xf2)](z[a180_0x33f304(0x136)](),z[a180_0x33f304(0xf1)]())]),'unit':z[a180_0x33f304(0x136)]()})]),OperatorValueSchema=z[a180_0x33f304(0x113)]([z[a180_0x33f304(0x136)](),z[a180_0x33f304(0xf1)](),z[a180_0x33f304(0xf9)](),TemporalValueSchema,z[a180_0x33f304(0xfa)](z[a180_0x33f304(0x113)]([z[a180_0x33f304(0x136)](),z[a180_0x33f304(0xf1)](),z[a180_0x33f304(0xf9)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a180_0x33f304(0x12d),a180_0x33f304(0x122),a180_0x33f304(0x119),'LessEqual','In',a180_0x33f304(0x12e),a180_0x33f304(0xf7),a180_0x33f304(0x135),a180_0x33f304(0x11c),a180_0x33f304(0xfe),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a180_0x33f304(0xfe),a180_0x33f304(0x105)]);export const OperatorDefSchema=z[a180_0x33f304(0xf5)]({'type':OperatorTypeSchema,'not':z['boolean']()[a180_0x33f304(0x107)](),'value':OperatorValueSchema[a180_0x33f304(0x107)](),'min':z[a180_0x33f304(0x113)]([z[a180_0x33f304(0xf1)](),z[a180_0x33f304(0x136)](),TemporalValueSchema])[a180_0x33f304(0x107)](),'max':z[a180_0x33f304(0x113)]([z[a180_0x33f304(0xf1)](),z[a180_0x33f304(0x136)](),TemporalValueSchema])[a180_0x33f304(0x107)](),'unit':TimeUnitSchema[a180_0x33f304(0x107)](),'duration':z[a180_0x33f304(0xf5)]({'day':z[a180_0x33f304(0xf1)]()[a180_0x33f304(0x107)](),'week':z[a180_0x33f304(0xf1)]()[a180_0x33f304(0x107)](),'month':z['number']()[a180_0x33f304(0x107)](),'year':z[a180_0x33f304(0xf1)]()[a180_0x33f304(0x107)](),'hour':z[a180_0x33f304(0xf1)]()['optional'](),'minute':z['number']()[a180_0x33f304(0x107)](),'second':z['number']()['optional']()})[a180_0x33f304(0x107)](),'from':z[a180_0x33f304(0xf5)]({'last':z[a180_0x33f304(0x113)]([z[a180_0x33f304(0xf1)](),z['string']()]),'unit':TimeUnitSchema})[a180_0x33f304(0x107)](),'reverse':z['boolean']()['optional']()})['superRefine']((_0x400bb6,_0x188b18)=>{const _0x5c2301=a180_0x33f304;OPERATORS_REQUIRING_VALUE[_0x5c2301(0x121)](_0x400bb6[_0x5c2301(0x101)])&&(_0x400bb6[_0x5c2301(0x103)]===undefined||_0x400bb6[_0x5c2301(0x103)]===null)&&_0x188b18['addIssue']({'code':_0x5c2301(0xf3),'message':_0x5c2301(0x124)+_0x400bb6['type']+_0x5c2301(0x11e),'path':['value']}),_0x400bb6[_0x5c2301(0x101)]===_0x5c2301(0x10e)&&_0x400bb6[_0x5c2301(0x126)]===undefined&&_0x400bb6[_0x5c2301(0x133)]===undefined&&_0x188b18[_0x5c2301(0x13a)]({'code':_0x5c2301(0xf3),'message':_0x5c2301(0x128),'params':{'validationCode':_0x5c2301(0x117)}}),OPERATORS_REQUIRING_UNIT['has'](_0x400bb6['type'])&&_0x400bb6[_0x5c2301(0x103)]!==undefined&&!_0x400bb6[_0x5c2301(0x132)]&&_0x188b18[_0x5c2301(0x13a)]({'code':_0x5c2301(0xf3),'message':_0x5c2301(0x124)+_0x400bb6[_0x5c2301(0x101)]+_0x5c2301(0x111),'path':[_0x5c2301(0x132)],'params':{'validationCode':_0x5c2301(0x139)}}),_0x400bb6['type']===_0x5c2301(0xf8)&&(!_0x400bb6['duration']&&_0x188b18[_0x5c2301(0x13a)]({'code':'custom','message':_0x5c2301(0x10c),'path':['duration']}),!_0x400bb6['from']&&_0x188b18[_0x5c2301(0x13a)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x5c2301(0x10a)]}));});export const ArrayMatchingSchema=z[a180_0x33f304(0x113)]([z['literal'](a180_0x33f304(0x138)),z['literal'](a180_0x33f304(0x120)),z['object']({'atLeast':z[a180_0x33f304(0xf1)]()}),z[a180_0x33f304(0xf5)]({'atMost':z[a180_0x33f304(0xf1)]()}),z[a180_0x33f304(0xf5)]({'exactly':z[a180_0x33f304(0xf1)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a180_0x33f304(0x101),[z[a180_0x33f304(0xf5)]({'type':z['enum']([a180_0x33f304(0x108),a180_0x33f304(0x11d),'Max',a180_0x33f304(0x102)]),'column':z[a180_0x33f304(0x136)](),'groupingColumns':z[a180_0x33f304(0xfa)](z[a180_0x33f304(0x136)]())['optional']()}),z['object']({'type':z[a180_0x33f304(0xfd)](a180_0x33f304(0x13b)),'groupingColumns':z[a180_0x33f304(0xfa)](z[a180_0x33f304(0x136)]())[a180_0x33f304(0x107)]()}),z[a180_0x33f304(0xf5)]({'type':z['literal'](a180_0x33f304(0x12a)),'columns':z['array'](z[a180_0x33f304(0x136)]())}),z[a180_0x33f304(0xf5)]({'type':z['enum']([a180_0x33f304(0x131),a180_0x33f304(0xef)]),'column':z[a180_0x33f304(0x136)](),'orderColumn':z[a180_0x33f304(0x136)](),'groupingColumns':z['array'](z[a180_0x33f304(0x136)]())[a180_0x33f304(0x107)]()})]);export const TimeWindowDefSchema=z[a180_0x33f304(0xf5)]({'duration':z[a180_0x33f304(0xf1)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a180_0x33f304(0xfe),'TimeWithinNext',a180_0x33f304(0xf8)]);export const FilterColumnConditionDefSchema=z['object']({'type':z['literal']('Column'),'column':z[a180_0x33f304(0x136)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a180_0x33f304(0x107)]()})[a180_0x33f304(0xfb)]((_0x3b5269,_0x32d2cb)=>{const _0x24ddeb=a180_0x33f304,_0xe382a5=_0x3b5269['operator']['type'];_0x3b5269['column']==='timestamp'?!TIMESTAMP_OPERATORS[_0x24ddeb(0x121)](_0xe382a5)&&_0x32d2cb[_0x24ddeb(0x13a)]({'code':_0x24ddeb(0xf3),'message':_0x24ddeb(0x118)+_0xe382a5+'\x27)','path':[_0x24ddeb(0x116),_0x24ddeb(0x101)]}):TIMESTAMP_OPERATORS[_0x24ddeb(0x121)](_0xe382a5)&&_0x32d2cb[_0x24ddeb(0x13a)]({'code':_0x24ddeb(0xf3),'message':'Operator\x20\x27'+_0xe382a5+_0x24ddeb(0x114),'path':[_0x24ddeb(0x116),_0x24ddeb(0x101)]});});export const FilterRuleDefSchema=z[a180_0x33f304(0xf5)]({'type':z[a180_0x33f304(0xfd)]('And'),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a180_0x33f304(0x11a)](()=>z[a180_0x33f304(0xf5)]({'type':z['literal'](a180_0x33f304(0x123)),'attribute':z[a180_0x33f304(0x136)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a180_0x33f304(0x107)](),'exclude':z[a180_0x33f304(0xf9)]()[a180_0x33f304(0x107)](),'aggregation':AggregationDefSchema[a180_0x33f304(0x107)](),'source':z[a180_0x33f304(0x136)]()[a180_0x33f304(0x107)](),'filter':FilterRuleDefSchema[a180_0x33f304(0x107)](),'limit':z[a180_0x33f304(0xf1)]()[a180_0x33f304(0x107)]()}));export const BehaviorConditionDefSchema=z[a180_0x33f304(0x11a)](()=>z['object']({'type':z[a180_0x33f304(0xfd)](a180_0x33f304(0x110)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a180_0x33f304(0x107)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a180_0x33f304(0x136)]()[a180_0x33f304(0x107)](),'filter':FilterRuleDefSchema[a180_0x33f304(0x107)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a180_0x33f304(0xf1)]()[a180_0x33f304(0x107)]()}));export const ColumnConditionDefSchema=z[a180_0x33f304(0xf5)]({'type':z[a180_0x33f304(0xfd)](a180_0x33f304(0x11b)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a180_0x33f304(0x11a)](()=>z[a180_0x33f304(0xf5)]({'type':z[a180_0x33f304(0xfc)]([a180_0x33f304(0xf0),'Or','Composite']),'conditions':z[a180_0x33f304(0xfa)](ConditionDefSchema),'description':z['string']()[a180_0x33f304(0x107)](),'expr':z['string']()[a180_0x33f304(0x107)]()}));export const SegmentRefConditionDefSchema=z[a180_0x33f304(0xf5)]({'type':z['enum']([a180_0x33f304(0x10d),a180_0x33f304(0x127)]),'segment':z[a180_0x33f304(0x136)]()[a180_0x33f304(0x126)](0x1,a180_0x33f304(0x100))});export const ConditionDefSchema=z['lazy'](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a180_0x33f304(0x11a)](()=>z['object']({'type':z['enum'](['And','Or','Composite']),'conditions':z[a180_0x33f304(0xfa)](ConditionDefSchema),'description':z[a180_0x33f304(0x136)]()[a180_0x33f304(0x107)](),'expr':z['string']()['optional']()}));export const SegmentDefSchema=z[a180_0x33f304(0xf5)]({'type':z[a180_0x33f304(0xfd)](a180_0x33f304(0x115))[a180_0x33f304(0x107)](),'name':z['string']()['min'](0x1,a180_0x33f304(0x104)),'description':z['string']()[a180_0x33f304(0x107)](),'folder':z[a180_0x33f304(0x136)]()['optional'](),'rule':RuleDefSchema[a180_0x33f304(0x107)](),'kind':z['enum']([a180_0x33f304(0x12b),'realtime',a180_0x33f304(0x109)])['optional'](),'visible':z[a180_0x33f304(0xf9)]()[a180_0x33f304(0x107)](),'activations':z[a180_0x33f304(0xfa)](ActivationDefSchema)[a180_0x33f304(0x107)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a181_0x69025a=a181_0x1d51;(function(_0x1e4389,_0x23d41c){const _0x43a6c0=a181_0x1d51,_0x4b9992=_0x1e4389();while(!![]){try{const _0x223ca6=parseInt(_0x43a6c0(0x1da))/0x1+parseInt(_0x43a6c0(0x1fc))/0x2*(parseInt(_0x43a6c0(0x1c9))/0x3)+-parseInt(_0x43a6c0(0x1b0))/0x4+parseInt(_0x43a6c0(0x1ed))/0x5+parseInt(_0x43a6c0(0x1d3))/0x6*(parseInt(_0x43a6c0(0x1b9))/0x7)+parseInt(_0x43a6c0(0x1df))/0x8*(-parseInt(_0x43a6c0(0x1e4))/0x9)+-parseInt(_0x43a6c0(0x1f0))/0xa*(-parseInt(_0x43a6c0(0x1ea))/0xb);if(_0x223ca6===_0x23d41c)break;else _0x4b9992['push'](_0x4b9992['shift']());}catch(_0x7365e1){_0x4b9992['push'](_0x4b9992['shift']());}}}(a181_0x5aeb,0xa612a));function a181_0x5aeb(){const _0x387247=['2614280QifeWT','exclude','\x27\x20requires\x20a\x20value','2050jOSZzU','And','batch','TimeWithinNext','\x27\x20requires\x20a\x20time\x20unit','Min','Last','include','operator','Average','value','Contain','1528EucKZq','array','superRefine','Segment\x20reference\x20must\x20not\x20be\x20empty','Behavior','2302800uNSqJD','custom','StartWith','segment','has','timestamp','MISSING_BETWEEN_BOUNDS','minute','addIssue','14xKUYwr','duration','string','union','First','number','Greater','Equal','lazy','day','realtime','optional','TimeWithinPast','Max','Count','IsNull','1551jdoMkA','record','CountDistinct','TimeRange\x20operator\x20requires\x20\x27from\x27','Composite','column','max','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','object','any','3128238XLUsNq','EndWith','MISSING_TIME_UNIT','Column','Sum','TimeRange\x20operator\x20requires\x20\x27duration\x27','Between','225930wUNGHL','enum','literal','type','boolean','296tYmFca','Regexp','unit','GreaterEqual','TimeRange','245457FvqQhZ','year','min','LessEqual','Operator\x20\x27','from','4213nYXEIH','Segment\x20name\x20is\x20required','Less'];a181_0x5aeb=function(){return _0x387247;};return a181_0x5aeb();}import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';export const OperatorTypeSchema=z[a181_0x69025a(0x1db)]([a181_0x69025a(0x1c0),a181_0x69025a(0x1bf),a181_0x69025a(0x1ec),'GreaterEqual',a181_0x69025a(0x1e7),'In',a181_0x69025a(0x1d9),a181_0x69025a(0x1e0),a181_0x69025a(0x1c8),a181_0x69025a(0x1c5),a181_0x69025a(0x1f3),a181_0x69025a(0x1fb),a181_0x69025a(0x1b2),a181_0x69025a(0x1d4),a181_0x69025a(0x1e3)]);export const TimeUnitSchema=z['enum'](['second',a181_0x69025a(0x1b7),'hour',a181_0x69025a(0x1c2),'week','month',a181_0x69025a(0x1e5)]);export const AggregationTypeSchema=z[a181_0x69025a(0x1db)]([a181_0x69025a(0x1c7),a181_0x69025a(0x1d7),a181_0x69025a(0x1f9),a181_0x69025a(0x1f5),'Max',a181_0x69025a(0x1cb),a181_0x69025a(0x1bd),a181_0x69025a(0x1f6)]);const TemporalValueSchema=z[a181_0x69025a(0x1bc)]([z[a181_0x69025a(0x1d1)]({'timestamp':z['string']()}),z[a181_0x69025a(0x1d1)]({'last':z['union']([z['number'](),z[a181_0x69025a(0x1ca)](z[a181_0x69025a(0x1bb)](),z[a181_0x69025a(0x1be)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a181_0x69025a(0x1bc)]([z[a181_0x69025a(0x1bb)](),z['number'](),z[a181_0x69025a(0x1de)](),TemporalValueSchema,z[a181_0x69025a(0x1fd)](z[a181_0x69025a(0x1bc)]([z[a181_0x69025a(0x1bb)](),z[a181_0x69025a(0x1be)](),z[a181_0x69025a(0x1de)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a181_0x69025a(0x1c0),'Greater',a181_0x69025a(0x1e2),a181_0x69025a(0x1ec),a181_0x69025a(0x1e7),'In','Contain',a181_0x69025a(0x1b2),a181_0x69025a(0x1d4),a181_0x69025a(0x1e0),'TimeWithinPast',a181_0x69025a(0x1f3)]),OPERATORS_REQUIRING_UNIT=new Set([a181_0x69025a(0x1c5),a181_0x69025a(0x1f3)]);export const OperatorDefSchema=z[a181_0x69025a(0x1d1)]({'type':OperatorTypeSchema,'not':z[a181_0x69025a(0x1de)]()[a181_0x69025a(0x1c4)](),'value':OperatorValueSchema[a181_0x69025a(0x1c4)](),'min':z['union']([z[a181_0x69025a(0x1be)](),z[a181_0x69025a(0x1bb)](),TemporalValueSchema])[a181_0x69025a(0x1c4)](),'max':z[a181_0x69025a(0x1bc)]([z[a181_0x69025a(0x1be)](),z[a181_0x69025a(0x1bb)](),TemporalValueSchema])[a181_0x69025a(0x1c4)](),'unit':TimeUnitSchema[a181_0x69025a(0x1c4)](),'duration':z[a181_0x69025a(0x1d1)]({'day':z[a181_0x69025a(0x1be)]()[a181_0x69025a(0x1c4)](),'week':z[a181_0x69025a(0x1be)]()['optional'](),'month':z[a181_0x69025a(0x1be)]()[a181_0x69025a(0x1c4)](),'year':z[a181_0x69025a(0x1be)]()['optional'](),'hour':z['number']()[a181_0x69025a(0x1c4)](),'minute':z[a181_0x69025a(0x1be)]()['optional'](),'second':z[a181_0x69025a(0x1be)]()[a181_0x69025a(0x1c4)]()})['optional'](),'from':z[a181_0x69025a(0x1d1)]({'last':z[a181_0x69025a(0x1bc)]([z[a181_0x69025a(0x1be)](),z[a181_0x69025a(0x1bb)]()]),'unit':TimeUnitSchema})[a181_0x69025a(0x1c4)](),'reverse':z['boolean']()[a181_0x69025a(0x1c4)]()})[a181_0x69025a(0x1fe)]((_0x12877d,_0x20a58c)=>{const _0x15a865=a181_0x69025a;OPERATORS_REQUIRING_VALUE[_0x15a865(0x1b4)](_0x12877d[_0x15a865(0x1dd)])&&(_0x12877d[_0x15a865(0x1fa)]===undefined||_0x12877d['value']===null)&&_0x20a58c[_0x15a865(0x1b8)]({'code':'custom','message':_0x15a865(0x1e8)+_0x12877d[_0x15a865(0x1dd)]+_0x15a865(0x1ef),'path':['value']}),_0x12877d[_0x15a865(0x1dd)]==='Between'&&_0x12877d[_0x15a865(0x1e6)]===undefined&&_0x12877d[_0x15a865(0x1cf)]===undefined&&_0x20a58c[_0x15a865(0x1b8)]({'code':_0x15a865(0x1b1),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x15a865(0x1b6)}}),OPERATORS_REQUIRING_UNIT[_0x15a865(0x1b4)](_0x12877d[_0x15a865(0x1dd)])&&_0x12877d[_0x15a865(0x1fa)]!==undefined&&!_0x12877d[_0x15a865(0x1e1)]&&_0x20a58c[_0x15a865(0x1b8)]({'code':_0x15a865(0x1b1),'message':_0x15a865(0x1e8)+_0x12877d['type']+_0x15a865(0x1f4),'path':[_0x15a865(0x1e1)],'params':{'validationCode':_0x15a865(0x1d5)}}),_0x12877d[_0x15a865(0x1dd)]===_0x15a865(0x1e3)&&(!_0x12877d[_0x15a865(0x1ba)]&&_0x20a58c[_0x15a865(0x1b8)]({'code':'custom','message':_0x15a865(0x1d8),'path':[_0x15a865(0x1ba)]}),!_0x12877d[_0x15a865(0x1e9)]&&_0x20a58c['addIssue']({'code':'custom','message':_0x15a865(0x1cc),'path':[_0x15a865(0x1e9)]}));});export const ArrayMatchingSchema=z['union']([z[a181_0x69025a(0x1dc)](a181_0x69025a(0x1d2)),z[a181_0x69025a(0x1dc)]('all'),z[a181_0x69025a(0x1d1)]({'atLeast':z[a181_0x69025a(0x1be)]()}),z[a181_0x69025a(0x1d1)]({'atMost':z['number']()}),z[a181_0x69025a(0x1d1)]({'exactly':z[a181_0x69025a(0x1be)]()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1db)](['Sum',a181_0x69025a(0x1f5),a181_0x69025a(0x1c6),a181_0x69025a(0x1f9)]),'column':z[a181_0x69025a(0x1bb)](),'groupingColumns':z['array'](z['string']())[a181_0x69025a(0x1c4)]()}),z['object']({'type':z['literal']('Count'),'groupingColumns':z[a181_0x69025a(0x1fd)](z[a181_0x69025a(0x1bb)]())['optional']()}),z[a181_0x69025a(0x1d1)]({'type':z['literal']('CountDistinct'),'columns':z[a181_0x69025a(0x1fd)](z[a181_0x69025a(0x1bb)]())}),z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1db)]([a181_0x69025a(0x1bd),a181_0x69025a(0x1f6)]),'column':z[a181_0x69025a(0x1bb)](),'orderColumn':z['string'](),'groupingColumns':z[a181_0x69025a(0x1fd)](z[a181_0x69025a(0x1bb)]())[a181_0x69025a(0x1c4)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a181_0x69025a(0x1be)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a181_0x69025a(0x1c5),a181_0x69025a(0x1f3),a181_0x69025a(0x1e3)]);export const FilterColumnConditionDefSchema=z[a181_0x69025a(0x1d1)]({'type':z['literal']('Column'),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x69025a(0x1c4)]()})[a181_0x69025a(0x1fe)]((_0x281ece,_0x3aa3ae)=>{const _0x52eabd=a181_0x69025a,_0x4bd300=_0x281ece[_0x52eabd(0x1f8)][_0x52eabd(0x1dd)];_0x281ece[_0x52eabd(0x1ce)]===_0x52eabd(0x1b5)?!TIMESTAMP_OPERATORS[_0x52eabd(0x1b4)](_0x4bd300)&&_0x3aa3ae['addIssue']({'code':_0x52eabd(0x1b1),'message':_0x52eabd(0x1d0)+_0x4bd300+'\x27)','path':['operator',_0x52eabd(0x1dd)]}):TIMESTAMP_OPERATORS[_0x52eabd(0x1b4)](_0x4bd300)&&_0x3aa3ae[_0x52eabd(0x1b8)]({'code':_0x52eabd(0x1b1),'message':_0x52eabd(0x1e8)+_0x4bd300+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x52eabd(0x1f8),_0x52eabd(0x1dd)]});});export const FilterRuleDefSchema=z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1dc)](a181_0x69025a(0x1f1)),'conditions':z[a181_0x69025a(0x1fd)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a181_0x69025a(0x1c1)](()=>z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1dc)]('Value'),'attribute':z[a181_0x69025a(0x1bb)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x69025a(0x1c4)](),'exclude':z['boolean']()[a181_0x69025a(0x1c4)](),'aggregation':AggregationDefSchema[a181_0x69025a(0x1c4)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a181_0x69025a(0x1c4)](),'limit':z[a181_0x69025a(0x1be)]()[a181_0x69025a(0x1c4)]()}));export const BehaviorConditionDefSchema=z[a181_0x69025a(0x1c1)](()=>z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1dc)](a181_0x69025a(0x1af)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a181_0x69025a(0x1c4)](),'exclude':z['boolean']()[a181_0x69025a(0x1c4)](),'aggregation':AggregationDefSchema[a181_0x69025a(0x1c4)](),'source':z[a181_0x69025a(0x1bb)]()['optional'](),'filter':FilterRuleDefSchema[a181_0x69025a(0x1c4)](),'timeWindow':TimeWindowDefSchema[a181_0x69025a(0x1c4)](),'limit':z[a181_0x69025a(0x1be)]()[a181_0x69025a(0x1c4)]()}));export const ColumnConditionDefSchema=z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1dc)](a181_0x69025a(0x1d6)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a181_0x69025a(0x1c1)](()=>z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1db)]([a181_0x69025a(0x1f1),'Or',a181_0x69025a(0x1cd)]),'conditions':z[a181_0x69025a(0x1fd)](ConditionDefSchema),'description':z[a181_0x69025a(0x1bb)]()['optional'](),'expr':z[a181_0x69025a(0x1bb)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a181_0x69025a(0x1d1)]({'type':z['enum']([a181_0x69025a(0x1f7),a181_0x69025a(0x1ee)]),'segment':z[a181_0x69025a(0x1bb)]()[a181_0x69025a(0x1e6)](0x1,a181_0x69025a(0x1ff))});function a181_0x1d51(_0x93c20f,_0x5d4e56){_0x93c20f=_0x93c20f-0x1af;const _0x5aeb7d=a181_0x5aeb();let _0x1d5170=_0x5aeb7d[_0x93c20f];return _0x1d5170;}export const ConditionDefSchema=z[a181_0x69025a(0x1c1)](()=>z[a181_0x69025a(0x1bc)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1db)]([a181_0x69025a(0x1f1),'Or',a181_0x69025a(0x1cd)]),'conditions':z['array'](ConditionDefSchema),'description':z[a181_0x69025a(0x1bb)]()[a181_0x69025a(0x1c4)](),'expr':z[a181_0x69025a(0x1bb)]()[a181_0x69025a(0x1c4)]()}));export const SegmentDefSchema=z[a181_0x69025a(0x1d1)]({'type':z[a181_0x69025a(0x1dc)](a181_0x69025a(0x1b3))[a181_0x69025a(0x1c4)](),'name':z[a181_0x69025a(0x1bb)]()[a181_0x69025a(0x1e6)](0x1,a181_0x69025a(0x1eb)),'description':z[a181_0x69025a(0x1bb)]()[a181_0x69025a(0x1c4)](),'folder':z[a181_0x69025a(0x1bb)]()[a181_0x69025a(0x1c4)](),'rule':RuleDefSchema[a181_0x69025a(0x1c4)](),'kind':z['enum']([a181_0x69025a(0x1f2),a181_0x69025a(0x1c3),'funnel_stage'])[a181_0x69025a(0x1c4)](),'visible':z[a181_0x69025a(0x1de)]()[a181_0x69025a(0x1c4)](),'activations':z[a181_0x69025a(0x1fd)](ActivationDefSchema)[a181_0x69025a(0x1c4)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x2dc104=a182_0x5d48;(function(_0x5f03d0,_0x5921a3){const _0x1df3a4=a182_0x5d48,_0x7e1761=_0x5f03d0();while(!![]){try{const _0x585e1f=parseInt(_0x1df3a4(0x1f0))/0x1*(-parseInt(_0x1df3a4(0x1f1))/0x2)+-parseInt(_0x1df3a4(0x1e8))/0x3*(parseInt(_0x1df3a4(0x1f6))/0x4)+parseInt(_0x1df3a4(0x1e2))/0x5*(parseInt(_0x1df3a4(0x1e0))/0x6)+-parseInt(_0x1df3a4(0x1ee))/0x7*(-parseInt(_0x1df3a4(0x1f9))/0x8)+-parseInt(_0x1df3a4(0x1e1))/0x9*(-parseInt(_0x1df3a4(0x1d8))/0xa)+parseInt(_0x1df3a4(0x1e4))/0xb+-parseInt(_0x1df3a4(0x1df))/0xc*(parseInt(_0x1df3a4(0x1da))/0xd);if(_0x585e1f===_0x5921a3)break;else _0x7e1761['push'](_0x7e1761['shift']());}catch(_0x390fe2){_0x7e1761['push'](_0x7e1761['shift']());}}}(a182_0xd2e0,0x71317));import{readFileSync}from'fs';import*as a182_0x2e6943 from'path';import*as a182_0x489242 from'yaml';function a182_0x5d48(_0x41ff07,_0x73a55b){_0x41ff07=_0x41ff07-0x1d6;const _0xd2e088=a182_0xd2e0();let _0x5d488d=_0xd2e088[_0x41ff07];return _0x5d488d;}import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';function a182_0xd2e0(){const _0x287e0f=['campaign','47977nQfwPM','34TxPGSw','relative','has','type','basename','396iJYMvH','always_on_campaign','campaign_type','56pkbLNw','parseDocument','object','10dTSwhs','segment','612209AGOpJi','not\x20a\x20','journey','error','utf-8','24HODMAJ','20346qiuicQ','7930557APibei','525najrmo','warnings','104676VqRBxA','result','push','email','6729MKbEqb','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','toJSON','map','template','filterType','348747WGJkih'];a182_0xd2e0=function(){return _0x287e0f;};return a182_0xd2e0();}import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set([a182_0x2dc104(0x1e7),a182_0x2dc104(0x1e6)]);export{isJourneyDef};export function isCampaignDef(_0x5333e7){const _0x3a6b53=a182_0x2dc104;if(typeof _0x5333e7!==_0x3a6b53(0x1d7)||_0x5333e7===null)return![];const _0x25657e=_0x5333e7,_0x3fedd7=VALID_CAMPAIGN_TYPES[_0x3a6b53(0x1f3)](_0x25657e[_0x3a6b53(0x1f8)]);if(_0x25657e['type']===_0x3a6b53(0x1ef)&&_0x3fedd7)return!![];if(_0x3fedd7&&!_0x25657e[_0x3a6b53(0x1f4)])return!![];return![];}export function isTemplateDef(_0x143cad){const _0x473aa8=a182_0x2dc104;return typeof _0x143cad==='object'&&_0x143cad!==null&&_0x473aa8(0x1f4)in _0x143cad&&_0x143cad['type']===_0x473aa8(0x1ec);}export function isAlwaysOnCampaignDef(_0x1d1abf){const _0x4337ee=a182_0x2dc104;return typeof _0x1d1abf===_0x4337ee(0x1d7)&&_0x1d1abf!==null&&_0x4337ee(0x1f4)in _0x1d1abf&&_0x1d1abf[_0x4337ee(0x1f4)]===_0x4337ee(0x1f7);}export function isValidationResult(_0x1d205e){return!('skipped'in _0x1d205e);}export function createParseErrorResult(_0x22eae4,_0x48f6a7,_0xc9d017,_0x4f6a6b,_0x4a0c9e=a182_0x2dc104(0x1d9)){const _0x172178=a182_0x2dc104;return{'filePath':_0x22eae4,'relativePath':_0x48f6a7,'source':_0xc9d017,'result':{'valid':![],'errors':[{'level':_0x172178(0x1dd),'path':'','code':'YAML_PARSE_ERROR','message':_0x4f6a6b}],'warnings':[]},'fileType':_0x4a0c9e};}export function validateYamlFile(_0x562792,_0x541c4d,_0x29822a={}){const _0x17b1cf=a182_0x2dc104,_0x20353e=a182_0x2e6943[_0x17b1cf(0x1f2)](_0x541c4d,_0x562792)||a182_0x2e6943[_0x17b1cf(0x1f5)](_0x562792);try{const _0x49cf8f=readFileSync(_0x562792,_0x17b1cf(0x1de)),_0x23d17a=a182_0x489242[_0x17b1cf(0x1d6)](_0x49cf8f),_0xd797a4=_0x23d17a[_0x17b1cf(0x1ea)]();if(!_0xd797a4)return createParseErrorResult(_0x562792,_0x20353e,_0x49cf8f,_0x17b1cf(0x1e9));let _0x179461;if(isJourneyDef(_0xd797a4,_0x562792))_0x179461='journey';else{if(isCampaignDef(_0xd797a4))_0x179461=_0x17b1cf(0x1ef);else{if(isAlwaysOnCampaignDef(_0xd797a4))_0x179461=_0x17b1cf(0x1f7);else isTemplateDef(_0xd797a4)?_0x179461='template':_0x179461=_0x17b1cf(0x1d9);}}if(_0x29822a[_0x17b1cf(0x1ed)]&&_0x179461!==_0x29822a[_0x17b1cf(0x1ed)])return{'filePath':_0x562792,'relativePath':_0x20353e,'skipped':!![],'reason':_0x17b1cf(0x1db)+_0x29822a[_0x17b1cf(0x1ed)]};const _0xaec589={'source':_0x49cf8f,'document':_0x23d17a};let _0x429925;if(_0x179461===_0x17b1cf(0x1dc))_0x429925=validateJourneyDef(_0xd797a4,_0xaec589);else{if(_0x179461===_0x17b1cf(0x1ef))_0x429925=validateCampaignDef(_0xd797a4,_0xaec589);else{if(_0x179461===_0x17b1cf(0x1f7))_0x429925=validateAlwaysOnCampaignDef(_0xd797a4,_0xaec589);else _0x179461===_0x17b1cf(0x1ec)?_0x429925=validateTemplateDef(_0xd797a4,_0xaec589):_0x429925=validateSegmentDef(_0xd797a4,_0xaec589);}}return{'filePath':_0x562792,'relativePath':_0x20353e,'source':_0x49cf8f,'result':_0x429925,'fileType':_0x179461};}catch(_0x1095e9){const _0x2e6c64=_0x1095e9 instanceof Error?_0x1095e9['message']:String(_0x1095e9);return createParseErrorResult(_0x562792,_0x20353e,'','YAML\x20parse\x20error:\x20'+_0x2e6c64);}}export function validateYamlFiles(_0x21410e,_0x36452b,_0x34135c={}){const _0x43757e=a182_0x2dc104;return _0x21410e[_0x43757e(0x1eb)](_0x3932b0=>validateYamlFile(_0x3932b0,_0x36452b,_0x34135c));}export function calculateSummary(_0x3be48f){const _0x27b2ea=a182_0x2dc104;let _0x58597b=0x0,_0x37cf4e=0x0,_0x45d47a=0x0,_0x1f81fe=0x0;for(const _0x3570f0 of _0x3be48f){if(!isValidationResult(_0x3570f0)){_0x1f81fe++;continue;}_0x3570f0[_0x27b2ea(0x1e5)]['valid']?_0x58597b++:_0x37cf4e++,_0x45d47a+=_0x3570f0[_0x27b2ea(0x1e5)][_0x27b2ea(0x1e3)]['length'];}return{'validCount':_0x58597b,'invalidCount':_0x37cf4e,'warningCount':_0x45d47a,'skippedCount':_0x1f81fe,'hasErrors':_0x37cf4e>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x314d01,_0x2156a6){const _0xde8722=a183_0x537f,_0x12a494=_0x314d01();while(!![]){try{const _0xa925a0=-parseInt(_0xde8722(0x1e6))/0x1+parseInt(_0xde8722(0x1c9))/0x2*(-parseInt(_0xde8722(0x1d8))/0x3)+-parseInt(_0xde8722(0x1e0))/0x4+-parseInt(_0xde8722(0x1be))/0x5*(parseInt(_0xde8722(0x1de))/0x6)+parseInt(_0xde8722(0x1d1))/0x7+-parseInt(_0xde8722(0x1da))/0x8+parseInt(_0xde8722(0x1c6))/0x9*(parseInt(_0xde8722(0x1ec))/0xa);if(_0xa925a0===_0x2156a6)break;else _0x12a494['push'](_0x12a494['shift']());}catch(_0x38ae46){_0x12a494['push'](_0x12a494['shift']());}}}(a183_0x6b12,0x80db3));import*as a183_0x50e363 from'yaml';function a183_0x537f(_0x3d655a,_0x1105c7){_0x3d655a=_0x3d655a-0x1bc;const _0x6b1218=a183_0x6b12();let _0x537f0e=_0x6b1218[_0x3d655a];return _0x537f0e;}import a183_0x15764d from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x27a6ff,_0x15e8f9,_0x485833){const _0x196af3=a183_0x537f;if(!_0x27a6ff||!_0x15e8f9)return undefined;try{let _0x1bd8c3=_0x27a6ff[_0x196af3(0x1bc)](_0x485833,!![]),_0x17cc8d=[..._0x485833];while((!_0x1bd8c3||typeof _0x1bd8c3!=='object'||!('range'in _0x1bd8c3)||!_0x1bd8c3[_0x196af3(0x1c4)])&&_0x17cc8d[_0x196af3(0x1d9)]>0x0){_0x17cc8d[_0x196af3(0x1eb)](),_0x1bd8c3=_0x17cc8d[_0x196af3(0x1d9)]>0x0?_0x27a6ff[_0x196af3(0x1bc)](_0x17cc8d,!![]):_0x27a6ff[_0x196af3(0x1ca)];}if(!_0x1bd8c3||typeof _0x1bd8c3!==_0x196af3(0x1d4)||!(_0x196af3(0x1c4)in _0x1bd8c3)||!_0x1bd8c3[_0x196af3(0x1c4)])return undefined;const [_0x1c734c]=_0x1bd8c3[_0x196af3(0x1c4)];return offsetToLocation(_0x15e8f9,_0x1c734c);}catch{return undefined;}}export function offsetToLocation(_0xf4d0b9,_0x57df2c){const _0x5241e9=a183_0x537f;let _0x565982=0x1,_0x7f8e10=0x1;for(let _0x4b90e7=0x0;_0x4b90e7<_0x57df2c&&_0x4b90e7<_0xf4d0b9[_0x5241e9(0x1d9)];_0x4b90e7++){_0xf4d0b9[_0x4b90e7]==='\x0a'?(_0x565982++,_0x7f8e10=0x1):_0x7f8e10++;}return{'line':_0x565982,'column':_0x7f8e10,'offset':_0x57df2c};}export function pathToArray(_0x587a14){const _0x53b65a=a183_0x537f;if(!_0x587a14)return[];return _0x587a14[_0x53b65a(0x1ea)]('.')[_0x53b65a(0x1e3)](_0x52e720=>{const _0x3dc065=_0x53b65a,_0x8a68ac=_0x52e720[_0x3dc065(0x1c5)](/^(\w+)\[(\d+)\]$/);if(_0x8a68ac)return[_0x8a68ac[0x1],parseInt(_0x8a68ac[0x2],0xa)];return[_0x52e720];});}export function formatZodPath(_0x331155){let _0x1bccef='';for(const _0x606bba of _0x331155){if(typeof _0x606bba==='number')_0x1bccef+='['+_0x606bba+']';else{const _0x1cb0dc=String(_0x606bba);_0x1bccef+=_0x1bccef?'.'+_0x1cb0dc:_0x1cb0dc;}}return _0x1bccef;}function a183_0x6b12(){const _0x34d389=['object','parse','max','repeat','13197ZEvNgR','length','7158224RVcLfP','\x20|\x20','location','yellow','198dzrbcr','map','1733640YiTmHK','error','invalid_union','flatMap','data','red','882401kSlTwK','padStart','message','join','split','pop','42906830RPAnwI','YAML\x20validation\x20error\x20at\x20\x27','getIn','code','149290OyxKqo','column','dim','min','success','level','range','match','9KlSoUc','Invalid\x20YAML:\x20expected\x20an\x20object','path','358FmvHCv','contents','cyan','toString','push','issues','warnings','line','1543052OnhdiA','errors','YAML\x20validation\x20error:\x20'];a183_0x6b12=function(){return _0x34d389;};return a183_0x6b12();}export function flattenZodIssues(_0x63ded5){const _0x1f0fa0=a183_0x537f,_0x4309eb=[];for(const _0x2b891d of _0x63ded5){if(_0x2b891d['code']===_0x1f0fa0(0x1e2)&&_0x1f0fa0(0x1d2)in _0x2b891d){const _0x260a05=_0x2b891d[_0x1f0fa0(0x1d2)];let _0x4059f1=_0x260a05[0x0]||[];for(const _0x753b0e of _0x260a05){_0x753b0e['length']<_0x4059f1[_0x1f0fa0(0x1d9)]&&(_0x4059f1=_0x753b0e);}const _0x43609a=_0x4059f1[_0x1f0fa0(0x1df)](_0x2f1b17=>({..._0x2f1b17,'path':[..._0x2b891d[_0x1f0fa0(0x1c8)],..._0x2f1b17[_0x1f0fa0(0x1c8)]]}));_0x4309eb['push'](...flattenZodIssues(_0x43609a));}else _0x4309eb[_0x1f0fa0(0x1cd)](_0x2b891d);}return _0x4309eb;}export function safeParseYaml(_0x42473f,_0x484bcd){const _0x483b7d=a183_0x537f,_0x19e81e=a183_0x50e363[_0x483b7d(0x1d5)](_0x42473f);if(!_0x19e81e||typeof _0x19e81e!==_0x483b7d(0x1d4))throw new Error(_0x483b7d(0x1c7));const _0x78ca5a=_0x484bcd['safeParse'](_0x19e81e);if(!_0x78ca5a[_0x483b7d(0x1c2)]){const _0x39122e=_0x78ca5a[_0x483b7d(0x1e1)][_0x483b7d(0x1ce)][0x0],_0x174bc2=formatZodPath(_0x39122e[_0x483b7d(0x1c8)]);throw new Error(_0x174bc2?_0x483b7d(0x1ed)+_0x174bc2+'\x27:\x20'+_0x39122e[_0x483b7d(0x1e8)]:_0x483b7d(0x1d3)+_0x39122e['message']);}return _0x78ca5a[_0x483b7d(0x1e4)];}export function formatIssueWithContext(_0x4b0355,_0x245ca6,_0x5e8a67){const _0x2f0eb9=a183_0x537f,_0x37772d=[],_0x1dc07d=_0x4b0355[_0x2f0eb9(0x1c3)]===_0x2f0eb9(0x1e1),_0x323e30=_0x1dc07d?a183_0x15764d[_0x2f0eb9(0x1e5)]:a183_0x15764d[_0x2f0eb9(0x1dd)],_0x3093d1=_0x1dc07d?a183_0x15764d['red']:a183_0x15764d[_0x2f0eb9(0x1dd)],_0x4f1c92=_0x5e8a67?a183_0x15764d[_0x2f0eb9(0x1cb)](_0x5e8a67+':'):'';if(_0x4b0355['location']){const _0x5a5f74=a183_0x15764d['cyan'](_0x4b0355[_0x2f0eb9(0x1dc)][_0x2f0eb9(0x1d0)]+':'+_0x4b0355[_0x2f0eb9(0x1dc)][_0x2f0eb9(0x1bf)]);_0x37772d[_0x2f0eb9(0x1cd)](''+_0x4f1c92+_0x5a5f74+':\x20'+_0x323e30(_0x4b0355[_0x2f0eb9(0x1c3)])+'\x20'+_0x3093d1('['+_0x4b0355[_0x2f0eb9(0x1bd)]+']'));}else _0x37772d[_0x2f0eb9(0x1cd)](''+_0x4f1c92+a183_0x15764d[_0x2f0eb9(0x1c0)](_0x4b0355[_0x2f0eb9(0x1c8)])+':\x20'+_0x323e30(_0x4b0355[_0x2f0eb9(0x1c3)])+'\x20'+_0x3093d1('['+_0x4b0355['code']+']'));_0x37772d[_0x2f0eb9(0x1cd)](_0x4b0355[_0x2f0eb9(0x1e8)]);if(_0x4b0355[_0x2f0eb9(0x1dc)]&&_0x245ca6){const _0x3cd710=_0x245ca6['split']('\x0a'),{line:_0xb1c6ae,column:_0x231c36}=_0x4b0355[_0x2f0eb9(0x1dc)],_0x4dc725=Math[_0x2f0eb9(0x1d6)](0x1,_0xb1c6ae-0x1),_0x5193f7=Math[_0x2f0eb9(0x1c1)](_0x3cd710[_0x2f0eb9(0x1d9)],_0xb1c6ae+0x1);_0x37772d[_0x2f0eb9(0x1cd)]('');for(let _0x4b2bc1=_0x4dc725;_0x4b2bc1<=_0x5193f7;_0x4b2bc1++){const _0x31b31a=_0x3cd710[_0x4b2bc1-0x1]||'',_0x5c3c14=a183_0x15764d[_0x2f0eb9(0x1c0)](_0x4b2bc1[_0x2f0eb9(0x1cc)]()[_0x2f0eb9(0x1e7)](0x4)),_0x446df8=a183_0x15764d[_0x2f0eb9(0x1c0)](_0x2f0eb9(0x1db));if(_0x4b2bc1===_0xb1c6ae){_0x37772d[_0x2f0eb9(0x1cd)]('\x20\x20'+_0x5c3c14+_0x446df8+_0x323e30(_0x31b31a));const _0x54eac3='\x20'[_0x2f0eb9(0x1d7)](0x4+0x3+_0x231c36-0x1);_0x37772d['push']('\x20\x20'+_0x54eac3+_0x323e30('^'));}else _0x37772d[_0x2f0eb9(0x1cd)]('\x20\x20'+_0x5c3c14+_0x446df8+a183_0x15764d[_0x2f0eb9(0x1c0)](_0x31b31a));}}return _0x37772d[_0x2f0eb9(0x1e9)]('\x0a');}export function formatValidationResult(_0x4ce767,_0x138202,_0x1efcb7){const _0x271ff2=a183_0x537f,_0xd9b82f=[];for(const _0x595000 of _0x4ce767[_0x271ff2(0x1d2)]){_0xd9b82f['push'](formatIssueWithContext(_0x595000,_0x138202,_0x1efcb7)),_0xd9b82f['push']('');}for(const _0x1fcdb9 of _0x4ce767[_0x271ff2(0x1cf)]){_0xd9b82f[_0x271ff2(0x1cd)](formatIssueWithContext(_0x1fcdb9,_0x138202,_0x1efcb7)),_0xd9b82f['push']('');}return _0xd9b82f[_0x271ff2(0x1e9)]('\x0a');}
|