@treasuredata/tdx 2026.3.45 → 2026.3.47
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/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.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/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/builtin-schedules/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/TASK.md +62 -0
- package/dist/sdk/workspace/builtin-schedules/execute-items/schedule.yaml +20 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/TASK.md +106 -0
- package/dist/sdk/workspace/builtin-schedules/item-triage/schedule.yaml +18 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
- package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/TASK.md +21 -0
- package/dist/sdk/workspace/builtin-schedules/weekly-review/schedule.yaml +14 -0
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +5 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dff5b,_0x10189c){const _0x4fb3e9=a157_0x237a,_0x2e656c=_0x5dff5b();while(!![]){try{const _0x401ddf=-parseInt(_0x4fb3e9(0x9f))/0x1+-parseInt(_0x4fb3e9(0x93))/0x2+-parseInt(_0x4fb3e9(0x9d))/0x3*(parseInt(_0x4fb3e9(0xb2))/0x4)+-parseInt(_0x4fb3e9(0xb0))/0x5+-parseInt(_0x4fb3e9(0x98))/0x6+-parseInt(_0x4fb3e9(0xbe))/0x7+parseInt(_0x4fb3e9(0x9e))/0x8;if(_0x401ddf===_0x10189c)break;else _0x2e656c['push'](_0x2e656c['shift']());}catch(_0x31264){_0x2e656c['push'](_0x2e656c['shift']());}}}(a157_0x23ba,0x29d2f));function a157_0x23ba(){const _0x5d090f=['no_config','Parent\x20segment\x20not\x20specified','error','2808gPMKJw','9135600gFibLQ','113070UlfTSg','no_parent','context','tdx.json','parentSegment','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','scopedFolderPath','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','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','basename','configDir','file_not_found','cwd','trim','stat','exists','startsWith','774880mbxxoM','string','116FhgQEX','isScoped','file','invalid_yaml','readFile','type','join','resolve','parent_segment','isDirectory','No\x20tdx.json\x20found','isFile','1731275AOzfiw','segmentName','parse','root','resourceType','File\x20not\x20found:\x20','dirname','directory','181252hMmPhK','folderPath','includes','No\x20tdx.json\x20found\x20for\x20file:\x20','replace','2024988UQytLw','File\x20not\x20found'];a157_0x23ba=function(){return _0x5d090f;};return a157_0x23ba();}import a157_0x4c588e from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x237a(_0x2426a5,_0x786579){_0x2426a5=_0x2426a5-0x93;const _0x23bab5=a157_0x23ba();let _0x237a90=_0x23bab5[_0x2426a5];return _0x237a90;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x5c89f8){const _0x2f14e6=a157_0x237a;return _0x5c89f8[_0x2f14e6(0xb7)]!==_0x2f14e6(0x9c);}export function isScopedResolution(_0x297140){const _0x10317e=a157_0x237a;return _0x297140[_0x10317e(0xb7)]===_0x10317e(0xc5)||_0x297140['type']===_0x10317e(0xb4)||_0x297140[_0x10317e(0xb7)]===_0x10317e(0xa1);}export function getScopedDetails(_0x2e1278){const _0x3133de=a157_0x237a;if(isScopedResolution(_0x2e1278))return{'isScoped':_0x2e1278[_0x3133de(0xb3)],'scopedFolderPath':_0x2e1278[_0x3133de(0xa5)]};return undefined;}async function findTdxConfigAsync(_0x5e32d4,_0x51aea3){const _0x77fae0=a157_0x237a;let _0x3e4a4b=a157_0x4c588e[_0x77fae0(0xb9)](_0x5e32d4);const _0x37ef17=a157_0x4c588e[_0x77fae0(0xc0)](_0x3e4a4b)[_0x77fae0(0xc1)];while(_0x3e4a4b!==_0x37ef17){const _0x615ec4=a157_0x4c588e[_0x77fae0(0xb8)](_0x3e4a4b,_0x77fae0(0xa2));if(await _0x51aea3[_0x77fae0(0xae)](_0x615ec4))try{const _0x5711fb=await _0x51aea3['readFile'](_0x615ec4),_0x304ce0=JSON[_0x77fae0(0xc0)](_0x5711fb);if(_0x304ce0[_0x77fae0(0xba)]&&typeof _0x304ce0[_0x77fae0(0xba)]===_0x77fae0(0xb1))return{'configPath':_0x615ec4,'configDir':_0x3e4a4b,'parentSegment':_0x304ce0['parent_segment']};}catch{}_0x3e4a4b=a157_0x4c588e[_0x77fae0(0xc4)](_0x3e4a4b);}return null;}function calculateScopedPath(_0x288089,_0x2905d5){const _0x4e64da=a157_0x237a,_0x427727=a157_0x4c588e['relative'](_0x2905d5,_0x288089),_0x2c4d60=_0x427727!==''&&_0x427727!=='.'&&!_0x427727[_0x4e64da(0xaf)]('..');return{'isScoped':_0x2c4d60,'scopedFolderPath':_0x2c4d60?_0x427727[_0x4e64da(0x97)](/\\/g,'/'):''};}export async function resolveTarget(_0x5c15ca){const _0x5e3f5b=a157_0x237a,{arg:_0x26c9f7,contextParent:_0x55fd40,cwd:cwd=process[_0x5e3f5b(0xab)](),fs:fs=nodeFileSystem}=_0x5c15ca;if(_0x26c9f7&&isYamlFilePath(_0x26c9f7))try{const _0x550032=await resolveYamlFilePath(_0x26c9f7,fs),_0x2d6c0=a157_0x4c588e[_0x5e3f5b(0xb9)](_0x26c9f7),_0x291eaf=a157_0x4c588e['dirname'](_0x2d6c0),_0x493f2e=await findTdxConfigAsync(_0x291eaf,fs);if(!_0x493f2e){if(_0x55fd40){const _0x281f94=a157_0x4c588e[_0x5e3f5b(0xc4)](_0x2d6c0);return{'type':_0x5e3f5b(0xb4),'parentName':_0x55fd40,'targetDir':_0x281f94,'configRoot':_0x281f94,'filePath':_0x2d6c0,'resourceName':_0x550032[_0x5e3f5b(0xbf)],'folderPath':_0x550032['folderPath'],'resourceType':_0x550032['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0x9a),'message':_0x5e3f5b(0x96)+_0x26c9f7,'arg':_0x26c9f7,'helpText':_0x5e3f5b(0xa4)};}const _0x2484cc=calculateScopedPath(_0x291eaf,_0x493f2e[_0x5e3f5b(0xa9)]);return{'type':_0x5e3f5b(0xb4),'parentName':_0x493f2e[_0x5e3f5b(0xa3)],'targetDir':_0x493f2e['configDir'],'configRoot':_0x493f2e['configDir'],'filePath':_0x2d6c0,'resourceName':_0x550032[_0x5e3f5b(0xbf)],'folderPath':_0x550032[_0x5e3f5b(0x94)],'resourceType':_0x550032[_0x5e3f5b(0xc2)],'isScoped':_0x2484cc[_0x5e3f5b(0xb3)],'scopedFolderPath':_0x2484cc['scopedFolderPath']};}catch(_0x567e31){const _0x6655c3=_0x567e31 instanceof Error?_0x567e31['message']:String(_0x567e31);if(_0x6655c3[_0x5e3f5b(0x95)](_0x5e3f5b(0x99)))return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0xaa),'message':_0x5e3f5b(0xc3)+_0x26c9f7,'arg':_0x26c9f7};if(_0x6655c3['includes'](_0x5e3f5b(0xbc))){if(_0x55fd40){const _0x4d6eea=a157_0x4c588e[_0x5e3f5b(0xb9)](_0x26c9f7);if(await fs[_0x5e3f5b(0xae)](_0x4d6eea)){const _0xb68c21=a157_0x4c588e[_0x5e3f5b(0xc4)](_0x4d6eea),_0x50cb09=await fs[_0x5e3f5b(0xb6)](_0x4d6eea),_0x2ce0b2=_0x50cb09['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1826d6=_0x50cb09['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x40ed81=_0x2ce0b2?_0x2ce0b2[0x1][_0x5e3f5b(0xac)]():a157_0x4c588e[_0x5e3f5b(0xa8)](_0x26c9f7,a157_0x4c588e['extname'](_0x26c9f7)),_0x5c567b=_0x1826d6&&_0x1826d6[0x1][_0x5e3f5b(0xac)]()==='journey'?'journey':'segment';return{'type':_0x5e3f5b(0xb4),'parentName':_0x55fd40,'targetDir':_0xb68c21,'configRoot':_0xb68c21,'filePath':_0x4d6eea,'resourceName':_0x40ed81,'folderPath':'','resourceType':_0x5c567b,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0x9a),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x26c9f7,'arg':_0x26c9f7,'helpText':_0x5e3f5b(0xa4)};}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0xb5),'message':_0x6655c3,'arg':_0x26c9f7};}if(_0x26c9f7){const _0x4c4899=a157_0x4c588e[_0x5e3f5b(0xb9)](cwd,_0x26c9f7);let _0x30ec4a=null;try{_0x30ec4a=await fs[_0x5e3f5b(0xad)](_0x4c4899);}catch{}if(_0x30ec4a?.[_0x5e3f5b(0xbb)]()){const _0x2a3953=await findTdxConfigAsync(_0x4c4899,fs);if(_0x2a3953){const _0x19122e=calculateScopedPath(_0x4c4899,_0x2a3953[_0x5e3f5b(0xa9)]);return{'type':_0x5e3f5b(0xc5),'parentName':_0x2a3953[_0x5e3f5b(0xa3)],'targetDir':_0x4c4899,'configRoot':_0x2a3953[_0x5e3f5b(0xa9)],'isScoped':_0x19122e[_0x5e3f5b(0xb3)],'scopedFolderPath':_0x19122e[_0x5e3f5b(0xa5)]};}if(_0x55fd40)return{'type':'directory','parentName':_0x55fd40,'targetDir':_0x4c4899,'configRoot':_0x4c4899,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x5e3f5b(0x9a),'message':_0x5e3f5b(0xa7)+_0x26c9f7,'arg':_0x26c9f7,'helpText':_0x5e3f5b(0xa4)};}if(_0x30ec4a?.[_0x5e3f5b(0xbd)]())return{'type':'error','errorCode':_0x5e3f5b(0xb5),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x26c9f7,'arg':_0x26c9f7,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x9737e6=sanitizeFileName(_0x26c9f7),_0x12fd44=getSegmentRootDir(_0x9737e6,cwd);return{'type':'parent_name','parentName':_0x26c9f7,'targetDir':_0x12fd44,'configRoot':_0x12fd44};}const _0x47208a=await findTdxConfigAsync(cwd,fs);if(_0x47208a){const _0xa1debf=calculateScopedPath(cwd,_0x47208a['configDir']);return{'type':'context','parentName':_0x47208a[_0x5e3f5b(0xa3)],'targetDir':cwd,'configRoot':_0x47208a[_0x5e3f5b(0xa9)],'isScoped':_0xa1debf['isScoped'],'scopedFolderPath':_0xa1debf[_0x5e3f5b(0xa5)]};}if(_0x55fd40){const _0x18d254=sanitizeFileName(_0x55fd40),_0x4b9ff9=getSegmentRootDir(_0x18d254,cwd);return{'type':_0x5e3f5b(0xa1),'parentName':_0x55fd40,'targetDir':_0x4b9ff9,'configRoot':_0x4b9ff9,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0xa0),'message':_0x5e3f5b(0x9b),'helpText':_0x5e3f5b(0xa6)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x4eceb4=a158_0x5340;(function(_0x2cf0a9,_0xa7342){const _0x35e426=a158_0x5340,_0x27bd3e=_0x2cf0a9();while(!![]){try{const _0x1a0b50=-parseInt(_0x35e426(0xab))/0x1*(parseInt(_0x35e426(0xa8))/0x2)+-parseInt(_0x35e426(0x99))/0x3+parseInt(_0x35e426(0xaa))/0x4*(-parseInt(_0x35e426(0x9f))/0x5)+parseInt(_0x35e426(0xa5))/0x6+-parseInt(_0x35e426(0xa0))/0x7*(parseInt(_0x35e426(0xa1))/0x8)+parseInt(_0x35e426(0xa6))/0x9*(-parseInt(_0x35e426(0xa9))/0xa)+parseInt(_0x35e426(0x9e))/0xb;if(_0x1a0b50===_0xa7342)break;else _0x27bd3e['push'](_0x27bd3e['shift']());}catch(_0x4dffcc){_0x27bd3e['push'](_0x27bd3e['shift']());}}}(a158_0x119f,0xcb4ae));import{existsSync,readFileSync}from'fs';import a158_0xfc7152 from'path';const TDX_CONFIG_FILE=a158_0x4eceb4(0x9a),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x37e7c1=process[a158_0x4eceb4(0xb1)]()){const _0x369d64=a158_0x4eceb4;let _0x1981cc=a158_0xfc7152[_0x369d64(0x9b)](_0x37e7c1);const _0x786d7=a158_0xfc7152[_0x369d64(0x9d)](_0x1981cc)[_0x369d64(0xa4)];while(_0x1981cc!==_0x786d7){const _0x51be03=a158_0xfc7152[_0x369d64(0xae)](_0x1981cc,TDX_CONFIG_FILE);if(existsSync(_0x51be03))return _0x51be03;_0x1981cc=a158_0xfc7152[_0x369d64(0x98)](_0x1981cc);}return null;}function a158_0x119f(){const _0x36a397=['parent_segment','string','join','replace','relative','cwd','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','dirname','2790516PRuNls','tdx.json','resolve','Invalid\x20tdx.json:\x20expected\x20object','parse','39040342XfbEal','476465ZyqpXi','130879BgkdbM','400syvfOs','Invalid\x20JSON\x20in\x20','engage_workspace','root','8539338pTjJme','582003bmKyGO','stringify','145306TsiWmu','90CwkQlQ','68ZsLbgH','1fCgGTa'];a158_0x119f=function(){return _0x36a397;};return a158_0x119f();}export function loadTdxConfig(_0x50d8ca){const _0x50c79d=a158_0x4eceb4,_0x4a522d=readFileSync(_0x50d8ca,'utf-8');let _0x14d109;try{_0x14d109=JSON['parse'](_0x4a522d);}catch{throw new Error(_0x50c79d(0xa2)+_0x50d8ca);}if(!_0x14d109||typeof _0x14d109!=='object')throw new Error(_0x50c79d(0x9c));const _0x4b7aad=_0x14d109,_0x65bd44=_0x4b7aad[_0x50c79d(0xac)]&&typeof _0x4b7aad[_0x50c79d(0xac)]===_0x50c79d(0xad),_0x1042c5=_0x4b7aad[_0x50c79d(0xa3)]&&typeof _0x4b7aad['engage_workspace']==='string';if(!_0x65bd44&&!_0x1042c5)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x2fd6b7={};return _0x65bd44&&(_0x2fd6b7[_0x50c79d(0xac)]=_0x4b7aad[_0x50c79d(0xac)]),_0x1042c5&&(_0x2fd6b7[_0x50c79d(0xa3)]=_0x4b7aad[_0x50c79d(0xa3)]),_0x2fd6b7;}export function findTdxConfig(_0xbac21d=process[a158_0x4eceb4(0xb1)]()){const _0x24b85c=a158_0x4eceb4,_0xd392dd=findTdxConfigPath(_0xbac21d);if(!_0xd392dd)throw new Error(_0x24b85c(0x97));const _0x9a8b92=loadTdxConfig(_0xd392dd),_0x3354d7=a158_0xfc7152['dirname'](_0xd392dd);return{'config':_0x9a8b92,'configPath':_0xd392dd,'configDir':_0x3354d7};}export function tryFindTdxConfig(_0x383a91){try{return findTdxConfig(_0x383a91);}catch{return null;}}export function getSegmentRootDir(_0x57ba64,_0x2216ec=process[a158_0x4eceb4(0xb1)]()){return a158_0xfc7152['join'](_0x2216ec,SEGMENTS_DIR,_0x57ba64);}export function getTdxConfigPath(_0x2dbdcf,_0x4772a6=process[a158_0x4eceb4(0xb1)]()){const _0xebb020=a158_0x4eceb4;return a158_0xfc7152[_0xebb020(0xae)](getSegmentRootDir(_0x2dbdcf,_0x4772a6),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5bdb5c,_0x42c0fd){const _0xe1044b=a158_0x4eceb4,_0x4973b8=a158_0xfc7152[_0xe1044b(0x9b)](_0x5bdb5c),_0x9ee03e=a158_0xfc7152[_0xe1044b(0xb0)](_0x42c0fd,_0x4973b8);if(_0x9ee03e['startsWith']('..'))return'';return _0x9ee03e;}export function localPathToTdFolderPath(_0x1859bc){const _0x3c4902=a158_0x4eceb4,_0x91102b=a158_0xfc7152[_0x3c4902(0x98)](_0x1859bc);if(_0x91102b==='.'||_0x91102b==='')return'';return _0x91102b[_0x3c4902(0xaf)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x32e110,_0x492749){const _0x3a9436=a158_0x4eceb4;if(!_0x32e110)return _0x492749;return a158_0xfc7152[_0x3a9436(0xae)](_0x492749,_0x32e110);}export function createTdxConfigContent(_0x290151){const _0xa17562=a158_0x4eceb4,_0x2892fe={'parent_segment':_0x290151};return JSON[_0xa17562(0xa7)](_0x2892fe,null,0x2)+'\x0a';}function a158_0x5340(_0x18b887,_0x52bdd7){_0x18b887=_0x18b887-0x97;const _0x119f90=a158_0x119f();let _0x53400f=_0x119f90[_0x18b887];return _0x53400f;}export function createEngageTdxConfigContent(_0x2afd41){const _0x31e560={'engage_workspace':_0x2afd41};return JSON['stringify'](_0x31e560,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x4e4327=a159_0x5e04;function a159_0x5e04(_0x40d58c,_0x5b006b){_0x40d58c=_0x40d58c-0x10d;const _0x4765ea=a159_0x4765();let _0x5e0453=_0x4765ea[_0x40d58c];return _0x5e0453;}(function(_0x9ccc2c,_0x16b215){const _0x36ba2b=a159_0x5e04,_0x66c47b=_0x9ccc2c();while(!![]){try{const _0x1fcf30=-parseInt(_0x36ba2b(0x10d))/0x1*(parseInt(_0x36ba2b(0x135))/0x2)+-parseInt(_0x36ba2b(0x111))/0x3+-parseInt(_0x36ba2b(0x11e))/0x4*(parseInt(_0x36ba2b(0x124))/0x5)+parseInt(_0x36ba2b(0x12e))/0x6+parseInt(_0x36ba2b(0x130))/0x7+parseInt(_0x36ba2b(0x11c))/0x8*(parseInt(_0x36ba2b(0x10f))/0x9)+parseInt(_0x36ba2b(0x121))/0xa*(parseInt(_0x36ba2b(0x133))/0xb);if(_0x1fcf30===_0x16b215)break;else _0x66c47b['push'](_0x66c47b['shift']());}catch(_0x58e76c){_0x66c47b['push'](_0x66c47b['shift']());}}}(a159_0x4765,0x19cdb));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x123),a159_0x4e4327(0x10e),a159_0x4e4327(0x12d),'weekly',a159_0x4e4327(0x118),a159_0x4e4327(0x117),a159_0x4e4327(0x11d)]);export const RepeatUnitSchema=z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x119),'hour',a159_0x4e4327(0x12c),a159_0x4e4327(0x12f),a159_0x4e4327(0x113),a159_0x4e4327(0x12a),a159_0x4e4327(0x123)]);export const ScheduleDefSchema=z[a159_0x4e4327(0x129)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z['number']()['optional'](),'repeat_sub_frequency':z[a159_0x4e4327(0x132)](z[a159_0x4e4327(0x11a)]())[a159_0x4e4327(0x127)](),'start_at':z[a159_0x4e4327(0x131)]()['nullable']()[a159_0x4e4327(0x127)](),'end_on':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'timezone':z[a159_0x4e4327(0x131)]()['optional']()});export const NotificationDefSchema=z[a159_0x4e4327(0x129)]({'notify_on':z[a159_0x4e4327(0x132)](z['enum']([a159_0x4e4327(0x11f),a159_0x4e4327(0x11b)]))[a159_0x4e4327(0x127)](),'email_recipients':z['array'](z[a159_0x4e4327(0x131)]())[a159_0x4e4327(0x127)]()});export const ActivationColumnDefSchema=z[a159_0x4e4327(0x114)]([z[a159_0x4e4327(0x131)](),z[a159_0x4e4327(0x129)]({'name':z[a159_0x4e4327(0x131)](),'type':z['string']()['optional'](),'visibility':z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x137),a159_0x4e4327(0x112)])[a159_0x4e4327(0x127)]()})]);function a159_0x4765(){const _0x394635=['613613pkNkNj','boolean','24Rmefuk','cols','clear','2246GYVIxV','hourly','9DOSoNR','desc','158619VKVuMd','masked','month','union','asc','enum','cron','monthly','minute','number','onFailure','234808KpbtlL','minutes_interval','392TbdlGR','onSuccess','Top-N','10GXnJQr','min','none','9770sGsSgi','First','Last','optional','Activation\x20name\x20is\x20required','object','once','nullable','day','daily','866118zbPnsz','week','1032647NLKDeP','string','array'];a159_0x4765=function(){return _0x394635;};return a159_0x4765();}export const ActivationBehaviorDefSchema=z[a159_0x4e4327(0x129)]({'columns':z['array'](z[a159_0x4e4327(0x129)]({'name':z[a159_0x4e4327(0x131)](),'type':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'visibility':z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x137),a159_0x4e4327(0x112)])[a159_0x4e4327(0x127)]()}))[a159_0x4e4327(0x127)](),'behavior_table':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'join_row':z[a159_0x4e4327(0x11a)]()[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'join_strategy':z[a159_0x4e4327(0x116)](['All',a159_0x4e4327(0x125),a159_0x4e4327(0x126),a159_0x4e4327(0x120)])['optional'](),'formatting':z[a159_0x4e4327(0x116)](['rows',a159_0x4e4327(0x136)])['optional'](),'order_by':z[a159_0x4e4327(0x132)](z[a159_0x4e4327(0x129)]({'key':z['string'](),'order':z['enum']([a159_0x4e4327(0x115),a159_0x4e4327(0x110)])}))[a159_0x4e4327(0x127)]()});export const ActivationDefSchema=z[a159_0x4e4327(0x129)]({'name':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x122)](0x1,a159_0x4e4327(0x128)),'description':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'connection':z['string']()[a159_0x4e4327(0x122)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a159_0x4e4327(0x134)]()[a159_0x4e4327(0x127)](),'columns':z[a159_0x4e4327(0x132)](ActivationColumnDefSchema)[a159_0x4e4327(0x127)](),'schedule':ScheduleDefSchema[a159_0x4e4327(0x127)](),'notification':NotificationDefSchema[a159_0x4e4327(0x127)](),'connector_config':z['record'](z[a159_0x4e4327(0x131)](),z['unknown']())[a159_0x4e4327(0x127)](),'activation_template_id':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'behavior':ActivationBehaviorDefSchema[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'run_after_journey_refresh':z[a159_0x4e4327(0x134)]()['optional'](),'nested_workflow_project_name':z[a159_0x4e4327(0x131)]()['optional'](),'nested_workflow_name':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'lock_enabled':z[a159_0x4e4327(0x134)]()[a159_0x4e4327(0x127)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a160_0x1450(){var _0x2264d8=['21YUYYwr','367475YwTqfG','207RQPqvX','11lAIUJB','1921494eHaTpC','1877814IMrgXr','8134xpOiFC','2672980jZQpBE','1506370ksVzfN','5818560UxhWom'];a160_0x1450=function(){return _0x2264d8;};return a160_0x1450();}function a160_0x345c(_0x29b1d2,_0x51c2a7){_0x29b1d2=_0x29b1d2-0x1aa;var _0x1450e4=a160_0x1450();var _0x345c85=_0x1450e4[_0x29b1d2];return _0x345c85;}(function(_0xbfee56,_0x17e682){var _0x38c7a7=a160_0x345c,_0x5b3f43=_0xbfee56();while(!![]){try{var _0x172c4a=parseInt(_0x38c7a7(0x1ad))/0x1*(-parseInt(_0x38c7a7(0x1b0))/0x2)+-parseInt(_0x38c7a7(0x1ae))/0x3+-parseInt(_0x38c7a7(0x1b1))/0x4+parseInt(_0x38c7a7(0x1ab))/0x5+-parseInt(_0x38c7a7(0x1af))/0x6*(parseInt(_0x38c7a7(0x1aa))/0x7)+-parseInt(_0x38c7a7(0x1b3))/0x8+parseInt(_0x38c7a7(0x1ac))/0x9*(parseInt(_0x38c7a7(0x1b2))/0xa);if(_0x172c4a===_0x17e682)break;else _0x5b3f43['push'](_0x5b3f43['shift']());}catch(_0x32d9c0){_0x5b3f43['push'](_0x5b3f43['shift']());}}}(a160_0x1450,0x7e927));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x52e1e0=a161_0x338b;(function(_0x36366a,_0x47c398){const _0x3b25f8=a161_0x338b,_0x195056=_0x36366a();while(!![]){try{const _0xb18952=-parseInt(_0x3b25f8(0x159))/0x1+parseInt(_0x3b25f8(0x142))/0x2+-parseInt(_0x3b25f8(0x15a))/0x3+-parseInt(_0x3b25f8(0x15d))/0x4+-parseInt(_0x3b25f8(0x137))/0x5*(-parseInt(_0x3b25f8(0x143))/0x6)+-parseInt(_0x3b25f8(0x14a))/0x7+parseInt(_0x3b25f8(0x155))/0x8;if(_0xb18952===_0x47c398)break;else _0x195056['push'](_0x195056['shift']());}catch(_0x5057e0){_0x195056['push'](_0x195056['shift']());}}}(a161_0x6300,0x19646));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x52e1e0(0x145)]([a161_0x52e1e0(0x13b),a161_0x52e1e0(0x14b),'launched']);export const ReentryModeTypeSchema=z[a161_0x52e1e0(0x145)]([a161_0x52e1e0(0x147),a161_0x52e1e0(0x14c),a161_0x52e1e0(0x14e)]);export const WaitUnitTypeSchema=z['enum']([a161_0x52e1e0(0x141),a161_0x52e1e0(0x14f)]);function a161_0x6300(){const _0x571ac1=['week','min','decision_point','record','jump','array','3091944GzYljL','journeys','ab_test','lazy','20803ZEveQl','468501pFIAgL','string','end','637704lZBmFd','415FMMDcU','stages','passthrough','activation','draft','literal','refine','discriminatedUnion','length','object','day','29906vMhjDa','7662LkXQSz','number','enum','optional','no_reentry','wait','boolean','469245ayOlvK','simulation','reentry_unless_goal_achieved','merge','reentry_always'];a161_0x6300=function(){return _0x571ac1;};return a161_0x6300();}export const StepTypeValueSchema=z[a161_0x52e1e0(0x145)]([a161_0x52e1e0(0x148),a161_0x52e1e0(0x13a),a161_0x52e1e0(0x151),a161_0x52e1e0(0x157),a161_0x52e1e0(0x14d),'jump',a161_0x52e1e0(0x15c)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'rule':RuleDefSchema});function a161_0x338b(_0x1a69af,_0x577a50){_0x1a69af=_0x1a69af-0x137;const _0x6300bd=a161_0x6300();let _0x338bfb=_0x6300bd[_0x1a69af];return _0x338bfb;}const JumpTargetDefSchema=z[a161_0x52e1e0(0x140)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z['string']()[a161_0x52e1e0(0x146)]()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x52e1e0(0x146)]()});const WaitConditionTimeoutDefSchema=z[a161_0x52e1e0(0x140)]({'duration':z[a161_0x52e1e0(0x144)](),'unit':WaitUnitTypeSchema,'next':z['string']()['optional']()}),WaitConditionDefSchema=z[a161_0x52e1e0(0x140)]({'segment':z[a161_0x52e1e0(0x15b)](),'next':z['string']()[a161_0x52e1e0(0x146)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x52e1e0(0x146)]()}),WaitStepParamsDefSchema=z[a161_0x52e1e0(0x140)]({'duration':z[a161_0x52e1e0(0x144)]()[a161_0x52e1e0(0x146)](),'unit':WaitUnitTypeSchema[a161_0x52e1e0(0x146)](),'wait_until':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'condition':WaitConditionDefSchema[a161_0x52e1e0(0x146)](),'days_of_week':z[a161_0x52e1e0(0x154)](z[a161_0x52e1e0(0x15b)]())[a161_0x52e1e0(0x146)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'next':z[a161_0x52e1e0(0x15b)]()['optional']()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x148)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x52e1e0(0x15b)]()}),ActivationStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x13a)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x52e1e0(0x140)]({'name':z['string'](),'segment':z['string']()['optional'](),'segment_id':z['string']()[a161_0x52e1e0(0x146)](),'excluded':z[a161_0x52e1e0(0x149)]()[a161_0x52e1e0(0x146)](),'next':z['string']()[a161_0x52e1e0(0x146)]()}),DecisionPointStepParamsDefSchema=z[a161_0x52e1e0(0x140)]({'branches':z[a161_0x52e1e0(0x154)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x52e1e0(0x151)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x52e1e0(0x140)]({'id':z[a161_0x52e1e0(0x15b)]()['optional'](),'name':z[a161_0x52e1e0(0x15b)](),'percentage':z[a161_0x52e1e0(0x144)](),'next':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x52e1e0(0x146)](),'customized_split':z['boolean']()[a161_0x52e1e0(0x146)]()}),AbTestStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x157)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x14d))}),JumpStepParamsDefSchema=z[a161_0x52e1e0(0x140)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z['literal'](a161_0x52e1e0(0x153)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x15c))})[a161_0x52e1e0(0x139)]();export const StepDefSchema=z[a161_0x52e1e0(0x13e)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x52e1e0(0x140)]({'name':z[a161_0x52e1e0(0x15b)](),'description':z['string']()[a161_0x52e1e0(0x146)](),'id':z[a161_0x52e1e0(0x15b)]()['optional'](),'entry_criteria':CriteriaDefSchema[a161_0x52e1e0(0x146)](),'exit_criteria':z[a161_0x52e1e0(0x154)](CriteriaDefSchema)[a161_0x52e1e0(0x146)](),'milestone':CriteriaDefSchema[a161_0x52e1e0(0x146)](),'root_step':z['string']()['optional'](),'steps':z[a161_0x52e1e0(0x154)](StepDefSchema)[a161_0x52e1e0(0x146)]()});export const JourneyEntryDefSchema=z[a161_0x52e1e0(0x140)]({'name':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'version':z[a161_0x52e1e0(0x15b)]()['optional'](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a161_0x52e1e0(0x149)]()[a161_0x52e1e0(0x146)](),'stages':z[a161_0x52e1e0(0x154)](StageDefSchema),'id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'version_number':z[a161_0x52e1e0(0x144)]()[a161_0x52e1e0(0x146)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a161_0x52e1e0(0x146)]()});export const JourneyDefSchema=z[a161_0x52e1e0(0x158)](()=>z[a161_0x52e1e0(0x140)]({'type':z[a161_0x52e1e0(0x13c)]('journey'),'name':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x150)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'bundle_id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'bundle_name':z['string']()['optional'](),'folder_id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'reentry':ReentryModeTypeSchema[a161_0x52e1e0(0x146)](),'allow_reentry':z[a161_0x52e1e0(0x149)]()[a161_0x52e1e0(0x146)](),'goal':CriteriaDefSchema[a161_0x52e1e0(0x146)](),'id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'version':z[a161_0x52e1e0(0x15b)]()['optional'](),'version_number':z['number']()[a161_0x52e1e0(0x146)](),'stages':z['array'](StageDefSchema)[a161_0x52e1e0(0x146)](),'versions':z[a161_0x52e1e0(0x154)](JourneyEntryDefSchema)[a161_0x52e1e0(0x146)](),'journeys':z[a161_0x52e1e0(0x154)](JourneyEntryDefSchema)[a161_0x52e1e0(0x146)](),'segments':z[a161_0x52e1e0(0x152)](z['string'](),EmbeddedSegmentDefSchema)[a161_0x52e1e0(0x146)](),'activations':z['record'](z[a161_0x52e1e0(0x15b)](),ActivationDefSchema)[a161_0x52e1e0(0x146)]()})[a161_0x52e1e0(0x13d)](_0x49425b=>{const _0x1f83fd=a161_0x52e1e0,_0x263d57=[_0x49425b[_0x1f83fd(0x156)],_0x49425b[_0x1f83fd(0x138)],_0x49425b['versions']]['filter'](_0x6f57f6=>Array['isArray'](_0x6f57f6)&&_0x6f57f6['length']>0x0)[_0x1f83fd(0x13f)];return _0x263d57===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x268a6b,_0x4a2727){var _0x33a594=a163_0x258c,_0x5b77c1=_0x268a6b();while(!![]){try{var _0x4d37e0=-parseInt(_0x33a594(0x192))/0x1*(-parseInt(_0x33a594(0x193))/0x2)+-parseInt(_0x33a594(0x18e))/0x3*(parseInt(_0x33a594(0x188))/0x4)+parseInt(_0x33a594(0x194))/0x5*(parseInt(_0x33a594(0x18d))/0x6)+-parseInt(_0x33a594(0x18a))/0x7*(-parseInt(_0x33a594(0x18f))/0x8)+-parseInt(_0x33a594(0x18b))/0x9*(parseInt(_0x33a594(0x18c))/0xa)+parseInt(_0x33a594(0x189))/0xb*(-parseInt(_0x33a594(0x190))/0xc)+parseInt(_0x33a594(0x191))/0xd;if(_0x4d37e0===_0x4a2727)break;else _0x5b77c1['push'](_0x5b77c1['shift']());}catch(_0x597be1){_0x5b77c1['push'](_0x5b77c1['shift']());}}}(a163_0x48af,0xd94de));function a163_0x258c(_0x4e3cbe,_0x82838e){_0x4e3cbe=_0x4e3cbe-0x188;var _0x48afc5=a163_0x48af();var _0x258cc2=_0x48afc5[_0x4e3cbe];return _0x258cc2;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0x48af(){var _0x519662=['1458017OnLqbb','35eVVKRb','9oBmnVP','135950CuAOMt','1014084jiOVNH','3oTpCXc','2044536kBiIMA','48iwcURn','7616388CCQhmP','1bqAWJJ','676108eInAEv','5ATZemL','3747672wApAot'];a163_0x48af=function(){return _0x519662;};return a163_0x48af();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a164_0x12d8ac=a164_0x16ed;(function(_0x1dd474,_0x5a64f7){const _0x2be308=a164_0x16ed,_0x47575f=_0x1dd474();while(!![]){try{const _0x345a5a=parseInt(_0x2be308(0x1d4))/0x1+-parseInt(_0x2be308(0x1dc))/0x2+parseInt(_0x2be308(0x1e0))/0x3*(-parseInt(_0x2be308(0x207))/0x4)+-parseInt(_0x2be308(0x209))/0x5+parseInt(_0x2be308(0x1e8))/0x6+-parseInt(_0x2be308(0x1fa))/0x7*(parseInt(_0x2be308(0x213))/0x8)+parseInt(_0x2be308(0x1e6))/0x9;if(_0x345a5a===_0x5a64f7)break;else _0x47575f['push'](_0x47575f['shift']());}catch(_0x419039){_0x47575f['push'](_0x47575f['shift']());}}}(a164_0x3ef0,0x7ee56));import{z}from'zod';function a164_0x16ed(_0x2493e0,_0x120bec){_0x2493e0=_0x2493e0-0x1d1;const _0x3ef014=a164_0x3ef0();let _0x16ed31=_0x3ef014[_0x2493e0];return _0x16ed31;}export const OperatorTypeSchema=z[a164_0x12d8ac(0x21c)](['Equal',a164_0x12d8ac(0x1df),a164_0x12d8ac(0x1f4),a164_0x12d8ac(0x1fc),a164_0x12d8ac(0x1e4),'In',a164_0x12d8ac(0x1ef),a164_0x12d8ac(0x1e9),'IsNull',a164_0x12d8ac(0x1da),'TimeWithinNext',a164_0x12d8ac(0x1f6),a164_0x12d8ac(0x204),'EndWith',a164_0x12d8ac(0x20d)]);export const TimeUnitSchema=z[a164_0x12d8ac(0x21c)](['second',a164_0x12d8ac(0x205),'hour','day',a164_0x12d8ac(0x1e5),a164_0x12d8ac(0x20f),a164_0x12d8ac(0x201)]);export const AggregationTypeSchema=z[a164_0x12d8ac(0x21c)](['Count',a164_0x12d8ac(0x202),'Average',a164_0x12d8ac(0x20b),a164_0x12d8ac(0x218),'CountDistinct','First',a164_0x12d8ac(0x1d8)]);const TemporalValueSchema=z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1fb)]({'timestamp':z[a164_0x12d8ac(0x1f8)]()}),z['object']({'last':z['union']([z['number'](),z[a164_0x12d8ac(0x1ec)](z['string'](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a164_0x12d8ac(0x1f8)](),z['number'](),z[a164_0x12d8ac(0x1d3)](),TemporalValueSchema,z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1e3)]([z['string'](),z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1d3)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x12d8ac(0x212),'Greater',a164_0x12d8ac(0x1fc),a164_0x12d8ac(0x1f4),a164_0x12d8ac(0x1e4),'In',a164_0x12d8ac(0x1f6),a164_0x12d8ac(0x204),a164_0x12d8ac(0x20a),'Regexp',a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5)]);export const OperatorDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':OperatorTypeSchema,'not':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'value':OperatorValueSchema[a164_0x12d8ac(0x1f2)](),'min':z['union']([z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1f8)](),TemporalValueSchema])[a164_0x12d8ac(0x1f2)](),'max':z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1db)](),z['string'](),TemporalValueSchema])[a164_0x12d8ac(0x1f2)](),'unit':TimeUnitSchema[a164_0x12d8ac(0x1f2)](),'duration':z[a164_0x12d8ac(0x1fb)]({'day':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'week':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'month':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'year':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'hour':z['number']()[a164_0x12d8ac(0x1f2)](),'minute':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'second':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x1f2)](),'from':z[a164_0x12d8ac(0x1fb)]({'last':z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1f8)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x20e)]((_0x18a1d0,_0x500a2e)=>{const _0x266feb=a164_0x12d8ac;OPERATORS_REQUIRING_VALUE['has'](_0x18a1d0[_0x266feb(0x1f9)])&&(_0x18a1d0[_0x266feb(0x1e2)]===undefined||_0x18a1d0[_0x266feb(0x1e2)]===null)&&_0x500a2e['addIssue']({'code':_0x266feb(0x206),'message':'Operator\x20\x27'+_0x18a1d0[_0x266feb(0x1f9)]+'\x27\x20requires\x20a\x20value','path':[_0x266feb(0x1e2)]}),_0x18a1d0[_0x266feb(0x1f9)]==='Between'&&_0x18a1d0['min']===undefined&&_0x18a1d0[_0x266feb(0x1d5)]===undefined&&_0x500a2e[_0x266feb(0x20c)]({'code':'custom','message':_0x266feb(0x1dd),'params':{'validationCode':_0x266feb(0x1fe)}}),OPERATORS_REQUIRING_UNIT['has'](_0x18a1d0['type'])&&_0x18a1d0[_0x266feb(0x1e2)]!==undefined&&!_0x18a1d0['unit']&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':'Operator\x20\x27'+_0x18a1d0[_0x266feb(0x1f9)]+_0x266feb(0x21b),'path':[_0x266feb(0x1d2)],'params':{'validationCode':_0x266feb(0x21e)}}),_0x18a1d0['type']===_0x266feb(0x20d)&&(!_0x18a1d0[_0x266feb(0x1f1)]&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':_0x266feb(0x211),'path':[_0x266feb(0x1f1)]}),!_0x18a1d0[_0x266feb(0x1e7)]&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x266feb(0x1e7)]}));});export const ArrayMatchingSchema=z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1f3)),z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1eb)),z[a164_0x12d8ac(0x1fb)]({'atLeast':z[a164_0x12d8ac(0x1db)]()}),z['object']({'atMost':z['number']()}),z['object']({'exactly':z[a164_0x12d8ac(0x1db)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x12d8ac(0x1f9),[z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['Sum',a164_0x12d8ac(0x20b),a164_0x12d8ac(0x218),a164_0x12d8ac(0x1ff)]),'column':z[a164_0x12d8ac(0x1f8)](),'groupingColumns':z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1f8)]())[a164_0x12d8ac(0x1f2)]()}),z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x214)),'groupingColumns':z[a164_0x12d8ac(0x1fd)](z['string']())[a164_0x12d8ac(0x1f2)]()}),z['object']({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x210)),'columns':z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1f8)]())}),z[a164_0x12d8ac(0x1fb)]({'type':z['enum']([a164_0x12d8ac(0x1ed),a164_0x12d8ac(0x1d8)]),'column':z[a164_0x12d8ac(0x1f8)](),'orderColumn':z['string'](),'groupingColumns':z['array'](z[a164_0x12d8ac(0x1f8)]())[a164_0x12d8ac(0x1f2)]()})]);export const TimeWindowDefSchema=z[a164_0x12d8ac(0x1fb)]({'duration':z[a164_0x12d8ac(0x1db)](),'unit':TimeUnitSchema});function a164_0x3ef0(){const _0x370989=['addIssue','TimeRange','superRefine','month','CountDistinct','TimeRange\x20operator\x20requires\x20\x27duration\x27','Equal','5015432pXVYpZ','Count','Value','batch','exclude','Max','Behavior','column','\x27\x20requires\x20a\x20time\x20unit','enum','Column','MISSING_TIME_UNIT','min','unit','boolean','77198aRHZjH','max','And','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Last','literal','TimeWithinPast','number','1658200utcBeh','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Greater','1173261BxRmlu','Segment\x20reference\x20must\x20not\x20be\x20empty','value','union','LessEqual','week','25901127lJTgaa','from','1448592cPeYWJ','Regexp','has','all','record','First','operator','Between','timestamp','duration','optional','any','Less','TimeWithinNext','Contain','realtime','string','type','7ihACbo','object','GreaterEqual','array','MISSING_BETWEEN_BOUNDS','Average','segment','year','Sum','Segment\x20name\x20is\x20required','StartWith','minute','custom','4yZgZLt','lazy','4148255MqBAgM','EndWith','Min'];a164_0x3ef0=function(){return _0x370989;};return a164_0x3ef0();}const TIMESTAMP_OPERATORS=new Set([a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5),'TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x12d8ac(0x1d9)]('Column'),'column':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x20e)]((_0x13eae1,_0x58d670)=>{const _0x8a011=a164_0x12d8ac,_0x170d74=_0x13eae1[_0x8a011(0x1ee)][_0x8a011(0x1f9)];_0x13eae1[_0x8a011(0x21a)]===_0x8a011(0x1f0)?!TIMESTAMP_OPERATORS[_0x8a011(0x1ea)](_0x170d74)&&_0x58d670[_0x8a011(0x20c)]({'code':'custom','message':_0x8a011(0x1d7)+_0x170d74+'\x27)','path':['operator',_0x8a011(0x1f9)]}):TIMESTAMP_OPERATORS['has'](_0x170d74)&&_0x58d670[_0x8a011(0x20c)]({'code':_0x8a011(0x206),'message':'Operator\x20\x27'+_0x170d74+_0x8a011(0x1de),'path':[_0x8a011(0x1ee),_0x8a011(0x1f9)]});});export const FilterRuleDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1d6)),'conditions':z[a164_0x12d8ac(0x1fd)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z['object']({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x215)),'attribute':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'aggregation':AggregationDefSchema[a164_0x12d8ac(0x1f2)](),'source':z['string']()[a164_0x12d8ac(0x1f2)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()}));export const BehaviorConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x219)),'attribute':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'aggregation':AggregationDefSchema[a164_0x12d8ac(0x1f2)](),'source':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'filter':FilterRuleDefSchema[a164_0x12d8ac(0x1f2)](),'timeWindow':TimeWindowDefSchema[a164_0x12d8ac(0x1f2)](),'limit':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()}));export const ColumnConditionDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z['literal'](a164_0x12d8ac(0x21d)),'column':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x12d8ac(0x1f2)]()}));export const SegmentRefConditionDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['include',a164_0x12d8ac(0x217)]),'segment':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1d1)](0x1,a164_0x12d8ac(0x1e1))});export const ConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1e3)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)]([a164_0x12d8ac(0x1d6),'Or']),'conditions':z[a164_0x12d8ac(0x1fd)](ConditionDefSchema),'description':z['string']()[a164_0x12d8ac(0x1f2)]()}));export const SegmentDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x200))[a164_0x12d8ac(0x1f2)](),'name':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1d1)](0x1,a164_0x12d8ac(0x203)),'description':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'folder':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x12d8ac(0x21c)]([a164_0x12d8ac(0x216),a164_0x12d8ac(0x1f7),'funnel_stage'])['optional'](),'visible':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'activations':z[a164_0x12d8ac(0x1fd)](z['any']())[a164_0x12d8ac(0x1f2)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x275ec1=a164_0x3820;(function(_0x31585b,_0x247b3e){const _0x20e138=a164_0x3820,_0x5e964c=_0x31585b();while(!![]){try{const _0x5b4483=parseInt(_0x20e138(0x14b))/0x1+parseInt(_0x20e138(0x17e))/0x2*(parseInt(_0x20e138(0x194))/0x3)+-parseInt(_0x20e138(0x18b))/0x4*(parseInt(_0x20e138(0x14f))/0x5)+-parseInt(_0x20e138(0x15e))/0x6+-parseInt(_0x20e138(0x154))/0x7*(-parseInt(_0x20e138(0x173))/0x8)+parseInt(_0x20e138(0x191))/0x9*(parseInt(_0x20e138(0x14a))/0xa)+parseInt(_0x20e138(0x16c))/0xb;if(_0x5b4483===_0x247b3e)break;else _0x5e964c['push'](_0x5e964c['shift']());}catch(_0x130d4f){_0x5e964c['push'](_0x5e964c['shift']());}}}(a164_0x50b1,0xca28e));function a164_0x3820(_0x5ad92f,_0x3afff1){_0x5ad92f=_0x5ad92f-0x146;const _0x50b105=a164_0x50b1();let _0x382072=_0x50b105[_0x5ad92f];return _0x382072;}import{z}from'zod';export const OperatorTypeSchema=z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x181),'Greater','Less',a164_0x275ec1(0x193),a164_0x275ec1(0x189),'In',a164_0x275ec1(0x186),a164_0x275ec1(0x16a),'IsNull',a164_0x275ec1(0x162),a164_0x275ec1(0x18c),a164_0x275ec1(0x170),a164_0x275ec1(0x171),a164_0x275ec1(0x172),a164_0x275ec1(0x17c)]);export const TimeUnitSchema=z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x190),a164_0x275ec1(0x147),a164_0x275ec1(0x15a),a164_0x275ec1(0x167),a164_0x275ec1(0x174),'month',a164_0x275ec1(0x16b)]);export const AggregationTypeSchema=z[a164_0x275ec1(0x168)](['Count',a164_0x275ec1(0x15b),a164_0x275ec1(0x15c),a164_0x275ec1(0x176),'Max',a164_0x275ec1(0x183),'First',a164_0x275ec1(0x14e)]);const TemporalValueSchema=z[a164_0x275ec1(0x18a)]([z['object']({'timestamp':z[a164_0x275ec1(0x14c)]()}),z[a164_0x275ec1(0x161)]({'last':z[a164_0x275ec1(0x18a)]([z['number'](),z[a164_0x275ec1(0x16e)](z['string'](),z['number']())]),'unit':z[a164_0x275ec1(0x14c)]()})]),OperatorValueSchema=z[a164_0x275ec1(0x18a)]([z['string'](),z['number'](),z[a164_0x275ec1(0x18d)](),TemporalValueSchema,z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x14c)](),z[a164_0x275ec1(0x18e)](),z[a164_0x275ec1(0x18d)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x275ec1(0x181),a164_0x275ec1(0x187),a164_0x275ec1(0x193),a164_0x275ec1(0x175),a164_0x275ec1(0x189),'In','Contain',a164_0x275ec1(0x171),'EndWith',a164_0x275ec1(0x16a),a164_0x275ec1(0x162),a164_0x275ec1(0x18c)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x275ec1(0x162),a164_0x275ec1(0x18c)]);export const OperatorDefSchema=z[a164_0x275ec1(0x161)]({'type':OperatorTypeSchema,'not':z[a164_0x275ec1(0x18d)]()[a164_0x275ec1(0x185)](),'value':OperatorValueSchema[a164_0x275ec1(0x185)](),'min':z[a164_0x275ec1(0x18a)]([z['number'](),z[a164_0x275ec1(0x14c)](),TemporalValueSchema])[a164_0x275ec1(0x185)](),'max':z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x18e)](),z[a164_0x275ec1(0x14c)](),TemporalValueSchema])[a164_0x275ec1(0x185)](),'unit':TimeUnitSchema[a164_0x275ec1(0x185)](),'duration':z[a164_0x275ec1(0x161)]({'day':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)](),'week':z[a164_0x275ec1(0x18e)]()['optional'](),'month':z[a164_0x275ec1(0x18e)]()['optional'](),'year':z['number']()[a164_0x275ec1(0x185)](),'hour':z[a164_0x275ec1(0x18e)]()['optional'](),'minute':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)](),'second':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)]()})[a164_0x275ec1(0x185)](),'from':z['object']({'last':z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x18e)](),z[a164_0x275ec1(0x14c)]()]),'unit':TimeUnitSchema})[a164_0x275ec1(0x185)](),'reverse':z[a164_0x275ec1(0x18d)]()[a164_0x275ec1(0x185)]()})[a164_0x275ec1(0x182)]((_0x15cf46,_0x1d1e46)=>{const _0x1466b4=a164_0x275ec1;OPERATORS_REQUIRING_VALUE[_0x1466b4(0x150)](_0x15cf46[_0x1466b4(0x18f)])&&(_0x15cf46['value']===undefined||_0x15cf46[_0x1466b4(0x149)]===null)&&_0x1d1e46[_0x1466b4(0x16f)]({'code':'custom','message':'Operator\x20\x27'+_0x15cf46['type']+_0x1466b4(0x15d),'path':['value']}),_0x15cf46[_0x1466b4(0x18f)]===_0x1466b4(0x186)&&_0x15cf46['min']===undefined&&_0x15cf46['max']===undefined&&_0x1d1e46[_0x1466b4(0x16f)]({'code':'custom','message':_0x1466b4(0x178),'params':{'validationCode':_0x1466b4(0x164)}}),OPERATORS_REQUIRING_UNIT['has'](_0x15cf46[_0x1466b4(0x18f)])&&_0x15cf46[_0x1466b4(0x149)]!==undefined&&!_0x15cf46[_0x1466b4(0x169)]&&_0x1d1e46[_0x1466b4(0x16f)]({'code':_0x1466b4(0x151),'message':_0x1466b4(0x192)+_0x15cf46['type']+_0x1466b4(0x15f),'path':['unit'],'params':{'validationCode':_0x1466b4(0x160)}}),_0x15cf46['type']===_0x1466b4(0x17c)&&(!_0x15cf46[_0x1466b4(0x188)]&&_0x1d1e46[_0x1466b4(0x16f)]({'code':_0x1466b4(0x151),'message':_0x1466b4(0x166),'path':['duration']}),!_0x15cf46[_0x1466b4(0x17d)]&&_0x1d1e46['addIssue']({'code':_0x1466b4(0x151),'message':_0x1466b4(0x16d),'path':['from']}));});export const ArrayMatchingSchema=z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x157)]('any'),z['literal'](a164_0x275ec1(0x17b)),z[a164_0x275ec1(0x161)]({'atLeast':z[a164_0x275ec1(0x18e)]()}),z[a164_0x275ec1(0x161)]({'atMost':z[a164_0x275ec1(0x18e)]()}),z['object']({'exactly':z[a164_0x275ec1(0x18e)]()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z['object']({'type':z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x15b),a164_0x275ec1(0x176),a164_0x275ec1(0x163),a164_0x275ec1(0x15c)]),'column':z[a164_0x275ec1(0x14c)](),'groupingColumns':z['array'](z[a164_0x275ec1(0x14c)]())[a164_0x275ec1(0x185)]()}),z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x156)),'groupingColumns':z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x14c)]())[a164_0x275ec1(0x185)]()}),z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)]('CountDistinct'),'columns':z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x14c)]())}),z[a164_0x275ec1(0x161)]({'type':z['enum']([a164_0x275ec1(0x159),a164_0x275ec1(0x14e)]),'column':z['string'](),'orderColumn':z[a164_0x275ec1(0x14c)](),'groupingColumns':z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x14c)]())[a164_0x275ec1(0x185)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a164_0x275ec1(0x18e)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x275ec1(0x162),'TimeWithinNext',a164_0x275ec1(0x17c)]);export const FilterColumnConditionDefSchema=z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x177)),'column':z[a164_0x275ec1(0x14c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x275ec1(0x185)]()})[a164_0x275ec1(0x182)]((_0x1634e8,_0x1ca073)=>{const _0x2e9922=a164_0x275ec1,_0x3abe99=_0x1634e8['operator'][_0x2e9922(0x18f)];_0x1634e8[_0x2e9922(0x153)]===_0x2e9922(0x152)?!TIMESTAMP_OPERATORS[_0x2e9922(0x150)](_0x3abe99)&&_0x1ca073['addIssue']({'code':_0x2e9922(0x151),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x3abe99+'\x27)','path':[_0x2e9922(0x180),_0x2e9922(0x18f)]}):TIMESTAMP_OPERATORS[_0x2e9922(0x150)](_0x3abe99)&&_0x1ca073['addIssue']({'code':_0x2e9922(0x151),'message':'Operator\x20\x27'+_0x3abe99+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x2e9922(0x180),'type']});});export const FilterRuleDefSchema=z[a164_0x275ec1(0x161)]({'type':z['literal']('And'),'conditions':z[a164_0x275ec1(0x17f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x275ec1(0x148)](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x17a)),'attribute':z[a164_0x275ec1(0x14c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a164_0x275ec1(0x185)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()[a164_0x275ec1(0x185)](),'filter':FilterRuleDefSchema[a164_0x275ec1(0x185)](),'limit':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x179)),'attribute':z[a164_0x275ec1(0x14c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x275ec1(0x185)](),'exclude':z['boolean']()[a164_0x275ec1(0x185)](),'aggregation':AggregationDefSchema[a164_0x275ec1(0x185)](),'source':z[a164_0x275ec1(0x14c)]()[a164_0x275ec1(0x185)](),'filter':FilterRuleDefSchema[a164_0x275ec1(0x185)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a164_0x275ec1(0x185)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x177)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x275ec1(0x148)](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x168)](['And','Or']),'conditions':z[a164_0x275ec1(0x17f)](ConditionDefSchema),'description':z[a164_0x275ec1(0x14c)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a164_0x275ec1(0x161)]({'type':z['enum']([a164_0x275ec1(0x184),'exclude']),'segment':z['string']()[a164_0x275ec1(0x14d)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x275ec1(0x18a)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x275ec1(0x148)](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x195),'Or']),'conditions':z[a164_0x275ec1(0x17f)](ConditionDefSchema),'description':z['string']()[a164_0x275ec1(0x185)]()}));export const SegmentDefSchema=z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x146))[a164_0x275ec1(0x185)](),'name':z[a164_0x275ec1(0x14c)]()[a164_0x275ec1(0x14d)](0x1,a164_0x275ec1(0x155)),'description':z['string']()[a164_0x275ec1(0x185)](),'folder':z[a164_0x275ec1(0x14c)]()[a164_0x275ec1(0x185)](),'rule':RuleDefSchema[a164_0x275ec1(0x185)](),'kind':z['enum'](['batch','realtime',a164_0x275ec1(0x165)])[a164_0x275ec1(0x185)](),'visible':z['boolean']()['optional'](),'activations':z['array'](z[a164_0x275ec1(0x158)]())[a164_0x275ec1(0x185)]()});const _syncCheck1=!![],_syncCheck2=!![];function a164_0x50b1(){const _0xa3cd8a=['number','type','second','4113Bxekqf','Operator\x20\x27','GreaterEqual','72711YtUqzk','And','segment','minute','lazy','value','2200vQOnHi','201649WkzOsJ','string','min','Last','35yXOBYL','has','custom','timestamp','column','165431LQBpdb','Segment\x20name\x20is\x20required','Count','literal','any','First','hour','Sum','Average','\x27\x20requires\x20a\x20value','3418392UxkexZ','\x27\x20requires\x20a\x20time\x20unit','MISSING_TIME_UNIT','object','TimeWithinPast','Max','MISSING_BETWEEN_BOUNDS','funnel_stage','TimeRange\x20operator\x20requires\x20\x27duration\x27','day','enum','unit','Regexp','year','2984432tYoPCr','TimeRange\x20operator\x20requires\x20\x27from\x27','record','addIssue','Contain','StartWith','EndWith','8RsCpXb','week','Less','Min','Column','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Behavior','Value','all','TimeRange','from','106hKykjE','array','operator','Equal','superRefine','CountDistinct','include','optional','Between','Greater','duration','LessEqual','union','276524DaiAhg','TimeWithinNext','boolean'];a164_0x50b1=function(){return _0xa3cd8a;};return a164_0x50b1();}void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x5b0efd=a165_0x924c;(function(_0x54396c,_0x3cdd02){const _0x4e2f06=a165_0x924c,_0xec2f2f=_0x54396c();while(!![]){try{const _0x569475=parseInt(_0x4e2f06(0x144))/0x1*(parseInt(_0x4e2f06(0x156))/0x2)+parseInt(_0x4e2f06(0x154))/0x3*(parseInt(_0x4e2f06(0x146))/0x4)+parseInt(_0x4e2f06(0x139))/0x5+-parseInt(_0x4e2f06(0x14d))/0x6+-parseInt(_0x4e2f06(0x141))/0x7+-parseInt(_0x4e2f06(0x14e))/0x8*(-parseInt(_0x4e2f06(0x155))/0x9)+parseInt(_0x4e2f06(0x151))/0xa*(parseInt(_0x4e2f06(0x13f))/0xb);if(_0x569475===_0x3cdd02)break;else _0xec2f2f['push'](_0xec2f2f['shift']());}catch(_0x3934d6){_0xec2f2f['push'](_0xec2f2f['shift']());}}}(a165_0x39cc,0xd1fb1));import{readFileSync}from'fs';import*as a165_0x3b4f46 from'path';import*as a165_0x302dab 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_0x5b0efd(0x153),a165_0x5b0efd(0x13e)]);export function isJourneyDef(_0x1445d1){const _0x5086d2=a165_0x5b0efd;return typeof _0x1445d1===_0x5086d2(0x143)&&_0x1445d1!==null&&_0x5086d2(0x138)in _0x1445d1&&_0x1445d1[_0x5086d2(0x138)]===_0x5086d2(0x13c);}function a165_0x39cc(){const _0x12d3ba=['segment','933610jaKDMa','basename','email','3DNsFgH','72ZSduZt','222790lnqzAd','length','map','warnings','type','420505phIRXj','campaign','YAML_PARSE_ERROR','journey','parseDocument','push','11yjKRFS','skipped','7499800YVdqaH','error','object','1arWLYw','result','4840904HcGNeB','campaign_type','filterType','toJSON','template','not\x20a\x20','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','7128876HjrNcD','1620544VQSarP','relative'];a165_0x39cc=function(){return _0x12d3ba;};return a165_0x39cc();}export function isCampaignDef(_0x276bee){const _0x4a79cf=a165_0x5b0efd;if(typeof _0x276bee!==_0x4a79cf(0x143)||_0x276bee===null)return![];const _0xa02a87=_0x276bee,_0x148d7d=VALID_CAMPAIGN_TYPES['has'](_0xa02a87[_0x4a79cf(0x147)]);if(_0xa02a87[_0x4a79cf(0x138)]===_0x4a79cf(0x13a)&&_0x148d7d)return!![];if(_0x148d7d&&!_0xa02a87[_0x4a79cf(0x138)])return!![];return![];}export function isTemplateDef(_0x32efdc){const _0x165a9c=a165_0x5b0efd;return typeof _0x32efdc===_0x165a9c(0x143)&&_0x32efdc!==null&&'type'in _0x32efdc&&_0x32efdc[_0x165a9c(0x138)]==='template';}export function isValidationResult(_0x4ffb83){const _0x5ecb95=a165_0x5b0efd;return!(_0x5ecb95(0x140)in _0x4ffb83);}function a165_0x924c(_0x5c54d4,_0x1efedd){_0x5c54d4=_0x5c54d4-0x135;const _0x39ccb7=a165_0x39cc();let _0x924c3b=_0x39ccb7[_0x5c54d4];return _0x924c3b;}export function createParseErrorResult(_0x18449e,_0x131bbf,_0x4d8d27,_0x46b5e4,_0x34bcef='segment'){const _0x3b283d=a165_0x5b0efd;return{'filePath':_0x18449e,'relativePath':_0x131bbf,'source':_0x4d8d27,'result':{'valid':![],'errors':[{'level':_0x3b283d(0x142),'path':'','code':_0x3b283d(0x13b),'message':_0x46b5e4}],'warnings':[]},'fileType':_0x34bcef};}export function validateYamlFile(_0x489297,_0x5c847a,_0x34af19={}){const _0x22532d=a165_0x5b0efd,_0x3847a7=a165_0x3b4f46[_0x22532d(0x14f)](_0x5c847a,_0x489297)||a165_0x3b4f46[_0x22532d(0x152)](_0x489297);try{const _0x447003=readFileSync(_0x489297,'utf-8'),_0x348c13=a165_0x302dab[_0x22532d(0x13d)](_0x447003),_0x2406af=_0x348c13[_0x22532d(0x149)]();if(!_0x2406af)return createParseErrorResult(_0x489297,_0x3847a7,_0x447003,_0x22532d(0x14c));let _0x3828b5;if(isJourneyDef(_0x2406af))_0x3828b5=_0x22532d(0x13c);else{if(isCampaignDef(_0x2406af))_0x3828b5=_0x22532d(0x13a);else isTemplateDef(_0x2406af)?_0x3828b5=_0x22532d(0x14a):_0x3828b5=_0x22532d(0x150);}if(_0x34af19[_0x22532d(0x148)]&&_0x3828b5!==_0x34af19[_0x22532d(0x148)])return{'filePath':_0x489297,'relativePath':_0x3847a7,'skipped':!![],'reason':_0x22532d(0x14b)+_0x34af19['filterType']};const _0x6cce0a={'source':_0x447003,'document':_0x348c13};let _0x67a963;if(_0x3828b5==='journey')_0x67a963=validateJourneyDef(_0x2406af,_0x6cce0a);else{if(_0x3828b5===_0x22532d(0x13a))_0x67a963=validateCampaignDef(_0x2406af,_0x6cce0a);else _0x3828b5==='template'?_0x67a963=validateTemplateDef(_0x2406af,_0x6cce0a):_0x67a963=validateSegmentDef(_0x2406af,_0x6cce0a);}return{'filePath':_0x489297,'relativePath':_0x3847a7,'source':_0x447003,'result':_0x67a963,'fileType':_0x3828b5};}catch(_0x5da776){const _0x5c3fbd=_0x5da776 instanceof Error?_0x5da776['message']:String(_0x5da776);return createParseErrorResult(_0x489297,_0x3847a7,'','YAML\x20parse\x20error:\x20'+_0x5c3fbd);}}export function validateYamlFiles(_0x3bef2f,_0x3000b5,_0x49e2c0={}){const _0x27c0cc=a165_0x5b0efd;return _0x3bef2f[_0x27c0cc(0x136)](_0x522427=>validateYamlFile(_0x522427,_0x3000b5,_0x49e2c0));}export function calculateSummary(_0x3707aa){const _0x19a3fd=a165_0x5b0efd;let _0x292cd4=0x0,_0x14772f=0x0,_0x4503ed=0x0,_0x138f88=0x0;for(const _0x13da27 of _0x3707aa){if(!isValidationResult(_0x13da27)){_0x138f88++;continue;}_0x13da27[_0x19a3fd(0x145)]['valid']?_0x292cd4++:_0x14772f++,_0x4503ed+=_0x13da27[_0x19a3fd(0x145)][_0x19a3fd(0x137)][_0x19a3fd(0x135)];}return{'validCount':_0x292cd4,'invalidCount':_0x14772f,'warningCount':_0x4503ed,'skippedCount':_0x138f88,'hasErrors':_0x14772f>0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ab03f,_0x166355){const _0x485fd2=a166_0x243c,_0x41123c=_0x3ab03f();while(!![]){try{const _0x5c67ef=-parseInt(_0x485fd2(0xb2))/0x1*(-parseInt(_0x485fd2(0xa9))/0x2)+-parseInt(_0x485fd2(0xa5))/0x3*(-parseInt(_0x485fd2(0x8a))/0x4)+-parseInt(_0x485fd2(0x8b))/0x5+parseInt(_0x485fd2(0x9d))/0x6*(parseInt(_0x485fd2(0xb6))/0x7)+-parseInt(_0x485fd2(0x89))/0x8*(parseInt(_0x485fd2(0x9f))/0x9)+-parseInt(_0x485fd2(0xac))/0xa+-parseInt(_0x485fd2(0x92))/0xb*(-parseInt(_0x485fd2(0x9b))/0xc);if(_0x5c67ef===_0x166355)break;else _0x41123c['push'](_0x41123c['shift']());}catch(_0x2214d6){_0x41123c['push'](_0x41123c['shift']());}}}(a166_0x859c,0xe835b));import*as a166_0x4c5801 from'yaml';import a166_0x2d312d from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x45b304,_0x55b6d2,_0x1e14cf){const _0x58de39=a166_0x243c;if(!_0x45b304||!_0x55b6d2)return undefined;try{let _0xe51bfd=_0x45b304[_0x58de39(0xb5)](_0x1e14cf,!![]),_0x46b6b0=[..._0x1e14cf];while((!_0xe51bfd||typeof _0xe51bfd!=='object'||!('range'in _0xe51bfd)||!_0xe51bfd[_0x58de39(0xa0)])&&_0x46b6b0[_0x58de39(0xa2)]>0x0){_0x46b6b0['pop'](),_0xe51bfd=_0x46b6b0[_0x58de39(0xa2)]>0x0?_0x45b304[_0x58de39(0xb5)](_0x46b6b0,!![]):_0x45b304['contents'];}if(!_0xe51bfd||typeof _0xe51bfd!==_0x58de39(0xa4)||!(_0x58de39(0xa0)in _0xe51bfd)||!_0xe51bfd[_0x58de39(0xa0)])return undefined;const [_0x10ae54]=_0xe51bfd['range'];return offsetToLocation(_0x55b6d2,_0x10ae54);}catch{return undefined;}}export function offsetToLocation(_0x1a02d0,_0x3f8002){let _0x42910f=0x1,_0x220986=0x1;for(let _0x7bace5=0x0;_0x7bace5<_0x3f8002&&_0x7bace5<_0x1a02d0['length'];_0x7bace5++){_0x1a02d0[_0x7bace5]==='\x0a'?(_0x42910f++,_0x220986=0x1):_0x220986++;}return{'line':_0x42910f,'column':_0x220986,'offset':_0x3f8002};}export function pathToArray(_0x277fe0){const _0x43326e=a166_0x243c;if(!_0x277fe0)return[];return _0x277fe0['split']('.')[_0x43326e(0x95)](_0x43cc2e=>{const _0x33e15a=_0x43cc2e['match'](/^(\w+)\[(\d+)\]$/);if(_0x33e15a)return[_0x33e15a[0x1],parseInt(_0x33e15a[0x2],0xa)];return[_0x43cc2e];});}function a166_0x243c(_0x40d566,_0x79f8e1){_0x40d566=_0x40d566-0x88;const _0x859c4f=a166_0x859c();let _0x243c97=_0x859c4f[_0x40d566];return _0x243c97;}export function formatZodPath(_0x1477ff){const _0x269d42=a166_0x243c;let _0x4aab9e='';for(const _0x3d0939 of _0x1477ff){if(typeof _0x3d0939===_0x269d42(0x8e))_0x4aab9e+='['+_0x3d0939+']';else{const _0x61e3a4=String(_0x3d0939);_0x4aab9e+=_0x4aab9e?'.'+_0x61e3a4:_0x61e3a4;}}return _0x4aab9e;}function a166_0x859c(){const _0x5a22c6=['flatMap','YAML\x20validation\x20error\x20at\x20\x27','map','invalid_union','join','Invalid\x20YAML:\x20expected\x20an\x20object','12sTsTrE','\x20|\x20','283026MkFdDp','dim','118260QIoXSF','range','padStart','length','code','object','3mNrLaX','data','warnings','safeParse','2674ICYoMn','YAML\x20validation\x20error:\x20','issues','15052350JGGXsB','yellow','errors','level','red','push','901dzYtID','error','path','getIn','217tyiWJr','min','720qGTiLQ','3649148fTwzta','2469290pMAyCs','max','success','number','cyan','location','message','6089589xhulyW','split','\x27:\x20'];a166_0x859c=function(){return _0x5a22c6;};return a166_0x859c();}export function flattenZodIssues(_0x5e8084){const _0xad6843=a166_0x243c,_0x37718d=[];for(const _0x32d482 of _0x5e8084){if(_0x32d482[_0xad6843(0xa3)]===_0xad6843(0x98)&&'errors'in _0x32d482){const _0x47dee8=_0x32d482[_0xad6843(0xae)];let _0x534862=_0x47dee8[0x0]||[];for(const _0x36c319 of _0x47dee8){_0x36c319[_0xad6843(0xa2)]<_0x534862[_0xad6843(0xa2)]&&(_0x534862=_0x36c319);}const _0x48852c=_0x534862[_0xad6843(0x97)](_0x102bdc=>({..._0x102bdc,'path':[..._0x32d482[_0xad6843(0xb4)],..._0x102bdc[_0xad6843(0xb4)]]}));_0x37718d[_0xad6843(0xb1)](...flattenZodIssues(_0x48852c));}else _0x37718d['push'](_0x32d482);}return _0x37718d;}export function safeParseYaml(_0x57be16,_0x3a6774){const _0x4a38ac=a166_0x243c,_0xb0bbca=a166_0x4c5801['parse'](_0x57be16);if(!_0xb0bbca||typeof _0xb0bbca!==_0x4a38ac(0xa4))throw new Error(_0x4a38ac(0x9a));const _0x486df5=_0x3a6774[_0x4a38ac(0xa8)](_0xb0bbca);if(!_0x486df5[_0x4a38ac(0x8d)]){const _0x2cfa90=_0x486df5['error'][_0x4a38ac(0xab)][0x0],_0x2a3417=formatZodPath(_0x2cfa90[_0x4a38ac(0xb4)]);throw new Error(_0x2a3417?_0x4a38ac(0x96)+_0x2a3417+_0x4a38ac(0x94)+_0x2cfa90['message']:_0x4a38ac(0xaa)+_0x2cfa90[_0x4a38ac(0x91)]);}return _0x486df5[_0x4a38ac(0xa6)];}export function formatIssueWithContext(_0xc7acc5,_0x3efd33,_0x42ac23){const _0x4700be=a166_0x243c,_0x1db31c=[],_0x390af9=_0xc7acc5['level']===_0x4700be(0xb3),_0x4de3f7=_0x390af9?a166_0x2d312d[_0x4700be(0xb0)]:a166_0x2d312d[_0x4700be(0xad)],_0x1b452b=_0x390af9?a166_0x2d312d[_0x4700be(0xb0)]:a166_0x2d312d['yellow'],_0x3e11b9=_0x42ac23?a166_0x2d312d[_0x4700be(0x8f)](_0x42ac23+':'):'';if(_0xc7acc5[_0x4700be(0x90)]){const _0x2531e8=a166_0x2d312d[_0x4700be(0x8f)](_0xc7acc5['location']['line']+':'+_0xc7acc5[_0x4700be(0x90)]['column']);_0x1db31c[_0x4700be(0xb1)](''+_0x3e11b9+_0x2531e8+':\x20'+_0x4de3f7(_0xc7acc5[_0x4700be(0xaf)])+'\x20'+_0x1b452b('['+_0xc7acc5['code']+']'));}else _0x1db31c['push'](''+_0x3e11b9+a166_0x2d312d[_0x4700be(0x9e)](_0xc7acc5[_0x4700be(0xb4)])+':\x20'+_0x4de3f7(_0xc7acc5[_0x4700be(0xaf)])+'\x20'+_0x1b452b('['+_0xc7acc5['code']+']'));_0x1db31c[_0x4700be(0xb1)](_0xc7acc5[_0x4700be(0x91)]);if(_0xc7acc5[_0x4700be(0x90)]&&_0x3efd33){const _0x1838e9=_0x3efd33[_0x4700be(0x93)]('\x0a'),{line:_0x2abdee,column:_0x66adc6}=_0xc7acc5[_0x4700be(0x90)],_0x363349=Math[_0x4700be(0x8c)](0x1,_0x2abdee-0x1),_0xfaefd5=Math[_0x4700be(0x88)](_0x1838e9[_0x4700be(0xa2)],_0x2abdee+0x1);_0x1db31c[_0x4700be(0xb1)]('');for(let _0xf21698=_0x363349;_0xf21698<=_0xfaefd5;_0xf21698++){const _0xd42ae3=_0x1838e9[_0xf21698-0x1]||'',_0x550843=a166_0x2d312d[_0x4700be(0x9e)](_0xf21698['toString']()[_0x4700be(0xa1)](0x4)),_0x4f2f8f=a166_0x2d312d[_0x4700be(0x9e)](_0x4700be(0x9c));if(_0xf21698===_0x2abdee){_0x1db31c[_0x4700be(0xb1)]('\x20\x20'+_0x550843+_0x4f2f8f+_0x4de3f7(_0xd42ae3));const _0x14b68f='\x20'['repeat'](0x4+0x3+_0x66adc6-0x1);_0x1db31c['push']('\x20\x20'+_0x14b68f+_0x4de3f7('^'));}else _0x1db31c[_0x4700be(0xb1)]('\x20\x20'+_0x550843+_0x4f2f8f+a166_0x2d312d['dim'](_0xd42ae3));}}return _0x1db31c[_0x4700be(0x99)]('\x0a');}export function formatValidationResult(_0x464d2c,_0x21ee1b,_0x277fb8){const _0x4b84f7=a166_0x243c,_0x215871=[];for(const _0x37e246 of _0x464d2c[_0x4b84f7(0xae)]){_0x215871['push'](formatIssueWithContext(_0x37e246,_0x21ee1b,_0x277fb8)),_0x215871[_0x4b84f7(0xb1)]('');}for(const _0x20803e of _0x464d2c[_0x4b84f7(0xa7)]){_0x215871['push'](formatIssueWithContext(_0x20803e,_0x21ee1b,_0x277fb8)),_0x215871[_0x4b84f7(0xb1)]('');}return _0x215871['join']('\x0a');}
|