@treasuredata/tdx 2026.3.30 → 2026.3.31
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.d.ts.map +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/api-command.js.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.d.ts +55 -0
- package/dist/commands/cas-command.d.ts.map +1 -0
- package/dist/commands/cas-command.js +1 -0
- package/dist/commands/cas-command.js.map +1 -0
- package/dist/commands/cas-segment-command.d.ts +18 -0
- package/dist/commands/cas-segment-command.d.ts.map +1 -0
- package/dist/commands/cas-segment-command.js +1 -0
- package/dist/commands/cas-segment-command.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/unset-command.js.map +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-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.d.ts +1 -0
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.d.ts +2 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/session.js.map +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.d.ts +77 -0
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -0
- package/dist/sdk/cas/cas-api-client.js.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts +38 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js.map +1 -0
- package/dist/sdk/cas/index.d.ts +61 -0
- package/dist/sdk/cas/index.d.ts.map +1 -0
- package/dist/sdk/cas/index.js +1 -0
- package/dist/sdk/cas/index.js.map +1 -0
- package/dist/sdk/cas/pull-workflow.d.ts +53 -0
- package/dist/sdk/cas/pull-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/pull-workflow.js +1 -0
- package/dist/sdk/cas/pull-workflow.js.map +1 -0
- package/dist/sdk/cas/push-workflow.d.ts +50 -0
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/push-workflow.js +1 -0
- package/dist/sdk/cas/push-workflow.js.map +1 -0
- package/dist/sdk/cas/types.d.ts +115 -0
- package/dist/sdk/cas/types.d.ts.map +1 -0
- package/dist/sdk/cas/types.js +1 -0
- package/dist/sdk/cas/types.js.map +1 -0
- 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.d.ts +4 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +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 +6 -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/cas.d.ts +242 -0
- package/dist/sdk/types/cas.d.ts.map +1 -0
- package/dist/sdk/types/cas.js +1 -0
- package/dist/sdk/types/cas.js.map +1 -0
- package/dist/sdk/types/index.d.ts +3 -1
- 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/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/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(_0x264a96,_0x5efc2c){const _0x3d1a80=a156_0x2cc9,_0x1ad9e6=_0x264a96();while(!![]){try{const _0x138765=parseInt(_0x3d1a80(0x1ad))/0x1+parseInt(_0x3d1a80(0x1aa))/0x2+parseInt(_0x3d1a80(0x1ca))/0x3*(parseInt(_0x3d1a80(0x1a4))/0x4)+parseInt(_0x3d1a80(0x1d6))/0x5+parseInt(_0x3d1a80(0x1c2))/0x6+parseInt(_0x3d1a80(0x1b9))/0x7*(-parseInt(_0x3d1a80(0x1cb))/0x8)+parseInt(_0x3d1a80(0x1c3))/0x9*(-parseInt(_0x3d1a80(0x1cf))/0xa);if(_0x138765===_0x5efc2c)break;else _0x1ad9e6['push'](_0x1ad9e6['shift']());}catch(_0x9902a7){_0x1ad9e6['push'](_0x1ad9e6['shift']());}}}(a156_0x2836,0x5a930));import a156_0x44a2c0 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a156_0x2836(){const _0x43e986=['no_parent','1000hbRMhC','join','no_config','relative','trim','isFile','345440vTjrZL','match','resolve','715289yRrYqC','File\x20not\x20found','resourceType','type','exists','segment','file_not_found','Not\x20a\x20YAML\x20file:\x20','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','string','invalid_yaml','extname','49oaBMBJ','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','directory','configDir','tdx.json','basename','isScoped','parse','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','692742jMJcEB','1853379Iuiwhi','parentSegment','readFile','isDirectory','segmentName','includes','root','933TnWNNE','437816LoDaZu','File\x20not\x20found:\x20','file','context','40ZWbwaq','journey','folderPath','No\x20tdx.json\x20found','cwd','scopedFolderPath','replace','2482945ovFtJA','error','No\x20tdx.json\x20found\x20for\x20file:\x20','parent_name','dirname','parent_segment'];a156_0x2836=function(){return _0x43e986;};return a156_0x2836();}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a156_0x2cc9(_0x36099c,_0x2a5413){_0x36099c=_0x36099c-0x19f;const _0x28367f=a156_0x2836();let _0x2cc979=_0x28367f[_0x36099c];return _0x2cc979;}export function isSuccessfulResolution(_0x2b4474){const _0x1b0bbf=a156_0x2cc9;return _0x2b4474[_0x1b0bbf(0x1b0)]!==_0x1b0bbf(0x1d7);}export function isScopedResolution(_0x266f18){const _0x4bb984=a156_0x2cc9;return _0x266f18[_0x4bb984(0x1b0)]==='directory'||_0x266f18[_0x4bb984(0x1b0)]===_0x4bb984(0x1cd)||_0x266f18[_0x4bb984(0x1b0)]===_0x4bb984(0x1ce);}export function getScopedDetails(_0x2db885){const _0x2fc003=a156_0x2cc9;if(isScopedResolution(_0x2db885))return{'isScoped':_0x2db885[_0x2fc003(0x1bf)],'scopedFolderPath':_0x2db885[_0x2fc003(0x1d4)]};return undefined;}async function findTdxConfigAsync(_0x21e6bc,_0x3a1d25){const _0x2725d4=a156_0x2cc9;let _0x189996=a156_0x44a2c0[_0x2725d4(0x1ac)](_0x21e6bc);const _0x205191=a156_0x44a2c0[_0x2725d4(0x1c0)](_0x189996)[_0x2725d4(0x1c9)];while(_0x189996!==_0x205191){const _0x157d09=a156_0x44a2c0[_0x2725d4(0x1a5)](_0x189996,_0x2725d4(0x1bd));if(await _0x3a1d25[_0x2725d4(0x1b1)](_0x157d09))try{const _0x17aad2=await _0x3a1d25[_0x2725d4(0x1c5)](_0x157d09),_0xb0f03=JSON[_0x2725d4(0x1c0)](_0x17aad2);if(_0xb0f03['parent_segment']&&typeof _0xb0f03[_0x2725d4(0x1a2)]===_0x2725d4(0x1b6))return{'configPath':_0x157d09,'configDir':_0x189996,'parentSegment':_0xb0f03['parent_segment']};}catch{}_0x189996=a156_0x44a2c0[_0x2725d4(0x1a1)](_0x189996);}return null;}function calculateScopedPath(_0x49e59b,_0x210a77){const _0x4231c7=a156_0x2cc9,_0x21d12f=a156_0x44a2c0[_0x4231c7(0x1a7)](_0x210a77,_0x49e59b),_0x34f238=_0x21d12f!==''&&_0x21d12f!=='.'&&!_0x21d12f['startsWith']('..');return{'isScoped':_0x34f238,'scopedFolderPath':_0x34f238?_0x21d12f[_0x4231c7(0x1d5)](/\\/g,'/'):''};}export async function resolveTarget(_0x1f8c9e){const _0x30ffec=a156_0x2cc9,{arg:_0x367c77,contextParent:_0x5d1787,cwd:cwd=process[_0x30ffec(0x1d3)](),fs:fs=nodeFileSystem}=_0x1f8c9e;if(_0x367c77&&isYamlFilePath(_0x367c77))try{const _0x5eef96=await resolveYamlFilePath(_0x367c77,fs),_0x35beb7=a156_0x44a2c0['resolve'](_0x367c77),_0xee9f3a=a156_0x44a2c0[_0x30ffec(0x1a1)](_0x35beb7),_0x4392bd=await findTdxConfigAsync(_0xee9f3a,fs);if(!_0x4392bd){if(_0x5d1787){const _0x439ad8=a156_0x44a2c0[_0x30ffec(0x1a1)](_0x35beb7);return{'type':_0x30ffec(0x1cd),'parentName':_0x5d1787,'targetDir':_0x439ad8,'configRoot':_0x439ad8,'filePath':_0x35beb7,'resourceName':_0x5eef96[_0x30ffec(0x1c7)],'folderPath':_0x5eef96[_0x30ffec(0x1d1)],'resourceType':_0x5eef96[_0x30ffec(0x1af)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x30ffec(0x19f)+_0x367c77,'arg':_0x367c77,'helpText':_0x30ffec(0x1ba)};}const _0x35905f=calculateScopedPath(_0xee9f3a,_0x4392bd[_0x30ffec(0x1bc)]);return{'type':_0x30ffec(0x1cd),'parentName':_0x4392bd[_0x30ffec(0x1c4)],'targetDir':_0x4392bd['configDir'],'configRoot':_0x4392bd[_0x30ffec(0x1bc)],'filePath':_0x35beb7,'resourceName':_0x5eef96['segmentName'],'folderPath':_0x5eef96[_0x30ffec(0x1d1)],'resourceType':_0x5eef96[_0x30ffec(0x1af)],'isScoped':_0x35905f[_0x30ffec(0x1bf)],'scopedFolderPath':_0x35905f[_0x30ffec(0x1d4)]};}catch(_0x508ce8){const _0x24bada=_0x508ce8 instanceof Error?_0x508ce8['message']:String(_0x508ce8);if(_0x24bada[_0x30ffec(0x1c8)](_0x30ffec(0x1ae)))return{'type':_0x30ffec(0x1d7),'errorCode':_0x30ffec(0x1b3),'message':_0x30ffec(0x1cc)+_0x367c77,'arg':_0x367c77};if(_0x24bada[_0x30ffec(0x1c8)](_0x30ffec(0x1d2))){if(_0x5d1787){const _0x26a6ac=a156_0x44a2c0[_0x30ffec(0x1ac)](_0x367c77);if(await fs[_0x30ffec(0x1b1)](_0x26a6ac)){const _0x1150ad=a156_0x44a2c0[_0x30ffec(0x1a1)](_0x26a6ac),_0x275c84=await fs[_0x30ffec(0x1c5)](_0x26a6ac),_0x433a07=_0x275c84[_0x30ffec(0x1ab)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x297e7e=_0x275c84[_0x30ffec(0x1ab)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5d7a7f=_0x433a07?_0x433a07[0x1][_0x30ffec(0x1a8)]():a156_0x44a2c0[_0x30ffec(0x1be)](_0x367c77,a156_0x44a2c0[_0x30ffec(0x1b8)](_0x367c77)),_0x2226ef=_0x297e7e&&_0x297e7e[0x1][_0x30ffec(0x1a8)]()===_0x30ffec(0x1d0)?_0x30ffec(0x1d0):_0x30ffec(0x1b2);return{'type':_0x30ffec(0x1cd),'parentName':_0x5d1787,'targetDir':_0x1150ad,'configRoot':_0x1150ad,'filePath':_0x26a6ac,'resourceName':_0x5d7a7f,'folderPath':'','resourceType':_0x2226ef,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x30ffec(0x1a6),'message':_0x30ffec(0x19f)+_0x367c77,'arg':_0x367c77,'helpText':_0x30ffec(0x1ba)};}return{'type':'error','errorCode':_0x30ffec(0x1b7),'message':_0x24bada,'arg':_0x367c77};}if(_0x367c77){const _0x3ab33b=a156_0x44a2c0['resolve'](cwd,_0x367c77);let _0x2bc9a9=null;try{_0x2bc9a9=await fs['stat'](_0x3ab33b);}catch{}if(_0x2bc9a9?.[_0x30ffec(0x1c6)]()){const _0xef63cf=await findTdxConfigAsync(_0x3ab33b,fs);if(_0xef63cf){const _0x13077d=calculateScopedPath(_0x3ab33b,_0xef63cf[_0x30ffec(0x1bc)]);return{'type':_0x30ffec(0x1bb),'parentName':_0xef63cf[_0x30ffec(0x1c4)],'targetDir':_0x3ab33b,'configRoot':_0xef63cf[_0x30ffec(0x1bc)],'isScoped':_0x13077d['isScoped'],'scopedFolderPath':_0x13077d['scopedFolderPath']};}if(_0x5d1787)return{'type':_0x30ffec(0x1bb),'parentName':_0x5d1787,'targetDir':_0x3ab33b,'configRoot':_0x3ab33b,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x30ffec(0x1c1)+_0x367c77,'arg':_0x367c77,'helpText':_0x30ffec(0x1ba)};}if(_0x2bc9a9?.[_0x30ffec(0x1a9)]())return{'type':_0x30ffec(0x1d7),'errorCode':'invalid_yaml','message':_0x30ffec(0x1b4)+_0x367c77,'arg':_0x367c77,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x4ddc00=sanitizeFileName(_0x367c77),_0x4d6a6c=getSegmentRootDir(_0x4ddc00,cwd);return{'type':_0x30ffec(0x1a0),'parentName':_0x367c77,'targetDir':_0x4d6a6c,'configRoot':_0x4d6a6c};}const _0x460f75=await findTdxConfigAsync(cwd,fs);if(_0x460f75){const _0x376fb7=calculateScopedPath(cwd,_0x460f75[_0x30ffec(0x1bc)]);return{'type':_0x30ffec(0x1ce),'parentName':_0x460f75[_0x30ffec(0x1c4)],'targetDir':cwd,'configRoot':_0x460f75[_0x30ffec(0x1bc)],'isScoped':_0x376fb7[_0x30ffec(0x1bf)],'scopedFolderPath':_0x376fb7['scopedFolderPath']};}if(_0x5d1787){const _0x2a1a30=sanitizeFileName(_0x5d1787),_0x407ca2=getSegmentRootDir(_0x2a1a30,cwd);return{'type':_0x30ffec(0x1ce),'parentName':_0x5d1787,'targetDir':_0x407ca2,'configRoot':_0x407ca2,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x30ffec(0x1d7),'errorCode':_0x30ffec(0x1a3),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x30ffec(0x1b5)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x9a2731=a157_0x4d41;(function(_0x2b7ef0,_0x32452f){const _0x102c77=a157_0x4d41,_0x289b1c=_0x2b7ef0();while(!![]){try{const _0x49dde0=parseInt(_0x102c77(0x77))/0x1*(parseInt(_0x102c77(0x84))/0x2)+-parseInt(_0x102c77(0x8f))/0x3+-parseInt(_0x102c77(0x7a))/0x4+-parseInt(_0x102c77(0x8d))/0x5*(-parseInt(_0x102c77(0x78))/0x6)+-parseInt(_0x102c77(0x8a))/0x7+parseInt(_0x102c77(0x7d))/0x8*(parseInt(_0x102c77(0x88))/0x9)+parseInt(_0x102c77(0x83))/0xa*(parseInt(_0x102c77(0x81))/0xb);if(_0x49dde0===_0x32452f)break;else _0x289b1c['push'](_0x289b1c['shift']());}catch(_0x1447bc){_0x289b1c['push'](_0x289b1c['shift']());}}}(a157_0x39c2,0xd5006));function a157_0x39c2(){const _0x14b062=['930997aXPhQx','2364aJFlQT','parent_segment','1736744PevURK','cwd','object','29296LfOjci','parse','join','replace','255167jZsTCo','string','310vhGILd','2Gcjylj','root','resolve','relative','1764mtGkdK','stringify','2305772xAHusy','engage_workspace','startsWith','75bBgzRm','Invalid\x20tdx.json:\x20expected\x20object','2213190PupYCS','utf-8'];a157_0x39c2=function(){return _0x14b062;};return a157_0x39c2();}import{existsSync,readFileSync}from'fs';import a157_0x569f80 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x568bb6=process['cwd']()){const _0x595bc3=a157_0x4d41;let _0x547b72=a157_0x569f80[_0x595bc3(0x86)](_0x568bb6);const _0x329392=a157_0x569f80[_0x595bc3(0x7e)](_0x547b72)[_0x595bc3(0x85)];while(_0x547b72!==_0x329392){const _0x37499c=a157_0x569f80[_0x595bc3(0x7f)](_0x547b72,TDX_CONFIG_FILE);if(existsSync(_0x37499c))return _0x37499c;_0x547b72=a157_0x569f80['dirname'](_0x547b72);}return null;}export function loadTdxConfig(_0x2a082b){const _0x3b227f=a157_0x4d41,_0x2f5c46=readFileSync(_0x2a082b,_0x3b227f(0x90));let _0x14792e;try{_0x14792e=JSON[_0x3b227f(0x7e)](_0x2f5c46);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x2a082b);}if(!_0x14792e||typeof _0x14792e!==_0x3b227f(0x7c))throw new Error(_0x3b227f(0x8e));const _0x44acb8=_0x14792e,_0x16a196=_0x44acb8[_0x3b227f(0x79)]&&typeof _0x44acb8[_0x3b227f(0x79)]==='string',_0x207576=_0x44acb8[_0x3b227f(0x8b)]&&typeof _0x44acb8['engage_workspace']===_0x3b227f(0x82);if(!_0x16a196&&!_0x207576)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x556847={};return _0x16a196&&(_0x556847[_0x3b227f(0x79)]=_0x44acb8[_0x3b227f(0x79)]),_0x207576&&(_0x556847[_0x3b227f(0x8b)]=_0x44acb8[_0x3b227f(0x8b)]),_0x556847;}export function findTdxConfig(_0xf2e1e6=process[a157_0x9a2731(0x7b)]()){const _0x10ec70=findTdxConfigPath(_0xf2e1e6);if(!_0x10ec70)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x1b4461=loadTdxConfig(_0x10ec70),_0x30cddf=a157_0x569f80['dirname'](_0x10ec70);return{'config':_0x1b4461,'configPath':_0x10ec70,'configDir':_0x30cddf};}function a157_0x4d41(_0x2fdc73,_0xab394b){_0x2fdc73=_0x2fdc73-0x77;const _0x39c251=a157_0x39c2();let _0x4d4100=_0x39c251[_0x2fdc73];return _0x4d4100;}export function tryFindTdxConfig(_0x4b366e){try{return findTdxConfig(_0x4b366e);}catch{return null;}}export function getSegmentRootDir(_0x3b229d,_0x20c7bc=process[a157_0x9a2731(0x7b)]()){const _0x5f5c15=a157_0x9a2731;return a157_0x569f80[_0x5f5c15(0x7f)](_0x20c7bc,SEGMENTS_DIR,_0x3b229d);}export function getTdxConfigPath(_0x336576,_0x116b19=process[a157_0x9a2731(0x7b)]()){const _0x11cc96=a157_0x9a2731;return a157_0x569f80[_0x11cc96(0x7f)](getSegmentRootDir(_0x336576,_0x116b19),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5a01a9,_0x56e6f6){const _0x3d8e67=a157_0x9a2731,_0x40f8ed=a157_0x569f80[_0x3d8e67(0x86)](_0x5a01a9),_0x40d430=a157_0x569f80[_0x3d8e67(0x87)](_0x56e6f6,_0x40f8ed);if(_0x40d430[_0x3d8e67(0x8c)]('..'))return'';return _0x40d430;}export function localPathToTdFolderPath(_0x4caa30){const _0x117f57=a157_0x9a2731,_0x183269=a157_0x569f80['dirname'](_0x4caa30);if(_0x183269==='.'||_0x183269==='')return'';return _0x183269[_0x117f57(0x80)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1af997,_0x3fe410){const _0x5299c2=a157_0x9a2731;if(!_0x1af997)return _0x3fe410;return a157_0x569f80[_0x5299c2(0x7f)](_0x3fe410,_0x1af997);}export function createTdxConfigContent(_0x4975e8){const _0x4fd421={'parent_segment':_0x4975e8};return JSON['stringify'](_0x4fd421,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x1a4dba){const _0x3891df=a157_0x9a2731,_0x296a52={'engage_workspace':_0x1a4dba};return JSON[_0x3891df(0x89)](_0x296a52,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x52ae60=a158_0x1518;(function(_0x57c37f,_0x38ff87){const _0x2901c8=a158_0x1518,_0x3911f7=_0x57c37f();while(!![]){try{const _0x54bd22=parseInt(_0x2901c8(0x8c))/0x1*(parseInt(_0x2901c8(0x94))/0x2)+-parseInt(_0x2901c8(0x7e))/0x3+parseInt(_0x2901c8(0x8b))/0x4*(parseInt(_0x2901c8(0x9b))/0x5)+parseInt(_0x2901c8(0x83))/0x6*(parseInt(_0x2901c8(0x80))/0x7)+parseInt(_0x2901c8(0x9f))/0x8*(parseInt(_0x2901c8(0x7b))/0x9)+parseInt(_0x2901c8(0x78))/0xa+-parseInt(_0x2901c8(0x8d))/0xb*(parseInt(_0x2901c8(0x86))/0xc);if(_0x54bd22===_0x38ff87)break;else _0x3911f7['push'](_0x3911f7['shift']());}catch(_0xcdc5e5){_0x3911f7['push'](_0x3911f7['shift']());}}}(a158_0x35a5,0xa3fd9));import{z}from'zod';export const ScheduleTypeSchema=z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x9c),a158_0x52ae60(0xa4),a158_0x52ae60(0x7c),a158_0x52ae60(0x87),a158_0x52ae60(0x92),'cron',a158_0x52ae60(0x99)]);export const RepeatUnitSchema=z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x84),a158_0x52ae60(0xa1),'day',a158_0x52ae60(0x85),'month',a158_0x52ae60(0x7f),'none']);export const ScheduleDefSchema=z[a158_0x52ae60(0x97)]({'type':ScheduleTypeSchema[a158_0x52ae60(0x79)](),'repeat_unit':RepeatUnitSchema[a158_0x52ae60(0x79)](),'repeat_frequency':z[a158_0x52ae60(0x90)]()['optional'](),'repeat_sub_frequency':z[a158_0x52ae60(0xa3)](z[a158_0x52ae60(0x90)]())['optional'](),'start_at':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'end_on':z[a158_0x52ae60(0x88)]()['nullable']()[a158_0x52ae60(0x79)](),'timezone':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0x79)]()});export const NotificationDefSchema=z[a158_0x52ae60(0x97)]({'notify_on':z[a158_0x52ae60(0xa3)](z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x7a),a158_0x52ae60(0x93)]))[a158_0x52ae60(0x79)](),'email_recipients':z['array'](z[a158_0x52ae60(0x88)]())[a158_0x52ae60(0x79)]()});export const ActivationColumnDefSchema=z[a158_0x52ae60(0xa0)]([z[a158_0x52ae60(0x88)](),z['object']({'name':z[a158_0x52ae60(0x88)](),'type':z[a158_0x52ae60(0x88)]()['optional'](),'visibility':z[a158_0x52ae60(0x8a)](['clear',a158_0x52ae60(0x9a)])[a158_0x52ae60(0x79)]()})]);export const ActivationBehaviorDefSchema=z[a158_0x52ae60(0x97)]({'columns':z[a158_0x52ae60(0xa3)](z['object']({'name':z['string'](),'type':z['string']()[a158_0x52ae60(0x79)](),'visibility':z[a158_0x52ae60(0x8a)](['clear',a158_0x52ae60(0x9a)])[a158_0x52ae60(0x79)]()}))[a158_0x52ae60(0x79)](),'behavior_table':z[a158_0x52ae60(0x88)]()['optional'](),'join_row':z[a158_0x52ae60(0x90)]()[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'join_strategy':z['enum']([a158_0x52ae60(0x89),a158_0x52ae60(0x9d),a158_0x52ae60(0x91),a158_0x52ae60(0x7d)])[a158_0x52ae60(0x79)](),'formatting':z[a158_0x52ae60(0x8a)](['rows',a158_0x52ae60(0x96)])[a158_0x52ae60(0x79)](),'order_by':z[a158_0x52ae60(0xa3)](z[a158_0x52ae60(0x97)]({'key':z[a158_0x52ae60(0x88)](),'order':z[a158_0x52ae60(0x8a)]([a158_0x52ae60(0x81),a158_0x52ae60(0x82)])}))['optional']()});function a158_0x1518(_0x2c6b36,_0x168609){_0x2c6b36=_0x2c6b36-0x78;const _0x35a5fb=a158_0x35a5();let _0x151839=_0x35a5fb[_0x2c6b36];return _0x151839;}export const ActivationDefSchema=z[a158_0x52ae60(0x97)]({'name':z['string']()[a158_0x52ae60(0x8e)](0x1,a158_0x52ae60(0x8f)),'description':z[a158_0x52ae60(0x88)]()['optional'](),'connection':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0x8e)](0x1,a158_0x52ae60(0x9e)),'all_columns':z[a158_0x52ae60(0x95)]()[a158_0x52ae60(0x79)](),'columns':z[a158_0x52ae60(0xa3)](ActivationColumnDefSchema)[a158_0x52ae60(0x79)](),'schedule':ScheduleDefSchema[a158_0x52ae60(0x79)](),'notification':NotificationDefSchema[a158_0x52ae60(0x79)](),'connector_config':z[a158_0x52ae60(0x98)](z[a158_0x52ae60(0x88)](),z['unknown']())[a158_0x52ae60(0x79)](),'activation_template_id':z[a158_0x52ae60(0x88)]()[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'behavior':ActivationBehaviorDefSchema[a158_0x52ae60(0xa2)]()[a158_0x52ae60(0x79)](),'run_after_journey_refresh':z['boolean']()['optional']()});function a158_0x35a5(){const _0x5d221b=['5ouqyPW','none','First','Connection\x20name\x20is\x20required','368HHUplO','union','hour','nullable','array','hourly','5816990eiaucd','optional','onSuccess','26739SBLBMt','daily','Top-N','1360353PQhDVf','once','84ePiDay','asc','desc','626634RiCmTo','minute','week','180JUpzzx','weekly','string','All','enum','5130788lcUiit','139534ZJpRWs','1970694PdHbBT','min','Activation\x20name\x20is\x20required','number','Last','monthly','onFailure','8BsFdhY','boolean','cols','object','record','minutes_interval','masked'];a158_0x35a5=function(){return _0x5d221b;};return a158_0x35a5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a159_0x3329(_0x3569e6,_0x32fb97){_0x3569e6=_0x3569e6-0x1a0;var _0x24852b=a159_0x2485();var _0x33292b=_0x24852b[_0x3569e6];return _0x33292b;}(function(_0x278f78,_0x5dc000){var _0xfb41c9=a159_0x3329,_0x65b6a4=_0x278f78();while(!![]){try{var _0x274066=-parseInt(_0xfb41c9(0x1a6))/0x1*(-parseInt(_0xfb41c9(0x1aa))/0x2)+-parseInt(_0xfb41c9(0x1a2))/0x3*(-parseInt(_0xfb41c9(0x1ab))/0x4)+parseInt(_0xfb41c9(0x1a9))/0x5*(-parseInt(_0xfb41c9(0x1a0))/0x6)+parseInt(_0xfb41c9(0x1a1))/0x7*(-parseInt(_0xfb41c9(0x1a7))/0x8)+parseInt(_0xfb41c9(0x1a5))/0x9+-parseInt(_0xfb41c9(0x1a3))/0xa*(parseInt(_0xfb41c9(0x1a8))/0xb)+parseInt(_0xfb41c9(0x1a4))/0xc;if(_0x274066===_0x5dc000)break;else _0x65b6a4['push'](_0x65b6a4['shift']());}catch(_0xecfa86){_0x65b6a4['push'](_0x65b6a4['shift']());}}}(a159_0x2485,0xe8619));function a159_0x2485(){var _0xd12317=['27616yJBmFN','6011250gOJGxg','301njXiip','600PsnsfX','5090qYJcmc','22440996wNyNFL','888201gmWPqN','5HOvEAl','133208VPWrsu','15059DmvTBr','5QIXsEW','6780CwyfzB'];a159_0x2485=function(){return _0xd12317;};return a159_0x2485();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x184606=a160_0x143e;function a160_0x3182(){const _0x52dcba=['journey','draft','2189SzxxNa','190qkeiyj','enum','90bgUkHU','ab_test','filter','24582kghPmu','journeys','string','simulation','literal','isArray','min','decision_point','end','day','optional','lazy','discriminatedUnion','reentry_unless_goal_achieved','stages','132937vDoTuP','object','launched','Journey\x20name\x20is\x20required','array','length','refine','11786vEWGwG','4602430oCntVm','type','number','13TpEQKU','boolean','record','120SiAUPe','974288aXqbar','merge','reentry_always','week','jump','wait','8190132qbwouY','29860kGWXMw','passthrough','292HIrOMe','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'];a160_0x3182=function(){return _0x52dcba;};return a160_0x3182();}(function(_0x28fce8,_0x1b1d99){const _0x1b8d03=a160_0x143e,_0x2adfa3=_0x28fce8();while(!![]){try{const _0x4c2a34=parseInt(_0x1b8d03(0x1a0))/0x1*(-parseInt(_0x1b8d03(0x18a))/0x2)+parseInt(_0x1b8d03(0x1a5))/0x3*(-parseInt(_0x1b8d03(0x19b))/0x4)+parseInt(_0x1b8d03(0x18b))/0x5+-parseInt(_0x1b8d03(0x191))/0x6*(-parseInt(_0x1b8d03(0x183))/0x7)+-parseInt(_0x1b8d03(0x192))/0x8*(-parseInt(_0x1b8d03(0x1a2))/0x9)+-parseInt(_0x1b8d03(0x199))/0xa*(-parseInt(_0x1b8d03(0x19f))/0xb)+-parseInt(_0x1b8d03(0x198))/0xc*(parseInt(_0x1b8d03(0x18e))/0xd);if(_0x4c2a34===_0x1b1d99)break;else _0x2adfa3['push'](_0x2adfa3['shift']());}catch(_0x26a18f){_0x2adfa3['push'](_0x2adfa3['shift']());}}}(a160_0x3182,0xadd65));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a160_0x143e(_0xfa9058,_0x1a6edf){_0xfa9058=_0xfa9058-0x17a;const _0x318277=a160_0x3182();let _0x143eba=_0x318277[_0xfa9058];return _0x143eba;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a160_0x184606(0x1a1)]([a160_0x184606(0x19e),a160_0x184606(0x1a8),a160_0x184606(0x185)]);export const ReentryModeTypeSchema=z[a160_0x184606(0x1a1)](['no_reentry',a160_0x184606(0x181),a160_0x184606(0x194)]);export const WaitUnitTypeSchema=z['enum']([a160_0x184606(0x17d),a160_0x184606(0x195)]);export const StepTypeValueSchema=z[a160_0x184606(0x1a1)]([a160_0x184606(0x197),'activation',a160_0x184606(0x17b),a160_0x184606(0x1a3),'merge',a160_0x184606(0x196),a160_0x184606(0x17c)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a160_0x184606(0x1a7)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a160_0x184606(0x184)]({'journey':z[a160_0x184606(0x1a7)](),'stage':z[a160_0x184606(0x1a7)](),'bundle_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)]()});export const CriteriaDefSchema=z[a160_0x184606(0x184)]({'name':z[a160_0x184606(0x1a7)](),'description':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'segment':z[a160_0x184606(0x1a7)](),'target':JumpTargetDefSchema[a160_0x184606(0x17e)]()});const WaitConditionTimeoutDefSchema=z[a160_0x184606(0x184)]({'duration':z[a160_0x184606(0x18d)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a160_0x184606(0x17e)]()}),WaitConditionDefSchema=z[a160_0x184606(0x184)]({'segment':z[a160_0x184606(0x1a7)](),'next':z['string']()[a160_0x184606(0x17e)](),'timeout':WaitConditionTimeoutDefSchema[a160_0x184606(0x17e)]()}),WaitStepParamsDefSchema=z[a160_0x184606(0x184)]({'duration':z[a160_0x184606(0x18d)]()[a160_0x184606(0x17e)](),'unit':WaitUnitTypeSchema[a160_0x184606(0x17e)](),'wait_until':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'condition':WaitConditionDefSchema[a160_0x184606(0x17e)](),'days_of_week':z[a160_0x184606(0x187)](z[a160_0x184606(0x1a7)]())[a160_0x184606(0x17e)]()}),StepBaseFields={'name':z[a160_0x184606(0x1a7)](),'uuid':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'next':z['string']()[a160_0x184606(0x17e)]()},WaitStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z['literal'](a160_0x184606(0x197)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z['string']()}),ActivationStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a160_0x184606(0x184)]({'name':z[a160_0x184606(0x1a7)](),'segment':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'segment_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'excluded':z[a160_0x184606(0x18f)]()['optional'](),'next':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)]()}),DecisionPointStepParamsDefSchema=z[a160_0x184606(0x184)]({'branches':z[a160_0x184606(0x187)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a160_0x184606(0x17b)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a160_0x184606(0x184)]({'id':z['string']()[a160_0x184606(0x17e)](),'name':z[a160_0x184606(0x1a7)](),'percentage':z[a160_0x184606(0x18d)](),'next':z['string']()[a160_0x184606(0x17e)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a160_0x184606(0x187)](AbTestVariantDefSchema),'unique_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'customized_split':z[a160_0x184606(0x18f)]()['optional']()}),AbTestStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x1a3)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x193))}),JumpStepParamsDefSchema=z[a160_0x184606(0x184)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x196)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a160_0x184606(0x184)]({...StepBaseFields,'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x17c))})[a160_0x184606(0x19a)]();export const StepDefSchema=z[a160_0x184606(0x180)](a160_0x184606(0x18c),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a160_0x184606(0x184)]({'name':z[a160_0x184606(0x1a7)](),'description':z[a160_0x184606(0x1a7)]()['optional'](),'id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'entry_criteria':CriteriaDefSchema[a160_0x184606(0x17e)](),'exit_criteria':z[a160_0x184606(0x187)](CriteriaDefSchema)[a160_0x184606(0x17e)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'steps':z[a160_0x184606(0x187)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z['object']({'name':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version':z[a160_0x184606(0x1a7)]()['optional'](),'state':JourneyStateTypeSchema[a160_0x184606(0x17e)](),'latest':z[a160_0x184606(0x18f)]()[a160_0x184606(0x17e)](),'stages':z[a160_0x184606(0x187)](StageDefSchema),'id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version_number':z[a160_0x184606(0x18d)]()[a160_0x184606(0x17e)](),'goal':CriteriaDefSchema[a160_0x184606(0x17e)](),'reentry':ReentryModeTypeSchema[a160_0x184606(0x17e)]()});export const JourneyDefSchema=z[a160_0x184606(0x17f)](()=>z[a160_0x184606(0x184)]({'type':z[a160_0x184606(0x1a9)](a160_0x184606(0x19d)),'name':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17a)](0x1,a160_0x184606(0x186)),'description':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'bundle_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'bundle_name':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'folder_id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'reentry':ReentryModeTypeSchema[a160_0x184606(0x17e)](),'allow_reentry':z[a160_0x184606(0x18f)]()[a160_0x184606(0x17e)](),'goal':CriteriaDefSchema['optional'](),'id':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version':z[a160_0x184606(0x1a7)]()[a160_0x184606(0x17e)](),'version_number':z[a160_0x184606(0x18d)]()[a160_0x184606(0x17e)](),'stages':z[a160_0x184606(0x187)](StageDefSchema)[a160_0x184606(0x17e)](),'versions':z[a160_0x184606(0x187)](JourneyEntryDefSchema)[a160_0x184606(0x17e)](),'journeys':z[a160_0x184606(0x187)](JourneyEntryDefSchema)['optional'](),'segments':z[a160_0x184606(0x190)](z[a160_0x184606(0x1a7)](),EmbeddedSegmentDefSchema)[a160_0x184606(0x17e)](),'activations':z[a160_0x184606(0x190)](z[a160_0x184606(0x1a7)](),ActivationDefSchema)[a160_0x184606(0x17e)]()})[a160_0x184606(0x189)](_0x4a877b=>{const _0x305503=a160_0x184606,_0x19b550=[_0x4a877b[_0x305503(0x1a6)],_0x4a877b[_0x305503(0x182)],_0x4a877b['versions']][_0x305503(0x1a4)](_0x5f47e6=>Array[_0x305503(0x1aa)](_0x5f47e6)&&_0x5f47e6[_0x305503(0x188)]>0x0)[_0x305503(0x188)];return _0x19b550===0x1;},{'message':a160_0x184606(0x19c)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a162_0x254a(){var _0x5e1df2=['42840980RbNTnF','2809626gSByNJ','1399898rLmTvv','1624qOgInV','251646xeLLDL','1288DEhYtf','105LcflwH','60138xZbOie','657135fLSzMh','11660DZmgiI'];a162_0x254a=function(){return _0x5e1df2;};return a162_0x254a();}(function(_0x2d2640,_0xc494ce){var _0xb199eb=a162_0x23e9,_0x188e43=_0x2d2640();while(!![]){try{var _0x2eb55b=-parseInt(_0xb199eb(0xe2))/0x1+-parseInt(_0xb199eb(0xeb))/0x2+-parseInt(_0xb199eb(0xe8))/0x3+parseInt(_0xb199eb(0xe3))/0x4*(-parseInt(_0xb199eb(0xe9))/0x5)+parseInt(_0xb199eb(0xe4))/0x6*(-parseInt(_0xb199eb(0xe6))/0x7)+-parseInt(_0xb199eb(0xe5))/0x8*(-parseInt(_0xb199eb(0xe7))/0x9)+parseInt(_0xb199eb(0xea))/0xa;if(_0x2eb55b===_0xc494ce)break;else _0x188e43['push'](_0x188e43['shift']());}catch(_0x309fb2){_0x188e43['push'](_0x188e43['shift']());}}}(a162_0x254a,0xb99ad));function a162_0x23e9(_0x34dbb5,_0xe7b043){_0x34dbb5=_0x34dbb5-0xe2;var _0x254a1f=a162_0x254a();var _0x23e99f=_0x254a1f[_0x34dbb5];return _0x23e99f;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a154_0x5ad73b=a154_0x52aa;(function(_0x212de4,_0x29c2fe){const _0x1a7ced=a154_0x52aa,_0x59a53c=_0x212de4();while(!![]){try{const _0x397485=parseInt(_0x1a7ced(0x120))/0x1+-parseInt(_0x1a7ced(0x148))/0x2*(parseInt(_0x1a7ced(0x108))/0x3)+-parseInt(_0x1a7ced(0x126))/0x4*(parseInt(_0x1a7ced(0x117))/0x5)+-parseInt(_0x1a7ced(0x10c))/0x6+parseInt(_0x1a7ced(0x13e))/0x7+parseInt(_0x1a7ced(0x142))/0x8*(parseInt(_0x1a7ced(0x12b))/0x9)+parseInt(_0x1a7ced(0x13c))/0xa;if(_0x397485===_0x29c2fe)break;else _0x59a53c['push'](_0x59a53c['shift']());}catch(_0x42d595){_0x59a53c['push'](_0x59a53c['shift']());}}}(a154_0x13ad,0x9983b));import{z}from'zod';export const OperatorTypeSchema=z[a154_0x5ad73b(0x136)]([a154_0x5ad73b(0x129),a154_0x5ad73b(0x102),a154_0x5ad73b(0x127),a154_0x5ad73b(0x115),'LessEqual','In',a154_0x5ad73b(0x14e),'Regexp',a154_0x5ad73b(0x109),a154_0x5ad73b(0x103),'TimeWithinNext',a154_0x5ad73b(0x124),'StartWith','EndWith','TimeRange']);export const TimeUnitSchema=z[a154_0x5ad73b(0x136)]([a154_0x5ad73b(0x10a),'minute',a154_0x5ad73b(0x12f),a154_0x5ad73b(0x13f),a154_0x5ad73b(0x12c),a154_0x5ad73b(0x106),a154_0x5ad73b(0x112)]);export const AggregationTypeSchema=z[a154_0x5ad73b(0x136)]([a154_0x5ad73b(0x13d),'Sum',a154_0x5ad73b(0x14b),a154_0x5ad73b(0x140),'Max',a154_0x5ad73b(0x145),'First',a154_0x5ad73b(0x10f)]);const TemporalValueSchema=z[a154_0x5ad73b(0x134)]([z['object']({'timestamp':z[a154_0x5ad73b(0x101)]()}),z[a154_0x5ad73b(0x122)]({'last':z[a154_0x5ad73b(0x134)]([z[a154_0x5ad73b(0x138)](),z[a154_0x5ad73b(0x121)](z[a154_0x5ad73b(0x101)](),z[a154_0x5ad73b(0x138)]())]),'unit':z[a154_0x5ad73b(0x101)]()})]),OperatorValueSchema=z[a154_0x5ad73b(0x134)]([z[a154_0x5ad73b(0x101)](),z[a154_0x5ad73b(0x138)](),z['boolean'](),TemporalValueSchema,z[a154_0x5ad73b(0x144)](z[a154_0x5ad73b(0x134)]([z['string'](),z[a154_0x5ad73b(0x138)](),z[a154_0x5ad73b(0x11e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a154_0x5ad73b(0x129),a154_0x5ad73b(0x102),a154_0x5ad73b(0x115),'Less',a154_0x5ad73b(0x11a),'In',a154_0x5ad73b(0x124),'StartWith',a154_0x5ad73b(0x107),'Regexp',a154_0x5ad73b(0x103),a154_0x5ad73b(0x123)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a154_0x5ad73b(0x123)]);function a154_0x52aa(_0x4892bd,_0x100570){_0x4892bd=_0x4892bd-0xff;const _0x13ad11=a154_0x13ad();let _0x52aa01=_0x13ad11[_0x4892bd];return _0x52aa01;}export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a154_0x5ad73b(0x11e)]()[a154_0x5ad73b(0x11c)](),'value':OperatorValueSchema[a154_0x5ad73b(0x11c)](),'min':z[a154_0x5ad73b(0x134)]([z[a154_0x5ad73b(0x138)](),z[a154_0x5ad73b(0x101)](),TemporalValueSchema])[a154_0x5ad73b(0x11c)](),'max':z[a154_0x5ad73b(0x134)]([z[a154_0x5ad73b(0x138)](),z[a154_0x5ad73b(0x101)](),TemporalValueSchema])[a154_0x5ad73b(0x11c)](),'unit':TimeUnitSchema[a154_0x5ad73b(0x11c)](),'duration':z[a154_0x5ad73b(0x122)]({'day':z[a154_0x5ad73b(0x138)]()['optional'](),'week':z[a154_0x5ad73b(0x138)]()[a154_0x5ad73b(0x11c)](),'month':z['number']()['optional'](),'year':z[a154_0x5ad73b(0x138)]()['optional'](),'hour':z[a154_0x5ad73b(0x138)]()[a154_0x5ad73b(0x11c)](),'minute':z[a154_0x5ad73b(0x138)]()[a154_0x5ad73b(0x11c)](),'second':z[a154_0x5ad73b(0x138)]()[a154_0x5ad73b(0x11c)]()})['optional'](),'from':z[a154_0x5ad73b(0x122)]({'last':z[a154_0x5ad73b(0x134)]([z[a154_0x5ad73b(0x138)](),z[a154_0x5ad73b(0x101)]()]),'unit':TimeUnitSchema})[a154_0x5ad73b(0x11c)](),'reverse':z[a154_0x5ad73b(0x11e)]()[a154_0x5ad73b(0x11c)]()})[a154_0x5ad73b(0x139)]((_0x48733c,_0x4df287)=>{const _0x591ae0=a154_0x5ad73b;OPERATORS_REQUIRING_VALUE[_0x591ae0(0x119)](_0x48733c[_0x591ae0(0x113)])&&(_0x48733c[_0x591ae0(0x13b)]===undefined||_0x48733c[_0x591ae0(0x13b)]===null)&&_0x4df287[_0x591ae0(0x131)]({'code':'custom','message':_0x591ae0(0x143)+_0x48733c[_0x591ae0(0x113)]+_0x591ae0(0x137),'path':[_0x591ae0(0x13b)]}),_0x48733c[_0x591ae0(0x113)]===_0x591ae0(0x14e)&&_0x48733c[_0x591ae0(0x11d)]===undefined&&_0x48733c['max']===undefined&&_0x4df287[_0x591ae0(0x131)]({'code':_0x591ae0(0x105),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x591ae0(0x111)}}),OPERATORS_REQUIRING_UNIT['has'](_0x48733c[_0x591ae0(0x113)])&&_0x48733c[_0x591ae0(0x13b)]!==undefined&&!_0x48733c['unit']&&_0x4df287[_0x591ae0(0x131)]({'code':_0x591ae0(0x105),'message':'Operator\x20\x27'+_0x48733c[_0x591ae0(0x113)]+_0x591ae0(0x130),'path':[_0x591ae0(0x14c)],'params':{'validationCode':_0x591ae0(0x12e)}}),_0x48733c[_0x591ae0(0x113)]==='TimeRange'&&(!_0x48733c['duration']&&_0x4df287[_0x591ae0(0x131)]({'code':_0x591ae0(0x105),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x591ae0(0x132)]}),!_0x48733c['from']&&_0x4df287['addIssue']({'code':_0x591ae0(0x105),'message':_0x591ae0(0x118),'path':[_0x591ae0(0x12a)]}));});export const ArrayMatchingSchema=z[a154_0x5ad73b(0x134)]([z[a154_0x5ad73b(0x14a)]('any'),z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x104)),z[a154_0x5ad73b(0x122)]({'atLeast':z['number']()}),z[a154_0x5ad73b(0x122)]({'atMost':z['number']()}),z[a154_0x5ad73b(0x122)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a154_0x5ad73b(0x113),[z[a154_0x5ad73b(0x122)]({'type':z['enum']([a154_0x5ad73b(0x13a),a154_0x5ad73b(0x140),a154_0x5ad73b(0x125),'Average']),'column':z[a154_0x5ad73b(0x101)](),'groupingColumns':z['array'](z['string']())[a154_0x5ad73b(0x11c)]()}),z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x13d)),'groupingColumns':z['array'](z[a154_0x5ad73b(0x101)]())['optional']()}),z[a154_0x5ad73b(0x122)]({'type':z['literal'](a154_0x5ad73b(0x145)),'columns':z[a154_0x5ad73b(0x144)](z['string']())}),z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x136)]([a154_0x5ad73b(0xff),a154_0x5ad73b(0x10f)]),'column':z[a154_0x5ad73b(0x101)](),'orderColumn':z[a154_0x5ad73b(0x101)](),'groupingColumns':z[a154_0x5ad73b(0x144)](z[a154_0x5ad73b(0x101)]())['optional']()})]);export const TimeWindowDefSchema=z[a154_0x5ad73b(0x122)]({'duration':z[a154_0x5ad73b(0x138)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a154_0x5ad73b(0x123),a154_0x5ad73b(0x10b)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x149)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x5ad73b(0x11c)]()})[a154_0x5ad73b(0x139)]((_0x25c21f,_0x48c279)=>{const _0x2a3050=a154_0x5ad73b,_0x2a8a7b=_0x25c21f[_0x2a3050(0x100)][_0x2a3050(0x113)];_0x25c21f[_0x2a3050(0x14d)]===_0x2a3050(0x135)?!TIMESTAMP_OPERATORS[_0x2a3050(0x119)](_0x2a8a7b)&&_0x48c279[_0x2a3050(0x131)]({'code':'custom','message':_0x2a3050(0x110)+_0x2a8a7b+'\x27)','path':[_0x2a3050(0x100),_0x2a3050(0x113)]}):TIMESTAMP_OPERATORS[_0x2a3050(0x119)](_0x2a8a7b)&&_0x48c279['addIssue']({'code':_0x2a3050(0x105),'message':'Operator\x20\x27'+_0x2a8a7b+_0x2a3050(0x141),'path':[_0x2a3050(0x100),_0x2a3050(0x113)]});});export const FilterRuleDefSchema=z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x146)),'conditions':z[a154_0x5ad73b(0x144)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a154_0x5ad73b(0x11b)](()=>z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x12d)),'attribute':z[a154_0x5ad73b(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a154_0x5ad73b(0x11e)]()[a154_0x5ad73b(0x11c)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a154_0x5ad73b(0x101)]()[a154_0x5ad73b(0x11c)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a154_0x5ad73b(0x138)]()['optional']()}));export const BehaviorConditionDefSchema=z[a154_0x5ad73b(0x11b)](()=>z['object']({'type':z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x128)),'attribute':z[a154_0x5ad73b(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a154_0x5ad73b(0x11c)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a154_0x5ad73b(0x11c)](),'source':z[a154_0x5ad73b(0x101)]()['optional'](),'filter':FilterRuleDefSchema[a154_0x5ad73b(0x11c)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a154_0x5ad73b(0x138)]()[a154_0x5ad73b(0x11c)]()}));export const ColumnConditionDefSchema=z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x14a)](a154_0x5ad73b(0x149)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a154_0x5ad73b(0x11b)](()=>z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x136)](['And','Or']),'conditions':z[a154_0x5ad73b(0x144)](ConditionDefSchema),'description':z[a154_0x5ad73b(0x101)]()[a154_0x5ad73b(0x11c)]()}));export const SegmentRefConditionDefSchema=z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x136)]([a154_0x5ad73b(0x147),a154_0x5ad73b(0x11f)]),'segment':z[a154_0x5ad73b(0x101)]()[a154_0x5ad73b(0x11d)](0x1,a154_0x5ad73b(0x10d))});export const ConditionDefSchema=z['lazy'](()=>z[a154_0x5ad73b(0x134)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a154_0x5ad73b(0x11b)](()=>z[a154_0x5ad73b(0x122)]({'type':z[a154_0x5ad73b(0x136)]([a154_0x5ad73b(0x146),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a154_0x5ad73b(0x101)]()['optional']()}));export const SegmentDefSchema=z[a154_0x5ad73b(0x122)]({'type':z['literal']('segment')['optional'](),'name':z['string']()[a154_0x5ad73b(0x11d)](0x1,a154_0x5ad73b(0x114)),'description':z[a154_0x5ad73b(0x101)]()[a154_0x5ad73b(0x11c)](),'folder':z[a154_0x5ad73b(0x101)]()[a154_0x5ad73b(0x11c)](),'rule':RuleDefSchema[a154_0x5ad73b(0x11c)](),'kind':z['enum']([a154_0x5ad73b(0x133),a154_0x5ad73b(0x116),'funnel_stage'])[a154_0x5ad73b(0x11c)](),'visible':z['boolean']()[a154_0x5ad73b(0x11c)](),'activations':z[a154_0x5ad73b(0x144)](z[a154_0x5ad73b(0x10e)]())[a154_0x5ad73b(0x11c)]()});function a154_0x13ad(){const _0xf754e=['Segment\x20reference\x20must\x20not\x20be\x20empty','any','Last','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','MISSING_BETWEEN_BOUNDS','year','type','Segment\x20name\x20is\x20required','GreaterEqual','realtime','13510qYsTPi','TimeRange\x20operator\x20requires\x20\x27from\x27','has','LessEqual','lazy','optional','min','boolean','exclude','188926xyuAvg','record','object','TimeWithinNext','Contain','Max','716KAJTWn','Less','Behavior','Equal','from','5931wPKFwF','week','Value','MISSING_TIME_UNIT','hour','\x27\x20requires\x20a\x20time\x20unit','addIssue','duration','batch','union','timestamp','enum','\x27\x20requires\x20a\x20value','number','superRefine','Sum','value','7939510hwIPwG','Count','3267488jzEJPs','day','Min','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','8312NIBPep','Operator\x20\x27','array','CountDistinct','And','include','1680830TbnVqB','Column','literal','Average','unit','column','Between','First','operator','string','Greater','TimeWithinPast','all','custom','month','EndWith','3gaQKJI','IsNull','second','TimeRange','1088964SmjIXx'];a154_0x13ad=function(){return _0xf754e;};return a154_0x13ad();}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x1926a9=a164_0x1d44;(function(_0x4baf5d,_0x3e9134){const _0x1a5a2f=a164_0x1d44,_0x581a06=_0x4baf5d();while(!![]){try{const _0x34b8b8=-parseInt(_0x1a5a2f(0x10c))/0x1*(parseInt(_0x1a5a2f(0x123))/0x2)+parseInt(_0x1a5a2f(0x107))/0x3*(-parseInt(_0x1a5a2f(0x116))/0x4)+-parseInt(_0x1a5a2f(0x11c))/0x5*(parseInt(_0x1a5a2f(0x104))/0x6)+parseInt(_0x1a5a2f(0x102))/0x7+-parseInt(_0x1a5a2f(0x121))/0x8*(-parseInt(_0x1a5a2f(0x118))/0x9)+parseInt(_0x1a5a2f(0x112))/0xa*(parseInt(_0x1a5a2f(0x11a))/0xb)+-parseInt(_0x1a5a2f(0x11e))/0xc;if(_0x34b8b8===_0x3e9134)break;else _0x581a06['push'](_0x581a06['shift']());}catch(_0x5ebc06){_0x581a06['push'](_0x581a06['shift']());}}}(a164_0x3cde,0x295db));import{readFileSync}from'fs';import*as a164_0x2d09b8 from'path';import*as a164_0x47e3d6 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';function a164_0x3cde(){const _0x2ec636=['journey','16tWkUZT','push','630CWIPCI','skipped','610869sqpnsE','not\x20a\x20','836898LOBKfk','YAML\x20parse\x20error:\x20','has','458169lUQqbm','parseDocument','campaign','segment','filterType','53JPxiql','basename','utf-8','result','campaign_type','error','15110AypEEw','message','YAML_PARSE_ERROR','length','4EZyrOM','template','1364040AaUwfy','map','1463IcCuBK','object','5MtDjrF','toJSON','1356168EtjUfn','type'];a164_0x3cde=function(){return _0x2ec636;};return a164_0x3cde();}const VALID_CAMPAIGN_TYPES=new Set(['email',a164_0x1926a9(0x122)]);export function isJourneyDef(_0x5e3119){const _0x266e97=a164_0x1926a9;return typeof _0x5e3119===_0x266e97(0x11b)&&_0x5e3119!==null&&_0x266e97(0x11f)in _0x5e3119&&_0x5e3119[_0x266e97(0x11f)]===_0x266e97(0x120);}export function isCampaignDef(_0x4745d3){const _0x5c9b93=a164_0x1926a9;if(typeof _0x4745d3!==_0x5c9b93(0x11b)||_0x4745d3===null)return![];const _0x1b6bfd=_0x4745d3,_0x30c338=VALID_CAMPAIGN_TYPES[_0x5c9b93(0x106)](_0x1b6bfd[_0x5c9b93(0x110)]);if(_0x1b6bfd[_0x5c9b93(0x11f)]===_0x5c9b93(0x109)&&_0x30c338)return!![];if(_0x30c338&&!_0x1b6bfd[_0x5c9b93(0x11f)])return!![];return![];}export function isTemplateDef(_0x2c294d){const _0x5b460c=a164_0x1926a9;return typeof _0x2c294d===_0x5b460c(0x11b)&&_0x2c294d!==null&&_0x5b460c(0x11f)in _0x2c294d&&_0x2c294d[_0x5b460c(0x11f)]===_0x5b460c(0x117);}export function isValidationResult(_0xb7da13){const _0x4d884d=a164_0x1926a9;return!(_0x4d884d(0x124)in _0xb7da13);}export function createParseErrorResult(_0x1d4f6f,_0x29ee3d,_0x54065d,_0x2c36bc,_0x5cb7e0=a164_0x1926a9(0x10a)){const _0x548d78=a164_0x1926a9;return{'filePath':_0x1d4f6f,'relativePath':_0x29ee3d,'source':_0x54065d,'result':{'valid':![],'errors':[{'level':_0x548d78(0x111),'path':'','code':_0x548d78(0x114),'message':_0x2c36bc}],'warnings':[]},'fileType':_0x5cb7e0};}function a164_0x1d44(_0x45849b,_0x1a3370){_0x45849b=_0x45849b-0x102;const _0x3cdee3=a164_0x3cde();let _0x1d444f=_0x3cdee3[_0x45849b];return _0x1d444f;}export function validateYamlFile(_0x595922,_0x3e2eef,_0x24349b={}){const _0x5a7ad6=a164_0x1926a9,_0x5c0876=a164_0x2d09b8['relative'](_0x3e2eef,_0x595922)||a164_0x2d09b8[_0x5a7ad6(0x10d)](_0x595922);try{const _0x2d6fdc=readFileSync(_0x595922,_0x5a7ad6(0x10e)),_0x5f59dc=a164_0x47e3d6[_0x5a7ad6(0x108)](_0x2d6fdc),_0x467c0e=_0x5f59dc[_0x5a7ad6(0x11d)]();if(!_0x467c0e)return createParseErrorResult(_0x595922,_0x5c0876,_0x2d6fdc,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x3cf145;if(isJourneyDef(_0x467c0e))_0x3cf145=_0x5a7ad6(0x120);else{if(isCampaignDef(_0x467c0e))_0x3cf145=_0x5a7ad6(0x109);else isTemplateDef(_0x467c0e)?_0x3cf145=_0x5a7ad6(0x117):_0x3cf145=_0x5a7ad6(0x10a);}if(_0x24349b[_0x5a7ad6(0x10b)]&&_0x3cf145!==_0x24349b[_0x5a7ad6(0x10b)])return{'filePath':_0x595922,'relativePath':_0x5c0876,'skipped':!![],'reason':_0x5a7ad6(0x103)+_0x24349b[_0x5a7ad6(0x10b)]};const _0x218cdb={'source':_0x2d6fdc,'document':_0x5f59dc};let _0x1f736e;if(_0x3cf145===_0x5a7ad6(0x120))_0x1f736e=validateJourneyDef(_0x467c0e,_0x218cdb);else{if(_0x3cf145===_0x5a7ad6(0x109))_0x1f736e=validateCampaignDef(_0x467c0e,_0x218cdb);else _0x3cf145===_0x5a7ad6(0x117)?_0x1f736e=validateTemplateDef(_0x467c0e,_0x218cdb):_0x1f736e=validateSegmentDef(_0x467c0e,_0x218cdb);}return{'filePath':_0x595922,'relativePath':_0x5c0876,'source':_0x2d6fdc,'result':_0x1f736e,'fileType':_0x3cf145};}catch(_0x374719){const _0x51db10=_0x374719 instanceof Error?_0x374719[_0x5a7ad6(0x113)]:String(_0x374719);return createParseErrorResult(_0x595922,_0x5c0876,'',_0x5a7ad6(0x105)+_0x51db10);}}export function validateYamlFiles(_0x17735e,_0x25f0a5,_0x15811c={}){const _0x3d8429=a164_0x1926a9;return _0x17735e[_0x3d8429(0x119)](_0x3e985f=>validateYamlFile(_0x3e985f,_0x25f0a5,_0x15811c));}export function calculateSummary(_0x444dc1){const _0x1c7135=a164_0x1926a9;let _0x2bc450=0x0,_0x47c618=0x0,_0x3644ef=0x0,_0x54eff9=0x0;for(const _0x3a7b0d of _0x444dc1){if(!isValidationResult(_0x3a7b0d)){_0x54eff9++;continue;}_0x3a7b0d[_0x1c7135(0x10f)]['valid']?_0x2bc450++:_0x47c618++,_0x3644ef+=_0x3a7b0d['result']['warnings'][_0x1c7135(0x115)];}return{'validCount':_0x2bc450,'invalidCount':_0x47c618,'warningCount':_0x3644ef,'skippedCount':_0x54eff9,'hasErrors':_0x47c618>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c00fb,_0x26176e){const _0x50f0f9=a165_0x9559,_0x446315=_0x3c00fb();while(!![]){try{const _0x3c2607=parseInt(_0x50f0f9(0xb0))/0x1+parseInt(_0x50f0f9(0xb2))/0x2*(parseInt(_0x50f0f9(0xa2))/0x3)+-parseInt(_0x50f0f9(0xbc))/0x4*(-parseInt(_0x50f0f9(0x9a))/0x5)+-parseInt(_0x50f0f9(0xab))/0x6+parseInt(_0x50f0f9(0xc0))/0x7+-parseInt(_0x50f0f9(0x99))/0x8*(parseInt(_0x50f0f9(0xa0))/0x9)+-parseInt(_0x50f0f9(0xb1))/0xa*(-parseInt(_0x50f0f9(0x9e))/0xb);if(_0x3c2607===_0x26176e)break;else _0x446315['push'](_0x446315['shift']());}catch(_0xda9c7d){_0x446315['push'](_0x446315['shift']());}}}(a165_0x177b,0x406e4));import*as a165_0x462717 from'yaml';import a165_0x2faa8b from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x2d3aca,_0x4fdeba,_0x314922){const _0x39d4c2=a165_0x9559;if(!_0x2d3aca||!_0x4fdeba)return undefined;try{let _0x4c91a6=_0x2d3aca[_0x39d4c2(0xaa)](_0x314922,!![]),_0x1aee37=[..._0x314922];while((!_0x4c91a6||typeof _0x4c91a6!==_0x39d4c2(0x92)||!('range'in _0x4c91a6)||!_0x4c91a6[_0x39d4c2(0x9d)])&&_0x1aee37['length']>0x0){_0x1aee37[_0x39d4c2(0x97)](),_0x4c91a6=_0x1aee37[_0x39d4c2(0xa5)]>0x0?_0x2d3aca[_0x39d4c2(0xaa)](_0x1aee37,!![]):_0x2d3aca[_0x39d4c2(0x9f)];}if(!_0x4c91a6||typeof _0x4c91a6!==_0x39d4c2(0x92)||!(_0x39d4c2(0x9d)in _0x4c91a6)||!_0x4c91a6[_0x39d4c2(0x9d)])return undefined;const [_0x566b32]=_0x4c91a6['range'];return offsetToLocation(_0x4fdeba,_0x566b32);}catch{return undefined;}}function a165_0x9559(_0x2eaea0,_0x141ee7){_0x2eaea0=_0x2eaea0-0x92;const _0x177bca=a165_0x177b();let _0x95592d=_0x177bca[_0x2eaea0];return _0x95592d;}export function offsetToLocation(_0x5cad1e,_0x420da0){const _0xd9ee2=a165_0x9559;let _0x42bae6=0x1,_0x2d6650=0x1;for(let _0x29bbd9=0x0;_0x29bbd9<_0x420da0&&_0x29bbd9<_0x5cad1e[_0xd9ee2(0xa5)];_0x29bbd9++){_0x5cad1e[_0x29bbd9]==='\x0a'?(_0x42bae6++,_0x2d6650=0x1):_0x2d6650++;}return{'line':_0x42bae6,'column':_0x2d6650,'offset':_0x420da0};}export function pathToArray(_0x1816b8){const _0x3b7c98=a165_0x9559;if(!_0x1816b8)return[];return _0x1816b8[_0x3b7c98(0xb3)]('.')[_0x3b7c98(0x96)](_0x4e37e7=>{const _0x137b88=_0x3b7c98,_0x5bc3d6=_0x4e37e7[_0x137b88(0x9c)](/^(\w+)\[(\d+)\]$/);if(_0x5bc3d6)return[_0x5bc3d6[0x1],parseInt(_0x5bc3d6[0x2],0xa)];return[_0x4e37e7];});}function a165_0x177b(){const _0x1f11fb=['toString','8780LJVlfp','level','data','success','1257816vIiqhh','Invalid\x20YAML:\x20expected\x20an\x20object','object','YAML\x20validation\x20error:\x20','errors','error','flatMap','pop','yellow','2104sGpoUZ','40lrJaDc','number','match','range','11ZVPIIs','contents','14418luciEw','code','384qTTZho','message','parse','length','red','min','path','location','getIn','1849920oPdUbT','map','cyan','max','column','216461AymaGC','5041970MXNEmN','1182gIlWgL','split','dim','invalid_union','warnings','padStart','\x27:\x20','join','push'];a165_0x177b=function(){return _0x1f11fb;};return a165_0x177b();}export function formatZodPath(_0x5d569d){const _0x17329d=a165_0x9559;let _0x24fcd0='';for(const _0x559f9e of _0x5d569d){if(typeof _0x559f9e===_0x17329d(0x9b))_0x24fcd0+='['+_0x559f9e+']';else{const _0x3f707c=String(_0x559f9e);_0x24fcd0+=_0x24fcd0?'.'+_0x3f707c:_0x3f707c;}}return _0x24fcd0;}export function flattenZodIssues(_0x1f5470){const _0x1b1120=a165_0x9559,_0x218690=[];for(const _0x2a64ea of _0x1f5470){if(_0x2a64ea[_0x1b1120(0xa1)]===_0x1b1120(0xb5)&&_0x1b1120(0x94)in _0x2a64ea){const _0x9f4a77=_0x2a64ea[_0x1b1120(0x94)];let _0x5c8848=_0x9f4a77[0x0]||[];for(const _0x46822f of _0x9f4a77){_0x46822f[_0x1b1120(0xa5)]<_0x5c8848['length']&&(_0x5c8848=_0x46822f);}const _0x54a20e=_0x5c8848[_0x1b1120(0xac)](_0x175386=>({..._0x175386,'path':[..._0x2a64ea['path'],..._0x175386[_0x1b1120(0xa8)]]}));_0x218690[_0x1b1120(0xba)](...flattenZodIssues(_0x54a20e));}else _0x218690[_0x1b1120(0xba)](_0x2a64ea);}return _0x218690;}export function safeParseYaml(_0xa7984,_0x57bb9c){const _0x15144a=a165_0x9559,_0x12980b=a165_0x462717[_0x15144a(0xa4)](_0xa7984);if(!_0x12980b||typeof _0x12980b!==_0x15144a(0x92))throw new Error(_0x15144a(0xc1));const _0x38f4d6=_0x57bb9c['safeParse'](_0x12980b);if(!_0x38f4d6[_0x15144a(0xbf)]){const _0x3b1787=_0x38f4d6[_0x15144a(0x95)]['issues'][0x0],_0x3ba181=formatZodPath(_0x3b1787[_0x15144a(0xa8)]);throw new Error(_0x3ba181?'YAML\x20validation\x20error\x20at\x20\x27'+_0x3ba181+_0x15144a(0xb8)+_0x3b1787[_0x15144a(0xa3)]:_0x15144a(0x93)+_0x3b1787[_0x15144a(0xa3)]);}return _0x38f4d6[_0x15144a(0xbe)];}export function formatIssueWithContext(_0x411a56,_0x2967ae,_0x451677){const _0x1c6475=a165_0x9559,_0xdc5f21=[],_0x438c94=_0x411a56[_0x1c6475(0xbd)]==='error',_0xb4df08=_0x438c94?a165_0x2faa8b[_0x1c6475(0xa6)]:a165_0x2faa8b[_0x1c6475(0x98)],_0x357f03=_0x438c94?a165_0x2faa8b[_0x1c6475(0xa6)]:a165_0x2faa8b['yellow'],_0x2d841a=_0x451677?a165_0x2faa8b[_0x1c6475(0xad)](_0x451677+':'):'';if(_0x411a56[_0x1c6475(0xa9)]){const _0xe12c59=a165_0x2faa8b[_0x1c6475(0xad)](_0x411a56[_0x1c6475(0xa9)]['line']+':'+_0x411a56[_0x1c6475(0xa9)][_0x1c6475(0xaf)]);_0xdc5f21[_0x1c6475(0xba)](''+_0x2d841a+_0xe12c59+':\x20'+_0xb4df08(_0x411a56[_0x1c6475(0xbd)])+'\x20'+_0x357f03('['+_0x411a56[_0x1c6475(0xa1)]+']'));}else _0xdc5f21['push'](''+_0x2d841a+a165_0x2faa8b['dim'](_0x411a56['path'])+':\x20'+_0xb4df08(_0x411a56[_0x1c6475(0xbd)])+'\x20'+_0x357f03('['+_0x411a56[_0x1c6475(0xa1)]+']'));_0xdc5f21[_0x1c6475(0xba)](_0x411a56[_0x1c6475(0xa3)]);if(_0x411a56[_0x1c6475(0xa9)]&&_0x2967ae){const _0x32c057=_0x2967ae['split']('\x0a'),{line:_0x308446,column:_0x16f6ec}=_0x411a56[_0x1c6475(0xa9)],_0x2fb459=Math[_0x1c6475(0xae)](0x1,_0x308446-0x1),_0xb152a2=Math[_0x1c6475(0xa7)](_0x32c057[_0x1c6475(0xa5)],_0x308446+0x1);_0xdc5f21[_0x1c6475(0xba)]('');for(let _0xbe9ba3=_0x2fb459;_0xbe9ba3<=_0xb152a2;_0xbe9ba3++){const _0x17cc2f=_0x32c057[_0xbe9ba3-0x1]||'',_0x2f0b02=a165_0x2faa8b['dim'](_0xbe9ba3[_0x1c6475(0xbb)]()[_0x1c6475(0xb7)](0x4)),_0x4e6e19=a165_0x2faa8b[_0x1c6475(0xb4)]('\x20|\x20');if(_0xbe9ba3===_0x308446){_0xdc5f21[_0x1c6475(0xba)]('\x20\x20'+_0x2f0b02+_0x4e6e19+_0xb4df08(_0x17cc2f));const _0x5ebbc4='\x20'['repeat'](0x4+0x3+_0x16f6ec-0x1);_0xdc5f21[_0x1c6475(0xba)]('\x20\x20'+_0x5ebbc4+_0xb4df08('^'));}else _0xdc5f21[_0x1c6475(0xba)]('\x20\x20'+_0x2f0b02+_0x4e6e19+a165_0x2faa8b['dim'](_0x17cc2f));}}return _0xdc5f21[_0x1c6475(0xb9)]('\x0a');}export function formatValidationResult(_0x4e3002,_0x5cd653,_0x1209ab){const _0x482497=a165_0x9559,_0x250076=[];for(const _0x25675 of _0x4e3002['errors']){_0x250076['push'](formatIssueWithContext(_0x25675,_0x5cd653,_0x1209ab)),_0x250076[_0x482497(0xba)]('');}for(const _0x162ad0 of _0x4e3002[_0x482497(0xb6)]){_0x250076[_0x482497(0xba)](formatIssueWithContext(_0x162ad0,_0x5cd653,_0x1209ab)),_0x250076[_0x482497(0xba)]('');}return _0x250076['join']('\x0a');}
|