@treasuredata/tdx 2026.4.17 → 2026.4.18
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/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/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 +17 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a153_0x4b01(_0x352cbd,_0x24c70b){_0x352cbd=_0x352cbd-0x151;const _0x4aa0e8=a153_0x4aa0();let _0x4b0139=_0x4aa0e8[_0x352cbd];return _0x4b0139;}(function(_0x41132,_0x69a0e1){const _0x3ebf6a=a153_0x4b01,_0x339488=_0x41132();while(!![]){try{const _0xaf74e1=parseInt(_0x3ebf6a(0x160))/0x1*(parseInt(_0x3ebf6a(0x153))/0x2)+-parseInt(_0x3ebf6a(0x15a))/0x3*(-parseInt(_0x3ebf6a(0x15e))/0x4)+-parseInt(_0x3ebf6a(0x15f))/0x5*(parseInt(_0x3ebf6a(0x161))/0x6)+-parseInt(_0x3ebf6a(0x154))/0x7*(-parseInt(_0x3ebf6a(0x156))/0x8)+-parseInt(_0x3ebf6a(0x15c))/0x9+parseInt(_0x3ebf6a(0x15d))/0xa*(parseInt(_0x3ebf6a(0x15b))/0xb)+-parseInt(_0x3ebf6a(0x155))/0xc*(parseInt(_0x3ebf6a(0x162))/0xd);if(_0xaf74e1===_0x69a0e1)break;else _0x339488['push'](_0x339488['shift']());}catch(_0x30f756){_0x339488['push'](_0x339488['shift']());}}}(a153_0x4aa0,0xf0cd6));export function buildFolderIdToPathMap(_0x348ee8){const _0x32e558=a153_0x4b01,_0x434eff=new Map(),_0x58baba=new Map();for(const _0x4a75ba of _0x348ee8){_0x58baba[_0x32e558(0x157)](_0x4a75ba['id'],_0x4a75ba);}const _0x2ef00b=new Set();for(const _0x32053d of _0x348ee8){!_0x32053d[_0x32e558(0x163)]&&_0x2ef00b[_0x32e558(0x159)](_0x32053d['id']);}function _0x2cb6c0(_0x666463){const _0x363b3b=_0x32e558;if(_0x434eff[_0x363b3b(0x158)](_0x666463['id']))return _0x434eff['get'](_0x666463['id']);if(_0x2ef00b[_0x363b3b(0x158)](_0x666463['id']))return _0x434eff[_0x363b3b(0x157)](_0x666463['id'],''),'';if(_0x666463[_0x363b3b(0x163)]){const _0x244411=_0x58baba[_0x363b3b(0x152)](_0x666463['parentFolderId']);if(_0x244411){const _0x3954ee=_0x2cb6c0(_0x244411),_0x360d6f=_0x3954ee?_0x3954ee+'/'+_0x666463[_0x363b3b(0x151)]:_0x666463[_0x363b3b(0x151)];return _0x434eff[_0x363b3b(0x157)](_0x666463['id'],_0x360d6f),_0x360d6f;}}const _0x17efe0=_0x666463[_0x363b3b(0x151)];return _0x434eff[_0x363b3b(0x157)](_0x666463['id'],_0x17efe0),_0x17efe0;}for(const _0x498402 of _0x348ee8){_0x2cb6c0(_0x498402);}return _0x434eff;}function a153_0x4aa0(){const _0xa6b7fc=['2814gpOsYG','161004WADCUM','32512MmKvuv','set','has','add','3qsTUvk','11XuiVve','4778370BbtswF','4263920WANqPg','4751392EDzEFu','9494330OPSsTb','697FBIPXP','6tbblmp','143hPgVYo','parentFolderId','name','get','906mfGIoH'];a153_0x4aa0=function(){return _0xa6b7fc;};return a153_0x4aa0();}export function buildFolderPathToIdMap(_0x2ffdb6){const _0x139865=a153_0x4b01,_0x44fffc=new Map(),_0x1583a5=new Map();for(const _0x55a21e of _0x2ffdb6){_0x1583a5['set'](_0x55a21e['id'],_0x55a21e);}const _0x5b2ce7=new Set();for(const _0x41ac3d of _0x2ffdb6){!_0x41ac3d[_0x139865(0x163)]&&_0x5b2ce7[_0x139865(0x159)](_0x41ac3d['id']);}function _0x4823b8(_0x3450fd){const _0x2a87c2=_0x139865;if(_0x5b2ce7[_0x2a87c2(0x158)](_0x3450fd['id']))return'';if(_0x3450fd[_0x2a87c2(0x163)]){const _0x4eaf7a=_0x1583a5[_0x2a87c2(0x152)](_0x3450fd[_0x2a87c2(0x163)]);if(_0x4eaf7a){const _0x2949a5=_0x4823b8(_0x4eaf7a);return _0x2949a5?_0x2949a5+'/'+_0x3450fd[_0x2a87c2(0x151)]:_0x3450fd[_0x2a87c2(0x151)];}}return _0x3450fd['name'];}for(const _0x349d2d of _0x2ffdb6){const _0x1aecdd=_0x4823b8(_0x349d2d);_0x44fffc[_0x139865(0x157)](_0x1aecdd,_0x349d2d['id']);}return _0x44fffc;}export function buildFolderMaps(_0x274869){const _0x3efb7f=a153_0x4b01,_0x2cf99b=buildFolderIdToPathMap(_0x274869),_0xf760eb=new Map();for(const [_0xe5db2,_0x5ce2a8]of _0x2cf99b){_0xf760eb[_0x3efb7f(0x157)](_0x5ce2a8,_0xe5db2);}return{'idToPath':_0x2cf99b,'pathToId':_0xf760eb};}export function getFolderPath(_0xe8cf0b,_0x267424){const _0x3731ea=a153_0x4b01;if(!_0xe8cf0b)return'';return _0x267424[_0x3731ea(0x152)](_0xe8cf0b)??'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25fd7e,_0x18ed25){const _0x3eb242=a154_0x5b6b,_0xba7662=_0x25fd7e();while(!![]){try{const _0x4d340c=-parseInt(_0x3eb242(0x1bf))/0x1*(-parseInt(_0x3eb242(0x1c6))/0x2)+parseInt(_0x3eb242(0x1d9))/0x3*(parseInt(_0x3eb242(0x1cb))/0x4)+parseInt(_0x3eb242(0x1d3))/0x5*(parseInt(_0x3eb242(0x1b6))/0x6)+-parseInt(_0x3eb242(0x1c9))/0x7*(-parseInt(_0x3eb242(0x1bc))/0x8)+-parseInt(_0x3eb242(0x1d6))/0x9+parseInt(_0x3eb242(0x1bb))/0xa+parseInt(_0x3eb242(0x1cc))/0xb*(-parseInt(_0x3eb242(0x1d4))/0xc);if(_0x4d340c===_0x18ed25)break;else _0xba7662['push'](_0xba7662['shift']());}catch(_0x43fdcf){_0xba7662['push'](_0xba7662['shift']());}}}(a154_0x4b55,0x2d062));import a154_0x500fad from'path';import{parse as a154_0x5b9147}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0xd532a1){const _0x514808=a154_0x5b6b;if(!_0xd532a1||_0xd532a1['trim']()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x11180c=_0xd532a1[_0x514808(0x1ca)]();if(_0x11180c==='/')return{'segments':[],'isAbsolute':!![],'raw':_0xd532a1};const _0x4069af=_0x11180c[_0x514808(0x1db)]('/')?_0x11180c[_0x514808(0x1be)](0x1):_0x11180c,_0x23870b=_0x4069af[_0x514808(0x1b0)]('/')['filter'](_0x30f192=>_0x30f192!=='');if(_0x23870b[_0x514808(0x1d7)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x10e853=_0x11180c[_0x514808(0x1db)]('/')||!isRelativePathSegment(_0x23870b[0x0]);for(const _0xd23168 of _0x23870b){validatePathSegment(_0xd23168);}return{'segments':_0x23870b,'isAbsolute':_0x10e853,'raw':_0xd532a1};}function isRelativePathSegment(_0x215fb2){return _0x215fb2==='.'||_0x215fb2==='..';}function validatePathSegment(_0x87a927){const _0x4ef627=a154_0x5b6b;if(_0x87a927==='')throw new Error(_0x4ef627(0x1cd));if(_0x87a927==='.'||_0x87a927==='..')return;if(/[\x00-\x1F\x7F]/[_0x4ef627(0x1ae)](_0x87a927))throw new Error(_0x4ef627(0x1c0)+_0x87a927);if(_0x87a927!==_0x87a927[_0x4ef627(0x1ca)]()){}}export function validatePath(_0x455bb9){const _0x51e644=a154_0x5b6b;if(_0x455bb9['segments']['length']===0x0&&!_0x455bb9[_0x51e644(0x1c7)])throw new Error(_0x51e644(0x1ba));if(_0x455bb9[_0x51e644(0x1c7)]){if(_0x455bb9[_0x51e644(0x1ce)][0x0]==='..')throw new Error(_0x51e644(0x1bd));let _0x565a79=0x0;for(const _0x100b86 of _0x455bb9[_0x51e644(0x1ce)]){if(_0x100b86==='..'){if(_0x565a79===0x0)throw new Error(_0x51e644(0x1c4));_0x565a79--;}else _0x100b86!=='.'&&_0x565a79++;}}}export function joinPaths(_0x39524b,_0x41d38c){const _0x4f40db=a154_0x5b6b;if(!_0x39524b||_0x39524b==='/')return _0x41d38c;if(!_0x41d38c||_0x41d38c==='.')return _0x39524b;if(_0x41d38c[_0x4f40db(0x1db)]('/'))return _0x41d38c;const _0x164f65=parsePath(_0x39524b),_0xcef18d=parsePath(_0x41d38c),_0xd2c2e9=[..._0x164f65['segments']];for(const _0x4b353c of _0xcef18d['segments']){if(_0x4b353c==='.')continue;else{if(_0x4b353c==='..'){if(_0xd2c2e9[_0x4f40db(0x1d7)]===0x0)throw new Error(_0x4f40db(0x1d5));_0xd2c2e9[_0x4f40db(0x1da)]();}else _0xd2c2e9[_0x4f40db(0x1c3)](_0x4b353c);}}const _0x2ecb2a=_0xd2c2e9[_0x4f40db(0x1b8)]('/');return _0x164f65[_0x4f40db(0x1cf)][_0x4f40db(0x1db)]('/')?'/'+_0x2ecb2a:_0x2ecb2a;}export function normalizePath(_0x1aee34){const _0x4246b3=a154_0x5b6b,_0x3b3e17=parsePath(_0x1aee34),_0x49469c=[];for(const _0x5c1684 of _0x3b3e17['segments']){if(_0x5c1684==='.')continue;else{if(_0x5c1684==='..'){if(_0x49469c['length']===0x0){if(_0x3b3e17[_0x4246b3(0x1c7)])throw new Error(_0x4246b3(0x1d5));_0x49469c['push']('..');}else _0x49469c[_0x49469c[_0x4246b3(0x1d7)]-0x1]==='..'?_0x49469c[_0x4246b3(0x1c3)]('..'):_0x49469c[_0x4246b3(0x1da)]();}else _0x49469c[_0x4246b3(0x1c3)](_0x5c1684);}}if(_0x49469c[_0x4246b3(0x1d7)]===0x0)return _0x3b3e17['isAbsolute']?'/':'.';const _0x26b5d4=_0x49469c[_0x4246b3(0x1b8)]('/');return _0x3b3e17[_0x4246b3(0x1cf)][_0x4246b3(0x1db)]('/')?'/'+_0x26b5d4:_0x26b5d4;}export function getParentPath(_0x3680ed){const _0x3c5029=a154_0x5b6b,_0x27e50c=parsePath(_0x3680ed);if(_0x27e50c['segments']['length']<=0x1)return'/';const _0xa968b3=_0x27e50c[_0x3c5029(0x1ce)][_0x3c5029(0x1b1)](0x0,-0x1)['join']('/');return _0x27e50c[_0x3c5029(0x1cf)][_0x3c5029(0x1db)]('/')?'/'+_0xa968b3:_0xa968b3;}function a154_0x4b55(){const _0x3038bc=['name','Relative\x20path\x20cannot\x20be\x20empty','781870wnXBun','1744kEYEmD','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','substring','9SoKHlG','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','tdx.json','parse','push','Path\x20attempts\x20to\x20navigate\x20above\x20root','endsWith','8522rSSFQz','isAbsolute','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','4221cAZBEs','trim','1247012OXbnZE','11KJdgCF','Path\x20segment\x20cannot\x20be\x20empty','segments','raw','replace','journey','exists','15mSRWKh','5448372fpdUgZ','Cannot\x20navigate\x20above\x20root','37359qYaPZZ','length','readFile','3lqDGmd','pop','startsWith','relative','test','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','split','slice','No\x20tdx.json\x20found\x20for\x20file:\x20','dirname','.yml','.yaml','165714bqlCnB','parent_segment','join'];a154_0x4b55=function(){return _0x3038bc;};return a154_0x4b55();}export function getBaseName(_0xffed53){const _0x11a99c=a154_0x5b6b,_0x3e23d1=parsePath(_0xffed53);return _0x3e23d1[_0x11a99c(0x1ce)][_0x3e23d1[_0x11a99c(0x1ce)]['length']-0x1]||'';}function a154_0x5b6b(_0x547a6e,_0x16317e){_0x547a6e=_0x547a6e-0x1ae;const _0x4b5577=a154_0x4b55();let _0x5b6b79=_0x4b5577[_0x547a6e];return _0x5b6b79;}export function isChildPath(_0x3c0834,_0x1c9fca){const _0x259d23=a154_0x5b6b,_0x5383cc=parsePath(_0x3c0834),_0x2abd69=parsePath(_0x1c9fca);if(_0x5383cc['segments'][_0x259d23(0x1d7)]<=_0x2abd69[_0x259d23(0x1ce)][_0x259d23(0x1d7)])return![];for(let _0xa732d5=0x0;_0xa732d5<_0x2abd69[_0x259d23(0x1ce)][_0x259d23(0x1d7)];_0xa732d5++){if(_0x5383cc[_0x259d23(0x1ce)][_0xa732d5]!==_0x2abd69['segments'][_0xa732d5])return![];}return!![];}export function splitPath(_0x1d3ebe){const _0xd4b8bf=a154_0x5b6b,_0x2ca187=parsePath(_0x1d3ebe);if(_0x2ca187['segments'][_0xd4b8bf(0x1d7)]===0x0)throw new Error('Cannot\x20split\x20empty\x20path');if(_0x2ca187[_0xd4b8bf(0x1ce)][_0xd4b8bf(0x1d7)]===0x1)return{'parent':_0x2ca187[_0xd4b8bf(0x1ce)][0x0]};return{'parent':_0x2ca187['segments'][0x0],'child':_0x2ca187[_0xd4b8bf(0x1ce)][_0xd4b8bf(0x1b1)](0x1)[_0xd4b8bf(0x1b8)]('/')};}export function isYamlFilePath(_0x39ac39){const _0xa59700=a154_0x5b6b;return _0x39ac39[_0xa59700(0x1c5)](_0xa59700(0x1b4))||_0x39ac39[_0xa59700(0x1c5)](_0xa59700(0x1b5));}export async function resolveYamlFilePath(_0x5ea606,_0x1f829c=nodeFileSystem){const _0x330dda=a154_0x5b6b,_0x48c01b=a154_0x500fad['resolve'](_0x5ea606);if(!await _0x1f829c[_0x330dda(0x1d2)](_0x48c01b))throw new Error('File\x20not\x20found:\x20'+_0x5ea606);let _0x3c2751=a154_0x500fad[_0x330dda(0x1b3)](_0x48c01b),_0x452937=null,_0x2a4a2c=null;const _0x29f0ba=a154_0x500fad[_0x330dda(0x1c2)](_0x3c2751)['root'];while(_0x3c2751!==_0x29f0ba){const _0x208894=a154_0x500fad['join'](_0x3c2751,_0x330dda(0x1c1));if(await _0x1f829c[_0x330dda(0x1d2)](_0x208894)){_0x452937=_0x208894,_0x2a4a2c=_0x3c2751;break;}_0x3c2751=a154_0x500fad[_0x330dda(0x1b3)](_0x3c2751);}if(!_0x452937||!_0x2a4a2c)throw new Error(_0x330dda(0x1b2)+_0x5ea606+'\x0a'+'Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.');const _0x2b5153=await _0x1f829c[_0x330dda(0x1d8)](_0x452937),_0x467032=JSON[_0x330dda(0x1c2)](_0x2b5153),_0x53c824=_0x467032[_0x330dda(0x1b7)];if(!_0x53c824)throw new Error(_0x330dda(0x1af));const _0x56ad54=await _0x1f829c[_0x330dda(0x1d8)](_0x48c01b),_0x439cfb=a154_0x5b9147(_0x56ad54),_0x38ac33=_0x439cfb[_0x330dda(0x1b9)];if(!_0x38ac33)throw new Error(_0x330dda(0x1c8)+_0x5ea606);const _0x14fcb7=_0x439cfb['type']===_0x330dda(0x1d1)?_0x330dda(0x1d1):'segment',_0x8607d1=a154_0x500fad[_0x330dda(0x1dc)](_0x2a4a2c,_0x48c01b),_0x114241=a154_0x500fad[_0x330dda(0x1b3)](_0x8607d1),_0x469072=_0x114241==='.'?'':_0x114241[_0x330dda(0x1d0)](/\\/g,'/'),_0x4335da=_0x469072?_0x53c824+'/'+_0x469072+'/'+_0x38ac33:_0x53c824+'/'+_0x38ac33;return{'parentSegment':_0x53c824,'segmentName':_0x38ac33,'folderPath':_0x469072,'fullPath':_0x4335da,'resourceType':_0x14fcb7,'content':_0x56ad54};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a155_0x7cd6(){const _0x4475cd=['136jcxsZG','146859MsTjme','indexOf','Invalid\x20segment\x20reference\x20format:\x20','109730vFsrjb','.\x20Child\x20name\x20cannot\x20be\x20empty','869832vCmIjd','9170056qLZCBv','36qhZqAD','.\x20Parent\x20name\x20cannot\x20be\x20empty','294480aZJVOs','70lqzULL','substring','26597461gKhWdt','459184NaUhUZ','10MsDgmO'];a155_0x7cd6=function(){return _0x4475cd;};return a155_0x7cd6();}function a155_0x5ace(_0x99c1fe,_0x2e92f1){_0x99c1fe=_0x99c1fe-0x168;const _0x7cd64d=a155_0x7cd6();let _0x5ace81=_0x7cd64d[_0x99c1fe];return _0x5ace81;}(function(_0x1e0c29,_0x33384f){const _0x5ecc84=a155_0x5ace,_0x328f48=_0x1e0c29();while(!![]){try{const _0x3d7f1e=parseInt(_0x5ecc84(0x177))/0x1+-parseInt(_0x5ecc84(0x171))/0x2*(-parseInt(_0x5ecc84(0x16a))/0x3)+-parseInt(_0x5ecc84(0x169))/0x4*(parseInt(_0x5ecc84(0x16d))/0x5)+-parseInt(_0x5ecc84(0x16f))/0x6*(-parseInt(_0x5ecc84(0x174))/0x7)+parseInt(_0x5ecc84(0x170))/0x8+-parseInt(_0x5ecc84(0x173))/0x9+parseInt(_0x5ecc84(0x168))/0xa*(-parseInt(_0x5ecc84(0x176))/0xb);if(_0x3d7f1e===_0x33384f)break;else _0x328f48['push'](_0x328f48['shift']());}catch(_0x1166cd){_0x328f48['push'](_0x328f48['shift']());}}}(a155_0x7cd6,0xb4898));export function parseSegmentRef(_0x3855ae){const _0x1b1c77=a155_0x5ace,_0x25483c=_0x3855ae[_0x1b1c77(0x16b)]('/');if(_0x25483c===-0x1)return{'parentId':_0x3855ae};if(_0x25483c===0x0)throw new Error(_0x1b1c77(0x16c)+_0x3855ae+_0x1b1c77(0x172));const _0x8dc2e7=_0x3855ae[_0x1b1c77(0x175)](0x0,_0x25483c),_0x1a5d77=_0x3855ae[_0x1b1c77(0x175)](_0x25483c+0x1);if(_0x1a5d77==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x3855ae+_0x1b1c77(0x16e));return{'parentId':_0x8dc2e7,'childId':_0x1a5d77};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x14e050,_0x177419){const _0x5f2a46=a156_0x287a,_0x21fa1f=_0x14e050();while(!![]){try{const _0xf469a9=parseInt(_0x5f2a46(0x152))/0x1*(-parseInt(_0x5f2a46(0x116))/0x2)+parseInt(_0x5f2a46(0x11c))/0x3*(parseInt(_0x5f2a46(0x141))/0x4)+-parseInt(_0x5f2a46(0x136))/0x5*(parseInt(_0x5f2a46(0x11d))/0x6)+parseInt(_0x5f2a46(0x151))/0x7*(-parseInt(_0x5f2a46(0x112))/0x8)+parseInt(_0x5f2a46(0x111))/0x9*(-parseInt(_0x5f2a46(0x139))/0xa)+parseInt(_0x5f2a46(0x15b))/0xb+parseInt(_0x5f2a46(0x114))/0xc*(parseInt(_0x5f2a46(0x145))/0xd);if(_0xf469a9===_0x177419)break;else _0x21fa1f['push'](_0x21fa1f['shift']());}catch(_0x1ee353){_0x21fa1f['push'](_0x21fa1f['shift']());}}}(a156_0x3aeb,0x466a3));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a156_0x287a(_0x1ff60c,_0x3168ac){_0x1ff60c=_0x1ff60c-0x110;const _0x3aebce=a156_0x3aeb();let _0x287aeb=_0x3aebce[_0x1ff60c];return _0x287aeb;}export function validateSegmentDef(_0x5bca80,_0x12a083={},_0x2615bf={}){const _0x31836f=a156_0x287a;if(_0x2615bf[_0x31836f(0x14e)])return runSemanticChecks(_0x5bca80,_0x12a083);const _0x1a3879=SegmentDefSchema[_0x31836f(0x13c)](_0x5bca80);if(_0x1a3879[_0x31836f(0x150)])return runSemanticChecks(_0x1a3879['data'],_0x12a083);return zodErrorsToValidationResult(_0x1a3879['error'],_0x12a083);}export function validateRuleDef(_0x202999,_0x523813,_0x49be3e){const _0x73d37f=a156_0x287a;if(!_0x202999)return[];const _0x23e24e=RuleDefSchema[_0x73d37f(0x13c)](_0x202999);if(_0x23e24e[_0x73d37f(0x150)])return checkRule(_0x23e24e['data'],_0x523813,_0x49be3e);const _0x52533=flattenZodIssues(_0x23e24e[_0x73d37f(0x143)][_0x73d37f(0x158)]);return _0x52533[_0x73d37f(0x120)](_0x4016cf=>{const _0x1bbac8=_0x73d37f,_0x19f394=formatZodPath(_0x4016cf['path']),_0x5251cf=_0x19f394?_0x523813+'.'+_0x19f394:_0x523813,_0x21ec7e=mapZodIssueToCode(_0x4016cf,_0x19f394),_0x35bf8d=getLocationFromPath(_0x49be3e[_0x1bbac8(0x119)],_0x49be3e[_0x1bbac8(0x11a)],pathToArray(_0x5251cf));return{'level':_0x1bbac8(0x143),'path':_0x5251cf,'code':_0x21ec7e,'message':_0x4016cf['message'],..._0x35bf8d&&{'location':_0x35bf8d}};});}function zodErrorsToValidationResult(_0x1a1981,_0x7f4e41){const _0x4572d0=a156_0x287a,_0x27ab5f=flattenZodIssues(_0x1a1981[_0x4572d0(0x158)]),_0xbfde2e=_0x27ab5f[_0x4572d0(0x120)](_0x27102b=>{const _0x15fc9f=_0x4572d0,_0xd63b2e=formatZodPath(_0x27102b[_0x15fc9f(0x125)]),_0x40618d=mapZodIssueToCode(_0x27102b,_0xd63b2e),_0x517a6f=getLocationFromPath(_0x7f4e41['document'],_0x7f4e41['source'],_0x27102b[_0x15fc9f(0x125)][_0x15fc9f(0x120)](_0x32d315=>typeof _0x32d315===_0x15fc9f(0x12e)?String(_0x32d315):_0x32d315));return{'level':_0x15fc9f(0x143),'path':_0xd63b2e,'code':_0x40618d,'message':_0x27102b[_0x15fc9f(0x126)],..._0x517a6f&&{'location':_0x517a6f}};});return{'valid':![],'errors':_0xbfde2e,'warnings':[]};}function mapZodIssueToCode(_0x58d004,_0x4d0fd2){const _0x23c382=a156_0x287a,_0x5d425b=_0x58d004['code']===_0x23c382(0x127)?_0x58d004[_0x23c382(0x110)]:undefined;if(_0x4d0fd2===_0x23c382(0x157))return _0x23c382(0x147);if(_0x4d0fd2==='rule.type'||_0x4d0fd2['endsWith']('.type')){if(_0x58d004['code']===_0x23c382(0x142)){if(_0x4d0fd2===_0x23c382(0x149)||_0x4d0fd2[_0x23c382(0x129)](/\.conditions\[\d+\]\.type$/))return _0x23c382(0x133);}}if(_0x4d0fd2[_0x23c382(0x14a)]('.operator.type'))return _0x23c382(0x137);if(_0x4d0fd2[_0x23c382(0x14a)](_0x23c382(0x124)))return _0x23c382(0x140);if(_0x5d425b?.[_0x23c382(0x128)]===_0x23c382(0x148))return _0x23c382(0x148);if(_0x5d425b?.['validationCode']===_0x23c382(0x12f))return _0x23c382(0x12f);if(_0x4d0fd2[_0x23c382(0x14a)](_0x23c382(0x146))||_0x4d0fd2==='conditions')return _0x23c382(0x135);if(_0x4d0fd2['includes'](_0x23c382(0x154)))return _0x23c382(0x117);if(_0x4d0fd2[_0x23c382(0x14a)](_0x23c382(0x11f)))return _0x23c382(0x134);return _0x23c382(0x12b);}function runSemanticChecks(_0x230df1,_0x3b1134){const _0x499dab=a156_0x287a,_0x1a3fe6=[];_0x230df1[_0x499dab(0x115)]&&_0x1a3fe6[_0x499dab(0x122)](...checkRule(_0x230df1[_0x499dab(0x115)],_0x499dab(0x115),_0x3b1134));const _0x8c49b5=_0x1a3fe6[_0x499dab(0x13e)](_0x2fb44b=>_0x2fb44b[_0x499dab(0x12d)]===_0x499dab(0x143)),_0x52731e=_0x1a3fe6['filter'](_0x7b4655=>_0x7b4655[_0x499dab(0x12d)]===_0x499dab(0x153));return{'valid':_0x8c49b5[_0x499dab(0x131)]===0x0,'errors':_0x8c49b5,'warnings':_0x52731e};}function checkRule(_0x1c7571,_0x55f08c,_0x46020d){const _0x4a08a4=a156_0x287a,_0x58a8f0=[];if(_0x1c7571[_0x4a08a4(0x11b)][_0x4a08a4(0x131)]===0x0)return _0x58a8f0[_0x4a08a4(0x122)]({'level':_0x4a08a4(0x143),'path':_0x55f08c+'.conditions','code':_0x4a08a4(0x13f),'message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x46020d[_0x4a08a4(0x119)],_0x46020d[_0x4a08a4(0x11a)],pathToArray(_0x55f08c+_0x4a08a4(0x146)))}),_0x58a8f0;return _0x58a8f0[_0x4a08a4(0x122)](...checkConditions(_0x1c7571[_0x4a08a4(0x11b)],_0x55f08c,_0x46020d)),_0x58a8f0;}function checkConditions(_0x7bee02,_0x33aad1,_0x1c60df){const _0x52fcfb=a156_0x287a,_0x123847=[];for(let _0x55c381=0x0;_0x55c381<_0x7bee02[_0x52fcfb(0x131)];_0x55c381++){const _0x8a140b=_0x7bee02[_0x55c381],_0x3355e0=_0x33aad1+_0x52fcfb(0x15c)+_0x55c381+']';_0x123847[_0x52fcfb(0x122)](...checkCondition(_0x8a140b,_0x3355e0,_0x1c60df));}return _0x123847;}function checkCondition(_0xea20ca,_0x1c9ef4,_0x1d99bc){const _0x46d5cd=a156_0x287a,_0xc9efb3=[];if(_0xea20ca[_0x46d5cd(0x13b)]===_0x46d5cd(0x14b)||_0xea20ca[_0x46d5cd(0x13b)]==='Or'){if(_0xea20ca['conditions'][_0x46d5cd(0x131)]===0x0)_0xc9efb3[_0x46d5cd(0x122)]({'level':'error','path':_0x1c9ef4+'.conditions','code':_0x46d5cd(0x13f),'message':_0xea20ca[_0x46d5cd(0x13b)]+_0x46d5cd(0x156),'location':getLocationFromPath(_0x1d99bc['document'],_0x1d99bc[_0x46d5cd(0x11a)],pathToArray(_0x1c9ef4+_0x46d5cd(0x146)))});else{const _0x4cf3b2=_0xea20ca[_0x46d5cd(0x113)]!==undefined;!_0x4cf3b2&&_0xc9efb3['push']({'level':_0x46d5cd(0x153),'path':_0x1c9ef4,'code':'NESTED_CONDITION_GROUP','message':_0xea20ca[_0x46d5cd(0x13b)]+_0x46d5cd(0x130)+_0x46d5cd(0x138)+_0x46d5cd(0x12c),'location':getLocationFromPath(_0x1d99bc[_0x46d5cd(0x119)],_0x1d99bc[_0x46d5cd(0x11a)],pathToArray(_0x1c9ef4))}),_0xc9efb3[_0x46d5cd(0x122)](...checkConditions(_0xea20ca[_0x46d5cd(0x11b)],_0x1c9ef4,_0x1d99bc));}return _0xc9efb3;}if(_0xea20ca[_0x46d5cd(0x13b)]===_0x46d5cd(0x159)||_0xea20ca[_0x46d5cd(0x13b)]===_0x46d5cd(0x118)){const _0x48d862=_0xea20ca,_0x8c7176=_0x48d862[_0x46d5cd(0x11a)],_0x3462a0=_0x48d862['aggregation'],_0x4638a8=_0x8c7176||_0x3462a0;(!_0x48d862[_0x46d5cd(0x144)]||_0x48d862[_0x46d5cd(0x144)]==='')&&(!_0x4638a8&&_0xc9efb3['push']({'level':'error','path':_0x1c9ef4+'.attribute','code':_0x46d5cd(0x14d),'message':_0x46d5cd(0x14c),'location':getLocationFromPath(_0x1d99bc[_0x46d5cd(0x119)],_0x1d99bc[_0x46d5cd(0x11a)],pathToArray(_0x1c9ef4+_0x46d5cd(0x11e)))}));_0x48d862[_0x46d5cd(0x13e)]&&_0xc9efb3[_0x46d5cd(0x122)](...checkRule(_0x48d862[_0x46d5cd(0x13e)],_0x1c9ef4+_0x46d5cd(0x13a),_0x1d99bc));if(_0x48d862['source']){const _0x398506=_0x48d862['attribute']&&_0x48d862[_0x46d5cd(0x144)]!=='';_0x398506&&!_0x48d862[_0x46d5cd(0x13e)]&&_0xc9efb3[_0x46d5cd(0x122)]({'level':'error','path':_0x1c9ef4+_0x46d5cd(0x155),'code':_0x46d5cd(0x123),'message':'Behavior\x20source\x20\x27'+_0x48d862[_0x46d5cd(0x11a)]+_0x46d5cd(0x132)+_0x48d862[_0x46d5cd(0x144)]+'\x27\x20'+_0x46d5cd(0x121)+_0x46d5cd(0x15a)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x1d99bc['document'],_0x1d99bc['source'],pathToArray(_0x1c9ef4+'.source'))}),_0x398506&&_0x48d862[_0x46d5cd(0x13e)]&&_0xc9efb3[_0x46d5cd(0x122)]({'level':'warning','path':_0x1c9ef4+_0x46d5cd(0x11e),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0x46d5cd(0x12a)+_0x48d862['attribute']+_0x46d5cd(0x14f)+_0x46d5cd(0x13d),'location':getLocationFromPath(_0x1d99bc[_0x46d5cd(0x119)],_0x1d99bc['source'],pathToArray(_0x1c9ef4+_0x46d5cd(0x11e)))});}}return _0xc9efb3;}function a156_0x3aeb(){const _0x356b50=['12ZNyFHX','415956tbsJeB','.attribute','.segment','map','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','push','BEHAVIOR_SOURCE_MISSING_FILTER','.operator.value','path','message','custom','validationCode','match','Attribute\x20\x27','SEGMENT_SCHEMA_ERROR','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','level','symbol','MISSING_TIME_UNIT','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','length','\x27\x20with\x20attribute\x20\x27','INVALID_RULE_TYPE','MISSING_SEGMENT_REFERENCE','MISSING_CONDITIONS','35urAwzo','INVALID_OPERATOR_TYPE','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','1030BvGMKH','.filter','type','safeParse','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','filter','EMPTY_CONDITIONS','MISSING_OPERATOR_VALUE','218232NbJvEL','invalid_value','error','attribute','39wTYUWl','.conditions','MISSING_NAME','MISSING_BETWEEN_BOUNDS','rule.type','endsWith','And','Attribute\x20name\x20cannot\x20be\x20empty','EMPTY_ATTRIBUTE','skipSchema','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','success','77742avlxic','98cpyGUE','warning','arrayMatching','.source','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','name','issues','Value','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','6254237DlAEai','.conditions[','params','5787qlPCrk','24BZrpYk','description','710748lJrjXY','rule','1862tgVrDy','INVALID_ARRAY_MATCHING','Behavior','document','source','conditions'];a156_0x3aeb=function(){return _0x356b50;};return a156_0x3aeb();}
|
|
1
|
+
function a156_0x29db(_0x138af9,_0x5b8f7c){_0x138af9=_0x138af9-0x170;const _0x212b92=a156_0x212b();let _0x29db0d=_0x212b92[_0x138af9];return _0x29db0d;}(function(_0x5d4644,_0x585820){const _0x3af9f1=a156_0x29db,_0x5183ec=_0x5d4644();while(!![]){try{const _0x5043c5=parseInt(_0x3af9f1(0x18c))/0x1*(parseInt(_0x3af9f1(0x1a9))/0x2)+parseInt(_0x3af9f1(0x198))/0x3*(parseInt(_0x3af9f1(0x1ad))/0x4)+-parseInt(_0x3af9f1(0x18e))/0x5+-parseInt(_0x3af9f1(0x19d))/0x6*(parseInt(_0x3af9f1(0x1b6))/0x7)+-parseInt(_0x3af9f1(0x179))/0x8+-parseInt(_0x3af9f1(0x190))/0x9+-parseInt(_0x3af9f1(0x1a6))/0xa*(-parseInt(_0x3af9f1(0x1b9))/0xb);if(_0x5043c5===_0x585820)break;else _0x5183ec['push'](_0x5183ec['shift']());}catch(_0xa422a4){_0x5183ec['push'](_0x5183ec['shift']());}}}(a156_0x212b,0x5754b));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x3b14a8,_0x4ca3b8={},_0x5246bc={}){const _0x472d37=a156_0x29db;if(_0x5246bc[_0x472d37(0x1ac)])return runSemanticChecks(_0x3b14a8,_0x4ca3b8);const _0x42e46c=SegmentDefSchema['safeParse'](_0x3b14a8);if(_0x42e46c[_0x472d37(0x1a1)])return runSemanticChecks(_0x42e46c[_0x472d37(0x1b3)],_0x4ca3b8);return zodErrorsToValidationResult(_0x42e46c[_0x472d37(0x184)],_0x4ca3b8);}export function validateRuleDef(_0x7a188,_0x3e39bb,_0x1b84df){const _0x1430fd=a156_0x29db;if(!_0x7a188)return[];const _0x5f48a7=RuleDefSchema['safeParse'](_0x7a188);if(_0x5f48a7[_0x1430fd(0x1a1)])return checkRule(_0x5f48a7['data'],_0x3e39bb,_0x1b84df);const _0x33f55d=flattenZodIssues(_0x5f48a7['error'][_0x1430fd(0x1a3)]);return _0x33f55d[_0x1430fd(0x19a)](_0x4759a8=>{const _0x21f4ec=_0x1430fd,_0x5df5f1=formatZodPath(_0x4759a8[_0x21f4ec(0x18d)]),_0x4c0203=_0x5df5f1?_0x3e39bb+'.'+_0x5df5f1:_0x3e39bb,_0x41149e=mapZodIssueToCode(_0x4759a8,_0x5df5f1),_0x44abb9=getLocationFromPath(_0x1b84df[_0x21f4ec(0x170)],_0x1b84df[_0x21f4ec(0x174)],pathToArray(_0x4c0203));return{'level':_0x21f4ec(0x184),'path':_0x4c0203,'code':_0x41149e,'message':_0x4759a8[_0x21f4ec(0x189)],..._0x44abb9&&{'location':_0x44abb9}};});}function zodErrorsToValidationResult(_0x1068c6,_0x175b40){const _0xa370d7=a156_0x29db,_0x2344a6=flattenZodIssues(_0x1068c6[_0xa370d7(0x1a3)]),_0x481888=_0x2344a6[_0xa370d7(0x19a)](_0x1c0699=>{const _0x16e582=_0xa370d7,_0x24a276=formatZodPath(_0x1c0699[_0x16e582(0x18d)]),_0x234812=mapZodIssueToCode(_0x1c0699,_0x24a276),_0x4dac72=getLocationFromPath(_0x175b40['document'],_0x175b40[_0x16e582(0x174)],_0x1c0699['path'][_0x16e582(0x19a)](_0x5ae4db=>typeof _0x5ae4db==='symbol'?String(_0x5ae4db):_0x5ae4db));return{'level':_0x16e582(0x184),'path':_0x24a276,'code':_0x234812,'message':_0x1c0699[_0x16e582(0x189)],..._0x4dac72&&{'location':_0x4dac72}};});return{'valid':![],'errors':_0x481888,'warnings':[]};}function a156_0x212b(){const _0x2d0582=['Attribute\x20name\x20cannot\x20be\x20empty','Value','warning','data','push','invalid_value','701477MagFeM','EMPTY_ATTRIBUTE','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','89749CgcmBh','document','.conditions[','type','code','source','.segment','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','Behavior\x20source\x20\x27','4348184KbXUvw','.conditions','.operator.value','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','MISSING_SEGMENT_REFERENCE','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','match','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','.filter','custom','BEHAVIOR_SOURCE_MISSING_FILTER','error','And','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','INVALID_RULE_TYPE','message','conditions','validationCode','3aXkUyK','path','1847370yjVzEO','filter','4231512xTFAzD','includes','level','Behavior','attribute','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','MISSING_TIME_UNIT','arrayMatching','401889eIbBpy','.source','map','params','.type','42xCIxgN','MISSING_CONDITIONS','EMPTY_CONDITIONS','.operator.type','success','length','issues','INVALID_ARRAY_MATCHING','.attribute','1390fQotIo','rule','endsWith','425622sytFkq','description','aggregation','skipSchema','20EeNfmC','MISSING_BETWEEN_BOUNDS','SEGMENT_SCHEMA_ERROR'];a156_0x212b=function(){return _0x2d0582;};return a156_0x212b();}function mapZodIssueToCode(_0x3d7335,_0x1e1642){const _0x4bb00d=a156_0x29db,_0x3fcd25=_0x3d7335[_0x4bb00d(0x173)]===_0x4bb00d(0x182)?_0x3d7335[_0x4bb00d(0x19b)]:undefined;if(_0x1e1642==='name')return'MISSING_NAME';if(_0x1e1642==='rule.type'||_0x1e1642[_0x4bb00d(0x1a8)](_0x4bb00d(0x19c))){if(_0x3d7335[_0x4bb00d(0x173)]===_0x4bb00d(0x1b5)){if(_0x1e1642==='rule.type'||_0x1e1642[_0x4bb00d(0x17f)](/\.conditions\[\d+\]\.type$/))return _0x4bb00d(0x188);}}if(_0x1e1642[_0x4bb00d(0x1a8)](_0x4bb00d(0x1a0)))return'INVALID_OPERATOR_TYPE';if(_0x1e1642['endsWith'](_0x4bb00d(0x17b)))return'MISSING_OPERATOR_VALUE';if(_0x3fcd25?.['validationCode']===_0x4bb00d(0x1ae))return _0x4bb00d(0x1ae);if(_0x3fcd25?.[_0x4bb00d(0x18b)]===_0x4bb00d(0x196))return _0x4bb00d(0x196);if(_0x1e1642[_0x4bb00d(0x1a8)]('.conditions')||_0x1e1642===_0x4bb00d(0x18a))return _0x4bb00d(0x19e);if(_0x1e1642[_0x4bb00d(0x191)](_0x4bb00d(0x197)))return _0x4bb00d(0x1a4);if(_0x1e1642[_0x4bb00d(0x1a8)](_0x4bb00d(0x175)))return _0x4bb00d(0x17d);return _0x4bb00d(0x1af);}function runSemanticChecks(_0x1f880e,_0x5f196a){const _0x514bb8=a156_0x29db,_0x379e6f=[];_0x1f880e['rule']&&_0x379e6f[_0x514bb8(0x1b4)](...checkRule(_0x1f880e[_0x514bb8(0x1a7)],_0x514bb8(0x1a7),_0x5f196a));const _0x4adc=_0x379e6f['filter'](_0x5b5c7c=>_0x5b5c7c[_0x514bb8(0x192)]===_0x514bb8(0x184)),_0x48ae87=_0x379e6f['filter'](_0x4adc10=>_0x4adc10['level']===_0x514bb8(0x1b2));return{'valid':_0x4adc['length']===0x0,'errors':_0x4adc,'warnings':_0x48ae87};}function checkRule(_0x148393,_0x3b2060,_0x5c7b88){const _0x14b8b0=a156_0x29db,_0x50a562=[];if(_0x148393['conditions'][_0x14b8b0(0x1a2)]===0x0)return _0x50a562['push']({'level':_0x14b8b0(0x184),'path':_0x3b2060+'.conditions','code':'EMPTY_CONDITIONS','message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x5c7b88[_0x14b8b0(0x170)],_0x5c7b88['source'],pathToArray(_0x3b2060+_0x14b8b0(0x17a)))}),_0x50a562;return _0x50a562[_0x14b8b0(0x1b4)](...checkConditions(_0x148393[_0x14b8b0(0x18a)],_0x3b2060,_0x5c7b88)),_0x50a562;}function checkConditions(_0x1dbd4f,_0x5b86d6,_0x472936){const _0x1e8a21=a156_0x29db,_0xcab594=[];for(let _0x212130=0x0;_0x212130<_0x1dbd4f['length'];_0x212130++){const _0x538823=_0x1dbd4f[_0x212130],_0x411909=_0x5b86d6+_0x1e8a21(0x171)+_0x212130+']';_0xcab594[_0x1e8a21(0x1b4)](...checkCondition(_0x538823,_0x411909,_0x472936));}return _0xcab594;}function checkCondition(_0x517482,_0x17ace6,_0x30d955){const _0x21062c=a156_0x29db,_0x35d41e=[];if(_0x517482[_0x21062c(0x172)]===_0x21062c(0x185)||_0x517482[_0x21062c(0x172)]==='Or'){if(_0x517482[_0x21062c(0x18a)][_0x21062c(0x1a2)]===0x0)_0x35d41e['push']({'level':_0x21062c(0x184),'path':_0x17ace6+_0x21062c(0x17a),'code':_0x21062c(0x19f),'message':_0x517482['type']+_0x21062c(0x17e),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955['source'],pathToArray(_0x17ace6+_0x21062c(0x17a)))});else{const _0x4efd42=_0x517482[_0x21062c(0x1aa)]!==undefined;!_0x4efd42&&_0x35d41e[_0x21062c(0x1b4)]({'level':'warning','path':_0x17ace6,'code':'NESTED_CONDITION_GROUP','message':_0x517482[_0x21062c(0x172)]+_0x21062c(0x195)+_0x21062c(0x1b8)+_0x21062c(0x17c),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6))}),_0x35d41e['push'](...checkConditions(_0x517482['conditions'],_0x17ace6,_0x30d955));}return _0x35d41e;}if(_0x517482[_0x21062c(0x172)]===_0x21062c(0x1b1)||_0x517482[_0x21062c(0x172)]===_0x21062c(0x193)){const _0x970f9d=_0x517482,_0x4a6031=_0x970f9d['source'],_0x343381=_0x970f9d[_0x21062c(0x1ab)],_0x5038c0=_0x4a6031||_0x343381;(!_0x970f9d[_0x21062c(0x194)]||_0x970f9d['attribute']==='')&&(!_0x5038c0&&_0x35d41e[_0x21062c(0x1b4)]({'level':_0x21062c(0x184),'path':_0x17ace6+'.attribute','code':_0x21062c(0x1b7),'message':_0x21062c(0x1b0),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6+_0x21062c(0x1a5)))}));_0x970f9d[_0x21062c(0x18f)]&&_0x35d41e[_0x21062c(0x1b4)](...checkRule(_0x970f9d['filter'],_0x17ace6+_0x21062c(0x181),_0x30d955));if(_0x970f9d[_0x21062c(0x174)]){const _0x4009b9=_0x970f9d[_0x21062c(0x194)]&&_0x970f9d['attribute']!=='';_0x4009b9&&!_0x970f9d[_0x21062c(0x18f)]&&_0x35d41e['push']({'level':_0x21062c(0x184),'path':_0x17ace6+_0x21062c(0x199),'code':_0x21062c(0x183),'message':_0x21062c(0x178)+_0x970f9d[_0x21062c(0x174)]+'\x27\x20with\x20attribute\x20\x27'+_0x970f9d[_0x21062c(0x194)]+'\x27\x20'+_0x21062c(0x186)+_0x21062c(0x187)+_0x21062c(0x177),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6+'.source'))}),_0x4009b9&&_0x970f9d[_0x21062c(0x18f)]&&_0x35d41e[_0x21062c(0x1b4)]({'level':'warning','path':_0x17ace6+'.attribute','code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':'Attribute\x20\x27'+_0x970f9d[_0x21062c(0x194)]+_0x21062c(0x180)+_0x21062c(0x176),'location':getLocationFromPath(_0x30d955[_0x21062c(0x170)],_0x30d955[_0x21062c(0x174)],pathToArray(_0x17ace6+_0x21062c(0x1a5)))});}}return _0x35d41e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x502214,_0x129f79){const _0x17e235=a157_0x32d7,_0x29dcb9=_0x502214();while(!![]){try{const _0xc98a4a=-parseInt(_0x17e235(0x104))/0x1+-parseInt(_0x17e235(0xee))/0x2*(parseInt(_0x17e235(0x103))/0x3)+parseInt(_0x17e235(0xdb))/0x4*(-parseInt(_0x17e235(0xe8))/0x5)+parseInt(_0x17e235(0xfe))/0x6*(parseInt(_0x17e235(0xdd))/0x7)+-parseInt(_0x17e235(0xe5))/0x8+parseInt(_0x17e235(0x109))/0x9+parseInt(_0x17e235(0xe9))/0xa;if(_0xc98a4a===_0x129f79)break;else _0x29dcb9['push'](_0x29dcb9['shift']());}catch(_0x4cd612){_0x29dcb9['push'](_0x29dcb9['shift']());}}}(a157_0x3633,0xf391d));import a157_0x3b98fa from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x32d7(_0x57ec7a,_0x36c748){_0x57ec7a=_0x57ec7a-0xd9;const _0x3633cf=a157_0x3633();let _0x32d79f=_0x3633cf[_0x57ec7a];return _0x32d79f;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x2cda8f){const _0x18df60=a157_0x32d7;return _0x2cda8f[_0x18df60(0xd9)]!==_0x18df60(0xeb);}function a157_0x3633(){const _0x21ee71=['parentSegment','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cwd','string','root','invalid_yaml','144rwDTlU','resolve','No\x20tdx.json\x20found','parent_name','no_parent','544422MlZfat','12759uMyHrp','isDirectory','replace','resourceType','no_config','10667169koSSQv','segmentName','type','File\x20not\x20found:\x20','14044UqPqIo','stat','456729UTEdyG','parent_segment','directory','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','join','exists','file','Parent\x20segment\x20not\x20specified','12066912EoIhlG','dirname','readFile','2410TbactN','18228650FVoIOW','context','error','journey','trim','4TPvkEV','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','isScoped','basename','file_not_found','parse','No\x20tdx.json\x20found\x20for\x20file:\x20','match','configDir'];a157_0x3633=function(){return _0x21ee71;};return a157_0x3633();}export function isScopedResolution(_0x42f0ae){const _0x186f96=a157_0x32d7;return _0x42f0ae['type']===_0x186f96(0xdf)||_0x42f0ae[_0x186f96(0xd9)]===_0x186f96(0xe3)||_0x42f0ae['type']==='context';}export function getScopedDetails(_0x22a775){const _0x2ecb22=a157_0x32d7;if(isScopedResolution(_0x22a775))return{'isScoped':_0x22a775[_0x2ecb22(0xf1)],'scopedFolderPath':_0x22a775['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x17caa6,_0x2e03c7){const _0x21f55c=a157_0x32d7;let _0x4dc87b=a157_0x3b98fa[_0x21f55c(0xff)](_0x17caa6);const _0x5947d1=a157_0x3b98fa[_0x21f55c(0xf4)](_0x4dc87b)[_0x21f55c(0xfc)];while(_0x4dc87b!==_0x5947d1){const _0x5c8d16=a157_0x3b98fa[_0x21f55c(0xe1)](_0x4dc87b,'tdx.json');if(await _0x2e03c7[_0x21f55c(0xe2)](_0x5c8d16))try{const _0x37bf12=await _0x2e03c7[_0x21f55c(0xe7)](_0x5c8d16),_0x423ac0=JSON['parse'](_0x37bf12);if(_0x423ac0['parent_segment']&&typeof _0x423ac0[_0x21f55c(0xde)]===_0x21f55c(0xfb))return{'configPath':_0x5c8d16,'configDir':_0x4dc87b,'parentSegment':_0x423ac0[_0x21f55c(0xde)]};}catch{}_0x4dc87b=a157_0x3b98fa[_0x21f55c(0xe6)](_0x4dc87b);}return null;}function calculateScopedPath(_0x458160,_0x25c2a6){const _0x10e683=a157_0x32d7,_0x906662=a157_0x3b98fa['relative'](_0x25c2a6,_0x458160),_0x5b89f6=_0x906662!==''&&_0x906662!=='.'&&!_0x906662['startsWith']('..');return{'isScoped':_0x5b89f6,'scopedFolderPath':_0x5b89f6?_0x906662[_0x10e683(0x106)](/\\/g,'/'):''};}export async function resolveTarget(_0x2d9ecb){const _0x5e3b2c=a157_0x32d7,{arg:_0x5cf9c0,contextParent:_0x4a0356,cwd:cwd=process[_0x5e3b2c(0xfa)](),fs:fs=nodeFileSystem}=_0x2d9ecb;if(_0x5cf9c0&&isYamlFilePath(_0x5cf9c0))try{const _0xee3a76=await resolveYamlFilePath(_0x5cf9c0,fs),_0x96c26d=a157_0x3b98fa[_0x5e3b2c(0xff)](_0x5cf9c0),_0x28809c=a157_0x3b98fa[_0x5e3b2c(0xe6)](_0x96c26d),_0x28d000=await findTdxConfigAsync(_0x28809c,fs);if(!_0x28d000){if(_0x4a0356){const _0x53693d=a157_0x3b98fa['dirname'](_0x96c26d);return{'type':'file','parentName':_0x4a0356,'targetDir':_0x53693d,'configRoot':_0x53693d,'filePath':_0x96c26d,'resourceName':_0xee3a76[_0x5e3b2c(0x10a)],'folderPath':_0xee3a76['folderPath'],'resourceType':_0xee3a76[_0x5e3b2c(0x107)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3b2c(0xeb),'errorCode':'no_config','message':_0x5e3b2c(0xf5)+_0x5cf9c0,'arg':_0x5cf9c0,'helpText':_0x5e3b2c(0xef)};}const _0x4e982a=calculateScopedPath(_0x28809c,_0x28d000[_0x5e3b2c(0xf7)]);return{'type':_0x5e3b2c(0xe3),'parentName':_0x28d000[_0x5e3b2c(0xf8)],'targetDir':_0x28d000[_0x5e3b2c(0xf7)],'configRoot':_0x28d000[_0x5e3b2c(0xf7)],'filePath':_0x96c26d,'resourceName':_0xee3a76[_0x5e3b2c(0x10a)],'folderPath':_0xee3a76['folderPath'],'resourceType':_0xee3a76[_0x5e3b2c(0x107)],'isScoped':_0x4e982a[_0x5e3b2c(0xf1)],'scopedFolderPath':_0x4e982a['scopedFolderPath']};}catch(_0x13a4b5){const _0x5af03c=_0x13a4b5 instanceof Error?_0x13a4b5['message']:String(_0x13a4b5);if(_0x5af03c['includes']('File\x20not\x20found'))return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0xf3),'message':_0x5e3b2c(0xda)+_0x5cf9c0,'arg':_0x5cf9c0};if(_0x5af03c['includes'](_0x5e3b2c(0x100))){if(_0x4a0356){const _0xff2742=a157_0x3b98fa[_0x5e3b2c(0xff)](_0x5cf9c0);if(await fs['exists'](_0xff2742)){const _0x3e0d92=a157_0x3b98fa[_0x5e3b2c(0xe6)](_0xff2742),_0x28548d=await fs['readFile'](_0xff2742),_0x43cd8a=_0x28548d[_0x5e3b2c(0xf6)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5b64bf=_0x28548d[_0x5e3b2c(0xf6)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x1cc772=_0x43cd8a?_0x43cd8a[0x1][_0x5e3b2c(0xed)]():a157_0x3b98fa[_0x5e3b2c(0xf2)](_0x5cf9c0,a157_0x3b98fa['extname'](_0x5cf9c0)),_0x35a643=_0x5b64bf&&_0x5b64bf[0x1]['trim']()===_0x5e3b2c(0xec)?_0x5e3b2c(0xec):'segment';return{'type':_0x5e3b2c(0xe3),'parentName':_0x4a0356,'targetDir':_0x3e0d92,'configRoot':_0x3e0d92,'filePath':_0xff2742,'resourceName':_0x1cc772,'folderPath':'','resourceType':_0x35a643,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5e3b2c(0xeb),'errorCode':'no_config','message':_0x5e3b2c(0xf5)+_0x5cf9c0,'arg':_0x5cf9c0,'helpText':_0x5e3b2c(0xef)};}return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0xfd),'message':_0x5af03c,'arg':_0x5cf9c0};}if(_0x5cf9c0){const _0x4b6ab9=a157_0x3b98fa[_0x5e3b2c(0xff)](cwd,_0x5cf9c0);let _0x22767b=null;try{_0x22767b=await fs[_0x5e3b2c(0xdc)](_0x4b6ab9);}catch{}if(_0x22767b?.[_0x5e3b2c(0x105)]()){const _0x1e3318=await findTdxConfigAsync(_0x4b6ab9,fs);if(_0x1e3318){const _0xcfe9d9=calculateScopedPath(_0x4b6ab9,_0x1e3318[_0x5e3b2c(0xf7)]);return{'type':_0x5e3b2c(0xdf),'parentName':_0x1e3318[_0x5e3b2c(0xf8)],'targetDir':_0x4b6ab9,'configRoot':_0x1e3318[_0x5e3b2c(0xf7)],'isScoped':_0xcfe9d9[_0x5e3b2c(0xf1)],'scopedFolderPath':_0xcfe9d9['scopedFolderPath']};}if(_0x4a0356)return{'type':'directory','parentName':_0x4a0356,'targetDir':_0x4b6ab9,'configRoot':_0x4b6ab9,'isScoped':![],'scopedFolderPath':''};return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0x108),'message':_0x5e3b2c(0xf9)+_0x5cf9c0,'arg':_0x5cf9c0,'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'};}if(_0x22767b?.['isFile']())return{'type':_0x5e3b2c(0xeb),'errorCode':'invalid_yaml','message':'Not\x20a\x20YAML\x20file:\x20'+_0x5cf9c0,'arg':_0x5cf9c0,'helpText':_0x5e3b2c(0xe0)};const _0x1d8a7f=sanitizeFileName(_0x5cf9c0),_0x2b67f7=getSegmentRootDir(_0x1d8a7f,cwd);return{'type':_0x5e3b2c(0x101),'parentName':_0x5cf9c0,'targetDir':_0x2b67f7,'configRoot':_0x2b67f7};}const _0xefafef=await findTdxConfigAsync(cwd,fs);if(_0xefafef){const _0x711db=calculateScopedPath(cwd,_0xefafef['configDir']);return{'type':'context','parentName':_0xefafef[_0x5e3b2c(0xf8)],'targetDir':cwd,'configRoot':_0xefafef[_0x5e3b2c(0xf7)],'isScoped':_0x711db[_0x5e3b2c(0xf1)],'scopedFolderPath':_0x711db[_0x5e3b2c(0xf0)]};}if(_0x4a0356){const _0x3ae5e8=sanitizeFileName(_0x4a0356),_0x3513c2=getSegmentRootDir(_0x3ae5e8,cwd);return{'type':_0x5e3b2c(0xea),'parentName':_0x4a0356,'targetDir':_0x3513c2,'configRoot':_0x3513c2,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3b2c(0xeb),'errorCode':_0x5e3b2c(0x102),'message':_0x5e3b2c(0xe4),'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_0x5a6659=a158_0x22ef;(function(_0x4f9cf0,_0x4a6272){const _0x5d61d5=a158_0x22ef,_0x399ff2=_0x4f9cf0();while(!![]){try{const _0x29252d=parseInt(_0x5d61d5(0x115))/0x1+parseInt(_0x5d61d5(0x111))/0x2+-parseInt(_0x5d61d5(0xfb))/0x3*(-parseInt(_0x5d61d5(0x10d))/0x4)+parseInt(_0x5d61d5(0x114))/0x5*(parseInt(_0x5d61d5(0x10e))/0x6)+parseInt(_0x5d61d5(0x109))/0x7*(parseInt(_0x5d61d5(0x105))/0x8)+parseInt(_0x5d61d5(0x108))/0x9+-parseInt(_0x5d61d5(0x101))/0xa*(parseInt(_0x5d61d5(0x106))/0xb);if(_0x29252d===_0x4a6272)break;else _0x399ff2['push'](_0x399ff2['shift']());}catch(_0x2fe6a4){_0x399ff2['push'](_0x399ff2['shift']());}}}(a158_0xfb07,0xb468c));import{existsSync,readFileSync}from'fs';import a158_0x5f3278 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a158_0x5a6659(0x10a);export function findTdxConfigPath(_0x3b2d3a=process[a158_0x5a6659(0x107)]()){const _0x13cbb5=a158_0x5a6659;let _0x34e6a6=a158_0x5f3278[_0x13cbb5(0x10f)](_0x3b2d3a);const _0x4e9427=a158_0x5f3278[_0x13cbb5(0xfc)](_0x34e6a6)[_0x13cbb5(0xfd)];while(_0x34e6a6!==_0x4e9427){const _0x491ad3=a158_0x5f3278['join'](_0x34e6a6,TDX_CONFIG_FILE);if(existsSync(_0x491ad3))return _0x491ad3;_0x34e6a6=a158_0x5f3278['dirname'](_0x34e6a6);}return null;}export function loadTdxConfig(_0x58f57d){const _0xb6def3=a158_0x5a6659,_0x5e3c8d=readFileSync(_0x58f57d,_0xb6def3(0x112));let _0x360dbd;try{_0x360dbd=JSON[_0xb6def3(0xfc)](_0x5e3c8d);}catch{throw new Error(_0xb6def3(0x10b)+_0x58f57d);}if(!_0x360dbd||typeof _0x360dbd!==_0xb6def3(0x103))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x1eed40=_0x360dbd,_0x4b6fae=_0x1eed40[_0xb6def3(0x113)]&&typeof _0x1eed40[_0xb6def3(0x113)]===_0xb6def3(0x104),_0x4b7bc2=_0x1eed40[_0xb6def3(0x10c)]&&typeof _0x1eed40[_0xb6def3(0x10c)]==='string';if(!_0x4b6fae&&!_0x4b7bc2)throw new Error(_0xb6def3(0x102));const _0x3133ae={};return _0x4b6fae&&(_0x3133ae[_0xb6def3(0x113)]=_0x1eed40[_0xb6def3(0x113)]),_0x4b7bc2&&(_0x3133ae[_0xb6def3(0x10c)]=_0x1eed40[_0xb6def3(0x10c)]),_0x3133ae;}export function findTdxConfig(_0x520a1e=process[a158_0x5a6659(0x107)]()){const _0x5d5d3b=a158_0x5a6659,_0x4bfabb=findTdxConfigPath(_0x520a1e);if(!_0x4bfabb)throw new Error(_0x5d5d3b(0xfe));const _0x15ee2d=loadTdxConfig(_0x4bfabb),_0x2d5ed9=a158_0x5f3278[_0x5d5d3b(0x100)](_0x4bfabb);return{'config':_0x15ee2d,'configPath':_0x4bfabb,'configDir':_0x2d5ed9};}export function tryFindTdxConfig(_0x256efe){try{return findTdxConfig(_0x256efe);}catch{return null;}}function a158_0x22ef(_0xd39da2,_0x23827e){_0xd39da2=_0xd39da2-0xfb;const _0xfb0756=a158_0xfb07();let _0x22efe1=_0xfb0756[_0xd39da2];return _0x22efe1;}export function getSegmentRootDir(_0x166a20,_0x352921=process[a158_0x5a6659(0x107)]()){const _0x555725=a158_0x5a6659;return a158_0x5f3278[_0x555725(0xff)](_0x352921,SEGMENTS_DIR,_0x166a20);}export function getTdxConfigPath(_0x46267e,_0x279e7d=process[a158_0x5a6659(0x107)]()){const _0x41bfe1=a158_0x5a6659;return a158_0x5f3278[_0x41bfe1(0xff)](getSegmentRootDir(_0x46267e,_0x279e7d),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5e4459,_0x25a842){const _0x59b646=a158_0x5a6659,_0x3a349c=a158_0x5f3278[_0x59b646(0x10f)](_0x5e4459),_0x51c6ca=a158_0x5f3278['relative'](_0x25a842,_0x3a349c);if(_0x51c6ca['startsWith']('..'))return'';return _0x51c6ca;}export function localPathToTdFolderPath(_0xd912fa){const _0x2af0e4=a158_0x5a6659,_0x4e15e6=a158_0x5f3278[_0x2af0e4(0x100)](_0xd912fa);if(_0x4e15e6==='.'||_0x4e15e6==='')return'';return _0x4e15e6['replace'](/\\/g,'/');}function a158_0xfb07(){const _0x480b96=['cwd','9202437SNcmxw','49FhAwPp','segments','Invalid\x20JSON\x20in\x20','engage_workspace','4tjdhwf','20928YcprZt','resolve','stringify','968496wMbxNE','utf-8','parent_segment','955trmDPx','835695MQwFGt','2442846ZsUGjs','parse','root','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','join','dirname','40375870rIbPGA','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','object','string','1089848hwNZpG','11HvATeT'];a158_0xfb07=function(){return _0x480b96;};return a158_0xfb07();}export function tdFolderPathToLocalPath(_0x211c9a,_0x416ee9){if(!_0x211c9a)return _0x416ee9;return a158_0x5f3278['join'](_0x416ee9,_0x211c9a);}export function createTdxConfigContent(_0x54ba74){const _0x4cc878=a158_0x5a6659,_0xaca896={'parent_segment':_0x54ba74};return JSON[_0x4cc878(0x110)](_0xaca896,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x12940d){const _0x47956e=a158_0x5a6659,_0x48901c={'engage_workspace':_0x12940d};return JSON[_0x47956e(0x110)](_0x48901c,null,0x2)+'\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a159_0x5071(_0x2c9ad1,_0x4b0142){_0x2c9ad1=_0x2c9ad1-0xcf;const _0xc34458=a159_0xc344();let _0x507120=_0xc34458[_0x2c9ad1];return _0x507120;}const a159_0x56916f=a159_0x5071;(function(_0x5cab40,_0x40916b){const _0x50ec16=a159_0x5071,_0x4c5d85=_0x5cab40();while(!![]){try{const _0x7ea1b3=-parseInt(_0x50ec16(0xd4))/0x1*(parseInt(_0x50ec16(0xe8))/0x2)+-parseInt(_0x50ec16(0xd5))/0x3+-parseInt(_0x50ec16(0xe3))/0x4+parseInt(_0x50ec16(0xef))/0x5*(-parseInt(_0x50ec16(0xd6))/0x6)+parseInt(_0x50ec16(0xf3))/0x7+parseInt(_0x50ec16(0xf9))/0x8*(-parseInt(_0x50ec16(0xf8))/0x9)+parseInt(_0x50ec16(0xdf))/0xa;if(_0x7ea1b3===_0x40916b)break;else _0x4c5d85['push'](_0x4c5d85['shift']());}catch(_0xd30cf3){_0x4c5d85['push'](_0x4c5d85['shift']());}}}(a159_0xc344,0x26ade));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x56916f(0xe9)]([a159_0x56916f(0xd7),a159_0x56916f(0xd2),a159_0x56916f(0xf4),a159_0x56916f(0xea),a159_0x56916f(0xf1),a159_0x56916f(0xf0),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a159_0x56916f(0xf6),a159_0x56916f(0xcf),a159_0x56916f(0xed),'week',a159_0x56916f(0xd1),a159_0x56916f(0xe2),'none']);export const ScheduleDefSchema=z[a159_0x56916f(0xdd)]({'type':ScheduleTypeSchema[a159_0x56916f(0xec)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x56916f(0xe4)]()[a159_0x56916f(0xec)](),'repeat_sub_frequency':z[a159_0x56916f(0xf5)](z[a159_0x56916f(0xe4)]())['optional'](),'start_at':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'end_on':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'timezone':z[a159_0x56916f(0xd0)]()['optional']()});function a159_0xc344(){const _0x7750e9=['optional','day','All','10SEVrGi','cron','monthly','Top-N','1313256ilnoXY','daily','array','minute','asc','918495WAflFH','8tHzGAz','hour','string','month','hourly','masked','3535YYlNqE','795834ElpHdy','9012xqJrcC','none','boolean','desc','rows','nullable','unknown','object','Last','8542380QSnbmC','First','Connection\x20name\x20is\x20required','once','836276ejCAcz','number','Activation\x20name\x20is\x20required','clear','min','172xzaHmY','enum','weekly','cols'];a159_0xc344=function(){return _0x7750e9;};return a159_0xc344();}export const NotificationDefSchema=z[a159_0x56916f(0xdd)]({'notify_on':z[a159_0x56916f(0xf5)](z[a159_0x56916f(0xe9)](['onSuccess','onFailure']))[a159_0x56916f(0xec)](),'email_recipients':z['array'](z[a159_0x56916f(0xd0)]())[a159_0x56916f(0xec)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x56916f(0xd0)](),z[a159_0x56916f(0xdd)]({'name':z['string'](),'type':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'visibility':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xe6),a159_0x56916f(0xd3)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a159_0x56916f(0xdd)]({'columns':z['array'](z[a159_0x56916f(0xdd)]({'name':z[a159_0x56916f(0xd0)](),'type':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'visibility':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xe6),'masked'])[a159_0x56916f(0xec)]()}))[a159_0x56916f(0xec)](),'behavior_table':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'join_row':z[a159_0x56916f(0xe4)]()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'join_strategy':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xee),a159_0x56916f(0xe0),a159_0x56916f(0xde),a159_0x56916f(0xf2)])[a159_0x56916f(0xec)](),'formatting':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xda),a159_0x56916f(0xeb)])['optional'](),'order_by':z[a159_0x56916f(0xf5)](z[a159_0x56916f(0xdd)]({'key':z['string'](),'order':z[a159_0x56916f(0xe9)]([a159_0x56916f(0xf7),a159_0x56916f(0xd9)])}))[a159_0x56916f(0xec)]()});export const ActivationDefSchema=z[a159_0x56916f(0xdd)]({'name':z['string']()['min'](0x1,a159_0x56916f(0xe5)),'description':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'connection':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xe7)](0x1,a159_0x56916f(0xe1)),'all_columns':z[a159_0x56916f(0xd8)]()[a159_0x56916f(0xec)](),'columns':z[a159_0x56916f(0xf5)](ActivationColumnDefSchema)[a159_0x56916f(0xec)](),'schedule':ScheduleDefSchema[a159_0x56916f(0xec)](),'notification':NotificationDefSchema[a159_0x56916f(0xec)](),'connector_config':z['record'](z[a159_0x56916f(0xd0)](),z[a159_0x56916f(0xdc)]())[a159_0x56916f(0xec)](),'activation_template_id':z['string']()[a159_0x56916f(0xdb)]()[a159_0x56916f(0xec)](),'behavior':ActivationBehaviorDefSchema['nullable']()['optional'](),'run_after_journey_refresh':z[a159_0x56916f(0xd8)]()[a159_0x56916f(0xec)](),'nested_workflow_project_name':z[a159_0x56916f(0xd0)]()['optional'](),'nested_workflow_name':z[a159_0x56916f(0xd0)]()[a159_0x56916f(0xec)](),'lock_enabled':z['boolean']()[a159_0x56916f(0xec)]()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a160_0x18cc(){var _0x161331=['229984ozardE','420203JPceEL','2838118oltEME','11536368zRKNkq','2845071BhSUeC','44hxqJwi','36QygPIH','60zTHaLt','284805zlkxfL','3622890ZerJsS'];a160_0x18cc=function(){return _0x161331;};return a160_0x18cc();}(function(_0x32a5da,_0x1314ca){var _0x22a9ff=a160_0x5881,_0x2ac406=_0x32a5da();while(!![]){try{var _0x1800d7=parseInt(_0x22a9ff(0x17e))/0x1+-parseInt(_0x22a9ff(0x180))/0x2+parseInt(_0x22a9ff(0x17d))/0x3+parseInt(_0x22a9ff(0x179))/0x4*(parseInt(_0x22a9ff(0x17c))/0x5)+-parseInt(_0x22a9ff(0x17a))/0x6*(parseInt(_0x22a9ff(0x17f))/0x7)+-parseInt(_0x22a9ff(0x181))/0x8+-parseInt(_0x22a9ff(0x182))/0x9*(-parseInt(_0x22a9ff(0x17b))/0xa);if(_0x1800d7===_0x1314ca)break;else _0x2ac406['push'](_0x2ac406['shift']());}catch(_0x2eea1f){_0x2ac406['push'](_0x2ac406['shift']());}}}(a160_0x18cc,0xb4924));function a160_0x5881(_0x451db1,_0x52e897){_0x451db1=_0x451db1-0x179;var _0x18ccc3=a160_0x18cc();var _0x5881e7=_0x18ccc3[_0x451db1];return _0x5881e7;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a161_0x4790f3=a161_0x1f63;(function(_0x3a260f,_0x13ca06){const _0x344757=a161_0x1f63,_0x3b678f=_0x3a260f();while(!![]){try{const _0x3dd856=-parseInt(_0x344757(0x100))/0x1*(parseInt(_0x344757(0x10b))/0x2)+-parseInt(_0x344757(0xe6))/0x3+-parseInt(_0x344757(0xf1))/0x4+-parseInt(_0x344757(0x10c))/0x5+-parseInt(_0x344757(0xf0))/0x6*(parseInt(_0x344757(0x108))/0x7)+parseInt(_0x344757(0x103))/0x8+-parseInt(_0x344757(0xf8))/0x9*(-parseInt(_0x344757(0xe8))/0xa);if(_0x3dd856===_0x13ca06)break;else _0x3b678f['push'](_0x3b678f['shift']());}catch(_0x4ff096){_0x3b678f['push'](_0x3b678f['shift']());}}}(a161_0x34cf,0xde819));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x4790f3(0xf3)](['draft',a161_0x4790f3(0x105),'launched']);export const ReentryModeTypeSchema=z[a161_0x4790f3(0xf3)](['no_reentry',a161_0x4790f3(0x106),a161_0x4790f3(0xef)]);export const WaitUnitTypeSchema=z[a161_0x4790f3(0xf3)]([a161_0x4790f3(0xee),a161_0x4790f3(0xe7)]);export const StepTypeValueSchema=z[a161_0x4790f3(0xf3)]([a161_0x4790f3(0xf5),'activation','decision_point',a161_0x4790f3(0xf9),a161_0x4790f3(0xed),a161_0x4790f3(0xf7),a161_0x4790f3(0xfd)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x4790f3(0xf6)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x4790f3(0x107)]({'journey':z[a161_0x4790f3(0xf6)](),'stage':z[a161_0x4790f3(0xf6)](),'bundle_id':z['string']()[a161_0x4790f3(0xec)]()});export const CriteriaDefSchema=z[a161_0x4790f3(0x107)]({'name':z['string'](),'description':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x4790f3(0xec)]()});const WaitConditionTimeoutDefSchema=z[a161_0x4790f3(0x107)]({'duration':z[a161_0x4790f3(0xeb)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a161_0x4790f3(0xec)]()}),WaitConditionDefSchema=z[a161_0x4790f3(0x107)]({'segment':z[a161_0x4790f3(0xf6)](),'next':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x4790f3(0xec)]()}),WaitStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'duration':z[a161_0x4790f3(0xeb)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x4790f3(0xec)](),'wait_until':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a161_0x4790f3(0xfb)](z['string']())[a161_0x4790f3(0xec)]()}),StepBaseFields={'name':z[a161_0x4790f3(0xf6)](),'uuid':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'next':z['string']()[a161_0x4790f3(0xec)]()},WaitStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'activation':z[a161_0x4790f3(0xf6)]()}),ActivationStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0x102)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x4790f3(0x107)]({'name':z[a161_0x4790f3(0xf6)](),'segment':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'segment_id':z[a161_0x4790f3(0xf6)]()['optional'](),'excluded':z['boolean']()[a161_0x4790f3(0xec)](),'next':z['string']()[a161_0x4790f3(0xec)]()}),DecisionPointStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'branches':z[a161_0x4790f3(0xfb)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x4790f3(0x107)]({'id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'name':z[a161_0x4790f3(0xf6)](),'percentage':z[a161_0x4790f3(0xeb)](),'next':z[a161_0x4790f3(0xf6)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'variants':z[a161_0x4790f3(0xfb)](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z['boolean']()['optional']()}),AbTestStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0xf9)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x4790f3(0x107)]({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0xed))}),JumpStepParamsDefSchema=z[a161_0x4790f3(0x107)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x4790f3(0xf7)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x4790f3(0x10a)](a161_0x4790f3(0xfd))})[a161_0x4790f3(0xf2)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x4790f3(0x101),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a161_0x34cf(){const _0x4f1d74=['Journey\x20name\x20is\x20required','number','optional','merge','day','reentry_always','6704688JnTHkl','1561192bxyVjs','passthrough','enum','stages','wait','string','jump','1197aQtHkf','ab_test','journeys','array','boolean','end','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','length','11090Chppcy','type','activation','4846296XZxvQG','journey','simulation','reentry_unless_goal_achieved','object','7nuoDWD','record','literal','140gclOix','1411465nBbsEV','2044272BDzMoS','week','267170QYnbJX','isArray'];a161_0x34cf=function(){return _0x4f1d74;};return a161_0x34cf();}export const StageDefSchema=z[a161_0x4790f3(0x107)]({'name':z[a161_0x4790f3(0xf6)](),'description':z['string']()['optional'](),'id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'entry_criteria':CriteriaDefSchema[a161_0x4790f3(0xec)](),'exit_criteria':z[a161_0x4790f3(0xfb)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x4790f3(0xec)](),'root_step':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'steps':z['array'](StepDefSchema)[a161_0x4790f3(0xec)]()});function a161_0x1f63(_0x3e9de0,_0x4d9dab){_0x3e9de0=_0x3e9de0-0xe6;const _0x34cfd9=a161_0x34cf();let _0x1f6386=_0x34cfd9[_0x3e9de0];return _0x1f6386;}export const JourneyEntryDefSchema=z[a161_0x4790f3(0x107)]({'name':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'version':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'state':JourneyStateTypeSchema[a161_0x4790f3(0xec)](),'latest':z[a161_0x4790f3(0xfc)]()[a161_0x4790f3(0xec)](),'stages':z[a161_0x4790f3(0xfb)](StageDefSchema),'id':z['string']()[a161_0x4790f3(0xec)](),'version_number':z[a161_0x4790f3(0xeb)]()[a161_0x4790f3(0xec)](),'goal':CriteriaDefSchema[a161_0x4790f3(0xec)](),'reentry':ReentryModeTypeSchema[a161_0x4790f3(0xec)]()});export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a161_0x4790f3(0x104)),'name':z['string']()['min'](0x1,a161_0x4790f3(0xea)),'description':z[a161_0x4790f3(0xf6)]()['optional'](),'bundle_id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'bundle_name':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'folder_id':z[a161_0x4790f3(0xf6)]()[a161_0x4790f3(0xec)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x4790f3(0xfc)]()[a161_0x4790f3(0xec)](),'goal':CriteriaDefSchema[a161_0x4790f3(0xec)](),'id':z['string']()[a161_0x4790f3(0xec)](),'version':z[a161_0x4790f3(0xf6)]()['optional'](),'version_number':z[a161_0x4790f3(0xeb)]()[a161_0x4790f3(0xec)](),'stages':z['array'](StageDefSchema)[a161_0x4790f3(0xec)](),'versions':z[a161_0x4790f3(0xfb)](JourneyEntryDefSchema)['optional'](),'journeys':z[a161_0x4790f3(0xfb)](JourneyEntryDefSchema)[a161_0x4790f3(0xec)](),'segments':z['record'](z[a161_0x4790f3(0xf6)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a161_0x4790f3(0x109)](z[a161_0x4790f3(0xf6)](),ActivationDefSchema)[a161_0x4790f3(0xec)]()})['refine'](_0x330c34=>{const _0x1d896a=a161_0x4790f3,_0x1719e0=[_0x330c34[_0x1d896a(0xfa)],_0x330c34[_0x1d896a(0xf4)],_0x330c34['versions']]['filter'](_0x2650f1=>Array[_0x1d896a(0xe9)](_0x2650f1)&&_0x2650f1[_0x1d896a(0xff)]>0x0)['length'];return _0x1719e0===0x1;},{'message':a161_0x4790f3(0xfe)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a8f84,_0x19bd51){var _0x25c112=a163_0x9793,_0x5661c6=_0x1a8f84();while(!![]){try{var _0x13eafd=-parseInt(_0x25c112(0xaa))/0x1+-parseInt(_0x25c112(0xb0))/0x2+parseInt(_0x25c112(0xab))/0x3*(-parseInt(_0x25c112(0xae))/0x4)+-parseInt(_0x25c112(0xa9))/0x5+parseInt(_0x25c112(0xaf))/0x6*(-parseInt(_0x25c112(0xb1))/0x7)+-parseInt(_0x25c112(0xad))/0x8+parseInt(_0x25c112(0xac))/0x9;if(_0x13eafd===_0x19bd51)break;else _0x5661c6['push'](_0x5661c6['shift']());}catch(_0x3fb606){_0x5661c6['push'](_0x5661c6['shift']());}}}(a163_0x1c7c,0x94e18));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_0x9793(_0x16974b,_0x132e85){_0x16974b=_0x16974b-0xa9;var _0x1c7c2d=a163_0x1c7c();var _0x97937b=_0x1c7c2d[_0x16974b];return _0x97937b;}function a163_0x1c7c(){var _0x4ca0e7=['922359JbDXnk','6XzKcde','40344309hvuOGd','1503096rLRrvs','1617596iHFJLk','2281134iGqprb','1684000VQqFeI','14CbQAHj','1757315cbqbiZ'];a163_0x1c7c=function(){return _0x4ca0e7;};return a163_0x1c7c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a164_0x56efb6=a164_0x2b11;(function(_0x2bf565,_0x5e9df9){const _0x3a0fa1=a164_0x2b11,_0x382871=_0x2bf565();while(!![]){try{const _0x50ff57=parseInt(_0x3a0fa1(0x14e))/0x1*(-parseInt(_0x3a0fa1(0x17e))/0x2)+parseInt(_0x3a0fa1(0x13b))/0x3+parseInt(_0x3a0fa1(0x160))/0x4+parseInt(_0x3a0fa1(0x170))/0x5*(-parseInt(_0x3a0fa1(0x137))/0x6)+-parseInt(_0x3a0fa1(0x15d))/0x7+-parseInt(_0x3a0fa1(0x143))/0x8*(-parseInt(_0x3a0fa1(0x163))/0x9)+parseInt(_0x3a0fa1(0x167))/0xa;if(_0x50ff57===_0x5e9df9)break;else _0x382871['push'](_0x382871['shift']());}catch(_0x84c7a2){_0x382871['push'](_0x382871['shift']());}}}(a164_0x5d6f,0x1e15f));import{z}from'zod';function a164_0x5d6f(){const _0x15dfe8=['column','TimeRange\x20operator\x20requires\x20\x27from\x27','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Between','Value','min','Less','147603RsRBTR','Last','TimeRange\x20operator\x20requires\x20\x27duration\x27','MISSING_BETWEEN_BOUNDS','enum','realtime','timestamp','boolean','LessEqual','Count','TimeWithinPast','day','Greater','include','custom','579271BrKhqC','has','GreaterEqual','605432rnUIjT','Operator\x20\x27','Sum','117dlReFn','array','Column','exclude','1138620VFLvdH','union','week','Equal','\x27\x20requires\x20a\x20value','string','MISSING_TIME_UNIT','max','TimeWithinNext','24890TMEkUd','First','And','all','optional','operator','literal','record','CountDistinct','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','StartWith','EndWith','batch','funnel_stage','2tpueZf','value','discriminatedUnion','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','addIssue','Min','Max','hour','year','258AcdbRC','Contain','Average','second','402954FLMxyN','minute','number','Segment\x20reference\x20must\x20not\x20be\x20empty','duration','object','from','TimeRange','103448TPEwZN','type','lazy','\x27\x20requires\x20a\x20time\x20unit'];a164_0x5d6f=function(){return _0x15dfe8;};return a164_0x5d6f();}export const OperatorTypeSchema=z[a164_0x56efb6(0x152)](['Equal','Greater',a164_0x56efb6(0x14d),a164_0x56efb6(0x15f),a164_0x56efb6(0x156),'In',a164_0x56efb6(0x14a),'Regexp','IsNull',a164_0x56efb6(0x158),'TimeWithinNext',a164_0x56efb6(0x138),a164_0x56efb6(0x17a),a164_0x56efb6(0x17b),a164_0x56efb6(0x142)]);export const TimeUnitSchema=z['enum']([a164_0x56efb6(0x13a),a164_0x56efb6(0x13c),a164_0x56efb6(0x135),a164_0x56efb6(0x159),a164_0x56efb6(0x169),'month',a164_0x56efb6(0x136)]);export const AggregationTypeSchema=z['enum'](['Count',a164_0x56efb6(0x162),'Average','Min',a164_0x56efb6(0x184),'CountDistinct',a164_0x56efb6(0x171),a164_0x56efb6(0x14f)]);const TemporalValueSchema=z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x140)]({'timestamp':z[a164_0x56efb6(0x16c)]()}),z[a164_0x56efb6(0x140)]({'last':z[a164_0x56efb6(0x168)]([z['number'](),z[a164_0x56efb6(0x177)](z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)]())]),'unit':z[a164_0x56efb6(0x16c)]()})]),OperatorValueSchema=z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x155)](),TemporalValueSchema,z['array'](z['union']([z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x155)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x56efb6(0x16a),a164_0x56efb6(0x15a),a164_0x56efb6(0x15f),'Less',a164_0x56efb6(0x156),'In','Contain',a164_0x56efb6(0x17a),'EndWith','Regexp',a164_0x56efb6(0x158),a164_0x56efb6(0x16f)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x56efb6(0x16f)]);export const OperatorDefSchema=z[a164_0x56efb6(0x140)]({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x56efb6(0x174)](),'value':OperatorValueSchema[a164_0x56efb6(0x174)](),'min':z[a164_0x56efb6(0x168)]([z['number'](),z[a164_0x56efb6(0x16c)](),TemporalValueSchema])[a164_0x56efb6(0x174)](),'max':z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x16c)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a164_0x56efb6(0x13d)]()['optional'](),'week':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)](),'month':z[a164_0x56efb6(0x13d)]()['optional'](),'year':z['number']()['optional'](),'hour':z['number']()[a164_0x56efb6(0x174)](),'minute':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)](),'second':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)]()})[a164_0x56efb6(0x174)](),'from':z['object']({'last':z['union']([z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x16c)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x56efb6(0x155)]()['optional']()})['superRefine']((_0x583cde,_0x450ce7)=>{const _0xbf8adb=a164_0x56efb6;OPERATORS_REQUIRING_VALUE['has'](_0x583cde[_0xbf8adb(0x144)])&&(_0x583cde[_0xbf8adb(0x17f)]===undefined||_0x583cde['value']===null)&&_0x450ce7['addIssue']({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x161)+_0x583cde['type']+_0xbf8adb(0x16b),'path':[_0xbf8adb(0x17f)]}),_0x583cde[_0xbf8adb(0x144)]==='Between'&&_0x583cde[_0xbf8adb(0x14c)]===undefined&&_0x583cde[_0xbf8adb(0x16e)]===undefined&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x181),'params':{'validationCode':_0xbf8adb(0x151)}}),OPERATORS_REQUIRING_UNIT[_0xbf8adb(0x15e)](_0x583cde[_0xbf8adb(0x144)])&&_0x583cde['value']!==undefined&&!_0x583cde['unit']&&_0x450ce7[_0xbf8adb(0x182)]({'code':'custom','message':_0xbf8adb(0x161)+_0x583cde[_0xbf8adb(0x144)]+_0xbf8adb(0x146),'path':['unit'],'params':{'validationCode':_0xbf8adb(0x16d)}}),_0x583cde[_0xbf8adb(0x144)]===_0xbf8adb(0x142)&&(!_0x583cde[_0xbf8adb(0x13f)]&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x150),'path':[_0xbf8adb(0x13f)]}),!_0x583cde[_0xbf8adb(0x141)]&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x148),'path':[_0xbf8adb(0x141)]}));});export const ArrayMatchingSchema=z[a164_0x56efb6(0x168)]([z['literal']('any'),z[a164_0x56efb6(0x176)](a164_0x56efb6(0x173)),z[a164_0x56efb6(0x140)]({'atLeast':z['number']()}),z[a164_0x56efb6(0x140)]({'atMost':z[a164_0x56efb6(0x13d)]()}),z[a164_0x56efb6(0x140)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x56efb6(0x180)](a164_0x56efb6(0x144),[z['object']({'type':z['enum']([a164_0x56efb6(0x162),a164_0x56efb6(0x183),'Max',a164_0x56efb6(0x139)]),'column':z['string'](),'groupingColumns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())[a164_0x56efb6(0x174)]()}),z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x157)),'groupingColumns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())['optional']()}),z['object']({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x178)),'columns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())}),z['object']({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x171),a164_0x56efb6(0x14f)]),'column':z['string'](),'orderColumn':z[a164_0x56efb6(0x16c)](),'groupingColumns':z['array'](z[a164_0x56efb6(0x16c)]())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x56efb6(0x158),'TimeWithinNext',a164_0x56efb6(0x142)]);export const FilterColumnConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x165)),'column':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x56efb6(0x174)]()})['superRefine']((_0x8d7d8,_0x1fc318)=>{const _0xf57221=a164_0x56efb6,_0x26e1ce=_0x8d7d8['operator']['type'];_0x8d7d8[_0xf57221(0x147)]===_0xf57221(0x154)?!TIMESTAMP_OPERATORS['has'](_0x26e1ce)&&_0x1fc318[_0xf57221(0x182)]({'code':_0xf57221(0x15c),'message':_0xf57221(0x149)+_0x26e1ce+'\x27)','path':[_0xf57221(0x175),_0xf57221(0x144)]}):TIMESTAMP_OPERATORS['has'](_0x26e1ce)&&_0x1fc318[_0xf57221(0x182)]({'code':_0xf57221(0x15c),'message':_0xf57221(0x161)+_0x26e1ce+_0xf57221(0x179),'path':[_0xf57221(0x175),_0xf57221(0x144)]});});export const FilterRuleDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x172)),'conditions':z[a164_0x56efb6(0x164)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z['literal'](a164_0x56efb6(0x14b)),'attribute':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x56efb6(0x174)](),'exclude':z[a164_0x56efb6(0x155)]()[a164_0x56efb6(0x174)](),'aggregation':AggregationDefSchema[a164_0x56efb6(0x174)](),'source':z[a164_0x56efb6(0x16c)]()['optional'](),'filter':FilterRuleDefSchema[a164_0x56efb6(0x174)](),'limit':z[a164_0x56efb6(0x13d)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z['literal']('Behavior'),'attribute':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a164_0x56efb6(0x174)](),'source':z['string']()[a164_0x56efb6(0x174)](),'filter':FilterRuleDefSchema[a164_0x56efb6(0x174)](),'timeWindow':TimeWindowDefSchema[a164_0x56efb6(0x174)](),'limit':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)]()}));export const ColumnConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z['literal'](a164_0x56efb6(0x165)),'column':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z['object']({'type':z['enum']([a164_0x56efb6(0x172),'Or']),'conditions':z[a164_0x56efb6(0x164)](ConditionDefSchema),'description':z['string']()['optional']()}));function a164_0x2b11(_0x29342,_0x2fde75){_0x29342=_0x29342-0x135;const _0x5d6f5a=a164_0x5d6f();let _0x2b1151=_0x5d6f5a[_0x29342];return _0x2b1151;}export const SegmentRefConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x15b),a164_0x56efb6(0x166)]),'segment':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x14c)](0x1,a164_0x56efb6(0x13e))});export const ConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x172),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x56efb6(0x16c)]()['optional']()}));export const SegmentDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)]('segment')[a164_0x56efb6(0x174)](),'name':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x14c)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x174)](),'folder':z[a164_0x56efb6(0x16c)]()['optional'](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x17c),a164_0x56efb6(0x153),a164_0x56efb6(0x17d)])['optional'](),'visible':z['boolean']()[a164_0x56efb6(0x174)](),'activations':z[a164_0x56efb6(0x164)](z['any']())[a164_0x56efb6(0x174)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
1
|
+
const a164_0x25a17e=a164_0x30a8;(function(_0x2aa1fd,_0x39613d){const _0x46a9f3=a164_0x30a8,_0xc8e9c=_0x2aa1fd();while(!![]){try{const _0x19793e=-parseInt(_0x46a9f3(0x89))/0x1+-parseInt(_0x46a9f3(0x7f))/0x2*(parseInt(_0x46a9f3(0xb3))/0x3)+-parseInt(_0x46a9f3(0x74))/0x4+-parseInt(_0x46a9f3(0xad))/0x5+parseInt(_0x46a9f3(0xb0))/0x6+parseInt(_0x46a9f3(0x9b))/0x7+-parseInt(_0x46a9f3(0xb9))/0x8*(-parseInt(_0x46a9f3(0x83))/0x9);if(_0x19793e===_0x39613d)break;else _0xc8e9c['push'](_0xc8e9c['shift']());}catch(_0xc1833d){_0xc8e9c['push'](_0xc8e9c['shift']());}}}(a164_0x3eff,0x858ad));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xb2),a164_0x25a17e(0x91),a164_0x25a17e(0x98),a164_0x25a17e(0x90),a164_0x25a17e(0xa1),'In','Between','Regexp',a164_0x25a17e(0x85),a164_0x25a17e(0x6f),'TimeWithinNext',a164_0x25a17e(0x99),'StartWith',a164_0x25a17e(0x96),a164_0x25a17e(0x7d)]);export const TimeUnitSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x9c),a164_0x25a17e(0x6d),a164_0x25a17e(0x94),a164_0x25a17e(0xb6),a164_0x25a17e(0x78),a164_0x25a17e(0x8f),a164_0x25a17e(0x77)]);export const AggregationTypeSchema=z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x80),a164_0x25a17e(0x7b),'Average','Min',a164_0x25a17e(0x8a),a164_0x25a17e(0xa8),a164_0x25a17e(0xac),a164_0x25a17e(0x7e)]);const TemporalValueSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x76)]({'timestamp':z[a164_0x25a17e(0x73)]()}),z[a164_0x25a17e(0x76)]({'last':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x82)](z[a164_0x25a17e(0x73)](),z['number']())]),'unit':z[a164_0x25a17e(0x73)]()})]),OperatorValueSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x73)](),z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x81)](),TemporalValueSchema,z[a164_0x25a17e(0x9a)](z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x73)](),z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x81)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x25a17e(0xb2),a164_0x25a17e(0x91),a164_0x25a17e(0x90),a164_0x25a17e(0x98),a164_0x25a17e(0xa1),'In','Contain','StartWith','EndWith',a164_0x25a17e(0xb7),a164_0x25a17e(0x6f),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x25a17e(0x6f),a164_0x25a17e(0xb4)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a164_0x25a17e(0x81)]()['optional'](),'value':OperatorValueSchema[a164_0x25a17e(0x92)](),'min':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z[a164_0x25a17e(0x73)](),TemporalValueSchema])[a164_0x25a17e(0x92)](),'max':z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0xa7)](),z['string'](),TemporalValueSchema])[a164_0x25a17e(0x92)](),'unit':TimeUnitSchema[a164_0x25a17e(0x92)](),'duration':z[a164_0x25a17e(0x76)]({'day':z[a164_0x25a17e(0xa7)]()['optional'](),'week':z[a164_0x25a17e(0xa7)]()['optional'](),'month':z[a164_0x25a17e(0xa7)]()['optional'](),'year':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)](),'hour':z[a164_0x25a17e(0xa7)]()['optional'](),'minute':z[a164_0x25a17e(0xa7)]()['optional'](),'second':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)]()})['optional'](),'from':z[a164_0x25a17e(0x76)]({'last':z['union']([z[a164_0x25a17e(0xa7)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x25a17e(0x81)]()['optional']()})[a164_0x25a17e(0xa9)]((_0x5cce6d,_0x1bbe9e)=>{const _0x1f75ff=a164_0x25a17e;OPERATORS_REQUIRING_VALUE['has'](_0x5cce6d[_0x1f75ff(0xa6)])&&(_0x5cce6d[_0x1f75ff(0x95)]===undefined||_0x5cce6d[_0x1f75ff(0x95)]===null)&&_0x1bbe9e['addIssue']({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x6e)+_0x5cce6d[_0x1f75ff(0xa6)]+_0x1f75ff(0xae),'path':[_0x1f75ff(0x95)]}),_0x5cce6d[_0x1f75ff(0xa6)]==='Between'&&_0x5cce6d['min']===undefined&&_0x5cce6d[_0x1f75ff(0x8c)]===undefined&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':'custom','message':_0x1f75ff(0xaf),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x1f75ff(0x75)](_0x5cce6d[_0x1f75ff(0xa6)])&&_0x5cce6d[_0x1f75ff(0x95)]!==undefined&&!_0x5cce6d[_0x1f75ff(0x8b)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x6e)+_0x5cce6d['type']+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x1f75ff(0x8b)],'params':{'validationCode':_0x1f75ff(0x9d)}}),_0x5cce6d[_0x1f75ff(0xa6)]===_0x1f75ff(0x7d)&&(!_0x5cce6d[_0x1f75ff(0x70)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0xb8),'path':[_0x1f75ff(0x70)]}),!_0x5cce6d[_0x1f75ff(0x8e)]&&_0x1bbe9e[_0x1f75ff(0x86)]({'code':_0x1f75ff(0x79),'message':_0x1f75ff(0x84),'path':['from']}));});function a164_0x30a8(_0x131158,_0x1433b8){_0x131158=_0x131158-0x6d;const _0x3effa5=a164_0x3eff();let _0x30a84b=_0x3effa5[_0x131158];return _0x30a84b;}export const ArrayMatchingSchema=z[a164_0x25a17e(0x93)]([z[a164_0x25a17e(0x87)](a164_0x25a17e(0x71)),z['literal'](a164_0x25a17e(0x9e)),z['object']({'atLeast':z[a164_0x25a17e(0xa7)]()}),z[a164_0x25a17e(0x76)]({'atMost':z[a164_0x25a17e(0xa7)]()}),z[a164_0x25a17e(0x76)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0x7b),a164_0x25a17e(0xa5),a164_0x25a17e(0x8a),a164_0x25a17e(0x72)]),'column':z[a164_0x25a17e(0x73)](),'groupingColumns':z['array'](z['string']())[a164_0x25a17e(0x92)]()}),z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0x80)),'groupingColumns':z[a164_0x25a17e(0x9a)](z['string']())['optional']()}),z['object']({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xa8)),'columns':z[a164_0x25a17e(0x9a)](z[a164_0x25a17e(0x73)]())}),z[a164_0x25a17e(0x76)]({'type':z['enum']([a164_0x25a17e(0xac),'Last']),'column':z[a164_0x25a17e(0x73)](),'orderColumn':z[a164_0x25a17e(0x73)](),'groupingColumns':z['array'](z[a164_0x25a17e(0x73)]())[a164_0x25a17e(0x92)]()})]);export const TimeWindowDefSchema=z[a164_0x25a17e(0x76)]({'duration':z[a164_0x25a17e(0xa7)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x25a17e(0x6f),a164_0x25a17e(0xb4),'TimeRange']);export const FilterColumnConditionDefSchema=z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)]('Column'),'column':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a164_0x25a17e(0xa9)]((_0x4aa514,_0x5e0774)=>{const _0x518dd6=a164_0x25a17e,_0x144bb6=_0x4aa514[_0x518dd6(0x9f)][_0x518dd6(0xa6)];_0x4aa514[_0x518dd6(0xa4)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x518dd6(0x75)](_0x144bb6)&&_0x5e0774[_0x518dd6(0x86)]({'code':_0x518dd6(0x79),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x144bb6+'\x27)','path':['operator',_0x518dd6(0xa6)]}):TIMESTAMP_OPERATORS[_0x518dd6(0x75)](_0x144bb6)&&_0x5e0774[_0x518dd6(0x86)]({'code':_0x518dd6(0x79),'message':'Operator\x20\x27'+_0x144bb6+_0x518dd6(0x97),'path':[_0x518dd6(0x9f),_0x518dd6(0xa6)]});});function a164_0x3eff(){const _0x3c752f=['First','3504720bbGxFl','\x27\x20requires\x20a\x20value','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','3642906RvocYu','realtime','Equal','24RAkzNS','TimeWithinNext','Value','day','Regexp','TimeRange\x20operator\x20requires\x20\x27duration\x27','12968XFtXrj','minute','Operator\x20\x27','TimeWithinPast','duration','any','Average','string','4192840fHtjod','has','object','year','week','custom','funnel_stage','Sum','enum','TimeRange','Last','124024YHmfKI','Count','boolean','record','11241RbjqDy','TimeRange\x20operator\x20requires\x20\x27from\x27','IsNull','addIssue','literal','include','2277CaTRGu','Max','unit','max','exclude','from','month','GreaterEqual','Greater','optional','union','hour','value','EndWith','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Less','Contain','array','1139152aejPUx','second','MISSING_TIME_UNIT','all','operator','batch','LessEqual','lazy','Segment\x20reference\x20must\x20not\x20be\x20empty','column','Min','type','number','CountDistinct','superRefine','Segment\x20name\x20is\x20required','And'];a164_0x3eff=function(){return _0x3c752f;};return a164_0x3eff();}export const FilterRuleDefSchema=z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xab)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x25a17e(0xa2)](()=>z['object']({'type':z[a164_0x25a17e(0x87)](a164_0x25a17e(0xb5)),'attribute':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x25a17e(0x81)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x25a17e(0x92)](),'source':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'filter':FilterRuleDefSchema[a164_0x25a17e(0x92)](),'limit':z['number']()[a164_0x25a17e(0x92)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x87)]('Behavior'),'attribute':z[a164_0x25a17e(0x73)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x25a17e(0x81)]()[a164_0x25a17e(0x92)](),'aggregation':AggregationDefSchema[a164_0x25a17e(0x92)](),'source':z[a164_0x25a17e(0x73)]()['optional'](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x25a17e(0x92)](),'limit':z[a164_0x25a17e(0xa7)]()[a164_0x25a17e(0x92)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x25a17e(0x87)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xab),'Or']),'conditions':z[a164_0x25a17e(0x9a)](ConditionDefSchema),'description':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum']([a164_0x25a17e(0x88),a164_0x25a17e(0x8d)]),'segment':z[a164_0x25a17e(0x73)]()['min'](0x1,a164_0x25a17e(0xa3))});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x25a17e(0x93)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x25a17e(0xa2)](()=>z[a164_0x25a17e(0x76)]({'type':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xab),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x25a17e(0x92)]()}));export const SegmentDefSchema=z[a164_0x25a17e(0x76)]({'type':z['literal']('segment')[a164_0x25a17e(0x92)](),'name':z[a164_0x25a17e(0x73)]()['min'](0x1,a164_0x25a17e(0xaa)),'description':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'folder':z[a164_0x25a17e(0x73)]()[a164_0x25a17e(0x92)](),'rule':RuleDefSchema[a164_0x25a17e(0x92)](),'kind':z[a164_0x25a17e(0x7c)]([a164_0x25a17e(0xa0),a164_0x25a17e(0xb1),a164_0x25a17e(0x7a)])[a164_0x25a17e(0x92)](),'visible':z[a164_0x25a17e(0x81)]()[a164_0x25a17e(0x92)](),'activations':z['array'](z['any']())['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x375ec0=a165_0x1bb1;(function(_0x82e433,_0x456317){const _0x54c09a=a165_0x1bb1,_0x202e9a=_0x82e433();while(!![]){try{const _0x1fc260=parseInt(_0x54c09a(0xd2))/0x1+-parseInt(_0x54c09a(0xca))/0x2*(-parseInt(_0x54c09a(0xbc))/0x3)+-parseInt(_0x54c09a(0xba))/0x4*(-parseInt(_0x54c09a(0xc7))/0x5)+-parseInt(_0x54c09a(0xc5))/0x6+parseInt(_0x54c09a(0xd1))/0x7+parseInt(_0x54c09a(0xbe))/0x8*(parseInt(_0x54c09a(0xd6))/0x9)+-parseInt(_0x54c09a(0xd3))/0xa;if(_0x1fc260===_0x456317)break;else _0x202e9a['push'](_0x202e9a['shift']());}catch(_0x5d501d){_0x202e9a['push'](_0x202e9a['shift']());}}}(a165_0x2077,0x72268));import{readFileSync}from'fs';import*as a165_0x136169 from'path';import*as a165_0x25210a 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(['email','push']);export function isJourneyDef(_0x1413ed){const _0x32be89=a165_0x1bb1;return typeof _0x1413ed==='object'&&_0x1413ed!==null&&_0x32be89(0xce)in _0x1413ed&&_0x1413ed[_0x32be89(0xce)]===_0x32be89(0xc6);}function a165_0x2077(){const _0x5c6c64=['result','template','object','has','relative','YAML_PARSE_ERROR','4900206bBtVaP','journey','5fjBbvv','not\x20a\x20','valid','4NADBoY','utf-8','skipped','filterType','type','campaign','toJSON','3132325qFeiAd','53322vAjwqB','16958660SzLTGK','map','error','9FTnfNM','segment','message','parseDocument','3299980KEKxuz','campaign_type','1169292curael','length','6998456ezzpUh'];a165_0x2077=function(){return _0x5c6c64;};return a165_0x2077();}export function isCampaignDef(_0x2276d6){const _0x1c55e1=a165_0x1bb1;if(typeof _0x2276d6!=='object'||_0x2276d6===null)return![];const _0x4b093d=_0x2276d6,_0xba2bce=VALID_CAMPAIGN_TYPES[_0x1c55e1(0xc2)](_0x4b093d[_0x1c55e1(0xbb)]);if(_0x4b093d['type']==='campaign'&&_0xba2bce)return!![];if(_0xba2bce&&!_0x4b093d[_0x1c55e1(0xce)])return!![];return![];}export function isTemplateDef(_0x5b4687){const _0x3c0cfd=a165_0x1bb1;return typeof _0x5b4687===_0x3c0cfd(0xc1)&&_0x5b4687!==null&&_0x3c0cfd(0xce)in _0x5b4687&&_0x5b4687[_0x3c0cfd(0xce)]===_0x3c0cfd(0xc0);}export function isValidationResult(_0x2a62d8){const _0x3077a7=a165_0x1bb1;return!(_0x3077a7(0xcc)in _0x2a62d8);}export function createParseErrorResult(_0x2b7e1a,_0x4fe61e,_0x23dd84,_0x5a4bb9,_0x482b75=a165_0x375ec0(0xd7)){const _0x5650dd=a165_0x375ec0;return{'filePath':_0x2b7e1a,'relativePath':_0x4fe61e,'source':_0x23dd84,'result':{'valid':![],'errors':[{'level':_0x5650dd(0xd5),'path':'','code':_0x5650dd(0xc4),'message':_0x5a4bb9}],'warnings':[]},'fileType':_0x482b75};}function a165_0x1bb1(_0x57e4e7,_0x22612f){_0x57e4e7=_0x57e4e7-0xb9;const _0x2077bd=a165_0x2077();let _0x1bb1f6=_0x2077bd[_0x57e4e7];return _0x1bb1f6;}export function validateYamlFile(_0x58379b,_0x40f579,_0xd98f4b={}){const _0x120642=a165_0x375ec0,_0x572483=a165_0x136169[_0x120642(0xc3)](_0x40f579,_0x58379b)||a165_0x136169['basename'](_0x58379b);try{const _0x28128c=readFileSync(_0x58379b,_0x120642(0xcb)),_0x5d8aaf=a165_0x25210a[_0x120642(0xb9)](_0x28128c),_0x212ddd=_0x5d8aaf[_0x120642(0xd0)]();if(!_0x212ddd)return createParseErrorResult(_0x58379b,_0x572483,_0x28128c,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x45502d;if(isJourneyDef(_0x212ddd))_0x45502d=_0x120642(0xc6);else{if(isCampaignDef(_0x212ddd))_0x45502d='campaign';else isTemplateDef(_0x212ddd)?_0x45502d=_0x120642(0xc0):_0x45502d=_0x120642(0xd7);}if(_0xd98f4b[_0x120642(0xcd)]&&_0x45502d!==_0xd98f4b[_0x120642(0xcd)])return{'filePath':_0x58379b,'relativePath':_0x572483,'skipped':!![],'reason':_0x120642(0xc8)+_0xd98f4b[_0x120642(0xcd)]};const _0x2afa9a={'source':_0x28128c,'document':_0x5d8aaf};let _0x900906;if(_0x45502d==='journey')_0x900906=validateJourneyDef(_0x212ddd,_0x2afa9a);else{if(_0x45502d===_0x120642(0xcf))_0x900906=validateCampaignDef(_0x212ddd,_0x2afa9a);else _0x45502d===_0x120642(0xc0)?_0x900906=validateTemplateDef(_0x212ddd,_0x2afa9a):_0x900906=validateSegmentDef(_0x212ddd,_0x2afa9a);}return{'filePath':_0x58379b,'relativePath':_0x572483,'source':_0x28128c,'result':_0x900906,'fileType':_0x45502d};}catch(_0x3df204){const _0x11602d=_0x3df204 instanceof Error?_0x3df204[_0x120642(0xd8)]:String(_0x3df204);return createParseErrorResult(_0x58379b,_0x572483,'','YAML\x20parse\x20error:\x20'+_0x11602d);}}export function validateYamlFiles(_0x269633,_0x522a5d,_0x2c5c96={}){const _0x2577bc=a165_0x375ec0;return _0x269633[_0x2577bc(0xd4)](_0x514242=>validateYamlFile(_0x514242,_0x522a5d,_0x2c5c96));}export function calculateSummary(_0x4eac54){const _0x5f18f1=a165_0x375ec0;let _0x3e2b39=0x0,_0x32e00b=0x0,_0x1b506a=0x0,_0x96f044=0x0;for(const _0x300842 of _0x4eac54){if(!isValidationResult(_0x300842)){_0x96f044++;continue;}_0x300842[_0x5f18f1(0xbf)][_0x5f18f1(0xc9)]?_0x3e2b39++:_0x32e00b++,_0x1b506a+=_0x300842[_0x5f18f1(0xbf)]['warnings'][_0x5f18f1(0xbd)];}return{'validCount':_0x3e2b39,'invalidCount':_0x32e00b,'warningCount':_0x1b506a,'skippedCount':_0x96f044,'hasErrors':_0x32e00b>0x0};}
|