@treasuredata/tdx 2026.7.2 → 2026.7.3
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.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +11 -2
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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.d.ts +16 -0
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +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-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.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/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.d.ts +5 -1
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/oauth-refresh.js.map +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/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.d.ts +29 -0
- package/dist/utils/proxy-fetch.d.ts.map +1 -0
- package/dist/utils/proxy-fetch.js +1 -0
- package/dist/utils/proxy-fetch.js.map +1 -0
- 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(_0x58c56a,_0x32e368){const _0x1eef3e=a164_0x3d2d,_0x4fe670=_0x58c56a();while(!![]){try{const _0x10812d=parseInt(_0x1eef3e(0x179))/0x1*(-parseInt(_0x1eef3e(0x178))/0x2)+parseInt(_0x1eef3e(0x186))/0x3*(parseInt(_0x1eef3e(0x18f))/0x4)+parseInt(_0x1eef3e(0x18e))/0x5*(parseInt(_0x1eef3e(0x176))/0x6)+-parseInt(_0x1eef3e(0x18b))/0x7+-parseInt(_0x1eef3e(0x17f))/0x8*(-parseInt(_0x1eef3e(0x183))/0x9)+-parseInt(_0x1eef3e(0x174))/0xa+parseInt(_0x1eef3e(0x187))/0xb;if(_0x10812d===_0x32e368)break;else _0x4fe670['push'](_0x4fe670['shift']());}catch(_0x4a20e6){_0x4fe670['push'](_0x4fe670['shift']());}}}(a164_0x4259,0x2fa22));function a164_0x3d2d(_0x398e8d,_0x3734ef){_0x398e8d=_0x398e8d-0x170;const _0x42595f=a164_0x4259();let _0x3d2df3=_0x42595f[_0x398e8d];return _0x3d2df3;}import a164_0x5d9d0f 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(_0x536bb6){const _0x3f8796=a164_0x3d2d;return _0x536bb6[_0x3f8796(0x18d)]!==_0x3f8796(0x18c);}export function isScopedResolution(_0x26a6dc){const _0x9252c6=a164_0x3d2d;return _0x26a6dc[_0x9252c6(0x18d)]===_0x9252c6(0x1a4)||_0x26a6dc[_0x9252c6(0x18d)]===_0x9252c6(0x199)||_0x26a6dc[_0x9252c6(0x18d)]===_0x9252c6(0x18a);}export function getScopedDetails(_0xd8ad4a){const _0x309930=a164_0x3d2d;if(isScopedResolution(_0xd8ad4a))return{'isScoped':_0xd8ad4a[_0x309930(0x194)],'scopedFolderPath':_0xd8ad4a['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x334350,_0x7e2559){const _0x31bd83=a164_0x3d2d;let _0x4afd5a=a164_0x5d9d0f[_0x31bd83(0x182)](_0x334350);const _0xea7df8=a164_0x5d9d0f[_0x31bd83(0x198)](_0x4afd5a)[_0x31bd83(0x17d)];while(_0x4afd5a!==_0xea7df8){const _0x4494a6=a164_0x5d9d0f['join'](_0x4afd5a,_0x31bd83(0x171));if(await _0x7e2559[_0x31bd83(0x1a2)](_0x4494a6))try{const _0x3e49cb=await _0x7e2559[_0x31bd83(0x19f)](_0x4494a6),_0x3e3a1b=JSON['parse'](_0x3e49cb);if(_0x3e3a1b[_0x31bd83(0x189)]&&typeof _0x3e3a1b[_0x31bd83(0x189)]===_0x31bd83(0x19a))return{'configPath':_0x4494a6,'configDir':_0x4afd5a,'parentSegment':_0x3e3a1b['parent_segment']};}catch{}_0x4afd5a=a164_0x5d9d0f[_0x31bd83(0x195)](_0x4afd5a);}return null;}function calculateScopedPath(_0x14245a,_0x47723a){const _0x397a9f=a164_0x3d2d,_0xb1276a=a164_0x5d9d0f['relative'](_0x47723a,_0x14245a),_0x352b65=_0xb1276a!==''&&_0xb1276a!=='.'&&!_0xb1276a[_0x397a9f(0x19e)]('..');return{'isScoped':_0x352b65,'scopedFolderPath':_0x352b65?_0xb1276a[_0x397a9f(0x19d)](/\\/g,'/'):''};}function a164_0x4259(){const _0x287213=['1737351TpFsdE','error','type','415tDcgeC','456fryclu','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','File\x20not\x20found:\x20','file_not_found','parent_name','isScoped','dirname','trim','match','parse','file','string','isDirectory','extname','replace','startsWith','readFile','no_config','configDir','exists','Not\x20a\x20YAML\x20file:\x20','directory','cwd','No\x20tdx.json\x20found','tdx.json','invalid_yaml','scopedFolderPath','1374030iXhaAe','No\x20tdx.json\x20found\x20for\x20file:\x20','24816tcjCuP','Parent\x20segment\x20not\x20specified','162rnFNAi','4657VGXzYl','journey','parentSegment','resourceType','root','segment','80528qyoukQ','stat','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','resolve','135edqmBZ','includes','isFile','4764RVVJGA','3108699xYzgMD','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','parent_segment','context'];a164_0x4259=function(){return _0x287213;};return a164_0x4259();}export async function resolveTarget(_0x3b77fb){const _0x49ec91=a164_0x3d2d,{arg:_0x244142,contextParent:_0x123d4e,cwd:cwd=process[_0x49ec91(0x1a5)](),fs:fs=nodeFileSystem}=_0x3b77fb;if(_0x244142&&isYamlFilePath(_0x244142))try{const _0x2187ba=await resolveYamlFilePath(_0x244142,fs),_0x1901bb=a164_0x5d9d0f[_0x49ec91(0x182)](_0x244142),_0x2ce799=a164_0x5d9d0f['dirname'](_0x1901bb),_0x2b8b62=await findTdxConfigAsync(_0x2ce799,fs);if(!_0x2b8b62){if(_0x123d4e){const _0xf7e7e3=a164_0x5d9d0f[_0x49ec91(0x195)](_0x1901bb);return{'type':_0x49ec91(0x199),'parentName':_0x123d4e,'targetDir':_0xf7e7e3,'configRoot':_0xf7e7e3,'filePath':_0x1901bb,'resourceName':_0x2187ba['segmentName'],'folderPath':_0x2187ba['folderPath'],'resourceType':_0x2187ba[_0x49ec91(0x17c)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x49ec91(0x1a0),'message':_0x49ec91(0x175)+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x188)};}const _0x13dda6=calculateScopedPath(_0x2ce799,_0x2b8b62[_0x49ec91(0x1a1)]);return{'type':_0x49ec91(0x199),'parentName':_0x2b8b62['parentSegment'],'targetDir':_0x2b8b62['configDir'],'configRoot':_0x2b8b62[_0x49ec91(0x1a1)],'filePath':_0x1901bb,'resourceName':_0x2187ba['segmentName'],'folderPath':_0x2187ba['folderPath'],'resourceType':_0x2187ba[_0x49ec91(0x17c)],'isScoped':_0x13dda6[_0x49ec91(0x194)],'scopedFolderPath':_0x13dda6[_0x49ec91(0x173)]};}catch(_0x4c2364){const _0xfc11d6=_0x4c2364 instanceof Error?_0x4c2364['message']:String(_0x4c2364);if(_0xfc11d6[_0x49ec91(0x184)]('File\x20not\x20found'))return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x192),'message':_0x49ec91(0x191)+_0x244142,'arg':_0x244142};if(_0xfc11d6[_0x49ec91(0x184)](_0x49ec91(0x170))){if(_0x123d4e){const _0x5a2433=a164_0x5d9d0f[_0x49ec91(0x182)](_0x244142);if(await fs[_0x49ec91(0x1a2)](_0x5a2433)){const _0x499b61=a164_0x5d9d0f[_0x49ec91(0x195)](_0x5a2433),_0x51b28a=await fs[_0x49ec91(0x19f)](_0x5a2433),_0x1a807e=_0x51b28a[_0x49ec91(0x197)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x47baf6=_0x51b28a[_0x49ec91(0x197)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x78c642=_0x1a807e?_0x1a807e[0x1][_0x49ec91(0x196)]():a164_0x5d9d0f['basename'](_0x244142,a164_0x5d9d0f[_0x49ec91(0x19c)](_0x244142)),_0x491d6d=_0x47baf6&&_0x47baf6[0x1][_0x49ec91(0x196)]()===_0x49ec91(0x17a)?'journey':_0x49ec91(0x17e);return{'type':_0x49ec91(0x199),'parentName':_0x123d4e,'targetDir':_0x499b61,'configRoot':_0x499b61,'filePath':_0x5a2433,'resourceName':_0x78c642,'folderPath':'','resourceType':_0x491d6d,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x1a0),'message':_0x49ec91(0x175)+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x188)};}return{'type':'error','errorCode':_0x49ec91(0x172),'message':_0xfc11d6,'arg':_0x244142};}if(_0x244142){const _0x11e986=a164_0x5d9d0f['resolve'](cwd,_0x244142);let _0x1df0f4=null;try{_0x1df0f4=await fs[_0x49ec91(0x180)](_0x11e986);}catch{}if(_0x1df0f4?.[_0x49ec91(0x19b)]()){const _0xf9f146=await findTdxConfigAsync(_0x11e986,fs);if(_0xf9f146){const _0x459b2e=calculateScopedPath(_0x11e986,_0xf9f146[_0x49ec91(0x1a1)]);return{'type':_0x49ec91(0x1a4),'parentName':_0xf9f146['parentSegment'],'targetDir':_0x11e986,'configRoot':_0xf9f146['configDir'],'isScoped':_0x459b2e[_0x49ec91(0x194)],'scopedFolderPath':_0x459b2e[_0x49ec91(0x173)]};}if(_0x123d4e)return{'type':_0x49ec91(0x1a4),'parentName':_0x123d4e,'targetDir':_0x11e986,'configRoot':_0x11e986,'isScoped':![],'scopedFolderPath':''};return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x1a0),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x188)};}if(_0x1df0f4?.[_0x49ec91(0x185)]())return{'type':_0x49ec91(0x18c),'errorCode':_0x49ec91(0x172),'message':_0x49ec91(0x1a3)+_0x244142,'arg':_0x244142,'helpText':_0x49ec91(0x181)};const _0x257d87=sanitizeFileName(_0x244142),_0x1e0b9d=getSegmentRootDir(_0x257d87,cwd);return{'type':_0x49ec91(0x193),'parentName':_0x244142,'targetDir':_0x1e0b9d,'configRoot':_0x1e0b9d};}const _0x1a1e63=await findTdxConfigAsync(cwd,fs);if(_0x1a1e63){const _0x3a0da6=calculateScopedPath(cwd,_0x1a1e63[_0x49ec91(0x1a1)]);return{'type':_0x49ec91(0x18a),'parentName':_0x1a1e63[_0x49ec91(0x17b)],'targetDir':cwd,'configRoot':_0x1a1e63[_0x49ec91(0x1a1)],'isScoped':_0x3a0da6[_0x49ec91(0x194)],'scopedFolderPath':_0x3a0da6[_0x49ec91(0x173)]};}if(_0x123d4e){const _0x1d4773=sanitizeFileName(_0x123d4e),_0x292387=getSegmentRootDir(_0x1d4773,cwd);return{'type':_0x49ec91(0x18a),'parentName':_0x123d4e,'targetDir':_0x292387,'configRoot':_0x292387,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x49ec91(0x18c),'errorCode':'no_parent','message':_0x49ec91(0x177),'helpText':_0x49ec91(0x190)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a165_0xee5c02=a165_0x1500;(function(_0x46900b,_0x5d44a2){const _0x29fb67=a165_0x1500,_0xddb67d=_0x46900b();while(!![]){try{const _0x54ed76=parseInt(_0x29fb67(0x8a))/0x1+-parseInt(_0x29fb67(0x89))/0x2+parseInt(_0x29fb67(0x7a))/0x3+parseInt(_0x29fb67(0x81))/0x4*(-parseInt(_0x29fb67(0x8f))/0x5)+-parseInt(_0x29fb67(0x85))/0x6+-parseInt(_0x29fb67(0x7c))/0x7+parseInt(_0x29fb67(0x7f))/0x8*(parseInt(_0x29fb67(0x86))/0x9);if(_0x54ed76===_0x5d44a2)break;else _0xddb67d['push'](_0xddb67d['shift']());}catch(_0x154ab7){_0xddb67d['push'](_0xddb67d['shift']());}}}(a165_0x543c,0x63579));import{existsSync,readFileSync}from'fs';import a165_0x2c1981 from'path';const TDX_CONFIG_FILE=a165_0xee5c02(0x90),SEGMENTS_DIR=a165_0xee5c02(0x92);export function findTdxConfigPath(_0x199826=process[a165_0xee5c02(0x96)]()){const _0x28fc97=a165_0xee5c02;let _0x49f0a8=a165_0x2c1981[_0x28fc97(0x8d)](_0x199826);const _0x4316d8=a165_0x2c1981['parse'](_0x49f0a8)[_0x28fc97(0x7d)];while(_0x49f0a8!==_0x4316d8){const _0x53bd26=a165_0x2c1981[_0x28fc97(0x87)](_0x49f0a8,TDX_CONFIG_FILE);if(existsSync(_0x53bd26))return _0x53bd26;_0x49f0a8=a165_0x2c1981[_0x28fc97(0x7e)](_0x49f0a8);}return null;}export function loadTdxConfig(_0xe0213a){const _0x3ce022=a165_0xee5c02,_0x3e3047=readFileSync(_0xe0213a,'utf-8');let _0x553edc;try{_0x553edc=JSON[_0x3ce022(0x82)](_0x3e3047);}catch{throw new Error(_0x3ce022(0x80)+_0xe0213a);}if(!_0x553edc||typeof _0x553edc!==_0x3ce022(0x8e))throw new Error(_0x3ce022(0x88));const _0xb74637=_0x553edc,_0xba15e=_0xb74637[_0x3ce022(0x95)]&&typeof _0xb74637[_0x3ce022(0x95)]==='string',_0x337148=_0xb74637[_0x3ce022(0x94)]&&typeof _0xb74637['engage_workspace']===_0x3ce022(0x84);if(!_0xba15e&&!_0x337148)throw new Error(_0x3ce022(0x8c));const _0x4d3c02={};return _0xba15e&&(_0x4d3c02[_0x3ce022(0x95)]=_0xb74637[_0x3ce022(0x95)]),_0x337148&&(_0x4d3c02[_0x3ce022(0x94)]=_0xb74637['engage_workspace']),_0x4d3c02;}function a165_0x1500(_0xf729bb,_0x5e7a7a){_0xf729bb=_0xf729bb-0x7a;const _0x543c91=a165_0x543c();let _0x1500ce=_0x543c91[_0xf729bb];return _0x1500ce;}export function findTdxConfig(_0x171043=process[a165_0xee5c02(0x96)]()){const _0x47c098=a165_0xee5c02,_0x972424=findTdxConfigPath(_0x171043);if(!_0x972424)throw new Error(_0x47c098(0x8b));const _0x32bc82=loadTdxConfig(_0x972424),_0x10c223=a165_0x2c1981[_0x47c098(0x7e)](_0x972424);return{'config':_0x32bc82,'configPath':_0x972424,'configDir':_0x10c223};}export function tryFindTdxConfig(_0x23c047){try{return findTdxConfig(_0x23c047);}catch{return null;}}export function getSegmentRootDir(_0x2b23a5,_0x5aa72c=process[a165_0xee5c02(0x96)]()){const _0x35b608=a165_0xee5c02;return a165_0x2c1981[_0x35b608(0x87)](_0x5aa72c,SEGMENTS_DIR,_0x2b23a5);}function a165_0x543c(){const _0x96338d=['resolve','object','10bwNBar','tdx.json','relative','segments','startsWith','engage_workspace','parent_segment','cwd','1925046MMoJrI','replace','3925215JCZPZz','root','dirname','8GwgAfC','Invalid\x20JSON\x20in\x20','988956ZGHBqP','parse','stringify','string','3661560ODFqNr','10296756FEdZhc','join','Invalid\x20tdx.json:\x20expected\x20object','682178oERaqp','627711DdRWRl','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field'];a165_0x543c=function(){return _0x96338d;};return a165_0x543c();}export function getTdxConfigPath(_0x4b7ecd,_0x510187=process[a165_0xee5c02(0x96)]()){const _0x581ed5=a165_0xee5c02;return a165_0x2c1981[_0x581ed5(0x87)](getSegmentRootDir(_0x4b7ecd,_0x510187),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x17dd86,_0x9972fd){const _0x14f82e=a165_0xee5c02,_0x534316=a165_0x2c1981[_0x14f82e(0x8d)](_0x17dd86),_0x4aea15=a165_0x2c1981[_0x14f82e(0x91)](_0x9972fd,_0x534316);if(_0x4aea15[_0x14f82e(0x93)]('..'))return'';return _0x4aea15;}export function localPathToTdFolderPath(_0xb915b4){const _0x5226e4=a165_0xee5c02,_0xf25b30=a165_0x2c1981[_0x5226e4(0x7e)](_0xb915b4);if(_0xf25b30==='.'||_0xf25b30==='')return'';return _0xf25b30[_0x5226e4(0x7b)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x36dfef,_0x2f394f){const _0x45feab=a165_0xee5c02;if(!_0x36dfef)return _0x2f394f;return a165_0x2c1981[_0x45feab(0x87)](_0x2f394f,_0x36dfef);}export function createTdxConfigContent(_0x27785c){const _0x16323e=a165_0xee5c02,_0x34b523={'parent_segment':_0x27785c};return JSON[_0x16323e(0x83)](_0x34b523,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x528922){const _0x373902=a165_0xee5c02,_0x4dbb4c={'engage_workspace':_0x528922};return JSON[_0x373902(0x83)](_0x4dbb4c,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0x4e89e7=a166_0x4d6a;(function(_0x5a372b,_0x4bed8a){const _0x3eaf6b=a166_0x4d6a,_0x3aacaa=_0x5a372b();while(!![]){try{const _0x419e71=-parseInt(_0x3eaf6b(0x86))/0x1*(parseInt(_0x3eaf6b(0x82))/0x2)+parseInt(_0x3eaf6b(0x85))/0x3*(parseInt(_0x3eaf6b(0x72))/0x4)+parseInt(_0x3eaf6b(0x7d))/0x5+-parseInt(_0x3eaf6b(0x67))/0x6+parseInt(_0x3eaf6b(0x69))/0x7*(-parseInt(_0x3eaf6b(0x8b))/0x8)+-parseInt(_0x3eaf6b(0x7b))/0x9+-parseInt(_0x3eaf6b(0x77))/0xa*(-parseInt(_0x3eaf6b(0x6d))/0xb);if(_0x419e71===_0x4bed8a)break;else _0x3aacaa['push'](_0x3aacaa['shift']());}catch(_0x8dce27){_0x3aacaa['push'](_0x3aacaa['shift']());}}}(a166_0x3dc6,0x46918));function a166_0x4d6a(_0x2846df,_0x176631){_0x2846df=_0x2846df-0x67;const _0x3dc6f7=a166_0x3dc6();let _0x4d6ad2=_0x3dc6f7[_0x2846df];return _0x4d6ad2;}import{z}from'zod';export const ScheduleTypeSchema=z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x70),a166_0x4e89e7(0x75),a166_0x4e89e7(0x8c),'weekly',a166_0x4e89e7(0x84),a166_0x4e89e7(0x8d),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a166_0x4e89e7(0x8e),'hour','day',a166_0x4e89e7(0x74),'month',a166_0x4e89e7(0x78),a166_0x4e89e7(0x70)]);function a166_0x3dc6(){const _0x441181=['clear','217701SUOJrx','array','asc','none','string','4mZjPNQ','enum','week','hourly','object','470ZIIAiH','once','boolean','number','3962394yDMgDc','desc','2733200qgfnon','rows','Connection\x20name\x20is\x20required','nullable','onSuccess','16586pFPwkO','unknown','monthly','1295670ktdwHE','45dVCena','Top-N','min','Activation\x20name\x20is\x20required','optional','16192RRXoqX','daily','cron','minute','3100656pfgfdD','cols','1001nYRcXS','First','record'];a166_0x3dc6=function(){return _0x441181;};return a166_0x3dc6();}export const ScheduleDefSchema=z[a166_0x4e89e7(0x76)]({'type':ScheduleTypeSchema[a166_0x4e89e7(0x8a)](),'repeat_unit':RepeatUnitSchema[a166_0x4e89e7(0x8a)](),'repeat_frequency':z[a166_0x4e89e7(0x7a)]()['optional'](),'repeat_sub_frequency':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x7a)]())[a166_0x4e89e7(0x8a)](),'start_at':z[a166_0x4e89e7(0x71)]()['nullable']()['optional'](),'end_on':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x80)]()[a166_0x4e89e7(0x8a)](),'timezone':z[a166_0x4e89e7(0x71)]()['optional']()});export const NotificationDefSchema=z[a166_0x4e89e7(0x76)]({'notify_on':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x81),'onFailure']))[a166_0x4e89e7(0x8a)](),'email_recipients':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x71)]())[a166_0x4e89e7(0x8a)]()});export const ActivationColumnDefSchema=z['union']([z[a166_0x4e89e7(0x71)](),z[a166_0x4e89e7(0x76)]({'name':z[a166_0x4e89e7(0x71)](),'type':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'visibility':z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x6c),'masked'])[a166_0x4e89e7(0x8a)]()})]);export const ActivationBehaviorDefSchema=z[a166_0x4e89e7(0x76)]({'columns':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x76)]({'name':z['string'](),'type':z[a166_0x4e89e7(0x71)]()['optional'](),'visibility':z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x6c),'masked'])[a166_0x4e89e7(0x8a)]()}))[a166_0x4e89e7(0x8a)](),'behavior_table':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'join_row':z[a166_0x4e89e7(0x7a)]()[a166_0x4e89e7(0x80)]()[a166_0x4e89e7(0x8a)](),'join_strategy':z[a166_0x4e89e7(0x73)](['All',a166_0x4e89e7(0x6a),'Last',a166_0x4e89e7(0x87)])[a166_0x4e89e7(0x8a)](),'formatting':z['enum']([a166_0x4e89e7(0x7e),a166_0x4e89e7(0x68)])[a166_0x4e89e7(0x8a)](),'order_by':z[a166_0x4e89e7(0x6e)](z[a166_0x4e89e7(0x76)]({'key':z[a166_0x4e89e7(0x71)](),'order':z[a166_0x4e89e7(0x73)]([a166_0x4e89e7(0x6f),a166_0x4e89e7(0x7c)])}))['optional']()});export const ActivationDefSchema=z[a166_0x4e89e7(0x76)]({'name':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x88)](0x1,a166_0x4e89e7(0x89)),'description':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'connection':z['string']()[a166_0x4e89e7(0x88)](0x1,a166_0x4e89e7(0x7f)),'all_columns':z[a166_0x4e89e7(0x79)]()[a166_0x4e89e7(0x8a)](),'columns':z[a166_0x4e89e7(0x6e)](ActivationColumnDefSchema)[a166_0x4e89e7(0x8a)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a166_0x4e89e7(0x6b)](z[a166_0x4e89e7(0x71)](),z[a166_0x4e89e7(0x83)]())[a166_0x4e89e7(0x8a)](),'activation_template_id':z[a166_0x4e89e7(0x71)]()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a166_0x4e89e7(0x80)]()[a166_0x4e89e7(0x8a)](),'run_after_journey_refresh':z[a166_0x4e89e7(0x79)]()[a166_0x4e89e7(0x8a)](),'nested_workflow_project_name':z[a166_0x4e89e7(0x71)]()[a166_0x4e89e7(0x8a)](),'nested_workflow_name':z[a166_0x4e89e7(0x71)]()['optional'](),'lock_enabled':z[a166_0x4e89e7(0x79)]()[a166_0x4e89e7(0x8a)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x445b7c,_0x1d795){var _0x24e19c=a167_0x14a6,_0x5c8d88=_0x445b7c();while(!![]){try{var _0x4ca46c=parseInt(_0x24e19c(0x180))/0x1*(parseInt(_0x24e19c(0x182))/0x2)+-parseInt(_0x24e19c(0x184))/0x3+-parseInt(_0x24e19c(0x17e))/0x4+parseInt(_0x24e19c(0x17c))/0x5*(-parseInt(_0x24e19c(0x181))/0x6)+parseInt(_0x24e19c(0x17f))/0x7+-parseInt(_0x24e19c(0x183))/0x8*(-parseInt(_0x24e19c(0x185))/0x9)+parseInt(_0x24e19c(0x17d))/0xa;if(_0x4ca46c===_0x1d795)break;else _0x5c8d88['push'](_0x5c8d88['shift']());}catch(_0x2cb8e1){_0x5c8d88['push'](_0x5c8d88['shift']());}}}(a167_0x347b,0x6a080));function a167_0x347b(){var _0xfb6dc5=['5132870qHsKIw','411128cONGMX','5522314ANdWuK','1yPeLLt','144JKRgLo','817538yMGMIq','20920rOPzzK','2560629eDnBLa','225TbtuqB','80355BmgeEg'];a167_0x347b=function(){return _0xfb6dc5;};return a167_0x347b();}function a167_0x14a6(_0x52e398,_0x367b9f){_0x52e398=_0x52e398-0x17c;var _0x347bb4=a167_0x347b();var _0x14a617=_0x347bb4[_0x52e398];return _0x14a617;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a168_0x407b84=a168_0x50a0;(function(_0x2ed267,_0x466b1d){const _0x732529=a168_0x50a0,_0x288d69=_0x2ed267();while(!![]){try{const _0xba00ab=parseInt(_0x732529(0xf1))/0x1*(-parseInt(_0x732529(0xeb))/0x2)+parseInt(_0x732529(0xe0))/0x3+parseInt(_0x732529(0xf3))/0x4+-parseInt(_0x732529(0xe3))/0x5+parseInt(_0x732529(0x100))/0x6*(-parseInt(_0x732529(0xfc))/0x7)+-parseInt(_0x732529(0xde))/0x8*(-parseInt(_0x732529(0xe6))/0x9)+parseInt(_0x732529(0xdb))/0xa;if(_0xba00ab===_0x466b1d)break;else _0x288d69['push'](_0x288d69['shift']());}catch(_0x264a3f){_0x288d69['push'](_0x288d69['shift']());}}}(a168_0xf916,0xeba43));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a168_0xf916(){const _0x2736fd=['array','string','launched','literal','1752629WsaKUy','end','4852868OTyQep','journey','decision_point','object','optional','boolean','reentry_unless_goal_achieved','enum','refine','6086836fRtJxC','min','type','draft','12omMDIJ','merge','length','number','jump','isArray','25225100wddsDG','simulation','ab_test','2536VkjpOS','filter','764424oLVUHP','wait','reentry_always','15500BdIomq','activation','no_reentry','13329mJOZxg','lazy','journeys','passthrough','record','2tDbsuL','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'];a168_0xf916=function(){return _0x2736fd;};return a168_0xf916();}function a168_0x50a0(_0x295907,_0x13693e){_0x295907=_0x295907-0xd6;const _0xf916e7=a168_0xf916();let _0x50a020=_0xf916e7[_0x295907];return _0x50a020;}export const JourneyStateTypeSchema=z[a168_0x407b84(0xfa)]([a168_0x407b84(0xff),a168_0x407b84(0xdc),a168_0x407b84(0xef)]);export const ReentryModeTypeSchema=z['enum']([a168_0x407b84(0xe5),a168_0x407b84(0xf9),a168_0x407b84(0xe2)]);export const WaitUnitTypeSchema=z[a168_0x407b84(0xfa)](['day','week']);export const StepTypeValueSchema=z[a168_0x407b84(0xfa)]([a168_0x407b84(0xe1),a168_0x407b84(0xe4),'decision_point',a168_0x407b84(0xdd),a168_0x407b84(0xd6),a168_0x407b84(0xd9),a168_0x407b84(0xf2)]);export const EmbeddedSegmentDefSchema=z[a168_0x407b84(0xf6)]({'description':z[a168_0x407b84(0xee)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a168_0x407b84(0xf6)]({'journey':z[a168_0x407b84(0xee)](),'stage':z[a168_0x407b84(0xee)](),'bundle_id':z['string']()[a168_0x407b84(0xf7)]()});export const CriteriaDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)](),'description':z['string']()[a168_0x407b84(0xf7)](),'segment':z[a168_0x407b84(0xee)](),'target':JumpTargetDefSchema[a168_0x407b84(0xf7)]()});const WaitConditionTimeoutDefSchema=z[a168_0x407b84(0xf6)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)]()}),WaitConditionDefSchema=z[a168_0x407b84(0xf6)]({'segment':z[a168_0x407b84(0xee)](),'next':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'timeout':WaitConditionTimeoutDefSchema[a168_0x407b84(0xf7)]()}),WaitStepParamsDefSchema=z[a168_0x407b84(0xf6)]({'duration':z['number']()[a168_0x407b84(0xf7)](),'unit':WaitUnitTypeSchema[a168_0x407b84(0xf7)](),'wait_until':z[a168_0x407b84(0xee)]()['optional'](),'condition':WaitConditionDefSchema[a168_0x407b84(0xf7)](),'days_of_week':z['array'](z[a168_0x407b84(0xee)]())[a168_0x407b84(0xf7)]()}),StepBaseFields={'name':z[a168_0x407b84(0xee)](),'uuid':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'next':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xe1)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a168_0x407b84(0xf6)]({'activation':z[a168_0x407b84(0xee)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)](),'segment':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'segment_id':z['string']()[a168_0x407b84(0xf7)](),'excluded':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)](),'next':z['string']()[a168_0x407b84(0xf7)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a168_0x407b84(0xed)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a168_0x407b84(0xf6)]({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xf5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a168_0x407b84(0xf6)]({'id':z[a168_0x407b84(0xee)]()['optional'](),'name':z[a168_0x407b84(0xee)](),'percentage':z[a168_0x407b84(0xd8)](),'next':z[a168_0x407b84(0xee)]()['optional']()}),AbTestStepParamsDefSchema=z[a168_0x407b84(0xf6)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'customized_split':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xdd)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a168_0x407b84(0xf6)]({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xd6))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xf2))})[a168_0x407b84(0xe9)]();export const StepDefSchema=z['discriminatedUnion'](a168_0x407b84(0xfe),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)](),'description':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'id':z[a168_0x407b84(0xee)]()['optional'](),'entry_criteria':CriteriaDefSchema[a168_0x407b84(0xf7)](),'exit_criteria':z[a168_0x407b84(0xed)](CriteriaDefSchema)[a168_0x407b84(0xf7)](),'milestone':CriteriaDefSchema[a168_0x407b84(0xf7)](),'root_step':z['string']()[a168_0x407b84(0xf7)](),'steps':z[a168_0x407b84(0xed)](StepDefSchema)[a168_0x407b84(0xf7)]()});export const JourneyEntryDefSchema=z[a168_0x407b84(0xf6)]({'name':z[a168_0x407b84(0xee)]()['optional'](),'version':z['string']()[a168_0x407b84(0xf7)](),'state':JourneyStateTypeSchema[a168_0x407b84(0xf7)](),'latest':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)](),'stages':z['array'](StageDefSchema),'id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'version_number':z['number']()[a168_0x407b84(0xf7)](),'goal':CriteriaDefSchema[a168_0x407b84(0xf7)](),'reentry':ReentryModeTypeSchema[a168_0x407b84(0xf7)]()});export const JourneyDefSchema=z[a168_0x407b84(0xe7)](()=>z[a168_0x407b84(0xf6)]({'type':z[a168_0x407b84(0xf0)](a168_0x407b84(0xf4)),'name':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xfd)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'bundle_id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'bundle_name':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'folder_id':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'reentry':ReentryModeTypeSchema[a168_0x407b84(0xf7)](),'allow_reentry':z[a168_0x407b84(0xf8)]()[a168_0x407b84(0xf7)](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()[a168_0x407b84(0xf7)](),'version':z[a168_0x407b84(0xee)]()[a168_0x407b84(0xf7)](),'version_number':z[a168_0x407b84(0xd8)]()['optional'](),'stages':z[a168_0x407b84(0xed)](StageDefSchema)[a168_0x407b84(0xf7)](),'versions':z[a168_0x407b84(0xed)](JourneyEntryDefSchema)[a168_0x407b84(0xf7)](),'journeys':z[a168_0x407b84(0xed)](JourneyEntryDefSchema)[a168_0x407b84(0xf7)](),'segments':z[a168_0x407b84(0xea)](z['string'](),EmbeddedSegmentDefSchema)[a168_0x407b84(0xf7)](),'activations':z[a168_0x407b84(0xea)](z['string'](),ActivationDefSchema)[a168_0x407b84(0xf7)]()})[a168_0x407b84(0xfb)](_0x33b116=>{const _0x1d1819=a168_0x407b84,_0x391d2f=[_0x33b116[_0x1d1819(0xe8)],_0x33b116['stages'],_0x33b116['versions']][_0x1d1819(0xdf)](_0x4ed114=>Array[_0x1d1819(0xda)](_0x4ed114)&&_0x4ed114[_0x1d1819(0xd7)]>0x0)[_0x1d1819(0xd7)];return _0x391d2f===0x1;},{'message':a168_0x407b84(0xec)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d8a20,_0x5c0d99){var _0x3f94e2=a170_0x1cd7,_0x1d837d=_0x2d8a20();while(!![]){try{var _0x36f713=-parseInt(_0x3f94e2(0xad))/0x1+parseInt(_0x3f94e2(0xae))/0x2+parseInt(_0x3f94e2(0xb1))/0x3+-parseInt(_0x3f94e2(0xb0))/0x4+-parseInt(_0x3f94e2(0xaf))/0x5+-parseInt(_0x3f94e2(0xb3))/0x6+parseInt(_0x3f94e2(0xb2))/0x7;if(_0x36f713===_0x5c0d99)break;else _0x1d837d['push'](_0x1d837d['shift']());}catch(_0x2262b0){_0x1d837d['push'](_0x1d837d['shift']());}}}(a170_0x2c2f,0xac931));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a170_0x1cd7(_0xfa751,_0x4f3228){_0xfa751=_0xfa751-0xad;var _0x2c2fc7=a170_0x2c2f();var _0x1cd753=_0x2c2fc7[_0xfa751];return _0x1cd753;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a170_0x2c2f(){var _0x1befaf=['541804DitbiI','6627160dAymYD','3825204foUNmW','2872542EetXCq','22443295ubFmpU','7376724RfjRlc','216549ldjSiR'];a170_0x2c2f=function(){return _0x1befaf;};return a170_0x2c2f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a171_0x3fe414=a171_0x51fd;(function(_0xb05b80,_0x53d043){const _0x478fb1=a171_0x51fd,_0x23b05e=_0xb05b80();while(!![]){try{const _0x4b62d8=-parseInt(_0x478fb1(0x171))/0x1*(parseInt(_0x478fb1(0x166))/0x2)+-parseInt(_0x478fb1(0x18b))/0x3*(-parseInt(_0x478fb1(0x168))/0x4)+-parseInt(_0x478fb1(0x186))/0x5*(parseInt(_0x478fb1(0x16a))/0x6)+parseInt(_0x478fb1(0x16b))/0x7*(-parseInt(_0x478fb1(0x1a2))/0x8)+parseInt(_0x478fb1(0x192))/0x9+-parseInt(_0x478fb1(0x1ab))/0xa*(-parseInt(_0x478fb1(0x175))/0xb)+-parseInt(_0x478fb1(0x17f))/0xc*(parseInt(_0x478fb1(0x17c))/0xd);if(_0x4b62d8===_0x53d043)break;else _0x23b05e['push'](_0x23b05e['shift']());}catch(_0x2d8562){_0x23b05e['push'](_0x23b05e['shift']());}}}(a171_0x3480,0x5e686));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a171_0x3fe414(0x167),'Greater',a171_0x3fe414(0x184),'GreaterEqual',a171_0x3fe414(0x176),'In',a171_0x3fe414(0x17e),'Regexp',a171_0x3fe414(0x1ac),a171_0x3fe414(0x1a4),a171_0x3fe414(0x1a7),a171_0x3fe414(0x188),a171_0x3fe414(0x162),'EndWith',a171_0x3fe414(0x1aa)]);export const TimeUnitSchema=z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x16e),a171_0x3fe414(0x193),'hour','day',a171_0x3fe414(0x183),a171_0x3fe414(0x161),a171_0x3fe414(0x165)]);export const AggregationTypeSchema=z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x18e),a171_0x3fe414(0x1a1),a171_0x3fe414(0x18d),a171_0x3fe414(0x181),a171_0x3fe414(0x172),a171_0x3fe414(0x189),a171_0x3fe414(0x164),a171_0x3fe414(0x16f)]);const TemporalValueSchema=z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x18a)]({'timestamp':z['string']()}),z[a171_0x3fe414(0x18a)]({'last':z[a171_0x3fe414(0x15d)]([z['number'](),z[a171_0x3fe414(0x15c)](z['string'](),z[a171_0x3fe414(0x169)]())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z['string'](),z[a171_0x3fe414(0x169)](),z[a171_0x3fe414(0x199)](),TemporalValueSchema,z['array'](z['union']([z[a171_0x3fe414(0x177)](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a171_0x3fe414(0x198),a171_0x3fe414(0x163),a171_0x3fe414(0x184),a171_0x3fe414(0x176),'In',a171_0x3fe414(0x188),'StartWith',a171_0x3fe414(0x16c),'Regexp',a171_0x3fe414(0x1a4),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a171_0x3fe414(0x1a4),a171_0x3fe414(0x1a7)]);export const OperatorDefSchema=z[a171_0x3fe414(0x18a)]({'type':OperatorTypeSchema,'not':z[a171_0x3fe414(0x199)]()['optional'](),'value':OperatorValueSchema[a171_0x3fe414(0x187)](),'min':z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x169)](),z[a171_0x3fe414(0x177)](),TemporalValueSchema])[a171_0x3fe414(0x187)](),'max':z[a171_0x3fe414(0x15d)]([z['number'](),z[a171_0x3fe414(0x177)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z[a171_0x3fe414(0x18a)]({'day':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'week':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'month':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'year':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'hour':z[a171_0x3fe414(0x169)]()['optional'](),'minute':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)](),'second':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)]()})[a171_0x3fe414(0x187)](),'from':z[a171_0x3fe414(0x18a)]({'last':z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x169)](),z[a171_0x3fe414(0x177)]()]),'unit':TimeUnitSchema})[a171_0x3fe414(0x187)](),'reverse':z[a171_0x3fe414(0x199)]()[a171_0x3fe414(0x187)]()})[a171_0x3fe414(0x194)]((_0x456ef5,_0x265315)=>{const _0x3d3338=a171_0x3fe414;OPERATORS_REQUIRING_VALUE['has'](_0x456ef5[_0x3d3338(0x182)])&&(_0x456ef5['value']===undefined||_0x456ef5[_0x3d3338(0x1ad)]===null)&&_0x265315[_0x3d3338(0x179)]({'code':_0x3d3338(0x19b),'message':'Operator\x20\x27'+_0x456ef5[_0x3d3338(0x182)]+_0x3d3338(0x15f),'path':[_0x3d3338(0x1ad)]}),_0x456ef5['type']===_0x3d3338(0x17e)&&_0x456ef5[_0x3d3338(0x18f)]===undefined&&_0x456ef5[_0x3d3338(0x173)]===undefined&&_0x265315[_0x3d3338(0x179)]({'code':_0x3d3338(0x19b),'message':_0x3d3338(0x1a9),'params':{'validationCode':_0x3d3338(0x190)}}),OPERATORS_REQUIRING_UNIT[_0x3d3338(0x1a5)](_0x456ef5[_0x3d3338(0x182)])&&_0x456ef5['value']!==undefined&&!_0x456ef5['unit']&&_0x265315[_0x3d3338(0x179)]({'code':'custom','message':_0x3d3338(0x19e)+_0x456ef5[_0x3d3338(0x182)]+_0x3d3338(0x19c),'path':[_0x3d3338(0x160)],'params':{'validationCode':_0x3d3338(0x195)}}),_0x456ef5[_0x3d3338(0x182)]===_0x3d3338(0x1aa)&&(!_0x456ef5['duration']&&_0x265315[_0x3d3338(0x179)]({'code':'custom','message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x456ef5[_0x3d3338(0x191)]&&_0x265315[_0x3d3338(0x179)]({'code':_0x3d3338(0x19b),'message':_0x3d3338(0x19a),'path':['from']}));});export const ArrayMatchingSchema=z[a171_0x3fe414(0x15d)]([z[a171_0x3fe414(0x180)](a171_0x3fe414(0x170)),z[a171_0x3fe414(0x180)]('all'),z[a171_0x3fe414(0x18a)]({'atLeast':z[a171_0x3fe414(0x169)]()}),z[a171_0x3fe414(0x18a)]({'atMost':z['number']()}),z[a171_0x3fe414(0x18a)]({'exactly':z[a171_0x3fe414(0x169)]()})]);function a171_0x51fd(_0x24df13,_0x3ecfbf){_0x24df13=_0x24df13-0x15c;const _0x3480a4=a171_0x3480();let _0x51fdc9=_0x3480a4[_0x24df13];return _0x51fdc9;}export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x1a1),a171_0x3fe414(0x181),a171_0x3fe414(0x172),'Average']),'column':z[a171_0x3fe414(0x177)](),'groupingColumns':z[a171_0x3fe414(0x17b)](z[a171_0x3fe414(0x177)]())['optional']()}),z['object']({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x18e)),'groupingColumns':z[a171_0x3fe414(0x17b)](z[a171_0x3fe414(0x177)]())['optional']()}),z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x189)),'columns':z[a171_0x3fe414(0x17b)](z['string']())}),z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)](['First','Last']),'column':z['string'](),'orderColumn':z[a171_0x3fe414(0x177)](),'groupingColumns':z['array'](z[a171_0x3fe414(0x177)]())['optional']()})]);function a171_0x3480(){const _0x24431a=['from','3958956Fpakwe','minute','superRefine','MISSING_TIME_UNIT','segment','batch','Greater','boolean','TimeRange\x20operator\x20requires\x20\x27from\x27','custom','\x27\x20requires\x20a\x20time\x20unit','exclude','Operator\x20\x27','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','include','Sum','16NUVZyH','timestamp','TimeWithinPast','has','Segment\x20reference\x20must\x20not\x20be\x20empty','TimeWithinNext','Composite','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','TimeRange','345910NQZqjz','IsNull','value','lazy','record','union','realtime','\x27\x20requires\x20a\x20value','unit','month','StartWith','GreaterEqual','First','year','5602isfKRa','Equal','333584VtkGVt','number','6vZqYYr','42357riMbsI','EndWith','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','second','Last','any','53nKVzwX','Max','max','Column','209iDiFfo','LessEqual','string','Behavior','addIssue','enum','array','741rdMSSG','Segment\x20name\x20is\x20required','Between','54828EhgpkP','literal','Min','type','week','Less','operator','3115075JLhpRL','optional','Contain','CountDistinct','object','12aEuxDo','And','Average','Count','min','MISSING_BETWEEN_BOUNDS'];a171_0x3480=function(){return _0x24431a;};return a171_0x3480();}export const TimeWindowDefSchema=z[a171_0x3fe414(0x18a)]({'duration':z[a171_0x3fe414(0x169)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a171_0x3fe414(0x1a4),a171_0x3fe414(0x1a7),a171_0x3fe414(0x1aa)]);export const FilterColumnConditionDefSchema=z[a171_0x3fe414(0x18a)]({'type':z['literal']('Column'),'column':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x3fe414(0x187)]()})[a171_0x3fe414(0x194)]((_0xb387ae,_0x18304d)=>{const _0x41a416=a171_0x3fe414,_0xc4fc97=_0xb387ae[_0x41a416(0x185)][_0x41a416(0x182)];_0xb387ae['column']===_0x41a416(0x1a3)?!TIMESTAMP_OPERATORS['has'](_0xc4fc97)&&_0x18304d[_0x41a416(0x179)]({'code':_0x41a416(0x19b),'message':_0x41a416(0x19f)+_0xc4fc97+'\x27)','path':[_0x41a416(0x185),_0x41a416(0x182)]}):TIMESTAMP_OPERATORS['has'](_0xc4fc97)&&_0x18304d[_0x41a416(0x179)]({'code':_0x41a416(0x19b),'message':_0x41a416(0x19e)+_0xc4fc97+_0x41a416(0x16d),'path':[_0x41a416(0x185),'type']});});export const FilterRuleDefSchema=z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x18c)),'conditions':z[a171_0x3fe414(0x17b)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)]('Value'),'attribute':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x3fe414(0x187)](),'exclude':z['boolean']()[a171_0x3fe414(0x187)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a171_0x3fe414(0x187)](),'limit':z[a171_0x3fe414(0x169)]()[a171_0x3fe414(0x187)]()}));export const BehaviorConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x178)),'attribute':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x3fe414(0x187)](),'exclude':z['boolean']()[a171_0x3fe414(0x187)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'filter':FilterRuleDefSchema[a171_0x3fe414(0x187)](),'timeWindow':TimeWindowDefSchema[a171_0x3fe414(0x187)](),'limit':z[a171_0x3fe414(0x169)]()['optional']()}));export const ColumnConditionDefSchema=z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x174)),'column':z[a171_0x3fe414(0x177)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x18c),'Or',a171_0x3fe414(0x1a8)]),'conditions':z['array'](ConditionDefSchema),'description':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'expr':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a171_0x3fe414(0x1a0),a171_0x3fe414(0x19d)]),'segment':z[a171_0x3fe414(0x177)]()['min'](0x1,a171_0x3fe414(0x1a6))});export const ConditionDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x15d)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a171_0x3fe414(0x1ae)](()=>z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x17a)]([a171_0x3fe414(0x18c),'Or',a171_0x3fe414(0x1a8)]),'conditions':z[a171_0x3fe414(0x17b)](ConditionDefSchema),'description':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'expr':z[a171_0x3fe414(0x177)]()['optional']()}));export const SegmentDefSchema=z[a171_0x3fe414(0x18a)]({'type':z[a171_0x3fe414(0x180)](a171_0x3fe414(0x196))[a171_0x3fe414(0x187)](),'name':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x18f)](0x1,a171_0x3fe414(0x17d)),'description':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'folder':z[a171_0x3fe414(0x177)]()[a171_0x3fe414(0x187)](),'rule':RuleDefSchema[a171_0x3fe414(0x187)](),'kind':z['enum']([a171_0x3fe414(0x197),a171_0x3fe414(0x15e),'funnel_stage'])[a171_0x3fe414(0x187)](),'visible':z[a171_0x3fe414(0x199)]()['optional'](),'activations':z[a171_0x3fe414(0x17b)](z[a171_0x3fe414(0x170)]())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a171_0x512fb6=a171_0x2d56;(function(_0x4d16d9,_0x3fcc4a){const _0x5c61ca=a171_0x2d56,_0x2f35fb=_0x4d16d9();while(!![]){try{const _0x48ca61=-parseInt(_0x5c61ca(0x204))/0x1+-parseInt(_0x5c61ca(0x1f7))/0x2+-parseInt(_0x5c61ca(0x202))/0x3+-parseInt(_0x5c61ca(0x1fa))/0x4*(parseInt(_0x5c61ca(0x214))/0x5)+parseInt(_0x5c61ca(0x212))/0x6+-parseInt(_0x5c61ca(0x1f2))/0x7*(-parseInt(_0x5c61ca(0x1e5))/0x8)+parseInt(_0x5c61ca(0x1f3))/0x9;if(_0x48ca61===_0x3fcc4a)break;else _0x2f35fb['push'](_0x2f35fb['shift']());}catch(_0x2d9c44){_0x2f35fb['push'](_0x2f35fb['shift']());}}}(a171_0xcab9,0x4f928));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a171_0x512fb6(0x1f9),'Greater','Less',a171_0x512fb6(0x1f5),'LessEqual','In','Between',a171_0x512fb6(0x1e8),a171_0x512fb6(0x218),a171_0x512fb6(0x1e2),a171_0x512fb6(0x1d8),a171_0x512fb6(0x1e6),a171_0x512fb6(0x1ff),'EndWith',a171_0x512fb6(0x1eb)]);export const TimeUnitSchema=z['enum']([a171_0x512fb6(0x1f6),a171_0x512fb6(0x1ee),a171_0x512fb6(0x1dd),'day',a171_0x512fb6(0x219),a171_0x512fb6(0x1d1),'year']);export const AggregationTypeSchema=z[a171_0x512fb6(0x1d7)](['Count','Sum','Average',a171_0x512fb6(0x216),a171_0x512fb6(0x200),a171_0x512fb6(0x206),'First',a171_0x512fb6(0x1d6)]);function a171_0xcab9(){const _0x4e7696=['Max','number','246228PSeUvd','all','350679pTenqO','Column','CountDistinct','addIssue','discriminatedUnion','string','LessEqual','Value','min','union','Between','array','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Count','2614080IVXMNZ','MISSING_BETWEEN_BOUNDS','10UKvWTT','include','Min','boolean','IsNull','week','Composite','custom','month','TimeRange\x20operator\x20requires\x20\x27duration\x27','literal','batch','Sum','Last','enum','TimeWithinNext','Behavior','timestamp','Average','Greater','hour','segment','Segment\x20reference\x20must\x20not\x20be\x20empty','Operator\x20\x27','from','TimeWithinPast','duration','\x27\x20requires\x20a\x20time\x20unit','236792YHuisQ','Contain','And','Regexp','operator','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','TimeRange','object','superRefine','minute','unit','exclude','has','7QSRcam','8475795lWvBvk','lazy','GreaterEqual','second','703422oDComZ','optional','Equal','593280usTWHy','type','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','record','value','StartWith'];a171_0xcab9=function(){return _0x4e7696;};return a171_0xcab9();}const TemporalValueSchema=z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x1ec)]({'timestamp':z['string']()}),z[a171_0x512fb6(0x1ec)]({'last':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x1fd)](z[a171_0x512fb6(0x209)](),z[a171_0x512fb6(0x201)]())]),'unit':z[a171_0x512fb6(0x209)]()})]),OperatorValueSchema=z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x209)](),z['number'](),z['boolean'](),TemporalValueSchema,z[a171_0x512fb6(0x20f)](z['union']([z[a171_0x512fb6(0x209)](),z[a171_0x512fb6(0x201)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a171_0x512fb6(0x1f9),a171_0x512fb6(0x1dc),a171_0x512fb6(0x1f5),'Less',a171_0x512fb6(0x20a),'In',a171_0x512fb6(0x1e6),a171_0x512fb6(0x1ff),'EndWith',a171_0x512fb6(0x1e8),a171_0x512fb6(0x1e2),a171_0x512fb6(0x1d8)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a171_0x512fb6(0x1d8)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)](),'value':OperatorValueSchema[a171_0x512fb6(0x1f8)](),'min':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x209)](),TemporalValueSchema])[a171_0x512fb6(0x1f8)](),'max':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x209)](),TemporalValueSchema])[a171_0x512fb6(0x1f8)](),'unit':TimeUnitSchema[a171_0x512fb6(0x1f8)](),'duration':z['object']({'day':z['number']()[a171_0x512fb6(0x1f8)](),'week':z[a171_0x512fb6(0x201)]()['optional'](),'month':z[a171_0x512fb6(0x201)]()[a171_0x512fb6(0x1f8)](),'year':z[a171_0x512fb6(0x201)]()['optional'](),'hour':z[a171_0x512fb6(0x201)]()['optional'](),'minute':z['number']()[a171_0x512fb6(0x1f8)](),'second':z[a171_0x512fb6(0x201)]()[a171_0x512fb6(0x1f8)]()})[a171_0x512fb6(0x1f8)](),'from':z[a171_0x512fb6(0x1ec)]({'last':z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x201)](),z[a171_0x512fb6(0x209)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)]()})['superRefine']((_0x3a87b4,_0x4a4ca7)=>{const _0x5a8429=a171_0x512fb6;OPERATORS_REQUIRING_VALUE[_0x5a8429(0x1f1)](_0x3a87b4[_0x5a8429(0x1fb)])&&(_0x3a87b4[_0x5a8429(0x1fe)]===undefined||_0x3a87b4[_0x5a8429(0x1fe)]===null)&&_0x4a4ca7['addIssue']({'code':'custom','message':_0x5a8429(0x1e0)+_0x3a87b4['type']+'\x27\x20requires\x20a\x20value','path':[_0x5a8429(0x1fe)]}),_0x3a87b4[_0x5a8429(0x1fb)]===_0x5a8429(0x20e)&&_0x3a87b4['min']===undefined&&_0x3a87b4['max']===undefined&&_0x4a4ca7['addIssue']({'code':'custom','message':_0x5a8429(0x1ea),'params':{'validationCode':_0x5a8429(0x213)}}),OPERATORS_REQUIRING_UNIT[_0x5a8429(0x1f1)](_0x3a87b4[_0x5a8429(0x1fb)])&&_0x3a87b4[_0x5a8429(0x1fe)]!==undefined&&!_0x3a87b4[_0x5a8429(0x1ef)]&&_0x4a4ca7[_0x5a8429(0x207)]({'code':_0x5a8429(0x1d0),'message':_0x5a8429(0x1e0)+_0x3a87b4[_0x5a8429(0x1fb)]+_0x5a8429(0x1e4),'path':[_0x5a8429(0x1ef)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x3a87b4[_0x5a8429(0x1fb)]===_0x5a8429(0x1eb)&&(!_0x3a87b4[_0x5a8429(0x1e3)]&&_0x4a4ca7[_0x5a8429(0x207)]({'code':_0x5a8429(0x1d0),'message':_0x5a8429(0x1d2),'path':[_0x5a8429(0x1e3)]}),!_0x3a87b4[_0x5a8429(0x1e1)]&&_0x4a4ca7[_0x5a8429(0x207)]({'code':_0x5a8429(0x1d0),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':['from']}));});export const ArrayMatchingSchema=z[a171_0x512fb6(0x20d)]([z[a171_0x512fb6(0x1d3)]('any'),z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x203)),z['object']({'atLeast':z[a171_0x512fb6(0x201)]()}),z['object']({'atMost':z['number']()}),z[a171_0x512fb6(0x1ec)]({'exactly':z[a171_0x512fb6(0x201)]()})]);export const AggregationDefSchema=z[a171_0x512fb6(0x208)](a171_0x512fb6(0x1fb),[z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d7)]([a171_0x512fb6(0x1d5),a171_0x512fb6(0x216),'Max',a171_0x512fb6(0x1db)]),'column':z[a171_0x512fb6(0x209)](),'groupingColumns':z['array'](z[a171_0x512fb6(0x209)]())[a171_0x512fb6(0x1f8)]()}),z[a171_0x512fb6(0x1ec)]({'type':z['literal'](a171_0x512fb6(0x211)),'groupingColumns':z['array'](z[a171_0x512fb6(0x209)]())[a171_0x512fb6(0x1f8)]()}),z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x206)),'columns':z[a171_0x512fb6(0x20f)](z['string']())}),z['object']({'type':z[a171_0x512fb6(0x1d7)](['First','Last']),'column':z[a171_0x512fb6(0x209)](),'orderColumn':z[a171_0x512fb6(0x209)](),'groupingColumns':z[a171_0x512fb6(0x20f)](z[a171_0x512fb6(0x209)]())[a171_0x512fb6(0x1f8)]()})]);export const TimeWindowDefSchema=z[a171_0x512fb6(0x1ec)]({'duration':z[a171_0x512fb6(0x201)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a171_0x512fb6(0x1e2),a171_0x512fb6(0x1d8),a171_0x512fb6(0x1eb)]);export const FilterColumnConditionDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x205)),'column':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x512fb6(0x1f8)]()})[a171_0x512fb6(0x1ed)]((_0x26a0e2,_0x3b2366)=>{const _0xfb36d3=a171_0x512fb6,_0x56cff2=_0x26a0e2[_0xfb36d3(0x1e9)][_0xfb36d3(0x1fb)];_0x26a0e2['column']===_0xfb36d3(0x1da)?!TIMESTAMP_OPERATORS[_0xfb36d3(0x1f1)](_0x56cff2)&&_0x3b2366[_0xfb36d3(0x207)]({'code':_0xfb36d3(0x1d0),'message':_0xfb36d3(0x1fc)+_0x56cff2+'\x27)','path':['operator',_0xfb36d3(0x1fb)]}):TIMESTAMP_OPERATORS[_0xfb36d3(0x1f1)](_0x56cff2)&&_0x3b2366[_0xfb36d3(0x207)]({'code':'custom','message':_0xfb36d3(0x1e0)+_0x56cff2+_0xfb36d3(0x210),'path':['operator',_0xfb36d3(0x1fb)]});});export const FilterRuleDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)]('And'),'conditions':z[a171_0x512fb6(0x20f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x20b)),'attribute':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x512fb6(0x1f8)](),'exclude':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a171_0x512fb6(0x1f8)](),'limit':z[a171_0x512fb6(0x201)]()['optional']()}));function a171_0x2d56(_0xd4af48,_0x4dbff4){_0xd4af48=_0xd4af48-0x1cf;const _0xcab99c=a171_0xcab9();let _0x2d562b=_0xcab99c[_0xd4af48];return _0x2d562b;}export const BehaviorConditionDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x1d9)),'attribute':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a171_0x512fb6(0x1f8)](),'exclude':z['boolean']()[a171_0x512fb6(0x1f8)](),'aggregation':AggregationDefSchema[a171_0x512fb6(0x1f8)](),'source':z[a171_0x512fb6(0x209)]()[a171_0x512fb6(0x1f8)](),'filter':FilterRuleDefSchema[a171_0x512fb6(0x1f8)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a171_0x512fb6(0x1f8)]()}));export const ColumnConditionDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x205)),'column':z[a171_0x512fb6(0x209)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d7)]([a171_0x512fb6(0x1e7),'Or',a171_0x512fb6(0x1cf)]),'conditions':z['array'](ConditionDefSchema),'description':z[a171_0x512fb6(0x209)]()[a171_0x512fb6(0x1f8)](),'expr':z[a171_0x512fb6(0x209)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a171_0x512fb6(0x1ec)]({'type':z[a171_0x512fb6(0x1d7)]([a171_0x512fb6(0x215),a171_0x512fb6(0x1f0)]),'segment':z['string']()[a171_0x512fb6(0x20c)](0x1,a171_0x512fb6(0x1df))});export const ConditionDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x20d)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a171_0x512fb6(0x1f4)](()=>z[a171_0x512fb6(0x1ec)]({'type':z['enum']([a171_0x512fb6(0x1e7),'Or',a171_0x512fb6(0x1cf)]),'conditions':z[a171_0x512fb6(0x20f)](ConditionDefSchema),'description':z['string']()[a171_0x512fb6(0x1f8)](),'expr':z['string']()[a171_0x512fb6(0x1f8)]()}));export const SegmentDefSchema=z['object']({'type':z[a171_0x512fb6(0x1d3)](a171_0x512fb6(0x1de))[a171_0x512fb6(0x1f8)](),'name':z['string']()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a171_0x512fb6(0x209)]()['optional'](),'folder':z[a171_0x512fb6(0x209)]()['optional'](),'rule':RuleDefSchema[a171_0x512fb6(0x1f8)](),'kind':z['enum']([a171_0x512fb6(0x1d4),'realtime','funnel_stage'])['optional'](),'visible':z[a171_0x512fb6(0x217)]()[a171_0x512fb6(0x1f8)](),'activations':z[a171_0x512fb6(0x20f)](z['any']())[a171_0x512fb6(0x1f8)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a172_0x3e2586=a172_0x3c4a;(function(_0x129ad6,_0x2549ef){const _0x1ab934=a172_0x3c4a,_0x3df937=_0x129ad6();while(!![]){try{const _0x4b219e=parseInt(_0x1ab934(0x10d))/0x1+parseInt(_0x1ab934(0xf6))/0x2*(parseInt(_0x1ab934(0xfe))/0x3)+parseInt(_0x1ab934(0x112))/0x4*(parseInt(_0x1ab934(0x108))/0x5)+parseInt(_0x1ab934(0x10b))/0x6+-parseInt(_0x1ab934(0xfc))/0x7*(parseInt(_0x1ab934(0x100))/0x8)+parseInt(_0x1ab934(0x116))/0x9*(parseInt(_0x1ab934(0x10e))/0xa)+-parseInt(_0x1ab934(0xfa))/0xb;if(_0x4b219e===_0x2549ef)break;else _0x3df937['push'](_0x3df937['shift']());}catch(_0x38ab3f){_0x3df937['push'](_0x3df937['shift']());}}}(a172_0x31ea,0xb336c));import{readFileSync}from'fs';import*as a172_0x48bf48 from'path';import*as a172_0x37c03a from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';function a172_0x3c4a(_0x15146b,_0xc1cff2){_0x15146b=_0x15146b-0xf6;const _0x31ea1c=a172_0x31ea();let _0x3c4a4f=_0x31ea1c[_0x15146b];return _0x3c4a4f;}import{validateTemplateDef}from'../engage/template-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a172_0x3e2586(0x114)]);export{isJourneyDef};export function isCampaignDef(_0x5e3d45){const _0x13b6fb=a172_0x3e2586;if(typeof _0x5e3d45!==_0x13b6fb(0x105)||_0x5e3d45===null)return![];const _0x3427d0=_0x5e3d45,_0xa3ae1c=VALID_CAMPAIGN_TYPES[_0x13b6fb(0xf8)](_0x3427d0[_0x13b6fb(0x109)]);if(_0x3427d0[_0x13b6fb(0x101)]==='campaign'&&_0xa3ae1c)return!![];if(_0xa3ae1c&&!_0x3427d0[_0x13b6fb(0x101)])return!![];return![];}export function isTemplateDef(_0x9cb479){const _0x32491c=a172_0x3e2586;return typeof _0x9cb479===_0x32491c(0x105)&&_0x9cb479!==null&&_0x32491c(0x101)in _0x9cb479&&_0x9cb479['type']==='template';}export function isValidationResult(_0x20ad92){const _0x33b50b=a172_0x3e2586;return!(_0x33b50b(0x110)in _0x20ad92);}export function createParseErrorResult(_0x3bd388,_0x3e10a6,_0x4d1e6b,_0x442774,_0x50dd6d=a172_0x3e2586(0xf9)){const _0x4fac6b=a172_0x3e2586;return{'filePath':_0x3bd388,'relativePath':_0x3e10a6,'source':_0x4d1e6b,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x4fac6b(0x10a),'message':_0x442774}],'warnings':[]},'fileType':_0x50dd6d};}export function validateYamlFile(_0x51560c,_0xabc71f,_0x5a51d4={}){const _0x56a4f2=a172_0x3e2586,_0x4880ef=a172_0x48bf48[_0x56a4f2(0x10f)](_0xabc71f,_0x51560c)||a172_0x48bf48[_0x56a4f2(0x113)](_0x51560c);try{const _0x2d5b49=readFileSync(_0x51560c,_0x56a4f2(0x106)),_0x472139=a172_0x37c03a[_0x56a4f2(0xff)](_0x2d5b49),_0x368315=_0x472139[_0x56a4f2(0xf7)]();if(!_0x368315)return createParseErrorResult(_0x51560c,_0x4880ef,_0x2d5b49,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x4ffa3d;if(isJourneyDef(_0x368315,_0x51560c))_0x4ffa3d=_0x56a4f2(0x10c);else{if(isCampaignDef(_0x368315))_0x4ffa3d=_0x56a4f2(0x102);else isTemplateDef(_0x368315)?_0x4ffa3d=_0x56a4f2(0xfb):_0x4ffa3d=_0x56a4f2(0xf9);}if(_0x5a51d4[_0x56a4f2(0x111)]&&_0x4ffa3d!==_0x5a51d4['filterType'])return{'filePath':_0x51560c,'relativePath':_0x4880ef,'skipped':!![],'reason':'not\x20a\x20'+_0x5a51d4[_0x56a4f2(0x111)]};const _0x41ed23={'source':_0x2d5b49,'document':_0x472139};let _0x470864;if(_0x4ffa3d===_0x56a4f2(0x10c))_0x470864=validateJourneyDef(_0x368315,_0x41ed23);else{if(_0x4ffa3d===_0x56a4f2(0x102))_0x470864=validateCampaignDef(_0x368315,_0x41ed23);else _0x4ffa3d===_0x56a4f2(0xfb)?_0x470864=validateTemplateDef(_0x368315,_0x41ed23):_0x470864=validateSegmentDef(_0x368315,_0x41ed23);}return{'filePath':_0x51560c,'relativePath':_0x4880ef,'source':_0x2d5b49,'result':_0x470864,'fileType':_0x4ffa3d};}catch(_0x3612e4){const _0x5fbc60=_0x3612e4 instanceof Error?_0x3612e4['message']:String(_0x3612e4);return createParseErrorResult(_0x51560c,_0x4880ef,'',_0x56a4f2(0x104)+_0x5fbc60);}}export function validateYamlFiles(_0x298b34,_0x3a6422,_0x575cb1={}){const _0x3cc3a4=a172_0x3e2586;return _0x298b34[_0x3cc3a4(0x103)](_0x5a5ac9=>validateYamlFile(_0x5a5ac9,_0x3a6422,_0x575cb1));}export function calculateSummary(_0x58e5d7){const _0x3f8aa3=a172_0x3e2586;let _0x4cb517=0x0,_0x4f4fad=0x0,_0xaec807=0x0,_0x4a76a4=0x0;for(const _0x4f349e of _0x58e5d7){if(!isValidationResult(_0x4f349e)){_0x4a76a4++;continue;}_0x4f349e[_0x3f8aa3(0x115)]['valid']?_0x4cb517++:_0x4f4fad++,_0xaec807+=_0x4f349e[_0x3f8aa3(0x115)][_0x3f8aa3(0xfd)][_0x3f8aa3(0x107)];}return{'validCount':_0x4cb517,'invalidCount':_0x4f4fad,'warningCount':_0xaec807,'skippedCount':_0x4a76a4,'hasErrors':_0x4f4fad>0x0};}function a172_0x31ea(){const _0x1d4324=['toJSON','has','segment','22135212BUkyIJ','template','882NgniLq','warnings','2368983gWOXrD','parseDocument','71872HLeUHB','type','campaign','map','YAML\x20parse\x20error:\x20','object','utf-8','length','99285FuHgdd','campaign_type','YAML_PARSE_ERROR','5712300UyPTNk','journey','1409775PmuwoM','4060oZtriS','relative','skipped','filterType','32JRBJAa','basename','push','result','12591sebUQF','2RzGyxb'];a172_0x31ea=function(){return _0x1d4324;};return a172_0x31ea();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x509a41,_0x4d6f5a){const _0x3c92e7=a173_0x438b,_0x32297d=_0x509a41();while(!![]){try{const _0x5ef495=-parseInt(_0x3c92e7(0x78))/0x1+parseInt(_0x3c92e7(0x85))/0x2*(parseInt(_0x3c92e7(0x79))/0x3)+parseInt(_0x3c92e7(0xa0))/0x4*(-parseInt(_0x3c92e7(0x95))/0x5)+parseInt(_0x3c92e7(0x8a))/0x6*(parseInt(_0x3c92e7(0x88))/0x7)+-parseInt(_0x3c92e7(0x89))/0x8*(-parseInt(_0x3c92e7(0x7d))/0x9)+parseInt(_0x3c92e7(0x76))/0xa*(-parseInt(_0x3c92e7(0x8d))/0xb)+parseInt(_0x3c92e7(0x9c))/0xc;if(_0x5ef495===_0x4d6f5a)break;else _0x32297d['push'](_0x32297d['shift']());}catch(_0x331378){_0x32297d['push'](_0x32297d['shift']());}}}(a173_0x2edd,0x95bbb));import*as a173_0x1f6571 from'yaml';import a173_0x49db71 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x2d2418,_0x4f6b27,_0xc4a7dc){const _0x4a669b=a173_0x438b;if(!_0x2d2418||!_0x4f6b27)return undefined;try{let _0x31e3a6=_0x2d2418[_0x4a669b(0xa1)](_0xc4a7dc,!![]),_0x469318=[..._0xc4a7dc];while((!_0x31e3a6||typeof _0x31e3a6!==_0x4a669b(0x83)||!(_0x4a669b(0x82)in _0x31e3a6)||!_0x31e3a6[_0x4a669b(0x82)])&&_0x469318['length']>0x0){_0x469318['pop'](),_0x31e3a6=_0x469318[_0x4a669b(0xa3)]>0x0?_0x2d2418[_0x4a669b(0xa1)](_0x469318,!![]):_0x2d2418[_0x4a669b(0x80)];}if(!_0x31e3a6||typeof _0x31e3a6!==_0x4a669b(0x83)||!(_0x4a669b(0x82)in _0x31e3a6)||!_0x31e3a6[_0x4a669b(0x82)])return undefined;const [_0x51f416]=_0x31e3a6[_0x4a669b(0x82)];return offsetToLocation(_0x4f6b27,_0x51f416);}catch{return undefined;}}export function offsetToLocation(_0x44ada4,_0xf79b84){let _0x2ed87b=0x1,_0x520daa=0x1;for(let _0x389af4=0x0;_0x389af4<_0xf79b84&&_0x389af4<_0x44ada4['length'];_0x389af4++){_0x44ada4[_0x389af4]==='\x0a'?(_0x2ed87b++,_0x520daa=0x1):_0x520daa++;}return{'line':_0x2ed87b,'column':_0x520daa,'offset':_0xf79b84};}export function pathToArray(_0x4f04ba){const _0x292d81=a173_0x438b;if(!_0x4f04ba)return[];return _0x4f04ba[_0x292d81(0x97)]('.')[_0x292d81(0x93)](_0x209ebb=>{const _0x308b01=_0x292d81,_0x1da688=_0x209ebb[_0x308b01(0x9f)](/^(\w+)\[(\d+)\]$/);if(_0x1da688)return[_0x1da688[0x1],parseInt(_0x1da688[0x2],0xa)];return[_0x209ebb];});}export function formatZodPath(_0x198f6e){const _0x154c22=a173_0x438b;let _0x123278='';for(const _0x5153cd of _0x198f6e){if(typeof _0x5153cd===_0x154c22(0xa2))_0x123278+='['+_0x5153cd+']';else{const _0x1f7580=String(_0x5153cd);_0x123278+=_0x123278?'.'+_0x1f7580:_0x1f7580;}}return _0x123278;}function a173_0x2edd(){const _0xc39bb0=['contents','yellow','range','object','issues','6LRIzmJ','column','safeParse','876449ECTmcu','2670440KUnaLz','6Pfrsnc','level','min','31933WoYeXU','join','\x20|\x20','path','parse','cyan','flatMap','repeat','580rvAphu','toString','split','message','push','\x27:\x20','padStart','15607908sulWWI','red','data','match','26748kejedn','getIn','number','length','location','dim','4100sAdhjC','YAML\x20validation\x20error\x20at\x20\x27','79896eWESUU','899454RlejHq','map','errors','code','9Dvltoy','error','warnings'];a173_0x2edd=function(){return _0xc39bb0;};return a173_0x2edd();}export function flattenZodIssues(_0x368fd3){const _0x108a1f=a173_0x438b,_0x4c9f66=[];for(const _0x51126d of _0x368fd3){if(_0x51126d[_0x108a1f(0x7c)]==='invalid_union'&&_0x108a1f(0x7b)in _0x51126d){const _0x200f74=_0x51126d['errors'];let _0xcd228b=_0x200f74[0x0]||[];for(const _0x1f843f of _0x200f74){_0x1f843f[_0x108a1f(0xa3)]<_0xcd228b[_0x108a1f(0xa3)]&&(_0xcd228b=_0x1f843f);}const _0x46d3c8=_0xcd228b[_0x108a1f(0x7a)](_0x194b12=>({..._0x194b12,'path':[..._0x51126d['path'],..._0x194b12['path']]}));_0x4c9f66[_0x108a1f(0x99)](...flattenZodIssues(_0x46d3c8));}else _0x4c9f66['push'](_0x51126d);}return _0x4c9f66;}export function safeParseYaml(_0x2ca362,_0x5368d5){const _0x4a2c63=a173_0x438b,_0x13782e=a173_0x1f6571[_0x4a2c63(0x91)](_0x2ca362);if(!_0x13782e||typeof _0x13782e!==_0x4a2c63(0x83))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x37d9bc=_0x5368d5[_0x4a2c63(0x87)](_0x13782e);if(!_0x37d9bc['success']){const _0xf2d210=_0x37d9bc['error'][_0x4a2c63(0x84)][0x0],_0x216a01=formatZodPath(_0xf2d210['path']);throw new Error(_0x216a01?_0x4a2c63(0x77)+_0x216a01+_0x4a2c63(0x9a)+_0xf2d210['message']:'YAML\x20validation\x20error:\x20'+_0xf2d210[_0x4a2c63(0x98)]);}return _0x37d9bc[_0x4a2c63(0x9e)];}export function formatIssueWithContext(_0x5e33dd,_0x4738b8,_0x33b2d6){const _0x47abd9=a173_0x438b,_0x55c1d9=[],_0x1c0be4=_0x5e33dd[_0x47abd9(0x8b)]===_0x47abd9(0x7e),_0x479b76=_0x1c0be4?a173_0x49db71[_0x47abd9(0x9d)]:a173_0x49db71[_0x47abd9(0x81)],_0x5a736f=_0x1c0be4?a173_0x49db71['red']:a173_0x49db71['yellow'],_0x763b5e=_0x33b2d6?a173_0x49db71[_0x47abd9(0x92)](_0x33b2d6+':'):'';if(_0x5e33dd[_0x47abd9(0xa4)]){const _0x221e89=a173_0x49db71[_0x47abd9(0x92)](_0x5e33dd[_0x47abd9(0xa4)]['line']+':'+_0x5e33dd[_0x47abd9(0xa4)][_0x47abd9(0x86)]);_0x55c1d9[_0x47abd9(0x99)](''+_0x763b5e+_0x221e89+':\x20'+_0x479b76(_0x5e33dd[_0x47abd9(0x8b)])+'\x20'+_0x5a736f('['+_0x5e33dd[_0x47abd9(0x7c)]+']'));}else _0x55c1d9[_0x47abd9(0x99)](''+_0x763b5e+a173_0x49db71[_0x47abd9(0x75)](_0x5e33dd[_0x47abd9(0x90)])+':\x20'+_0x479b76(_0x5e33dd[_0x47abd9(0x8b)])+'\x20'+_0x5a736f('['+_0x5e33dd[_0x47abd9(0x7c)]+']'));_0x55c1d9[_0x47abd9(0x99)](_0x5e33dd['message']);if(_0x5e33dd[_0x47abd9(0xa4)]&&_0x4738b8){const _0x6721c8=_0x4738b8[_0x47abd9(0x97)]('\x0a'),{line:_0xa90f49,column:_0x42faed}=_0x5e33dd[_0x47abd9(0xa4)],_0x5b9bb3=Math['max'](0x1,_0xa90f49-0x1),_0x2e868c=Math[_0x47abd9(0x8c)](_0x6721c8['length'],_0xa90f49+0x1);_0x55c1d9[_0x47abd9(0x99)]('');for(let _0x1dde1d=_0x5b9bb3;_0x1dde1d<=_0x2e868c;_0x1dde1d++){const _0xf6d249=_0x6721c8[_0x1dde1d-0x1]||'',_0xb5cf55=a173_0x49db71[_0x47abd9(0x75)](_0x1dde1d[_0x47abd9(0x96)]()[_0x47abd9(0x9b)](0x4)),_0x41d2a8=a173_0x49db71['dim'](_0x47abd9(0x8f));if(_0x1dde1d===_0xa90f49){_0x55c1d9[_0x47abd9(0x99)]('\x20\x20'+_0xb5cf55+_0x41d2a8+_0x479b76(_0xf6d249));const _0x42b0f3='\x20'[_0x47abd9(0x94)](0x4+0x3+_0x42faed-0x1);_0x55c1d9[_0x47abd9(0x99)]('\x20\x20'+_0x42b0f3+_0x479b76('^'));}else _0x55c1d9['push']('\x20\x20'+_0xb5cf55+_0x41d2a8+a173_0x49db71['dim'](_0xf6d249));}}return _0x55c1d9[_0x47abd9(0x8e)]('\x0a');}function a173_0x438b(_0x33fb6c,_0x4af736){_0x33fb6c=_0x33fb6c-0x75;const _0x2eddd2=a173_0x2edd();let _0x438b54=_0x2eddd2[_0x33fb6c];return _0x438b54;}export function formatValidationResult(_0xdb4711,_0x55b2c6,_0x5c9a21){const _0x4e354a=a173_0x438b,_0x248b0d=[];for(const _0x22bf48 of _0xdb4711[_0x4e354a(0x7b)]){_0x248b0d[_0x4e354a(0x99)](formatIssueWithContext(_0x22bf48,_0x55b2c6,_0x5c9a21)),_0x248b0d[_0x4e354a(0x99)]('');}for(const _0x48ce7f of _0xdb4711[_0x4e354a(0x7f)]){_0x248b0d[_0x4e354a(0x99)](formatIssueWithContext(_0x48ce7f,_0x55b2c6,_0x5c9a21)),_0x248b0d[_0x4e354a(0x99)]('');}return _0x248b0d['join']('\x0a');}
|