@treasuredata/tdx 0.26.7 → 0.27.0
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.d.ts +4 -2
- package/dist/commands/claude-statusline-command.d.ts.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-statusline-command.js.map +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/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.d.ts.map +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-command.js.map +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-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.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +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/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.d.ts +2 -2
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/passthrough-server.d.ts +18 -3
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.d.ts +20 -2
- package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/proxy/sse-usage-parser.js.map +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/client/cdp-api-client.d.ts +9 -0
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +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/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/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.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +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.d.ts +0 -4
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/personalization.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.d.ts +2 -2
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.d.ts +3 -0
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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/pull-workflow.js.map +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.d.ts +8 -0
- package/dist/sdk/segment/push-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/segment-def.d.ts +10 -1
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +23 -15
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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 +3 -3
- package/dist/utils/port.d.ts +0 -18
- package/dist/utils/port.d.ts.map +0 -1
- package/dist/utils/port.js +0 -1
- package/dist/utils/port.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12daee,_0x350ba7){const _0x5ba98b=a148_0x26f2,_0x3cf0e3=_0x12daee();while(!![]){try{const _0xaa640b=-parseInt(_0x5ba98b(0x102))/0x1+parseInt(_0x5ba98b(0xfb))/0x2*(parseInt(_0x5ba98b(0x101))/0x3)+parseInt(_0x5ba98b(0xf9))/0x4*(-parseInt(_0x5ba98b(0xc6))/0x5)+-parseInt(_0x5ba98b(0xe1))/0x6*(parseInt(_0x5ba98b(0xd5))/0x7)+parseInt(_0x5ba98b(0xf6))/0x8*(parseInt(_0x5ba98b(0xd2))/0x9)+parseInt(_0x5ba98b(0xc7))/0xa*(parseInt(_0x5ba98b(0xda))/0xb)+parseInt(_0x5ba98b(0xca))/0xc*(parseInt(_0x5ba98b(0x100))/0xd);if(_0xaa640b===_0x350ba7)break;else _0x3cf0e3['push'](_0x3cf0e3['shift']());}catch(_0x3426e9){_0x3cf0e3['push'](_0x3cf0e3['shift']());}}}(a148_0x4d12,0x42bc7));import{existsSync,promises as a148_0x24851e}from'fs';import a148_0x598e3e from'path';import a148_0x3d104a from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';function a148_0x26f2(_0x2afc88,_0x2fa171){_0x2afc88=_0x2afc88-0xc6;const _0x4d1224=a148_0x4d12();let _0x26f206=_0x4d1224[_0x2afc88];return _0x26f206;}import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';function a148_0x4d12(){const _0x15c45a=['projectId','filter','3252006CoYAjp','tdx.json','getProject','readFile','message','downloadProjectArchive','stat','catch','modified','cwd','add','join','\x20(archive\x20size:\x20','has','utf-8','mkdir','tdx-wf-pull-','The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.','zlib','isNewProject','tar','88tMFmII','tmpdir','projectName','706532OvqUBc','length','63816HtjRIV','includes','path','mkdtemp','\x20bytes)','105027drsUgD','3ilEVIw','113566vNaZxu','5yQwEWl','290vpPPaT','name','archive.tar.gz','1176tAWfvw','size','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','type','push','sort','Failed\x20to\x20extract\x20project\x20archive','readdir','108522RcsWAg','revision','unchanged','7uiSzZn','unlink','isDirectory','tdx-wf-apply-','extract','56617RpRzaF','WORKFLOW_ARCHIVE_CORRUPTED','deleted','baseDir','targetDir'];a148_0x4d12=function(){return _0x15c45a;};return a148_0x4d12();}import{SDKError,ErrorCode}from'../errors.js';export async function pullWorkflow(_0x10a7e0,_0x1b5c1c,_0x518b4a={}){const _0x40742c=a148_0x26f2,_0x5d43cd=await import('tar'),{client:_0x4b0ca2,resolveProjectId:_0x2c8a1e}=_0x10a7e0,{id:_0x5a1a68,name:_0x597404}=await _0x2c8a1e(_0x1b5c1c),_0x422475=_0x518b4a[_0x40742c(0xdd)]||process[_0x40742c(0xea)](),_0x3bbc39=_0x518b4a['targetDir']||getWorkflowProjectDir(_0x597404,_0x422475),_0x265d42=a148_0x598e3e[_0x40742c(0xec)](_0x3bbc39,_0x40742c(0xe2)),_0x5a6c5a=!existsSync(_0x265d42),_0x1886fc=await a148_0x24851e['mkdtemp'](a148_0x598e3e[_0x40742c(0xec)](a148_0x3d104a[_0x40742c(0xf7)](),_0x40742c(0xf1))),_0x2a4c19=a148_0x598e3e[_0x40742c(0xec)](_0x1886fc,_0x40742c(0xc9)),_0x15f8a8=a148_0x598e3e[_0x40742c(0xec)](_0x1886fc,'extracted');try{await _0x4b0ca2['downloadProjectArchive'](_0x5a1a68,_0x2a4c19,_0x518b4a[_0x40742c(0xd3)]),await a148_0x24851e[_0x40742c(0xf0)](_0x15f8a8,{'recursive':!![]});try{await _0x5d43cd[_0x40742c(0xd9)]({'file':_0x2a4c19,'cwd':_0x15f8a8,'gzip':!![]});}catch(_0x550361){const _0x466df3=_0x550361 instanceof Error?_0x550361[_0x40742c(0xe5)]:String(_0x550361);if(_0x466df3[_0x40742c(0xfc)]('TAR_BAD_ARCHIVE')||_0x466df3['includes'](_0x40742c(0xf3))){const _0x406373=await a148_0x24851e['stat'](_0x2a4c19)[_0x40742c(0xe8)](()=>null),_0x42fa82=_0x406373?_0x40742c(0xed)+_0x406373[_0x40742c(0xcb)]+_0x40742c(0xff):'';throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x40742c(0xd0)+_0x42fa82+':\x20'+_0x466df3,_0x550361,{'helpText':_0x40742c(0xcc)+_0x40742c(0xf2)});}throw _0x550361;}const _0x10fb91=await _0x4b0ca2[_0x40742c(0xe3)](_0x5a1a68),_0x5d6345=_0x518b4a[_0x40742c(0xd3)]||_0x10fb91[_0x40742c(0xd3)]||'latest',_0x2b206e=await calculateChanges(_0x3bbc39,_0x15f8a8,_0x5a6c5a),_0x3aef2c={'new':_0x2b206e[_0x40742c(0xe0)](_0x2b9142=>_0x2b9142['type']==='new')['length'],'modified':_0x2b206e['filter'](_0x26f7f5=>_0x26f7f5[_0x40742c(0xcd)]===_0x40742c(0xe9))[_0x40742c(0xfa)],'deleted':_0x2b206e[_0x40742c(0xe0)](_0x1c9ce4=>_0x1c9ce4[_0x40742c(0xcd)]==='deleted')[_0x40742c(0xfa)],'unchanged':_0x2b206e[_0x40742c(0xe0)](_0x46fbba=>_0x46fbba[_0x40742c(0xcd)]===_0x40742c(0xd4))[_0x40742c(0xfa)]};return{'projectName':_0x597404,'projectId':_0x5a1a68,'revision':_0x5d6345,'targetDir':_0x3bbc39,'changes':_0x2b206e,'summary':_0x3aef2c,'hasChanges':_0x3aef2c['new']>0x0||_0x3aef2c['modified']>0x0||_0x3aef2c[_0x40742c(0xdc)]>0x0,'isNewProject':_0x5a6c5a};}finally{await a148_0x24851e['rm'](_0x1886fc,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x430e24,_0x89f429,_0xd2771d={}){const _0x19f329=a148_0x26f2,_0x47d8bd=await import(_0x19f329(0xf5)),{client:_0xeba765}=_0x430e24,_0xe3c0d1=await a148_0x24851e[_0x19f329(0xfe)](a148_0x598e3e['join'](a148_0x3d104a['tmpdir'](),_0x19f329(0xd8))),_0x30151d=a148_0x598e3e[_0x19f329(0xec)](_0xe3c0d1,_0x19f329(0xc9));try{await _0xeba765[_0x19f329(0xe6)](_0x89f429['projectId'],_0x30151d,_0xd2771d[_0x19f329(0xd3)]),await a148_0x24851e['mkdir'](_0x89f429[_0x19f329(0xde)],{'recursive':!![]});for(const _0x472812 of _0x89f429['changes']){if(_0x472812[_0x19f329(0xcd)]===_0x19f329(0xdc)){const _0x139f31=a148_0x598e3e[_0x19f329(0xec)](_0x89f429[_0x19f329(0xde)],_0x472812[_0x19f329(0xfd)]);await a148_0x24851e[_0x19f329(0xd6)](_0x139f31)[_0x19f329(0xe8)](()=>{});}}try{await _0x47d8bd[_0x19f329(0xd9)]({'file':_0x30151d,'cwd':_0x89f429[_0x19f329(0xde)],'gzip':!![]});}catch(_0x462481){const _0x44a0a6=_0x462481 instanceof Error?_0x462481['message']:String(_0x462481);if(_0x44a0a6[_0x19f329(0xfc)]('TAR_BAD_ARCHIVE')||_0x44a0a6[_0x19f329(0xfc)](_0x19f329(0xf3))){const _0x49b856=await a148_0x24851e[_0x19f329(0xe7)](_0x30151d)['catch'](()=>null),_0x204259=_0x49b856?_0x19f329(0xed)+_0x49b856[_0x19f329(0xcb)]+_0x19f329(0xff):'';throw new SDKError(ErrorCode[_0x19f329(0xdb)],_0x19f329(0xd0)+_0x204259+':\x20'+_0x44a0a6,_0x462481,{'helpText':_0x19f329(0xcc)+_0x19f329(0xf2)});}throw _0x462481;}const _0x3a8175=a148_0x598e3e[_0x19f329(0xec)](_0x89f429['targetDir'],_0x19f329(0xe2));if(_0x89f429[_0x19f329(0xf4)]){const _0x54ab27=createWorkflowTdxConfigContent(_0x89f429[_0x19f329(0xf8)],_0x89f429[_0x19f329(0xdf)],_0x89f429[_0x19f329(0xd3)]);await a148_0x24851e['writeFile'](_0x3a8175,_0x54ab27,_0x19f329(0xef));}else updateWorkflowTdxConfig(_0x3a8175,{'last_pulled_revision':_0x89f429[_0x19f329(0xd3)],'last_pulled_at':new Date()['toISOString']()});}finally{await a148_0x24851e['rm'](_0xe3c0d1,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x567822,_0x9af469,_0x24f1f6){const _0x7b62e5=a148_0x26f2,_0x49e44f=[],_0x55e501=await getAllFiles(_0x9af469),_0x5d0c0d=existsSync(_0x567822)?await getAllFiles(_0x567822):new Set();for(const _0x4d9087 of _0x55e501){const _0x46d97e=a148_0x598e3e[_0x7b62e5(0xec)](_0x567822,_0x4d9087),_0x52655f=a148_0x598e3e['join'](_0x9af469,_0x4d9087);if(_0x4d9087==='tdx.json')continue;const _0x42bc04=await a148_0x24851e[_0x7b62e5(0xe4)](_0x52655f,_0x7b62e5(0xef))['catch'](()=>null);if(_0x42bc04===null)continue;if(!existsSync(_0x46d97e)||_0x24f1f6)_0x49e44f['push']({'path':_0x4d9087,'type':'new','newContent':_0x42bc04});else{const _0x5f2341=await a148_0x24851e[_0x7b62e5(0xe4)](_0x46d97e,_0x7b62e5(0xef))['catch'](()=>null);if(_0x5f2341===null)_0x49e44f[_0x7b62e5(0xce)]({'path':_0x4d9087,'type':_0x7b62e5(0xe9),'newContent':_0x42bc04});else{if(_0x5f2341!==_0x42bc04){const _0x448b11=generateDiff(_0x5f2341,_0x42bc04),_0x1c7d76=hasChanges(_0x448b11)?formatDiffWithColors(_0x448b11):undefined;_0x49e44f['push']({'path':_0x4d9087,'type':'modified','oldContent':_0x5f2341,'newContent':_0x42bc04,'diff':_0x1c7d76});}else _0x49e44f[_0x7b62e5(0xce)]({'path':_0x4d9087,'type':_0x7b62e5(0xd4)});}}}if(!_0x24f1f6)for(const _0x73cf75 of _0x5d0c0d){if(_0x73cf75===_0x7b62e5(0xe2))continue;if(!_0x55e501[_0x7b62e5(0xee)](_0x73cf75)){const _0x21ca45=a148_0x598e3e['join'](_0x567822,_0x73cf75),_0x11d990=await a148_0x24851e[_0x7b62e5(0xe4)](_0x21ca45,'utf-8')[_0x7b62e5(0xe8)](()=>undefined);_0x49e44f[_0x7b62e5(0xce)]({'path':_0x73cf75,'type':_0x7b62e5(0xdc),'oldContent':_0x11d990});}}return _0x49e44f[_0x7b62e5(0xcf)]((_0x470350,_0x120927)=>_0x470350['path']['localeCompare'](_0x120927[_0x7b62e5(0xfd)])),_0x49e44f;}async function getAllFiles(_0x49e983,_0x5d6c42=''){const _0x5141c6=a148_0x26f2,_0x2bcb1c=new Set();if(!existsSync(_0x49e983))return _0x2bcb1c;const _0x1b506a=await a148_0x24851e[_0x5141c6(0xd1)](_0x49e983,{'withFileTypes':!![]});for(const _0x55cea5 of _0x1b506a){const _0x169291=_0x5d6c42?a148_0x598e3e['join'](_0x5d6c42,_0x55cea5[_0x5141c6(0xc8)]):_0x55cea5['name'];if(_0x55cea5[_0x5141c6(0xd7)]()){const _0x414772=await getAllFiles(a148_0x598e3e[_0x5141c6(0xec)](_0x49e983,_0x55cea5['name']),_0x169291);for(const _0x23db08 of _0x414772){_0x2bcb1c[_0x5141c6(0xeb)](_0x23db08);}}else _0x2bcb1c[_0x5141c6(0xeb)](_0x169291);}return _0x2bcb1c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a149_0x2b2f(){const _0x563d87=['tar','configPath','revision','endsWith','message','type','stat','sort','zlib','replace','new','mkdir','filter','148POjkLy','push','archive.tar.gz','113139BzDScX','toISOString','249578hgqjem','join','path','modified','280OzgbKM','No\x20','sourceDir','projectName','8TiVebM','Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.','tmpdir','downloadProjectArchive','utf-8','deleted','create','workflow_project','mkdtemp','114646vVKxjZ','\x20bytes)','skipValidation','485gcFZFW','27981zVoCgn','.digdagignore','cwd','catch','\x20(archive\x20size:\x20','includes','add','WORKFLOW_ARCHIVE_CORRUPTED','readFile','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','posix','readdir','size','tdx.json','3632926cCAJDG','length','name','636180qKIeHl','1758aUYYGv','TAR_BAD_ARCHIVE','tdx-wf-push-'];a149_0x2b2f=function(){return _0x563d87;};return a149_0x2b2f();}(function(_0x1eb250,_0x3f4b04){const _0xf198d7=a149_0x4ed1,_0x503d22=_0x1eb250();while(!![]){try{const _0x193d4f=parseInt(_0xf198d7(0x1ee))/0x1+-parseInt(_0xf198d7(0x1d8))/0x2+-parseInt(_0xf198d7(0x203))/0x3*(-parseInt(_0xf198d7(0x1e9))/0x4)+-parseInt(_0xf198d7(0x202))/0x5*(parseInt(_0xf198d7(0x1d9))/0x6)+parseInt(_0xf198d7(0x1ff))/0x7*(parseInt(_0xf198d7(0x1f6))/0x8)+-parseInt(_0xf198d7(0x1ec))/0x9*(parseInt(_0xf198d7(0x1f2))/0xa)+parseInt(_0xf198d7(0x1d5))/0xb;if(_0x193d4f===_0x3f4b04)break;else _0x503d22['push'](_0x503d22['shift']());}catch(_0x356ae4){_0x503d22['push'](_0x503d22['shift']());}}}(a149_0x2b2f,0x3b486));import{promises as a149_0x35c219}from'fs';import a149_0x1a0a10 from'path';function a149_0x4ed1(_0x5925c6,_0x4020c7){_0x5925c6=_0x5925c6-0x1d2;const _0x2b2fe1=a149_0x2b2f();let _0x4ed14e=_0x2b2fe1[_0x5925c6];return _0x4ed14e;}import a149_0x100c91 from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{findWorkflowTdxConfig,updateWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION,loadDigdagignore,createIgnoreInstance,addScopedPatterns,shouldIgnoreWithInstance}from'./workflow-utils.js';import{SDKError,ErrorCode}from'../errors.js';export async function preparePushWorkflow(_0x210efa,_0x3c8b64={}){const _0xbb083a=a149_0x4ed1,_0x3cda3d=await import(_0xbb083a(0x1dc)),{client:_0x1217dc,resolveProjectId:_0xba9e98}=_0x210efa,_0x42384c=_0x3c8b64[_0xbb083a(0x1f4)]||process[_0xbb083a(0x205)](),_0x2327e7=findWorkflowTdxConfig(_0x42384c),{config:_0x37c533,configDir:_0x14970a}=_0x2327e7;let _0x2ae78a,_0xa86be=_0x37c533[_0xbb083a(0x1fd)];try{const _0x366af7=await _0xba9e98(_0x37c533['workflow_project']);_0x2ae78a=_0x366af7['id'],_0xa86be=_0x366af7[_0xbb083a(0x1d7)];}catch{_0x2ae78a='';}const _0x3f5738=_0x3c8b64[_0xbb083a(0x1de)]||new Date()[_0xbb083a(0x1ed)]()[_0xbb083a(0x1e5)](/[:.]/g,'-');if(!_0x3c8b64[_0xbb083a(0x201)]){const _0x1d3cca=await a149_0x35c219['readdir'](_0x14970a),_0xc8a842=_0x1d3cca[_0xbb083a(0x1e8)](_0x537504=>_0x537504[_0xbb083a(0x1df)](WORKFLOW_FILE_EXTENSION));if(_0xc8a842[_0xbb083a(0x1d6)]===0x0)throw new Error(_0xbb083a(0x1f3)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20'+_0x14970a);}const _0xd51495=await getProjectFiles(_0x14970a);let _0x21dfb7;if(_0x2ae78a){const _0x388215=await a149_0x35c219[_0xbb083a(0x1fe)](a149_0x1a0a10[_0xbb083a(0x1ef)](a149_0x100c91[_0xbb083a(0x1f8)](),_0xbb083a(0x1db))),_0x2e779c=a149_0x1a0a10[_0xbb083a(0x1ef)](_0x388215,_0xbb083a(0x1eb)),_0x562250=a149_0x1a0a10[_0xbb083a(0x1ef)](_0x388215,'extracted');try{await _0x1217dc[_0xbb083a(0x1f9)](_0x2ae78a,_0x2e779c),await a149_0x35c219[_0xbb083a(0x1e7)](_0x562250,{'recursive':!![]});try{await _0x3cda3d['extract']({'file':_0x2e779c,'cwd':_0x562250,'gzip':!![]});}catch(_0x25e254){const _0x3b7875=_0x25e254 instanceof Error?_0x25e254[_0xbb083a(0x1e0)]:String(_0x25e254);if(_0x3b7875[_0xbb083a(0x208)](_0xbb083a(0x1da))||_0x3b7875[_0xbb083a(0x208)](_0xbb083a(0x1e4))){const _0x265fb8=await a149_0x35c219[_0xbb083a(0x1e2)](_0x2e779c)['catch'](()=>null),_0x16086b=_0x265fb8?_0xbb083a(0x207)+_0x265fb8[_0xbb083a(0x1d3)]+_0xbb083a(0x200):'';throw new SDKError(ErrorCode[_0xbb083a(0x20a)],_0xbb083a(0x20c)+_0x16086b+':\x20'+_0x3b7875,_0x25e254,{'helpText':_0xbb083a(0x1f7)});}throw _0x25e254;}_0x21dfb7=await calculatePushChanges(_0x14970a,_0x562250,_0xd51495);}finally{await a149_0x35c219['rm'](_0x388215,{'recursive':!![],'force':!![]});}}else{_0x21dfb7=[];for(const _0x5cc942 of _0xd51495){const _0x4e51b3=a149_0x1a0a10[_0xbb083a(0x1ef)](_0x14970a,_0x5cc942),_0x205aab=await a149_0x35c219['readFile'](_0x4e51b3,_0xbb083a(0x1fa))[_0xbb083a(0x206)](()=>null);_0x21dfb7[_0xbb083a(0x1ea)]({'path':_0x5cc942,'type':_0xbb083a(0x1e6),'newContent':_0x205aab||undefined});}}const _0xe01525={'new':_0x21dfb7[_0xbb083a(0x1e8)](_0x12b9b8=>_0x12b9b8[_0xbb083a(0x1e1)]===_0xbb083a(0x1e6))[_0xbb083a(0x1d6)],'modified':_0x21dfb7[_0xbb083a(0x1e8)](_0x35b7e0=>_0x35b7e0['type']===_0xbb083a(0x1f1))[_0xbb083a(0x1d6)],'deleted':_0x21dfb7[_0xbb083a(0x1e8)](_0x1a70b9=>_0x1a70b9[_0xbb083a(0x1e1)]===_0xbb083a(0x1fb))[_0xbb083a(0x1d6)],'unchanged':_0x21dfb7[_0xbb083a(0x1e8)](_0x3886c7=>_0x3886c7['type']==='unchanged')[_0xbb083a(0x1d6)]};return{'projectName':_0xa86be,'projectId':_0x2ae78a,'revision':_0x3f5738,'sourceDir':_0x14970a,'changes':_0x21dfb7,'summary':_0xe01525,'hasChanges':_0xe01525[_0xbb083a(0x1e6)]>0x0||_0xe01525[_0xbb083a(0x1f1)]>0x0||_0xe01525[_0xbb083a(0x1fb)]>0x0,'configResult':_0x2327e7};}export async function executePushWorkflow(_0x4cc88f,_0x953eee){const _0x250c11=a149_0x4ed1,_0x1ada1a=await import(_0x250c11(0x1dc)),{client:_0x496e30}=_0x4cc88f,_0x3a7255=await getProjectFiles(_0x953eee[_0x250c11(0x1f4)]),_0x1d9d0c=await a149_0x35c219[_0x250c11(0x1fe)](a149_0x1a0a10['join'](a149_0x100c91[_0x250c11(0x1f8)](),'tdx-wf-push-archive-')),_0x25e0aa=a149_0x1a0a10[_0x250c11(0x1ef)](_0x1d9d0c,_0x250c11(0x1eb));try{await _0x1ada1a[_0x250c11(0x1fc)]({'file':_0x25e0aa,'gzip':!![],'cwd':_0x953eee[_0x250c11(0x1f4)],'portable':!![]},_0x3a7255);const _0x161332=await _0x496e30['uploadProjectArchive'](_0x953eee[_0x250c11(0x1f5)],_0x953eee[_0x250c11(0x1de)],_0x25e0aa);return updateWorkflowTdxConfig(_0x953eee['configResult'][_0x250c11(0x1dd)],{'workflow_project_id':_0x161332['id'],'last_pushed_revision':_0x161332[_0x250c11(0x1de)],'last_pushed_at':new Date()[_0x250c11(0x1ed)]()}),{'projectId':_0x161332['id'],'projectName':_0x161332[_0x250c11(0x1d7)],'revision':_0x161332[_0x250c11(0x1de)]};}finally{await a149_0x35c219['rm'](_0x1d9d0c,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x2eb041,_0x2d18c7=_0x2eb041,_0x5afdd0='',_0x2f1e91=null){const _0x32a731=a149_0x4ed1,_0x52d996=[];if(_0x2f1e91===null){_0x2f1e91=createIgnoreInstance();const _0x188348=await loadDigdagignore(_0x2eb041);_0x188348&&_0x2f1e91[_0x32a731(0x209)](_0x188348);}if(_0x5afdd0!==''){const _0x5ac748=await loadDigdagignore(_0x2d18c7);_0x5ac748&&addScopedPatterns(_0x2f1e91,_0x5ac748,_0x5afdd0);}const _0x4c8e22=await a149_0x35c219[_0x32a731(0x1d2)](_0x2d18c7,{'withFileTypes':!![]});for(const _0xa75ddb of _0x4c8e22){const _0x37eba7=_0x5afdd0?a149_0x1a0a10[_0x32a731(0x20d)][_0x32a731(0x1ef)](_0x5afdd0,_0xa75ddb['name']):_0xa75ddb[_0x32a731(0x1d7)];if(_0xa75ddb[_0x32a731(0x1d7)]===_0x32a731(0x1d4))continue;if(_0xa75ddb[_0x32a731(0x1d7)]===_0x32a731(0x204))continue;if(!shouldIncludeInArchive(_0xa75ddb[_0x32a731(0x1d7)]))continue;if(shouldIgnoreWithInstance(_0x2f1e91,_0x37eba7,_0xa75ddb['isDirectory']()))continue;if(_0xa75ddb['isDirectory']()){const _0xe77c59=await getProjectFiles(_0x2eb041,a149_0x1a0a10[_0x32a731(0x1ef)](_0x2d18c7,_0xa75ddb[_0x32a731(0x1d7)]),_0x37eba7,_0x2f1e91);_0x52d996['push'](..._0xe77c59);}else _0x52d996[_0x32a731(0x1ea)](_0x37eba7);}return _0x52d996;}async function calculatePushChanges(_0x1d06d2,_0x2d6996,_0x2790d8){const _0x2ffd23=a149_0x4ed1,_0x37b66c=[],_0x597470=new Set(await getProjectFiles(_0x2d6996));for(const _0x2ffea9 of _0x2790d8){const _0x3c6d78=a149_0x1a0a10[_0x2ffd23(0x1ef)](_0x1d06d2,_0x2ffea9),_0x1e9676=a149_0x1a0a10[_0x2ffd23(0x1ef)](_0x2d6996,_0x2ffea9),_0x4d6eb5=await a149_0x35c219['readFile'](_0x3c6d78,_0x2ffd23(0x1fa))[_0x2ffd23(0x206)](()=>null);if(_0x4d6eb5===null)continue;if(!_0x597470['has'](_0x2ffea9))_0x37b66c[_0x2ffd23(0x1ea)]({'path':_0x2ffea9,'type':_0x2ffd23(0x1e6),'newContent':_0x4d6eb5});else{const _0x28e74f=await a149_0x35c219[_0x2ffd23(0x20b)](_0x1e9676,_0x2ffd23(0x1fa))[_0x2ffd23(0x206)](()=>null);if(_0x28e74f===null)_0x37b66c[_0x2ffd23(0x1ea)]({'path':_0x2ffea9,'type':_0x2ffd23(0x1f1),'newContent':_0x4d6eb5});else{if(_0x28e74f!==_0x4d6eb5){const _0x17897c=generateDiff(_0x28e74f,_0x4d6eb5),_0x4a1a88=hasChanges(_0x17897c)?formatDiffWithColors(_0x17897c):undefined;_0x37b66c[_0x2ffd23(0x1ea)]({'path':_0x2ffea9,'type':'modified','oldContent':_0x28e74f,'newContent':_0x4d6eb5,'diff':_0x4a1a88});}else _0x37b66c[_0x2ffd23(0x1ea)]({'path':_0x2ffea9,'type':'unchanged'});}}}for(const _0x416256 of _0x597470){if(!_0x2790d8['includes'](_0x416256)){const _0x4ba60f=a149_0x1a0a10[_0x2ffd23(0x1ef)](_0x2d6996,_0x416256),_0x1ce12e=await a149_0x35c219[_0x2ffd23(0x20b)](_0x4ba60f,_0x2ffd23(0x1fa))[_0x2ffd23(0x206)](()=>undefined);_0x37b66c[_0x2ffd23(0x1ea)]({'path':_0x416256,'type':_0x2ffd23(0x1fb),'oldContent':_0x1ce12e});}}return _0x37b66c[_0x2ffd23(0x1e3)]((_0x34f5eb,_0x2f96df)=>_0x34f5eb['path']['localeCompare'](_0x2f96df[_0x2ffd23(0x1f0)])),_0x37b66c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0xf7cec6=a150_0x46fb;function a150_0x59ea(){const _0x398c94=['No\x20workflow\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','tdx.json','7ygUinI','10301170MyHBpc','join','432600MuIjqc','7jpgNQo','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27workflow_project\x27\x20field','dirname','45BcPzgj','last_pulled_at','root','workflow_project_id','695990kfOObu','workflow_project','string','6ZCYTKI','cwd','stringify','960632RfQFnf','last_pushed_revision','122738pCCNLt','parse','Invalid\x20tdx.json:\x20expected\x20object','last_pushed_at','2499490GBHKMR','1226079usNiFX','toISOString','utf-8','resolve'];a150_0x59ea=function(){return _0x398c94;};return a150_0x59ea();}(function(_0x3d2028,_0x351dfb){const _0xc14cad=a150_0x46fb,_0x16f05a=_0x3d2028();while(!![]){try{const _0x3978cc=-parseInt(_0xc14cad(0x161))/0x1*(-parseInt(_0xc14cad(0x152))/0x2)+parseInt(_0xc14cad(0x157))/0x3+parseInt(_0xc14cad(0x160))/0x4+-parseInt(_0xc14cad(0x156))/0x5*(-parseInt(_0xc14cad(0x14d))/0x6)+parseInt(_0xc14cad(0x15d))/0x7*(parseInt(_0xc14cad(0x150))/0x8)+-parseInt(_0xc14cad(0x164))/0x9*(parseInt(_0xc14cad(0x168))/0xa)+-parseInt(_0xc14cad(0x15e))/0xb;if(_0x3978cc===_0x351dfb)break;else _0x16f05a['push'](_0x16f05a['shift']());}catch(_0x4cb85b){_0x16f05a['push'](_0x16f05a['shift']());}}}(a150_0x59ea,0x44d52));import{existsSync,readFileSync,writeFileSync}from'fs';import a150_0xfedc72 from'path';const TDX_CONFIG_FILE=a150_0xf7cec6(0x15c),WORKFLOWS_DIR='workflows';export function findWorkflowTdxConfigPath(_0x48bc75=process[a150_0xf7cec6(0x14e)]()){const _0xc90ce2=a150_0xf7cec6;let _0x3f3f8c=a150_0xfedc72[_0xc90ce2(0x15a)](_0x48bc75);const _0x359095=a150_0xfedc72[_0xc90ce2(0x153)](_0x3f3f8c)[_0xc90ce2(0x166)];while(_0x3f3f8c!==_0x359095){const _0x3c1a21=a150_0xfedc72['join'](_0x3f3f8c,TDX_CONFIG_FILE);if(existsSync(_0x3c1a21))try{const _0x5d4057=readFileSync(_0x3c1a21,_0xc90ce2(0x159)),_0x3eea0c=JSON[_0xc90ce2(0x153)](_0x5d4057);if(_0x3eea0c&&typeof _0x3eea0c==='object'&&'workflow_project'in _0x3eea0c)return _0x3c1a21;}catch{}_0x3f3f8c=a150_0xfedc72[_0xc90ce2(0x163)](_0x3f3f8c);}return null;}export function loadWorkflowTdxConfig(_0xe8c002){const _0x345515=a150_0xf7cec6,_0x462ca3=readFileSync(_0xe8c002,'utf-8');let _0x18c0e6;try{_0x18c0e6=JSON[_0x345515(0x153)](_0x462ca3);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0xe8c002);}if(!_0x18c0e6||typeof _0x18c0e6!=='object')throw new Error(_0x345515(0x154));const _0x5f01b2=_0x18c0e6;if(!_0x5f01b2[_0x345515(0x169)]||typeof _0x5f01b2['workflow_project']!==_0x345515(0x16a))throw new Error(_0x345515(0x162));return{'workflow_project':_0x5f01b2[_0x345515(0x169)],'workflow_project_id':typeof _0x5f01b2['workflow_project_id']==='string'?_0x5f01b2[_0x345515(0x167)]:undefined,'last_pulled_revision':typeof _0x5f01b2['last_pulled_revision']===_0x345515(0x16a)?_0x5f01b2['last_pulled_revision']:undefined,'last_pulled_at':typeof _0x5f01b2[_0x345515(0x165)]===_0x345515(0x16a)?_0x5f01b2[_0x345515(0x165)]:undefined,'last_pushed_revision':typeof _0x5f01b2[_0x345515(0x151)]==='string'?_0x5f01b2[_0x345515(0x151)]:undefined,'last_pushed_at':typeof _0x5f01b2[_0x345515(0x155)]==='string'?_0x5f01b2[_0x345515(0x155)]:undefined};}export function findWorkflowTdxConfig(_0x1a5118=process['cwd']()){const _0x33c5db=a150_0xf7cec6,_0x3ad168=findWorkflowTdxConfigPath(_0x1a5118);if(!_0x3ad168)throw new Error(_0x33c5db(0x15b));const _0x50b7d2=loadWorkflowTdxConfig(_0x3ad168),_0x1580ac=a150_0xfedc72[_0x33c5db(0x163)](_0x3ad168);return{'config':_0x50b7d2,'configPath':_0x3ad168,'configDir':_0x1580ac};}export function tryFindWorkflowTdxConfig(_0x8af4cc){try{return findWorkflowTdxConfig(_0x8af4cc);}catch{return null;}}export function getWorkflowProjectDir(_0x42e23a,_0x7516bd=process['cwd']()){const _0x5a72ff=a150_0xf7cec6;return a150_0xfedc72[_0x5a72ff(0x15f)](_0x7516bd,WORKFLOWS_DIR,_0x42e23a);}function a150_0x46fb(_0x266d64,_0x12c06b){_0x266d64=_0x266d64-0x14d;const _0x59eaf0=a150_0x59ea();let _0x46fb86=_0x59eaf0[_0x266d64];return _0x46fb86;}export function getWorkflowTdxConfigPath(_0x3b0bf7,_0x38259b=process[a150_0xf7cec6(0x14e)]()){const _0x152759=a150_0xf7cec6;return a150_0xfedc72[_0x152759(0x15f)](getWorkflowProjectDir(_0x3b0bf7,_0x38259b),TDX_CONFIG_FILE);}export function createWorkflowTdxConfigContent(_0x394534,_0x4cfb80,_0x36edee){const _0x5e7a75=a150_0xf7cec6,_0xc5ce5c={'workflow_project':_0x394534,..._0x4cfb80&&{'workflow_project_id':_0x4cfb80},..._0x36edee&&{'last_pulled_revision':_0x36edee},'last_pulled_at':new Date()[_0x5e7a75(0x158)]()};return JSON[_0x5e7a75(0x14f)](_0xc5ce5c,null,0x2)+'\x0a';}export function saveWorkflowTdxConfig(_0x310090,_0xe081e){const _0x3d5e3f=a150_0xf7cec6,_0x5296f7=JSON[_0x3d5e3f(0x14f)](_0xe081e,null,0x2)+'\x0a';writeFileSync(_0x310090,_0x5296f7,_0x3d5e3f(0x159));}export function updateWorkflowTdxConfig(_0x465f80,_0x2354c9){const _0x5200da=loadWorkflowTdxConfig(_0x465f80),_0x2a4022={..._0x5200da,..._0x2354c9};saveWorkflowTdxConfig(_0x465f80,_0x2a4022);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a151_0x5ebb54=a151_0x2862;(function(_0x1d5983,_0x743b8d){const _0x2ff746=a151_0x2862,_0x37feae=_0x1d5983();while(!![]){try{const _0x6ae042=-parseInt(_0x2ff746(0x140))/0x1*(parseInt(_0x2ff746(0x133))/0x2)+parseInt(_0x2ff746(0x13a))/0x3*(parseInt(_0x2ff746(0x130))/0x4)+parseInt(_0x2ff746(0x12b))/0x5+parseInt(_0x2ff746(0x12e))/0x6*(parseInt(_0x2ff746(0x13d))/0x7)+parseInt(_0x2ff746(0x144))/0x8*(parseInt(_0x2ff746(0x136))/0x9)+parseInt(_0x2ff746(0x139))/0xa+parseInt(_0x2ff746(0x141))/0xb*(-parseInt(_0x2ff746(0x13e))/0xc);if(_0x6ae042===_0x743b8d)break;else _0x37feae['push'](_0x37feae['shift']());}catch(_0x2f752b){_0x37feae['push'](_0x37feae['shift']());}}}(a151_0x4044,0xc2e64));import{promises as a151_0x2849e2}from'fs';import a151_0x147237 from'path';import a151_0x428b1f from'ignore';function a151_0x4044(){const _0x2f5093=['1805639nFmwFt','map','length','1084888uxVDmF','7306500wnZzVr','join','utf-8','288MJQtVw','filter','8yeOXVs','slice','code','128340VvTceB','replace','add','36LwjqUV','startsWith','.dig','9827130SWmxLx','160371amnUfP','endsWith','Thumbs.db','196084STwKUX','252XvbPWq','readFile','3brRXpw'];a151_0x4044=function(){return _0x2f5093;};return a151_0x4044();}export const WORKFLOW_FILE_EXTENSION=a151_0x5ebb54(0x138);export function shouldIncludeInArchive(_0x3b4d1a){const _0x10e957=a151_0x5ebb54;if(_0x3b4d1a==='.digdag')return!![];if(_0x3b4d1a[_0x10e957(0x137)]('.'))return![];if(_0x3b4d1a[_0x10e957(0x13b)]('~'))return![];if(_0x3b4d1a===_0x10e957(0x13c)||_0x3b4d1a==='.DS_Store')return![];return!![];}export function parseDigdagignore(_0x4abfa3){const _0xb21cdf=a151_0x5ebb54;return _0x4abfa3['split']('\x0a')[_0xb21cdf(0x142)](_0x51178f=>_0x51178f['trim']())[_0xb21cdf(0x12f)](_0x333e27=>_0x333e27['length']>0x0&&!_0x333e27[_0xb21cdf(0x137)]('#'));}export async function loadDigdagignore(_0x24da7c){const _0x5651ae=a151_0x5ebb54,_0x1bd387=a151_0x147237[_0x5651ae(0x12c)](_0x24da7c,'.digdagignore');try{const _0x555ac2=await a151_0x2849e2[_0x5651ae(0x13f)](_0x1bd387,_0x5651ae(0x12d));return parseDigdagignore(_0x555ac2);}catch(_0x54af56){if(_0x54af56[_0x5651ae(0x132)]==='ENOENT')return null;throw _0x54af56;}}function a151_0x2862(_0x3887af,_0x592b6f){_0x3887af=_0x3887af-0x12b;const _0x4044bc=a151_0x4044();let _0x286227=_0x4044bc[_0x3887af];return _0x286227;}export function createIgnoreInstance(_0x389f92){const _0x306238=a151_0x5ebb54,_0x5026fe=a151_0x428b1f();return _0x389f92&&_0x389f92[_0x306238(0x143)]>0x0&&_0x5026fe[_0x306238(0x135)](_0x389f92),_0x5026fe;}export function addScopedPatterns(_0x2f66bf,_0x5bc255,_0x59f3be){const _0xd2da9b=a151_0x5ebb54,_0x1df82=_0x5bc255[_0xd2da9b(0x142)](_0x1fff02=>{const _0x1d7759=_0xd2da9b;if(_0x1fff02[_0x1d7759(0x137)]('!')){const _0x2136ac=_0x1fff02[_0x1d7759(0x131)](0x1);if(_0x2136ac[_0x1d7759(0x137)]('/'))return'!'+_0x59f3be+_0x2136ac;return'!'+_0x59f3be+'/'+_0x2136ac;}if(_0x1fff02[_0x1d7759(0x137)]('/'))return''+_0x59f3be+_0x1fff02;return _0x59f3be+'/'+_0x1fff02;});return _0x2f66bf[_0xd2da9b(0x135)](_0x1df82),_0x2f66bf;}export function shouldIgnoreWithInstance(_0xdf377c,_0x279a2d,_0x3801a3){const _0x5c6707=a151_0x5ebb54,_0x4677cb=_0x279a2d[_0x5c6707(0x134)](/\\/g,'/'),_0x345392=_0x3801a3?_0x4677cb+'/':_0x4677cb;return _0xdf377c['ignores'](_0x345392);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a152_0x2480ef=a152_0x2d8b;function a152_0x2d8b(_0x5195a0,_0x44ebb3){_0x5195a0=_0x5195a0-0x172;const _0x10ddd5=a152_0x10dd();let _0x2d8be2=_0x10ddd5[_0x5195a0];return _0x2d8be2;}(function(_0x69a0f0,_0x508a09){const _0x3c361f=a152_0x2d8b,_0x527875=_0x69a0f0();while(!![]){try{const _0x1d0fdd=-parseInt(_0x3c361f(0x18f))/0x1*(parseInt(_0x3c361f(0x17d))/0x2)+parseInt(_0x3c361f(0x176))/0x3*(parseInt(_0x3c361f(0x175))/0x4)+-parseInt(_0x3c361f(0x181))/0x5+-parseInt(_0x3c361f(0x183))/0x6+-parseInt(_0x3c361f(0x177))/0x7+-parseInt(_0x3c361f(0x189))/0x8+parseInt(_0x3c361f(0x174))/0x9;if(_0x1d0fdd===_0x508a09)break;else _0x527875['push'](_0x527875['shift']());}catch(_0x13bf1a){_0x527875['push'](_0x527875['shift']());}}}(a152_0x10dd,0x7e2ae));import{TDX,LogLevel}from'../sdk/index.js';import{createHTTPMock}from'./http-mock.js';import{createTestGlobalOptions}from'./factories.js';function a152_0x10dd(){const _0x171174=['http','exitCode','options','382ipbAXA','error','reset','35142381ccselj','4372lYhHKm','843CaXJXg','4231458CldbKU','teardown','map','push','args','runSequence','1084pJrUMN','us01','log','warn','4693535KHDtdp','createFetch','5794704VBHxxM','verify','originalFetch','join','fail','ERROR','7832248PLQPbR','run','fetch'];a152_0x10dd=function(){return _0x171174;};return a152_0x10dd();}export class CommandRunner{['http'];[a152_0x2480ef(0x185)];constructor(){const _0x440575=a152_0x2480ef;this[_0x440575(0x18c)]=createHTTPMock(),this[_0x440575(0x185)]=global['fetch'];}['setup'](){const _0x1132d4=a152_0x2480ef;this[_0x1132d4(0x185)]=global[_0x1132d4(0x18b)],global[_0x1132d4(0x18b)]=this[_0x1132d4(0x18c)][_0x1132d4(0x182)]();}[a152_0x2480ef(0x178)](_0x163b8b){const _0x4ec155=a152_0x2480ef;try{_0x163b8b?.[_0x4ec155(0x187)]&&this[_0x4ec155(0x18c)][_0x4ec155(0x184)](_0x163b8b);}finally{global[_0x4ec155(0x18b)]=this['originalFetch'],this[_0x4ec155(0x18c)][_0x4ec155(0x173)]();}}async[a152_0x2480ef(0x18a)](_0x422daa,_0x41d31a={}){const _0x238069=a152_0x2480ef,_0x3401d1=[],_0x27a55d=[],_0x4cf249=console[_0x238069(0x17f)],_0x35be74=console['error'],_0x3658f0=console['warn'];console[_0x238069(0x17f)]=(..._0x18f881)=>{const _0x380bf6=_0x238069;_0x3401d1[_0x380bf6(0x17a)](_0x18f881['map'](String)[_0x380bf6(0x186)]('\x20'));},console[_0x238069(0x172)]=(..._0x323ec6)=>{const _0x28a5c1=_0x238069;_0x27a55d['push'](_0x323ec6[_0x28a5c1(0x179)](String)[_0x28a5c1(0x186)]('\x20'));},console[_0x238069(0x180)]=(..._0x17b099)=>{const _0xb29ba0=_0x238069;_0x27a55d[_0xb29ba0(0x17a)](_0x17b099[_0xb29ba0(0x179)](String)[_0xb29ba0(0x186)]('\x20'));};try{const _0x11fae2=new TDX({'site':_0x41d31a[_0x238069(0x18e)]?.['site']??_0x238069(0x17e),'apiKey':'test-api-key-id/test-api-key-secret','logLevel':LogLevel[_0x238069(0x188)]}),_0x2cf994={'options':createTestGlobalOptions(_0x41d31a['options']),'args':_0x41d31a[_0x238069(0x17b)]??[],'tdx':_0x11fae2},_0x829e2a=new _0x422daa(),_0x375b8e=await _0x829e2a[_0x238069(0x18a)](_0x2cf994);return{'exitCode':_0x375b8e,'stdout':_0x3401d1,'stderr':_0x27a55d};}finally{console[_0x238069(0x17f)]=_0x4cf249,console['error']=_0x35be74,console['warn']=_0x3658f0;}}async[a152_0x2480ef(0x17c)](_0x1ebc83){const _0x4b7e44=a152_0x2480ef,_0x22de90=[];for(const {command:_0x4a820b,options:_0x3fc552}of _0x1ebc83){const _0x452e41=await this[_0x4b7e44(0x18a)](_0x4a820b,_0x3fc552);_0x22de90[_0x4b7e44(0x17a)](_0x452e41);if(_0x452e41[_0x4b7e44(0x18d)]!==0x0)break;}return _0x22de90;}}export function createCommandRunner(){return new CommandRunner();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x556779,_0x305315){const _0x5f2667=a153_0x4399,_0x41b974=_0x556779();while(!![]){try{const _0x4ee608=-parseInt(_0x5f2667(0x15d))/0x1+-parseInt(_0x5f2667(0x158))/0x2+parseInt(_0x5f2667(0x14f))/0x3+parseInt(_0x5f2667(0x157))/0x4*(-parseInt(_0x5f2667(0x150))/0x5)+-parseInt(_0x5f2667(0x15f))/0x6*(-parseInt(_0x5f2667(0x153))/0x7)+parseInt(_0x5f2667(0x168))/0x8*(-parseInt(_0x5f2667(0x15a))/0x9)+parseInt(_0x5f2667(0x162))/0xa;if(_0x4ee608===_0x305315)break;else _0x41b974['push'](_0x41b974['shift']());}catch(_0x26fbf4){_0x41b974['push'](_0x41b974['shift']());}}}(a153_0x3f15,0xc0b39));import{vi}from'vitest';function a153_0x4399(_0x270991,_0x1336ab){_0x270991=_0x270991-0x14b;const _0x3f152=a153_0x3f15();let _0x4399ed=_0x3f152[_0x270991];return _0x4399ed;}import{join}from'path';import{Logger,LogLevel,FileHandler}from'../utils/logger/index.js';import{getGlobalCacheDir}from'../utils/global-cache.js';export function createTestSDKContext(_0xa352ce){const _0x5941bd=a153_0x4399;return{'site':_0x5941bd(0x15b),'apiKey':_0x5941bd(0x164),'logLevel':LogLevel['ERROR'],..._0xa352ce};}export function createTestGlobalOptions(_0x3b7162){const _0x1997d2=a153_0x4399;return{'site':'us01','format':_0x1997d2(0x167),'noColor':!![],'limit':0x64,'verbose':![],'timeout':_0x1997d2(0x14c),'dryRun':![],'yes':![],'logLevel':LogLevel[_0x1997d2(0x14b)],..._0x3b7162};}function a153_0x3f15(){const _0x5486fa=['reset','7IuGdFP','tdx-test.log','error','segment','150980EwIQUJ','2183766zNTQHU','init','9onSLuq','us01','log','1050047efVuOg','user','8928726sJYJNC','join','test-api-key','26160740fZEPkB','args','test-api-key-id/test-api-key-secret','logs','warn','table','9410968EyliFd','ERROR','30000','workflow','options','1708758mjQuVv','75YvuHIP','map'];a153_0x3f15=function(){return _0x5486fa;};return a153_0x3f15();}export async function initTestLogger(){const _0x29b84d=a153_0x4399;Logger[_0x29b84d(0x152)]();const _0x2a40ae=join(getGlobalCacheDir(),_0x29b84d(0x165),_0x29b84d(0x154));await Logger[_0x29b84d(0x159)]({'defaultLevel':LogLevel['DEBUG'],'handlers':[new FileHandler({'filePath':_0x2a40ae,'rotate':![]})]});}export function resetTestLogger(){const _0x5c802c=a153_0x4399;Logger[_0x5c802c(0x152)]();}export function createMockTDX(_0x2b8b69){const _0x2ae475=a153_0x4399;return{'context':{'site':'us01','apiKey':_0x2ae475(0x161),'logLevel':LogLevel['ERROR']},'query':{'execute':vi['fn'](),'listDatabases':vi['fn'](),'listTables':vi['fn'](),'describeTable':vi['fn'](),'showTable':vi['fn'](),..._0x2b8b69?.['query']},'segment':{'listParents':vi['fn'](),'getParent':vi['fn'](),'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x2b8b69?.[_0x2ae475(0x156)]},'journey':{'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x2b8b69?.['journey']},'workflow':{'list':vi['fn'](),'get':vi['fn'](),'run':vi['fn'](),..._0x2b8b69?.[_0x2ae475(0x14d)]},'user':{'show':vi['fn'](),..._0x2b8b69?.[_0x2ae475(0x15e)]},'api':{'request':vi['fn'](),..._0x2b8b69?.['api']},..._0x2b8b69};}export function createTestCommandContext(_0x3e522a){const _0x400f63=a153_0x4399,_0x2d1507=createTestGlobalOptions(_0x3e522a?.[_0x400f63(0x14e)]),_0x4d0a2b=_0x3e522a?.['tdx']??createMockTDX();return{'options':_0x2d1507,'args':_0x3e522a?.[_0x400f63(0x163)]??[],'tdx':_0x4d0a2b};}export function captureConsole(){const _0x5e5da0=a153_0x4399,_0x38def9=[],_0x1f3587=[],_0x96d237=console[_0x5e5da0(0x15c)],_0x48deaa=console['error'],_0x5d7f01=console[_0x5e5da0(0x166)];return console[_0x5e5da0(0x15c)]=(..._0x5c6c23)=>{const _0x386ce4=_0x5e5da0;_0x38def9['push'](_0x5c6c23['map'](String)[_0x386ce4(0x160)]('\x20'));},console[_0x5e5da0(0x155)]=(..._0x235513)=>{const _0x3ece1d=_0x5e5da0;_0x1f3587['push'](_0x235513[_0x3ece1d(0x151)](String)[_0x3ece1d(0x160)]('\x20'));},console[_0x5e5da0(0x166)]=(..._0x1663fd)=>{const _0x95f50f=_0x5e5da0;_0x1f3587['push'](_0x1663fd[_0x95f50f(0x151)](String)['join']('\x20'));},{'stdout':_0x38def9,'stderr':_0x1f3587,'restore':()=>{const _0x184256=_0x5e5da0;console[_0x184256(0x15c)]=_0x96d237,console[_0x184256(0x155)]=_0x48deaa,console['warn']=_0x5d7f01;}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a154_0x525a86=a154_0x562f;(function(_0x177ac5,_0x1eed14){const _0x18a3d0=a154_0x562f,_0x132cb2=_0x177ac5();while(!![]){try{const _0x410996=parseInt(_0x18a3d0(0x1df))/0x1*(-parseInt(_0x18a3d0(0x22b))/0x2)+-parseInt(_0x18a3d0(0x242))/0x3+-parseInt(_0x18a3d0(0x23f))/0x4+parseInt(_0x18a3d0(0x239))/0x5+-parseInt(_0x18a3d0(0x241))/0x6+-parseInt(_0x18a3d0(0x204))/0x7+parseInt(_0x18a3d0(0x217))/0x8*(parseInt(_0x18a3d0(0x208))/0x9);if(_0x410996===_0x1eed14)break;else _0x132cb2['push'](_0x132cb2['shift']());}catch(_0x36bc49){_0x132cb2['push'](_0x132cb2['shift']());}}}(a154_0x13cc,0xad004));function a154_0x562f(_0x3ddb0b,_0x5c92e1){_0x3ddb0b=_0x3ddb0b-0x1dd;const _0x13ccaf=a154_0x13cc();let _0x562f45=_0x13ccaf[_0x3ddb0b];return _0x562f45;}export const fixtures={'database':{'basic':{'name':a154_0x525a86(0x212),'count':0x5,'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x225),'permission':a154_0x525a86(0x23c)},'withTables':{'name':a154_0x525a86(0x1e1),'count':0x64,'created_at':a154_0x525a86(0x1fe),'updated_at':a154_0x525a86(0x21d),'permission':'full_access'}},'table':{'basic':{'id':0x3039,'name':a154_0x525a86(0x24a),'type':a154_0x525a86(0x1e5),'schema':JSON['stringify']([['id',a154_0x525a86(0x221)],['time',a154_0x525a86(0x209)],[a154_0x525a86(0x1e9),a154_0x525a86(0x221)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x225)},'events':{'id':0x303a,'name':a154_0x525a86(0x244),'type':a154_0x525a86(0x1e5),'schema':JSON[a154_0x525a86(0x202)]([['event_id',a154_0x525a86(0x221)],[a154_0x525a86(0x235),a154_0x525a86(0x209)],['user_id',a154_0x525a86(0x221)],[a154_0x525a86(0x1fd),a154_0x525a86(0x221)],[a154_0x525a86(0x20f),'map<string,string>']]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x1f3)}},'parentSegment':{'basic':{'id':a154_0x525a86(0x1f1),'name':a154_0x525a86(0x220),'description':'A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','status':a154_0x525a86(0x1f8),'master_table':{'database':'cdp_db','table':a154_0x525a86(0x21f)},'attributes':[{'name':a154_0x525a86(0x234),'type':a154_0x525a86(0x221),'key':!![]},{'name':a154_0x525a86(0x214),'type':'string'},{'name':'created_at','type':a154_0x525a86(0x22f)}],'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x243)},'withBehaviors':{'id':a154_0x525a86(0x1e4),'name':a154_0x525a86(0x1fb),'description':'Parent\x20segment\x20with\x20behavioral\x20data','status':a154_0x525a86(0x1f8),'master_table':{'database':a154_0x525a86(0x22c),'table':a154_0x525a86(0x20c)},'behaviors':[{'name':a154_0x525a86(0x228),'table':{'database':a154_0x525a86(0x1fa),'table':a154_0x525a86(0x228)},'join_key':a154_0x525a86(0x234)},{'name':a154_0x525a86(0x236),'table':{'database':a154_0x525a86(0x1fa),'table':a154_0x525a86(0x215)},'join_key':a154_0x525a86(0x234)}],'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x243)}},'segment':{'basic':{'id':a154_0x525a86(0x210),'name':a154_0x525a86(0x1e8),'description':a154_0x525a86(0x219),'parent_segment_id':a154_0x525a86(0x1f1),'status':'active','rules':[{'type':a154_0x525a86(0x1eb),'field':a154_0x525a86(0x1e3),'operator':'TimeWithinPast','value':a154_0x525a86(0x240)}],'count':0x1388,'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z'},'withMultipleRules':{'id':'cs-111222','name':a154_0x525a86(0x23a),'description':a154_0x525a86(0x232),'parent_segment_id':'ps-123456','status':a154_0x525a86(0x1f8),'rules':[{'type':a154_0x525a86(0x1eb),'field':a154_0x525a86(0x1e3),'operator':'TimeWithinPast','value':a154_0x525a86(0x240)},{'type':a154_0x525a86(0x1eb),'field':a154_0x525a86(0x1e0),'operator':a154_0x525a86(0x21e),'value':0x3e8}],'count':0x5dc,'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x243)}},'journey':{'basic':{'id':'j-abc123','name':a154_0x525a86(0x1de),'description':a154_0x525a86(0x222),'status':'draft','version':0x1,'steps':[{'id':a154_0x525a86(0x22a),'type':'wait','duration':'1d'},{'id':a154_0x525a86(0x203),'type':a154_0x525a86(0x1f5),'activation_id':a154_0x525a86(0x227)}],'created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x243)},'withDecision':{'id':a154_0x525a86(0x226),'name':'Purchase\x20Reminder','description':a154_0x525a86(0x248),'status':'active','version':0x2,'steps':[{'id':a154_0x525a86(0x22a),'type':a154_0x525a86(0x23b),'segment_id':'cs-456789','yes_path':a154_0x525a86(0x203),'no_path':a154_0x525a86(0x1f4)},{'id':'step-2','type':a154_0x525a86(0x1f5),'activation_id':a154_0x525a86(0x1ff)},{'id':a154_0x525a86(0x1f4),'type':a154_0x525a86(0x249)}],'created_at':a154_0x525a86(0x225),'updated_at':'2024-01-15T00:00:00Z'}},'queryResult':{'basic':{'schema':[{'name':'id','type':a154_0x525a86(0x1e6)},{'name':a154_0x525a86(0x1e9),'type':'varchar'},{'name':a154_0x525a86(0x1e7),'type':'bigint'}],'data':[[a154_0x525a86(0x23e),a154_0x525a86(0x237),0x64],[a154_0x525a86(0x21b),a154_0x525a86(0x218),0xc8],[a154_0x525a86(0x21c),a154_0x525a86(0x245),0x96]]},'empty':{'schema':[{'name':'id','type':a154_0x525a86(0x1e6)},{'name':a154_0x525a86(0x1e9),'type':a154_0x525a86(0x1e6)}],'data':[]},'singleRow':{'schema':[{'name':a154_0x525a86(0x247),'type':a154_0x525a86(0x200)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a154_0x525a86(0x1ee),'email':'test@example.com','created_at':a154_0x525a86(0x225),'updated_at':a154_0x525a86(0x243),'administrator':![]},'admin':{'id':0x1,'name':'Admin\x20User','email':a154_0x525a86(0x213),'created_at':a154_0x525a86(0x1f9),'updated_at':a154_0x525a86(0x243),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a154_0x525a86(0x201),'database':a154_0x525a86(0x212),'status':a154_0x525a86(0x229),'query':'SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','start_at':a154_0x525a86(0x20a),'end_at':a154_0x525a86(0x1dd),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a154_0x525a86(0x201),'database':'test_db','status':a154_0x525a86(0x1fc),'query':a154_0x525a86(0x1e2),'start_at':a154_0x525a86(0x1f7),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':'presto','database':'test_db','status':a154_0x525a86(0x24b),'query':a154_0x525a86(0x207),'start_at':a154_0x525a86(0x1ec),'end_at':a154_0x525a86(0x211),'duration':0x1,'result_size':null,'error':a154_0x525a86(0x1f6)}},'workflow':{'basic':{'id':'wf-12345','name':a154_0x525a86(0x1f2),'project':a154_0x525a86(0x1ea),'revision':'abc123','timezone':a154_0x525a86(0x22e),'schedule':{'cron':a154_0x525a86(0x24c)}},'withSessions':{'id':a154_0x525a86(0x216),'name':a154_0x525a86(0x1ed),'project':a154_0x525a86(0x20e),'revision':a154_0x525a86(0x23d),'timezone':a154_0x525a86(0x22d),'schedule':{'cron':a154_0x525a86(0x233)},'last_session':{'id':a154_0x525a86(0x206),'status':a154_0x525a86(0x229),'started_at':a154_0x525a86(0x21a),'finished_at':a154_0x525a86(0x1f0)}}},'apiError':{'unauthorized':{'errors':{'error':'Invalid\x20API\x20key','message':'Invalid\x20API\x20key','severity':'error','status_code':0x191}},'notFound':{'errors':{'error':a154_0x525a86(0x205),'message':'The\x20requested\x20resource\x20does\x20not\x20exist','severity':a154_0x525a86(0x24b),'status_code':0x194}},'rateLimited':{'detail':a154_0x525a86(0x20d)},'rfc9457':{'type':a154_0x525a86(0x223),'title':'Forbidden','status':0x193,'detail':'You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','instance':a154_0x525a86(0x224)}}};export function createDatabase(_0x146cf9){const _0x472e3a=a154_0x525a86;return{...fixtures['database'][_0x472e3a(0x20b)],..._0x146cf9};}export function createTable(_0x31866d){const _0x11bf75=a154_0x525a86;return{...fixtures[_0x11bf75(0x231)][_0x11bf75(0x20b)],..._0x31866d};}export function createParentSegment(_0xec47c4){const _0x2d5c86=a154_0x525a86;return{...fixtures['parentSegment'][_0x2d5c86(0x20b)],..._0xec47c4};}export function createSegment(_0x5897ee){const _0x3bf316=a154_0x525a86;return{...fixtures['segment'][_0x3bf316(0x20b)],..._0x5897ee};}export function createJourney(_0x5b7e27){const _0x37e027=a154_0x525a86;return{...fixtures[_0x37e027(0x230)]['basic'],..._0x5b7e27};}export function createQueryResult(_0x3f416){const _0x39d373=a154_0x525a86;return{...fixtures[_0x39d373(0x1ef)][_0x39d373(0x20b)],..._0x3f416};}export function createUser(_0x3f21e7){const _0x16a987=a154_0x525a86;return{...fixtures[_0x16a987(0x238)][_0x16a987(0x20b)],..._0x3f21e7};}export function createJob(_0x4a2f43){return{...fixtures['job']['completed'],..._0x4a2f43};}export function createWorkflow(_0x491b27){const _0x42484f=a154_0x525a86;return{...fixtures[_0x42484f(0x246)][_0x42484f(0x20b)],..._0x491b27};}function a154_0x13cc(){const _0x5399c1=['2319667JmgCpV','Resource\x20not\x20found','sess-111','SELECT\x20*\x20FROM\x20nonexistent_table','45261tXCpRg','long','2024-01-15T10:00:00Z','basic','customers','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','data_sync','properties','cs-456789','2024-01-15T10:10:01Z','test_db','admin@example.com','email','pageviews','wf-67890','6536iNzyPB','Bob','Users\x20active\x20in\x20the\x20last\x2030\x20days','2024-01-15T09:00:00Z','user-2','user-3','2024-01-15T08:00:00Z','Greater','unified_customers','Test\x20Parent\x20Segment','string','Onboarding\x20journey\x20for\x20new\x20users','https://api.treasuredata.com/errors/forbidden','/v3/database/list','2024-01-01T00:00:00Z','j-def456','act-123','purchases','success','step-1','2752874RgOSWU','cdp_db','America/Los_Angeles','UTC','timestamp','journey','table','Active\x20users\x20with\x20high\x20lifetime\x20value','0\x20*\x20*\x20*\x20*','customer_id','time','page_views','Alice','user','934430FgDcLC','High\x20Value\x20Active\x20Users','decision_point','administrator','def456','user-1','2869516KcmthS','30d','5910624TDdjNu','529998oxXKKF','2024-01-15T00:00:00Z','events','Charlie','workflow','total','Journey\x20with\x20decision\x20point','end','users','error','0\x200\x20*\x20*\x20*','2024-01-15T10:00:05Z','Welcome\x20Journey','1GRiHfX','lifetime_value','production_db','SELECT\x20COUNT(*)\x20FROM\x20events','last_login','ps-789012','log','varchar','count','Active\x20Users','name','data_pipeline','attribute','2024-01-15T10:10:00Z','hourly_sync','Test\x20User','queryResult','2024-01-15T09:05:00Z','ps-123456','daily_etl','2024-01-15T12:00:00Z','step-3','activation','Table\x20does\x20not\x20exist:\x20nonexistent_table','2024-01-15T10:05:00Z','active','2023-01-01T00:00:00Z','events_db','Customers\x20with\x20Behaviors','running','event_type','2023-06-15T10:30:00Z','act-email','bigint','presto','stringify','step-2'];a154_0x13cc=function(){return _0x5399c1;};return a154_0x13cc();}
|
|
1
|
+
function a154_0x545e(_0x557db6,_0x26196f){_0x557db6=_0x557db6-0xda;const _0x4d86ee=a154_0x4d86();let _0x545e8c=_0x4d86ee[_0x557db6];return _0x545e8c;}const a154_0x2ecc62=a154_0x545e;(function(_0x4fd1c1,_0x3138cc){const _0x2fc4b9=a154_0x545e,_0x4b6630=_0x4fd1c1();while(!![]){try{const _0x4747cc=-parseInt(_0x2fc4b9(0x11b))/0x1+-parseInt(_0x2fc4b9(0x120))/0x2+parseInt(_0x2fc4b9(0xf6))/0x3*(parseInt(_0x2fc4b9(0x11c))/0x4)+-parseInt(_0x2fc4b9(0x12a))/0x5+-parseInt(_0x2fc4b9(0xe0))/0x6+-parseInt(_0x2fc4b9(0x126))/0x7+parseInt(_0x2fc4b9(0xe8))/0x8;if(_0x4747cc===_0x3138cc)break;else _0x4b6630['push'](_0x4b6630['shift']());}catch(_0x7a1675){_0x4b6630['push'](_0x4b6630['shift']());}}}(a154_0x4d86,0xe2d07));export const fixtures={'database':{'basic':{'name':a154_0x2ecc62(0x102),'count':0x5,'created_at':'2024-01-01T00:00:00Z','updated_at':a154_0x2ecc62(0x12b),'permission':'administrator'},'withTables':{'name':a154_0x2ecc62(0x10f),'count':0x64,'created_at':a154_0x2ecc62(0x133),'updated_at':a154_0x2ecc62(0xf2),'permission':'full_access'}},'table':{'basic':{'id':0x3039,'name':a154_0x2ecc62(0x131),'type':a154_0x2ecc62(0x13b),'schema':JSON[a154_0x2ecc62(0x117)]([['id',a154_0x2ecc62(0x140)],['time',a154_0x2ecc62(0x11a)],['name',a154_0x2ecc62(0x140)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a154_0x2ecc62(0x12b),'updated_at':a154_0x2ecc62(0x12b)},'events':{'id':0x303a,'name':a154_0x2ecc62(0xf8),'type':'log','schema':JSON[a154_0x2ecc62(0x117)]([[a154_0x2ecc62(0x104),a154_0x2ecc62(0x140)],['time','long'],[a154_0x2ecc62(0xee),a154_0x2ecc62(0x140)],[a154_0x2ecc62(0x10b),'string'],[a154_0x2ecc62(0x11d),a154_0x2ecc62(0x118)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a154_0x2ecc62(0x12b),'updated_at':a154_0x2ecc62(0xf3)}},'parentSegment':{'basic':{'id':a154_0x2ecc62(0xe3),'name':a154_0x2ecc62(0xf0),'description':a154_0x2ecc62(0xe2),'status':a154_0x2ecc62(0x142),'master_table':{'database':a154_0x2ecc62(0xe5),'table':a154_0x2ecc62(0xea)},'attributes':[{'name':a154_0x2ecc62(0xef),'type':a154_0x2ecc62(0x140),'key':!![]},{'name':a154_0x2ecc62(0x143),'type':'string'},{'name':a154_0x2ecc62(0xda),'type':a154_0x2ecc62(0xf4)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a154_0x2ecc62(0x12c)},'withBehaviors':{'id':a154_0x2ecc62(0xfc),'name':'Customers\x20with\x20Behaviors','description':'Parent\x20segment\x20with\x20behavioral\x20data','status':a154_0x2ecc62(0x142),'master_table':{'database':a154_0x2ecc62(0xe5),'table':a154_0x2ecc62(0x100)},'behaviors':[{'name':a154_0x2ecc62(0x128),'table':{'database':a154_0x2ecc62(0x108),'table':'purchases'},'join_key':a154_0x2ecc62(0xef)},{'name':'page_views','table':{'database':a154_0x2ecc62(0x108),'table':a154_0x2ecc62(0x130)},'join_key':a154_0x2ecc62(0xef)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a154_0x2ecc62(0x12c)}},'segment':{'basic':{'id':'cs-456789','name':a154_0x2ecc62(0xf9),'description':'Users\x20active\x20in\x20the\x20last\x2030\x20days','parent_segment_id':a154_0x2ecc62(0xe3),'status':a154_0x2ecc62(0x142),'rules':[{'type':a154_0x2ecc62(0x135),'field':a154_0x2ecc62(0x123),'operator':a154_0x2ecc62(0x11f),'value':a154_0x2ecc62(0x106)}],'count':0x1388,'created_at':'2024-01-01T00:00:00Z','updated_at':a154_0x2ecc62(0x12c)},'withMultipleRules':{'id':a154_0x2ecc62(0xdd),'name':'High\x20Value\x20Active\x20Users','description':a154_0x2ecc62(0xe1),'parent_segment_id':a154_0x2ecc62(0xe3),'status':a154_0x2ecc62(0x142),'rules':[{'type':a154_0x2ecc62(0x135),'field':a154_0x2ecc62(0x123),'operator':a154_0x2ecc62(0x11f),'value':a154_0x2ecc62(0x106)},{'type':a154_0x2ecc62(0x135),'field':a154_0x2ecc62(0x105),'operator':a154_0x2ecc62(0xeb),'value':0x3e8}],'count':0x5dc,'created_at':a154_0x2ecc62(0x12b),'updated_at':a154_0x2ecc62(0x12c)}},'journey':{'basic':{'id':a154_0x2ecc62(0x134),'name':a154_0x2ecc62(0x119),'description':'Onboarding\x20journey\x20for\x20new\x20users','status':a154_0x2ecc62(0x101),'version':0x1,'steps':[{'id':a154_0x2ecc62(0x113),'type':'wait','duration':'1d'},{'id':a154_0x2ecc62(0xe9),'type':a154_0x2ecc62(0xfb),'activation_id':a154_0x2ecc62(0x137)}],'created_at':a154_0x2ecc62(0x12b),'updated_at':a154_0x2ecc62(0x12c)},'withDecision':{'id':a154_0x2ecc62(0x12f),'name':a154_0x2ecc62(0x127),'description':a154_0x2ecc62(0x122),'status':'active','version':0x2,'steps':[{'id':a154_0x2ecc62(0x113),'type':a154_0x2ecc62(0xfa),'segment_id':'cs-456789','yes_path':'step-2','no_path':a154_0x2ecc62(0x132)},{'id':a154_0x2ecc62(0xe9),'type':a154_0x2ecc62(0xfb),'activation_id':a154_0x2ecc62(0xe4)},{'id':a154_0x2ecc62(0x132),'type':a154_0x2ecc62(0xed)}],'created_at':a154_0x2ecc62(0x12b),'updated_at':'2024-01-15T00:00:00Z'}},'queryResult':{'basic':{'schema':[{'name':'id','type':a154_0x2ecc62(0x111)},{'name':a154_0x2ecc62(0xff),'type':'varchar'},{'name':'count','type':a154_0x2ecc62(0x139)}],'data':[['user-1',a154_0x2ecc62(0x13d),0x64],[a154_0x2ecc62(0x115),a154_0x2ecc62(0x124),0xc8],[a154_0x2ecc62(0x10c),a154_0x2ecc62(0x121),0x96]]},'empty':{'schema':[{'name':'id','type':a154_0x2ecc62(0x111)},{'name':a154_0x2ecc62(0xff),'type':a154_0x2ecc62(0x111)}],'data':[]},'singleRow':{'schema':[{'name':a154_0x2ecc62(0x109),'type':a154_0x2ecc62(0x139)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a154_0x2ecc62(0x145),'email':a154_0x2ecc62(0x107),'created_at':a154_0x2ecc62(0x12b),'updated_at':a154_0x2ecc62(0x12c),'administrator':![]},'admin':{'id':0x1,'name':a154_0x2ecc62(0x136),'email':'admin@example.com','created_at':'2023-01-01T00:00:00Z','updated_at':a154_0x2ecc62(0x12c),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':'presto','database':a154_0x2ecc62(0x102),'status':a154_0x2ecc62(0xfd),'query':a154_0x2ecc62(0x138),'start_at':a154_0x2ecc62(0x13c),'end_at':a154_0x2ecc62(0x125),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a154_0x2ecc62(0xdc),'database':a154_0x2ecc62(0x102),'status':'running','query':'SELECT\x20COUNT(*)\x20FROM\x20events','start_at':'2024-01-15T10:05:00Z','end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':'presto','database':a154_0x2ecc62(0x102),'status':a154_0x2ecc62(0x11e),'query':a154_0x2ecc62(0x110),'start_at':'2024-01-15T10:10:00Z','end_at':a154_0x2ecc62(0x144),'duration':0x1,'result_size':null,'error':'Table\x20does\x20not\x20exist:\x20nonexistent_table'}},'workflow':{'basic':{'id':a154_0x2ecc62(0x12e),'name':a154_0x2ecc62(0xdf),'project':a154_0x2ecc62(0x13f),'revision':a154_0x2ecc62(0xde),'timezone':a154_0x2ecc62(0xe7),'schedule':{'cron':a154_0x2ecc62(0xec)}},'withSessions':{'id':a154_0x2ecc62(0xdb),'name':a154_0x2ecc62(0x13a),'project':'data_sync','revision':a154_0x2ecc62(0x13e),'timezone':a154_0x2ecc62(0xe6),'schedule':{'cron':'0\x20*\x20*\x20*\x20*'},'last_session':{'id':a154_0x2ecc62(0x146),'status':a154_0x2ecc62(0xfd),'started_at':a154_0x2ecc62(0x114),'finished_at':a154_0x2ecc62(0x129)}}},'apiError':{'unauthorized':{'errors':{'error':a154_0x2ecc62(0x10d),'message':'Invalid\x20API\x20key','severity':'error','status_code':0x191}},'notFound':{'errors':{'error':'Resource\x20not\x20found','message':a154_0x2ecc62(0x12d),'severity':a154_0x2ecc62(0x11e),'status_code':0x194}},'rateLimited':{'detail':a154_0x2ecc62(0x141)},'rfc9457':{'type':a154_0x2ecc62(0xfe),'title':a154_0x2ecc62(0xf1),'status':0x193,'detail':'You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','instance':a154_0x2ecc62(0x112)}}};export function createDatabase(_0x10fd38){const _0x367ea9=a154_0x2ecc62;return{...fixtures[_0x367ea9(0x116)][_0x367ea9(0x10a)],..._0x10fd38};}export function createTable(_0x39b06b){const _0x353021=a154_0x2ecc62;return{...fixtures[_0x353021(0x10e)][_0x353021(0x10a)],..._0x39b06b};}export function createParentSegment(_0xf1ed19){const _0x52b0d3=a154_0x2ecc62;return{...fixtures[_0x52b0d3(0xf5)]['basic'],..._0xf1ed19};}export function createSegment(_0x42546d){return{...fixtures['segment']['basic'],..._0x42546d};}export function createJourney(_0x2468b7){const _0x4b90e9=a154_0x2ecc62;return{...fixtures[_0x4b90e9(0xf7)][_0x4b90e9(0x10a)],..._0x2468b7};}function a154_0x4d86(){const _0x39666d=['pageviews','users','step-3','2023-06-15T10:30:00Z','j-abc123','attribute','Admin\x20User','act-123','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','bigint','hourly_sync','log','2024-01-15T10:00:00Z','Alice','def456','data_pipeline','string','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','active','email','2024-01-15T10:10:01Z','Test\x20User','sess-111','user','completed','created_at','wf-67890','presto','cs-111222','abc123','daily_etl','6725784LLfhYn','Active\x20users\x20with\x20high\x20lifetime\x20value','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','ps-123456','act-email','cdp_db','America/Los_Angeles','UTC','40786976vfBzIe','step-2','unified_customers','Greater','0\x200\x20*\x20*\x20*','end','user_id','customer_id','Test\x20Parent\x20Segment','Forbidden','2024-01-15T08:00:00Z','2024-01-15T12:00:00Z','timestamp','parentSegment','204PKYBJQ','journey','events','Active\x20Users','decision_point','activation','ps-789012','success','https://api.treasuredata.com/errors/forbidden','name','customers','draft','test_db','job','event_id','lifetime_value','30d','test@example.com','events_db','total','basic','event_type','user-3','Invalid\x20API\x20key','table','production_db','SELECT\x20*\x20FROM\x20nonexistent_table','varchar','/v3/database/list','step-1','2024-01-15T09:00:00Z','user-2','database','stringify','map<string,string>','Welcome\x20Journey','long','1281578TwhZcT','11520EkJSsk','properties','error','TimeWithinPast','168442CmrhXv','Charlie','Journey\x20with\x20decision\x20point','last_login','Bob','2024-01-15T10:00:05Z','182861DZnuJS','Purchase\x20Reminder','purchases','2024-01-15T09:05:00Z','9261475OBbSeG','2024-01-01T00:00:00Z','2024-01-15T00:00:00Z','The\x20requested\x20resource\x20does\x20not\x20exist','wf-12345','j-def456'];a154_0x4d86=function(){return _0x39666d;};return a154_0x4d86();}export function createQueryResult(_0x272137){return{...fixtures['queryResult']['basic'],..._0x272137};}export function createUser(_0x5fc890){const _0x265708=a154_0x2ecc62;return{...fixtures[_0x265708(0x147)][_0x265708(0x10a)],..._0x5fc890};}export function createJob(_0x49c6af){const _0x4459c2=a154_0x2ecc62;return{...fixtures[_0x4459c2(0x103)][_0x4459c2(0x148)],..._0x49c6af};}export function createWorkflow(_0x1a2368){return{...fixtures['workflow']['basic'],..._0x1a2368};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a155_0x2bb2da=a155_0x3e98;(function(_0x169b23,_0x1e5461){const _0x5bcddc=a155_0x3e98,_0x3875fa=_0x169b23();while(!![]){try{const _0x2f1510=-parseInt(_0x5bcddc(0x18f))/0x1*(parseInt(_0x5bcddc(0x1b4))/0x2)+-parseInt(_0x5bcddc(0x187))/0x3*(parseInt(_0x5bcddc(0x1a8))/0x4)+parseInt(_0x5bcddc(0x194))/0x5+parseInt(_0x5bcddc(0x1b6))/0x6*(-parseInt(_0x5bcddc(0x17a))/0x7)+-parseInt(_0x5bcddc(0x1c2))/0x8+parseInt(_0x5bcddc(0x17c))/0x9*(parseInt(_0x5bcddc(0x182))/0xa)+parseInt(_0x5bcddc(0x1bd))/0xb;if(_0x2f1510===_0x1e5461)break;else _0x3875fa['push'](_0x3875fa['shift']());}catch(_0x10b3de){_0x3875fa['push'](_0x3875fa['shift']());}}}(a155_0x4dc6,0xd2aec));function a155_0x4dc6(){const _0x10a99b=['parseRequest','length','wasCalled','networkError','20rlPlFV','getStatusText','textResponse','reset','Unknown','1151125kWtlOP','getLastRequest','registerWithInspector','push','jsonResponseWithHeaders','Bad\x20Request','td-api','join','matcher','stubs','\x20\x20(none)','createFetch','stack','Bad\x20Gateway','fetchMock','stringify','split','Request\x20body:\x20','every','withHost','164ZrySwf','Created','test','Unprocessable\x20Entity','string','Conflict','matchCount','pathname','rfc9457','withQuery','get','some','124418unEkce','searchParams','1681626uwmCAL','url','slice','\x20stub(s)\x20were\x20not\x20matched:\x0a\x0a','REST','requests','entries','35199450pryOuE','Not\x20Found','https://api.treasuredata.com/errors/','matched','filter','9993880lYdByx','register','Too\x20Many\x20Requests','toLowerCase','headers','parse','toUpperCase','mockImplementation','method','GET','No\x20Content','simple','error','7dXOSCR','application/json','9GvWUTv','body','description','map','No\x20stub\x20matched\x20request:\x20','verify','8574650KnTypL','text/plain','Unmatched\x20stub','errorResponse','includes','47634mgtAjf','fail','host','isArray'];a155_0x4dc6=function(){return _0x10a99b;};return a155_0x4dc6();}import{vi}from'vitest';export class HTTPMockRegistry{['stubs']=[];['requests']=[];[a155_0x2bb2da(0x1a2)]=null;[a155_0x2bb2da(0x1ba)](_0x2f0bbe,_0x222614){return _0x26d2f4=>{const _0x5d9049=a155_0x3e98;if(_0x26d2f4['method'][_0x5d9049(0x1c8)]()!==_0x2f0bbe[_0x5d9049(0x1c8)]())return![];const _0x24bf6c=new URL(_0x26d2f4[_0x5d9049(0x1b7)]);if(typeof _0x222614==='string')return _0x24bf6c['pathname']===_0x222614||_0x24bf6c[_0x5d9049(0x1af)][_0x5d9049(0x186)](_0x222614);return _0x222614[_0x5d9049(0x1aa)](_0x24bf6c[_0x5d9049(0x1af)]);};}[a155_0x2bb2da(0x1b1)](_0x5d9c2a,_0x57bc67){return _0x9ae470=>{const _0xa8b217=a155_0x3e98;if(!_0x5d9c2a(_0x9ae470))return![];const _0x36cc42=new URL(_0x9ae470[_0xa8b217(0x1b7)]);return Object[_0xa8b217(0x1bc)](_0x57bc67)[_0xa8b217(0x1a6)](([_0x3fa350,_0x195329])=>_0x36cc42[_0xa8b217(0x1b5)][_0xa8b217(0x1b2)](_0x3fa350)===_0x195329);};}['withBody'](_0xc67edd,_0x2ff025){return _0x2c7d75=>{const _0xe28a8a=a155_0x3e98;if(!_0xc67edd(_0x2c7d75))return![];if(typeof _0x2ff025==='function')return _0x2ff025(_0x2c7d75[_0xe28a8a(0x17d)]);return JSON[_0xe28a8a(0x1a3)](_0x2c7d75[_0xe28a8a(0x17d)])===JSON[_0xe28a8a(0x1a3)](_0x2ff025);};}[a155_0x2bb2da(0x1a7)](_0x2195af,_0x413090){return _0x514109=>{const _0x5b50aa=a155_0x3e98;if(!_0x2195af(_0x514109))return![];const _0x4ce41=new URL(_0x514109[_0x5b50aa(0x1b7)]);return _0x4ce41[_0x5b50aa(0x189)]===_0x413090;};}[a155_0x2bb2da(0x1c3)](_0x565aad,_0x52bdd1,_0x2fa461){const _0xbf95a=a155_0x2bb2da;this[_0xbf95a(0x19d)][_0xbf95a(0x197)]({'matcher':_0x565aad,'responder':_0x52bdd1,'matched':![],'matchCount':0x0,'stack':new Error()[_0xbf95a(0x1a0)]??'','description':_0x2fa461?.['description']});}[a155_0x2bb2da(0x196)](_0x4b0313,_0x4103c7,_0x5b7c85){const _0x5bdd9f=a155_0x2bb2da,_0x447a98=_0x49309a=>{const _0x86cd24=a155_0x3e98;return _0x5b7c85(_0x49309a[_0x86cd24(0x17d)],_0x49309a),_0x4103c7(_0x49309a);};this[_0x5bdd9f(0x1c3)](_0x4b0313,_0x447a98);}static['jsonResponse'](_0x459fe2,_0x5f4be2=0xc8){const _0x24ec8a=a155_0x2bb2da;return()=>new Response(JSON[_0x24ec8a(0x1a3)](_0x459fe2),{'status':_0x5f4be2,'headers':{'Content-Type':'application/json'}});}static[a155_0x2bb2da(0x185)](_0x33fcf1,_0x5722c5,_0x175556=a155_0x2bb2da(0x178)){return()=>{const _0x44369c=a155_0x3e98;let _0x541db3;switch(_0x175556){case _0x44369c(0x19a):_0x541db3={'errors':{'error':_0x5722c5,'message':_0x5722c5,'severity':_0x44369c(0x179),'status_code':_0x33fcf1}};break;case _0x44369c(0x1b0):_0x541db3={'type':_0x44369c(0x1bf)+_0x33fcf1,'title':HTTPMockRegistry[_0x44369c(0x190)](_0x33fcf1),'status':_0x33fcf1,'detail':_0x5722c5};break;default:_0x541db3={'error':_0x5722c5};}return new Response(JSON[_0x44369c(0x1a3)](_0x541db3),{'status':_0x33fcf1,'headers':{'Content-Type':_0x44369c(0x17b)}});};}static[a155_0x2bb2da(0x198)](_0x29d66a,_0x317243,_0x1ea1b7=0xc8){const _0x11b14c=a155_0x2bb2da;return()=>new Response(JSON[_0x11b14c(0x1a3)](_0x29d66a),{'status':_0x1ea1b7,'headers':{'Content-Type':_0x11b14c(0x17b),..._0x317243}});}static[a155_0x2bb2da(0x191)](_0x85d110,_0x41682c=0xc8){const _0x46b1b1=a155_0x2bb2da;return()=>new Response(_0x85d110,{'status':_0x41682c,'headers':{'Content-Type':_0x46b1b1(0x183)}});}static[a155_0x2bb2da(0x18e)](_0x4da71d){return()=>{throw new Error(_0x4da71d);};}[a155_0x2bb2da(0x19f)](){const _0x19934c=a155_0x2bb2da;return this[_0x19934c(0x1a2)]=vi['fn']()[_0x19934c(0x1c9)](async(_0x182a7e,_0x57b5e5)=>{const _0x3f73b6=_0x19934c,_0x56834a=this['parseRequest'](_0x182a7e,_0x57b5e5);this[_0x3f73b6(0x1bb)][_0x3f73b6(0x197)](_0x56834a);for(const _0x702f0c of this[_0x3f73b6(0x19d)]){if(_0x702f0c[_0x3f73b6(0x19c)](_0x56834a))return _0x702f0c['matched']=!![],_0x702f0c[_0x3f73b6(0x1ae)]++,_0x702f0c['responder'](_0x56834a);}const _0x4c8971=this[_0x3f73b6(0x19d)][_0x3f73b6(0x17f)]((_0x395a67,_0x58a1be)=>'\x20\x20'+(_0x58a1be+0x1)+'.\x20'+(_0x395a67[_0x3f73b6(0x17e)]??'unnamed\x20stub'))[_0x3f73b6(0x19b)]('\x0a');throw new Error(_0x3f73b6(0x180)+_0x56834a[_0x3f73b6(0x1ca)]+'\x20'+_0x56834a['url']+'\x0a'+(_0x3f73b6(0x1a5)+JSON[_0x3f73b6(0x1a3)](_0x56834a[_0x3f73b6(0x17d)])+'\x0a')+('Registered\x20stubs:\x0a'+(_0x4c8971||_0x3f73b6(0x19e))));}),this[_0x19934c(0x1a2)];}[a155_0x2bb2da(0x18b)](_0x2d4c90,_0x424af5){const _0x3363ef=a155_0x2bb2da,_0x290b39={};if(_0x424af5?.[_0x3363ef(0x1c6)]){if(_0x424af5[_0x3363ef(0x1c6)]instanceof Headers)_0x424af5[_0x3363ef(0x1c6)]['forEach']((_0x386b9f,_0x3bba0e)=>{const _0x5fab14=_0x3363ef;_0x290b39[_0x3bba0e[_0x5fab14(0x1c5)]()]=_0x386b9f;});else{if(Array[_0x3363ef(0x18a)](_0x424af5[_0x3363ef(0x1c6)]))for(const [_0x49d1c6,_0x3e4497]of _0x424af5[_0x3363ef(0x1c6)]){_0x290b39[_0x49d1c6[_0x3363ef(0x1c5)]()]=_0x3e4497;}else for(const [_0x371b45,_0x5641cf]of Object[_0x3363ef(0x1bc)](_0x424af5[_0x3363ef(0x1c6)])){_0x5641cf!==undefined&&(_0x290b39[_0x371b45[_0x3363ef(0x1c5)]()]=_0x5641cf);}}}let _0xcd23f0;if(_0x424af5?.[_0x3363ef(0x17d)])try{_0xcd23f0=JSON[_0x3363ef(0x1c7)](_0x424af5[_0x3363ef(0x17d)]);}catch{_0xcd23f0=_0x424af5['body'];}return{'method':_0x424af5?.['method']??_0x3363ef(0x1cb),'url':_0x2d4c90,'headers':_0x290b39,'body':_0xcd23f0};}[a155_0x2bb2da(0x181)](_0x568e02){const _0x2a39b8=a155_0x2bb2da,_0x5696ae=this['stubs'][_0x2a39b8(0x1c1)](_0x3c9758=>!_0x3c9758[_0x2a39b8(0x1c0)]);if(_0x5696ae['length']>0x0){const _0x59ba0e=_0x5696ae[_0x2a39b8(0x17f)](_0x830755=>{const _0x433643=_0x2a39b8,_0x37b26a=_0x830755[_0x433643(0x17e)]?'\x20('+_0x830755[_0x433643(0x17e)]+')':'',_0x1f8509=_0x830755[_0x433643(0x1a0)][_0x433643(0x1a4)]('\x0a')[_0x433643(0x1b8)](0x2,0x5)[_0x433643(0x19b)]('\x0a');return _0x433643(0x184)+_0x37b26a+'\x20registered\x20at:\x0a'+_0x1f8509;});_0x568e02[_0x2a39b8(0x188)](_0x5696ae['length']+_0x2a39b8(0x1b9)+_0x59ba0e[_0x2a39b8(0x19b)]('\x0a\x0a'));}}['getRequests'](){return[...this['requests']];}[a155_0x2bb2da(0x195)](){const _0x5e57db=a155_0x2bb2da;return this[_0x5e57db(0x1bb)][this['requests'][_0x5e57db(0x18c)]-0x1];}[a155_0x2bb2da(0x18d)](_0x16aa00,_0x295188){const _0x4fc6f0=a155_0x2bb2da;return this[_0x4fc6f0(0x1bb)][_0x4fc6f0(0x1b3)](_0x4933d6=>{const _0x3244a3=_0x4fc6f0;if(_0x4933d6[_0x3244a3(0x1ca)][_0x3244a3(0x1c8)]()!==_0x16aa00[_0x3244a3(0x1c8)]())return![];if(typeof _0x295188===_0x3244a3(0x1ac))return _0x4933d6[_0x3244a3(0x1b7)]['includes'](_0x295188);return _0x295188['test'](_0x4933d6[_0x3244a3(0x1b7)]);});}['getMatchCount'](_0x4b2dd6){const _0x48161e=a155_0x2bb2da;return this[_0x48161e(0x19d)][_0x4b2dd6]?.[_0x48161e(0x1ae)]??0x0;}[a155_0x2bb2da(0x192)](){const _0x17ed0a=a155_0x2bb2da;this[_0x17ed0a(0x19d)]=[],this['requests']=[],this['fetchMock']=null;}static[a155_0x2bb2da(0x190)](_0x4deba3){const _0xe8896a=a155_0x2bb2da,_0xc996f8={0xc8:'OK',0xc9:_0xe8896a(0x1a9),0xcc:_0xe8896a(0x1cc),0x190:_0xe8896a(0x199),0x191:'Unauthorized',0x193:'Forbidden',0x194:_0xe8896a(0x1be),0x199:_0xe8896a(0x1ad),0x1a6:_0xe8896a(0x1ab),0x1ad:_0xe8896a(0x1c4),0x1f4:'Internal\x20Server\x20Error',0x1f6:_0xe8896a(0x1a1),0x1f7:'Service\x20Unavailable'};return _0xc996f8[_0x4deba3]??_0xe8896a(0x193);}}function a155_0x3e98(_0x518fb3,_0x1d40f0){_0x518fb3=_0x518fb3-0x178;const _0x4dc664=a155_0x4dc6();let _0x3e98b5=_0x4dc664[_0x518fb3];return _0x3e98b5;}export function createHTTPMock(){return new HTTPMockRegistry();}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a156_0x2d46(_0x4b32b0,_0x1be508){_0x4b32b0=_0x4b32b0-0xdb;var _0xd1b46e=a156_0xd1b4();var _0x2d469d=_0xd1b46e[_0x4b32b0];return _0x2d469d;}function a156_0xd1b4(){var _0x2d053a=['8hnuEoA','5LxAGUc','10203784hWzgSZ','1625877kIEgEa','709629tOJZZz','1966948ZkwLOc','91PrXPDv','10irVJeA','86676oImDBG','334539zwdgeB','14924899wPIEdI'];a156_0xd1b4=function(){return _0x2d053a;};return a156_0xd1b4();}(function(_0x4d892f,_0x110c6b){var _0x2e02ad=a156_0x2d46,_0x4f957c=_0x4d892f();while(!![]){try{var _0x26f044=parseInt(_0x2e02ad(0xdb))/0x1+-parseInt(_0x2e02ad(0xdd))/0x2*(-parseInt(_0x2e02ad(0xe1))/0x3)+-parseInt(_0x2e02ad(0xe2))/0x4*(parseInt(_0x2e02ad(0xde))/0x5)+-parseInt(_0x2e02ad(0xe5))/0x6*(-parseInt(_0x2e02ad(0xe3))/0x7)+parseInt(_0x2e02ad(0xdf))/0x8+-parseInt(_0x2e02ad(0xe0))/0x9+parseInt(_0x2e02ad(0xe4))/0xa*(-parseInt(_0x2e02ad(0xdc))/0xb);if(_0x26f044===_0x110c6b)break;else _0x4f957c['push'](_0x4f957c['shift']());}catch(_0x6e2b93){_0x4f957c['push'](_0x4f957c['shift']());}}}(a156_0xd1b4,0xae81f));export{HTTPMockRegistry,createHTTPMock}from'./http-mock.js';export{createTestSDKContext,createTestGlobalOptions,createTestCommandContext,createMockTDX,captureConsole}from'./factories.js';export{fixtures,createDatabase,createTable,createParentSegment,createSegment,createJourney,createQueryResult,createUser,createJob,createWorkflow}from'./fixtures.js';export{CommandRunner,createCommandRunner}from'./command-runner.js';
|
package/dist/utils/async.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e61ba,_0x3281c5){const _0x169487=a157_0x59ed,_0x2f2279=_0x1e61ba();while(!![]){try{const _0x48db52=parseInt(_0x169487(0x190))/0x1*(-parseInt(_0x169487(0x199))/0x2)+parseInt(_0x169487(0x198))/0x3+-parseInt(_0x169487(0x192))/0x4*(-parseInt(_0x169487(0x193))/0x5)+-parseInt(_0x169487(0x197))/0x6+-parseInt(_0x169487(0x19a))/0x7+parseInt(_0x169487(0x196))/0x8+parseInt(_0x169487(0x194))/0x9;if(_0x48db52===_0x3281c5)break;else _0x2f2279['push'](_0x2f2279['shift']());}catch(_0xb5418c){_0x2f2279['push'](_0x2f2279['shift']());}}}(a157_0xc092,0x73e9c));export async function batchAsync(_0x5d0031,_0x39f461,_0x3f366b=0xa){const _0x19a6c3=a157_0x59ed,_0x4ce745=[];for(let _0x41b77e=0x0;_0x41b77e<_0x5d0031[_0x19a6c3(0x195)];_0x41b77e+=_0x3f366b){const _0x1c9106=_0x5d0031['slice'](_0x41b77e,_0x41b77e+_0x3f366b),_0x149255=await Promise[_0x19a6c3(0x191)](_0x1c9106['map'](_0x39f461));_0x4ce745['push'](..._0x149255);}return _0x4ce745;}function a157_0x59ed(_0x1bd12c,_0x5affa4){_0x1bd12c=_0x1bd12c-0x190;const _0xc092be=a157_0xc092();let _0x59edf5=_0xc092be[_0x1bd12c];return _0x59edf5;}function a157_0xc092(){const _0x1019f6=['3375606mCXKxA','2824854zpXVqY','69292rOBnaC','5955628AGqpiG','14PahZTn','all','1950220VltoMc','5FQgtOP','8408817TsuIqa','length','77944PNvsDQ'];a157_0xc092=function(){return _0x1019f6;};return a157_0xc092();}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x64457b=a158_0xdb19;(function(_0x388e43,_0x2564fd){const _0x516c8a=a158_0xdb19,_0x1bfb45=_0x388e43();while(!![]){try{const _0x3087f6=-parseInt(_0x516c8a(0x14f))/0x1*(-parseInt(_0x516c8a(0x150))/0x2)+-parseInt(_0x516c8a(0x161))/0x3+-parseInt(_0x516c8a(0x157))/0x4+parseInt(_0x516c8a(0x14e))/0x5+parseInt(_0x516c8a(0x15d))/0x6+parseInt(_0x516c8a(0x164))/0x7+-parseInt(_0x516c8a(0x15c))/0x8*(-parseInt(_0x516c8a(0x167))/0x9);if(_0x3087f6===_0x2564fd)break;else _0x1bfb45['push'](_0x1bfb45['shift']());}catch(_0x3c9580){_0x1bfb45['push'](_0x1bfb45['shift']());}}}(a158_0x1cf5,0x626ac));import*as a158_0x39e705 from'chalk';const Chalk=a158_0x39e705[a158_0x64457b(0x152)];export function shouldUseColor(_0x3f63fc={}){const _0x2ffc43=a158_0x64457b;if(_0x3f63fc[_0x2ffc43(0x15e)]===!![])return![];if(_0x3f63fc[_0x2ffc43(0x163)]===!![])return!![];if(process.env.NO_COLOR!==undefined)return![];return process['stdout'][_0x2ffc43(0x166)]??![];}export function getChalk(_0x33bce5={}){if(shouldUseColor(_0x33bce5))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x4b8976,_0x517f3d={}){return getChalk(_0x517f3d)['dim'](_0x4b8976);}export function colorHeader(_0x2c6a96,_0x219800={}){const _0xff8be4=a158_0x64457b;return getChalk(_0x219800)[_0xff8be4(0x159)](_0x2c6a96);}function a158_0xdb19(_0x11feca,_0x2c379b){_0x11feca=_0x11feca-0x14d;const _0x1cf5fb=a158_0x1cf5();let _0xdb1967=_0x1cf5fb[_0x11feca];return _0xdb1967;}export function colorType(_0x371069,_0x3a7548={}){return getChalk(_0x3a7548)['dim'](_0x371069);}export function colorJSONKey(_0x4c2bb6,_0x2306ee={}){const _0x4274e6=a158_0x64457b;return getChalk(_0x2306ee)[_0x4274e6(0x15a)](_0x4c2bb6);}export function colorJSONString(_0x3ef176,_0x5239dd={}){const _0xd386e7=a158_0x64457b;return getChalk(_0x5239dd)[_0xd386e7(0x154)](_0x3ef176);}export function colorJSONNumber(_0x3d03b9,_0x46dd39={}){const _0x35493a=a158_0x64457b;return getChalk(_0x46dd39)[_0x35493a(0x159)](_0x3d03b9);}export function colorJSONBoolean(_0x54a46d,_0x31c064={}){const _0x36d54f=a158_0x64457b;return getChalk(_0x31c064)[_0x36d54f(0x169)](_0x54a46d);}export function colorJSONNull(_0x486cf6,_0x12bde2={}){const _0x3b8b41=a158_0x64457b;return getChalk(_0x12bde2)[_0x3b8b41(0x160)](_0x486cf6);}function a158_0x1cf5(){const _0x43677e=['join','8624024ClaKLL','1287588mMGWGm','noColor','string','dim','1388454PExspo','number','color','833441GeJLTO','stringify','isTTY','9HzrBWL','boolean','yellow','repeat','101540mDUESp','194351shEeNG','2AWthPE','object','Chalk','map','green','null','length','3041556gyqgPL','isArray','cyan','blue'];a158_0x1cf5=function(){return _0x43677e;};return a158_0x1cf5();}export function colorizeJSONCompact(_0x3b7d13,_0x4d70d0={}){const _0x2776cd=a158_0x64457b;if(!shouldUseColor(_0x4d70d0))return JSON[_0x2776cd(0x165)](_0x3b7d13);if(_0x3b7d13===null)return colorJSONNull('null',_0x4d70d0);if(typeof _0x3b7d13===_0x2776cd(0x168))return colorJSONBoolean(String(_0x3b7d13),_0x4d70d0);if(typeof _0x3b7d13===_0x2776cd(0x162))return colorJSONNumber(String(_0x3b7d13),_0x4d70d0);if(typeof _0x3b7d13===_0x2776cd(0x15f))return colorJSONString(JSON['stringify'](_0x3b7d13),_0x4d70d0);if(Array[_0x2776cd(0x158)](_0x3b7d13)){if(_0x3b7d13[_0x2776cd(0x156)]===0x0)return'[]';const _0x1ad3ce=_0x3b7d13[_0x2776cd(0x153)](_0x3d6770=>colorizeJSONCompact(_0x3d6770,_0x4d70d0));return'['+_0x1ad3ce[_0x2776cd(0x15b)](',')+']';}if(typeof _0x3b7d13===_0x2776cd(0x151)){const _0x5acedd=Object['entries'](_0x3b7d13);if(_0x5acedd[_0x2776cd(0x156)]===0x0)return'{}';const _0x4899cc=_0x5acedd['map'](([_0x271911,_0x32cb5b])=>{const _0xda95a9=_0x2776cd,_0x41760f=colorJSONKey(JSON[_0xda95a9(0x165)](_0x271911),_0x4d70d0),_0x2efd6f=colorizeJSONCompact(_0x32cb5b,_0x4d70d0);return _0x41760f+':'+_0x2efd6f;});return'{'+_0x4899cc[_0x2776cd(0x15b)](',')+'}';}return String(_0x3b7d13);}export function colorizeJSON(_0x128414,_0x295c77={},_0x84846b=0x0){const _0x3873db=a158_0x64457b;if(!shouldUseColor(_0x295c77))return JSON[_0x3873db(0x165)](_0x128414,null,0x2);const _0x1eb745='\x20'['repeat'](_0x84846b),_0x261d44=_0x84846b+0x2;if(_0x128414===null)return colorJSONNull(_0x3873db(0x155),_0x295c77);if(typeof _0x128414==='boolean')return colorJSONBoolean(String(_0x128414),_0x295c77);if(typeof _0x128414===_0x3873db(0x162))return colorJSONNumber(String(_0x128414),_0x295c77);if(typeof _0x128414===_0x3873db(0x15f))return colorJSONString(JSON['stringify'](_0x128414),_0x295c77);if(Array[_0x3873db(0x158)](_0x128414)){if(_0x128414['length']===0x0)return'[]';const _0x2286b0=_0x128414['map'](_0x403969=>{const _0x59a208=_0x3873db,_0x53dd6b=colorizeJSON(_0x403969,_0x295c77,_0x261d44);return''+'\x20'[_0x59a208(0x14d)](_0x261d44)+_0x53dd6b;});return'[\x0a'+_0x2286b0[_0x3873db(0x15b)](',\x0a')+('\x0a'+_0x1eb745+']');}if(typeof _0x128414===_0x3873db(0x151)){const _0x1aa7bf=Object['entries'](_0x128414);if(_0x1aa7bf[_0x3873db(0x156)]===0x0)return'{}';const _0x34aa66=_0x1aa7bf[_0x3873db(0x153)](([_0x5e4604,_0x5b3277])=>{const _0x571618=_0x3873db,_0x7d1b79=colorJSONKey(JSON[_0x571618(0x165)](_0x5e4604),_0x295c77),_0x33878f=colorizeJSON(_0x5b3277,_0x295c77,_0x261d44);return''+'\x20'['repeat'](_0x261d44)+_0x7d1b79+':\x20'+_0x33878f;});return'{\x0a'+_0x34aa66['join'](',\x0a')+('\x0a'+_0x1eb745+'}');}return String(_0x128414);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a159_0x2686(){const _0x3243c7=['513558QZjaVD','\x20-\x20','removed','42290ZZDFpm','1965672gbQeLY','69811EJnaLG','join','map','min','added','some','red','unchanged','\x20\x20...','content','dim','\x20+\x20','68vtaWcU','old','cyan','add','new','max','329716NZazqN','length','padStart','push','fill','type','split','2666210bnAskj','has','unshift','size','280ySwiFY','3076FLCOTn','192CViehT','repeat'];a159_0x2686=function(){return _0x3243c7;};return a159_0x2686();}function a159_0x468d(_0x150d20,_0x3bc983){_0x150d20=_0x150d20-0x108;const _0x268670=a159_0x2686();let _0x468d96=_0x268670[_0x150d20];return _0x468d96;}(function(_0x14a68c,_0x51b1b0){const _0x2775d=a159_0x468d,_0xebe090=_0x14a68c();while(!![]){try{const _0x1aaa02=-parseInt(_0x2775d(0x10c))/0x1+parseInt(_0x2775d(0x118))/0x2*(-parseInt(_0x2775d(0x119))/0x3)+parseInt(_0x2775d(0x12c))/0x4*(parseInt(_0x2775d(0x11e))/0x5)+parseInt(_0x2775d(0x11f))/0x6+-parseInt(_0x2775d(0x120))/0x7*(-parseInt(_0x2775d(0x117))/0x8)+parseInt(_0x2775d(0x11b))/0x9+-parseInt(_0x2775d(0x113))/0xa;if(_0x1aaa02===_0x51b1b0)break;else _0xebe090['push'](_0xebe090['shift']());}catch(_0x2e1faf){_0xebe090['push'](_0xebe090['shift']());}}}(a159_0x2686,0x2c9da));import a159_0x374ebb from'chalk';export function generateDiff(_0x4b74f3,_0x5d6377){const _0x5e9f23=a159_0x468d,_0x4bdf81=_0x4b74f3[_0x5e9f23(0x112)]('\x0a'),_0x51f43e=_0x5d6377['split']('\x0a'),_0x4b696e=[],_0x3debc1=computeLCS(_0x4bdf81,_0x51f43e);let _0x69c6bf=0x0,_0x20d399=0x0,_0x16f4d9=0x0;while(_0x69c6bf<_0x4bdf81[_0x5e9f23(0x10d)]||_0x20d399<_0x51f43e[_0x5e9f23(0x10d)]){if(_0x16f4d9<_0x3debc1[_0x5e9f23(0x10d)]&&_0x69c6bf<_0x4bdf81['length']&&_0x4bdf81[_0x69c6bf]===_0x3debc1[_0x16f4d9])_0x20d399<_0x51f43e['length']&&_0x51f43e[_0x20d399]===_0x3debc1[_0x16f4d9]?(_0x4b696e['push']({'type':_0x5e9f23(0x127),'content':_0x4bdf81[_0x69c6bf]}),_0x69c6bf++,_0x20d399++,_0x16f4d9++):(_0x4b696e[_0x5e9f23(0x10f)]({'type':'added','content':_0x51f43e[_0x20d399]}),_0x20d399++);else{if(_0x16f4d9<_0x3debc1[_0x5e9f23(0x10d)]&&_0x20d399<_0x51f43e[_0x5e9f23(0x10d)]&&_0x51f43e[_0x20d399]===_0x3debc1[_0x16f4d9])_0x4b696e[_0x5e9f23(0x10f)]({'type':_0x5e9f23(0x11d),'content':_0x4bdf81[_0x69c6bf]}),_0x69c6bf++;else{if(_0x69c6bf<_0x4bdf81[_0x5e9f23(0x10d)]&&(_0x16f4d9>=_0x3debc1[_0x5e9f23(0x10d)]||_0x4bdf81[_0x69c6bf]!==_0x3debc1[_0x16f4d9]))_0x4b696e['push']({'type':_0x5e9f23(0x11d),'content':_0x4bdf81[_0x69c6bf]}),_0x69c6bf++;else _0x20d399<_0x51f43e[_0x5e9f23(0x10d)]&&(_0x4b696e['push']({'type':_0x5e9f23(0x124),'content':_0x51f43e[_0x20d399]}),_0x20d399++);}}}return _0x4b696e;}function computeLCS(_0x180a0a,_0x2fce7f){const _0x160901=a159_0x468d,_0x5dbc2f=_0x180a0a[_0x160901(0x10d)],_0x5a677e=_0x2fce7f[_0x160901(0x10d)],_0x59515f=Array(_0x5dbc2f+0x1)[_0x160901(0x110)](null)[_0x160901(0x122)](()=>Array(_0x5a677e+0x1)[_0x160901(0x110)](0x0));for(let _0x58089c=0x1;_0x58089c<=_0x5dbc2f;_0x58089c++){for(let _0x2bfd5c=0x1;_0x2bfd5c<=_0x5a677e;_0x2bfd5c++){_0x180a0a[_0x58089c-0x1]===_0x2fce7f[_0x2bfd5c-0x1]?_0x59515f[_0x58089c][_0x2bfd5c]=_0x59515f[_0x58089c-0x1][_0x2bfd5c-0x1]+0x1:_0x59515f[_0x58089c][_0x2bfd5c]=Math[_0x160901(0x10b)](_0x59515f[_0x58089c-0x1][_0x2bfd5c],_0x59515f[_0x58089c][_0x2bfd5c-0x1]);}}const _0x8e03b9=[];let _0x24d1c3=_0x5dbc2f,_0x12aa3b=_0x5a677e;while(_0x24d1c3>0x0&&_0x12aa3b>0x0){if(_0x180a0a[_0x24d1c3-0x1]===_0x2fce7f[_0x12aa3b-0x1])_0x8e03b9[_0x160901(0x115)](_0x180a0a[_0x24d1c3-0x1]),_0x24d1c3--,_0x12aa3b--;else _0x59515f[_0x24d1c3-0x1][_0x12aa3b]>_0x59515f[_0x24d1c3][_0x12aa3b-0x1]?_0x24d1c3--:_0x12aa3b--;}return _0x8e03b9;}export function formatDiffWithColors(_0x10d77c,_0x52ef02=0x3){const _0x225f87=a159_0x468d,_0x48ce90=new Set();_0x10d77c['forEach']((_0x326c32,_0x3f1d5d)=>{const _0x360770=a159_0x468d;_0x326c32['type']!==_0x360770(0x127)&&_0x48ce90[_0x360770(0x109)](_0x3f1d5d);});if(_0x48ce90[_0x225f87(0x116)]===0x0)return'';const _0x3ec342=new Set();for(const _0xfebcc3 of _0x48ce90){for(let _0x39a495=Math[_0x225f87(0x10b)](0x0,_0xfebcc3-_0x52ef02);_0x39a495<=Math[_0x225f87(0x123)](_0x10d77c[_0x225f87(0x10d)]-0x1,_0xfebcc3+_0x52ef02);_0x39a495++){_0x3ec342[_0x225f87(0x109)](_0x39a495);}}const _0x16065c=[];let _0x1e2d87=-0x1;const _0x57087b=_0x10d77c[_0x225f87(0x10d)],_0x47cc4a=Math[_0x225f87(0x10b)](0x3,String(_0x57087b)[_0x225f87(0x10d)]),_0x25883a=[];let _0x465627=0x0,_0x1ce9ee=0x0;for(const _0x28850b of _0x10d77c){if(_0x28850b[_0x225f87(0x111)]===_0x225f87(0x11d))_0x465627++,_0x25883a[_0x225f87(0x10f)]({'old':_0x465627,'new':0x0});else _0x28850b['type']===_0x225f87(0x124)?(_0x1ce9ee++,_0x25883a[_0x225f87(0x10f)]({'old':0x0,'new':_0x1ce9ee})):(_0x465627++,_0x1ce9ee++,_0x25883a[_0x225f87(0x10f)]({'old':_0x465627,'new':_0x1ce9ee}));}for(let _0x1c3c2b=0x0;_0x1c3c2b<_0x10d77c[_0x225f87(0x10d)];_0x1c3c2b++){if(!_0x3ec342[_0x225f87(0x114)](_0x1c3c2b))continue;_0x1e2d87!==-0x1&&_0x1c3c2b>_0x1e2d87+0x1&&_0x16065c['push'](a159_0x374ebb[_0x225f87(0x108)](_0x225f87(0x128)));_0x1e2d87=_0x1c3c2b;const _0x34f91d=_0x10d77c[_0x1c3c2b],_0x1020d1=_0x25883a[_0x1c3c2b],_0x16eea1=_0x1020d1[_0x225f87(0x12d)]>0x0?String(_0x1020d1['old'])[_0x225f87(0x10e)](_0x47cc4a):'\x20'['repeat'](_0x47cc4a),_0x2483e3=_0x1020d1[_0x225f87(0x10a)]>0x0?String(_0x1020d1['new'])[_0x225f87(0x10e)](_0x47cc4a):'\x20'[_0x225f87(0x11a)](_0x47cc4a);switch(_0x34f91d[_0x225f87(0x111)]){case'removed':_0x16065c['push'](a159_0x374ebb[_0x225f87(0x126)](_0x16eea1+'\x20'+_0x2483e3+_0x225f87(0x11c)+_0x34f91d[_0x225f87(0x129)]));break;case _0x225f87(0x124):_0x16065c[_0x225f87(0x10f)](a159_0x374ebb['green'](_0x16eea1+'\x20'+_0x2483e3+_0x225f87(0x12b)+_0x34f91d['content']));break;default:_0x16065c[_0x225f87(0x10f)](a159_0x374ebb[_0x225f87(0x12a)](_0x16eea1+'\x20'+_0x2483e3+'\x20\x20\x20'+_0x34f91d['content']));break;}}return _0x16065c[_0x225f87(0x121)]('\x0a');}export function hasChanges(_0x395540){const _0x3d3872=a159_0x468d;return _0x395540[_0x3d3872(0x125)](_0x423193=>_0x423193[_0x3d3872(0x111)]!=='unchanged');}
|