@treasuredata/tdx 0.26.4 → 0.26.6
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.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/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.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/api.js +1 -1
- package/dist/sdk/client/cdp-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/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/port.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 a153_0x48c184=a153_0x3a90;(function(_0x2b1456,_0x3906f4){const _0x697a62=a153_0x3a90,_0x4fa52c=_0x2b1456();while(!![]){try{const _0xa3ec2=-parseInt(_0x697a62(0xf0))/0x1*(parseInt(_0x697a62(0xe4))/0x2)+parseInt(_0x697a62(0xbc))/0x3*(-parseInt(_0x697a62(0xfd))/0x4)+-parseInt(_0x697a62(0xb4))/0x5*(parseInt(_0x697a62(0xcd))/0x6)+parseInt(_0x697a62(0xb3))/0x7*(-parseInt(_0x697a62(0xd1))/0x8)+parseInt(_0x697a62(0xc5))/0x9+-parseInt(_0x697a62(0xa5))/0xa+parseInt(_0x697a62(0xcc))/0xb;if(_0xa3ec2===_0x3906f4)break;else _0x4fa52c['push'](_0x4fa52c['shift']());}catch(_0x397c58){_0x4fa52c['push'](_0x4fa52c['shift']());}}}(a153_0xdc27,0xda455));function a153_0x3a90(_0x1cb549,_0x5ed96a){_0x1cb549=_0x1cb549-0x8d;const _0xdc27c3=a153_0xdc27();let _0x3a9023=_0xdc27c3[_0x1cb549];return _0x3a9023;}export const fixtures={'database':{'basic':{'name':a153_0x48c184(0x96),'count':0x5,'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xd2),'permission':'administrator'},'withTables':{'name':a153_0x48c184(0x95),'count':0x64,'created_at':'2023-06-15T10:30:00Z','updated_at':a153_0x48c184(0xf2),'permission':a153_0x48c184(0xdc)}},'table':{'basic':{'id':0x3039,'name':a153_0x48c184(0xec),'type':a153_0x48c184(0x97),'schema':JSON[a153_0x48c184(0xc9)]([['id',a153_0x48c184(0xd8)],[a153_0x48c184(0xc2),'long'],[a153_0x48c184(0x8d),a153_0x48c184(0xd8)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xd2)},'events':{'id':0x303a,'name':'events','type':'log','schema':JSON['stringify']([[a153_0x48c184(0xfa),'string'],[a153_0x48c184(0xc2),a153_0x48c184(0xf6)],['user_id',a153_0x48c184(0xd8)],[a153_0x48c184(0xe1),a153_0x48c184(0xd8)],[a153_0x48c184(0x9b),a153_0x48c184(0xd5)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a153_0x48c184(0xd2),'updated_at':'2024-01-15T12:00:00Z'}},'parentSegment':{'basic':{'id':'ps-123456','name':a153_0x48c184(0x9e),'description':a153_0x48c184(0xa9),'status':a153_0x48c184(0xba),'master_table':{'database':a153_0x48c184(0xf4),'table':a153_0x48c184(0x8f)},'attributes':[{'name':a153_0x48c184(0xdb),'type':'string','key':!![]},{'name':'email','type':'string'},{'name':a153_0x48c184(0x102),'type':a153_0x48c184(0xb9)}],'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xaf)},'withBehaviors':{'id':a153_0x48c184(0xb7),'name':a153_0x48c184(0xbf),'description':'Parent\x20segment\x20with\x20behavioral\x20data','status':a153_0x48c184(0xba),'master_table':{'database':a153_0x48c184(0xf4),'table':a153_0x48c184(0xe6)},'behaviors':[{'name':a153_0x48c184(0xee),'table':{'database':'events_db','table':a153_0x48c184(0xee)},'join_key':a153_0x48c184(0xdb)},{'name':a153_0x48c184(0xe5),'table':{'database':a153_0x48c184(0xeb),'table':'pageviews'},'join_key':a153_0x48c184(0xdb)}],'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xaf)}},'segment':{'basic':{'id':a153_0x48c184(0xbd),'name':a153_0x48c184(0xdf),'description':a153_0x48c184(0xcf),'parent_segment_id':'ps-123456','status':'active','rules':[{'type':a153_0x48c184(0xc8),'field':a153_0x48c184(0xc7),'operator':a153_0x48c184(0xef),'value':a153_0x48c184(0x8e)}],'count':0x1388,'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xaf)},'withMultipleRules':{'id':a153_0x48c184(0x9a),'name':a153_0x48c184(0xcb),'description':a153_0x48c184(0x98),'parent_segment_id':a153_0x48c184(0xa0),'status':'active','rules':[{'type':a153_0x48c184(0xc8),'field':a153_0x48c184(0xc7),'operator':'TimeWithinPast','value':'30d'},{'type':a153_0x48c184(0xc8),'field':a153_0x48c184(0xc3),'operator':a153_0x48c184(0xc0),'value':0x3e8}],'count':0x5dc,'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xaf)}},'journey':{'basic':{'id':a153_0x48c184(0xd0),'name':a153_0x48c184(0xad),'description':a153_0x48c184(0xc4),'status':a153_0x48c184(0xc6),'version':0x1,'steps':[{'id':a153_0x48c184(0xa3),'type':a153_0x48c184(0x100),'duration':'1d'},{'id':a153_0x48c184(0xae),'type':a153_0x48c184(0xed),'activation_id':a153_0x48c184(0x9c)}],'created_at':a153_0x48c184(0xd2),'updated_at':a153_0x48c184(0xaf)},'withDecision':{'id':a153_0x48c184(0x93),'name':a153_0x48c184(0xdd),'description':a153_0x48c184(0xa4),'status':a153_0x48c184(0xba),'version':0x2,'steps':[{'id':'step-1','type':a153_0x48c184(0xb1),'segment_id':'cs-456789','yes_path':a153_0x48c184(0xae),'no_path':'step-3'},{'id':a153_0x48c184(0xae),'type':a153_0x48c184(0xed),'activation_id':a153_0x48c184(0xda)},{'id':'step-3','type':a153_0x48c184(0xac)}],'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z'}},'queryResult':{'basic':{'schema':[{'name':'id','type':a153_0x48c184(0xf5)},{'name':a153_0x48c184(0x8d),'type':a153_0x48c184(0xf5)},{'name':a153_0x48c184(0x92),'type':'bigint'}],'data':[[a153_0x48c184(0xe3),a153_0x48c184(0xf1),0x64],[a153_0x48c184(0xe7),a153_0x48c184(0xb8),0xc8],[a153_0x48c184(0x90),'Charlie',0x96]]},'empty':{'schema':[{'name':'id','type':a153_0x48c184(0xf5)},{'name':a153_0x48c184(0x8d),'type':a153_0x48c184(0xf5)}],'data':[]},'singleRow':{'schema':[{'name':a153_0x48c184(0xc1),'type':'bigint'}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a153_0x48c184(0xe9),'email':a153_0x48c184(0xd6),'created_at':a153_0x48c184(0xd2),'updated_at':'2024-01-15T00:00:00Z','administrator':![]},'admin':{'id':0x1,'name':a153_0x48c184(0xca),'email':a153_0x48c184(0x9f),'created_at':a153_0x48c184(0xab),'updated_at':a153_0x48c184(0xaf),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a153_0x48c184(0x99),'database':'test_db','status':a153_0x48c184(0xce),'query':a153_0x48c184(0x9d),'start_at':'2024-01-15T10:00:00Z','end_at':a153_0x48c184(0xbb),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a153_0x48c184(0x99),'database':'test_db','status':a153_0x48c184(0xd7),'query':a153_0x48c184(0xb2),'start_at':a153_0x48c184(0xa6),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':'presto','database':a153_0x48c184(0x96),'status':a153_0x48c184(0xfc),'query':'SELECT\x20*\x20FROM\x20nonexistent_table','start_at':a153_0x48c184(0x101),'end_at':a153_0x48c184(0xbe),'duration':0x1,'result_size':null,'error':a153_0x48c184(0xe2)}},'workflow':{'basic':{'id':a153_0x48c184(0x103),'name':a153_0x48c184(0xea),'project':a153_0x48c184(0xfe),'revision':'abc123','timezone':'UTC','schedule':{'cron':a153_0x48c184(0xd3)}},'withSessions':{'id':a153_0x48c184(0xf9),'name':a153_0x48c184(0xa2),'project':'data_sync','revision':a153_0x48c184(0xe0),'timezone':a153_0x48c184(0xf7),'schedule':{'cron':a153_0x48c184(0xd4)},'last_session':{'id':a153_0x48c184(0xaa),'status':a153_0x48c184(0xce),'started_at':a153_0x48c184(0xe8),'finished_at':'2024-01-15T09:05:00Z'}}},'apiError':{'unauthorized':{'errors':{'error':a153_0x48c184(0xf3),'message':a153_0x48c184(0xf3),'severity':a153_0x48c184(0xfc),'status_code':0x191}},'notFound':{'errors':{'error':a153_0x48c184(0xff),'message':'The\x20requested\x20resource\x20does\x20not\x20exist','severity':'error','status_code':0x194}},'rateLimited':{'detail':a153_0x48c184(0xa8)},'rfc9457':{'type':'https://api.treasuredata.com/errors/forbidden','title':'Forbidden','status':0x193,'detail':a153_0x48c184(0xfb),'instance':a153_0x48c184(0xa1)}}};export function createDatabase(_0x1bc9d3){const _0x426439=a153_0x48c184;return{...fixtures[_0x426439(0x94)]['basic'],..._0x1bc9d3};}export function createTable(_0x9a91a){const _0x211191=a153_0x48c184;return{...fixtures[_0x211191(0xd9)][_0x211191(0xb6)],..._0x9a91a};}export function createParentSegment(_0xf2d848){const _0x1964e0=a153_0x48c184;return{...fixtures[_0x1964e0(0xde)]['basic'],..._0xf2d848};}export function createSegment(_0x2f101e){const _0x4131bf=a153_0x48c184;return{...fixtures[_0x4131bf(0xf8)][_0x4131bf(0xb6)],..._0x2f101e};}function a153_0xdc27(){const _0x4f07a9=['def456','event_type','Table\x20does\x20not\x20exist:\x20nonexistent_table','user-1','5102LgZCXi','page_views','customers','user-2','2024-01-15T09:00:00Z','Test\x20User','daily_etl','events_db','users','activation','purchases','TimeWithinPast','666ZjwWdm','Alice','2024-01-15T08:00:00Z','Invalid\x20API\x20key','cdp_db','varchar','long','America/Los_Angeles','segment','wf-67890','event_id','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','error','400jJzruu','data_pipeline','Resource\x20not\x20found','wait','2024-01-15T10:10:00Z','created_at','wf-12345','name','30d','unified_customers','user-3','job','count','j-def456','database','production_db','test_db','log','Active\x20users\x20with\x20high\x20lifetime\x20value','presto','cs-111222','properties','act-123','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','Test\x20Parent\x20Segment','admin@example.com','ps-123456','/v3/database/list','hourly_sync','step-1','Journey\x20with\x20decision\x20point','511940Nzzsiy','2024-01-15T10:05:00Z','journey','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','sess-111','2023-01-01T00:00:00Z','end','Welcome\x20Journey','step-2','2024-01-15T00:00:00Z','queryResult','decision_point','SELECT\x20COUNT(*)\x20FROM\x20events','1021153BqEOkV','5Mgkgkx','completed','basic','ps-789012','Bob','timestamp','active','2024-01-15T10:00:05Z','25959qRMEvV','cs-456789','2024-01-15T10:10:01Z','Customers\x20with\x20Behaviors','Greater','total','time','lifetime_value','Onboarding\x20journey\x20for\x20new\x20users','1767303AWSsgf','draft','last_login','attribute','stringify','Admin\x20User','High\x20Value\x20Active\x20Users','55501050BlEXgk','4267602PAUKKC','success','Users\x20active\x20in\x20the\x20last\x2030\x20days','j-abc123','56jUJDZo','2024-01-01T00:00:00Z','0\x200\x20*\x20*\x20*','0\x20*\x20*\x20*\x20*','map<string,string>','test@example.com','running','string','table','act-email','customer_id','full_access','Purchase\x20Reminder','parentSegment','Active\x20Users'];a153_0xdc27=function(){return _0x4f07a9;};return a153_0xdc27();}export function createJourney(_0x53a982){const _0x42f8cf=a153_0x48c184;return{...fixtures[_0x42f8cf(0xa7)][_0x42f8cf(0xb6)],..._0x53a982};}export function createQueryResult(_0x136bba){const _0x32f47c=a153_0x48c184;return{...fixtures[_0x32f47c(0xb0)][_0x32f47c(0xb6)],..._0x136bba};}export function createUser(_0x4ccf48){const _0x4be665=a153_0x48c184;return{...fixtures['user'][_0x4be665(0xb6)],..._0x4ccf48};}export function createJob(_0x18715c){const _0x450cfd=a153_0x48c184;return{...fixtures[_0x450cfd(0x91)][_0x450cfd(0xb5)],..._0x18715c};}export function createWorkflow(_0x5110d9){return{...fixtures['workflow']['basic'],..._0x5110d9};}
|
|
1
|
+
const a153_0x10b6e8=a153_0x2dc9;(function(_0x7526c4,_0x4276ea){const _0x4c89d8=a153_0x2dc9,_0x2be7e9=_0x7526c4();while(!![]){try{const _0x35df21=-parseInt(_0x4c89d8(0x1de))/0x1+parseInt(_0x4c89d8(0x1cc))/0x2*(-parseInt(_0x4c89d8(0x177))/0x3)+parseInt(_0x4c89d8(0x196))/0x4*(parseInt(_0x4c89d8(0x1d1))/0x5)+parseInt(_0x4c89d8(0x1a7))/0x6+-parseInt(_0x4c89d8(0x1dc))/0x7*(-parseInt(_0x4c89d8(0x1c2))/0x8)+parseInt(_0x4c89d8(0x176))/0x9*(parseInt(_0x4c89d8(0x1c9))/0xa)+-parseInt(_0x4c89d8(0x1b7))/0xb*(-parseInt(_0x4c89d8(0x18b))/0xc);if(_0x35df21===_0x4276ea)break;else _0x2be7e9['push'](_0x2be7e9['shift']());}catch(_0x3fadb3){_0x2be7e9['push'](_0x2be7e9['shift']());}}}(a153_0x173c,0x71f42));export const fixtures={'database':{'basic':{'name':a153_0x10b6e8(0x1dd),'count':0x5,'created_at':a153_0x10b6e8(0x1d2),'updated_at':a153_0x10b6e8(0x1d2),'permission':a153_0x10b6e8(0x1d4)},'withTables':{'name':'production_db','count':0x64,'created_at':a153_0x10b6e8(0x17e),'updated_at':a153_0x10b6e8(0x1c8),'permission':a153_0x10b6e8(0x17a)}},'table':{'basic':{'id':0x3039,'name':a153_0x10b6e8(0x18d),'type':a153_0x10b6e8(0x17d),'schema':JSON[a153_0x10b6e8(0x1ba)]([['id',a153_0x10b6e8(0x1c7)],['time',a153_0x10b6e8(0x172)],['name',a153_0x10b6e8(0x1c7)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a153_0x10b6e8(0x1d2),'updated_at':a153_0x10b6e8(0x1d2)},'events':{'id':0x303a,'name':a153_0x10b6e8(0x175),'type':a153_0x10b6e8(0x17d),'schema':JSON[a153_0x10b6e8(0x1ba)]([[a153_0x10b6e8(0x1b2),'string'],[a153_0x10b6e8(0x1db),a153_0x10b6e8(0x172)],['user_id',a153_0x10b6e8(0x1c7)],[a153_0x10b6e8(0x173),a153_0x10b6e8(0x1c7)],[a153_0x10b6e8(0x187),a153_0x10b6e8(0x1da)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a153_0x10b6e8(0x1d2),'updated_at':'2024-01-15T12:00:00Z'}},'parentSegment':{'basic':{'id':a153_0x10b6e8(0x193),'name':a153_0x10b6e8(0x1aa),'description':a153_0x10b6e8(0x18e),'status':a153_0x10b6e8(0x18f),'master_table':{'database':a153_0x10b6e8(0x1a1),'table':a153_0x10b6e8(0x182)},'attributes':[{'name':a153_0x10b6e8(0x191),'type':'string','key':!![]},{'name':a153_0x10b6e8(0x1b0),'type':a153_0x10b6e8(0x1c7)},{'name':a153_0x10b6e8(0x1b3),'type':a153_0x10b6e8(0x19b)}],'created_at':a153_0x10b6e8(0x1d2),'updated_at':'2024-01-15T00:00:00Z'},'withBehaviors':{'id':a153_0x10b6e8(0x19c),'name':a153_0x10b6e8(0x1c6),'description':a153_0x10b6e8(0x171),'status':a153_0x10b6e8(0x18f),'master_table':{'database':a153_0x10b6e8(0x1a1),'table':'customers'},'behaviors':[{'name':'purchases','table':{'database':a153_0x10b6e8(0x1be),'table':a153_0x10b6e8(0x1d9)},'join_key':'customer_id'},{'name':'page_views','table':{'database':'events_db','table':a153_0x10b6e8(0x188)},'join_key':a153_0x10b6e8(0x191)}],'created_at':a153_0x10b6e8(0x1d2),'updated_at':a153_0x10b6e8(0x16c)}},'segment':{'basic':{'id':'cs-456789','name':a153_0x10b6e8(0x1c1),'description':'Users\x20active\x20in\x20the\x20last\x2030\x20days','parent_segment_id':a153_0x10b6e8(0x193),'status':'active','rules':[{'type':a153_0x10b6e8(0x185),'field':'last_login','operator':a153_0x10b6e8(0x1a5),'value':a153_0x10b6e8(0x181)}],'count':0x1388,'created_at':'2024-01-01T00:00:00Z','updated_at':a153_0x10b6e8(0x16c)},'withMultipleRules':{'id':a153_0x10b6e8(0x1a3),'name':a153_0x10b6e8(0x1af),'description':'Active\x20users\x20with\x20high\x20lifetime\x20value','parent_segment_id':a153_0x10b6e8(0x193),'status':a153_0x10b6e8(0x18f),'rules':[{'type':a153_0x10b6e8(0x185),'field':'last_login','operator':a153_0x10b6e8(0x1a5),'value':a153_0x10b6e8(0x181)},{'type':a153_0x10b6e8(0x185),'field':a153_0x10b6e8(0x1cb),'operator':a153_0x10b6e8(0x1d6),'value':0x3e8}],'count':0x5dc,'created_at':a153_0x10b6e8(0x1d2),'updated_at':'2024-01-15T00:00:00Z'}},'journey':{'basic':{'id':a153_0x10b6e8(0x1a9),'name':a153_0x10b6e8(0x1d3),'description':a153_0x10b6e8(0x19e),'status':a153_0x10b6e8(0x192),'version':0x1,'steps':[{'id':a153_0x10b6e8(0x19d),'type':a153_0x10b6e8(0x1b4),'duration':'1d'},{'id':a153_0x10b6e8(0x19f),'type':a153_0x10b6e8(0x17b),'activation_id':'act-123'}],'created_at':'2024-01-01T00:00:00Z','updated_at':a153_0x10b6e8(0x16c)},'withDecision':{'id':a153_0x10b6e8(0x198),'name':a153_0x10b6e8(0x19a),'description':a153_0x10b6e8(0x1ab),'status':a153_0x10b6e8(0x18f),'version':0x2,'steps':[{'id':a153_0x10b6e8(0x19d),'type':a153_0x10b6e8(0x1c4),'segment_id':a153_0x10b6e8(0x180),'yes_path':'step-2','no_path':'step-3'},{'id':'step-2','type':a153_0x10b6e8(0x17b),'activation_id':a153_0x10b6e8(0x199)},{'id':a153_0x10b6e8(0x1ca),'type':a153_0x10b6e8(0x1cf)}],'created_at':a153_0x10b6e8(0x1d2),'updated_at':a153_0x10b6e8(0x16c)}},'queryResult':{'basic':{'schema':[{'name':'id','type':'varchar'},{'name':a153_0x10b6e8(0x1ae),'type':a153_0x10b6e8(0x1bb)},{'name':'count','type':a153_0x10b6e8(0x16e)}],'data':[[a153_0x10b6e8(0x1b6),'Alice',0x64],[a153_0x10b6e8(0x1c3),a153_0x10b6e8(0x16b),0xc8],[a153_0x10b6e8(0x17c),a153_0x10b6e8(0x1d0),0x96]]},'empty':{'schema':[{'name':'id','type':a153_0x10b6e8(0x1bb)},{'name':a153_0x10b6e8(0x1ae),'type':'varchar'}],'data':[]},'singleRow':{'schema':[{'name':a153_0x10b6e8(0x189),'type':a153_0x10b6e8(0x16e)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a153_0x10b6e8(0x183),'email':a153_0x10b6e8(0x174),'created_at':a153_0x10b6e8(0x1d2),'updated_at':a153_0x10b6e8(0x16c),'administrator':![]},'admin':{'id':0x1,'name':a153_0x10b6e8(0x178),'email':a153_0x10b6e8(0x186),'created_at':a153_0x10b6e8(0x1ac),'updated_at':'2024-01-15T00:00:00Z','administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':'presto','database':a153_0x10b6e8(0x1dd),'status':a153_0x10b6e8(0x190),'query':a153_0x10b6e8(0x1a2),'start_at':'2024-01-15T10:00:00Z','end_at':a153_0x10b6e8(0x16d),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a153_0x10b6e8(0x1d8),'database':a153_0x10b6e8(0x1dd),'status':a153_0x10b6e8(0x17f),'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':a153_0x10b6e8(0x1d8),'database':'test_db','status':a153_0x10b6e8(0x1bd),'query':a153_0x10b6e8(0x18c),'start_at':a153_0x10b6e8(0x1bc),'end_at':a153_0x10b6e8(0x1b1),'duration':0x1,'result_size':null,'error':'Table\x20does\x20not\x20exist:\x20nonexistent_table'}},'workflow':{'basic':{'id':a153_0x10b6e8(0x16f),'name':a153_0x10b6e8(0x194),'project':a153_0x10b6e8(0x1b5),'revision':a153_0x10b6e8(0x1cd),'timezone':a153_0x10b6e8(0x1a6),'schedule':{'cron':a153_0x10b6e8(0x1a8)}},'withSessions':{'id':a153_0x10b6e8(0x184),'name':'hourly_sync','project':a153_0x10b6e8(0x1d5),'revision':a153_0x10b6e8(0x197),'timezone':a153_0x10b6e8(0x1ce),'schedule':{'cron':a153_0x10b6e8(0x195)},'last_session':{'id':a153_0x10b6e8(0x18a),'status':a153_0x10b6e8(0x190),'started_at':'2024-01-15T09:00:00Z','finished_at':'2024-01-15T09:05:00Z'}}},'apiError':{'unauthorized':{'errors':{'error':a153_0x10b6e8(0x1b8),'message':a153_0x10b6e8(0x1b8),'severity':a153_0x10b6e8(0x1bd),'status_code':0x191}},'notFound':{'errors':{'error':'Resource\x20not\x20found','message':'The\x20requested\x20resource\x20does\x20not\x20exist','severity':a153_0x10b6e8(0x1bd),'status_code':0x194}},'rateLimited':{'detail':'Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.'},'rfc9457':{'type':a153_0x10b6e8(0x16a),'title':a153_0x10b6e8(0x179),'status':0x193,'detail':a153_0x10b6e8(0x170),'instance':a153_0x10b6e8(0x1b9)}}};export function createDatabase(_0x11a5e8){const _0x3fa020=a153_0x10b6e8;return{...fixtures[_0x3fa020(0x1ad)][_0x3fa020(0x1a0)],..._0x11a5e8};}export function createTable(_0x108b3f){return{...fixtures['table']['basic'],..._0x108b3f};}export function createParentSegment(_0x11421c){const _0x46b407=a153_0x10b6e8;return{...fixtures['parentSegment'][_0x46b407(0x1a0)],..._0x11421c};}export function createSegment(_0x29704c){const _0x398989=a153_0x10b6e8;return{...fixtures[_0x398989(0x1a4)][_0x398989(0x1a0)],..._0x29704c};}export function createJourney(_0x25a824){const _0x2252d7=a153_0x10b6e8;return{...fixtures[_0x2252d7(0x1c5)][_0x2252d7(0x1a0)],..._0x25a824};}function a153_0x2dc9(_0x28a0e5,_0x5a7391){_0x28a0e5=_0x28a0e5-0x16a;const _0x173c23=a153_0x173c();let _0x2dc9fb=_0x173c23[_0x28a0e5];return _0x2dc9fb;}export function createQueryResult(_0x5baccd){return{...fixtures['queryResult']['basic'],..._0x5baccd};}export function createUser(_0x42989a){const _0x896bda=a153_0x10b6e8;return{...fixtures[_0x896bda(0x1d7)]['basic'],..._0x42989a};}function a153_0x173c(){const _0x5191da=['cdp_db','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','cs-111222','segment','TimeWithinPast','UTC','1563606wAQwEB','0\x200\x20*\x20*\x20*','j-abc123','Test\x20Parent\x20Segment','Journey\x20with\x20decision\x20point','2023-01-01T00:00:00Z','database','name','High\x20Value\x20Active\x20Users','email','2024-01-15T10:10:01Z','event_id','created_at','wait','data_pipeline','user-1','5340665MuOEQj','Invalid\x20API\x20key','/v3/database/list','stringify','varchar','2024-01-15T10:10:00Z','error','events_db','workflow','job','Active\x20Users','16lZzDyg','user-2','decision_point','journey','Customers\x20with\x20Behaviors','string','2024-01-15T08:00:00Z','10rpFoOa','step-3','lifetime_value','2nKjpeG','abc123','America/Los_Angeles','end','Charlie','844495YQVbLM','2024-01-01T00:00:00Z','Welcome\x20Journey','administrator','data_sync','Greater','user','presto','purchases','map<string,string>','time','2809653XEFSyR','test_db','833767rnVssD','https://api.treasuredata.com/errors/forbidden','Bob','2024-01-15T00:00:00Z','2024-01-15T10:00:05Z','bigint','wf-12345','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','Parent\x20segment\x20with\x20behavioral\x20data','long','event_type','test@example.com','events','3834315WruWir','2529861EPXtHx','Admin\x20User','Forbidden','full_access','activation','user-3','log','2023-06-15T10:30:00Z','running','cs-456789','30d','unified_customers','Test\x20User','wf-67890','attribute','admin@example.com','properties','pageviews','total','sess-111','12wgWnHB','SELECT\x20*\x20FROM\x20nonexistent_table','users','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','active','success','customer_id','draft','ps-123456','daily_etl','0\x20*\x20*\x20*\x20*','4DuYqjX','def456','j-def456','act-email','Purchase\x20Reminder','timestamp','ps-789012','step-1','Onboarding\x20journey\x20for\x20new\x20users','step-2','basic'];a153_0x173c=function(){return _0x5191da;};return a153_0x173c();}export function createJob(_0xba1f7){const _0x4f2198=a153_0x10b6e8;return{...fixtures[_0x4f2198(0x1c0)]['completed'],..._0xba1f7};}export function createWorkflow(_0x101e9f){const _0x2976e2=a153_0x10b6e8;return{...fixtures[_0x2976e2(0x1bf)][_0x2976e2(0x1a0)],..._0x101e9f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x5db713=a154_0x202d;(function(_0x5361bd,_0x5a4c30){const _0x5b104e=a154_0x202d,_0x3a11e0=_0x5361bd();while(!![]){try{const _0x32d1c6=-parseInt(_0x5b104e(0x21b))/0x1*(-parseInt(_0x5b104e(0x22d))/0x2)+parseInt(_0x5b104e(0x202))/0x3+parseInt(_0x5b104e(0x208))/0x4*(-parseInt(_0x5b104e(0x1f2))/0x5)+-parseInt(_0x5b104e(0x203))/0x6+parseInt(_0x5b104e(0x1e6))/0x7+-parseInt(_0x5b104e(0x1e5))/0x8*(parseInt(_0x5b104e(0x1f7))/0x9)+-parseInt(_0x5b104e(0x1e0))/0xa;if(_0x32d1c6===_0x5a4c30)break;else _0x3a11e0['push'](_0x3a11e0['shift']());}catch(_0x49bf66){_0x3a11e0['push'](_0x3a11e0['shift']());}}}(a154_0x3ded,0xadb92));import{vi}from'vitest';function a154_0x202d(_0x4651c9,_0x50ab72){_0x4651c9=_0x4651c9-0x1db;const _0x3ded34=a154_0x3ded();let _0x202d10=_0x3ded34[_0x4651c9];return _0x202d10;}export class HTTPMockRegistry{[a154_0x5db713(0x1ea)]=[];['requests']=[];[a154_0x5db713(0x220)]=null;['REST'](_0x133ffe,_0x3ad593){return _0x465aa4=>{const _0x2da380=a154_0x202d;if(_0x465aa4[_0x2da380(0x22c)][_0x2da380(0x1f6)]()!==_0x133ffe[_0x2da380(0x1f6)]())return![];const _0x43a722=new URL(_0x465aa4[_0x2da380(0x20a)]);if(typeof _0x3ad593===_0x2da380(0x221))return _0x43a722['pathname']===_0x3ad593||_0x43a722[_0x2da380(0x1fa)]['includes'](_0x3ad593);return _0x3ad593[_0x2da380(0x209)](_0x43a722[_0x2da380(0x1fa)]);};}['withQuery'](_0x3ba148,_0x12714f){return _0xc97b61=>{const _0x46eac0=a154_0x202d;if(!_0x3ba148(_0xc97b61))return![];const _0x5bd2c3=new URL(_0xc97b61[_0x46eac0(0x20a)]);return Object[_0x46eac0(0x229)](_0x12714f)[_0x46eac0(0x21e)](([_0x3c9b57,_0x12eecf])=>_0x5bd2c3[_0x46eac0(0x1fd)][_0x46eac0(0x1ec)](_0x3c9b57)===_0x12eecf);};}[a154_0x5db713(0x21c)](_0x10b4e0,_0xdc4fd0){return _0x15ac86=>{const _0x276e03=a154_0x202d;if(!_0x10b4e0(_0x15ac86))return![];if(typeof _0xdc4fd0===_0x276e03(0x222))return _0xdc4fd0(_0x15ac86[_0x276e03(0x224)]);return JSON['stringify'](_0x15ac86[_0x276e03(0x224)])===JSON[_0x276e03(0x204)](_0xdc4fd0);};}[a154_0x5db713(0x20f)](_0x14d428,_0x138b0a){return _0x21fa5a=>{const _0x5cc961=a154_0x202d;if(!_0x14d428(_0x21fa5a))return![];const _0xdfe85d=new URL(_0x21fa5a['url']);return _0xdfe85d[_0x5cc961(0x219)]===_0x138b0a;};}['register'](_0x2cb415,_0x1fd4cb,_0x3845c3){const _0x4be364=a154_0x5db713;this[_0x4be364(0x1ea)][_0x4be364(0x21d)]({'matcher':_0x2cb415,'responder':_0x1fd4cb,'matched':![],'matchCount':0x0,'stack':new Error()[_0x4be364(0x1fe)]??'','description':_0x3845c3?.[_0x4be364(0x1e4)]});}[a154_0x5db713(0x1df)](_0x9d155e,_0x1b5c46,_0x9119a2){const _0x19969e=a154_0x5db713,_0x42498e=_0x296ab1=>{const _0x13aeba=a154_0x202d;return _0x9119a2(_0x296ab1[_0x13aeba(0x224)],_0x296ab1),_0x1b5c46(_0x296ab1);};this[_0x19969e(0x227)](_0x9d155e,_0x42498e);}static[a154_0x5db713(0x213)](_0x39ddeb,_0x64c6fe=0xc8){return()=>new Response(JSON['stringify'](_0x39ddeb),{'status':_0x64c6fe,'headers':{'Content-Type':'application/json'}});}static[a154_0x5db713(0x20e)](_0x5997f6,_0xb9c6b1,_0x45a624=a154_0x5db713(0x217)){return()=>{const _0xb11f50=a154_0x202d;let _0x227035;switch(_0x45a624){case _0xb11f50(0x1e3):_0x227035={'errors':{'error':_0xb9c6b1,'message':_0xb9c6b1,'severity':_0xb11f50(0x1f0),'status_code':_0x5997f6}};break;case _0xb11f50(0x1dd):_0x227035={'type':'https://api.treasuredata.com/errors/'+_0x5997f6,'title':HTTPMockRegistry[_0xb11f50(0x22b)](_0x5997f6),'status':_0x5997f6,'detail':_0xb9c6b1};break;default:_0x227035={'error':_0xb9c6b1};}return new Response(JSON[_0xb11f50(0x204)](_0x227035),{'status':_0x5997f6,'headers':{'Content-Type':_0xb11f50(0x1db)}});};}static['jsonResponseWithHeaders'](_0x58b99f,_0x29db4a,_0x30ff3d=0xc8){const _0x3519a0=a154_0x5db713;return()=>new Response(JSON[_0x3519a0(0x204)](_0x58b99f),{'status':_0x30ff3d,'headers':{'Content-Type':'application/json',..._0x29db4a}});}static[a154_0x5db713(0x21f)](_0x347696,_0x4804e8=0xc8){const _0x3cbacd=a154_0x5db713;return()=>new Response(_0x347696,{'status':_0x4804e8,'headers':{'Content-Type':_0x3cbacd(0x22a)}});}static[a154_0x5db713(0x212)](_0x1f69c6){return()=>{throw new Error(_0x1f69c6);};}[a154_0x5db713(0x205)](){const _0x52cfd6=a154_0x5db713;return this[_0x52cfd6(0x220)]=vi['fn']()[_0x52cfd6(0x21a)](async(_0x3b3562,_0x3a5726)=>{const _0x5bca78=_0x52cfd6,_0x152ae0=this[_0x5bca78(0x1eb)](_0x3b3562,_0x3a5726);this[_0x5bca78(0x1f5)][_0x5bca78(0x21d)](_0x152ae0);for(const _0x38510f of this[_0x5bca78(0x1ea)]){if(_0x38510f[_0x5bca78(0x1ed)](_0x152ae0))return _0x38510f[_0x5bca78(0x223)]=!![],_0x38510f[_0x5bca78(0x1ee)]++,_0x38510f[_0x5bca78(0x210)](_0x152ae0);}const _0x204931=this['stubs'][_0x5bca78(0x228)]((_0x36c6a6,_0x4c3b9d)=>'\x20\x20'+(_0x4c3b9d+0x1)+'.\x20'+(_0x36c6a6[_0x5bca78(0x1e4)]??_0x5bca78(0x1ef)))[_0x5bca78(0x225)]('\x0a');throw new Error(_0x5bca78(0x226)+_0x152ae0[_0x5bca78(0x22c)]+'\x20'+_0x152ae0[_0x5bca78(0x20a)]+'\x0a'+('Request\x20body:\x20'+JSON['stringify'](_0x152ae0[_0x5bca78(0x224)])+'\x0a')+(_0x5bca78(0x1e8)+(_0x204931||_0x5bca78(0x211))));}),this[_0x52cfd6(0x220)];}['parseRequest'](_0x2f3f0e,_0x29476c){const _0x5d205c=a154_0x5db713,_0xea9cf2={};if(_0x29476c?.[_0x5d205c(0x22e)]){if(_0x29476c['headers']instanceof Headers)_0x29476c['headers'][_0x5d205c(0x1f8)]((_0x76b3ed,_0x3f736e)=>{_0xea9cf2[_0x3f736e['toLowerCase']()]=_0x76b3ed;});else{if(Array[_0x5d205c(0x1de)](_0x29476c['headers']))for(const [_0x511746,_0x2f239b]of _0x29476c[_0x5d205c(0x22e)]){_0xea9cf2[_0x511746[_0x5d205c(0x1ff)]()]=_0x2f239b;}else for(const [_0x2dfba2,_0x5a53a5]of Object[_0x5d205c(0x229)](_0x29476c[_0x5d205c(0x22e)])){_0x5a53a5!==undefined&&(_0xea9cf2[_0x2dfba2[_0x5d205c(0x1ff)]()]=_0x5a53a5);}}}let _0x9ef83d;if(_0x29476c?.['body'])try{_0x9ef83d=JSON[_0x5d205c(0x201)](_0x29476c[_0x5d205c(0x224)]);}catch{_0x9ef83d=_0x29476c[_0x5d205c(0x224)];}return{'method':_0x29476c?.[_0x5d205c(0x22c)]??_0x5d205c(0x1e1),'url':_0x2f3f0e,'headers':_0xea9cf2,'body':_0x9ef83d};}['verify'](_0x3af22c){const _0x5e0dfd=a154_0x5db713,_0x92d80c=this[_0x5e0dfd(0x1ea)][_0x5e0dfd(0x1f4)](_0x5ed51=>!_0x5ed51[_0x5e0dfd(0x223)]);if(_0x92d80c[_0x5e0dfd(0x1fb)]>0x0){const _0x2883b2=_0x92d80c['map'](_0x3a567e=>{const _0x1269de=_0x5e0dfd,_0x5876e9=_0x3a567e['description']?'\x20('+_0x3a567e[_0x1269de(0x1e4)]+')':'',_0x3f2c43=_0x3a567e['stack'][_0x1269de(0x1e2)]('\x0a')[_0x1269de(0x206)](0x2,0x5)[_0x1269de(0x225)]('\x0a');return _0x1269de(0x1f9)+_0x5876e9+_0x1269de(0x1e7)+_0x3f2c43;});_0x3af22c[_0x5e0dfd(0x218)](_0x92d80c[_0x5e0dfd(0x1fb)]+_0x5e0dfd(0x1fc)+_0x2883b2[_0x5e0dfd(0x225)]('\x0a\x0a'));}}[a154_0x5db713(0x1e9)](){const _0x34970b=a154_0x5db713;return[...this[_0x34970b(0x1f5)]];}['getLastRequest'](){const _0x15bdd6=a154_0x5db713;return this[_0x15bdd6(0x1f5)][this[_0x15bdd6(0x1f5)][_0x15bdd6(0x1fb)]-0x1];}[a154_0x5db713(0x20d)](_0x52ebb0,_0x391592){const _0x8a63cc=a154_0x5db713;return this[_0x8a63cc(0x1f5)]['some'](_0x462ee7=>{const _0x2410a1=_0x8a63cc;if(_0x462ee7['method'][_0x2410a1(0x1f6)]()!==_0x52ebb0[_0x2410a1(0x1f6)]())return![];if(typeof _0x391592===_0x2410a1(0x221))return _0x462ee7[_0x2410a1(0x20a)][_0x2410a1(0x1dc)](_0x391592);return _0x391592[_0x2410a1(0x209)](_0x462ee7['url']);});}['getMatchCount'](_0x422c93){const _0xd58c5b=a154_0x5db713;return this[_0xd58c5b(0x1ea)][_0x422c93]?.[_0xd58c5b(0x1ee)]??0x0;}[a154_0x5db713(0x20b)](){const _0x191243=a154_0x5db713;this['stubs']=[],this[_0x191243(0x1f5)]=[],this[_0x191243(0x220)]=null;}static[a154_0x5db713(0x22b)](_0x334db4){const _0x415ca2=a154_0x5db713,_0x3fd6f7={0xc8:'OK',0xc9:_0x415ca2(0x1f1),0xcc:_0x415ca2(0x216),0x190:'Bad\x20Request',0x191:_0x415ca2(0x215),0x193:_0x415ca2(0x22f),0x194:_0x415ca2(0x1f3),0x199:_0x415ca2(0x207),0x1a6:_0x415ca2(0x214),0x1ad:_0x415ca2(0x20c),0x1f4:'Internal\x20Server\x20Error',0x1f6:'Bad\x20Gateway',0x1f7:'Service\x20Unavailable'};return _0x3fd6f7[_0x334db4]??_0x415ca2(0x200);}}function a154_0x3ded(){const _0x1fdf4c=['simple','fail','host','mockImplementation','2aHiTLr','withBody','push','every','textResponse','fetchMock','string','function','matched','body','join','No\x20stub\x20matched\x20request:\x20','register','map','entries','text/plain','getStatusText','method','514604UsssfV','headers','Forbidden','application/json','includes','rfc9457','isArray','registerWithInspector','9324740tKtYbE','GET','split','td-api','description','5608seRVJc','6799044URjGqt','\x20registered\x20at:\x0a','Registered\x20stubs:\x0a','getRequests','stubs','parseRequest','get','matcher','matchCount','unnamed\x20stub','error','Created','5gNUWPa','Not\x20Found','filter','requests','toUpperCase','774DUwyTt','forEach','Unmatched\x20stub','pathname','length','\x20stub(s)\x20were\x20not\x20matched:\x0a\x0a','searchParams','stack','toLowerCase','Unknown','parse','2084007mwrDwb','2194464oNwiMm','stringify','createFetch','slice','Conflict','441964snaTSP','test','url','reset','Too\x20Many\x20Requests','wasCalled','errorResponse','withHost','responder','\x20\x20(none)','networkError','jsonResponse','Unprocessable\x20Entity','Unauthorized','No\x20Content'];a154_0x3ded=function(){return _0x1fdf4c;};return a154_0x3ded();}export function createHTTPMock(){return new HTTPMockRegistry();}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4c5418,_0x296dbe){var _0x13697c=a155_0x2e23,_0x37ddb9=_0x4c5418();while(!![]){try{var _0x53c69e=parseInt(_0x13697c(0x1d8))/0x1*(-parseInt(_0x13697c(0x1d3))/0x2)+-parseInt(_0x13697c(0x1d9))/0x3+-parseInt(_0x13697c(0x1d6))/0x4+-parseInt(_0x13697c(0x1db))/0x5*(-parseInt(_0x13697c(0x1d2))/0x6)+-parseInt(_0x13697c(0x1d4))/0x7+parseInt(_0x13697c(0x1da))/0x8+parseInt(_0x13697c(0x1d7))/0x9*(parseInt(_0x13697c(0x1d5))/0xa);if(_0x53c69e===_0x296dbe)break;else _0x37ddb9['push'](_0x37ddb9['shift']());}catch(_0x55e9f1){_0x37ddb9['push'](_0x37ddb9['shift']());}}}(a155_0x1bba,0x8f450));export{HTTPMockRegistry,createHTTPMock}from'./http-mock.js';function a155_0x1bba(){var _0x1ab051=['2WGhwMU','5577187shlmgg','7397970NWiUhv','4251852DfZnKf','27QtdUgw','318127FieLqq','340497gaakKG','1569088Ffdpnd','6905ZslAAa','2010ppuqdX'];a155_0x1bba=function(){return _0x1ab051;};return a155_0x1bba();}function a155_0x2e23(_0x4a6905,_0x52e9df){_0x4a6905=_0x4a6905-0x1d2;var _0x1bbad9=a155_0x1bba();var _0x2e239b=_0x1bbad9[_0x4a6905];return _0x2e239b;}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
|
-
(function(
|
|
1
|
+
(function(_0x8879d3,_0x373276){const _0x49901f=a156_0x1868,_0x576bdb=_0x8879d3();while(!![]){try{const _0x41e51a=-parseInt(_0x49901f(0x1cb))/0x1*(-parseInt(_0x49901f(0x1d1))/0x2)+parseInt(_0x49901f(0x1d3))/0x3+-parseInt(_0x49901f(0x1d2))/0x4*(-parseInt(_0x49901f(0x1ce))/0x5)+parseInt(_0x49901f(0x1d0))/0x6+-parseInt(_0x49901f(0x1d5))/0x7+-parseInt(_0x49901f(0x1cd))/0x8+-parseInt(_0x49901f(0x1cf))/0x9;if(_0x41e51a===_0x373276)break;else _0x576bdb['push'](_0x576bdb['shift']());}catch(_0x248014){_0x576bdb['push'](_0x576bdb['shift']());}}}(a156_0x469f,0x6e739));export async function batchAsync(_0x1bac37,_0x262a41,_0x5bd1cf=0xa){const _0x14456f=a156_0x1868,_0x5320ab=[];for(let _0x384880=0x0;_0x384880<_0x1bac37['length'];_0x384880+=_0x5bd1cf){const _0x4ffec8=_0x1bac37[_0x14456f(0x1d7)](_0x384880,_0x384880+_0x5bd1cf),_0x38d4d2=await Promise[_0x14456f(0x1d4)](_0x4ffec8[_0x14456f(0x1d6)](_0x262a41));_0x5320ab[_0x14456f(0x1cc)](..._0x38d4d2);}return _0x5320ab;}function a156_0x1868(_0x29d9d,_0x4b289c){_0x29d9d=_0x29d9d-0x1cb;const _0x469ff6=a156_0x469f();let _0x1868f6=_0x469ff6[_0x29d9d];return _0x1868f6;}function a156_0x469f(){const _0x197947=['22634KMuFDf','444496lHbXfj','589851FwMIGa','all','2984751oMYfXi','map','slice','73xoaceg','push','1118496UvzxCw','15OfHuyA','6913314sPqktP','2583780SbwFKy'];a156_0x469f=function(){return _0x197947;};return a156_0x469f();}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a157_0x30b040=a157_0x2c8b;(function(_0x5b5f91,_0x4bb7dd){const _0x1814b2=a157_0x2c8b,_0x3a4a3c=_0x5b5f91();while(!![]){try{const _0x525409=-parseInt(_0x1814b2(0x1b4))/0x1*(-parseInt(_0x1814b2(0x1a5))/0x2)+parseInt(_0x1814b2(0x1a1))/0x3*(-parseInt(_0x1814b2(0x1a6))/0x4)+parseInt(_0x1814b2(0x1ba))/0x5*(-parseInt(_0x1814b2(0x1a8))/0x6)+-parseInt(_0x1814b2(0x1a0))/0x7+-parseInt(_0x1814b2(0x1b8))/0x8*(-parseInt(_0x1814b2(0x1a2))/0x9)+-parseInt(_0x1814b2(0x1bd))/0xa+-parseInt(_0x1814b2(0x1ad))/0xb*(-parseInt(_0x1814b2(0x1b3))/0xc);if(_0x525409===_0x4bb7dd)break;else _0x3a4a3c['push'](_0x3a4a3c['shift']());}catch(_0x2697c2){_0x3a4a3c['push'](_0x3a4a3c['shift']());}}}(a157_0x32e9,0x885b7));import*as a157_0x5cbea0 from'chalk';const Chalk=a157_0x5cbea0[a157_0x30b040(0x1b6)];export function shouldUseColor(_0x3dd478={}){const _0x3368dd=a157_0x30b040;if(_0x3dd478[_0x3368dd(0x1af)]===!![])return![];if(_0x3dd478[_0x3368dd(0x1a3)]===!![])return!![];if(process.env.NO_COLOR!==undefined)return![];return process[_0x3368dd(0x1bb)][_0x3368dd(0x1b9)]??![];}export function getChalk(_0x30e82a={}){if(shouldUseColor(_0x30e82a))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0xf357fc,_0x46bd77={}){return getChalk(_0x46bd77)['dim'](_0xf357fc);}export function colorHeader(_0x38f2f8,_0x56c272={}){const _0x3ec2f5=a157_0x30b040;return getChalk(_0x56c272)[_0x3ec2f5(0x1ab)](_0x38f2f8);}export function colorType(_0x24c6ec,_0x440be6={}){const _0x3b80d4=a157_0x30b040;return getChalk(_0x440be6)[_0x3b80d4(0x1b0)](_0x24c6ec);}function a157_0x2c8b(_0x154651,_0x432712){_0x154651=_0x154651-0x1a0;const _0x32e9bc=a157_0x32e9();let _0x2c8bcb=_0x32e9bc[_0x154651];return _0x2c8bcb;}export function colorJSONKey(_0x20ab69,_0x5e2a95={}){const _0x3e83f4=a157_0x30b040;return getChalk(_0x5e2a95)[_0x3e83f4(0x1b2)](_0x20ab69);}export function colorJSONString(_0x74f3ed,_0x5460bb={}){const _0x5a5105=a157_0x30b040;return getChalk(_0x5460bb)[_0x5a5105(0x1ac)](_0x74f3ed);}export function colorJSONNumber(_0x308a02,_0x2d0f6a={}){const _0x415e15=a157_0x30b040;return getChalk(_0x2d0f6a)[_0x415e15(0x1ab)](_0x308a02);}export function colorJSONBoolean(_0x27eb9d,_0x2f74fe={}){const _0xfa1152=a157_0x30b040;return getChalk(_0x2f74fe)[_0xfa1152(0x1b7)](_0x27eb9d);}export function colorJSONNull(_0x3bd54d,_0x284ee0={}){return getChalk(_0x284ee0)['dim'](_0x3bd54d);}function a157_0x32e9(){const _0x1ba39f=['3OBbHsS','1773VVVfHy','color','object','617118xVhsjG','3904964SoISpi','boolean','6NmeCut','null','repeat','cyan','green','77fOkVsw','entries','noColor','dim','stringify','blue','3714252IekdFb','2RsKlTV','join','Chalk','yellow','7552ThLLMh','isTTY','3750710rHoxvI','stdout','number','1988060HwsYvi','length','isArray','map','string','3402175AweCJQ'];a157_0x32e9=function(){return _0x1ba39f;};return a157_0x32e9();}export function colorizeJSONCompact(_0x499149,_0x2337db={}){const _0x136f35=a157_0x30b040;if(!shouldUseColor(_0x2337db))return JSON[_0x136f35(0x1b1)](_0x499149);if(_0x499149===null)return colorJSONNull(_0x136f35(0x1a9),_0x2337db);if(typeof _0x499149===_0x136f35(0x1a7))return colorJSONBoolean(String(_0x499149),_0x2337db);if(typeof _0x499149===_0x136f35(0x1bc))return colorJSONNumber(String(_0x499149),_0x2337db);if(typeof _0x499149==='string')return colorJSONString(JSON[_0x136f35(0x1b1)](_0x499149),_0x2337db);if(Array['isArray'](_0x499149)){if(_0x499149[_0x136f35(0x1be)]===0x0)return'[]';const _0x4ccf26=_0x499149[_0x136f35(0x1c0)](_0x4e87db=>colorizeJSONCompact(_0x4e87db,_0x2337db));return'['+_0x4ccf26[_0x136f35(0x1b5)](',')+']';}if(typeof _0x499149===_0x136f35(0x1a4)){const _0x35cabd=Object[_0x136f35(0x1ae)](_0x499149);if(_0x35cabd[_0x136f35(0x1be)]===0x0)return'{}';const _0x1acdef=_0x35cabd[_0x136f35(0x1c0)](([_0xb881a,_0x5ee0c6])=>{const _0x895a18=_0x136f35,_0x4993ff=colorJSONKey(JSON[_0x895a18(0x1b1)](_0xb881a),_0x2337db),_0x5934ab=colorizeJSONCompact(_0x5ee0c6,_0x2337db);return _0x4993ff+':'+_0x5934ab;});return'{'+_0x1acdef[_0x136f35(0x1b5)](',')+'}';}return String(_0x499149);}export function colorizeJSON(_0x136d50,_0x8576e={},_0x31a042=0x0){const _0x3cc8ac=a157_0x30b040;if(!shouldUseColor(_0x8576e))return JSON['stringify'](_0x136d50,null,0x2);const _0x2a6787='\x20'[_0x3cc8ac(0x1aa)](_0x31a042),_0x526604=_0x31a042+0x2;if(_0x136d50===null)return colorJSONNull(_0x3cc8ac(0x1a9),_0x8576e);if(typeof _0x136d50==='boolean')return colorJSONBoolean(String(_0x136d50),_0x8576e);if(typeof _0x136d50===_0x3cc8ac(0x1bc))return colorJSONNumber(String(_0x136d50),_0x8576e);if(typeof _0x136d50===_0x3cc8ac(0x1c1))return colorJSONString(JSON[_0x3cc8ac(0x1b1)](_0x136d50),_0x8576e);if(Array[_0x3cc8ac(0x1bf)](_0x136d50)){if(_0x136d50[_0x3cc8ac(0x1be)]===0x0)return'[]';const _0xcc164f=_0x136d50['map'](_0x38fdce=>{const _0x53fa44=_0x3cc8ac,_0x55add2=colorizeJSON(_0x38fdce,_0x8576e,_0x526604);return''+'\x20'[_0x53fa44(0x1aa)](_0x526604)+_0x55add2;});return'[\x0a'+_0xcc164f[_0x3cc8ac(0x1b5)](',\x0a')+('\x0a'+_0x2a6787+']');}if(typeof _0x136d50===_0x3cc8ac(0x1a4)){const _0x28fb1f=Object[_0x3cc8ac(0x1ae)](_0x136d50);if(_0x28fb1f[_0x3cc8ac(0x1be)]===0x0)return'{}';const _0x5417ab=_0x28fb1f[_0x3cc8ac(0x1c0)](([_0x4c83a5,_0x531d4d])=>{const _0x1c4c29=_0x3cc8ac,_0x4acf50=colorJSONKey(JSON[_0x1c4c29(0x1b1)](_0x4c83a5),_0x8576e),_0x4c012c=colorizeJSON(_0x531d4d,_0x8576e,_0x526604);return''+'\x20'[_0x1c4c29(0x1aa)](_0x526604)+_0x4acf50+':\x20'+_0x4c012c;});return'{\x0a'+_0x5417ab[_0x3cc8ac(0x1b5)](',\x0a')+('\x0a'+_0x2a6787+'}');}return String(_0x136d50);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a1a93,_0x144689){const _0x2004b7=a158_0x85be,_0x5ba333=_0x5a1a93();while(!![]){try{const _0x15b21e=-parseInt(_0x2004b7(0x16a))/0x1*(-parseInt(_0x2004b7(0x167))/0x2)+parseInt(_0x2004b7(0x15f))/0x3*(parseInt(_0x2004b7(0x171))/0x4)+-parseInt(_0x2004b7(0x178))/0x5*(parseInt(_0x2004b7(0x15e))/0x6)+parseInt(_0x2004b7(0x15d))/0x7+parseInt(_0x2004b7(0x177))/0x8+-parseInt(_0x2004b7(0x15b))/0x9*(parseInt(_0x2004b7(0x159))/0xa)+-parseInt(_0x2004b7(0x16c))/0xb*(parseInt(_0x2004b7(0x161))/0xc);if(_0x15b21e===_0x144689)break;else _0x5ba333['push'](_0x5ba333['shift']());}catch(_0x2b0c11){_0x5ba333['push'](_0x5ba333['shift']());}}}(a158_0x32e2,0x6e53a));function a158_0x85be(_0x39e58a,_0x4567ad){_0x39e58a=_0x39e58a-0x158;const _0x32e2a4=a158_0x32e2();let _0x85beac=_0x32e2a4[_0x39e58a];return _0x85beac;}import a158_0xe03b3f from'chalk';export function generateDiff(_0x1a4ed6,_0x39c0c6){const _0x4ca6cf=a158_0x85be,_0x10618f=_0x1a4ed6[_0x4ca6cf(0x160)]('\x0a'),_0x487f53=_0x39c0c6[_0x4ca6cf(0x160)]('\x0a'),_0x5c9235=[],_0x3e4b1a=computeLCS(_0x10618f,_0x487f53);let _0xccd3c4=0x0,_0x4ec976=0x0,_0x8bf528=0x0;while(_0xccd3c4<_0x10618f['length']||_0x4ec976<_0x487f53[_0x4ca6cf(0x16e)]){if(_0x8bf528<_0x3e4b1a[_0x4ca6cf(0x16e)]&&_0xccd3c4<_0x10618f[_0x4ca6cf(0x16e)]&&_0x10618f[_0xccd3c4]===_0x3e4b1a[_0x8bf528])_0x4ec976<_0x487f53['length']&&_0x487f53[_0x4ec976]===_0x3e4b1a[_0x8bf528]?(_0x5c9235[_0x4ca6cf(0x174)]({'type':_0x4ca6cf(0x16f),'content':_0x10618f[_0xccd3c4]}),_0xccd3c4++,_0x4ec976++,_0x8bf528++):(_0x5c9235['push']({'type':_0x4ca6cf(0x172),'content':_0x487f53[_0x4ec976]}),_0x4ec976++);else{if(_0x8bf528<_0x3e4b1a[_0x4ca6cf(0x16e)]&&_0x4ec976<_0x487f53[_0x4ca6cf(0x16e)]&&_0x487f53[_0x4ec976]===_0x3e4b1a[_0x8bf528])_0x5c9235[_0x4ca6cf(0x174)]({'type':_0x4ca6cf(0x173),'content':_0x10618f[_0xccd3c4]}),_0xccd3c4++;else{if(_0xccd3c4<_0x10618f['length']&&(_0x8bf528>=_0x3e4b1a[_0x4ca6cf(0x16e)]||_0x10618f[_0xccd3c4]!==_0x3e4b1a[_0x8bf528]))_0x5c9235['push']({'type':'removed','content':_0x10618f[_0xccd3c4]}),_0xccd3c4++;else _0x4ec976<_0x487f53['length']&&(_0x5c9235[_0x4ca6cf(0x174)]({'type':_0x4ca6cf(0x172),'content':_0x487f53[_0x4ec976]}),_0x4ec976++);}}}return _0x5c9235;}function computeLCS(_0x2001d8,_0x183bad){const _0x51ddb7=a158_0x85be,_0x15354e=_0x2001d8['length'],_0xadc3cf=_0x183bad[_0x51ddb7(0x16e)],_0x464dae=Array(_0x15354e+0x1)[_0x51ddb7(0x170)](null)['map'](()=>Array(_0xadc3cf+0x1)[_0x51ddb7(0x170)](0x0));for(let _0x46983f=0x1;_0x46983f<=_0x15354e;_0x46983f++){for(let _0x301bfc=0x1;_0x301bfc<=_0xadc3cf;_0x301bfc++){_0x2001d8[_0x46983f-0x1]===_0x183bad[_0x301bfc-0x1]?_0x464dae[_0x46983f][_0x301bfc]=_0x464dae[_0x46983f-0x1][_0x301bfc-0x1]+0x1:_0x464dae[_0x46983f][_0x301bfc]=Math[_0x51ddb7(0x166)](_0x464dae[_0x46983f-0x1][_0x301bfc],_0x464dae[_0x46983f][_0x301bfc-0x1]);}}const _0x482f5e=[];let _0xdf367d=_0x15354e,_0x224bb5=_0xadc3cf;while(_0xdf367d>0x0&&_0x224bb5>0x0){if(_0x2001d8[_0xdf367d-0x1]===_0x183bad[_0x224bb5-0x1])_0x482f5e[_0x51ddb7(0x16b)](_0x2001d8[_0xdf367d-0x1]),_0xdf367d--,_0x224bb5--;else _0x464dae[_0xdf367d-0x1][_0x224bb5]>_0x464dae[_0xdf367d][_0x224bb5-0x1]?_0xdf367d--:_0x224bb5--;}return _0x482f5e;}export function formatDiffWithColors(_0x57f9d4,_0x16aca1=0x3){const _0x3c89fe=a158_0x85be,_0x359faa=new Set();_0x57f9d4['forEach']((_0x3dbc6b,_0x2f6ac2)=>{const _0x18ffef=a158_0x85be;_0x3dbc6b[_0x18ffef(0x15a)]!==_0x18ffef(0x16f)&&_0x359faa[_0x18ffef(0x162)](_0x2f6ac2);});if(_0x359faa['size']===0x0)return'';const _0x52c919=new Set();for(const _0x5702b2 of _0x359faa){for(let _0xb6af25=Math[_0x3c89fe(0x166)](0x0,_0x5702b2-_0x16aca1);_0xb6af25<=Math['min'](_0x57f9d4[_0x3c89fe(0x16e)]-0x1,_0x5702b2+_0x16aca1);_0xb6af25++){_0x52c919[_0x3c89fe(0x162)](_0xb6af25);}}const _0x4a3b2a=[];let _0x284eba=-0x1;const _0x32be46=_0x57f9d4['length'],_0x1ac32b=Math[_0x3c89fe(0x166)](0x3,String(_0x32be46)[_0x3c89fe(0x16e)]),_0x13173a=[];let _0x4ef79e=0x0,_0xc61d70=0x0;for(const _0x7517be of _0x57f9d4){if(_0x7517be[_0x3c89fe(0x15a)]==='removed')_0x4ef79e++,_0x13173a[_0x3c89fe(0x174)]({'old':_0x4ef79e,'new':0x0});else _0x7517be[_0x3c89fe(0x15a)]==='added'?(_0xc61d70++,_0x13173a['push']({'old':0x0,'new':_0xc61d70})):(_0x4ef79e++,_0xc61d70++,_0x13173a[_0x3c89fe(0x174)]({'old':_0x4ef79e,'new':_0xc61d70}));}for(let _0x5872e8=0x0;_0x5872e8<_0x57f9d4[_0x3c89fe(0x16e)];_0x5872e8++){if(!_0x52c919[_0x3c89fe(0x168)](_0x5872e8))continue;_0x284eba!==-0x1&&_0x5872e8>_0x284eba+0x1&&_0x4a3b2a[_0x3c89fe(0x174)](a158_0xe03b3f[_0x3c89fe(0x163)](_0x3c89fe(0x176)));_0x284eba=_0x5872e8;const _0x376e4d=_0x57f9d4[_0x5872e8],_0x2a8994=_0x13173a[_0x5872e8],_0x313683=_0x2a8994['old']>0x0?String(_0x2a8994[_0x3c89fe(0x15c)])[_0x3c89fe(0x158)](_0x1ac32b):'\x20'['repeat'](_0x1ac32b),_0x3daf68=_0x2a8994[_0x3c89fe(0x169)]>0x0?String(_0x2a8994[_0x3c89fe(0x169)])['padStart'](_0x1ac32b):'\x20'[_0x3c89fe(0x179)](_0x1ac32b);switch(_0x376e4d[_0x3c89fe(0x15a)]){case _0x3c89fe(0x173):_0x4a3b2a[_0x3c89fe(0x174)](a158_0xe03b3f['red'](_0x313683+'\x20'+_0x3daf68+_0x3c89fe(0x165)+_0x376e4d[_0x3c89fe(0x16d)]));break;case'added':_0x4a3b2a[_0x3c89fe(0x174)](a158_0xe03b3f['green'](_0x313683+'\x20'+_0x3daf68+'\x20+\x20'+_0x376e4d[_0x3c89fe(0x16d)]));break;default:_0x4a3b2a['push'](a158_0xe03b3f[_0x3c89fe(0x164)](_0x313683+'\x20'+_0x3daf68+'\x20\x20\x20'+_0x376e4d[_0x3c89fe(0x16d)]));break;}}return _0x4a3b2a[_0x3c89fe(0x175)]('\x0a');}export function hasChanges(_0x5b6b8c){return _0x5b6b8c['some'](_0x2ddb96=>_0x2ddb96['type']!=='unchanged');}function a158_0x32e2(){const _0x3d61ef=['new','35317JVmrxg','unshift','9527507CTIrsQ','content','length','unchanged','fill','20jeVgAP','added','removed','push','join','\x20\x20...','4803424XCrBzK','276280aEdREp','repeat','padStart','7003050Yfasji','type','9DKLuXc','old','4621337DwBrxC','90BScule','464562mfeLMi','split','12SJTUhD','add','cyan','dim','\x20-\x20','max','46Qwzzie','has'];a158_0x32e2=function(){return _0x3d61ef;};return a158_0x32e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f9c59,_0x42c334){const _0x7d8b20=a159_0xd298,_0x45503f=_0x4f9c59();while(!![]){try{const _0x539096=parseInt(_0x7d8b20(0x168))/0x1+parseInt(_0x7d8b20(0x16f))/0x2+parseInt(_0x7d8b20(0x15c))/0x3+parseInt(_0x7d8b20(0x171))/0x4*(-parseInt(_0x7d8b20(0x167))/0x5)+-parseInt(_0x7d8b20(0x162))/0x6*(-parseInt(_0x7d8b20(0x170))/0x7)+parseInt(_0x7d8b20(0x164))/0x8*(-parseInt(_0x7d8b20(0x15d))/0x9)+-parseInt(_0x7d8b20(0x16b))/0xa;if(_0x539096===_0x42c334)break;else _0x45503f['push'](_0x45503f['shift']());}catch(_0x542818){_0x45503f['push'](_0x45503f['shift']());}}}(a159_0x551a,0x823cc));import*as a159_0xb1501a from'node:fs';function a159_0xd298(_0x19f6ca,_0x416c7a){_0x19f6ca=_0x19f6ca-0x15c;const _0x551af9=a159_0x551a();let _0xd2982f=_0x551af9[_0x19f6ca];return _0xd2982f;}import*as a159_0x120400 from'node:path';export function setSecureFilePermissions(_0x3206ae){const _0x1352ae=a159_0xd298;try{a159_0xb1501a[_0x1352ae(0x160)](_0x3206ae,0x180);}catch{console['warn'](_0x1352ae(0x16c)+_0x3206ae);}}export function setSecureDirectoryPermissions(_0x45e1f0){const _0x4c2961=a159_0xd298;try{a159_0xb1501a[_0x4c2961(0x160)](_0x45e1f0,0x1c0);}catch{console[_0x4c2961(0x16d)](_0x4c2961(0x16c)+_0x45e1f0);}}function a159_0x551a(){const _0x50e3c1=['275chhDAd','636270nriyeC',').\x20','writeFileSync','10440450GGLwJO','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','warn','statSync','1325052EpyFbw','5870585NvMmpw','52892ifMgPH','2236077rAUzWB','325152AljInr','\x20has\x20insecure\x20permissions\x20(','toString','chmodSync','Warning:\x20','6cHUsmi','dirname','128WZuzUg','mode','Should\x20be\x200600\x20or\x20more\x20restrictive.'];a159_0x551a=function(){return _0x50e3c1;};return a159_0x551a();}export function createSecureDirectory(_0x409404){!a159_0xb1501a['existsSync'](_0x409404)&&(a159_0xb1501a['mkdirSync'](_0x409404,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x409404));}export function validateSecureFilePermissions(_0x4fd8ca){const _0x2109ec=a159_0xd298;try{const _0x44d87f=a159_0xb1501a[_0x2109ec(0x16e)](_0x4fd8ca),_0x1f1b42=_0x44d87f[_0x2109ec(0x165)]&0x1ff,_0x55a14d=(_0x1f1b42&0x3f)!==0x0;if(_0x55a14d)return console[_0x2109ec(0x16d)](_0x2109ec(0x161)+_0x4fd8ca+_0x2109ec(0x15e)+_0x1f1b42[_0x2109ec(0x15f)](0x8)+_0x2109ec(0x169)+_0x2109ec(0x166)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x55a3fb,_0x2f7316){const _0x4d0bec=a159_0xd298,_0x4dd6d4=a159_0x120400[_0x4d0bec(0x163)](_0x55a3fb);createSecureDirectory(_0x4dd6d4),a159_0xb1501a[_0x4d0bec(0x16a)](_0x55a3fb,_0x2f7316,{'mode':0x180}),setSecureFilePermissions(_0x55a3fb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f071b,_0x346ad5){const _0xffe0af=a160_0x12cd,_0x5ca851=_0x1f071b();while(!![]){try{const _0x14035a=-parseInt(_0xffe0af(0x12f))/0x1+parseInt(_0xffe0af(0x131))/0x2*(parseInt(_0xffe0af(0x12c))/0x3)+-parseInt(_0xffe0af(0x134))/0x4+parseInt(_0xffe0af(0x136))/0x5+parseInt(_0xffe0af(0x135))/0x6+parseInt(_0xffe0af(0x137))/0x7+parseInt(_0xffe0af(0x126))/0x8*(-parseInt(_0xffe0af(0x127))/0x9);if(_0x14035a===_0x346ad5)break;else _0x5ca851['push'](_0x5ca851['shift']());}catch(_0x4e399f){_0x5ca851['push'](_0x5ca851['shift']());}}}(a160_0x4afc,0x5120b));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x3cc4a0=a160_0x12cd;return process.env.TDX_CACHE_DIR||join(homedir(),_0x3cc4a0(0x129),_0x3cc4a0(0x139));}const registry=new Map();export function registerGlobalCacheKey(_0x4b9885,_0x48459b){const _0x41eb92=a160_0x12cd,_0x4fe5f8=registry[_0x41eb92(0x13b)](_0x4b9885);if(_0x4fe5f8&&_0x4fe5f8!==_0x48459b)throw new Error(_0x41eb92(0x138)+_0x4b9885+_0x41eb92(0x12e)+_0x4fe5f8+_0x41eb92(0x133)+_0x48459b+'\x22');registry['set'](_0x4b9885,_0x48459b);}export function getGlobalCachePath(_0x5052d1){return join(getGlobalCacheDir(),_0x5052d1);}function ensureGlobalCacheDir(){const _0x128d56=getGlobalCacheDir();!existsSync(_0x128d56)&&mkdirSync(_0x128d56,{'recursive':!![]});}function a160_0x12cd(_0x5e8bbd,_0x5ec151){_0x5e8bbd=_0x5e8bbd-0x126;const _0x4afcf7=a160_0x4afc();let _0x12cd1d=_0x4afcf7[_0x5e8bbd];return _0x12cd1d;}function readCacheJson(_0x31ec98){const _0x510861=a160_0x12cd,_0x16b378=getGlobalCachePath(_0x31ec98);if(!existsSync(_0x16b378))return undefined;try{const _0x280db3=readFileSync(_0x16b378,_0x510861(0x130));return JSON[_0x510861(0x12d)](_0x280db3);}catch{return undefined;}}function writeCacheJson(_0x5343d3,_0x25f22c){const _0x46c7f6=a160_0x12cd;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x5343d3),JSON['stringify'](_0x25f22c,null,0x2),_0x46c7f6(0x130));}function readCacheText(_0x2b3f54){const _0x1f8a88=a160_0x12cd,_0x1c0276=getGlobalCachePath(_0x2b3f54);if(!existsSync(_0x1c0276))return undefined;try{return readFileSync(_0x1c0276,_0x1f8a88(0x130));}catch{return undefined;}}function writeCacheText(_0x2e77ad,_0x2b0dd3){const _0x5a2131=a160_0x12cd;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x2e77ad),_0x2b0dd3,_0x5a2131(0x130));}function clearCache(_0x11560d){const _0x25685e=getGlobalCachePath(_0x11560d);if(existsSync(_0x25685e))try{unlinkSync(_0x25685e);}catch{}}function cacheExists(_0x9b2e84){return existsSync(getGlobalCachePath(_0x9b2e84));}export function createGlobalCache(_0x38470a,_0x6a7e5a){return registerGlobalCacheKey(_0x38470a,_0x6a7e5a),{'read':()=>readCacheJson(_0x38470a),'write':_0x27d959=>writeCacheJson(_0x38470a,_0x27d959),'clear':()=>clearCache(_0x38470a),'exists':()=>cacheExists(_0x38470a),'path':()=>getGlobalCachePath(_0x38470a)};}export function createGlobalTextCache(_0x54db9e,_0x11c4d3){const _0x4d4a96=a160_0x12cd;return registerGlobalCacheKey(_0x54db9e,_0x11c4d3),{'read':()=>readCacheText(_0x54db9e)?.[_0x4d4a96(0x128)]()||undefined,'write':_0x24f4a2=>writeCacheText(_0x54db9e,_0x24f4a2),'clear':()=>clearCache(_0x54db9e),'exists':()=>cacheExists(_0x54db9e),'path':()=>getGlobalCachePath(_0x54db9e)};}export function createProfileCache(_0x5cfa30,_0x29129b){const _0x32602c=_0x28f452=>{const _0x5a1aa8=a160_0x12cd,_0x4a00ec=_0x28f452||_0x5a1aa8(0x12b);return _0x5cfa30[_0x5a1aa8(0x132)](_0x5a1aa8(0x12a),_0x4a00ec);};return{'read':_0x402579=>{const _0xa15227=_0x32602c(_0x402579);return registerGlobalCacheKey(_0xa15227,_0x29129b),readCacheJson(_0xa15227);},'write':(_0x1aec70,_0x44bdd0)=>{const _0x1d297d=_0x32602c(_0x1aec70);registerGlobalCacheKey(_0x1d297d,_0x29129b),writeCacheJson(_0x1d297d,_0x44bdd0);},'clear':_0x516eef=>{const _0x2eb583=_0x32602c(_0x516eef);clearCache(_0x2eb583);},'exists':_0x4e6b5d=>{const _0x59636d=_0x32602c(_0x4e6b5d);return cacheExists(_0x59636d);},'path':_0x94ad59=>{const _0x5b1701=_0x32602c(_0x94ad59);return getGlobalCachePath(_0x5b1701);}};}function a160_0x4afc(){const _0x336af5=['replace','\x22,\x20cannot\x20register\x20for\x20\x22','209636xlPZAM','2946858YNGGUs','1019785jZKTyI','1454845LIXzEb','Global\x20cache\x20key\x20\x22','tdx','clear','get','3664464sWEnqI','9AWwooM','trim','.cache','{profile}','default','288csoExq','parse','\x22\x20already\x20registered\x20by\x20\x22','468361CufPYa','utf-8','8504LQHgTC'];a160_0x4afc=function(){return _0x336af5;};return a160_0x4afc();}export function createOptionalProfileCache(_0x1738d3,_0x2f2bca,_0x3b122d={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x3b122d,_0x211881=_0x2c9844=>{return _0x2c9844?''+_0x1738d3+profileSeparator+_0x2c9844+suffix:''+_0x1738d3+suffix;};return{'read':_0x2a4fa5=>{const _0x49d015=_0x211881(_0x2a4fa5);return registerGlobalCacheKey(_0x49d015,_0x2f2bca),readCacheJson(_0x49d015);},'write':(_0x33d928,_0x8cb96c)=>{const _0xacfdbe=_0x211881(_0x8cb96c);registerGlobalCacheKey(_0xacfdbe,_0x2f2bca),writeCacheJson(_0xacfdbe,_0x33d928);},'clear':_0x393646=>{const _0x3fee51=_0x211881(_0x393646);clearCache(_0x3fee51);},'exists':_0xc2acc5=>{const _0x3f75b3=_0x211881(_0xc2acc5);return cacheExists(_0x3f75b3);},'path':_0x29f6c0=>{const _0x4b199c=_0x211881(_0x29f6c0);return getGlobalCachePath(_0x4b199c);}};}export function clearGlobalRegistry(){const _0x2beb02=a160_0x12cd;registry[_0x2beb02(0x13a)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a161_0x1e40(_0x5c4f4c,_0x2dccee){_0x5c4f4c=_0x5c4f4c-0x107;const _0xc70645=a161_0xc706();let _0x1e4066=_0xc70645[_0x5c4f4c];return _0x1e4066;}function a161_0xc706(){const _0x298576=['7lnBQKp','INVALID_ARGUMENT','9652488nfRJyr','18096750JarhnP','128316iSxtwH','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','parse','code','File\x20not\x20found:\x20','376914gxtmVZ','Invalid\x20JSON\x20string:\x20','212058vaGgRq','PERMISSION_DENIED','message','Invalid\x20JSON\x20in\x20file\x20\x27','2026656wMxspe','utf-8','ENOENT','\x27:\x20','115GIArZC','209260EtpkSI','NOT_FOUND'];a161_0xc706=function(){return _0x298576;};return a161_0xc706();}(function(_0x36617c,_0x2a4a88){const _0x1bec3c=a161_0x1e40,_0x57fcb4=_0x36617c();while(!![]){try{const _0x4b6c39=parseInt(_0x1bec3c(0x10e))/0x1+parseInt(_0x1bec3c(0x113))/0x2+parseInt(_0x1bec3c(0x119))/0x3+-parseInt(_0x1bec3c(0x108))/0x4*(parseInt(_0x1bec3c(0x107))/0x5)+parseInt(_0x1bec3c(0x115))/0x6+parseInt(_0x1bec3c(0x10a))/0x7*(-parseInt(_0x1bec3c(0x10c))/0x8)+parseInt(_0x1bec3c(0x10d))/0x9;if(_0x4b6c39===_0x2a4a88)break;else _0x57fcb4['push'](_0x57fcb4['shift']());}catch(_0x393552){_0x57fcb4['push'](_0x57fcb4['shift']());}}}(a161_0xc706,0x99784));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x3f490c,_0x31f860){const _0x542858=a161_0x1e40;try{if(_0x31f860){const _0x4ec95a=await readFile(_0x3f490c,_0x542858(0x11a));try{return JSON[_0x542858(0x110)](_0x4ec95a);}catch(_0x3cd0d0){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x542858(0x118)+_0x3f490c+_0x542858(0x11c)+(_0x3cd0d0 instanceof Error?_0x3cd0d0[_0x542858(0x117)]:String(_0x3cd0d0)));}}else try{return JSON[_0x542858(0x110)](_0x3f490c);}catch(_0x5b4609){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x542858(0x114)+(_0x5b4609 instanceof Error?_0x5b4609['message']:String(_0x5b4609)));}}catch(_0x5653e1){if(_0x5653e1 instanceof SDKError)throw _0x5653e1;if(_0x5653e1 instanceof Error&&_0x542858(0x111)in _0x5653e1){const _0x29e2c4=_0x5653e1;if(_0x29e2c4[_0x542858(0x111)]===_0x542858(0x11b))throw new SDKError(ErrorCode[_0x542858(0x109)],_0x542858(0x112)+_0x3f490c);else{if(_0x29e2c4[_0x542858(0x111)]==='EACCES')throw new SDKError(ErrorCode[_0x542858(0x116)],'Permission\x20denied\x20reading\x20file:\x20'+_0x3f490c);}}throw new SDKError(ErrorCode['INTERNAL'],'Failed\x20to\x20load\x20JSON:\x20'+(_0x5653e1 instanceof Error?_0x5653e1[_0x542858(0x117)]:String(_0x5653e1)));}}export async function loadJSONFromOptions(_0x2c8d07,_0x27e5a8){const _0x1f4808=a161_0x1e40;if(_0x2c8d07&&_0x27e5a8)throw new SDKError(ErrorCode[_0x1f4808(0x10b)],_0x1f4808(0x10f));if(_0x2c8d07)return await loadJSON(_0x2c8d07,![]);if(_0x27e5a8)return await loadJSON(_0x27e5a8,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a162_0x1e1d4a=a162_0x1f79;(function(_0x50c0a9,_0xa4bbbd){const _0x38acaa=a162_0x1f79,_0x19e807=_0x50c0a9();while(!![]){try{const _0x373df9=-parseInt(_0x38acaa(0x1cd))/0x1+parseInt(_0x38acaa(0x1c9))/0x2*(parseInt(_0x38acaa(0x1bd))/0x3)+-parseInt(_0x38acaa(0x1ba))/0x4+parseInt(_0x38acaa(0x1bb))/0x5*(-parseInt(_0x38acaa(0x1ca))/0x6)+parseInt(_0x38acaa(0x1c6))/0x7+-parseInt(_0x38acaa(0x1c8))/0x8+parseInt(_0x38acaa(0x1bf))/0x9;if(_0x373df9===_0xa4bbbd)break;else _0x19e807['push'](_0x19e807['shift']());}catch(_0xd3e2d0){_0x19e807['push'](_0x19e807['shift']());}}}(a162_0xb766,0xc76e6));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join,parse}from'path';import{homedir}from'os';const LOCAL_CACHE_DIR=a162_0x1e1d4a(0x1cb),registry=new Map();export function registerCacheKey(_0x375efe,_0x20f48f){const _0x541ecd=a162_0x1e1d4a,_0x5240f4=registry[_0x541ecd(0x1bc)](_0x375efe);if(_0x5240f4&&_0x5240f4!==_0x20f48f)throw new Error('Cache\x20key\x20\x22'+_0x375efe+_0x541ecd(0x1c5)+_0x5240f4+_0x541ecd(0x1c3)+_0x20f48f+'\x22');registry[_0x541ecd(0x1c2)](_0x375efe,_0x20f48f);}export function getCacheDir(){const _0x1c7ec2=a162_0x1e1d4a,_0x40ad82=process[_0x1c7ec2(0x1c1)](),_0x35a20a=_0x40ad82===parse(_0x40ad82)[_0x1c7ec2(0x1c7)]?homedir():_0x40ad82;return join(_0x35a20a,LOCAL_CACHE_DIR);}export function getCachePath(_0x529010){return join(getCacheDir(),_0x529010);}function ensureCacheDir(){const _0x44db03=getCacheDir();!existsSync(_0x44db03)&&mkdirSync(_0x44db03,{'recursive':!![]});}function readCacheJson(_0x2e9510){const _0x1adc12=a162_0x1e1d4a,_0x5d0465=getCachePath(_0x2e9510);if(!existsSync(_0x5d0465))return undefined;try{const _0x32c15d=readFileSync(_0x5d0465,_0x1adc12(0x1c4));return JSON[_0x1adc12(0x1cc)](_0x32c15d);}catch{return undefined;}}function writeCacheJson(_0x112ef8,_0x141b6d){const _0x21fea2=a162_0x1e1d4a;ensureCacheDir(),writeFileSync(getCachePath(_0x112ef8),JSON[_0x21fea2(0x1be)](_0x141b6d,null,0x2),_0x21fea2(0x1c4));}function a162_0xb766(){const _0x43c840=['stringify','29100978uilXFL','clear','cwd','set','\x22,\x20cannot\x20register\x20for\x20\x22','utf-8','\x22\x20already\x20registered\x20by\x20\x22','9717659qIYWTx','root','12836808xJZbmz','4PaazYM','16098XVCApM','.cache/tdx','parse','843418sJvPvZ','843448Xzxujp','2660dIWsJt','get','422142OxMNLX'];a162_0xb766=function(){return _0x43c840;};return a162_0xb766();}function readCacheText(_0x29cc1e){const _0x1f0a81=a162_0x1e1d4a,_0x599975=getCachePath(_0x29cc1e);if(!existsSync(_0x599975))return undefined;try{return readFileSync(_0x599975,_0x1f0a81(0x1c4));}catch{return undefined;}}function writeCacheText(_0xebdaba,_0xe963e7){const _0x3e448c=a162_0x1e1d4a;ensureCacheDir(),writeFileSync(getCachePath(_0xebdaba),_0xe963e7,_0x3e448c(0x1c4));}function a162_0x1f79(_0x522b17,_0x594039){_0x522b17=_0x522b17-0x1ba;const _0xb766ad=a162_0xb766();let _0x1f797f=_0xb766ad[_0x522b17];return _0x1f797f;}function clearCache(_0xba32a0){const _0x553e35=getCachePath(_0xba32a0);if(existsSync(_0x553e35))try{unlinkSync(_0x553e35);}catch{}}function cacheExists(_0x480be3){return existsSync(getCachePath(_0x480be3));}export function createCache(_0x2fc04f,_0xcc0088){return registerCacheKey(_0x2fc04f,_0xcc0088),{'read':()=>readCacheJson(_0x2fc04f),'write':_0x147764=>writeCacheJson(_0x2fc04f,_0x147764),'clear':()=>clearCache(_0x2fc04f),'exists':()=>cacheExists(_0x2fc04f),'path':()=>getCachePath(_0x2fc04f)};}export function createTextCache(_0x21a677,_0x46a1fa){return registerCacheKey(_0x21a677,_0x46a1fa),{'read':()=>readCacheText(_0x21a677)?.['trim']()||undefined,'write':_0x49d1c6=>writeCacheText(_0x21a677,_0x49d1c6),'clear':()=>clearCache(_0x21a677),'exists':()=>cacheExists(_0x21a677),'path':()=>getCachePath(_0x21a677)};}export function clearRegistry(){const _0x34f1e0=a162_0x1e1d4a;registry[_0x34f1e0(0x1c0)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x11c1cb=a163_0x222a;(function(_0x2ceb47,_0x124e9a){const _0x55a26c=a163_0x222a,_0x2e9dd6=_0x2ceb47();while(!![]){try{const _0x5987cf=-parseInt(_0x55a26c(0x162))/0x1+-parseInt(_0x55a26c(0x15e))/0x2*(-parseInt(_0x55a26c(0x164))/0x3)+-parseInt(_0x55a26c(0x14f))/0x4*(-parseInt(_0x55a26c(0x152))/0x5)+parseInt(_0x55a26c(0x153))/0x6*(-parseInt(_0x55a26c(0x165))/0x7)+-parseInt(_0x55a26c(0x15c))/0x8*(parseInt(_0x55a26c(0x158))/0x9)+parseInt(_0x55a26c(0x161))/0xa+parseInt(_0x55a26c(0x169))/0xb*(parseInt(_0x55a26c(0x167))/0xc);if(_0x5987cf===_0x124e9a)break;else _0x2e9dd6['push'](_0x2e9dd6['shift']());}catch(_0x46cd7b){_0x2e9dd6['push'](_0x2e9dd6['shift']());}}}(a163_0x1dfc,0x47331));import a163_0x3bda2b from'chalk';function a163_0x222a(_0x793649,_0x599c16){_0x793649=_0x793649-0x14b;const _0x1dfc21=a163_0x1dfc();let _0x222a05=_0x1dfc21[_0x793649];return _0x222a05;}function a163_0x1dfc(){const _0x40bdb8=['component','INFO','8gGAQcZ','green','22BFXFOb','gray','colors','2973390LcDXMy','548134xgqPkV','red','128559fRqocf','35hhLwDb','format','12ecTAjB','ERROR','6874461AdxDZu','chalk','DEBUG','timestamp','TRACE','2744KNCViQ','colorLevel',']\x20[','920VGLBar','694758aOzGEa','message','level','dim','cyan','910485PclKxl','Chalk'];a163_0x1dfc=function(){return _0x40bdb8;};return a163_0x1dfc();}import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';const chalkModule=a163_0x3bda2b,ChalkClass=chalkModule[a163_0x11c1cb(0x159)]||chalkModule['default']?.[a163_0x11c1cb(0x159)];export class DefaultLogFormatter{[a163_0x11c1cb(0x160)];['chalk'];constructor(_0x4636f2={}){const _0x22525b=a163_0x11c1cb;this[_0x22525b(0x160)]=_0x4636f2['colors']??![],this[_0x22525b(0x14b)]=_0x4636f2['colors']&&ChalkClass?new ChalkClass({'level':0x3}):a163_0x3bda2b;}[a163_0x11c1cb(0x166)](_0x4b9c1f){const _0x251471=a163_0x11c1cb,_0x10135d=formatTimestamp(_0x4b9c1f[_0x251471(0x14d)]),_0x443d89=logLevelToString(_0x4b9c1f[_0x251471(0x155)]);if(!this[_0x251471(0x160)])return _0x10135d+'\x20['+_0x443d89+_0x251471(0x151)+_0x4b9c1f['component']+']\x20'+_0x4b9c1f[_0x251471(0x154)];const _0x4314b8=this['chalk'][_0x251471(0x156)](_0x10135d),_0x3121a5=this[_0x251471(0x150)](_0x443d89,_0x4b9c1f['level']),_0x27a97c=this[_0x251471(0x14b)]['blue']('['+_0x4b9c1f[_0x251471(0x15a)]+']');return _0x4314b8+'\x20'+_0x3121a5+'\x20'+_0x27a97c+'\x20'+_0x4b9c1f['message'];}[a163_0x11c1cb(0x150)](_0x11eeb1,_0x1f063a){const _0x45461e=a163_0x11c1cb;switch(_0x1f063a){case LogLevel[_0x45461e(0x14e)]:return this['chalk'][_0x45461e(0x15f)]('['+_0x11eeb1+']');case LogLevel[_0x45461e(0x14c)]:return this[_0x45461e(0x14b)][_0x45461e(0x15d)]('['+_0x11eeb1+']');case LogLevel[_0x45461e(0x15b)]:return this[_0x45461e(0x14b)][_0x45461e(0x157)]('['+_0x11eeb1+']');case LogLevel['WARN']:return this[_0x45461e(0x14b)]['yellow']('['+_0x11eeb1+']');case LogLevel[_0x45461e(0x168)]:return this[_0x45461e(0x14b)][_0x45461e(0x163)]('['+_0x11eeb1+']');default:return'['+_0x11eeb1+']';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a164_0x49e6(){var _0x55653b=['16402668EzXrQI','4aAVsJf','1289919YRUJjv','390706dzocFC','33utIMub','7MxNUPH','648130PPbLND','1126638UEcMsz','5791272QywADa','4976935oPfceX','18GIEIsO','63IiwFlZ'];a164_0x49e6=function(){return _0x55653b;};return a164_0x49e6();}(function(_0x1d2078,_0x254cba){var _0x3351b5=a164_0x2eb3,_0x408987=_0x1d2078();while(!![]){try{var _0x5dff37=-parseInt(_0x3351b5(0x1b2))/0x1+-parseInt(_0x3351b5(0x1b3))/0x2*(parseInt(_0x3351b5(0x1ae))/0x3)+-parseInt(_0x3351b5(0x1b1))/0x4*(parseInt(_0x3351b5(0x1ad))/0x5)+-parseInt(_0x3351b5(0x1b7))/0x6+parseInt(_0x3351b5(0x1b5))/0x7*(parseInt(_0x3351b5(0x1b8))/0x8)+parseInt(_0x3351b5(0x1af))/0x9*(-parseInt(_0x3351b5(0x1b6))/0xa)+parseInt(_0x3351b5(0x1b4))/0xb*(parseInt(_0x3351b5(0x1b0))/0xc);if(_0x5dff37===_0x254cba)break;else _0x408987['push'](_0x408987['shift']());}catch(_0xdf2c57){_0x408987['push'](_0x408987['shift']());}}}(a164_0x49e6,0xb12b8));function a164_0x2eb3(_0x4e8381,_0x561458){_0x4e8381=_0x4e8381-0x1ad;var _0x49e61b=a164_0x49e6();var _0x2eb3d6=_0x49e61b[_0x4e8381];return _0x2eb3d6;}export{DefaultLogFormatter}from'./default-formatter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x371d81=a165_0x149e;function a165_0x168d(){const _0x1653a1=['useStderr','log','844248CyzMXH','406220jrxPGc','21ZemvoF','72zQrwAd','level','6qIOFFp','65294tiAoUM','193412uaQVlA','223035NgVyAX','formatter','838992wjUZtg','handle','314993xPtnPi','WARN','error','minLevel'];a165_0x168d=function(){return _0x1653a1;};return a165_0x168d();}(function(_0x1a7fa6,_0x50108b){const _0x1efc59=a165_0x149e,_0x35bf1d=_0x1a7fa6();while(!![]){try{const _0x504b16=-parseInt(_0x1efc59(0x1d7))/0x1+-parseInt(_0x1efc59(0x1d6))/0x2*(-parseInt(_0x1efc59(0x1d2))/0x3)+parseInt(_0x1efc59(0x1d0))/0x4+parseInt(_0x1efc59(0x1d8))/0x5+parseInt(_0x1efc59(0x1d5))/0x6*(parseInt(_0x1efc59(0x1dc))/0x7)+parseInt(_0x1efc59(0x1da))/0x8+parseInt(_0x1efc59(0x1d3))/0x9*(-parseInt(_0x1efc59(0x1d1))/0xa);if(_0x504b16===_0x50108b)break;else _0x35bf1d['push'](_0x35bf1d['shift']());}catch(_0x56f303){_0x35bf1d['push'](_0x35bf1d['shift']());}}}(a165_0x168d,0x1c3e3));import{LogLevel as a165_0x74d28d}from'../types.js';import{DefaultLogFormatter}from'../formatters/index.js';function a165_0x149e(_0x2cf3ca,_0x447a09){_0x2cf3ca=_0x2cf3ca-0x1d0;const _0x168d70=a165_0x168d();let _0x149edf=_0x168d70[_0x2cf3ca];return _0x149edf;}export class ConsoleHandler{[a165_0x371d81(0x1df)];[a165_0x371d81(0x1e0)];[a165_0x371d81(0x1d9)];constructor(_0x4c00d9={}){const _0x189b40=a165_0x371d81;this[_0x189b40(0x1df)]=_0x4c00d9[_0x189b40(0x1df)]??a165_0x74d28d[_0x189b40(0x1dd)],this[_0x189b40(0x1e0)]=_0x4c00d9['useStderr']??!![],this[_0x189b40(0x1d9)]=new DefaultLogFormatter({'colors':_0x4c00d9['colors']??!![]});}[a165_0x371d81(0x1db)](_0x358e19){const _0x5ac7fa=a165_0x371d81;if(_0x358e19[_0x5ac7fa(0x1d4)]<this[_0x5ac7fa(0x1df)])return;const _0x4f9400=this['formatter']['format'](_0x358e19);this[_0x5ac7fa(0x1e0)]&&_0x358e19['level']>=a165_0x74d28d[_0x5ac7fa(0x1dd)]?console[_0x5ac7fa(0x1de)](_0x4f9400):console[_0x5ac7fa(0x1e1)](_0x4f9400);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0x297d32=a166_0x2b24;(function(_0x755e94,_0x131422){const _0x3666b5=a166_0x2b24,_0x468548=_0x755e94();while(!![]){try{const _0x4916e7=-parseInt(_0x3666b5(0x1d1))/0x1+parseInt(_0x3666b5(0x1db))/0x2+-parseInt(_0x3666b5(0x1e7))/0x3*(parseInt(_0x3666b5(0x1da))/0x4)+parseInt(_0x3666b5(0x1d2))/0x5*(parseInt(_0x3666b5(0x1d0))/0x6)+-parseInt(_0x3666b5(0x1c7))/0x7*(-parseInt(_0x3666b5(0x1e6))/0x8)+-parseInt(_0x3666b5(0x1c6))/0x9*(-parseInt(_0x3666b5(0x1c5))/0xa)+-parseInt(_0x3666b5(0x1d5))/0xb;if(_0x4916e7===_0x131422)break;else _0x468548['push'](_0x468548['shift']());}catch(_0x531bcd){_0x468548['push'](_0x468548['shift']());}}}(a166_0x315a,0xc9b73));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join,dirname,basename}from'path';function a166_0x315a(){const _0x4035ae=['includes','2838476FZOslX','2456966UZUDGJ','mtime','error','rotate','logBaseName','toISOString','Warning:\x20Error\x20writing\x20to\x20','Warning:\x20Failed\x20to\x20compress\x20','message','split','logDir','184Twglmw','3HMaJtJ','logPath','10zoOOTn','7759179ROFUQJ','149653GIWcaE','test','logFileName','rotateOldLogs','logStream','replace','close','filter','\x5c$&','24PZlDWE','399481pZzxBC','636340JxcKtI','tdx.log','logs','12716836kkZLVc','getLogPath','end','write'];a166_0x315a=function(){return _0x4035ae;};return a166_0x315a();}function a166_0x2b24(_0x45ccbb,_0x4a912d){_0x45ccbb=_0x45ccbb-0x1c5;const _0x315aa6=a166_0x315a();let _0x2b24a1=_0x315aa6[_0x45ccbb];return _0x2b24a1;}import{createGzip}from'zlib';import{pipeline}from'stream/promises';import{Logger}from'../logger.js';import{getGlobalCacheDir}from'../../global-cache.js';export class FileHandler{['logPath'];['logDir'];['logFileName'];[a166_0x297d32(0x1df)];['logStream']=null;[a166_0x297d32(0x1de)];constructor(_0x128315={}){const _0xb159f2=a166_0x297d32;this[_0xb159f2(0x1e8)]=_0x128315['filePath']??join(getGlobalCacheDir(),_0xb159f2(0x1d4),_0xb159f2(0x1d3)),this[_0xb159f2(0x1e5)]=dirname(this['logPath']),this[_0xb159f2(0x1c9)]=basename(this[_0xb159f2(0x1e8)]),this[_0xb159f2(0x1df)]=this[_0xb159f2(0x1c9)][_0xb159f2(0x1cc)](/\.log$/,''),this['rotate']=_0x128315[_0xb159f2(0x1de)]??!![];}async['init'](){const _0x41910a=a166_0x297d32;try{await mkdir(this[_0x41910a(0x1e5)],{'recursive':!![]}),this[_0x41910a(0x1de)]&&await this[_0x41910a(0x1ca)](),this['logStream']=createWriteStream(this[_0x41910a(0x1e8)],{'flags':'a'}),this[_0x41910a(0x1cb)]['on']('error',_0x333126=>{const _0x4d5207=_0x41910a;console['error'](_0x4d5207(0x1e1)+this[_0x4d5207(0x1c9)]+':',_0x333126[_0x4d5207(0x1e3)]);});}catch(_0x3779b4){console[_0x41910a(0x1dd)]('Warning:\x20Failed\x20to\x20initialize\x20log\x20file:',_0x3779b4);}}['handle'](_0x1bbc0b){const _0x46f4b0=a166_0x297d32;if(!this[_0x46f4b0(0x1cb)])return;const _0x42b0cb=Logger['format'](_0x1bbc0b);this[_0x46f4b0(0x1cb)][_0x46f4b0(0x1d8)](_0x42b0cb+'\x0a');}async[a166_0x297d32(0x1cd)](){return new Promise(_0x12b243=>{const _0x35ee94=a166_0x2b24;this['logStream']?this['logStream'][_0x35ee94(0x1d7)](()=>{const _0x39bb72=_0x35ee94;this[_0x39bb72(0x1cb)]=null,_0x12b243();}):_0x12b243();});}[a166_0x297d32(0x1d6)](){const _0x34a5d8=a166_0x297d32;return this[_0x34a5d8(0x1e8)];}async['rotateOldLogs'](){const _0x19807b=a166_0x297d32;try{const _0x12c571=await readdir(this[_0x19807b(0x1e5)]),_0x49f44f=new Date()[_0x19807b(0x1e0)]()[_0x19807b(0x1e4)]('T')[0x0];if(_0x12c571[_0x19807b(0x1d9)](this[_0x19807b(0x1c9)])){const _0x4d890a=join(this[_0x19807b(0x1e5)],this[_0x19807b(0x1c9)]),_0x3edc8b=await stat(_0x4d890a),_0x4e6f65=new Date(_0x3edc8b[_0x19807b(0x1dc)])[_0x19807b(0x1e0)]()['split']('T')[0x0];if(_0x4e6f65<_0x49f44f){const _0x56ad1a=join(this[_0x19807b(0x1e5)],this[_0x19807b(0x1df)]+'-'+_0x4e6f65+'.log');await rename(_0x4d890a,_0x56ad1a);}}const _0x32bbc9=await readdir(this[_0x19807b(0x1e5)]),_0x56bb5a=this[_0x19807b(0x1df)][_0x19807b(0x1cc)](/[.*+?^${}()|[\]\\]/g,_0x19807b(0x1cf)),_0x2c4c49=new RegExp('^'+_0x56bb5a+'-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$'),_0x3a6c82=_0x32bbc9[_0x19807b(0x1ce)](_0x555a76=>_0x2c4c49[_0x19807b(0x1c8)](_0x555a76));for(const _0x28e0f2 of _0x3a6c82){const _0x1d6650=join(this['logDir'],_0x28e0f2),_0xf720cf=join(this[_0x19807b(0x1e5)],_0x28e0f2+'.gz');try{await pipeline(createReadStream(_0x1d6650),createGzip(),createWriteStream(_0xf720cf)),await unlink(_0x1d6650);}catch(_0x18eb67){console[_0x19807b(0x1dd)](_0x19807b(0x1e2)+_0x28e0f2+':',_0x18eb67);}}}catch{}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ec9f0,_0x1a3401){var _0x16385c=a167_0x1b10,_0x5bec4e=_0x2ec9f0();while(!![]){try{var _0x3f9a87=parseInt(_0x16385c(0x87))/0x1*(parseInt(_0x16385c(0x84))/0x2)+parseInt(_0x16385c(0x81))/0x3*(parseInt(_0x16385c(0x89))/0x4)+-parseInt(_0x16385c(0x82))/0x5*(-parseInt(_0x16385c(0x88))/0x6)+-parseInt(_0x16385c(0x83))/0x7+parseInt(_0x16385c(0x86))/0x8+parseInt(_0x16385c(0x8a))/0x9*(-parseInt(_0x16385c(0x85))/0xa)+parseInt(_0x16385c(0x8b))/0xb*(parseInt(_0x16385c(0x8c))/0xc);if(_0x3f9a87===_0x1a3401)break;else _0x5bec4e['push'](_0x5bec4e['shift']());}catch(_0x3ede60){_0x5bec4e['push'](_0x5bec4e['shift']());}}}(a167_0x34dc,0x734f1));export{FileHandler}from'./file-handler.js';function a167_0x34dc(){var _0x395915=['3681902hmyPme','2ZKbxLJ','160tiNKQS','5969128IZMwDb','470314ZBfUnr','6tYskJo','542844rGWPny','327384tMpwop','44KLxvob','12924incnMC','3VNSwAb','1119165Avvrcr'];a167_0x34dc=function(){return _0x395915;};return a167_0x34dc();}export{ConsoleHandler}from'./console-handler.js';function a167_0x1b10(_0x18557b,_0xeec9f2){_0x18557b=_0x18557b-0x81;var _0x34dcba=a167_0x34dc();var _0x1b10bb=_0x34dcba[_0x18557b];return _0x1b10bb;}export{NullHandler}from'./null-handler.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a168_0x593883=a168_0x1fb3;(function(_0x55d986,_0x5687da){var _0x10ff3b=a168_0x1fb3,_0x3c8e9c=_0x55d986();while(!![]){try{var _0x229e5c=parseInt(_0x10ff3b(0xcd))/0x1*(-parseInt(_0x10ff3b(0xd4))/0x2)+parseInt(_0x10ff3b(0xd3))/0x3+parseInt(_0x10ff3b(0xcf))/0x4*(-parseInt(_0x10ff3b(0xd5))/0x5)+parseInt(_0x10ff3b(0xca))/0x6+-parseInt(_0x10ff3b(0xd2))/0x7+parseInt(_0x10ff3b(0xcb))/0x8*(parseInt(_0x10ff3b(0xd1))/0x9)+parseInt(_0x10ff3b(0xd0))/0xa*(parseInt(_0x10ff3b(0xcc))/0xb);if(_0x229e5c===_0x5687da)break;else _0x3c8e9c['push'](_0x3c8e9c['shift']());}catch(_0x2d41a){_0x3c8e9c['push'](_0x3c8e9c['shift']());}}}(a168_0x5879,0x1fa85));export class NullHandler{[a168_0x593883(0xce)](_0x3e04c8){}}function a168_0x1fb3(_0x34af60,_0x201798){_0x34af60=_0x34af60-0xca;var _0x587994=a168_0x5879();var _0x1fb38a=_0x587994[_0x34af60];return _0x1fb38a;}function a168_0x5879(){var _0x3f3b8c=['971010PQkzmJ','45gRPXfr','1048040mnbPQA','99150jHLxJW','72SnDceM','95kHBJHu','157122QMOcDb','350312VGtjAm','44pOiRMT','4790kLzYAJ','handle','45212nvSzPi'];a168_0x5879=function(){return _0x3f3b8c;};return a168_0x5879();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x133d0d,_0x5564be){var _0x43da5d=a169_0x4664,_0x36686c=_0x133d0d();while(!![]){try{var _0x40e409=parseInt(_0x43da5d(0xc3))/0x1*(-parseInt(_0x43da5d(0xc8))/0x2)+-parseInt(_0x43da5d(0xc6))/0x3+parseInt(_0x43da5d(0xcb))/0x4*(-parseInt(_0x43da5d(0xc7))/0x5)+-parseInt(_0x43da5d(0xc2))/0x6*(parseInt(_0x43da5d(0xc5))/0x7)+parseInt(_0x43da5d(0xca))/0x8*(parseInt(_0x43da5d(0xc4))/0x9)+-parseInt(_0x43da5d(0xc9))/0xa*(parseInt(_0x43da5d(0xcd))/0xb)+-parseInt(_0x43da5d(0xc1))/0xc*(-parseInt(_0x43da5d(0xcc))/0xd);if(_0x40e409===_0x5564be)break;else _0x36686c['push'](_0x36686c['shift']());}catch(_0x508ba1){_0x36686c['push'](_0x36686c['shift']());}}}(a169_0x4eed,0xaa0fa));function a169_0x4664(_0x334b06,_0x31fab9){_0x334b06=_0x334b06-0xc1;var _0x4eed9a=a169_0x4eed();var _0x4664d7=_0x4eed9a[_0x334b06];return _0x4664d7;}export{Logger}from'./logger.js';export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';function a169_0x4eed(){var _0x47305c=['8679yMFNYB','1608LDubcT','6wLeNTr','17553BbQnZa','15570OirRLG','9539215XHxiWM','4131900ZsByyD','35VybEPZ','134rlrrta','3930QlliDb','4104JEhLnO','167092oLhUBP','419848HRXHpV'];a169_0x4eed=function(){return _0x47305c;};return a169_0x4eed();}export{DefaultLogFormatter}from'./formatters/index.js';
|