@treasuredata/tdx 0.28.2 → 0.28.3
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/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/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/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/use-command.js +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.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/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/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-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/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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.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/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a163_0xc53a(){const _0x554b84=['1416582gsgTfA','map','7006388uuKTXY','length','startsWith','filter','100051ovkPnN','add','582ZgtQqk','12977512HViqGs','.dig','replace','trim','join','8381995vsNodS','endsWith','ignores','.digdagignore','13923162VnYPHd','1795206xGvMnQ','.digdag','.DS_Store','ENOENT','2ejwrwo','slice','readFile'];a163_0xc53a=function(){return _0x554b84;};return a163_0xc53a();}const a163_0x59fcb2=a163_0x1feb;(function(_0x36a132,_0x4f5035){const _0x4ab45d=a163_0x1feb,_0x1289e6=_0x36a132();while(!![]){try{const _0x298d7a=-parseInt(_0x4ab45d(0x77))/0x1+parseInt(_0x4ab45d(0x74))/0x2*(parseInt(_0x4ab45d(0x70))/0x3)+-parseInt(_0x4ab45d(0x79))/0x4+parseInt(_0x4ab45d(0x6b))/0x5+parseInt(_0x4ab45d(0x7f))/0x6*(-parseInt(_0x4ab45d(0x7d))/0x7)+parseInt(_0x4ab45d(0x80))/0x8+parseInt(_0x4ab45d(0x6f))/0x9;if(_0x298d7a===_0x4f5035)break;else _0x1289e6['push'](_0x1289e6['shift']());}catch(_0x22f30a){_0x1289e6['push'](_0x1289e6['shift']());}}}(a163_0xc53a,0xd9240));import{promises as a163_0x1290f2}from'fs';function a163_0x1feb(_0x62221e,_0x5b255e){_0x62221e=_0x62221e-0x67;const _0xc53a65=a163_0xc53a();let _0x1feb33=_0xc53a65[_0x62221e];return _0x1feb33;}import a163_0x3ccee6 from'path';import a163_0x3e7063 from'ignore';export const WORKFLOW_FILE_EXTENSION=a163_0x59fcb2(0x67);export function shouldIncludeInArchive(_0x45c02a){const _0x380a39=a163_0x59fcb2;if(_0x45c02a===_0x380a39(0x71))return!![];if(_0x45c02a[_0x380a39(0x7b)]('.'))return![];if(_0x45c02a[_0x380a39(0x6c)]('~'))return![];if(_0x45c02a==='Thumbs.db'||_0x45c02a===_0x380a39(0x72))return![];return!![];}export function parseDigdagignore(_0x1989df){const _0x224737=a163_0x59fcb2;return _0x1989df['split']('\x0a')[_0x224737(0x78)](_0x8f123c=>_0x8f123c[_0x224737(0x69)]())[_0x224737(0x7c)](_0x4caec3=>_0x4caec3[_0x224737(0x7a)]>0x0&&!_0x4caec3['startsWith']('#'));}export async function loadDigdagignore(_0x324d15){const _0x2cb6c6=a163_0x59fcb2,_0xe1e783=a163_0x3ccee6[_0x2cb6c6(0x6a)](_0x324d15,_0x2cb6c6(0x6e));try{const _0x513296=await a163_0x1290f2[_0x2cb6c6(0x76)](_0xe1e783,'utf-8');return parseDigdagignore(_0x513296);}catch(_0x2f9b5a){if(_0x2f9b5a['code']===_0x2cb6c6(0x73))return null;throw _0x2f9b5a;}}export function createIgnoreInstance(_0x4be123){const _0x850b5f=a163_0x59fcb2,_0x1c4ba7=a163_0x3e7063();return _0x4be123&&_0x4be123[_0x850b5f(0x7a)]>0x0&&_0x1c4ba7['add'](_0x4be123),_0x1c4ba7;}export function addScopedPatterns(_0x4b8453,_0x55cd6d,_0x4a40a2){const _0x28f30e=a163_0x59fcb2,_0x13ac25=_0x55cd6d[_0x28f30e(0x78)](_0x136c3f=>{const _0x3fb9c3=_0x28f30e;if(_0x136c3f[_0x3fb9c3(0x7b)]('!')){const _0x403de5=_0x136c3f[_0x3fb9c3(0x75)](0x1);if(_0x403de5[_0x3fb9c3(0x7b)]('/'))return'!'+_0x4a40a2+_0x403de5;return'!'+_0x4a40a2+'/'+_0x403de5;}if(_0x136c3f[_0x3fb9c3(0x7b)]('/'))return''+_0x4a40a2+_0x136c3f;return _0x4a40a2+'/'+_0x136c3f;});return _0x4b8453[_0x28f30e(0x7e)](_0x13ac25),_0x4b8453;}export function shouldIgnoreWithInstance(_0x625f20,_0x31104b,_0x3ac12e){const _0x53a89d=a163_0x59fcb2,_0xbd91a6=_0x31104b[_0x53a89d(0x68)](/\\/g,'/'),_0x9bbfdb=_0x3ac12e?_0xbd91a6+'/':_0xbd91a6;return _0x625f20[_0x53a89d(0x6d)](_0x9bbfdb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x3afc18=a164_0x3177;function a164_0x3177(_0x1b26e7,_0x32e90c){_0x1b26e7=_0x1b26e7-0x93;const _0x2c3ccf=a164_0x2c3c();let _0x3177c2=_0x2c3ccf[_0x1b26e7];return _0x3177c2;}(function(_0x4633d2,_0x24f7bd){const _0x105944=a164_0x3177,_0x22a26c=_0x4633d2();while(!![]){try{const _0x599f22=parseInt(_0x105944(0xad))/0x1+parseInt(_0x105944(0xa0))/0x2*(parseInt(_0x105944(0x94))/0x3)+-parseInt(_0x105944(0x99))/0x4*(parseInt(_0x105944(0xaa))/0x5)+parseInt(_0x105944(0xa1))/0x6*(-parseInt(_0x105944(0x98))/0x7)+-parseInt(_0x105944(0xa2))/0x8+-parseInt(_0x105944(0xb0))/0x9*(parseInt(_0x105944(0x9a))/0xa)+parseInt(_0x105944(0xa9))/0xb;if(_0x599f22===_0x24f7bd)break;else _0x22a26c['push'](_0x22a26c['shift']());}catch(_0x215e5f){_0x22a26c['push'](_0x22a26c['shift']());}}}(a164_0x2c3c,0x39823));import{TDX,LogLevel}from'../sdk/index.js';import{createHTTPMock}from'./http-mock.js';import{createTestGlobalOptions}from'./factories.js';function a164_0x2c3c(){const _0x29de60=['fetch','314622FwMFJa','log','join','27NiVmIs','error','http','1611RwKkzx','map','fail','us01','7noabWO','56aLhWIm','928810rsiXbu','teardown','test-api-key-id/test-api-key-secret','ERROR','options','originalFetch','1084AVcgpG','2154384FbDNwI','2332848oUiTeN','site','run','args','warn','verify','reset','7569298fQaDqK','46045rnvfuD','push'];a164_0x2c3c=function(){return _0x29de60;};return a164_0x2c3c();}export class CommandRunner{[a164_0x3afc18(0x93)];[a164_0x3afc18(0x9f)];constructor(){const _0x12309a=a164_0x3afc18;this[_0x12309a(0x93)]=createHTTPMock(),this[_0x12309a(0x9f)]=global[_0x12309a(0xac)];}['setup'](){const _0x263663=a164_0x3afc18;this[_0x263663(0x9f)]=global[_0x263663(0xac)],global[_0x263663(0xac)]=this[_0x263663(0x93)]['createFetch']();}[a164_0x3afc18(0x9b)](_0x293a65){const _0x28078d=a164_0x3afc18;try{_0x293a65?.[_0x28078d(0x96)]&&this[_0x28078d(0x93)][_0x28078d(0xa7)](_0x293a65);}finally{global['fetch']=this[_0x28078d(0x9f)],this[_0x28078d(0x93)][_0x28078d(0xa8)]();}}async[a164_0x3afc18(0xa4)](_0x41b299,_0x2e9347={}){const _0x358e25=a164_0x3afc18,_0x2a5a13=[],_0x573f6d=[],_0x7fa58a=console[_0x358e25(0xae)],_0x37743d=console[_0x358e25(0xb1)],_0x455b62=console[_0x358e25(0xa6)];console[_0x358e25(0xae)]=(..._0x2ccc0b)=>{const _0x22f986=_0x358e25;_0x2a5a13[_0x22f986(0xab)](_0x2ccc0b[_0x22f986(0x95)](String)[_0x22f986(0xaf)]('\x20'));},console['error']=(..._0x23ab00)=>{const _0x274a71=_0x358e25;_0x573f6d['push'](_0x23ab00[_0x274a71(0x95)](String)[_0x274a71(0xaf)]('\x20'));},console[_0x358e25(0xa6)]=(..._0x23a008)=>{const _0x27af58=_0x358e25;_0x573f6d[_0x27af58(0xab)](_0x23a008['map'](String)[_0x27af58(0xaf)]('\x20'));};try{const _0x5c3c61=new TDX({'site':_0x2e9347[_0x358e25(0x9e)]?.[_0x358e25(0xa3)]??_0x358e25(0x97),'apiKey':_0x358e25(0x9c),'logLevel':LogLevel[_0x358e25(0x9d)]}),_0x34e4d9={'options':createTestGlobalOptions(_0x2e9347['options']),'args':_0x2e9347[_0x358e25(0xa5)]??[],'tdx':_0x5c3c61},_0xb6b63a=new _0x41b299(),_0x3ea7ba=await _0xb6b63a['run'](_0x34e4d9);return{'exitCode':_0x3ea7ba,'stdout':_0x2a5a13,'stderr':_0x573f6d};}finally{console[_0x358e25(0xae)]=_0x7fa58a,console[_0x358e25(0xb1)]=_0x37743d,console['warn']=_0x455b62;}}async['runSequence'](_0x1e1f63){const _0x1d93b6=a164_0x3afc18,_0x415817=[];for(const {command:_0xcb4417,options:_0x2462ea}of _0x1e1f63){const _0x1c5388=await this[_0x1d93b6(0xa4)](_0xcb4417,_0x2462ea);_0x415817[_0x1d93b6(0xab)](_0x1c5388);if(_0x1c5388['exitCode']!==0x0)break;}return _0x415817;}}export function createCommandRunner(){return new CommandRunner();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26b90c,_0x5a53b1){const _0x2d6cf5=a165_0x513d,_0x2f7753=_0x26b90c();while(!![]){try{const _0x3688cf=-parseInt(_0x2d6cf5(0xc5))/0x1*(-parseInt(_0x2d6cf5(0xc4))/0x2)+-parseInt(_0x2d6cf5(0xb9))/0x3+parseInt(_0x2d6cf5(0xaf))/0x4+parseInt(_0x2d6cf5(0xae))/0x5+-parseInt(_0x2d6cf5(0xb5))/0x6*(-parseInt(_0x2d6cf5(0xbf))/0x7)+parseInt(_0x2d6cf5(0xc0))/0x8+-parseInt(_0x2d6cf5(0xad))/0x9*(parseInt(_0x2d6cf5(0xbe))/0xa);if(_0x3688cf===_0x5a53b1)break;else _0x2f7753['push'](_0x2f7753['shift']());}catch(_0x412879){_0x2f7753['push'](_0x2f7753['shift']());}}}(a165_0x46d1,0x7e7e1));import{vi}from'vitest';import{join}from'path';import{Logger,LogLevel,FileHandler}from'../utils/logger/index.js';import{getGlobalCacheDir}from'../utils/global-cache.js';export function createTestSDKContext(_0x19dd01){const _0x410eaf=a165_0x513d;return{'site':_0x410eaf(0xbc),'apiKey':'test-api-key-id/test-api-key-secret','logLevel':LogLevel[_0x410eaf(0xbd)],..._0x19dd01};}export function createTestGlobalOptions(_0x38ff4b){const _0x2f66be=a165_0x513d;return{'site':_0x2f66be(0xbc),'format':_0x2f66be(0xb6),'noColor':!![],'limit':0x64,'verbose':![],'timeout':_0x2f66be(0xb4),'dryRun':![],'yes':![],'logLevel':LogLevel[_0x2f66be(0xbd)],..._0x38ff4b};}export async function initTestLogger(){const _0x526756=a165_0x513d;Logger[_0x526756(0xc6)]();const _0x1b5b37=join(getGlobalCacheDir(),_0x526756(0xc1),_0x526756(0xbb));await Logger[_0x526756(0xaa)]({'defaultLevel':LogLevel[_0x526756(0xb7)],'handlers':[new FileHandler({'filePath':_0x1b5b37,'rotate':![]})]});}export function resetTestLogger(){const _0x130cea=a165_0x513d;Logger[_0x130cea(0xc6)]();}export function createMockTDX(_0x3e9e5d){const _0x246199=a165_0x513d;return{'context':{'site':_0x246199(0xbc),'apiKey':'test-api-key','logLevel':LogLevel[_0x246199(0xbd)]},'query':{'execute':vi['fn'](),'listDatabases':vi['fn'](),'listTables':vi['fn'](),'describeTable':vi['fn'](),'showTable':vi['fn'](),..._0x3e9e5d?.[_0x246199(0xb8)]},'segment':{'listParents':vi['fn'](),'getParent':vi['fn'](),'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x3e9e5d?.[_0x246199(0xab)]},'journey':{'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x3e9e5d?.[_0x246199(0xba)]},'workflow':{'list':vi['fn'](),'get':vi['fn'](),'run':vi['fn'](),..._0x3e9e5d?.['workflow']},'user':{'show':vi['fn'](),..._0x3e9e5d?.['user']},'api':{'request':vi['fn'](),..._0x3e9e5d?.[_0x246199(0xc3)]},..._0x3e9e5d};}function a165_0x513d(_0x42a5e5,_0x421c17){_0x42a5e5=_0x42a5e5-0xaa;const _0x46d18f=a165_0x46d1();let _0x513d6d=_0x46d18f[_0x42a5e5];return _0x513d6d;}export function createTestCommandContext(_0x2a0437){const _0x218f65=a165_0x513d,_0x2bc6d7=createTestGlobalOptions(_0x2a0437?.['options']),_0x4edbdf=_0x2a0437?.[_0x218f65(0xb0)]??createMockTDX();return{'options':_0x2bc6d7,'args':_0x2a0437?.[_0x218f65(0xb1)]??[],'tdx':_0x4edbdf};}function a165_0x46d1(){const _0x28a734=['1274231HBrpIN','4816240OrFiuM','logs','join','api','2ZurvZZ','325277rKGDky','reset','init','segment','map','9djxrIo','2213330IizdSX','1389156XaxeyY','tdx','args','error','warn','30000','12xTmmDZ','table','DEBUG','query','2348346JItuqx','journey','tdx-test.log','us01','ERROR','7804330UqTfrx'];a165_0x46d1=function(){return _0x28a734;};return a165_0x46d1();}export function captureConsole(){const _0x3540f9=a165_0x513d,_0xaae21b=[],_0x143db4=[],_0x5acc22=console['log'],_0xe7d2dc=console[_0x3540f9(0xb2)],_0x151fcc=console[_0x3540f9(0xb3)];return console['log']=(..._0x189e67)=>{const _0x10b9e3=_0x3540f9;_0xaae21b['push'](_0x189e67[_0x10b9e3(0xac)](String)[_0x10b9e3(0xc2)]('\x20'));},console[_0x3540f9(0xb2)]=(..._0x28121a)=>{const _0x1f0506=_0x3540f9;_0x143db4['push'](_0x28121a['map'](String)[_0x1f0506(0xc2)]('\x20'));},console[_0x3540f9(0xb3)]=(..._0x2c38a6)=>{const _0x57dc6b=_0x3540f9;_0x143db4['push'](_0x2c38a6[_0x57dc6b(0xac)](String)[_0x57dc6b(0xc2)]('\x20'));},{'stdout':_0xaae21b,'stderr':_0x143db4,'restore':()=>{const _0x138589=_0x3540f9;console['log']=_0x5acc22,console[_0x138589(0xb2)]=_0xe7d2dc,console[_0x138589(0xb3)]=_0x151fcc;}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a166_0x1d345e=a166_0x25a7;(function(_0x5e9b2e,_0x476659){const _0x524996=a166_0x25a7,_0x18a092=_0x5e9b2e();while(!![]){try{const _0x15f8bf=-parseInt(_0x524996(0x16c))/0x1*(-parseInt(_0x524996(0x14e))/0x2)+parseInt(_0x524996(0x195))/0x3*(parseInt(_0x524996(0x159))/0x4)+parseInt(_0x524996(0x15b))/0x5+-parseInt(_0x524996(0x174))/0x6+-parseInt(_0x524996(0x17c))/0x7+parseInt(_0x524996(0x173))/0x8*(parseInt(_0x524996(0x13c))/0x9)+-parseInt(_0x524996(0x148))/0xa;if(_0x15f8bf===_0x476659)break;else _0x18a092['push'](_0x18a092['shift']());}catch(_0x1a79a8){_0x18a092['push'](_0x18a092['shift']());}}}(a166_0x4c17,0xa89df));export const fixtures={'database':{'basic':{'name':a166_0x1d345e(0x146),'count':0x5,'created_at':a166_0x1d345e(0x179),'updated_at':a166_0x1d345e(0x179),'permission':a166_0x1d345e(0x14b)},'withTables':{'name':'production_db','count':0x64,'created_at':a166_0x1d345e(0x152),'updated_at':a166_0x1d345e(0x19a),'permission':a166_0x1d345e(0x138)}},'table':{'basic':{'id':0x3039,'name':a166_0x1d345e(0x153),'type':'log','schema':JSON['stringify']([['id',a166_0x1d345e(0x155)],[a166_0x1d345e(0x16f),'long'],[a166_0x1d345e(0x197),a166_0x1d345e(0x155)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':'2024-01-01T00:00:00Z','updated_at':a166_0x1d345e(0x179)},'events':{'id':0x303a,'name':a166_0x1d345e(0x182),'type':a166_0x1d345e(0x144),'schema':JSON['stringify']([[a166_0x1d345e(0x167),'string'],[a166_0x1d345e(0x16f),a166_0x1d345e(0x170)],['user_id',a166_0x1d345e(0x155)],['event_type',a166_0x1d345e(0x155)],[a166_0x1d345e(0x15a),a166_0x1d345e(0x19c)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a166_0x1d345e(0x179),'updated_at':a166_0x1d345e(0x158)}},'parentSegment':{'basic':{'id':a166_0x1d345e(0x186),'name':a166_0x1d345e(0x189),'description':'A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','status':a166_0x1d345e(0x18d),'master_table':{'database':a166_0x1d345e(0x136),'table':a166_0x1d345e(0x171)},'attributes':[{'name':a166_0x1d345e(0x19b),'type':a166_0x1d345e(0x155),'key':!![]},{'name':a166_0x1d345e(0x177),'type':'string'},{'name':'created_at','type':'timestamp'}],'created_at':a166_0x1d345e(0x179),'updated_at':a166_0x1d345e(0x165)},'withBehaviors':{'id':'ps-789012','name':a166_0x1d345e(0x14f),'description':a166_0x1d345e(0x17d),'status':a166_0x1d345e(0x18d),'master_table':{'database':a166_0x1d345e(0x136),'table':a166_0x1d345e(0x154)},'behaviors':[{'name':a166_0x1d345e(0x139),'table':{'database':a166_0x1d345e(0x135),'table':a166_0x1d345e(0x139)},'join_key':a166_0x1d345e(0x19b)},{'name':a166_0x1d345e(0x185),'table':{'database':a166_0x1d345e(0x135),'table':'pageviews'},'join_key':a166_0x1d345e(0x19b)}],'created_at':a166_0x1d345e(0x179),'updated_at':'2024-01-15T00:00:00Z'}},'segment':{'basic':{'id':a166_0x1d345e(0x187),'name':a166_0x1d345e(0x184),'description':'Users\x20active\x20in\x20the\x20last\x2030\x20days','parent_segment_id':'ps-123456','status':'active','rules':[{'type':a166_0x1d345e(0x160),'field':a166_0x1d345e(0x178),'operator':a166_0x1d345e(0x18b),'value':'30d'}],'count':0x1388,'created_at':a166_0x1d345e(0x179),'updated_at':a166_0x1d345e(0x165)},'withMultipleRules':{'id':'cs-111222','name':a166_0x1d345e(0x143),'description':a166_0x1d345e(0x13d),'parent_segment_id':'ps-123456','status':a166_0x1d345e(0x18d),'rules':[{'type':'attribute','field':'last_login','operator':'TimeWithinPast','value':a166_0x1d345e(0x132)},{'type':a166_0x1d345e(0x160),'field':a166_0x1d345e(0x180),'operator':a166_0x1d345e(0x181),'value':0x3e8}],'count':0x5dc,'created_at':a166_0x1d345e(0x179),'updated_at':'2024-01-15T00:00:00Z'}},'journey':{'basic':{'id':a166_0x1d345e(0x14a),'name':'Welcome\x20Journey','description':a166_0x1d345e(0x149),'status':a166_0x1d345e(0x16b),'version':0x1,'steps':[{'id':a166_0x1d345e(0x199),'type':a166_0x1d345e(0x166),'duration':'1d'},{'id':a166_0x1d345e(0x157),'type':'activation','activation_id':a166_0x1d345e(0x16a)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a166_0x1d345e(0x165)},'withDecision':{'id':a166_0x1d345e(0x163),'name':a166_0x1d345e(0x18c),'description':a166_0x1d345e(0x169),'status':a166_0x1d345e(0x18d),'version':0x2,'steps':[{'id':a166_0x1d345e(0x199),'type':a166_0x1d345e(0x156),'segment_id':a166_0x1d345e(0x187),'yes_path':'step-2','no_path':'step-3'},{'id':'step-2','type':a166_0x1d345e(0x161),'activation_id':a166_0x1d345e(0x194)},{'id':a166_0x1d345e(0x176),'type':a166_0x1d345e(0x13e)}],'created_at':a166_0x1d345e(0x179),'updated_at':'2024-01-15T00:00:00Z'}},'queryResult':{'basic':{'schema':[{'name':'id','type':'varchar'},{'name':a166_0x1d345e(0x197),'type':a166_0x1d345e(0x18a)},{'name':'count','type':a166_0x1d345e(0x17f)}],'data':[[a166_0x1d345e(0x145),'Alice',0x64],[a166_0x1d345e(0x15e),a166_0x1d345e(0x15c),0xc8],[a166_0x1d345e(0x15f),'Charlie',0x96]]},'empty':{'schema':[{'name':'id','type':a166_0x1d345e(0x18a)},{'name':a166_0x1d345e(0x197),'type':a166_0x1d345e(0x18a)}],'data':[]},'singleRow':{'schema':[{'name':a166_0x1d345e(0x193),'type':a166_0x1d345e(0x17f)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a166_0x1d345e(0x192),'email':a166_0x1d345e(0x183),'created_at':a166_0x1d345e(0x179),'updated_at':a166_0x1d345e(0x165),'administrator':![]},'admin':{'id':0x1,'name':a166_0x1d345e(0x18e),'email':a166_0x1d345e(0x142),'created_at':a166_0x1d345e(0x137),'updated_at':a166_0x1d345e(0x165),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a166_0x1d345e(0x175),'database':a166_0x1d345e(0x146),'status':a166_0x1d345e(0x16e),'query':a166_0x1d345e(0x164),'start_at':a166_0x1d345e(0x150),'end_at':a166_0x1d345e(0x13a),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a166_0x1d345e(0x175),'database':'test_db','status':a166_0x1d345e(0x18f),'query':a166_0x1d345e(0x168),'start_at':a166_0x1d345e(0x134),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':'presto','database':a166_0x1d345e(0x146),'status':a166_0x1d345e(0x196),'query':a166_0x1d345e(0x13f),'start_at':'2024-01-15T10:10:00Z','end_at':'2024-01-15T10:10:01Z','duration':0x1,'result_size':null,'error':a166_0x1d345e(0x140)}},'workflow':{'basic':{'id':a166_0x1d345e(0x17e),'name':a166_0x1d345e(0x188),'project':a166_0x1d345e(0x19d),'revision':'abc123','timezone':a166_0x1d345e(0x133),'schedule':{'cron':'0\x200\x20*\x20*\x20*'}},'withSessions':{'id':'wf-67890','name':'hourly_sync','project':'data_sync','revision':a166_0x1d345e(0x191),'timezone':a166_0x1d345e(0x14c),'schedule':{'cron':a166_0x1d345e(0x16d)},'last_session':{'id':a166_0x1d345e(0x13b),'status':a166_0x1d345e(0x16e),'started_at':'2024-01-15T09:00:00Z','finished_at':'2024-01-15T09:05:00Z'}}},'apiError':{'unauthorized':{'errors':{'error':a166_0x1d345e(0x15d),'message':a166_0x1d345e(0x15d),'severity':a166_0x1d345e(0x196),'status_code':0x191}},'notFound':{'errors':{'error':'Resource\x20not\x20found','message':'The\x20requested\x20resource\x20does\x20not\x20exist','severity':a166_0x1d345e(0x196),'status_code':0x194}},'rateLimited':{'detail':a166_0x1d345e(0x151)},'rfc9457':{'type':'https://api.treasuredata.com/errors/forbidden','title':a166_0x1d345e(0x17b),'status':0x193,'detail':'You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','instance':a166_0x1d345e(0x190)}}};function a166_0x4c17(){const _0x5f11cd=['cs-456789','daily_etl','Test\x20Parent\x20Segment','varchar','TimeWithinPast','Purchase\x20Reminder','active','Admin\x20User','running','/v3/database/list','def456','Test\x20User','total','act-email','4112061ZWdorz','error','name','segment','step-1','2024-01-15T08:00:00Z','customer_id','map<string,string>','data_pipeline','30d','UTC','2024-01-15T10:05:00Z','events_db','cdp_db','2023-01-01T00:00:00Z','full_access','purchases','2024-01-15T10:00:05Z','sess-111','45AAzMUG','Active\x20users\x20with\x20high\x20lifetime\x20value','end','SELECT\x20*\x20FROM\x20nonexistent_table','Table\x20does\x20not\x20exist:\x20nonexistent_table','workflow','admin@example.com','High\x20Value\x20Active\x20Users','log','user-1','test_db','journey','3536830SmJuvy','Onboarding\x20journey\x20for\x20new\x20users','j-abc123','administrator','America/Los_Angeles','basic','23014QzxGxB','Customers\x20with\x20Behaviors','2024-01-15T10:00:00Z','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','2023-06-15T10:30:00Z','users','customers','string','decision_point','step-2','2024-01-15T12:00:00Z','4QJzFTU','properties','5623395WmQbVb','Bob','Invalid\x20API\x20key','user-2','user-3','attribute','activation','table','j-def456','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','2024-01-15T00:00:00Z','wait','event_id','SELECT\x20COUNT(*)\x20FROM\x20events','Journey\x20with\x20decision\x20point','act-123','draft','11itnrJX','0\x20*\x20*\x20*\x20*','success','time','long','unified_customers','parentSegment','197032PEnbmw','5673396pZswjX','presto','step-3','email','last_login','2024-01-01T00:00:00Z','job','Forbidden','5286288UqdVTB','Parent\x20segment\x20with\x20behavioral\x20data','wf-12345','bigint','lifetime_value','Greater','events','test@example.com','Active\x20Users','page_views','ps-123456'];a166_0x4c17=function(){return _0x5f11cd;};return a166_0x4c17();}export function createDatabase(_0x2b0ab2){return{...fixtures['database']['basic'],..._0x2b0ab2};}export function createTable(_0x528672){const _0x360719=a166_0x1d345e;return{...fixtures[_0x360719(0x162)]['basic'],..._0x528672};}export function createParentSegment(_0x369049){const _0xc761b0=a166_0x1d345e;return{...fixtures[_0xc761b0(0x172)][_0xc761b0(0x14d)],..._0x369049};}export function createSegment(_0x597dac){const _0x1e5323=a166_0x1d345e;return{...fixtures[_0x1e5323(0x198)]['basic'],..._0x597dac};}export function createJourney(_0x2492d0){const _0x55578b=a166_0x1d345e;return{...fixtures[_0x55578b(0x147)][_0x55578b(0x14d)],..._0x2492d0};}export function createQueryResult(_0x5d03cf){return{...fixtures['queryResult']['basic'],..._0x5d03cf};}export function createUser(_0x5b076d){const _0x14ce6c=a166_0x1d345e;return{...fixtures['user'][_0x14ce6c(0x14d)],..._0x5b076d};}function a166_0x25a7(_0x4f1098,_0x30f6be){_0x4f1098=_0x4f1098-0x132;const _0x4c1787=a166_0x4c17();let _0x25a704=_0x4c1787[_0x4f1098];return _0x25a704;}export function createJob(_0x140262){const _0xc21826=a166_0x1d345e;return{...fixtures[_0xc21826(0x17a)]['completed'],..._0x140262};}export function createWorkflow(_0x12f898){const _0x1c3ba4=a166_0x1d345e;return{...fixtures[_0x1c3ba4(0x141)][_0x1c3ba4(0x14d)],..._0x12f898};}
|
|
1
|
+
const a166_0x28716b=a166_0x5a10;(function(_0x1d2544,_0x2fcc46){const _0x1c1972=a166_0x5a10,_0x583379=_0x1d2544();while(!![]){try{const _0x4e83f0=parseInt(_0x1c1972(0x1c3))/0x1*(-parseInt(_0x1c1972(0x1d8))/0x2)+-parseInt(_0x1c1972(0x197))/0x3+parseInt(_0x1c1972(0x181))/0x4*(-parseInt(_0x1c1972(0x182))/0x5)+-parseInt(_0x1c1972(0x1c9))/0x6*(parseInt(_0x1c1972(0x1b2))/0x7)+parseInt(_0x1c1972(0x1b0))/0x8*(-parseInt(_0x1c1972(0x1a6))/0x9)+parseInt(_0x1c1972(0x191))/0xa+parseInt(_0x1c1972(0x1d0))/0xb;if(_0x4e83f0===_0x2fcc46)break;else _0x583379['push'](_0x583379['shift']());}catch(_0x1d1f52){_0x583379['push'](_0x583379['shift']());}}}(a166_0x21fb,0x672df));export const fixtures={'database':{'basic':{'name':a166_0x28716b(0x1a7),'count':0x5,'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1ad),'permission':a166_0x28716b(0x1aa)},'withTables':{'name':a166_0x28716b(0x1ba),'count':0x64,'created_at':a166_0x28716b(0x1c7),'updated_at':a166_0x28716b(0x1b4),'permission':'full_access'}},'table':{'basic':{'id':0x3039,'name':a166_0x28716b(0x193),'type':a166_0x28716b(0x1b9),'schema':JSON[a166_0x28716b(0x18b)]([['id',a166_0x28716b(0x1d9)],[a166_0x28716b(0x190),'long'],[a166_0x28716b(0x178),'string']]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1ad)},'events':{'id':0x303a,'name':a166_0x28716b(0x1cb),'type':a166_0x28716b(0x1b9),'schema':JSON[a166_0x28716b(0x18b)]([['event_id',a166_0x28716b(0x1d9)],[a166_0x28716b(0x190),a166_0x28716b(0x16e)],[a166_0x28716b(0x173),'string'],[a166_0x28716b(0x184),a166_0x28716b(0x1d9)],[a166_0x28716b(0x177),'map<string,string>']]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1ac)}},'parentSegment':{'basic':{'id':'ps-123456','name':a166_0x28716b(0x17c),'description':a166_0x28716b(0x18c),'status':a166_0x28716b(0x1ab),'master_table':{'database':a166_0x28716b(0x19c),'table':a166_0x28716b(0x189)},'attributes':[{'name':a166_0x28716b(0x17b),'type':a166_0x28716b(0x1d9),'key':!![]},{'name':a166_0x28716b(0x1db),'type':'string'},{'name':a166_0x28716b(0x1c8),'type':a166_0x28716b(0x1af)}],'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1c6)},'withBehaviors':{'id':'ps-789012','name':a166_0x28716b(0x1a3),'description':a166_0x28716b(0x1a0),'status':a166_0x28716b(0x1ab),'master_table':{'database':a166_0x28716b(0x19c),'table':a166_0x28716b(0x1d4)},'behaviors':[{'name':'purchases','table':{'database':'events_db','table':'purchases'},'join_key':a166_0x28716b(0x17b)},{'name':a166_0x28716b(0x187),'table':{'database':'events_db','table':a166_0x28716b(0x1c4)},'join_key':a166_0x28716b(0x17b)}],'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1c6)}},'segment':{'basic':{'id':a166_0x28716b(0x18a),'name':'Active\x20Users','description':'Users\x20active\x20in\x20the\x20last\x2030\x20days','parent_segment_id':a166_0x28716b(0x1d7),'status':a166_0x28716b(0x1ab),'rules':[{'type':'attribute','field':a166_0x28716b(0x1c1),'operator':a166_0x28716b(0x1bd),'value':a166_0x28716b(0x1a2)}],'count':0x1388,'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1c6)},'withMultipleRules':{'id':a166_0x28716b(0x16f),'name':'High\x20Value\x20Active\x20Users','description':a166_0x28716b(0x19f),'parent_segment_id':a166_0x28716b(0x1d7),'status':a166_0x28716b(0x1ab),'rules':[{'type':a166_0x28716b(0x19e),'field':a166_0x28716b(0x1c1),'operator':a166_0x28716b(0x1bd),'value':a166_0x28716b(0x1a2)},{'type':a166_0x28716b(0x19e),'field':a166_0x28716b(0x17a),'operator':a166_0x28716b(0x1bc),'value':0x3e8}],'count':0x5dc,'created_at':'2024-01-01T00:00:00Z','updated_at':a166_0x28716b(0x1c6)}},'journey':{'basic':{'id':'j-abc123','name':'Welcome\x20Journey','description':a166_0x28716b(0x1b8),'status':'draft','version':0x1,'steps':[{'id':a166_0x28716b(0x171),'type':a166_0x28716b(0x16d),'duration':'1d'},{'id':'step-2','type':a166_0x28716b(0x1cf),'activation_id':'act-123'}],'created_at':a166_0x28716b(0x1ad),'updated_at':'2024-01-15T00:00:00Z'},'withDecision':{'id':a166_0x28716b(0x1ae),'name':'Purchase\x20Reminder','description':'Journey\x20with\x20decision\x20point','status':a166_0x28716b(0x1ab),'version':0x2,'steps':[{'id':a166_0x28716b(0x171),'type':a166_0x28716b(0x186),'segment_id':'cs-456789','yes_path':a166_0x28716b(0x1dc),'no_path':a166_0x28716b(0x1d3)},{'id':a166_0x28716b(0x1dc),'type':'activation','activation_id':a166_0x28716b(0x1c5)},{'id':a166_0x28716b(0x1d3),'type':a166_0x28716b(0x1a4)}],'created_at':a166_0x28716b(0x1ad),'updated_at':a166_0x28716b(0x1c6)}},'queryResult':{'basic':{'schema':[{'name':'id','type':a166_0x28716b(0x1cd)},{'name':a166_0x28716b(0x178),'type':a166_0x28716b(0x1cd)},{'name':a166_0x28716b(0x17f),'type':a166_0x28716b(0x1b3)}],'data':[[a166_0x28716b(0x172),a166_0x28716b(0x185),0x64],[a166_0x28716b(0x19a),'Bob',0xc8],[a166_0x28716b(0x1b6),'Charlie',0x96]]},'empty':{'schema':[{'name':'id','type':a166_0x28716b(0x1cd)},{'name':a166_0x28716b(0x178),'type':a166_0x28716b(0x1cd)}],'data':[]},'singleRow':{'schema':[{'name':a166_0x28716b(0x174),'type':'bigint'}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a166_0x28716b(0x1be),'email':a166_0x28716b(0x1a8),'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z','administrator':![]},'admin':{'id':0x1,'name':a166_0x28716b(0x196),'email':a166_0x28716b(0x1bb),'created_at':a166_0x28716b(0x180),'updated_at':'2024-01-15T00:00:00Z','administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a166_0x28716b(0x195),'database':a166_0x28716b(0x1a7),'status':'success','query':'SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','start_at':a166_0x28716b(0x1d5),'end_at':a166_0x28716b(0x188),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a166_0x28716b(0x195),'database':a166_0x28716b(0x1a7),'status':a166_0x28716b(0x1b7),'query':a166_0x28716b(0x1d2),'start_at':a166_0x28716b(0x1ce),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':a166_0x28716b(0x195),'database':a166_0x28716b(0x1a7),'status':a166_0x28716b(0x17d),'query':a166_0x28716b(0x1a9),'start_at':'2024-01-15T10:10:00Z','end_at':a166_0x28716b(0x19b),'duration':0x1,'result_size':null,'error':'Table\x20does\x20not\x20exist:\x20nonexistent_table'}},'workflow':{'basic':{'id':a166_0x28716b(0x1cc),'name':a166_0x28716b(0x18d),'project':'data_pipeline','revision':a166_0x28716b(0x176),'timezone':a166_0x28716b(0x1c2),'schedule':{'cron':a166_0x28716b(0x1da)}},'withSessions':{'id':a166_0x28716b(0x1bf),'name':a166_0x28716b(0x198),'project':a166_0x28716b(0x194),'revision':a166_0x28716b(0x1ca),'timezone':'America/Los_Angeles','schedule':{'cron':a166_0x28716b(0x1c0)},'last_session':{'id':a166_0x28716b(0x199),'status':a166_0x28716b(0x183),'started_at':a166_0x28716b(0x1a1),'finished_at':a166_0x28716b(0x1d6)}}},'apiError':{'unauthorized':{'errors':{'error':a166_0x28716b(0x192),'message':'Invalid\x20API\x20key','severity':a166_0x28716b(0x17d),'status_code':0x191}},'notFound':{'errors':{'error':a166_0x28716b(0x179),'message':'The\x20requested\x20resource\x20does\x20not\x20exist','severity':'error','status_code':0x194}},'rateLimited':{'detail':a166_0x28716b(0x18f)},'rfc9457':{'type':a166_0x28716b(0x175),'title':a166_0x28716b(0x170),'status':0x193,'detail':'You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','instance':'/v3/database/list'}}};export function createDatabase(_0x1aecf4){const _0x571c47=a166_0x28716b;return{...fixtures['database'][_0x571c47(0x19d)],..._0x1aecf4};}export function createTable(_0x407a61){const _0x4a0108=a166_0x28716b;return{...fixtures[_0x4a0108(0x18e)][_0x4a0108(0x19d)],..._0x407a61};}function a166_0x21fb(){const _0x581891=['Forbidden','step-1','user-1','user_id','total','https://api.treasuredata.com/errors/forbidden','abc123','properties','name','Resource\x20not\x20found','lifetime_value','customer_id','Test\x20Parent\x20Segment','error','segment','count','2023-01-01T00:00:00Z','522972eBCHLF','5CNQfxw','success','event_type','Alice','decision_point','page_views','2024-01-15T10:00:05Z','unified_customers','cs-456789','stringify','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','daily_etl','table','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','time','450560sgExWs','Invalid\x20API\x20key','users','data_sync','presto','Admin\x20User','1007877kHvECk','hourly_sync','sess-111','user-2','2024-01-15T10:10:01Z','cdp_db','basic','attribute','Active\x20users\x20with\x20high\x20lifetime\x20value','Parent\x20segment\x20with\x20behavioral\x20data','2024-01-15T09:00:00Z','30d','Customers\x20with\x20Behaviors','end','queryResult','18oxgFzR','test_db','test@example.com','SELECT\x20*\x20FROM\x20nonexistent_table','administrator','active','2024-01-15T12:00:00Z','2024-01-01T00:00:00Z','j-def456','timestamp','740768ukSvnd','workflow','236047auOVIV','bigint','2024-01-15T08:00:00Z','completed','user-3','running','Onboarding\x20journey\x20for\x20new\x20users','log','production_db','admin@example.com','Greater','TimeWithinPast','Test\x20User','wf-67890','0\x20*\x20*\x20*\x20*','last_login','UTC','741661oOfwGR','pageviews','act-email','2024-01-15T00:00:00Z','2023-06-15T10:30:00Z','created_at','36JOTusx','def456','events','wf-12345','varchar','2024-01-15T10:05:00Z','activation','21707928nyGCnU','job','SELECT\x20COUNT(*)\x20FROM\x20events','step-3','customers','2024-01-15T10:00:00Z','2024-01-15T09:05:00Z','ps-123456','2cKshUW','string','0\x200\x20*\x20*\x20*','email','step-2','wait','long','cs-111222'];a166_0x21fb=function(){return _0x581891;};return a166_0x21fb();}export function createParentSegment(_0x197e6b){const _0x117baf=a166_0x28716b;return{...fixtures['parentSegment'][_0x117baf(0x19d)],..._0x197e6b};}export function createSegment(_0x4535d0){const _0x446860=a166_0x28716b;return{...fixtures[_0x446860(0x17e)]['basic'],..._0x4535d0};}export function createJourney(_0x2a3712){const _0x4e4846=a166_0x28716b;return{...fixtures['journey'][_0x4e4846(0x19d)],..._0x2a3712};}export function createQueryResult(_0xf0b92f){const _0x5455e2=a166_0x28716b;return{...fixtures[_0x5455e2(0x1a5)][_0x5455e2(0x19d)],..._0xf0b92f};}export function createUser(_0x1fdd17){return{...fixtures['user']['basic'],..._0x1fdd17};}export function createJob(_0x54f75f){const _0x2d0647=a166_0x28716b;return{...fixtures[_0x2d0647(0x1d1)][_0x2d0647(0x1b5)],..._0x54f75f};}function a166_0x5a10(_0x3f6ccf,_0x74b2ef){_0x3f6ccf=_0x3f6ccf-0x16d;const _0x21fb8d=a166_0x21fb();let _0x5a10b5=_0x21fb8d[_0x3f6ccf];return _0x5a10b5;}export function createWorkflow(_0xfcbbae){const _0x1778a1=a166_0x28716b;return{...fixtures[_0x1778a1(0x1b1)][_0x1778a1(0x19d)],..._0xfcbbae};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x34499b=a167_0x25e7;(function(_0x4e2c79,_0x3b32e2){const _0x2695f5=a167_0x25e7,_0x3d2be4=_0x4e2c79();while(!![]){try{const _0x52bb47=parseInt(_0x2695f5(0x95))/0x1*(-parseInt(_0x2695f5(0xae))/0x2)+parseInt(_0x2695f5(0xad))/0x3+parseInt(_0x2695f5(0xca))/0x4*(parseInt(_0x2695f5(0xa5))/0x5)+-parseInt(_0x2695f5(0xcc))/0x6*(-parseInt(_0x2695f5(0x9d))/0x7)+-parseInt(_0x2695f5(0xba))/0x8*(parseInt(_0x2695f5(0x9e))/0x9)+-parseInt(_0x2695f5(0xb5))/0xa+-parseInt(_0x2695f5(0x99))/0xb;if(_0x52bb47===_0x3b32e2)break;else _0x3d2be4['push'](_0x3d2be4['shift']());}catch(_0x40d9f7){_0x3d2be4['push'](_0x3d2be4['shift']());}}}(a167_0x6e8c,0xf1c33));import{vi}from'vitest';function a167_0x6e8c(){const _0x47999d=['some','getLastRequest','getRequests','GET','searchParams','fetchMock','REST','Bad\x20Request','Too\x20Many\x20Requests','Internal\x20Server\x20Error','host','matcher','createFetch','every','parseRequest','https://api.treasuredata.com/errors/','toLowerCase','31366GISlJQ','map','No\x20stub\x20matched\x20request:\x20','description','13594647RihGHy','\x20\x20(none)','Not\x20Found','errorResponse','388920odGxIR','1944117hTqsZB','stubs','unnamed\x20stub','split','getStatusText','Unmatched\x20stub','No\x20Content','43745uocMaq','string','includes','test','matchCount','wasCalled','url','textResponse','5763564IZrGsf','4NQBvKf','withHost','join','td-api','responder','application/json','headers','4847040CzhsfP','getMatchCount','jsonResponse','pathname','error','56NvaMBi','Bad\x20Gateway','stringify','Conflict','Unknown','length','Created','withBody','requests','push','slice','withQuery','matched','Request\x20body:\x20','forEach','Registered\x20stubs:\x0a','700UgbdrA','Forbidden','90CMImXj','text/plain','stack','entries','method','register','verify','\x20stub(s)\x20were\x20not\x20matched:\x0a\x0a','toUpperCase'];a167_0x6e8c=function(){return _0x47999d;};return a167_0x6e8c();}export class HTTPMockRegistry{['stubs']=[];['requests']=[];['fetchMock']=null;[a167_0x34499b(0xdb)](_0x57f115,_0x5892fc){return _0xbfa968=>{const _0x37ff1e=a167_0x25e7;if(_0xbfa968[_0x37ff1e(0xd0)][_0x37ff1e(0xd4)]()!==_0x57f115[_0x37ff1e(0xd4)]())return![];const _0x586fee=new URL(_0xbfa968['url']);if(typeof _0x5892fc===_0x37ff1e(0xa6))return _0x586fee[_0x37ff1e(0xb8)]===_0x5892fc||_0x586fee['pathname']['includes'](_0x5892fc);return _0x5892fc[_0x37ff1e(0xa8)](_0x586fee[_0x37ff1e(0xb8)]);};}[a167_0x34499b(0xc5)](_0x76aa81,_0x21db52){return _0xd8e83d=>{const _0x19cc3a=a167_0x25e7;if(!_0x76aa81(_0xd8e83d))return![];const _0x360e58=new URL(_0xd8e83d[_0x19cc3a(0xab)]);return Object[_0x19cc3a(0xcf)](_0x21db52)[_0x19cc3a(0x91)](([_0x5c0c88,_0x489a9e])=>_0x360e58[_0x19cc3a(0xd9)]['get'](_0x5c0c88)===_0x489a9e);};}[a167_0x34499b(0xc1)](_0x23f5de,_0x2093a7){return _0x17cec6=>{const _0x340f06=a167_0x25e7;if(!_0x23f5de(_0x17cec6))return![];if(typeof _0x2093a7==='function')return _0x2093a7(_0x17cec6['body']);return JSON[_0x340f06(0xbc)](_0x17cec6['body'])===JSON['stringify'](_0x2093a7);};}[a167_0x34499b(0xaf)](_0x2a1045,_0x5846df){return _0x4c8097=>{const _0x4bc937=a167_0x25e7;if(!_0x2a1045(_0x4c8097))return![];const _0x54249c=new URL(_0x4c8097['url']);return _0x54249c[_0x4bc937(0x8e)]===_0x5846df;};}[a167_0x34499b(0xd1)](_0x2f34ab,_0x41f4aa,_0x45fa4b){const _0x176a30=a167_0x34499b;this[_0x176a30(0x9f)][_0x176a30(0xc3)]({'matcher':_0x2f34ab,'responder':_0x41f4aa,'matched':![],'matchCount':0x0,'stack':new Error()[_0x176a30(0xce)]??'','description':_0x45fa4b?.[_0x176a30(0x98)]});}['registerWithInspector'](_0x475109,_0x5e7c3d,_0x56e429){const _0x3860c4=_0x3ac3e0=>{return _0x56e429(_0x3ac3e0['body'],_0x3ac3e0),_0x5e7c3d(_0x3ac3e0);};this['register'](_0x475109,_0x3860c4);}static[a167_0x34499b(0xb7)](_0x54ba98,_0x4e1b70=0xc8){const _0x53d985=a167_0x34499b;return()=>new Response(JSON[_0x53d985(0xbc)](_0x54ba98),{'status':_0x4e1b70,'headers':{'Content-Type':_0x53d985(0xb3)}});}static[a167_0x34499b(0x9c)](_0x465fca,_0x505c61,_0x1ff530='simple'){return()=>{const _0x5300a9=a167_0x25e7;let _0x4de938;switch(_0x1ff530){case _0x5300a9(0xb1):_0x4de938={'errors':{'error':_0x505c61,'message':_0x505c61,'severity':_0x5300a9(0xb9),'status_code':_0x465fca}};break;case'rfc9457':_0x4de938={'type':_0x5300a9(0x93)+_0x465fca,'title':HTTPMockRegistry[_0x5300a9(0xa2)](_0x465fca),'status':_0x465fca,'detail':_0x505c61};break;default:_0x4de938={'error':_0x505c61};}return new Response(JSON[_0x5300a9(0xbc)](_0x4de938),{'status':_0x465fca,'headers':{'Content-Type':_0x5300a9(0xb3)}});};}static['jsonResponseWithHeaders'](_0x528817,_0x1951dc,_0x294758=0xc8){return()=>new Response(JSON['stringify'](_0x528817),{'status':_0x294758,'headers':{'Content-Type':'application/json',..._0x1951dc}});}static[a167_0x34499b(0xac)](_0x5bff9b,_0x2ea587=0xc8){const _0x203fc6=a167_0x34499b;return()=>new Response(_0x5bff9b,{'status':_0x2ea587,'headers':{'Content-Type':_0x203fc6(0xcd)}});}static['networkError'](_0x20a3e7){return()=>{throw new Error(_0x20a3e7);};}[a167_0x34499b(0x90)](){const _0x46469f=a167_0x34499b;return this[_0x46469f(0xda)]=vi['fn']()['mockImplementation'](async(_0x4832fe,_0x3eee52)=>{const _0x2f8e0e=_0x46469f,_0x3149e1=this['parseRequest'](_0x4832fe,_0x3eee52);this[_0x2f8e0e(0xc2)][_0x2f8e0e(0xc3)](_0x3149e1);for(const _0xe81164 of this[_0x2f8e0e(0x9f)]){if(_0xe81164[_0x2f8e0e(0x8f)](_0x3149e1))return _0xe81164['matched']=!![],_0xe81164[_0x2f8e0e(0xa9)]++,_0xe81164[_0x2f8e0e(0xb2)](_0x3149e1);}const _0x333389=this[_0x2f8e0e(0x9f)]['map']((_0x3c3a2d,_0x14cc2b)=>'\x20\x20'+(_0x14cc2b+0x1)+'.\x20'+(_0x3c3a2d[_0x2f8e0e(0x98)]??_0x2f8e0e(0xa0)))[_0x2f8e0e(0xb0)]('\x0a');throw new Error(_0x2f8e0e(0x97)+_0x3149e1[_0x2f8e0e(0xd0)]+'\x20'+_0x3149e1['url']+'\x0a'+(_0x2f8e0e(0xc7)+JSON['stringify'](_0x3149e1['body'])+'\x0a')+(_0x2f8e0e(0xc9)+(_0x333389||_0x2f8e0e(0x9a))));}),this[_0x46469f(0xda)];}[a167_0x34499b(0x92)](_0x39463d,_0x3fc45d){const _0x337f2b=a167_0x34499b,_0x1f8875={};if(_0x3fc45d?.[_0x337f2b(0xb4)]){if(_0x3fc45d['headers']instanceof Headers)_0x3fc45d['headers'][_0x337f2b(0xc8)]((_0x1005ab,_0x31ab7a)=>{const _0x497e83=_0x337f2b;_0x1f8875[_0x31ab7a[_0x497e83(0x94)]()]=_0x1005ab;});else{if(Array['isArray'](_0x3fc45d[_0x337f2b(0xb4)]))for(const [_0x1ff490,_0x667487]of _0x3fc45d[_0x337f2b(0xb4)]){_0x1f8875[_0x1ff490['toLowerCase']()]=_0x667487;}else for(const [_0x312033,_0x16eedd]of Object[_0x337f2b(0xcf)](_0x3fc45d['headers'])){_0x16eedd!==undefined&&(_0x1f8875[_0x312033[_0x337f2b(0x94)]()]=_0x16eedd);}}}let _0x51d018;if(_0x3fc45d?.['body'])try{_0x51d018=JSON['parse'](_0x3fc45d['body']);}catch{_0x51d018=_0x3fc45d['body'];}return{'method':_0x3fc45d?.[_0x337f2b(0xd0)]??_0x337f2b(0xd8),'url':_0x39463d,'headers':_0x1f8875,'body':_0x51d018};}[a167_0x34499b(0xd2)](_0x51a22a){const _0xd4e53e=a167_0x34499b,_0x2eae7e=this[_0xd4e53e(0x9f)]['filter'](_0x51ef31=>!_0x51ef31[_0xd4e53e(0xc6)]);if(_0x2eae7e[_0xd4e53e(0xbf)]>0x0){const _0x38f37a=_0x2eae7e[_0xd4e53e(0x96)](_0x5792a6=>{const _0x4963ae=_0xd4e53e,_0x34e5bf=_0x5792a6[_0x4963ae(0x98)]?'\x20('+_0x5792a6[_0x4963ae(0x98)]+')':'',_0xe2baf5=_0x5792a6[_0x4963ae(0xce)][_0x4963ae(0xa1)]('\x0a')[_0x4963ae(0xc4)](0x2,0x5)[_0x4963ae(0xb0)]('\x0a');return _0x4963ae(0xa3)+_0x34e5bf+'\x20registered\x20at:\x0a'+_0xe2baf5;});_0x51a22a['fail'](_0x2eae7e[_0xd4e53e(0xbf)]+_0xd4e53e(0xd3)+_0x38f37a[_0xd4e53e(0xb0)]('\x0a\x0a'));}}[a167_0x34499b(0xd7)](){return[...this['requests']];}[a167_0x34499b(0xd6)](){const _0x13d491=a167_0x34499b;return this[_0x13d491(0xc2)][this[_0x13d491(0xc2)][_0x13d491(0xbf)]-0x1];}[a167_0x34499b(0xaa)](_0x472a4b,_0x28c5bb){const _0x35ae1e=a167_0x34499b;return this[_0x35ae1e(0xc2)][_0x35ae1e(0xd5)](_0x36dd9f=>{const _0x584a8e=_0x35ae1e;if(_0x36dd9f[_0x584a8e(0xd0)]['toUpperCase']()!==_0x472a4b[_0x584a8e(0xd4)]())return![];if(typeof _0x28c5bb===_0x584a8e(0xa6))return _0x36dd9f[_0x584a8e(0xab)][_0x584a8e(0xa7)](_0x28c5bb);return _0x28c5bb[_0x584a8e(0xa8)](_0x36dd9f[_0x584a8e(0xab)]);});}[a167_0x34499b(0xb6)](_0x1a9ccf){return this['stubs'][_0x1a9ccf]?.['matchCount']??0x0;}['reset'](){const _0x293189=a167_0x34499b;this['stubs']=[],this[_0x293189(0xc2)]=[],this['fetchMock']=null;}static[a167_0x34499b(0xa2)](_0x19d1e6){const _0x14913a=a167_0x34499b,_0x132dea={0xc8:'OK',0xc9:_0x14913a(0xc0),0xcc:_0x14913a(0xa4),0x190:_0x14913a(0xdc),0x191:'Unauthorized',0x193:_0x14913a(0xcb),0x194:_0x14913a(0x9b),0x199:_0x14913a(0xbd),0x1a6:'Unprocessable\x20Entity',0x1ad:_0x14913a(0xdd),0x1f4:_0x14913a(0x8d),0x1f6:_0x14913a(0xbb),0x1f7:'Service\x20Unavailable'};return _0x132dea[_0x19d1e6]??_0x14913a(0xbe);}}function a167_0x25e7(_0x9dcc00,_0x52931b){_0x9dcc00=_0x9dcc00-0x8d;const _0x6e8c21=a167_0x6e8c();let _0x25e770=_0x6e8c21[_0x9dcc00];return _0x25e770;}export function createHTTPMock(){return new HTTPMockRegistry();}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a168_0x4256(){var _0x208d65=['1793078HSUaIu','27UieRdO','6188hjtWxo','167466zAupWY','210IBgfIV','5vlXHrB','307109DArtry','738XuOBWN','184236mvpGYf','1407152cnAddt','2556204vbUIXD'];a168_0x4256=function(){return _0x208d65;};return a168_0x4256();}(function(_0x3b3cda,_0x3d0182){var _0x3f2211=a168_0x2f5e,_0x3dadf3=_0x3b3cda();while(!![]){try{var _0x903e0f=parseInt(_0x3f2211(0xec))/0x1+parseInt(_0x3f2211(0xe6))/0x2+-parseInt(_0x3f2211(0xf0))/0x3*(parseInt(_0x3f2211(0xeb))/0x4)+parseInt(_0x3f2211(0xee))/0x5*(-parseInt(_0x3f2211(0xe8))/0x6)+-parseInt(_0x3f2211(0xe9))/0x7+-parseInt(_0x3f2211(0xe7))/0x8*(-parseInt(_0x3f2211(0xea))/0x9)+parseInt(_0x3f2211(0xed))/0xa*(parseInt(_0x3f2211(0xef))/0xb);if(_0x903e0f===_0x3d0182)break;else _0x3dadf3['push'](_0x3dadf3['shift']());}catch(_0x3c191c){_0x3dadf3['push'](_0x3dadf3['shift']());}}}(a168_0x4256,0x4be1f));export{HTTPMockRegistry,createHTTPMock}from'./http-mock.js';export{createTestSDKContext,createTestGlobalOptions,createTestCommandContext,createMockTDX,captureConsole}from'./factories.js';function a168_0x2f5e(_0x516852,_0x3352e3){_0x516852=_0x516852-0xe6;var _0x4256bd=a168_0x4256();var _0x2f5e80=_0x4256bd[_0x516852];return _0x2f5e80;}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
|
-
(function(
|
|
1
|
+
function a169_0xd954(){const _0x3b72b5=['length','3253790FmwVfU','92QdgQkp','32906USYpMO','1727181wUeQbg','23sbcweU','138zHBUKd','all','53060FEHtZk','push','3928738YaDIEf','10551tXbCjS','map','56aSSjRy','20768axsnXg'];a169_0xd954=function(){return _0x3b72b5;};return a169_0xd954();}(function(_0x374cb4,_0x59513b){const _0x388b1d=a169_0x282e,_0x1f8d06=_0x374cb4();while(!![]){try{const _0x4893c5=parseInt(_0x388b1d(0x6f))/0x1*(parseInt(_0x388b1d(0x6d))/0x2)+-parseInt(_0x388b1d(0x75))/0x3*(-parseInt(_0x388b1d(0x6c))/0x4)+-parseInt(_0x388b1d(0x72))/0x5*(-parseInt(_0x388b1d(0x70))/0x6)+parseInt(_0x388b1d(0x77))/0x7*(-parseInt(_0x388b1d(0x78))/0x8)+parseInt(_0x388b1d(0x6e))/0x9+-parseInt(_0x388b1d(0x6b))/0xa+-parseInt(_0x388b1d(0x74))/0xb;if(_0x4893c5===_0x59513b)break;else _0x1f8d06['push'](_0x1f8d06['shift']());}catch(_0x423f20){_0x1f8d06['push'](_0x1f8d06['shift']());}}}(a169_0xd954,0x2edf6));function a169_0x282e(_0x144e76,_0x2ce1df){_0x144e76=_0x144e76-0x6b;const _0xd954da=a169_0xd954();let _0x282ef5=_0xd954da[_0x144e76];return _0x282ef5;}export async function batchAsync(_0x1ee681,_0x78eb7b,_0x42d0af=0xa){const _0x1b1c08=a169_0x282e,_0x337a68=[];for(let _0x522e38=0x0;_0x522e38<_0x1ee681[_0x1b1c08(0x79)];_0x522e38+=_0x42d0af){const _0x4e452c=_0x1ee681['slice'](_0x522e38,_0x522e38+_0x42d0af),_0xe28f77=await Promise[_0x1b1c08(0x71)](_0x4e452c[_0x1b1c08(0x76)](_0x78eb7b));_0x337a68[_0x1b1c08(0x73)](..._0xe28f77);}return _0x337a68;}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x1984c7=a170_0x461c;(function(_0x37d3a1,_0xac5bb3){const _0x1ea557=a170_0x461c,_0x222bae=_0x37d3a1();while(!![]){try{const _0x4a3b83=parseInt(_0x1ea557(0xa7))/0x1+parseInt(_0x1ea557(0x99))/0x2+-parseInt(_0x1ea557(0xa9))/0x3+parseInt(_0x1ea557(0x9a))/0x4+-parseInt(_0x1ea557(0xa2))/0x5*(-parseInt(_0x1ea557(0xad))/0x6)+parseInt(_0x1ea557(0xa4))/0x7+-parseInt(_0x1ea557(0x94))/0x8;if(_0x4a3b83===_0xac5bb3)break;else _0x222bae['push'](_0x222bae['shift']());}catch(_0xd6dc96){_0x222bae['push'](_0x222bae['shift']());}}}(a170_0x1535,0x7996c));import*as a170_0xeef34e from'chalk';const Chalk=a170_0xeef34e[a170_0x1984c7(0xa8)];function a170_0x1535(){const _0x123692=['stringify','isTTY','882604hCLbgL','1884256ahsAqo','null','color','number','isArray','cyan','green','yellow','1015fsJhTE','dim','5482204EACulw','map','boolean','573044YUpUwt','Chalk','112920FmZbub','string','length','join','5484LzbItz','15347648icfaAs','object','repeat'];a170_0x1535=function(){return _0x123692;};return a170_0x1535();}export function shouldUseColor(_0x226c2d={}){const _0x59686c=a170_0x1984c7;if(_0x226c2d['noColor']===!![])return![];if(_0x226c2d[_0x59686c(0x9c)]===!![])return!![];if(process.env.NO_COLOR!==undefined)return![];return process['stdout'][_0x59686c(0x98)]??![];}export function getChalk(_0x470c71={}){if(shouldUseColor(_0x470c71))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x795e45,_0x2f4620={}){const _0x348507=a170_0x1984c7;return getChalk(_0x2f4620)[_0x348507(0xa3)](_0x795e45);}export function colorHeader(_0x2e67fb,_0xcfa025={}){const _0x560874=a170_0x1984c7;return getChalk(_0xcfa025)[_0x560874(0x9f)](_0x2e67fb);}export function colorType(_0xf34398,_0x42d39a={}){return getChalk(_0x42d39a)['dim'](_0xf34398);}export function colorJSONKey(_0x52da02,_0x44732d={}){return getChalk(_0x44732d)['blue'](_0x52da02);}export function colorJSONString(_0xe792fe,_0x39450f={}){const _0x57bb1e=a170_0x1984c7;return getChalk(_0x39450f)[_0x57bb1e(0xa0)](_0xe792fe);}export function colorJSONNumber(_0xc79211,_0x123766={}){return getChalk(_0x123766)['cyan'](_0xc79211);}export function colorJSONBoolean(_0xc2acd8,_0x536418={}){const _0x26a932=a170_0x1984c7;return getChalk(_0x536418)[_0x26a932(0xa1)](_0xc2acd8);}function a170_0x461c(_0x2f2e35,_0x205b12){_0x2f2e35=_0x2f2e35-0x94;const _0x1535d8=a170_0x1535();let _0x461cf4=_0x1535d8[_0x2f2e35];return _0x461cf4;}export function colorJSONNull(_0x17e1b4,_0x7ba798={}){const _0x4f35f2=a170_0x1984c7;return getChalk(_0x7ba798)[_0x4f35f2(0xa3)](_0x17e1b4);}export function colorizeJSONCompact(_0x467584,_0x187b74={}){const _0x22cd20=a170_0x1984c7;if(!shouldUseColor(_0x187b74))return JSON[_0x22cd20(0x97)](_0x467584);if(_0x467584===null)return colorJSONNull(_0x22cd20(0x9b),_0x187b74);if(typeof _0x467584===_0x22cd20(0xa6))return colorJSONBoolean(String(_0x467584),_0x187b74);if(typeof _0x467584==='number')return colorJSONNumber(String(_0x467584),_0x187b74);if(typeof _0x467584==='string')return colorJSONString(JSON[_0x22cd20(0x97)](_0x467584),_0x187b74);if(Array['isArray'](_0x467584)){if(_0x467584[_0x22cd20(0xab)]===0x0)return'[]';const _0xa856da=_0x467584[_0x22cd20(0xa5)](_0x14446c=>colorizeJSONCompact(_0x14446c,_0x187b74));return'['+_0xa856da['join'](',')+']';}if(typeof _0x467584===_0x22cd20(0x95)){const _0x8ae787=Object['entries'](_0x467584);if(_0x8ae787[_0x22cd20(0xab)]===0x0)return'{}';const _0x522847=_0x8ae787['map'](([_0x4bf1ea,_0x1c2d82])=>{const _0x597737=_0x22cd20,_0x250e57=colorJSONKey(JSON[_0x597737(0x97)](_0x4bf1ea),_0x187b74),_0x3ac52f=colorizeJSONCompact(_0x1c2d82,_0x187b74);return _0x250e57+':'+_0x3ac52f;});return'{'+_0x522847[_0x22cd20(0xac)](',')+'}';}return String(_0x467584);}export function colorizeJSON(_0x8b890c,_0x32a583={},_0x272eef=0x0){const _0x6342b5=a170_0x1984c7;if(!shouldUseColor(_0x32a583))return JSON['stringify'](_0x8b890c,null,0x2);const _0x201ee7='\x20'[_0x6342b5(0x96)](_0x272eef),_0x2f813c=_0x272eef+0x2;if(_0x8b890c===null)return colorJSONNull('null',_0x32a583);if(typeof _0x8b890c===_0x6342b5(0xa6))return colorJSONBoolean(String(_0x8b890c),_0x32a583);if(typeof _0x8b890c===_0x6342b5(0x9d))return colorJSONNumber(String(_0x8b890c),_0x32a583);if(typeof _0x8b890c===_0x6342b5(0xaa))return colorJSONString(JSON[_0x6342b5(0x97)](_0x8b890c),_0x32a583);if(Array[_0x6342b5(0x9e)](_0x8b890c)){if(_0x8b890c[_0x6342b5(0xab)]===0x0)return'[]';const _0x1634b5=_0x8b890c[_0x6342b5(0xa5)](_0x3f6b89=>{const _0x4a52fc=_0x6342b5,_0xf674bb=colorizeJSON(_0x3f6b89,_0x32a583,_0x2f813c);return''+'\x20'[_0x4a52fc(0x96)](_0x2f813c)+_0xf674bb;});return'[\x0a'+_0x1634b5['join'](',\x0a')+('\x0a'+_0x201ee7+']');}if(typeof _0x8b890c===_0x6342b5(0x95)){const _0xe6c7c8=Object['entries'](_0x8b890c);if(_0xe6c7c8[_0x6342b5(0xab)]===0x0)return'{}';const _0x7cb3da=_0xe6c7c8[_0x6342b5(0xa5)](([_0x235f22,_0x2f369f])=>{const _0x3dc42f=_0x6342b5,_0x25e69e=colorJSONKey(JSON[_0x3dc42f(0x97)](_0x235f22),_0x32a583),_0x4011d2=colorizeJSON(_0x2f369f,_0x32a583,_0x2f813c);return''+'\x20'['repeat'](_0x2f813c)+_0x25e69e+':\x20'+_0x4011d2;});return'{\x0a'+_0x7cb3da[_0x6342b5(0xac)](',\x0a')+('\x0a'+_0x201ee7+'}');}return String(_0x8b890c);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a171_0x79b2(){const _0x49c299=['26120EAwfGk','cyan','\x20\x20...','274KjoZWT','\x20-\x20','8304966rWETRI','content','join','type','2873374XaGjVu','padStart','fill','green','length','new','dim','added','size','\x20+\x20','removed','map','unchanged','push','max','split','min','4690544XwLaHb','\x20\x20\x20','115rslZKH','red','1680948VBnYSE','64nGpmbe','add','1921188wbKWAp'];a171_0x79b2=function(){return _0x49c299;};return a171_0x79b2();}function a171_0x4ab3(_0x5056a5,_0x152d07){_0x5056a5=_0x5056a5-0x126;const _0x79b269=a171_0x79b2();let _0x4ab30a=_0x79b269[_0x5056a5];return _0x4ab30a;}(function(_0x3c47fc,_0x43a7c1){const _0x20d0c2=a171_0x4ab3,_0x115c84=_0x3c47fc();while(!![]){try{const _0x21a453=parseInt(_0x20d0c2(0x13a))/0x1*(parseInt(_0x20d0c2(0x143))/0x2)+parseInt(_0x20d0c2(0x13f))/0x3+-parseInt(_0x20d0c2(0x13d))/0x4*(parseInt(_0x20d0c2(0x140))/0x5)+-parseInt(_0x20d0c2(0x13c))/0x6+parseInt(_0x20d0c2(0x127))/0x7+parseInt(_0x20d0c2(0x138))/0x8+-parseInt(_0x20d0c2(0x145))/0x9;if(_0x21a453===_0x43a7c1)break;else _0x115c84['push'](_0x115c84['shift']());}catch(_0x2d80ac){_0x115c84['push'](_0x115c84['shift']());}}}(a171_0x79b2,0x59763));import a171_0x232a86 from'chalk';export function generateDiff(_0x5e1f29,_0x3b2628){const _0x1ddd08=a171_0x4ab3,_0x117154=_0x5e1f29[_0x1ddd08(0x136)]('\x0a'),_0x5abb04=_0x3b2628[_0x1ddd08(0x136)]('\x0a'),_0x434330=[],_0x21c0cd=computeLCS(_0x117154,_0x5abb04);let _0x2ed10d=0x0,_0x28a252=0x0,_0x36f52d=0x0;while(_0x2ed10d<_0x117154[_0x1ddd08(0x12b)]||_0x28a252<_0x5abb04['length']){if(_0x36f52d<_0x21c0cd['length']&&_0x2ed10d<_0x117154[_0x1ddd08(0x12b)]&&_0x117154[_0x2ed10d]===_0x21c0cd[_0x36f52d])_0x28a252<_0x5abb04[_0x1ddd08(0x12b)]&&_0x5abb04[_0x28a252]===_0x21c0cd[_0x36f52d]?(_0x434330[_0x1ddd08(0x134)]({'type':_0x1ddd08(0x133),'content':_0x117154[_0x2ed10d]}),_0x2ed10d++,_0x28a252++,_0x36f52d++):(_0x434330[_0x1ddd08(0x134)]({'type':_0x1ddd08(0x12e),'content':_0x5abb04[_0x28a252]}),_0x28a252++);else{if(_0x36f52d<_0x21c0cd[_0x1ddd08(0x12b)]&&_0x28a252<_0x5abb04[_0x1ddd08(0x12b)]&&_0x5abb04[_0x28a252]===_0x21c0cd[_0x36f52d])_0x434330[_0x1ddd08(0x134)]({'type':'removed','content':_0x117154[_0x2ed10d]}),_0x2ed10d++;else{if(_0x2ed10d<_0x117154['length']&&(_0x36f52d>=_0x21c0cd[_0x1ddd08(0x12b)]||_0x117154[_0x2ed10d]!==_0x21c0cd[_0x36f52d]))_0x434330[_0x1ddd08(0x134)]({'type':_0x1ddd08(0x131),'content':_0x117154[_0x2ed10d]}),_0x2ed10d++;else _0x28a252<_0x5abb04[_0x1ddd08(0x12b)]&&(_0x434330['push']({'type':_0x1ddd08(0x12e),'content':_0x5abb04[_0x28a252]}),_0x28a252++);}}}return _0x434330;}function computeLCS(_0x170854,_0x9e7b93){const _0x4dfcda=a171_0x4ab3,_0x3bf016=_0x170854[_0x4dfcda(0x12b)],_0x3f8f0c=_0x9e7b93[_0x4dfcda(0x12b)],_0x5e32ee=Array(_0x3bf016+0x1)[_0x4dfcda(0x129)](null)[_0x4dfcda(0x132)](()=>Array(_0x3f8f0c+0x1)[_0x4dfcda(0x129)](0x0));for(let _0x5dc8ca=0x1;_0x5dc8ca<=_0x3bf016;_0x5dc8ca++){for(let _0xbb9807=0x1;_0xbb9807<=_0x3f8f0c;_0xbb9807++){_0x170854[_0x5dc8ca-0x1]===_0x9e7b93[_0xbb9807-0x1]?_0x5e32ee[_0x5dc8ca][_0xbb9807]=_0x5e32ee[_0x5dc8ca-0x1][_0xbb9807-0x1]+0x1:_0x5e32ee[_0x5dc8ca][_0xbb9807]=Math[_0x4dfcda(0x135)](_0x5e32ee[_0x5dc8ca-0x1][_0xbb9807],_0x5e32ee[_0x5dc8ca][_0xbb9807-0x1]);}}const _0x380569=[];let _0x2e2b7e=_0x3bf016,_0xcb5df6=_0x3f8f0c;while(_0x2e2b7e>0x0&&_0xcb5df6>0x0){if(_0x170854[_0x2e2b7e-0x1]===_0x9e7b93[_0xcb5df6-0x1])_0x380569['unshift'](_0x170854[_0x2e2b7e-0x1]),_0x2e2b7e--,_0xcb5df6--;else _0x5e32ee[_0x2e2b7e-0x1][_0xcb5df6]>_0x5e32ee[_0x2e2b7e][_0xcb5df6-0x1]?_0x2e2b7e--:_0xcb5df6--;}return _0x380569;}export function formatDiffWithColors(_0x44fe1a,_0x48a6db=0x3){const _0x11aab=a171_0x4ab3,_0x4a0c98=new Set();_0x44fe1a['forEach']((_0x14a768,_0x3d117f)=>{_0x14a768['type']!=='unchanged'&&_0x4a0c98['add'](_0x3d117f);});if(_0x4a0c98[_0x11aab(0x12f)]===0x0)return'';const _0x235d13=new Set();for(const _0x1edfc4 of _0x4a0c98){for(let _0x415073=Math[_0x11aab(0x135)](0x0,_0x1edfc4-_0x48a6db);_0x415073<=Math[_0x11aab(0x137)](_0x44fe1a[_0x11aab(0x12b)]-0x1,_0x1edfc4+_0x48a6db);_0x415073++){_0x235d13[_0x11aab(0x13e)](_0x415073);}}const _0x23a81e=[];let _0x3c4c0c=-0x1;const _0x1265b5=_0x44fe1a['length'],_0x2b329a=Math['max'](0x3,String(_0x1265b5)[_0x11aab(0x12b)]),_0xbba1ba=[];let _0x21b83c=0x0,_0x37905c=0x0;for(const _0x2beef3 of _0x44fe1a){if(_0x2beef3[_0x11aab(0x126)]===_0x11aab(0x131))_0x21b83c++,_0xbba1ba['push']({'old':_0x21b83c,'new':0x0});else _0x2beef3[_0x11aab(0x126)]===_0x11aab(0x12e)?(_0x37905c++,_0xbba1ba[_0x11aab(0x134)]({'old':0x0,'new':_0x37905c})):(_0x21b83c++,_0x37905c++,_0xbba1ba[_0x11aab(0x134)]({'old':_0x21b83c,'new':_0x37905c}));}for(let _0x5ec058=0x0;_0x5ec058<_0x44fe1a[_0x11aab(0x12b)];_0x5ec058++){if(!_0x235d13['has'](_0x5ec058))continue;_0x3c4c0c!==-0x1&&_0x5ec058>_0x3c4c0c+0x1&&_0x23a81e['push'](a171_0x232a86[_0x11aab(0x141)](_0x11aab(0x142)));_0x3c4c0c=_0x5ec058;const _0x154a1c=_0x44fe1a[_0x5ec058],_0x16a2eb=_0xbba1ba[_0x5ec058],_0x202d23=_0x16a2eb['old']>0x0?String(_0x16a2eb['old'])[_0x11aab(0x128)](_0x2b329a):'\x20'['repeat'](_0x2b329a),_0x1a5bbe=_0x16a2eb['new']>0x0?String(_0x16a2eb[_0x11aab(0x12c)])[_0x11aab(0x128)](_0x2b329a):'\x20'['repeat'](_0x2b329a);switch(_0x154a1c[_0x11aab(0x126)]){case _0x11aab(0x131):_0x23a81e[_0x11aab(0x134)](a171_0x232a86[_0x11aab(0x13b)](_0x202d23+'\x20'+_0x1a5bbe+_0x11aab(0x144)+_0x154a1c[_0x11aab(0x146)]));break;case _0x11aab(0x12e):_0x23a81e[_0x11aab(0x134)](a171_0x232a86[_0x11aab(0x12a)](_0x202d23+'\x20'+_0x1a5bbe+_0x11aab(0x130)+_0x154a1c[_0x11aab(0x146)]));break;default:_0x23a81e[_0x11aab(0x134)](a171_0x232a86[_0x11aab(0x12d)](_0x202d23+'\x20'+_0x1a5bbe+_0x11aab(0x139)+_0x154a1c[_0x11aab(0x146)]));break;}}return _0x23a81e[_0x11aab(0x147)]('\x0a');}export function hasChanges(_0xc9eb80){const _0x1c72a5=a171_0x4ab3;return _0xc9eb80['some'](_0x42d59e=>_0x42d59e['type']!==_0x1c72a5(0x133));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1891b1,_0x28b76c){const _0x147ec7=a172_0x7e2f,_0x121dc2=_0x1891b1();while(!![]){try{const _0x181ee9=-parseInt(_0x147ec7(0xcc))/0x1*(parseInt(_0x147ec7(0xc4))/0x2)+-parseInt(_0x147ec7(0xd3))/0x3+-parseInt(_0x147ec7(0xca))/0x4+parseInt(_0x147ec7(0xd2))/0x5+-parseInt(_0x147ec7(0xd4))/0x6+parseInt(_0x147ec7(0xce))/0x7+parseInt(_0x147ec7(0xcb))/0x8*(parseInt(_0x147ec7(0xc6))/0x9);if(_0x181ee9===_0x28b76c)break;else _0x121dc2['push'](_0x121dc2['shift']());}catch(_0x132702){_0x121dc2['push'](_0x121dc2['shift']());}}}(a172_0x502c,0xd170a));import*as a172_0x91d980 from'node:fs';import*as a172_0x459329 from'node:path';export function setSecureFilePermissions(_0xa80303){const _0x2d287f=a172_0x7e2f;try{a172_0x91d980[_0x2d287f(0xc9)](_0xa80303,0x180);}catch{console[_0x2d287f(0xd0)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0xa80303);}}export function setSecureDirectoryPermissions(_0x12ac5a){const _0x4aba95=a172_0x7e2f;try{a172_0x91d980['chmodSync'](_0x12ac5a,0x1c0);}catch{console[_0x4aba95(0xd0)](_0x4aba95(0xcd)+_0x12ac5a);}}export function createSecureDirectory(_0x5db45a){const _0x3404e2=a172_0x7e2f;!a172_0x91d980[_0x3404e2(0xc7)](_0x5db45a)&&(a172_0x91d980[_0x3404e2(0xc5)](_0x5db45a,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x5db45a));}function a172_0x7e2f(_0x411fe1,_0x5f31d0){_0x411fe1=_0x411fe1-0xc3;const _0x502cf1=a172_0x502c();let _0x7e2f7f=_0x502cf1[_0x411fe1];return _0x7e2f7f;}function a172_0x502c(){const _0xa6a311=['mode','dirname','92snGvql','mkdirSync','630NwoBih','existsSync','Should\x20be\x200600\x20or\x20more\x20restrictive.','chmodSync','948080gqpptS','362464eQDsuZ','24733GpllQf','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','2154614GRaHIf',').\x20','warn','\x20has\x20insecure\x20permissions\x20(','2980705YjrVfN','564636FHhZdw','9928122dRzXXT','Warning:\x20','toString','writeFileSync'];a172_0x502c=function(){return _0xa6a311;};return a172_0x502c();}export function validateSecureFilePermissions(_0x50f559){const _0x4a9622=a172_0x7e2f;try{const _0x388747=a172_0x91d980['statSync'](_0x50f559),_0x309ad=_0x388747[_0x4a9622(0xd8)]&0x1ff,_0x29b62e=(_0x309ad&0x3f)!==0x0;if(_0x29b62e)return console[_0x4a9622(0xd0)](_0x4a9622(0xd5)+_0x50f559+_0x4a9622(0xd1)+_0x309ad[_0x4a9622(0xd6)](0x8)+_0x4a9622(0xcf)+_0x4a9622(0xc8)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x51e664,_0x3d92e6){const _0x5a3b48=a172_0x7e2f,_0x4c8895=a172_0x459329[_0x5a3b48(0xc3)](_0x51e664);createSecureDirectory(_0x4c8895),a172_0x91d980[_0x5a3b48(0xd7)](_0x51e664,_0x3d92e6,{'mode':0x180}),setSecureFilePermissions(_0x51e664);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2601bb,_0x1ce10d){const _0x366081=a173_0x55c9,_0x3a9cc4=_0x2601bb();while(!![]){try{const _0x4c79d7=parseInt(_0x366081(0x147))/0x1+-parseInt(_0x366081(0x156))/0x2*(-parseInt(_0x366081(0x145))/0x3)+-parseInt(_0x366081(0x152))/0x4*(parseInt(_0x366081(0x151))/0x5)+-parseInt(_0x366081(0x154))/0x6+parseInt(_0x366081(0x148))/0x7+parseInt(_0x366081(0x14b))/0x8+-parseInt(_0x366081(0x14d))/0x9;if(_0x4c79d7===_0x1ce10d)break;else _0x3a9cc4['push'](_0x3a9cc4['shift']());}catch(_0x3c575d){_0x3a9cc4['push'](_0x3a9cc4['shift']());}}}(a173_0x5360,0x95a8e));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x2b8b98=a173_0x55c9;return process.env.TDX_CACHE_DIR||join(homedir(),_0x2b8b98(0x14c),'tdx');}const registry=new Map();export function registerGlobalCacheKey(_0x328fca,_0x162a94){const _0x139e03=a173_0x55c9,_0x9f6828=registry[_0x139e03(0x149)](_0x328fca);if(_0x9f6828&&_0x9f6828!==_0x162a94)throw new Error(_0x139e03(0x150)+_0x328fca+'\x22\x20already\x20registered\x20by\x20\x22'+_0x9f6828+_0x139e03(0x14f)+_0x162a94+'\x22');registry['set'](_0x328fca,_0x162a94);}export function getGlobalCachePath(_0x4b91b6){return join(getGlobalCacheDir(),_0x4b91b6);}function ensureGlobalCacheDir(){const _0xbd9b53=getGlobalCacheDir();!existsSync(_0xbd9b53)&&mkdirSync(_0xbd9b53,{'recursive':!![]});}function a173_0x55c9(_0x357eea,_0x524e98){_0x357eea=_0x357eea-0x145;const _0x53605e=a173_0x5360();let _0x55c91e=_0x53605e[_0x357eea];return _0x55c91e;}function readCacheJson(_0x2bc533){const _0xa9208b=a173_0x55c9,_0x3e31a0=getGlobalCachePath(_0x2bc533);if(!existsSync(_0x3e31a0))return undefined;try{const _0x12ff4e=readFileSync(_0x3e31a0,_0xa9208b(0x146));return JSON[_0xa9208b(0x14e)](_0x12ff4e);}catch{return undefined;}}function writeCacheJson(_0x46da39,_0x3752d7){const _0x21c22f=a173_0x55c9;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x46da39),JSON[_0x21c22f(0x157)](_0x3752d7,null,0x2),_0x21c22f(0x146));}function readCacheText(_0x2dd0dc){const _0x403ced=a173_0x55c9,_0x36fa52=getGlobalCachePath(_0x2dd0dc);if(!existsSync(_0x36fa52))return undefined;try{return readFileSync(_0x36fa52,_0x403ced(0x146));}catch{return undefined;}}function writeCacheText(_0xa9fb8b,_0x15de77){const _0x129373=a173_0x55c9;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0xa9fb8b),_0x15de77,_0x129373(0x146));}function clearCache(_0x5dfb2b){const _0x595cf6=getGlobalCachePath(_0x5dfb2b);if(existsSync(_0x595cf6))try{unlinkSync(_0x595cf6);}catch{}}function a173_0x5360(){const _0x4b77e3=['trim','5892744SJWRRB','clear','948ZYbHNa','stringify','replace','5529KWVhDk','utf-8','973471xmFtrs','5221223Yqmmda','get','{profile}','2940152OBXJqw','.cache','10122291kzuQPf','parse','\x22,\x20cannot\x20register\x20for\x20\x22','Global\x20cache\x20key\x20\x22','5fNlOMT','962528ojfUBd'];a173_0x5360=function(){return _0x4b77e3;};return a173_0x5360();}function cacheExists(_0x43a75d){return existsSync(getGlobalCachePath(_0x43a75d));}export function createGlobalCache(_0x517d10,_0x51ba3b){return registerGlobalCacheKey(_0x517d10,_0x51ba3b),{'read':()=>readCacheJson(_0x517d10),'write':_0x56c475=>writeCacheJson(_0x517d10,_0x56c475),'clear':()=>clearCache(_0x517d10),'exists':()=>cacheExists(_0x517d10),'path':()=>getGlobalCachePath(_0x517d10)};}export function createGlobalTextCache(_0x522879,_0x4ee5ec){const _0x547b4d=a173_0x55c9;return registerGlobalCacheKey(_0x522879,_0x4ee5ec),{'read':()=>readCacheText(_0x522879)?.[_0x547b4d(0x153)]()||undefined,'write':_0x353aab=>writeCacheText(_0x522879,_0x353aab),'clear':()=>clearCache(_0x522879),'exists':()=>cacheExists(_0x522879),'path':()=>getGlobalCachePath(_0x522879)};}export function createProfileCache(_0x562fb1,_0xbb8123){const _0x17193f=_0x190906=>{const _0x5b333b=a173_0x55c9,_0x35b00e=_0x190906||'default';return _0x562fb1[_0x5b333b(0x158)](_0x5b333b(0x14a),_0x35b00e);};return{'read':_0x581f5d=>{const _0x510c1a=_0x17193f(_0x581f5d);return registerGlobalCacheKey(_0x510c1a,_0xbb8123),readCacheJson(_0x510c1a);},'write':(_0x3027e4,_0x48cc04)=>{const _0x43cd04=_0x17193f(_0x3027e4);registerGlobalCacheKey(_0x43cd04,_0xbb8123),writeCacheJson(_0x43cd04,_0x48cc04);},'clear':_0x5f024c=>{const _0x4a88b8=_0x17193f(_0x5f024c);clearCache(_0x4a88b8);},'exists':_0x2dd214=>{const _0x59d510=_0x17193f(_0x2dd214);return cacheExists(_0x59d510);},'path':_0x31597c=>{const _0x16b702=_0x17193f(_0x31597c);return getGlobalCachePath(_0x16b702);}};}export function createOptionalProfileCache(_0x5a5ef3,_0x338316,_0x5be965={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x5be965,_0x1f1fc4=_0x2a6da7=>{return _0x2a6da7?''+_0x5a5ef3+profileSeparator+_0x2a6da7+suffix:''+_0x5a5ef3+suffix;};return{'read':_0x2de4ab=>{const _0xbe2bb7=_0x1f1fc4(_0x2de4ab);return registerGlobalCacheKey(_0xbe2bb7,_0x338316),readCacheJson(_0xbe2bb7);},'write':(_0x221bec,_0x5dd577)=>{const _0x15e303=_0x1f1fc4(_0x5dd577);registerGlobalCacheKey(_0x15e303,_0x338316),writeCacheJson(_0x15e303,_0x221bec);},'clear':_0x5bf73a=>{const _0x11c44a=_0x1f1fc4(_0x5bf73a);clearCache(_0x11c44a);},'exists':_0x25e4bb=>{const _0x1feb39=_0x1f1fc4(_0x25e4bb);return cacheExists(_0x1feb39);},'path':_0x52a46d=>{const _0x3196e1=_0x1f1fc4(_0x52a46d);return getGlobalCachePath(_0x3196e1);}};}export function clearGlobalRegistry(){const _0x196ede=a173_0x55c9;registry[_0x196ede(0x155)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d8434,_0x1a77da){const _0x26f137=a174_0x5a0c,_0x2cfcb1=_0x5d8434();while(!![]){try{const _0x28f86d=-parseInt(_0x26f137(0x1ec))/0x1+-parseInt(_0x26f137(0x1dc))/0x2*(parseInt(_0x26f137(0x1e3))/0x3)+-parseInt(_0x26f137(0x1e5))/0x4*(-parseInt(_0x26f137(0x1e2))/0x5)+-parseInt(_0x26f137(0x1eb))/0x6+-parseInt(_0x26f137(0x1e9))/0x7*(-parseInt(_0x26f137(0x1f2))/0x8)+parseInt(_0x26f137(0x1f0))/0x9*(parseInt(_0x26f137(0x1e8))/0xa)+parseInt(_0x26f137(0x1f1))/0xb;if(_0x28f86d===_0x1a77da)break;else _0x2cfcb1['push'](_0x2cfcb1['shift']());}catch(_0x5d4142){_0x2cfcb1['push'](_0x2cfcb1['shift']());}}}(a174_0x2fd0,0x3f018));function a174_0x2fd0(){const _0x11728e=['1017470YgPIDz','1326093sjtXfi','ENOENT','4RSKmwu','message','code','90FJuPzn','763wPJFGD','utf-8','2715090WALgfx','493658eTSzix','parse','Invalid\x20JSON\x20in\x20file\x20\x27','INTERNAL','158778DlzQIk','12967009ZrLnpK','7720SCniNk','2UIePmX','INVALID_ARGUMENT','File\x20not\x20found:\x20','Failed\x20to\x20load\x20JSON:\x20','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','Permission\x20denied\x20reading\x20file:\x20'];a174_0x2fd0=function(){return _0x11728e;};return a174_0x2fd0();}function a174_0x5a0c(_0x2eb3f9,_0x1addae){_0x2eb3f9=_0x2eb3f9-0x1dc;const _0x2fd03a=a174_0x2fd0();let _0x5a0c9a=_0x2fd03a[_0x2eb3f9];return _0x5a0c9a;}import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x435473,_0x4b596d){const _0x1502b5=a174_0x5a0c;try{if(_0x4b596d){const _0x2df1e0=await readFile(_0x435473,_0x1502b5(0x1ea));try{return JSON[_0x1502b5(0x1ed)](_0x2df1e0);}catch(_0xb803b0){throw new SDKError(ErrorCode[_0x1502b5(0x1dd)],_0x1502b5(0x1ee)+_0x435473+'\x27:\x20'+(_0xb803b0 instanceof Error?_0xb803b0['message']:String(_0xb803b0)));}}else try{return JSON[_0x1502b5(0x1ed)](_0x435473);}catch(_0x4723c2){throw new SDKError(ErrorCode[_0x1502b5(0x1dd)],'Invalid\x20JSON\x20string:\x20'+(_0x4723c2 instanceof Error?_0x4723c2[_0x1502b5(0x1e6)]:String(_0x4723c2)));}}catch(_0x292a6a){if(_0x292a6a instanceof SDKError)throw _0x292a6a;if(_0x292a6a instanceof Error&&'code'in _0x292a6a){const _0x299c62=_0x292a6a;if(_0x299c62[_0x1502b5(0x1e7)]===_0x1502b5(0x1e4))throw new SDKError(ErrorCode['NOT_FOUND'],_0x1502b5(0x1de)+_0x435473);else{if(_0x299c62[_0x1502b5(0x1e7)]==='EACCES')throw new SDKError(ErrorCode['PERMISSION_DENIED'],_0x1502b5(0x1e1)+_0x435473);}}throw new SDKError(ErrorCode[_0x1502b5(0x1ef)],_0x1502b5(0x1df)+(_0x292a6a instanceof Error?_0x292a6a[_0x1502b5(0x1e6)]:String(_0x292a6a)));}}export async function loadJSONFromOptions(_0x2ec151,_0x5d2f54){const _0x5c2110=a174_0x5a0c;if(_0x2ec151&&_0x5d2f54)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5c2110(0x1e0));if(_0x2ec151)return await loadJSON(_0x2ec151,![]);if(_0x5d2f54)return await loadJSON(_0x5d2f54,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x4e85c3=a175_0x2089;(function(_0x3af323,_0x489f6a){const _0x764f32=a175_0x2089,_0x1d35cc=_0x3af323();while(!![]){try{const _0x1796b5=parseInt(_0x764f32(0xfe))/0x1+-parseInt(_0x764f32(0x101))/0x2+-parseInt(_0x764f32(0x104))/0x3+parseInt(_0x764f32(0x10c))/0x4*(-parseInt(_0x764f32(0x106))/0x5)+parseInt(_0x764f32(0xfd))/0x6*(-parseInt(_0x764f32(0xfb))/0x7)+-parseInt(_0x764f32(0xff))/0x8+parseInt(_0x764f32(0x105))/0x9*(parseInt(_0x764f32(0x103))/0xa);if(_0x1796b5===_0x489f6a)break;else _0x1d35cc['push'](_0x1d35cc['shift']());}catch(_0x1c1ad5){_0x1d35cc['push'](_0x1d35cc['shift']());}}}(a175_0x226a,0xca603));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join,parse}from'path';import{homedir}from'os';const LOCAL_CACHE_DIR=a175_0x4e85c3(0x10b),registry=new Map();export function registerCacheKey(_0x26720e,_0x491cb2){const _0x8a4a=a175_0x4e85c3,_0x514c2a=registry[_0x8a4a(0x107)](_0x26720e);if(_0x514c2a&&_0x514c2a!==_0x491cb2)throw new Error(_0x8a4a(0xf9)+_0x26720e+_0x8a4a(0x10a)+_0x514c2a+_0x8a4a(0xfc)+_0x491cb2+'\x22');registry[_0x8a4a(0x109)](_0x26720e,_0x491cb2);}export function getCacheDir(){const _0x5f3e5c=a175_0x4e85c3,_0x4ea452=process['cwd'](),_0x32956d=_0x4ea452===parse(_0x4ea452)[_0x5f3e5c(0xfa)]?homedir():_0x4ea452;return join(_0x32956d,LOCAL_CACHE_DIR);}export function getCachePath(_0x29bf09){return join(getCacheDir(),_0x29bf09);}function ensureCacheDir(){const _0x5e4370=getCacheDir();!existsSync(_0x5e4370)&&mkdirSync(_0x5e4370,{'recursive':!![]});}function readCacheJson(_0x2aab35){const _0x513be4=a175_0x4e85c3,_0x163e39=getCachePath(_0x2aab35);if(!existsSync(_0x163e39))return undefined;try{const _0x2fc5f1=readFileSync(_0x163e39,_0x513be4(0x108));return JSON[_0x513be4(0x102)](_0x2fc5f1);}catch{return undefined;}}function writeCacheJson(_0x2aece7,_0x535b31){const _0x4b06f6=a175_0x4e85c3;ensureCacheDir(),writeFileSync(getCachePath(_0x2aece7),JSON['stringify'](_0x535b31,null,0x2),_0x4b06f6(0x108));}function readCacheText(_0x200d6b){const _0x1eceb1=getCachePath(_0x200d6b);if(!existsSync(_0x1eceb1))return undefined;try{return readFileSync(_0x1eceb1,'utf-8');}catch{return undefined;}}function writeCacheText(_0x5b6885,_0x373c7d){ensureCacheDir(),writeFileSync(getCachePath(_0x5b6885),_0x373c7d,'utf-8');}function clearCache(_0x8a1c59){const _0x1b98ef=getCachePath(_0x8a1c59);if(existsSync(_0x1b98ef))try{unlinkSync(_0x1b98ef);}catch{}}function cacheExists(_0x395846){return existsSync(getCachePath(_0x395846));}export function createCache(_0xef20a2,_0x31a490){return registerCacheKey(_0xef20a2,_0x31a490),{'read':()=>readCacheJson(_0xef20a2),'write':_0x2f2f82=>writeCacheJson(_0xef20a2,_0x2f2f82),'clear':()=>clearCache(_0xef20a2),'exists':()=>cacheExists(_0xef20a2),'path':()=>getCachePath(_0xef20a2)};}function a175_0x2089(_0x2db168,_0x1dd6ef){_0x2db168=_0x2db168-0xf9;const _0x226aa0=a175_0x226a();let _0x208935=_0x226aa0[_0x2db168];return _0x208935;}export function createTextCache(_0x22e3e0,_0x3709e4){return registerCacheKey(_0x22e3e0,_0x3709e4),{'read':()=>readCacheText(_0x22e3e0)?.['trim']()||undefined,'write':_0x2c9d75=>writeCacheText(_0x22e3e0,_0x2c9d75),'clear':()=>clearCache(_0x22e3e0),'exists':()=>cacheExists(_0x22e3e0),'path':()=>getCachePath(_0x22e3e0)};}export function clearRegistry(){const _0x148d7d=a175_0x4e85c3;registry[_0x148d7d(0x100)]();}function a175_0x226a(){const _0x2f2efa=['2835488NDQxdE','parse','1024610rAGVLI','1014924DrcBot','297BUAWKL','160ODpxJT','get','utf-8','set','\x22\x20already\x20registered\x20by\x20\x22','.cache/tdx','52732TFaPOH','Cache\x20key\x20\x22','root','805931dTVEdl','\x22,\x20cannot\x20register\x20for\x20\x22','36KbyNEK','1008606dmSJwB','5537456ZCOOhO','clear'];a175_0x226a=function(){return _0x2f2efa;};return a175_0x226a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x1d1470=a176_0x1e93;(function(_0x49117b,_0x59c0dc){const _0x22e6a7=a176_0x1e93,_0x4694eb=_0x49117b();while(!![]){try{const _0x542f0c=parseInt(_0x22e6a7(0x12a))/0x1*(parseInt(_0x22e6a7(0x11a))/0x2)+-parseInt(_0x22e6a7(0x123))/0x3*(-parseInt(_0x22e6a7(0x12c))/0x4)+-parseInt(_0x22e6a7(0x117))/0x5*(-parseInt(_0x22e6a7(0x115))/0x6)+-parseInt(_0x22e6a7(0x120))/0x7*(-parseInt(_0x22e6a7(0x12d))/0x8)+parseInt(_0x22e6a7(0x122))/0x9+parseInt(_0x22e6a7(0x119))/0xa*(-parseInt(_0x22e6a7(0x130))/0xb)+parseInt(_0x22e6a7(0x125))/0xc*(-parseInt(_0x22e6a7(0x116))/0xd);if(_0x542f0c===_0x59c0dc)break;else _0x4694eb['push'](_0x4694eb['shift']());}catch(_0x59defd){_0x4694eb['push'](_0x4694eb['shift']());}}}(a176_0x3932,0xf3929));import a176_0x4e665c from'chalk';import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';function a176_0x3932(){const _0x3909d0=['8xDvLoY','colors','Chalk','265518hcebQv','gray','green','WARN','cyan','528IYKoro','44858970MdrTNd','41390qLXGCy','INFO','100nYJIlE','2EznkMx','TRACE','default','DEBUG','level','chalk','758023ZcbCIr','ERROR','13447971JtsmKL','126093lXsnlL','red','12AVLPva','format','colorLevel','dim','message','1181903NqqStM','blue','112UVeYMp'];a176_0x3932=function(){return _0x3909d0;};return a176_0x3932();}const chalkModule=a176_0x4e665c,ChalkClass=chalkModule[a176_0x1d1470(0x12f)]||chalkModule[a176_0x1d1470(0x11c)]?.[a176_0x1d1470(0x12f)];function a176_0x1e93(_0x149ced,_0x5b1fb1){_0x149ced=_0x149ced-0x114;const _0x39327a=a176_0x3932();let _0x1e93c4=_0x39327a[_0x149ced];return _0x1e93c4;}export class DefaultLogFormatter{[a176_0x1d1470(0x12e)];['chalk'];constructor(_0x4aab7b={}){const _0x12c41c=a176_0x1d1470;this[_0x12c41c(0x12e)]=_0x4aab7b[_0x12c41c(0x12e)]??![],this[_0x12c41c(0x11f)]=_0x4aab7b['colors']&&ChalkClass?new ChalkClass({'level':0x3}):a176_0x4e665c;}[a176_0x1d1470(0x126)](_0x48b16c){const _0xa04d34=a176_0x1d1470,_0x497024=formatTimestamp(_0x48b16c['timestamp']),_0xe5ce9c=logLevelToString(_0x48b16c[_0xa04d34(0x11e)]);if(!this[_0xa04d34(0x12e)])return _0x497024+'\x20['+_0xe5ce9c+']\x20['+_0x48b16c['component']+']\x20'+_0x48b16c[_0xa04d34(0x129)];const _0x308fab=this[_0xa04d34(0x11f)][_0xa04d34(0x128)](_0x497024),_0x5b2636=this['colorLevel'](_0xe5ce9c,_0x48b16c['level']),_0xdc2f5f=this[_0xa04d34(0x11f)][_0xa04d34(0x12b)]('['+_0x48b16c['component']+']');return _0x308fab+'\x20'+_0x5b2636+'\x20'+_0xdc2f5f+'\x20'+_0x48b16c[_0xa04d34(0x129)];}[a176_0x1d1470(0x127)](_0x2fdd38,_0x3a9204){const _0xa8340b=a176_0x1d1470;switch(_0x3a9204){case LogLevel[_0xa8340b(0x11b)]:return this[_0xa8340b(0x11f)][_0xa8340b(0x131)]('['+_0x2fdd38+']');case LogLevel[_0xa8340b(0x11d)]:return this[_0xa8340b(0x11f)][_0xa8340b(0x132)]('['+_0x2fdd38+']');case LogLevel[_0xa8340b(0x118)]:return this['chalk'][_0xa8340b(0x114)]('['+_0x2fdd38+']');case LogLevel[_0xa8340b(0x133)]:return this['chalk']['yellow']('['+_0x2fdd38+']');case LogLevel[_0xa8340b(0x121)]:return this[_0xa8340b(0x11f)][_0xa8340b(0x124)]('['+_0x2fdd38+']');default:return'['+_0x2fdd38+']';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a177_0x386c(_0xafba7a,_0x2800c3){_0xafba7a=_0xafba7a-0x1be;var _0x24ae5e=a177_0x24ae();var _0x386cf7=_0x24ae5e[_0xafba7a];return _0x386cf7;}(function(_0x1a59db,_0x8dabfe){var _0x4d0dac=a177_0x386c,_0x4ee7f4=_0x1a59db();while(!![]){try{var _0x2ad407=-parseInt(_0x4d0dac(0x1c2))/0x1+parseInt(_0x4d0dac(0x1c4))/0x2*(parseInt(_0x4d0dac(0x1c5))/0x3)+parseInt(_0x4d0dac(0x1c3))/0x4+-parseInt(_0x4d0dac(0x1be))/0x5*(-parseInt(_0x4d0dac(0x1c6))/0x6)+parseInt(_0x4d0dac(0x1c7))/0x7*(parseInt(_0x4d0dac(0x1c8))/0x8)+parseInt(_0x4d0dac(0x1bf))/0x9*(parseInt(_0x4d0dac(0x1c0))/0xa)+-parseInt(_0x4d0dac(0x1c1))/0xb;if(_0x2ad407===_0x8dabfe)break;else _0x4ee7f4['push'](_0x4ee7f4['shift']());}catch(_0x5e3b1d){_0x4ee7f4['push'](_0x4ee7f4['shift']());}}}(a177_0x24ae,0x3c995));export{DefaultLogFormatter}from'./default-formatter.js';function a177_0x24ae(){var _0x5a84f6=['658VDtguv','20440lKHetC','825705zlmlYn','90rqnZeq','6470PJGXqo','12951422qByiZh','67680MLNIFH','1310424DkKIXb','28MDtbRP','90777oMzace','18krDFQZ'];a177_0x24ae=function(){return _0x5a84f6;};return a177_0x24ae();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a178_0xa1b9(_0x3b03a8,_0x45c57f){_0x3b03a8=_0x3b03a8-0x11b;const _0x321405=a178_0x3214();let _0xa1b927=_0x321405[_0x3b03a8];return _0xa1b927;}const a178_0x1da3c2=a178_0xa1b9;(function(_0x141c01,_0x4bc92d){const _0x26451a=a178_0xa1b9,_0xd4df32=_0x141c01();while(!![]){try{const _0x94d086=-parseInt(_0x26451a(0x125))/0x1*(-parseInt(_0x26451a(0x12f))/0x2)+-parseInt(_0x26451a(0x121))/0x3+parseInt(_0x26451a(0x128))/0x4*(parseInt(_0x26451a(0x123))/0x5)+-parseInt(_0x26451a(0x11d))/0x6*(parseInt(_0x26451a(0x11f))/0x7)+parseInt(_0x26451a(0x130))/0x8*(-parseInt(_0x26451a(0x12e))/0x9)+-parseInt(_0x26451a(0x124))/0xa*(parseInt(_0x26451a(0x11e))/0xb)+-parseInt(_0x26451a(0x11b))/0xc*(-parseInt(_0x26451a(0x12b))/0xd);if(_0x94d086===_0x4bc92d)break;else _0xd4df32['push'](_0xd4df32['shift']());}catch(_0x2efe06){_0xd4df32['push'](_0xd4df32['shift']());}}}(a178_0x3214,0xa728a));import{LogLevel as a178_0x509338}from'../types.js';import{DefaultLogFormatter}from'../formatters/index.js';function a178_0x3214(){const _0x99f3e9=['319CbYkZH','911281nUBeJE','format','3797466mWpmol','formatter','21230GqHEYL','208730ZFmDzf','10487PGRNwn','WARN','useStderr','840iupybB','error','colors','65wfBbTV','handle','minLevel','9783KwfaRE','18dpdyKU','744oqhCfO','level','4634964GpNpsS','log','12wgwPqK'];a178_0x3214=function(){return _0x99f3e9;};return a178_0x3214();}export class ConsoleHandler{[a178_0x1da3c2(0x12d)];['useStderr'];[a178_0x1da3c2(0x122)];constructor(_0x32c11d={}){const _0x1ebc0c=a178_0x1da3c2;this[_0x1ebc0c(0x12d)]=_0x32c11d['minLevel']??a178_0x509338[_0x1ebc0c(0x126)],this['useStderr']=_0x32c11d[_0x1ebc0c(0x127)]??!![],this['formatter']=new DefaultLogFormatter({'colors':_0x32c11d[_0x1ebc0c(0x12a)]??!![]});}[a178_0x1da3c2(0x12c)](_0x426473){const _0x39cc86=a178_0x1da3c2;if(_0x426473[_0x39cc86(0x131)]<this[_0x39cc86(0x12d)])return;const _0x59f186=this[_0x39cc86(0x122)][_0x39cc86(0x120)](_0x426473);this[_0x39cc86(0x127)]&&_0x426473[_0x39cc86(0x131)]>=a178_0x509338[_0x39cc86(0x126)]?console[_0x39cc86(0x129)](_0x59f186):console[_0x39cc86(0x11c)](_0x59f186);}}
|