@treasuredata/tdx 2026.4.0 → 2026.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.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/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/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(_0x3b978,_0x2b5d1e){const _0x21fce8=a157_0x54f3,_0x2e4aaa=_0x3b978();while(!![]){try{const _0x21e8b4=parseInt(_0x21fce8(0x106))/0x1*(-parseInt(_0x21fce8(0xdd))/0x2)+parseInt(_0x21fce8(0x109))/0x3*(parseInt(_0x21fce8(0xde))/0x4)+-parseInt(_0x21fce8(0xfa))/0x5+parseInt(_0x21fce8(0xe8))/0x6*(parseInt(_0x21fce8(0xf3))/0x7)+parseInt(_0x21fce8(0xee))/0x8+parseInt(_0x21fce8(0x105))/0x9+-parseInt(_0x21fce8(0x104))/0xa;if(_0x21e8b4===_0x2b5d1e)break;else _0x2e4aaa['push'](_0x2e4aaa['shift']());}catch(_0x58933b){_0x2e4aaa['push'](_0x2e4aaa['shift']());}}}(a157_0xbaa5,0x647e1));import a157_0x21c6c0 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a157_0xbaa5(){const _0x358523=['cwd','866reIfqn','236OWHoeS','startsWith','join','tdx.json','trim','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','no_parent','error','segment','227418fcpjma','file_not_found','type','No\x20tdx.json\x20found\x20for\x20file:\x20','isScoped','string','2539104VSCpJA','match','exists','context','directory','119iSLLJw','basename','dirname','file','parent_segment','journey','Not\x20a\x20YAML\x20file:\x20','2315355CVQuvU','replace','stat','root','resourceType','relative','parentSegment','isDirectory','segmentName','Parent\x20segment\x20not\x20specified','14331440pCeadS','7245567gYrxsC','118epJfwR','no_config','configDir','30108Garzjt','message','invalid_yaml','parse','extname','parent_name','folderPath','resolve','includes','scopedFolderPath'];a157_0xbaa5=function(){return _0x358523;};return a157_0xbaa5();}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x4aa194){const _0x37c47d=a157_0x54f3;return _0x4aa194['type']!==_0x37c47d(0xe6);}export function isScopedResolution(_0x1b4a70){const _0x3240f4=a157_0x54f3;return _0x1b4a70[_0x3240f4(0xea)]===_0x3240f4(0xf2)||_0x1b4a70['type']===_0x3240f4(0xf6)||_0x1b4a70[_0x3240f4(0xea)]===_0x3240f4(0xf1);}function a157_0x54f3(_0x43d5d9,_0x44e23d){_0x43d5d9=_0x43d5d9-0xd9;const _0xbaa599=a157_0xbaa5();let _0x54f329=_0xbaa599[_0x43d5d9];return _0x54f329;}export function getScopedDetails(_0x4d31c1){const _0x123b40=a157_0x54f3;if(isScopedResolution(_0x4d31c1))return{'isScoped':_0x4d31c1[_0x123b40(0xec)],'scopedFolderPath':_0x4d31c1[_0x123b40(0xdb)]};return undefined;}async function findTdxConfigAsync(_0x3a2a9d,_0x345d5){const _0x21a76f=a157_0x54f3;let _0xcc2e1e=a157_0x21c6c0['resolve'](_0x3a2a9d);const _0x29f491=a157_0x21c6c0[_0x21a76f(0x10c)](_0xcc2e1e)[_0x21a76f(0xfd)];while(_0xcc2e1e!==_0x29f491){const _0x48e58f=a157_0x21c6c0[_0x21a76f(0xe0)](_0xcc2e1e,_0x21a76f(0xe1));if(await _0x345d5[_0x21a76f(0xf0)](_0x48e58f))try{const _0xf285b3=await _0x345d5['readFile'](_0x48e58f),_0x41e8ae=JSON[_0x21a76f(0x10c)](_0xf285b3);if(_0x41e8ae[_0x21a76f(0xf7)]&&typeof _0x41e8ae[_0x21a76f(0xf7)]===_0x21a76f(0xed))return{'configPath':_0x48e58f,'configDir':_0xcc2e1e,'parentSegment':_0x41e8ae[_0x21a76f(0xf7)]};}catch{}_0xcc2e1e=a157_0x21c6c0[_0x21a76f(0xf5)](_0xcc2e1e);}return null;}function calculateScopedPath(_0x3e0071,_0x3f6f10){const _0x4056b4=a157_0x54f3,_0x3a0030=a157_0x21c6c0[_0x4056b4(0xff)](_0x3f6f10,_0x3e0071),_0x123b52=_0x3a0030!==''&&_0x3a0030!=='.'&&!_0x3a0030[_0x4056b4(0xdf)]('..');return{'isScoped':_0x123b52,'scopedFolderPath':_0x123b52?_0x3a0030[_0x4056b4(0xfb)](/\\/g,'/'):''};}export async function resolveTarget(_0x2d4825){const _0x2d14c7=a157_0x54f3,{arg:_0x596446,contextParent:_0x5c42c9,cwd:cwd=process[_0x2d14c7(0xdc)](),fs:fs=nodeFileSystem}=_0x2d4825;if(_0x596446&&isYamlFilePath(_0x596446))try{const _0x1f72e6=await resolveYamlFilePath(_0x596446,fs),_0x70a198=a157_0x21c6c0[_0x2d14c7(0xd9)](_0x596446),_0x810531=a157_0x21c6c0[_0x2d14c7(0xf5)](_0x70a198),_0x428bd5=await findTdxConfigAsync(_0x810531,fs);if(!_0x428bd5){if(_0x5c42c9){const _0x29b69b=a157_0x21c6c0[_0x2d14c7(0xf5)](_0x70a198);return{'type':'file','parentName':_0x5c42c9,'targetDir':_0x29b69b,'configRoot':_0x29b69b,'filePath':_0x70a198,'resourceName':_0x1f72e6['segmentName'],'folderPath':_0x1f72e6[_0x2d14c7(0x10f)],'resourceType':_0x1f72e6[_0x2d14c7(0xfe)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x2d14c7(0xeb)+_0x596446,'arg':_0x596446,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x19de30=calculateScopedPath(_0x810531,_0x428bd5[_0x2d14c7(0x108)]);return{'type':_0x2d14c7(0xf6),'parentName':_0x428bd5[_0x2d14c7(0x100)],'targetDir':_0x428bd5[_0x2d14c7(0x108)],'configRoot':_0x428bd5[_0x2d14c7(0x108)],'filePath':_0x70a198,'resourceName':_0x1f72e6[_0x2d14c7(0x102)],'folderPath':_0x1f72e6[_0x2d14c7(0x10f)],'resourceType':_0x1f72e6[_0x2d14c7(0xfe)],'isScoped':_0x19de30[_0x2d14c7(0xec)],'scopedFolderPath':_0x19de30['scopedFolderPath']};}catch(_0x2dfaa9){const _0x43cdf0=_0x2dfaa9 instanceof Error?_0x2dfaa9[_0x2d14c7(0x10a)]:String(_0x2dfaa9);if(_0x43cdf0[_0x2d14c7(0xda)]('File\x20not\x20found'))return{'type':'error','errorCode':_0x2d14c7(0xe9),'message':'File\x20not\x20found:\x20'+_0x596446,'arg':_0x596446};if(_0x43cdf0['includes']('No\x20tdx.json\x20found')){if(_0x5c42c9){const _0x1cdd16=a157_0x21c6c0[_0x2d14c7(0xd9)](_0x596446);if(await fs['exists'](_0x1cdd16)){const _0x43aea7=a157_0x21c6c0[_0x2d14c7(0xf5)](_0x1cdd16),_0x449d71=await fs['readFile'](_0x1cdd16),_0x5accfd=_0x449d71[_0x2d14c7(0xef)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x144f08=_0x449d71[_0x2d14c7(0xef)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4c288f=_0x5accfd?_0x5accfd[0x1]['trim']():a157_0x21c6c0[_0x2d14c7(0xf4)](_0x596446,a157_0x21c6c0[_0x2d14c7(0x10d)](_0x596446)),_0x33c3bd=_0x144f08&&_0x144f08[0x1][_0x2d14c7(0xe2)]()===_0x2d14c7(0xf8)?_0x2d14c7(0xf8):_0x2d14c7(0xe7);return{'type':_0x2d14c7(0xf6),'parentName':_0x5c42c9,'targetDir':_0x43aea7,'configRoot':_0x43aea7,'filePath':_0x1cdd16,'resourceName':_0x4c288f,'folderPath':'','resourceType':_0x33c3bd,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x2d14c7(0xe6),'errorCode':'no_config','message':_0x2d14c7(0xeb)+_0x596446,'arg':_0x596446,'helpText':_0x2d14c7(0xe3)};}return{'type':_0x2d14c7(0xe6),'errorCode':_0x2d14c7(0x10b),'message':_0x43cdf0,'arg':_0x596446};}if(_0x596446){const _0x11697c=a157_0x21c6c0[_0x2d14c7(0xd9)](cwd,_0x596446);let _0x168ce5=null;try{_0x168ce5=await fs[_0x2d14c7(0xfc)](_0x11697c);}catch{}if(_0x168ce5?.[_0x2d14c7(0x101)]()){const _0x37ddee=await findTdxConfigAsync(_0x11697c,fs);if(_0x37ddee){const _0x50f502=calculateScopedPath(_0x11697c,_0x37ddee[_0x2d14c7(0x108)]);return{'type':_0x2d14c7(0xf2),'parentName':_0x37ddee[_0x2d14c7(0x100)],'targetDir':_0x11697c,'configRoot':_0x37ddee[_0x2d14c7(0x108)],'isScoped':_0x50f502['isScoped'],'scopedFolderPath':_0x50f502[_0x2d14c7(0xdb)]};}if(_0x5c42c9)return{'type':_0x2d14c7(0xf2),'parentName':_0x5c42c9,'targetDir':_0x11697c,'configRoot':_0x11697c,'isScoped':![],'scopedFolderPath':''};return{'type':_0x2d14c7(0xe6),'errorCode':_0x2d14c7(0x107),'message':_0x2d14c7(0xe4)+_0x596446,'arg':_0x596446,'helpText':_0x2d14c7(0xe3)};}if(_0x168ce5?.['isFile']())return{'type':'error','errorCode':_0x2d14c7(0x10b),'message':_0x2d14c7(0xf9)+_0x596446,'arg':_0x596446,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x10a4c1=sanitizeFileName(_0x596446),_0x5d1c3d=getSegmentRootDir(_0x10a4c1,cwd);return{'type':_0x2d14c7(0x10e),'parentName':_0x596446,'targetDir':_0x5d1c3d,'configRoot':_0x5d1c3d};}const _0x4aea64=await findTdxConfigAsync(cwd,fs);if(_0x4aea64){const _0x33739d=calculateScopedPath(cwd,_0x4aea64['configDir']);return{'type':_0x2d14c7(0xf1),'parentName':_0x4aea64[_0x2d14c7(0x100)],'targetDir':cwd,'configRoot':_0x4aea64[_0x2d14c7(0x108)],'isScoped':_0x33739d[_0x2d14c7(0xec)],'scopedFolderPath':_0x33739d['scopedFolderPath']};}if(_0x5c42c9){const _0x1aeb7a=sanitizeFileName(_0x5c42c9),_0x192879=getSegmentRootDir(_0x1aeb7a,cwd);return{'type':_0x2d14c7(0xf1),'parentName':_0x5c42c9,'targetDir':_0x192879,'configRoot':_0x192879,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2d14c7(0xe6),'errorCode':_0x2d14c7(0xe5),'message':_0x2d14c7(0x103),'helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x5e1fb0=a158_0x31c3;(function(_0x380da3,_0x4e1474){const _0x7fceb6=a158_0x31c3,_0x27eef3=_0x380da3();while(!![]){try{const _0x56d115=-parseInt(_0x7fceb6(0x10a))/0x1*(-parseInt(_0x7fceb6(0x116))/0x2)+-parseInt(_0x7fceb6(0x112))/0x3*(parseInt(_0x7fceb6(0x119))/0x4)+parseInt(_0x7fceb6(0x10c))/0x5+parseInt(_0x7fceb6(0x109))/0x6*(-parseInt(_0x7fceb6(0x110))/0x7)+parseInt(_0x7fceb6(0x104))/0x8+parseInt(_0x7fceb6(0x11b))/0x9+-parseInt(_0x7fceb6(0x111))/0xa*(-parseInt(_0x7fceb6(0x115))/0xb);if(_0x56d115===_0x4e1474)break;else _0x27eef3['push'](_0x27eef3['shift']());}catch(_0x4659ff){_0x27eef3['push'](_0x27eef3['shift']());}}}(a158_0x45e7,0x54d11));import{existsSync,readFileSync}from'fs';import a158_0x4fd49b from'path';const TDX_CONFIG_FILE=a158_0x5e1fb0(0x10d),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x3e4587=process[a158_0x5e1fb0(0x113)]()){const _0x373e90=a158_0x5e1fb0;let _0x118535=a158_0x4fd49b[_0x373e90(0x10f)](_0x3e4587);const _0x5edcb6=a158_0x4fd49b[_0x373e90(0x103)](_0x118535)[_0x373e90(0x106)];while(_0x118535!==_0x5edcb6){const _0x4a3fb3=a158_0x4fd49b[_0x373e90(0x108)](_0x118535,TDX_CONFIG_FILE);if(existsSync(_0x4a3fb3))return _0x4a3fb3;_0x118535=a158_0x4fd49b[_0x373e90(0x11e)](_0x118535);}return null;}export function loadTdxConfig(_0x440f2c){const _0x4b0a1b=a158_0x5e1fb0,_0x36734e=readFileSync(_0x440f2c,_0x4b0a1b(0x105));let _0x66895e;try{_0x66895e=JSON[_0x4b0a1b(0x103)](_0x36734e);}catch{throw new Error(_0x4b0a1b(0x11a)+_0x440f2c);}if(!_0x66895e||typeof _0x66895e!=='object')throw new Error(_0x4b0a1b(0x10b));const _0x5921da=_0x66895e,_0x18d678=_0x5921da[_0x4b0a1b(0x11f)]&&typeof _0x5921da[_0x4b0a1b(0x11f)]==='string',_0x17d52d=_0x5921da[_0x4b0a1b(0x11c)]&&typeof _0x5921da[_0x4b0a1b(0x11c)]===_0x4b0a1b(0x11d);if(!_0x18d678&&!_0x17d52d)throw new Error(_0x4b0a1b(0x117));const _0x540cf0={};return _0x18d678&&(_0x540cf0['parent_segment']=_0x5921da['parent_segment']),_0x17d52d&&(_0x540cf0['engage_workspace']=_0x5921da[_0x4b0a1b(0x11c)]),_0x540cf0;}function a158_0x45e7(){const _0x4a2cc7=['utf-8','root','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','join','1218XOSxvN','306JIfDXz','Invalid\x20tdx.json:\x20expected\x20object','440775RfIHGf','tdx.json','replace','resolve','16086afTnIq','130ElpuhN','18bdZJUo','cwd','startsWith','130229JlTBRL','784RUzFLm','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','stringify','391604NRkSwV','Invalid\x20JSON\x20in\x20','5368752gRdCFc','engage_workspace','string','dirname','parent_segment','parse','3542136QmlBqR'];a158_0x45e7=function(){return _0x4a2cc7;};return a158_0x45e7();}export function findTdxConfig(_0x35ec62=process[a158_0x5e1fb0(0x113)]()){const _0x636f68=a158_0x5e1fb0,_0xd8496=findTdxConfigPath(_0x35ec62);if(!_0xd8496)throw new Error(_0x636f68(0x107));const _0x47f1cb=loadTdxConfig(_0xd8496),_0x2b74a8=a158_0x4fd49b['dirname'](_0xd8496);return{'config':_0x47f1cb,'configPath':_0xd8496,'configDir':_0x2b74a8};}export function tryFindTdxConfig(_0x2e2068){try{return findTdxConfig(_0x2e2068);}catch{return null;}}export function getSegmentRootDir(_0x300944,_0x3a19e=process[a158_0x5e1fb0(0x113)]()){return a158_0x4fd49b['join'](_0x3a19e,SEGMENTS_DIR,_0x300944);}export function getTdxConfigPath(_0x480f40,_0x2592c3=process[a158_0x5e1fb0(0x113)]()){const _0x166eee=a158_0x5e1fb0;return a158_0x4fd49b[_0x166eee(0x108)](getSegmentRootDir(_0x480f40,_0x2592c3),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2c7df1,_0x4c72e4){const _0x5a669c=a158_0x5e1fb0,_0x191c38=a158_0x4fd49b[_0x5a669c(0x10f)](_0x2c7df1),_0x4e87c6=a158_0x4fd49b['relative'](_0x4c72e4,_0x191c38);if(_0x4e87c6[_0x5a669c(0x114)]('..'))return'';return _0x4e87c6;}export function localPathToTdFolderPath(_0x1d8105){const _0x27152f=a158_0x5e1fb0,_0xf57c17=a158_0x4fd49b['dirname'](_0x1d8105);if(_0xf57c17==='.'||_0xf57c17==='')return'';return _0xf57c17[_0x27152f(0x10e)](/\\/g,'/');}function a158_0x31c3(_0x55e878,_0x1ab161){_0x55e878=_0x55e878-0x103;const _0x45e74c=a158_0x45e7();let _0x31c341=_0x45e74c[_0x55e878];return _0x31c341;}export function tdFolderPathToLocalPath(_0x406ae4,_0x1e7c45){const _0x4b8e2d=a158_0x5e1fb0;if(!_0x406ae4)return _0x1e7c45;return a158_0x4fd49b[_0x4b8e2d(0x108)](_0x1e7c45,_0x406ae4);}export function createTdxConfigContent(_0x37b3ea){const _0x4ea139=a158_0x5e1fb0,_0x2fa553={'parent_segment':_0x37b3ea};return JSON[_0x4ea139(0x118)](_0x2fa553,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2d3888){const _0x1b8e9a=a158_0x5e1fb0,_0x497cec={'engage_workspace':_0x2d3888};return JSON[_0x1b8e9a(0x118)](_0x497cec,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x1bb815=a159_0x4d0f;function a159_0x1203(){const _0x41483d=['none','optional','11eWAaGk','69656kJFSjS','16209MhNnyX','record','asc','nullable','weekly','min','7hogSsJ','object','array','daily','All','enum','Last','monthly','75749DRfczy','boolean','clear','string','masked','minutes_interval','desc','3954102zejHJs','once','Top-N','rows','number','2664bnBPov','48561QrvYhj','minute','day','12124730CcJImG','onFailure','cron','First','cols','onSuccess','6LLoWfX','hourly','Connection\x20name\x20is\x20required','11579976JfmNCn','150YkjCWq'];a159_0x1203=function(){return _0x41483d;};return a159_0x1203();}(function(_0x5c311b,_0x20cb63){const _0x17a8b7=a159_0x4d0f,_0x27d404=_0x5c311b();while(!![]){try{const _0x319359=-parseInt(_0x17a8b7(0x112))/0x1+parseInt(_0x17a8b7(0xfb))/0x2*(-parseInt(_0x17a8b7(0x11f))/0x3)+-parseInt(_0x17a8b7(0x103))/0x4*(parseInt(_0x17a8b7(0xff))/0x5)+parseInt(_0x17a8b7(0x119))/0x6*(parseInt(_0x17a8b7(0x10a))/0x7)+-parseInt(_0x17a8b7(0x11e))/0x8*(-parseInt(_0x17a8b7(0x104))/0x9)+parseInt(_0x17a8b7(0x122))/0xa*(parseInt(_0x17a8b7(0x102))/0xb)+-parseInt(_0x17a8b7(0xfe))/0xc;if(_0x319359===_0x20cb63)break;else _0x27d404['push'](_0x27d404['shift']());}catch(_0x4b74ee){_0x27d404['push'](_0x27d404['shift']());}}}(a159_0x1203,0xd1d67));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a159_0x1bb815(0x100),a159_0x1bb815(0xfc),a159_0x1bb815(0x10d),a159_0x1bb815(0x108),a159_0x1bb815(0x111),a159_0x1bb815(0x124),a159_0x1bb815(0x117)]);export const RepeatUnitSchema=z['enum']([a159_0x1bb815(0x120),'hour',a159_0x1bb815(0x121),'week','month',a159_0x1bb815(0x11a),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a159_0x1bb815(0x101)](),'repeat_frequency':z[a159_0x1bb815(0x11d)]()['optional'](),'repeat_sub_frequency':z[a159_0x1bb815(0x10c)](z[a159_0x1bb815(0x11d)]())[a159_0x1bb815(0x101)](),'start_at':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x107)]()[a159_0x1bb815(0x101)](),'end_on':z[a159_0x1bb815(0x115)]()['nullable']()[a159_0x1bb815(0x101)](),'timezone':z[a159_0x1bb815(0x115)]()['optional']()});function a159_0x4d0f(_0x191778,_0x4ef0ac){_0x191778=_0x191778-0xfa;const _0x1203c6=a159_0x1203();let _0x4d0fbf=_0x1203c6[_0x191778];return _0x4d0fbf;}export const NotificationDefSchema=z[a159_0x1bb815(0x10b)]({'notify_on':z[a159_0x1bb815(0x10c)](z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0xfa),a159_0x1bb815(0x123)]))['optional'](),'email_recipients':z[a159_0x1bb815(0x10c)](z[a159_0x1bb815(0x115)]())[a159_0x1bb815(0x101)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x1bb815(0x115)](),z['object']({'name':z[a159_0x1bb815(0x115)](),'type':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'visibility':z[a159_0x1bb815(0x10f)](['clear',a159_0x1bb815(0x116)])[a159_0x1bb815(0x101)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a159_0x1bb815(0x10c)](z['object']({'name':z[a159_0x1bb815(0x115)](),'type':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'visibility':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x114),a159_0x1bb815(0x116)])[a159_0x1bb815(0x101)]()}))[a159_0x1bb815(0x101)](),'behavior_table':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'join_row':z[a159_0x1bb815(0x11d)]()[a159_0x1bb815(0x107)]()[a159_0x1bb815(0x101)](),'join_strategy':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x10e),a159_0x1bb815(0x125),a159_0x1bb815(0x110),a159_0x1bb815(0x11b)])[a159_0x1bb815(0x101)](),'formatting':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x11c),a159_0x1bb815(0x126)])[a159_0x1bb815(0x101)](),'order_by':z[a159_0x1bb815(0x10c)](z['object']({'key':z[a159_0x1bb815(0x115)](),'order':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x106),a159_0x1bb815(0x118)])}))[a159_0x1bb815(0x101)]()});export const ActivationDefSchema=z[a159_0x1bb815(0x10b)]({'name':z['string']()[a159_0x1bb815(0x109)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'connection':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x109)](0x1,a159_0x1bb815(0xfd)),'all_columns':z[a159_0x1bb815(0x113)]()[a159_0x1bb815(0x101)](),'columns':z[a159_0x1bb815(0x10c)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a159_0x1bb815(0x101)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a159_0x1bb815(0x105)](z[a159_0x1bb815(0x115)](),z['unknown']())[a159_0x1bb815(0x101)](),'activation_template_id':z['string']()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x1bb815(0x107)]()['optional'](),'run_after_journey_refresh':z[a159_0x1bb815(0x113)]()[a159_0x1bb815(0x101)](),'nested_workflow_project_name':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'nested_workflow_name':z[a159_0x1bb815(0x115)]()['optional'](),'lock_enabled':z[a159_0x1bb815(0x113)]()[a159_0x1bb815(0x101)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa49fc5,_0xa17145){var _0x29fd86=a160_0x31f5,_0x56c3d7=_0xa49fc5();while(!![]){try{var _0x442d65=parseInt(_0x29fd86(0x138))/0x1+parseInt(_0x29fd86(0x132))/0x2*(-parseInt(_0x29fd86(0x130))/0x3)+-parseInt(_0x29fd86(0x133))/0x4+parseInt(_0x29fd86(0x139))/0x5+-parseInt(_0x29fd86(0x137))/0x6*(parseInt(_0x29fd86(0x134))/0x7)+parseInt(_0x29fd86(0x135))/0x8+parseInt(_0x29fd86(0x136))/0x9*(parseInt(_0x29fd86(0x131))/0xa);if(_0x442d65===_0xa17145)break;else _0x56c3d7['push'](_0x56c3d7['shift']());}catch(_0x123e16){_0x56c3d7['push'](_0x56c3d7['shift']());}}}(a160_0x61aa,0xbe6cd));function a160_0x31f5(_0x1c55c2,_0x1f8858){_0x1c55c2=_0x1c55c2-0x130;var _0x61aae0=a160_0x61aa();var _0x31f511=_0x61aae0[_0x1c55c2];return _0x31f511;}function a160_0x61aa(){var _0x351c7e=['2405520kTAKrD','11980620pZGPpm','714hiWSxI','313925EhSjCF','6612355ieStgJ','199497dFyZNX','10LgBZho','26mHdPjE','2492508HzZpNr','58863LdYFon'];a160_0x61aa=function(){return _0x351c7e;};return a160_0x61aa();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x3be2e1=a161_0x5e81;(function(_0x36d51f,_0x17fef2){const _0x1080ad=a161_0x5e81,_0xd7fcb=_0x36d51f();while(!![]){try{const _0x44b0c7=parseInt(_0x1080ad(0x9d))/0x1*(-parseInt(_0x1080ad(0x94))/0x2)+-parseInt(_0x1080ad(0xaf))/0x3*(parseInt(_0x1080ad(0x99))/0x4)+-parseInt(_0x1080ad(0x90))/0x5+-parseInt(_0x1080ad(0x9a))/0x6+parseInt(_0x1080ad(0x9b))/0x7*(-parseInt(_0x1080ad(0xb2))/0x8)+parseInt(_0x1080ad(0xb6))/0x9*(-parseInt(_0x1080ad(0xaa))/0xa)+parseInt(_0x1080ad(0xb3))/0xb;if(_0x44b0c7===_0x17fef2)break;else _0xd7fcb['push'](_0xd7fcb['shift']());}catch(_0x5431d4){_0xd7fcb['push'](_0xd7fcb['shift']());}}}(a161_0x4cc8,0x619e1));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x3be2e1(0x9c)]([a161_0x3be2e1(0xb9),a161_0x3be2e1(0xa0),a161_0x3be2e1(0x98)]);export const ReentryModeTypeSchema=z['enum'](['no_reentry','reentry_unless_goal_achieved',a161_0x3be2e1(0x9e)]);function a161_0x4cc8(){const _0x232831=['54yCUQtc','isArray','type','draft','decision_point','ab_test','541720wMnKrF','journey','object','lazy','14gaAUts','jump','merge','string','launched','24cyMoTQ','3507762ACrxgL','1631EOITfo','enum','97915mOPJiG','reentry_always','end','simulation','journeys','wait','Journey\x20name\x20is\x20required','versions','week','refine','stages','boolean','filter','1134130YAufIE','optional','array','activation','literal','112452tcbPHW','record','passthrough','7472NImpdj','31913431vtJbZp','number','length'];a161_0x4cc8=function(){return _0x232831;};return a161_0x4cc8();}export const WaitUnitTypeSchema=z['enum'](['day',a161_0x3be2e1(0xa5)]);export const StepTypeValueSchema=z['enum']([a161_0x3be2e1(0xa2),a161_0x3be2e1(0xad),a161_0x3be2e1(0xba),'ab_test',a161_0x3be2e1(0x96),a161_0x3be2e1(0x95),a161_0x3be2e1(0x9f)]);function a161_0x5e81(_0x5e522a,_0x227bc9){_0x5e522a=_0x5e522a-0x90;const _0x4cc869=a161_0x4cc8();let _0x5e810b=_0x4cc869[_0x5e522a];return _0x5e810b;}export const EmbeddedSegmentDefSchema=z[a161_0x3be2e1(0x92)]({'description':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x3be2e1(0x92)]({'journey':z[a161_0x3be2e1(0x97)](),'stage':z['string'](),'bundle_id':z['string']()[a161_0x3be2e1(0xab)]()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x3be2e1(0x97)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x3be2e1(0xb4)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)]()}),WaitConditionDefSchema=z[a161_0x3be2e1(0x92)]({'segment':z[a161_0x3be2e1(0x97)](),'next':z['string']()['optional'](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'duration':z[a161_0x3be2e1(0xb4)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x3be2e1(0xab)](),'wait_until':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z['array'](z['string']())[a161_0x3be2e1(0xab)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'next':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)]()},WaitStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z['literal']('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x3be2e1(0x97)]()}),ActivationStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0xad)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x3be2e1(0x92)]({'name':z[a161_0x3be2e1(0x97)](),'segment':z[a161_0x3be2e1(0x97)]()['optional'](),'segment_id':z[a161_0x3be2e1(0x97)]()['optional'](),'excluded':z[a161_0x3be2e1(0xa8)]()[a161_0x3be2e1(0xab)](),'next':z['string']()['optional']()}),DecisionPointStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'branches':z[a161_0x3be2e1(0xac)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0xba)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z['string']()[a161_0x3be2e1(0xab)](),'name':z[a161_0x3be2e1(0x97)](),'percentage':z[a161_0x3be2e1(0xb4)](),'next':z[a161_0x3be2e1(0x97)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'variants':z[a161_0x3be2e1(0xac)](AbTestVariantDefSchema),'unique_id':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'customized_split':z[a161_0x3be2e1(0xa8)]()[a161_0x3be2e1(0xab)]()}),AbTestStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0xbb)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z['literal']('merge')}),JumpStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0x9f))})[a161_0x3be2e1(0xb1)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x3be2e1(0xb8),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x3be2e1(0x92)]({'name':z[a161_0x3be2e1(0x97)](),'description':z[a161_0x3be2e1(0x97)]()['optional'](),'id':z[a161_0x3be2e1(0x97)]()['optional'](),'entry_criteria':CriteriaDefSchema[a161_0x3be2e1(0xab)](),'exit_criteria':z['array'](CriteriaDefSchema)[a161_0x3be2e1(0xab)](),'milestone':CriteriaDefSchema[a161_0x3be2e1(0xab)](),'root_step':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'steps':z[a161_0x3be2e1(0xac)](StepDefSchema)[a161_0x3be2e1(0xab)]()});export const JourneyEntryDefSchema=z[a161_0x3be2e1(0x92)]({'name':z['string']()[a161_0x3be2e1(0xab)](),'version':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'state':JourneyStateTypeSchema[a161_0x3be2e1(0xab)](),'latest':z['boolean']()[a161_0x3be2e1(0xab)](),'stages':z[a161_0x3be2e1(0xac)](StageDefSchema),'id':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'version_number':z['number']()['optional'](),'goal':CriteriaDefSchema[a161_0x3be2e1(0xab)](),'reentry':ReentryModeTypeSchema[a161_0x3be2e1(0xab)]()});export const JourneyDefSchema=z[a161_0x3be2e1(0x93)](()=>z[a161_0x3be2e1(0x92)]({'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0x91)),'name':z['string']()['min'](0x1,a161_0x3be2e1(0xa3)),'description':z['string']()['optional'](),'bundle_id':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'bundle_name':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'folder_id':z[a161_0x3be2e1(0x97)]()['optional'](),'reentry':ReentryModeTypeSchema[a161_0x3be2e1(0xab)](),'allow_reentry':z[a161_0x3be2e1(0xa8)]()[a161_0x3be2e1(0xab)](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()[a161_0x3be2e1(0xab)](),'version':z[a161_0x3be2e1(0x97)]()['optional'](),'version_number':z[a161_0x3be2e1(0xb4)]()[a161_0x3be2e1(0xab)](),'stages':z['array'](StageDefSchema)[a161_0x3be2e1(0xab)](),'versions':z[a161_0x3be2e1(0xac)](JourneyEntryDefSchema)[a161_0x3be2e1(0xab)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x3be2e1(0xab)](),'segments':z[a161_0x3be2e1(0xb0)](z['string'](),EmbeddedSegmentDefSchema)['optional'](),'activations':z['record'](z[a161_0x3be2e1(0x97)](),ActivationDefSchema)[a161_0x3be2e1(0xab)]()})[a161_0x3be2e1(0xa6)](_0x5b439d=>{const _0x5bceee=a161_0x3be2e1,_0x55292=[_0x5b439d[_0x5bceee(0xa1)],_0x5b439d[_0x5bceee(0xa7)],_0x5b439d[_0x5bceee(0xa4)]][_0x5bceee(0xa9)](_0x4d9230=>Array[_0x5bceee(0xb7)](_0x4d9230)&&_0x4d9230[_0x5bceee(0xb5)]>0x0)[_0x5bceee(0xb5)];return _0x55292===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a163_0x2b8b(_0x3e52d3,_0x38a1ce){_0x3e52d3=_0x3e52d3-0xad;var _0x5c2220=a163_0x5c22();var _0x2b8bf4=_0x5c2220[_0x3e52d3];return _0x2b8bf4;}(function(_0x37f883,_0x3a0680){var _0x9a831a=a163_0x2b8b,_0x11dd76=_0x37f883();while(!![]){try{var _0x4c7c55=parseInt(_0x9a831a(0xae))/0x1*(parseInt(_0x9a831a(0xb1))/0x2)+-parseInt(_0x9a831a(0xb5))/0x3*(-parseInt(_0x9a831a(0xaf))/0x4)+parseInt(_0x9a831a(0xb3))/0x5+parseInt(_0x9a831a(0xb2))/0x6+parseInt(_0x9a831a(0xb7))/0x7+-parseInt(_0x9a831a(0xad))/0x8*(parseInt(_0x9a831a(0xb0))/0x9)+-parseInt(_0x9a831a(0xb4))/0xa*(parseInt(_0x9a831a(0xb6))/0xb);if(_0x4c7c55===_0x3a0680)break;else _0x11dd76['push'](_0x11dd76['shift']());}catch(_0x128bed){_0x11dd76['push'](_0x11dd76['shift']());}}}(a163_0x5c22,0x3135e));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';function a163_0x5c22(){var _0x4dc0fc=['2tPmjQq','1724mJIsQX','9UnOZGa','105686JAQSdE','1286694ZVAfrf','637535wRxxwy','325790kzafIY','1494OIMoTg','187LigIZp','2273642CxLoRZ','1853416BlLNUA'];a163_0x5c22=function(){return _0x4dc0fc;};return a163_0x5c22();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a164_0x5cc079=a164_0x15b3;(function(_0x1fa5b5,_0xc8c298){const _0x207c13=a164_0x15b3,_0x15b2ee=_0x1fa5b5();while(!![]){try{const _0x6bf6e1=-parseInt(_0x207c13(0xd5))/0x1*(-parseInt(_0x207c13(0xf9))/0x2)+-parseInt(_0x207c13(0xec))/0x3*(-parseInt(_0x207c13(0xfd))/0x4)+-parseInt(_0x207c13(0x10e))/0x5+-parseInt(_0x207c13(0xe7))/0x6+parseInt(_0x207c13(0xc2))/0x7+parseInt(_0x207c13(0x104))/0x8*(-parseInt(_0x207c13(0x103))/0x9)+-parseInt(_0x207c13(0xf1))/0xa*(-parseInt(_0x207c13(0xf6))/0xb);if(_0x6bf6e1===_0xc8c298)break;else _0x15b2ee['push'](_0x15b2ee['shift']());}catch(_0x1a5c2f){_0x15b2ee['push'](_0x15b2ee['shift']());}}}(a164_0x2c09,0xd76c7));import{z}from'zod';function a164_0x15b3(_0x3f8851,_0x584686){_0x3f8851=_0x3f8851-0xc2;const _0x2c09f4=a164_0x2c09();let _0x15b35b=_0x2c09f4[_0x3f8851];return _0x15b35b;}export const OperatorTypeSchema=z[a164_0x5cc079(0xc6)](['Equal',a164_0x5cc079(0x105),a164_0x5cc079(0xda),a164_0x5cc079(0xc7),a164_0x5cc079(0xf5),'In',a164_0x5cc079(0xd7),a164_0x5cc079(0x109),'IsNull','TimeWithinPast',a164_0x5cc079(0x106),a164_0x5cc079(0xfb),a164_0x5cc079(0xdf),a164_0x5cc079(0xe1),a164_0x5cc079(0xf8)]);export const TimeUnitSchema=z['enum']([a164_0x5cc079(0xeb),a164_0x5cc079(0xfc),a164_0x5cc079(0xe9),a164_0x5cc079(0xfe),'week','month',a164_0x5cc079(0xcb)]);export const AggregationTypeSchema=z[a164_0x5cc079(0xc6)](['Count',a164_0x5cc079(0xf0),a164_0x5cc079(0xc8),a164_0x5cc079(0xe0),a164_0x5cc079(0xd8),'CountDistinct',a164_0x5cc079(0xd3),a164_0x5cc079(0xe8)]);const TemporalValueSchema=z[a164_0x5cc079(0x10c)]([z['object']({'timestamp':z[a164_0x5cc079(0x101)]()}),z['object']({'last':z[a164_0x5cc079(0x10c)]([z['number'](),z['record'](z['string'](),z[a164_0x5cc079(0x108)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x101)](),z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0xdb)](),TemporalValueSchema,z[a164_0x5cc079(0x10a)](z['union']([z['string'](),z[a164_0x5cc079(0x108)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x5cc079(0x105),a164_0x5cc079(0xc7),a164_0x5cc079(0xda),'LessEqual','In','Contain',a164_0x5cc079(0xdf),'EndWith',a164_0x5cc079(0x109),a164_0x5cc079(0xf3),a164_0x5cc079(0x106)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x5cc079(0x106)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'value':OperatorValueSchema['optional'](),'min':z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0x101)](),TemporalValueSchema])['optional'](),'max':z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0x101)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a164_0x5cc079(0xd2)](),'duration':z[a164_0x5cc079(0xe6)]({'day':z['number']()[a164_0x5cc079(0xd2)](),'week':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'month':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'year':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'hour':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'minute':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'second':z['number']()[a164_0x5cc079(0xd2)]()})[a164_0x5cc079(0xd2)](),'from':z[a164_0x5cc079(0xe6)]({'last':z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0x101)]()]),'unit':TimeUnitSchema})[a164_0x5cc079(0xd2)](),'reverse':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)]()})['superRefine']((_0x596c81,_0x4408ad)=>{const _0x12dba0=a164_0x5cc079;OPERATORS_REQUIRING_VALUE[_0x12dba0(0xdd)](_0x596c81[_0x12dba0(0xe2)])&&(_0x596c81[_0x12dba0(0xde)]===undefined||_0x596c81[_0x12dba0(0xde)]===null)&&_0x4408ad['addIssue']({'code':_0x12dba0(0xcc),'message':_0x12dba0(0x102)+_0x596c81[_0x12dba0(0xe2)]+_0x12dba0(0x100),'path':['value']}),_0x596c81['type']===_0x12dba0(0xd7)&&_0x596c81[_0x12dba0(0xd1)]===undefined&&_0x596c81[_0x12dba0(0xcd)]===undefined&&_0x4408ad[_0x12dba0(0xf2)]({'code':_0x12dba0(0xcc),'message':_0x12dba0(0xc4),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x12dba0(0xdd)](_0x596c81[_0x12dba0(0xe2)])&&_0x596c81[_0x12dba0(0xde)]!==undefined&&!_0x596c81['unit']&&_0x4408ad[_0x12dba0(0xf2)]({'code':_0x12dba0(0xcc),'message':_0x12dba0(0x102)+_0x596c81[_0x12dba0(0xe2)]+_0x12dba0(0xea),'path':[_0x12dba0(0x10b)],'params':{'validationCode':_0x12dba0(0xee)}}),_0x596c81[_0x12dba0(0xe2)]==='TimeRange'&&(!_0x596c81['duration']&&_0x4408ad['addIssue']({'code':_0x12dba0(0xcc),'message':_0x12dba0(0xe3),'path':[_0x12dba0(0x107)]}),!_0x596c81[_0x12dba0(0xf4)]&&_0x4408ad[_0x12dba0(0xf2)]({'code':_0x12dba0(0xcc),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x12dba0(0xf4)]}));});export const ArrayMatchingSchema=z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0xef)](a164_0x5cc079(0xed)),z['literal'](a164_0x5cc079(0xd4)),z[a164_0x5cc079(0xe6)]({'atLeast':z[a164_0x5cc079(0x108)]()}),z['object']({'atMost':z[a164_0x5cc079(0x108)]()}),z[a164_0x5cc079(0xe6)]({'exactly':z[a164_0x5cc079(0x108)]()})]);export const AggregationDefSchema=z[a164_0x5cc079(0xc3)]('type',[z[a164_0x5cc079(0xe6)]({'type':z['enum']([a164_0x5cc079(0xf0),a164_0x5cc079(0xe0),a164_0x5cc079(0xd8),a164_0x5cc079(0xc8)]),'column':z[a164_0x5cc079(0x101)](),'groupingColumns':z[a164_0x5cc079(0x10a)](z[a164_0x5cc079(0x101)]())[a164_0x5cc079(0xd2)]()}),z[a164_0x5cc079(0xe6)]({'type':z['literal']('Count'),'groupingColumns':z[a164_0x5cc079(0x10a)](z['string']())[a164_0x5cc079(0xd2)]()}),z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xf7)),'columns':z[a164_0x5cc079(0x10a)](z['string']())}),z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xc6)]([a164_0x5cc079(0xd3),a164_0x5cc079(0xe8)]),'column':z[a164_0x5cc079(0x101)](),'orderColumn':z[a164_0x5cc079(0x101)](),'groupingColumns':z['array'](z['string']())[a164_0x5cc079(0xd2)]()})]);function a164_0x2c09(){const _0x101290=['number','Regexp','array','unit','union','lazy','5307620KerNpQ','5268522nKYBje','discriminatedUnion','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','operator','enum','GreaterEqual','Average','Column','column','year','custom','max','exclude','batch','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','min','optional','First','all','1eHDWLN','funnel_stage','Between','Max','Behavior','Less','boolean','segment','has','value','StartWith','Min','EndWith','type','TimeRange\x20operator\x20requires\x20\x27duration\x27','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','realtime','object','9039336SNtRYR','Last','hour','\x27\x20requires\x20a\x20time\x20unit','second','1511778GIJpIK','any','MISSING_TIME_UNIT','literal','Sum','63730pcLJwW','addIssue','TimeWithinPast','from','LessEqual','2497HfQrmS','CountDistinct','TimeRange','2034084zbtQkX','And','Contain','minute','12xhDxnJ','day','Value','\x27\x20requires\x20a\x20value','string','Operator\x20\x27','9mvAppg','10221456iFWIeu','Greater','TimeWithinNext','duration'];a164_0x2c09=function(){return _0x101290;};return a164_0x2c09();}export const TimeWindowDefSchema=z[a164_0x5cc079(0xe6)]({'duration':z[a164_0x5cc079(0x108)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x5cc079(0xf3),a164_0x5cc079(0x106),a164_0x5cc079(0xf8)]);export const FilterColumnConditionDefSchema=z[a164_0x5cc079(0xe6)]({'type':z['literal'](a164_0x5cc079(0xc9)),'column':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cc079(0xd2)]()})['superRefine']((_0xe90478,_0x1ba525)=>{const _0x388d4d=a164_0x5cc079,_0x32643d=_0xe90478['operator'][_0x388d4d(0xe2)];_0xe90478[_0x388d4d(0xca)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x388d4d(0xdd)](_0x32643d)&&_0x1ba525[_0x388d4d(0xf2)]({'code':_0x388d4d(0xcc),'message':_0x388d4d(0xd0)+_0x32643d+'\x27)','path':['operator',_0x388d4d(0xe2)]}):TIMESTAMP_OPERATORS[_0x388d4d(0xdd)](_0x32643d)&&_0x1ba525[_0x388d4d(0xf2)]({'code':_0x388d4d(0xcc),'message':'Operator\x20\x27'+_0x32643d+_0x388d4d(0xe4),'path':[_0x388d4d(0xc5),_0x388d4d(0xe2)]});});export const FilterRuleDefSchema=z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xfa)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z['object']({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xff)),'attribute':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cc079(0xd2)](),'exclude':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'aggregation':AggregationDefSchema[a164_0x5cc079(0xd2)](),'source':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)](),'filter':FilterRuleDefSchema[a164_0x5cc079(0xd2)](),'limit':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)]()}));export const BehaviorConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z[a164_0x5cc079(0xe6)]({'type':z['literal'](a164_0x5cc079(0xd9)),'attribute':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cc079(0xd2)](),'exclude':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'aggregation':AggregationDefSchema[a164_0x5cc079(0xd2)](),'source':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)](),'filter':FilterRuleDefSchema[a164_0x5cc079(0xd2)](),'timeWindow':TimeWindowDefSchema[a164_0x5cc079(0xd2)](),'limit':z['number']()[a164_0x5cc079(0xd2)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xc9)),'column':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z[a164_0x5cc079(0xe6)]({'type':z['enum']([a164_0x5cc079(0xfa),'Or']),'conditions':z[a164_0x5cc079(0x10a)](ConditionDefSchema),'description':z[a164_0x5cc079(0x101)]()['optional']()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x5cc079(0xc6)](['include',a164_0x5cc079(0xce)]),'segment':z[a164_0x5cc079(0x101)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x5cc079(0x10d)](()=>z['object']({'type':z['enum']([a164_0x5cc079(0xfa),'Or']),'conditions':z[a164_0x5cc079(0x10a)](ConditionDefSchema),'description':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)]()}));export const SegmentDefSchema=z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xdc))[a164_0x5cc079(0xd2)](),'name':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd1)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)](),'folder':z[a164_0x5cc079(0x101)]()['optional'](),'rule':RuleDefSchema[a164_0x5cc079(0xd2)](),'kind':z['enum']([a164_0x5cc079(0xcf),a164_0x5cc079(0xe5),a164_0x5cc079(0xd6)])[a164_0x5cc079(0xd2)](),'visible':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'activations':z['array'](z['any']())[a164_0x5cc079(0xd2)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x1630dc=a164_0x51fb;(function(_0x333d2b,_0x59d3db){const _0x2a09ea=a164_0x51fb,_0x3fad6b=_0x333d2b();while(!![]){try{const _0x3e3544=parseInt(_0x2a09ea(0x20c))/0x1*(parseInt(_0x2a09ea(0x228))/0x2)+-parseInt(_0x2a09ea(0x233))/0x3+-parseInt(_0x2a09ea(0x225))/0x4+parseInt(_0x2a09ea(0x22a))/0x5+parseInt(_0x2a09ea(0x211))/0x6*(parseInt(_0x2a09ea(0x1fa))/0x7)+parseInt(_0x2a09ea(0x234))/0x8+-parseInt(_0x2a09ea(0x201))/0x9*(parseInt(_0x2a09ea(0x210))/0xa);if(_0x3e3544===_0x59d3db)break;else _0x3fad6b['push'](_0x3fad6b['shift']());}catch(_0x1f83bd){_0x3fad6b['push'](_0x3fad6b['shift']());}}}(a164_0x193a,0xd82a7));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a164_0x1630dc(0x1f0),'Greater','Less',a164_0x1630dc(0x203),a164_0x1630dc(0x205),'In',a164_0x1630dc(0x20b),a164_0x1630dc(0x22f),a164_0x1630dc(0x20e),a164_0x1630dc(0x217),a164_0x1630dc(0x230),'Contain',a164_0x1630dc(0x202),a164_0x1630dc(0x1ef),'TimeRange']);export const TimeUnitSchema=z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x222),'minute',a164_0x1630dc(0x204),a164_0x1630dc(0x206),'week',a164_0x1630dc(0x21f),'year']);export const AggregationTypeSchema=z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x200),a164_0x1630dc(0x213),a164_0x1630dc(0x223),'Min','Max',a164_0x1630dc(0x214),a164_0x1630dc(0x207),'Last']);function a164_0x193a(){const _0x238094=['day','First','Contain','discriminatedUnion','Behavior','Between','14549XQkRXl','Value','IsNull','array','30xmnMxX','6SWuKMA','realtime','Sum','CountDistinct','TimeRange\x20operator\x20requires\x20\x27duration\x27','addIssue','TimeWithinPast','include','Column','type','column','from','Segment\x20name\x20is\x20required','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','month','And','boolean','second','Average','lazy','539768EFFeQH','Operator\x20\x27','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','42pQBeOd','string','361405uNnllX','Last','enum','union','custom','Regexp','TimeWithinNext','object','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','1974675sVSoTi','9053616hnKyhL','TimeRange','operator','any','EndWith','Equal','min','duration','number','record','segment','literal','max','value','superRefine','6816467xVGabA','unit','MISSING_TIME_UNIT','has','Greater','optional','Count','2414133nLXpnb','StartWith','GreaterEqual','hour','LessEqual'];a164_0x193a=function(){return _0x238094;};return a164_0x193a();}const TemporalValueSchema=z[a164_0x1630dc(0x22d)]([z['object']({'timestamp':z[a164_0x1630dc(0x229)]()}),z[a164_0x1630dc(0x231)]({'last':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x1f4)](z[a164_0x1630dc(0x229)](),z[a164_0x1630dc(0x1f3)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x229)](),z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x221)](),TemporalValueSchema,z['array'](z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x229)](),z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x221)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x1630dc(0x1fe),a164_0x1630dc(0x203),'Less','LessEqual','In',a164_0x1630dc(0x208),a164_0x1630dc(0x202),'EndWith',a164_0x1630dc(0x22f),a164_0x1630dc(0x217),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast','TimeWithinNext']);export const OperatorDefSchema=z[a164_0x1630dc(0x231)]({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x1630dc(0x1ff)](),'value':OperatorValueSchema[a164_0x1630dc(0x1ff)](),'min':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x229)](),TemporalValueSchema])['optional'](),'max':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z['string'](),TemporalValueSchema])[a164_0x1630dc(0x1ff)](),'unit':TimeUnitSchema[a164_0x1630dc(0x1ff)](),'duration':z[a164_0x1630dc(0x231)]({'day':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'week':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'month':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'year':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'hour':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'minute':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'second':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)]()})[a164_0x1630dc(0x1ff)](),'from':z['object']({'last':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x229)]()]),'unit':TimeUnitSchema})[a164_0x1630dc(0x1ff)](),'reverse':z['boolean']()[a164_0x1630dc(0x1ff)]()})['superRefine']((_0x43a1ce,_0x20083f)=>{const _0x4b47fe=a164_0x1630dc;OPERATORS_REQUIRING_VALUE[_0x4b47fe(0x1fd)](_0x43a1ce[_0x4b47fe(0x21a)])&&(_0x43a1ce[_0x4b47fe(0x1f8)]===undefined||_0x43a1ce['value']===null)&&_0x20083f[_0x4b47fe(0x216)]({'code':'custom','message':'Operator\x20\x27'+_0x43a1ce[_0x4b47fe(0x21a)]+'\x27\x20requires\x20a\x20value','path':[_0x4b47fe(0x1f8)]}),_0x43a1ce['type']===_0x4b47fe(0x20b)&&_0x43a1ce[_0x4b47fe(0x1f1)]===undefined&&_0x43a1ce[_0x4b47fe(0x1f7)]===undefined&&_0x20083f[_0x4b47fe(0x216)]({'code':_0x4b47fe(0x22e),'message':_0x4b47fe(0x227),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x4b47fe(0x1fd)](_0x43a1ce['type'])&&_0x43a1ce[_0x4b47fe(0x1f8)]!==undefined&&!_0x43a1ce['unit']&&_0x20083f['addIssue']({'code':_0x4b47fe(0x22e),'message':_0x4b47fe(0x226)+_0x43a1ce['type']+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x4b47fe(0x1fb)],'params':{'validationCode':_0x4b47fe(0x1fc)}}),_0x43a1ce[_0x4b47fe(0x21a)]===_0x4b47fe(0x235)&&(!_0x43a1ce[_0x4b47fe(0x1f2)]&&_0x20083f['addIssue']({'code':'custom','message':_0x4b47fe(0x215),'path':['duration']}),!_0x43a1ce['from']&&_0x20083f['addIssue']({'code':_0x4b47fe(0x22e),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x4b47fe(0x21c)]}));});export const ArrayMatchingSchema=z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f6)]('any'),z[a164_0x1630dc(0x1f6)]('all'),z[a164_0x1630dc(0x231)]({'atLeast':z[a164_0x1630dc(0x1f3)]()}),z[a164_0x1630dc(0x231)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x1630dc(0x209)](a164_0x1630dc(0x21a),[z['object']({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x213),'Min','Max',a164_0x1630dc(0x223)]),'column':z[a164_0x1630dc(0x229)](),'groupingColumns':z[a164_0x1630dc(0x20f)](z[a164_0x1630dc(0x229)]())[a164_0x1630dc(0x1ff)]()}),z['object']({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x200)),'groupingColumns':z[a164_0x1630dc(0x20f)](z[a164_0x1630dc(0x229)]())['optional']()}),z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x214)),'columns':z[a164_0x1630dc(0x20f)](z[a164_0x1630dc(0x229)]())}),z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x207),a164_0x1630dc(0x22b)]),'column':z[a164_0x1630dc(0x229)](),'orderColumn':z[a164_0x1630dc(0x229)](),'groupingColumns':z['array'](z[a164_0x1630dc(0x229)]())['optional']()})]);export const TimeWindowDefSchema=z[a164_0x1630dc(0x231)]({'duration':z[a164_0x1630dc(0x1f3)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x1630dc(0x217),'TimeWithinNext',a164_0x1630dc(0x235)]);export const FilterColumnConditionDefSchema=z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x219)),'column':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x1630dc(0x1ff)]()})[a164_0x1630dc(0x1f9)]((_0x224f27,_0x79af8d)=>{const _0x140579=a164_0x1630dc,_0x25ac3e=_0x224f27[_0x140579(0x236)]['type'];_0x224f27[_0x140579(0x21b)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x140579(0x1fd)](_0x25ac3e)&&_0x79af8d[_0x140579(0x216)]({'code':'custom','message':_0x140579(0x21e)+_0x25ac3e+'\x27)','path':[_0x140579(0x236),'type']}):TIMESTAMP_OPERATORS['has'](_0x25ac3e)&&_0x79af8d[_0x140579(0x216)]({'code':_0x140579(0x22e),'message':'Operator\x20\x27'+_0x25ac3e+_0x140579(0x232),'path':['operator','type']});});function a164_0x51fb(_0x4ce1a5,_0x46a742){_0x4ce1a5=_0x4ce1a5-0x1ee;const _0x193add=a164_0x193a();let _0x51fb50=_0x193add[_0x4ce1a5];return _0x51fb50;}export const FilterRuleDefSchema=z['object']({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x220)),'conditions':z[a164_0x1630dc(0x20f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x20d)),'attribute':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x1630dc(0x1ff)](),'exclude':z['boolean']()[a164_0x1630dc(0x1ff)](),'aggregation':AggregationDefSchema[a164_0x1630dc(0x1ff)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a164_0x1630dc(0x1ff)](),'limit':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a164_0x1630dc(0x20a)),'attribute':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x1630dc(0x221)]()[a164_0x1630dc(0x1ff)](),'aggregation':AggregationDefSchema[a164_0x1630dc(0x1ff)](),'source':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x1630dc(0x1ff)](),'limit':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)]()}));export const ColumnConditionDefSchema=z[a164_0x1630dc(0x231)]({'type':z['literal']('Column'),'column':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x1630dc(0x224)](()=>z['object']({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x220),'Or']),'conditions':z[a164_0x1630dc(0x20f)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentRefConditionDefSchema=z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x218),'exclude']),'segment':z['string']()[a164_0x1630dc(0x1f1)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x1630dc(0x22d)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x1630dc(0x224)](()=>z[a164_0x1630dc(0x231)]({'type':z['enum']([a164_0x1630dc(0x220),'Or']),'conditions':z[a164_0x1630dc(0x20f)](ConditionDefSchema),'description':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)]()}));export const SegmentDefSchema=z[a164_0x1630dc(0x231)]({'type':z['literal'](a164_0x1630dc(0x1f5))[a164_0x1630dc(0x1ff)](),'name':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1f1)](0x1,a164_0x1630dc(0x21d)),'description':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)](),'folder':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)](),'rule':RuleDefSchema['optional'](),'kind':z['enum'](['batch',a164_0x1630dc(0x212),'funnel_stage'])[a164_0x1630dc(0x1ff)](),'visible':z[a164_0x1630dc(0x221)]()[a164_0x1630dc(0x1ff)](),'activations':z['array'](z[a164_0x1630dc(0x1ee)]())[a164_0x1630dc(0x1ff)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x4e4d4c=a165_0x4ecf;(function(_0x5d5163,_0x40cda6){const _0x440f5e=a165_0x4ecf,_0x395275=_0x5d5163();while(!![]){try{const _0x3c5db9=parseInt(_0x440f5e(0x150))/0x1*(-parseInt(_0x440f5e(0x15a))/0x2)+parseInt(_0x440f5e(0x14f))/0x3+-parseInt(_0x440f5e(0x14d))/0x4*(-parseInt(_0x440f5e(0x151))/0x5)+parseInt(_0x440f5e(0x154))/0x6+-parseInt(_0x440f5e(0x14a))/0x7*(-parseInt(_0x440f5e(0x149))/0x8)+-parseInt(_0x440f5e(0x160))/0x9*(parseInt(_0x440f5e(0x161))/0xa)+-parseInt(_0x440f5e(0x144))/0xb;if(_0x3c5db9===_0x40cda6)break;else _0x395275['push'](_0x395275['shift']());}catch(_0x1998ce){_0x395275['push'](_0x395275['shift']());}}}(a165_0x2ecb,0xa10be));import{readFileSync}from'fs';import*as a165_0x2e1af3 from'path';import*as a165_0x2db897 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x4e4d4c(0x157),'push']);function a165_0x2ecb(){const _0x757307=['8NCzBqo','7350903CPuHlG','template','campaign_type','71112SWZtHD','toJSON','392910vqKemo','2eQXuIv','310BXtbVR','object','journey','1682010MrrNJy','length','message','email','segment','type','254596HoABcG','error','result','not\x20a\x20','parseDocument','relative','45vTEJDH','1336540amdzOq','YAML\x20parse\x20error:\x20','YAML_PARSE_ERROR','has','valid','basename','10792738vSUVDr','map','utf-8','campaign','filterType'];a165_0x2ecb=function(){return _0x757307;};return a165_0x2ecb();}export function isJourneyDef(_0x4b7731){const _0x30deb2=a165_0x4e4d4c;return typeof _0x4b7731==='object'&&_0x4b7731!==null&&_0x30deb2(0x159)in _0x4b7731&&_0x4b7731['type']==='journey';}export function isCampaignDef(_0x3628cc){const _0x45ff25=a165_0x4e4d4c;if(typeof _0x3628cc!=='object'||_0x3628cc===null)return![];const _0x2060b5=_0x3628cc,_0x5923b7=VALID_CAMPAIGN_TYPES[_0x45ff25(0x141)](_0x2060b5[_0x45ff25(0x14c)]);if(_0x2060b5[_0x45ff25(0x159)]==='campaign'&&_0x5923b7)return!![];if(_0x5923b7&&!_0x2060b5['type'])return!![];return![];}export function isTemplateDef(_0x5740ac){const _0x528988=a165_0x4e4d4c;return typeof _0x5740ac===_0x528988(0x152)&&_0x5740ac!==null&&_0x528988(0x159)in _0x5740ac&&_0x5740ac[_0x528988(0x159)]==='template';}export function isValidationResult(_0x27960f){return!('skipped'in _0x27960f);}export function createParseErrorResult(_0x1edd2c,_0x250245,_0x4a8965,_0xfef0c8,_0x59c572='segment'){const _0x3d7006=a165_0x4e4d4c;return{'filePath':_0x1edd2c,'relativePath':_0x250245,'source':_0x4a8965,'result':{'valid':![],'errors':[{'level':_0x3d7006(0x15b),'path':'','code':_0x3d7006(0x163),'message':_0xfef0c8}],'warnings':[]},'fileType':_0x59c572};}function a165_0x4ecf(_0xbe4328,_0x15e508){_0xbe4328=_0xbe4328-0x141;const _0x2ecb69=a165_0x2ecb();let _0x4ecfd1=_0x2ecb69[_0xbe4328];return _0x4ecfd1;}export function validateYamlFile(_0x266a44,_0x7d3715,_0x56d250={}){const _0x5cdafe=a165_0x4e4d4c,_0x9ae6ed=a165_0x2e1af3[_0x5cdafe(0x15f)](_0x7d3715,_0x266a44)||a165_0x2e1af3[_0x5cdafe(0x143)](_0x266a44);try{const _0x216fe1=readFileSync(_0x266a44,_0x5cdafe(0x146)),_0x4a783c=a165_0x2db897[_0x5cdafe(0x15e)](_0x216fe1),_0x5f4d60=_0x4a783c[_0x5cdafe(0x14e)]();if(!_0x5f4d60)return createParseErrorResult(_0x266a44,_0x9ae6ed,_0x216fe1,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0xeae697;if(isJourneyDef(_0x5f4d60))_0xeae697=_0x5cdafe(0x153);else{if(isCampaignDef(_0x5f4d60))_0xeae697='campaign';else isTemplateDef(_0x5f4d60)?_0xeae697=_0x5cdafe(0x14b):_0xeae697=_0x5cdafe(0x158);}if(_0x56d250['filterType']&&_0xeae697!==_0x56d250[_0x5cdafe(0x148)])return{'filePath':_0x266a44,'relativePath':_0x9ae6ed,'skipped':!![],'reason':_0x5cdafe(0x15d)+_0x56d250[_0x5cdafe(0x148)]};const _0x104489={'source':_0x216fe1,'document':_0x4a783c};let _0x38029f;if(_0xeae697===_0x5cdafe(0x153))_0x38029f=validateJourneyDef(_0x5f4d60,_0x104489);else{if(_0xeae697===_0x5cdafe(0x147))_0x38029f=validateCampaignDef(_0x5f4d60,_0x104489);else _0xeae697===_0x5cdafe(0x14b)?_0x38029f=validateTemplateDef(_0x5f4d60,_0x104489):_0x38029f=validateSegmentDef(_0x5f4d60,_0x104489);}return{'filePath':_0x266a44,'relativePath':_0x9ae6ed,'source':_0x216fe1,'result':_0x38029f,'fileType':_0xeae697};}catch(_0x3ca9b7){const _0x1638f6=_0x3ca9b7 instanceof Error?_0x3ca9b7[_0x5cdafe(0x156)]:String(_0x3ca9b7);return createParseErrorResult(_0x266a44,_0x9ae6ed,'',_0x5cdafe(0x162)+_0x1638f6);}}export function validateYamlFiles(_0x5eb827,_0x2b116f,_0x142df0={}){const _0x3987af=a165_0x4e4d4c;return _0x5eb827[_0x3987af(0x145)](_0xeaf8c1=>validateYamlFile(_0xeaf8c1,_0x2b116f,_0x142df0));}export function calculateSummary(_0x1b8620){const _0x456c81=a165_0x4e4d4c;let _0x937f21=0x0,_0x3f1788=0x0,_0xe88a7e=0x0,_0x6f5db4=0x0;for(const _0x633ef of _0x1b8620){if(!isValidationResult(_0x633ef)){_0x6f5db4++;continue;}_0x633ef[_0x456c81(0x15c)][_0x456c81(0x142)]?_0x937f21++:_0x3f1788++,_0xe88a7e+=_0x633ef[_0x456c81(0x15c)]['warnings'][_0x456c81(0x155)];}return{'validCount':_0x937f21,'invalidCount':_0x3f1788,'warningCount':_0xe88a7e,'skippedCount':_0x6f5db4,'hasErrors':_0x3f1788>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c1f3d,_0x38f2db){const _0xc07a22=a166_0x47c1,_0x255cab=_0x3c1f3d();while(!![]){try{const _0x20f779=parseInt(_0xc07a22(0xc7))/0x1+parseInt(_0xc07a22(0xe6))/0x2*(parseInt(_0xc07a22(0xd1))/0x3)+-parseInt(_0xc07a22(0xc9))/0x4*(-parseInt(_0xc07a22(0xcb))/0x5)+parseInt(_0xc07a22(0xcd))/0x6+-parseInt(_0xc07a22(0xf0))/0x7*(parseInt(_0xc07a22(0xdf))/0x8)+parseInt(_0xc07a22(0xd0))/0x9*(parseInt(_0xc07a22(0xd3))/0xa)+-parseInt(_0xc07a22(0xe8))/0xb;if(_0x20f779===_0x38f2db)break;else _0x255cab['push'](_0x255cab['shift']());}catch(_0x45d1c4){_0x255cab['push'](_0x255cab['shift']());}}}(a166_0x2133,0x5a442));import*as a166_0x2dce5f from'yaml';import a166_0x136c87 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';function a166_0x2133(){const _0x20073a=['message','issues','code','length','4006415YvBkEV','min','red','number','error','match','34279dgbiHJ','safeParse','92LQAanj','Invalid\x20YAML:\x20expected\x20an\x20object','40105cHMVZf','path','3751794IqpxJd','errors','pop','55197nWDYSA','14478XDLmtR','toString','500HdUMJK','dim','YAML\x20validation\x20error:\x20','map','data','success','cyan','repeat','getIn','max','column','range','8BrMIPk','object','level','flatMap','contents','join','push','160mNfUyl','invalid_union','6541876vOtVaM','split','location','\x20|\x20'];a166_0x2133=function(){return _0x20073a;};return a166_0x2133();}export function getLocationFromPath(_0x546a13,_0x4b97ce,_0x481cf9){const _0x280296=a166_0x47c1;if(!_0x546a13||!_0x4b97ce)return undefined;try{let _0x34199c=_0x546a13[_0x280296(0xdb)](_0x481cf9,!![]),_0x48cb81=[..._0x481cf9];while((!_0x34199c||typeof _0x34199c!==_0x280296(0xe0)||!(_0x280296(0xde)in _0x34199c)||!_0x34199c[_0x280296(0xde)])&&_0x48cb81[_0x280296(0xef)]>0x0){_0x48cb81[_0x280296(0xcf)](),_0x34199c=_0x48cb81[_0x280296(0xef)]>0x0?_0x546a13['getIn'](_0x48cb81,!![]):_0x546a13[_0x280296(0xe3)];}if(!_0x34199c||typeof _0x34199c!==_0x280296(0xe0)||!('range'in _0x34199c)||!_0x34199c[_0x280296(0xde)])return undefined;const [_0x12a391]=_0x34199c[_0x280296(0xde)];return offsetToLocation(_0x4b97ce,_0x12a391);}catch{return undefined;}}function a166_0x47c1(_0x441cc,_0x1571d5){_0x441cc=_0x441cc-0xc6;const _0x21337b=a166_0x2133();let _0x47c106=_0x21337b[_0x441cc];return _0x47c106;}export function offsetToLocation(_0x2d810c,_0x56a56a){const _0x4a08da=a166_0x47c1;let _0x5f3c47=0x1,_0x5dade7=0x1;for(let _0x4864c2=0x0;_0x4864c2<_0x56a56a&&_0x4864c2<_0x2d810c[_0x4a08da(0xef)];_0x4864c2++){_0x2d810c[_0x4864c2]==='\x0a'?(_0x5f3c47++,_0x5dade7=0x1):_0x5dade7++;}return{'line':_0x5f3c47,'column':_0x5dade7,'offset':_0x56a56a};}export function pathToArray(_0x670a5c){const _0x26cf7d=a166_0x47c1;if(!_0x670a5c)return[];return _0x670a5c[_0x26cf7d(0xe9)]('.')[_0x26cf7d(0xe2)](_0x534a66=>{const _0x127a77=_0x26cf7d,_0x48e8f1=_0x534a66[_0x127a77(0xc6)](/^(\w+)\[(\d+)\]$/);if(_0x48e8f1)return[_0x48e8f1[0x1],parseInt(_0x48e8f1[0x2],0xa)];return[_0x534a66];});}export function formatZodPath(_0x4b7add){const _0x34e3cc=a166_0x47c1;let _0x5c6d12='';for(const _0x208094 of _0x4b7add){if(typeof _0x208094===_0x34e3cc(0xf3))_0x5c6d12+='['+_0x208094+']';else{const _0xd33311=String(_0x208094);_0x5c6d12+=_0x5c6d12?'.'+_0xd33311:_0xd33311;}}return _0x5c6d12;}export function flattenZodIssues(_0x108d7b){const _0xc3fdf4=a166_0x47c1,_0x59bb7b=[];for(const _0x1e7f14 of _0x108d7b){if(_0x1e7f14['code']===_0xc3fdf4(0xe7)&&'errors'in _0x1e7f14){const _0x523f8d=_0x1e7f14['errors'];let _0x3a2760=_0x523f8d[0x0]||[];for(const _0x52b8a2 of _0x523f8d){_0x52b8a2[_0xc3fdf4(0xef)]<_0x3a2760['length']&&(_0x3a2760=_0x52b8a2);}const _0x4e16f3=_0x3a2760[_0xc3fdf4(0xd6)](_0x2bcaee=>({..._0x2bcaee,'path':[..._0x1e7f14[_0xc3fdf4(0xcc)],..._0x2bcaee['path']]}));_0x59bb7b[_0xc3fdf4(0xe5)](...flattenZodIssues(_0x4e16f3));}else _0x59bb7b[_0xc3fdf4(0xe5)](_0x1e7f14);}return _0x59bb7b;}export function safeParseYaml(_0x3a48fc,_0x2ec66d){const _0x1a5027=a166_0x47c1,_0x1caaa7=a166_0x2dce5f['parse'](_0x3a48fc);if(!_0x1caaa7||typeof _0x1caaa7!==_0x1a5027(0xe0))throw new Error(_0x1a5027(0xca));const _0x3225be=_0x2ec66d[_0x1a5027(0xc8)](_0x1caaa7);if(!_0x3225be[_0x1a5027(0xd8)]){const _0x2d1f97=_0x3225be[_0x1a5027(0xf4)][_0x1a5027(0xed)][0x0],_0x2bc6f5=formatZodPath(_0x2d1f97[_0x1a5027(0xcc)]);throw new Error(_0x2bc6f5?'YAML\x20validation\x20error\x20at\x20\x27'+_0x2bc6f5+'\x27:\x20'+_0x2d1f97[_0x1a5027(0xec)]:_0x1a5027(0xd5)+_0x2d1f97[_0x1a5027(0xec)]);}return _0x3225be[_0x1a5027(0xd7)];}export function formatIssueWithContext(_0x2c8915,_0x5cb7d3,_0x177303){const _0x2c1fa0=a166_0x47c1,_0x38a94c=[],_0x487433=_0x2c8915[_0x2c1fa0(0xe1)]===_0x2c1fa0(0xf4),_0x4fb76a=_0x487433?a166_0x136c87[_0x2c1fa0(0xf2)]:a166_0x136c87['yellow'],_0x12dbbc=_0x487433?a166_0x136c87[_0x2c1fa0(0xf2)]:a166_0x136c87['yellow'],_0x2e1213=_0x177303?a166_0x136c87[_0x2c1fa0(0xd9)](_0x177303+':'):'';if(_0x2c8915[_0x2c1fa0(0xea)]){const _0x4d7a30=a166_0x136c87[_0x2c1fa0(0xd9)](_0x2c8915[_0x2c1fa0(0xea)]['line']+':'+_0x2c8915[_0x2c1fa0(0xea)][_0x2c1fa0(0xdd)]);_0x38a94c[_0x2c1fa0(0xe5)](''+_0x2e1213+_0x4d7a30+':\x20'+_0x4fb76a(_0x2c8915[_0x2c1fa0(0xe1)])+'\x20'+_0x12dbbc('['+_0x2c8915['code']+']'));}else _0x38a94c[_0x2c1fa0(0xe5)](''+_0x2e1213+a166_0x136c87[_0x2c1fa0(0xd4)](_0x2c8915[_0x2c1fa0(0xcc)])+':\x20'+_0x4fb76a(_0x2c8915[_0x2c1fa0(0xe1)])+'\x20'+_0x12dbbc('['+_0x2c8915[_0x2c1fa0(0xee)]+']'));_0x38a94c[_0x2c1fa0(0xe5)](_0x2c8915[_0x2c1fa0(0xec)]);if(_0x2c8915[_0x2c1fa0(0xea)]&&_0x5cb7d3){const _0x3d2920=_0x5cb7d3['split']('\x0a'),{line:_0x22ce0c,column:_0x57d2a1}=_0x2c8915[_0x2c1fa0(0xea)],_0xea5663=Math[_0x2c1fa0(0xdc)](0x1,_0x22ce0c-0x1),_0x169114=Math[_0x2c1fa0(0xf1)](_0x3d2920[_0x2c1fa0(0xef)],_0x22ce0c+0x1);_0x38a94c[_0x2c1fa0(0xe5)]('');for(let _0x53e3b5=_0xea5663;_0x53e3b5<=_0x169114;_0x53e3b5++){const _0x318579=_0x3d2920[_0x53e3b5-0x1]||'',_0x39dfa7=a166_0x136c87[_0x2c1fa0(0xd4)](_0x53e3b5[_0x2c1fa0(0xd2)]()['padStart'](0x4)),_0x202920=a166_0x136c87[_0x2c1fa0(0xd4)](_0x2c1fa0(0xeb));if(_0x53e3b5===_0x22ce0c){_0x38a94c[_0x2c1fa0(0xe5)]('\x20\x20'+_0x39dfa7+_0x202920+_0x4fb76a(_0x318579));const _0x2aa194='\x20'[_0x2c1fa0(0xda)](0x4+0x3+_0x57d2a1-0x1);_0x38a94c['push']('\x20\x20'+_0x2aa194+_0x4fb76a('^'));}else _0x38a94c[_0x2c1fa0(0xe5)]('\x20\x20'+_0x39dfa7+_0x202920+a166_0x136c87[_0x2c1fa0(0xd4)](_0x318579));}}return _0x38a94c[_0x2c1fa0(0xe4)]('\x0a');}export function formatValidationResult(_0x3873a2,_0x1ba4a2,_0x2d7c80){const _0x4e0410=a166_0x47c1,_0x895f8c=[];for(const _0x516835 of _0x3873a2[_0x4e0410(0xce)]){_0x895f8c[_0x4e0410(0xe5)](formatIssueWithContext(_0x516835,_0x1ba4a2,_0x2d7c80)),_0x895f8c[_0x4e0410(0xe5)]('');}for(const _0x286665 of _0x3873a2['warnings']){_0x895f8c[_0x4e0410(0xe5)](formatIssueWithContext(_0x286665,_0x1ba4a2,_0x2d7c80)),_0x895f8c[_0x4e0410(0xe5)]('');}return _0x895f8c[_0x4e0410(0xe4)]('\x0a');}
|