@treasuredata/tdx 0.26.6 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.d.ts +4 -2
- package/dist/commands/claude-statusline-command.d.ts.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-statusline-command.js.map +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.d.ts.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/job-command.js.map +1 -1
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.d.ts.map +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-command.js.map +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.d.ts +2 -2
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/passthrough-server.d.ts +18 -3
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.d.ts +20 -2
- package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/proxy/sse-usage-parser.js.map +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.d.ts +14 -37
- package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/agent-yaml.js.map +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.d.ts +82 -0
- package/dist/sdk/agent/tool-target-registry.d.ts.map +1 -0
- package/dist/sdk/agent/tool-target-registry.js +1 -0
- package/dist/sdk/agent/tool-target-registry.js.map +1 -0
- package/dist/sdk/agent/types/agent-def.d.ts +3 -2
- package/dist/sdk/agent/types/agent-def.d.ts.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.d.ts +9 -0
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.d.ts +20 -0
- package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js.map +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.d.ts +2 -2
- package/dist/sdk/client/td-api-client.d.ts.map +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/td-api-client.js.map +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.d.ts +1 -1
- package/dist/sdk/job.d.ts.map +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/job.js.map +1 -1
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.d.ts.map +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/index.js.map +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.d.ts +0 -4
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +2 -2
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.d.ts +3 -0
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/pull-workflow.js.map +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.d.ts +8 -0
- package/dist/sdk/segment/push-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/segment-def.d.ts +10 -1
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +23 -15
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +3 -3
- package/dist/utils/port.d.ts +0 -18
- package/dist/utils/port.d.ts.map +0 -1
- package/dist/utils/port.js +0 -1
- package/dist/utils/port.js.map +0 -1
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a159_0x2686(){const _0x3243c7=['513558QZjaVD','\x20-\x20','removed','42290ZZDFpm','1965672gbQeLY','69811EJnaLG','join','map','min','added','some','red','unchanged','\x20\x20...','content','dim','\x20+\x20','68vtaWcU','old','cyan','add','new','max','329716NZazqN','length','padStart','push','fill','type','split','2666210bnAskj','has','unshift','size','280ySwiFY','3076FLCOTn','192CViehT','repeat'];a159_0x2686=function(){return _0x3243c7;};return a159_0x2686();}function a159_0x468d(_0x150d20,_0x3bc983){_0x150d20=_0x150d20-0x108;const _0x268670=a159_0x2686();let _0x468d96=_0x268670[_0x150d20];return _0x468d96;}(function(_0x14a68c,_0x51b1b0){const _0x2775d=a159_0x468d,_0xebe090=_0x14a68c();while(!![]){try{const _0x1aaa02=-parseInt(_0x2775d(0x10c))/0x1+parseInt(_0x2775d(0x118))/0x2*(-parseInt(_0x2775d(0x119))/0x3)+parseInt(_0x2775d(0x12c))/0x4*(parseInt(_0x2775d(0x11e))/0x5)+parseInt(_0x2775d(0x11f))/0x6+-parseInt(_0x2775d(0x120))/0x7*(-parseInt(_0x2775d(0x117))/0x8)+parseInt(_0x2775d(0x11b))/0x9+-parseInt(_0x2775d(0x113))/0xa;if(_0x1aaa02===_0x51b1b0)break;else _0xebe090['push'](_0xebe090['shift']());}catch(_0x2e1faf){_0xebe090['push'](_0xebe090['shift']());}}}(a159_0x2686,0x2c9da));import a159_0x374ebb from'chalk';export function generateDiff(_0x4b74f3,_0x5d6377){const _0x5e9f23=a159_0x468d,_0x4bdf81=_0x4b74f3[_0x5e9f23(0x112)]('\x0a'),_0x51f43e=_0x5d6377['split']('\x0a'),_0x4b696e=[],_0x3debc1=computeLCS(_0x4bdf81,_0x51f43e);let _0x69c6bf=0x0,_0x20d399=0x0,_0x16f4d9=0x0;while(_0x69c6bf<_0x4bdf81[_0x5e9f23(0x10d)]||_0x20d399<_0x51f43e[_0x5e9f23(0x10d)]){if(_0x16f4d9<_0x3debc1[_0x5e9f23(0x10d)]&&_0x69c6bf<_0x4bdf81['length']&&_0x4bdf81[_0x69c6bf]===_0x3debc1[_0x16f4d9])_0x20d399<_0x51f43e['length']&&_0x51f43e[_0x20d399]===_0x3debc1[_0x16f4d9]?(_0x4b696e['push']({'type':_0x5e9f23(0x127),'content':_0x4bdf81[_0x69c6bf]}),_0x69c6bf++,_0x20d399++,_0x16f4d9++):(_0x4b696e[_0x5e9f23(0x10f)]({'type':'added','content':_0x51f43e[_0x20d399]}),_0x20d399++);else{if(_0x16f4d9<_0x3debc1[_0x5e9f23(0x10d)]&&_0x20d399<_0x51f43e[_0x5e9f23(0x10d)]&&_0x51f43e[_0x20d399]===_0x3debc1[_0x16f4d9])_0x4b696e[_0x5e9f23(0x10f)]({'type':_0x5e9f23(0x11d),'content':_0x4bdf81[_0x69c6bf]}),_0x69c6bf++;else{if(_0x69c6bf<_0x4bdf81[_0x5e9f23(0x10d)]&&(_0x16f4d9>=_0x3debc1[_0x5e9f23(0x10d)]||_0x4bdf81[_0x69c6bf]!==_0x3debc1[_0x16f4d9]))_0x4b696e['push']({'type':_0x5e9f23(0x11d),'content':_0x4bdf81[_0x69c6bf]}),_0x69c6bf++;else _0x20d399<_0x51f43e[_0x5e9f23(0x10d)]&&(_0x4b696e['push']({'type':_0x5e9f23(0x124),'content':_0x51f43e[_0x20d399]}),_0x20d399++);}}}return _0x4b696e;}function computeLCS(_0x180a0a,_0x2fce7f){const _0x160901=a159_0x468d,_0x5dbc2f=_0x180a0a[_0x160901(0x10d)],_0x5a677e=_0x2fce7f[_0x160901(0x10d)],_0x59515f=Array(_0x5dbc2f+0x1)[_0x160901(0x110)](null)[_0x160901(0x122)](()=>Array(_0x5a677e+0x1)[_0x160901(0x110)](0x0));for(let _0x58089c=0x1;_0x58089c<=_0x5dbc2f;_0x58089c++){for(let _0x2bfd5c=0x1;_0x2bfd5c<=_0x5a677e;_0x2bfd5c++){_0x180a0a[_0x58089c-0x1]===_0x2fce7f[_0x2bfd5c-0x1]?_0x59515f[_0x58089c][_0x2bfd5c]=_0x59515f[_0x58089c-0x1][_0x2bfd5c-0x1]+0x1:_0x59515f[_0x58089c][_0x2bfd5c]=Math[_0x160901(0x10b)](_0x59515f[_0x58089c-0x1][_0x2bfd5c],_0x59515f[_0x58089c][_0x2bfd5c-0x1]);}}const _0x8e03b9=[];let _0x24d1c3=_0x5dbc2f,_0x12aa3b=_0x5a677e;while(_0x24d1c3>0x0&&_0x12aa3b>0x0){if(_0x180a0a[_0x24d1c3-0x1]===_0x2fce7f[_0x12aa3b-0x1])_0x8e03b9[_0x160901(0x115)](_0x180a0a[_0x24d1c3-0x1]),_0x24d1c3--,_0x12aa3b--;else _0x59515f[_0x24d1c3-0x1][_0x12aa3b]>_0x59515f[_0x24d1c3][_0x12aa3b-0x1]?_0x24d1c3--:_0x12aa3b--;}return _0x8e03b9;}export function formatDiffWithColors(_0x10d77c,_0x52ef02=0x3){const _0x225f87=a159_0x468d,_0x48ce90=new Set();_0x10d77c['forEach']((_0x326c32,_0x3f1d5d)=>{const _0x360770=a159_0x468d;_0x326c32['type']!==_0x360770(0x127)&&_0x48ce90[_0x360770(0x109)](_0x3f1d5d);});if(_0x48ce90[_0x225f87(0x116)]===0x0)return'';const _0x3ec342=new Set();for(const _0xfebcc3 of _0x48ce90){for(let _0x39a495=Math[_0x225f87(0x10b)](0x0,_0xfebcc3-_0x52ef02);_0x39a495<=Math[_0x225f87(0x123)](_0x10d77c[_0x225f87(0x10d)]-0x1,_0xfebcc3+_0x52ef02);_0x39a495++){_0x3ec342[_0x225f87(0x109)](_0x39a495);}}const _0x16065c=[];let _0x1e2d87=-0x1;const _0x57087b=_0x10d77c[_0x225f87(0x10d)],_0x47cc4a=Math[_0x225f87(0x10b)](0x3,String(_0x57087b)[_0x225f87(0x10d)]),_0x25883a=[];let _0x465627=0x0,_0x1ce9ee=0x0;for(const _0x28850b of _0x10d77c){if(_0x28850b[_0x225f87(0x111)]===_0x225f87(0x11d))_0x465627++,_0x25883a[_0x225f87(0x10f)]({'old':_0x465627,'new':0x0});else _0x28850b['type']===_0x225f87(0x124)?(_0x1ce9ee++,_0x25883a[_0x225f87(0x10f)]({'old':0x0,'new':_0x1ce9ee})):(_0x465627++,_0x1ce9ee++,_0x25883a[_0x225f87(0x10f)]({'old':_0x465627,'new':_0x1ce9ee}));}for(let _0x1c3c2b=0x0;_0x1c3c2b<_0x10d77c[_0x225f87(0x10d)];_0x1c3c2b++){if(!_0x3ec342[_0x225f87(0x114)](_0x1c3c2b))continue;_0x1e2d87!==-0x1&&_0x1c3c2b>_0x1e2d87+0x1&&_0x16065c['push'](a159_0x374ebb[_0x225f87(0x108)](_0x225f87(0x128)));_0x1e2d87=_0x1c3c2b;const _0x34f91d=_0x10d77c[_0x1c3c2b],_0x1020d1=_0x25883a[_0x1c3c2b],_0x16eea1=_0x1020d1[_0x225f87(0x12d)]>0x0?String(_0x1020d1['old'])[_0x225f87(0x10e)](_0x47cc4a):'\x20'['repeat'](_0x47cc4a),_0x2483e3=_0x1020d1[_0x225f87(0x10a)]>0x0?String(_0x1020d1['new'])[_0x225f87(0x10e)](_0x47cc4a):'\x20'[_0x225f87(0x11a)](_0x47cc4a);switch(_0x34f91d[_0x225f87(0x111)]){case'removed':_0x16065c['push'](a159_0x374ebb[_0x225f87(0x126)](_0x16eea1+'\x20'+_0x2483e3+_0x225f87(0x11c)+_0x34f91d[_0x225f87(0x129)]));break;case _0x225f87(0x124):_0x16065c[_0x225f87(0x10f)](a159_0x374ebb['green'](_0x16eea1+'\x20'+_0x2483e3+_0x225f87(0x12b)+_0x34f91d['content']));break;default:_0x16065c[_0x225f87(0x10f)](a159_0x374ebb[_0x225f87(0x12a)](_0x16eea1+'\x20'+_0x2483e3+'\x20\x20\x20'+_0x34f91d['content']));break;}}return _0x16065c[_0x225f87(0x121)]('\x0a');}export function hasChanges(_0x395540){const _0x3d3872=a159_0x468d;return _0x395540[_0x3d3872(0x125)](_0x423193=>_0x423193[_0x3d3872(0x111)]!=='unchanged');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f2943,_0x5ba577){const _0x216b0e=a160_0x2dbd,_0x8a9588=_0x1f2943();while(!![]){try{const _0x2bf359=-parseInt(_0x216b0e(0xed))/0x1+-parseInt(_0x216b0e(0xf2))/0x2*(-parseInt(_0x216b0e(0xf1))/0x3)+-parseInt(_0x216b0e(0xea))/0x4*(parseInt(_0x216b0e(0xf6))/0x5)+-parseInt(_0x216b0e(0xec))/0x6+parseInt(_0x216b0e(0xf9))/0x7*(parseInt(_0x216b0e(0xf5))/0x8)+-parseInt(_0x216b0e(0xe7))/0x9*(parseInt(_0x216b0e(0xf3))/0xa)+parseInt(_0x216b0e(0xf4))/0xb;if(_0x2bf359===_0x5ba577)break;else _0x8a9588['push'](_0x8a9588['shift']());}catch(_0x52d559){_0x8a9588['push'](_0x8a9588['shift']());}}}(a160_0x4152,0x7ced7));function a160_0x4152(){const _0x436635=['mkdirSync','chmodSync','7nyKjLV','writeFileSync',').\x20','225yLWOnK','statSync','dirname','1998916QoSQhG','mode','2910204JLwVRB','555210hmZDBI','Warning:\x20','warn','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','15ervtnd','267838BLweCf','365230RlqlCP','18974714KpUfuJ','4561456oEjwNQ','5eFPdRw'];a160_0x4152=function(){return _0x436635;};return a160_0x4152();}import*as a160_0x621b2f from'node:fs';import*as a160_0x468bf8 from'node:path';export function setSecureFilePermissions(_0x57537c){const _0x1d0815=a160_0x2dbd;try{a160_0x621b2f[_0x1d0815(0xf8)](_0x57537c,0x180);}catch{console[_0x1d0815(0xef)](_0x1d0815(0xf0)+_0x57537c);}}export function setSecureDirectoryPermissions(_0x432982){const _0x39d6fe=a160_0x2dbd;try{a160_0x621b2f['chmodSync'](_0x432982,0x1c0);}catch{console[_0x39d6fe(0xef)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x432982);}}function a160_0x2dbd(_0x440856,_0x3ea0f5){_0x440856=_0x440856-0xe5;const _0x41527c=a160_0x4152();let _0x2dbd7f=_0x41527c[_0x440856];return _0x2dbd7f;}export function createSecureDirectory(_0x2966bb){const _0x1ffb38=a160_0x2dbd;!a160_0x621b2f['existsSync'](_0x2966bb)&&(a160_0x621b2f[_0x1ffb38(0xf7)](_0x2966bb,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x2966bb));}export function validateSecureFilePermissions(_0x49b90f){const _0x30c6f3=a160_0x2dbd;try{const _0xa7ad39=a160_0x621b2f[_0x30c6f3(0xe8)](_0x49b90f),_0x4ae5bf=_0xa7ad39[_0x30c6f3(0xeb)]&0x1ff,_0x2e49df=(_0x4ae5bf&0x3f)!==0x0;if(_0x2e49df)return console[_0x30c6f3(0xef)](_0x30c6f3(0xee)+_0x49b90f+'\x20has\x20insecure\x20permissions\x20('+_0x4ae5bf['toString'](0x8)+_0x30c6f3(0xe6)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x2cd71c,_0x91f5f0){const _0x158e5b=a160_0x2dbd,_0x4e2e72=a160_0x468bf8[_0x158e5b(0xe9)](_0x2cd71c);createSecureDirectory(_0x4e2e72),a160_0x621b2f[_0x158e5b(0xe5)](_0x2cd71c,_0x91f5f0,{'mode':0x180}),setSecureFilePermissions(_0x2cd71c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3923f1,_0x3090f8){const _0xc0f792=a161_0x4dc3,_0x403cb7=_0x3923f1();while(!![]){try{const _0x1cad01=-parseInt(_0xc0f792(0x1e8))/0x1*(-parseInt(_0xc0f792(0x1e3))/0x2)+parseInt(_0xc0f792(0x1f7))/0x3*(-parseInt(_0xc0f792(0x1eb))/0x4)+-parseInt(_0xc0f792(0x1f9))/0x5+parseInt(_0xc0f792(0x1f4))/0x6+parseInt(_0xc0f792(0x1e4))/0x7*(-parseInt(_0xc0f792(0x1f5))/0x8)+-parseInt(_0xc0f792(0x1f2))/0x9*(-parseInt(_0xc0f792(0x1e9))/0xa)+parseInt(_0xc0f792(0x1ed))/0xb;if(_0x1cad01===_0x3090f8)break;else _0x403cb7['push'](_0x403cb7['shift']());}catch(_0x4cb263){_0x403cb7['push'](_0x403cb7['shift']());}}}(a161_0x3f72,0xce8be));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x285769=a161_0x4dc3;return process.env.TDX_CACHE_DIR||join(homedir(),_0x285769(0x1f0),_0x285769(0x1e5));}const registry=new Map();export function registerGlobalCacheKey(_0x14e65a,_0x168a83){const _0x237bae=a161_0x4dc3,_0x1a14c1=registry[_0x237bae(0x1f8)](_0x14e65a);if(_0x1a14c1&&_0x1a14c1!==_0x168a83)throw new Error('Global\x20cache\x20key\x20\x22'+_0x14e65a+_0x237bae(0x1e7)+_0x1a14c1+'\x22,\x20cannot\x20register\x20for\x20\x22'+_0x168a83+'\x22');registry[_0x237bae(0x1f6)](_0x14e65a,_0x168a83);}export function getGlobalCachePath(_0x35f35f){return join(getGlobalCacheDir(),_0x35f35f);}function a161_0x4dc3(_0x22cca6,_0x295354){_0x22cca6=_0x22cca6-0x1e3;const _0x3f722c=a161_0x3f72();let _0x4dc345=_0x3f722c[_0x22cca6];return _0x4dc345;}function ensureGlobalCacheDir(){const _0x1a14d9=getGlobalCacheDir();!existsSync(_0x1a14d9)&&mkdirSync(_0x1a14d9,{'recursive':!![]});}function readCacheJson(_0x33fbc0){const _0x3836b5=a161_0x4dc3,_0x2b9076=getGlobalCachePath(_0x33fbc0);if(!existsSync(_0x2b9076))return undefined;try{const _0x28b36f=readFileSync(_0x2b9076,_0x3836b5(0x1ec));return JSON[_0x3836b5(0x1ef)](_0x28b36f);}catch{return undefined;}}function writeCacheJson(_0x46430b,_0x5029b4){const _0x122de1=a161_0x4dc3;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x46430b),JSON[_0x122de1(0x1f3)](_0x5029b4,null,0x2),'utf-8');}function readCacheText(_0x573e79){const _0x2b3c70=a161_0x4dc3,_0x5ffdc3=getGlobalCachePath(_0x573e79);if(!existsSync(_0x5ffdc3))return undefined;try{return readFileSync(_0x5ffdc3,_0x2b3c70(0x1ec));}catch{return undefined;}}function writeCacheText(_0x4e421f,_0x25d949){const _0x4f01f1=a161_0x4dc3;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x4e421f),_0x25d949,_0x4f01f1(0x1ec));}function clearCache(_0x499271){const _0x50388d=getGlobalCachePath(_0x499271);if(existsSync(_0x50388d))try{unlinkSync(_0x50388d);}catch{}}function cacheExists(_0x98abff){return existsSync(getGlobalCachePath(_0x98abff));}function a161_0x3f72(){const _0x8fd379=['default','parse','.cache','trim','8901WaqHpT','stringify','1345020YIgCXV','388016RpHbBI','set','201NSyhut','get','6995085XXDFwF','183688xrSycd','238nUDhXE','tdx','{profile}','\x22\x20already\x20registered\x20by\x20\x22','8svDGJY','890ZlGWzy','replace','17324JLRiGl','utf-8','34510663LPZfWQ'];a161_0x3f72=function(){return _0x8fd379;};return a161_0x3f72();}export function createGlobalCache(_0x5d8563,_0x546554){return registerGlobalCacheKey(_0x5d8563,_0x546554),{'read':()=>readCacheJson(_0x5d8563),'write':_0x2af800=>writeCacheJson(_0x5d8563,_0x2af800),'clear':()=>clearCache(_0x5d8563),'exists':()=>cacheExists(_0x5d8563),'path':()=>getGlobalCachePath(_0x5d8563)};}export function createGlobalTextCache(_0x44f4cb,_0x58d37e){const _0x51fc11=a161_0x4dc3;return registerGlobalCacheKey(_0x44f4cb,_0x58d37e),{'read':()=>readCacheText(_0x44f4cb)?.[_0x51fc11(0x1f1)]()||undefined,'write':_0x537303=>writeCacheText(_0x44f4cb,_0x537303),'clear':()=>clearCache(_0x44f4cb),'exists':()=>cacheExists(_0x44f4cb),'path':()=>getGlobalCachePath(_0x44f4cb)};}export function createProfileCache(_0x59210a,_0x59b9c9){const _0x56efc4=_0x689dd5=>{const _0x23eee6=a161_0x4dc3,_0x346733=_0x689dd5||_0x23eee6(0x1ee);return _0x59210a[_0x23eee6(0x1ea)](_0x23eee6(0x1e6),_0x346733);};return{'read':_0x1267fd=>{const _0x5a3d88=_0x56efc4(_0x1267fd);return registerGlobalCacheKey(_0x5a3d88,_0x59b9c9),readCacheJson(_0x5a3d88);},'write':(_0xf30e15,_0x23c06a)=>{const _0x339c6c=_0x56efc4(_0xf30e15);registerGlobalCacheKey(_0x339c6c,_0x59b9c9),writeCacheJson(_0x339c6c,_0x23c06a);},'clear':_0x670354=>{const _0x4d3bda=_0x56efc4(_0x670354);clearCache(_0x4d3bda);},'exists':_0x9270e2=>{const _0x7badd3=_0x56efc4(_0x9270e2);return cacheExists(_0x7badd3);},'path':_0x39276e=>{const _0x378306=_0x56efc4(_0x39276e);return getGlobalCachePath(_0x378306);}};}export function createOptionalProfileCache(_0x1b7124,_0x2d0e17,_0x12e264={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x12e264,_0x285031=_0xb1909a=>{return _0xb1909a?''+_0x1b7124+profileSeparator+_0xb1909a+suffix:''+_0x1b7124+suffix;};return{'read':_0x283757=>{const _0x5db55d=_0x285031(_0x283757);return registerGlobalCacheKey(_0x5db55d,_0x2d0e17),readCacheJson(_0x5db55d);},'write':(_0x2488a2,_0x170c59)=>{const _0x1173a0=_0x285031(_0x170c59);registerGlobalCacheKey(_0x1173a0,_0x2d0e17),writeCacheJson(_0x1173a0,_0x2488a2);},'clear':_0x11896e=>{const _0x50b17f=_0x285031(_0x11896e);clearCache(_0x50b17f);},'exists':_0x33054b=>{const _0xd874c0=_0x285031(_0x33054b);return cacheExists(_0xd874c0);},'path':_0x1c3f21=>{const _0x5c4f26=_0x285031(_0x1c3f21);return getGlobalCachePath(_0x5c4f26);}};}export function clearGlobalRegistry(){registry['clear']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c9979,_0x51c7a6){const _0x2bc344=a162_0x4127,_0x373d97=_0x2c9979();while(!![]){try{const _0x3da02c=parseInt(_0x2bc344(0x15a))/0x1+-parseInt(_0x2bc344(0x153))/0x2*(parseInt(_0x2bc344(0x164))/0x3)+parseInt(_0x2bc344(0x151))/0x4*(-parseInt(_0x2bc344(0x154))/0x5)+parseInt(_0x2bc344(0x152))/0x6*(parseInt(_0x2bc344(0x14e))/0x7)+parseInt(_0x2bc344(0x155))/0x8+-parseInt(_0x2bc344(0x160))/0x9+-parseInt(_0x2bc344(0x14d))/0xa*(parseInt(_0x2bc344(0x158))/0xb);if(_0x3da02c===_0x51c7a6)break;else _0x373d97['push'](_0x373d97['shift']());}catch(_0x21e80f){_0x373d97['push'](_0x373d97['shift']());}}}(a162_0xa458,0xdd598));function a162_0xa458(){const _0x16dc1c=['138bmsByW','\x27:\x20','20800PYsGIg','1240372IYZjSb','INTERNAL','code','4jJYYcY','42waVYlm','38276rtDBQa','3326905CheBmV','14204840FtvJia','ENOENT','EACCES','1056SCqtHC','parse','158932qnDMrM','NOT_FOUND','File\x20not\x20found:\x20','Invalid\x20JSON\x20string:\x20','message','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','4705668iKJgTG','INVALID_ARGUMENT','utf-8','Invalid\x20JSON\x20in\x20file\x20\x27'];a162_0xa458=function(){return _0x16dc1c;};return a162_0xa458();}import{readFile}from'fs/promises';function a162_0x4127(_0x4e00c2,_0x25841d){_0x4e00c2=_0x4e00c2-0x14c;const _0xa45822=a162_0xa458();let _0x412705=_0xa45822[_0x4e00c2];return _0x412705;}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x5cf51f,_0x4b9442){const _0x4321cd=a162_0x4127;try{if(_0x4b9442){const _0x164030=await readFile(_0x5cf51f,_0x4321cd(0x162));try{return JSON[_0x4321cd(0x159)](_0x164030);}catch(_0x3532d8){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4321cd(0x163)+_0x5cf51f+_0x4321cd(0x14c)+(_0x3532d8 instanceof Error?_0x3532d8['message']:String(_0x3532d8)));}}else try{return JSON[_0x4321cd(0x159)](_0x5cf51f);}catch(_0x334da8){throw new SDKError(ErrorCode[_0x4321cd(0x161)],_0x4321cd(0x15d)+(_0x334da8 instanceof Error?_0x334da8[_0x4321cd(0x15e)]:String(_0x334da8)));}}catch(_0x3eb9c1){if(_0x3eb9c1 instanceof SDKError)throw _0x3eb9c1;if(_0x3eb9c1 instanceof Error&&_0x4321cd(0x150)in _0x3eb9c1){const _0x5285e8=_0x3eb9c1;if(_0x5285e8[_0x4321cd(0x150)]===_0x4321cd(0x156))throw new SDKError(ErrorCode[_0x4321cd(0x15b)],_0x4321cd(0x15c)+_0x5cf51f);else{if(_0x5285e8[_0x4321cd(0x150)]===_0x4321cd(0x157))throw new SDKError(ErrorCode['PERMISSION_DENIED'],'Permission\x20denied\x20reading\x20file:\x20'+_0x5cf51f);}}throw new SDKError(ErrorCode[_0x4321cd(0x14f)],'Failed\x20to\x20load\x20JSON:\x20'+(_0x3eb9c1 instanceof Error?_0x3eb9c1[_0x4321cd(0x15e)]:String(_0x3eb9c1)));}}export async function loadJSONFromOptions(_0x5b30c9,_0x3fc66e){const _0x58abd6=a162_0x4127;if(_0x5b30c9&&_0x3fc66e)throw new SDKError(ErrorCode[_0x58abd6(0x161)],_0x58abd6(0x15f));if(_0x5b30c9)return await loadJSON(_0x5b30c9,![]);if(_0x3fc66e)return await loadJSON(_0x3fc66e,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ef532,_0x3a6d6a){const _0x596c5c=a163_0x5bf7,_0x1cb561=_0x5ef532();while(!![]){try{const _0x8015b=parseInt(_0x596c5c(0x1b2))/0x1+parseInt(_0x596c5c(0x1b7))/0x2+-parseInt(_0x596c5c(0x1b3))/0x3+parseInt(_0x596c5c(0x1b9))/0x4+-parseInt(_0x596c5c(0x1ae))/0x5*(-parseInt(_0x596c5c(0x1ac))/0x6)+-parseInt(_0x596c5c(0x1b5))/0x7*(parseInt(_0x596c5c(0x1b8))/0x8)+-parseInt(_0x596c5c(0x1b1))/0x9;if(_0x8015b===_0x3a6d6a)break;else _0x1cb561['push'](_0x1cb561['shift']());}catch(_0x20cf6e){_0x1cb561['push'](_0x1cb561['shift']());}}}(a163_0x4b67,0x28e5b));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(_0x2a832d,_0x4c7ae8){const _0xab11a6=a163_0x5bf7,_0x2937bb=registry[_0xab11a6(0x1ad)](_0x2a832d);if(_0x2937bb&&_0x2937bb!==_0x4c7ae8)throw new Error(_0xab11a6(0x1b4)+_0x2a832d+'\x22\x20already\x20registered\x20by\x20\x22'+_0x2937bb+_0xab11a6(0x1b6)+_0x4c7ae8+'\x22');registry[_0xab11a6(0x1af)](_0x2a832d,_0x4c7ae8);}export function getCacheDir(){const _0x29f135=process['cwd'](),_0x2a9a26=_0x29f135===parse(_0x29f135)['root']?homedir():_0x29f135;return join(_0x2a9a26,LOCAL_CACHE_DIR);}export function getCachePath(_0x15538b){return join(getCacheDir(),_0x15538b);}function a163_0x5bf7(_0x14ba7b,_0x409cc4){_0x14ba7b=_0x14ba7b-0x1aa;const _0x4b672b=a163_0x4b67();let _0x5bf7d7=_0x4b672b[_0x14ba7b];return _0x5bf7d7;}function ensureCacheDir(){const _0x3da1c3=getCacheDir();!existsSync(_0x3da1c3)&&mkdirSync(_0x3da1c3,{'recursive':!![]});}function readCacheJson(_0x5a2198){const _0x2b9b44=a163_0x5bf7,_0x5620e3=getCachePath(_0x5a2198);if(!existsSync(_0x5620e3))return undefined;try{const _0x3f8a46=readFileSync(_0x5620e3,_0x2b9b44(0x1aa));return JSON[_0x2b9b44(0x1b0)](_0x3f8a46);}catch{return undefined;}}function writeCacheJson(_0x1d8266,_0x4dbc74){const _0x1308fc=a163_0x5bf7;ensureCacheDir(),writeFileSync(getCachePath(_0x1d8266),JSON[_0x1308fc(0x1ba)](_0x4dbc74,null,0x2),_0x1308fc(0x1aa));}function readCacheText(_0x2861ff){const _0x3def57=getCachePath(_0x2861ff);if(!existsSync(_0x3def57))return undefined;try{return readFileSync(_0x3def57,'utf-8');}catch{return undefined;}}function writeCacheText(_0xf7c3cb,_0x4035e0){const _0x20ac91=a163_0x5bf7;ensureCacheDir(),writeFileSync(getCachePath(_0xf7c3cb),_0x4035e0,_0x20ac91(0x1aa));}function clearCache(_0x4ac5fd){const _0x318004=getCachePath(_0x4ac5fd);if(existsSync(_0x318004))try{unlinkSync(_0x318004);}catch{}}function cacheExists(_0x546d24){return existsSync(getCachePath(_0x546d24));}export function createCache(_0x193cef,_0x519f54){return registerCacheKey(_0x193cef,_0x519f54),{'read':()=>readCacheJson(_0x193cef),'write':_0x1dbe7c=>writeCacheJson(_0x193cef,_0x1dbe7c),'clear':()=>clearCache(_0x193cef),'exists':()=>cacheExists(_0x193cef),'path':()=>getCachePath(_0x193cef)};}export function createTextCache(_0x4166b1,_0x37ee70){const _0x1b5171=a163_0x5bf7;return registerCacheKey(_0x4166b1,_0x37ee70),{'read':()=>readCacheText(_0x4166b1)?.[_0x1b5171(0x1ab)]()||undefined,'write':_0x1319c4=>writeCacheText(_0x4166b1,_0x1319c4),'clear':()=>clearCache(_0x4166b1),'exists':()=>cacheExists(_0x4166b1),'path':()=>getCachePath(_0x4166b1)};}export function clearRegistry(){const _0x308cc9=a163_0x5bf7;registry[_0x308cc9(0x1bb)]();}function a163_0x4b67(){const _0x4db21d=['381390ZkaJPP','get','20LytzhX','set','parse','4464315fhJFGT','56988QxnvlM','493530ZvBmNC','Cache\x20key\x20\x22','90349bYyXeW','\x22,\x20cannot\x20register\x20for\x20\x22','611714XgdZxN','72IwVyJM','1308472yrOOpf','stringify','clear','utf-8','trim'];a163_0x4b67=function(){return _0x4db21d;};return a163_0x4b67();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x422995=a164_0x83e7;(function(_0x44dee6,_0x1ed848){const _0x412c9c=a164_0x83e7,_0x347888=_0x44dee6();while(!![]){try{const _0x76cd72=-parseInt(_0x412c9c(0x90))/0x1*(parseInt(_0x412c9c(0x91))/0x2)+-parseInt(_0x412c9c(0x93))/0x3*(-parseInt(_0x412c9c(0x87))/0x4)+-parseInt(_0x412c9c(0x8e))/0x5+parseInt(_0x412c9c(0x88))/0x6*(-parseInt(_0x412c9c(0x8c))/0x7)+-parseInt(_0x412c9c(0x80))/0x8+parseInt(_0x412c9c(0x95))/0x9+parseInt(_0x412c9c(0x97))/0xa;if(_0x76cd72===_0x1ed848)break;else _0x347888['push'](_0x347888['shift']());}catch(_0x308fe6){_0x347888['push'](_0x347888['shift']());}}}(a164_0x307e,0x3428e));import a164_0x205acf from'chalk';import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';function a164_0x83e7(_0x523e50,_0x55d7e0){_0x523e50=_0x523e50-0x80;const _0x307e41=a164_0x307e();let _0x83e721=_0x307e41[_0x523e50];return _0x83e721;}const chalkModule=a164_0x205acf,ChalkClass=chalkModule[a164_0x422995(0x8d)]||chalkModule[a164_0x422995(0x82)]?.['Chalk'];function a164_0x307e(){const _0x3723b3=['1073950oeMUEb','DEBUG','601gtjauB','10YVfipW','yellow','4146SGGcox','TRACE','896841dOZdNV','colorLevel','6622720DXDLtg','message','gray','format',']\x20[','3266152vDEACG','chalk','default','colors','green','dim','level','380lVlIxm','321006DOqhqK','timestamp','component','INFO','7GVZgUK','Chalk'];a164_0x307e=function(){return _0x3723b3;};return a164_0x307e();}export class DefaultLogFormatter{['colors'];[a164_0x422995(0x81)];constructor(_0x315443={}){const _0x91a395=a164_0x422995;this[_0x91a395(0x83)]=_0x315443[_0x91a395(0x83)]??![],this[_0x91a395(0x81)]=_0x315443['colors']&&ChalkClass?new ChalkClass({'level':0x3}):a164_0x205acf;}[a164_0x422995(0x9a)](_0x5280c9){const _0x80419e=a164_0x422995,_0x2f32a3=formatTimestamp(_0x5280c9[_0x80419e(0x89)]),_0x5bc6a9=logLevelToString(_0x5280c9[_0x80419e(0x86)]);if(!this[_0x80419e(0x83)])return _0x2f32a3+'\x20['+_0x5bc6a9+_0x80419e(0x9b)+_0x5280c9[_0x80419e(0x8a)]+']\x20'+_0x5280c9[_0x80419e(0x98)];const _0x5eb651=this[_0x80419e(0x81)][_0x80419e(0x85)](_0x2f32a3),_0x39aa51=this[_0x80419e(0x96)](_0x5bc6a9,_0x5280c9[_0x80419e(0x86)]),_0x8654a8=this['chalk']['blue']('['+_0x5280c9[_0x80419e(0x8a)]+']');return _0x5eb651+'\x20'+_0x39aa51+'\x20'+_0x8654a8+'\x20'+_0x5280c9[_0x80419e(0x98)];}[a164_0x422995(0x96)](_0x7b1317,_0x2477cb){const _0x2c24cd=a164_0x422995;switch(_0x2477cb){case LogLevel[_0x2c24cd(0x94)]:return this[_0x2c24cd(0x81)][_0x2c24cd(0x99)]('['+_0x7b1317+']');case LogLevel[_0x2c24cd(0x8f)]:return this[_0x2c24cd(0x81)][_0x2c24cd(0x84)]('['+_0x7b1317+']');case LogLevel[_0x2c24cd(0x8b)]:return this[_0x2c24cd(0x81)]['cyan']('['+_0x7b1317+']');case LogLevel['WARN']:return this[_0x2c24cd(0x81)][_0x2c24cd(0x92)]('['+_0x7b1317+']');case LogLevel['ERROR']:return this[_0x2c24cd(0x81)]['red']('['+_0x7b1317+']');default:return'['+_0x7b1317+']';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x471876,_0x5c2fb3){var _0x5ed95e=a165_0x1b06,_0x3427f8=_0x471876();while(!![]){try{var _0x2f6922=-parseInt(_0x5ed95e(0x1ad))/0x1+-parseInt(_0x5ed95e(0x1a4))/0x2*(-parseInt(_0x5ed95e(0x1af))/0x3)+parseInt(_0x5ed95e(0x1ae))/0x4*(parseInt(_0x5ed95e(0x1a7))/0x5)+parseInt(_0x5ed95e(0x1a8))/0x6*(-parseInt(_0x5ed95e(0x1a9))/0x7)+-parseInt(_0x5ed95e(0x1aa))/0x8*(-parseInt(_0x5ed95e(0x1a6))/0x9)+-parseInt(_0x5ed95e(0x1ab))/0xa+-parseInt(_0x5ed95e(0x1ac))/0xb*(parseInt(_0x5ed95e(0x1a5))/0xc);if(_0x2f6922===_0x5c2fb3)break;else _0x3427f8['push'](_0x3427f8['shift']());}catch(_0x2269dd){_0x3427f8['push'](_0x3427f8['shift']());}}}(a165_0x3fa3,0x23e84));function a165_0x1b06(_0x58e917,_0x4fe26d){_0x58e917=_0x58e917-0x1a4;var _0x3fa3df=a165_0x3fa3();var _0x1b06d3=_0x3fa3df[_0x58e917];return _0x1b06d3;}export{DefaultLogFormatter}from'./default-formatter.js';function a165_0x3fa3(){var _0x4245bb=['49155NjismW','324XfWymH','2757gxPmHl','536okxeyD','12JyjvWq','9kcqjeU','16085UQTVmj','1528242bELOao','7zthOyJ','1415944odAuNW','1500410ldlDCO','911713wLZLsC'];a165_0x3fa3=function(){return _0x4245bb;};return a165_0x3fa3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a166_0x333e(_0x36fe0a,_0x18d7b8){_0x36fe0a=_0x36fe0a-0x13d;const _0xedbaa3=a166_0xedba();let _0x333e66=_0xedbaa3[_0x36fe0a];return _0x333e66;}const a166_0x4023d7=a166_0x333e;function a166_0xedba(){const _0x2fdb56=['level','log','59283RNCCmc','useStderr','787934cTRfWK','colors','5bVGcMS','110lZlgmc','1669740NDAWIT','format','error','72kioUrd','385389bXuXbu','2485772XMHvSY','WARN','formatter','minLevel','3621036oVnxMw','1033219AITIWM','7vcShkH'];a166_0xedba=function(){return _0x2fdb56;};return a166_0xedba();}(function(_0x2e6654,_0x4d3145){const _0xa9b6a5=a166_0x333e,_0x27e668=_0x2e6654();while(!![]){try{const _0x696782=parseInt(_0xa9b6a5(0x14d))/0x1+parseInt(_0xa9b6a5(0x145))/0x2+parseInt(_0xa9b6a5(0x149))/0x3+parseInt(_0xa9b6a5(0x14e))/0x4*(-parseInt(_0xa9b6a5(0x147))/0x5)+-parseInt(_0xa9b6a5(0x13e))/0x6*(-parseInt(_0xa9b6a5(0x140))/0x7)+parseInt(_0xa9b6a5(0x14c))/0x8*(parseInt(_0xa9b6a5(0x143))/0x9)+-parseInt(_0xa9b6a5(0x148))/0xa*(parseInt(_0xa9b6a5(0x13f))/0xb);if(_0x696782===_0x4d3145)break;else _0x27e668['push'](_0x27e668['shift']());}catch(_0x17a96d){_0x27e668['push'](_0x27e668['shift']());}}}(a166_0xedba,0x53fff));import{LogLevel as a166_0x800bac}from'../types.js';import{DefaultLogFormatter}from'../formatters/index.js';export class ConsoleHandler{[a166_0x4023d7(0x13d)];[a166_0x4023d7(0x144)];[a166_0x4023d7(0x150)];constructor(_0x34a85b={}){const _0x34398d=a166_0x4023d7;this[_0x34398d(0x13d)]=_0x34a85b[_0x34398d(0x13d)]??a166_0x800bac[_0x34398d(0x14f)],this[_0x34398d(0x144)]=_0x34a85b[_0x34398d(0x144)]??!![],this[_0x34398d(0x150)]=new DefaultLogFormatter({'colors':_0x34a85b[_0x34398d(0x146)]??!![]});}['handle'](_0x4bb723){const _0x8b3189=a166_0x4023d7;if(_0x4bb723['level']<this[_0x8b3189(0x13d)])return;const _0x156bbb=this[_0x8b3189(0x150)][_0x8b3189(0x14a)](_0x4bb723);this[_0x8b3189(0x144)]&&_0x4bb723[_0x8b3189(0x141)]>=a166_0x800bac['WARN']?console[_0x8b3189(0x14b)](_0x156bbb):console[_0x8b3189(0x142)](_0x156bbb);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x24d696=a167_0x3ff0;(function(_0xab9de8,_0x56a504){const _0x5e267d=a167_0x3ff0,_0x152c48=_0xab9de8();while(!![]){try{const _0x389f7e=parseInt(_0x5e267d(0xf0))/0x1+parseInt(_0x5e267d(0xf6))/0x2*(parseInt(_0x5e267d(0x10a))/0x3)+-parseInt(_0x5e267d(0xe7))/0x4+-parseInt(_0x5e267d(0x10c))/0x5*(parseInt(_0x5e267d(0xee))/0x6)+parseInt(_0x5e267d(0xfa))/0x7*(-parseInt(_0x5e267d(0x109))/0x8)+parseInt(_0x5e267d(0x103))/0x9+-parseInt(_0x5e267d(0x101))/0xa*(-parseInt(_0x5e267d(0xea))/0xb);if(_0x389f7e===_0x56a504)break;else _0x152c48['push'](_0x152c48['shift']());}catch(_0x3efc99){_0x152c48['push'](_0x152c48['shift']());}}}(a167_0x451e,0x2d205));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';function a167_0x451e(){const _0x381c58=['88bOTDMg','logStream','.gz','write','532704VmDjLG','test','261421oFOGVo','.log','logDir','mtime','replace','rotateOldLogs','106174ImvVjl','Warning:\x20Error\x20writing\x20to\x20','Warning:\x20Failed\x20to\x20initialize\x20log\x20file:','logPath','13391roFiEF','-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$','logFileName','error','logBaseName','Warning:\x20Failed\x20to\x20compress\x20','end','321480iKPQsk','logs','2459385kqbksf','format','getLogPath','filter','rotate','includes','1144WduWxl','3YSXoze','init','15bsJVUb','480836klJSxh','split','toISOString'];a167_0x451e=function(){return _0x381c58;};return a167_0x451e();}import{join,dirname,basename}from'path';import{createGzip}from'zlib';import{pipeline}from'stream/promises';function a167_0x3ff0(_0x4faf66,_0x5d4f80){_0x4faf66=_0x4faf66-0xe7;const _0x451eae=a167_0x451e();let _0x3ff093=_0x451eae[_0x4faf66];return _0x3ff093;}import{Logger}from'../logger.js';import{getGlobalCacheDir}from'../../global-cache.js';export class FileHandler{['logPath'];[a167_0x24d696(0xf2)];[a167_0x24d696(0xfc)];['logBaseName'];[a167_0x24d696(0xeb)]=null;['rotate'];constructor(_0x444b59={}){const _0x44cc75=a167_0x24d696;this[_0x44cc75(0xf9)]=_0x444b59['filePath']??join(getGlobalCacheDir(),_0x44cc75(0x102),'tdx.log'),this[_0x44cc75(0xf2)]=dirname(this['logPath']),this['logFileName']=basename(this[_0x44cc75(0xf9)]),this['logBaseName']=this['logFileName'][_0x44cc75(0xf4)](/\.log$/,''),this[_0x44cc75(0x107)]=_0x444b59[_0x44cc75(0x107)]??!![];}async[a167_0x24d696(0x10b)](){const _0x8a11b4=a167_0x24d696;try{await mkdir(this[_0x8a11b4(0xf2)],{'recursive':!![]}),this[_0x8a11b4(0x107)]&&await this[_0x8a11b4(0xf5)](),this[_0x8a11b4(0xeb)]=createWriteStream(this[_0x8a11b4(0xf9)],{'flags':'a'}),this[_0x8a11b4(0xeb)]['on'](_0x8a11b4(0xfd),_0x230830=>{const _0x4cf9b7=_0x8a11b4;console[_0x4cf9b7(0xfd)](_0x4cf9b7(0xf7)+this['logFileName']+':',_0x230830['message']);});}catch(_0x1ee090){console[_0x8a11b4(0xfd)](_0x8a11b4(0xf8),_0x1ee090);}}['handle'](_0x591f5d){const _0x2553e3=a167_0x24d696;if(!this[_0x2553e3(0xeb)])return;const _0x47af9a=Logger[_0x2553e3(0x104)](_0x591f5d);this[_0x2553e3(0xeb)][_0x2553e3(0xed)](_0x47af9a+'\x0a');}async['close'](){return new Promise(_0x11bd9b=>{const _0x2574c2=a167_0x3ff0;this[_0x2574c2(0xeb)]?this['logStream'][_0x2574c2(0x100)](()=>{const _0x47add7=_0x2574c2;this[_0x47add7(0xeb)]=null,_0x11bd9b();}):_0x11bd9b();});}[a167_0x24d696(0x105)](){const _0x235acd=a167_0x24d696;return this[_0x235acd(0xf9)];}async['rotateOldLogs'](){const _0x25832e=a167_0x24d696;try{const _0x2e57fc=await readdir(this['logDir']),_0x2fa5b4=new Date()[_0x25832e(0xe9)]()['split']('T')[0x0];if(_0x2e57fc[_0x25832e(0x108)](this['logFileName'])){const _0x959ff8=join(this[_0x25832e(0xf2)],this[_0x25832e(0xfc)]),_0x527b02=await stat(_0x959ff8),_0x602c1e=new Date(_0x527b02[_0x25832e(0xf3)])[_0x25832e(0xe9)]()[_0x25832e(0xe8)]('T')[0x0];if(_0x602c1e<_0x2fa5b4){const _0x453b4c=join(this[_0x25832e(0xf2)],this[_0x25832e(0xfe)]+'-'+_0x602c1e+_0x25832e(0xf1));await rename(_0x959ff8,_0x453b4c);}}const _0x3f22d8=await readdir(this[_0x25832e(0xf2)]),_0x2869f7=this[_0x25832e(0xfe)][_0x25832e(0xf4)](/[.*+?^${}()|[\]\\]/g,'\x5c$&'),_0x565f7d=new RegExp('^'+_0x2869f7+_0x25832e(0xfb)),_0x95b528=_0x3f22d8[_0x25832e(0x106)](_0x341762=>_0x565f7d[_0x25832e(0xef)](_0x341762));for(const _0x6d011e of _0x95b528){const _0x2e20a4=join(this[_0x25832e(0xf2)],_0x6d011e),_0x6de102=join(this[_0x25832e(0xf2)],_0x6d011e+_0x25832e(0xec));try{await pipeline(createReadStream(_0x2e20a4),createGzip(),createWriteStream(_0x6de102)),await unlink(_0x2e20a4);}catch(_0x5c1e54){console['error'](_0x25832e(0xff)+_0x6d011e+':',_0x5c1e54);}}}catch{}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a168_0x3603(){var _0xa52784=['8808010RdIZVK','3403872EEAhlY','3931522OjBRJL','152yRYfCD','816120GXJVkk','27250024fcfBAS','478002andQbA','14439PPcGHQ'];a168_0x3603=function(){return _0xa52784;};return a168_0x3603();}function a168_0x104c(_0x494a7a,_0x135305){_0x494a7a=_0x494a7a-0x1d8;var _0x360393=a168_0x3603();var _0x104c9c=_0x360393[_0x494a7a];return _0x104c9c;}(function(_0x1c3dd6,_0x4ba691){var _0x284dcc=a168_0x104c,_0x182a25=_0x1c3dd6();while(!![]){try{var _0x4b41ff=parseInt(_0x284dcc(0x1db))/0x1+-parseInt(_0x284dcc(0x1de))/0x2+parseInt(_0x284dcc(0x1dc))/0x3*(-parseInt(_0x284dcc(0x1d8))/0x4)+-parseInt(_0x284dcc(0x1dd))/0x5+parseInt(_0x284dcc(0x1d9))/0x6+parseInt(_0x284dcc(0x1df))/0x7+parseInt(_0x284dcc(0x1da))/0x8;if(_0x4b41ff===_0x4ba691)break;else _0x182a25['push'](_0x182a25['shift']());}catch(_0x3122e6){_0x182a25['push'](_0x182a25['shift']());}}}(a168_0x3603,0xe4641));export{FileHandler}from'./file-handler.js';export{ConsoleHandler}from'./console-handler.js';export{NullHandler}from'./null-handler.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a169_0x54e7(){var _0x5f318a=['handle','1108386QwGBzJ','6827420njLqHQ','1781708uWnLmo','2074928tFMcnn','6XfsDUj','2RirwCu','133531ghBNiS','3508975OJmrni','6ILZljd','575547XbokNk'];a169_0x54e7=function(){return _0x5f318a;};return a169_0x54e7();}var a169_0x2a9d10=a169_0x4298;function a169_0x4298(_0x5a76fd,_0x452431){_0x5a76fd=_0x5a76fd-0x1b1;var _0x54e77b=a169_0x54e7();var _0x429897=_0x54e77b[_0x5a76fd];return _0x429897;}(function(_0x31113e,_0x3eea4f){var _0x4dc535=a169_0x4298,_0x5130e3=_0x31113e();while(!![]){try{var _0x4c237e=parseInt(_0x4dc535(0x1b1))/0x1*(-parseInt(_0x4dc535(0x1bb))/0x2)+-parseInt(_0x4dc535(0x1ba))/0x3*(-parseInt(_0x4dc535(0x1b8))/0x4)+parseInt(_0x4dc535(0x1b2))/0x5+parseInt(_0x4dc535(0x1b3))/0x6*(parseInt(_0x4dc535(0x1b4))/0x7)+-parseInt(_0x4dc535(0x1b9))/0x8+parseInt(_0x4dc535(0x1b6))/0x9+-parseInt(_0x4dc535(0x1b7))/0xa;if(_0x4c237e===_0x3eea4f)break;else _0x5130e3['push'](_0x5130e3['shift']());}catch(_0x2bb1cf){_0x5130e3['push'](_0x5130e3['shift']());}}}(a169_0x54e7,0xb05d1));export class NullHandler{[a169_0x2a9d10(0x1b5)](_0x74944d){}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a170_0x2637(){var _0x4051d4=['110qJJPkN','5166981JPlWVq','2019040xYFwxD','14nPHEFD','858ECPsYG','998080RpVosz','144876zhDBOu','8uHUPsc','307934EhvZrR','594618rZqmrA','2PxkISx','3kzuUdu','685002TNqknu'];a170_0x2637=function(){return _0x4051d4;};return a170_0x2637();}function a170_0x2eed(_0x854c6b,_0x1fe1ea){_0x854c6b=_0x854c6b-0xe5;var _0x263708=a170_0x2637();var _0x2eede5=_0x263708[_0x854c6b];return _0x2eede5;}(function(_0x5c813c,_0x3677bd){var _0x6ca1b=a170_0x2eed,_0x548e8b=_0x5c813c();while(!![]){try{var _0x368ef7=-parseInt(_0x6ca1b(0xeb))/0x1*(parseInt(_0x6ca1b(0xea))/0x2)+-parseInt(_0x6ca1b(0xec))/0x3*(parseInt(_0x6ca1b(0xf0))/0x4)+parseInt(_0x6ca1b(0xe6))/0x5+parseInt(_0x6ca1b(0xed))/0x6*(-parseInt(_0x6ca1b(0xf1))/0x7)+-parseInt(_0x6ca1b(0xe8))/0x8*(-parseInt(_0x6ca1b(0xef))/0x9)+-parseInt(_0x6ca1b(0xee))/0xa*(-parseInt(_0x6ca1b(0xe9))/0xb)+parseInt(_0x6ca1b(0xe7))/0xc*(parseInt(_0x6ca1b(0xe5))/0xd);if(_0x368ef7===_0x3677bd)break;else _0x548e8b['push'](_0x548e8b['shift']());}catch(_0x4149bd){_0x548e8b['push'](_0x548e8b['shift']());}}}(a170_0x2637,0x8676d));export{Logger}from'./logger.js';export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';export{DefaultLogFormatter}from'./formatters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a171_0x26c702=a171_0x2efb;(function(_0x12ca9e,_0x240879){const _0x3dd5e8=a171_0x2efb,_0x5225ac=_0x12ca9e();while(!![]){try{const _0x263834=parseInt(_0x3dd5e8(0xac))/0x1+-parseInt(_0x3dd5e8(0x9c))/0x2*(-parseInt(_0x3dd5e8(0xab))/0x3)+-parseInt(_0x3dd5e8(0xb7))/0x4+parseInt(_0x3dd5e8(0x86))/0x5+-parseInt(_0x3dd5e8(0x88))/0x6*(-parseInt(_0x3dd5e8(0xa9))/0x7)+-parseInt(_0x3dd5e8(0x90))/0x8+-parseInt(_0x3dd5e8(0xaf))/0x9*(-parseInt(_0x3dd5e8(0x8e))/0xa);if(_0x263834===_0x240879)break;else _0x5225ac['push'](_0x5225ac['shift']());}catch(_0xcdb8ea){_0x5225ac['push'](_0x5225ac['shift']());}}}(a171_0x10b4,0x96ebc));import{LogLevel as a171_0x46fadd,logLevelToString}from'./types.js';function a171_0x2efb(_0x2bcb1d,_0x277320){_0x2bcb1d=_0x2bcb1d-0x84;const _0x10b427=a171_0x10b4();let _0x2efb45=_0x10b427[_0x2bcb1d];return _0x2efb45;}const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a171_0x46fadd[a171_0x26c702(0xb5)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x1f6a31){const _0x4d529e=a171_0x26c702;if(typeof _0x1f6a31===_0x4d529e(0xba))return _0x1f6a31;if(_0x1f6a31 instanceof Error)return _0x1f6a31[_0x4d529e(0xa3)]||_0x1f6a31['name']+':\x20'+_0x1f6a31[_0x4d529e(0x92)];try{return JSON[_0x4d529e(0xaa)](_0x1f6a31,(_0x27768a,_0x29d23e)=>{const _0x1df341=_0x4d529e;if(_0x29d23e instanceof Error)return{'name':_0x29d23e[_0x1df341(0x94)],'message':_0x29d23e[_0x1df341(0x92)],'stack':_0x29d23e[_0x1df341(0xa3)],'cause':_0x29d23e[_0x1df341(0x9a)]};return _0x29d23e;});}catch{return String(_0x1f6a31);}}function a171_0x10b4(){const _0x4e904e=['message','getFormatter','name','toISOString','debug','split','clearHandlers','addHandler','cause','setLogLevel','69642vDWfpM','set','has','length','init','component','join','stack','format','slice','reset','dispatch','get','7iKrGrK','stringify','39zJUGmP','627545JsNFcF','timestamp','error','2202696yrFinI','shouldLog','getEffectiveLevel','clear','levelOverrides','TRACE','INFO','level','4651304sIsfbf','info','loggers','string','defaultLevel','warn','setDefaultLevel','handlers','2310815lqzFNS','pendingRecords','4410138RrdnUs','formatter','log','ERROR','close','initialized','10ffJdaw','map','5929200ItdnXf','handle'];a171_0x10b4=function(){return _0x4e904e;};return a171_0x10b4();}export class Logger{[a171_0x26c702(0xa1)];constructor(_0x20f6b2){const _0x1daf0d=a171_0x26c702;this[_0x1daf0d(0xa1)]=_0x20f6b2;}static['of'](_0x2c897e){const _0x145edf=a171_0x26c702,_0x9fce90=typeof _0x2c897e===_0x145edf(0xba)?_0x2c897e:_0x2c897e[_0x145edf(0x94)];let _0x2c18b6=state[_0x145edf(0xb9)]['get'](_0x9fce90);return!_0x2c18b6&&(_0x2c18b6=new Logger(_0x9fce90),state[_0x145edf(0xb9)]['set'](_0x9fce90,_0x2c18b6)),_0x2c18b6;}static async[a171_0x26c702(0xa0)](_0x35a85d={}){const _0x43e586=a171_0x26c702;state['defaultLevel']=_0x35a85d[_0x43e586(0xbb)]??a171_0x46fadd[_0x43e586(0xb5)],state[_0x43e586(0x85)]=_0x35a85d[_0x43e586(0x85)]??[],state[_0x43e586(0x89)]=_0x35a85d[_0x43e586(0x89)]??null,state[_0x43e586(0xb3)]['clear']();if(_0x35a85d[_0x43e586(0xb3)])for(const [_0x5d87c2,_0x3e5d3f]of Object['entries'](_0x35a85d[_0x43e586(0xb3)])){state[_0x43e586(0xb3)]['set'](_0x5d87c2,_0x3e5d3f);}for(const _0x19ce63 of state['handlers']){_0x19ce63[_0x43e586(0xa0)]&&await _0x19ce63['init']();}state[_0x43e586(0x8d)]=!![];for(const _0x4e5259 of state['pendingRecords']){Logger[_0x43e586(0xa7)](_0x4e5259);}state[_0x43e586(0x87)]=[];}static[a171_0x26c702(0x9b)](_0x4a8255,_0x15e913){const _0x3e1544=a171_0x26c702;state[_0x3e1544(0xb3)][_0x3e1544(0x9d)](_0x4a8255,_0x15e913);}static[a171_0x26c702(0x84)](_0xf9e50d){const _0x28b3ad=a171_0x26c702;state[_0x28b3ad(0xbb)]=_0xf9e50d;}static[a171_0x26c702(0x99)](_0x4adbae){const _0x50324e=a171_0x26c702;state[_0x50324e(0x85)]['push'](_0x4adbae),state[_0x50324e(0x8d)]&&_0x4adbae[_0x50324e(0xa0)]&&_0x4adbae[_0x50324e(0xa0)]();}static[a171_0x26c702(0x98)](){const _0x339ebe=a171_0x26c702;state[_0x339ebe(0x85)]=[];}static async['shutdown'](){const _0x4158bb=a171_0x26c702;for(const _0x779ef4 of state[_0x4158bb(0x85)]){_0x779ef4[_0x4158bb(0x8c)]&&await _0x779ef4['close']();}state[_0x4158bb(0x85)]=[],state[_0x4158bb(0x8d)]=![],state[_0x4158bb(0xb9)][_0x4158bb(0xb2)](),state['pendingRecords']=[];}static[a171_0x26c702(0xa6)](){const _0xef1c3b=a171_0x26c702;state[_0xef1c3b(0x8d)]=![],state[_0xef1c3b(0xbb)]=a171_0x46fadd['INFO'],state[_0xef1c3b(0xb3)]['clear'](),state[_0xef1c3b(0x85)]=[],state[_0xef1c3b(0x89)]=null,state[_0xef1c3b(0xb9)][_0xef1c3b(0xb2)](),state[_0xef1c3b(0x87)]=[];}static['isInitialized'](){return state['initialized'];}static['getEffectiveLevel'](_0x506321){const _0x173c0c=a171_0x26c702;if(state['levelOverrides'][_0x173c0c(0x9e)](_0x506321))return state[_0x173c0c(0xb3)]['get'](_0x506321);const _0x47e81c=_0x506321[_0x173c0c(0x97)]('.');for(let _0x420f16=_0x47e81c[_0x173c0c(0x9f)]-0x1;_0x420f16>0x0;_0x420f16--){const _0x41aa01=_0x47e81c[_0x173c0c(0xa5)](0x0,_0x420f16)[_0x173c0c(0xa2)]('.');if(state[_0x173c0c(0xb3)][_0x173c0c(0x9e)](_0x41aa01))return state[_0x173c0c(0xb3)][_0x173c0c(0xa8)](_0x41aa01);}return state[_0x173c0c(0xbb)];}[a171_0x26c702(0xb0)](_0x34d266){const _0x14efde=a171_0x26c702,_0x339983=Logger[_0x14efde(0xb1)](this[_0x14efde(0xa1)]);return _0x34d266>=_0x339983;}static['dispatch'](_0x3576aa){const _0x360929=a171_0x26c702;for(const _0x39d0cd of state[_0x360929(0x85)]){_0x39d0cd[_0x360929(0x91)](_0x3576aa);}}[a171_0x26c702(0x8a)](_0xc59fc,_0x521ff8){const _0x63568e=a171_0x26c702;if(!this['shouldLog'](_0xc59fc))return;const _0x5128e8=_0x521ff8[_0x63568e(0x8f)](_0x119fa2=>typeof _0x119fa2==='function'?_0x119fa2():_0x119fa2),_0x504b3c=_0x5128e8[_0x63568e(0x8f)](safeStringify)['join']('\x20'),_0x1a2aae={'timestamp':new Date(),'level':_0xc59fc,'component':this[_0x63568e(0xa1)],'message':_0x504b3c};if(!state['initialized']){state[_0x63568e(0x87)]['length']<MAX_PENDING_RECORDS&&state['pendingRecords']['push'](_0x1a2aae);return;}Logger[_0x63568e(0xa7)](_0x1a2aae);}['trace'](..._0x4a662e){const _0x303f42=a171_0x26c702;this['log'](a171_0x46fadd[_0x303f42(0xb4)],_0x4a662e);}[a171_0x26c702(0x96)](..._0x2bc4a9){this['log'](a171_0x46fadd['DEBUG'],_0x2bc4a9);}[a171_0x26c702(0xb8)](..._0x4f77b7){const _0x72375f=a171_0x26c702;this[_0x72375f(0x8a)](a171_0x46fadd[_0x72375f(0xb5)],_0x4f77b7);}[a171_0x26c702(0xbc)](..._0x5a9a68){this['log'](a171_0x46fadd['WARN'],_0x5a9a68);}[a171_0x26c702(0xae)](..._0x157f25){const _0x53d0ee=a171_0x26c702;this['log'](a171_0x46fadd[_0x53d0ee(0x8b)],_0x157f25);}static[a171_0x26c702(0x93)](){const _0x3f0582=a171_0x26c702;return state[_0x3f0582(0x89)];}static[a171_0x26c702(0xa4)](_0x2f108f){const _0x1435ad=a171_0x26c702;if(state['formatter'])return state['formatter'][_0x1435ad(0xa4)](_0x2f108f);return _0x2f108f[_0x1435ad(0xad)][_0x1435ad(0x95)]()+'\x20['+logLevelToString(_0x2f108f[_0x1435ad(0xb6)])+']\x20['+_0x2f108f[_0x1435ad(0xa1)]+']\x20'+_0x2f108f[_0x1435ad(0x92)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d52e2,_0x2e46a8){const _0x53c99e=a172_0x3332,_0x19f0ea=_0x5d52e2();while(!![]){try{const _0x4de6a9=-parseInt(_0x53c99e(0x133))/0x1+parseInt(_0x53c99e(0x13b))/0x2*(parseInt(_0x53c99e(0x12e))/0x3)+parseInt(_0x53c99e(0x137))/0x4+parseInt(_0x53c99e(0x140))/0x5*(parseInt(_0x53c99e(0x129))/0x6)+parseInt(_0x53c99e(0x13d))/0x7*(parseInt(_0x53c99e(0x12d))/0x8)+parseInt(_0x53c99e(0x147))/0x9*(parseInt(_0x53c99e(0x12a))/0xa)+-parseInt(_0x53c99e(0x143))/0xb;if(_0x4de6a9===_0x2e46a8)break;else _0x19f0ea['push'](_0x19f0ea['shift']());}catch(_0x2635e1){_0x19f0ea['push'](_0x19f0ea['shift']());}}}(a172_0xeaf7,0x962fe));function a172_0xeaf7(){const _0x1c0cad=['138505XlSAal','trace','toString','14278616gJQFIn','getMilliseconds','abs','getSeconds','9162SdfBkt','108sQKqCc','650NRUrIg','getDate','getMinutes','8EegWRk','931554SQxXVU','debug','INFO','ERROR','TRACE','454983DwNAMB','getMonth','info','DEBUG','3046376VgiEOM','warn','WARN','floor','6BemCQT','padStart','771883GuyofU','toUpperCase','getHours'];a172_0xeaf7=function(){return _0x1c0cad;};return a172_0xeaf7();}export var LogLevel;function a172_0x3332(_0x1d4790,_0x536430){_0x1d4790=_0x1d4790-0x129;const _0xeaf78f=a172_0xeaf7();let _0x33325d=_0xeaf78f[_0x1d4790];return _0x33325d;}(function(_0x1feb27){const _0x5f058c=a172_0x3332;_0x1feb27[_0x1feb27['TRACE']=-0x2]=_0x5f058c(0x132),_0x1feb27[_0x1feb27['DEBUG']=-0x1]=_0x5f058c(0x136),_0x1feb27[_0x1feb27[_0x5f058c(0x130)]=0x0]=_0x5f058c(0x130),_0x1feb27[_0x1feb27[_0x5f058c(0x139)]=0x1]='WARN',_0x1feb27[_0x1feb27[_0x5f058c(0x131)]=0x2]=_0x5f058c(0x131);}(LogLevel||(LogLevel={})));export function parseLogLevel(_0x1eec39){const _0x125ef6=a172_0x3332;switch(_0x1eec39[_0x125ef6(0x13e)]()){case _0x125ef6(0x132):return LogLevel[_0x125ef6(0x132)];case _0x125ef6(0x136):return LogLevel[_0x125ef6(0x136)];case'INFO':return LogLevel[_0x125ef6(0x130)];case _0x125ef6(0x139):case'WARNING':return LogLevel[_0x125ef6(0x139)];case _0x125ef6(0x131):return LogLevel[_0x125ef6(0x131)];default:return LogLevel[_0x125ef6(0x130)];}}export function logLevelToString(_0xcb7052){const _0x30d8d4=a172_0x3332;switch(_0xcb7052){case LogLevel[_0x30d8d4(0x132)]:return _0x30d8d4(0x141);case LogLevel['DEBUG']:return _0x30d8d4(0x12f);case LogLevel[_0x30d8d4(0x130)]:return _0x30d8d4(0x135);case LogLevel[_0x30d8d4(0x139)]:return _0x30d8d4(0x138);case LogLevel[_0x30d8d4(0x131)]:return'error';default:return _0x30d8d4(0x135);}}export function formatTimestamp(_0x66f0e1){const _0x590d50=a172_0x3332,_0x127f27=_0x66f0e1['getFullYear'](),_0x3196dc=(_0x66f0e1[_0x590d50(0x134)]()+0x1)[_0x590d50(0x142)]()[_0x590d50(0x13c)](0x2,'0'),_0x478130=_0x66f0e1[_0x590d50(0x12b)]()['toString']()[_0x590d50(0x13c)](0x2,'0'),_0x65c8a6=_0x66f0e1[_0x590d50(0x13f)]()[_0x590d50(0x142)]()[_0x590d50(0x13c)](0x2,'0'),_0x30c934=_0x66f0e1[_0x590d50(0x12c)]()[_0x590d50(0x142)]()[_0x590d50(0x13c)](0x2,'0'),_0xbc6ce3=_0x66f0e1[_0x590d50(0x146)]()[_0x590d50(0x142)]()['padStart'](0x2,'0'),_0x37ac38=_0x66f0e1[_0x590d50(0x144)]()[_0x590d50(0x142)]()[_0x590d50(0x13c)](0x3,'0'),_0x39f5d4=-_0x66f0e1['getTimezoneOffset'](),_0x1b89e5=Math[_0x590d50(0x13a)](Math['abs'](_0x39f5d4)/0x3c),_0x2a5c26=Math[_0x590d50(0x145)](_0x39f5d4)%0x3c,_0x437a1b=_0x39f5d4>=0x0?'+':'-',_0x415d65=''+_0x437a1b+_0x1b89e5[_0x590d50(0x142)]()[_0x590d50(0x13c)](0x2,'0')+_0x2a5c26[_0x590d50(0x142)]()[_0x590d50(0x13c)](0x2,'0');return _0x127f27+'-'+_0x3196dc+'-'+_0x478130+'\x20'+_0x65c8a6+':'+_0x30c934+':'+_0xbc6ce3+'.'+_0x37ac38+_0x415d65;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a173_0x5a07(_0x26cadf,_0x59fcb3){_0x26cadf=_0x26cadf-0x195;const _0x594730=a173_0x5947();let _0x5a0789=_0x594730[_0x26cadf];return _0x5a0789;}(function(_0x11a651,_0x5b1d6c){const _0x4dac5b=a173_0x5a07,_0x5006a6=_0x11a651();while(!![]){try{const _0x9c047e=parseInt(_0x4dac5b(0x199))/0x1+-parseInt(_0x4dac5b(0x19e))/0x2+-parseInt(_0x4dac5b(0x19f))/0x3*(-parseInt(_0x4dac5b(0x196))/0x4)+-parseInt(_0x4dac5b(0x1a0))/0x5+-parseInt(_0x4dac5b(0x197))/0x6*(parseInt(_0x4dac5b(0x1a4))/0x7)+parseInt(_0x4dac5b(0x19b))/0x8*(parseInt(_0x4dac5b(0x19a))/0x9)+-parseInt(_0x4dac5b(0x195))/0xa;if(_0x9c047e===_0x5b1d6c)break;else _0x5006a6['push'](_0x5006a6['shift']());}catch(_0xdea80c){_0x5006a6['push'](_0x5006a6['shift']());}}}(a173_0x5947,0x56bdb));function a173_0x5947(){const _0x59607f=['656737hUIWup','5355FMonMW','1912TBGnHS','.\x20Must\x20be\x20a\x20number.','Invalid\x20timeout\x20value:\x20','169722MGMJQa','1456746oSbeDq','177575gwRnXP','.\x20Must\x20be\x20a\x20positive\x20integer.','Invalid\x20limit\x20value:\x20','isInteger','14tMFIqU','6082490YGqEoE','4HHcKKj','601824uMGBRS','.\x20Must\x20be\x20an\x20integer.'];a173_0x5947=function(){return _0x59607f;};return a173_0x5947();}export function validateLimitOption(_0x1e2873){const _0x1c6b69=a173_0x5a07;if(!Number[_0x1c6b69(0x1a3)](_0x1e2873))return{'isValid':![],'error':_0x1c6b69(0x1a2)+_0x1e2873+_0x1c6b69(0x198)};if(_0x1e2873<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x1e2873+_0x1c6b69(0x1a1)};return{'isValid':!![],'value':_0x1e2873};}export function validateTimeoutOption(_0x5d2e1c,_0x1fd23e=0x1e){const _0xc7825d=a173_0x5a07;if(_0x5d2e1c===undefined)return{'isValid':!![],'value':_0x1fd23e};const _0x49aac7=typeof _0x5d2e1c==='number'?_0x5d2e1c:parseFloat(_0x5d2e1c);if(isNaN(_0x49aac7))return{'isValid':![],'error':_0xc7825d(0x19d)+_0x5d2e1c+_0xc7825d(0x19c)};if(_0x49aac7<=0x0)return{'isValid':![],'error':_0xc7825d(0x19d)+_0x49aac7+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x49aac7};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a174_0x50c2(){const _0x159c9c=['ppid','electron','start','zsh','toLowerCase','kill','pipe','5564094cWdWsH','darwin','459744axjoOF','where.exe','has','map','data','open','pid','6058876GHbsGG','144njLmPt','win32','Unsupported\x20protocol:\x20','pwsh','claude','\x20-o\x20ppid=,comm=','346pYjohR','ion','pop','test','treasure\x20studio','isInteger','240520InKYqf','8867935JGPjga','stdout','exit','1797RFluRP','split','cmd.exe','protocol','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','8512427ITshDf','xonsh','code','stderr','ignore','trim','join','xdg-open','ps\x20-p\x20','replace','bash','cursor','unref','ksh','Invalid\x20URL:\x20','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','utf-8','comm','fish','platform'];a174_0x50c2=function(){return _0x159c9c;};return a174_0x50c2();}const a174_0x415b8b=a174_0x5541;(function(_0x3515a3,_0x3da604){const _0x368048=a174_0x5541,_0xfe9702=_0x3515a3();while(!![]){try{const _0x4e2caa=-parseInt(_0x368048(0x1c9))/0x1*(-parseInt(_0x368048(0x1bf))/0x2)+-parseInt(_0x368048(0x1af))/0x3+parseInt(_0x368048(0x1b8))/0x4+parseInt(_0x368048(0x1c6))/0x5+-parseInt(_0x368048(0x1b1))/0x6+-parseInt(_0x368048(0x1ce))/0x7+-parseInt(_0x368048(0x1c5))/0x8*(-parseInt(_0x368048(0x1b9))/0x9);if(_0x4e2caa===_0x3da604)break;else _0xfe9702['push'](_0xfe9702['shift']());}catch(_0x58ef47){_0xfe9702['push'](_0xfe9702['shift']());}}}(a174_0x50c2,0xe3bec));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a174_0x415b8b(0x1d8),a174_0x415b8b(0x1ab),'sh',a174_0x415b8b(0x1a6),a174_0x415b8b(0x1a1),'tcsh','csh','dash',a174_0x415b8b(0x1bc),'powershell','nu',a174_0x415b8b(0x1c0),'elvish',a174_0x415b8b(0x1cf)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a174_0x415b8b(0x1bd),a174_0x415b8b(0x1d0),a174_0x415b8b(0x1d9),a174_0x415b8b(0x1a9),a174_0x415b8b(0x1c3)]);function getProcessInfoWindows(_0x5c356a){const _0x12648b=a174_0x415b8b;try{if(!Number['isInteger'](_0x5c356a)||_0x5c356a<=0x0)return null;const _0x27f9ff=_0x12648b(0x1a3)+_0x5c356a+_0x12648b(0x1cd),_0x4c175c=execSync('powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22'+_0x27f9ff+'\x22',{'encoding':_0x12648b(0x1a4),'windowsHide':!![],'stdio':[_0x12648b(0x1ae),_0x12648b(0x1ae),_0x12648b(0x1ae)]})['trim']();if(!_0x4c175c)return null;const [_0x25b4df,..._0x120206]=_0x4c175c[_0x12648b(0x1ca)](','),_0x4e56a8=parseInt(_0x25b4df,0xa),_0x3efa9f=_0x120206[_0x12648b(0x1d4)](',')[_0x12648b(0x1d3)]();if(isNaN(_0x4e56a8)||!_0x3efa9f)return null;return{'pid':_0x5c356a,'ppid':_0x4e56a8,'comm':_0x3efa9f[_0x12648b(0x1d7)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x47a49f){const _0x3f033d=a174_0x415b8b;try{const _0x502b82=0x400000;if(!Number[_0x3f033d(0x1c4)](_0x47a49f)||_0x47a49f<=0x0||_0x47a49f>_0x502b82)return null;const _0x66638e=execSync(_0x3f033d(0x1d6)+_0x47a49f+_0x3f033d(0x1be),{'encoding':_0x3f033d(0x1a4),'stdio':_0x3f033d(0x1ae)})[_0x3f033d(0x1d3)](),[_0xfa8f3b,..._0x112b05]=_0x66638e[_0x3f033d(0x1ca)](/\s+/),_0x5dda5f=parseInt(_0xfa8f3b,0xa),_0x247729=_0x112b05['join']('\x20');if(isNaN(_0x5dda5f))return null;return{'pid':_0x47a49f,'ppid':_0x5dda5f,'comm':_0x247729};}catch{return null;}}function getProcessInfo(_0x50b35c){const _0x3f30da=a174_0x415b8b;if(process[_0x3f30da(0x1a7)]===_0x3f30da(0x1ba))return getProcessInfoWindows(_0x50b35c);return getProcessInfoPosix(_0x50b35c);}function getBasename(_0xb656b1){const _0x286128=a174_0x415b8b;return _0xb656b1[_0x286128(0x1d7)](/^-/,'')[_0x286128(0x1ca)]('/')[_0x286128(0x1c1)]()?.[_0x286128(0x1ac)]()||'';}function isShell(_0x4a97a8){const _0x141689=a174_0x415b8b;return SHELL_NAMES[_0x141689(0x1b3)](getBasename(_0x4a97a8));}function isEphemeralShellSpawner(_0x30c924){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x30c924));}let cachedShellPID;function findShellPID(){const _0x2d8a68=a174_0x415b8b;if(process[_0x2d8a68(0x1a8)]===undefined)return process[_0x2d8a68(0x1b7)];let _0xc340f6=process[_0x2d8a68(0x1a8)];const _0x3be649=0xa;let _0x5f487a=0x0;while(_0x5f487a<_0x3be649){const _0x473431=getProcessInfo(_0xc340f6);if(!_0x473431)break;if(isShell(_0x473431[_0x2d8a68(0x1a5)])){const _0x5d4544=getProcessInfo(_0x473431['ppid']);if(_0x5d4544&&isEphemeralShellSpawner(_0x5d4544[_0x2d8a68(0x1a5)])){_0xc340f6=_0x473431[_0x2d8a68(0x1a8)],_0x5f487a++;continue;}return _0x473431['pid'];}if(_0x473431[_0x2d8a68(0x1a8)]===0x0||_0x473431['ppid']===0x1){if(isShell(_0x473431['comm']))return _0x473431[_0x2d8a68(0x1b7)];break;}_0xc340f6=_0x473431[_0x2d8a68(0x1a8)],_0x5f487a++;}return process[_0x2d8a68(0x1a8)]!==undefined?process[_0x2d8a68(0x1a8)]:process[_0x2d8a68(0x1b7)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x9956c3){const _0x5f24de=a174_0x415b8b;if(!Number[_0x5f24de(0x1c4)](_0x9956c3)||_0x9956c3<=0x0)return![];try{return process[_0x5f24de(0x1ad)](_0x9956c3,0x0),!![];}catch{return![];}}export function openBrowser(_0x175548){const _0x56a45c=a174_0x415b8b;let _0x4517fc;try{_0x4517fc=new URL(_0x175548);}catch{throw new Error(_0x56a45c(0x1a2)+_0x175548);}if(_0x4517fc[_0x56a45c(0x1cc)]!=='http:'&&_0x4517fc[_0x56a45c(0x1cc)]!=='https:')throw new Error(_0x56a45c(0x1bb)+_0x4517fc[_0x56a45c(0x1cc)]);const _0x257a1a=_0x4517fc['href'],_0x58c838=process[_0x56a45c(0x1a7)];if(_0x58c838==='win32')spawn(_0x56a45c(0x1cb),['/c',_0x56a45c(0x1aa),'',_0x257a1a],{'detached':!![],'stdio':_0x56a45c(0x1d2)})[_0x56a45c(0x1da)]();else{const _0x210e85=_0x58c838===_0x56a45c(0x1b0)?_0x56a45c(0x1b6):_0x56a45c(0x1d5);spawn(_0x210e85,[_0x257a1a],{'detached':!![],'stdio':'ignore'})['unref']();}}function a174_0x5541(_0x2fa61f,_0x586806){_0x2fa61f=_0x2fa61f-0x1a1;const _0x50c2fe=a174_0x50c2();let _0x55411a=_0x50c2fe[_0x2fa61f];return _0x55411a;}export function isWindows(){const _0x5ef4a0=a174_0x415b8b;return process[_0x5ef4a0(0x1a7)]===_0x5ef4a0(0x1ba);}export function getCrossSpawnOptions(_0x13ec27){return{..._0x13ec27??{},'shell':isWindows()};}export function escapeWindowsArg(_0x113ba4){const _0x5db06b=a174_0x415b8b;if(!/[ \t"&|<>^%!`\r\n]/[_0x5db06b(0x1c2)](_0x113ba4))return _0x113ba4;const _0x292ea5=_0x113ba4['replace'](/"/g,'\x22\x22');return'\x22'+_0x292ea5+'\x22';}export function crossSpawn(_0x4304f4,_0xf73f15,_0x2b2bc4){const _0x302ba5=a174_0x415b8b;if(isWindows()){const _0x1acc1e=escapeWindowsArg(_0x4304f4),_0x527286=_0xf73f15[_0x302ba5(0x1b4)](escapeWindowsArg),_0x311bce=[_0x1acc1e,..._0x527286][_0x302ba5(0x1d4)]('\x20');return spawn(_0x311bce,[],{..._0x2b2bc4,'shell':!![]});}return spawn(_0x4304f4,_0xf73f15,{..._0x2b2bc4,'shell':![]});}export function gracefulExit(_0x1c8536=0x0){const _0x43a73f=a174_0x415b8b;isWindows()?setImmediate(()=>process[_0x43a73f(0x1c8)](_0x1c8536)):process[_0x43a73f(0x1c8)](_0x1c8536);}export function findExecutable(_0x1ed985,_0x36655d=0x1388){return new Promise(_0x20093a=>{const _0x5a5e83=a174_0x5541,_0x3ec6c4=isWindows()?_0x5a5e83(0x1b2):'which';let _0x50d237=![];const _0x3e93b6=crossSpawn(_0x3ec6c4,[_0x1ed985],{'stdio':'pipe','shell':isWindows()}),_0x2de3a9=setTimeout(()=>{const _0x5aab39=_0x5a5e83;!_0x50d237&&(_0x50d237=!![],_0x3e93b6[_0x5aab39(0x1ad)](),_0x20093a(null));},_0x36655d);let _0x349987='';_0x3e93b6[_0x5a5e83(0x1c7)]?.['on'](_0x5a5e83(0x1b5),_0x3f08b7=>{_0x349987+=_0x3f08b7['toString']();}),_0x3e93b6[_0x5a5e83(0x1d1)]?.['on'](_0x5a5e83(0x1b5),()=>{}),_0x3e93b6['on'](_0x5a5e83(0x1c8),_0x58fc95=>{const _0x14300b=_0x5a5e83;if(_0x50d237)return;_0x50d237=!![],clearTimeout(_0x2de3a9);if(_0x58fc95===0x0&&_0x349987[_0x14300b(0x1d3)]()){const _0x170f8b=_0x349987[_0x14300b(0x1d3)]()['split'](/\r?\n/)[0x0];_0x20093a(_0x170f8b);}else _0x20093a(null);}),_0x3e93b6['on']('error',()=>{if(_0x50d237)return;_0x50d237=!![],clearTimeout(_0x2de3a9),_0x20093a(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x510cf3,_0x5f5bc8){const _0xc762c5=a175_0x9e5b,_0x587305=_0x510cf3();while(!![]){try{const _0x18e501=-parseInt(_0xc762c5(0x193))/0x1*(-parseInt(_0xc762c5(0x17a))/0x2)+-parseInt(_0xc762c5(0x180))/0x3*(-parseInt(_0xc762c5(0x183))/0x4)+parseInt(_0xc762c5(0x17b))/0x5+-parseInt(_0xc762c5(0x17d))/0x6*(parseInt(_0xc762c5(0x186))/0x7)+parseInt(_0xc762c5(0x187))/0x8*(parseInt(_0xc762c5(0x18a))/0x9)+parseInt(_0xc762c5(0x18e))/0xa*(parseInt(_0xc762c5(0x17e))/0xb)+-parseInt(_0xc762c5(0x18d))/0xc;if(_0x18e501===_0x5f5bc8)break;else _0x587305['push'](_0x587305['shift']());}catch(_0x35e044){_0x587305['push'](_0x587305['shift']());}}}(a175_0x2348,0x4108a));function a175_0x9e5b(_0x57d22c,_0x167983){_0x57d22c=_0x57d22c-0x179;const _0x234834=a175_0x2348();let _0x9e5be4=_0x234834[_0x57d22c];return _0x9e5be4;}import*as a175_0x21cc14 from'readline';export function isInteractive(){const _0x1036fc=a175_0x9e5b;return process[_0x1036fc(0x17c)][_0x1036fc(0x195)]===!![];}function a175_0x2348(){const _0xf4eeb0=['\x20[y/N]\x20','close','utf8','\x20(y/N):\x20','1rSaShq','removeListener','isTTY','setEncoding','761414PZlOyC','2285825FjCxce','stdin','12NuVKtC','440mbVNwJ','stderr','45lljfYw','pause','stdout','58528jnTqnD','resume','write','278467vQnNdw','701416zZyIjy','toLowerCase','yes','27bzxdFr','setRawMode','question','17223876ljwYSC','115220HKmubz'];a175_0x2348=function(){return _0xf4eeb0;};return a175_0x2348();}export async function confirm(_0x21fee4){const _0x481f79=a175_0x9e5b,_0x296de0=a175_0x21cc14['createInterface']({'input':process[_0x481f79(0x17c)],'output':process[_0x481f79(0x182)]});return new Promise(_0x8c3a24=>{const _0xb7471d=_0x481f79;_0x296de0[_0xb7471d(0x18c)](_0x21fee4+_0xb7471d(0x192),_0x3ea740=>{const _0x4f6358=_0xb7471d;_0x296de0[_0x4f6358(0x190)](),_0x8c3a24(_0x3ea740[_0x4f6358(0x188)]()==='y'||_0x3ea740[_0x4f6358(0x188)]()===_0x4f6358(0x189));});});}export async function confirmKey(_0x611bbb){const _0x28d1e1=a175_0x9e5b;if(!process['stdin'][_0x28d1e1(0x195)])return![];return process[_0x28d1e1(0x17f)][_0x28d1e1(0x185)](_0x611bbb+_0x28d1e1(0x18f)),new Promise(_0x4617f3=>{const _0x50dbb9=_0x28d1e1,_0x253ff6=process['stdin'];_0x253ff6[_0x50dbb9(0x18b)](!![]),_0x253ff6[_0x50dbb9(0x184)](),_0x253ff6[_0x50dbb9(0x179)](_0x50dbb9(0x191));const _0x448a22=_0x3d4b75=>{const _0x2d3cb6=_0x50dbb9;_0x253ff6[_0x2d3cb6(0x18b)](![]),_0x253ff6[_0x2d3cb6(0x181)](),_0x253ff6[_0x2d3cb6(0x194)]('data',_0x448a22);if(_0x3d4b75==='\x1b'){process[_0x2d3cb6(0x17f)][_0x2d3cb6(0x185)]('\x0a'),_0x4617f3(![]);return;}_0x3d4b75==='\x03'&&(process['stderr'][_0x2d3cb6(0x185)]('\x0a'),process['exit'](0x82));if(_0x3d4b75['toLowerCase']()==='y'){process[_0x2d3cb6(0x17f)][_0x2d3cb6(0x185)]('y\x0a'),_0x4617f3(!![]);return;}process[_0x2d3cb6(0x17f)][_0x2d3cb6(0x185)]('\x0a'),_0x4617f3(![]);};_0x253ff6['on']('data',_0x448a22);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cb274,_0x132439){const _0x45b3a5=a176_0x22c4,_0x42a5f0=_0x5cb274();while(!![]){try{const _0x2ad612=parseInt(_0x45b3a5(0x15d))/0x1+parseInt(_0x45b3a5(0x16f))/0x2+parseInt(_0x45b3a5(0x173))/0x3+parseInt(_0x45b3a5(0x16c))/0x4+-parseInt(_0x45b3a5(0x16d))/0x5+-parseInt(_0x45b3a5(0x168))/0x6*(parseInt(_0x45b3a5(0x15b))/0x7)+parseInt(_0x45b3a5(0x171))/0x8;if(_0x2ad612===_0x132439)break;else _0x42a5f0['push'](_0x42a5f0['shift']());}catch(_0x5e9b7b){_0x42a5f0['push'](_0x42a5f0['shift']());}}}(a176_0x3c3c,0xd1fd7));import a176_0x57cd50 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};function a176_0x22c4(_0x4af127,_0x202fd3){_0x4af127=_0x4af127-0x15b;const _0x3c3c41=a176_0x3c3c();let _0x22c4ec=_0x3c3c41[_0x4af127];return _0x22c4ec;}export function createCommandSpinner(_0x4a1ac2,_0x4b5460={}){const _0x9c5f7=a176_0x22c4,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x4b5460;return a176_0x57cd50({'text':_0x4a1ac2,'color':'cyan','stream':process[_0x9c5f7(0x15e)],'isEnabled':forceEnabled||process[_0x9c5f7(0x15e)][_0x9c5f7(0x164)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}function a176_0x3c3c(){const _0x296683=['isSpinning','19717352aZxKXn','intervalFactory','298947vVBBZr','phase','text','35IMOTCT','Processing','131515EKfEZU','stderr','toFixed','jobId','clock','start','floor','isTTY','extra','...','replace','1554270eSxBCv','stop','\x20[Job\x20ID:\x20','trim','262284niwhOg','5434680eTNKlV','now','961752ePwtMu'];a176_0x3c3c=function(){return _0x296683;};return a176_0x3c3c();}export async function withSpinner(_0x30db93,_0x559bb0,_0x310e42={}){const _0x57f97a=a176_0x22c4,_0x5d2784=_0x310e42['clock']??(()=>Date[_0x57f97a(0x16e)]()),_0x254d74=createCommandSpinner(_0x30db93,_0x310e42);_0x254d74[_0x57f97a(0x162)]();const _0x45441e=_0x5d2784();try{const _0x12d443=await _0x559bb0(),_0x4b0887=_0x5d2784()-_0x45441e;return _0x254d74[_0x57f97a(0x169)](),{'data':_0x12d443,'elapsedMs':_0x4b0887};}catch(_0xb860f6){_0x254d74[_0x57f97a(0x169)]();throw _0xb860f6;}}export async function withProgressSpinner(_0x52bc91,_0x8640d5,_0x3ebcf6={}){const _0x16684a=a176_0x22c4,_0x141bc7=_0x3ebcf6[_0x16684a(0x161)]??(()=>Date[_0x16684a(0x16e)]()),_0x5a2007=_0x3ebcf6[_0x16684a(0x172)]??setInterval,_0xf38987=createCommandSpinner(_0x52bc91,_0x3ebcf6);_0xf38987[_0x16684a(0x162)]();const _0x34cbe8=_0x141bc7(),_0xb5dadf=_0x52bc91[_0x16684a(0x167)](_0x16684a(0x166),'')[_0x16684a(0x16b)]()||_0x16684a(0x15c),_0x507fdd={};let _0x14d7cc=_0x52bc91;const _0x5553d7=()=>{const _0x2eac4c=_0x16684a;if(!_0xf38987[_0x2eac4c(0x170)])return;const _0xd60034=_0x141bc7()-_0x34cbe8,_0x24cd23=formatElapsed(_0xd60034),_0xb87aa2=_0x507fdd[_0x2eac4c(0x174)]?.['trim']()||_0xb5dadf,_0x1d5af2=_0x507fdd['jobId']?'\x20[Job\x20ID:\x20'+_0x507fdd[_0x2eac4c(0x160)]+']':'',_0x5d7bdb=_0x507fdd[_0x2eac4c(0x165)]?'\x20'+_0x507fdd[_0x2eac4c(0x165)]:'',_0x55dff6=_0xb87aa2+'\x20'+_0x24cd23+_0x5d7bdb+_0x1d5af2;_0x55dff6!==_0x14d7cc&&_0x55dff6[_0x2eac4c(0x16b)]()&&(_0xf38987[_0x2eac4c(0x175)]=_0x55dff6,_0x14d7cc=_0x55dff6);},_0x4e6a32=_0x5a2007(()=>{_0x5553d7();},0x3e8),_0x4beea6={'setPhase':_0x25753d=>{const _0x1549bc=_0x16684a;_0x507fdd['phase']=_0x25753d;const _0x5a7f19=_0x25753d?.[_0x1549bc(0x16b)]()||_0xb5dadf,_0x4cb575=_0x141bc7()-_0x34cbe8,_0x5e0799=formatElapsed(_0x4cb575),_0x5a1a9a=_0x507fdd[_0x1549bc(0x160)]?_0x1549bc(0x16a)+_0x507fdd[_0x1549bc(0x160)]+']':'',_0x47fe26=_0x507fdd[_0x1549bc(0x165)]?'\x20'+_0x507fdd['extra']:'',_0x5801d7=_0x5a7f19+'\x20'+_0x5e0799+_0x47fe26+_0x5a1a9a;_0xf38987[_0x1549bc(0x170)]&&_0x5801d7[_0x1549bc(0x16b)]()&&(_0xf38987[_0x1549bc(0x175)]=_0x5801d7,_0x14d7cc=_0x5801d7);},'setJobId':_0xca634f=>{_0x507fdd['jobId']=_0xca634f,_0x5553d7();},'setExtra':_0x3d8722=>{_0x507fdd['extra']=_0x3d8722,_0x5553d7();}};_0x5553d7();try{const _0x2292b1=await _0x8640d5(_0x4beea6),_0xcee00d=_0x141bc7()-_0x34cbe8;return{'data':_0x2292b1,'elapsedMs':_0xcee00d};}finally{clearInterval(_0x4e6a32),_0xf38987[_0x16684a(0x169)]();}}export function formatElapsed(_0x4409d9){const _0xcfb78d=a176_0x22c4,_0x549e74=Math[_0xcfb78d(0x163)](_0x4409d9/0x3e8);if(_0x549e74<0x3c)return(_0x4409d9/0x3e8)[_0xcfb78d(0x15f)](0x1)+'s';const _0x448ef9=Math['floor'](_0x549e74/0x3c),_0x838234=_0x549e74%0x3c;if(_0x448ef9<0x3c)return _0x448ef9+'m\x20'+_0x838234+'s';const _0xdeae15=Math[_0xcfb78d(0x163)](_0x448ef9/0x3c),_0x907f53=_0x448ef9%0x3c;return _0xdeae15+'h\x20'+_0x907f53+'m';}
|