@treasuredata/tdx 2026.4.4 → 2026.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.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.d.ts +5 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +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.d.ts +5 -0
- package/dist/sdk/workspace/access-tracker.d.ts.map +1 -0
- package/dist/sdk/workspace/access-tracker.js +1 -0
- package/dist/sdk/workspace/access-tracker.js.map +1 -0
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +1 -1
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +9 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.d.ts +2 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x376b85,_0x37619e){const _0x1da0ef=a157_0x3dd3,_0x2d67fa=_0x376b85();while(!![]){try{const _0x1da6c5=parseInt(_0x1da0ef(0x1ad))/0x1+-parseInt(_0x1da0ef(0x19d))/0x2*(parseInt(_0x1da0ef(0x1af))/0x3)+-parseInt(_0x1da0ef(0x1b5))/0x4+-parseInt(_0x1da0ef(0x1a1))/0x5+-parseInt(_0x1da0ef(0x196))/0x6+-parseInt(_0x1da0ef(0x1bd))/0x7*(parseInt(_0x1da0ef(0x1bc))/0x8)+parseInt(_0x1da0ef(0x18e))/0x9;if(_0x1da6c5===_0x37619e)break;else _0x2d67fa['push'](_0x2d67fa['shift']());}catch(_0x278164){_0x2d67fa['push'](_0x2d67fa['shift']());}}}(a157_0x4753,0xa0819));import a157_0x105b99 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x389130){const _0x4c83f1=a157_0x3dd3;return _0x389130['type']!==_0x4c83f1(0x1ae);}function a157_0x3dd3(_0x23ecc5,_0x306898){_0x23ecc5=_0x23ecc5-0x18e;const _0x475346=a157_0x4753();let _0x3dd3fd=_0x475346[_0x23ecc5];return _0x3dd3fd;}function a157_0x4753(){const _0x166bc8=['3199856XynRLe','7VzRtkv','segmentName','resolve','isFile','segment','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','File\x20not\x20found','configDir','23468823rdsFNz','resourceType','No\x20tdx.json\x20found','startsWith','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','context','journey','parentSegment','2517882OvbALE','type','directory','folderPath','exists','match','parent_name','512LCsCeT','extname','basename','replace','5307520GRtqGw','isDirectory','trim','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','readFile','includes','File\x20not\x20found:\x20','tdx.json','isScoped','Not\x20a\x20YAML\x20file:\x20','file','relative','1299863CmAyQu','error','789mrrwUQ','parent_segment','scopedFolderPath','No\x20tdx.json\x20found\x20for\x20file:\x20','dirname','no_config','5206464NlzbnL','parse','join','message','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','invalid_yaml','root'];a157_0x4753=function(){return _0x166bc8;};return a157_0x4753();}export function isScopedResolution(_0x1f0a75){const _0x104413=a157_0x3dd3;return _0x1f0a75[_0x104413(0x197)]==='directory'||_0x1f0a75[_0x104413(0x197)]==='file'||_0x1f0a75[_0x104413(0x197)]===_0x104413(0x193);}export function getScopedDetails(_0x5f4bd3){const _0x315194=a157_0x3dd3;if(isScopedResolution(_0x5f4bd3))return{'isScoped':_0x5f4bd3[_0x315194(0x1a9)],'scopedFolderPath':_0x5f4bd3[_0x315194(0x1b1)]};return undefined;}async function findTdxConfigAsync(_0x3b6a0b,_0x3a5355){const _0x3ea59a=a157_0x3dd3;let _0x205098=a157_0x105b99[_0x3ea59a(0x1bf)](_0x3b6a0b);const _0x53118d=a157_0x105b99[_0x3ea59a(0x1b6)](_0x205098)[_0x3ea59a(0x1bb)];while(_0x205098!==_0x53118d){const _0x3422c8=a157_0x105b99[_0x3ea59a(0x1b7)](_0x205098,_0x3ea59a(0x1a8));if(await _0x3a5355[_0x3ea59a(0x19a)](_0x3422c8))try{const _0x4400f1=await _0x3a5355['readFile'](_0x3422c8),_0x5e2d52=JSON[_0x3ea59a(0x1b6)](_0x4400f1);if(_0x5e2d52[_0x3ea59a(0x1b0)]&&typeof _0x5e2d52[_0x3ea59a(0x1b0)]==='string')return{'configPath':_0x3422c8,'configDir':_0x205098,'parentSegment':_0x5e2d52[_0x3ea59a(0x1b0)]};}catch{}_0x205098=a157_0x105b99[_0x3ea59a(0x1b3)](_0x205098);}return null;}function calculateScopedPath(_0x460d8e,_0xfeed2b){const _0x714ecd=a157_0x3dd3,_0x3d08f9=a157_0x105b99[_0x714ecd(0x1ac)](_0xfeed2b,_0x460d8e),_0x32189b=_0x3d08f9!==''&&_0x3d08f9!=='.'&&!_0x3d08f9[_0x714ecd(0x191)]('..');return{'isScoped':_0x32189b,'scopedFolderPath':_0x32189b?_0x3d08f9[_0x714ecd(0x1a0)](/\\/g,'/'):''};}export async function resolveTarget(_0x453317){const _0x3e313f=a157_0x3dd3,{arg:_0x9032ec,contextParent:_0x4f58ce,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x453317;if(_0x9032ec&&isYamlFilePath(_0x9032ec))try{const _0x2ce322=await resolveYamlFilePath(_0x9032ec,fs),_0x46cc68=a157_0x105b99[_0x3e313f(0x1bf)](_0x9032ec),_0x1e6fbc=a157_0x105b99[_0x3e313f(0x1b3)](_0x46cc68),_0x82a20=await findTdxConfigAsync(_0x1e6fbc,fs);if(!_0x82a20){if(_0x4f58ce){const _0x7631d0=a157_0x105b99[_0x3e313f(0x1b3)](_0x46cc68);return{'type':_0x3e313f(0x1ab),'parentName':_0x4f58ce,'targetDir':_0x7631d0,'configRoot':_0x7631d0,'filePath':_0x46cc68,'resourceName':_0x2ce322[_0x3e313f(0x1be)],'folderPath':_0x2ce322['folderPath'],'resourceType':_0x2ce322[_0x3e313f(0x18f)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3e313f(0x1ae),'errorCode':_0x3e313f(0x1b4),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x9032ec,'arg':_0x9032ec,'helpText':_0x3e313f(0x1a4)};}const _0x2653cc=calculateScopedPath(_0x1e6fbc,_0x82a20['configDir']);return{'type':'file','parentName':_0x82a20[_0x3e313f(0x195)],'targetDir':_0x82a20[_0x3e313f(0x1c4)],'configRoot':_0x82a20['configDir'],'filePath':_0x46cc68,'resourceName':_0x2ce322[_0x3e313f(0x1be)],'folderPath':_0x2ce322[_0x3e313f(0x199)],'resourceType':_0x2ce322[_0x3e313f(0x18f)],'isScoped':_0x2653cc[_0x3e313f(0x1a9)],'scopedFolderPath':_0x2653cc[_0x3e313f(0x1b1)]};}catch(_0x18e2cf){const _0x4e6ddc=_0x18e2cf instanceof Error?_0x18e2cf[_0x3e313f(0x1b8)]:String(_0x18e2cf);if(_0x4e6ddc[_0x3e313f(0x1a6)](_0x3e313f(0x1c3)))return{'type':_0x3e313f(0x1ae),'errorCode':'file_not_found','message':_0x3e313f(0x1a7)+_0x9032ec,'arg':_0x9032ec};if(_0x4e6ddc[_0x3e313f(0x1a6)](_0x3e313f(0x190))){if(_0x4f58ce){const _0x209955=a157_0x105b99[_0x3e313f(0x1bf)](_0x9032ec);if(await fs[_0x3e313f(0x19a)](_0x209955)){const _0x2f5fb8=a157_0x105b99['dirname'](_0x209955),_0x3e3bb7=await fs[_0x3e313f(0x1a5)](_0x209955),_0xaf8b64=_0x3e3bb7[_0x3e313f(0x19b)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5d5c28=_0x3e3bb7[_0x3e313f(0x19b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5bc671=_0xaf8b64?_0xaf8b64[0x1][_0x3e313f(0x1a3)]():a157_0x105b99[_0x3e313f(0x19f)](_0x9032ec,a157_0x105b99[_0x3e313f(0x19e)](_0x9032ec)),_0x79eae5=_0x5d5c28&&_0x5d5c28[0x1][_0x3e313f(0x1a3)]()===_0x3e313f(0x194)?_0x3e313f(0x194):_0x3e313f(0x1c1);return{'type':_0x3e313f(0x1ab),'parentName':_0x4f58ce,'targetDir':_0x2f5fb8,'configRoot':_0x2f5fb8,'filePath':_0x209955,'resourceName':_0x5bc671,'folderPath':'','resourceType':_0x79eae5,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x3e313f(0x1b4),'message':_0x3e313f(0x1b2)+_0x9032ec,'arg':_0x9032ec,'helpText':_0x3e313f(0x1a4)};}return{'type':_0x3e313f(0x1ae),'errorCode':_0x3e313f(0x1ba),'message':_0x4e6ddc,'arg':_0x9032ec};}if(_0x9032ec){const _0x282994=a157_0x105b99['resolve'](cwd,_0x9032ec);let _0x4c40ef=null;try{_0x4c40ef=await fs['stat'](_0x282994);}catch{}if(_0x4c40ef?.[_0x3e313f(0x1a2)]()){const _0x5ee1a5=await findTdxConfigAsync(_0x282994,fs);if(_0x5ee1a5){const _0x32f9b6=calculateScopedPath(_0x282994,_0x5ee1a5[_0x3e313f(0x1c4)]);return{'type':_0x3e313f(0x198),'parentName':_0x5ee1a5[_0x3e313f(0x195)],'targetDir':_0x282994,'configRoot':_0x5ee1a5[_0x3e313f(0x1c4)],'isScoped':_0x32f9b6[_0x3e313f(0x1a9)],'scopedFolderPath':_0x32f9b6['scopedFolderPath']};}if(_0x4f58ce)return{'type':_0x3e313f(0x198),'parentName':_0x4f58ce,'targetDir':_0x282994,'configRoot':_0x282994,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x3e313f(0x1b4),'message':_0x3e313f(0x1b9)+_0x9032ec,'arg':_0x9032ec,'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'};}if(_0x4c40ef?.[_0x3e313f(0x1c0)]())return{'type':_0x3e313f(0x1ae),'errorCode':'invalid_yaml','message':_0x3e313f(0x1aa)+_0x9032ec,'arg':_0x9032ec,'helpText':_0x3e313f(0x1c2)};const _0xeb075f=sanitizeFileName(_0x9032ec),_0x438603=getSegmentRootDir(_0xeb075f,cwd);return{'type':_0x3e313f(0x19c),'parentName':_0x9032ec,'targetDir':_0x438603,'configRoot':_0x438603};}const _0x503bee=await findTdxConfigAsync(cwd,fs);if(_0x503bee){const _0xe039=calculateScopedPath(cwd,_0x503bee[_0x3e313f(0x1c4)]);return{'type':_0x3e313f(0x193),'parentName':_0x503bee['parentSegment'],'targetDir':cwd,'configRoot':_0x503bee['configDir'],'isScoped':_0xe039[_0x3e313f(0x1a9)],'scopedFolderPath':_0xe039[_0x3e313f(0x1b1)]};}if(_0x4f58ce){const _0x46c3de=sanitizeFileName(_0x4f58ce),_0x383005=getSegmentRootDir(_0x46c3de,cwd);return{'type':_0x3e313f(0x193),'parentName':_0x4f58ce,'targetDir':_0x383005,'configRoot':_0x383005,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3e313f(0x1ae),'errorCode':'no_parent','message':'Parent\x20segment\x20not\x20specified','helpText':_0x3e313f(0x192)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x24ebce=a158_0x23d5;(function(_0x4da216,_0x4fbe81){const _0xee4555=a158_0x23d5,_0x52c4c7=_0x4da216();while(!![]){try{const _0xf7d58e=-parseInt(_0xee4555(0x14f))/0x1+-parseInt(_0xee4555(0x150))/0x2*(-parseInt(_0xee4555(0x140))/0x3)+-parseInt(_0xee4555(0x13e))/0x4+parseInt(_0xee4555(0x14c))/0x5+-parseInt(_0xee4555(0x137))/0x6*(-parseInt(_0xee4555(0x138))/0x7)+-parseInt(_0xee4555(0x141))/0x8*(-parseInt(_0xee4555(0x14e))/0x9)+parseInt(_0xee4555(0x13c))/0xa*(-parseInt(_0xee4555(0x152))/0xb);if(_0xf7d58e===_0x4fbe81)break;else _0x52c4c7['push'](_0x52c4c7['shift']());}catch(_0x33a36b){_0x52c4c7['push'](_0x52c4c7['shift']());}}}(a158_0x1757,0x6f8e2));import{existsSync,readFileSync}from'fs';import a158_0x45db6b from'path';const TDX_CONFIG_FILE=a158_0x24ebce(0x139),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0xc2d8bf=process[a158_0x24ebce(0x146)]()){const _0x1925a9=a158_0x24ebce;let _0x1c5150=a158_0x45db6b[_0x1925a9(0x145)](_0xc2d8bf);const _0x344c1a=a158_0x45db6b[_0x1925a9(0x13a)](_0x1c5150)[_0x1925a9(0x151)];while(_0x1c5150!==_0x344c1a){const _0x5e824d=a158_0x45db6b['join'](_0x1c5150,TDX_CONFIG_FILE);if(existsSync(_0x5e824d))return _0x5e824d;_0x1c5150=a158_0x45db6b[_0x1925a9(0x147)](_0x1c5150);}return null;}export function loadTdxConfig(_0x44c9e){const _0x14d05b=a158_0x24ebce,_0x6b6459=readFileSync(_0x44c9e,_0x14d05b(0x148));let _0x2d5e1f;try{_0x2d5e1f=JSON[_0x14d05b(0x13a)](_0x6b6459);}catch{throw new Error(_0x14d05b(0x14b)+_0x44c9e);}if(!_0x2d5e1f||typeof _0x2d5e1f!=='object')throw new Error(_0x14d05b(0x142));const _0x31bc16=_0x2d5e1f,_0x1e0e06=_0x31bc16[_0x14d05b(0x13f)]&&typeof _0x31bc16[_0x14d05b(0x13f)]===_0x14d05b(0x14a),_0x3c3b2a=_0x31bc16[_0x14d05b(0x144)]&&typeof _0x31bc16['engage_workspace']===_0x14d05b(0x14a);if(!_0x1e0e06&&!_0x3c3b2a)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x4ba056={};return _0x1e0e06&&(_0x4ba056[_0x14d05b(0x13f)]=_0x31bc16[_0x14d05b(0x13f)]),_0x3c3b2a&&(_0x4ba056[_0x14d05b(0x144)]=_0x31bc16['engage_workspace']),_0x4ba056;}export function findTdxConfig(_0x324447=process[a158_0x24ebce(0x146)]()){const _0xc30b4d=a158_0x24ebce,_0x38b30a=findTdxConfigPath(_0x324447);if(!_0x38b30a)throw new Error(_0xc30b4d(0x13b));const _0x410f2b=loadTdxConfig(_0x38b30a),_0x4a5455=a158_0x45db6b[_0xc30b4d(0x147)](_0x38b30a);return{'config':_0x410f2b,'configPath':_0x38b30a,'configDir':_0x4a5455};}export function tryFindTdxConfig(_0x197cb8){try{return findTdxConfig(_0x197cb8);}catch{return null;}}export function getSegmentRootDir(_0x811f37,_0x47acb1=process['cwd']()){const _0x7e051d=a158_0x24ebce;return a158_0x45db6b[_0x7e051d(0x149)](_0x47acb1,SEGMENTS_DIR,_0x811f37);}export function getTdxConfigPath(_0x21a682,_0x5e7304=process['cwd']()){const _0x34fa23=a158_0x24ebce;return a158_0x45db6b[_0x34fa23(0x149)](getSegmentRootDir(_0x21a682,_0x5e7304),TDX_CONFIG_FILE);}function a158_0x23d5(_0x1493ef,_0x284db7){_0x1493ef=_0x1493ef-0x137;const _0x175715=a158_0x1757();let _0x23d5f6=_0x175715[_0x1493ef];return _0x23d5f6;}export function getRelativePathFromConfig(_0x2b3ed9,_0x47e23c){const _0x10d0be=a158_0x24ebce,_0x7439a2=a158_0x45db6b[_0x10d0be(0x145)](_0x2b3ed9),_0x59f9f0=a158_0x45db6b[_0x10d0be(0x14d)](_0x47e23c,_0x7439a2);if(_0x59f9f0[_0x10d0be(0x153)]('..'))return'';return _0x59f9f0;}export function localPathToTdFolderPath(_0x87fe63){const _0xec66c1=a158_0x24ebce,_0x50d8af=a158_0x45db6b[_0xec66c1(0x147)](_0x87fe63);if(_0x50d8af==='.'||_0x50d8af==='')return'';return _0x50d8af[_0xec66c1(0x13d)](/\\/g,'/');}function a158_0x1757(){const _0x402343=['string','Invalid\x20JSON\x20in\x20','2717635aflBAi','relative','54YlqyYa','332794sgfUOS','4Jlqzxt','root','15312wrluCB','startsWith','1774998fcJsSR','7DyYLli','tdx.json','parse','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','2570zZwPmZ','replace','2925128YYuqLX','parent_segment','724965LSLgoH','741440dqqODF','Invalid\x20tdx.json:\x20expected\x20object','stringify','engage_workspace','resolve','cwd','dirname','utf-8','join'];a158_0x1757=function(){return _0x402343;};return a158_0x1757();}export function tdFolderPathToLocalPath(_0x388d62,_0x529196){const _0xa0f2a=a158_0x24ebce;if(!_0x388d62)return _0x529196;return a158_0x45db6b[_0xa0f2a(0x149)](_0x529196,_0x388d62);}export function createTdxConfigContent(_0x4599d5){const _0x358377={'parent_segment':_0x4599d5};return JSON['stringify'](_0x358377,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x59e5df){const _0x416f53=a158_0x24ebce,_0x570aaa={'engage_workspace':_0x59e5df};return JSON[_0x416f53(0x143)](_0x570aaa,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x32d3d3=a159_0x45a9;(function(_0x46ab7f,_0x54ba5a){const _0x8d7be5=a159_0x45a9,_0x3ef22e=_0x46ab7f();while(!![]){try{const _0x265e4f=-parseInt(_0x8d7be5(0x82))/0x1+-parseInt(_0x8d7be5(0x71))/0x2*(-parseInt(_0x8d7be5(0x74))/0x3)+-parseInt(_0x8d7be5(0x78))/0x4+parseInt(_0x8d7be5(0x98))/0x5*(parseInt(_0x8d7be5(0x7f))/0x6)+-parseInt(_0x8d7be5(0x7d))/0x7+-parseInt(_0x8d7be5(0x87))/0x8+parseInt(_0x8d7be5(0x8a))/0x9*(parseInt(_0x8d7be5(0x95))/0xa);if(_0x265e4f===_0x54ba5a)break;else _0x3ef22e['push'](_0x3ef22e['shift']());}catch(_0x57a8d5){_0x3ef22e['push'](_0x3ef22e['shift']());}}}(a159_0x553e,0xc9a83));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x32d3d3(0x8e)]([a159_0x32d3d3(0x8d),a159_0x32d3d3(0x86),'daily',a159_0x32d3d3(0x90),a159_0x32d3d3(0x75),a159_0x32d3d3(0x77),a159_0x32d3d3(0x93)]);function a159_0x553e(){const _0x5ce36a=['month','31855rrtwfL','masked','474nLHVuR','number','asc','13191ZptDTt','monthly','string','cron','2892344AbLHpn','boolean','desc','minute','day','6637981HoKrxj','optional','1038RzHXLE','Last','clear','1614387ORfFZA','Top-N','unknown','hour','hourly','10980280qvONLv','First','nullable','9sjqGSj','onFailure','Activation\x20name\x20is\x20required','none','enum','array','weekly','min','cols','minutes_interval','object','33400060fKYKUD','rows'];a159_0x553e=function(){return _0x5ce36a;};return a159_0x553e();}export const RepeatUnitSchema=z['enum']([a159_0x32d3d3(0x7b),a159_0x32d3d3(0x85),a159_0x32d3d3(0x7c),'week',a159_0x32d3d3(0x97),'once','none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x32d3d3(0x7e)](),'repeat_unit':RepeatUnitSchema[a159_0x32d3d3(0x7e)](),'repeat_frequency':z[a159_0x32d3d3(0x72)]()['optional'](),'repeat_sub_frequency':z[a159_0x32d3d3(0x8f)](z['number']())[a159_0x32d3d3(0x7e)](),'start_at':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x89)]()[a159_0x32d3d3(0x7e)](),'end_on':z['string']()[a159_0x32d3d3(0x89)]()[a159_0x32d3d3(0x7e)](),'timezone':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x7e)]()});export const NotificationDefSchema=z[a159_0x32d3d3(0x94)]({'notify_on':z['array'](z[a159_0x32d3d3(0x8e)](['onSuccess',a159_0x32d3d3(0x8b)]))[a159_0x32d3d3(0x7e)](),'email_recipients':z[a159_0x32d3d3(0x8f)](z[a159_0x32d3d3(0x76)]())[a159_0x32d3d3(0x7e)]()});function a159_0x45a9(_0x55725f,_0x3b0223){_0x55725f=_0x55725f-0x71;const _0x553e8a=a159_0x553e();let _0x45a96e=_0x553e8a[_0x55725f];return _0x45a96e;}export const ActivationColumnDefSchema=z['union']([z['string'](),z[a159_0x32d3d3(0x94)]({'name':z[a159_0x32d3d3(0x76)](),'type':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x7e)](),'visibility':z[a159_0x32d3d3(0x8e)](['clear','masked'])[a159_0x32d3d3(0x7e)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x32d3d3(0x94)]({'columns':z['array'](z[a159_0x32d3d3(0x94)]({'name':z[a159_0x32d3d3(0x76)](),'type':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x7e)](),'visibility':z['enum']([a159_0x32d3d3(0x81),a159_0x32d3d3(0x99)])[a159_0x32d3d3(0x7e)]()}))[a159_0x32d3d3(0x7e)](),'behavior_table':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x7e)](),'join_row':z[a159_0x32d3d3(0x72)]()[a159_0x32d3d3(0x89)]()['optional'](),'join_strategy':z[a159_0x32d3d3(0x8e)](['All',a159_0x32d3d3(0x88),a159_0x32d3d3(0x80),a159_0x32d3d3(0x83)])[a159_0x32d3d3(0x7e)](),'formatting':z['enum']([a159_0x32d3d3(0x96),a159_0x32d3d3(0x92)])[a159_0x32d3d3(0x7e)](),'order_by':z['array'](z['object']({'key':z[a159_0x32d3d3(0x76)](),'order':z[a159_0x32d3d3(0x8e)]([a159_0x32d3d3(0x73),a159_0x32d3d3(0x7a)])}))['optional']()});export const ActivationDefSchema=z['object']({'name':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x91)](0x1,a159_0x32d3d3(0x8c)),'description':z[a159_0x32d3d3(0x76)]()['optional'](),'connection':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x91)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a159_0x32d3d3(0x7e)](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a159_0x32d3d3(0x7e)](),'notification':NotificationDefSchema[a159_0x32d3d3(0x7e)](),'connector_config':z['record'](z['string'](),z[a159_0x32d3d3(0x84)]())['optional'](),'activation_template_id':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x89)]()[a159_0x32d3d3(0x7e)](),'behavior':ActivationBehaviorDefSchema[a159_0x32d3d3(0x89)]()['optional'](),'run_after_journey_refresh':z['boolean']()[a159_0x32d3d3(0x7e)](),'nested_workflow_project_name':z['string']()[a159_0x32d3d3(0x7e)](),'nested_workflow_name':z[a159_0x32d3d3(0x76)]()[a159_0x32d3d3(0x7e)](),'lock_enabled':z[a159_0x32d3d3(0x79)]()[a159_0x32d3d3(0x7e)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a160_0x431d(){var _0x17aa9e=['2852178bPbCYk','646565pcgSsY','4BFzLcr','4981024WnZRIx','370884KSPnaZ','73812tWrqdR','3028858SRmvKr','372710GJkxzv'];a160_0x431d=function(){return _0x17aa9e;};return a160_0x431d();}(function(_0x2c4c4b,_0x5190b2){var _0x169170=a160_0x1f38,_0x3c202d=_0x2c4c4b();while(!![]){try{var _0x6982c9=-parseInt(_0x169170(0x71))/0x1+-parseInt(_0x169170(0x6f))/0x2+parseInt(_0x169170(0x6e))/0x3*(-parseInt(_0x169170(0x6c))/0x4)+parseInt(_0x169170(0x73))/0x5+parseInt(_0x169170(0x72))/0x6+-parseInt(_0x169170(0x70))/0x7+parseInt(_0x169170(0x6d))/0x8;if(_0x6982c9===_0x5190b2)break;else _0x3c202d['push'](_0x3c202d['shift']());}catch(_0x30fc14){_0x3c202d['push'](_0x3c202d['shift']());}}}(a160_0x431d,0x3fcf6));function a160_0x1f38(_0x300597,_0x213900){_0x300597=_0x300597-0x6c;var _0x431d13=a160_0x431d();var _0x1f3821=_0x431d13[_0x300597];return _0x1f3821;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x1c88fa=a161_0x3f42;function a161_0x566e(){const _0x363156=['decision_point','435788CgzEsi','wait','lazy','21RhaQcZ','length','number','discriminatedUnion','isArray','705006ALbLAW','versions','boolean','simulation','merge','activation','literal','day','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','enum','Journey\x20name\x20is\x20required','no_reentry','string','jump','journeys','optional','filter','reentry_unless_goal_achieved','week','array','2242HipfEQ','ab_test','refine','min','5juofJc','701744tvRBkS','1579788oDlRTB','2071950bbTZsW','167lnLbmJ','type','6416120oApTpx','draft','passthrough','object','record','journey','end'];a161_0x566e=function(){return _0x363156;};return a161_0x566e();}(function(_0x2e1a1f,_0x48d3ce){const _0xf355b6=a161_0x3f42,_0x49c6a1=_0x2e1a1f();while(!![]){try{const _0x5e7758=-parseInt(_0xf355b6(0x11c))/0x1*(-parseInt(_0xf355b6(0x114))/0x2)+-parseInt(_0xf355b6(0x100))/0x3+-parseInt(_0xf355b6(0x126))/0x4*(parseInt(_0xf355b6(0x118))/0x5)+-parseInt(_0xf355b6(0x11b))/0x6+-parseInt(_0xf355b6(0xfb))/0x7*(-parseInt(_0xf355b6(0x119))/0x8)+-parseInt(_0xf355b6(0x11a))/0x9+parseInt(_0xf355b6(0x11e))/0xa;if(_0x5e7758===_0x48d3ce)break;else _0x49c6a1['push'](_0x49c6a1['shift']());}catch(_0x3c8bf7){_0x49c6a1['push'](_0x49c6a1['shift']());}}}(a161_0x566e,0x3775f));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x1c88fa(0x109)]([a161_0x1c88fa(0x11f),a161_0x1c88fa(0x103),'launched']);export const ReentryModeTypeSchema=z[a161_0x1c88fa(0x109)]([a161_0x1c88fa(0x10b),a161_0x1c88fa(0x111),'reentry_always']);export const WaitUnitTypeSchema=z['enum']([a161_0x1c88fa(0x107),a161_0x1c88fa(0x112)]);export const StepTypeValueSchema=z[a161_0x1c88fa(0x109)]([a161_0x1c88fa(0x127),a161_0x1c88fa(0x105),a161_0x1c88fa(0x125),'ab_test',a161_0x1c88fa(0x104),'jump',a161_0x1c88fa(0x124)]);export const EmbeddedSegmentDefSchema=z[a161_0x1c88fa(0x121)]({'description':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x1c88fa(0x121)]({'journey':z[a161_0x1c88fa(0x10c)](),'stage':z[a161_0x1c88fa(0x10c)](),'bundle_id':z['string']()[a161_0x1c88fa(0x10f)]()});export const CriteriaDefSchema=z[a161_0x1c88fa(0x121)]({'name':z[a161_0x1c88fa(0x10c)](),'description':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x1c88fa(0x10f)]()});const WaitConditionTimeoutDefSchema=z[a161_0x1c88fa(0x121)]({'duration':z[a161_0x1c88fa(0xfd)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)]()}),WaitConditionDefSchema=z['object']({'segment':z['string'](),'next':z['string']()[a161_0x1c88fa(0x10f)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x1c88fa(0x10f)]()}),WaitStepParamsDefSchema=z[a161_0x1c88fa(0x121)]({'duration':z[a161_0x1c88fa(0xfd)]()[a161_0x1c88fa(0x10f)](),'unit':WaitUnitTypeSchema[a161_0x1c88fa(0x10f)](),'wait_until':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'condition':WaitConditionDefSchema[a161_0x1c88fa(0x10f)](),'days_of_week':z[a161_0x1c88fa(0x113)](z[a161_0x1c88fa(0x10c)]())['optional']()}),StepBaseFields={'name':z[a161_0x1c88fa(0x10c)](),'uuid':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'next':z[a161_0x1c88fa(0x10c)]()['optional']()},WaitStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z['literal']('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x1c88fa(0x121)]({'activation':z[a161_0x1c88fa(0x10c)]()}),ActivationStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z[a161_0x1c88fa(0x106)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z['string'](),'segment':z[a161_0x1c88fa(0x10c)]()['optional'](),'segment_id':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'excluded':z[a161_0x1c88fa(0x102)]()['optional'](),'next':z[a161_0x1c88fa(0x10c)]()['optional']()}),DecisionPointStepParamsDefSchema=z[a161_0x1c88fa(0x121)]({'branches':z[a161_0x1c88fa(0x113)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z[a161_0x1c88fa(0x106)](a161_0x1c88fa(0x125)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x1c88fa(0x121)]({'id':z[a161_0x1c88fa(0x10c)]()['optional'](),'name':z[a161_0x1c88fa(0x10c)](),'percentage':z['number'](),'next':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)]()}),AbTestStepParamsDefSchema=z[a161_0x1c88fa(0x121)]({'variants':z[a161_0x1c88fa(0x113)](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x1c88fa(0x10f)](),'customized_split':z['boolean']()[a161_0x1c88fa(0x10f)]()}),AbTestStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z[a161_0x1c88fa(0x106)](a161_0x1c88fa(0x115)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z[a161_0x1c88fa(0x106)]('merge')}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z[a161_0x1c88fa(0x106)](a161_0x1c88fa(0x10d)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x1c88fa(0x121)]({...StepBaseFields,'type':z[a161_0x1c88fa(0x106)](a161_0x1c88fa(0x124))})[a161_0x1c88fa(0x120)]();export const StepDefSchema=z[a161_0x1c88fa(0xfe)](a161_0x1c88fa(0x11d),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a161_0x3f42(_0x1835a5,_0x57714c){_0x1835a5=_0x1835a5-0xfb;const _0x566edd=a161_0x566e();let _0x3f42c9=_0x566edd[_0x1835a5];return _0x3f42c9;}export const StageDefSchema=z[a161_0x1c88fa(0x121)]({'name':z[a161_0x1c88fa(0x10c)](),'description':z[a161_0x1c88fa(0x10c)]()['optional'](),'id':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'entry_criteria':CriteriaDefSchema[a161_0x1c88fa(0x10f)](),'exit_criteria':z[a161_0x1c88fa(0x113)](CriteriaDefSchema)[a161_0x1c88fa(0x10f)](),'milestone':CriteriaDefSchema[a161_0x1c88fa(0x10f)](),'root_step':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'steps':z[a161_0x1c88fa(0x113)](StepDefSchema)[a161_0x1c88fa(0x10f)]()});export const JourneyEntryDefSchema=z[a161_0x1c88fa(0x121)]({'name':z['string']()['optional'](),'version':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a161_0x1c88fa(0x102)]()[a161_0x1c88fa(0x10f)](),'stages':z[a161_0x1c88fa(0x113)](StageDefSchema),'id':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'version_number':z[a161_0x1c88fa(0xfd)]()['optional'](),'goal':CriteriaDefSchema[a161_0x1c88fa(0x10f)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a161_0x1c88fa(0x128)](()=>z['object']({'type':z[a161_0x1c88fa(0x106)](a161_0x1c88fa(0x123)),'name':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x117)](0x1,a161_0x1c88fa(0x10a)),'description':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'bundle_id':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'bundle_name':z[a161_0x1c88fa(0x10c)]()[a161_0x1c88fa(0x10f)](),'folder_id':z[a161_0x1c88fa(0x10c)]()['optional'](),'reentry':ReentryModeTypeSchema[a161_0x1c88fa(0x10f)](),'allow_reentry':z['boolean']()[a161_0x1c88fa(0x10f)](),'goal':CriteriaDefSchema[a161_0x1c88fa(0x10f)](),'id':z['string']()[a161_0x1c88fa(0x10f)](),'version':z[a161_0x1c88fa(0x10c)]()['optional'](),'version_number':z['number']()[a161_0x1c88fa(0x10f)](),'stages':z[a161_0x1c88fa(0x113)](StageDefSchema)['optional'](),'versions':z[a161_0x1c88fa(0x113)](JourneyEntryDefSchema)[a161_0x1c88fa(0x10f)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x1c88fa(0x10f)](),'segments':z['record'](z[a161_0x1c88fa(0x10c)](),EmbeddedSegmentDefSchema)[a161_0x1c88fa(0x10f)](),'activations':z[a161_0x1c88fa(0x122)](z[a161_0x1c88fa(0x10c)](),ActivationDefSchema)[a161_0x1c88fa(0x10f)]()})[a161_0x1c88fa(0x116)](_0x2a0d65=>{const _0x19cf27=a161_0x1c88fa,_0x5a37cf=[_0x2a0d65[_0x19cf27(0x10e)],_0x2a0d65['stages'],_0x2a0d65[_0x19cf27(0x101)]][_0x19cf27(0x110)](_0xe1f449=>Array[_0x19cf27(0xff)](_0xe1f449)&&_0xe1f449[_0x19cf27(0xfc)]>0x0)['length'];return _0x5a37cf===0x1;},{'message':a161_0x1c88fa(0x108)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20acd7,_0x4e4e9b){var _0x5797c5=a163_0x4a3a,_0x36da64=_0x20acd7();while(!![]){try{var _0x3e13ce=-parseInt(_0x5797c5(0xaa))/0x1*(parseInt(_0x5797c5(0xaf))/0x2)+parseInt(_0x5797c5(0xb1))/0x3*(parseInt(_0x5797c5(0xab))/0x4)+-parseInt(_0x5797c5(0xa7))/0x5*(parseInt(_0x5797c5(0xae))/0x6)+parseInt(_0x5797c5(0xad))/0x7*(-parseInt(_0x5797c5(0xa9))/0x8)+parseInt(_0x5797c5(0xa5))/0x9*(-parseInt(_0x5797c5(0xb0))/0xa)+-parseInt(_0x5797c5(0xa6))/0xb+-parseInt(_0x5797c5(0xa8))/0xc*(-parseInt(_0x5797c5(0xac))/0xd);if(_0x3e13ce===_0x4e4e9b)break;else _0x36da64['push'](_0x36da64['shift']());}catch(_0x4c03f7){_0x36da64['push'](_0x36da64['shift']());}}}(a163_0x44b8,0xded22));function a163_0x4a3a(_0x47bfb2,_0x13b4a4){_0x47bfb2=_0x47bfb2-0xa5;var _0x44b8a0=a163_0x44b8();var _0x4a3ae8=_0x44b8a0[_0x47bfb2];return _0x4a3ae8;}function a163_0x44b8(){var _0x130e0b=['4113024RsyLWu','7512VfBQIT','18395QHtYKC','4aHzKks','104Slpgar','5754pmyFUf','4445382cIYYlS','166TspTyR','10ZAQPum','4362747dlYajl','2104911qbGLpo','111892xTubBf','5jXWwud'];a163_0x44b8=function(){return _0x130e0b;};return a163_0x44b8();}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 a164_0x4e2c8b=a164_0x1755;(function(_0x4b07da,_0x3d1189){const _0x11b087=a164_0x1755,_0x196a99=_0x4b07da();while(!![]){try{const _0x1ec92f=parseInt(_0x11b087(0x20c))/0x1*(-parseInt(_0x11b087(0x208))/0x2)+-parseInt(_0x11b087(0x201))/0x3*(parseInt(_0x11b087(0x236))/0x4)+-parseInt(_0x11b087(0x203))/0x5+-parseInt(_0x11b087(0x213))/0x6*(-parseInt(_0x11b087(0x1fe))/0x7)+parseInt(_0x11b087(0x20f))/0x8*(-parseInt(_0x11b087(0x219))/0x9)+-parseInt(_0x11b087(0x22c))/0xa*(-parseInt(_0x11b087(0x200))/0xb)+parseInt(_0x11b087(0x216))/0xc;if(_0x1ec92f===_0x3d1189)break;else _0x196a99['push'](_0x196a99['shift']());}catch(_0x500a89){_0x196a99['push'](_0x196a99['shift']());}}}(a164_0x4436,0x7abe9));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a164_0x4e2c8b(0x239),a164_0x4e2c8b(0x214),a164_0x4e2c8b(0x22a),a164_0x4e2c8b(0x1f8),'LessEqual','In',a164_0x4e2c8b(0x217),'Regexp',a164_0x4e2c8b(0x22e),a164_0x4e2c8b(0x230),a164_0x4e2c8b(0x228),a164_0x4e2c8b(0x241),a164_0x4e2c8b(0x1f0),a164_0x4e2c8b(0x202),a164_0x4e2c8b(0x23c)]);export const TimeUnitSchema=z[a164_0x4e2c8b(0x20a)](['second',a164_0x4e2c8b(0x1f7),a164_0x4e2c8b(0x225),a164_0x4e2c8b(0x20d),a164_0x4e2c8b(0x232),'month','year']);export const AggregationTypeSchema=z[a164_0x4e2c8b(0x20a)]([a164_0x4e2c8b(0x233),a164_0x4e2c8b(0x235),a164_0x4e2c8b(0x23e),a164_0x4e2c8b(0x23d),a164_0x4e2c8b(0x220),a164_0x4e2c8b(0x222),a164_0x4e2c8b(0x238),a164_0x4e2c8b(0x1fa)]);const TemporalValueSchema=z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x22d)]({'timestamp':z[a164_0x4e2c8b(0x1f2)]()}),z['object']({'last':z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x23f)](),z[a164_0x4e2c8b(0x1ff)](z[a164_0x4e2c8b(0x1f2)](),z['number']())]),'unit':z[a164_0x4e2c8b(0x1f2)]()})]),OperatorValueSchema=z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x1f2)](),z['number'](),z[a164_0x4e2c8b(0x218)](),TemporalValueSchema,z['array'](z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x1f2)](),z[a164_0x4e2c8b(0x23f)](),z[a164_0x4e2c8b(0x218)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x4e2c8b(0x239),'Greater',a164_0x4e2c8b(0x1f8),'Less',a164_0x4e2c8b(0x1ef),'In',a164_0x4e2c8b(0x241),a164_0x4e2c8b(0x1f0),a164_0x4e2c8b(0x202),a164_0x4e2c8b(0x22b),'TimeWithinPast',a164_0x4e2c8b(0x228)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x4e2c8b(0x230),a164_0x4e2c8b(0x228)]);export const OperatorDefSchema=z[a164_0x4e2c8b(0x22d)]({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x4e2c8b(0x1f4)](),'value':OperatorValueSchema[a164_0x4e2c8b(0x1f4)](),'min':z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x23f)](),z[a164_0x4e2c8b(0x1f2)](),TemporalValueSchema])['optional'](),'max':z['union']([z[a164_0x4e2c8b(0x23f)](),z[a164_0x4e2c8b(0x1f2)](),TemporalValueSchema])[a164_0x4e2c8b(0x1f4)](),'unit':TimeUnitSchema[a164_0x4e2c8b(0x1f4)](),'duration':z[a164_0x4e2c8b(0x22d)]({'day':z[a164_0x4e2c8b(0x23f)]()['optional'](),'week':z['number']()[a164_0x4e2c8b(0x1f4)](),'month':z[a164_0x4e2c8b(0x23f)]()[a164_0x4e2c8b(0x1f4)](),'year':z['number']()[a164_0x4e2c8b(0x1f4)](),'hour':z[a164_0x4e2c8b(0x23f)]()[a164_0x4e2c8b(0x1f4)](),'minute':z[a164_0x4e2c8b(0x23f)]()['optional'](),'second':z[a164_0x4e2c8b(0x23f)]()['optional']()})[a164_0x4e2c8b(0x1f4)](),'from':z[a164_0x4e2c8b(0x22d)]({'last':z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x23f)](),z[a164_0x4e2c8b(0x1f2)]()]),'unit':TimeUnitSchema})[a164_0x4e2c8b(0x1f4)](),'reverse':z[a164_0x4e2c8b(0x218)]()[a164_0x4e2c8b(0x1f4)]()})['superRefine']((_0x41811b,_0x4652aa)=>{const _0x56c4e2=a164_0x4e2c8b;OPERATORS_REQUIRING_VALUE[_0x56c4e2(0x21a)](_0x41811b[_0x56c4e2(0x227)])&&(_0x41811b['value']===undefined||_0x41811b[_0x56c4e2(0x23b)]===null)&&_0x4652aa['addIssue']({'code':_0x56c4e2(0x237),'message':_0x56c4e2(0x1f5)+_0x41811b[_0x56c4e2(0x227)]+_0x56c4e2(0x21f),'path':[_0x56c4e2(0x23b)]}),_0x41811b[_0x56c4e2(0x227)]===_0x56c4e2(0x217)&&_0x41811b[_0x56c4e2(0x210)]===undefined&&_0x41811b[_0x56c4e2(0x21b)]===undefined&&_0x4652aa[_0x56c4e2(0x205)]({'code':'custom','message':_0x56c4e2(0x242),'params':{'validationCode':_0x56c4e2(0x224)}}),OPERATORS_REQUIRING_UNIT['has'](_0x41811b['type'])&&_0x41811b[_0x56c4e2(0x23b)]!==undefined&&!_0x41811b['unit']&&_0x4652aa[_0x56c4e2(0x205)]({'code':_0x56c4e2(0x237),'message':_0x56c4e2(0x1f5)+_0x41811b[_0x56c4e2(0x227)]+_0x56c4e2(0x1f1),'path':[_0x56c4e2(0x209)],'params':{'validationCode':_0x56c4e2(0x20e)}}),_0x41811b['type']===_0x56c4e2(0x23c)&&(!_0x41811b[_0x56c4e2(0x212)]&&_0x4652aa['addIssue']({'code':_0x56c4e2(0x237),'message':_0x56c4e2(0x207),'path':[_0x56c4e2(0x212)]}),!_0x41811b[_0x56c4e2(0x23a)]&&_0x4652aa['addIssue']({'code':_0x56c4e2(0x237),'message':_0x56c4e2(0x1f3),'path':[_0x56c4e2(0x23a)]}));});export const ArrayMatchingSchema=z[a164_0x4e2c8b(0x231)]([z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x1fb)),z['literal']('all'),z[a164_0x4e2c8b(0x22d)]({'atLeast':z[a164_0x4e2c8b(0x23f)]()}),z[a164_0x4e2c8b(0x22d)]({'atMost':z[a164_0x4e2c8b(0x23f)]()}),z['object']({'exactly':z[a164_0x4e2c8b(0x23f)]()})]);function a164_0x4436(){const _0x52582f=['Column','TimeWithinPast','union','week','Count','exclude','Sum','4OLYwGn','custom','First','Equal','from','value','TimeRange','Min','Average','number','array','Contain','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','segment','include','LessEqual','StartWith','\x27\x20requires\x20a\x20time\x20unit','string','TimeRange\x20operator\x20requires\x20\x27from\x27','optional','Operator\x20\x27','superRefine','minute','GreaterEqual','operator','Last','any','And','realtime','2009ndhSmU','record','2959GIihJY','1880262CWNRIk','EndWith','4331370YyEtXD','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','addIssue','Behavior','TimeRange\x20operator\x20requires\x20\x27duration\x27','295166QDkVxF','unit','enum','discriminatedUnion','1ApHERp','day','MISSING_TIME_UNIT','153848PAXwhT','min','batch','duration','9738mwLcMa','Greater','timestamp','15664704BdOjqJ','Between','boolean','63EtMKxE','has','max','column','lazy','Segment\x20name\x20is\x20required','\x27\x20requires\x20a\x20value','Max','funnel_stage','CountDistinct','Value','MISSING_BETWEEN_BOUNDS','hour','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','type','TimeWithinNext','literal','Less','Regexp','18840WFHBrF','object','IsNull'];a164_0x4436=function(){return _0x52582f;};return a164_0x4436();}export const AggregationDefSchema=z[a164_0x4e2c8b(0x20b)](a164_0x4e2c8b(0x227),[z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x20a)](['Sum',a164_0x4e2c8b(0x23d),a164_0x4e2c8b(0x220),'Average']),'column':z[a164_0x4e2c8b(0x1f2)](),'groupingColumns':z[a164_0x4e2c8b(0x240)](z[a164_0x4e2c8b(0x1f2)]())['optional']()}),z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x233)),'groupingColumns':z['array'](z[a164_0x4e2c8b(0x1f2)]())[a164_0x4e2c8b(0x1f4)]()}),z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x222)),'columns':z[a164_0x4e2c8b(0x240)](z[a164_0x4e2c8b(0x1f2)]())}),z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x20a)]([a164_0x4e2c8b(0x238),'Last']),'column':z[a164_0x4e2c8b(0x1f2)](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x4e2c8b(0x240)](z[a164_0x4e2c8b(0x1f2)]())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a164_0x4e2c8b(0x23f)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a164_0x4e2c8b(0x228),'TimeRange']);function a164_0x1755(_0x4b7434,_0x4bc291){_0x4b7434=_0x4b7434-0x1ee;const _0x443614=a164_0x4436();let _0x1755cb=_0x443614[_0x4b7434];return _0x1755cb;}export const FilterColumnConditionDefSchema=z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x22f)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x4e2c8b(0x1f4)]()})[a164_0x4e2c8b(0x1f6)]((_0x226daa,_0x465315)=>{const _0xa9104e=a164_0x4e2c8b,_0x1069b5=_0x226daa[_0xa9104e(0x1f9)]['type'];_0x226daa[_0xa9104e(0x21c)]===_0xa9104e(0x215)?!TIMESTAMP_OPERATORS[_0xa9104e(0x21a)](_0x1069b5)&&_0x465315[_0xa9104e(0x205)]({'code':_0xa9104e(0x237),'message':_0xa9104e(0x204)+_0x1069b5+'\x27)','path':['operator',_0xa9104e(0x227)]}):TIMESTAMP_OPERATORS[_0xa9104e(0x21a)](_0x1069b5)&&_0x465315[_0xa9104e(0x205)]({'code':_0xa9104e(0x237),'message':'Operator\x20\x27'+_0x1069b5+_0xa9104e(0x226),'path':[_0xa9104e(0x1f9),'type']});});export const FilterRuleDefSchema=z['object']({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x1fc)),'conditions':z[a164_0x4e2c8b(0x240)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x4e2c8b(0x21d)](()=>z['object']({'type':z['literal'](a164_0x4e2c8b(0x223)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x4e2c8b(0x218)]()[a164_0x4e2c8b(0x1f4)](),'aggregation':AggregationDefSchema[a164_0x4e2c8b(0x1f4)](),'source':z[a164_0x4e2c8b(0x1f2)]()[a164_0x4e2c8b(0x1f4)](),'filter':FilterRuleDefSchema[a164_0x4e2c8b(0x1f4)](),'limit':z[a164_0x4e2c8b(0x23f)]()[a164_0x4e2c8b(0x1f4)]()}));export const BehaviorConditionDefSchema=z[a164_0x4e2c8b(0x21d)](()=>z['object']({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x206)),'attribute':z[a164_0x4e2c8b(0x1f2)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x4e2c8b(0x1f4)](),'exclude':z[a164_0x4e2c8b(0x218)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x4e2c8b(0x1f2)]()[a164_0x4e2c8b(0x1f4)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x4e2c8b(0x1f4)](),'limit':z[a164_0x4e2c8b(0x23f)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x22f)),'column':z[a164_0x4e2c8b(0x1f2)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x4e2c8b(0x21d)](()=>z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x20a)]([a164_0x4e2c8b(0x1fc),'Or']),'conditions':z[a164_0x4e2c8b(0x240)](ConditionDefSchema),'description':z[a164_0x4e2c8b(0x1f2)]()[a164_0x4e2c8b(0x1f4)]()}));export const SegmentRefConditionDefSchema=z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x20a)]([a164_0x4e2c8b(0x1ee),a164_0x4e2c8b(0x234)]),'segment':z[a164_0x4e2c8b(0x1f2)]()[a164_0x4e2c8b(0x210)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x4e2c8b(0x231)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x4e2c8b(0x21d)](()=>z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x20a)](['And','Or']),'conditions':z[a164_0x4e2c8b(0x240)](ConditionDefSchema),'description':z['string']()[a164_0x4e2c8b(0x1f4)]()}));export const SegmentDefSchema=z[a164_0x4e2c8b(0x22d)]({'type':z[a164_0x4e2c8b(0x229)](a164_0x4e2c8b(0x243))[a164_0x4e2c8b(0x1f4)](),'name':z[a164_0x4e2c8b(0x1f2)]()['min'](0x1,a164_0x4e2c8b(0x21e)),'description':z[a164_0x4e2c8b(0x1f2)]()[a164_0x4e2c8b(0x1f4)](),'folder':z['string']()[a164_0x4e2c8b(0x1f4)](),'rule':RuleDefSchema[a164_0x4e2c8b(0x1f4)](),'kind':z[a164_0x4e2c8b(0x20a)]([a164_0x4e2c8b(0x211),a164_0x4e2c8b(0x1fd),a164_0x4e2c8b(0x221)])[a164_0x4e2c8b(0x1f4)](),'visible':z[a164_0x4e2c8b(0x218)]()['optional'](),'activations':z[a164_0x4e2c8b(0x240)](z[a164_0x4e2c8b(0x1fb)]())[a164_0x4e2c8b(0x1f4)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x2704bd=a164_0x7637;(function(_0x4a4913,_0x42800b){const _0x1409d9=a164_0x7637,_0x1476cb=_0x4a4913();while(!![]){try{const _0x161ffd=-parseInt(_0x1409d9(0x1be))/0x1+-parseInt(_0x1409d9(0x1bf))/0x2+-parseInt(_0x1409d9(0x1ba))/0x3+-parseInt(_0x1409d9(0x1b4))/0x4+parseInt(_0x1409d9(0x1a0))/0x5*(-parseInt(_0x1409d9(0x18d))/0x6)+-parseInt(_0x1409d9(0x1cf))/0x7+parseInt(_0x1409d9(0x1b0))/0x8;if(_0x161ffd===_0x42800b)break;else _0x1476cb['push'](_0x1476cb['shift']());}catch(_0x2b1a8d){_0x1476cb['push'](_0x1476cb['shift']());}}}(a164_0x32ca,0x4fe32));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x1b9),a164_0x2704bd(0x1ae),a164_0x2704bd(0x1b1),'GreaterEqual',a164_0x2704bd(0x1c3),'In',a164_0x2704bd(0x194),a164_0x2704bd(0x1af),'IsNull','TimeWithinPast',a164_0x2704bd(0x1a8),a164_0x2704bd(0x19e),a164_0x2704bd(0x1c1),a164_0x2704bd(0x19c),a164_0x2704bd(0x1c5)]);export const TimeUnitSchema=z[a164_0x2704bd(0x190)](['second','minute',a164_0x2704bd(0x1cd),a164_0x2704bd(0x1ac),a164_0x2704bd(0x19d),a164_0x2704bd(0x19f),'year']);export const AggregationTypeSchema=z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x1d1),a164_0x2704bd(0x1aa),a164_0x2704bd(0x1b6),a164_0x2704bd(0x18b),'Max',a164_0x2704bd(0x195),'First',a164_0x2704bd(0x1ad)]);const TemporalValueSchema=z[a164_0x2704bd(0x1b7)]([z['object']({'timestamp':z['string']()}),z['object']({'last':z[a164_0x2704bd(0x1b7)]([z['number'](),z[a164_0x2704bd(0x1c8)](z[a164_0x2704bd(0x1b5)](),z[a164_0x2704bd(0x188)]())]),'unit':z[a164_0x2704bd(0x1b5)]()})]),OperatorValueSchema=z['union']([z[a164_0x2704bd(0x1b5)](),z[a164_0x2704bd(0x188)](),z[a164_0x2704bd(0x19a)](),TemporalValueSchema,z[a164_0x2704bd(0x1a6)](z[a164_0x2704bd(0x1b7)]([z[a164_0x2704bd(0x1b5)](),z[a164_0x2704bd(0x188)](),z[a164_0x2704bd(0x19a)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x2704bd(0x1b9),a164_0x2704bd(0x1ae),a164_0x2704bd(0x19b),a164_0x2704bd(0x1b1),'LessEqual','In',a164_0x2704bd(0x19e),a164_0x2704bd(0x1c1),a164_0x2704bd(0x19c),a164_0x2704bd(0x1af),'TimeWithinPast','TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x2704bd(0x1a5),a164_0x2704bd(0x1a8)]);export const OperatorDefSchema=z[a164_0x2704bd(0x18f)]({'type':OperatorTypeSchema,'not':z[a164_0x2704bd(0x19a)]()['optional'](),'value':OperatorValueSchema['optional'](),'min':z['union']([z[a164_0x2704bd(0x188)](),z[a164_0x2704bd(0x1b5)](),TemporalValueSchema])[a164_0x2704bd(0x1c6)](),'max':z[a164_0x2704bd(0x1b7)]([z['number'](),z[a164_0x2704bd(0x1b5)](),TemporalValueSchema])[a164_0x2704bd(0x1c6)](),'unit':TimeUnitSchema[a164_0x2704bd(0x1c6)](),'duration':z[a164_0x2704bd(0x18f)]({'day':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)](),'week':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)](),'month':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)](),'year':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)](),'hour':z['number']()[a164_0x2704bd(0x1c6)](),'minute':z['number']()[a164_0x2704bd(0x1c6)](),'second':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)]()})[a164_0x2704bd(0x1c6)](),'from':z[a164_0x2704bd(0x18f)]({'last':z['union']([z[a164_0x2704bd(0x188)](),z[a164_0x2704bd(0x1b5)]()]),'unit':TimeUnitSchema})[a164_0x2704bd(0x1c6)](),'reverse':z[a164_0x2704bd(0x19a)]()[a164_0x2704bd(0x1c6)]()})[a164_0x2704bd(0x1cb)]((_0x43ce59,_0x2a67fe)=>{const _0x14f012=a164_0x2704bd;OPERATORS_REQUIRING_VALUE[_0x14f012(0x1d3)](_0x43ce59[_0x14f012(0x1b2)])&&(_0x43ce59[_0x14f012(0x1a7)]===undefined||_0x43ce59[_0x14f012(0x1a7)]===null)&&_0x2a67fe['addIssue']({'code':_0x14f012(0x1ab),'message':_0x14f012(0x18c)+_0x43ce59['type']+'\x27\x20requires\x20a\x20value','path':['value']}),_0x43ce59[_0x14f012(0x1b2)]===_0x14f012(0x194)&&_0x43ce59['min']===undefined&&_0x43ce59[_0x14f012(0x1c2)]===undefined&&_0x2a67fe[_0x14f012(0x1cc)]({'code':'custom','message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x14f012(0x1a1)}}),OPERATORS_REQUIRING_UNIT[_0x14f012(0x1d3)](_0x43ce59['type'])&&_0x43ce59[_0x14f012(0x1a7)]!==undefined&&!_0x43ce59[_0x14f012(0x1c0)]&&_0x2a67fe[_0x14f012(0x1cc)]({'code':'custom','message':_0x14f012(0x18c)+_0x43ce59[_0x14f012(0x1b2)]+_0x14f012(0x1a3),'path':[_0x14f012(0x1c0)],'params':{'validationCode':_0x14f012(0x196)}}),_0x43ce59[_0x14f012(0x1b2)]===_0x14f012(0x1c5)&&(!_0x43ce59[_0x14f012(0x1a2)]&&_0x2a67fe['addIssue']({'code':_0x14f012(0x1ab),'message':_0x14f012(0x199),'path':['duration']}),!_0x43ce59[_0x14f012(0x1c9)]&&_0x2a67fe['addIssue']({'code':'custom','message':_0x14f012(0x1d2),'path':[_0x14f012(0x1c9)]}));});export const ArrayMatchingSchema=z[a164_0x2704bd(0x1b7)]([z[a164_0x2704bd(0x1ce)](a164_0x2704bd(0x189)),z[a164_0x2704bd(0x1ce)](a164_0x2704bd(0x1a9)),z['object']({'atLeast':z[a164_0x2704bd(0x188)]()}),z[a164_0x2704bd(0x18f)]({'atMost':z['number']()}),z[a164_0x2704bd(0x18f)]({'exactly':z[a164_0x2704bd(0x188)]()})]);export const AggregationDefSchema=z[a164_0x2704bd(0x18e)]('type',[z['object']({'type':z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x1aa),'Min',a164_0x2704bd(0x1b3),a164_0x2704bd(0x1b6)]),'column':z[a164_0x2704bd(0x1b5)](),'groupingColumns':z[a164_0x2704bd(0x1a6)](z[a164_0x2704bd(0x1b5)]())['optional']()}),z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x1ce)](a164_0x2704bd(0x1d1)),'groupingColumns':z[a164_0x2704bd(0x1a6)](z[a164_0x2704bd(0x1b5)]())[a164_0x2704bd(0x1c6)]()}),z[a164_0x2704bd(0x18f)]({'type':z['literal']('CountDistinct'),'columns':z[a164_0x2704bd(0x1a6)](z[a164_0x2704bd(0x1b5)]())}),z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x190)](['First',a164_0x2704bd(0x1ad)]),'column':z[a164_0x2704bd(0x1b5)](),'orderColumn':z[a164_0x2704bd(0x1b5)](),'groupingColumns':z[a164_0x2704bd(0x1a6)](z[a164_0x2704bd(0x1b5)]())['optional']()})]);export const TimeWindowDefSchema=z[a164_0x2704bd(0x18f)]({'duration':z[a164_0x2704bd(0x188)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x2704bd(0x1a5),'TimeWithinNext',a164_0x2704bd(0x1c5)]);function a164_0x32ca(){const _0x77752f=['276110lnOyAz','MISSING_BETWEEN_BOUNDS','duration','\x27\x20requires\x20a\x20time\x20unit','Segment\x20reference\x20must\x20not\x20be\x20empty','TimeWithinPast','array','value','TimeWithinNext','all','Sum','custom','day','Last','Greater','Regexp','15294512stvpUF','Less','type','Max','1810852ibaxoL','string','Average','union','Column','Equal','670752UqVzQR','operator','exclude','lazy','205073HGAEPf','403812tzUpzE','unit','StartWith','max','LessEqual','include','TimeRange','optional','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','record','from','timestamp','superRefine','addIssue','hour','literal','803362DpgZUQ','Segment\x20name\x20is\x20required','Count','TimeRange\x20operator\x20requires\x20\x27from\x27','has','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','number','any','Behavior','Min','Operator\x20\x27','42zEYXVR','discriminatedUnion','object','enum','And','min','funnel_stage','Between','CountDistinct','MISSING_TIME_UNIT','realtime','batch','TimeRange\x20operator\x20requires\x20\x27duration\x27','boolean','GreaterEqual','EndWith','week','Contain','month'];a164_0x32ca=function(){return _0x77752f;};return a164_0x32ca();}export const FilterColumnConditionDefSchema=z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x1ce)](a164_0x2704bd(0x1b8)),'column':z[a164_0x2704bd(0x1b5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x2704bd(0x1c6)]()})[a164_0x2704bd(0x1cb)]((_0x163972,_0x235782)=>{const _0x3e9ad5=a164_0x2704bd,_0xb2d87c=_0x163972[_0x3e9ad5(0x1bb)][_0x3e9ad5(0x1b2)];_0x163972['column']===_0x3e9ad5(0x1ca)?!TIMESTAMP_OPERATORS[_0x3e9ad5(0x1d3)](_0xb2d87c)&&_0x235782[_0x3e9ad5(0x1cc)]({'code':_0x3e9ad5(0x1ab),'message':_0x3e9ad5(0x187)+_0xb2d87c+'\x27)','path':['operator',_0x3e9ad5(0x1b2)]}):TIMESTAMP_OPERATORS['has'](_0xb2d87c)&&_0x235782[_0x3e9ad5(0x1cc)]({'code':_0x3e9ad5(0x1ab),'message':_0x3e9ad5(0x18c)+_0xb2d87c+_0x3e9ad5(0x1c7),'path':['operator',_0x3e9ad5(0x1b2)]});});export const FilterRuleDefSchema=z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x1ce)](a164_0x2704bd(0x191)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x2704bd(0x1bd)](()=>z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x1ce)]('Value'),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x2704bd(0x1c6)](),'exclude':z[a164_0x2704bd(0x19a)]()[a164_0x2704bd(0x1c6)](),'aggregation':AggregationDefSchema[a164_0x2704bd(0x1c6)](),'source':z[a164_0x2704bd(0x1b5)]()[a164_0x2704bd(0x1c6)](),'filter':FilterRuleDefSchema[a164_0x2704bd(0x1c6)](),'limit':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)]()}));function a164_0x7637(_0x4328b3,_0x4dfd10){_0x4328b3=_0x4328b3-0x187;const _0x32ca32=a164_0x32ca();let _0x7637d=_0x32ca32[_0x4328b3];return _0x7637d;}export const BehaviorConditionDefSchema=z[a164_0x2704bd(0x1bd)](()=>z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x1ce)](a164_0x2704bd(0x18a)),'attribute':z[a164_0x2704bd(0x1b5)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x2704bd(0x19a)]()[a164_0x2704bd(0x1c6)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x2704bd(0x1b5)]()[a164_0x2704bd(0x1c6)](),'filter':FilterRuleDefSchema[a164_0x2704bd(0x1c6)](),'timeWindow':TimeWindowDefSchema[a164_0x2704bd(0x1c6)](),'limit':z[a164_0x2704bd(0x188)]()[a164_0x2704bd(0x1c6)]()}));export const ColumnConditionDefSchema=z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x1ce)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x2704bd(0x1bd)](()=>z['object']({'type':z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x191),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x2704bd(0x1b5)]()['optional']()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x1c4),a164_0x2704bd(0x1bc)]),'segment':z[a164_0x2704bd(0x1b5)]()['min'](0x1,a164_0x2704bd(0x1a4))});export const ConditionDefSchema=z[a164_0x2704bd(0x1bd)](()=>z[a164_0x2704bd(0x1b7)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x2704bd(0x1bd)](()=>z[a164_0x2704bd(0x18f)]({'type':z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x191),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentDefSchema=z['object']({'type':z['literal']('segment')['optional'](),'name':z[a164_0x2704bd(0x1b5)]()[a164_0x2704bd(0x192)](0x1,a164_0x2704bd(0x1d0)),'description':z[a164_0x2704bd(0x1b5)]()[a164_0x2704bd(0x1c6)](),'folder':z[a164_0x2704bd(0x1b5)]()[a164_0x2704bd(0x1c6)](),'rule':RuleDefSchema[a164_0x2704bd(0x1c6)](),'kind':z[a164_0x2704bd(0x190)]([a164_0x2704bd(0x198),a164_0x2704bd(0x197),a164_0x2704bd(0x193)])[a164_0x2704bd(0x1c6)](),'visible':z['boolean']()[a164_0x2704bd(0x1c6)](),'activations':z[a164_0x2704bd(0x1a6)](z['any']())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x9d6ef0=a165_0x376c;(function(_0x44311b,_0x581041){const _0x2e4b16=a165_0x376c,_0x2785c8=_0x44311b();while(!![]){try{const _0x1bcaa7=parseInt(_0x2e4b16(0x1e0))/0x1*(parseInt(_0x2e4b16(0x1e7))/0x2)+-parseInt(_0x2e4b16(0x1e1))/0x3*(parseInt(_0x2e4b16(0x1ef))/0x4)+parseInt(_0x2e4b16(0x1d6))/0x5*(-parseInt(_0x2e4b16(0x1e4))/0x6)+parseInt(_0x2e4b16(0x1d9))/0x7+-parseInt(_0x2e4b16(0x1df))/0x8*(-parseInt(_0x2e4b16(0x1e2))/0x9)+parseInt(_0x2e4b16(0x1dc))/0xa*(-parseInt(_0x2e4b16(0x1f4))/0xb)+parseInt(_0x2e4b16(0x1db))/0xc;if(_0x1bcaa7===_0x581041)break;else _0x2785c8['push'](_0x2785c8['shift']());}catch(_0x7367c2){_0x2785c8['push'](_0x2785c8['shift']());}}}(a165_0x1832,0xe646d));import{readFileSync}from'fs';import*as a165_0x43da22 from'path';function a165_0x376c(_0x38de6d,_0x4f17f8){_0x38de6d=_0x38de6d-0x1d6;const _0x18327a=a165_0x1832();let _0x376ce0=_0x18327a[_0x38de6d];return _0x376ce0;}import*as a165_0x3bec7f from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x9d6ef0(0x1e6),a165_0x9d6ef0(0x1d8)]);export function isJourneyDef(_0x19a68b){const _0x18317d=a165_0x9d6ef0;return typeof _0x19a68b===_0x18317d(0x1f0)&&_0x19a68b!==null&&_0x18317d(0x1e9)in _0x19a68b&&_0x19a68b['type']===_0x18317d(0x1e8);}export function isCampaignDef(_0x2e1df0){const _0x2f3f13=a165_0x9d6ef0;if(typeof _0x2e1df0!==_0x2f3f13(0x1f0)||_0x2e1df0===null)return![];const _0x3bdc0e=_0x2e1df0,_0x22418b=VALID_CAMPAIGN_TYPES[_0x2f3f13(0x1e3)](_0x3bdc0e[_0x2f3f13(0x1ec)]);if(_0x3bdc0e[_0x2f3f13(0x1e9)]===_0x2f3f13(0x1f7)&&_0x22418b)return!![];if(_0x22418b&&!_0x3bdc0e[_0x2f3f13(0x1e9)])return!![];return![];}export function isTemplateDef(_0x5b05ae){const _0x3262d4=a165_0x9d6ef0;return typeof _0x5b05ae===_0x3262d4(0x1f0)&&_0x5b05ae!==null&&_0x3262d4(0x1e9)in _0x5b05ae&&_0x5b05ae[_0x3262d4(0x1e9)]===_0x3262d4(0x1ea);}export function isValidationResult(_0x2f7e58){const _0x41aee4=a165_0x9d6ef0;return!(_0x41aee4(0x1f6)in _0x2f7e58);}export function createParseErrorResult(_0x3c922b,_0x3711d7,_0x475c2c,_0x30fd3b,_0x424833=a165_0x9d6ef0(0x1f2)){const _0x20985d=a165_0x9d6ef0;return{'filePath':_0x3c922b,'relativePath':_0x3711d7,'source':_0x475c2c,'result':{'valid':![],'errors':[{'level':_0x20985d(0x1f5),'path':'','code':_0x20985d(0x1de),'message':_0x30fd3b}],'warnings':[]},'fileType':_0x424833};}export function validateYamlFile(_0x501f56,_0x37dec2,_0x17ff3e={}){const _0x5dd3f3=a165_0x9d6ef0,_0xc1dd53=a165_0x43da22[_0x5dd3f3(0x1f8)](_0x37dec2,_0x501f56)||a165_0x43da22['basename'](_0x501f56);try{const _0x498d68=readFileSync(_0x501f56,'utf-8'),_0x7f41e3=a165_0x3bec7f[_0x5dd3f3(0x1e5)](_0x498d68),_0x5a5ba4=_0x7f41e3['toJSON']();if(!_0x5a5ba4)return createParseErrorResult(_0x501f56,_0xc1dd53,_0x498d68,_0x5dd3f3(0x1eb));let _0x5da454;if(isJourneyDef(_0x5a5ba4))_0x5da454=_0x5dd3f3(0x1e8);else{if(isCampaignDef(_0x5a5ba4))_0x5da454=_0x5dd3f3(0x1f7);else isTemplateDef(_0x5a5ba4)?_0x5da454='template':_0x5da454=_0x5dd3f3(0x1f2);}if(_0x17ff3e[_0x5dd3f3(0x1da)]&&_0x5da454!==_0x17ff3e[_0x5dd3f3(0x1da)])return{'filePath':_0x501f56,'relativePath':_0xc1dd53,'skipped':!![],'reason':'not\x20a\x20'+_0x17ff3e[_0x5dd3f3(0x1da)]};const _0x4fa4ec={'source':_0x498d68,'document':_0x7f41e3};let _0x3c795a;if(_0x5da454===_0x5dd3f3(0x1e8))_0x3c795a=validateJourneyDef(_0x5a5ba4,_0x4fa4ec);else{if(_0x5da454===_0x5dd3f3(0x1f7))_0x3c795a=validateCampaignDef(_0x5a5ba4,_0x4fa4ec);else _0x5da454===_0x5dd3f3(0x1ea)?_0x3c795a=validateTemplateDef(_0x5a5ba4,_0x4fa4ec):_0x3c795a=validateSegmentDef(_0x5a5ba4,_0x4fa4ec);}return{'filePath':_0x501f56,'relativePath':_0xc1dd53,'source':_0x498d68,'result':_0x3c795a,'fileType':_0x5da454};}catch(_0xdeadf5){const _0x110b5b=_0xdeadf5 instanceof Error?_0xdeadf5['message']:String(_0xdeadf5);return createParseErrorResult(_0x501f56,_0xc1dd53,'',_0x5dd3f3(0x1dd)+_0x110b5b);}}function a165_0x1832(){const _0x257009=['type','template','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','campaign_type','length','map','7417896ntmGZD','object','valid','segment','result','11tLnlWi','error','skipped','campaign','relative','15YTUAbS','warnings','push','5197997QdUArL','filterType','21523824qoOCnw','960170pcWbfV','YAML\x20parse\x20error:\x20','YAML_PARSE_ERROR','8DQkVKv','1dNZPPQ','3aomTuh','6954327cODGOb','has','2119686evcToa','parseDocument','email','1289242BIFMZs','journey'];a165_0x1832=function(){return _0x257009;};return a165_0x1832();}export function validateYamlFiles(_0x5dba5d,_0x38c8e6,_0x4d5a40={}){const _0x8ef138=a165_0x9d6ef0;return _0x5dba5d[_0x8ef138(0x1ee)](_0x5124dc=>validateYamlFile(_0x5124dc,_0x38c8e6,_0x4d5a40));}export function calculateSummary(_0x1d85dc){const _0x200a9a=a165_0x9d6ef0;let _0x487465=0x0,_0x1e63e4=0x0,_0x3486b0=0x0,_0x40d6e7=0x0;for(const _0x267792 of _0x1d85dc){if(!isValidationResult(_0x267792)){_0x40d6e7++;continue;}_0x267792[_0x200a9a(0x1f3)][_0x200a9a(0x1f1)]?_0x487465++:_0x1e63e4++,_0x3486b0+=_0x267792[_0x200a9a(0x1f3)][_0x200a9a(0x1d7)][_0x200a9a(0x1ed)];}return{'validCount':_0x487465,'invalidCount':_0x1e63e4,'warningCount':_0x3486b0,'skippedCount':_0x40d6e7,'hasErrors':_0x1e63e4>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a166_0x48fb(_0x3d8121,_0x51f643){_0x3d8121=_0x3d8121-0x15e;const _0x15506a=a166_0x1550();let _0x48fb57=_0x15506a[_0x3d8121];return _0x48fb57;}(function(_0x460862,_0x2b3056){const _0x422fc9=a166_0x48fb,_0x4d31ad=_0x460862();while(!![]){try{const _0xbd81a2=-parseInt(_0x422fc9(0x160))/0x1+-parseInt(_0x422fc9(0x17f))/0x2+-parseInt(_0x422fc9(0x18a))/0x3*(parseInt(_0x422fc9(0x184))/0x4)+parseInt(_0x422fc9(0x187))/0x5+-parseInt(_0x422fc9(0x18c))/0x6*(-parseInt(_0x422fc9(0x186))/0x7)+-parseInt(_0x422fc9(0x189))/0x8*(parseInt(_0x422fc9(0x169))/0x9)+parseInt(_0x422fc9(0x190))/0xa;if(_0xbd81a2===_0x2b3056)break;else _0x4d31ad['push'](_0x4d31ad['shift']());}catch(_0x547962){_0x4d31ad['push'](_0x4d31ad['shift']());}}}(a166_0x1550,0x20be9));import*as a166_0x472887 from'yaml';function a166_0x1550(){const _0x4a3d88=['cyan','location','\x27:\x20','toString','push','success','492516SrmOQt','object','getIn','yellow','column','16VHxovY','YAML\x20validation\x20error:\x20','2681NLwksN','158705hcouLu','invalid_union','394616FQDHWP','25836IXtXhP','parse','132KAjjUH','min','red','match','5458140IXILbV','data','padStart','72500ZPMCcu','code','issues','\x20|\x20','length','warnings','message','path','dim','18JWJqfk','YAML\x20validation\x20error\x20at\x20\x27','number','map','max','line','Invalid\x20YAML:\x20expected\x20an\x20object','error','split','repeat','range','level','contents','errors','pop','join'];a166_0x1550=function(){return _0x4a3d88;};return a166_0x1550();}import a166_0x48295f from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x4137f2,_0x225aaf,_0x4358da){const _0x4c535b=a166_0x48fb;if(!_0x4137f2||!_0x225aaf)return undefined;try{let _0x55d90b=_0x4137f2[_0x4c535b(0x181)](_0x4358da,!![]),_0x28a948=[..._0x4358da];while((!_0x55d90b||typeof _0x55d90b!==_0x4c535b(0x180)||!(_0x4c535b(0x173)in _0x55d90b)||!_0x55d90b['range'])&&_0x28a948['length']>0x0){_0x28a948[_0x4c535b(0x177)](),_0x55d90b=_0x28a948[_0x4c535b(0x164)]>0x0?_0x4137f2[_0x4c535b(0x181)](_0x28a948,!![]):_0x4137f2[_0x4c535b(0x175)];}if(!_0x55d90b||typeof _0x55d90b!=='object'||!(_0x4c535b(0x173)in _0x55d90b)||!_0x55d90b[_0x4c535b(0x173)])return undefined;const [_0x3478b1]=_0x55d90b[_0x4c535b(0x173)];return offsetToLocation(_0x225aaf,_0x3478b1);}catch{return undefined;}}export function offsetToLocation(_0x1840be,_0x1d1f04){const _0x4b4e85=a166_0x48fb;let _0xff495a=0x1,_0x3da65e=0x1;for(let _0x433f01=0x0;_0x433f01<_0x1d1f04&&_0x433f01<_0x1840be[_0x4b4e85(0x164)];_0x433f01++){_0x1840be[_0x433f01]==='\x0a'?(_0xff495a++,_0x3da65e=0x1):_0x3da65e++;}return{'line':_0xff495a,'column':_0x3da65e,'offset':_0x1d1f04};}export function pathToArray(_0x2acb93){const _0x4e82b4=a166_0x48fb;if(!_0x2acb93)return[];return _0x2acb93[_0x4e82b4(0x171)]('.')['flatMap'](_0x517272=>{const _0x55c535=_0x4e82b4,_0x3bca61=_0x517272[_0x55c535(0x18f)](/^(\w+)\[(\d+)\]$/);if(_0x3bca61)return[_0x3bca61[0x1],parseInt(_0x3bca61[0x2],0xa)];return[_0x517272];});}export function formatZodPath(_0x54bf56){const _0x150768=a166_0x48fb;let _0x3da8ba='';for(const _0x5c9dd1 of _0x54bf56){if(typeof _0x5c9dd1===_0x150768(0x16b))_0x3da8ba+='['+_0x5c9dd1+']';else{const _0x3e5546=String(_0x5c9dd1);_0x3da8ba+=_0x3da8ba?'.'+_0x3e5546:_0x3e5546;}}return _0x3da8ba;}export function flattenZodIssues(_0x37ee2b){const _0x184837=a166_0x48fb,_0x5d7a81=[];for(const _0x2ccf99 of _0x37ee2b){if(_0x2ccf99['code']===_0x184837(0x188)&&'errors'in _0x2ccf99){const _0x3e8dfb=_0x2ccf99[_0x184837(0x176)];let _0x14438c=_0x3e8dfb[0x0]||[];for(const _0x510144 of _0x3e8dfb){_0x510144[_0x184837(0x164)]<_0x14438c[_0x184837(0x164)]&&(_0x14438c=_0x510144);}const _0x435a75=_0x14438c[_0x184837(0x16c)](_0x3174c6=>({..._0x3174c6,'path':[..._0x2ccf99[_0x184837(0x167)],..._0x3174c6[_0x184837(0x167)]]}));_0x5d7a81[_0x184837(0x17d)](...flattenZodIssues(_0x435a75));}else _0x5d7a81['push'](_0x2ccf99);}return _0x5d7a81;}export function safeParseYaml(_0x5ca179,_0x45f81a){const _0x2e195d=a166_0x48fb,_0x3b731f=a166_0x472887[_0x2e195d(0x18b)](_0x5ca179);if(!_0x3b731f||typeof _0x3b731f!=='object')throw new Error(_0x2e195d(0x16f));const _0x118e7e=_0x45f81a['safeParse'](_0x3b731f);if(!_0x118e7e[_0x2e195d(0x17e)]){const _0x4c6719=_0x118e7e[_0x2e195d(0x170)][_0x2e195d(0x162)][0x0],_0x39311d=formatZodPath(_0x4c6719[_0x2e195d(0x167)]);throw new Error(_0x39311d?_0x2e195d(0x16a)+_0x39311d+_0x2e195d(0x17b)+_0x4c6719[_0x2e195d(0x166)]:_0x2e195d(0x185)+_0x4c6719['message']);}return _0x118e7e[_0x2e195d(0x15e)];}export function formatIssueWithContext(_0x5c3ccc,_0x3ecf30,_0x3ccad0){const _0x22f09e=a166_0x48fb,_0x5bb643=[],_0x21bf02=_0x5c3ccc[_0x22f09e(0x174)]===_0x22f09e(0x170),_0x28bc9c=_0x21bf02?a166_0x48295f[_0x22f09e(0x18e)]:a166_0x48295f[_0x22f09e(0x182)],_0x4b7b33=_0x21bf02?a166_0x48295f['red']:a166_0x48295f['yellow'],_0x144095=_0x3ccad0?a166_0x48295f[_0x22f09e(0x179)](_0x3ccad0+':'):'';if(_0x5c3ccc[_0x22f09e(0x17a)]){const _0x96646a=a166_0x48295f[_0x22f09e(0x179)](_0x5c3ccc[_0x22f09e(0x17a)][_0x22f09e(0x16e)]+':'+_0x5c3ccc['location'][_0x22f09e(0x183)]);_0x5bb643[_0x22f09e(0x17d)](''+_0x144095+_0x96646a+':\x20'+_0x28bc9c(_0x5c3ccc[_0x22f09e(0x174)])+'\x20'+_0x4b7b33('['+_0x5c3ccc[_0x22f09e(0x161)]+']'));}else _0x5bb643[_0x22f09e(0x17d)](''+_0x144095+a166_0x48295f[_0x22f09e(0x168)](_0x5c3ccc[_0x22f09e(0x167)])+':\x20'+_0x28bc9c(_0x5c3ccc[_0x22f09e(0x174)])+'\x20'+_0x4b7b33('['+_0x5c3ccc[_0x22f09e(0x161)]+']'));_0x5bb643[_0x22f09e(0x17d)](_0x5c3ccc[_0x22f09e(0x166)]);if(_0x5c3ccc[_0x22f09e(0x17a)]&&_0x3ecf30){const _0x50d794=_0x3ecf30['split']('\x0a'),{line:_0x2afea5,column:_0x1e5445}=_0x5c3ccc[_0x22f09e(0x17a)],_0x53349d=Math[_0x22f09e(0x16d)](0x1,_0x2afea5-0x1),_0xabe38c=Math[_0x22f09e(0x18d)](_0x50d794[_0x22f09e(0x164)],_0x2afea5+0x1);_0x5bb643[_0x22f09e(0x17d)]('');for(let _0x3d3479=_0x53349d;_0x3d3479<=_0xabe38c;_0x3d3479++){const _0x2e3497=_0x50d794[_0x3d3479-0x1]||'',_0x31bed2=a166_0x48295f[_0x22f09e(0x168)](_0x3d3479[_0x22f09e(0x17c)]()[_0x22f09e(0x15f)](0x4)),_0x868292=a166_0x48295f[_0x22f09e(0x168)](_0x22f09e(0x163));if(_0x3d3479===_0x2afea5){_0x5bb643[_0x22f09e(0x17d)]('\x20\x20'+_0x31bed2+_0x868292+_0x28bc9c(_0x2e3497));const _0x271985='\x20'[_0x22f09e(0x172)](0x4+0x3+_0x1e5445-0x1);_0x5bb643['push']('\x20\x20'+_0x271985+_0x28bc9c('^'));}else _0x5bb643[_0x22f09e(0x17d)]('\x20\x20'+_0x31bed2+_0x868292+a166_0x48295f[_0x22f09e(0x168)](_0x2e3497));}}return _0x5bb643[_0x22f09e(0x178)]('\x0a');}export function formatValidationResult(_0x3b7b1a,_0x30dbd6,_0x26586e){const _0x5192e2=a166_0x48fb,_0x28d584=[];for(const _0x5e378d of _0x3b7b1a[_0x5192e2(0x176)]){_0x28d584[_0x5192e2(0x17d)](formatIssueWithContext(_0x5e378d,_0x30dbd6,_0x26586e)),_0x28d584[_0x5192e2(0x17d)]('');}for(const _0x1eae31 of _0x3b7b1a[_0x5192e2(0x165)]){_0x28d584[_0x5192e2(0x17d)](formatIssueWithContext(_0x1eae31,_0x30dbd6,_0x26586e)),_0x28d584[_0x5192e2(0x17d)]('');}return _0x28d584[_0x5192e2(0x178)]('\x0a');}
|