@treasuredata/tdx 2026.8.2 → 2026.8.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/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-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/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/auth-token.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +9 -3
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.d.ts +10 -0
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.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/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.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 a225_0x285963=a225_0x454d;(function(_0xba67fc,_0x2b870c){const _0x536786=a225_0x454d,_0x3f3fe4=_0xba67fc();while(!![]){try{const _0x5359a5=parseInt(_0x536786(0x110))/0x1+-parseInt(_0x536786(0x155))/0x2*(parseInt(_0x536786(0xfa))/0x3)+parseInt(_0x536786(0x13c))/0x4+-parseInt(_0x536786(0x129))/0x5+-parseInt(_0x536786(0x137))/0x6+-parseInt(_0x536786(0x102))/0x7+-parseInt(_0x536786(0x131))/0x8*(-parseInt(_0x536786(0xf6))/0x9);if(_0x5359a5===_0x2b870c)break;else _0x3f3fe4['push'](_0x3f3fe4['shift']());}catch(_0x4c7e26){_0x3f3fe4['push'](_0x3f3fe4['shift']());}}}(a225_0x1ace,0x73cb8));export const fixtures={'database':{'basic':{'name':a225_0x285963(0x107),'count':0x5,'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x13f),'permission':'administrator'},'withTables':{'name':a225_0x285963(0xf7),'count':0x64,'created_at':'2023-06-15T10:30:00Z','updated_at':'2024-01-15T08:00:00Z','permission':'full_access'}},'table':{'basic':{'id':0x3039,'name':'users','type':a225_0x285963(0x11f),'schema':JSON[a225_0x285963(0x156)]([['id',a225_0x285963(0x12e)],[a225_0x285963(0x13d),a225_0x285963(0x128)],[a225_0x285963(0x14b),a225_0x285963(0x12e)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x13f)},'events':{'id':0x303a,'name':a225_0x285963(0x10c),'type':a225_0x285963(0x11f),'schema':JSON[a225_0x285963(0x156)]([[a225_0x285963(0x134),a225_0x285963(0x12e)],[a225_0x285963(0x13d),a225_0x285963(0x128)],[a225_0x285963(0x11c),a225_0x285963(0x12e)],[a225_0x285963(0x101),a225_0x285963(0x12e)],[a225_0x285963(0x133),a225_0x285963(0x115)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a225_0x285963(0x13f),'updated_at':'2024-01-15T12:00:00Z'}},'parentSegment':{'basic':{'id':a225_0x285963(0x151),'name':a225_0x285963(0x160),'description':a225_0x285963(0x111),'status':a225_0x285963(0x132),'master_table':{'database':a225_0x285963(0x120),'table':'unified_customers'},'attributes':[{'name':a225_0x285963(0xfb),'type':a225_0x285963(0x12e),'key':!![]},{'name':a225_0x285963(0x154),'type':a225_0x285963(0x12e)},{'name':a225_0x285963(0xf8),'type':a225_0x285963(0x15a)}],'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x112)},'withBehaviors':{'id':a225_0x285963(0x12f),'name':a225_0x285963(0x113),'description':'Parent\x20segment\x20with\x20behavioral\x20data','status':a225_0x285963(0x132),'master_table':{'database':'cdp_db','table':a225_0x285963(0x106)},'behaviors':[{'name':a225_0x285963(0x14c),'table':{'database':a225_0x285963(0x158),'table':a225_0x285963(0x14c)},'join_key':'customer_id'},{'name':a225_0x285963(0x12a),'table':{'database':'events_db','table':a225_0x285963(0x150)},'join_key':a225_0x285963(0xfb)}],'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x112)}},'segment':{'basic':{'id':a225_0x285963(0x15d),'name':a225_0x285963(0xf5),'description':a225_0x285963(0xfc),'parent_segment_id':a225_0x285963(0x151),'status':a225_0x285963(0x132),'rules':[{'type':'attribute','field':'last_login','operator':a225_0x285963(0x14d),'value':a225_0x285963(0x125)}],'count':0x1388,'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x112)},'withMultipleRules':{'id':a225_0x285963(0x10a),'name':a225_0x285963(0x15b),'description':'Active\x20users\x20with\x20high\x20lifetime\x20value','parent_segment_id':a225_0x285963(0x151),'status':a225_0x285963(0x132),'rules':[{'type':a225_0x285963(0x159),'field':a225_0x285963(0x109),'operator':'TimeWithinPast','value':a225_0x285963(0x125)},{'type':a225_0x285963(0x159),'field':a225_0x285963(0x12c),'operator':a225_0x285963(0x15e),'value':0x3e8}],'count':0x5dc,'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x112)}},'journey':{'basic':{'id':a225_0x285963(0x116),'name':'Welcome\x20Journey','description':a225_0x285963(0x15f),'status':a225_0x285963(0xf4),'version':0x1,'steps':[{'id':'step-1','type':a225_0x285963(0x114),'duration':'1d'},{'id':'step-2','type':a225_0x285963(0x10e),'activation_id':a225_0x285963(0x11d)}],'created_at':a225_0x285963(0x13f),'updated_at':a225_0x285963(0x112)},'withDecision':{'id':a225_0x285963(0x104),'name':'Purchase\x20Reminder','description':a225_0x285963(0x11b),'status':a225_0x285963(0x132),'version':0x2,'steps':[{'id':'step-1','type':'decision_point','segment_id':a225_0x285963(0x15d),'yes_path':a225_0x285963(0x146),'no_path':'step-3'},{'id':a225_0x285963(0x146),'type':'activation','activation_id':'act-email'},{'id':'step-3','type':a225_0x285963(0x142)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a225_0x285963(0x112)}},'queryResult':{'basic':{'schema':[{'name':'id','type':a225_0x285963(0x135)},{'name':a225_0x285963(0x14b),'type':'varchar'},{'name':a225_0x285963(0x126),'type':a225_0x285963(0x123)}],'data':[[a225_0x285963(0x108),'Alice',0x64],[a225_0x285963(0x11a),a225_0x285963(0x145),0xc8],['user-3',a225_0x285963(0x117),0x96]]},'empty':{'schema':[{'name':'id','type':a225_0x285963(0x135)},{'name':a225_0x285963(0x14b),'type':a225_0x285963(0x135)}],'data':[]},'singleRow':{'schema':[{'name':'total','type':a225_0x285963(0x123)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a225_0x285963(0x144),'email':a225_0x285963(0x12b),'created_at':a225_0x285963(0x13f),'updated_at':'2024-01-15T00:00:00Z','administrator':![]},'admin':{'id':0x1,'name':'Admin\x20User','email':a225_0x285963(0xff),'created_at':'2023-01-01T00:00:00Z','updated_at':a225_0x285963(0x112),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a225_0x285963(0x143),'database':a225_0x285963(0x107),'status':a225_0x285963(0xf2),'query':a225_0x285963(0x139),'start_at':a225_0x285963(0x149),'end_at':a225_0x285963(0x13e),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':'presto','database':a225_0x285963(0x107),'status':a225_0x285963(0x130),'query':a225_0x285963(0xfe),'start_at':a225_0x285963(0x153),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':'presto','database':'test_db','status':'error','query':'SELECT\x20*\x20FROM\x20nonexistent_table','start_at':a225_0x285963(0x14e),'end_at':a225_0x285963(0x157),'duration':0x1,'result_size':null,'error':a225_0x285963(0x14a)}},'workflow':{'basic':{'id':a225_0x285963(0x122),'name':a225_0x285963(0x138),'project':'data_pipeline','revision':'abc123','timezone':a225_0x285963(0x141),'schedule':{'cron':a225_0x285963(0x100)}},'withSessions':{'id':a225_0x285963(0x13b),'name':a225_0x285963(0x103),'project':a225_0x285963(0xfd),'revision':'def456','timezone':a225_0x285963(0x10d),'schedule':{'cron':a225_0x285963(0x11e)},'last_session':{'id':a225_0x285963(0x124),'status':'success','started_at':a225_0x285963(0x119),'finished_at':a225_0x285963(0x136)}}},'apiError':{'unauthorized':{'errors':{'error':a225_0x285963(0x140),'message':a225_0x285963(0x140),'severity':a225_0x285963(0x14f),'status_code':0x191}},'notFound':{'errors':{'error':a225_0x285963(0x127),'message':a225_0x285963(0x118),'severity':a225_0x285963(0x14f),'status_code':0x194}},'rateLimited':{'detail':a225_0x285963(0xf9)},'rfc9457':{'type':a225_0x285963(0x10b),'title':'Forbidden','status':0x193,'detail':a225_0x285963(0x148),'instance':a225_0x285963(0x152)}}};export function createDatabase(_0x550325){const _0x4d5cce=a225_0x285963;return{...fixtures[_0x4d5cce(0xf1)]['basic'],..._0x550325};}function a225_0x1ace(){const _0x19ab55=['log','cdp_db','segment','wf-12345','bigint','sess-111','30d','count','Resource\x20not\x20found','long','1177550BFaSUW','page_views','test@example.com','lifetime_value','basic','string','ps-789012','running','1576ldugiO','active','properties','event_id','varchar','2024-01-15T09:05:00Z','5005884DHhtrW','daily_etl','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','journey','wf-67890','2140800DGJXlU','time','2024-01-15T10:00:05Z','2024-01-01T00:00:00Z','Invalid\x20API\x20key','UTC','end','presto','Test\x20User','Bob','step-2','job','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','2024-01-15T10:00:00Z','Table\x20does\x20not\x20exist:\x20nonexistent_table','name','purchases','TimeWithinPast','2024-01-15T10:10:00Z','error','pageviews','ps-123456','/v3/database/list','2024-01-15T10:05:00Z','email','2MacKMO','stringify','2024-01-15T10:10:01Z','events_db','attribute','timestamp','High\x20Value\x20Active\x20Users','queryResult','cs-456789','Greater','Onboarding\x20journey\x20for\x20new\x20users','Test\x20Parent\x20Segment','database','success','parentSegment','draft','Active\x20Users','32013AnQSxX','production_db','created_at','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','192243NpJWoN','customer_id','Users\x20active\x20in\x20the\x20last\x2030\x20days','data_sync','SELECT\x20COUNT(*)\x20FROM\x20events','admin@example.com','0\x200\x20*\x20*\x20*','event_type','467663CugpcF','hourly_sync','j-def456','workflow','customers','test_db','user-1','last_login','cs-111222','https://api.treasuredata.com/errors/forbidden','events','America/Los_Angeles','activation','user','439081nTVhAC','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','2024-01-15T00:00:00Z','Customers\x20with\x20Behaviors','wait','map<string,string>','j-abc123','Charlie','The\x20requested\x20resource\x20does\x20not\x20exist','2024-01-15T09:00:00Z','user-2','Journey\x20with\x20decision\x20point','user_id','act-123','0\x20*\x20*\x20*\x20*'];a225_0x1ace=function(){return _0x19ab55;};return a225_0x1ace();}export function createTable(_0x1dbbb9){const _0x21cedc=a225_0x285963;return{...fixtures['table'][_0x21cedc(0x12d)],..._0x1dbbb9};}export function createParentSegment(_0x4a011d){const _0x41f3f8=a225_0x285963;return{...fixtures[_0x41f3f8(0xf3)][_0x41f3f8(0x12d)],..._0x4a011d};}export function createSegment(_0x92c269){const _0x535229=a225_0x285963;return{...fixtures[_0x535229(0x121)]['basic'],..._0x92c269};}export function createJourney(_0x222155){const _0x288408=a225_0x285963;return{...fixtures[_0x288408(0x13a)][_0x288408(0x12d)],..._0x222155};}function a225_0x454d(_0x2c6eb7,_0x26bea8){_0x2c6eb7=_0x2c6eb7-0xf1;const _0x1acea9=a225_0x1ace();let _0x454deb=_0x1acea9[_0x2c6eb7];return _0x454deb;}export function createQueryResult(_0x14171c){const _0x38962a=a225_0x285963;return{...fixtures[_0x38962a(0x15c)][_0x38962a(0x12d)],..._0x14171c};}export function createUser(_0x47e32e){const _0x1c82f7=a225_0x285963;return{...fixtures[_0x1c82f7(0x10f)]['basic'],..._0x47e32e};}export function createJob(_0x34c016){const _0x30be5f=a225_0x285963;return{...fixtures[_0x30be5f(0x147)]['completed'],..._0x34c016};}export function createWorkflow(_0x7ba46e){const _0x424406=a225_0x285963;return{...fixtures[_0x424406(0x105)]['basic'],..._0x7ba46e};}
|
|
1
|
+
const a225_0x16f6ba=a225_0x3f7b;(function(_0x2e26cf,_0x133af0){const _0x24f873=a225_0x3f7b,_0x174cb4=_0x2e26cf();while(!![]){try{const _0x1678c1=parseInt(_0x24f873(0x93))/0x1+parseInt(_0x24f873(0xa4))/0x2+-parseInt(_0x24f873(0x88))/0x3*(-parseInt(_0x24f873(0xd2))/0x4)+-parseInt(_0x24f873(0x9c))/0x5+-parseInt(_0x24f873(0xaf))/0x6*(parseInt(_0x24f873(0x97))/0x7)+parseInt(_0x24f873(0xc6))/0x8+parseInt(_0x24f873(0xd8))/0x9*(-parseInt(_0x24f873(0xb9))/0xa);if(_0x1678c1===_0x133af0)break;else _0x174cb4['push'](_0x174cb4['shift']());}catch(_0x1b79e9){_0x174cb4['push'](_0x174cb4['shift']());}}}(a225_0x5695,0x7ad0c));export const fixtures={'database':{'basic':{'name':a225_0x16f6ba(0xc2),'count':0x5,'created_at':'2024-01-01T00:00:00Z','updated_at':a225_0x16f6ba(0x94),'permission':a225_0x16f6ba(0x92)},'withTables':{'name':'production_db','count':0x64,'created_at':a225_0x16f6ba(0xf2),'updated_at':a225_0x16f6ba(0x8e),'permission':'full_access'}},'table':{'basic':{'id':0x3039,'name':'users','type':a225_0x16f6ba(0xc3),'schema':JSON[a225_0x16f6ba(0xd3)]([['id',a225_0x16f6ba(0xa0)],[a225_0x16f6ba(0xae),'long'],['name',a225_0x16f6ba(0xa0)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':'2024-01-01T00:00:00Z','updated_at':a225_0x16f6ba(0x94)},'events':{'id':0x303a,'name':a225_0x16f6ba(0xeb),'type':a225_0x16f6ba(0xc3),'schema':JSON[a225_0x16f6ba(0xd3)]([[a225_0x16f6ba(0xa2),a225_0x16f6ba(0xa0)],[a225_0x16f6ba(0xae),'long'],[a225_0x16f6ba(0xca),a225_0x16f6ba(0xa0)],['event_type',a225_0x16f6ba(0xa0)],['properties','map<string,string>']]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xd7)}},'parentSegment':{'basic':{'id':a225_0x16f6ba(0xd1),'name':a225_0x16f6ba(0x96),'description':a225_0x16f6ba(0xa3),'status':'active','master_table':{'database':a225_0x16f6ba(0x90),'table':a225_0x16f6ba(0x86)},'attributes':[{'name':a225_0x16f6ba(0xa6),'type':a225_0x16f6ba(0xa0),'key':!![]},{'name':a225_0x16f6ba(0xd5),'type':a225_0x16f6ba(0xa0)},{'name':a225_0x16f6ba(0x9d),'type':a225_0x16f6ba(0xac)}],'created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xc5)},'withBehaviors':{'id':a225_0x16f6ba(0xa5),'name':a225_0x16f6ba(0xb5),'description':a225_0x16f6ba(0xe0),'status':a225_0x16f6ba(0xb1),'master_table':{'database':a225_0x16f6ba(0x90),'table':'customers'},'behaviors':[{'name':a225_0x16f6ba(0xa7),'table':{'database':a225_0x16f6ba(0x95),'table':'purchases'},'join_key':a225_0x16f6ba(0xa6)},{'name':a225_0x16f6ba(0xc4),'table':{'database':'events_db','table':'pageviews'},'join_key':a225_0x16f6ba(0xa6)}],'created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xc5)}},'segment':{'basic':{'id':'cs-456789','name':a225_0x16f6ba(0x85),'description':'Users\x20active\x20in\x20the\x20last\x2030\x20days','parent_segment_id':a225_0x16f6ba(0xd1),'status':a225_0x16f6ba(0xb1),'rules':[{'type':a225_0x16f6ba(0xdf),'field':a225_0x16f6ba(0xe8),'operator':a225_0x16f6ba(0xcf),'value':'30d'}],'count':0x1388,'created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xc5)},'withMultipleRules':{'id':a225_0x16f6ba(0xee),'name':a225_0x16f6ba(0xc7),'description':a225_0x16f6ba(0xc1),'parent_segment_id':a225_0x16f6ba(0xd1),'status':'active','rules':[{'type':a225_0x16f6ba(0xdf),'field':a225_0x16f6ba(0xe8),'operator':a225_0x16f6ba(0xcf),'value':a225_0x16f6ba(0x8b)},{'type':a225_0x16f6ba(0xdf),'field':a225_0x16f6ba(0xed),'operator':a225_0x16f6ba(0xe9),'value':0x3e8}],'count':0x5dc,'created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xc5)}},'journey':{'basic':{'id':a225_0x16f6ba(0x9a),'name':'Welcome\x20Journey','description':'Onboarding\x20journey\x20for\x20new\x20users','status':'draft','version':0x1,'steps':[{'id':a225_0x16f6ba(0xf1),'type':'wait','duration':'1d'},{'id':a225_0x16f6ba(0xb6),'type':'activation','activation_id':'act-123'}],'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z'},'withDecision':{'id':'j-def456','name':a225_0x16f6ba(0xb4),'description':a225_0x16f6ba(0xc0),'status':a225_0x16f6ba(0xb1),'version':0x2,'steps':[{'id':a225_0x16f6ba(0xf1),'type':a225_0x16f6ba(0xea),'segment_id':a225_0x16f6ba(0xdc),'yes_path':a225_0x16f6ba(0xb6),'no_path':a225_0x16f6ba(0xe3)},{'id':a225_0x16f6ba(0xb6),'type':a225_0x16f6ba(0xb2),'activation_id':a225_0x16f6ba(0xbb)},{'id':a225_0x16f6ba(0xe3),'type':a225_0x16f6ba(0xc8)}],'created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xc5)}},'queryResult':{'basic':{'schema':[{'name':'id','type':'varchar'},{'name':a225_0x16f6ba(0xde),'type':a225_0x16f6ba(0xb8)},{'name':a225_0x16f6ba(0xd9),'type':a225_0x16f6ba(0xe7)}],'data':[['user-1',a225_0x16f6ba(0xdd),0x64],[a225_0x16f6ba(0xbc),a225_0x16f6ba(0xbf),0xc8],[a225_0x16f6ba(0x9b),'Charlie',0x96]]},'empty':{'schema':[{'name':'id','type':a225_0x16f6ba(0xb8)},{'name':a225_0x16f6ba(0xde),'type':a225_0x16f6ba(0xb8)}],'data':[]},'singleRow':{'schema':[{'name':a225_0x16f6ba(0xce),'type':a225_0x16f6ba(0xe7)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a225_0x16f6ba(0xab),'email':'test@example.com','created_at':a225_0x16f6ba(0x94),'updated_at':a225_0x16f6ba(0xc5),'administrator':![]},'admin':{'id':0x1,'name':a225_0x16f6ba(0x8a),'email':a225_0x16f6ba(0xba),'created_at':a225_0x16f6ba(0x89),'updated_at':a225_0x16f6ba(0xc5),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a225_0x16f6ba(0xc9),'database':a225_0x16f6ba(0xc2),'status':a225_0x16f6ba(0xbe),'query':a225_0x16f6ba(0x8c),'start_at':a225_0x16f6ba(0xd0),'end_at':a225_0x16f6ba(0x91),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a225_0x16f6ba(0xc9),'database':a225_0x16f6ba(0xc2),'status':a225_0x16f6ba(0xb3),'query':a225_0x16f6ba(0xda),'start_at':a225_0x16f6ba(0xec),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':a225_0x16f6ba(0xc9),'database':'test_db','status':a225_0x16f6ba(0x8d),'query':a225_0x16f6ba(0x87),'start_at':'2024-01-15T10:10:00Z','end_at':a225_0x16f6ba(0xcb),'duration':0x1,'result_size':null,'error':'Table\x20does\x20not\x20exist:\x20nonexistent_table'}},'workflow':{'basic':{'id':a225_0x16f6ba(0xb0),'name':a225_0x16f6ba(0xef),'project':a225_0x16f6ba(0xcc),'revision':a225_0x16f6ba(0xf0),'timezone':'UTC','schedule':{'cron':a225_0x16f6ba(0xe5)}},'withSessions':{'id':a225_0x16f6ba(0xe1),'name':a225_0x16f6ba(0xcd),'project':'data_sync','revision':a225_0x16f6ba(0x9f),'timezone':'America/Los_Angeles','schedule':{'cron':a225_0x16f6ba(0xaa)},'last_session':{'id':a225_0x16f6ba(0xe2),'status':a225_0x16f6ba(0xbe),'started_at':a225_0x16f6ba(0x84),'finished_at':a225_0x16f6ba(0xe6)}}},'apiError':{'unauthorized':{'errors':{'error':'Invalid\x20API\x20key','message':a225_0x16f6ba(0xbd),'severity':a225_0x16f6ba(0x8d),'status_code':0x191}},'notFound':{'errors':{'error':'Resource\x20not\x20found','message':a225_0x16f6ba(0xe4),'severity':a225_0x16f6ba(0x8d),'status_code':0x194}},'rateLimited':{'detail':a225_0x16f6ba(0xd6)},'rfc9457':{'type':a225_0x16f6ba(0xad),'title':a225_0x16f6ba(0x99),'status':0x193,'detail':a225_0x16f6ba(0xdb),'instance':'/v3/database/list'}}};function a225_0x5695(){const _0x41621b=['cs-111222','daily_etl','abc123','step-1','2023-06-15T10:30:00Z','2024-01-15T09:00:00Z','Active\x20Users','unified_customers','SELECT\x20*\x20FROM\x20nonexistent_table','15807ElBkEz','2023-01-01T00:00:00Z','Admin\x20User','30d','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','error','2024-01-15T08:00:00Z','job','cdp_db','2024-01-15T10:00:05Z','administrator','308333MTdbcY','2024-01-01T00:00:00Z','events_db','Test\x20Parent\x20Segment','2021257Yyhzrb','segment','Forbidden','j-abc123','user-3','1195585PqOpBy','created_at','basic','def456','string','parentSegment','event_id','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','670706tjiAZZ','ps-789012','customer_id','purchases','journey','completed','0\x20*\x20*\x20*\x20*','Test\x20User','timestamp','https://api.treasuredata.com/errors/forbidden','time','12vbGwEB','wf-12345','active','activation','running','Purchase\x20Reminder','Customers\x20with\x20Behaviors','step-2','queryResult','varchar','20jhuDaw','admin@example.com','act-email','user-2','Invalid\x20API\x20key','success','Bob','Journey\x20with\x20decision\x20point','Active\x20users\x20with\x20high\x20lifetime\x20value','test_db','log','page_views','2024-01-15T00:00:00Z','5384952XoBgSo','High\x20Value\x20Active\x20Users','end','presto','user_id','2024-01-15T10:10:01Z','data_pipeline','hourly_sync','total','TimeWithinPast','2024-01-15T10:00:00Z','ps-123456','512dmPXOK','stringify','workflow','email','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','2024-01-15T12:00:00Z','3022047egBjVn','count','SELECT\x20COUNT(*)\x20FROM\x20events','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','cs-456789','Alice','name','attribute','Parent\x20segment\x20with\x20behavioral\x20data','wf-67890','sess-111','step-3','The\x20requested\x20resource\x20does\x20not\x20exist','0\x200\x20*\x20*\x20*','2024-01-15T09:05:00Z','bigint','last_login','Greater','decision_point','events','2024-01-15T10:05:00Z','lifetime_value'];a225_0x5695=function(){return _0x41621b;};return a225_0x5695();}export function createDatabase(_0x5c974b){const _0x14384a=a225_0x16f6ba;return{...fixtures['database'][_0x14384a(0x9e)],..._0x5c974b};}export function createTable(_0x48e6f6){const _0x124785=a225_0x16f6ba;return{...fixtures['table'][_0x124785(0x9e)],..._0x48e6f6};}export function createParentSegment(_0x36f2c9){const _0x1aa875=a225_0x16f6ba;return{...fixtures[_0x1aa875(0xa1)][_0x1aa875(0x9e)],..._0x36f2c9};}export function createSegment(_0x5e2896){const _0x923830=a225_0x16f6ba;return{...fixtures[_0x923830(0x98)][_0x923830(0x9e)],..._0x5e2896};}export function createJourney(_0x2834c6){const _0x47d657=a225_0x16f6ba;return{...fixtures[_0x47d657(0xa8)][_0x47d657(0x9e)],..._0x2834c6};}function a225_0x3f7b(_0x4bf29b,_0x53a911){_0x4bf29b=_0x4bf29b-0x84;const _0x5695d8=a225_0x5695();let _0x3f7bde=_0x5695d8[_0x4bf29b];return _0x3f7bde;}export function createQueryResult(_0xfc87e0){const _0xcba717=a225_0x16f6ba;return{...fixtures[_0xcba717(0xb7)][_0xcba717(0x9e)],..._0xfc87e0};}export function createUser(_0x4ebcf3){return{...fixtures['user']['basic'],..._0x4ebcf3};}export function createJob(_0x246c33){const _0x1e981f=a225_0x16f6ba;return{...fixtures[_0x1e981f(0x8f)][_0x1e981f(0xa9)],..._0x246c33};}export function createWorkflow(_0x2e47e2){const _0x3a6ab3=a225_0x16f6ba;return{...fixtures[_0x3a6ab3(0xd4)][_0x3a6ab3(0x9e)],..._0x2e47e2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a226_0x441f(){const _0x31e59b=['entries','matched','withQuery','20LSCyvP','Forbidden','td-api','join','1875096VZfpVA','Unknown','jsonResponse','pathname','parse','application/json','2509432qAEnOH','text/plain','includes','Request\x20body:\x20','matchCount','Bad\x20Gateway','every','rfc9457','870925mIgcdE','matcher','GET','100713GMffAt','fail','get','method','split','function','stack','unnamed\x20stub','description','register','Unmatched\x20stub','Unauthorized','\x20registered\x20at:\x0a','errorResponse','simple','No\x20stub\x20matched\x20request:\x20','312446hAzFaX','REST','parseRequest','\x20stub(s)\x20were\x20not\x20matched:\x0a\x0a','withBody','responder','slice','getMatchCount','requests','createFetch','stubs','getRequests','searchParams','registerWithInspector','getStatusText','withHost','stringify','host','body','toLowerCase','textResponse','length','map','Bad\x20Request','test','getLastRequest','push','toUpperCase','437446gIHQDo','Internal\x20Server\x20Error','fetchMock','https://api.treasuredata.com/errors/','url','Not\x20Found','497973EXABvL','Registered\x20stubs:\x0a','headers','error'];a226_0x441f=function(){return _0x31e59b;};return a226_0x441f();}const a226_0x4235ce=a226_0x24dd;(function(_0x42ff05,_0x48f3ce){const _0x41f8bf=a226_0x24dd,_0x2e7fe7=_0x42ff05();while(!![]){try{const _0x17af97=parseInt(_0x41f8bf(0x131))/0x1+-parseInt(_0x41f8bf(0x14d))/0x2+-parseInt(_0x41f8bf(0x16f))/0x3*(-parseInt(_0x41f8bf(0x15a))/0x4)+-parseInt(_0x41f8bf(0x16c))/0x5+-parseInt(_0x41f8bf(0x15e))/0x6+parseInt(_0x41f8bf(0x153))/0x7+parseInt(_0x41f8bf(0x164))/0x8;if(_0x17af97===_0x48f3ce)break;else _0x2e7fe7['push'](_0x2e7fe7['shift']());}catch(_0x44f3a7){_0x2e7fe7['push'](_0x2e7fe7['shift']());}}}(a226_0x441f,0x26fcf));function a226_0x24dd(_0x21dbd8,_0x3cc408){_0x21dbd8=_0x21dbd8-0x125;const _0x441f8b=a226_0x441f();let _0x24dde=_0x441f8b[_0x21dbd8];return _0x24dde;}import{vi}from'vitest';export class HTTPMockRegistry{[a226_0x4235ce(0x13b)]=[];[a226_0x4235ce(0x139)]=[];[a226_0x4235ce(0x14f)]=null;[a226_0x4235ce(0x132)](_0x4fa7a8,_0x2c1915){return _0xf14002=>{const _0x20e87b=a226_0x24dd;if(_0xf14002[_0x20e87b(0x172)][_0x20e87b(0x14c)]()!==_0x4fa7a8[_0x20e87b(0x14c)]())return![];const _0xea6fcb=new URL(_0xf14002[_0x20e87b(0x151)]);if(typeof _0x2c1915==='string')return _0xea6fcb[_0x20e87b(0x161)]===_0x2c1915||_0xea6fcb[_0x20e87b(0x161)][_0x20e87b(0x166)](_0x2c1915);return _0x2c1915[_0x20e87b(0x149)](_0xea6fcb[_0x20e87b(0x161)]);};}[a226_0x4235ce(0x159)](_0x5ce93f,_0x2a9064){return _0x3dff4c=>{const _0x1bd350=a226_0x24dd;if(!_0x5ce93f(_0x3dff4c))return![];const _0x10a4dd=new URL(_0x3dff4c['url']);return Object[_0x1bd350(0x157)](_0x2a9064)[_0x1bd350(0x16a)](([_0x32f8a8,_0x39026d])=>_0x10a4dd[_0x1bd350(0x13d)][_0x1bd350(0x171)](_0x32f8a8)===_0x39026d);};}[a226_0x4235ce(0x135)](_0x3ce95a,_0x2eb7d3){return _0xbb8a5a=>{const _0x1c0c50=a226_0x24dd;if(!_0x3ce95a(_0xbb8a5a))return![];if(typeof _0x2eb7d3===_0x1c0c50(0x126))return _0x2eb7d3(_0xbb8a5a['body']);return JSON[_0x1c0c50(0x141)](_0xbb8a5a[_0x1c0c50(0x143)])===JSON[_0x1c0c50(0x141)](_0x2eb7d3);};}[a226_0x4235ce(0x140)](_0x373fbd,_0x169193){return _0x13469b=>{const _0x31ec64=a226_0x24dd;if(!_0x373fbd(_0x13469b))return![];const _0x5d8676=new URL(_0x13469b['url']);return _0x5d8676[_0x31ec64(0x142)]===_0x169193;};}['register'](_0x1139ba,_0x22f9fa,_0x17b4b5){const _0x12b4f1=a226_0x4235ce;this[_0x12b4f1(0x13b)][_0x12b4f1(0x14b)]({'matcher':_0x1139ba,'responder':_0x22f9fa,'matched':![],'matchCount':0x0,'stack':new Error()['stack']??'','description':_0x17b4b5?.[_0x12b4f1(0x129)]});}[a226_0x4235ce(0x13e)](_0x228b89,_0x5e5453,_0x37f01b){const _0x23775f=a226_0x4235ce,_0x1259c5=_0x492258=>{const _0x40e0a9=a226_0x24dd;return _0x37f01b(_0x492258[_0x40e0a9(0x143)],_0x492258),_0x5e5453(_0x492258);};this[_0x23775f(0x12a)](_0x228b89,_0x1259c5);}static[a226_0x4235ce(0x160)](_0x26d262,_0x42a883=0xc8){const _0x18c163=a226_0x4235ce;return()=>new Response(JSON[_0x18c163(0x141)](_0x26d262),{'status':_0x42a883,'headers':{'Content-Type':_0x18c163(0x163)}});}static[a226_0x4235ce(0x12e)](_0x49867a,_0x370845,_0x16f0af=a226_0x4235ce(0x12f)){return()=>{const _0x28fb0e=a226_0x24dd;let _0x27eb93;switch(_0x16f0af){case _0x28fb0e(0x15c):_0x27eb93={'errors':{'error':_0x370845,'message':_0x370845,'severity':_0x28fb0e(0x156),'status_code':_0x49867a}};break;case _0x28fb0e(0x16b):_0x27eb93={'type':_0x28fb0e(0x150)+_0x49867a,'title':HTTPMockRegistry[_0x28fb0e(0x13f)](_0x49867a),'status':_0x49867a,'detail':_0x370845};break;default:_0x27eb93={'error':_0x370845};}return new Response(JSON[_0x28fb0e(0x141)](_0x27eb93),{'status':_0x49867a,'headers':{'Content-Type':_0x28fb0e(0x163)}});};}static['jsonResponseWithHeaders'](_0x2e4b39,_0x1f9d83,_0x537fc6=0xc8){const _0x2e2958=a226_0x4235ce;return()=>new Response(JSON[_0x2e2958(0x141)](_0x2e4b39),{'status':_0x537fc6,'headers':{'Content-Type':_0x2e2958(0x163),..._0x1f9d83}});}static[a226_0x4235ce(0x145)](_0x377bc7,_0x50336e=0xc8){const _0x18fa3f=a226_0x4235ce;return()=>new Response(_0x377bc7,{'status':_0x50336e,'headers':{'Content-Type':_0x18fa3f(0x165)}});}static['networkError'](_0x4200da){return()=>{throw new Error(_0x4200da);};}[a226_0x4235ce(0x13a)](){const _0x2d8752=a226_0x4235ce;return this[_0x2d8752(0x14f)]=vi['fn']()['mockImplementation'](async(_0x1e8560,_0x4aa9bc)=>{const _0x349f5d=_0x2d8752,_0x548685=this[_0x349f5d(0x133)](_0x1e8560,_0x4aa9bc);this[_0x349f5d(0x139)][_0x349f5d(0x14b)](_0x548685);for(const _0x41c125 of this[_0x349f5d(0x13b)]){if(_0x41c125[_0x349f5d(0x16d)](_0x548685))return _0x41c125['matched']=!![],_0x41c125['matchCount']++,_0x41c125[_0x349f5d(0x136)](_0x548685);}const _0x58ffc9=this[_0x349f5d(0x13b)]['map']((_0x2cc48b,_0x39da4d)=>'\x20\x20'+(_0x39da4d+0x1)+'.\x20'+(_0x2cc48b['description']??_0x349f5d(0x128)))['join']('\x0a');throw new Error(_0x349f5d(0x130)+_0x548685[_0x349f5d(0x172)]+'\x20'+_0x548685[_0x349f5d(0x151)]+'\x0a'+(_0x349f5d(0x167)+JSON[_0x349f5d(0x141)](_0x548685[_0x349f5d(0x143)])+'\x0a')+(_0x349f5d(0x154)+(_0x58ffc9||'\x20\x20(none)')));}),this[_0x2d8752(0x14f)];}[a226_0x4235ce(0x133)](_0x858c68,_0x4775fc){const _0x4a6464=a226_0x4235ce,_0x563188={};if(_0x4775fc?.['headers']){if(_0x4775fc[_0x4a6464(0x155)]instanceof Headers)_0x4775fc[_0x4a6464(0x155)]['forEach']((_0x29b5cf,_0x3abea2)=>{const _0x54496f=_0x4a6464;_0x563188[_0x3abea2[_0x54496f(0x144)]()]=_0x29b5cf;});else{if(Array['isArray'](_0x4775fc[_0x4a6464(0x155)]))for(const [_0x213f44,_0xd8b374]of _0x4775fc[_0x4a6464(0x155)]){_0x563188[_0x213f44['toLowerCase']()]=_0xd8b374;}else for(const [_0x1cb96f,_0x540b42]of Object['entries'](_0x4775fc[_0x4a6464(0x155)])){_0x540b42!==undefined&&(_0x563188[_0x1cb96f[_0x4a6464(0x144)]()]=_0x540b42);}}}let _0x3a9168;if(_0x4775fc?.['body'])try{_0x3a9168=JSON[_0x4a6464(0x162)](_0x4775fc[_0x4a6464(0x143)]);}catch{_0x3a9168=_0x4775fc['body'];}return{'method':_0x4775fc?.[_0x4a6464(0x172)]??_0x4a6464(0x16e),'url':_0x858c68,'headers':_0x563188,'body':_0x3a9168};}['verify'](_0x4ffb14){const _0x43eaac=a226_0x4235ce,_0x5370cb=this[_0x43eaac(0x13b)]['filter'](_0x29849e=>!_0x29849e[_0x43eaac(0x158)]);if(_0x5370cb[_0x43eaac(0x146)]>0x0){const _0x55e549=_0x5370cb[_0x43eaac(0x147)](_0x472a57=>{const _0x713561=_0x43eaac,_0x4d7625=_0x472a57[_0x713561(0x129)]?'\x20('+_0x472a57[_0x713561(0x129)]+')':'',_0x2bf105=_0x472a57[_0x713561(0x127)][_0x713561(0x125)]('\x0a')[_0x713561(0x137)](0x2,0x5)[_0x713561(0x15d)]('\x0a');return _0x713561(0x12b)+_0x4d7625+_0x713561(0x12d)+_0x2bf105;});_0x4ffb14[_0x43eaac(0x170)](_0x5370cb[_0x43eaac(0x146)]+_0x43eaac(0x134)+_0x55e549['join']('\x0a\x0a'));}}[a226_0x4235ce(0x13c)](){const _0x496b18=a226_0x4235ce;return[...this[_0x496b18(0x139)]];}[a226_0x4235ce(0x14a)](){const _0x2f47da=a226_0x4235ce;return this['requests'][this[_0x2f47da(0x139)][_0x2f47da(0x146)]-0x1];}['wasCalled'](_0x1d2cf0,_0x1bcd72){const _0x5daa88=a226_0x4235ce;return this[_0x5daa88(0x139)]['some'](_0x130ecb=>{const _0x317275=_0x5daa88;if(_0x130ecb[_0x317275(0x172)]['toUpperCase']()!==_0x1d2cf0[_0x317275(0x14c)]())return![];if(typeof _0x1bcd72==='string')return _0x130ecb[_0x317275(0x151)]['includes'](_0x1bcd72);return _0x1bcd72[_0x317275(0x149)](_0x130ecb[_0x317275(0x151)]);});}[a226_0x4235ce(0x138)](_0x275c5a){const _0x39e089=a226_0x4235ce;return this['stubs'][_0x275c5a]?.[_0x39e089(0x168)]??0x0;}['reset'](){const _0x586bef=a226_0x4235ce;this[_0x586bef(0x13b)]=[],this[_0x586bef(0x139)]=[],this[_0x586bef(0x14f)]=null;}static['getStatusText'](_0x35e5fc){const _0x3c6e4f=a226_0x4235ce,_0x315b4b={0xc8:'OK',0xc9:'Created',0xcc:'No\x20Content',0x190:_0x3c6e4f(0x148),0x191:_0x3c6e4f(0x12c),0x193:_0x3c6e4f(0x15b),0x194:_0x3c6e4f(0x152),0x199:'Conflict',0x1a6:'Unprocessable\x20Entity',0x1ad:'Too\x20Many\x20Requests',0x1f4:_0x3c6e4f(0x14e),0x1f6:_0x3c6e4f(0x169),0x1f7:'Service\x20Unavailable'};return _0x315b4b[_0x35e5fc]??_0x3c6e4f(0x15f);}}export function createHTTPMock(){return new HTTPMockRegistry();}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4937ca,_0x1a5895){var _0x953cb0=a227_0x4c1a,_0x2cedfb=_0x4937ca();while(!![]){try{var _0x35aa77=-parseInt(_0x953cb0(0x12a))/0x1+-parseInt(_0x953cb0(0x129))/0x2+-parseInt(_0x953cb0(0x128))/0x3+-parseInt(_0x953cb0(0x125))/0x4*(-parseInt(_0x953cb0(0x127))/0x5)+parseInt(_0x953cb0(0x12b))/0x6+parseInt(_0x953cb0(0x124))/0x7*(parseInt(_0x953cb0(0x123))/0x8)+-parseInt(_0x953cb0(0x126))/0x9;if(_0x35aa77===_0x1a5895)break;else _0x2cedfb['push'](_0x2cedfb['shift']());}catch(_0x8dd736){_0x2cedfb['push'](_0x2cedfb['shift']());}}}(a227_0xff39,0xc876d));export{HTTPMockRegistry,createHTTPMock}from'./http-mock.js';export{createTestSDKContext,createTestGlobalOptions,createTestCommandContext,createMockTDX,captureConsole,writeTestProfile}from'./factories.js';export{fixtures,createDatabase,createTable,createParentSegment,createSegment,createJourney,createQueryResult,createUser,createJob,createWorkflow}from'./fixtures.js';function a227_0x4c1a(_0x21be9f,_0x5e0184){_0x21be9f=_0x21be9f-0x123;var _0xff39=a227_0xff39();var _0x4c1a1b=_0xff39[_0x21be9f];return _0x4c1a1b;}function a227_0xff39(){var _0x1c5063=['1876911bTNzqh','38016ysVeox','69428xODBZl','9213150iZAWhT','85016mQCRvW','987gCzHPH','339744VVBnly','16546518eEBGCb','20XekDGp'];a227_0xff39=function(){return _0x1c5063;};return a227_0xff39();}export{CommandRunner,createCommandRunner}from'./command-runner.js';
|
package/dist/utils/async.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x550beb,_0x3ad9fb){const _0x200c14=a228_0x473a,_0x332271=_0x550beb();while(!![]){try{const _0x1f5ea5=-parseInt(_0x200c14(0x132))/0x1+parseInt(_0x200c14(0x135))/0x2+-parseInt(_0x200c14(0x137))/0x3*(parseInt(_0x200c14(0x138))/0x4)+-parseInt(_0x200c14(0x139))/0x5*(parseInt(_0x200c14(0x13a))/0x6)+-parseInt(_0x200c14(0x136))/0x7+-parseInt(_0x200c14(0x130))/0x8+parseInt(_0x200c14(0x133))/0x9;if(_0x1f5ea5===_0x3ad9fb)break;else _0x332271['push'](_0x332271['shift']());}catch(_0x174c00){_0x332271['push'](_0x332271['shift']());}}}(a228_0x5d05,0x8c7f5));function a228_0x473a(_0x102a0d,_0x31e228){_0x102a0d=_0x102a0d-0x12f;const _0x5d054d=a228_0x5d05();let _0x473ae5=_0x5d054d[_0x102a0d];return _0x473ae5;}function a228_0x5d05(){const _0x3584d5=['1918106IpFZwf','3463110spmtCi','1217820AkrqHL','8ymtLNo','1310745zmBkDP','6kmIPik','map','push','5746960BAWxWX','length','536034KjNWPy','21956283BqHycu','slice'];a228_0x5d05=function(){return _0x3584d5;};return a228_0x5d05();}export async function batchAsync(_0x231631,_0x5673d0,_0x2598b8=0xa){const _0x57ac0b=a228_0x473a,_0x39ce3b=[];for(let _0x414d19=0x0;_0x414d19<_0x231631[_0x57ac0b(0x131)];_0x414d19+=_0x2598b8){const _0x1bca43=_0x231631[_0x57ac0b(0x134)](_0x414d19,_0x414d19+_0x2598b8),_0x2e9dae=await Promise['all'](_0x1bca43[_0x57ac0b(0x13b)](_0x5673d0));_0x39ce3b[_0x57ac0b(0x12f)](..._0x2e9dae);}return _0x39ce3b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55f894,_0xfa94d3){const _0x5ee40b=a229_0x44e3,_0x3f2070=_0x55f894();while(!![]){try{const _0xe5d94f=parseInt(_0x5ee40b(0x19b))/0x1*(parseInt(_0x5ee40b(0x187))/0x2)+parseInt(_0x5ee40b(0x19d))/0x3+-parseInt(_0x5ee40b(0x195))/0x4+parseInt(_0x5ee40b(0x18f))/0x5+parseInt(_0x5ee40b(0x1a0))/0x6+parseInt(_0x5ee40b(0x19c))/0x7*(parseInt(_0x5ee40b(0x194))/0x8)+-parseInt(_0x5ee40b(0x198))/0x9;if(_0xe5d94f===_0xfa94d3)break;else _0x3f2070['push'](_0x3f2070['shift']());}catch(_0x22eb5c){_0x3f2070['push'](_0x3f2070['shift']());}}}(a229_0x2bc5,0xdd617));import{existsSync,readFileSync}from'node:fs';function a229_0x44e3(_0x1c4d77,_0x2966de){_0x1c4d77=_0x1c4d77-0x185;const _0x2bc58b=a229_0x2bc5();let _0x44e3c4=_0x2bc58b[_0x1c4d77];return _0x44e3c4;}import{homedir}from'node:os';import{join}from'node:path';export function getClaudeConfigDir(){const _0x32beca=a229_0x44e3;return process.env.CLAUDE_CONFIG_DIR||join(homedir(),_0x32beca(0x18c));}function getClaudeJsonPath(){const _0x4747bc=a229_0x44e3,_0x562005=getClaudeConfigDir(),_0x253bc5=join(_0x562005,'.claude.json');return existsSync(_0x253bc5)?_0x253bc5:_0x562005+_0x4747bc(0x18d);}function readJsonFile(_0x137265){const _0x395420=a229_0x44e3;if(!existsSync(_0x137265))return undefined;try{return JSON[_0x395420(0x192)](readFileSync(_0x137265,_0x395420(0x19f)));}catch{return undefined;}}function asRecord(_0x2fe8e2){const _0x1ce484=a229_0x44e3;return typeof _0x2fe8e2===_0x1ce484(0x185)&&_0x2fe8e2!==null&&!Array[_0x1ce484(0x19a)](_0x2fe8e2)?_0x2fe8e2:undefined;}function a229_0x2bc5(){const _0x1f7396=['isArray','155773tGqJsK','91PcdLIz','4797372IghjVp','toLowerCase','utf-8','4482624tBGAOI','object','projects','8hNIFHG','.mcp.json','https://github.com/','mcpServers','installed_plugins.json','.claude','.json','trim','2123510zaXxCq','source','url','parse','repo','418136YpfgOZ','478052bKdGOk','replace','plugins','27424845FVjtVh','string'];a229_0x2bc5=function(){return _0x1f7396;};return a229_0x2bc5();}function mcpServerUrl(_0x5144cd,_0x484340){const _0x272c43=a229_0x44e3,_0x3fe985=asRecord(asRecord(_0x5144cd)?.[_0x484340]);return typeof _0x3fe985?.[_0x272c43(0x191)]===_0x272c43(0x199)?_0x3fe985['url']:undefined;}export function findMcpServerUrl(_0x33200f,_0x5a8786){const _0x220e63=a229_0x44e3,_0x519ec5=asRecord(readJsonFile(getClaudeJsonPath())),_0xf126d1=asRecord(asRecord(_0x519ec5?.[_0x220e63(0x186)])?.[_0x5a8786]),_0x13f98f=mcpServerUrl(_0xf126d1?.[_0x220e63(0x18a)],_0x33200f);if(_0x13f98f)return _0x13f98f;const _0x2ce3ff=mcpServerUrl(_0x519ec5?.[_0x220e63(0x18a)],_0x33200f);if(_0x2ce3ff)return _0x2ce3ff;return mcpServerUrl(asRecord(readJsonFile(join(_0x5a8786,_0x220e63(0x188))))?.[_0x220e63(0x18a)],_0x33200f);}export function normalizeRepoUrl(_0x767bc8){const _0x3f7c8c=a229_0x44e3;return _0x767bc8[_0x3f7c8c(0x18e)]()[_0x3f7c8c(0x19e)]()[_0x3f7c8c(0x196)](/\.git$/,'')[_0x3f7c8c(0x196)](/\/+$/,'');}export function readMarketplaceSourceUrl(_0x34aebf){const _0x384ca0=a229_0x44e3,_0x27ef1a=join(getClaudeConfigDir(),_0x384ca0(0x197),'known_marketplaces.json'),_0x406fec=asRecord(asRecord(readJsonFile(_0x27ef1a))?.[_0x34aebf])?.[_0x384ca0(0x190)],_0x49b362=asRecord(_0x406fec);if(!_0x49b362)return undefined;if(typeof _0x49b362['url']==='string')return normalizeRepoUrl(_0x49b362[_0x384ca0(0x191)]);if(typeof _0x49b362[_0x384ca0(0x193)]===_0x384ca0(0x199))return normalizeRepoUrl(_0x384ca0(0x189)+_0x49b362[_0x384ca0(0x193)]);return undefined;}export function isPluginInstalled(_0x3f937b,_0x50555a){const _0x5a6e49=a229_0x44e3,_0x3b52e3=join(getClaudeConfigDir(),_0x5a6e49(0x197),_0x5a6e49(0x18b)),_0x23a7d4=readJsonFile(_0x3b52e3),_0x207907=_0x23a7d4?.[_0x5a6e49(0x197)]?.[_0x3f937b+'@'+_0x50555a];return Array[_0x5a6e49(0x19a)](_0x207907)&&_0x207907['length']>0x0;}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5365ba,_0x31f5b8){const _0x4512ef=a230_0x2300,_0x202810=_0x5365ba();while(!![]){try{const _0x581a2a=-parseInt(_0x4512ef(0x14f))/0x1*(parseInt(_0x4512ef(0x15b))/0x2)+parseInt(_0x4512ef(0x152))/0x3*(-parseInt(_0x4512ef(0x155))/0x4)+parseInt(_0x4512ef(0x157))/0x5*(-parseInt(_0x4512ef(0x160))/0x6)+-parseInt(_0x4512ef(0x154))/0x7+parseInt(_0x4512ef(0x151))/0x8*(parseInt(_0x4512ef(0x15d))/0x9)+-parseInt(_0x4512ef(0x167))/0xa+parseInt(_0x4512ef(0x156))/0xb;if(_0x581a2a===_0x31f5b8)break;else _0x202810['push'](_0x202810['shift']());}catch(_0x3b0c40){_0x202810['push'](_0x202810['shift']());}}}(a230_0x390f,0x6dd1f));import*as a230_0x372508 from'chalk';const Chalk=a230_0x372508['Chalk'];export function shouldUseColor(_0x5ec779={}){const _0x2c39e5=a230_0x2300;if(_0x5ec779[_0x2c39e5(0x166)]===!![])return![];if(_0x5ec779[_0x2c39e5(0x14d)]===!![])return!![];if(process.env.NO_COLOR!==undefined)return![];return process[_0x2c39e5(0x162)][_0x2c39e5(0x153)]??![];}export function getChalk(_0x5c1fe2={}){if(shouldUseColor(_0x5c1fe2))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x9717a8,_0x46ec48={}){const _0x501ef7=a230_0x2300;return getChalk(_0x46ec48)[_0x501ef7(0x164)](_0x9717a8);}export function colorHeader(_0x58c2c2,_0x5ae299={}){return getChalk(_0x5ae299)['cyan'](_0x58c2c2);}export function colorType(_0x9dde26,_0x193d30={}){const _0x2dce80=a230_0x2300;return getChalk(_0x193d30)[_0x2dce80(0x164)](_0x9dde26);}export function colorJSONKey(_0x17feb1,_0x203038={}){return getChalk(_0x203038)['blue'](_0x17feb1);}function a230_0x390f(){const _0x3978a9=['9Kwivyw','cyan','map','6kECFyI','repeat','stdout','green','dim','yellow','noColor','6454500aozzXX','null','object','isArray','color','join','149eovPzC','string','2498360HDvktU','6JWccZC','isTTY','5642966rSdSCJ','795364lhUFhH','23747812xxQorl','71515HlmdUN','length','entries','number','2118GgOlQH','stringify'];a230_0x390f=function(){return _0x3978a9;};return a230_0x390f();}export function colorJSONString(_0x1eefa3,_0x28465d={}){const _0x5462fa=a230_0x2300;return getChalk(_0x28465d)[_0x5462fa(0x163)](_0x1eefa3);}export function colorJSONNumber(_0x13fc03,_0x564c5a={}){const _0x57171f=a230_0x2300;return getChalk(_0x564c5a)[_0x57171f(0x15e)](_0x13fc03);}export function colorJSONBoolean(_0x4a77ad,_0x26193c={}){const _0x4f6844=a230_0x2300;return getChalk(_0x26193c)[_0x4f6844(0x165)](_0x4a77ad);}export function colorJSONNull(_0x4bcdc3,_0x404542={}){return getChalk(_0x404542)['dim'](_0x4bcdc3);}function a230_0x2300(_0x20d989,_0x23754f){_0x20d989=_0x20d989-0x14a;const _0x390f9c=a230_0x390f();let _0x23001b=_0x390f9c[_0x20d989];return _0x23001b;}export function colorizeJSONCompact(_0x4f4ca6,_0x33594d={}){const _0x53a075=a230_0x2300;if(!shouldUseColor(_0x33594d))return JSON['stringify'](_0x4f4ca6);if(_0x4f4ca6===null)return colorJSONNull(_0x53a075(0x14a),_0x33594d);if(typeof _0x4f4ca6==='boolean')return colorJSONBoolean(String(_0x4f4ca6),_0x33594d);if(typeof _0x4f4ca6===_0x53a075(0x15a))return colorJSONNumber(String(_0x4f4ca6),_0x33594d);if(typeof _0x4f4ca6===_0x53a075(0x150))return colorJSONString(JSON[_0x53a075(0x15c)](_0x4f4ca6),_0x33594d);if(Array[_0x53a075(0x14c)](_0x4f4ca6)){if(_0x4f4ca6[_0x53a075(0x158)]===0x0)return'[]';const _0x1abbd2=_0x4f4ca6[_0x53a075(0x15f)](_0x252fc5=>colorizeJSONCompact(_0x252fc5,_0x33594d));return'['+_0x1abbd2[_0x53a075(0x14e)](',')+']';}if(typeof _0x4f4ca6===_0x53a075(0x14b)){const _0x1d804e=Object['entries'](_0x4f4ca6);if(_0x1d804e[_0x53a075(0x158)]===0x0)return'{}';const _0x401631=_0x1d804e[_0x53a075(0x15f)](([_0x40b05a,_0x49a6e5])=>{const _0x63b615=_0x53a075,_0x625dc1=colorJSONKey(JSON[_0x63b615(0x15c)](_0x40b05a),_0x33594d),_0x4dbd9e=colorizeJSONCompact(_0x49a6e5,_0x33594d);return _0x625dc1+':'+_0x4dbd9e;});return'{'+_0x401631[_0x53a075(0x14e)](',')+'}';}return String(_0x4f4ca6);}export function colorizeJSON(_0x3dec0a,_0xb2ac63={},_0x577d61=0x0){const _0x4a80df=a230_0x2300;if(!shouldUseColor(_0xb2ac63))return JSON[_0x4a80df(0x15c)](_0x3dec0a,null,0x2);const _0x116c24='\x20'[_0x4a80df(0x161)](_0x577d61),_0xcab960=_0x577d61+0x2;if(_0x3dec0a===null)return colorJSONNull('null',_0xb2ac63);if(typeof _0x3dec0a==='boolean')return colorJSONBoolean(String(_0x3dec0a),_0xb2ac63);if(typeof _0x3dec0a===_0x4a80df(0x15a))return colorJSONNumber(String(_0x3dec0a),_0xb2ac63);if(typeof _0x3dec0a===_0x4a80df(0x150))return colorJSONString(JSON[_0x4a80df(0x15c)](_0x3dec0a),_0xb2ac63);if(Array[_0x4a80df(0x14c)](_0x3dec0a)){if(_0x3dec0a[_0x4a80df(0x158)]===0x0)return'[]';const _0x194f34=_0x3dec0a[_0x4a80df(0x15f)](_0x182a53=>{const _0x552ec1=_0x4a80df,_0xb6a246=colorizeJSON(_0x182a53,_0xb2ac63,_0xcab960);return''+'\x20'[_0x552ec1(0x161)](_0xcab960)+_0xb6a246;});return'[\x0a'+_0x194f34[_0x4a80df(0x14e)](',\x0a')+('\x0a'+_0x116c24+']');}if(typeof _0x3dec0a===_0x4a80df(0x14b)){const _0x4770af=Object[_0x4a80df(0x159)](_0x3dec0a);if(_0x4770af[_0x4a80df(0x158)]===0x0)return'{}';const _0x1907b7=_0x4770af['map'](([_0xdfb3bf,_0x4a918c])=>{const _0x342e38=colorJSONKey(JSON['stringify'](_0xdfb3bf),_0xb2ac63),_0x5cb1b5=colorizeJSON(_0x4a918c,_0xb2ac63,_0xcab960);return''+'\x20'['repeat'](_0xcab960)+_0x342e38+':\x20'+_0x5cb1b5;});return'{\x0a'+_0x1907b7[_0x4a80df(0x14e)](',\x0a')+('\x0a'+_0x116c24+'}');}return String(_0x3dec0a);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x456d2d,_0x32626c){const _0x12eea2=a231_0x5bdb,_0x56f379=_0x456d2d();while(!![]){try{const _0x1dbe2b=-parseInt(_0x12eea2(0x1f0))/0x1+parseInt(_0x12eea2(0x1e8))/0x2+-parseInt(_0x12eea2(0x203))/0x3+parseInt(_0x12eea2(0x201))/0x4+-parseInt(_0x12eea2(0x1e9))/0x5*(-parseInt(_0x12eea2(0x1fc))/0x6)+parseInt(_0x12eea2(0x205))/0x7+parseInt(_0x12eea2(0x1fd))/0x8*(parseInt(_0x12eea2(0x1f8))/0x9);if(_0x1dbe2b===_0x32626c)break;else _0x56f379['push'](_0x56f379['shift']());}catch(_0x42427b){_0x56f379['push'](_0x56f379['shift']());}}}(a231_0x46a4,0xd966c));function a231_0x46a4(){const _0x26cd82=['661332YlCJQX','forEach','4293730IRjuRp','\x20\x20...','green','old','length','has','1662220dbGrsG','1592845JRIaPT','split','cyan','added','unshift','push','type','1175415IqJpeN','max','unchanged','removed','join','fill','some','min','157491EPnECi','new','\x20\x20\x20','red','12PSLkXH','40FZTmDI','add','\x20-\x20','repeat','468808HuuRNg','content'];a231_0x46a4=function(){return _0x26cd82;};return a231_0x46a4();}import a231_0x42b661 from'chalk';export function generateDiff(_0x2cb868,_0x2aacc5){const _0x486ca9=a231_0x5bdb,_0x204a77=_0x2cb868[_0x486ca9(0x1ea)]('\x0a'),_0x52ce5e=_0x2aacc5[_0x486ca9(0x1ea)]('\x0a'),_0x2adce9=[],_0x57ca59=computeLCS(_0x204a77,_0x52ce5e);let _0x12a602=0x0,_0x36c322=0x0,_0x1ce7a2=0x0;while(_0x12a602<_0x204a77['length']||_0x36c322<_0x52ce5e['length']){if(_0x1ce7a2<_0x57ca59[_0x486ca9(0x209)]&&_0x12a602<_0x204a77['length']&&_0x204a77[_0x12a602]===_0x57ca59[_0x1ce7a2])_0x36c322<_0x52ce5e[_0x486ca9(0x209)]&&_0x52ce5e[_0x36c322]===_0x57ca59[_0x1ce7a2]?(_0x2adce9['push']({'type':_0x486ca9(0x1f2),'content':_0x204a77[_0x12a602]}),_0x12a602++,_0x36c322++,_0x1ce7a2++):(_0x2adce9[_0x486ca9(0x1ee)]({'type':_0x486ca9(0x1ec),'content':_0x52ce5e[_0x36c322]}),_0x36c322++);else{if(_0x1ce7a2<_0x57ca59['length']&&_0x36c322<_0x52ce5e[_0x486ca9(0x209)]&&_0x52ce5e[_0x36c322]===_0x57ca59[_0x1ce7a2])_0x2adce9['push']({'type':_0x486ca9(0x1f3),'content':_0x204a77[_0x12a602]}),_0x12a602++;else{if(_0x12a602<_0x204a77[_0x486ca9(0x209)]&&(_0x1ce7a2>=_0x57ca59[_0x486ca9(0x209)]||_0x204a77[_0x12a602]!==_0x57ca59[_0x1ce7a2]))_0x2adce9[_0x486ca9(0x1ee)]({'type':_0x486ca9(0x1f3),'content':_0x204a77[_0x12a602]}),_0x12a602++;else _0x36c322<_0x52ce5e[_0x486ca9(0x209)]&&(_0x2adce9[_0x486ca9(0x1ee)]({'type':_0x486ca9(0x1ec),'content':_0x52ce5e[_0x36c322]}),_0x36c322++);}}}return _0x2adce9;}function computeLCS(_0x4e27ae,_0x3521ce){const _0x519741=a231_0x5bdb,_0x44abad=_0x4e27ae[_0x519741(0x209)],_0x29e26e=_0x3521ce[_0x519741(0x209)],_0x4b4fce=Array(_0x44abad+0x1)[_0x519741(0x1f5)](null)['map'](()=>Array(_0x29e26e+0x1)[_0x519741(0x1f5)](0x0));for(let _0x4ed723=0x1;_0x4ed723<=_0x44abad;_0x4ed723++){for(let _0x201edd=0x1;_0x201edd<=_0x29e26e;_0x201edd++){_0x4e27ae[_0x4ed723-0x1]===_0x3521ce[_0x201edd-0x1]?_0x4b4fce[_0x4ed723][_0x201edd]=_0x4b4fce[_0x4ed723-0x1][_0x201edd-0x1]+0x1:_0x4b4fce[_0x4ed723][_0x201edd]=Math[_0x519741(0x1f1)](_0x4b4fce[_0x4ed723-0x1][_0x201edd],_0x4b4fce[_0x4ed723][_0x201edd-0x1]);}}const _0x4b0777=[];let _0x4159b1=_0x44abad,_0x2ed17e=_0x29e26e;while(_0x4159b1>0x0&&_0x2ed17e>0x0){if(_0x4e27ae[_0x4159b1-0x1]===_0x3521ce[_0x2ed17e-0x1])_0x4b0777[_0x519741(0x1ed)](_0x4e27ae[_0x4159b1-0x1]),_0x4159b1--,_0x2ed17e--;else _0x4b4fce[_0x4159b1-0x1][_0x2ed17e]>_0x4b4fce[_0x4159b1][_0x2ed17e-0x1]?_0x4159b1--:_0x2ed17e--;}return _0x4b0777;}export function formatDiffWithColors(_0x29493c,_0x4876f5=0x3){const _0x38975c=a231_0x5bdb,_0x28c00a=new Set();_0x29493c[_0x38975c(0x204)]((_0x487942,_0x31d711)=>{const _0x3f5057=_0x38975c;_0x487942[_0x3f5057(0x1ef)]!=='unchanged'&&_0x28c00a[_0x3f5057(0x1fe)](_0x31d711);});if(_0x28c00a['size']===0x0)return'';const _0x11a50c=new Set();for(const _0x5057e4 of _0x28c00a){for(let _0x54900f=Math['max'](0x0,_0x5057e4-_0x4876f5);_0x54900f<=Math[_0x38975c(0x1f7)](_0x29493c[_0x38975c(0x209)]-0x1,_0x5057e4+_0x4876f5);_0x54900f++){_0x11a50c[_0x38975c(0x1fe)](_0x54900f);}}const _0x4306df=[];let _0x162441=-0x1;const _0x346c3b=_0x29493c[_0x38975c(0x209)],_0x378cc4=Math['max'](0x3,String(_0x346c3b)[_0x38975c(0x209)]),_0x492bab=[];let _0x5e0160=0x0,_0x920cc5=0x0;for(const _0x29eb7b of _0x29493c){if(_0x29eb7b[_0x38975c(0x1ef)]==='removed')_0x5e0160++,_0x492bab[_0x38975c(0x1ee)]({'old':_0x5e0160,'new':0x0});else _0x29eb7b[_0x38975c(0x1ef)]==='added'?(_0x920cc5++,_0x492bab['push']({'old':0x0,'new':_0x920cc5})):(_0x5e0160++,_0x920cc5++,_0x492bab[_0x38975c(0x1ee)]({'old':_0x5e0160,'new':_0x920cc5}));}for(let _0x181a70=0x0;_0x181a70<_0x29493c[_0x38975c(0x209)];_0x181a70++){if(!_0x11a50c[_0x38975c(0x1e7)](_0x181a70))continue;_0x162441!==-0x1&&_0x181a70>_0x162441+0x1&&_0x4306df['push'](a231_0x42b661[_0x38975c(0x1eb)](_0x38975c(0x206)));_0x162441=_0x181a70;const _0x2c3431=_0x29493c[_0x181a70],_0xba2315=_0x492bab[_0x181a70],_0x28821d=_0xba2315[_0x38975c(0x208)]>0x0?String(_0xba2315[_0x38975c(0x208)])['padStart'](_0x378cc4):'\x20'[_0x38975c(0x200)](_0x378cc4),_0x50473e=_0xba2315[_0x38975c(0x1f9)]>0x0?String(_0xba2315['new'])['padStart'](_0x378cc4):'\x20'['repeat'](_0x378cc4);switch(_0x2c3431[_0x38975c(0x1ef)]){case _0x38975c(0x1f3):_0x4306df[_0x38975c(0x1ee)](a231_0x42b661[_0x38975c(0x1fb)](_0x28821d+'\x20'+_0x50473e+_0x38975c(0x1ff)+_0x2c3431[_0x38975c(0x202)]));break;case _0x38975c(0x1ec):_0x4306df[_0x38975c(0x1ee)](a231_0x42b661[_0x38975c(0x207)](_0x28821d+'\x20'+_0x50473e+'\x20+\x20'+_0x2c3431['content']));break;default:_0x4306df[_0x38975c(0x1ee)](a231_0x42b661['dim'](_0x28821d+'\x20'+_0x50473e+_0x38975c(0x1fa)+_0x2c3431[_0x38975c(0x202)]));break;}}return _0x4306df[_0x38975c(0x1f4)]('\x0a');}function a231_0x5bdb(_0x18114c,_0x4a7baf){_0x18114c=_0x18114c-0x1e7;const _0x46a48a=a231_0x46a4();let _0x5bdbbe=_0x46a48a[_0x18114c];return _0x5bdbbe;}export function hasChanges(_0x1e48a2){const _0x17df3f=a231_0x5bdb;return _0x1e48a2[_0x17df3f(0x1f6)](_0x10b362=>_0x10b362['type']!==_0x17df3f(0x1f2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43f3e0,_0x290d2a){const _0xbc06bf=a232_0x13dd,_0x383e20=_0x43f3e0();while(!![]){try{const _0x203384=parseInt(_0xbc06bf(0x196))/0x1+parseInt(_0xbc06bf(0x198))/0x2*(-parseInt(_0xbc06bf(0x197))/0x3)+parseInt(_0xbc06bf(0x19d))/0x4*(parseInt(_0xbc06bf(0x199))/0x5)+parseInt(_0xbc06bf(0x19b))/0x6+parseInt(_0xbc06bf(0x192))/0x7+-parseInt(_0xbc06bf(0x1a3))/0x8*(-parseInt(_0xbc06bf(0x194))/0x9)+parseInt(_0xbc06bf(0x190))/0xa*(-parseInt(_0xbc06bf(0x193))/0xb);if(_0x203384===_0x290d2a)break;else _0x383e20['push'](_0x383e20['shift']());}catch(_0x53f67d){_0x383e20['push'](_0x383e20['shift']());}}}(a232_0xa46b,0xa8882));import*as a232_0x4cb015 from'node:fs';function a232_0x13dd(_0xddd182,_0x32a0cd){_0xddd182=_0xddd182-0x190;const _0xa46bd3=a232_0xa46b();let _0x13dd94=_0xa46bd3[_0xddd182];return _0x13dd94;}import*as a232_0x26ce1c from'node:path';export function setSecureFilePermissions(_0x305923){const _0x1f13bc=a232_0x13dd;try{a232_0x4cb015[_0x1f13bc(0x195)](_0x305923,0x180);}catch{console[_0x1f13bc(0x19c)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x305923);}}function a232_0xa46b(){const _0xb869=['mkdirSync','Warning:\x20','5343736HBjFCq','existsSync','statSync','21659590fKdphm',').\x20','2096150tSdUrU','11qWAsgB','9cgjuUT','chmodSync','275262vmiXwI','36CdphIP','6588VgFsCR','10IVKeEQ','writeFileSync','7872936mdhozL','warn','681916VLbdLd','Should\x20be\x200600\x20or\x20more\x20restrictive.','mode','\x20has\x20insecure\x20permissions\x20('];a232_0xa46b=function(){return _0xb869;};return a232_0xa46b();}export function setSecureDirectoryPermissions(_0x16f40b){const _0x37ed29=a232_0x13dd;try{a232_0x4cb015[_0x37ed29(0x195)](_0x16f40b,0x1c0);}catch{console['warn']('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x16f40b);}}export function createSecureDirectory(_0x5cc633){const _0x3775ae=a232_0x13dd;!a232_0x4cb015[_0x3775ae(0x1a4)](_0x5cc633)&&(a232_0x4cb015[_0x3775ae(0x1a1)](_0x5cc633,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x5cc633));}export function validateSecureFilePermissions(_0x2d1450){const _0x110b97=a232_0x13dd;try{const _0x2c6ec1=a232_0x4cb015[_0x110b97(0x1a5)](_0x2d1450),_0x53f953=_0x2c6ec1[_0x110b97(0x19f)]&0x1ff,_0x20f64c=(_0x53f953&0x3f)!==0x0;if(_0x20f64c)return console[_0x110b97(0x19c)](_0x110b97(0x1a2)+_0x2d1450+_0x110b97(0x1a0)+_0x53f953['toString'](0x8)+_0x110b97(0x191)+_0x110b97(0x19e)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x230ac0,_0xd3322f){const _0x1eb1c7=a232_0x13dd,_0x5f5a87=a232_0x26ce1c['dirname'](_0x230ac0);createSecureDirectory(_0x5f5a87),a232_0x4cb015[_0x1eb1c7(0x19a)](_0x230ac0,_0xd3322f,{'mode':0x180}),setSecureFilePermissions(_0x230ac0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d332e,_0x5655d6){const _0x5cb40f=a233_0x1657,_0x15a8cc=_0x5d332e();while(!![]){try{const _0x2e9d81=-parseInt(_0x5cb40f(0x121))/0x1+parseInt(_0x5cb40f(0x12e))/0x2+parseInt(_0x5cb40f(0x123))/0x3*(-parseInt(_0x5cb40f(0x131))/0x4)+parseInt(_0x5cb40f(0x12f))/0x5+-parseInt(_0x5cb40f(0x120))/0x6*(parseInt(_0x5cb40f(0x12c))/0x7)+-parseInt(_0x5cb40f(0x12d))/0x8*(parseInt(_0x5cb40f(0x124))/0x9)+-parseInt(_0x5cb40f(0x12a))/0xa*(-parseInt(_0x5cb40f(0x122))/0xb);if(_0x2e9d81===_0x5655d6)break;else _0x15a8cc['push'](_0x15a8cc['shift']());}catch(_0xf39e48){_0x15a8cc['push'](_0x15a8cc['shift']());}}}(a233_0x49c5,0x3470a));import{readFileSync}from'fs';function a233_0x49c5(){const _0x4ae5f=['message','35jNMDcW','129432fsjrMB','830900dDYmsa','484000cMIHch','utf-8','940MgTzcH','\x27:\x20','374262TlxbGz','162817PAFRFG','319mqGBUu','1842NgBOGh','126BpETyz','File\x20\x27','Error\x20reading\x20file\x20\x27','PERMISSION_DENIED','EACCES','Permission\x20denied\x20reading\x20file\x20\x27','188980vAkrpT'];a233_0x49c5=function(){return _0x4ae5f;};return a233_0x49c5();}function a233_0x1657(_0x2780ba,_0x9392bb){_0x2780ba=_0x2780ba-0x11f;const _0x49c5c4=a233_0x49c5();let _0x165747=_0x49c5c4[_0x2780ba];return _0x165747;}import{SDKError,ErrorCode}from'../sdk/errors.js';export function readFileContent(_0x3fb28b){const _0xd8253d=a233_0x1657;try{return readFileSync(_0x3fb28b,_0xd8253d(0x130));}catch(_0x3e3938){const _0x1c3f0d=_0x3e3938['code'];if(_0x1c3f0d==='ENOENT')throw new SDKError(ErrorCode['NOT_FOUND'],_0xd8253d(0x125)+_0x3fb28b+'\x27\x20not\x20found',_0x3e3938);else{if(_0x1c3f0d===_0xd8253d(0x128))throw new SDKError(ErrorCode[_0xd8253d(0x127)],_0xd8253d(0x129)+_0x3fb28b+'\x27',_0x3e3938);else throw new SDKError(ErrorCode['INTERNAL'],_0xd8253d(0x126)+_0x3fb28b+_0xd8253d(0x11f)+_0x3e3938[_0xd8253d(0x12b)],_0x3e3938);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45b8ae,_0x55c88f){const _0x439d73=a234_0x1e37,_0x353053=_0x45b8ae();while(!![]){try{const _0x13e674=-parseInt(_0x439d73(0x1a3))/0x1*(parseInt(_0x439d73(0x1ac))/0x2)+-parseInt(_0x439d73(0x19c))/0x3*(parseInt(_0x439d73(0x197))/0x4)+parseInt(_0x439d73(0x1aa))/0x5+-parseInt(_0x439d73(0x195))/0x6+parseInt(_0x439d73(0x1a5))/0x7+-parseInt(_0x439d73(0x193))/0x8+parseInt(_0x439d73(0x1a9))/0x9;if(_0x13e674===_0x55c88f)break;else _0x353053['push'](_0x353053['shift']());}catch(_0x3ac71c){_0x353053['push'](_0x353053['shift']());}}}(a234_0x8ab2,0x89308));import*as a234_0x2ab036 from'node:https';function a234_0x1e37(_0x22c405,_0x1d9660){_0x22c405=_0x22c405-0x191;const _0x8ab246=a234_0x8ab2();let _0x1e37df=_0x8ab246[_0x22c405];return _0x1e37df;}const REQUEST_TIMEOUT_MS=0x2710,CACHE_TTL_MS=0x5*0x3c*0x3e8,cache=new Map();function a234_0x8ab2(){const _0x44d188=['GitHub\x20API\x20returned\x20','6463068tGLVQq','tag_name','24692aCexud','/repos/','releases','parse','destroy','66YqxXdr','end','slice','timeout','resolve','/releases?per_page=20','error','70666RWiAMq','get','4724405JaAkLO','api.github.com','application/vnd.github+json','GitHub\x20API\x20request\x20timed\x20out\x20after\x20','3263022biOvrS','5514020oLyctP','length','6MzLFtp','now','toString','data','set','fetchedAt','1226936fQTGwg'];a234_0x8ab2=function(){return _0x44d188;};return a234_0x8ab2();}export function fetchGitHubReleases(_0x41c30b,_0x1cb355,_0xc61b1f){const _0x1917ce=a234_0x1e37,_0x21d9e6=_0x41c30b+'/'+_0x1cb355,_0x543e29=cache[_0x1917ce(0x1a4)](_0x21d9e6);if(_0x543e29&&Date[_0x1917ce(0x1ad)]()-_0x543e29[_0x1917ce(0x192)]<CACHE_TTL_MS)return Promise[_0x1917ce(0x1a0)](_0x543e29[_0x1917ce(0x199)]);return new Promise((_0x456cf1,_0x697375)=>{const _0x15ecef=_0x1917ce,_0x2d7fe4={'hostname':_0x15ecef(0x1a6),'path':_0x15ecef(0x198)+_0x41c30b+'/'+_0x1cb355+_0x15ecef(0x1a1),'headers':{'User-Agent':_0xc61b1f,'Accept':_0x15ecef(0x1a7)},'timeout':REQUEST_TIMEOUT_MS},_0x359f7f=a234_0x2ab036[_0x15ecef(0x1a4)](_0x2d7fe4,_0x4e24a9=>{const _0x126fc4=_0x15ecef;let _0x3e0bbd='';_0x4e24a9['on'](_0x126fc4(0x1af),_0x4f99f0=>{const _0x1bf1c0=_0x126fc4;_0x3e0bbd+=_0x4f99f0[_0x1bf1c0(0x1ae)]();}),_0x4e24a9['on'](_0x126fc4(0x19d),()=>{const _0x5e10c9=_0x126fc4;if(_0x4e24a9['statusCode']!==0xc8){_0x697375(new Error(_0x5e10c9(0x194)+_0x4e24a9['statusCode']+':\x20'+_0x3e0bbd[_0x5e10c9(0x19e)](0x0,0xc8)));return;}try{const _0x233311=JSON[_0x5e10c9(0x19a)](_0x3e0bbd);cache[_0x5e10c9(0x191)](_0x21d9e6,{'releases':_0x233311,'fetchedAt':Date[_0x5e10c9(0x1ad)]()}),_0x456cf1(_0x233311);}catch(_0x5ce5fe){_0x697375(_0x5ce5fe);}});});_0x359f7f['on'](_0x15ecef(0x19f),()=>{const _0x445f98=_0x15ecef;_0x359f7f[_0x445f98(0x19b)](),_0x697375(new Error(_0x445f98(0x1a8)+REQUEST_TIMEOUT_MS+'ms'));}),_0x359f7f['on'](_0x15ecef(0x1a2),_0x697375);});}export async function resolveReleaseTag(_0xe6b0a6,_0x54f8ec,_0x2b484f,_0x24f5d9){const _0x22a7ac=a234_0x1e37;if(_0xe6b0a6==='next')return null;const _0x57e93f=await fetchGitHubReleases(_0x54f8ec,_0x2b484f,_0x24f5d9);if(_0x57e93f[_0x22a7ac(0x1ab)]===0x0)return null;const _0x276596=_0x57e93f['find'](_0x590e11=>!_0x590e11['prerelease']);return _0x276596?_0x276596[_0x22a7ac(0x196)]:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a235_0x206e(){const _0x47a6e2=['{profile}','Global\x20cache\x20key\x20\x22','utf-8','replace','6zAKLed','4056565otXaAO','275492aKRIWg','36szjFoI','3579YbqLve','.cache','4836195fvFEPb','39qfbQfz','trim','\x22\x20already\x20registered\x20by\x20\x22','default','4589790YmpmBW','stringify','4353048RwtmTH','clear','4225396cabrET','get','parse'];a235_0x206e=function(){return _0x47a6e2;};return a235_0x206e();}(function(_0x44d9ac,_0x1fc2d8){const _0x248688=a235_0x51d1,_0x153734=_0x44d9ac();while(!![]){try{const _0x108619=-parseInt(_0x248688(0x1c2))/0x1*(parseInt(_0x248688(0x1c1))/0x2)+-parseInt(_0x248688(0x1c5))/0x3*(parseInt(_0x248688(0x1c0))/0x4)+parseInt(_0x248688(0x1bf))/0x5*(parseInt(_0x248688(0x1be))/0x6)+-parseInt(_0x248688(0x1b7))/0x7+parseInt(_0x248688(0x1cb))/0x8+parseInt(_0x248688(0x1c4))/0x9+parseInt(_0x248688(0x1c9))/0xa;if(_0x108619===_0x1fc2d8)break;else _0x153734['push'](_0x153734['shift']());}catch(_0x512995){_0x153734['push'](_0x153734['shift']());}}}(a235_0x206e,0xc079b));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x10a75a=a235_0x51d1;return process.env.TDX_CACHE_DIR||join(homedir(),_0x10a75a(0x1c3),'tdx');}const registry=new Map();function a235_0x51d1(_0x3968a4,_0x46ff5f){_0x3968a4=_0x3968a4-0x1b7;const _0x206ec0=a235_0x206e();let _0x51d11c=_0x206ec0[_0x3968a4];return _0x51d11c;}export function registerGlobalCacheKey(_0xef2b3c,_0xc43132){const _0x4d904e=a235_0x51d1,_0x4225f7=registry[_0x4d904e(0x1b8)](_0xef2b3c);if(_0x4225f7&&_0x4225f7!==_0xc43132)throw new Error(_0x4d904e(0x1bb)+_0xef2b3c+_0x4d904e(0x1c7)+_0x4225f7+'\x22,\x20cannot\x20register\x20for\x20\x22'+_0xc43132+'\x22');registry['set'](_0xef2b3c,_0xc43132);}export function getGlobalCachePath(_0x5db8c7){return join(getGlobalCacheDir(),_0x5db8c7);}function ensureGlobalCacheDir(){const _0x2fd98b=getGlobalCacheDir();!existsSync(_0x2fd98b)&&mkdirSync(_0x2fd98b,{'recursive':!![]});}function readCacheJson(_0x3893af){const _0x5057c6=a235_0x51d1,_0x244749=getGlobalCachePath(_0x3893af);if(!existsSync(_0x244749))return undefined;try{const _0x240c87=readFileSync(_0x244749,'utf-8');return JSON[_0x5057c6(0x1b9)](_0x240c87);}catch{return undefined;}}function writeCacheJson(_0x1d49f3,_0xe488d4){const _0x65a945=a235_0x51d1;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x1d49f3),JSON[_0x65a945(0x1ca)](_0xe488d4,null,0x2),_0x65a945(0x1bc));}function readCacheText(_0x54dc51){const _0x47fcad=a235_0x51d1,_0xcbc3d0=getGlobalCachePath(_0x54dc51);if(!existsSync(_0xcbc3d0))return undefined;try{return readFileSync(_0xcbc3d0,_0x47fcad(0x1bc));}catch{return undefined;}}function writeCacheText(_0x1b6368,_0x4205ff){const _0x2f5901=a235_0x51d1;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x1b6368),_0x4205ff,_0x2f5901(0x1bc));}function clearCache(_0x5bcc24){const _0x1b8368=getGlobalCachePath(_0x5bcc24);if(existsSync(_0x1b8368))try{unlinkSync(_0x1b8368);}catch{}}function cacheExists(_0x2de0a3){return existsSync(getGlobalCachePath(_0x2de0a3));}export function createGlobalCache(_0x5e4d5f,_0x22ae7e){return registerGlobalCacheKey(_0x5e4d5f,_0x22ae7e),{'read':()=>readCacheJson(_0x5e4d5f),'write':_0x5dff3d=>writeCacheJson(_0x5e4d5f,_0x5dff3d),'clear':()=>clearCache(_0x5e4d5f),'exists':()=>cacheExists(_0x5e4d5f),'path':()=>getGlobalCachePath(_0x5e4d5f)};}export function createGlobalTextCache(_0x1f143c,_0x4d59f5){const _0x3d92f0=a235_0x51d1;return registerGlobalCacheKey(_0x1f143c,_0x4d59f5),{'read':()=>readCacheText(_0x1f143c)?.[_0x3d92f0(0x1c6)]()||undefined,'write':_0x4f51ff=>writeCacheText(_0x1f143c,_0x4f51ff),'clear':()=>clearCache(_0x1f143c),'exists':()=>cacheExists(_0x1f143c),'path':()=>getGlobalCachePath(_0x1f143c)};}export function createProfileCache(_0x1fc3b0,_0x8875bc){const _0x5d31b5=_0x508b4e=>{const _0x5263b5=a235_0x51d1,_0x203e0b=_0x508b4e||_0x5263b5(0x1c8);return _0x1fc3b0[_0x5263b5(0x1bd)](_0x5263b5(0x1ba),_0x203e0b);};return{'read':_0x42c5fd=>{const _0x2e11d4=_0x5d31b5(_0x42c5fd);return registerGlobalCacheKey(_0x2e11d4,_0x8875bc),readCacheJson(_0x2e11d4);},'write':(_0x4fa839,_0x22bc90)=>{const _0x100abd=_0x5d31b5(_0x4fa839);registerGlobalCacheKey(_0x100abd,_0x8875bc),writeCacheJson(_0x100abd,_0x22bc90);},'clear':_0x1a883f=>{const _0x2777b2=_0x5d31b5(_0x1a883f);clearCache(_0x2777b2);},'exists':_0x3608ef=>{const _0x2c42f7=_0x5d31b5(_0x3608ef);return cacheExists(_0x2c42f7);},'path':_0x419569=>{const _0x2aff72=_0x5d31b5(_0x419569);return getGlobalCachePath(_0x2aff72);}};}export function createOptionalProfileCache(_0x245b70,_0x2a2a62,_0x4e60a4={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x4e60a4,_0x35cbe5=_0x5d00e0=>{return _0x5d00e0?''+_0x245b70+profileSeparator+_0x5d00e0+suffix:''+_0x245b70+suffix;};return{'read':_0x58cf3f=>{const _0x872b14=_0x35cbe5(_0x58cf3f);return registerGlobalCacheKey(_0x872b14,_0x2a2a62),readCacheJson(_0x872b14);},'write':(_0x3248ac,_0xfaa95f)=>{const _0x1fe88f=_0x35cbe5(_0xfaa95f);registerGlobalCacheKey(_0x1fe88f,_0x2a2a62),writeCacheJson(_0x1fe88f,_0x3248ac);},'clear':_0x35b4e5=>{const _0x1ada9a=_0x35cbe5(_0x35b4e5);clearCache(_0x1ada9a);},'exists':_0x15d0c1=>{const _0x524689=_0x35cbe5(_0x15d0c1);return cacheExists(_0x524689);},'path':_0x854e=>{const _0x4df13f=_0x35cbe5(_0x854e);return getGlobalCachePath(_0x4df13f);}};}export function clearGlobalRegistry(){const _0x450863=a235_0x51d1;registry[_0x450863(0x1cc)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x402672,_0x52679c){const _0x3bc599=a236_0x45d2,_0x27d4f7=_0x402672();while(!![]){try{const _0x4ced70=-parseInt(_0x3bc599(0x117))/0x1*(-parseInt(_0x3bc599(0x11a))/0x2)+parseInt(_0x3bc599(0x11e))/0x3*(-parseInt(_0x3bc599(0x119))/0x4)+parseInt(_0x3bc599(0x11f))/0x5+-parseInt(_0x3bc599(0x11d))/0x6*(-parseInt(_0x3bc599(0x124))/0x7)+parseInt(_0x3bc599(0x128))/0x8+parseInt(_0x3bc599(0x11c))/0x9+-parseInt(_0x3bc599(0x116))/0xa;if(_0x4ced70===_0x52679c)break;else _0x27d4f7['push'](_0x27d4f7['shift']());}catch(_0x34c31b){_0x27d4f7['push'](_0x27d4f7['shift']());}}}(a236_0x1c14,0xd1d12));import{readFile}from'fs/promises';function a236_0x45d2(_0x37ce26,_0x540057){_0x37ce26=_0x37ce26-0x112;const _0x1c1476=a236_0x1c14();let _0x45d2ea=_0x1c1476[_0x37ce26];return _0x45d2ea;}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0xd2b9e5,_0x1d1583){const _0x37d075=a236_0x45d2;try{if(_0x1d1583){const _0x4b4cab=await readFile(_0xd2b9e5,'utf-8');try{return JSON[_0x37d075(0x115)](_0x4b4cab);}catch(_0x36a14a){throw new SDKError(ErrorCode[_0x37d075(0x114)],_0x37d075(0x129)+_0xd2b9e5+_0x37d075(0x127)+(_0x36a14a instanceof Error?_0x36a14a[_0x37d075(0x125)]:String(_0x36a14a)));}}else try{return JSON[_0x37d075(0x115)](_0xd2b9e5);}catch(_0x37ed48){throw new SDKError(ErrorCode[_0x37d075(0x114)],'Invalid\x20JSON\x20string:\x20'+(_0x37ed48 instanceof Error?_0x37ed48[_0x37d075(0x125)]:String(_0x37ed48)));}}catch(_0x480190){if(_0x480190 instanceof SDKError)throw _0x480190;if(_0x480190 instanceof Error&&_0x37d075(0x123)in _0x480190){const _0xb19bc6=_0x480190;if(_0xb19bc6[_0x37d075(0x123)]===_0x37d075(0x11b))throw new SDKError(ErrorCode[_0x37d075(0x121)],_0x37d075(0x122)+_0xd2b9e5);else{if(_0xb19bc6['code']===_0x37d075(0x113))throw new SDKError(ErrorCode[_0x37d075(0x118)],_0x37d075(0x12a)+_0xd2b9e5);}}throw new SDKError(ErrorCode[_0x37d075(0x112)],_0x37d075(0x126)+(_0x480190 instanceof Error?_0x480190[_0x37d075(0x125)]:String(_0x480190)));}}function a236_0x1c14(){const _0x128e9d=['EACCES','INVALID_ARGUMENT','parse','14034320ybhpyY','11ApWMQi','PERMISSION_DENIED','774028NhkMzM','8348MEoiYr','ENOENT','3092148DAnGbU','930UDBAAS','3dEqWKU','3397275dBXLHY','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','NOT_FOUND','File\x20not\x20found:\x20','code','40201BBwAse','message','Failed\x20to\x20load\x20JSON:\x20','\x27:\x20','3977944RfvHcK','Invalid\x20JSON\x20in\x20file\x20\x27','Permission\x20denied\x20reading\x20file:\x20','INTERNAL'];a236_0x1c14=function(){return _0x128e9d;};return a236_0x1c14();}export async function loadJSONFromOptions(_0x62ed92,_0x2ec235){const _0x3a8341=a236_0x45d2;if(_0x62ed92&&_0x2ec235)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x3a8341(0x120));if(_0x62ed92)return await loadJSON(_0x62ed92,![]);if(_0x2ec235)return await loadJSON(_0x2ec235,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x306bca,_0x45964){const _0x166330=a237_0xcf1c,_0x26d03e=_0x306bca();while(!![]){try{const _0x33de8b=parseInt(_0x166330(0xc6))/0x1+parseInt(_0x166330(0xc0))/0x2*(-parseInt(_0x166330(0xbb))/0x3)+parseInt(_0x166330(0xc1))/0x4*(-parseInt(_0x166330(0xb8))/0x5)+parseInt(_0x166330(0xbc))/0x6*(-parseInt(_0x166330(0xbf))/0x7)+parseInt(_0x166330(0xb7))/0x8*(-parseInt(_0x166330(0xc2))/0x9)+-parseInt(_0x166330(0xc5))/0xa+parseInt(_0x166330(0xbd))/0xb;if(_0x33de8b===_0x45964)break;else _0x26d03e['push'](_0x26d03e['shift']());}catch(_0x45cf33){_0x26d03e['push'](_0x26d03e['shift']());}}}(a237_0x5e43,0x2358d));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join,parse}from'path';import{homedir}from'os';const LOCAL_CACHE_DIR='.cache/tdx',registry=new Map();export function registerCacheKey(_0x4e6054,_0x359612){const _0x5c48dc=a237_0xcf1c,_0x4c5e2f=registry[_0x5c48dc(0xc4)](_0x4e6054);if(_0x4c5e2f&&_0x4c5e2f!==_0x359612)throw new Error(_0x5c48dc(0xba)+_0x4e6054+_0x5c48dc(0xb9)+_0x4c5e2f+'\x22,\x20cannot\x20register\x20for\x20\x22'+_0x359612+'\x22');registry[_0x5c48dc(0xbe)](_0x4e6054,_0x359612);}export function getCacheDir(){const _0x5f27d2=process['cwd'](),_0x3f54ee=_0x5f27d2===parse(_0x5f27d2)['root']?homedir():_0x5f27d2;return join(_0x3f54ee,LOCAL_CACHE_DIR);}export function getCachePath(_0x51b661){return join(getCacheDir(),_0x51b661);}function ensureCacheDir(){const _0x2b5d59=getCacheDir();!existsSync(_0x2b5d59)&&mkdirSync(_0x2b5d59,{'recursive':!![]});}function readCacheJson(_0x3b2eeb){const _0x522178=getCachePath(_0x3b2eeb);if(!existsSync(_0x522178))return undefined;try{const _0x2507ce=readFileSync(_0x522178,'utf-8');return JSON['parse'](_0x2507ce);}catch{return undefined;}}function writeCacheJson(_0x4b3e2c,_0x27295f){const _0xd36cbd=a237_0xcf1c;ensureCacheDir(),writeFileSync(getCachePath(_0x4b3e2c),JSON['stringify'](_0x27295f,null,0x2),_0xd36cbd(0xc3));}function readCacheText(_0x345028){const _0x5b9c8f=a237_0xcf1c,_0x190296=getCachePath(_0x345028);if(!existsSync(_0x190296))return undefined;try{return readFileSync(_0x190296,_0x5b9c8f(0xc3));}catch{return undefined;}}function writeCacheText(_0x5dd8d6,_0x4d1b49){const _0x243937=a237_0xcf1c;ensureCacheDir(),writeFileSync(getCachePath(_0x5dd8d6),_0x4d1b49,_0x243937(0xc3));}function a237_0x5e43(){const _0x20bd8c=['48nhPxgZ','13194WmsZBX','13129754WSRFqh','set','259NwpEHV','30748NFONuD','10532Cywaye','18495LbWdRk','utf-8','get','2493830EkASih','8385jszCHB','784gRFxOD','530wOAHXv','\x22\x20already\x20registered\x20by\x20\x22','Cache\x20key\x20\x22'];a237_0x5e43=function(){return _0x20bd8c;};return a237_0x5e43();}function a237_0xcf1c(_0x2b1931,_0x191a39){_0x2b1931=_0x2b1931-0xb7;const _0x5e4335=a237_0x5e43();let _0xcf1c14=_0x5e4335[_0x2b1931];return _0xcf1c14;}function clearCache(_0x322441){const _0x7d4555=getCachePath(_0x322441);if(existsSync(_0x7d4555))try{unlinkSync(_0x7d4555);}catch{}}function cacheExists(_0x3eb1ed){return existsSync(getCachePath(_0x3eb1ed));}export function createCache(_0x103133,_0x465bd3){return registerCacheKey(_0x103133,_0x465bd3),{'read':()=>readCacheJson(_0x103133),'write':_0x259734=>writeCacheJson(_0x103133,_0x259734),'clear':()=>clearCache(_0x103133),'exists':()=>cacheExists(_0x103133),'path':()=>getCachePath(_0x103133)};}export function createTextCache(_0x188dbe,_0x511446){return registerCacheKey(_0x188dbe,_0x511446),{'read':()=>readCacheText(_0x188dbe)?.['trim']()||undefined,'write':_0x116496=>writeCacheText(_0x188dbe,_0x116496),'clear':()=>clearCache(_0x188dbe),'exists':()=>cacheExists(_0x188dbe),'path':()=>getCachePath(_0x188dbe)};}export function clearRegistry(){registry['clear']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a238_0x397b89=a238_0x4a90;(function(_0x3a82a1,_0xf4068){const _0x2a3be5=a238_0x4a90,_0x3679d1=_0x3a82a1();while(!![]){try{const _0x5dc716=-parseInt(_0x2a3be5(0xfb))/0x1+-parseInt(_0x2a3be5(0x10f))/0x2+parseInt(_0x2a3be5(0x104))/0x3+-parseInt(_0x2a3be5(0x110))/0x4+parseInt(_0x2a3be5(0xff))/0x5*(-parseInt(_0x2a3be5(0x10e))/0x6)+-parseInt(_0x2a3be5(0x10a))/0x7+parseInt(_0x2a3be5(0x109))/0x8;if(_0x5dc716===_0xf4068)break;else _0x3679d1['push'](_0x3679d1['shift']());}catch(_0x6fa9ad){_0x3679d1['push'](_0x3679d1['shift']());}}}(a238_0x11ea,0x5a952));function a238_0x4a90(_0x57631f,_0xe09a3b){_0x57631f=_0x57631f-0xf9;const _0x11ea44=a238_0x11ea();let _0x4a90b9=_0x11ea44[_0x57631f];return _0x4a90b9;}import a238_0x5a0f69 from'chalk';function a238_0x11ea(){const _0x22f9ca=['1961991PXEWCW','level','Chalk','yellow','INFO','10987616IhAaaQ','1341074zcLKpH','default','timestamp','component','588918npyGcn','1114430dmrKAw','1645152eFkmas','TRACE','red','chalk','colorLevel','398185aqppkr','green','colors','gray','5fjfMnu','blue','message','DEBUG','ERROR'];a238_0x11ea=function(){return _0x22f9ca;};return a238_0x11ea();}import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';const chalkModule=a238_0x5a0f69,ChalkClass=chalkModule[a238_0x397b89(0x106)]||chalkModule[a238_0x397b89(0x10b)]?.[a238_0x397b89(0x106)];export class DefaultLogFormatter{[a238_0x397b89(0xfd)];[a238_0x397b89(0xf9)];constructor(_0x5af8ec={}){const _0x1438e6=a238_0x397b89;this[_0x1438e6(0xfd)]=_0x5af8ec[_0x1438e6(0xfd)]??![],this[_0x1438e6(0xf9)]=_0x5af8ec[_0x1438e6(0xfd)]&&ChalkClass?new ChalkClass({'level':0x3}):a238_0x5a0f69;}['format'](_0x4954e8){const _0x54bf10=a238_0x397b89,_0xa8daa8=formatTimestamp(_0x4954e8[_0x54bf10(0x10c)]),_0x869572=logLevelToString(_0x4954e8[_0x54bf10(0x105)]);if(!this[_0x54bf10(0xfd)])return _0xa8daa8+'\x20['+_0x869572+']\x20['+_0x4954e8[_0x54bf10(0x10d)]+']\x20'+_0x4954e8[_0x54bf10(0x101)];const _0x494b7d=this[_0x54bf10(0xf9)]['dim'](_0xa8daa8),_0x5a5c99=this[_0x54bf10(0xfa)](_0x869572,_0x4954e8['level']),_0x55fcc7=this[_0x54bf10(0xf9)][_0x54bf10(0x100)]('['+_0x4954e8[_0x54bf10(0x10d)]+']');return _0x494b7d+'\x20'+_0x5a5c99+'\x20'+_0x55fcc7+'\x20'+_0x4954e8[_0x54bf10(0x101)];}[a238_0x397b89(0xfa)](_0xf0b30a,_0x448c43){const _0x3e3e3f=a238_0x397b89;switch(_0x448c43){case LogLevel[_0x3e3e3f(0x111)]:return this[_0x3e3e3f(0xf9)][_0x3e3e3f(0xfe)]('['+_0xf0b30a+']');case LogLevel[_0x3e3e3f(0x102)]:return this[_0x3e3e3f(0xf9)][_0x3e3e3f(0xfc)]('['+_0xf0b30a+']');case LogLevel[_0x3e3e3f(0x108)]:return this[_0x3e3e3f(0xf9)]['cyan']('['+_0xf0b30a+']');case LogLevel['WARN']:return this[_0x3e3e3f(0xf9)][_0x3e3e3f(0x107)]('['+_0xf0b30a+']');case LogLevel[_0x3e3e3f(0x103)]:return this['chalk'][_0x3e3e3f(0x112)]('['+_0xf0b30a+']');default:return'['+_0xf0b30a+']';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a239_0x79b1(){var _0x14208a=['18hWuZzf','848145KJkgMx','12gboxyt','404701EIuPBE','1725112KeGxAk','37065nEPnLg','36YmwXdC','52VIKTUk','220969mFOjam','96moBoMW','195950Xzexsh','716eWZJjw'];a239_0x79b1=function(){return _0x14208a;};return a239_0x79b1();}function a239_0x39c3(_0x258fe8,_0xfbfd7b){_0x258fe8=_0x258fe8-0x1d2;var _0x79b16a=a239_0x79b1();var _0x39c33e=_0x79b16a[_0x258fe8];return _0x39c33e;}(function(_0x1e4a86,_0x455e54){var _0x8f0447=a239_0x39c3,_0x314322=_0x1e4a86();while(!![]){try{var _0x88f25=-parseInt(_0x8f0447(0x1d5))/0x1*(-parseInt(_0x8f0447(0x1d9))/0x2)+-parseInt(_0x8f0447(0x1db))/0x3+parseInt(_0x8f0447(0x1d4))/0x4*(-parseInt(_0x8f0447(0x1d3))/0x5)+parseInt(_0x8f0447(0x1dc))/0x6*(-parseInt(_0x8f0447(0x1d6))/0x7)+parseInt(_0x8f0447(0x1d2))/0x8+-parseInt(_0x8f0447(0x1da))/0x9*(-parseInt(_0x8f0447(0x1d8))/0xa)+-parseInt(_0x8f0447(0x1dd))/0xb*(-parseInt(_0x8f0447(0x1d7))/0xc);if(_0x88f25===_0x455e54)break;else _0x314322['push'](_0x314322['shift']());}catch(_0x3f5787){_0x314322['push'](_0x314322['shift']());}}}(a239_0x79b1,0x25e47));export{DefaultLogFormatter}from'./default-formatter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a240_0x4872e2=a240_0x3ee2;(function(_0x2d0f03,_0x387e0e){const _0x9cd1cc=a240_0x3ee2,_0x4912c8=_0x2d0f03();while(!![]){try{const _0x5ad973=parseInt(_0x9cd1cc(0xfa))/0x1*(-parseInt(_0x9cd1cc(0x104))/0x2)+-parseInt(_0x9cd1cc(0xf9))/0x3+parseInt(_0x9cd1cc(0x102))/0x4+-parseInt(_0x9cd1cc(0x105))/0x5+parseInt(_0x9cd1cc(0xff))/0x6+parseInt(_0x9cd1cc(0xfc))/0x7+-parseInt(_0x9cd1cc(0x103))/0x8;if(_0x5ad973===_0x387e0e)break;else _0x4912c8['push'](_0x4912c8['shift']());}catch(_0x36c2fa){_0x4912c8['push'](_0x4912c8['shift']());}}}(a240_0x3642,0x70e44));function a240_0x3ee2(_0x1f1c45,_0x2b92e2){_0x1f1c45=_0x1f1c45-0xf7;const _0x3642af=a240_0x3642();let _0x3ee2a1=_0x3642af[_0x1f1c45];return _0x3ee2a1;}function a240_0x3642(){const _0x4a7466=['2061595WjdWKh','formatter','WARN','useStderr','format','314310lovmzr','359526niozwo','handle','6043905DTZKtG','colors','minLevel','1523484uYNJpl','log','level','2789096wHXZmu','3804672pHqJcC','2CUXtfD'];a240_0x3642=function(){return _0x4a7466;};return a240_0x3642();}import{LogLevel as a240_0x4a7b57}from'../types.js';import{DefaultLogFormatter}from'../formatters/index.js';export class ConsoleHandler{[a240_0x4872e2(0xfe)];[a240_0x4872e2(0xf7)];[a240_0x4872e2(0x106)];constructor(_0x486069={}){const _0x22c0ed=a240_0x4872e2;this['minLevel']=_0x486069['minLevel']??a240_0x4a7b57[_0x22c0ed(0x107)],this['useStderr']=_0x486069['useStderr']??!![],this[_0x22c0ed(0x106)]=new DefaultLogFormatter({'colors':_0x486069[_0x22c0ed(0xfd)]??!![]});}[a240_0x4872e2(0xfb)](_0xdb8f99){const _0x3999ef=a240_0x4872e2;if(_0xdb8f99[_0x3999ef(0x101)]<this[_0x3999ef(0xfe)])return;const _0x58d4fb=this[_0x3999ef(0x106)][_0x3999ef(0xf8)](_0xdb8f99);this[_0x3999ef(0xf7)]&&_0xdb8f99[_0x3999ef(0x101)]>=a240_0x4a7b57[_0x3999ef(0x107)]?console['error'](_0x58d4fb):console[_0x3999ef(0x100)](_0x58d4fb);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a241_0x21872e=a241_0x20ba;function a241_0x20ba(_0x5c39c0,_0x5de0d9){_0x5c39c0=_0x5c39c0-0x9e;const _0x5472d6=a241_0x5472();let _0x20ba20=_0x5472d6[_0x5c39c0];return _0x20ba20;}(function(_0x5057e9,_0x17a4a2){const _0x1922a3=a241_0x20ba,_0x49a39f=_0x5057e9();while(!![]){try{const _0x3a982f=parseInt(_0x1922a3(0xa8))/0x1*(parseInt(_0x1922a3(0xa9))/0x2)+-parseInt(_0x1922a3(0xa4))/0x3+-parseInt(_0x1922a3(0xc1))/0x4*(parseInt(_0x1922a3(0xc0))/0x5)+-parseInt(_0x1922a3(0xaa))/0x6*(-parseInt(_0x1922a3(0xbd))/0x7)+-parseInt(_0x1922a3(0xad))/0x8+-parseInt(_0x1922a3(0xb1))/0x9+-parseInt(_0x1922a3(0xbc))/0xa*(-parseInt(_0x1922a3(0xb5))/0xb);if(_0x3a982f===_0x17a4a2)break;else _0x49a39f['push'](_0x49a39f['shift']());}catch(_0x592db9){_0x49a39f['push'](_0x49a39f['shift']());}}}(a241_0x5472,0x3d3bb));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join,dirname,basename}from'path';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import{Logger}from'../logger.js';function a241_0x5472(){const _0x2ff7f9=['replace','mtime','Warning:\x20Failed\x20to\x20compress\x20','end','10AsLLaH','116578BjjTqN','handle','logBaseName','66695TuWUPR','4RgLTSV','rotate','message','.gz','.log','logs','logStream','logPath','\x5c$&','error','566355WhGZAV','logFileName','tdx.log','rotateOldLogs','69ckyahB','4778hPVjyY','126dennPc','close','includes','2128096FKceTa','filePath','filter','toISOString','162225sVWNZh','format','write','logDir','2446367iXbcOU','split','Warning:\x20Error\x20writing\x20to\x20'];a241_0x5472=function(){return _0x2ff7f9;};return a241_0x5472();}import{getGlobalCacheDir}from'../../global-cache.js';export class FileHandler{[a241_0x21872e(0xa1)];[a241_0x21872e(0xb4)];['logFileName'];[a241_0x21872e(0xbf)];[a241_0x21872e(0xa0)]=null;[a241_0x21872e(0xc2)];constructor(_0x572cdc={}){const _0x553090=a241_0x21872e;this[_0x553090(0xa1)]=_0x572cdc[_0x553090(0xae)]??join(getGlobalCacheDir(),_0x553090(0x9f),_0x553090(0xa6)),this[_0x553090(0xb4)]=dirname(this[_0x553090(0xa1)]),this[_0x553090(0xa5)]=basename(this[_0x553090(0xa1)]),this[_0x553090(0xbf)]=this[_0x553090(0xa5)]['replace'](/\.log$/,''),this[_0x553090(0xc2)]=_0x572cdc[_0x553090(0xc2)]??!![];}async['init'](){const _0xd0403c=a241_0x21872e;try{await mkdir(this[_0xd0403c(0xb4)],{'recursive':!![]}),this[_0xd0403c(0xc2)]&&await this[_0xd0403c(0xa7)](),this[_0xd0403c(0xa0)]=createWriteStream(this['logPath'],{'flags':'a'}),this['logStream']['on'](_0xd0403c(0xa3),_0x4ee7ce=>{const _0x3b6ba3=_0xd0403c;console['error'](_0x3b6ba3(0xb7)+this['logFileName']+':',_0x4ee7ce[_0x3b6ba3(0xc3)]);});}catch(_0x27ed92){console['error']('Warning:\x20Failed\x20to\x20initialize\x20log\x20file:',_0x27ed92);}}[a241_0x21872e(0xbe)](_0x1ccb80){const _0x3495d7=a241_0x21872e;if(!this['logStream'])return;const _0xabc93=Logger[_0x3495d7(0xb2)](_0x1ccb80);this[_0x3495d7(0xa0)][_0x3495d7(0xb3)](_0xabc93+'\x0a');}async[a241_0x21872e(0xab)](){return new Promise(_0x5b3d71=>{const _0x3cca81=a241_0x20ba;this[_0x3cca81(0xa0)]?this[_0x3cca81(0xa0)][_0x3cca81(0xbb)](()=>{const _0x217a8c=_0x3cca81;this[_0x217a8c(0xa0)]=null,_0x5b3d71();}):_0x5b3d71();});}['getLogPath'](){const _0x2f9cdf=a241_0x21872e;return this[_0x2f9cdf(0xa1)];}async[a241_0x21872e(0xa7)](){const _0x1fe723=a241_0x21872e;try{const _0x7aca2=await readdir(this[_0x1fe723(0xb4)]),_0x2070d6=new Date()[_0x1fe723(0xb0)]()[_0x1fe723(0xb6)]('T')[0x0];if(_0x7aca2[_0x1fe723(0xac)](this[_0x1fe723(0xa5)])){const _0x3fa7d7=join(this[_0x1fe723(0xb4)],this['logFileName']),_0x3e3984=await stat(_0x3fa7d7),_0x5a6153=new Date(_0x3e3984[_0x1fe723(0xb9)])[_0x1fe723(0xb0)]()[_0x1fe723(0xb6)]('T')[0x0];if(_0x5a6153<_0x2070d6){const _0x31b307=join(this[_0x1fe723(0xb4)],this['logBaseName']+'-'+_0x5a6153+_0x1fe723(0x9e));await rename(_0x3fa7d7,_0x31b307);}}const _0x595b7d=await readdir(this[_0x1fe723(0xb4)]),_0xa7b38f=this[_0x1fe723(0xbf)][_0x1fe723(0xb8)](/[.*+?^${}()|[\]\\]/g,_0x1fe723(0xa2)),_0x4187e2=new RegExp('^'+_0xa7b38f+'-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$'),_0x3e6b0a=_0x595b7d[_0x1fe723(0xaf)](_0x23efdd=>_0x4187e2['test'](_0x23efdd));for(const _0x3b72b9 of _0x3e6b0a){const _0x2f3f8e=join(this[_0x1fe723(0xb4)],_0x3b72b9),_0x5b1985=join(this[_0x1fe723(0xb4)],_0x3b72b9+_0x1fe723(0xc4));try{await pipeline(createReadStream(_0x2f3f8e),createGzip(),createWriteStream(_0x5b1985)),await unlink(_0x2f3f8e);}catch(_0x5168d6){console[_0x1fe723(0xa3)](_0x1fe723(0xba)+_0x3b72b9+':',_0x5168d6);}}}catch{}}}
|