@treasuredata/tdx 2026.3.47 → 2026.3.49
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.d.ts +22 -0
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.d.ts +5 -5
- package/dist/commands/profile-command.d.ts.map +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +12 -8
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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.d.ts.map +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/mcp/utils.js.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +8 -0
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.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.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +29 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +4 -1
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +8 -15
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.d.ts +3 -13
- package/dist/sdk/workspace/weekly.d.ts.map +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/weekly.js.map +1 -1
- package/dist/sdk/workspace/wikilinks.d.ts +15 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
- package/dist/commands/auth-login-command.d.ts +0 -29
- package/dist/commands/auth-login-command.d.ts.map +0 -1
- package/dist/commands/auth-login-command.js +0 -1
- package/dist/commands/auth-login-command.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22fbdf,_0x2cbf09){const _0x21f74b=a211_0x9c34,_0x44fb2b=_0x22fbdf();while(!![]){try{const _0x13596a=parseInt(_0x21f74b(0x83))/0x1+-parseInt(_0x21f74b(0x87))/0x2*(-parseInt(_0x21f74b(0x8b))/0x3)+parseInt(_0x21f74b(0x8e))/0x4+-parseInt(_0x21f74b(0x8a))/0x5+-parseInt(_0x21f74b(0x82))/0x6+parseInt(_0x21f74b(0x8c))/0x7+parseInt(_0x21f74b(0x88))/0x8;if(_0x13596a===_0x2cbf09)break;else _0x44fb2b['push'](_0x44fb2b['shift']());}catch(_0x19c4f4){_0x44fb2b['push'](_0x44fb2b['shift']());}}}(a211_0x175b,0xcb83c));import{readFileSync}from'fs';import{SDKError,ErrorCode}from'../sdk/errors.js';function a211_0x175b(){const _0x4da202=['13582288jdMwZG','\x27:\x20','7780670fPBFtf','1719ANKfti','429653VttANy','File\x20\x27','2581996PCJvNW','code','\x27\x20not\x20found','PERMISSION_DENIED','utf-8','5664204zatroo','321147tWdDtn','message','EACCES','ENOENT','2122hpHtPd'];a211_0x175b=function(){return _0x4da202;};return a211_0x175b();}function a211_0x9c34(_0x3ee2b9,_0x2c2c74){_0x3ee2b9=_0x3ee2b9-0x7e;const _0x175b0a=a211_0x175b();let _0x9c34d=_0x175b0a[_0x3ee2b9];return _0x9c34d;}export function readFileContent(_0x5cc6f5){const _0x3a92b9=a211_0x9c34;try{return readFileSync(_0x5cc6f5,_0x3a92b9(0x81));}catch(_0x32a0e8){const _0x416cc6=_0x32a0e8[_0x3a92b9(0x7e)];if(_0x416cc6===_0x3a92b9(0x86))throw new SDKError(ErrorCode['NOT_FOUND'],_0x3a92b9(0x8d)+_0x5cc6f5+_0x3a92b9(0x7f),_0x32a0e8);else{if(_0x416cc6===_0x3a92b9(0x85))throw new SDKError(ErrorCode[_0x3a92b9(0x80)],'Permission\x20denied\x20reading\x20file\x20\x27'+_0x5cc6f5+'\x27',_0x32a0e8);else throw new SDKError(ErrorCode['INTERNAL'],'Error\x20reading\x20file\x20\x27'+_0x5cc6f5+_0x3a92b9(0x89)+_0x32a0e8[_0x3a92b9(0x84)],_0x32a0e8);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ac808,_0x360497){const _0x1e6d4e=a212_0x485a,_0x1efee1=_0x4ac808();while(!![]){try{const _0xa12ff7=parseInt(_0x1e6d4e(0x185))/0x1+parseInt(_0x1e6d4e(0x17e))/0x2*(-parseInt(_0x1e6d4e(0x194))/0x3)+-parseInt(_0x1e6d4e(0x177))/0x4+parseInt(_0x1e6d4e(0x184))/0x5*(parseInt(_0x1e6d4e(0x193))/0x6)+-parseInt(_0x1e6d4e(0x187))/0x7*(-parseInt(_0x1e6d4e(0x179))/0x8)+parseInt(_0x1e6d4e(0x191))/0x9*(parseInt(_0x1e6d4e(0x176))/0xa)+parseInt(_0x1e6d4e(0x186))/0xb*(-parseInt(_0x1e6d4e(0x18c))/0xc);if(_0xa12ff7===_0x360497)break;else _0x1efee1['push'](_0x1efee1['shift']());}catch(_0x42abaa){_0x1efee1['push'](_0x1efee1['shift']());}}}(a212_0x1e9b,0x33cea));function a212_0x485a(_0x5bae4a,_0x52e7d4){_0x5bae4a=_0x5bae4a-0x175;const _0x1e9b98=a212_0x1e9b();let _0x485aba=_0x1e9b98[_0x5bae4a];return _0x485aba;}import*as a212_0x1159d4 from'node:https';function a212_0x1e9b(){const _0x173b09=['/releases?per_page=20','652656dRwSUM','/repos/','fetchedAt','releases','next','34eDgLUR','slice','set','resolve','now','parse','362225xhODTE','271814mGFoCN','3470192ysiNKJ','7rGHrSi','timeout','destroy','tag_name','GitHub\x20API\x20request\x20timed\x20out\x20after\x20','12uSZJoV','end','statusCode','error','GitHub\x20API\x20returned\x20','3723273sJzRCn','toString','18sTYKHW','48903CWMUYL','get','10qXGgKq','718548mNPpYQ'];a212_0x1e9b=function(){return _0x173b09;};return a212_0x1e9b();}const REQUEST_TIMEOUT_MS=0x2710,CACHE_TTL_MS=0x5*0x3c*0x3e8,cache=new Map();export function fetchGitHubReleases(_0x1c8d8c,_0x43d459,_0x2a4302){const _0xb59af4=a212_0x485a,_0x401ac1=_0x1c8d8c+'/'+_0x43d459,_0x273317=cache['get'](_0x401ac1);if(_0x273317&&Date['now']()-_0x273317[_0xb59af4(0x17b)]<CACHE_TTL_MS)return Promise[_0xb59af4(0x181)](_0x273317[_0xb59af4(0x17c)]);return new Promise((_0x2f98b4,_0x420236)=>{const _0x4ee71d=_0xb59af4,_0x257c0e={'hostname':'api.github.com','path':_0x4ee71d(0x17a)+_0x1c8d8c+'/'+_0x43d459+_0x4ee71d(0x178),'headers':{'User-Agent':_0x2a4302,'Accept':'application/vnd.github+json'},'timeout':REQUEST_TIMEOUT_MS},_0xcce284=a212_0x1159d4[_0x4ee71d(0x175)](_0x257c0e,_0x58093b=>{const _0x4f1201=_0x4ee71d;let _0x26db2a='';_0x58093b['on']('data',_0x7aca8=>{const _0x3c32c6=a212_0x485a;_0x26db2a+=_0x7aca8[_0x3c32c6(0x192)]();}),_0x58093b['on'](_0x4f1201(0x18d),()=>{const _0x1b66e4=_0x4f1201;if(_0x58093b['statusCode']!==0xc8){_0x420236(new Error(_0x1b66e4(0x190)+_0x58093b[_0x1b66e4(0x18e)]+':\x20'+_0x26db2a[_0x1b66e4(0x17f)](0x0,0xc8)));return;}try{const _0x714ee=JSON[_0x1b66e4(0x183)](_0x26db2a);cache[_0x1b66e4(0x180)](_0x401ac1,{'releases':_0x714ee,'fetchedAt':Date[_0x1b66e4(0x182)]()}),_0x2f98b4(_0x714ee);}catch(_0x1a7118){_0x420236(_0x1a7118);}});});_0xcce284['on'](_0x4ee71d(0x188),()=>{const _0x5b19f6=_0x4ee71d;_0xcce284[_0x5b19f6(0x189)](),_0x420236(new Error(_0x5b19f6(0x18b)+REQUEST_TIMEOUT_MS+'ms'));}),_0xcce284['on'](_0x4ee71d(0x18f),_0x420236);});}export async function resolveReleaseTag(_0x1e1360,_0x1baec7,_0x37bac6,_0x14bd85){const _0x2501c2=a212_0x485a;if(_0x1e1360===_0x2501c2(0x17d))return null;const _0x30dc43=await fetchGitHubReleases(_0x1baec7,_0x37bac6,_0x14bd85);if(_0x30dc43['length']===0x0)return null;const _0x37e6c9=_0x30dc43['find'](_0x5a42fa=>!_0x5a42fa['prerelease']);return _0x37e6c9?_0x37e6c9[_0x2501c2(0x18a)]:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x685045,_0x2ff2e8){const _0x1af85a=a213_0x10ba,_0x473c75=_0x685045();while(!![]){try{const _0x4ec75e=-parseInt(_0x1af85a(0x1d6))/0x1+parseInt(_0x1af85a(0x1ce))/0x2+-parseInt(_0x1af85a(0x1cb))/0x3+-parseInt(_0x1af85a(0x1d1))/0x4*(parseInt(_0x1af85a(0x1d2))/0x5)+parseInt(_0x1af85a(0x1d3))/0x6*(parseInt(_0x1af85a(0x1cf))/0x7)+parseInt(_0x1af85a(0x1cc))/0x8+parseInt(_0x1af85a(0x1c9))/0x9;if(_0x4ec75e===_0x2ff2e8)break;else _0x473c75['push'](_0x473c75['shift']());}catch(_0x61e079){_0x473c75['push'](_0x473c75['shift']());}}}(a213_0x197f,0x990c1));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x347efa=a213_0x10ba;return process.env.TDX_CACHE_DIR||join(homedir(),'.cache',_0x347efa(0x1d8));}const registry=new Map();export function registerGlobalCacheKey(_0x4f3132,_0x523757){const _0x180d58=a213_0x10ba,_0x19b443=registry['get'](_0x4f3132);if(_0x19b443&&_0x19b443!==_0x523757)throw new Error(_0x180d58(0x1da)+_0x4f3132+_0x180d58(0x1d7)+_0x19b443+'\x22,\x20cannot\x20register\x20for\x20\x22'+_0x523757+'\x22');registry[_0x180d58(0x1d0)](_0x4f3132,_0x523757);}export function getGlobalCachePath(_0x565dd7){return join(getGlobalCacheDir(),_0x565dd7);}function ensureGlobalCacheDir(){const _0x16ceb0=getGlobalCacheDir();!existsSync(_0x16ceb0)&&mkdirSync(_0x16ceb0,{'recursive':!![]});}function readCacheJson(_0x49df2e){const _0x3f6b9b=a213_0x10ba,_0x58188e=getGlobalCachePath(_0x49df2e);if(!existsSync(_0x58188e))return undefined;try{const _0x2e6943=readFileSync(_0x58188e,_0x3f6b9b(0x1d9));return JSON[_0x3f6b9b(0x1cd)](_0x2e6943);}catch{return undefined;}}function writeCacheJson(_0x5b99de,_0x27187b){const _0x669c56=a213_0x10ba;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x5b99de),JSON[_0x669c56(0x1ca)](_0x27187b,null,0x2),_0x669c56(0x1d9));}function a213_0x197f(){const _0x23f118=['tdx','utf-8','Global\x20cache\x20key\x20\x22','replace','17695818wthrXL','stringify','3135534pMaKIP','675224vIKxQZ','parse','647912wijDlp','7zRHRlo','set','16lDvJIk','673990Umcpob','1091322absDhw','default','trim','345197CJbdgz','\x22\x20already\x20registered\x20by\x20\x22'];a213_0x197f=function(){return _0x23f118;};return a213_0x197f();}function readCacheText(_0x4b457b){const _0x3eb8b3=a213_0x10ba,_0x3f1335=getGlobalCachePath(_0x4b457b);if(!existsSync(_0x3f1335))return undefined;try{return readFileSync(_0x3f1335,_0x3eb8b3(0x1d9));}catch{return undefined;}}function writeCacheText(_0x38b910,_0x53b560){const _0x2fcdca=a213_0x10ba;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x38b910),_0x53b560,_0x2fcdca(0x1d9));}function clearCache(_0x3afb25){const _0x5abc09=getGlobalCachePath(_0x3afb25);if(existsSync(_0x5abc09))try{unlinkSync(_0x5abc09);}catch{}}function cacheExists(_0x45026e){return existsSync(getGlobalCachePath(_0x45026e));}export function createGlobalCache(_0x35e748,_0x16854a){return registerGlobalCacheKey(_0x35e748,_0x16854a),{'read':()=>readCacheJson(_0x35e748),'write':_0x126da4=>writeCacheJson(_0x35e748,_0x126da4),'clear':()=>clearCache(_0x35e748),'exists':()=>cacheExists(_0x35e748),'path':()=>getGlobalCachePath(_0x35e748)};}export function createGlobalTextCache(_0x2ee4b2,_0xd63faa){const _0x493300=a213_0x10ba;return registerGlobalCacheKey(_0x2ee4b2,_0xd63faa),{'read':()=>readCacheText(_0x2ee4b2)?.[_0x493300(0x1d5)]()||undefined,'write':_0x490958=>writeCacheText(_0x2ee4b2,_0x490958),'clear':()=>clearCache(_0x2ee4b2),'exists':()=>cacheExists(_0x2ee4b2),'path':()=>getGlobalCachePath(_0x2ee4b2)};}export function createProfileCache(_0x1ec789,_0x97e533){const _0x22396b=_0x5704a9=>{const _0x26c499=a213_0x10ba,_0x5debaf=_0x5704a9||_0x26c499(0x1d4);return _0x1ec789[_0x26c499(0x1db)]('{profile}',_0x5debaf);};return{'read':_0x205b96=>{const _0x3982b9=_0x22396b(_0x205b96);return registerGlobalCacheKey(_0x3982b9,_0x97e533),readCacheJson(_0x3982b9);},'write':(_0x346031,_0x155934)=>{const _0x43501b=_0x22396b(_0x346031);registerGlobalCacheKey(_0x43501b,_0x97e533),writeCacheJson(_0x43501b,_0x155934);},'clear':_0x279f03=>{const _0x30029a=_0x22396b(_0x279f03);clearCache(_0x30029a);},'exists':_0x28195a=>{const _0x1dc47c=_0x22396b(_0x28195a);return cacheExists(_0x1dc47c);},'path':_0x263e79=>{const _0x520166=_0x22396b(_0x263e79);return getGlobalCachePath(_0x520166);}};}export function createOptionalProfileCache(_0x2787bb,_0x112dcb,_0x4592b1={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x4592b1,_0x59989e=_0x3e4e27=>{return _0x3e4e27?''+_0x2787bb+profileSeparator+_0x3e4e27+suffix:''+_0x2787bb+suffix;};return{'read':_0xcb1eee=>{const _0x335222=_0x59989e(_0xcb1eee);return registerGlobalCacheKey(_0x335222,_0x112dcb),readCacheJson(_0x335222);},'write':(_0xe35760,_0x10db78)=>{const _0x199b89=_0x59989e(_0x10db78);registerGlobalCacheKey(_0x199b89,_0x112dcb),writeCacheJson(_0x199b89,_0xe35760);},'clear':_0x5055cf=>{const _0x3e559f=_0x59989e(_0x5055cf);clearCache(_0x3e559f);},'exists':_0x2c28ed=>{const _0x40e4d8=_0x59989e(_0x2c28ed);return cacheExists(_0x40e4d8);},'path':_0x3b0266=>{const _0x3beb10=_0x59989e(_0x3b0266);return getGlobalCachePath(_0x3beb10);}};}function a213_0x10ba(_0x1e0776,_0xb5689f){_0x1e0776=_0x1e0776-0x1c9;const _0x197f00=a213_0x197f();let _0x10ba05=_0x197f00[_0x1e0776];return _0x10ba05;}export function clearGlobalRegistry(){registry['clear']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a214_0x1a00(){const _0x312bfa=['Invalid\x20JSON\x20in\x20file\x20\x27','5302OYnCsw','code','parse','1852949KwteFJ','INTERNAL','32qdrtTY','41490oSdjkX','ENOENT','message','858AUrZji','12UuGckk','5570jZaOKa','Failed\x20to\x20load\x20JSON:\x20','20AgUhcq','Invalid\x20JSON\x20string:\x20','59678TqLaFn','NOT_FOUND','1832rqLmqp','EACCES','2347020DDBoCc','INVALID_ARGUMENT','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','61428WgLTHW','PERMISSION_DENIED','376161syylKM'];a214_0x1a00=function(){return _0x312bfa;};return a214_0x1a00();}function a214_0x5a8c(_0x52df7,_0x21ee9f){_0x52df7=_0x52df7-0xe0;const _0x1a0002=a214_0x1a00();let _0x5a8c0b=_0x1a0002[_0x52df7];return _0x5a8c0b;}(function(_0x1f9a78,_0x218fd6){const _0x3238f8=a214_0x5a8c,_0x475b59=_0x1f9a78();while(!![]){try{const _0x3b8a6b=parseInt(_0x3238f8(0xed))/0x1*(-parseInt(_0x3238f8(0xe3))/0x2)+-parseInt(_0x3238f8(0xf6))/0x3*(-parseInt(_0x3238f8(0xeb))/0x4)+parseInt(_0x3238f8(0xf1))/0x5+-parseInt(_0x3238f8(0xe8))/0x6*(parseInt(_0x3238f8(0xe1))/0x7)+parseInt(_0x3238f8(0xef))/0x8*(parseInt(_0x3238f8(0xe4))/0x9)+-parseInt(_0x3238f8(0xe9))/0xa*(-parseInt(_0x3238f8(0xf8))/0xb)+parseInt(_0x3238f8(0xf4))/0xc*(-parseInt(_0x3238f8(0xe7))/0xd);if(_0x3b8a6b===_0x218fd6)break;else _0x475b59['push'](_0x475b59['shift']());}catch(_0x4dcf5f){_0x475b59['push'](_0x475b59['shift']());}}}(a214_0x1a00,0x92173));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x45ff56,_0xe05ac0){const _0x4c3ce6=a214_0x5a8c;try{if(_0xe05ac0){const _0x6bdb2e=await readFile(_0x45ff56,'utf-8');try{return JSON[_0x4c3ce6(0xe0)](_0x6bdb2e);}catch(_0x596650){throw new SDKError(ErrorCode[_0x4c3ce6(0xf2)],_0x4c3ce6(0xf7)+_0x45ff56+'\x27:\x20'+(_0x596650 instanceof Error?_0x596650[_0x4c3ce6(0xe6)]:String(_0x596650)));}}else try{return JSON[_0x4c3ce6(0xe0)](_0x45ff56);}catch(_0x4fcd58){throw new SDKError(ErrorCode[_0x4c3ce6(0xf2)],_0x4c3ce6(0xec)+(_0x4fcd58 instanceof Error?_0x4fcd58['message']:String(_0x4fcd58)));}}catch(_0x2ab31d){if(_0x2ab31d instanceof SDKError)throw _0x2ab31d;if(_0x2ab31d instanceof Error&&_0x4c3ce6(0xf9)in _0x2ab31d){const _0x137f83=_0x2ab31d;if(_0x137f83[_0x4c3ce6(0xf9)]===_0x4c3ce6(0xe5))throw new SDKError(ErrorCode[_0x4c3ce6(0xee)],'File\x20not\x20found:\x20'+_0x45ff56);else{if(_0x137f83[_0x4c3ce6(0xf9)]===_0x4c3ce6(0xf0))throw new SDKError(ErrorCode[_0x4c3ce6(0xf5)],'Permission\x20denied\x20reading\x20file:\x20'+_0x45ff56);}}throw new SDKError(ErrorCode[_0x4c3ce6(0xe2)],_0x4c3ce6(0xea)+(_0x2ab31d instanceof Error?_0x2ab31d[_0x4c3ce6(0xe6)]:String(_0x2ab31d)));}}export async function loadJSONFromOptions(_0x4f4bbb,_0x534a38){const _0x442c06=a214_0x5a8c;if(_0x4f4bbb&&_0x534a38)throw new SDKError(ErrorCode[_0x442c06(0xf2)],_0x442c06(0xf3));if(_0x4f4bbb)return await loadJSON(_0x4f4bbb,![]);if(_0x534a38)return await loadJSON(_0x534a38,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a215_0x308379=a215_0x26a1;(function(_0x534ff0,_0x406808){const _0x2674e3=a215_0x26a1,_0x24e7b6=_0x534ff0();while(!![]){try{const _0x2ec2c1=-parseInt(_0x2674e3(0xf5))/0x1*(parseInt(_0x2674e3(0xf9))/0x2)+parseInt(_0x2674e3(0xf3))/0x3*(-parseInt(_0x2674e3(0xf1))/0x4)+-parseInt(_0x2674e3(0xf6))/0x5*(-parseInt(_0x2674e3(0xed))/0x6)+-parseInt(_0x2674e3(0xec))/0x7+parseInt(_0x2674e3(0xfc))/0x8*(parseInt(_0x2674e3(0xfb))/0x9)+-parseInt(_0x2674e3(0xf0))/0xa+-parseInt(_0x2674e3(0xe7))/0xb*(-parseInt(_0x2674e3(0xe8))/0xc);if(_0x2ec2c1===_0x406808)break;else _0x24e7b6['push'](_0x24e7b6['shift']());}catch(_0x3fb9ae){_0x24e7b6['push'](_0x24e7b6['shift']());}}}(a215_0x41d3,0xa7958));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join,parse}from'path';import{homedir}from'os';const LOCAL_CACHE_DIR=a215_0x308379(0xe9),registry=new Map();function a215_0x41d3(){const _0x5b3db1=['385517WbzThm','504aqVqyE','.cache/tdx','root','get','1463644BSHZEc','6naHXIs','parse','\x22,\x20cannot\x20register\x20for\x20\x22','10805690zPWczo','92mXkNIz','trim','64683NuIdAs','\x22\x20already\x20registered\x20by\x20\x22','17CepXqT','4950520bjIiTg','stringify','Cache\x20key\x20\x22','14342ladnhO','clear','395451DKMrgs','24DPfokl','set','cwd','utf-8'];a215_0x41d3=function(){return _0x5b3db1;};return a215_0x41d3();}export function registerCacheKey(_0x4351c1,_0x10e4f0){const _0x3beed7=a215_0x308379,_0x499ddd=registry[_0x3beed7(0xeb)](_0x4351c1);if(_0x499ddd&&_0x499ddd!==_0x10e4f0)throw new Error(_0x3beed7(0xf8)+_0x4351c1+_0x3beed7(0xf4)+_0x499ddd+_0x3beed7(0xef)+_0x10e4f0+'\x22');registry[_0x3beed7(0xfd)](_0x4351c1,_0x10e4f0);}export function getCacheDir(){const _0x36d48d=a215_0x308379,_0x3f15c5=process[_0x36d48d(0xe5)](),_0x2cc299=_0x3f15c5===parse(_0x3f15c5)[_0x36d48d(0xea)]?homedir():_0x3f15c5;return join(_0x2cc299,LOCAL_CACHE_DIR);}export function getCachePath(_0x2a5bf6){return join(getCacheDir(),_0x2a5bf6);}function ensureCacheDir(){const _0x466304=getCacheDir();!existsSync(_0x466304)&&mkdirSync(_0x466304,{'recursive':!![]});}function readCacheJson(_0x19b751){const _0x2ece69=a215_0x308379,_0x2ac772=getCachePath(_0x19b751);if(!existsSync(_0x2ac772))return undefined;try{const _0x453519=readFileSync(_0x2ac772,_0x2ece69(0xe6));return JSON[_0x2ece69(0xee)](_0x453519);}catch{return undefined;}}function writeCacheJson(_0x351cf8,_0x636873){const _0x372ee3=a215_0x308379;ensureCacheDir(),writeFileSync(getCachePath(_0x351cf8),JSON[_0x372ee3(0xf7)](_0x636873,null,0x2),'utf-8');}function readCacheText(_0xdb32d){const _0x5bad41=a215_0x308379,_0x2fd88b=getCachePath(_0xdb32d);if(!existsSync(_0x2fd88b))return undefined;try{return readFileSync(_0x2fd88b,_0x5bad41(0xe6));}catch{return undefined;}}function writeCacheText(_0x1419dd,_0x28294c){const _0xcbf814=a215_0x308379;ensureCacheDir(),writeFileSync(getCachePath(_0x1419dd),_0x28294c,_0xcbf814(0xe6));}function clearCache(_0x28ea39){const _0x5be444=getCachePath(_0x28ea39);if(existsSync(_0x5be444))try{unlinkSync(_0x5be444);}catch{}}function cacheExists(_0x1877fc){return existsSync(getCachePath(_0x1877fc));}function a215_0x26a1(_0x286357,_0x50df5f){_0x286357=_0x286357-0xe5;const _0x41d314=a215_0x41d3();let _0x26a11d=_0x41d314[_0x286357];return _0x26a11d;}export function createCache(_0x3cb852,_0x3af2aa){return registerCacheKey(_0x3cb852,_0x3af2aa),{'read':()=>readCacheJson(_0x3cb852),'write':_0x2bc9f8=>writeCacheJson(_0x3cb852,_0x2bc9f8),'clear':()=>clearCache(_0x3cb852),'exists':()=>cacheExists(_0x3cb852),'path':()=>getCachePath(_0x3cb852)};}export function createTextCache(_0x59e730,_0x3805fa){const _0x52044a=a215_0x308379;return registerCacheKey(_0x59e730,_0x3805fa),{'read':()=>readCacheText(_0x59e730)?.[_0x52044a(0xf2)]()||undefined,'write':_0x35645f=>writeCacheText(_0x59e730,_0x35645f),'clear':()=>clearCache(_0x59e730),'exists':()=>cacheExists(_0x59e730),'path':()=>getCachePath(_0x59e730)};}export function clearRegistry(){const _0x2aebdb=a215_0x308379;registry[_0x2aebdb(0xfa)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0x5da1f4=a216_0x490a;(function(_0x3b434e,_0x4e7bf4){const _0x38afa0=a216_0x490a,_0x24d9ec=_0x3b434e();while(!![]){try{const _0x422b90=-parseInt(_0x38afa0(0xc7))/0x1+parseInt(_0x38afa0(0xd5))/0x2*(-parseInt(_0x38afa0(0xda))/0x3)+-parseInt(_0x38afa0(0xc8))/0x4*(-parseInt(_0x38afa0(0xd8))/0x5)+-parseInt(_0x38afa0(0xdd))/0x6*(-parseInt(_0x38afa0(0xd4))/0x7)+parseInt(_0x38afa0(0xcd))/0x8*(parseInt(_0x38afa0(0xdc))/0x9)+-parseInt(_0x38afa0(0xd0))/0xa*(parseInt(_0x38afa0(0xc6))/0xb)+parseInt(_0x38afa0(0xcc))/0xc;if(_0x422b90===_0x4e7bf4)break;else _0x24d9ec['push'](_0x24d9ec['shift']());}catch(_0x17b83a){_0x24d9ec['push'](_0x24d9ec['shift']());}}}(a216_0x5a51,0x56617));import a216_0x3cec84 from'chalk';import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';const chalkModule=a216_0x3cec84,ChalkClass=chalkModule[a216_0x5da1f4(0xc9)]||chalkModule['default']?.['Chalk'];function a216_0x490a(_0x23587a,_0xa81c17){_0x23587a=_0x23587a-0xc4;const _0x5a51e4=a216_0x5a51();let _0x490a11=_0x5a51e4[_0x23587a];return _0x490a11;}function a216_0x5a51(){const _0x333a7c=['Chalk','green','gray','1745016fEDAQU','4096TkDZgD','colors','level','127580NOBlux','red','component','INFO','1617lssvKp','931874lvqUpQ','message',']\x20[','384595spTFax','TRACE','3efdCQh','format','522lSyWAW','15642mkMOZZ','WARN','chalk','colorLevel','blue','ERROR','55bHJAYX','201465Otkzfp','16GWkCyq'];a216_0x5a51=function(){return _0x333a7c;};return a216_0x5a51();}export class DefaultLogFormatter{[a216_0x5da1f4(0xce)];[a216_0x5da1f4(0xdf)];constructor(_0x6dc68d={}){const _0x153073=a216_0x5da1f4;this[_0x153073(0xce)]=_0x6dc68d[_0x153073(0xce)]??![],this[_0x153073(0xdf)]=_0x6dc68d[_0x153073(0xce)]&&ChalkClass?new ChalkClass({'level':0x3}):a216_0x3cec84;}[a216_0x5da1f4(0xdb)](_0x4ce90f){const _0x566c30=a216_0x5da1f4,_0x4b3f70=formatTimestamp(_0x4ce90f['timestamp']),_0x4a9db1=logLevelToString(_0x4ce90f[_0x566c30(0xcf)]);if(!this['colors'])return _0x4b3f70+'\x20['+_0x4a9db1+_0x566c30(0xd7)+_0x4ce90f[_0x566c30(0xd2)]+']\x20'+_0x4ce90f[_0x566c30(0xd6)];const _0x4a8027=this['chalk']['dim'](_0x4b3f70),_0x5dcfdb=this[_0x566c30(0xe0)](_0x4a9db1,_0x4ce90f[_0x566c30(0xcf)]),_0x41c97f=this[_0x566c30(0xdf)][_0x566c30(0xc4)]('['+_0x4ce90f[_0x566c30(0xd2)]+']');return _0x4a8027+'\x20'+_0x5dcfdb+'\x20'+_0x41c97f+'\x20'+_0x4ce90f[_0x566c30(0xd6)];}['colorLevel'](_0x4a4bb9,_0x12d28b){const _0x2b780e=a216_0x5da1f4;switch(_0x12d28b){case LogLevel[_0x2b780e(0xd9)]:return this[_0x2b780e(0xdf)][_0x2b780e(0xcb)]('['+_0x4a4bb9+']');case LogLevel['DEBUG']:return this['chalk'][_0x2b780e(0xca)]('['+_0x4a4bb9+']');case LogLevel[_0x2b780e(0xd3)]:return this[_0x2b780e(0xdf)]['cyan']('['+_0x4a4bb9+']');case LogLevel[_0x2b780e(0xde)]:return this['chalk']['yellow']('['+_0x4a4bb9+']');case LogLevel[_0x2b780e(0xc5)]:return this[_0x2b780e(0xdf)][_0x2b780e(0xd1)]('['+_0x4a4bb9+']');default:return'['+_0x4a4bb9+']';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a217_0x3c15(_0x5da890,_0x6e33d){_0x5da890=_0x5da890-0x1ea;var _0x4e41b4=a217_0x4e41();var _0x3c1560=_0x4e41b4[_0x5da890];return _0x3c1560;}function a217_0x4e41(){var _0x31b613=['63MnqbQS','61094ZDLEtK','4FxfPVg','3556808RJuwbu','11601324FYyHRG','32392EWCsMt','6FMahbW','1BuokAH','349730MfxhMI','4885263cFHGlu','1130YLnXlu','22558956DzPdvI'];a217_0x4e41=function(){return _0x31b613;};return a217_0x4e41();}(function(_0x43700d,_0x4092d6){var _0x15d54f=a217_0x3c15,_0x589878=_0x43700d();while(!![]){try{var _0x4e75a8=-parseInt(_0x15d54f(0x1ee))/0x1*(-parseInt(_0x15d54f(0x1ea))/0x2)+parseInt(_0x15d54f(0x1f0))/0x3*(parseInt(_0x15d54f(0x1f5))/0x4)+parseInt(_0x15d54f(0x1ef))/0x5*(parseInt(_0x15d54f(0x1ed))/0x6)+-parseInt(_0x15d54f(0x1f3))/0x7*(parseInt(_0x15d54f(0x1ec))/0x8)+-parseInt(_0x15d54f(0x1eb))/0x9+parseInt(_0x15d54f(0x1f1))/0xa*(parseInt(_0x15d54f(0x1f4))/0xb)+-parseInt(_0x15d54f(0x1f2))/0xc;if(_0x4e75a8===_0x4092d6)break;else _0x589878['push'](_0x589878['shift']());}catch(_0x7c7dc2){_0x589878['push'](_0x589878['shift']());}}}(a217_0x4e41,0xdb7a7));export{DefaultLogFormatter}from'./default-formatter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a218_0xbd74c9=a218_0x5a0f;function a218_0x5a0f(_0x2ba412,_0x1db094){_0x2ba412=_0x2ba412-0x19e;const _0xb4facd=a218_0xb4fa();let _0x5a0f78=_0xb4facd[_0x2ba412];return _0x5a0f78;}(function(_0x3c9072,_0x409a42){const _0x100b7a=a218_0x5a0f,_0x21ba11=_0x3c9072();while(!![]){try{const _0x7f1ff7=-parseInt(_0x100b7a(0x1a6))/0x1+parseInt(_0x100b7a(0x1af))/0x2+-parseInt(_0x100b7a(0x1b0))/0x3*(parseInt(_0x100b7a(0x1a0))/0x4)+-parseInt(_0x100b7a(0x1a4))/0x5*(-parseInt(_0x100b7a(0x19e))/0x6)+-parseInt(_0x100b7a(0x1ab))/0x7+-parseInt(_0x100b7a(0x1ac))/0x8*(parseInt(_0x100b7a(0x1a8))/0x9)+parseInt(_0x100b7a(0x19f))/0xa;if(_0x7f1ff7===_0x409a42)break;else _0x21ba11['push'](_0x21ba11['shift']());}catch(_0x5a56c0){_0x21ba11['push'](_0x21ba11['shift']());}}}(a218_0xb4fa,0xda5fb));import{LogLevel as a218_0x3ea26d}from'../types.js';import{DefaultLogFormatter}from'../formatters/index.js';function a218_0xb4fa(){const _0x5f3168=['log','10131114WbkQrt','168KtbDAa','useStderr','WARN','3321410kdGrzy','5285559hfMMsc','48HhxyoD','16955350dLqYVa','4AOlqNJ','colors','minLevel','handle','1009105FgqCdb','formatter','604652LdlBxF','error','112518jlGjjE','level'];a218_0xb4fa=function(){return _0x5f3168;};return a218_0xb4fa();}export class ConsoleHandler{['minLevel'];[a218_0xbd74c9(0x1ad)];[a218_0xbd74c9(0x1a5)];constructor(_0x490ea0={}){const _0x5b9560=a218_0xbd74c9;this[_0x5b9560(0x1a2)]=_0x490ea0[_0x5b9560(0x1a2)]??a218_0x3ea26d[_0x5b9560(0x1ae)],this[_0x5b9560(0x1ad)]=_0x490ea0['useStderr']??!![],this[_0x5b9560(0x1a5)]=new DefaultLogFormatter({'colors':_0x490ea0[_0x5b9560(0x1a1)]??!![]});}[a218_0xbd74c9(0x1a3)](_0x4249c6){const _0x47a3f8=a218_0xbd74c9;if(_0x4249c6[_0x47a3f8(0x1a9)]<this[_0x47a3f8(0x1a2)])return;const _0x4ec63f=this[_0x47a3f8(0x1a5)]['format'](_0x4249c6);this[_0x47a3f8(0x1ad)]&&_0x4249c6[_0x47a3f8(0x1a9)]>=a218_0x3ea26d['WARN']?console[_0x47a3f8(0x1a7)](_0x4ec63f):console[_0x47a3f8(0x1aa)](_0x4ec63f);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a219_0x530730=a219_0x4bde;(function(_0x56f1b2,_0x2d7e41){const _0x165b0e=a219_0x4bde,_0x35956b=_0x56f1b2();while(!![]){try{const _0x482fc8=-parseInt(_0x165b0e(0xcc))/0x1*(-parseInt(_0x165b0e(0xcf))/0x2)+-parseInt(_0x165b0e(0xcd))/0x3*(parseInt(_0x165b0e(0xde))/0x4)+parseInt(_0x165b0e(0xd3))/0x5+-parseInt(_0x165b0e(0xd6))/0x6+-parseInt(_0x165b0e(0xd7))/0x7+parseInt(_0x165b0e(0xdd))/0x8+-parseInt(_0x165b0e(0xd8))/0x9*(-parseInt(_0x165b0e(0xec))/0xa);if(_0x482fc8===_0x2d7e41)break;else _0x35956b['push'](_0x35956b['shift']());}catch(_0x49718f){_0x35956b['push'](_0x35956b['shift']());}}}(a219_0x35e7,0x4317d));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join,dirname,basename}from'path';import{createGzip}from'zlib';function a219_0x35e7(){const _0x93ff6a=['Warning:\x20Failed\x20to\x20initialize\x20log\x20file:','logDir','Warning:\x20Error\x20writing\x20to\x20','end','mtime','getLogPath','handle','logStream','tdx.log','42180iEdaGc','logBaseName','replace','6DJRbyl','1506xnCLLO','test','14556rBjZNv','write','Warning:\x20Failed\x20to\x20compress\x20','rotate','698410IlNXXi','message','rotateOldLogs','1222176dGQvjw','2660266PaVpYJ','1359prTLqv','split','logFileName','error','.log','515064epNHfQ','208vPzBFM','\x5c$&','toISOString','includes','logPath'];a219_0x35e7=function(){return _0x93ff6a;};return a219_0x35e7();}import{pipeline}from'stream/promises';import{Logger}from'../logger.js';import{getGlobalCacheDir}from'../../global-cache.js';function a219_0x4bde(_0x4320a7,_0x4e98b7){_0x4320a7=_0x4320a7-0xcb;const _0x35e7f3=a219_0x35e7();let _0x4bde2c=_0x35e7f3[_0x4320a7];return _0x4bde2c;}export class FileHandler{['logPath'];[a219_0x530730(0xe4)];[a219_0x530730(0xda)];[a219_0x530730(0xed)];[a219_0x530730(0xea)]=null;[a219_0x530730(0xd2)];constructor(_0x25f19e={}){const _0x4a3953=a219_0x530730;this['logPath']=_0x25f19e['filePath']??join(getGlobalCacheDir(),'logs',_0x4a3953(0xeb)),this[_0x4a3953(0xe4)]=dirname(this['logPath']),this[_0x4a3953(0xda)]=basename(this[_0x4a3953(0xe2)]),this[_0x4a3953(0xed)]=this['logFileName'][_0x4a3953(0xcb)](/\.log$/,''),this[_0x4a3953(0xd2)]=_0x25f19e['rotate']??!![];}async['init'](){const _0x4fdbc8=a219_0x530730;try{await mkdir(this[_0x4fdbc8(0xe4)],{'recursive':!![]}),this[_0x4fdbc8(0xd2)]&&await this['rotateOldLogs'](),this[_0x4fdbc8(0xea)]=createWriteStream(this[_0x4fdbc8(0xe2)],{'flags':'a'}),this['logStream']['on'](_0x4fdbc8(0xdb),_0x4da3d9=>{const _0x508a3e=_0x4fdbc8;console[_0x508a3e(0xdb)](_0x508a3e(0xe5)+this[_0x508a3e(0xda)]+':',_0x4da3d9[_0x508a3e(0xd4)]);});}catch(_0x1bd232){console[_0x4fdbc8(0xdb)](_0x4fdbc8(0xe3),_0x1bd232);}}[a219_0x530730(0xe9)](_0x3691b2){const _0x10d5bb=a219_0x530730;if(!this[_0x10d5bb(0xea)])return;const _0x3f4b9b=Logger['format'](_0x3691b2);this[_0x10d5bb(0xea)][_0x10d5bb(0xd0)](_0x3f4b9b+'\x0a');}async['close'](){return new Promise(_0x3807aa=>{const _0x116ba0=a219_0x4bde;this[_0x116ba0(0xea)]?this['logStream'][_0x116ba0(0xe6)](()=>{const _0x579659=_0x116ba0;this[_0x579659(0xea)]=null,_0x3807aa();}):_0x3807aa();});}[a219_0x530730(0xe8)](){const _0x5e836a=a219_0x530730;return this[_0x5e836a(0xe2)];}async[a219_0x530730(0xd5)](){const _0x550d39=a219_0x530730;try{const _0x4a8351=await readdir(this[_0x550d39(0xe4)]),_0x5e2aa5=new Date()[_0x550d39(0xe0)]()['split']('T')[0x0];if(_0x4a8351[_0x550d39(0xe1)](this['logFileName'])){const _0x422e94=join(this[_0x550d39(0xe4)],this[_0x550d39(0xda)]),_0x482102=await stat(_0x422e94),_0x1cd63f=new Date(_0x482102[_0x550d39(0xe7)])[_0x550d39(0xe0)]()[_0x550d39(0xd9)]('T')[0x0];if(_0x1cd63f<_0x5e2aa5){const _0x4607bd=join(this[_0x550d39(0xe4)],this[_0x550d39(0xed)]+'-'+_0x1cd63f+_0x550d39(0xdc));await rename(_0x422e94,_0x4607bd);}}const _0x4fb65c=await readdir(this[_0x550d39(0xe4)]),_0x5b1c96=this[_0x550d39(0xed)][_0x550d39(0xcb)](/[.*+?^${}()|[\]\\]/g,_0x550d39(0xdf)),_0x1c2f6a=new RegExp('^'+_0x5b1c96+'-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$'),_0xded855=_0x4fb65c['filter'](_0x47670a=>_0x1c2f6a[_0x550d39(0xce)](_0x47670a));for(const _0x1b7dcd of _0xded855){const _0xe5c22=join(this['logDir'],_0x1b7dcd),_0x293d3e=join(this['logDir'],_0x1b7dcd+'.gz');try{await pipeline(createReadStream(_0xe5c22),createGzip(),createWriteStream(_0x293d3e)),await unlink(_0xe5c22);}catch(_0x5126e1){console[_0x550d39(0xdb)](_0x550d39(0xd1)+_0x1b7dcd+':',_0x5126e1);}}}catch{}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x921218,_0x587b8b){var _0x334fd6=a220_0xd304,_0x7f611d=_0x921218();while(!![]){try{var _0x157115=-parseInt(_0x334fd6(0x16a))/0x1+parseInt(_0x334fd6(0x166))/0x2*(parseInt(_0x334fd6(0x168))/0x3)+-parseInt(_0x334fd6(0x16c))/0x4+parseInt(_0x334fd6(0x167))/0x5+-parseInt(_0x334fd6(0x16e))/0x6*(parseInt(_0x334fd6(0x16f))/0x7)+-parseInt(_0x334fd6(0x170))/0x8*(parseInt(_0x334fd6(0x169))/0x9)+-parseInt(_0x334fd6(0x16b))/0xa*(-parseInt(_0x334fd6(0x16d))/0xb);if(_0x157115===_0x587b8b)break;else _0x7f611d['push'](_0x7f611d['shift']());}catch(_0x2c06f5){_0x7f611d['push'](_0x7f611d['shift']());}}}(a220_0x24f2,0xc6e20));export{FileHandler}from'./file-handler.js';function a220_0xd304(_0x5660d6,_0x5263b9){_0x5660d6=_0x5660d6-0x166;var _0x24f28e=a220_0x24f2();var _0xd304f9=_0x24f28e[_0x5660d6];return _0xd304f9;}export{ConsoleHandler}from'./console-handler.js';export{NullHandler}from'./null-handler.js';function a220_0x24f2(){var _0x10f6e7=['182874piqvLm','10064502xEhNUT','241281cJFoOz','10urrYac','2868252bfKiyt','32514823ZsIXDE','47616biVVSk','707jLDwgr','8eEPFww','4nszvYs','3074865adsgmZ'];a220_0x24f2=function(){return _0x10f6e7;};return a220_0x24f2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a221_0x14c7(){var _0x57bacd=['9aZfUhb','356092ayytYL','10452670dpDkXI','4723630KYzusC','395755hAGHXb','4393545jvCVnI','6LgwbKK','4YyaeQy','2681576TUinGS','12Gqzwpl','3KQIfFE','233368JVoSaF','294sicaYN'];a221_0x14c7=function(){return _0x57bacd;};return a221_0x14c7();}(function(_0x20d97b,_0xd93a5a){var _0x251c97=a221_0x3616,_0x4b3057=_0x20d97b();while(!![]){try{var _0x1b3592=parseInt(_0x251c97(0x1f3))/0x1*(parseInt(_0x251c97(0x1f6))/0x2)+-parseInt(_0x251c97(0x1f9))/0x3*(-parseInt(_0x251c97(0x1f7))/0x4)+parseInt(_0x251c97(0x1f2))/0x5*(-parseInt(_0x251c97(0x1f5))/0x6)+-parseInt(_0x251c97(0x1fb))/0x7*(parseInt(_0x251c97(0x1fa))/0x8)+-parseInt(_0x251c97(0x1fc))/0x9*(-parseInt(_0x251c97(0x1fe))/0xa)+-parseInt(_0x251c97(0x1fd))/0xb*(-parseInt(_0x251c97(0x1f8))/0xc)+parseInt(_0x251c97(0x1f4))/0xd;if(_0x1b3592===_0xd93a5a)break;else _0x4b3057['push'](_0x4b3057['shift']());}catch(_0x4ffadf){_0x4b3057['push'](_0x4b3057['shift']());}}}(a221_0x14c7,0xacc10));function a221_0x3616(_0x1d9a91,_0x24843f){_0x1d9a91=_0x1d9a91-0x1f2;var _0x14c7a3=a221_0x14c7();var _0x3616dc=_0x14c7a3[_0x1d9a91];return _0x3616dc;}export class NullHandler{['handle'](_0x587fc8){}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a222_0x2a49(_0xeae263,_0x21ebe8){_0xeae263=_0xeae263-0x1ae;var _0x42e1bd=a222_0x42e1();var _0x2a49a9=_0x42e1bd[_0xeae263];return _0x2a49a9;}(function(_0x1bceda,_0x3ed045){var _0x550887=a222_0x2a49,_0x4b119a=_0x1bceda();while(!![]){try{var _0x40626b=-parseInt(_0x550887(0x1ae))/0x1+-parseInt(_0x550887(0x1b3))/0x2+parseInt(_0x550887(0x1b7))/0x3+-parseInt(_0x550887(0x1b5))/0x4*(parseInt(_0x550887(0x1b1))/0x5)+parseInt(_0x550887(0x1b6))/0x6*(parseInt(_0x550887(0x1b0))/0x7)+-parseInt(_0x550887(0x1af))/0x8+parseInt(_0x550887(0x1b2))/0x9*(parseInt(_0x550887(0x1b4))/0xa);if(_0x40626b===_0x3ed045)break;else _0x4b119a['push'](_0x4b119a['shift']());}catch(_0x1fd693){_0x4b119a['push'](_0x4b119a['shift']());}}}(a222_0x42e1,0xbd373));export{Logger}from'./logger.js';export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';function a222_0x42e1(){var _0x4b6e44=['1884444IPzdYF','40NeVvzx','4464844fsZSfH','896934AwvWsZ','4214340TcygoI','663170hgUYke','994752BIeXnC','70IONxpf','5QAtAxo','1622934fXkKlW'];a222_0x42e1=function(){return _0x4b6e44;};return a222_0x42e1();}export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';export{DefaultLogFormatter}from'./formatters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a223_0x26068e=a223_0x158f;(function(_0x187f5e,_0x37bbe8){const _0x1c0240=a223_0x158f,_0xc5ebb9=_0x187f5e();while(!![]){try{const _0x396469=-parseInt(_0x1c0240(0xa8))/0x1+-parseInt(_0x1c0240(0xca))/0x2+-parseInt(_0x1c0240(0x9e))/0x3+parseInt(_0x1c0240(0xb1))/0x4+-parseInt(_0x1c0240(0xbb))/0x5+parseInt(_0x1c0240(0xa4))/0x6+parseInt(_0x1c0240(0xbc))/0x7;if(_0x396469===_0x37bbe8)break;else _0xc5ebb9['push'](_0xc5ebb9['shift']());}catch(_0x861a51){_0xc5ebb9['push'](_0xc5ebb9['shift']());}}}(a223_0xab3c,0xc8ead));import{LogLevel as a223_0x4ff860,logLevelToString}from'./types.js';const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a223_0x4ff860[a223_0x26068e(0xaf)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function a223_0x158f(_0x5f0ba3,_0x5c2d89){_0x5f0ba3=_0x5f0ba3-0x9a;const _0xab3cfb=a223_0xab3c();let _0x158fae=_0xab3cfb[_0x5f0ba3];return _0x158fae;}function safeStringify(_0x47dc85){const _0x51dc33=a223_0x26068e;if(typeof _0x47dc85===_0x51dc33(0xb5))return _0x47dc85;if(_0x47dc85 instanceof Error)return _0x47dc85[_0x51dc33(0xc6)]||_0x47dc85[_0x51dc33(0xc1)]+':\x20'+_0x47dc85[_0x51dc33(0xb3)];try{return JSON[_0x51dc33(0xc7)](_0x47dc85,(_0x71d989,_0x28206e)=>{const _0x2a5416=_0x51dc33;if(_0x28206e instanceof Error)return{'name':_0x28206e['name'],'message':_0x28206e['message'],'stack':_0x28206e['stack'],'cause':_0x28206e[_0x2a5416(0xa9)]};return _0x28206e;});}catch{return String(_0x47dc85);}}function a223_0xab3c(){const _0x252efe=['reset','801415DCpeEB','cause','init','pendingRecords','entries','component','length','INFO','info','3380184kClmfE','log','message','DEBUG','string','map','toISOString','setDefaultLevel','dispatch','getFormatter','7630595jWmVpz','30399810gUNZDX','trace','clearHandlers','defaultLevel','handle','name','getEffectiveLevel','get','format','setLogLevel','stack','stringify',']\x20[','loggers','3222070EaqCmU','close','handlers','join','has','slice','TRACE','1681566WZXAGb','level','clear','levelOverrides','shouldLog','formatter','805032ATHPhI','initialized','push'];a223_0xab3c=function(){return _0x252efe;};return a223_0xab3c();}export class Logger{[a223_0x26068e(0xad)];constructor(_0xe29778){this['component']=_0xe29778;}static['of'](_0x43642d){const _0x49885e=a223_0x26068e,_0x140bd1=typeof _0x43642d===_0x49885e(0xb5)?_0x43642d:_0x43642d['name'];let _0x522f53=state[_0x49885e(0xc9)][_0x49885e(0xc3)](_0x140bd1);return!_0x522f53&&(_0x522f53=new Logger(_0x140bd1),state[_0x49885e(0xc9)]['set'](_0x140bd1,_0x522f53)),_0x522f53;}static async[a223_0x26068e(0xaa)](_0x2c5ba3={}){const _0x182abe=a223_0x26068e;state[_0x182abe(0xbf)]=_0x2c5ba3[_0x182abe(0xbf)]??a223_0x4ff860[_0x182abe(0xaf)],state[_0x182abe(0xcc)]=_0x2c5ba3[_0x182abe(0xcc)]??[],state['formatter']=_0x2c5ba3[_0x182abe(0xa3)]??null,state['levelOverrides'][_0x182abe(0xa0)]();if(_0x2c5ba3['levelOverrides'])for(const [_0x4b8912,_0x2f20a9]of Object[_0x182abe(0xac)](_0x2c5ba3['levelOverrides'])){state[_0x182abe(0xa1)]['set'](_0x4b8912,_0x2f20a9);}for(const _0x44f1db of state[_0x182abe(0xcc)]){_0x44f1db[_0x182abe(0xaa)]&&await _0x44f1db['init']();}state['initialized']=!![];for(const _0x1c5417 of state[_0x182abe(0xab)]){Logger['dispatch'](_0x1c5417);}state[_0x182abe(0xab)]=[];}static[a223_0x26068e(0xc5)](_0x18658d,_0x6fef2d){const _0x15219b=a223_0x26068e;state[_0x15219b(0xa1)]['set'](_0x18658d,_0x6fef2d);}static[a223_0x26068e(0xb8)](_0x11bcae){const _0x2d72d2=a223_0x26068e;state[_0x2d72d2(0xbf)]=_0x11bcae;}static['addHandler'](_0x4ed541){const _0x51e85f=a223_0x26068e;state[_0x51e85f(0xcc)][_0x51e85f(0xa6)](_0x4ed541),state['initialized']&&_0x4ed541[_0x51e85f(0xaa)]&&_0x4ed541[_0x51e85f(0xaa)]();}static[a223_0x26068e(0xbe)](){const _0x446559=a223_0x26068e;state[_0x446559(0xcc)]=[];}static async['shutdown'](){const _0x192311=a223_0x26068e;for(const _0x3270a9 of state[_0x192311(0xcc)]){_0x3270a9[_0x192311(0xcb)]&&await _0x3270a9[_0x192311(0xcb)]();}state[_0x192311(0xcc)]=[],state[_0x192311(0xa5)]=![],state[_0x192311(0xc9)][_0x192311(0xa0)](),state[_0x192311(0xab)]=[];}static[a223_0x26068e(0xa7)](){const _0x1cbda8=a223_0x26068e;state[_0x1cbda8(0xa5)]=![],state[_0x1cbda8(0xbf)]=a223_0x4ff860['INFO'],state[_0x1cbda8(0xa1)]['clear'](),state[_0x1cbda8(0xcc)]=[],state[_0x1cbda8(0xa3)]=null,state[_0x1cbda8(0xc9)][_0x1cbda8(0xa0)](),state[_0x1cbda8(0xab)]=[];}static['isInitialized'](){const _0x4c2f1f=a223_0x26068e;return state[_0x4c2f1f(0xa5)];}static[a223_0x26068e(0xc2)](_0x5dd0f6){const _0xe85020=a223_0x26068e;if(state[_0xe85020(0xa1)][_0xe85020(0x9b)](_0x5dd0f6))return state['levelOverrides']['get'](_0x5dd0f6);const _0x5f2508=_0x5dd0f6['split']('.');for(let _0x43962f=_0x5f2508[_0xe85020(0xae)]-0x1;_0x43962f>0x0;_0x43962f--){const _0x3639d3=_0x5f2508[_0xe85020(0x9c)](0x0,_0x43962f)[_0xe85020(0x9a)]('.');if(state['levelOverrides'][_0xe85020(0x9b)](_0x3639d3))return state[_0xe85020(0xa1)][_0xe85020(0xc3)](_0x3639d3);}return state[_0xe85020(0xbf)];}[a223_0x26068e(0xa2)](_0x40721e){const _0x5d97c8=a223_0x26068e,_0x63073=Logger[_0x5d97c8(0xc2)](this['component']);return _0x40721e>=_0x63073;}static[a223_0x26068e(0xb9)](_0x443787){const _0x5584c4=a223_0x26068e;for(const _0x2ee4d4 of state[_0x5584c4(0xcc)]){_0x2ee4d4[_0x5584c4(0xc0)](_0x443787);}}[a223_0x26068e(0xb2)](_0x104d1c,_0x28cad5){const _0x417d2d=a223_0x26068e;if(!this[_0x417d2d(0xa2)](_0x104d1c))return;const _0xe09c5c=_0x28cad5[_0x417d2d(0xb6)](_0xe67d80=>typeof _0xe67d80==='function'?_0xe67d80():_0xe67d80),_0x439944=_0xe09c5c['map'](safeStringify)[_0x417d2d(0x9a)]('\x20'),_0x38d5aa={'timestamp':new Date(),'level':_0x104d1c,'component':this[_0x417d2d(0xad)],'message':_0x439944};if(!state[_0x417d2d(0xa5)]){state[_0x417d2d(0xab)][_0x417d2d(0xae)]<MAX_PENDING_RECORDS&&state['pendingRecords'][_0x417d2d(0xa6)](_0x38d5aa);return;}Logger[_0x417d2d(0xb9)](_0x38d5aa);}[a223_0x26068e(0xbd)](..._0x4b1304){const _0x160319=a223_0x26068e;this['log'](a223_0x4ff860[_0x160319(0x9d)],_0x4b1304);}['debug'](..._0x5b77c5){const _0x316977=a223_0x26068e;this[_0x316977(0xb2)](a223_0x4ff860[_0x316977(0xb4)],_0x5b77c5);}[a223_0x26068e(0xb0)](..._0x6ad5ab){const _0x1a337c=a223_0x26068e;this[_0x1a337c(0xb2)](a223_0x4ff860['INFO'],_0x6ad5ab);}['warn'](..._0xda9622){const _0x13883c=a223_0x26068e;this[_0x13883c(0xb2)](a223_0x4ff860['WARN'],_0xda9622);}['error'](..._0x356d08){this['log'](a223_0x4ff860['ERROR'],_0x356d08);}static[a223_0x26068e(0xba)](){const _0x45d915=a223_0x26068e;return state[_0x45d915(0xa3)];}static[a223_0x26068e(0xc4)](_0xf98a12){const _0x50f584=a223_0x26068e;if(state[_0x50f584(0xa3)])return state['formatter']['format'](_0xf98a12);return _0xf98a12['timestamp'][_0x50f584(0xb7)]()+'\x20['+logLevelToString(_0xf98a12[_0x50f584(0x9f)])+_0x50f584(0xc8)+_0xf98a12[_0x50f584(0xad)]+']\x20'+_0xf98a12['message'];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a3662,_0x373153){const _0x35efbe=a224_0x3337,_0x260700=_0x5a3662();while(!![]){try{const _0x6cf7a6=parseInt(_0x35efbe(0x122))/0x1+parseInt(_0x35efbe(0x125))/0x2*(parseInt(_0x35efbe(0x133))/0x3)+-parseInt(_0x35efbe(0x120))/0x4+-parseInt(_0x35efbe(0x12d))/0x5+-parseInt(_0x35efbe(0x136))/0x6*(parseInt(_0x35efbe(0x12a))/0x7)+-parseInt(_0x35efbe(0x128))/0x8+parseInt(_0x35efbe(0x130))/0x9*(parseInt(_0x35efbe(0x132))/0xa);if(_0x6cf7a6===_0x373153)break;else _0x260700['push'](_0x260700['shift']());}catch(_0x24f8e5){_0x260700['push'](_0x260700['shift']());}}}(a224_0x1594,0x1c948));function a224_0x3337(_0x117c37,_0x2cae1c){_0x117c37=_0x117c37-0x119;const _0x159446=a224_0x1594();let _0x333789=_0x159446[_0x117c37];return _0x333789;}export var LogLevel;(function(_0x56a845){const _0x594456=a224_0x3337;_0x56a845[_0x56a845[_0x594456(0x11a)]=-0x2]=_0x594456(0x11a),_0x56a845[_0x56a845[_0x594456(0x126)]=-0x1]=_0x594456(0x126),_0x56a845[_0x56a845['INFO']=0x0]=_0x594456(0x12f),_0x56a845[_0x56a845['WARN']=0x1]=_0x594456(0x11c),_0x56a845[_0x56a845[_0x594456(0x11f)]=0x2]=_0x594456(0x11f);}(LogLevel||(LogLevel={})));export function parseLogLevel(_0x18c844){const _0x5bdf1c=a224_0x3337;switch(_0x18c844[_0x5bdf1c(0x121)]()){case'TRACE':return LogLevel[_0x5bdf1c(0x11a)];case _0x5bdf1c(0x126):return LogLevel[_0x5bdf1c(0x126)];case _0x5bdf1c(0x12f):return LogLevel[_0x5bdf1c(0x12f)];case _0x5bdf1c(0x11c):case _0x5bdf1c(0x11b):return LogLevel['WARN'];case _0x5bdf1c(0x11f):return LogLevel[_0x5bdf1c(0x11f)];default:return LogLevel[_0x5bdf1c(0x12f)];}}export function logLevelToString(_0x427264){const _0x375bf6=a224_0x3337;switch(_0x427264){case LogLevel[_0x375bf6(0x11a)]:return _0x375bf6(0x124);case LogLevel[_0x375bf6(0x126)]:return'debug';case LogLevel[_0x375bf6(0x12f)]:return _0x375bf6(0x12e);case LogLevel[_0x375bf6(0x11c)]:return _0x375bf6(0x127);case LogLevel['ERROR']:return _0x375bf6(0x129);default:return'info';}}function a224_0x1594(){const _0x2066e0=['1142IGfSSN','DEBUG','warn','791352PVPiTd','error','9779tFRNTX','getMonth','getSeconds','1122115SlyQdv','info','INFO','110457agjuIT','getTimezoneOffset','380DOKyLD','321svEkhC','getMinutes','abs','630GuxAVQ','padStart','TRACE','WARNING','WARN','getFullYear','floor','ERROR','289012vkxwoa','toUpperCase','131873PVtPCM','toString','trace'];a224_0x1594=function(){return _0x2066e0;};return a224_0x1594();}export function formatTimestamp(_0x4ef8f2){const _0x3bf74e=a224_0x3337,_0x293203=_0x4ef8f2[_0x3bf74e(0x11d)](),_0x3f93d3=(_0x4ef8f2[_0x3bf74e(0x12b)]()+0x1)[_0x3bf74e(0x123)]()[_0x3bf74e(0x119)](0x2,'0'),_0x7f83c1=_0x4ef8f2['getDate']()[_0x3bf74e(0x123)]()[_0x3bf74e(0x119)](0x2,'0'),_0x5426a2=_0x4ef8f2['getHours']()['toString']()[_0x3bf74e(0x119)](0x2,'0'),_0x5f2ad3=_0x4ef8f2[_0x3bf74e(0x134)]()[_0x3bf74e(0x123)]()[_0x3bf74e(0x119)](0x2,'0'),_0x399e6f=_0x4ef8f2[_0x3bf74e(0x12c)]()[_0x3bf74e(0x123)]()[_0x3bf74e(0x119)](0x2,'0'),_0x7116bf=_0x4ef8f2['getMilliseconds']()[_0x3bf74e(0x123)]()[_0x3bf74e(0x119)](0x3,'0'),_0x66ecac=-_0x4ef8f2[_0x3bf74e(0x131)](),_0x53839e=Math[_0x3bf74e(0x11e)](Math[_0x3bf74e(0x135)](_0x66ecac)/0x3c),_0x102ba8=Math[_0x3bf74e(0x135)](_0x66ecac)%0x3c,_0x56b11e=_0x66ecac>=0x0?'+':'-',_0x2a7495=''+_0x56b11e+_0x53839e['toString']()[_0x3bf74e(0x119)](0x2,'0')+_0x102ba8[_0x3bf74e(0x123)]()['padStart'](0x2,'0');return _0x293203+'-'+_0x3f93d3+'-'+_0x7f83c1+'\x20'+_0x5426a2+':'+_0x5f2ad3+':'+_0x399e6f+'.'+_0x7116bf+_0x2a7495;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a225_0x9cd7(){const _0x16bf7b=['3820628cVeVlS','Invalid\x20timeout\x20value:\x20','.\x20Must\x20be\x20an\x20integer.','Invalid\x20limit\x20value:\x20','2434152toHqoj','isInteger','3954qaMIaO','26942952HhKyEt','.\x20Must\x20be\x20a\x20positive\x20number.','98312ZJkKIO','.\x20Must\x20be\x20a\x20number.','4010630YBDbeQ','677208WnLWKo','1348kFbqPy'];a225_0x9cd7=function(){return _0x16bf7b;};return a225_0x9cd7();}(function(_0x787475,_0x4d23e0){const _0x16816f=a225_0x4332,_0xefa6df=_0x787475();while(!![]){try{const _0x4b1a17=-parseInt(_0x16816f(0x129))/0x1+parseInt(_0x16816f(0x134))/0x2+parseInt(_0x16816f(0x131))/0x3*(-parseInt(_0x16816f(0x12a))/0x4)+-parseInt(_0x16816f(0x128))/0x5+-parseInt(_0x16816f(0x12f))/0x6+-parseInt(_0x16816f(0x12b))/0x7+parseInt(_0x16816f(0x132))/0x8;if(_0x4b1a17===_0x4d23e0)break;else _0xefa6df['push'](_0xefa6df['shift']());}catch(_0x20ad4f){_0xefa6df['push'](_0xefa6df['shift']());}}}(a225_0x9cd7,0x8454d));export function validateLimitOption(_0x34f93d){const _0x45f718=a225_0x4332;if(!Number[_0x45f718(0x130)](_0x34f93d))return{'isValid':![],'error':_0x45f718(0x12e)+_0x34f93d+_0x45f718(0x12d)};if(_0x34f93d<=0x0)return{'isValid':![],'error':_0x45f718(0x12e)+_0x34f93d+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x34f93d};}function a225_0x4332(_0x5612e5,_0x4a67c9){_0x5612e5=_0x5612e5-0x128;const _0x9cd79e=a225_0x9cd7();let _0x43328f=_0x9cd79e[_0x5612e5];return _0x43328f;}export function validateTimeoutOption(_0xdcdc6e,_0x579e15=0x1e){const _0x28679d=a225_0x4332;if(_0xdcdc6e===undefined)return{'isValid':!![],'value':_0x579e15};const _0x442f15=typeof _0xdcdc6e==='number'?_0xdcdc6e:parseFloat(_0xdcdc6e);if(isNaN(_0x442f15))return{'isValid':![],'error':_0x28679d(0x12c)+_0xdcdc6e+_0x28679d(0x135)};if(_0x442f15<=0x0)return{'isValid':![],'error':_0x28679d(0x12c)+_0x442f15+_0x28679d(0x133)};return{'isValid':!![],'value':_0x442f15};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a226_0x2a5ab0=a226_0x3ce2;(function(_0x116cae,_0x1c44f0){const _0x1a2d3a=a226_0x3ce2,_0x4259a2=_0x116cae();while(!![]){try{const _0x5aaf7b=parseInt(_0x1a2d3a(0xb7))/0x1*(-parseInt(_0x1a2d3a(0xae))/0x2)+parseInt(_0x1a2d3a(0xc2))/0x3+parseInt(_0x1a2d3a(0xca))/0x4*(-parseInt(_0x1a2d3a(0xad))/0x5)+-parseInt(_0x1a2d3a(0xb4))/0x6*(-parseInt(_0x1a2d3a(0xb2))/0x7)+parseInt(_0x1a2d3a(0xba))/0x8+parseInt(_0x1a2d3a(0xbf))/0x9+parseInt(_0x1a2d3a(0xcf))/0xa;if(_0x5aaf7b===_0x1c44f0)break;else _0x4259a2['push'](_0x4259a2['shift']());}catch(_0x5b32e3){_0x4259a2['push'](_0x4259a2['shift']());}}}(a226_0x3e66,0x3e57e));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a226_0x2a5ab0(0xe9),'zsh','sh',a226_0x2a5ab0(0xaf),'ksh',a226_0x2a5ab0(0xc0),a226_0x2a5ab0(0xe7),a226_0x2a5ab0(0xd7),a226_0x2a5ab0(0xe6),'powershell','nu',a226_0x2a5ab0(0xd2),a226_0x2a5ab0(0xd8),a226_0x2a5ab0(0xbc)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a226_0x2a5ab0(0xbe),a226_0x2a5ab0(0xb8),'cursor',a226_0x2a5ab0(0xd5),a226_0x2a5ab0(0xb5)]);function getProcessInfoWindows(_0x905304){const _0x919f68=a226_0x2a5ab0;try{if(!Number[_0x919f68(0xe4)](_0x905304)||_0x905304<=0x0)return null;const _0x33b452=_0x919f68(0xd6)+_0x905304+_0x919f68(0xc9),_0x1c2e66=execSync(_0x919f68(0xcb)+_0x33b452+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x919f68(0xcc),_0x919f68(0xcc),'pipe']})['trim']();if(!_0x1c2e66)return null;const [_0x326831,..._0x11790a]=_0x1c2e66['split'](','),_0x46976b=parseInt(_0x326831,0xa),_0x1011f0=_0x11790a['join'](',')['trim']();if(isNaN(_0x46976b)||!_0x1011f0)return null;return{'pid':_0x905304,'ppid':_0x46976b,'comm':_0x1011f0[_0x919f68(0xd1)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x37c735){const _0x6bef1=a226_0x2a5ab0;try{const _0x2ffaca=0x400000;if(!Number[_0x6bef1(0xe4)](_0x37c735)||_0x37c735<=0x0||_0x37c735>_0x2ffaca)return null;const _0x2b7e99=execSync(_0x6bef1(0xbd)+_0x37c735+_0x6bef1(0xc3),{'encoding':_0x6bef1(0xc6),'stdio':'pipe'})[_0x6bef1(0xd9)](),[_0xdad397,..._0x56fd39]=_0x2b7e99['split'](/\s+/),_0x566da2=parseInt(_0xdad397,0xa),_0x21af5c=_0x56fd39['join']('\x20');if(isNaN(_0x566da2))return null;return{'pid':_0x37c735,'ppid':_0x566da2,'comm':_0x21af5c};}catch{return null;}}function getProcessInfo(_0x3d3989){const _0x25b1a7=a226_0x2a5ab0;if(process[_0x25b1a7(0xe1)]==='win32')return getProcessInfoWindows(_0x3d3989);return getProcessInfoPosix(_0x3d3989);}function getBasename(_0x357186){const _0x4e26e7=a226_0x2a5ab0;return _0x357186[_0x4e26e7(0xd1)](/^-/,'')[_0x4e26e7(0xd4)]('/')[_0x4e26e7(0xc8)]()?.[_0x4e26e7(0xde)]()||'';}function isShell(_0x1d1d8f){const _0x1fb61f=a226_0x2a5ab0;return SHELL_NAMES[_0x1fb61f(0xe0)](getBasename(_0x1d1d8f));}function isEphemeralShellSpawner(_0x2bf395){const _0x435e0c=a226_0x2a5ab0;return EPHEMERAL_SHELL_SPAWNERS[_0x435e0c(0xe0)](getBasename(_0x2bf395));}let cachedShellPID;function findShellPID(){const _0x5b252c=a226_0x2a5ab0;if(process['ppid']===undefined)return process[_0x5b252c(0xe8)];let _0x1e2931=process[_0x5b252c(0xda)];const _0x2ad4ae=0xa;let _0x5a1242=0x0;while(_0x5a1242<_0x2ad4ae){const _0x439f05=getProcessInfo(_0x1e2931);if(!_0x439f05)break;if(isShell(_0x439f05[_0x5b252c(0xc4)])){const _0x194d8b=getProcessInfo(_0x439f05[_0x5b252c(0xda)]);if(_0x194d8b&&isEphemeralShellSpawner(_0x194d8b[_0x5b252c(0xc4)])){_0x1e2931=_0x439f05[_0x5b252c(0xda)],_0x5a1242++;continue;}return _0x439f05['pid'];}if(_0x439f05[_0x5b252c(0xda)]===0x0||_0x439f05[_0x5b252c(0xda)]===0x1){if(isShell(_0x439f05[_0x5b252c(0xc4)]))return _0x439f05[_0x5b252c(0xe8)];break;}_0x1e2931=_0x439f05[_0x5b252c(0xda)],_0x5a1242++;}return process[_0x5b252c(0xda)]!==undefined?process[_0x5b252c(0xda)]:process[_0x5b252c(0xe8)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x164d22){const _0x4d7917=a226_0x2a5ab0;if(!Number[_0x4d7917(0xe4)](_0x164d22)||_0x164d22<=0x0)return![];try{return process[_0x4d7917(0xe3)](_0x164d22,0x0),!![];}catch{return![];}}function a226_0x3ce2(_0x23cdc3,_0x17ffd7){_0x23cdc3=_0x23cdc3-0xac;const _0x3e6628=a226_0x3e66();let _0x3ce2e2=_0x3e6628[_0x23cdc3];return _0x3ce2e2;}export function openBrowser(_0x20311c){const _0x267920=a226_0x2a5ab0;let _0x29fd21;try{_0x29fd21=new URL(_0x20311c);}catch{throw new Error('Invalid\x20URL:\x20'+_0x20311c);}if(_0x29fd21[_0x267920(0xce)]!=='http:'&&_0x29fd21[_0x267920(0xce)]!==_0x267920(0xbb))throw new Error(_0x267920(0xac)+_0x29fd21[_0x267920(0xce)]);const _0x230826=_0x29fd21[_0x267920(0xdc)],_0x3b3cbc=process[_0x267920(0xe1)];if(_0x3b3cbc===_0x267920(0xb3))spawn(_0x267920(0xb0),['/c',_0x267920(0xb6),'',_0x230826],{'detached':!![],'stdio':_0x267920(0xdf)})['unref']();else{const _0x232a95=_0x3b3cbc===_0x267920(0xc1)?_0x267920(0xe5):_0x267920(0xd0);spawn(_0x232a95,[_0x230826],{'detached':!![],'stdio':_0x267920(0xdf)})['unref']();}}export function isWindows(){const _0x18642f=a226_0x2a5ab0;return process['platform']===_0x18642f(0xb3);}export function getCrossSpawnOptions(_0x25bf9b){return{..._0x25bf9b??{},'shell':isWindows()};}export function escapeWindowsArg(_0x45e187){const _0x1e825b=a226_0x2a5ab0;if(!/[ \t"&|<>^%!`\r\n]/[_0x1e825b(0xdd)](_0x45e187))return _0x45e187;const _0x2652af=_0x45e187[_0x1e825b(0xd1)](/"/g,'\x22\x22');return'\x22'+_0x2652af+'\x22';}export function crossSpawn(_0x4666e2,_0x54657e,_0x38ffef){const _0x449d62=a226_0x2a5ab0;if(isWindows()){const _0x5a3068=escapeWindowsArg(_0x4666e2),_0x55df82=_0x54657e['map'](escapeWindowsArg),_0xc8dbe8=[_0x5a3068,..._0x55df82][_0x449d62(0xdb)]('\x20');return spawn(_0xc8dbe8,[],{..._0x38ffef,'shell':!![]});}return spawn(_0x4666e2,_0x54657e,{..._0x38ffef,'shell':![]});}export function gracefulExit(_0x370764=0x0){const _0x2267eb=a226_0x2a5ab0;isWindows()?setTimeout(()=>process[_0x2267eb(0xcd)](_0x370764),0x32):process[_0x2267eb(0xcd)](_0x370764);}function a226_0x3e66(){const _0x2ebb0d=['558789AEYQpE','win32','12EzsOUq','treasure\x20studio','start','1gyzxHO','code','toString','2730992UJUSuF','https:','xonsh','ps\x20-p\x20','claude','1520253eENpqO','tcsh','darwin','910107hlKCOe','\x20-o\x20ppid=,comm=','comm','stdout','utf-8','data','pop','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','4qJKdPd','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','pipe','exit','protocol','702190TylIQM','xdg-open','replace','ion','which','split','electron','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','dash','elvish','trim','ppid','join','href','test','toLowerCase','ignore','has','platform','error','kill','isInteger','open','pwsh','csh','pid','bash','Unsupported\x20protocol:\x20','1804105StzNLE','854708qIuBeE','fish','cmd.exe','where.exe'];a226_0x3e66=function(){return _0x2ebb0d;};return a226_0x3e66();}export function findExecutable(_0x5d8549,_0x5e8197=0x1388){return new Promise(_0x427265=>{const _0x125875=a226_0x3ce2,_0x3b3cc9=isWindows()?_0x125875(0xb1):_0x125875(0xd3);let _0x3b6479=![];const _0x1fa0ab=crossSpawn(_0x3b3cc9,[_0x5d8549],{'stdio':'pipe','shell':isWindows()}),_0x29b7cd=setTimeout(()=>{!_0x3b6479&&(_0x3b6479=!![],_0x1fa0ab['kill'](),_0x427265(null));},_0x5e8197);let _0x223500='';_0x1fa0ab[_0x125875(0xc5)]?.['on'](_0x125875(0xc7),_0x88cb3c=>{const _0x29826c=_0x125875;_0x223500+=_0x88cb3c[_0x29826c(0xb9)]();}),_0x1fa0ab['stderr']?.['on'](_0x125875(0xc7),()=>{}),_0x1fa0ab['on'](_0x125875(0xcd),_0x4a178e=>{const _0x53de3b=_0x125875;if(_0x3b6479)return;_0x3b6479=!![],clearTimeout(_0x29b7cd);if(_0x4a178e===0x0&&_0x223500[_0x53de3b(0xd9)]()){const _0x1f4a08=_0x223500[_0x53de3b(0xd9)]()[_0x53de3b(0xd4)](/\r?\n/)[0x0];_0x427265(_0x1f4a08);}else _0x427265(null);}),_0x1fa0ab['on'](_0x125875(0xe2),()=>{if(_0x3b6479)return;_0x3b6479=!![],clearTimeout(_0x29b7cd),_0x427265(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bb9ec,_0x214614){const _0x108c03=a227_0x546e,_0x53ec02=_0x4bb9ec();while(!![]){try{const _0x4d5197=-parseInt(_0x108c03(0xf6))/0x1*(parseInt(_0x108c03(0xed))/0x2)+-parseInt(_0x108c03(0xeb))/0x3+-parseInt(_0x108c03(0xf3))/0x4+parseInt(_0x108c03(0xec))/0x5*(parseInt(_0x108c03(0xf5))/0x6)+-parseInt(_0x108c03(0xe5))/0x7*(-parseInt(_0x108c03(0xf1))/0x8)+parseInt(_0x108c03(0xf8))/0x9*(-parseInt(_0x108c03(0xea))/0xa)+parseInt(_0x108c03(0xef))/0xb;if(_0x4d5197===_0x214614)break;else _0x53ec02['push'](_0x53ec02['shift']());}catch(_0x28d87d){_0x53ec02['push'](_0x53ec02['shift']());}}}(a227_0x52d0,0x612b3));import*as a227_0x1061b1 from'readline';function a227_0x52d0(){const _0x1f5f99=['253497YXsDWW','425ripolb','94QRiFOF','toLowerCase','3817187SUcrYq','\x20(y/N):\x20','5491056PzZPVh','stdin','1814680riyqlu','\x20[y/N]\x20','15234ficYdK','6555kHAQkd','stderr','44613dkSKro','resume','write','utf8','setRawMode','isTTY','question','close','7UlJNxa','data','createInterface','removeListener','setEncoding','10srTPNm'];a227_0x52d0=function(){return _0x1f5f99;};return a227_0x52d0();}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x455899=a227_0x546e;return process[_0x455899(0xf2)][_0x455899(0xfd)]===!![];}function a227_0x546e(_0x24da04,_0x50493f){_0x24da04=_0x24da04-0xe5;const _0x52d0c8=a227_0x52d0();let _0x546ee8=_0x52d0c8[_0x24da04];return _0x546ee8;}export async function confirm(_0x1c01a5){const _0xcfe0c2=a227_0x546e,_0x136ca=a227_0x1061b1[_0xcfe0c2(0xe7)]({'input':process[_0xcfe0c2(0xf2)],'output':process['stdout']});return new Promise(_0x30c292=>{const _0x39d251=_0xcfe0c2;_0x136ca[_0x39d251(0xfe)](_0x1c01a5+_0x39d251(0xf0),_0x1c7ea7=>{const _0x26cd67=_0x39d251;_0x136ca[_0x26cd67(0xff)](),_0x30c292(_0x1c7ea7['toLowerCase']()==='y'||_0x1c7ea7[_0x26cd67(0xee)]()==='yes');});});}export async function confirmKey(_0x25e1a6){const _0x5398b6=a227_0x546e;if(!process['stdin'][_0x5398b6(0xfd)])return![];return process['stderr']['write'](_0x25e1a6+_0x5398b6(0xf4)),new Promise(_0x5e84f3=>{const _0x41da1a=_0x5398b6,_0x5402b7=process['stdin'];_0x5402b7['setRawMode'](!![]),_0x5402b7[_0x41da1a(0xf9)](),_0x5402b7[_0x41da1a(0xe9)](_0x41da1a(0xfb));const _0x45eb89=_0x253839=>{const _0x7d7348=_0x41da1a;_0x5402b7[_0x7d7348(0xfc)](![]),_0x5402b7['pause'](),_0x5402b7[_0x7d7348(0xe8)](_0x7d7348(0xe6),_0x45eb89);if(_0x253839==='\x1b'){process[_0x7d7348(0xf7)][_0x7d7348(0xfa)]('\x0a'),_0x5e84f3(![]);return;}_0x253839==='\x03'&&(process[_0x7d7348(0xf7)][_0x7d7348(0xfa)]('\x0a'),gracefulExit(0x82));if(_0x253839[_0x7d7348(0xee)]()==='y'){process[_0x7d7348(0xf7)][_0x7d7348(0xfa)]('y\x0a'),_0x5e84f3(!![]);return;}process['stderr'][_0x7d7348(0xfa)]('\x0a'),_0x5e84f3(![]);};_0x5402b7['on']('data',_0x45eb89);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xcf3cee,_0x5e9517){const _0x474578=a228_0x4d78,_0x21e152=_0xcf3cee();while(!![]){try{const _0x580c97=parseInt(_0x474578(0x1ca))/0x1+parseInt(_0x474578(0x1cb))/0x2*(parseInt(_0x474578(0x1e0))/0x3)+parseInt(_0x474578(0x1c9))/0x4+parseInt(_0x474578(0x1db))/0x5*(-parseInt(_0x474578(0x1d9))/0x6)+parseInt(_0x474578(0x1cd))/0x7+parseInt(_0x474578(0x1d1))/0x8*(parseInt(_0x474578(0x1d6))/0x9)+-parseInt(_0x474578(0x1d4))/0xa*(parseInt(_0x474578(0x1c5))/0xb);if(_0x580c97===_0x5e9517)break;else _0x21e152['push'](_0x21e152['shift']());}catch(_0x1d37cd){_0x21e152['push'](_0x21e152['shift']());}}}(a228_0x3a46,0xe08e3));import a228_0x544ec9 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x577305,_0x4a9a4c={}){const _0x2c77d2=a228_0x4d78,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x4a9a4c;return a228_0x544ec9({'text':_0x577305,'color':_0x2c77d2(0x1cc),'stream':process[_0x2c77d2(0x1dc)],'isEnabled':forceEnabled||process[_0x2c77d2(0x1dc)]['isTTY']&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x3f15bd,_0x3d14cd,_0x2f1477={}){const _0x5de5dc=a228_0x4d78,_0x776e22=_0x2f1477['clock']??(()=>Date[_0x5de5dc(0x1ce)]()),_0x1a55d7=createCommandSpinner(_0x3f15bd,_0x2f1477);_0x1a55d7[_0x5de5dc(0x1df)]();const _0x206101=_0x776e22();try{const _0x1f365e=await _0x3d14cd(),_0x373363=_0x776e22()-_0x206101;return _0x1a55d7[_0x5de5dc(0x1de)](),{'data':_0x1f365e,'elapsedMs':_0x373363};}catch(_0x58b870){_0x1a55d7[_0x5de5dc(0x1de)]();throw _0x58b870;}}function a228_0x4d78(_0xda9cfa,_0x2ed9f3){_0xda9cfa=_0xda9cfa-0x1c4;const _0x3a467f=a228_0x3a46();let _0x4d7878=_0x3a467f[_0xda9cfa];return _0x4d7878;}function a228_0x3a46(){const _0x5bbb7a=['Processing','replace','30185270HoCZTA','floor','9RXIpRU','extra','clock','51828NlPCxU','...','865yaYZyF','stderr','phase','stop','start','8133CEncbo','jobId','11qIzdWd','toFixed','intervalFactory','text','6797180cJWhvW','719969QGQNys','816bcwpnI','cyan','1763174wLqfBw','now','trim','isSpinning','13243568JogVpO'];a228_0x3a46=function(){return _0x5bbb7a;};return a228_0x3a46();}export async function withProgressSpinner(_0x1cce78,_0x2bf607,_0x1b00b8={}){const _0x52d004=a228_0x4d78,_0x4e29d0=_0x1b00b8[_0x52d004(0x1d8)]??(()=>Date[_0x52d004(0x1ce)]()),_0x595efb=_0x1b00b8[_0x52d004(0x1c7)]??setInterval,_0x115028=createCommandSpinner(_0x1cce78,_0x1b00b8);_0x115028[_0x52d004(0x1df)]();const _0x3dc8ed=_0x4e29d0(),_0xe8eed2=_0x1cce78[_0x52d004(0x1d3)](_0x52d004(0x1da),'')[_0x52d004(0x1cf)]()||_0x52d004(0x1d2),_0x37820a={};let _0x35d09d=_0x1cce78;const _0x57afc5=()=>{const _0x26102c=_0x52d004;if(!_0x115028[_0x26102c(0x1d0)])return;const _0x2e369d=_0x4e29d0()-_0x3dc8ed,_0x400ffb=formatElapsed(_0x2e369d),_0x2e35e7=_0x37820a[_0x26102c(0x1dd)]?.[_0x26102c(0x1cf)]()||_0xe8eed2,_0x588f8=_0x37820a[_0x26102c(0x1c4)]?'\x20[Job\x20ID:\x20'+_0x37820a['jobId']+']':'',_0x5beedf=_0x37820a['extra']?'\x20'+_0x37820a[_0x26102c(0x1d7)]:'',_0x4acbc5=_0x2e35e7+'\x20'+_0x400ffb+_0x5beedf+_0x588f8;_0x4acbc5!==_0x35d09d&&_0x4acbc5[_0x26102c(0x1cf)]()&&(_0x115028[_0x26102c(0x1c8)]=_0x4acbc5,_0x35d09d=_0x4acbc5);},_0x3102e5=_0x595efb(()=>{_0x57afc5();},0x3e8),_0x2da111={'setPhase':_0x5ae415=>{const _0x432cdb=_0x52d004;_0x37820a[_0x432cdb(0x1dd)]=_0x5ae415;const _0x3602de=_0x5ae415?.[_0x432cdb(0x1cf)]()||_0xe8eed2,_0x54c5eb=_0x4e29d0()-_0x3dc8ed,_0x16a2b7=formatElapsed(_0x54c5eb),_0x143dcd=_0x37820a[_0x432cdb(0x1c4)]?'\x20[Job\x20ID:\x20'+_0x37820a[_0x432cdb(0x1c4)]+']':'',_0x31236f=_0x37820a[_0x432cdb(0x1d7)]?'\x20'+_0x37820a['extra']:'',_0x11425e=_0x3602de+'\x20'+_0x16a2b7+_0x31236f+_0x143dcd;_0x115028[_0x432cdb(0x1d0)]&&_0x11425e[_0x432cdb(0x1cf)]()&&(_0x115028[_0x432cdb(0x1c8)]=_0x11425e,_0x35d09d=_0x11425e);},'setJobId':_0x12a78d=>{const _0x20f116=_0x52d004;_0x37820a[_0x20f116(0x1c4)]=_0x12a78d,_0x57afc5();},'setExtra':_0x122640=>{const _0x4b31a2=_0x52d004;_0x37820a[_0x4b31a2(0x1d7)]=_0x122640,_0x57afc5();}};_0x57afc5();try{const _0x5347b6=await _0x2bf607(_0x2da111),_0x1d61ab=_0x4e29d0()-_0x3dc8ed;return{'data':_0x5347b6,'elapsedMs':_0x1d61ab};}finally{clearInterval(_0x3102e5),_0x115028[_0x52d004(0x1de)]();}}export function formatElapsed(_0x50ae3e){const _0x3b7806=a228_0x4d78,_0x3a9b0c=Math[_0x3b7806(0x1d5)](_0x50ae3e/0x3e8);if(_0x3a9b0c<0x3c)return(_0x50ae3e/0x3e8)[_0x3b7806(0x1c6)](0x1)+'s';const _0x34e534=Math[_0x3b7806(0x1d5)](_0x3a9b0c/0x3c),_0xa6ab52=_0x3a9b0c%0x3c;if(_0x34e534<0x3c)return _0x34e534+'m\x20'+_0xa6ab52+'s';const _0x4a2082=Math[_0x3b7806(0x1d5)](_0x34e534/0x3c),_0x210842=_0x34e534%0x3c;return _0x4a2082+'h\x20'+_0x210842+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x402377,_0x215c47){const _0x499958=a229_0x2082,_0x1e2983=_0x402377();while(!![]){try{const _0x35207d=-parseInt(_0x499958(0xaa))/0x1*(-parseInt(_0x499958(0xb0))/0x2)+-parseInt(_0x499958(0xb1))/0x3+parseInt(_0x499958(0xaf))/0x4*(parseInt(_0x499958(0xbe))/0x5)+-parseInt(_0x499958(0xa9))/0x6*(parseInt(_0x499958(0xac))/0x7)+parseInt(_0x499958(0xad))/0x8*(parseInt(_0x499958(0xbc))/0x9)+-parseInt(_0x499958(0xae))/0xa*(parseInt(_0x499958(0xab))/0xb)+parseInt(_0x499958(0xa8))/0xc*(parseInt(_0x499958(0xc0))/0xd);if(_0x35207d===_0x215c47)break;else _0x1e2983['push'](_0x1e2983['shift']());}catch(_0x370d3e){_0x1e2983['push'](_0x1e2983['shift']());}}}(a229_0x21ae,0x9322b));export async function*parseSSEStream(_0x4dd461,_0x41a544){const _0xc128c4=a229_0x2082;if(!_0x4dd461[_0xc128c4(0xb8)])throw new Error('Response\x20body\x20is\x20null');const _0x3db032=_0x4dd461[_0xc128c4(0xb8)][_0xc128c4(0xb2)](),_0x57e6f8=new TextDecoder();let _0x453a22='',_0x3ca63d={};try{while(!![]){const {done:_0x43076a,value:_0x46c7d4}=await _0x3db032[_0xc128c4(0xb3)]();if(_0x43076a){if(_0x3ca63d[_0xc128c4(0xbb)]){_0x41a544?.[_0xc128c4(0xb5)](_0xc128c4(0xc1)+_0x3ca63d['data']);const _0x2a9830=parseSSEData(_0x3ca63d[_0xc128c4(0xbb)]);yield _0x2a9830;}break;}_0x453a22+=_0x57e6f8['decode'](_0x46c7d4,{'stream':!![]});const _0x3dba5d=_0x453a22[_0xc128c4(0xbf)]('\x0a');_0x453a22=_0x3dba5d[_0xc128c4(0xb9)]()||'';for(const _0x1c0af1 of _0x3dba5d){if(_0x1c0af1[_0xc128c4(0xb6)]()===''){if(_0x3ca63d[_0xc128c4(0xbb)]){_0x41a544?.['debug'](_0xc128c4(0xc1)+_0x3ca63d[_0xc128c4(0xbb)]);const _0x364b77=parseSSEData(_0x3ca63d[_0xc128c4(0xbb)]);yield _0x364b77,_0x3ca63d={};}continue;}if(_0x1c0af1[_0xc128c4(0xba)](':'))continue;const _0x3f1543=_0x1c0af1['indexOf'](':');if(_0x3f1543===-0x1)continue;const _0x3a50b9=_0x1c0af1[_0xc128c4(0xb4)](0x0,_0x3f1543);let _0x2e6769=_0x1c0af1[_0xc128c4(0xb4)](_0x3f1543+0x1);_0x2e6769[_0xc128c4(0xba)]('\x20')&&(_0x2e6769=_0x2e6769['slice'](0x1));switch(_0x3a50b9){case _0xc128c4(0xb7):_0x3ca63d[_0xc128c4(0xb7)]=_0x2e6769;break;case _0xc128c4(0xbb):_0x3ca63d[_0xc128c4(0xbb)]=_0x3ca63d[_0xc128c4(0xbb)]?_0x3ca63d[_0xc128c4(0xbb)]+'\x0a'+_0x2e6769:_0x2e6769;break;case'id':_0x3ca63d['id']=_0x2e6769;break;}}}}finally{_0x3db032[_0xc128c4(0xbd)]();}}function a229_0x2082(_0x118ac7,_0x297ffa){_0x118ac7=_0x118ac7-0xa8;const _0x21ae8b=a229_0x21ae();let _0x2082ab=_0x21ae8b[_0x118ac7];return _0x2082ab;}function a229_0x21ae(){const _0x3ac157=['67440YFjETh','getReader','read','slice','debug','trim','event','body','pop','startsWith','data','45oMtQiE','releaseLock','417310OWRtka','split','13ERYNoM','[LLM\x20API\x20SSE]\x20','8332812QHdzKv','6WaubwX','41854WPeNKx','598565amcftX','3947818jbXbPk','385912XGRjmA','130tIBozl','28PsHbCg','18RjWJgj'];a229_0x21ae=function(){return _0x3ac157;};return a229_0x21ae();}function parseSSEData(_0xabdd45){try{return JSON['parse'](_0xabdd45);}catch(_0x190b21){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0xabdd45,{'cause':_0x190b21});}}
|