@treasuredata/tdx 2026.3.31 → 2026.3.33
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.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +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.js +1 -1
- package/dist/commands/auth-login-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.d.ts +34 -0
- package/dist/commands/work-command.d.ts.map +1 -0
- package/dist/commands/work-command.js +1 -0
- package/dist/commands/work-command.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/project-config.js.map +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/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.d.ts +1 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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.d.ts +2 -0
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +169 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -0
- package/dist/sdk/types/workspace.js +1 -0
- package/dist/sdk/types/workspace.js.map +1 -0
- 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/frontmatter.d.ts +28 -0
- package/dist/sdk/workspace/frontmatter.d.ts.map +1 -0
- package/dist/sdk/workspace/frontmatter.js +1 -0
- package/dist/sdk/workspace/frontmatter.js.map +1 -0
- package/dist/sdk/workspace/git.d.ts +70 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -0
- package/dist/sdk/workspace/git.js +1 -0
- package/dist/sdk/workspace/git.js.map +1 -0
- package/dist/sdk/workspace/index.d.ts +166 -0
- package/dist/sdk/workspace/index.d.ts.map +1 -0
- package/dist/sdk/workspace/index.js +1 -0
- package/dist/sdk/workspace/index.js.map +1 -0
- package/dist/sdk/workspace/templates.d.ts +17 -0
- package/dist/sdk/workspace/templates.d.ts.map +1 -0
- package/dist/sdk/workspace/templates.js +1 -0
- package/dist/sdk/workspace/templates.js.map +1 -0
- package/dist/sdk/workspace/weekly.d.ts +49 -0
- package/dist/sdk/workspace/weekly.d.ts.map +1 -0
- package/dist/sdk/workspace/weekly.js +1 -0
- package/dist/sdk/workspace/weekly.js.map +1 -0
- package/dist/sdk/workspace/wikilinks.d.ts +49 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -0
- package/dist/sdk/workspace/wikilinks.js +1 -0
- package/dist/sdk/workspace/wikilinks.js.map +1 -0
- 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(_0x1252d3,_0x970ce8){const _0xe75c79=a157_0x2d77,_0x30942d=_0x1252d3();while(!![]){try{const _0x15b7a6=parseInt(_0xe75c79(0x161))/0x1*(parseInt(_0xe75c79(0x147))/0x2)+-parseInt(_0xe75c79(0x15f))/0x3*(-parseInt(_0xe75c79(0x16b))/0x4)+parseInt(_0xe75c79(0x166))/0x5*(-parseInt(_0xe75c79(0x153))/0x6)+parseInt(_0xe75c79(0x158))/0x7+-parseInt(_0xe75c79(0x171))/0x8*(parseInt(_0xe75c79(0x160))/0x9)+-parseInt(_0xe75c79(0x14a))/0xa*(parseInt(_0xe75c79(0x16a))/0xb)+parseInt(_0xe75c79(0x13d))/0xc;if(_0x15b7a6===_0x970ce8)break;else _0x30942d['push'](_0x30942d['shift']());}catch(_0x501c2d){_0x30942d['push'](_0x30942d['shift']());}}}(a157_0x1f7e,0xdb51d));import a157_0x2817d5 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(_0x2ef656){const _0xe20917=a157_0x2d77;return _0x2ef656[_0xe20917(0x141)]!==_0xe20917(0x15c);}export function isScopedResolution(_0x5ea4c2){const _0xedc4f6=a157_0x2d77;return _0x5ea4c2[_0xedc4f6(0x141)]===_0xedc4f6(0x152)||_0x5ea4c2[_0xedc4f6(0x141)]==='file'||_0x5ea4c2[_0xedc4f6(0x141)]===_0xedc4f6(0x13e);}export function getScopedDetails(_0x530b40){const _0x54f049=a157_0x2d77;if(isScopedResolution(_0x530b40))return{'isScoped':_0x530b40[_0x54f049(0x165)],'scopedFolderPath':_0x530b40[_0x54f049(0x15b)]};return undefined;}function a157_0x1f7e(){const _0x3815b4=['relative','parent_segment','match','directory','42ZLdTyt','startsWith','parentSegment','No\x20tdx.json\x20found','journey','344197jpcndj','folderPath','cwd','scopedFolderPath','error','Parent\x20segment\x20not\x20specified','segment','85017QnBuCN','5514147VJlyBe','148iWdUSH','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','join','resolve','isScoped','1109315BStqac','segmentName','parent_name','configDir','1641409xEelsP','176sJsCiF','no_config','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','replace','trim','root','16sGaozW','extname','44308752kgGvnJ','context','dirname','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','type','isDirectory','readFile','resourceType','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','isFile','422NTFEHO','Not\x20a\x20YAML\x20file:\x20','parse','90cIzAiM','invalid_yaml','file','No\x20tdx.json\x20found\x20for\x20file:\x20','exists'];a157_0x1f7e=function(){return _0x3815b4;};return a157_0x1f7e();}function a157_0x2d77(_0x1c235c,_0x5e266e){_0x1c235c=_0x1c235c-0x13c;const _0x1f7e22=a157_0x1f7e();let _0x2d7795=_0x1f7e22[_0x1c235c];return _0x2d7795;}async function findTdxConfigAsync(_0x33a127,_0x1110f){const _0x562650=a157_0x2d77;let _0x35342a=a157_0x2817d5[_0x562650(0x164)](_0x33a127);const _0x2c2124=a157_0x2817d5[_0x562650(0x149)](_0x35342a)[_0x562650(0x170)];while(_0x35342a!==_0x2c2124){const _0x1a89c9=a157_0x2817d5[_0x562650(0x163)](_0x35342a,'tdx.json');if(await _0x1110f[_0x562650(0x14e)](_0x1a89c9))try{const _0x4f7839=await _0x1110f[_0x562650(0x143)](_0x1a89c9),_0x1656ab=JSON['parse'](_0x4f7839);if(_0x1656ab['parent_segment']&&typeof _0x1656ab['parent_segment']==='string')return{'configPath':_0x1a89c9,'configDir':_0x35342a,'parentSegment':_0x1656ab[_0x562650(0x150)]};}catch{}_0x35342a=a157_0x2817d5[_0x562650(0x13f)](_0x35342a);}return null;}function calculateScopedPath(_0x960c47,_0x2faccd){const _0x1271b0=a157_0x2d77,_0x5173de=a157_0x2817d5[_0x1271b0(0x14f)](_0x2faccd,_0x960c47),_0x4c885a=_0x5173de!==''&&_0x5173de!=='.'&&!_0x5173de[_0x1271b0(0x154)]('..');return{'isScoped':_0x4c885a,'scopedFolderPath':_0x4c885a?_0x5173de[_0x1271b0(0x16e)](/\\/g,'/'):''};}export async function resolveTarget(_0x1c34bd){const _0x6834eb=a157_0x2d77,{arg:_0x52adf9,contextParent:_0x4a9930,cwd:cwd=process[_0x6834eb(0x15a)](),fs:fs=nodeFileSystem}=_0x1c34bd;if(_0x52adf9&&isYamlFilePath(_0x52adf9))try{const _0xb1544f=await resolveYamlFilePath(_0x52adf9,fs),_0xc111b7=a157_0x2817d5[_0x6834eb(0x164)](_0x52adf9),_0x4d2905=a157_0x2817d5['dirname'](_0xc111b7),_0x101787=await findTdxConfigAsync(_0x4d2905,fs);if(!_0x101787){if(_0x4a9930){const _0x731027=a157_0x2817d5[_0x6834eb(0x13f)](_0xc111b7);return{'type':_0x6834eb(0x14c),'parentName':_0x4a9930,'targetDir':_0x731027,'configRoot':_0x731027,'filePath':_0xc111b7,'resourceName':_0xb1544f[_0x6834eb(0x167)],'folderPath':_0xb1544f[_0x6834eb(0x159)],'resourceType':_0xb1544f[_0x6834eb(0x144)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x6834eb(0x15c),'errorCode':_0x6834eb(0x16c),'message':_0x6834eb(0x14d)+_0x52adf9,'arg':_0x52adf9,'helpText':_0x6834eb(0x16d)};}const _0x2b4b27=calculateScopedPath(_0x4d2905,_0x101787[_0x6834eb(0x169)]);return{'type':_0x6834eb(0x14c),'parentName':_0x101787['parentSegment'],'targetDir':_0x101787[_0x6834eb(0x169)],'configRoot':_0x101787[_0x6834eb(0x169)],'filePath':_0xc111b7,'resourceName':_0xb1544f[_0x6834eb(0x167)],'folderPath':_0xb1544f[_0x6834eb(0x159)],'resourceType':_0xb1544f[_0x6834eb(0x144)],'isScoped':_0x2b4b27[_0x6834eb(0x165)],'scopedFolderPath':_0x2b4b27['scopedFolderPath']};}catch(_0x597fb8){const _0xbcf579=_0x597fb8 instanceof Error?_0x597fb8['message']:String(_0x597fb8);if(_0xbcf579['includes']('File\x20not\x20found'))return{'type':'error','errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x52adf9,'arg':_0x52adf9};if(_0xbcf579['includes'](_0x6834eb(0x156))){if(_0x4a9930){const _0x200e8f=a157_0x2817d5[_0x6834eb(0x164)](_0x52adf9);if(await fs[_0x6834eb(0x14e)](_0x200e8f)){const _0x1f2d95=a157_0x2817d5[_0x6834eb(0x13f)](_0x200e8f),_0x50172b=await fs[_0x6834eb(0x143)](_0x200e8f),_0x13d774=_0x50172b['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x7c4728=_0x50172b[_0x6834eb(0x151)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4da92d=_0x13d774?_0x13d774[0x1]['trim']():a157_0x2817d5['basename'](_0x52adf9,a157_0x2817d5[_0x6834eb(0x13c)](_0x52adf9)),_0x2dbf45=_0x7c4728&&_0x7c4728[0x1][_0x6834eb(0x16f)]()===_0x6834eb(0x157)?_0x6834eb(0x157):_0x6834eb(0x15e);return{'type':_0x6834eb(0x14c),'parentName':_0x4a9930,'targetDir':_0x1f2d95,'configRoot':_0x1f2d95,'filePath':_0x200e8f,'resourceName':_0x4da92d,'folderPath':'','resourceType':_0x2dbf45,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x6834eb(0x16c),'message':_0x6834eb(0x14d)+_0x52adf9,'arg':_0x52adf9,'helpText':_0x6834eb(0x16d)};}return{'type':_0x6834eb(0x15c),'errorCode':'invalid_yaml','message':_0xbcf579,'arg':_0x52adf9};}if(_0x52adf9){const _0x1ac775=a157_0x2817d5[_0x6834eb(0x164)](cwd,_0x52adf9);let _0x31fbad=null;try{_0x31fbad=await fs['stat'](_0x1ac775);}catch{}if(_0x31fbad?.[_0x6834eb(0x142)]()){const _0x2f79d6=await findTdxConfigAsync(_0x1ac775,fs);if(_0x2f79d6){const _0x2c5db6=calculateScopedPath(_0x1ac775,_0x2f79d6[_0x6834eb(0x169)]);return{'type':_0x6834eb(0x152),'parentName':_0x2f79d6[_0x6834eb(0x155)],'targetDir':_0x1ac775,'configRoot':_0x2f79d6['configDir'],'isScoped':_0x2c5db6[_0x6834eb(0x165)],'scopedFolderPath':_0x2c5db6[_0x6834eb(0x15b)]};}if(_0x4a9930)return{'type':'directory','parentName':_0x4a9930,'targetDir':_0x1ac775,'configRoot':_0x1ac775,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x6834eb(0x140)+_0x52adf9,'arg':_0x52adf9,'helpText':_0x6834eb(0x16d)};}if(_0x31fbad?.[_0x6834eb(0x146)]())return{'type':_0x6834eb(0x15c),'errorCode':_0x6834eb(0x14b),'message':_0x6834eb(0x148)+_0x52adf9,'arg':_0x52adf9,'helpText':_0x6834eb(0x162)};const _0x40d0f8=sanitizeFileName(_0x52adf9),_0x1901b7=getSegmentRootDir(_0x40d0f8,cwd);return{'type':_0x6834eb(0x168),'parentName':_0x52adf9,'targetDir':_0x1901b7,'configRoot':_0x1901b7};}const _0x12b824=await findTdxConfigAsync(cwd,fs);if(_0x12b824){const _0xe858eb=calculateScopedPath(cwd,_0x12b824[_0x6834eb(0x169)]);return{'type':_0x6834eb(0x13e),'parentName':_0x12b824[_0x6834eb(0x155)],'targetDir':cwd,'configRoot':_0x12b824['configDir'],'isScoped':_0xe858eb[_0x6834eb(0x165)],'scopedFolderPath':_0xe858eb['scopedFolderPath']};}if(_0x4a9930){const _0x2d43d0=sanitizeFileName(_0x4a9930),_0x65f1a8=getSegmentRootDir(_0x2d43d0,cwd);return{'type':_0x6834eb(0x13e),'parentName':_0x4a9930,'targetDir':_0x65f1a8,'configRoot':_0x65f1a8,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':_0x6834eb(0x15d),'helpText':_0x6834eb(0x145)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x91c090=a158_0x58c0;function a158_0x58c0(_0x5008fa,_0x381ddd){_0x5008fa=_0x5008fa-0x199;const _0x279337=a158_0x2793();let _0x58c0f5=_0x279337[_0x5008fa];return _0x58c0f5;}(function(_0x21159f,_0x3fd321){const _0x14251b=a158_0x58c0,_0x423234=_0x21159f();while(!![]){try{const _0x376ae6=-parseInt(_0x14251b(0x1b1))/0x1*(-parseInt(_0x14251b(0x1b4))/0x2)+-parseInt(_0x14251b(0x1b0))/0x3*(-parseInt(_0x14251b(0x19f))/0x4)+-parseInt(_0x14251b(0x1ac))/0x5+parseInt(_0x14251b(0x1b6))/0x6*(parseInt(_0x14251b(0x19e))/0x7)+parseInt(_0x14251b(0x19b))/0x8*(-parseInt(_0x14251b(0x1a6))/0x9)+-parseInt(_0x14251b(0x1b7))/0xa+-parseInt(_0x14251b(0x1b3))/0xb*(-parseInt(_0x14251b(0x1a4))/0xc);if(_0x376ae6===_0x3fd321)break;else _0x423234['push'](_0x423234['shift']());}catch(_0x2858b5){_0x423234['push'](_0x423234['shift']());}}}(a158_0x2793,0x186e0));function a158_0x2793(){const _0x25dd04=['106098ONLxkX','28708tckWgu','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','5841QEIbRX','2YSlRsl','Invalid\x20JSON\x20in\x20','66mLridS','1880600KuGVTR','resolve','segments','8wutvqm','relative','parent_segment','67781IATNML','16zxxrLd','parse','startsWith','string','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','7488gzWkXt','engage_workspace','1334727zgTBDH','root','dirname','object','cwd','tdx.json','858010qdKLrM','join','stringify','Invalid\x20tdx.json:\x20expected\x20object'];a158_0x2793=function(){return _0x25dd04;};return a158_0x2793();}import{existsSync,readFileSync}from'fs';import a158_0x4e1dd6 from'path';const TDX_CONFIG_FILE=a158_0x91c090(0x1ab),SEGMENTS_DIR=a158_0x91c090(0x19a);export function findTdxConfigPath(_0x3ab779=process['cwd']()){const _0x139a50=a158_0x91c090;let _0x28fed1=a158_0x4e1dd6['resolve'](_0x3ab779);const _0x383561=a158_0x4e1dd6[_0x139a50(0x1a0)](_0x28fed1)[_0x139a50(0x1a7)];while(_0x28fed1!==_0x383561){const _0x10b7ad=a158_0x4e1dd6[_0x139a50(0x1ad)](_0x28fed1,TDX_CONFIG_FILE);if(existsSync(_0x10b7ad))return _0x10b7ad;_0x28fed1=a158_0x4e1dd6['dirname'](_0x28fed1);}return null;}export function loadTdxConfig(_0x11ae30){const _0x3dc67f=a158_0x91c090,_0x39b613=readFileSync(_0x11ae30,'utf-8');let _0x2f6b1c;try{_0x2f6b1c=JSON[_0x3dc67f(0x1a0)](_0x39b613);}catch{throw new Error(_0x3dc67f(0x1b5)+_0x11ae30);}if(!_0x2f6b1c||typeof _0x2f6b1c!==_0x3dc67f(0x1a9))throw new Error(_0x3dc67f(0x1af));const _0x3adaae=_0x2f6b1c,_0x500ac6=_0x3adaae[_0x3dc67f(0x19d)]&&typeof _0x3adaae[_0x3dc67f(0x19d)]===_0x3dc67f(0x1a2),_0x516be0=_0x3adaae['engage_workspace']&&typeof _0x3adaae[_0x3dc67f(0x1a5)]===_0x3dc67f(0x1a2);if(!_0x500ac6&&!_0x516be0)throw new Error(_0x3dc67f(0x1a3));const _0x12fbf2={};return _0x500ac6&&(_0x12fbf2[_0x3dc67f(0x19d)]=_0x3adaae[_0x3dc67f(0x19d)]),_0x516be0&&(_0x12fbf2['engage_workspace']=_0x3adaae['engage_workspace']),_0x12fbf2;}export function findTdxConfig(_0x14878e=process[a158_0x91c090(0x1aa)]()){const _0x301d38=a158_0x91c090,_0x114e0b=findTdxConfigPath(_0x14878e);if(!_0x114e0b)throw new Error(_0x301d38(0x1b2));const _0x4ea786=loadTdxConfig(_0x114e0b),_0x1607ff=a158_0x4e1dd6[_0x301d38(0x1a8)](_0x114e0b);return{'config':_0x4ea786,'configPath':_0x114e0b,'configDir':_0x1607ff};}export function tryFindTdxConfig(_0x5218d2){try{return findTdxConfig(_0x5218d2);}catch{return null;}}export function getSegmentRootDir(_0x525f34,_0x522434=process['cwd']()){const _0x25c57d=a158_0x91c090;return a158_0x4e1dd6[_0x25c57d(0x1ad)](_0x522434,SEGMENTS_DIR,_0x525f34);}export function getTdxConfigPath(_0x4deb8b,_0x2a2250=process[a158_0x91c090(0x1aa)]()){const _0x31299e=a158_0x91c090;return a158_0x4e1dd6[_0x31299e(0x1ad)](getSegmentRootDir(_0x4deb8b,_0x2a2250),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x242553,_0x34be40){const _0x33bcbc=a158_0x91c090,_0x11dc75=a158_0x4e1dd6[_0x33bcbc(0x199)](_0x242553),_0x22aea6=a158_0x4e1dd6[_0x33bcbc(0x19c)](_0x34be40,_0x11dc75);if(_0x22aea6[_0x33bcbc(0x1a1)]('..'))return'';return _0x22aea6;}export function localPathToTdFolderPath(_0xc09aea){const _0x50c21e=a158_0x4e1dd6['dirname'](_0xc09aea);if(_0x50c21e==='.'||_0x50c21e==='')return'';return _0x50c21e['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x31e4dd,_0xc55f0b){const _0x2597af=a158_0x91c090;if(!_0x31e4dd)return _0xc55f0b;return a158_0x4e1dd6[_0x2597af(0x1ad)](_0xc55f0b,_0x31e4dd);}export function createTdxConfigContent(_0xfcba34){const _0x4b7e33=a158_0x91c090,_0x4a7ece={'parent_segment':_0xfcba34};return JSON[_0x4b7e33(0x1ae)](_0x4a7ece,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2f3c9a){const _0x418019=a158_0x91c090,_0x4d61d9={'engage_workspace':_0x2f3c9a};return JSON[_0x418019(0x1ae)](_0x4d61d9,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a159_0x3719(_0x1b59a4,_0x3b013f){_0x1b59a4=_0x1b59a4-0x103;const _0x46812c=a159_0x4681();let _0x3719c2=_0x46812c[_0x1b59a4];return _0x3719c2;}const a159_0x50700c=a159_0x3719;function a159_0x4681(){const _0x4c2495=['200EqTKbb','min','1699020PMRkyg','hour','Connection\x20name\x20is\x20required','494229XDAJSA','none','boolean','1495710znreKi','minute','desc','onSuccess','All','cron','97342EdkZJd','rows','hourly','unknown','2KQKQXQ','Top-N','nullable','object','clear','array','month','Last','daily','week','union','weekly','Activation\x20name\x20is\x20required','11751970LzVZzX','71207JYHuzH','First','minutes_interval','optional','onFailure','masked','enum','string','number','1304262lOmTDZ','5PSNAqF'];a159_0x4681=function(){return _0x4c2495;};return a159_0x4681();}(function(_0x560e2e,_0x759e96){const _0xf5ebbe=a159_0x3719,_0x4c33cf=_0x560e2e();while(!![]){try{const _0x3c4d3a=parseInt(_0xf5ebbe(0x103))/0x1*(parseInt(_0xf5ebbe(0x120))/0x2)+parseInt(_0xf5ebbe(0x113))/0x3+parseInt(_0xf5ebbe(0x110))/0x4+-parseInt(_0xf5ebbe(0x10d))/0x5*(-parseInt(_0xf5ebbe(0x116))/0x6)+-parseInt(_0xf5ebbe(0x11c))/0x7*(-parseInt(_0xf5ebbe(0x10e))/0x8)+parseInt(_0xf5ebbe(0x10c))/0x9+-parseInt(_0xf5ebbe(0x12d))/0xa;if(_0x3c4d3a===_0x759e96)break;else _0x4c33cf['push'](_0x4c33cf['shift']());}catch(_0x392b3b){_0x4c33cf['push'](_0x4c33cf['shift']());}}}(a159_0x4681,0x37821));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x50700c(0x109)](['none',a159_0x50700c(0x11e),a159_0x50700c(0x128),a159_0x50700c(0x12b),'monthly',a159_0x50700c(0x11b),a159_0x50700c(0x105)]);export const RepeatUnitSchema=z[a159_0x50700c(0x109)]([a159_0x50700c(0x117),a159_0x50700c(0x111),'day',a159_0x50700c(0x129),a159_0x50700c(0x126),'once',a159_0x50700c(0x114)]);export const ScheduleDefSchema=z[a159_0x50700c(0x123)]({'type':ScheduleTypeSchema[a159_0x50700c(0x106)](),'repeat_unit':RepeatUnitSchema[a159_0x50700c(0x106)](),'repeat_frequency':z[a159_0x50700c(0x10b)]()[a159_0x50700c(0x106)](),'repeat_sub_frequency':z[a159_0x50700c(0x125)](z[a159_0x50700c(0x10b)]())[a159_0x50700c(0x106)](),'start_at':z[a159_0x50700c(0x10a)]()[a159_0x50700c(0x122)]()[a159_0x50700c(0x106)](),'end_on':z[a159_0x50700c(0x10a)]()[a159_0x50700c(0x122)]()[a159_0x50700c(0x106)](),'timezone':z[a159_0x50700c(0x10a)]()[a159_0x50700c(0x106)]()});export const NotificationDefSchema=z[a159_0x50700c(0x123)]({'notify_on':z[a159_0x50700c(0x125)](z['enum']([a159_0x50700c(0x119),a159_0x50700c(0x107)]))[a159_0x50700c(0x106)](),'email_recipients':z[a159_0x50700c(0x125)](z[a159_0x50700c(0x10a)]())['optional']()});export const ActivationColumnDefSchema=z[a159_0x50700c(0x12a)]([z[a159_0x50700c(0x10a)](),z['object']({'name':z[a159_0x50700c(0x10a)](),'type':z[a159_0x50700c(0x10a)]()[a159_0x50700c(0x106)](),'visibility':z[a159_0x50700c(0x109)]([a159_0x50700c(0x124),a159_0x50700c(0x108)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a159_0x50700c(0x123)]({'columns':z[a159_0x50700c(0x125)](z[a159_0x50700c(0x123)]({'name':z[a159_0x50700c(0x10a)](),'type':z[a159_0x50700c(0x10a)]()[a159_0x50700c(0x106)](),'visibility':z[a159_0x50700c(0x109)]([a159_0x50700c(0x124),a159_0x50700c(0x108)])['optional']()}))[a159_0x50700c(0x106)](),'behavior_table':z[a159_0x50700c(0x10a)]()[a159_0x50700c(0x106)](),'join_row':z[a159_0x50700c(0x10b)]()[a159_0x50700c(0x122)]()[a159_0x50700c(0x106)](),'join_strategy':z['enum']([a159_0x50700c(0x11a),a159_0x50700c(0x104),a159_0x50700c(0x127),a159_0x50700c(0x121)])[a159_0x50700c(0x106)](),'formatting':z[a159_0x50700c(0x109)]([a159_0x50700c(0x11d),'cols'])[a159_0x50700c(0x106)](),'order_by':z[a159_0x50700c(0x125)](z[a159_0x50700c(0x123)]({'key':z[a159_0x50700c(0x10a)](),'order':z[a159_0x50700c(0x109)](['asc',a159_0x50700c(0x118)])}))[a159_0x50700c(0x106)]()});export const ActivationDefSchema=z[a159_0x50700c(0x123)]({'name':z['string']()[a159_0x50700c(0x10f)](0x1,a159_0x50700c(0x12c)),'description':z['string']()[a159_0x50700c(0x106)](),'connection':z['string']()['min'](0x1,a159_0x50700c(0x112)),'all_columns':z[a159_0x50700c(0x115)]()[a159_0x50700c(0x106)](),'columns':z[a159_0x50700c(0x125)](ActivationColumnDefSchema)[a159_0x50700c(0x106)](),'schedule':ScheduleDefSchema[a159_0x50700c(0x106)](),'notification':NotificationDefSchema['optional'](),'connector_config':z['record'](z[a159_0x50700c(0x10a)](),z[a159_0x50700c(0x11f)]())['optional'](),'activation_template_id':z[a159_0x50700c(0x10a)]()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x50700c(0x122)]()[a159_0x50700c(0x106)](),'run_after_journey_refresh':z['boolean']()[a159_0x50700c(0x106)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a160_0x493f(){var _0x5a0423=['1MvWGZf','114DkgvTc','5222091AxGKcN','8hVZXUo','14548sVERsy','230LkjAht','12963691XGouUt','241714iysLnv','65524OelFns','5Getaec','3925650mWCFZi','8111034oudEdG','12uZkYVw'];a160_0x493f=function(){return _0x5a0423;};return a160_0x493f();}function a160_0x4ace(_0x432fb8,_0x46c63c){_0x432fb8=_0x432fb8-0x1ad;var _0x493fa8=a160_0x493f();var _0x4acead=_0x493fa8[_0x432fb8];return _0x4acead;}(function(_0x2dc4ec,_0x4d2fdb){var _0xb88c8f=a160_0x4ace,_0x14b1e1=_0x2dc4ec();while(!![]){try{var _0x2fc80e=parseInt(_0xb88c8f(0x1af))/0x1*(-parseInt(_0xb88c8f(0x1b7))/0x2)+-parseInt(_0xb88c8f(0x1b0))/0x3*(parseInt(_0xb88c8f(0x1b3))/0x4)+-parseInt(_0xb88c8f(0x1b8))/0x5*(-parseInt(_0xb88c8f(0x1b9))/0x6)+parseInt(_0xb88c8f(0x1b1))/0x7+-parseInt(_0xb88c8f(0x1b2))/0x8*(parseInt(_0xb88c8f(0x1ad))/0x9)+-parseInt(_0xb88c8f(0x1b4))/0xa*(parseInt(_0xb88c8f(0x1b6))/0xb)+-parseInt(_0xb88c8f(0x1ae))/0xc*(-parseInt(_0xb88c8f(0x1b5))/0xd);if(_0x2fc80e===_0x4d2fdb)break;else _0x14b1e1['push'](_0x14b1e1['shift']());}catch(_0xeebfc2){_0x14b1e1['push'](_0x14b1e1['shift']());}}}(a160_0x493f,0xc82bb));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x4876d7=a161_0x2366;(function(_0x41bf89,_0x33b328){const _0x2b8c4a=a161_0x2366,_0x58b27a=_0x41bf89();while(!![]){try{const _0x9f0f5f=parseInt(_0x2b8c4a(0x1bf))/0x1+-parseInt(_0x2b8c4a(0x1cc))/0x2*(parseInt(_0x2b8c4a(0x1d0))/0x3)+-parseInt(_0x2b8c4a(0x1d6))/0x4*(parseInt(_0x2b8c4a(0x1d4))/0x5)+-parseInt(_0x2b8c4a(0x1ba))/0x6*(parseInt(_0x2b8c4a(0x1cd))/0x7)+-parseInt(_0x2b8c4a(0x1c5))/0x8*(-parseInt(_0x2b8c4a(0x1d7))/0x9)+parseInt(_0x2b8c4a(0x1b8))/0xa+-parseInt(_0x2b8c4a(0x1d2))/0xb*(parseInt(_0x2b8c4a(0x1c0))/0xc);if(_0x9f0f5f===_0x33b328)break;else _0x58b27a['push'](_0x58b27a['shift']());}catch(_0x189675){_0x58b27a['push'](_0x58b27a['shift']());}}}(a161_0x28c8,0xb4380));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a161_0x28c8(){const _0x2a2553=['64jCmdeY','activation','string','filter','wait','journey','number','3324bNCqZB','2688wXcTKy','isArray','jump','1014dKKjYT','refine','4078184EtsZcV','boolean','10CvKOKD','decision_point','2675384pRMVdx','1206261GhrCYb','optional','simulation','object','journeys','versions','Journey\x20name\x20is\x20required','array','type','record','enum','7726250gpPpfX','day','1032mUZCQI','length','reentry_always','launched','literal','1229559XWllXp','12MmQWNN','no_reentry','discriminatedUnion','end','merge'];a161_0x28c8=function(){return _0x2a2553;};return a161_0x28c8();}export const JourneyStateTypeSchema=z['enum'](['draft',a161_0x4876d7(0x1d9),a161_0x4876d7(0x1bd)]);export const ReentryModeTypeSchema=z[a161_0x4876d7(0x1b7)]([a161_0x4876d7(0x1c1),'reentry_unless_goal_achieved',a161_0x4876d7(0x1bc)]);export const WaitUnitTypeSchema=z[a161_0x4876d7(0x1b7)]([a161_0x4876d7(0x1b9),'week']);export const StepTypeValueSchema=z[a161_0x4876d7(0x1b7)]([a161_0x4876d7(0x1c9),a161_0x4876d7(0x1c6),a161_0x4876d7(0x1d5),'ab_test',a161_0x4876d7(0x1c4),a161_0x4876d7(0x1cf),a161_0x4876d7(0x1c3)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x4876d7(0x1da)]({'journey':z[a161_0x4876d7(0x1c7)](),'stage':z['string'](),'bundle_id':z['string']()['optional']()});export const CriteriaDefSchema=z[a161_0x4876d7(0x1da)]({'name':z[a161_0x4876d7(0x1c7)](),'description':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'segment':z[a161_0x4876d7(0x1c7)](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)]()}),WaitConditionDefSchema=z[a161_0x4876d7(0x1da)]({'segment':z[a161_0x4876d7(0x1c7)](),'next':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x4876d7(0x1d8)]()}),WaitStepParamsDefSchema=z[a161_0x4876d7(0x1da)]({'duration':z[a161_0x4876d7(0x1cb)]()[a161_0x4876d7(0x1d8)](),'unit':WaitUnitTypeSchema[a161_0x4876d7(0x1d8)](),'wait_until':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'condition':WaitConditionDefSchema[a161_0x4876d7(0x1d8)](),'days_of_week':z['array'](z[a161_0x4876d7(0x1c7)]())['optional']()}),StepBaseFields={'name':z[a161_0x4876d7(0x1c7)](),'uuid':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'next':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)]()},WaitStepDefSchema=z[a161_0x4876d7(0x1da)]({...StepBaseFields,'type':z[a161_0x4876d7(0x1be)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x4876d7(0x1da)]({'activation':z[a161_0x4876d7(0x1c7)]()}),ActivationStepDefSchema=z[a161_0x4876d7(0x1da)]({...StepBaseFields,'type':z[a161_0x4876d7(0x1be)](a161_0x4876d7(0x1c6)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x4876d7(0x1da)]({'name':z[a161_0x4876d7(0x1c7)](),'segment':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'segment_id':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'excluded':z[a161_0x4876d7(0x1d3)]()[a161_0x4876d7(0x1d8)](),'next':z[a161_0x4876d7(0x1c7)]()['optional']()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0x4876d7(0x1de)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x4876d7(0x1da)]({...StepBaseFields,'type':z[a161_0x4876d7(0x1be)](a161_0x4876d7(0x1d5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x4876d7(0x1da)]({'id':z['string']()[a161_0x4876d7(0x1d8)](),'name':z[a161_0x4876d7(0x1c7)](),'percentage':z[a161_0x4876d7(0x1cb)](),'next':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)]()}),AbTestStepParamsDefSchema=z[a161_0x4876d7(0x1da)]({'variants':z[a161_0x4876d7(0x1de)](AbTestVariantDefSchema),'unique_id':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'customized_split':z[a161_0x4876d7(0x1d3)]()[a161_0x4876d7(0x1d8)]()}),AbTestStepDefSchema=z[a161_0x4876d7(0x1da)]({...StepBaseFields,'type':z[a161_0x4876d7(0x1be)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x4876d7(0x1da)]({...StepBaseFields,'type':z['literal'](a161_0x4876d7(0x1c4))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x4876d7(0x1da)]({...StepBaseFields,'type':z[a161_0x4876d7(0x1be)](a161_0x4876d7(0x1cf)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x4876d7(0x1be)](a161_0x4876d7(0x1c3))})['passthrough']();export const StepDefSchema=z[a161_0x4876d7(0x1c2)](a161_0x4876d7(0x1df),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x4876d7(0x1da)]({'name':z[a161_0x4876d7(0x1c7)](),'description':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'id':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'entry_criteria':CriteriaDefSchema[a161_0x4876d7(0x1d8)](),'exit_criteria':z[a161_0x4876d7(0x1de)](CriteriaDefSchema)[a161_0x4876d7(0x1d8)](),'milestone':CriteriaDefSchema[a161_0x4876d7(0x1d8)](),'root_step':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'steps':z['array'](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z['object']({'name':z[a161_0x4876d7(0x1c7)]()['optional'](),'version':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'state':JourneyStateTypeSchema[a161_0x4876d7(0x1d8)](),'latest':z[a161_0x4876d7(0x1d3)]()[a161_0x4876d7(0x1d8)](),'stages':z[a161_0x4876d7(0x1de)](StageDefSchema),'id':z['string']()[a161_0x4876d7(0x1d8)](),'version_number':z[a161_0x4876d7(0x1cb)]()['optional'](),'goal':CriteriaDefSchema[a161_0x4876d7(0x1d8)](),'reentry':ReentryModeTypeSchema['optional']()});function a161_0x2366(_0x22782c,_0x2fe12e){_0x22782c=_0x22782c-0x1b6;const _0x28c8b8=a161_0x28c8();let _0x2366c5=_0x28c8b8[_0x22782c];return _0x2366c5;}export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z[a161_0x4876d7(0x1be)](a161_0x4876d7(0x1ca)),'name':z[a161_0x4876d7(0x1c7)]()['min'](0x1,a161_0x4876d7(0x1dd)),'description':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'bundle_id':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'bundle_name':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'folder_id':z['string']()['optional'](),'reentry':ReentryModeTypeSchema[a161_0x4876d7(0x1d8)](),'allow_reentry':z['boolean']()[a161_0x4876d7(0x1d8)](),'goal':CriteriaDefSchema[a161_0x4876d7(0x1d8)](),'id':z[a161_0x4876d7(0x1c7)]()[a161_0x4876d7(0x1d8)](),'version':z['string']()[a161_0x4876d7(0x1d8)](),'version_number':z[a161_0x4876d7(0x1cb)]()[a161_0x4876d7(0x1d8)](),'stages':z[a161_0x4876d7(0x1de)](StageDefSchema)[a161_0x4876d7(0x1d8)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x4876d7(0x1d8)](),'journeys':z[a161_0x4876d7(0x1de)](JourneyEntryDefSchema)[a161_0x4876d7(0x1d8)](),'segments':z['record'](z['string'](),EmbeddedSegmentDefSchema)[a161_0x4876d7(0x1d8)](),'activations':z[a161_0x4876d7(0x1b6)](z['string'](),ActivationDefSchema)[a161_0x4876d7(0x1d8)]()})[a161_0x4876d7(0x1d1)](_0x4f664b=>{const _0x32e448=a161_0x4876d7,_0x18ccb6=[_0x4f664b[_0x32e448(0x1db)],_0x4f664b['stages'],_0x4f664b[_0x32e448(0x1dc)]][_0x32e448(0x1c8)](_0x33edd0=>Array[_0x32e448(0x1ce)](_0x33edd0)&&_0x33edd0[_0x32e448(0x1bb)]>0x0)['length'];return _0x18ccb6===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xfc6228,_0x1c3b12){var _0x528605=a163_0xa166,_0x25fdf4=_0xfc6228();while(!![]){try{var _0x443834=parseInt(_0x528605(0x1bb))/0x1*(parseInt(_0x528605(0x1bd))/0x2)+-parseInt(_0x528605(0x1b8))/0x3+parseInt(_0x528605(0x1bc))/0x4+-parseInt(_0x528605(0x1ba))/0x5*(parseInt(_0x528605(0x1b7))/0x6)+-parseInt(_0x528605(0x1b9))/0x7+-parseInt(_0x528605(0x1b6))/0x8+-parseInt(_0x528605(0x1be))/0x9;if(_0x443834===_0x1c3b12)break;else _0x25fdf4['push'](_0x25fdf4['shift']());}catch(_0x256bdc){_0x25fdf4['push'](_0x25fdf4['shift']());}}}(a163_0x132a,0x5011c));function a163_0x132a(){var _0x55f7be=['214837UbPpYe','5ZEDbWQ','220oyzWxs','2223680LcuOiX','5552sovffo','336726MNOVIg','1271696TXIZKN','2156214PYoOoD','756720FOucek'];a163_0x132a=function(){return _0x55f7be;};return a163_0x132a();}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0xa166(_0x487584,_0x313503){_0x487584=_0x487584-0x1b6;var _0x132a5d=a163_0x132a();var _0xa166d1=_0x132a5d[_0x487584];return _0xa166d1;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a163_0x2140af=a163_0x1559;(function(_0x38d7a8,_0x49dee4){const _0x575fb1=a163_0x1559,_0x156e31=_0x38d7a8();while(!![]){try{const _0x11a07d=parseInt(_0x575fb1(0x125))/0x1*(-parseInt(_0x575fb1(0x132))/0x2)+-parseInt(_0x575fb1(0x110))/0x3*(parseInt(_0x575fb1(0x146))/0x4)+-parseInt(_0x575fb1(0x116))/0x5+-parseInt(_0x575fb1(0x13a))/0x6+-parseInt(_0x575fb1(0x147))/0x7*(-parseInt(_0x575fb1(0x14d))/0x8)+parseInt(_0x575fb1(0x105))/0x9+parseInt(_0x575fb1(0x129))/0xa;if(_0x11a07d===_0x49dee4)break;else _0x156e31['push'](_0x156e31['shift']());}catch(_0x43aa8a){_0x156e31['push'](_0x156e31['shift']());}}}(a163_0x32aa,0x80fb2));import{z}from'zod';export const OperatorTypeSchema=z[a163_0x2140af(0x117)](['Equal',a163_0x2140af(0x11d),a163_0x2140af(0x140),a163_0x2140af(0x145),a163_0x2140af(0x12e),'In',a163_0x2140af(0x14e),a163_0x2140af(0x144),a163_0x2140af(0x14a),a163_0x2140af(0x131),a163_0x2140af(0x127),a163_0x2140af(0x155),a163_0x2140af(0x14c),a163_0x2140af(0x12d),a163_0x2140af(0x13e)]);function a163_0x32aa(){const _0x77bafd=['any','1825910jLMgKt','enum','from','include','Operator\x20\x27','union','string','Greater','boolean','literal','TimeRange\x20operator\x20requires\x20\x27from\x27','TimeRange\x20operator\x20requires\x20\x27duration\x27','MISSING_TIME_UNIT','Average','number','720229jEPHbx','operator','TimeWithinNext','discriminatedUnion','14437600FnDIzX','custom','second','day','EndWith','LessEqual','year','unit','TimeWithinPast','2yrGpNn','array','Equal','\x27\x20requires\x20a\x20value','max','Sum','value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','5380596ifynUP','\x27\x20requires\x20a\x20time\x20unit','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','min','TimeRange','type','Less','First','superRefine','timestamp','Regexp','GreaterEqual','137780xvdkOW','38815hgUdwa','exclude','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','IsNull','lazy','StartWith','976JXYPpA','Between','minute','MISSING_BETWEEN_BOUNDS','optional','Last','record','Segment\x20name\x20is\x20required','Contain','realtime','8782182JspWTS','Max','Value','hour','Min','addIssue','Segment\x20reference\x20must\x20not\x20be\x20empty','And','Behavior','has','CountDistinct','51rtLDuI','duration','batch','Count','object'];a163_0x32aa=function(){return _0x77bafd;};return a163_0x32aa();}export const TimeUnitSchema=z[a163_0x2140af(0x117)]([a163_0x2140af(0x12b),a163_0x2140af(0x14f),a163_0x2140af(0x108),a163_0x2140af(0x12c),'week','month',a163_0x2140af(0x12f)]);export const AggregationTypeSchema=z['enum']([a163_0x2140af(0x113),a163_0x2140af(0x137),a163_0x2140af(0x123),a163_0x2140af(0x109),'Max',a163_0x2140af(0x10f),'First','Last']);function a163_0x1559(_0x5524c8,_0x67b528){_0x5524c8=_0x5524c8-0x104;const _0x32aa10=a163_0x32aa();let _0x155962=_0x32aa10[_0x5524c8];return _0x155962;}const TemporalValueSchema=z['union']([z[a163_0x2140af(0x114)]({'timestamp':z[a163_0x2140af(0x11c)]()}),z[a163_0x2140af(0x114)]({'last':z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x124)](),z[a163_0x2140af(0x153)](z[a163_0x2140af(0x11c)](),z['number']())]),'unit':z[a163_0x2140af(0x11c)]()})]),OperatorValueSchema=z['union']([z['string'](),z['number'](),z[a163_0x2140af(0x11e)](),TemporalValueSchema,z[a163_0x2140af(0x133)](z['union']([z['string'](),z[a163_0x2140af(0x124)](),z[a163_0x2140af(0x11e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a163_0x2140af(0x134),'Greater',a163_0x2140af(0x145),'Less',a163_0x2140af(0x12e),'In',a163_0x2140af(0x155),a163_0x2140af(0x14c),a163_0x2140af(0x12d),a163_0x2140af(0x144),a163_0x2140af(0x131),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a163_0x2140af(0x131),'TimeWithinNext']);export const OperatorDefSchema=z[a163_0x2140af(0x114)]({'type':OperatorTypeSchema,'not':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)](),'value':OperatorValueSchema[a163_0x2140af(0x151)](),'min':z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x124)](),z['string'](),TemporalValueSchema])[a163_0x2140af(0x151)](),'max':z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x124)](),z[a163_0x2140af(0x11c)](),TemporalValueSchema])[a163_0x2140af(0x151)](),'unit':TimeUnitSchema[a163_0x2140af(0x151)](),'duration':z[a163_0x2140af(0x114)]({'day':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'week':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'month':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'year':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'hour':z[a163_0x2140af(0x124)]()['optional'](),'minute':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)](),'second':z[a163_0x2140af(0x124)]()[a163_0x2140af(0x151)]()})[a163_0x2140af(0x151)](),'from':z[a163_0x2140af(0x114)]({'last':z['union']([z[a163_0x2140af(0x124)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)]()})[a163_0x2140af(0x142)]((_0x355132,_0x1278be)=>{const _0xc6bc30=a163_0x2140af;OPERATORS_REQUIRING_VALUE[_0xc6bc30(0x10e)](_0x355132[_0xc6bc30(0x13f)])&&(_0x355132[_0xc6bc30(0x138)]===undefined||_0x355132[_0xc6bc30(0x138)]===null)&&_0x1278be[_0xc6bc30(0x10a)]({'code':'custom','message':_0xc6bc30(0x11a)+_0x355132[_0xc6bc30(0x13f)]+_0xc6bc30(0x135),'path':[_0xc6bc30(0x138)]}),_0x355132[_0xc6bc30(0x13f)]===_0xc6bc30(0x14e)&&_0x355132[_0xc6bc30(0x13d)]===undefined&&_0x355132[_0xc6bc30(0x136)]===undefined&&_0x1278be[_0xc6bc30(0x10a)]({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x139),'params':{'validationCode':_0xc6bc30(0x150)}}),OPERATORS_REQUIRING_UNIT[_0xc6bc30(0x10e)](_0x355132[_0xc6bc30(0x13f)])&&_0x355132[_0xc6bc30(0x138)]!==undefined&&!_0x355132[_0xc6bc30(0x130)]&&_0x1278be[_0xc6bc30(0x10a)]({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x11a)+_0x355132[_0xc6bc30(0x13f)]+_0xc6bc30(0x13b),'path':[_0xc6bc30(0x130)],'params':{'validationCode':_0xc6bc30(0x122)}}),_0x355132[_0xc6bc30(0x13f)]==='TimeRange'&&(!_0x355132[_0xc6bc30(0x111)]&&_0x1278be[_0xc6bc30(0x10a)]({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x121),'path':[_0xc6bc30(0x111)]}),!_0x355132['from']&&_0x1278be['addIssue']({'code':_0xc6bc30(0x12a),'message':_0xc6bc30(0x120),'path':[_0xc6bc30(0x118)]}));});export const ArrayMatchingSchema=z[a163_0x2140af(0x11b)]([z[a163_0x2140af(0x11f)](a163_0x2140af(0x115)),z['literal']('all'),z['object']({'atLeast':z['number']()}),z['object']({'atMost':z[a163_0x2140af(0x124)]()}),z['object']({'exactly':z[a163_0x2140af(0x124)]()})]);export const AggregationDefSchema=z[a163_0x2140af(0x128)](a163_0x2140af(0x13f),[z['object']({'type':z[a163_0x2140af(0x117)]([a163_0x2140af(0x137),a163_0x2140af(0x109),a163_0x2140af(0x106),a163_0x2140af(0x123)]),'column':z[a163_0x2140af(0x11c)](),'groupingColumns':z['array'](z['string']())[a163_0x2140af(0x151)]()}),z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x113)),'groupingColumns':z[a163_0x2140af(0x133)](z[a163_0x2140af(0x11c)]())[a163_0x2140af(0x151)]()}),z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x10f)),'columns':z[a163_0x2140af(0x133)](z[a163_0x2140af(0x11c)]())}),z[a163_0x2140af(0x114)]({'type':z['enum']([a163_0x2140af(0x141),a163_0x2140af(0x152)]),'column':z[a163_0x2140af(0x11c)](),'orderColumn':z[a163_0x2140af(0x11c)](),'groupingColumns':z[a163_0x2140af(0x133)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z[a163_0x2140af(0x114)]({'duration':z[a163_0x2140af(0x124)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a163_0x2140af(0x131),a163_0x2140af(0x127),a163_0x2140af(0x13e)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a163_0x2140af(0x11f)]('Column'),'column':z[a163_0x2140af(0x11c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2140af(0x151)]()})['superRefine']((_0xb14399,_0x3edebe)=>{const _0x309107=a163_0x2140af,_0x4e85e5=_0xb14399[_0x309107(0x126)]['type'];_0xb14399['column']===_0x309107(0x143)?!TIMESTAMP_OPERATORS[_0x309107(0x10e)](_0x4e85e5)&&_0x3edebe['addIssue']({'code':_0x309107(0x12a),'message':_0x309107(0x149)+_0x4e85e5+'\x27)','path':[_0x309107(0x126),_0x309107(0x13f)]}):TIMESTAMP_OPERATORS[_0x309107(0x10e)](_0x4e85e5)&&_0x3edebe[_0x309107(0x10a)]({'code':_0x309107(0x12a),'message':'Operator\x20\x27'+_0x4e85e5+_0x309107(0x13c),'path':[_0x309107(0x126),_0x309107(0x13f)]});});export const FilterRuleDefSchema=z['object']({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x10c)),'conditions':z[a163_0x2140af(0x133)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x107)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2140af(0x151)](),'exclude':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)](),'aggregation':AggregationDefSchema[a163_0x2140af(0x151)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a163_0x2140af(0x151)](),'limit':z['number']()['optional']()}));export const BehaviorConditionDefSchema=z[a163_0x2140af(0x14b)](()=>z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)](a163_0x2140af(0x10d)),'attribute':z[a163_0x2140af(0x11c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a163_0x2140af(0x151)](),'exclude':z['boolean']()[a163_0x2140af(0x151)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x151)](),'filter':FilterRuleDefSchema[a163_0x2140af(0x151)](),'timeWindow':TimeWindowDefSchema[a163_0x2140af(0x151)](),'limit':z['number']()[a163_0x2140af(0x151)]()}));export const ColumnConditionDefSchema=z[a163_0x2140af(0x114)]({'type':z[a163_0x2140af(0x11f)]('Column'),'column':z[a163_0x2140af(0x11c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a163_0x2140af(0x14b)](()=>z[a163_0x2140af(0x114)]({'type':z['enum']([a163_0x2140af(0x10c),'Or']),'conditions':z[a163_0x2140af(0x133)](ConditionDefSchema),'description':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x151)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a163_0x2140af(0x117)]([a163_0x2140af(0x119),a163_0x2140af(0x148)]),'segment':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x13d)](0x1,a163_0x2140af(0x10b))});export const ConditionDefSchema=z[a163_0x2140af(0x14b)](()=>z[a163_0x2140af(0x11b)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a163_0x2140af(0x14b)](()=>z['object']({'type':z['enum']([a163_0x2140af(0x10c),'Or']),'conditions':z[a163_0x2140af(0x133)](ConditionDefSchema),'description':z[a163_0x2140af(0x11c)]()['optional']()}));export const SegmentDefSchema=z['object']({'type':z[a163_0x2140af(0x11f)]('segment')[a163_0x2140af(0x151)](),'name':z['string']()[a163_0x2140af(0x13d)](0x1,a163_0x2140af(0x154)),'description':z[a163_0x2140af(0x11c)]()[a163_0x2140af(0x151)](),'folder':z['string']()['optional'](),'rule':RuleDefSchema[a163_0x2140af(0x151)](),'kind':z['enum']([a163_0x2140af(0x112),a163_0x2140af(0x104),'funnel_stage'])[a163_0x2140af(0x151)](),'visible':z[a163_0x2140af(0x11e)]()[a163_0x2140af(0x151)](),'activations':z[a163_0x2140af(0x133)](z[a163_0x2140af(0x115)]())[a163_0x2140af(0x151)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x55e4f8=a164_0x3a4f;(function(_0x10ed10,_0x16432d){const _0x4ddaec=a164_0x3a4f,_0xd10fa8=_0x10ed10();while(!![]){try{const _0x57e9cb=-parseInt(_0x4ddaec(0xc4))/0x1*(parseInt(_0x4ddaec(0xc2))/0x2)+parseInt(_0x4ddaec(0xbc))/0x3*(parseInt(_0x4ddaec(0xf7))/0x4)+-parseInt(_0x4ddaec(0xe9))/0x5+parseInt(_0x4ddaec(0xbb))/0x6+parseInt(_0x4ddaec(0xb6))/0x7*(-parseInt(_0x4ddaec(0xf4))/0x8)+-parseInt(_0x4ddaec(0xcb))/0x9+parseInt(_0x4ddaec(0xad))/0xa*(parseInt(_0x4ddaec(0xf2))/0xb);if(_0x57e9cb===_0x16432d)break;else _0xd10fa8['push'](_0xd10fa8['shift']());}catch(_0x177fd1){_0xd10fa8['push'](_0xd10fa8['shift']());}}}(a164_0x3b5d,0x47b4c));import{z}from'zod';function a164_0x3b5d(){const _0x335719=['exclude','2839980aVsbgp','type','Segment\x20name\x20is\x20required','all','LessEqual','unit','Count','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Min','1293314ufDajq','object','8qlImRL','hour','CountDistinct','2972fRMElX','addIssue','MISSING_TIME_UNIT','minute','any','Average','lazy','operator','Contain','GreaterEqual','Behavior','130YKAGWI','\x27\x20requires\x20a\x20value','string','Regexp','second','enum','funnel_stage','Equal','custom','2103017BXVOOv','from','TimeWithinNext','max','Greater','2941836qQhxrl','978UvkiaX','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','array','IsNull','Segment\x20reference\x20must\x20not\x20be\x20empty','discriminatedUnion','1074634ZzZxbR','And','1HgsnkG','Sum','Between','day','include','realtime','TimeRange\x20operator\x20requires\x20\x27duration\x27','5053806elmeaJ','year','First','batch','literal','number','duration','Less','TimeRange\x20operator\x20requires\x20\x27from\x27','union','\x27\x20requires\x20a\x20time\x20unit','has','TimeWithinPast','superRefine','MISSING_BETWEEN_BOUNDS','EndWith','month','StartWith','Column','optional','Value','value','week','Max','boolean','min','Operator\x20\x27','Last','TimeRange'];a164_0x3b5d=function(){return _0x335719;};return a164_0x3b5d();}export const OperatorTypeSchema=z['enum']([a164_0x55e4f8(0xb4),a164_0x55e4f8(0xba),a164_0x55e4f8(0xd2),a164_0x55e4f8(0xab),a164_0x55e4f8(0xed),'In',a164_0x55e4f8(0xc6),a164_0x55e4f8(0xb0),a164_0x55e4f8(0xbf),'TimeWithinPast',a164_0x55e4f8(0xb8),'Contain',a164_0x55e4f8(0xdc),a164_0x55e4f8(0xda),'TimeRange']);export const TimeUnitSchema=z[a164_0x55e4f8(0xb2)]([a164_0x55e4f8(0xb1),a164_0x55e4f8(0xfa),a164_0x55e4f8(0xf5),a164_0x55e4f8(0xc7),a164_0x55e4f8(0xe1),a164_0x55e4f8(0xdb),a164_0x55e4f8(0xcc)]);export const AggregationTypeSchema=z[a164_0x55e4f8(0xb2)]([a164_0x55e4f8(0xef),a164_0x55e4f8(0xc5),a164_0x55e4f8(0xa7),a164_0x55e4f8(0xf1),'Max',a164_0x55e4f8(0xf6),'First',a164_0x55e4f8(0xe6)]);const TemporalValueSchema=z[a164_0x55e4f8(0xd4)]([z[a164_0x55e4f8(0xf3)]({'timestamp':z[a164_0x55e4f8(0xaf)]()}),z[a164_0x55e4f8(0xf3)]({'last':z[a164_0x55e4f8(0xd4)]([z[a164_0x55e4f8(0xd0)](),z['record'](z[a164_0x55e4f8(0xaf)](),z[a164_0x55e4f8(0xd0)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x55e4f8(0xd4)]([z[a164_0x55e4f8(0xaf)](),z['number'](),z['boolean'](),TemporalValueSchema,z[a164_0x55e4f8(0xbe)](z[a164_0x55e4f8(0xd4)]([z[a164_0x55e4f8(0xaf)](),z['number'](),z[a164_0x55e4f8(0xe3)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x55e4f8(0xb4),a164_0x55e4f8(0xba),'GreaterEqual',a164_0x55e4f8(0xd2),a164_0x55e4f8(0xed),'In',a164_0x55e4f8(0xaa),a164_0x55e4f8(0xdc),a164_0x55e4f8(0xda),a164_0x55e4f8(0xb0),a164_0x55e4f8(0xd7),a164_0x55e4f8(0xb8)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x55e4f8(0xd7),a164_0x55e4f8(0xb8)]);export const OperatorDefSchema=z[a164_0x55e4f8(0xf3)]({'type':OperatorTypeSchema,'not':z[a164_0x55e4f8(0xe3)]()[a164_0x55e4f8(0xde)](),'value':OperatorValueSchema[a164_0x55e4f8(0xde)](),'min':z[a164_0x55e4f8(0xd4)]([z[a164_0x55e4f8(0xd0)](),z[a164_0x55e4f8(0xaf)](),TemporalValueSchema])[a164_0x55e4f8(0xde)](),'max':z[a164_0x55e4f8(0xd4)]([z[a164_0x55e4f8(0xd0)](),z[a164_0x55e4f8(0xaf)](),TemporalValueSchema])[a164_0x55e4f8(0xde)](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0x55e4f8(0xf3)]({'day':z['number']()[a164_0x55e4f8(0xde)](),'week':z[a164_0x55e4f8(0xd0)]()['optional'](),'month':z[a164_0x55e4f8(0xd0)]()['optional'](),'year':z[a164_0x55e4f8(0xd0)]()[a164_0x55e4f8(0xde)](),'hour':z['number']()['optional'](),'minute':z[a164_0x55e4f8(0xd0)]()[a164_0x55e4f8(0xde)](),'second':z[a164_0x55e4f8(0xd0)]()[a164_0x55e4f8(0xde)]()})[a164_0x55e4f8(0xde)](),'from':z[a164_0x55e4f8(0xf3)]({'last':z[a164_0x55e4f8(0xd4)]([z['number'](),z[a164_0x55e4f8(0xaf)]()]),'unit':TimeUnitSchema})[a164_0x55e4f8(0xde)](),'reverse':z[a164_0x55e4f8(0xe3)]()['optional']()})['superRefine']((_0x57a904,_0x4f1840)=>{const _0x13e782=a164_0x55e4f8;OPERATORS_REQUIRING_VALUE[_0x13e782(0xd6)](_0x57a904[_0x13e782(0xea)])&&(_0x57a904['value']===undefined||_0x57a904[_0x13e782(0xe0)]===null)&&_0x4f1840['addIssue']({'code':_0x13e782(0xb5),'message':_0x13e782(0xe5)+_0x57a904[_0x13e782(0xea)]+_0x13e782(0xae),'path':['value']}),_0x57a904['type']===_0x13e782(0xc6)&&_0x57a904[_0x13e782(0xe4)]===undefined&&_0x57a904[_0x13e782(0xb9)]===undefined&&_0x4f1840['addIssue']({'code':'custom','message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x13e782(0xd9)}}),OPERATORS_REQUIRING_UNIT[_0x13e782(0xd6)](_0x57a904[_0x13e782(0xea)])&&_0x57a904[_0x13e782(0xe0)]!==undefined&&!_0x57a904['unit']&&_0x4f1840['addIssue']({'code':'custom','message':_0x13e782(0xe5)+_0x57a904[_0x13e782(0xea)]+_0x13e782(0xd5),'path':[_0x13e782(0xee)],'params':{'validationCode':_0x13e782(0xf9)}}),_0x57a904[_0x13e782(0xea)]==='TimeRange'&&(!_0x57a904[_0x13e782(0xd1)]&&_0x4f1840[_0x13e782(0xf8)]({'code':'custom','message':_0x13e782(0xca),'path':['duration']}),!_0x57a904[_0x13e782(0xb7)]&&_0x4f1840[_0x13e782(0xf8)]({'code':'custom','message':_0x13e782(0xd3),'path':[_0x13e782(0xb7)]}));});export const ArrayMatchingSchema=z['union']([z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xa6)),z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xec)),z[a164_0x55e4f8(0xf3)]({'atLeast':z[a164_0x55e4f8(0xd0)]()}),z[a164_0x55e4f8(0xf3)]({'atMost':z['number']()}),z[a164_0x55e4f8(0xf3)]({'exactly':z[a164_0x55e4f8(0xd0)]()})]);export const AggregationDefSchema=z[a164_0x55e4f8(0xc1)](a164_0x55e4f8(0xea),[z['object']({'type':z['enum']([a164_0x55e4f8(0xc5),a164_0x55e4f8(0xf1),a164_0x55e4f8(0xe2),a164_0x55e4f8(0xa7)]),'column':z[a164_0x55e4f8(0xaf)](),'groupingColumns':z['array'](z['string']())[a164_0x55e4f8(0xde)]()}),z['object']({'type':z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xef)),'groupingColumns':z[a164_0x55e4f8(0xbe)](z[a164_0x55e4f8(0xaf)]())['optional']()}),z['object']({'type':z[a164_0x55e4f8(0xcf)]('CountDistinct'),'columns':z[a164_0x55e4f8(0xbe)](z['string']())}),z[a164_0x55e4f8(0xf3)]({'type':z['enum']([a164_0x55e4f8(0xcd),a164_0x55e4f8(0xe6)]),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x55e4f8(0xbe)](z[a164_0x55e4f8(0xaf)]())[a164_0x55e4f8(0xde)]()})]);export const TimeWindowDefSchema=z[a164_0x55e4f8(0xf3)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a164_0x55e4f8(0xb8),a164_0x55e4f8(0xe7)]);export const FilterColumnConditionDefSchema=z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xdd)),'column':z[a164_0x55e4f8(0xaf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x55e4f8(0xde)]()})[a164_0x55e4f8(0xd8)]((_0xfe1552,_0x1cc493)=>{const _0x3b627e=a164_0x55e4f8,_0x58a2c3=_0xfe1552[_0x3b627e(0xa9)][_0x3b627e(0xea)];_0xfe1552['column']==='timestamp'?!TIMESTAMP_OPERATORS[_0x3b627e(0xd6)](_0x58a2c3)&&_0x1cc493['addIssue']({'code':'custom','message':_0x3b627e(0xf0)+_0x58a2c3+'\x27)','path':['operator',_0x3b627e(0xea)]}):TIMESTAMP_OPERATORS[_0x3b627e(0xd6)](_0x58a2c3)&&_0x1cc493[_0x3b627e(0xf8)]({'code':_0x3b627e(0xb5),'message':_0x3b627e(0xe5)+_0x58a2c3+_0x3b627e(0xbd),'path':['operator',_0x3b627e(0xea)]});});export const FilterRuleDefSchema=z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xc3)),'conditions':z[a164_0x55e4f8(0xbe)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x55e4f8(0xa8)](()=>z['object']({'type':z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xdf)),'attribute':z[a164_0x55e4f8(0xaf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x55e4f8(0xe3)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x55e4f8(0xde)](),'source':z['string']()[a164_0x55e4f8(0xde)](),'filter':FilterRuleDefSchema[a164_0x55e4f8(0xde)](),'limit':z[a164_0x55e4f8(0xd0)]()[a164_0x55e4f8(0xde)]()}));export const BehaviorConditionDefSchema=z[a164_0x55e4f8(0xa8)](()=>z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xac)),'attribute':z[a164_0x55e4f8(0xaf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x55e4f8(0xde)](),'exclude':z[a164_0x55e4f8(0xe3)]()[a164_0x55e4f8(0xde)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x55e4f8(0xaf)]()[a164_0x55e4f8(0xde)](),'filter':FilterRuleDefSchema[a164_0x55e4f8(0xde)](),'timeWindow':TimeWindowDefSchema[a164_0x55e4f8(0xde)](),'limit':z['number']()[a164_0x55e4f8(0xde)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x55e4f8(0xcf)](a164_0x55e4f8(0xdd)),'column':z[a164_0x55e4f8(0xaf)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x55e4f8(0xa8)](()=>z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xb2)]([a164_0x55e4f8(0xc3),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x55e4f8(0xaf)]()[a164_0x55e4f8(0xde)]()}));export const SegmentRefConditionDefSchema=z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xb2)]([a164_0x55e4f8(0xc8),a164_0x55e4f8(0xe8)]),'segment':z[a164_0x55e4f8(0xaf)]()['min'](0x1,a164_0x55e4f8(0xc0))});export const ConditionDefSchema=z[a164_0x55e4f8(0xa8)](()=>z[a164_0x55e4f8(0xd4)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xb2)]([a164_0x55e4f8(0xc3),'Or']),'conditions':z[a164_0x55e4f8(0xbe)](ConditionDefSchema),'description':z[a164_0x55e4f8(0xaf)]()['optional']()}));function a164_0x3a4f(_0x27d1ff,_0x20f05e){_0x27d1ff=_0x27d1ff-0xa6;const _0x3b5da3=a164_0x3b5d();let _0x3a4f4d=_0x3b5da3[_0x27d1ff];return _0x3a4f4d;}export const SegmentDefSchema=z[a164_0x55e4f8(0xf3)]({'type':z[a164_0x55e4f8(0xcf)]('segment')[a164_0x55e4f8(0xde)](),'name':z[a164_0x55e4f8(0xaf)]()[a164_0x55e4f8(0xe4)](0x1,a164_0x55e4f8(0xeb)),'description':z['string']()[a164_0x55e4f8(0xde)](),'folder':z[a164_0x55e4f8(0xaf)]()[a164_0x55e4f8(0xde)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x55e4f8(0xb2)]([a164_0x55e4f8(0xce),a164_0x55e4f8(0xc9),a164_0x55e4f8(0xb3)])[a164_0x55e4f8(0xde)](),'visible':z['boolean']()[a164_0x55e4f8(0xde)](),'activations':z[a164_0x55e4f8(0xbe)](z[a164_0x55e4f8(0xa6)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0xe3468d=a165_0x1f9b;(function(_0x5085b7,_0x47878d){const _0x306d04=a165_0x1f9b,_0x49fd20=_0x5085b7();while(!![]){try{const _0x3737e1=-parseInt(_0x306d04(0x188))/0x1+parseInt(_0x306d04(0x18f))/0x2*(-parseInt(_0x306d04(0x199))/0x3)+-parseInt(_0x306d04(0x196))/0x4*(parseInt(_0x306d04(0x190))/0x5)+parseInt(_0x306d04(0x19e))/0x6*(-parseInt(_0x306d04(0x18b))/0x7)+-parseInt(_0x306d04(0x187))/0x8*(parseInt(_0x306d04(0x19b))/0x9)+-parseInt(_0x306d04(0x19f))/0xa+parseInt(_0x306d04(0x18e))/0xb*(parseInt(_0x306d04(0x192))/0xc);if(_0x3737e1===_0x47878d)break;else _0x49fd20['push'](_0x49fd20['shift']());}catch(_0x233adc){_0x49fd20['push'](_0x49fd20['shift']());}}}(a165_0x15b6,0x4dc4d));import{readFileSync}from'fs';import*as a165_0x48fdce from'path';import*as a165_0xbef16e from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';function a165_0x1f9b(_0x45e2c2,_0x5552fe){_0x45e2c2=_0x45e2c2-0x184;const _0x15b6d8=a165_0x15b6();let _0x1f9bf2=_0x15b6d8[_0x45e2c2];return _0x1f9bf2;}import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0xe3468d(0x19c),a165_0xe3468d(0x194)]);export function isJourneyDef(_0x26b654){const _0x106e94=a165_0xe3468d;return typeof _0x26b654==='object'&&_0x26b654!==null&&_0x106e94(0x19a)in _0x26b654&&_0x26b654['type']===_0x106e94(0x18c);}export function isCampaignDef(_0x151cd4){const _0x32b682=a165_0xe3468d;if(typeof _0x151cd4!==_0x32b682(0x1a4)||_0x151cd4===null)return![];const _0x2d1ced=_0x151cd4,_0x1615d8=VALID_CAMPAIGN_TYPES[_0x32b682(0x197)](_0x2d1ced[_0x32b682(0x185)]);if(_0x2d1ced[_0x32b682(0x19a)]==='campaign'&&_0x1615d8)return!![];if(_0x1615d8&&!_0x2d1ced['type'])return!![];return![];}export function isTemplateDef(_0x44073a){const _0x52d2ea=a165_0xe3468d;return typeof _0x44073a===_0x52d2ea(0x1a4)&&_0x44073a!==null&&'type'in _0x44073a&&_0x44073a[_0x52d2ea(0x19a)]===_0x52d2ea(0x18a);}export function isValidationResult(_0x1fdb8a){const _0xe94dce=a165_0xe3468d;return!(_0xe94dce(0x186)in _0x1fdb8a);}export function createParseErrorResult(_0x274138,_0x4720d0,_0x5342df,_0x5ba5c1,_0x5581ea=a165_0xe3468d(0x1a5)){const _0x59575e=a165_0xe3468d;return{'filePath':_0x274138,'relativePath':_0x4720d0,'source':_0x5342df,'result':{'valid':![],'errors':[{'level':_0x59575e(0x198),'path':'','code':_0x59575e(0x18d),'message':_0x5ba5c1}],'warnings':[]},'fileType':_0x5581ea};}export function validateYamlFile(_0x19a2a7,_0x3de784,_0x3bb911={}){const _0x41ffd3=a165_0xe3468d,_0xfe92fe=a165_0x48fdce['relative'](_0x3de784,_0x19a2a7)||a165_0x48fdce['basename'](_0x19a2a7);try{const _0x13be02=readFileSync(_0x19a2a7,'utf-8'),_0x20205f=a165_0xbef16e[_0x41ffd3(0x191)](_0x13be02),_0xd7fbdb=_0x20205f['toJSON']();if(!_0xd7fbdb)return createParseErrorResult(_0x19a2a7,_0xfe92fe,_0x13be02,_0x41ffd3(0x19d));let _0x5fceaf;if(isJourneyDef(_0xd7fbdb))_0x5fceaf=_0x41ffd3(0x18c);else{if(isCampaignDef(_0xd7fbdb))_0x5fceaf=_0x41ffd3(0x193);else isTemplateDef(_0xd7fbdb)?_0x5fceaf=_0x41ffd3(0x18a):_0x5fceaf=_0x41ffd3(0x1a5);}if(_0x3bb911['filterType']&&_0x5fceaf!==_0x3bb911[_0x41ffd3(0x1a3)])return{'filePath':_0x19a2a7,'relativePath':_0xfe92fe,'skipped':!![],'reason':_0x41ffd3(0x189)+_0x3bb911[_0x41ffd3(0x1a3)]};const _0x104f6c={'source':_0x13be02,'document':_0x20205f};let _0x38929e;if(_0x5fceaf===_0x41ffd3(0x18c))_0x38929e=validateJourneyDef(_0xd7fbdb,_0x104f6c);else{if(_0x5fceaf==='campaign')_0x38929e=validateCampaignDef(_0xd7fbdb,_0x104f6c);else _0x5fceaf===_0x41ffd3(0x18a)?_0x38929e=validateTemplateDef(_0xd7fbdb,_0x104f6c):_0x38929e=validateSegmentDef(_0xd7fbdb,_0x104f6c);}return{'filePath':_0x19a2a7,'relativePath':_0xfe92fe,'source':_0x13be02,'result':_0x38929e,'fileType':_0x5fceaf};}catch(_0xf6a405){const _0x5974b3=_0xf6a405 instanceof Error?_0xf6a405[_0x41ffd3(0x1a2)]:String(_0xf6a405);return createParseErrorResult(_0x19a2a7,_0xfe92fe,'','YAML\x20parse\x20error:\x20'+_0x5974b3);}}export function validateYamlFiles(_0x2ef657,_0x358ce4,_0x22c5f2={}){const _0x590dcd=a165_0xe3468d;return _0x2ef657[_0x590dcd(0x195)](_0x37f91d=>validateYamlFile(_0x37f91d,_0x358ce4,_0x22c5f2));}function a165_0x15b6(){const _0xcc8312=['96584rOlQsl','not\x20a\x20','template','292593zHUsgy','journey','YAML_PARSE_ERROR','18105769gyVgzs','62DtYRmq','255130WJQzAs','parseDocument','12CGPDub','campaign','push','map','40bnCPmF','has','error','708duSgwQ','type','230652mmLWMZ','email','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','6fKHMBg','1076630dwTyIz','result','warnings','message','filterType','object','segment','length','campaign_type','skipped','176IWsPGD'];a165_0x15b6=function(){return _0xcc8312;};return a165_0x15b6();}export function calculateSummary(_0x2ecf26){const _0x19380f=a165_0xe3468d;let _0x3d9a83=0x0,_0x3b551b=0x0,_0x23b8fa=0x0,_0x567880=0x0;for(const _0x2dcd3f of _0x2ecf26){if(!isValidationResult(_0x2dcd3f)){_0x567880++;continue;}_0x2dcd3f[_0x19380f(0x1a0)]['valid']?_0x3d9a83++:_0x3b551b++,_0x23b8fa+=_0x2dcd3f[_0x19380f(0x1a0)][_0x19380f(0x1a1)][_0x19380f(0x184)];}return{'validCount':_0x3d9a83,'invalidCount':_0x3b551b,'warningCount':_0x23b8fa,'skippedCount':_0x567880,'hasErrors':_0x3b551b>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d81b6,_0x5d3290){const _0x5b8121=a166_0x2581,_0x5a5ce8=_0x4d81b6();while(!![]){try{const _0x9243b5=-parseInt(_0x5b8121(0x8a))/0x1*(-parseInt(_0x5b8121(0x99))/0x2)+-parseInt(_0x5b8121(0x97))/0x3*(parseInt(_0x5b8121(0x7a))/0x4)+parseInt(_0x5b8121(0x7d))/0x5*(-parseInt(_0x5b8121(0x8e))/0x6)+-parseInt(_0x5b8121(0x7e))/0x7+parseInt(_0x5b8121(0xa6))/0x8+-parseInt(_0x5b8121(0x8c))/0x9+parseInt(_0x5b8121(0xa5))/0xa*(parseInt(_0x5b8121(0x96))/0xb);if(_0x9243b5===_0x5d3290)break;else _0x5a5ce8['push'](_0x5a5ce8['shift']());}catch(_0xbaf7bb){_0x5a5ce8['push'](_0x5a5ce8['shift']());}}}(a166_0x54e9,0xb8ea8));function a166_0x2581(_0x3e6787,_0x376682){_0x3e6787=_0x3e6787-0x77;const _0x54e9f2=a166_0x54e9();let _0x2581e3=_0x54e9f2[_0x3e6787];return _0x2581e3;}import*as a166_0x56477c from'yaml';import a166_0x4058e0 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';function a166_0x54e9(){const _0x28f4b9=['push','object','warnings','range','error','map','column','join','length','217970qIzYDm','5197280XShZrC','red','YAML\x20validation\x20error\x20at\x20\x27','pop','safeParse','160sytdoj','repeat','padStart','5239145UYBVPN','5737466prTekT','errors','parse','number','getIn','dim','Invalid\x20YAML:\x20expected\x20an\x20object','success','data','level','YAML\x20validation\x20error:\x20','message','24733UqqKvi','min','8719623tumtcq','\x20|\x20','6uBLrqO','invalid_union','path','code','cyan','split','location','yellow','1353OjzTFU','60036oeoKKg','contents','86bRyJlM','max','flatMap'];a166_0x54e9=function(){return _0x28f4b9;};return a166_0x54e9();}export function getLocationFromPath(_0x247e26,_0xc1b69e,_0x295515){const _0x301586=a166_0x2581;if(!_0x247e26||!_0xc1b69e)return undefined;try{let _0x507d99=_0x247e26[_0x301586(0x82)](_0x295515,!![]),_0x1679ea=[..._0x295515];while((!_0x507d99||typeof _0x507d99!==_0x301586(0x9d)||!(_0x301586(0x9f)in _0x507d99)||!_0x507d99['range'])&&_0x1679ea[_0x301586(0xa4)]>0x0){_0x1679ea[_0x301586(0x78)](),_0x507d99=_0x1679ea[_0x301586(0xa4)]>0x0?_0x247e26['getIn'](_0x1679ea,!![]):_0x247e26[_0x301586(0x98)];}if(!_0x507d99||typeof _0x507d99!=='object'||!('range'in _0x507d99)||!_0x507d99[_0x301586(0x9f)])return undefined;const [_0x536aba]=_0x507d99[_0x301586(0x9f)];return offsetToLocation(_0xc1b69e,_0x536aba);}catch{return undefined;}}export function offsetToLocation(_0x1cf131,_0x100cdd){const _0x3a6d7c=a166_0x2581;let _0x438dd6=0x1,_0x5f47d5=0x1;for(let _0x53b939=0x0;_0x53b939<_0x100cdd&&_0x53b939<_0x1cf131[_0x3a6d7c(0xa4)];_0x53b939++){_0x1cf131[_0x53b939]==='\x0a'?(_0x438dd6++,_0x5f47d5=0x1):_0x5f47d5++;}return{'line':_0x438dd6,'column':_0x5f47d5,'offset':_0x100cdd};}export function pathToArray(_0xe88497){const _0x17b5a9=a166_0x2581;if(!_0xe88497)return[];return _0xe88497[_0x17b5a9(0x93)]('.')[_0x17b5a9(0x9b)](_0x29916d=>{const _0x56978b=_0x29916d['match'](/^(\w+)\[(\d+)\]$/);if(_0x56978b)return[_0x56978b[0x1],parseInt(_0x56978b[0x2],0xa)];return[_0x29916d];});}export function formatZodPath(_0x4f6112){const _0x499be0=a166_0x2581;let _0x3e8ba0='';for(const _0x138dac of _0x4f6112){if(typeof _0x138dac===_0x499be0(0x81))_0x3e8ba0+='['+_0x138dac+']';else{const _0x58e429=String(_0x138dac);_0x3e8ba0+=_0x3e8ba0?'.'+_0x58e429:_0x58e429;}}return _0x3e8ba0;}export function flattenZodIssues(_0x5a8aff){const _0xf8956a=a166_0x2581,_0x51de05=[];for(const _0x1d04f2 of _0x5a8aff){if(_0x1d04f2[_0xf8956a(0x91)]===_0xf8956a(0x8f)&&'errors'in _0x1d04f2){const _0x8babb4=_0x1d04f2[_0xf8956a(0x7f)];let _0x18f29f=_0x8babb4[0x0]||[];for(const _0x4088f6 of _0x8babb4){_0x4088f6[_0xf8956a(0xa4)]<_0x18f29f[_0xf8956a(0xa4)]&&(_0x18f29f=_0x4088f6);}const _0x38a334=_0x18f29f[_0xf8956a(0xa1)](_0x51c6f8=>({..._0x51c6f8,'path':[..._0x1d04f2['path'],..._0x51c6f8[_0xf8956a(0x90)]]}));_0x51de05[_0xf8956a(0x9c)](...flattenZodIssues(_0x38a334));}else _0x51de05[_0xf8956a(0x9c)](_0x1d04f2);}return _0x51de05;}export function safeParseYaml(_0x52d6db,_0x55e4ab){const _0x1412ad=a166_0x2581,_0x246162=a166_0x56477c[_0x1412ad(0x80)](_0x52d6db);if(!_0x246162||typeof _0x246162!==_0x1412ad(0x9d))throw new Error(_0x1412ad(0x84));const _0x4db679=_0x55e4ab[_0x1412ad(0x79)](_0x246162);if(!_0x4db679[_0x1412ad(0x85)]){const _0x49eaf2=_0x4db679['error']['issues'][0x0],_0x2f5245=formatZodPath(_0x49eaf2['path']);throw new Error(_0x2f5245?_0x1412ad(0x77)+_0x2f5245+'\x27:\x20'+_0x49eaf2[_0x1412ad(0x89)]:_0x1412ad(0x88)+_0x49eaf2[_0x1412ad(0x89)]);}return _0x4db679[_0x1412ad(0x86)];}export function formatIssueWithContext(_0x26cf3a,_0x1f76f6,_0xd77b21){const _0x2231ff=a166_0x2581,_0x4e3993=[],_0x134453=_0x26cf3a[_0x2231ff(0x87)]===_0x2231ff(0xa0),_0x5e8cb9=_0x134453?a166_0x4058e0[_0x2231ff(0xa7)]:a166_0x4058e0['yellow'],_0x153c13=_0x134453?a166_0x4058e0[_0x2231ff(0xa7)]:a166_0x4058e0[_0x2231ff(0x95)],_0x461955=_0xd77b21?a166_0x4058e0[_0x2231ff(0x92)](_0xd77b21+':'):'';if(_0x26cf3a[_0x2231ff(0x94)]){const _0x1afe9d=a166_0x4058e0[_0x2231ff(0x92)](_0x26cf3a['location']['line']+':'+_0x26cf3a[_0x2231ff(0x94)][_0x2231ff(0xa2)]);_0x4e3993[_0x2231ff(0x9c)](''+_0x461955+_0x1afe9d+':\x20'+_0x5e8cb9(_0x26cf3a[_0x2231ff(0x87)])+'\x20'+_0x153c13('['+_0x26cf3a[_0x2231ff(0x91)]+']'));}else _0x4e3993[_0x2231ff(0x9c)](''+_0x461955+a166_0x4058e0[_0x2231ff(0x83)](_0x26cf3a['path'])+':\x20'+_0x5e8cb9(_0x26cf3a[_0x2231ff(0x87)])+'\x20'+_0x153c13('['+_0x26cf3a[_0x2231ff(0x91)]+']'));_0x4e3993[_0x2231ff(0x9c)](_0x26cf3a[_0x2231ff(0x89)]);if(_0x26cf3a[_0x2231ff(0x94)]&&_0x1f76f6){const _0x1a9ba0=_0x1f76f6[_0x2231ff(0x93)]('\x0a'),{line:_0x1b88b6,column:_0x5e09c4}=_0x26cf3a[_0x2231ff(0x94)],_0xd40e3c=Math[_0x2231ff(0x9a)](0x1,_0x1b88b6-0x1),_0x4313e2=Math[_0x2231ff(0x8b)](_0x1a9ba0[_0x2231ff(0xa4)],_0x1b88b6+0x1);_0x4e3993[_0x2231ff(0x9c)]('');for(let _0x4c8aac=_0xd40e3c;_0x4c8aac<=_0x4313e2;_0x4c8aac++){const _0x494faf=_0x1a9ba0[_0x4c8aac-0x1]||'',_0x45e108=a166_0x4058e0['dim'](_0x4c8aac['toString']()[_0x2231ff(0x7c)](0x4)),_0x32a4da=a166_0x4058e0['dim'](_0x2231ff(0x8d));if(_0x4c8aac===_0x1b88b6){_0x4e3993[_0x2231ff(0x9c)]('\x20\x20'+_0x45e108+_0x32a4da+_0x5e8cb9(_0x494faf));const _0x1feed8='\x20'[_0x2231ff(0x7b)](0x4+0x3+_0x5e09c4-0x1);_0x4e3993[_0x2231ff(0x9c)]('\x20\x20'+_0x1feed8+_0x5e8cb9('^'));}else _0x4e3993[_0x2231ff(0x9c)]('\x20\x20'+_0x45e108+_0x32a4da+a166_0x4058e0[_0x2231ff(0x83)](_0x494faf));}}return _0x4e3993[_0x2231ff(0xa3)]('\x0a');}export function formatValidationResult(_0x417914,_0x536cfc,_0x47903a){const _0x487d1a=a166_0x2581,_0xa2c832=[];for(const _0x763f29 of _0x417914[_0x487d1a(0x7f)]){_0xa2c832[_0x487d1a(0x9c)](formatIssueWithContext(_0x763f29,_0x536cfc,_0x47903a)),_0xa2c832[_0x487d1a(0x9c)]('');}for(const _0x55ca01 of _0x417914[_0x487d1a(0x9e)]){_0xa2c832[_0x487d1a(0x9c)](formatIssueWithContext(_0x55ca01,_0x536cfc,_0x47903a)),_0xa2c832[_0x487d1a(0x9c)]('');}return _0xa2c832[_0x487d1a(0xa3)]('\x0a');}
|